From 2bd7dee3c786919b349127ca16e879fda1347e64 Mon Sep 17 00:00:00 2001 From: knsv Date: Sat, 11 Apr 2015 16:36:04 +0200 Subject: [PATCH 1/6] Fix for init not running by default --- src/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.js b/src/main.js index 8a861d1daa..9bd72462dc 100644 --- a/src/main.js +++ b/src/main.js @@ -222,12 +222,12 @@ exports.contentLoaded = function(){ if (typeof mermaid_config !== 'undefined') { // Check if property startOnLoad is set if (equals(true, mermaid_config.startOnLoad)) { - global.mermaid.init(mermaid.sequenceConfig); + global.mermaid.init(); } } else { // No config found, do autostart in this simple case - global.mermaid.init(mermaid.sequenceConfig); + global.mermaid.init(); } } From f310eb057464ae3cf6cbf7f8aefe3f327e4f58b8 Mon Sep 17 00:00:00 2001 From: knsv Date: Sat, 11 Apr 2015 16:47:14 +0200 Subject: [PATCH 2/6] Fix for default arguments to init method --- dist/mermaid.full.js | 4748 +++++++++++++++++---------------- dist/mermaid.full.min.js | 36 +- dist/mermaid.slim.js | 4738 ++++++++++++++++---------------- dist/mermaid.slim.min.js | 26 +- src/diagrams/gantt/exGantt.md | 1 + test/gantt.html | 3 +- 6 files changed, 4819 insertions(+), 4733 deletions(-) diff --git a/dist/mermaid.full.js b/dist/mermaid.full.js index 62f70a48b2..bb13d1461d 100644 --- a/dist/mermaid.full.js +++ b/dist/mermaid.full.js @@ -25,11 +25,11 @@ var t=x.length;if(t){x.sort(c);for(var e,r=1,u=x[0],i=[u];t>r;++r)e=x[r],l(e[0], * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -module.exports={graphlib:require("./lib/graphlib"),dagre:require("./lib/dagre"),intersect:require("./lib/intersect"),render:require("./lib/render"),util:require("./lib/util"),version:require("./lib/version")}},{"./lib/dagre":8,"./lib/graphlib":9,"./lib/intersect":10,"./lib/render":23,"./lib/util":25,"./lib/version":26}],2:[function(require,module,exports){var util=require("./util");module.exports={"default":normal,normal:normal,vee:vee,undirected:undirected};function normal(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}function vee(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}function undirected(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}},{"./util":25}],3:[function(require,module,exports){var util=require("./util");module.exports=createClusters;function createClusters(selection,g){var clusters=g.nodes().filter(function(v){return util.isSubgraph(g,v)}),svgClusters=selection.selectAll("g.cluster").data(clusters,function(v){return v});svgClusters.enter().append("g").attr("class","cluster").style("opacity",0).append("rect");util.applyTransition(svgClusters.exit(),g).style("opacity",0).remove();util.applyTransition(svgClusters,g).style("opacity",1);util.applyTransition(svgClusters.selectAll("rect"),g).attr("width",function(v){return g.node(v).width}).attr("height",function(v){return g.node(v).height}).attr("x",function(v){var node=g.node(v);return node.x-node.width/2}).attr("y",function(v){var node=g.node(v);return node.y-node.height/2})}},{"./util":25}],4:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createEdgeLabels;function createEdgeLabels(selection,g){var svgEdgeLabels=selection.selectAll("g.edgeLabel").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);svgEdgeLabels.selectAll("*").remove();svgEdgeLabels.enter().append("g").classed("edgeLabel",true).style("opacity",0);svgEdgeLabels.each(function(e){var edge=g.edge(e),label=addLabel(d3.select(this),g.edge(e),0,0).classed("label",true),bbox=label.node().getBBox();if(edge.labelId){label.attr("id",edge.labelId)}if(!_.has(edge,"width")){edge.width=bbox.width}if(!_.has(edge,"height")){edge.height=bbox.height}});util.applyTransition(svgEdgeLabels.exit(),g).style("opacity",0).remove();return svgEdgeLabels}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],5:[function(require,module,exports){"use strict";var _=require("./lodash"),intersectNode=require("./intersect/intersect-node"),util=require("./util"),d3=require("./d3");module.exports=createEdgePaths;function createEdgePaths(selection,g,arrows){var svgPaths=selection.selectAll("g.edgePath").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);enter(svgPaths,g);exit(svgPaths,g);util.applyTransition(svgPaths,g).style("opacity",1);svgPaths.each(function(e){var edge=g.edge(e);edge.elem=this;if(edge.id){d3.select(this).attr("id",edge.id)}});svgPaths.selectAll("path.path").each(function(e){var edge=g.edge(e);edge.arrowheadId=_.uniqueId("arrowhead");var domEdge=d3.select(this).attr("marker-end",function(){return"url(#"+edge.arrowheadId+")"}).style("fill","none");util.applyTransition(domEdge,g).attr("d",function(e){return calcPoints(g,e)});util.applyStyle(domEdge,edge.style)});svgPaths.selectAll("defs *").remove();svgPaths.selectAll("defs").each(function(e){var edge=g.edge(e),arrowhead=arrows[edge.arrowhead];arrowhead(d3.select(this),edge.arrowheadId,edge,"arrowhead")});return svgPaths}function calcPoints(g,e){var edge=g.edge(e),tail=g.node(e.v),head=g.node(e.w),points=edge.points.slice(1,edge.points.length-1);points.unshift(intersectNode(tail,points[0]));points.push(intersectNode(head,points[points.length-1]));return createLine(edge,points)}function createLine(edge,points){var line=d3.svg.line().x(function(d){return d.x}).y(function(d){return d.y});if(_.has(edge,"lineInterpolate")){line.interpolate(edge.lineInterpolate)}if(_.has(edge,"lineTension")){line.tension(Number(edge.lineTension))}return line(points)}function getCoords(elem){var bbox=elem.getBBox(),matrix=elem.getTransformToElement(elem.ownerSVGElement).translate(bbox.width/2,bbox.height/2);return{x:matrix.e,y:matrix.f}}function enter(svgPaths,g){var svgPathsEnter=svgPaths.enter().append("g").attr("class","edgePath").style("opacity",0);svgPathsEnter.append("path").attr("class","path").attr("d",function(e){var edge=g.edge(e),sourceElem=g.node(e.v).elem,points=_.range(edge.points.length).map(function(){return getCoords(sourceElem)});return createLine(edge,points)});svgPathsEnter.append("defs")}function exit(svgPaths,g){var svgPathExit=svgPaths.exit();util.applyTransition(svgPathExit,g).style("opacity",0).remove();util.applyTransition(svgPathExit.select("path.path"),g).attr("d",function(e){var source=g.node(e.v);if(source){var points=_.range(this.pathSegList.length).map(function(){return source});return createLine({},points)}else{return d3.select(this).attr("d")}})}},{"./d3":7,"./intersect/intersect-node":14,"./lodash":20,"./util":25}],6:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createNodes;function createNodes(selection,g,shapes){var simpleNodes=g.nodes().filter(function(v){return!util.isSubgraph(g,v)});var svgNodes=selection.selectAll("g.node").data(simpleNodes,function(v){return v}).classed("update",true);svgNodes.selectAll("*").remove();svgNodes.enter().append("g").attr("class","node").style("opacity",0);svgNodes.each(function(v){var node=g.node(v),thisGroup=d3.select(this),labelGroup=thisGroup.append("g").attr("class","label"),labelDom=addLabel(labelGroup,node),shape=shapes[node.shape],bbox=_.pick(labelDom.node().getBBox(),"width","height");node.elem=this;if(node.id){thisGroup.attr("id",node.id)}if(node.labelId){labelGroup.attr("id",node.labelId)}util.applyClass(thisGroup,node["class"],(thisGroup.classed("update")?"update ":"")+"node");if(_.has(node,"width")){bbox.width=node.width}if(_.has(node,"height")){bbox.height=node.height}bbox.width+=node.paddingLeft+node.paddingRight;bbox.height+=node.paddingTop+node.paddingBottom;labelGroup.attr("transform","translate("+(node.paddingLeft-node.paddingRight)/2+","+(node.paddingTop-node.paddingBottom)/2+")");var shapeSvg=shape(d3.select(this),bbox,node);util.applyStyle(shapeSvg,node.style);var shapeBBox=shapeSvg.node().getBBox();node.width=shapeBBox.width;node.height=shapeBBox.height});util.applyTransition(svgNodes.exit(),g).style("opacity",0).remove();return svgNodes}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],7:[function(require,module,exports){module.exports=window.d3},{}],8:[function(require,module,exports){var dagre;if(require){try{dagre=require("dagre")}catch(e){}}if(!dagre){dagre=window.dagre}module.exports=dagre},{dagre:27}],9:[function(require,module,exports){var graphlib;if(require){try{graphlib=require("graphlib")}catch(e){}}if(!graphlib){graphlib=window.graphlib}module.exports=graphlib},{graphlib:57}],10:[function(require,module,exports){module.exports={node:require("./intersect-node"),circle:require("./intersect-circle"),ellipse:require("./intersect-ellipse"),polygon:require("./intersect-polygon"),rect:require("./intersect-rect")}},{"./intersect-circle":11,"./intersect-ellipse":12,"./intersect-node":14,"./intersect-polygon":15,"./intersect-rect":16}],11:[function(require,module,exports){var intersectEllipse=require("./intersect-ellipse");module.exports=intersectCircle;function intersectCircle(node,rx,point){return intersectEllipse(node,rx,rx,point)}},{"./intersect-ellipse":12}],12:[function(require,module,exports){module.exports=intersectEllipse;function intersectEllipse(node,rx,ry,point){var cx=node.x;var cy=node.y;var px=cx-point.x;var py=cy-point.y;var det=Math.sqrt(rx*rx*py*py+ry*ry*px*px);var dx=Math.abs(rx*ry*px/det);if(point.x0}},{}],14:[function(require,module,exports){module.exports=intersectNode;function intersectNode(node,point){return node.intersect(point)}},{}],15:[function(require,module,exports){var intersectLine=require("./intersect-line");module.exports=intersectPolygon;function intersectPolygon(node,polyPoints,point){var x1=node.x;var y1=node.y;var intersections=[];var minX=Number.POSITIVE_INFINITY,minY=Number.POSITIVE_INFINITY;polyPoints.forEach(function(entry){minX=Math.min(minX,entry.x);minY=Math.min(minY,entry.y)});var left=x1-node.width/2-minX;var top=y1-node.height/2-minY;for(var i=0;i1){intersections.sort(function(p,q){var pdx=p.x-point.x,pdy=p.y-point.y,distp=Math.sqrt(pdx*pdx+pdy*pdy),qdx=q.x-point.x,qdy=q.y-point.y,distq=Math.sqrt(qdx*qdx+qdy*qdy);return distpMath.abs(dx)*h){if(dy<0){h=-h}sx=dy===0?0:h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=dx===0?0:w*dy/dx}return{x:x+sx,y:y+sy}}},{}],17:[function(require,module,exports){var util=require("../util");module.exports=addHtmlLabel;function addHtmlLabel(root,node){var fo=root.append("foreignObject").attr("width","100000");var div=fo.append("xhtml:div");var label=node.label;switch(typeof label){case"function":div.insert(label);break;case"object":div.insert(function(){return label});break;default:div.html(label)}util.applyStyle(div,node.labelStyle);div.style("display","inline-block");div.style("white-space","nowrap");var w,h;div.each(function(){w=this.clientWidth;h=this.clientHeight});fo.attr("width",w).attr("height",h);return fo}},{"../util":25}],18:[function(require,module,exports){var addTextLabel=require("./add-text-label"),addHtmlLabel=require("./add-html-label");module.exports=addLabel;function addLabel(root,node){var label=node.label;var labelSvg=root.append("g");if(typeof label!=="string"||node.labelType==="html"){addHtmlLabel(labelSvg,node)}else{addTextLabel(labelSvg,node)}var labelBBox=labelSvg.node().getBBox();labelSvg.attr("transform","translate("+-labelBBox.width/2+","+-labelBBox.height/2+")");return labelSvg}},{"./add-html-label":17,"./add-text-label":19}],19:[function(require,module,exports){var util=require("../util");module.exports=addTextLabel;function addTextLabel(root,node){var domNode=root.append("text");var lines=processEscapeSequences(node.label).split("\n");for(var i=0;i0;--i){entry=buckets[i].dequeue();if(entry){results=results.concat(removeNode(g,buckets,zeroIdx,entry,true));break}}}}return results}function removeNode(g,buckets,zeroIdx,entry,collectPredecessors){var results=collectPredecessors?[]:undefined;_.each(g.inEdges(entry.v),function(edge){var weight=g.edge(edge),uEntry=g.node(edge.v);if(collectPredecessors){results.push({v:edge.v,w:edge.w})}uEntry.out-=weight;assignBucket(buckets,zeroIdx,uEntry)});_.each(g.outEdges(entry.v),function(edge){var weight=g.edge(edge),w=edge.w,wEntry=g.node(w);wEntry["in"]-=weight;assignBucket(buckets,zeroIdx,wEntry)});g.removeNode(entry.v);return results}function buildState(g,weightFn){var fasGraph=new Graph,maxIn=0,maxOut=0;_.each(g.nodes(),function(v){fasGraph.setNode(v,{v:v,"in":0,out:0})});_.each(g.edges(),function(e){var prevWeight=fasGraph.edge(e.v,e.w)||0,weight=weightFn(e),edgeWeight=prevWeight+weight;fasGraph.setEdge(e.v,e.w,edgeWeight);maxOut=Math.max(maxOut,fasGraph.node(e.v).out+=weight);maxIn=Math.max(maxIn,fasGraph.node(e.w)["in"]+=weight)});var buckets=_.range(maxOut+maxIn+3).map(function(){return new List});var zeroIdx=maxIn+1;_.each(fasGraph.nodes(),function(v){assignBucket(buckets,zeroIdx,fasGraph.node(v))});return{graph:fasGraph,buckets:buckets,zeroIdx:zeroIdx}}function assignBucket(buckets,zeroIdx,entry){if(!entry.out){buckets[0].enqueue(entry)}else if(!entry["in"]){buckets[buckets.length-1].enqueue(entry)}else{buckets[entry.out-entry["in"]+zeroIdx].enqueue(entry)}}},{"./data/list":31,"./graphlib":33,"./lodash":36}],35:[function(require,module,exports){"use strict";var _=require("./lodash"),acyclic=require("./acyclic"),normalize=require("./normalize"),rank=require("./rank"),normalizeRanks=require("./util").normalizeRanks,parentDummyChains=require("./parent-dummy-chains"),removeEmptyRanks=require("./util").removeEmptyRanks,nestingGraph=require("./nesting-graph"),addBorderSegments=require("./add-border-segments"),coordinateSystem=require("./coordinate-system"),order=require("./order"),position=require("./position"),util=require("./util"),Graph=require("./graphlib").Graph;module.exports=layout;function layout(g,opts){var time=opts&&opts.debugTiming?util.time:util.notime;time("layout",function(){var layoutGraph=time(" buildLayoutGraph",function(){return buildLayoutGraph(g)});time(" runLayout",function(){runLayout(layoutGraph,time)});time(" updateInputGraph",function(){updateInputGraph(g,layoutGraph)})})}function runLayout(g,time){time(" makeSpaceForEdgeLabels",function(){makeSpaceForEdgeLabels(g)});time(" removeSelfEdges",function(){removeSelfEdges(g)});time(" acyclic",function(){acyclic.run(g)});time(" nestingGraph.run",function(){nestingGraph.run(g)});time(" rank",function(){rank(util.asNonCompoundGraph(g))});time(" injectEdgeLabelProxies",function(){injectEdgeLabelProxies(g)});time(" removeEmptyRanks",function(){removeEmptyRanks(g)});time(" nestingGraph.cleanup",function(){nestingGraph.cleanup(g)});time(" normalizeRanks",function(){normalizeRanks(g)});time(" assignRankMinMax",function(){assignRankMinMax(g)});time(" removeEdgeLabelProxies",function(){removeEdgeLabelProxies(g)});time(" normalize.run",function(){normalize.run(g)});time(" parentDummyChains",function(){parentDummyChains(g)});time(" addBorderSegments",function(){addBorderSegments(g)});time(" order",function(){order(g)});time(" insertSelfEdges",function(){insertSelfEdges(g)});time(" adjustCoordinateSystem",function(){coordinateSystem.adjust(g)});time(" position",function(){position(g)});time(" positionSelfEdges",function(){positionSelfEdges(g)});time(" removeBorderNodes",function(){removeBorderNodes(g)});time(" normalize.undo",function(){normalize.undo(g)});time(" fixupEdgeLabelCoords",function(){fixupEdgeLabelCoords(g)});time(" undoCoordinateSystem",function(){coordinateSystem.undo(g)});time(" translateGraph",function(){translateGraph(g)});time(" assignNodeIntersects",function(){assignNodeIntersects(g)});time(" reversePoints",function(){reversePointsForReversedEdges(g)});time(" acyclic.undo",function(){acyclic.undo(g)})}function updateInputGraph(inputGraph,layoutGraph){_.each(inputGraph.nodes(),function(v){var inputLabel=inputGraph.node(v),layoutLabel=layoutGraph.node(v);if(inputLabel){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y;if(layoutGraph.children(v).length){inputLabel.width=layoutLabel.width;inputLabel.height=layoutLabel.height}}});_.each(inputGraph.edges(),function(e){var inputLabel=inputGraph.edge(e),layoutLabel=layoutGraph.edge(e);inputLabel.points=layoutLabel.points;if(_.has(layoutLabel,"x")){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y}});inputGraph.graph().width=layoutGraph.graph().width;inputGraph.graph().height=layoutGraph.graph().height}var graphNumAttrs=["nodesep","edgesep","ranksep","marginx","marginy"],graphDefaults={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},graphAttrs=["acyclicer","ranker","rankdir","align"],nodeNumAttrs=["width","height"],nodeDefaults={width:0,height:0},edgeNumAttrs=["minlen","weight","width","height","labeloffset"],edgeDefaults={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},edgeAttrs=["labelpos"];function buildLayoutGraph(inputGraph){var g=new Graph({multigraph:true,compound:true}),graph=canonicalize(inputGraph.graph());g.setGraph(_.merge({},graphDefaults,selectNumberAttrs(graph,graphNumAttrs),_.pick(graph,graphAttrs)));_.each(inputGraph.nodes(),function(v){var node=canonicalize(inputGraph.node(v));g.setNode(v,_.defaults(selectNumberAttrs(node,nodeNumAttrs),nodeDefaults));g.setParent(v,inputGraph.parent(v))});_.each(inputGraph.edges(),function(e){var edge=canonicalize(inputGraph.edge(e));g.setEdge(e,_.merge({},edgeDefaults,selectNumberAttrs(edge,edgeNumAttrs),_.pick(edge,edgeAttrs)))});return g}function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/=2;_.each(g.edges(),function(e){var edge=g.edge(e);edge.minlen*=2;if(edge.labelpos.toLowerCase()!=="c"){if(graph.rankdir==="TB"||graph.rankdir==="BT"){edge.width+=edge.labeloffset}else{edge.height+=edge.labeloffset}}})}function injectEdgeLabelProxies(g){_.each(g.edges(),function(e){var edge=g.edge(e); -if(edge.width&&edge.height){var v=g.node(e.v),w=g.node(e.w),label={rank:(w.rank-v.rank)/2+v.rank,e:e};util.addDummyNode(g,"edge-proxy",label,"_ep")}})}function assignRankMinMax(g){var maxRank=0;_.each(g.nodes(),function(v){var node=g.node(v);if(node.borderTop){node.minRank=g.node(node.borderTop).rank;node.maxRank=g.node(node.borderBottom).rank;maxRank=_.max(maxRank,node.maxRank)}});g.graph().maxRank=maxRank}function removeEdgeLabelProxies(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="edge-proxy"){g.edge(node.e).labelRank=node.rank;g.removeNode(v)}})}function translateGraph(g){var minX=Number.POSITIVE_INFINITY,maxX=0,minY=Number.POSITIVE_INFINITY,maxY=0,graphLabel=g.graph(),marginX=graphLabel.marginx||0,marginY=graphLabel.marginy||0;function getExtremes(attrs){var x=attrs.x,y=attrs.y,w=attrs.width,h=attrs.height;minX=Math.min(minX,x-w/2);maxX=Math.max(maxX,x+w/2);minY=Math.min(minY,y-h/2);maxY=Math.max(maxY,y+h/2)}_.each(g.nodes(),function(v){getExtremes(g.node(v))});_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){getExtremes(edge)}});minX-=marginX;minY-=marginY;_.each(g.nodes(),function(v){var node=g.node(v);node.x-=minX;node.y-=minY});_.each(g.edges(),function(e){var edge=g.edge(e);_.each(edge.points,function(p){p.x-=minX;p.y-=minY});if(_.has(edge,"x")){edge.x-=minX}if(_.has(edge,"y")){edge.y-=minY}});graphLabel.width=maxX-minX+marginX;graphLabel.height=maxY-minY+marginY}function assignNodeIntersects(g){_.each(g.edges(),function(e){var edge=g.edge(e),nodeV=g.node(e.v),nodeW=g.node(e.w),p1,p2;if(!edge.points){edge.points=[];p1=nodeW;p2=nodeV}else{p1=edge.points[0];p2=edge.points[edge.points.length-1]}edge.points.unshift(util.intersectRect(nodeV,p1));edge.points.push(util.intersectRect(nodeW,p2))})}function fixupEdgeLabelCoords(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){if(edge.labelpos==="l"||edge.labelpos==="r"){edge.width-=edge.labeloffset}switch(edge.labelpos){case"l":edge.x-=edge.width/2+edge.labeloffset;break;case"r":edge.x+=edge.width/2+edge.labeloffset;break}}})}function reversePointsForReversedEdges(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.reversed){edge.points.reverse()}})}function removeBorderNodes(g){_.each(g.nodes(),function(v){if(g.children(v).length){var node=g.node(v),t=g.node(node.borderTop),b=g.node(node.borderBottom),l=g.node(_.last(node.borderLeft)),r=g.node(_.last(node.borderRight));node.width=Math.abs(r.x-l.x);node.height=Math.abs(b.y-t.y);node.x=l.x+node.width/2;node.y=t.y+node.height/2}});_.each(g.nodes(),function(v){if(g.node(v).dummy==="border"){g.removeNode(v)}})}function removeSelfEdges(g){_.each(g.edges(),function(e){if(e.v===e.w){var node=g.node(e.v);if(!node.selfEdges){node.selfEdges=[]}node.selfEdges.push({e:e,label:g.edge(e)});g.removeEdge(e)}})}function insertSelfEdges(g){var layers=util.buildLayerMatrix(g);_.each(layers,function(layer){var orderShift=0;_.each(layer,function(v,i){var node=g.node(v);node.order=i+orderShift;_.each(node.selfEdges,function(selfEdge){util.addDummyNode(g,"selfedge",{width:selfEdge.label.width,height:selfEdge.label.height,rank:node.rank,order:i+ ++orderShift,e:selfEdge.e,label:selfEdge.label},"_se")});delete node.selfEdges})})}function positionSelfEdges(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="selfedge"){var selfNode=g.node(node.e.v),x=selfNode.x+selfNode.width/2,y=selfNode.y,dx=node.x-x,dy=selfNode.height/2;g.setEdge(node.e,node.label);g.removeNode(v);node.label.points=[{x:x+2*dx/3,y:y-dy},{x:x+5*dx/6,y:y-dy},{x:x+dx,y:y},{x:x+5*dx/6,y:y+dy},{x:x+2*dx/3,y:y+dy}];node.label.x=node.x;node.label.y=node.y}})}function selectNumberAttrs(obj,attrs){return _.mapValues(_.pick(obj,attrs),Number)}function canonicalize(attrs){var newAttrs={};_.each(attrs,function(v,k){newAttrs[k.toLowerCase()]=v});return newAttrs}},{"./acyclic":28,"./add-border-segments":29,"./coordinate-system":30,"./graphlib":33,"./lodash":36,"./nesting-graph":37,"./normalize":38,"./order":43,"./parent-dummy-chains":48,"./position":50,"./rank":52,"./util":55}],36:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],37:[function(require,module,exports){var _=require("./lodash"),util=require("./util");module.exports={run:run,cleanup:cleanup};function run(g){var root=util.addDummyNode(g,"root",{},"_root"),depths=treeDepths(g),height=_.max(depths)-1,nodeSep=2*height+1;g.graph().nestingRoot=root;_.each(g.edges(),function(e){g.edge(e).minlen*=nodeSep});var weight=sumWeights(g)+1;_.each(g.children(),function(child){dfs(g,root,nodeSep,weight,height,depths,child)});g.graph().nodeRankFactor=nodeSep}function dfs(g,root,nodeSep,weight,height,depths,v){var children=g.children(v);if(!children.length){if(v!==root){g.setEdge(root,v,{weight:0,minlen:nodeSep})}return}var top=util.addBorderNode(g,"_bt"),bottom=util.addBorderNode(g,"_bb"),label=g.node(v);g.setParent(top,v);label.borderTop=top;g.setParent(bottom,v);label.borderBottom=bottom;_.each(children,function(child){dfs(g,root,nodeSep,weight,height,depths,child);var childNode=g.node(child),childTop=childNode.borderTop?childNode.borderTop:child,childBottom=childNode.borderBottom?childNode.borderBottom:child,thisWeight=childNode.borderTop?weight:2*weight,minlen=childTop!==childBottom?1:height-depths[v]+1;g.setEdge(top,childTop,{weight:thisWeight,minlen:minlen,nestingEdge:true});g.setEdge(childBottom,bottom,{weight:thisWeight,minlen:minlen,nestingEdge:true})});if(!g.parent(v)){g.setEdge(root,top,{weight:0,minlen:height+depths[v]})}}function treeDepths(g){var depths={};function dfs(v,depth){var children=g.children(v);if(children&&children.length){_.each(children,function(child){dfs(child,depth+1)})}depths[v]=depth}_.each(g.children(),function(v){dfs(v,1)});return depths}function sumWeights(g){return _.reduce(g.edges(),function(acc,e){return acc+g.edge(e).weight},0)}function cleanup(g){var graphLabel=g.graph();g.removeNode(graphLabel.nestingRoot);delete graphLabel.nestingRoot;_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.nestingEdge){g.removeEdge(e)}})}},{"./lodash":36,"./util":55}],38:[function(require,module,exports){"use strict";var _=require("./lodash"),util=require("./util");module.exports={run:run,undo:undo};function run(g){g.graph().dummyChains=[];_.each(g.edges(),function(edge){normalizeEdge(g,edge)})}function normalizeEdge(g,e){var v=e.v,vRank=g.node(v).rank,w=e.w,wRank=g.node(w).rank,name=e.name,edgeLabel=g.edge(e),labelRank=edgeLabel.labelRank;if(wRank===vRank+1)return;g.removeEdge(e);var dummy,attrs,i;for(i=0,++vRank;vRank0){if(index%2){weightSum+=tree[index+1]}index=index-1>>1;tree[index]+=entry.weight}cc+=entry.weight*weightSum}));return cc}},{"../lodash":36}],43:[function(require,module,exports){"use strict";var _=require("../lodash"),initOrder=require("./init-order"),crossCount=require("./cross-count"),sortSubgraph=require("./sort-subgraph"),buildLayerGraph=require("./build-layer-graph"),addSubgraphConstraints=require("./add-subgraph-constraints"),Graph=require("../graphlib").Graph,util=require("../util");module.exports=order;function order(g){var maxRank=util.maxRank(g),downLayerGraphs=buildLayerGraphs(g,_.range(1,maxRank+1),"inEdges"),upLayerGraphs=buildLayerGraphs(g,_.range(maxRank-1,-1,-1),"outEdges");var layering=initOrder(g);assignOrder(g,layering);var bestCC=Number.POSITIVE_INFINITY,best;for(var i=0,lastBest=0;lastBest<4;++i,++lastBest){sweepLayerGraphs(i%2?downLayerGraphs:upLayerGraphs,i%4>=2);layering=util.buildLayerMatrix(g);var cc=crossCount(g,layering);if(cc=vEntry.barycenter){mergeEntries(vEntry,uEntry)}}}function handleOut(vEntry){return function(wEntry){wEntry["in"].push(vEntry);if(--wEntry.indegree===0){sourceSet.push(wEntry)}}}while(sourceSet.length){var entry=sourceSet.pop();entries.push(entry);_.each(entry["in"].reverse(),handleIn(entry));_.each(entry.out,handleOut(entry))}return _.chain(entries).filter(function(entry){return!entry.merged}).map(function(entry){return _.pick(entry,["vs","i","barycenter","weight"])}).value()}function mergeEntries(target,source){var sum=0,weight=0;if(target.weight){sum+=target.barycenter*target.weight;weight+=target.weight}if(source.weight){sum+=source.barycenter*source.weight;weight+=source.weight}target.vs=source.vs.concat(target.vs);target.barycenter=sum/weight;target.weight=weight;target.i=Math.min(source.i,target.i);source.merged=true}},{"../lodash":36}],46:[function(require,module,exports){var _=require("../lodash"),barycenter=require("./barycenter"),resolveConflicts=require("./resolve-conflicts"),sort=require("./sort");module.exports=sortSubgraph;function sortSubgraph(g,v,cg,biasRight){var movable=g.children(v),node=g.node(v),bl=node?node.borderLeft:undefined,br=node?node.borderRight:undefined,subgraphs={};if(bl){movable=_.filter(movable,function(w){return w!==bl&&w!==br})}var barycenters=barycenter(g,movable);_.each(barycenters,function(entry){if(g.children(entry.v).length){var subgraphResult=sortSubgraph(g,entry.v,cg,biasRight);subgraphs[entry.v]=subgraphResult;if(_.has(subgraphResult,"barycenter")){mergeBarycenters(entry,subgraphResult)}}});var entries=resolveConflicts(barycenters,cg);expandSubgraphs(entries,subgraphs);var result=sort(entries,biasRight);if(bl){result.vs=_.flatten([bl,result.vs,br],true);if(g.predecessors(bl).length){var blPred=g.node(g.predecessors(bl)[0]),brPred=g.node(g.predecessors(br)[0]);if(!_.has(result,"barycenter")){result.barycenter=0;result.weight=0}result.barycenter=(result.barycenter*result.weight+blPred.order+brPred.order)/(result.weight+2);result.weight+=2}}return result}function expandSubgraphs(entries,subgraphs){_.each(entries,function(entry){entry.vs=_.flatten(entry.vs.map(function(v){if(subgraphs[v]){return subgraphs[v].vs}return v}),true)})}function mergeBarycenters(target,other){if(!_.isUndefined(target.barycenter)){target.barycenter=(target.barycenter*target.weight+other.barycenter*other.weight)/(target.weight+other.weight);target.weight+=other.weight}else{target.barycenter=other.barycenter;target.weight=other.weight}}},{"../lodash":36,"./barycenter":40,"./resolve-conflicts":45,"./sort":47}],47:[function(require,module,exports){var _=require("../lodash"),util=require("../util");module.exports=sort;function sort(entries,biasRight){var parts=util.partition(entries,function(entry){return _.has(entry,"barycenter")});var sortable=parts.lhs,unsortable=_.sortBy(parts.rhs,function(entry){return-entry.i}),vs=[],sum=0,weight=0,vsIndex=0;sortable.sort(compareWithBias(!!biasRight));vsIndex=consumeUnsortable(vs,unsortable,vsIndex);_.each(sortable,function(entry){vsIndex+=entry.vs.length;vs.push(entry.vs);sum+=entry.barycenter*entry.weight;weight+=entry.weight;vsIndex=consumeUnsortable(vs,unsortable,vsIndex)});var result={vs:_.flatten(vs,true)};if(weight){result.barycenter=sum/weight;result.weight=weight}return result}function consumeUnsortable(vs,unsortable,index){var last;while(unsortable.length&&(last=_.last(unsortable)).i<=index){unsortable.pop();vs.push(last.vs);index++}return index}function compareWithBias(bias){return function(entryV,entryW){if(entryV.barycenterentryW.barycenter){return 1}return!bias?entryV.i-entryW.i:entryW.i-entryV.i}}},{"../lodash":36,"../util":55}],48:[function(require,module,exports){var _=require("./lodash");module.exports=parentDummyChains;function parentDummyChains(g){var postorderNums=postorder(g);_.each(g.graph().dummyChains,function(v){var node=g.node(v),edgeObj=node.edgeObj,pathData=findPath(g,postorderNums,edgeObj.v,edgeObj.w),path=pathData.path,lca=pathData.lca,pathIdx=0,pathV=path[pathIdx],ascending=true;while(v!==edgeObj.w){node=g.node(v);if(ascending){while((pathV=path[pathIdx])!==lca&&g.node(pathV).maxRanklow||lim>postorderNums[parent].lim));lca=parent;parent=w;while((parent=g.parent(parent))!==lca){wPath.push(parent)}return{path:vPath.concat(wPath.reverse()),lca:lca}}function postorder(g){var result={},lim=0;function dfs(v){var low=lim;_.each(g.children(v),dfs);result[v]={low:low,lim:lim++}}_.each(g.children(),dfs);return result}},{"./lodash":36}],49:[function(require,module,exports){"use strict";var _=require("../lodash"),Graph=require("../graphlib").Graph,util=require("../util");module.exports={positionX:positionX,findType1Conflicts:findType1Conflicts,findType2Conflicts:findType2Conflicts,addConflict:addConflict,hasConflict:hasConflict,verticalAlignment:verticalAlignment,horizontalCompaction:horizontalCompaction,alignCoordinates:alignCoordinates,findSmallestWidthAlignment:findSmallestWidthAlignment,balance:balance};function findType1Conflicts(g,layering){var conflicts={};function visitLayer(prevLayer,layer){var k0=0,scanPos=0,prevLayerLength=prevLayer.length,lastNode=_.last(layer);_.each(layer,function(v,i){var w=findOtherInnerSegmentNode(g,v),k1=w?g.node(w).order:prevLayerLength;if(w||v===lastNode){_.each(layer.slice(scanPos,i+1),function(scanNode){_.each(g.predecessors(scanNode),function(u){var uLabel=g.node(u),uPos=uLabel.order;if((uPosnextNorthBorder)){addConflict(conflicts,u,v)}})}})}function visitLayer(north,south){var prevNorthPos=-1,nextNorthPos,southPos=0;_.each(south,function(v,southLookahead){if(g.node(v).dummy==="border"){var predecessors=g.predecessors(v);if(predecessors.length){nextNorthPos=g.node(predecessors[0]).order;scan(south,southPos,southLookahead,prevNorthPos,nextNorthPos);southPos=southLookahead;prevNorthPos=nextNorthPos}}scan(south,southPos,south.length,nextNorthPos,north.length)});return south}_.reduce(layering,visitLayer);return conflicts}function findOtherInnerSegmentNode(g,v){if(g.node(v).dummy){return _.find(g.predecessors(v),function(u){return g.node(u).dummy})}}function addConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}var conflictsV=conflicts[v];if(!conflictsV){conflicts[v]=conflictsV={}}conflictsV[w]=true}function hasConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}return _.has(conflicts[v],w)}function verticalAlignment(g,layering,conflicts,neighborFn){var root={},align={},pos={};_.each(layering,function(layer){_.each(layer,function(v,order){root[v]=v;align[v]=v;pos[v]=order})});_.each(layering,function(layer){var prevIdx=-1;_.each(layer,function(v){var ws=neighborFn(v);if(ws.length){ws=_.sortBy(ws,function(w){return pos[w]});var mp=(ws.length-1)/2;for(var i=Math.floor(mp),il=Math.ceil(mp);i<=il;++i){var w=ws[i];if(align[v]===v&&prevIdxwLabel.lim){tailLabel=wLabel;flip=true}var candidates=_.filter(g.edges(),function(edge){return flip===isDescendant(t,t.node(edge.v),tailLabel)&&flip!==isDescendant(t,t.node(edge.w),tailLabel)});return _.min(candidates,function(edge){return slack(g,edge)})}function exchangeEdges(t,g,e,f){var v=e.v,w=e.w;t.removeEdge(v,w);t.setEdge(f.v,f.w,{});initLowLimValues(t);initCutValues(t,g);updateRanks(t,g)}function updateRanks(t,g){var root=_.find(t.nodes(),function(v){return!g.node(v).parent}),vs=preorder(t,root);vs=vs.slice(1);_.each(vs,function(v){var parent=t.node(v).parent,edge=g.edge(v,parent),flipped=false;if(!edge){edge=g.edge(parent,v);flipped=true}g.node(v).rank=g.node(parent).rank+(flipped?edge.minlen:-edge.minlen)})}function isTreeEdge(tree,u,v){return tree.hasEdge(u,v)}function isDescendant(tree,vLabel,rootLabel){return rootLabel.low<=vLabel.lim&&vLabel.lim<=rootLabel.lim}},{"../graphlib":33,"../lodash":36,"../util":55,"./feasible-tree":51,"./util":54}],54:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports={longestPath:longestPath,slack:slack};function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.min(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY){rank=0}return label.rank=rank}_.each(g.sources(),dfs)}function slack(g,e){return g.node(e.w).rank-g.node(e.v).rank-g.edge(e).minlen}},{"../lodash":36}],55:[function(require,module,exports){"use strict";var _=require("./lodash"),Graph=require("./graphlib").Graph;module.exports={addDummyNode:addDummyNode,simplify:simplify,asNonCompoundGraph:asNonCompoundGraph,successorWeights:successorWeights,predecessorWeights:predecessorWeights,intersectRect:intersectRect,buildLayerMatrix:buildLayerMatrix,normalizeRanks:normalizeRanks,removeEmptyRanks:removeEmptyRanks,addBorderNode:addBorderNode,maxRank:maxRank,partition:partition,time:time,notime:notime};function addDummyNode(g,type,attrs,name){var v;do{v=_.uniqueId(name)}while(g.hasNode(v));attrs.dummy=type;g.setNode(v,attrs);return v}function simplify(g){var simplified=(new Graph).setGraph(g.graph());_.each(g.nodes(),function(v){simplified.setNode(v,g.node(v))});_.each(g.edges(),function(e){var simpleLabel=simplified.edge(e.v,e.w)||{weight:0,minlen:1},label=g.edge(e);simplified.setEdge(e.v,e.w,{weight:simpleLabel.weight+label.weight,minlen:Math.max(simpleLabel.minlen,label.minlen)})});return simplified}function asNonCompoundGraph(g){var simplified=new Graph({multigraph:g.isMultigraph()}).setGraph(g.graph());_.each(g.nodes(),function(v){if(!g.children(v).length){simplified.setNode(v,g.node(v))}});_.each(g.edges(),function(e){simplified.setEdge(e,g.edge(e))});return simplified}function successorWeights(g){var weightMap=_.map(g.nodes(),function(v){var sucs={}; -_.each(g.outEdges(v),function(e){sucs[e.w]=(sucs[e.w]||0)+g.edge(e).weight});return sucs});return _.zipObject(g.nodes(),weightMap)}function predecessorWeights(g){var weightMap=_.map(g.nodes(),function(v){var preds={};_.each(g.inEdges(v),function(e){preds[e.v]=(preds[e.v]||0)+g.edge(e).weight});return preds});return _.zipObject(g.nodes(),weightMap)}function intersectRect(rect,point){var x=rect.x;var y=rect.y;var dx=point.x-x;var dy=point.y-y;var w=rect.width/2;var h=rect.height/2;if(!dx&&!dy){throw new Error("Not possible to find intersection inside of the rectangle")}var sx,sy;if(Math.abs(dy)*w>Math.abs(dx)*h){if(dy<0){h=-h}sx=h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=w*dy/dx}return{x:x+sx,y:y+sy}}function buildLayerMatrix(g){var layering=_.map(_.range(maxRank(g)+1),function(){return[]});_.each(g.nodes(),function(v){var node=g.node(v),rank=node.rank;if(!_.isUndefined(rank)){layering[rank][node.order]=v}});return layering}function normalizeRanks(g){var min=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));_.each(g.nodes(),function(v){var node=g.node(v);if(_.has(node,"rank")){node.rank-=min}})}function removeEmptyRanks(g){var offset=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));var layers=[];_.each(g.nodes(),function(v){var rank=g.node(v).rank-offset;if(!_.has(layers,rank)){layers[rank]=[]}layers[rank].push(v)});var delta=0,nodeRankFactor=g.graph().nodeRankFactor;_.each(layers,function(vs,i){if(_.isUndefined(vs)&&i%nodeRankFactor!==0){--delta}else if(delta){_.each(vs,function(v){g.node(v).rank+=delta})}})}function addBorderNode(g,prefix,rank,order){var node={width:0,height:0};if(arguments.length>=4){node.rank=rank;node.order=order}return addDummyNode(g,"border",node,prefix)}function maxRank(g){return _.max(_.map(g.nodes(),function(v){var rank=g.node(v).rank;if(!_.isUndefined(rank)){return rank}}))}function partition(collection,fn){var result={lhs:[],rhs:[]};_.each(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+" time: "+(_.now()-start)+"ms")}}function notime(name,fn){return fn()}},{"./graphlib":33,"./lodash":36}],56:[function(require,module,exports){module.exports="0.7.1"},{}],57:[function(require,module,exports){var lib=require("./lib");module.exports={Graph:lib.Graph,json:require("./lib/json"),alg:require("./lib/alg"),version:lib.version}},{"./lib":73,"./lib/alg":64,"./lib/json":74}],58:[function(require,module,exports){var _=require("../lodash");module.exports=components;function components(g){var visited={},cmpts=[],cmpt;function dfs(v){if(_.has(visited,v))return;visited[v]=true;cmpt.push(v);_.each(g.successors(v),dfs);_.each(g.predecessors(v),dfs)}_.each(g.nodes(),function(v){cmpt=[];dfs(v);if(cmpt.length){cmpts.push(cmpt)}});return cmpts}},{"../lodash":75}],59:[function(require,module,exports){var _=require("../lodash");module.exports=dfs;function dfs(g,vs,order){if(!_.isArray(vs)){vs=[vs]}var acc=[],visited={};_.each(vs,function(v){if(!g.hasNode(v)){throw new Error("Graph does not have node: "+v)}doDfs(g,v,order==="post",visited,acc)});return acc}function doDfs(g,v,postorder,visited,acc){if(!_.has(visited,v)){visited[v]=true;if(!postorder){acc.push(v)}_.each(g.neighbors(v),function(w){doDfs(g,w,postorder,visited,acc)});if(postorder){acc.push(v)}}}},{"../lodash":75}],60:[function(require,module,exports){var dijkstra=require("./dijkstra"),_=require("../lodash");module.exports=dijkstraAll;function dijkstraAll(g,weightFunc,edgeFunc){return _.transform(g.nodes(),function(acc,v){acc[v]=dijkstra(g,v,weightFunc,edgeFunc)},{})}},{"../lodash":75,"./dijkstra":61}],61:[function(require,module,exports){var _=require("../lodash"),PriorityQueue=require("../data/priority-queue");module.exports=dijkstra;var DEFAULT_WEIGHT_FUNC=_.constant(1);function dijkstra(g,source,weightFn,edgeFn){return runDijkstra(g,String(source),weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runDijkstra(g,source,weightFn,edgeFn){var results={},pq=new PriorityQueue,v,vEntry;var updateNeighbors=function(edge){var w=edge.v!==v?edge.v:edge.w,wEntry=results[w],weight=weightFn(edge),distance=vEntry.distance+weight;if(weight<0){throw new Error("dijkstra does not allow negative edge weights. "+"Bad edge: "+edge+" Weight: "+weight)}if(distance0){v=pq.removeMin();vEntry=results[v];if(vEntry.distance===Number.POSITIVE_INFINITY){break}edgeFn(v).forEach(updateNeighbors)}return results}},{"../data/priority-queue":71,"../lodash":75}],62:[function(require,module,exports){var _=require("../lodash"),tarjan=require("./tarjan");module.exports=findCycles;function findCycles(g){return _.filter(tarjan(g),function(cmpt){return cmpt.length>1})}},{"../lodash":75,"./tarjan":69}],63:[function(require,module,exports){var _=require("../lodash");module.exports=floydWarshall;var DEFAULT_WEIGHT_FUNC=_.constant(1);function floydWarshall(g,weightFn,edgeFn){return runFloydWarshall(g,weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runFloydWarshall(g,weightFn,edgeFn){var results={},nodes=g.nodes();nodes.forEach(function(v){results[v]={};results[v][v]={distance:0};nodes.forEach(function(w){if(v!==w){results[v][w]={distance:Number.POSITIVE_INFINITY}}});edgeFn(v).forEach(function(edge){var w=edge.v===v?edge.w:edge.v,d=weightFn(edge);results[v][w]={distance:d,predecessor:v}})});nodes.forEach(function(k){var rowK=results[k];nodes.forEach(function(i){var rowI=results[i];nodes.forEach(function(j){var ik=rowI[k];var kj=rowK[j];var ij=rowI[j];var altDistance=ik.distance+kj.distance;if(altDistance0){v=pq.removeMin();if(_.has(parents,v)){result.setEdge(v,parents[v])}else if(init){throw new Error("Input graph is not connected: "+g)}else{init=true}g.nodeEdges(v).forEach(updateNeighbors)}return result}},{"../data/priority-queue":71,"../graph":72,"../lodash":75}],69:[function(require,module,exports){var _=require("../lodash");module.exports=tarjan;function tarjan(g){var index=0,stack=[],visited={},results=[];function dfs(v){var entry=visited[v]={onStack:true,lowlink:index,index:index++};stack.push(v);g.successors(v).forEach(function(w){if(!_.has(visited,w)){dfs(w);entry.lowlink=Math.min(entry.lowlink,visited[w].lowlink)}else if(visited[w].onStack){entry.lowlink=Math.min(entry.lowlink,visited[w].index)}});if(entry.lowlink===entry.index){var cmpt=[],w;do{w=stack.pop();visited[w].onStack=false;cmpt.push(w)}while(v!==w);results.push(cmpt)}}g.nodes().forEach(function(v){if(!_.has(visited,v)){dfs(v)}});return results}},{"../lodash":75}],70:[function(require,module,exports){var _=require("../lodash");module.exports=topsort;topsort.CycleException=CycleException;function topsort(g){var visited={},stack={},results=[];function visit(node){if(_.has(stack,node)){throw new CycleException}if(!_.has(visited,node)){stack[node]=true;visited[node]=true;_.each(g.predecessors(node),visit);delete stack[node];results.push(node)}}_.each(g.sinks(),visit);if(_.size(visited)!==g.nodeCount()){throw new CycleException}return results}function CycleException(){}},{"../lodash":75}],71:[function(require,module,exports){var _=require("../lodash");module.exports=PriorityQueue;function PriorityQueue(){this._arr=[];this._keyIndices={}}PriorityQueue.prototype.size=function(){return this._arr.length};PriorityQueue.prototype.keys=function(){return this._arr.map(function(x){return x.key})};PriorityQueue.prototype.has=function(key){return _.has(this._keyIndices,key)};PriorityQueue.prototype.priority=function(key){var index=this._keyIndices[key];if(index!==undefined){return this._arr[index].priority}};PriorityQueue.prototype.min=function(){if(this.size()===0){throw new Error("Queue underflow")}return this._arr[0].key};PriorityQueue.prototype.add=function(key,priority){var keyIndices=this._keyIndices;key=String(key);if(!_.has(keyIndices,key)){var arr=this._arr;var index=arr.length;keyIndices[key]=index;arr.push({key:key,priority:priority});this._decrease(index);return true}return false};PriorityQueue.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var min=this._arr.pop();delete this._keyIndices[min.key];this._heapify(0);return min.key};PriorityQueue.prototype.decrease=function(key,priority){var index=this._keyIndices[key];if(priority>this._arr[index].priority){throw new Error("New priority is greater than current priority. "+"Key: "+key+" Old: "+this._arr[index].priority+" New: "+priority)}this._arr[index].priority=priority;this._decrease(index)};PriorityQueue.prototype._heapify=function(i){var arr=this._arr;var l=2*i,r=l+1,largest=i;if(l>1;if(arr[parent].priority1){this.setNode(v,value)}else{this.setNode(v)}},this);return this};Graph.prototype.setNode=function(v,value){if(_.has(this._nodes,v)){if(arguments.length>1){this._nodes[v]=value}return this}this._nodes[v]=arguments.length>1?value:this._defaultNodeLabelFn(v);if(this._isCompound){this._parent[v]=GRAPH_NODE;this._children[v]={};this._children[GRAPH_NODE][v]=true}this._in[v]={};this._preds[v]={};this._out[v]={};this._sucs[v]={};++this._nodeCount;return this};Graph.prototype.node=function(v){return this._nodes[v]};Graph.prototype.hasNode=function(v){return _.has(this._nodes,v)};Graph.prototype.removeNode=function(v){var self=this;if(_.has(this._nodes,v)){var removeEdge=function(e){self.removeEdge(self._edgeObjs[e])};delete this._nodes[v];if(this._isCompound){this._removeFromParentsChildList(v);delete this._parent[v];_.each(this.children(v),function(child){this.setParent(child)},this);delete this._children[v]}_.each(_.keys(this._in[v]),removeEdge);delete this._in[v];delete this._preds[v];_.each(_.keys(this._out[v]),removeEdge);delete this._out[v];delete this._sucs[v];--this._nodeCount}return this};Graph.prototype.setParent=function(v,parent){if(!this._isCompound){throw new Error("Cannot set parent in a non-compound graph")}if(_.isUndefined(parent)){parent=GRAPH_NODE}else{for(var ancestor=parent;!_.isUndefined(ancestor);ancestor=this.parent(ancestor)){if(ancestor===v){throw new Error("Setting "+parent+" as parent of "+v+" would create create a cycle")}}this.setNode(parent)}this.setNode(v);this._removeFromParentsChildList(v);this._parent[v]=parent;this._children[parent][v]=true;return this};Graph.prototype._removeFromParentsChildList=function(v){delete this._children[this._parent[v]][v]};Graph.prototype.parent=function(v){if(this._isCompound){var parent=this._parent[v];if(parent!==GRAPH_NODE){return parent}}};Graph.prototype.children=function(v){if(_.isUndefined(v)){v=GRAPH_NODE}if(this._isCompound){var children=this._children[v];if(children){return _.keys(children)}}else if(v===GRAPH_NODE){return this.nodes()}else if(this.hasNode(v)){return[]}};Graph.prototype.predecessors=function(v){var predsV=this._preds[v];if(predsV){return _.keys(predsV)}};Graph.prototype.successors=function(v){var sucsV=this._sucs[v];if(sucsV){return _.keys(sucsV)}};Graph.prototype.neighbors=function(v){var preds=this.predecessors(v);if(preds){return _.union(preds,this.successors(v))}};Graph.prototype.setDefaultEdgeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultEdgeLabelFn=newDefault;return this};Graph.prototype.edgeCount=function(){return this._edgeCount};Graph.prototype.edges=function(){return _.values(this._edgeObjs)};Graph.prototype.setPath=function(vs,value){var self=this,args=arguments;_.reduce(vs,function(v,w){if(args.length>1){self.setEdge(v,w,value)}else{self.setEdge(v,w)}return w});return this};Graph.prototype.setEdge=function(){var v,w,name,value,valueSpecified=false;if(_.isPlainObject(arguments[0])){v=arguments[0].v;w=arguments[0].w;name=arguments[0].name;if(arguments.length===2){value=arguments[1];valueSpecified=true}}else{v=arguments[0];w=arguments[1];name=arguments[3];if(arguments.length>2){value=arguments[2];valueSpecified=true}}v=""+v;w=""+w;if(!_.isUndefined(name)){name=""+name}var e=edgeArgsToId(this._isDirected,v,w,name);if(_.has(this._edgeLabels,e)){if(valueSpecified){this._edgeLabels[e]=value}return this}if(!_.isUndefined(name)&&!this._isMultigraph){throw new Error("Cannot set a named edge when isMultigraph = false")}this.setNode(v);this.setNode(w);this._edgeLabels[e]=valueSpecified?value:this._defaultEdgeLabelFn(v,w,name);var edgeObj=edgeArgsToObj(this._isDirected,v,w,name);v=edgeObj.v;w=edgeObj.w;Object.freeze(edgeObj);this._edgeObjs[e]=edgeObj;incrementOrInitEntry(this._preds[w],v);incrementOrInitEntry(this._sucs[v],w);this._in[w][e]=edgeObj;this._out[v][e]=edgeObj;this._edgeCount++;return this};Graph.prototype.edge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return this._edgeLabels[e]};Graph.prototype.hasEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return _.has(this._edgeLabels,e)};Graph.prototype.removeEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name),edge=this._edgeObjs[e];if(edge){v=edge.v;w=edge.w;delete this._edgeLabels[e];delete this._edgeObjs[e];decrementOrRemoveEntry(this._preds[w],v);decrementOrRemoveEntry(this._sucs[v],w);delete this._in[w][e];delete this._out[v][e];this._edgeCount--}return this};Graph.prototype.inEdges=function(v,u){var inV=this._in[v];if(inV){var edges=_.values(inV);if(!u){return edges}return _.filter(edges,function(edge){return edge.v===u})}};Graph.prototype.outEdges=function(v,w){var outV=this._out[v];if(outV){var edges=_.values(outV);if(!w){return edges}return _.filter(edges,function(edge){return edge.w===w})}};Graph.prototype.nodeEdges=function(v,w){var inEdges=this.inEdges(v,w);if(inEdges){return inEdges.concat(this.outEdges(v,w))}};function incrementOrInitEntry(map,k){if(_.has(map,k)){map[k]++}else{map[k]=1}}function decrementOrRemoveEntry(map,k){if(!--map[k]){delete map[k]}}function edgeArgsToId(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}return v+EDGE_KEY_DELIM+w+EDGE_KEY_DELIM+(_.isUndefined(name)?DEFAULT_EDGE_NAME:name)}function edgeArgsToObj(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}var edgeObj={v:v,w:w};if(name){edgeObj.name=name}return edgeObj}function edgeObjToId(isDirected,edgeObj){return edgeArgsToId(isDirected,edgeObj.v,edgeObj.w,edgeObj.name)}},{"./lodash":75}],73:[function(require,module,exports){module.exports={Graph:require("./graph"),version:require("./version")}},{"./graph":72,"./version":76}],74:[function(require,module,exports){var _=require("./lodash"),Graph=require("./graph");module.exports={write:write,read:read};function write(g){var json={options:{directed:g.isDirected(),multigraph:g.isMultigraph(),compound:g.isCompound()},nodes:writeNodes(g),edges:writeEdges(g)};if(!_.isUndefined(g.graph())){json.value=_.clone(g.graph())}return json}function writeNodes(g){return _.map(g.nodes(),function(v){var nodeValue=g.node(v),parent=g.parent(v),node={v:v};if(!_.isUndefined(nodeValue)){node.value=nodeValue}if(!_.isUndefined(parent)){node.parent=parent}return node})}function writeEdges(g){return _.map(g.edges(),function(e){var edgeValue=g.edge(e),edge={v:e.v,w:e.w};if(!_.isUndefined(e.name)){edge.name=e.name}if(!_.isUndefined(edgeValue)){edge.value=edgeValue}return edge})}function read(json){var g=new Graph(json.options).setGraph(json.value);_.each(json.nodes,function(entry){g.setNode(entry.v,entry.value);if(entry.parent){g.setParent(entry.v,entry.parent)}});_.each(json.edges,function(entry){g.setEdge({v:entry.v,w:entry.w,name:entry.name},entry.value)});return g}},{"./graph":72,"./lodash":75}],75:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],76:[function(require,module,exports){module.exports="1.0.1"},{}],77:[function(require,module,exports){(function(global){(function(){var undefined;var arrayPool=[],objectPool=[];var idCounter=0;var keyPrefix=+new Date+"";var largeArraySize=75;var maxPoolSize=40;var whitespace=" \f "+"\n\r\u2028\u2029"+" ᠎              ";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reFuncName=/^\s*function[ \n\r\t]+\w/;var reInterpolate=/<%=([\s\S]+?)%>/g;var reLeadingSpacesAndZeros=RegExp("^["+whitespace+"]*0+(?=.$)");var reNoMatch=/($^)/;var reThis=/\bthis\b/;var reUnescapedString=/['\n\r\t\u2028\u2029\\]/g;var contextProps=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"];var templateCounter=0;var argsClass="[object Arguments]",arrayClass="[object Array]",boolClass="[object Boolean]",dateClass="[object Date]",funcClass="[object Function]",numberClass="[object Number]",objectClass="[object Object]",regexpClass="[object RegExp]",stringClass="[object String]";var cloneableClasses={};cloneableClasses[funcClass]=false;cloneableClasses[argsClass]=cloneableClasses[arrayClass]=cloneableClasses[boolClass]=cloneableClasses[dateClass]=cloneableClasses[numberClass]=cloneableClasses[objectClass]=cloneableClasses[regexpClass]=cloneableClasses[stringClass]=true;var debounceOptions={leading:false,maxWait:0,trailing:false};var descriptor={configurable:false,enumerable:false,value:null,writable:false};var objectTypes={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};var root=objectTypes[typeof window]&&window||this;var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var freeGlobal=objectTypes[typeof global]&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal)){root=freeGlobal}function baseIndexOf(array,value,fromIndex){var index=(fromIndex||0)-1,length=array?array.length:0;while(++index-1?0:-1:cache?0:-1}function cachePush(value){var cache=this.cache,type=typeof value;if(type=="boolean"||value==null){cache[value]=true}else{if(type!="number"&&type!="string"){type="object"}var key=type=="number"?value:keyPrefix+value,typeCache=cache[type]||(cache[type]={});if(type=="object"){(typeCache[key]||(typeCache[key]=[])).push(value)}else{typeCache[key]=true}}}function charAtCallback(value){return value.charCodeAt(0)}function compareAscending(a,b){var ac=a.criteria,bc=b.criteria,index=-1,length=ac.length;while(++indexother||typeof value=="undefined"){return 1}if(value/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function baseBind(bindData){var func=bindData[0],partialArgs=bindData[2],thisArg=bindData[4];function bound(){if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(this instanceof bound){var thisBinding=baseCreate(func.prototype),result=func.apply(thisBinding,args||arguments);return isObject(result)?result:thisBinding}return func.apply(thisArg,args||arguments)}setBindData(bound,bindData);return bound}function baseClone(value,isDeep,callback,stackA,stackB){if(callback){var result=callback(value);if(typeof result!="undefined"){return result}}var isObj=isObject(value);if(isObj){var className=toString.call(value);if(!cloneableClasses[className]){return value}var ctor=ctorByClass[className];switch(className){case boolClass:case dateClass:return new ctor(+value);case numberClass:case stringClass:return new ctor(value);case regexpClass:result=ctor(value.source,reFlags.exec(value));result.lastIndex=value.lastIndex;return result}}else{return value}var isArr=isArray(value);if(isDeep){var initedStack=!stackA;stackA||(stackA=getArray());stackB||(stackB=getArray());var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}result=isArr?ctor(value.length):{}}else{result=isArr?slice(value):assign({},value)}if(isArr){if(hasOwnProperty.call(value,"index")){result.index=value.index}if(hasOwnProperty.call(value,"input")){result.input=value.input}}if(!isDeep){return result}stackA.push(value);stackB.push(result);(isArr?forEach:forOwn)(value,function(objValue,key){result[key]=baseClone(objValue,isDeep,callback,stackA,stackB)});if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseCreate(prototype,properties){return isObject(prototype)?nativeCreate(prototype):{}}if(!nativeCreate){baseCreate=function(){function Object(){}return function(prototype){if(isObject(prototype)){Object.prototype=prototype;var result=new Object;Object.prototype=null}return result||context.Object()}}()}function baseCreateCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(typeof thisArg=="undefined"||!("prototype"in func)){return func}var bindData=func.__bindData__;if(typeof bindData=="undefined"){if(support.funcNames){bindData=!func.name}bindData=bindData||!support.funcDecomp;if(!bindData){var source=fnToString.call(func);if(!support.funcNames){bindData=!reFuncName.test(source)}if(!bindData){bindData=reThis.test(source);setBindData(func,bindData)}}}if(bindData===false||bindData!==true&&bindData[1]&1){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 2:return function(a,b){return func.call(thisArg,a,b)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)}}return bind(func,thisArg)}function baseCreateWrapper(bindData){var func=bindData[0],bitmask=bindData[1],partialArgs=bindData[2],partialRightArgs=bindData[3],thisArg=bindData[4],arity=bindData[5];var isBind=bitmask&1,isBindKey=bitmask&2,isCurry=bitmask&4,isCurryBound=bitmask&8,key=func;function bound(){var thisBinding=isBind?thisArg:this;if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(partialRightArgs||isCurry){args||(args=slice(arguments));if(partialRightArgs){push.apply(args,partialRightArgs)}if(isCurry&&args.length=largeArraySize&&indexOf===baseIndexOf,result=[];if(isLarge){var cache=createCache(values);if(cache){indexOf=cacheIndexOf;values=cache}else{isLarge=false}}while(++index-1}})}}stackA.pop();stackB.pop();if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseMerge(object,source,callback,stackA,stackB){(isArray(source)?forEach:forOwn)(source,function(source,key){var found,isArr,result=source,value=object[key];if(source&&((isArr=isArray(source))||isPlainObject(source))){var stackLength=stackA.length;while(stackLength--){if(found=stackA[stackLength]==source){value=stackB[stackLength];break}}if(!found){var isShallow;if(callback){result=callback(value,source);if(isShallow=typeof result!="undefined"){value=result}}if(!isShallow){value=isArr?isArray(value)?value:[]:isPlainObject(value)?value:{}}stackA.push(source);stackB.push(value);if(!isShallow){baseMerge(value,source,callback,stackA,stackB)}}}else{if(callback){result=callback(value,source);if(typeof result=="undefined"){result=source}}if(typeof result!="undefined"){value=result}}object[key]=value})}function baseRandom(min,max){return min+floor(nativeRandom()*(max-min+1))}function baseUniq(array,isSorted,callback){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[];var isLarge=!isSorted&&length>=largeArraySize&&indexOf===baseIndexOf,seen=callback||isLarge?getArray():result;if(isLarge){var cache=createCache(seen);indexOf=cacheIndexOf;seen=cache}while(++index":">",'"':""","'":"'"};var htmlUnescapes=invert(htmlEscapes);var reEscapedHtml=RegExp("("+keys(htmlUnescapes).join("|")+")","g"),reUnescapedHtml=RegExp("["+keys(htmlEscapes).join("")+"]","g");var assign=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength=typeof guard=="number"?2:args.length;if(argsLength>3&&typeof args[argsLength-2]=="function"){var callback=baseCreateCallback(args[--argsLength-1],args[argsLength--],2)}else if(argsLength>2&&typeof args[argsLength-1]=="function"){callback=args[--argsLength]}while(++argsIndex3&&typeof args[length-2]=="function"){var callback=baseCreateCallback(args[--length-1],args[length--],2)}else if(length>2&&typeof args[length-1]=="function"){callback=args[--length]}var sources=slice(arguments,1,length),index=-1,stackA=getArray(),stackB=getArray();while(++index-1}else if(typeof length=="number"){result=(isString(collection)?collection.indexOf(target,fromIndex):indexOf(collection,target,fromIndex))>-1}else{forOwn(collection,function(value){if(++index>=fromIndex){return!(result=value===target)}})}return result}var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key]++:result[key]=1});function every(collection,callback,thisArg){var result=true;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++indexresult){result=value}}}else{callback=callback==null&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3);forEach(collection,function(value,index,collection){var current=callback(value,index,collection);if(current>computed){computed=current;result=value}})}return result}function min(collection,callback,thisArg){var computed=Infinity,result=computed;if(typeof callback!="function"&&thisArg&&thisArg[callback]===collection){callback=null}if(callback==null&&isArray(collection)){var index=-1,length=collection.length;while(++index=largeArraySize&&createCache(argsIndex?args[argsIndex]:seen))}}var array=args[0],index=-1,length=array?array.length:0,result=[];outer:while(++index>>1;callback(array[mid])1?arguments:arguments[0],index=-1,length=array?max(pluck(array,"length")):0,result=Array(length<0?0:length);while(++index2?createWrapper(func,17,slice(arguments,2),null,thisArg):createWrapper(func,1,null,null,thisArg)}function bindAll(object){var funcs=arguments.length>1?baseFlatten(arguments,true,false,1):functions(object),index=-1,length=funcs.length;while(++index2?createWrapper(key,19,slice(arguments,2),null,object):createWrapper(key,3,null,null,object)}function compose(){var funcs=arguments,length=funcs.length;while(length--){if(!isFunction(funcs[length])){throw new TypeError}}return function(){var args=arguments,length=funcs.length;while(length--){args=[funcs[length].apply(this,args)]}return args[0]}}function curry(func,arity){arity=typeof arity=="number"?arity:+arity||func.length;return createWrapper(func,4,null,null,null,arity)}function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(!isFunction(func)){throw new TypeError}wait=nativeMax(0,wait)||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&(nativeMax(wait,options.maxWait)||0);trailing="trailing"in options?options.trailing:trailing}var delayed=function(){var remaining=wait-(now()-stamp);if(remaining<=0){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}};var maxDelayed=function(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}};return function(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId) -}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}}function defer(func){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,1);return setTimeout(function(){func.apply(undefined,args)},1)}function delay(func,wait){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,2);return setTimeout(function(){func.apply(undefined,args)},wait)}function memoize(func,resolver){if(!isFunction(func)){throw new TypeError}var memoized=function(){var cache=memoized.cache,key=resolver?resolver.apply(this,arguments):keyPrefix+arguments[0];return hasOwnProperty.call(cache,key)?cache[key]:cache[key]=func.apply(this,arguments)};memoized.cache={};return memoized}function once(func){var ran,result;if(!isFunction(func)){throw new TypeError}return function(){if(ran){return result}ran=true;result=func.apply(this,arguments);func=null;return result}}function partial(func){return createWrapper(func,16,slice(arguments,1))}function partialRight(func){return createWrapper(func,32,null,slice(arguments,1))}function throttle(func,wait,options){var leading=true,trailing=true;if(!isFunction(func)){throw new TypeError}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?options.leading:leading;trailing="trailing"in options?options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function wrap(value,wrapper){return createWrapper(wrapper,16,[value])}function constant(value){return function(){return value}}function createCallback(func,thisArg,argCount){var type=typeof func;if(func==null||type=="function"){return baseCreateCallback(func,thisArg,argCount)}if(type!="object"){return property(func)}var props=keys(func),key=props[0],a=func[key];if(props.length==1&&a===a&&!isObject(a)){return function(object){var b=object[key];return a===b&&(a!==0||1/a==1/b)}}return function(object){var length=props.length,result=false;while(length--){if(!(result=baseIsEqual(object[props[length]],func[props[length]],null,true))){break}}return result}}function escape(string){return string==null?"":String(string).replace(reUnescapedHtml,escapeHtmlChar)}function identity(value){return value}function mixin(object,source,options){var chain=true,methodNames=source&&functions(source);if(!source||!options&&!methodNames.length){if(options==null){options=source}ctor=lodashWrapper;source=object;object=lodash;methodNames=functions(source)}if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}var ctor=object,isFunc=isFunction(ctor);forEach(methodNames,function(methodName){var func=object[methodName]=source[methodName];if(isFunc){ctor.prototype[methodName]=function(){var chainAll=this.__chain__,value=this.__wrapped__,args=[value];push.apply(args,arguments);var result=func.apply(object,args);if(chain||chainAll){if(value===result&&isObject(result)){return this}result=new ctor(result);result.__chain__=chainAll}return result}}})}function noConflict(){context._=oldDash;return this}function noop(){}var now=isNative(now=Date.now)&&now||function(){return(new Date).getTime()};var parseInt=nativeParseInt(whitespace+"08")==8?nativeParseInt:function(value,radix){return nativeParseInt(isString(value)?value.replace(reLeadingSpacesAndZeros,""):value,radix||0)};function property(key){return function(object){return object[key]}}function random(min,max,floating){var noMin=min==null,noMax=max==null;if(floating==null){if(typeof min=="boolean"&&noMax){floating=min;min=1}else if(!noMax&&typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}function result(object,key){if(object){var value=object[key];return isFunction(value)?object[key]():value}}function template(text,data,options){var settings=lodash.templateSettings;text=String(text||"");options=defaults({},options,settings);var imports=defaults({},options.imports,settings.imports),importsKeys=keys(imports),importsValues=values(imports);var isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");text.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=text.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable,hasVariable=variable;if(!hasVariable){variable="obj";source="with ("+variable+") {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+variable+") {\n"+(hasVariable?"":variable+" || ("+variable+" = {});\n")+"var __t, __p = '', __e = _.escape"+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var sourceURL="\n/*\n//# sourceURL="+(options.sourceURL||"/lodash/template/source["+templateCounter++ +"]")+"\n*/";try{var result=Function(importsKeys,"return "+source+sourceURL).apply(undefined,importsValues)}catch(e){e.source=source;throw e}if(data){return result(data)}result.source=source;return result}function times(n,callback,thisArg){n=(n=+n)>-1?n:0;var index=-1,result=Array(n);callback=baseCreateCallback(callback,thisArg,1);while(++index0}},{}],14:[function(require,module,exports){module.exports=intersectNode;function intersectNode(node,point){return node.intersect(point)}},{}],15:[function(require,module,exports){var intersectLine=require("./intersect-line");module.exports=intersectPolygon;function intersectPolygon(node,polyPoints,point){var x1=node.x;var y1=node.y;var intersections=[];var minX=Number.POSITIVE_INFINITY,minY=Number.POSITIVE_INFINITY;polyPoints.forEach(function(entry){minX=Math.min(minX,entry.x);minY=Math.min(minY,entry.y)});var left=x1-node.width/2-minX;var top=y1-node.height/2-minY;for(var i=0;i1){intersections.sort(function(p,q){var pdx=p.x-point.x,pdy=p.y-point.y,distp=Math.sqrt(pdx*pdx+pdy*pdy),qdx=q.x-point.x,qdy=q.y-point.y,distq=Math.sqrt(qdx*qdx+qdy*qdy);return distpMath.abs(dx)*h){if(dy<0){h=-h}sx=dy===0?0:h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=dx===0?0:w*dy/dx}return{x:x+sx,y:y+sy}}},{}],17:[function(require,module,exports){var util=require("../util");module.exports=addHtmlLabel;function addHtmlLabel(root,node){var fo=root.append("foreignObject").attr("width","100000");var div=fo.append("xhtml:div");var label=node.label;switch(typeof label){case"function":div.insert(label);break;case"object":div.insert(function(){return label});break;default:div.html(label)}util.applyStyle(div,node.labelStyle);div.style("display","inline-block");div.style("white-space","nowrap");var w,h;div.each(function(){w=this.clientWidth;h=this.clientHeight});fo.attr("width",w).attr("height",h);return fo}},{"../util":25}],18:[function(require,module,exports){var addTextLabel=require("./add-text-label"),addHtmlLabel=require("./add-html-label");module.exports=addLabel;function addLabel(root,node){var label=node.label;var labelSvg=root.append("g");if(typeof label!=="string"||node.labelType==="html"){addHtmlLabel(labelSvg,node)}else{addTextLabel(labelSvg,node)}var labelBBox=labelSvg.node().getBBox();labelSvg.attr("transform","translate("+-labelBBox.width/2+","+-labelBBox.height/2+")");return labelSvg}},{"./add-html-label":17,"./add-text-label":19}],19:[function(require,module,exports){var util=require("../util");module.exports=addTextLabel;function addTextLabel(root,node){var domNode=root.append("text");var lines=processEscapeSequences(node.label).split("\n");for(var i=0;i0;--i){entry=buckets[i].dequeue();if(entry){results=results.concat(removeNode(g,buckets,zeroIdx,entry,true));break}}}}return results}function removeNode(g,buckets,zeroIdx,entry,collectPredecessors){var results=collectPredecessors?[]:undefined;_.each(g.inEdges(entry.v),function(edge){var weight=g.edge(edge),uEntry=g.node(edge.v);if(collectPredecessors){results.push({v:edge.v,w:edge.w})}uEntry.out-=weight;assignBucket(buckets,zeroIdx,uEntry)});_.each(g.outEdges(entry.v),function(edge){var weight=g.edge(edge),w=edge.w,wEntry=g.node(w);wEntry["in"]-=weight;assignBucket(buckets,zeroIdx,wEntry)});g.removeNode(entry.v);return results}function buildState(g,weightFn){var fasGraph=new Graph,maxIn=0,maxOut=0;_.each(g.nodes(),function(v){fasGraph.setNode(v,{v:v,"in":0,out:0})});_.each(g.edges(),function(e){var prevWeight=fasGraph.edge(e.v,e.w)||0,weight=weightFn(e),edgeWeight=prevWeight+weight;fasGraph.setEdge(e.v,e.w,edgeWeight);maxOut=Math.max(maxOut,fasGraph.node(e.v).out+=weight);maxIn=Math.max(maxIn,fasGraph.node(e.w)["in"]+=weight)});var buckets=_.range(maxOut+maxIn+3).map(function(){return new List});var zeroIdx=maxIn+1;_.each(fasGraph.nodes(),function(v){assignBucket(buckets,zeroIdx,fasGraph.node(v))});return{graph:fasGraph,buckets:buckets,zeroIdx:zeroIdx}}function assignBucket(buckets,zeroIdx,entry){if(!entry.out){buckets[0].enqueue(entry)}else if(!entry["in"]){buckets[buckets.length-1].enqueue(entry)}else{buckets[entry.out-entry["in"]+zeroIdx].enqueue(entry)}}},{"./data/list":31,"./graphlib":33,"./lodash":36}],35:[function(require,module,exports){"use strict";var _=require("./lodash"),acyclic=require("./acyclic"),normalize=require("./normalize"),rank=require("./rank"),normalizeRanks=require("./util").normalizeRanks,parentDummyChains=require("./parent-dummy-chains"),removeEmptyRanks=require("./util").removeEmptyRanks,nestingGraph=require("./nesting-graph"),addBorderSegments=require("./add-border-segments"),coordinateSystem=require("./coordinate-system"),order=require("./order"),position=require("./position"),util=require("./util"),Graph=require("./graphlib").Graph;module.exports=layout;function layout(g,opts){var time=opts&&opts.debugTiming?util.time:util.notime;time("layout",function(){var layoutGraph=time(" buildLayoutGraph",function(){return buildLayoutGraph(g)});time(" runLayout",function(){runLayout(layoutGraph,time)});time(" updateInputGraph",function(){updateInputGraph(g,layoutGraph)})})}function runLayout(g,time){time(" makeSpaceForEdgeLabels",function(){makeSpaceForEdgeLabels(g)});time(" removeSelfEdges",function(){removeSelfEdges(g)});time(" acyclic",function(){acyclic.run(g)});time(" nestingGraph.run",function(){nestingGraph.run(g)});time(" rank",function(){rank(util.asNonCompoundGraph(g))});time(" injectEdgeLabelProxies",function(){injectEdgeLabelProxies(g)});time(" removeEmptyRanks",function(){removeEmptyRanks(g)});time(" nestingGraph.cleanup",function(){nestingGraph.cleanup(g)});time(" normalizeRanks",function(){normalizeRanks(g)});time(" assignRankMinMax",function(){assignRankMinMax(g)});time(" removeEdgeLabelProxies",function(){removeEdgeLabelProxies(g)});time(" normalize.run",function(){normalize.run(g)});time(" parentDummyChains",function(){parentDummyChains(g)});time(" addBorderSegments",function(){addBorderSegments(g)});time(" order",function(){order(g)});time(" insertSelfEdges",function(){insertSelfEdges(g)});time(" adjustCoordinateSystem",function(){coordinateSystem.adjust(g)});time(" position",function(){position(g)});time(" positionSelfEdges",function(){positionSelfEdges(g)});time(" removeBorderNodes",function(){removeBorderNodes(g)});time(" normalize.undo",function(){normalize.undo(g)});time(" fixupEdgeLabelCoords",function(){fixupEdgeLabelCoords(g)});time(" undoCoordinateSystem",function(){coordinateSystem.undo(g)});time(" translateGraph",function(){translateGraph(g)});time(" assignNodeIntersects",function(){assignNodeIntersects(g)});time(" reversePoints",function(){reversePointsForReversedEdges(g)});time(" acyclic.undo",function(){acyclic.undo(g)})}function updateInputGraph(inputGraph,layoutGraph){_.each(inputGraph.nodes(),function(v){var inputLabel=inputGraph.node(v),layoutLabel=layoutGraph.node(v);if(inputLabel){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y;if(layoutGraph.children(v).length){inputLabel.width=layoutLabel.width;inputLabel.height=layoutLabel.height}}});_.each(inputGraph.edges(),function(e){var inputLabel=inputGraph.edge(e),layoutLabel=layoutGraph.edge(e);inputLabel.points=layoutLabel.points;if(_.has(layoutLabel,"x")){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y}});inputGraph.graph().width=layoutGraph.graph().width;inputGraph.graph().height=layoutGraph.graph().height}var graphNumAttrs=["nodesep","edgesep","ranksep","marginx","marginy"],graphDefaults={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},graphAttrs=["acyclicer","ranker","rankdir","align"],nodeNumAttrs=["width","height"],nodeDefaults={width:0,height:0},edgeNumAttrs=["minlen","weight","width","height","labeloffset"],edgeDefaults={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},edgeAttrs=["labelpos"];function buildLayoutGraph(inputGraph){var g=new Graph({multigraph:true,compound:true}),graph=canonicalize(inputGraph.graph());g.setGraph(_.merge({},graphDefaults,selectNumberAttrs(graph,graphNumAttrs),_.pick(graph,graphAttrs)));_.each(inputGraph.nodes(),function(v){var node=canonicalize(inputGraph.node(v));g.setNode(v,_.defaults(selectNumberAttrs(node,nodeNumAttrs),nodeDefaults));g.setParent(v,inputGraph.parent(v))});_.each(inputGraph.edges(),function(e){var edge=canonicalize(inputGraph.edge(e));g.setEdge(e,_.merge({},edgeDefaults,selectNumberAttrs(edge,edgeNumAttrs),_.pick(edge,edgeAttrs)))});return g}function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/=2;_.each(g.edges(),function(e){var edge=g.edge(e);edge.minlen*=2;if(edge.labelpos.toLowerCase()!=="c"){if(graph.rankdir==="TB"||graph.rankdir==="BT"){edge.width+=edge.labeloffset +}else{edge.height+=edge.labeloffset}}})}function injectEdgeLabelProxies(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.width&&edge.height){var v=g.node(e.v),w=g.node(e.w),label={rank:(w.rank-v.rank)/2+v.rank,e:e};util.addDummyNode(g,"edge-proxy",label,"_ep")}})}function assignRankMinMax(g){var maxRank=0;_.each(g.nodes(),function(v){var node=g.node(v);if(node.borderTop){node.minRank=g.node(node.borderTop).rank;node.maxRank=g.node(node.borderBottom).rank;maxRank=_.max(maxRank,node.maxRank)}});g.graph().maxRank=maxRank}function removeEdgeLabelProxies(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="edge-proxy"){g.edge(node.e).labelRank=node.rank;g.removeNode(v)}})}function translateGraph(g){var minX=Number.POSITIVE_INFINITY,maxX=0,minY=Number.POSITIVE_INFINITY,maxY=0,graphLabel=g.graph(),marginX=graphLabel.marginx||0,marginY=graphLabel.marginy||0;function getExtremes(attrs){var x=attrs.x,y=attrs.y,w=attrs.width,h=attrs.height;minX=Math.min(minX,x-w/2);maxX=Math.max(maxX,x+w/2);minY=Math.min(minY,y-h/2);maxY=Math.max(maxY,y+h/2)}_.each(g.nodes(),function(v){getExtremes(g.node(v))});_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){getExtremes(edge)}});minX-=marginX;minY-=marginY;_.each(g.nodes(),function(v){var node=g.node(v);node.x-=minX;node.y-=minY});_.each(g.edges(),function(e){var edge=g.edge(e);_.each(edge.points,function(p){p.x-=minX;p.y-=minY});if(_.has(edge,"x")){edge.x-=minX}if(_.has(edge,"y")){edge.y-=minY}});graphLabel.width=maxX-minX+marginX;graphLabel.height=maxY-minY+marginY}function assignNodeIntersects(g){_.each(g.edges(),function(e){var edge=g.edge(e),nodeV=g.node(e.v),nodeW=g.node(e.w),p1,p2;if(!edge.points){edge.points=[];p1=nodeW;p2=nodeV}else{p1=edge.points[0];p2=edge.points[edge.points.length-1]}edge.points.unshift(util.intersectRect(nodeV,p1));edge.points.push(util.intersectRect(nodeW,p2))})}function fixupEdgeLabelCoords(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){if(edge.labelpos==="l"||edge.labelpos==="r"){edge.width-=edge.labeloffset}switch(edge.labelpos){case"l":edge.x-=edge.width/2+edge.labeloffset;break;case"r":edge.x+=edge.width/2+edge.labeloffset;break}}})}function reversePointsForReversedEdges(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.reversed){edge.points.reverse()}})}function removeBorderNodes(g){_.each(g.nodes(),function(v){if(g.children(v).length){var node=g.node(v),t=g.node(node.borderTop),b=g.node(node.borderBottom),l=g.node(_.last(node.borderLeft)),r=g.node(_.last(node.borderRight));node.width=Math.abs(r.x-l.x);node.height=Math.abs(b.y-t.y);node.x=l.x+node.width/2;node.y=t.y+node.height/2}});_.each(g.nodes(),function(v){if(g.node(v).dummy==="border"){g.removeNode(v)}})}function removeSelfEdges(g){_.each(g.edges(),function(e){if(e.v===e.w){var node=g.node(e.v);if(!node.selfEdges){node.selfEdges=[]}node.selfEdges.push({e:e,label:g.edge(e)});g.removeEdge(e)}})}function insertSelfEdges(g){var layers=util.buildLayerMatrix(g);_.each(layers,function(layer){var orderShift=0;_.each(layer,function(v,i){var node=g.node(v);node.order=i+orderShift;_.each(node.selfEdges,function(selfEdge){util.addDummyNode(g,"selfedge",{width:selfEdge.label.width,height:selfEdge.label.height,rank:node.rank,order:i+ ++orderShift,e:selfEdge.e,label:selfEdge.label},"_se")});delete node.selfEdges})})}function positionSelfEdges(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="selfedge"){var selfNode=g.node(node.e.v),x=selfNode.x+selfNode.width/2,y=selfNode.y,dx=node.x-x,dy=selfNode.height/2;g.setEdge(node.e,node.label);g.removeNode(v);node.label.points=[{x:x+2*dx/3,y:y-dy},{x:x+5*dx/6,y:y-dy},{x:x+dx,y:y},{x:x+5*dx/6,y:y+dy},{x:x+2*dx/3,y:y+dy}];node.label.x=node.x;node.label.y=node.y}})}function selectNumberAttrs(obj,attrs){return _.mapValues(_.pick(obj,attrs),Number)}function canonicalize(attrs){var newAttrs={};_.each(attrs,function(v,k){newAttrs[k.toLowerCase()]=v});return newAttrs}},{"./acyclic":28,"./add-border-segments":29,"./coordinate-system":30,"./graphlib":33,"./lodash":36,"./nesting-graph":37,"./normalize":38,"./order":43,"./parent-dummy-chains":48,"./position":50,"./rank":52,"./util":55}],36:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],37:[function(require,module,exports){var _=require("./lodash"),util=require("./util");module.exports={run:run,cleanup:cleanup};function run(g){var root=util.addDummyNode(g,"root",{},"_root"),depths=treeDepths(g),height=_.max(depths)-1,nodeSep=2*height+1;g.graph().nestingRoot=root;_.each(g.edges(),function(e){g.edge(e).minlen*=nodeSep});var weight=sumWeights(g)+1;_.each(g.children(),function(child){dfs(g,root,nodeSep,weight,height,depths,child)});g.graph().nodeRankFactor=nodeSep}function dfs(g,root,nodeSep,weight,height,depths,v){var children=g.children(v);if(!children.length){if(v!==root){g.setEdge(root,v,{weight:0,minlen:nodeSep})}return}var top=util.addBorderNode(g,"_bt"),bottom=util.addBorderNode(g,"_bb"),label=g.node(v);g.setParent(top,v);label.borderTop=top;g.setParent(bottom,v);label.borderBottom=bottom;_.each(children,function(child){dfs(g,root,nodeSep,weight,height,depths,child);var childNode=g.node(child),childTop=childNode.borderTop?childNode.borderTop:child,childBottom=childNode.borderBottom?childNode.borderBottom:child,thisWeight=childNode.borderTop?weight:2*weight,minlen=childTop!==childBottom?1:height-depths[v]+1;g.setEdge(top,childTop,{weight:thisWeight,minlen:minlen,nestingEdge:true});g.setEdge(childBottom,bottom,{weight:thisWeight,minlen:minlen,nestingEdge:true})});if(!g.parent(v)){g.setEdge(root,top,{weight:0,minlen:height+depths[v]})}}function treeDepths(g){var depths={};function dfs(v,depth){var children=g.children(v);if(children&&children.length){_.each(children,function(child){dfs(child,depth+1)})}depths[v]=depth}_.each(g.children(),function(v){dfs(v,1)});return depths}function sumWeights(g){return _.reduce(g.edges(),function(acc,e){return acc+g.edge(e).weight},0)}function cleanup(g){var graphLabel=g.graph();g.removeNode(graphLabel.nestingRoot);delete graphLabel.nestingRoot;_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.nestingEdge){g.removeEdge(e)}})}},{"./lodash":36,"./util":55}],38:[function(require,module,exports){"use strict";var _=require("./lodash"),util=require("./util");module.exports={run:run,undo:undo};function run(g){g.graph().dummyChains=[];_.each(g.edges(),function(edge){normalizeEdge(g,edge)})}function normalizeEdge(g,e){var v=e.v,vRank=g.node(v).rank,w=e.w,wRank=g.node(w).rank,name=e.name,edgeLabel=g.edge(e),labelRank=edgeLabel.labelRank;if(wRank===vRank+1)return;g.removeEdge(e);var dummy,attrs,i;for(i=0,++vRank;vRank0){if(index%2){weightSum+=tree[index+1]}index=index-1>>1;tree[index]+=entry.weight}cc+=entry.weight*weightSum}));return cc}},{"../lodash":36}],43:[function(require,module,exports){"use strict";var _=require("../lodash"),initOrder=require("./init-order"),crossCount=require("./cross-count"),sortSubgraph=require("./sort-subgraph"),buildLayerGraph=require("./build-layer-graph"),addSubgraphConstraints=require("./add-subgraph-constraints"),Graph=require("../graphlib").Graph,util=require("../util");module.exports=order;function order(g){var maxRank=util.maxRank(g),downLayerGraphs=buildLayerGraphs(g,_.range(1,maxRank+1),"inEdges"),upLayerGraphs=buildLayerGraphs(g,_.range(maxRank-1,-1,-1),"outEdges");var layering=initOrder(g);assignOrder(g,layering);var bestCC=Number.POSITIVE_INFINITY,best;for(var i=0,lastBest=0;lastBest<4;++i,++lastBest){sweepLayerGraphs(i%2?downLayerGraphs:upLayerGraphs,i%4>=2);layering=util.buildLayerMatrix(g);var cc=crossCount(g,layering);if(cc=vEntry.barycenter){mergeEntries(vEntry,uEntry)}}}function handleOut(vEntry){return function(wEntry){wEntry["in"].push(vEntry);if(--wEntry.indegree===0){sourceSet.push(wEntry)}}}while(sourceSet.length){var entry=sourceSet.pop();entries.push(entry);_.each(entry["in"].reverse(),handleIn(entry));_.each(entry.out,handleOut(entry))}return _.chain(entries).filter(function(entry){return!entry.merged}).map(function(entry){return _.pick(entry,["vs","i","barycenter","weight"])}).value()}function mergeEntries(target,source){var sum=0,weight=0;if(target.weight){sum+=target.barycenter*target.weight;weight+=target.weight}if(source.weight){sum+=source.barycenter*source.weight;weight+=source.weight}target.vs=source.vs.concat(target.vs);target.barycenter=sum/weight;target.weight=weight;target.i=Math.min(source.i,target.i);source.merged=true}},{"../lodash":36}],46:[function(require,module,exports){var _=require("../lodash"),barycenter=require("./barycenter"),resolveConflicts=require("./resolve-conflicts"),sort=require("./sort");module.exports=sortSubgraph;function sortSubgraph(g,v,cg,biasRight){var movable=g.children(v),node=g.node(v),bl=node?node.borderLeft:undefined,br=node?node.borderRight:undefined,subgraphs={};if(bl){movable=_.filter(movable,function(w){return w!==bl&&w!==br})}var barycenters=barycenter(g,movable);_.each(barycenters,function(entry){if(g.children(entry.v).length){var subgraphResult=sortSubgraph(g,entry.v,cg,biasRight);subgraphs[entry.v]=subgraphResult;if(_.has(subgraphResult,"barycenter")){mergeBarycenters(entry,subgraphResult)}}});var entries=resolveConflicts(barycenters,cg);expandSubgraphs(entries,subgraphs);var result=sort(entries,biasRight);if(bl){result.vs=_.flatten([bl,result.vs,br],true);if(g.predecessors(bl).length){var blPred=g.node(g.predecessors(bl)[0]),brPred=g.node(g.predecessors(br)[0]);if(!_.has(result,"barycenter")){result.barycenter=0;result.weight=0}result.barycenter=(result.barycenter*result.weight+blPred.order+brPred.order)/(result.weight+2);result.weight+=2}}return result}function expandSubgraphs(entries,subgraphs){_.each(entries,function(entry){entry.vs=_.flatten(entry.vs.map(function(v){if(subgraphs[v]){return subgraphs[v].vs}return v}),true)})}function mergeBarycenters(target,other){if(!_.isUndefined(target.barycenter)){target.barycenter=(target.barycenter*target.weight+other.barycenter*other.weight)/(target.weight+other.weight);target.weight+=other.weight}else{target.barycenter=other.barycenter;target.weight=other.weight}}},{"../lodash":36,"./barycenter":40,"./resolve-conflicts":45,"./sort":47}],47:[function(require,module,exports){var _=require("../lodash"),util=require("../util");module.exports=sort;function sort(entries,biasRight){var parts=util.partition(entries,function(entry){return _.has(entry,"barycenter")});var sortable=parts.lhs,unsortable=_.sortBy(parts.rhs,function(entry){return-entry.i}),vs=[],sum=0,weight=0,vsIndex=0;sortable.sort(compareWithBias(!!biasRight));vsIndex=consumeUnsortable(vs,unsortable,vsIndex);_.each(sortable,function(entry){vsIndex+=entry.vs.length;vs.push(entry.vs);sum+=entry.barycenter*entry.weight;weight+=entry.weight;vsIndex=consumeUnsortable(vs,unsortable,vsIndex)});var result={vs:_.flatten(vs,true)};if(weight){result.barycenter=sum/weight;result.weight=weight}return result}function consumeUnsortable(vs,unsortable,index){var last;while(unsortable.length&&(last=_.last(unsortable)).i<=index){unsortable.pop();vs.push(last.vs);index++}return index}function compareWithBias(bias){return function(entryV,entryW){if(entryV.barycenterentryW.barycenter){return 1}return!bias?entryV.i-entryW.i:entryW.i-entryV.i}}},{"../lodash":36,"../util":55}],48:[function(require,module,exports){var _=require("./lodash");module.exports=parentDummyChains;function parentDummyChains(g){var postorderNums=postorder(g);_.each(g.graph().dummyChains,function(v){var node=g.node(v),edgeObj=node.edgeObj,pathData=findPath(g,postorderNums,edgeObj.v,edgeObj.w),path=pathData.path,lca=pathData.lca,pathIdx=0,pathV=path[pathIdx],ascending=true;while(v!==edgeObj.w){node=g.node(v);if(ascending){while((pathV=path[pathIdx])!==lca&&g.node(pathV).maxRanklow||lim>postorderNums[parent].lim));lca=parent;parent=w;while((parent=g.parent(parent))!==lca){wPath.push(parent)}return{path:vPath.concat(wPath.reverse()),lca:lca}}function postorder(g){var result={},lim=0;function dfs(v){var low=lim;_.each(g.children(v),dfs);result[v]={low:low,lim:lim++}}_.each(g.children(),dfs);return result}},{"./lodash":36}],49:[function(require,module,exports){"use strict";var _=require("../lodash"),Graph=require("../graphlib").Graph,util=require("../util");module.exports={positionX:positionX,findType1Conflicts:findType1Conflicts,findType2Conflicts:findType2Conflicts,addConflict:addConflict,hasConflict:hasConflict,verticalAlignment:verticalAlignment,horizontalCompaction:horizontalCompaction,alignCoordinates:alignCoordinates,findSmallestWidthAlignment:findSmallestWidthAlignment,balance:balance};function findType1Conflicts(g,layering){var conflicts={};function visitLayer(prevLayer,layer){var k0=0,scanPos=0,prevLayerLength=prevLayer.length,lastNode=_.last(layer);_.each(layer,function(v,i){var w=findOtherInnerSegmentNode(g,v),k1=w?g.node(w).order:prevLayerLength;if(w||v===lastNode){_.each(layer.slice(scanPos,i+1),function(scanNode){_.each(g.predecessors(scanNode),function(u){var uLabel=g.node(u),uPos=uLabel.order;if((uPosnextNorthBorder)){addConflict(conflicts,u,v)}})}})}function visitLayer(north,south){var prevNorthPos=-1,nextNorthPos,southPos=0;_.each(south,function(v,southLookahead){if(g.node(v).dummy==="border"){var predecessors=g.predecessors(v);if(predecessors.length){nextNorthPos=g.node(predecessors[0]).order;scan(south,southPos,southLookahead,prevNorthPos,nextNorthPos);southPos=southLookahead;prevNorthPos=nextNorthPos}}scan(south,southPos,south.length,nextNorthPos,north.length)});return south}_.reduce(layering,visitLayer);return conflicts}function findOtherInnerSegmentNode(g,v){if(g.node(v).dummy){return _.find(g.predecessors(v),function(u){return g.node(u).dummy})}}function addConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}var conflictsV=conflicts[v];if(!conflictsV){conflicts[v]=conflictsV={}}conflictsV[w]=true}function hasConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}return _.has(conflicts[v],w)}function verticalAlignment(g,layering,conflicts,neighborFn){var root={},align={},pos={};_.each(layering,function(layer){_.each(layer,function(v,order){root[v]=v;align[v]=v;pos[v]=order})});_.each(layering,function(layer){var prevIdx=-1;_.each(layer,function(v){var ws=neighborFn(v);if(ws.length){ws=_.sortBy(ws,function(w){return pos[w]});var mp=(ws.length-1)/2;for(var i=Math.floor(mp),il=Math.ceil(mp);i<=il;++i){var w=ws[i];if(align[v]===v&&prevIdxwLabel.lim){tailLabel=wLabel;flip=true}var candidates=_.filter(g.edges(),function(edge){return flip===isDescendant(t,t.node(edge.v),tailLabel)&&flip!==isDescendant(t,t.node(edge.w),tailLabel)});return _.min(candidates,function(edge){return slack(g,edge)})}function exchangeEdges(t,g,e,f){var v=e.v,w=e.w;t.removeEdge(v,w);t.setEdge(f.v,f.w,{});initLowLimValues(t);initCutValues(t,g);updateRanks(t,g)}function updateRanks(t,g){var root=_.find(t.nodes(),function(v){return!g.node(v).parent}),vs=preorder(t,root);vs=vs.slice(1);_.each(vs,function(v){var parent=t.node(v).parent,edge=g.edge(v,parent),flipped=false;if(!edge){edge=g.edge(parent,v);flipped=true}g.node(v).rank=g.node(parent).rank+(flipped?edge.minlen:-edge.minlen)})}function isTreeEdge(tree,u,v){return tree.hasEdge(u,v)}function isDescendant(tree,vLabel,rootLabel){return rootLabel.low<=vLabel.lim&&vLabel.lim<=rootLabel.lim}},{"../graphlib":33,"../lodash":36,"../util":55,"./feasible-tree":51,"./util":54}],54:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports={longestPath:longestPath,slack:slack};function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.min(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY){rank=0}return label.rank=rank}_.each(g.sources(),dfs)}function slack(g,e){return g.node(e.w).rank-g.node(e.v).rank-g.edge(e).minlen}},{"../lodash":36}],55:[function(require,module,exports){"use strict";var _=require("./lodash"),Graph=require("./graphlib").Graph;module.exports={addDummyNode:addDummyNode,simplify:simplify,asNonCompoundGraph:asNonCompoundGraph,successorWeights:successorWeights,predecessorWeights:predecessorWeights,intersectRect:intersectRect,buildLayerMatrix:buildLayerMatrix,normalizeRanks:normalizeRanks,removeEmptyRanks:removeEmptyRanks,addBorderNode:addBorderNode,maxRank:maxRank,partition:partition,time:time,notime:notime};function addDummyNode(g,type,attrs,name){var v;do{v=_.uniqueId(name)}while(g.hasNode(v));attrs.dummy=type;g.setNode(v,attrs);return v}function simplify(g){var simplified=(new Graph).setGraph(g.graph());_.each(g.nodes(),function(v){simplified.setNode(v,g.node(v))});_.each(g.edges(),function(e){var simpleLabel=simplified.edge(e.v,e.w)||{weight:0,minlen:1},label=g.edge(e);simplified.setEdge(e.v,e.w,{weight:simpleLabel.weight+label.weight,minlen:Math.max(simpleLabel.minlen,label.minlen)})});return simplified}function asNonCompoundGraph(g){var simplified=new Graph({multigraph:g.isMultigraph()}).setGraph(g.graph());_.each(g.nodes(),function(v){if(!g.children(v).length){simplified.setNode(v,g.node(v)) +}});_.each(g.edges(),function(e){simplified.setEdge(e,g.edge(e))});return simplified}function successorWeights(g){var weightMap=_.map(g.nodes(),function(v){var sucs={};_.each(g.outEdges(v),function(e){sucs[e.w]=(sucs[e.w]||0)+g.edge(e).weight});return sucs});return _.zipObject(g.nodes(),weightMap)}function predecessorWeights(g){var weightMap=_.map(g.nodes(),function(v){var preds={};_.each(g.inEdges(v),function(e){preds[e.v]=(preds[e.v]||0)+g.edge(e).weight});return preds});return _.zipObject(g.nodes(),weightMap)}function intersectRect(rect,point){var x=rect.x;var y=rect.y;var dx=point.x-x;var dy=point.y-y;var w=rect.width/2;var h=rect.height/2;if(!dx&&!dy){throw new Error("Not possible to find intersection inside of the rectangle")}var sx,sy;if(Math.abs(dy)*w>Math.abs(dx)*h){if(dy<0){h=-h}sx=h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=w*dy/dx}return{x:x+sx,y:y+sy}}function buildLayerMatrix(g){var layering=_.map(_.range(maxRank(g)+1),function(){return[]});_.each(g.nodes(),function(v){var node=g.node(v),rank=node.rank;if(!_.isUndefined(rank)){layering[rank][node.order]=v}});return layering}function normalizeRanks(g){var min=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));_.each(g.nodes(),function(v){var node=g.node(v);if(_.has(node,"rank")){node.rank-=min}})}function removeEmptyRanks(g){var offset=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));var layers=[];_.each(g.nodes(),function(v){var rank=g.node(v).rank-offset;if(!_.has(layers,rank)){layers[rank]=[]}layers[rank].push(v)});var delta=0,nodeRankFactor=g.graph().nodeRankFactor;_.each(layers,function(vs,i){if(_.isUndefined(vs)&&i%nodeRankFactor!==0){--delta}else if(delta){_.each(vs,function(v){g.node(v).rank+=delta})}})}function addBorderNode(g,prefix,rank,order){var node={width:0,height:0};if(arguments.length>=4){node.rank=rank;node.order=order}return addDummyNode(g,"border",node,prefix)}function maxRank(g){return _.max(_.map(g.nodes(),function(v){var rank=g.node(v).rank;if(!_.isUndefined(rank)){return rank}}))}function partition(collection,fn){var result={lhs:[],rhs:[]};_.each(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+" time: "+(_.now()-start)+"ms")}}function notime(name,fn){return fn()}},{"./graphlib":33,"./lodash":36}],56:[function(require,module,exports){module.exports="0.7.1"},{}],57:[function(require,module,exports){var lib=require("./lib");module.exports={Graph:lib.Graph,json:require("./lib/json"),alg:require("./lib/alg"),version:lib.version}},{"./lib":73,"./lib/alg":64,"./lib/json":74}],58:[function(require,module,exports){var _=require("../lodash");module.exports=components;function components(g){var visited={},cmpts=[],cmpt;function dfs(v){if(_.has(visited,v))return;visited[v]=true;cmpt.push(v);_.each(g.successors(v),dfs);_.each(g.predecessors(v),dfs)}_.each(g.nodes(),function(v){cmpt=[];dfs(v);if(cmpt.length){cmpts.push(cmpt)}});return cmpts}},{"../lodash":75}],59:[function(require,module,exports){var _=require("../lodash");module.exports=dfs;function dfs(g,vs,order){if(!_.isArray(vs)){vs=[vs]}var acc=[],visited={};_.each(vs,function(v){if(!g.hasNode(v)){throw new Error("Graph does not have node: "+v)}doDfs(g,v,order==="post",visited,acc)});return acc}function doDfs(g,v,postorder,visited,acc){if(!_.has(visited,v)){visited[v]=true;if(!postorder){acc.push(v)}_.each(g.neighbors(v),function(w){doDfs(g,w,postorder,visited,acc)});if(postorder){acc.push(v)}}}},{"../lodash":75}],60:[function(require,module,exports){var dijkstra=require("./dijkstra"),_=require("../lodash");module.exports=dijkstraAll;function dijkstraAll(g,weightFunc,edgeFunc){return _.transform(g.nodes(),function(acc,v){acc[v]=dijkstra(g,v,weightFunc,edgeFunc)},{})}},{"../lodash":75,"./dijkstra":61}],61:[function(require,module,exports){var _=require("../lodash"),PriorityQueue=require("../data/priority-queue");module.exports=dijkstra;var DEFAULT_WEIGHT_FUNC=_.constant(1);function dijkstra(g,source,weightFn,edgeFn){return runDijkstra(g,String(source),weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runDijkstra(g,source,weightFn,edgeFn){var results={},pq=new PriorityQueue,v,vEntry;var updateNeighbors=function(edge){var w=edge.v!==v?edge.v:edge.w,wEntry=results[w],weight=weightFn(edge),distance=vEntry.distance+weight;if(weight<0){throw new Error("dijkstra does not allow negative edge weights. "+"Bad edge: "+edge+" Weight: "+weight)}if(distance0){v=pq.removeMin();vEntry=results[v];if(vEntry.distance===Number.POSITIVE_INFINITY){break}edgeFn(v).forEach(updateNeighbors)}return results}},{"../data/priority-queue":71,"../lodash":75}],62:[function(require,module,exports){var _=require("../lodash"),tarjan=require("./tarjan");module.exports=findCycles;function findCycles(g){return _.filter(tarjan(g),function(cmpt){return cmpt.length>1})}},{"../lodash":75,"./tarjan":69}],63:[function(require,module,exports){var _=require("../lodash");module.exports=floydWarshall;var DEFAULT_WEIGHT_FUNC=_.constant(1);function floydWarshall(g,weightFn,edgeFn){return runFloydWarshall(g,weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runFloydWarshall(g,weightFn,edgeFn){var results={},nodes=g.nodes();nodes.forEach(function(v){results[v]={};results[v][v]={distance:0};nodes.forEach(function(w){if(v!==w){results[v][w]={distance:Number.POSITIVE_INFINITY}}});edgeFn(v).forEach(function(edge){var w=edge.v===v?edge.w:edge.v,d=weightFn(edge);results[v][w]={distance:d,predecessor:v}})});nodes.forEach(function(k){var rowK=results[k];nodes.forEach(function(i){var rowI=results[i];nodes.forEach(function(j){var ik=rowI[k];var kj=rowK[j];var ij=rowI[j];var altDistance=ik.distance+kj.distance;if(altDistance0){v=pq.removeMin();if(_.has(parents,v)){result.setEdge(v,parents[v])}else if(init){throw new Error("Input graph is not connected: "+g)}else{init=true}g.nodeEdges(v).forEach(updateNeighbors)}return result}},{"../data/priority-queue":71,"../graph":72,"../lodash":75}],69:[function(require,module,exports){var _=require("../lodash");module.exports=tarjan;function tarjan(g){var index=0,stack=[],visited={},results=[];function dfs(v){var entry=visited[v]={onStack:true,lowlink:index,index:index++};stack.push(v);g.successors(v).forEach(function(w){if(!_.has(visited,w)){dfs(w);entry.lowlink=Math.min(entry.lowlink,visited[w].lowlink)}else if(visited[w].onStack){entry.lowlink=Math.min(entry.lowlink,visited[w].index)}});if(entry.lowlink===entry.index){var cmpt=[],w;do{w=stack.pop();visited[w].onStack=false;cmpt.push(w)}while(v!==w);results.push(cmpt)}}g.nodes().forEach(function(v){if(!_.has(visited,v)){dfs(v)}});return results}},{"../lodash":75}],70:[function(require,module,exports){var _=require("../lodash");module.exports=topsort;topsort.CycleException=CycleException;function topsort(g){var visited={},stack={},results=[];function visit(node){if(_.has(stack,node)){throw new CycleException}if(!_.has(visited,node)){stack[node]=true;visited[node]=true;_.each(g.predecessors(node),visit);delete stack[node];results.push(node)}}_.each(g.sinks(),visit);if(_.size(visited)!==g.nodeCount()){throw new CycleException}return results}function CycleException(){}},{"../lodash":75}],71:[function(require,module,exports){var _=require("../lodash");module.exports=PriorityQueue;function PriorityQueue(){this._arr=[];this._keyIndices={}}PriorityQueue.prototype.size=function(){return this._arr.length};PriorityQueue.prototype.keys=function(){return this._arr.map(function(x){return x.key})};PriorityQueue.prototype.has=function(key){return _.has(this._keyIndices,key)};PriorityQueue.prototype.priority=function(key){var index=this._keyIndices[key];if(index!==undefined){return this._arr[index].priority}};PriorityQueue.prototype.min=function(){if(this.size()===0){throw new Error("Queue underflow")}return this._arr[0].key};PriorityQueue.prototype.add=function(key,priority){var keyIndices=this._keyIndices;key=String(key);if(!_.has(keyIndices,key)){var arr=this._arr;var index=arr.length;keyIndices[key]=index;arr.push({key:key,priority:priority});this._decrease(index);return true}return false};PriorityQueue.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var min=this._arr.pop();delete this._keyIndices[min.key];this._heapify(0);return min.key};PriorityQueue.prototype.decrease=function(key,priority){var index=this._keyIndices[key];if(priority>this._arr[index].priority){throw new Error("New priority is greater than current priority. "+"Key: "+key+" Old: "+this._arr[index].priority+" New: "+priority)}this._arr[index].priority=priority;this._decrease(index)};PriorityQueue.prototype._heapify=function(i){var arr=this._arr;var l=2*i,r=l+1,largest=i;if(l>1;if(arr[parent].priority1){this.setNode(v,value)}else{this.setNode(v)}},this);return this};Graph.prototype.setNode=function(v,value){if(_.has(this._nodes,v)){if(arguments.length>1){this._nodes[v]=value}return this}this._nodes[v]=arguments.length>1?value:this._defaultNodeLabelFn(v);if(this._isCompound){this._parent[v]=GRAPH_NODE;this._children[v]={};this._children[GRAPH_NODE][v]=true}this._in[v]={};this._preds[v]={};this._out[v]={};this._sucs[v]={};++this._nodeCount;return this};Graph.prototype.node=function(v){return this._nodes[v]};Graph.prototype.hasNode=function(v){return _.has(this._nodes,v)};Graph.prototype.removeNode=function(v){var self=this;if(_.has(this._nodes,v)){var removeEdge=function(e){self.removeEdge(self._edgeObjs[e])};delete this._nodes[v];if(this._isCompound){this._removeFromParentsChildList(v);delete this._parent[v];_.each(this.children(v),function(child){this.setParent(child)},this);delete this._children[v]}_.each(_.keys(this._in[v]),removeEdge);delete this._in[v];delete this._preds[v];_.each(_.keys(this._out[v]),removeEdge);delete this._out[v];delete this._sucs[v];--this._nodeCount}return this};Graph.prototype.setParent=function(v,parent){if(!this._isCompound){throw new Error("Cannot set parent in a non-compound graph")}if(_.isUndefined(parent)){parent=GRAPH_NODE}else{for(var ancestor=parent;!_.isUndefined(ancestor);ancestor=this.parent(ancestor)){if(ancestor===v){throw new Error("Setting "+parent+" as parent of "+v+" would create create a cycle")}}this.setNode(parent)}this.setNode(v);this._removeFromParentsChildList(v);this._parent[v]=parent;this._children[parent][v]=true;return this};Graph.prototype._removeFromParentsChildList=function(v){delete this._children[this._parent[v]][v]};Graph.prototype.parent=function(v){if(this._isCompound){var parent=this._parent[v];if(parent!==GRAPH_NODE){return parent}}};Graph.prototype.children=function(v){if(_.isUndefined(v)){v=GRAPH_NODE}if(this._isCompound){var children=this._children[v];if(children){return _.keys(children)}}else if(v===GRAPH_NODE){return this.nodes()}else if(this.hasNode(v)){return[]}};Graph.prototype.predecessors=function(v){var predsV=this._preds[v];if(predsV){return _.keys(predsV)}};Graph.prototype.successors=function(v){var sucsV=this._sucs[v];if(sucsV){return _.keys(sucsV)}};Graph.prototype.neighbors=function(v){var preds=this.predecessors(v);if(preds){return _.union(preds,this.successors(v))}};Graph.prototype.setDefaultEdgeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultEdgeLabelFn=newDefault;return this};Graph.prototype.edgeCount=function(){return this._edgeCount};Graph.prototype.edges=function(){return _.values(this._edgeObjs)};Graph.prototype.setPath=function(vs,value){var self=this,args=arguments;_.reduce(vs,function(v,w){if(args.length>1){self.setEdge(v,w,value)}else{self.setEdge(v,w)}return w});return this};Graph.prototype.setEdge=function(){var v,w,name,value,valueSpecified=false;if(_.isPlainObject(arguments[0])){v=arguments[0].v;w=arguments[0].w;name=arguments[0].name;if(arguments.length===2){value=arguments[1];valueSpecified=true}}else{v=arguments[0];w=arguments[1];name=arguments[3];if(arguments.length>2){value=arguments[2];valueSpecified=true}}v=""+v;w=""+w;if(!_.isUndefined(name)){name=""+name}var e=edgeArgsToId(this._isDirected,v,w,name);if(_.has(this._edgeLabels,e)){if(valueSpecified){this._edgeLabels[e]=value}return this}if(!_.isUndefined(name)&&!this._isMultigraph){throw new Error("Cannot set a named edge when isMultigraph = false")}this.setNode(v);this.setNode(w);this._edgeLabels[e]=valueSpecified?value:this._defaultEdgeLabelFn(v,w,name);var edgeObj=edgeArgsToObj(this._isDirected,v,w,name);v=edgeObj.v;w=edgeObj.w;Object.freeze(edgeObj);this._edgeObjs[e]=edgeObj;incrementOrInitEntry(this._preds[w],v);incrementOrInitEntry(this._sucs[v],w);this._in[w][e]=edgeObj;this._out[v][e]=edgeObj;this._edgeCount++;return this};Graph.prototype.edge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return this._edgeLabels[e]};Graph.prototype.hasEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return _.has(this._edgeLabels,e)};Graph.prototype.removeEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name),edge=this._edgeObjs[e];if(edge){v=edge.v;w=edge.w;delete this._edgeLabels[e];delete this._edgeObjs[e];decrementOrRemoveEntry(this._preds[w],v);decrementOrRemoveEntry(this._sucs[v],w);delete this._in[w][e];delete this._out[v][e];this._edgeCount--}return this};Graph.prototype.inEdges=function(v,u){var inV=this._in[v];if(inV){var edges=_.values(inV);if(!u){return edges}return _.filter(edges,function(edge){return edge.v===u})}};Graph.prototype.outEdges=function(v,w){var outV=this._out[v];if(outV){var edges=_.values(outV);if(!w){return edges}return _.filter(edges,function(edge){return edge.w===w})}};Graph.prototype.nodeEdges=function(v,w){var inEdges=this.inEdges(v,w);if(inEdges){return inEdges.concat(this.outEdges(v,w))}};function incrementOrInitEntry(map,k){if(_.has(map,k)){map[k]++}else{map[k]=1}}function decrementOrRemoveEntry(map,k){if(!--map[k]){delete map[k]}}function edgeArgsToId(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}return v+EDGE_KEY_DELIM+w+EDGE_KEY_DELIM+(_.isUndefined(name)?DEFAULT_EDGE_NAME:name)}function edgeArgsToObj(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}var edgeObj={v:v,w:w};if(name){edgeObj.name=name}return edgeObj}function edgeObjToId(isDirected,edgeObj){return edgeArgsToId(isDirected,edgeObj.v,edgeObj.w,edgeObj.name)}},{"./lodash":75}],73:[function(require,module,exports){module.exports={Graph:require("./graph"),version:require("./version")}},{"./graph":72,"./version":76}],74:[function(require,module,exports){var _=require("./lodash"),Graph=require("./graph");module.exports={write:write,read:read};function write(g){var json={options:{directed:g.isDirected(),multigraph:g.isMultigraph(),compound:g.isCompound()},nodes:writeNodes(g),edges:writeEdges(g)};if(!_.isUndefined(g.graph())){json.value=_.clone(g.graph())}return json}function writeNodes(g){return _.map(g.nodes(),function(v){var nodeValue=g.node(v),parent=g.parent(v),node={v:v};if(!_.isUndefined(nodeValue)){node.value=nodeValue}if(!_.isUndefined(parent)){node.parent=parent}return node})}function writeEdges(g){return _.map(g.edges(),function(e){var edgeValue=g.edge(e),edge={v:e.v,w:e.w};if(!_.isUndefined(e.name)){edge.name=e.name}if(!_.isUndefined(edgeValue)){edge.value=edgeValue}return edge})}function read(json){var g=new Graph(json.options).setGraph(json.value);_.each(json.nodes,function(entry){g.setNode(entry.v,entry.value);if(entry.parent){g.setParent(entry.v,entry.parent)}});_.each(json.edges,function(entry){g.setEdge({v:entry.v,w:entry.w,name:entry.name},entry.value)});return g}},{"./graph":72,"./lodash":75}],75:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],76:[function(require,module,exports){module.exports="1.0.1"},{}],77:[function(require,module,exports){(function(global){(function(){var undefined;var arrayPool=[],objectPool=[];var idCounter=0;var keyPrefix=+new Date+"";var largeArraySize=75;var maxPoolSize=40;var whitespace=" \f "+"\n\r\u2028\u2029"+" ᠎              ";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reFuncName=/^\s*function[ \n\r\t]+\w/;var reInterpolate=/<%=([\s\S]+?)%>/g;var reLeadingSpacesAndZeros=RegExp("^["+whitespace+"]*0+(?=.$)");var reNoMatch=/($^)/;var reThis=/\bthis\b/;var reUnescapedString=/['\n\r\t\u2028\u2029\\]/g;var contextProps=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"];var templateCounter=0;var argsClass="[object Arguments]",arrayClass="[object Array]",boolClass="[object Boolean]",dateClass="[object Date]",funcClass="[object Function]",numberClass="[object Number]",objectClass="[object Object]",regexpClass="[object RegExp]",stringClass="[object String]";var cloneableClasses={};cloneableClasses[funcClass]=false;cloneableClasses[argsClass]=cloneableClasses[arrayClass]=cloneableClasses[boolClass]=cloneableClasses[dateClass]=cloneableClasses[numberClass]=cloneableClasses[objectClass]=cloneableClasses[regexpClass]=cloneableClasses[stringClass]=true;var debounceOptions={leading:false,maxWait:0,trailing:false};var descriptor={configurable:false,enumerable:false,value:null,writable:false};var objectTypes={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};var root=objectTypes[typeof window]&&window||this;var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var freeGlobal=objectTypes[typeof global]&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal)){root=freeGlobal}function baseIndexOf(array,value,fromIndex){var index=(fromIndex||0)-1,length=array?array.length:0;while(++index-1?0:-1:cache?0:-1}function cachePush(value){var cache=this.cache,type=typeof value;if(type=="boolean"||value==null){cache[value]=true}else{if(type!="number"&&type!="string"){type="object"}var key=type=="number"?value:keyPrefix+value,typeCache=cache[type]||(cache[type]={});if(type=="object"){(typeCache[key]||(typeCache[key]=[])).push(value)}else{typeCache[key]=true}}}function charAtCallback(value){return value.charCodeAt(0)}function compareAscending(a,b){var ac=a.criteria,bc=b.criteria,index=-1,length=ac.length;while(++indexother||typeof value=="undefined"){return 1}if(value/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function baseBind(bindData){var func=bindData[0],partialArgs=bindData[2],thisArg=bindData[4];function bound(){if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(this instanceof bound){var thisBinding=baseCreate(func.prototype),result=func.apply(thisBinding,args||arguments);return isObject(result)?result:thisBinding}return func.apply(thisArg,args||arguments)}setBindData(bound,bindData);return bound}function baseClone(value,isDeep,callback,stackA,stackB){if(callback){var result=callback(value);if(typeof result!="undefined"){return result}}var isObj=isObject(value);if(isObj){var className=toString.call(value);if(!cloneableClasses[className]){return value}var ctor=ctorByClass[className];switch(className){case boolClass:case dateClass:return new ctor(+value);case numberClass:case stringClass:return new ctor(value);case regexpClass:result=ctor(value.source,reFlags.exec(value));result.lastIndex=value.lastIndex;return result}}else{return value}var isArr=isArray(value);if(isDeep){var initedStack=!stackA;stackA||(stackA=getArray());stackB||(stackB=getArray());var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}result=isArr?ctor(value.length):{}}else{result=isArr?slice(value):assign({},value)}if(isArr){if(hasOwnProperty.call(value,"index")){result.index=value.index}if(hasOwnProperty.call(value,"input")){result.input=value.input}}if(!isDeep){return result}stackA.push(value);stackB.push(result);(isArr?forEach:forOwn)(value,function(objValue,key){result[key]=baseClone(objValue,isDeep,callback,stackA,stackB)});if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseCreate(prototype,properties){return isObject(prototype)?nativeCreate(prototype):{}}if(!nativeCreate){baseCreate=function(){function Object(){}return function(prototype){if(isObject(prototype)){Object.prototype=prototype;var result=new Object;Object.prototype=null}return result||context.Object()}}()}function baseCreateCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(typeof thisArg=="undefined"||!("prototype"in func)){return func}var bindData=func.__bindData__;if(typeof bindData=="undefined"){if(support.funcNames){bindData=!func.name}bindData=bindData||!support.funcDecomp;if(!bindData){var source=fnToString.call(func);if(!support.funcNames){bindData=!reFuncName.test(source)}if(!bindData){bindData=reThis.test(source);setBindData(func,bindData)}}}if(bindData===false||bindData!==true&&bindData[1]&1){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 2:return function(a,b){return func.call(thisArg,a,b)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)}}return bind(func,thisArg)}function baseCreateWrapper(bindData){var func=bindData[0],bitmask=bindData[1],partialArgs=bindData[2],partialRightArgs=bindData[3],thisArg=bindData[4],arity=bindData[5];var isBind=bitmask&1,isBindKey=bitmask&2,isCurry=bitmask&4,isCurryBound=bitmask&8,key=func;function bound(){var thisBinding=isBind?thisArg:this;if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(partialRightArgs||isCurry){args||(args=slice(arguments));if(partialRightArgs){push.apply(args,partialRightArgs)}if(isCurry&&args.length=largeArraySize&&indexOf===baseIndexOf,result=[];if(isLarge){var cache=createCache(values);if(cache){indexOf=cacheIndexOf;values=cache}else{isLarge=false}}while(++index-1}})}}stackA.pop();stackB.pop();if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseMerge(object,source,callback,stackA,stackB){(isArray(source)?forEach:forOwn)(source,function(source,key){var found,isArr,result=source,value=object[key];if(source&&((isArr=isArray(source))||isPlainObject(source))){var stackLength=stackA.length;while(stackLength--){if(found=stackA[stackLength]==source){value=stackB[stackLength];break}}if(!found){var isShallow;if(callback){result=callback(value,source);if(isShallow=typeof result!="undefined"){value=result}}if(!isShallow){value=isArr?isArray(value)?value:[]:isPlainObject(value)?value:{}}stackA.push(source);stackB.push(value);if(!isShallow){baseMerge(value,source,callback,stackA,stackB)}}}else{if(callback){result=callback(value,source);if(typeof result=="undefined"){result=source}}if(typeof result!="undefined"){value=result}}object[key]=value})}function baseRandom(min,max){return min+floor(nativeRandom()*(max-min+1))}function baseUniq(array,isSorted,callback){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[];var isLarge=!isSorted&&length>=largeArraySize&&indexOf===baseIndexOf,seen=callback||isLarge?getArray():result;if(isLarge){var cache=createCache(seen);indexOf=cacheIndexOf;seen=cache}while(++index":">",'"':""","'":"'"};var htmlUnescapes=invert(htmlEscapes);var reEscapedHtml=RegExp("("+keys(htmlUnescapes).join("|")+")","g"),reUnescapedHtml=RegExp("["+keys(htmlEscapes).join("")+"]","g");var assign=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength=typeof guard=="number"?2:args.length;if(argsLength>3&&typeof args[argsLength-2]=="function"){var callback=baseCreateCallback(args[--argsLength-1],args[argsLength--],2)}else if(argsLength>2&&typeof args[argsLength-1]=="function"){callback=args[--argsLength]}while(++argsIndex3&&typeof args[length-2]=="function"){var callback=baseCreateCallback(args[--length-1],args[length--],2)}else if(length>2&&typeof args[length-1]=="function"){callback=args[--length]}var sources=slice(arguments,1,length),index=-1,stackA=getArray(),stackB=getArray();while(++index-1}else if(typeof length=="number"){result=(isString(collection)?collection.indexOf(target,fromIndex):indexOf(collection,target,fromIndex))>-1}else{forOwn(collection,function(value){if(++index>=fromIndex){return!(result=value===target)}})}return result}var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key]++:result[key]=1});function every(collection,callback,thisArg){var result=true;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++indexresult){result=value}}}else{callback=callback==null&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3);forEach(collection,function(value,index,collection){var current=callback(value,index,collection);if(current>computed){computed=current;result=value}})}return result}function min(collection,callback,thisArg){var computed=Infinity,result=computed;if(typeof callback!="function"&&thisArg&&thisArg[callback]===collection){callback=null}if(callback==null&&isArray(collection)){var index=-1,length=collection.length;while(++index=largeArraySize&&createCache(argsIndex?args[argsIndex]:seen))}}var array=args[0],index=-1,length=array?array.length:0,result=[];outer:while(++index>>1;callback(array[mid])1?arguments:arguments[0],index=-1,length=array?max(pluck(array,"length")):0,result=Array(length<0?0:length);while(++index2?createWrapper(func,17,slice(arguments,2),null,thisArg):createWrapper(func,1,null,null,thisArg)}function bindAll(object){var funcs=arguments.length>1?baseFlatten(arguments,true,false,1):functions(object),index=-1,length=funcs.length;while(++index2?createWrapper(key,19,slice(arguments,2),null,object):createWrapper(key,3,null,null,object)}function compose(){var funcs=arguments,length=funcs.length;while(length--){if(!isFunction(funcs[length])){throw new TypeError}}return function(){var args=arguments,length=funcs.length;while(length--){args=[funcs[length].apply(this,args)]}return args[0]}}function curry(func,arity){arity=typeof arity=="number"?arity:+arity||func.length;return createWrapper(func,4,null,null,null,arity)}function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(!isFunction(func)){throw new TypeError}wait=nativeMax(0,wait)||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&(nativeMax(wait,options.maxWait)||0);trailing="trailing"in options?options.trailing:trailing}var delayed=function(){var remaining=wait-(now()-stamp);if(remaining<=0){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}};var maxDelayed=function(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}};return function(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading); +if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}}function defer(func){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,1);return setTimeout(function(){func.apply(undefined,args)},1)}function delay(func,wait){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,2);return setTimeout(function(){func.apply(undefined,args)},wait)}function memoize(func,resolver){if(!isFunction(func)){throw new TypeError}var memoized=function(){var cache=memoized.cache,key=resolver?resolver.apply(this,arguments):keyPrefix+arguments[0];return hasOwnProperty.call(cache,key)?cache[key]:cache[key]=func.apply(this,arguments)};memoized.cache={};return memoized}function once(func){var ran,result;if(!isFunction(func)){throw new TypeError}return function(){if(ran){return result}ran=true;result=func.apply(this,arguments);func=null;return result}}function partial(func){return createWrapper(func,16,slice(arguments,1))}function partialRight(func){return createWrapper(func,32,null,slice(arguments,1))}function throttle(func,wait,options){var leading=true,trailing=true;if(!isFunction(func)){throw new TypeError}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?options.leading:leading;trailing="trailing"in options?options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function wrap(value,wrapper){return createWrapper(wrapper,16,[value])}function constant(value){return function(){return value}}function createCallback(func,thisArg,argCount){var type=typeof func;if(func==null||type=="function"){return baseCreateCallback(func,thisArg,argCount)}if(type!="object"){return property(func)}var props=keys(func),key=props[0],a=func[key];if(props.length==1&&a===a&&!isObject(a)){return function(object){var b=object[key];return a===b&&(a!==0||1/a==1/b)}}return function(object){var length=props.length,result=false;while(length--){if(!(result=baseIsEqual(object[props[length]],func[props[length]],null,true))){break}}return result}}function escape(string){return string==null?"":String(string).replace(reUnescapedHtml,escapeHtmlChar)}function identity(value){return value}function mixin(object,source,options){var chain=true,methodNames=source&&functions(source);if(!source||!options&&!methodNames.length){if(options==null){options=source}ctor=lodashWrapper;source=object;object=lodash;methodNames=functions(source)}if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}var ctor=object,isFunc=isFunction(ctor);forEach(methodNames,function(methodName){var func=object[methodName]=source[methodName];if(isFunc){ctor.prototype[methodName]=function(){var chainAll=this.__chain__,value=this.__wrapped__,args=[value];push.apply(args,arguments);var result=func.apply(object,args);if(chain||chainAll){if(value===result&&isObject(result)){return this}result=new ctor(result);result.__chain__=chainAll}return result}}})}function noConflict(){context._=oldDash;return this}function noop(){}var now=isNative(now=Date.now)&&now||function(){return(new Date).getTime()};var parseInt=nativeParseInt(whitespace+"08")==8?nativeParseInt:function(value,radix){return nativeParseInt(isString(value)?value.replace(reLeadingSpacesAndZeros,""):value,radix||0)};function property(key){return function(object){return object[key]}}function random(min,max,floating){var noMin=min==null,noMax=max==null;if(floating==null){if(typeof min=="boolean"&&noMax){floating=min;min=1}else if(!noMax&&typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}function result(object,key){if(object){var value=object[key];return isFunction(value)?object[key]():value}}function template(text,data,options){var settings=lodash.templateSettings;text=String(text||"");options=defaults({},options,settings);var imports=defaults({},options.imports,settings.imports),importsKeys=keys(imports),importsValues=values(imports);var isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");text.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=text.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable,hasVariable=variable;if(!hasVariable){variable="obj";source="with ("+variable+") {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+variable+") {\n"+(hasVariable?"":variable+" || ("+variable+" = {});\n")+"var __t, __p = '', __e = _.escape"+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var sourceURL="\n/*\n//# sourceURL="+(options.sourceURL||"/lodash/template/source["+templateCounter++ +"]")+"\n*/";try{var result=Function(importsKeys,"return "+source+sourceURL).apply(undefined,importsValues)}catch(e){e.source=source;throw e}if(data){return result(data)}result.source=source;return result}function times(n,callback,thisArg){n=(n=+n)>-1?n:0;var index=-1,result=Array(n);callback=baseCreateCallback(callback,thisArg,1);while(++index ['10', '00'] or '-1530' > ['-', '15', '30'] - parseTimezoneChunker = /([\+\-]|\d\d)/gi, - - // getter and setter names - proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), - unitMillisecondFactors = { - 'Milliseconds' : 1, - 'Seconds' : 1e3, - 'Minutes' : 6e4, - 'Hours' : 36e5, - 'Days' : 864e5, - 'Months' : 2592e6, - 'Years' : 31536e6 - }, - - unitAliases = { - ms : 'millisecond', - s : 'second', - m : 'minute', - h : 'hour', - d : 'day', - D : 'date', - w : 'week', - W : 'isoWeek', - M : 'month', - Q : 'quarter', - y : 'year', - DDD : 'dayOfYear', - e : 'weekday', - E : 'isoWeekday', - gg: 'weekYear', - GG: 'isoWeekYear' - }, - - camelFunctions = { - dayofyear : 'dayOfYear', - isoweekday : 'isoWeekday', - isoweek : 'isoWeek', - weekyear : 'weekYear', - isoweekyear : 'isoWeekYear' - }, - - // format function strings - formatFunctions = {}, - - // default relative time thresholds - relativeTimeThresholds = { - s: 45, // seconds to minute - m: 45, // minutes to hour - h: 22, // hours to day - d: 26, // days to month - M: 11 // months to year - }, - - // tokens to ordinalize and pad - ordinalizeTokens = 'DDD w W M D d'.split(' '), - paddedTokens = 'M D H h m s w W'.split(' '), - - formatTokenFunctions = { - M : function () { - return this.month() + 1; - }, - MMM : function (format) { - return this.localeData().monthsShort(this, format); - }, - MMMM : function (format) { - return this.localeData().months(this, format); - }, - D : function () { - return this.date(); - }, - DDD : function () { - return this.dayOfYear(); - }, - d : function () { - return this.day(); - }, - dd : function (format) { - return this.localeData().weekdaysMin(this, format); - }, - ddd : function (format) { - return this.localeData().weekdaysShort(this, format); - }, - dddd : function (format) { - return this.localeData().weekdays(this, format); - }, - w : function () { - return this.week(); - }, - W : function () { - return this.isoWeek(); - }, - YY : function () { - return leftZeroFill(this.year() % 100, 2); - }, - YYYY : function () { - return leftZeroFill(this.year(), 4); - }, - YYYYY : function () { - return leftZeroFill(this.year(), 5); - }, - YYYYYY : function () { - var y = this.year(), sign = y >= 0 ? '+' : '-'; - return sign + leftZeroFill(Math.abs(y), 6); - }, - gg : function () { - return leftZeroFill(this.weekYear() % 100, 2); - }, - gggg : function () { - return leftZeroFill(this.weekYear(), 4); - }, - ggggg : function () { - return leftZeroFill(this.weekYear(), 5); - }, - GG : function () { - return leftZeroFill(this.isoWeekYear() % 100, 2); - }, - GGGG : function () { - return leftZeroFill(this.isoWeekYear(), 4); - }, - GGGGG : function () { - return leftZeroFill(this.isoWeekYear(), 5); - }, - e : function () { - return this.weekday(); - }, - E : function () { - return this.isoWeekday(); - }, - a : function () { - return this.localeData().meridiem(this.hours(), this.minutes(), true); - }, - A : function () { - return this.localeData().meridiem(this.hours(), this.minutes(), false); - }, - H : function () { - return this.hours(); - }, - h : function () { - return this.hours() % 12 || 12; - }, - m : function () { - return this.minutes(); - }, - s : function () { - return this.seconds(); - }, - S : function () { - return toInt(this.milliseconds() / 100); - }, - SS : function () { - return leftZeroFill(toInt(this.milliseconds() / 10), 2); - }, - SSS : function () { - return leftZeroFill(this.milliseconds(), 3); - }, - SSSS : function () { - return leftZeroFill(this.milliseconds(), 3); - }, - Z : function () { - var a = this.utcOffset(), - b = '+'; - if (a < 0) { - a = -a; - b = '-'; - } - return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2); - }, - ZZ : function () { - var a = this.utcOffset(), - b = '+'; - if (a < 0) { - a = -a; - b = '-'; - } - return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2); - }, - z : function () { - return this.zoneAbbr(); - }, - zz : function () { - return this.zoneName(); - }, - x : function () { - return this.valueOf(); - }, - X : function () { - return this.unix(); - }, - Q : function () { - return this.quarter(); - } - }, - - deprecations = {}, - - lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'], +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + global.moment = factory() +}(this, function () { 'use strict'; - updateInProgress = false; + var hookCallback; - // Pick the first defined of two or three arguments. dfl comes from - // default. - function dfl(a, b, c) { - switch (arguments.length) { - case 2: return a != null ? a : b; - case 3: return a != null ? a : b != null ? b : c; - default: throw new Error('Implement me'); - } + function utils_hooks__hooks () { + return hookCallback.apply(null, arguments); } - function hasOwnProp(a, b) { - return hasOwnProperty.call(a, b); + // This is done to register the method called with moment() + // without creating circular dependencies. + function setHookCallback (callback) { + hookCallback = callback; } function defaultParsingFlags() { - // We need to deep clone this object, and es5 standard is not very - // helpful. + // We need to deep clone this object. return { - empty : false, - unusedTokens : [], - unusedInput : [], - overflow : -2, - charsLeftOver : 0, - nullInput : false, - invalidMonth : null, - invalidFormat : false, + empty : false, + unusedTokens : [], + unusedInput : [], + overflow : -2, + charsLeftOver : 0, + nullInput : false, + invalidMonth : null, + invalidFormat : false, userInvalidated : false, - iso: false - }; - } - - function printMsg(msg) { - if (moment.suppressDeprecationWarnings === false && - typeof console !== 'undefined' && console.warn) { - console.warn('Deprecation warning: ' + msg); - } - } - - function deprecate(msg, fn) { - var firstTime = true; - return extend(function () { - if (firstTime) { - printMsg(msg); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); - } - - function deprecateSimple(name, msg) { - if (!deprecations[name]) { - printMsg(msg); - deprecations[name] = true; - } - } - - function padToken(func, count) { - return function (a) { - return leftZeroFill(func.call(this, a), count); - }; - } - function ordinalizeToken(func, period) { - return function (a) { - return this.localeData().ordinal(func.call(this, a), period); + iso : false }; } - function monthDiff(a, b) { - // difference in months - var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), - // b is in (anchor - 1 month, anchor + 1 month) - anchor = a.clone().add(wholeMonthDiff, 'months'), - anchor2, adjust; - - if (b - anchor < 0) { - anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor - anchor2); - } else { - anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor2 - anchor); - } - - return -(wholeMonthDiff + adjust); - } - - while (ordinalizeTokens.length) { - i = ordinalizeTokens.pop(); - formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i); - } - while (paddedTokens.length) { - i = paddedTokens.pop(); - formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2); - } - formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3); - - - function meridiemFixWrap(locale, hour, meridiem) { - var isPm; - - if (meridiem == null) { - // nothing to do - return hour; - } - if (locale.meridiemHour != null) { - return locale.meridiemHour(hour, meridiem); - } else if (locale.isPM != null) { - // Fallback - isPm = locale.isPM(meridiem); - if (isPm && hour < 12) { - hour += 12; - } - if (!isPm && hour === 12) { - hour = 0; - } - return hour; - } else { - // thie is not supposed to happen - return hour; - } + function isArray(input) { + return Object.prototype.toString.call(input) === '[object Array]'; } - /************************************ - Constructors - ************************************/ - - function Locale() { + function isDate(input) { + return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date; } - // Moment prototype object - function Moment(config, skipOverflow) { - if (skipOverflow !== false) { - checkOverflow(config); - } - copyConfig(this, config); - this._d = new Date(+config._d); - // Prevent infinite loop in case updateOffset creates new moment - // objects. - if (updateInProgress === false) { - updateInProgress = true; - moment.updateOffset(this); - updateInProgress = false; + function map(arr, fn) { + var res = [], i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); } + return res; } - // Duration Constructor - function Duration(duration) { - var normalizedInput = normalizeObjectUnits(duration), - years = normalizedInput.year || 0, - quarters = normalizedInput.quarter || 0, - months = normalizedInput.month || 0, - weeks = normalizedInput.week || 0, - days = normalizedInput.day || 0, - hours = normalizedInput.hour || 0, - minutes = normalizedInput.minute || 0, - seconds = normalizedInput.second || 0, - milliseconds = normalizedInput.millisecond || 0; - - // representation for dateAddRemove - this._milliseconds = +milliseconds + - seconds * 1e3 + // 1000 - minutes * 6e4 + // 1000 * 60 - hours * 36e5; // 1000 * 60 * 60 - // Because of dateAddRemove treats 24 hours as different from a - // day when working around DST, we need to store them separately - this._days = +days + - weeks * 7; - // It is impossible translate months into days without knowing - // which months you are are talking about, so we have to store - // it separately. - this._months = +months + - quarters * 3 + - years * 12; - - this._data = {}; - - this._locale = moment.localeData(); - - this._bubble(); + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); } - /************************************ - Helpers - ************************************/ - - function extend(a, b) { for (var i in b) { if (hasOwnProp(b, i)) { @@ -22262,6 +21848,44 @@ process.chdir = function (dir) { return a; } + function create_utc__createUTC (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function valid__isValid(m) { + if (m._isValid == null) { + m._isValid = !isNaN(m._d.getTime()) && + m._pf.overflow < 0 && + !m._pf.empty && + !m._pf.invalidMonth && + !m._pf.nullInput && + !m._pf.invalidFormat && + !m._pf.userInvalidated; + + if (m._strict) { + m._isValid = m._isValid && + m._pf.charsLeftOver === 0 && + m._pf.unusedTokens.length === 0 && + m._pf.bigHour === undefined; + } + } + return m._isValid; + } + + function valid__createInvalid (flags) { + var m = create_utc__createUTC(NaN); + if (flags != null) { + extend(m._pf, flags); + } + else { + m._pf.userInvalidated = true; + } + + return m; + } + + var momentProperties = utils_hooks__hooks.momentProperties = []; + function copyConfig(to, from) { var i, prop, val; @@ -22309,122 +21933,181 @@ process.chdir = function (dir) { return to; } - function absRound(number) { - if (number < 0) { - return Math.ceil(number); - } else { - return Math.floor(number); + var updateInProgress = false; + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(+config._d); + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + utils_hooks__hooks.updateOffset(this); + updateInProgress = false; } } - // left zero fill a number - // see http://jsperf.com/left-zero-filling for performance comparison - function leftZeroFill(number, targetLength, forceSign) { - var output = '' + Math.abs(number), - sign = number >= 0; - - while (output.length < targetLength) { - output = '0' + output; - } - return (sign ? (forceSign ? '+' : '') : '-') + output; + function isMoment (obj) { + return obj instanceof Moment || (obj != null && hasOwnProp(obj, '_isAMomentObject')); } - function positiveMomentsDifference(base, other) { - var res = {milliseconds: 0, months: 0}; + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; - res.months = other.month() - base.month() + - (other.year() - base.year()) * 12; - if (base.clone().add(res.months, 'M').isAfter(other)) { - --res.months; + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + if (coercedNumber >= 0) { + value = Math.floor(coercedNumber); + } else { + value = Math.ceil(coercedNumber); + } } - res.milliseconds = +other - +(base.clone().add(res.months, 'M')); - - return res; + return value; } - function momentsDifference(base, other) { - var res; - other = makeAs(other, base); - if (base.isBefore(other)) { - res = positiveMomentsDifference(base, other); - } else { - res = positiveMomentsDifference(other, base); - res.milliseconds = -res.milliseconds; - res.months = -res.months; + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ((dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { + diffs++; + } } + return diffs + lengthDiff; + } - return res; + function Locale() { } - // TODO: remove 'name' arg after deprecation is removed - function createAdder(direction, name) { - return function (val, period) { - var dur, tmp; - //invert the arguments, but complain about it - if (period !== null && !isNaN(+period)) { - deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); - tmp = val; val = period; period = tmp; - } + var locales = {}; + var globalLocale; - val = typeof val === 'string' ? +val : val; - dur = moment.duration(val, period); - addOrSubtractDurationFromMoment(this, dur, direction); - return this; - }; + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; } - function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) { - var milliseconds = duration._milliseconds, - days = duration._days, - months = duration._months; - updateOffset = updateOffset == null ? true : updateOffset; - - if (milliseconds) { - mom._d.setTime(+mom._d + milliseconds * isAdding); - } - if (days) { - rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding); - } - if (months) { - rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding); + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; } - if (updateOffset) { - moment.updateOffset(mom, days || months); + return null; + } + + function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && typeof module !== 'undefined' && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + require('./locale/' + name); + // because defineLocale currently also sets the global locale, we + // want to undo that for lazy loaded locales + locale_locales__getSetGlobalLocale(oldLocale); + } catch (e) { } } + return locales[name]; } - // check if is an array - function isArray(input) { - return Object.prototype.toString.call(input) === '[object Array]'; + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function locale_locales__getSetGlobalLocale (key, values) { + var data; + if (key) { + if (typeof values === 'undefined') { + data = locale_locales__getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + } + + return globalLocale._abbr; } - function isDate(input) { - return Object.prototype.toString.call(input) === '[object Date]' || - input instanceof Date; + function defineLocale (name, values) { + if (values !== null) { + values.abbr = name; + if (!locales[name]) { + locales[name] = new Locale(); + } + locales[name].set(values); + + // backwards compat for now: also set the locale + locale_locales__getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } } - // compare two arrays, return the number of differences - function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - for (i = 0; i < len; i++) { - if ((dontConvert && array1[i] !== array2[i]) || - (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { - diffs++; + // returns locale data + function locale_locales__getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; } + key = [key]; } - return diffs + lengthDiff; + + return chooseLocale(key); + } + + var aliases = {}; + + function addUnitAlias (unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits(units) { - if (units) { - var lowered = units.toLowerCase().replace(/(.)s$/, '$1'); - units = unitAliases[units] || camelFunctions[lowered] || lowered; - } - return units; + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits(inputObject) { @@ -22444,755 +22127,687 @@ process.chdir = function (dir) { return normalizedInput; } - function makeList(field) { - var count, setter; + function makeGetSet (unit, keepTime) { + return function (value) { + if (value != null) { + get_set__set(this, unit, value); + utils_hooks__hooks.updateOffset(this, keepTime); + return this; + } else { + return get_set__get(this, unit); + } + }; + } + + function get_set__get (mom, unit) { + return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); + } + + function get_set__set (mom, unit, value) { + return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } - if (field.indexOf('week') === 0) { - count = 7; - setter = 'day'; - } - else if (field.indexOf('month') === 0) { - count = 12; - setter = 'month'; + // MOMENTS + + function getSet (units, value) { + var unit; + if (typeof units === 'object') { + for (unit in units) { + this.set(unit, units[unit]); + } + } else { + units = normalizeUnits(units); + if (typeof this[units] === 'function') { + return this[units](value); + } } - else { - return; + return this; + } + + function zeroFill(number, targetLength, forceSign) { + var output = '' + Math.abs(number), + sign = number >= 0; + + while (output.length < targetLength) { + output = '0' + output; } + return (sign ? (forceSign ? '+' : '') : '-') + output; + } - moment[field] = function (format, index) { - var i, getter, - method = moment._locale[field], - results = []; + var formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g; - if (typeof format === 'number') { - index = format; - format = undefined; - } + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + + var formatFunctions = {}; + + var formatTokenFunctions = {}; - getter = function (i) { - var m = moment().utc().set(setter, i); - return method.call(moment._locale, m, format || ''); + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken (token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } - if (index != null) { - return getter(index); - } - else { - for (i = 0; i < count; i++) { - results.push(getter(i)); - } - return results; - } - }; + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); } - function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, - value = 0; + function makeFormatFunction(format) { + var array = format.match(formattingTokens), i, length; - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - if (coercedNumber >= 0) { - value = Math.floor(coercedNumber); + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; } else { - value = Math.ceil(coercedNumber); + array[i] = removeFormattingTokens(array[i]); } } - return value; + return function (mom) { + var output = ''; + for (i = 0; i < length; i++) { + output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; + } + return output; + }; } - function daysInMonth(year, month) { - return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + + if (!formatFunctions[format]) { + formatFunctions[format] = makeFormatFunction(format); + } + + return formatFunctions[format](m); } - function weeksInYear(year, dow, doy) { - return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week; + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; } - function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; + var match1 = /\d/; // 0 - 9 + var match2 = /\d\d/; // 00 - 99 + var match3 = /\d{3}/; // 000 - 999 + var match4 = /\d{4}/; // 0000 - 9999 + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + var match1to2 = /\d\d?/; // 0 - 99 + var match1to3 = /\d{1,3}/; // 0 - 999 + var match1to4 = /\d{1,4}/; // 0 - 9999 + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + + // any word (or two) characters or numbers including two/three word month in arabic. + var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; + + var regexes = {}; + + function addRegexToken (token, regex, strictRegex) { + regexes[token] = typeof regex === 'function' ? regex : function (isStrict) { + return (isStrict && strictRegex) ? strictRegex : regex; + }; } - function isLeapYear(year) { - return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + function getParseRegexForToken (token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); } - function checkOverflow(m) { - var overflow; - if (m._a && m._pf.overflow === -2) { - overflow = - m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH : - m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE : - m._a[HOUR] < 0 || m._a[HOUR] > 24 || - (m._a[HOUR] === 24 && (m._a[MINUTE] !== 0 || - m._a[SECOND] !== 0 || - m._a[MILLISECOND] !== 0)) ? HOUR : - m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE : - m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND : - m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND : - -1; + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + }).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } - if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { - overflow = DATE; - } + var tokens = {}; - m._pf.overflow = overflow; + function addParseToken (token, callback) { + var i, func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (typeof callback === 'number') { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; } } - function isValid(m) { - if (m._isValid == null) { - m._isValid = !isNaN(m._d.getTime()) && - m._pf.overflow < 0 && - !m._pf.empty && - !m._pf.invalidMonth && - !m._pf.nullInput && - !m._pf.invalidFormat && - !m._pf.userInvalidated; + function addWeekParseToken (token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } - if (m._strict) { - m._isValid = m._isValid && - m._pf.charsLeftOver === 0 && - m._pf.unusedTokens.length === 0 && - m._pf.bigHour === undefined; - } + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); } - return m._isValid; } - function normalizeLocale(key) { - return key ? key.toLowerCase().replace('_', '-') : key; + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + + function daysInMonth(year, month) { + return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); } - // pick the locale from the array - // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each - // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root - function chooseLocale(names) { - var i = 0, j, next, locale, split; + // FORMATTING - while (i < names.length) { - split = normalizeLocale(names[i]).split('-'); - j = split.length; - next = normalizeLocale(names[i + 1]); - next = next ? next.split('-') : null; - while (j > 0) { - locale = loadLocale(split.slice(0, j).join('-')); - if (locale) { - return locale; - } - if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { - //the next array item is better than a shallower substring of this one - break; - } - j--; - } - i++; - } - return null; - } + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); - function loadLocale(name) { - var oldLocale = null; - if (!locales[name] && hasModule) { - try { - oldLocale = moment.locale(); - require('./locale/' + name); - // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales - moment.locale(oldLocale); - } catch (e) { } - } - return locales[name]; - } + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); - // Return a moment from input, that is local/utc/utcOffset equivalent to - // model. - function makeAs(input, model) { - var res, diff; - if (model._isUTC) { - res = model.clone(); - diff = (moment.isMoment(input) || isDate(input) ? - +input : +moment(input)) - (+res); - // Use low-level api, because this fn is low-level api. - res._d.setTime(+res._d + diff); - moment.updateOffset(res, false); - return res; + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', matchWord); + addRegexToken('MMMM', matchWord); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; } else { - return moment(input).local(); + config._pf.invalidMonth = input; } + }); + + // LOCALES + + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + function localeMonths (m) { + return this._months[m.month()]; } - /************************************ - Locale - ************************************/ + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + function localeMonthsShort (m) { + return this._monthsShort[m.month()]; + } + function localeMonthsParse (monthName, format, strict) { + var i, mom, regex; - extend(Locale.prototype, { + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } - set : function (config) { - var prop, i; - for (i in config) { - prop = config[i]; - if (typeof prop === 'function') { - this[i] = prop; - } else { - this['_' + i] = prop; - } + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = create_utc__createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } - // Lenient ordinal parsing accepts just a number in addition to - // number + (possibly) stuff coming from _ordinalParseLenient. - this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); - }, - - _months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - months : function (m) { - return this._months[m.month()]; - }, + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } - _monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - monthsShort : function (m) { - return this._monthsShort[m.month()]; - }, + // MOMENTS - monthsParse : function (monthName, format, strict) { - var i, mom, regex; + function setMonth (mom, value) { + var dayOfMonth; - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; + // TODO: Move this out of here! + if (typeof value === 'string') { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (typeof value !== 'number') { + return mom; } + } - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = moment.utc([2000, i]); - if (strict && !this._longMonthsParse[i]) { - this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); - this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); - } - if (!strict && !this._monthsParse[i]) { - regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); - this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { - return i; - } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { - return i; - } else if (!strict && this._monthsParse[i].test(monthName)) { - return i; - } - } - }, + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } - _weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdays : function (m) { - return this._weekdays[m.day()]; - }, + function getSetMonth (value) { + if (value != null) { + setMonth(this, value); + utils_hooks__hooks.updateOffset(this, true); + return this; + } else { + return get_set__get(this, 'Month'); + } + } - _weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysShort : function (m) { - return this._weekdaysShort[m.day()]; - }, + function getDaysInMonth () { + return daysInMonth(this.year(), this.month()); + } - _weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - weekdaysMin : function (m) { - return this._weekdaysMin[m.day()]; - }, + function checkOverflow (m) { + var overflow; + var a = m._a; - weekdaysParse : function (weekdayName) { - var i, mom, regex; + if (a && m._pf.overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; - if (!this._weekdaysParse) { - this._weekdaysParse = []; + if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; } - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - if (!this._weekdaysParse[i]) { - mom = moment([2000, 1]).day(i); - regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); - this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (this._weekdaysParse[i].test(weekdayName)) { - return i; - } - } - }, + m._pf.overflow = overflow; + } - _longDateFormat : { - LTS : 'h:mm:ss A', - LT : 'h:mm A', - L : 'MM/DD/YYYY', - LL : 'MMMM D, YYYY', - LLL : 'MMMM D, YYYY LT', - LLLL : 'dddd, MMMM D, YYYY LT' - }, - longDateFormat : function (key) { - var output = this._longDateFormat[key]; - if (!output && this._longDateFormat[key.toUpperCase()]) { - output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) { - return val.slice(1); - }); - this._longDateFormat[key] = output; - } - return output; - }, + return m; + } - isPM : function (input) { - // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays - // Using charAt should be more compatible. - return ((input + '').toLowerCase().charAt(0) === 'p'); - }, + function warn(msg) { + if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } - _meridiemParse : /[ap]\.?m?\.?/i, - meridiem : function (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (firstTime) { + warn(msg); + firstTime = false; } - }, + return fn.apply(this, arguments); + }, fn); + } + var deprecations = {}; - _calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - calendar : function (key, mom, now) { - var output = this._calendar[key]; - return typeof output === 'function' ? output.apply(mom, [now]) : output; - }, + function deprecateSimple(name, msg) { + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } - _relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, + utils_hooks__hooks.suppressDeprecationWarnings = false; - relativeTime : function (number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return (typeof output === 'function') ? - output(number, withoutSuffix, string, isFuture) : - output.replace(/%d/i, number); - }, + var from_string__isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; - pastFuture : function (diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); - }, + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], + ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], + ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], + ['GGGG-[W]WW', /\d{4}-W\d{2}/], + ['YYYY-DDD', /\d{4}-\d{3}/] + ]; - ordinal : function (number) { - return this._ordinal.replace('%d', number); - }, - _ordinal : '%d', - _ordinalParse : /\d{1,2}/, + // iso time formats and regexes + var isoTimes = [ + ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], + ['HH:mm', /(T| )\d\d:\d\d/], + ['HH', /(T| )\d\d/] + ]; - preparse : function (string) { - return string; - }, + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; - postformat : function (string) { - return string; - }, + // date from iso format + function configFromISO(config) { + var i, l, + string = config._i, + match = from_string__isoRegex.exec(string); - week : function (mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; - }, + if (match) { + config._pf.iso = true; + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(string)) { + // match[5] should be 'T' or undefined + config._f = isoDates[i][0] + (match[6] || ' '); + break; + } + } + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(string)) { + config._f += isoTimes[i][0]; + break; + } + } + if (string.match(matchOffset)) { + config._f += 'Z'; + } + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } - _week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 1st is the first week of the year. - }, + // date from iso format or fallback + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); - firstDayOfWeek : function () { - return this._week.dow; - }, + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } - firstDayOfYear : function () { - return this._week.doy; - }, + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + utils_hooks__hooks.createFromInputFallback(config); + } + } - _invalidDate: 'Invalid date', - invalidDate: function () { - return this._invalidDate; + utils_hooks__hooks.createFromInputFallback = deprecate( + 'moment construction falls back to js Date. This is ' + + 'discouraged and will be removed in upcoming major ' + + 'release. Please refer to ' + + 'https://github.com/moment/moment/issues/1407 for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } - }); + ); - /************************************ - Formatting - ************************************/ + function createDate (y, m, d, h, M, s, ms) { + //can't just apply() to create a date: + //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply + var date = new Date(y, m, d, h, M, s, ms); + //the date constructor doesn't accept years < 1970 + if (y < 1970) { + date.setFullYear(y); + } + return date; + } - function removeFormattingTokens(input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|\]$/g, ''); + function createUTCDate (y) { + var date = new Date(Date.UTC.apply(null, arguments)); + if (y < 1970) { + date.setUTCFullYear(y); } - return input.replace(/\\/g, ''); + return date; } - function makeFormatFunction(format) { - var array = format.match(formattingTokens), i, length; + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); - for (i = 0, length = array.length; i < length; i++) { - if (formatTokenFunctions[array[i]]) { - array[i] = formatTokenFunctions[array[i]]; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); - return function (mom) { - var output = ''; - for (i = 0; i < length; i++) { - output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; - } - return output; - }; - } + // ALIASES - // format date using native date object - function formatMoment(m, format) { - if (!m.isValid()) { - return m.localeData().invalidDate(); - } + addUnitAlias('year', 'y'); - format = expandFormat(format, m.localeData()); + // PARSING - if (!formatFunctions[format]) { - formatFunctions[format] = makeFormatFunction(format); - } + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); - return formatFunctions[format](m); + addParseToken(['YYYY', 'YYYYY', 'YYYYYY'], YEAR); + addParseToken('YY', function (input, array) { + array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; } - function expandFormat(format, locale) { - var i = 5; + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } - function replaceLongDateFormatTokens(input) { - return locale.longDateFormat(input) || input; - } + // HOOKS - localFormattingTokens.lastIndex = 0; - while (i >= 0 && localFormattingTokens.test(format)) { - format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); - localFormattingTokens.lastIndex = 0; - i -= 1; - } + utils_hooks__hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; - return format; - } + // MOMENTS + var getSetYear = makeGetSet('FullYear', false); - /************************************ - Parsing - ************************************/ - - - // get the regex to find the next token - function getParseRegexForToken(token, config) { - var a, strict = config._strict; - switch (token) { - case 'Q': - return parseTokenOneDigit; - case 'DDDD': - return parseTokenThreeDigits; - case 'YYYY': - case 'GGGG': - case 'gggg': - return strict ? parseTokenFourDigits : parseTokenOneToFourDigits; - case 'Y': - case 'G': - case 'g': - return parseTokenSignedNumber; - case 'YYYYYY': - case 'YYYYY': - case 'GGGGG': - case 'ggggg': - return strict ? parseTokenSixDigits : parseTokenOneToSixDigits; - case 'S': - if (strict) { - return parseTokenOneDigit; - } - /* falls through */ - case 'SS': - if (strict) { - return parseTokenTwoDigits; - } - /* falls through */ - case 'SSS': - if (strict) { - return parseTokenThreeDigits; - } - /* falls through */ - case 'DDD': - return parseTokenOneToThreeDigits; - case 'MMM': - case 'MMMM': - case 'dd': - case 'ddd': - case 'dddd': - return parseTokenWord; - case 'a': - case 'A': - return config._locale._meridiemParse; - case 'x': - return parseTokenOffsetMs; - case 'X': - return parseTokenTimestampMs; - case 'Z': - case 'ZZ': - return parseTokenTimezone; - case 'T': - return parseTokenT; - case 'SSSS': - return parseTokenDigits; - case 'MM': - case 'DD': - case 'YY': - case 'GG': - case 'gg': - case 'HH': - case 'hh': - case 'mm': - case 'ss': - case 'ww': - case 'WW': - return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits; - case 'M': - case 'D': - case 'd': - case 'H': - case 'h': - case 'm': - case 's': - case 'w': - case 'W': - case 'e': - case 'E': - return parseTokenOneOrTwoDigits; - case 'Do': - return strict ? config._locale._ordinalParse : config._locale._ordinalParseLenient; - default : - a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i')); - return a; - } + function getIsLeapYear () { + return isLeapYear(this.year()); } - function utcOffsetFromString(string) { - string = string || ''; - var possibleTzMatches = (string.match(parseTokenTimezone) || []), - tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [], - parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0], - minutes = +(parts[1] * 60) + toInt(parts[2]); + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); - return parts[0] === '+' ? minutes : -minutes; - } + // ALIASES - // function to convert string input to date - function addTimeToArrayFromToken(token, input, config) { - var a, datePartArray = config._a; + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); - switch (token) { - // QUARTER - case 'Q': - if (input != null) { - datePartArray[MONTH] = (toInt(input) - 1) * 3; - } - break; - // MONTH - case 'M' : // fall through to MM - case 'MM' : - if (input != null) { - datePartArray[MONTH] = toInt(input) - 1; - } - break; - case 'MMM' : // fall through to MMMM - case 'MMMM' : - a = config._locale.monthsParse(input, token, config._strict); - // if we didn't find a month name, mark the date as invalid. - if (a != null) { - datePartArray[MONTH] = a; - } else { - config._pf.invalidMonth = input; - } - break; - // DAY OF MONTH - case 'D' : // fall through to DD - case 'DD' : - if (input != null) { - datePartArray[DATE] = toInt(input); - } - break; - case 'Do' : - if (input != null) { - datePartArray[DATE] = toInt(parseInt( - input.match(/\d{1,2}/)[0], 10)); - } - break; - // DAY OF YEAR - case 'DDD' : // fall through to DDDD - case 'DDDD' : - if (input != null) { - config._dayOfYear = toInt(input); - } + // PARSING - break; - // YEAR - case 'YY' : - datePartArray[YEAR] = moment.parseTwoDigitYear(input); - break; - case 'YYYY' : - case 'YYYYY' : - case 'YYYYYY' : - datePartArray[YEAR] = toInt(input); - break; - // AM / PM - case 'a' : // fall through to A - case 'A' : - config._meridiem = input; - // config._isPm = config._locale.isPM(input); - break; - // HOUR - case 'h' : // fall through to hh - case 'hh' : - config._pf.bigHour = true; - /* falls through */ - case 'H' : // fall through to HH - case 'HH' : - datePartArray[HOUR] = toInt(input); - break; - // MINUTE - case 'm' : // fall through to mm - case 'mm' : - datePartArray[MINUTE] = toInt(input); - break; - // SECOND - case 's' : // fall through to ss - case 'ss' : - datePartArray[SECOND] = toInt(input); - break; - // MILLISECOND - case 'S' : - case 'SS' : - case 'SSS' : - case 'SSSS' : - datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000); - break; - // UNIX OFFSET (MILLISECONDS) - case 'x': - config._d = new Date(toInt(input)); - break; - // UNIX TIMESTAMP WITH MS - case 'X': - config._d = new Date(parseFloat(input) * 1000); - break; - // TIMEZONE - case 'Z' : // fall through to ZZ - case 'ZZ' : - config._useUTC = true; - config._tzm = utcOffsetFromString(input); - break; - // WEEKDAY - human - case 'dd': - case 'ddd': - case 'dddd': - a = config._locale.weekdaysParse(input); - // if we didn't get a weekday name, mark the date as invalid - if (a != null) { - config._w = config._w || {}; - config._w['d'] = a; - } else { - config._pf.invalidWeekday = input; - } - break; - // WEEK, WEEK DAY - numeric - case 'w': - case 'ww': - case 'W': - case 'WW': - case 'd': - case 'e': - case 'E': - token = token.substr(0, 1); - /* falls through */ - case 'gggg': - case 'GGGG': - case 'GGGGG': - token = token.substr(0, 2); - if (input) { - config._w = config._w || {}; - config._w[token] = toInt(input); - } - break; - case 'gg': - case 'GG': - config._w = config._w || {}; - config._w[token] = moment.parseTwoDigitYear(input); + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // firstDayOfWeek 0 = sun, 6 = sat + // the day of the week that starts the week + // (usually sunday or monday) + // firstDayOfWeekOfYear 0 = sun, 6 = sat + // the first week is the week that contains the first + // of this day of the week + // (eg. ISO weeks use thursday (4)) + function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { + var end = firstDayOfWeekOfYear - firstDayOfWeek, + daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), + adjustedMoment; + + + if (daysToDayOfWeek > end) { + daysToDayOfWeek -= 7; } + + if (daysToDayOfWeek < end - 7) { + daysToDayOfWeek += 7; + } + + adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd'); + return { + week: Math.ceil(adjustedMoment.dayOfYear() / 7), + year: adjustedMoment.year() + }; } - function dayOfYearFromWeekInfo(config) { - var w, weekYear, week, weekday, dow, doy, temp; + // LOCALES - w = config._w; - if (w.GG != null || w.W != null || w.E != null) { - dow = 1; - doy = 4; + function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } - // TODO: We need to take the current isoWeekYear, but that depends on - // how we interpret now (local, utc, fixed offset). So create - // a now version of current config (take local/utc/offset flags, and - // create now). - weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year); - week = dfl(w.W, 1); - weekday = dfl(w.E, 1); - } else { - dow = config._locale._week.dow; - doy = config._locale._week.doy; + var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 1st is the first week of the year. + }; - weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year); - week = dfl(w.w, 1); + function localeFirstDayOfWeek () { + return this._week.dow; + } - if (w.d != null) { - // weekday -- low day numbers are considered next week - weekday = w.d; - if (weekday < dow) { - ++week; - } - } else if (w.e != null) { - // local weekday -- counting starts from begining of week - weekday = w.e + dow; - } else { - // default to begining of week - weekday = dow; - } + function localeFirstDayOfYear () { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { + var d = createUTCDate(year, 0, 1).getUTCDay(); + var daysToAdd; + var dayOfYear; + + d = d === 0 ? 7 : d; + weekday = weekday != null ? weekday : firstDayOfWeek; + daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0); + dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1; + + return { + year : dayOfYear > 0 ? year : year - 1, + dayOfYear : dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear + }; + } + + // MOMENTS + + function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + } + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; } - temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); + if (b != null) { + return b; + } + return c; + } - config._a[YEAR] = temp.year; - config._dayOfYear = temp.dayOfYear; + function currentDateArray(config) { + var now = new Date(); + if (config._useUTC) { + return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()]; + } + return [now.getFullYear(), now.getMonth(), now.getDate()]; } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] - function dateFromConfig(config) { + function configFromArray (config) { var i, date, input = [], currentDate, yearToUse; if (config._d) { @@ -23208,13 +22823,13 @@ process.chdir = function (dir) { //if the day of the year is set, figure out what it is if (config._dayOfYear) { - yearToUse = dfl(config._a[YEAR], currentDate[YEAR]); + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse)) { config._pf._overflowDayOfYear = true; } - date = makeUTCDate(yearToUse, 0, config._dayOfYear); + date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } @@ -23242,7 +22857,7 @@ process.chdir = function (dir) { config._a[HOUR] = 0; } - config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input); + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { @@ -23254,44 +22869,55 @@ process.chdir = function (dir) { } } - function dateFromObject(config) { - var normalizedInput; + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp; - if (config._d) { - return; - } + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; - normalizedInput = normalizeObjectUnits(config._i); - config._a = [ - normalizedInput.year, - normalizedInput.month, - normalizedInput.day || normalizedInput.date, - normalizedInput.hour, - normalizedInput.minute, - normalizedInput.second, - normalizedInput.millisecond - ]; + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; - dateFromConfig(config); - } + weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); + week = defaults(w.w, 1); - function currentDateArray(config) { - var now = new Date(); - if (config._useUTC) { - return [ - now.getUTCFullYear(), - now.getUTCMonth(), - now.getUTCDate() - ]; - } else { - return [now.getFullYear(), now.getMonth(), now.getDate()]; + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < dow) { + ++week; + } + } else if (w.e != null) { + // local weekday -- counting starts from begining of week + weekday = w.e + dow; + } else { + // default to begining of week + weekday = dow; + } } + temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); + + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; } + utils_hooks__hooks.ISO_8601 = function () {}; + // date from string and format string - function makeDateFromStringAndFormat(config) { - if (config._f === moment.ISO_8601) { - parseISO(config); + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === utils_hooks__hooks.ISO_8601) { + configFromISO(config); return; } @@ -23343,25 +22969,39 @@ process.chdir = function (dir) { config._pf.bigHour = undefined; } // handle meridiem - config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], - config._meridiem); - dateFromConfig(config); + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); checkOverflow(config); } - function unescapeFormat(s) { - return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { - return p1 || p2 || p3 || p4; - }); - } - // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript - function regexpEscape(s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + function meridiemFixWrap (locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } } - // date from string and array of format strings - function makeDateFromStringAndArray(config) { + function configFromStringAndArray(config) { var tempConfig, bestMoment, @@ -23383,9 +23023,9 @@ process.chdir = function (dir) { } tempConfig._pf = defaultParsingFlags(); tempConfig._f = config._f[i]; - makeDateFromStringAndFormat(tempConfig); + configFromStringAndFormat(tempConfig); - if (!isValid(tempConfig)) { + if (!valid__isValid(tempConfig)) { continue; } @@ -23406,1411 +23046,1813 @@ process.chdir = function (dir) { extend(config, bestMoment || tempConfig); } - // date from iso format - function parseISO(config) { - var i, l, - string = config._i, - match = isoRegex.exec(string); - - if (match) { - config._pf.iso = true; - for (i = 0, l = isoDates.length; i < l; i++) { - if (isoDates[i][1].exec(string)) { - // match[5] should be 'T' or undefined - config._f = isoDates[i][0] + (match[6] || ' '); - break; - } - } - for (i = 0, l = isoTimes.length; i < l; i++) { - if (isoTimes[i][1].exec(string)) { - config._f += isoTimes[i][0]; - break; - } - } - if (string.match(parseTokenTimezone)) { - config._f += 'Z'; - } - makeDateFromStringAndFormat(config); - } else { - config._isValid = false; + function configFromObject(config) { + if (config._d) { + return; } + + var i = normalizeObjectUnits(config._i); + config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond]; + + configFromArray(config); } - // date from iso format or fallback - function makeDateFromString(config) { - parseISO(config); - if (config._isValid === false) { - delete config._isValid; - moment.createFromInputFallback(config); + function createFromConfig (config) { + var input = config._i, + format = config._f, + res; + + config._locale = config._locale || locale_locales__getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return valid__createInvalid({nullInput: true}); } - } - function map(arr, fn) { - var res = [], i; - for (i = 0; i < arr.length; ++i) { - res.push(fn(arr[i], i)); + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); } + + res = new Moment(checkOverflow(config)); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + return res; } - function makeDateFromInput(config) { - var input = config._i, matched; + function configFromInput(config) { + var input = config._i; if (input === undefined) { config._d = new Date(); } else if (isDate(input)) { config._d = new Date(+input); - } else if ((matched = aspNetJsonRegex.exec(input)) !== null) { - config._d = new Date(+matched[1]); } else if (typeof input === 'string') { - makeDateFromString(config); + configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); - dateFromConfig(config); + configFromArray(config); } else if (typeof(input) === 'object') { - dateFromObject(config); + configFromObject(config); } else if (typeof(input) === 'number') { // from milliseconds config._d = new Date(input); } else { - moment.createFromInputFallback(config); + utils_hooks__hooks.createFromInputFallback(config); } } - function makeDate(y, m, d, h, M, s, ms) { - //can't just apply() to create a date: - //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply - var date = new Date(y, m, d, h, M, s, ms); + function createLocalOrUTC (input, format, locale, strict, isUTC) { + var c = {}; - //the date constructor doesn't accept years < 1970 - if (y < 1970) { - date.setFullYear(y); - } - return date; + if (typeof(locale) === 'boolean') { + strict = locale; + locale = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + c._pf = defaultParsingFlags(); + + return createFromConfig(c); } - function makeUTCDate(y) { - var date = new Date(Date.UTC.apply(null, arguments)); - if (y < 1970) { - date.setUTCFullYear(y); - } - return date; + function local__createLocal (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); } - function parseWeekday(input, locale) { - if (typeof input === 'string') { - if (!isNaN(input)) { - input = parseInt(input, 10); - } - else { - input = locale.weekdaysParse(input); - if (typeof input !== 'number') { - return null; - } + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', + function () { + var other = local__createLocal.apply(null, arguments); + return other < this ? this : other; + } + ); + + var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', + function () { + var other = local__createLocal.apply(null, arguments); + return other > this ? this : other; + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return local__createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (moments[i][fn](res)) { + res = moments[i]; } } - return input; + return res; } - /************************************ - Relative Time - ************************************/ + // TODO: Use [].sort instead? + function min () { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } - // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize - function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { - return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + function max () { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); } - function relativeTime(posNegDuration, withoutSuffix, locale) { - var duration = moment.duration(posNegDuration).abs(), - seconds = round(duration.as('s')), - minutes = round(duration.as('m')), - hours = round(duration.as('h')), - days = round(duration.as('d')), - months = round(duration.as('M')), - years = round(duration.as('y')), + function Duration (duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; - args = seconds < relativeTimeThresholds.s && ['s', seconds] || - minutes === 1 && ['m'] || - minutes < relativeTimeThresholds.m && ['mm', minutes] || - hours === 1 && ['h'] || - hours < relativeTimeThresholds.h && ['hh', hours] || - days === 1 && ['d'] || - days < relativeTimeThresholds.d && ['dd', days] || - months === 1 && ['M'] || - months < relativeTimeThresholds.M && ['MM', months] || - years === 1 && ['y'] || ['yy', years]; + // representation for dateAddRemove + this._milliseconds = +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 36e5; // 1000 * 60 * 60 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + + weeks * 7; + // It is impossible translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + + quarters * 3 + + years * 12; + + this._data = {}; + + this._locale = locale_locales__getLocale(); - args[2] = withoutSuffix; - args[3] = +posNegDuration > 0; - args[4] = locale; - return substituteTimeAgo.apply({}, args); + this._bubble(); } + function isDuration (obj) { + return obj instanceof Duration; + } - /************************************ - Week of Year - ************************************/ + function offset (token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); + }); + } + offset('Z', ':'); + offset('ZZ', ''); - // firstDayOfWeek 0 = sun, 6 = sat - // the day of the week that starts the week - // (usually sunday or monday) - // firstDayOfWeekOfYear 0 = sun, 6 = sat - // the first week is the week that contains the first - // of this day of the week - // (eg. ISO weeks use thursday (4)) - function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { - var end = firstDayOfWeekOfYear - firstDayOfWeek, - daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), - adjustedMoment; + // PARSING + addRegexToken('Z', matchOffset); + addRegexToken('ZZ', matchOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(input); + }); - if (daysToDayOfWeek > end) { - daysToDayOfWeek -= 7; - } + // HELPERS - if (daysToDayOfWeek < end - 7) { - daysToDayOfWeek += 7; + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(string) { + var matches = ((string || '').match(matchOffset) || []); + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res); + // Use low-level api, because this fn is low-level api. + res._d.setTime(+res._d + diff); + utils_hooks__hooks.updateOffset(res, false); + return res; + } else { + return local__createLocal(input).local(); } + return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local(); + } - adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd'); - return { - week: Math.ceil(adjustedMoment.dayOfYear() / 7), - year: adjustedMoment.year() - }; + function getDateOffset (m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; } - //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday - function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { - var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear; + // HOOKS - d = d === 0 ? 7 : d; - weekday = weekday != null ? weekday : firstDayOfWeek; - daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0); - dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1; + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + utils_hooks__hooks.updateOffset = function () {}; - return { - year: dayOfYear > 0 ? year : year - 1, - dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear - }; + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset (input, keepLocalTime) { + var offset = this._offset || 0, + localAdjust; + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(input); + } + if (Math.abs(input) < 16) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + utils_hooks__hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } } - /************************************ - Top Level Functions - ************************************/ + function getSetZone (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } - function makeMoment(config) { - var input = config._i, - format = config._f, - res; + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC (keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } - config._locale = config._locale || moment.localeData(config._l); + function setOffsetToLocal (keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; - if (input === null || (format === undefined && input === '')) { - return moment.invalid({nullInput: true}); + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } } + return this; + } - if (typeof input === 'string') { - config._i = input = config._locale.preparse(input); + function setOffsetToParsedOffset () { + if (this._tzm) { + this.utcOffset(this._tzm); + } else if (typeof this._i === 'string') { + this.utcOffset(offsetFromString(this._i)); } + return this; + } - if (moment.isMoment(input)) { - return new Moment(input, true); - } else if (format) { - if (isArray(format)) { - makeDateFromStringAndArray(config); + function hasAlignedHourOffset (input) { + if (!input) { + input = 0; + } + else { + input = local__createLocal(input).utcOffset(); + } + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted () { + if (this._a) { + var other = this._isUTC ? create_utc__createUTC(this._a) : local__createLocal(this._a); + return this.isValid() && compareArrays(this._a, other.toArray()) > 0; + } + + return false; + } + + function isLocal () { + return !this._isUTC; + } + + function isUtcOffset () { + return this._isUTC; + } + + function isUtc () { + return this._isUTC && this._offset === 0; + } + + var aspNetRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/; + + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; + + function create__createDuration (input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms : input._milliseconds, + d : input._days, + M : input._months + }; + } else if (typeof input === 'number') { + duration = {}; + if (key) { + duration[key] = input; } else { - makeDateFromStringAndFormat(config); + duration.milliseconds = input; } - } else { - makeDateFromInput(config); + } else if (!!(match = aspNetRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : 0, + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(match[MILLISECOND]) * sign + }; + } else if (!!(match = create__isoRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : parseIso(match[2], sign), + M : parseIso(match[3], sign), + d : parseIso(match[4], sign), + h : parseIso(match[5], sign), + m : parseIso(match[6], sign), + s : parseIso(match[7], sign), + w : parseIso(match[8], sign) + }; + } else if (duration == null) {// checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; } - res = new Moment(config); - if (res._nextDay) { - // Adding is smart enough around DST - res.add(1, 'd'); - res._nextDay = undefined; + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; } - return res; + return ret; } - moment = function (input, format, locale, strict) { - var c; + create__createDuration.fn = Duration.prototype; - if (typeof(locale) === 'boolean') { - strict = locale; - locale = undefined; + function parseIso (inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {milliseconds: 0, months: 0}; + + res.months = other.month() - base.month() + + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; } - // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - c = {}; - c._isAMomentObject = true; - c._i = input; - c._f = format; - c._l = locale; - c._strict = strict; - c._isUTC = false; - c._pf = defaultParsingFlags(); - return makeMoment(c); - }; + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); - moment.suppressDeprecationWarnings = false; + return res; + } - moment.createFromInputFallback = deprecate( - 'moment construction falls back to js Date. This is ' + - 'discouraged and will be removed in upcoming major ' + - 'release. Please refer to ' + - 'https://github.com/moment/moment/issues/1407 for more info.', - function (config) { - config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + function momentsDifference(base, other) { + var res; + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; } - ); - // Pick a moment m from moments so that m[fn](other) is true for all - // other. This relies on the function fn to be transitive. - // - // moments should either be an array of moment objects or an array, whose - // first element is an array of moment objects. - function pickBy(fn, moments) { - var res, i; - if (moments.length === 1 && isArray(moments[0])) { - moments = moments[0]; + return res; + } + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); + tmp = val; val = period; period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = create__createDuration(val, period); + add_subtract__addSubtract(this, dur, direction); + return this; + }; + } + + function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = duration._days, + months = duration._months; + updateOffset = updateOffset == null ? true : updateOffset; + + if (milliseconds) { + mom._d.setTime(+mom._d + milliseconds * isAdding); } - if (!moments.length) { - return moment(); + if (days) { + get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); } - res = moments[0]; - for (i = 1; i < moments.length; ++i) { - if (moments[i][fn](res)) { - res = moments[i]; - } + if (months) { + setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); + } + if (updateOffset) { + utils_hooks__hooks.updateOffset(mom, days || months); + } + } + + var add_subtract__add = createAdder(1, 'add'); + var add_subtract__subtract = createAdder(-1, 'subtract'); + + function moment_calendar__calendar (time) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || local__createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + diff = this.diff(sod, 'days', true), + format = diff < -6 ? 'sameElse' : + diff < -1 ? 'lastWeek' : + diff < 0 ? 'lastDay' : + diff < 1 ? 'sameDay' : + diff < 2 ? 'nextDay' : + diff < 7 ? 'nextWeek' : 'sameElse'; + return this.format(this.localeData().calendar(format, this, local__createLocal(now))); + } + + function clone () { + return new Moment(this); + } + + function isAfter (input, units) { + var inputMs; + units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); + if (units === 'millisecond') { + input = isMoment(input) ? input : local__createLocal(input); + return +this > +input; + } else { + inputMs = isMoment(input) ? +input : +local__createLocal(input); + return inputMs < +this.clone().startOf(units); + } + } + + function isBefore (input, units) { + var inputMs; + units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); + if (units === 'millisecond') { + input = isMoment(input) ? input : local__createLocal(input); + return +this < +input; + } else { + inputMs = isMoment(input) ? +input : +local__createLocal(input); + return +this.clone().endOf(units) < inputMs; + } + } + + function isBetween (from, to, units) { + return this.isAfter(from, units) && this.isBefore(to, units); + } + + function isSame (input, units) { + var inputMs; + units = normalizeUnits(units || 'millisecond'); + if (units === 'millisecond') { + input = isMoment(input) ? input : local__createLocal(input); + return +this === +input; + } else { + inputMs = +local__createLocal(input); + return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); } - return res; } - moment.min = function () { - var args = [].slice.call(arguments, 0); + function absFloor (number) { + if (number < 0) { + return Math.ceil(number); + } else { + return Math.floor(number); + } + } - return pickBy('isBefore', args); - }; + function diff (input, units, asFloat) { + var that = cloneWithOffset(input, this), + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4, + delta, output; - moment.max = function () { - var args = [].slice.call(arguments, 0); + units = normalizeUnits(units); - return pickBy('isAfter', args); - }; + if (units === 'year' || units === 'month' || units === 'quarter') { + output = monthDiff(this, that); + if (units === 'quarter') { + output = output / 3; + } else if (units === 'year') { + output = output / 12; + } + } else { + delta = this - that; + output = units === 'second' ? delta / 1e3 : // 1000 + units === 'minute' ? delta / 6e4 : // 1000 * 60 + units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60 + units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst + units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst + delta; + } + return asFloat ? output : absFloor(output); + } - // creating with utc - moment.utc = function (input, format, locale, strict) { - var c; + function monthDiff (a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; - if (typeof(locale) === 'boolean') { - strict = locale; - locale = undefined; + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); } - // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - c = {}; - c._isAMomentObject = true; - c._useUTC = true; - c._isUTC = true; - c._l = locale; - c._i = input; - c._f = format; - c._strict = strict; - c._pf = defaultParsingFlags(); - return makeMoment(c).utc(); - }; + return -(wholeMonthDiff + adjust); + } - // creating with unix timestamp (in seconds) - moment.unix = function (input) { - return moment(input * 1000); - }; + utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; - // duration - moment.duration = function (input, key) { - var duration = input, - // matching against regexp is expensive, do it on demand - match = null, - sign, - ret, - parseIso, - diffRes; + function toString () { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } - if (moment.isDuration(input)) { - duration = { - ms: input._milliseconds, - d: input._days, - M: input._months - }; - } else if (typeof input === 'number') { - duration = {}; - if (key) { - duration[key] = input; + function moment_format__toISOString () { + var m = this.clone().utc(); + if (0 < m.year() && m.year() <= 9999) { + if ('function' === typeof Date.prototype.toISOString) { + // native implementation is ~50x faster, use it when we can + return this.toDate().toISOString(); } else { - duration.milliseconds = input; + return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } - } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - duration = { - y: 0, - d: toInt(match[DATE]) * sign, - h: toInt(match[HOUR]) * sign, - m: toInt(match[MINUTE]) * sign, - s: toInt(match[SECOND]) * sign, - ms: toInt(match[MILLISECOND]) * sign - }; - } else if (!!(match = isoDurationRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - parseIso = function (inp) { - // We'd normally use ~~inp for this, but unfortunately it also - // converts floats to ints. - // inp may be undefined, so careful calling replace on it. - var res = inp && parseFloat(inp.replace(',', '.')); - // apply sign while we're at it - return (isNaN(res) ? 0 : res) * sign; - }; - duration = { - y: parseIso(match[2]), - M: parseIso(match[3]), - d: parseIso(match[4]), - h: parseIso(match[5]), - m: parseIso(match[6]), - s: parseIso(match[7]), - w: parseIso(match[8]) - }; - } else if (duration == null) {// checks for null or undefined - duration = {}; - } else if (typeof duration === 'object' && - ('from' in duration || 'to' in duration)) { - diffRes = momentsDifference(moment(duration.from), moment(duration.to)); - - duration = {}; - duration.ms = diffRes.milliseconds; - duration.M = diffRes.months; + } else { + return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } + } - ret = new Duration(duration); + function format (inputString) { + var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat); + return this.localeData().postformat(output); + } - if (moment.isDuration(input) && hasOwnProp(input, '_locale')) { - ret._locale = input._locale; - } + function from (time, withoutSuffix) { + return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } - return ret; - }; + function fromNow (withoutSuffix) { + return this.from(local__createLocal(), withoutSuffix); + } - // version number - moment.version = VERSION; + function locale (key) { + var newLocaleData; - // default format - moment.defaultFormat = isoFormat; + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = locale_locales__getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } - // constant that refers to the ISO standard - moment.ISO_8601 = function () {}; + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); - // Plugins that add properties should also add the key here (null value), - // so we can properly clone ourselves. - moment.momentProperties = momentProperties; + function localeData () { + return this._locale; + } - // This function will be called whenever a moment is mutated. - // It is intended to keep the offset in sync with the timezone. - moment.updateOffset = function () {}; + function startOf (units) { + units = normalizeUnits(units); + // the following switch intentionally omits break keywords + // to utilize falling through the cases. + switch (units) { + case 'year': + this.month(0); + /* falls through */ + case 'quarter': + case 'month': + this.date(1); + /* falls through */ + case 'week': + case 'isoWeek': + case 'day': + this.hours(0); + /* falls through */ + case 'hour': + this.minutes(0); + /* falls through */ + case 'minute': + this.seconds(0); + /* falls through */ + case 'second': + this.milliseconds(0); + } - // This function allows you to set a threshold for relative time strings - moment.relativeTimeThreshold = function (threshold, limit) { - if (relativeTimeThresholds[threshold] === undefined) { - return false; + // weeks are a special case + if (units === 'week') { + this.weekday(0); } - if (limit === undefined) { - return relativeTimeThresholds[threshold]; + if (units === 'isoWeek') { + this.isoWeekday(1); } - relativeTimeThresholds[threshold] = limit; - return true; - }; - moment.lang = deprecate( - 'moment.lang is deprecated. Use moment.locale instead.', - function (key, value) { - return moment.locale(key, value); + // quarters are also special + if (units === 'quarter') { + this.month(Math.floor(this.month() / 3) * 3); } - ); - // This function will load locale and then set the global locale. If - // no arguments are passed in, it will simply return the current global - // locale key. - moment.locale = function (key, values) { - var data; - if (key) { - if (typeof(values) !== 'undefined') { - data = moment.defineLocale(key, values); - } - else { - data = moment.localeData(key); - } + return this; + } - if (data) { - moment.duration._locale = moment._locale = data; - } + function endOf (units) { + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond') { + return this; } + return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); + } - return moment._locale._abbr; - }; + function to_type__valueOf () { + return +this._d - ((this._offset || 0) * 60000); + } - moment.defineLocale = function (name, values) { - if (values !== null) { - values.abbr = name; - if (!locales[name]) { - locales[name] = new Locale(); - } - locales[name].set(values); + function unix () { + return Math.floor(+this / 1000); + } - // backwards compat for now: also set the locale - moment.locale(name); + function toDate () { + return this._offset ? new Date(+this) : this._d; + } - return locales[name]; - } else { - // useful for testing - delete locales[name]; - return null; - } - }; + function toArray () { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } - moment.langData = deprecate( - 'moment.langData is deprecated. Use moment.localeData instead.', - function (key) { - return moment.localeData(key); - } - ); + function moment_valid__isValid () { + return valid__isValid(this); + } - // returns locale data - moment.localeData = function (key) { - var locale; + function parsingFlags () { + return extend({}, this._pf); + } - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; - } + function invalidAt () { + return this._pf.overflow; + } - if (!key) { - return moment._locale; - } + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); - if (!isArray(key)) { - //short-circuit everything else - locale = loadLocale(key); - if (locale) { - return locale; - } - key = [key]; - } + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); - return chooseLocale(key); - }; + function addWeekYearFormatToken (token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } - // compare moment object - moment.isMoment = function (obj) { - return obj instanceof Moment || - (obj != null && hasOwnProp(obj, '_isAMomentObject')); - }; + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); - // for typechecking Duration objects - moment.isDuration = function (obj) { - return obj instanceof Duration; - }; + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = utils_hooks__hooks.parseTwoDigitYear(input); + }); + + // HELPERS - for (i = lists.length - 1; i >= 0; --i) { - makeList(lists[i]); + function weeksInYear(year, dow, doy) { + return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week; } - moment.normalizeUnits = function (units) { - return normalizeUnits(units); - }; + // MOMENTS - moment.invalid = function (flags) { - var m = moment.utc(NaN); - if (flags != null) { - extend(m._pf, flags); - } - else { - m._pf.userInvalidated = true; - } + function getSetWeekYear (input) { + var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; + return input == null ? year : this.add((input - year), 'y'); + } - return m; - }; + function getSetISOWeekYear (input) { + var year = weekOfYear(this, 1, 4).year; + return input == null ? year : this.add((input - year), 'y'); + } - moment.parseZone = function () { - return moment.apply(null, arguments).parseZone(); - }; + function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); + } - moment.parseTwoDigitYear = function (input) { - return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); - }; + function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } - moment.isDate = isDate; + addFormatToken('Q', 0, 0, 'quarter'); - /************************************ - Moment Prototype - ************************************/ + // ALIASES + addUnitAlias('quarter', 'Q'); - extend(moment.fn = Moment.prototype, { + // PARSING - clone : function () { - return moment(this); - }, + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); - valueOf : function () { - return +this._d - ((this._offset || 0) * 60000); - }, + // MOMENTS - unix : function () { - return Math.floor(+this / 1000); - }, + function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } - toString : function () { - return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); - }, + addFormatToken('D', ['DD', 2], 'Do', 'date'); - toDate : function () { - return this._offset ? new Date(+this) : this._d; - }, + // ALIASES - toISOString : function () { - var m = moment(this).utc(); - if (0 < m.year() && m.year() <= 9999) { - if ('function' === typeof Date.prototype.toISOString) { - // native implementation is ~50x faster, use it when we can - return this.toDate().toISOString(); - } else { - return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); - } - } else { - return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); - } - }, + addUnitAlias('date', 'D'); - toArray : function () { - var m = this; - return [ - m.year(), - m.month(), - m.date(), - m.hours(), - m.minutes(), - m.seconds(), - m.milliseconds() - ]; - }, + // PARSING - isValid : function () { - return isValid(this); - }, + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; + }); - isDSTShifted : function () { - if (this._a) { - return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0; - } + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0], 10); + }); - return false; - }, + // MOMENTS - parsingFlags : function () { - return extend({}, this._pf); - }, + var getSetDayOfMonth = makeGetSet('Date', true); - invalidAt: function () { - return this._pf.overflow; - }, + addFormatToken('d', 0, 'do', 'day'); - utc : function (keepLocalTime) { - return this.utcOffset(0, keepLocalTime); - }, + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); - local : function (keepLocalTime) { - if (this._isUTC) { - this.utcOffset(0, keepLocalTime); - this._isUTC = false; + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); - if (keepLocalTime) { - this.subtract(this._dateUtcOffset(), 'm'); - } - } - return this; - }, + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); - format : function (inputString) { - var output = formatMoment(this, inputString || moment.defaultFormat); - return this.localeData().postformat(output); - }, + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); - add : createAdder(1, 'add'), + // ALIASES - subtract : createAdder(-1, 'subtract'), + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); - diff : function (input, units, asFloat) { - var that = makeAs(input, this), - zoneDiff = (that.utcOffset() - this.utcOffset()) * 6e4, - anchor, diff, output, daysAdjust; + // PARSING - units = normalizeUnits(units); + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', matchWord); + addRegexToken('ddd', matchWord); + addRegexToken('dddd', matchWord); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) { + var weekday = config._locale.weekdaysParse(input); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + config._pf.invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS - if (units === 'year' || units === 'month' || units === 'quarter') { - output = monthDiff(this, that); - if (units === 'quarter') { - output = output / 3; - } else if (units === 'year') { - output = output / 12; + function parseWeekday(input, locale) { + if (typeof input === 'string') { + if (!isNaN(input)) { + input = parseInt(input, 10); + } + else { + input = locale.weekdaysParse(input); + if (typeof input !== 'number') { + return null; } - } else { - diff = this - that; - output = units === 'second' ? diff / 1e3 : // 1000 - units === 'minute' ? diff / 6e4 : // 1000 * 60 - units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60 - units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst - units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst - diff; } - return asFloat ? output : absRound(output); - }, + } + return input; + } - from : function (time, withoutSuffix) { - return moment.duration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); - }, + // LOCALES - fromNow : function (withoutSuffix) { - return this.from(moment(), withoutSuffix); - }, + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + function localeWeekdays (m) { + return this._weekdays[m.day()]; + } - calendar : function (time) { - // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're locat/utc/offset - // or not. - var now = time || moment(), - sod = makeAs(now, this).startOf('day'), - diff = this.diff(sod, 'days', true), - format = diff < -6 ? 'sameElse' : - diff < -1 ? 'lastWeek' : - diff < 0 ? 'lastDay' : - diff < 1 ? 'sameDay' : - diff < 2 ? 'nextDay' : - diff < 7 ? 'nextWeek' : 'sameElse'; - return this.format(this.localeData().calendar(format, this, moment(now))); - }, + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + function localeWeekdaysShort (m) { + return this._weekdaysShort[m.day()]; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + function localeWeekdaysMin (m) { + return this._weekdaysMin[m.day()]; + } - isLeapYear : function () { - return isLeapYear(this.year()); - }, + function localeWeekdaysParse (weekdayName) { + var i, mom, regex; - isDST : function () { - return (this.utcOffset() > this.clone().month(0).utcOffset() || - this.utcOffset() > this.clone().month(5).utcOffset()); - }, + if (!this._weekdaysParse) { + this._weekdaysParse = []; + } - day : function (input) { - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, 'd'); - } else { - return day; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + if (!this._weekdaysParse[i]) { + mom = local__createLocal([2000, 1]).day(i); + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } - }, + // test the regex + if (this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } - month : makeAccessor('Month', true), + // MOMENTS - startOf : function (units) { - units = normalizeUnits(units); - // the following switch intentionally omits break keywords - // to utilize falling through the cases. - switch (units) { - case 'year': - this.month(0); - /* falls through */ - case 'quarter': - case 'month': - this.date(1); - /* falls through */ - case 'week': - case 'isoWeek': - case 'day': - this.hours(0); - /* falls through */ - case 'hour': - this.minutes(0); - /* falls through */ - case 'minute': - this.seconds(0); - /* falls through */ - case 'second': - this.milliseconds(0); - /* falls through */ - } + function getSetDayOfWeek (input) { + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } - // weeks are a special case - if (units === 'week') { - this.weekday(0); - } else if (units === 'isoWeek') { - this.isoWeekday(1); - } + function getSetLocaleDayOfWeek (input) { + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } - // quarters are also special - if (units === 'quarter') { - this.month(Math.floor(this.month() / 3) * 3); - } + function getSetISODayOfWeek (input) { + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); + } - return this; - }, + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, function () { + return this.hours() % 12 || 12; + }); - endOf: function (units) { - units = normalizeUnits(units); - if (units === undefined || units === 'millisecond') { - return this; - } - return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); - }, + function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } - isAfter: function (input, units) { - var inputMs; - units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); - if (units === 'millisecond') { - input = moment.isMoment(input) ? input : moment(input); - return +this > +input; - } else { - inputMs = moment.isMoment(input) ? +input : +moment(input); - return inputMs < +this.clone().startOf(units); - } - }, + meridiem('a', true); + meridiem('A', false); - isBefore: function (input, units) { - var inputMs; - units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); - if (units === 'millisecond') { - input = moment.isMoment(input) ? input : moment(input); - return +this < +input; - } else { - inputMs = moment.isMoment(input) ? +input : +moment(input); - return +this.clone().endOf(units) < inputMs; - } - }, + // ALIASES - isBetween: function (from, to, units) { - return this.isAfter(from, units) && this.isBefore(to, units); - }, + addUnitAlias('hour', 'h'); - isSame: function (input, units) { - var inputMs; - units = normalizeUnits(units || 'millisecond'); - if (units === 'millisecond') { - input = moment.isMoment(input) ? input : moment(input); - return +this === +input; - } else { - inputMs = +moment(input); - return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); - } - }, + // PARSING - min: deprecate( - 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', - function (other) { - other = moment.apply(null, arguments); - return other < this ? this : other; - } - ), - - max: deprecate( - 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', - function (other) { - other = moment.apply(null, arguments); - return other > this ? this : other; - } - ), - - zone : deprecate( - 'moment().zone is deprecated, use moment().utcOffset instead. ' + - 'https://github.com/moment/moment/issues/1779', - function (input, keepLocalTime) { - if (input != null) { - if (typeof input !== 'string') { - input = -input; - } + function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; + } - this.utcOffset(input, keepLocalTime); + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); - return this; - } else { - return -this.utcOffset(); - } - } - ), - - // keepLocalTime = true means only change the timezone, without - // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> - // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset - // +0200, so we adjust the time as needed, to be valid. - // - // Keeping the time actually adds/subtracts (one hour) - // from the actual represented time. That is why we call updateOffset - // a second time. In case it wants us to change the offset again - // _changeInProgress == true case, then we have to adjust, because - // there is no such time in the given timezone. - utcOffset : function (input, keepLocalTime) { - var offset = this._offset || 0, - localAdjust; - if (input != null) { - if (typeof input === 'string') { - input = utcOffsetFromString(input); - } - if (Math.abs(input) < 16) { - input = input * 60; - } - if (!this._isUTC && keepLocalTime) { - localAdjust = this._dateUtcOffset(); - } - this._offset = input; - this._isUTC = true; - if (localAdjust != null) { - this.add(localAdjust, 'm'); - } - if (offset !== input) { - if (!keepLocalTime || this._changeInProgress) { - addOrSubtractDurationFromMoment(this, - moment.duration(input - offset, 'm'), 1, false); - } else if (!this._changeInProgress) { - this._changeInProgress = true; - moment.updateOffset(this, true); - this._changeInProgress = null; - } - } + addParseToken(['H', 'HH'], HOUR); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + config._pf.bigHour = true; + }); - return this; - } else { - return this._isUTC ? offset : this._dateUtcOffset(); - } - }, + // LOCALES - isLocal : function () { - return !this._isUTC; - }, + function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); + } - isUtcOffset : function () { - return this._isUTC; - }, + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } - isUtc : function () { - return this._isUTC && this._offset === 0; - }, - zoneAbbr : function () { - return this._isUTC ? 'UTC' : ''; - }, + // MOMENTS - zoneName : function () { - return this._isUTC ? 'Coordinated Universal Time' : ''; - }, + // Setting the hour should keep the time, because the user explicitly + // specified which hour he wants. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + var getSetHour = makeGetSet('Hours', true); - parseZone : function () { - if (this._tzm) { - this.utcOffset(this._tzm); - } else if (typeof this._i === 'string') { - this.utcOffset(utcOffsetFromString(this._i)); - } - return this; - }, + addFormatToken('m', ['mm', 2], 0, 'minute'); - hasAlignedHourOffset : function (input) { - if (!input) { - input = 0; - } - else { - input = moment(input).utcOffset(); - } + // ALIASES - return (this.utcOffset() - input) % 60 === 0; - }, + addUnitAlias('minute', 'm'); - daysInMonth : function () { - return daysInMonth(this.year(), this.month()); - }, + // PARSING - dayOfYear : function (input) { - var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); - }, + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); - quarter : function (input) { - return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); - }, + // MOMENTS - weekYear : function (input) { - var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; - return input == null ? year : this.add((input - year), 'y'); - }, + var getSetMinute = makeGetSet('Minutes', false); - isoWeekYear : function (input) { - var year = weekOfYear(this, 1, 4).year; - return input == null ? year : this.add((input - year), 'y'); - }, + addFormatToken('s', ['ss', 2], 0, 'second'); - week : function (input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); - }, + // ALIASES - isoWeek : function (input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); - }, + addUnitAlias('second', 's'); - weekday : function (input) { - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, 'd'); - }, + // PARSING - isoWeekday : function (input) { - // behaves the same as moment#day except - // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) - // as a setter, sunday should belong to the previous week. - return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); - }, + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); - isoWeeksInYear : function () { - return weeksInYear(this.year(), 1, 4); - }, + // MOMENTS - weeksInYear : function () { - var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); - }, + var getSetSecond = makeGetSet('Seconds', false); - get : function (units) { - units = normalizeUnits(units); - return this[units](); - }, + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); - set : function (units, value) { - var unit; - if (typeof units === 'object') { - for (unit in units) { - this.set(unit, units[unit]); - } - } - else { - units = normalizeUnits(units); - if (typeof this[units] === 'function') { - this[units](value); - } - } - return this; - }, + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); - // If passed a locale key, it will set the locale for this - // instance. Otherwise, it will return the locale configuration - // variables for this instance. - locale : function (key) { - var newLocaleData; + function millisecond__milliseconds (token) { + addFormatToken(0, [token, 3], 0, 'millisecond'); + } - if (key === undefined) { - return this._locale._abbr; - } else { - newLocaleData = moment.localeData(key); - if (newLocaleData != null) { - this._locale = newLocaleData; - } - return this; - } - }, + millisecond__milliseconds('SSS'); + millisecond__milliseconds('SSSS'); - lang : deprecate( - 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', - function (key) { - if (key === undefined) { - return this.localeData(); - } else { - return this.locale(key); - } - } - ), + // ALIASES - localeData : function () { - return this._locale; - }, + addUnitAlias('millisecond', 'ms'); - _dateUtcOffset : function () { - // On Firefox.24 Date#getTimezoneOffset returns a floating point. - // https://github.com/moment/moment/pull/1871 - return -Math.round(this._d.getTimezoneOffset() / 15) * 15; - } + // PARSING + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + addRegexToken('SSSS', matchUnsigned); + addParseToken(['S', 'SS', 'SSS', 'SSSS'], function (input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); }); - function rawMonthSetter(mom, value) { - var dayOfMonth; - - // TODO: Move this out of here! - if (typeof value === 'string') { - value = mom.localeData().monthsParse(value); - // TODO: Another silent failure? - if (typeof value !== 'number') { - return mom; - } + // MOMENTS + + var getSetMillisecond = makeGetSet('Milliseconds', false); + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr () { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName () { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var momentPrototype__proto = Moment.prototype; + + momentPrototype__proto.add = add_subtract__add; + momentPrototype__proto.calendar = moment_calendar__calendar; + momentPrototype__proto.clone = clone; + momentPrototype__proto.diff = diff; + momentPrototype__proto.endOf = endOf; + momentPrototype__proto.format = format; + momentPrototype__proto.from = from; + momentPrototype__proto.fromNow = fromNow; + momentPrototype__proto.get = getSet; + momentPrototype__proto.invalidAt = invalidAt; + momentPrototype__proto.isAfter = isAfter; + momentPrototype__proto.isBefore = isBefore; + momentPrototype__proto.isBetween = isBetween; + momentPrototype__proto.isSame = isSame; + momentPrototype__proto.isValid = moment_valid__isValid; + momentPrototype__proto.lang = lang; + momentPrototype__proto.locale = locale; + momentPrototype__proto.localeData = localeData; + momentPrototype__proto.max = prototypeMax; + momentPrototype__proto.min = prototypeMin; + momentPrototype__proto.parsingFlags = parsingFlags; + momentPrototype__proto.set = getSet; + momentPrototype__proto.startOf = startOf; + momentPrototype__proto.subtract = add_subtract__subtract; + momentPrototype__proto.toArray = toArray; + momentPrototype__proto.toDate = toDate; + momentPrototype__proto.toISOString = moment_format__toISOString; + momentPrototype__proto.toJSON = moment_format__toISOString; + momentPrototype__proto.toString = toString; + momentPrototype__proto.unix = unix; + momentPrototype__proto.valueOf = to_type__valueOf; + + // Year + momentPrototype__proto.year = getSetYear; + momentPrototype__proto.isLeapYear = getIsLeapYear; + + // Week Year + momentPrototype__proto.weekYear = getSetWeekYear; + momentPrototype__proto.isoWeekYear = getSetISOWeekYear; + + // Quarter + momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; + + // Month + momentPrototype__proto.month = getSetMonth; + momentPrototype__proto.daysInMonth = getDaysInMonth; + + // Week + momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; + momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; + momentPrototype__proto.weeksInYear = getWeeksInYear; + momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; + + // Day + momentPrototype__proto.date = getSetDayOfMonth; + momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; + momentPrototype__proto.weekday = getSetLocaleDayOfWeek; + momentPrototype__proto.isoWeekday = getSetISODayOfWeek; + momentPrototype__proto.dayOfYear = getSetDayOfYear; + + // Hour + momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; + + // Minute + momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; + + // Second + momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; + + // Millisecond + momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; + + // Offset + momentPrototype__proto.utcOffset = getSetOffset; + momentPrototype__proto.utc = setOffsetToUTC; + momentPrototype__proto.local = setOffsetToLocal; + momentPrototype__proto.parseZone = setOffsetToParsedOffset; + momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; + momentPrototype__proto.isDST = isDaylightSavingTime; + momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted; + momentPrototype__proto.isLocal = isLocal; + momentPrototype__proto.isUtcOffset = isUtcOffset; + momentPrototype__proto.isUtc = isUtc; + momentPrototype__proto.isUTC = isUtc; + + // Timezone + momentPrototype__proto.zoneAbbr = getZoneAbbr; + momentPrototype__proto.zoneName = getZoneName; + + // Deprecations + momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone); + + var momentPrototype = momentPrototype__proto; + + function moment__createUnix (input) { + return local__createLocal(input * 1000); + } + + function moment__createInZone () { + return local__createLocal.apply(null, arguments).parseZone(); + } + + var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }; + + function locale_calendar__calendar (key, mom, now) { + var output = this._calendar[key]; + return typeof output === 'function' ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY LT', + LLLL : 'dddd, MMMM D, YYYY LT' + }; + + function longDateFormat (key) { + var output = this._longDateFormat[key]; + if (!output && this._longDateFormat[key.toUpperCase()]) { + output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + this._longDateFormat[key] = output; } - - dayOfMonth = Math.min(mom.date(), - daysInMonth(mom.year(), value)); - mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); - return mom; + return output; } - function rawGetter(mom, unit) { - return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); - } + var defaultInvalidDate = 'Invalid date'; - function rawSetter(mom, unit, value) { - if (unit === 'Month') { - return rawMonthSetter(mom, value); - } else { - return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); - } + function invalidDate () { + return this._invalidDate; } - function makeAccessor(unit, keepTime) { - return function (value) { - if (value != null) { - rawSetter(this, unit, value); - moment.updateOffset(this, keepTime); - return this; - } else { - return rawGetter(this, unit); - } - }; - } + var defaultOrdinal = '%d'; + var defaultOrdinalParse = /\d{1,2}/; - moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false); - moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false); - moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false); - // Setting the hour should keep the time, because the user explicitly - // specified which hour he wants. So trying to maintain the same hour (in - // a new timezone) makes sense. Adding/subtracting hours does not follow - // this rule. - moment.fn.hour = moment.fn.hours = makeAccessor('Hours', true); - // moment.fn.month is defined separately - moment.fn.date = makeAccessor('Date', true); - moment.fn.dates = deprecate('dates accessor is deprecated. Use date instead.', makeAccessor('Date', true)); - moment.fn.year = makeAccessor('FullYear', true); - moment.fn.years = deprecate('years accessor is deprecated. Use year instead.', makeAccessor('FullYear', true)); + function ordinal (number) { + return this._ordinal.replace('%d', number); + } - // add plural methods - moment.fn.days = moment.fn.day; - moment.fn.months = moment.fn.month; - moment.fn.weeks = moment.fn.week; - moment.fn.isoWeeks = moment.fn.isoWeek; - moment.fn.quarters = moment.fn.quarter; + function preParsePostFormat (string) { + return string; + } - // add aliased format methods - moment.fn.toJSON = moment.fn.toISOString; + var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }; - // alias isUtc for dev-friendliness - moment.fn.isUTC = moment.fn.isUtc; + function relative__relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (typeof output === 'function') ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); + } - /************************************ - Duration Prototype - ************************************/ + function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); + } + function locale_set__set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (typeof prop === 'function') { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _ordinalParseLenient. + this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); + } + + var prototype__proto = Locale.prototype; + + prototype__proto._calendar = defaultCalendar; + prototype__proto.calendar = locale_calendar__calendar; + prototype__proto._longDateFormat = defaultLongDateFormat; + prototype__proto.longDateFormat = longDateFormat; + prototype__proto._invalidDate = defaultInvalidDate; + prototype__proto.invalidDate = invalidDate; + prototype__proto._ordinal = defaultOrdinal; + prototype__proto.ordinal = ordinal; + prototype__proto._ordinalParse = defaultOrdinalParse; + prototype__proto.preparse = preParsePostFormat; + prototype__proto.postformat = preParsePostFormat; + prototype__proto._relativeTime = defaultRelativeTime; + prototype__proto.relativeTime = relative__relativeTime; + prototype__proto.pastFuture = pastFuture; + prototype__proto.set = locale_set__set; + + // Month + prototype__proto.months = localeMonths; + prototype__proto._months = defaultLocaleMonths; + prototype__proto.monthsShort = localeMonthsShort; + prototype__proto._monthsShort = defaultLocaleMonthsShort; + prototype__proto.monthsParse = localeMonthsParse; + + // Week + prototype__proto.week = localeWeek; + prototype__proto._week = defaultLocaleWeek; + prototype__proto.firstDayOfYear = localeFirstDayOfYear; + prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; + + // Day of Week + prototype__proto.weekdays = localeWeekdays; + prototype__proto._weekdays = defaultLocaleWeekdays; + prototype__proto.weekdaysMin = localeWeekdaysMin; + prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin; + prototype__proto.weekdaysShort = localeWeekdaysShort; + prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; + prototype__proto.weekdaysParse = localeWeekdaysParse; + + // Hours + prototype__proto.isPM = localeIsPM; + prototype__proto._meridiemParse = defaultLocaleMeridiemParse; + prototype__proto.meridiem = localeMeridiem; + + function lists__get (format, index, field, setter) { + var locale = locale_locales__getLocale(); + var utc = create_utc__createUTC().set(setter, index); + return locale[field](utc, format); + } + + function list (format, index, field, count, setter) { + if (typeof format === 'number') { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return lists__get(format, index, field, setter); + } - function daysToYears (days) { - // 400 years have 146097 days (taking into account leap year rules) - return days * 400 / 146097; + var i; + var out = []; + for (i = 0; i < count; i++) { + out[i] = lists__get(format, i, field, setter); + } + return out; } - function yearsToDays (years) { - // years * 365 + absRound(years / 4) - - // absRound(years / 100) + absRound(years / 400); - return years * 146097 / 400; + function lists__listMonths (format, index) { + return list(format, index, 'months', 12, 'month'); } - extend(moment.duration.fn = Duration.prototype, { + function lists__listMonthsShort (format, index) { + return list(format, index, 'monthsShort', 12, 'month'); + } - _bubble : function () { - var milliseconds = this._milliseconds, - days = this._days, - months = this._months, - data = this._data, - seconds, minutes, hours, years = 0; + function lists__listWeekdays (format, index) { + return list(format, index, 'weekdays', 7, 'day'); + } - // The following code bubbles up values, see the tests for - // examples of what that means. - data.milliseconds = milliseconds % 1000; + function lists__listWeekdaysShort (format, index) { + return list(format, index, 'weekdaysShort', 7, 'day'); + } - seconds = absRound(milliseconds / 1000); - data.seconds = seconds % 60; + function lists__listWeekdaysMin (format, index) { + return list(format, index, 'weekdaysMin', 7, 'day'); + } - minutes = absRound(seconds / 60); - data.minutes = minutes % 60; + locale_locales__getSetGlobalLocale('en', { + ordinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); - hours = absRound(minutes / 60); - data.hours = hours % 24; + // Side effect imports + utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); + utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); - days += absRound(hours / 24); + var mathAbs = Math.abs; - // Accurately convert days to years, assume start from year 0. - years = absRound(daysToYears(days)); - days -= absRound(yearsToDays(years)); + function duration_abs__abs () { + var data = this._data; - // 30 days to a month - // TODO (iskren): Use anchor date (like 1st Jan) to compute this. - months += absRound(days / 30); - days %= 30; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); - // 12 months -> 1 year - years += absRound(months / 12); - months %= 12; + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); - data.days = days; - data.months = months; - data.years = years; - }, + return this; + } - abs : function () { - this._milliseconds = Math.abs(this._milliseconds); - this._days = Math.abs(this._days); - this._months = Math.abs(this._months); + function duration_add_subtract__addSubtract (duration, input, value, direction) { + var other = create__createDuration(input, value); - this._data.milliseconds = Math.abs(this._data.milliseconds); - this._data.seconds = Math.abs(this._data.seconds); - this._data.minutes = Math.abs(this._data.minutes); - this._data.hours = Math.abs(this._data.hours); - this._data.months = Math.abs(this._data.months); - this._data.years = Math.abs(this._data.years); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; - return this; - }, + return duration._bubble(); + } - weeks : function () { - return absRound(this.days() / 7); - }, + // supports only 2.0-style add(1, 's') or add(duration) + function duration_add_subtract__add (input, value) { + return duration_add_subtract__addSubtract(this, input, value, 1); + } - valueOf : function () { - return this._milliseconds + - this._days * 864e5 + - (this._months % 12) * 2592e6 + - toInt(this._months / 12) * 31536e6; - }, + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function duration_add_subtract__subtract (input, value) { + return duration_add_subtract__addSubtract(this, input, value, -1); + } - humanize : function (withSuffix) { - var output = relativeTime(this, !withSuffix, this.localeData()); + function bubble () { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years = 0; - if (withSuffix) { - output = this.localeData().pastFuture(+this, output); - } + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; - return this.localeData().postformat(output); - }, + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; - add : function (input, val) { - // supports only 2.0-style add(1, 's') or add(moment) - var dur = moment.duration(input, val); + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; - this._milliseconds += dur._milliseconds; - this._days += dur._days; - this._months += dur._months; + hours = absFloor(minutes / 60); + data.hours = hours % 24; - this._bubble(); + days += absFloor(hours / 24); - return this; - }, + // Accurately convert days to years, assume start from year 0. + years = absFloor(daysToYears(days)); + days -= absFloor(yearsToDays(years)); - subtract : function (input, val) { - var dur = moment.duration(input, val); + // 30 days to a month + // TODO (iskren): Use anchor date (like 1st Jan) to compute this. + months += absFloor(days / 30); + days %= 30; - this._milliseconds -= dur._milliseconds; - this._days -= dur._days; - this._months -= dur._months; + // 12 months -> 1 year + years += absFloor(months / 12); + months %= 12; - this._bubble(); + data.days = days; + data.months = months; + data.years = years; - return this; - }, + return this; + } - get : function (units) { - units = normalizeUnits(units); - return this[units.toLowerCase() + 's'](); - }, + function daysToYears (days) { + // 400 years have 146097 days (taking into account leap year rules) + return days * 400 / 146097; + } - as : function (units) { - var days, months; - units = normalizeUnits(units); + function yearsToDays (years) { + // years * 365 + absFloor(years / 4) - + // absFloor(years / 100) + absFloor(years / 400); + return years * 146097 / 400; + } - if (units === 'month' || units === 'year') { - days = this._days + this._milliseconds / 864e5; - months = this._months + daysToYears(days) * 12; - return units === 'month' ? months : months / 12; - } else { - // handle milliseconds separately because of floating point math errors (issue #1867) - days = this._days + Math.round(yearsToDays(this._months / 12)); - switch (units) { - case 'week': return days / 7 + this._milliseconds / 6048e5; - case 'day': return days + this._milliseconds / 864e5; - case 'hour': return days * 24 + this._milliseconds / 36e5; - case 'minute': return days * 24 * 60 + this._milliseconds / 6e4; - case 'second': return days * 24 * 60 * 60 + this._milliseconds / 1000; - // Math.floor prevents floating point math errors here - case 'millisecond': return Math.floor(days * 24 * 60 * 60 * 1000) + this._milliseconds; - default: throw new Error('Unknown unit ' + units); - } - } - }, + function as (units) { + var days; + var months; + var milliseconds = this._milliseconds; - lang : moment.fn.lang, - locale : moment.fn.locale, + units = normalizeUnits(units); - toIsoString : deprecate( - 'toIsoString() is deprecated. Please use toISOString() instead ' + - '(notice the capitals)', - function () { - return this.toISOString(); - } - ), - - toISOString : function () { - // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js - var years = Math.abs(this.years()), - months = Math.abs(this.months()), - days = Math.abs(this.days()), - hours = Math.abs(this.hours()), - minutes = Math.abs(this.minutes()), - seconds = Math.abs(this.seconds() + this.milliseconds() / 1000); - - if (!this.asSeconds()) { - // this is the same as C#'s (Noda) and python (isodate)... - // but not other JS (goog.date) - return 'P0D'; + if (units === 'month' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToYears(days) * 12; + return units === 'month' ? months : months / 12; + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(yearsToDays(this._months / 12)); + switch (units) { + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 24 * 60 + milliseconds / 6e4; + case 'second' : return days * 24 * 60 * 60 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': return Math.floor(days * 24 * 60 * 60 * 1000) + milliseconds; + default: throw new Error('Unknown unit ' + units); } + } + } - return (this.asSeconds() < 0 ? '-' : '') + - 'P' + - (years ? years + 'Y' : '') + - (months ? months + 'M' : '') + - (days ? days + 'D' : '') + - ((hours || minutes || seconds) ? 'T' : '') + - (hours ? hours + 'H' : '') + - (minutes ? minutes + 'M' : '') + - (seconds ? seconds + 'S' : ''); - }, + // TODO: Use this.as('ms')? + function duration_as__valueOf () { + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } - localeData : function () { - return this._locale; - }, + function makeAs (alias) { + return function () { + return this.as(alias); + }; + } - toJSON : function () { - return this.toISOString(); - } - }); + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asYears = makeAs('y'); - moment.duration.fn.toString = moment.duration.fn.toISOString; + function duration_get__get (units) { + units = normalizeUnits(units); + return this[units + 's'](); + } - function makeDurationGetter(name) { - moment.duration.fn[name] = function () { + function makeGetter(name) { + return function () { return this._data[name]; }; } - for (i in unitMillisecondFactors) { - if (hasOwnProp(unitMillisecondFactors, i)) { - makeDurationGetter(i.toLowerCase()); - } + var duration_get__milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks () { + return absFloor(this.days() / 7); } - moment.duration.fn.asMilliseconds = function () { - return this.as('ms'); - }; - moment.duration.fn.asSeconds = function () { - return this.as('s'); - }; - moment.duration.fn.asMinutes = function () { - return this.as('m'); - }; - moment.duration.fn.asHours = function () { - return this.as('h'); - }; - moment.duration.fn.asDays = function () { - return this.as('d'); - }; - moment.duration.fn.asWeeks = function () { - return this.as('weeks'); - }; - moment.duration.fn.asMonths = function () { - return this.as('M'); - }; - moment.duration.fn.asYears = function () { - return this.as('y'); + var round = Math.round; + var thresholds = { + s: 45, // seconds to minute + m: 45, // minutes to hour + h: 22, // hours to day + d: 26, // days to month + M: 11 // months to year }; - /************************************ - Default Locale - ************************************/ + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) { + var duration = create__createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = seconds < thresholds.s && ['s', seconds] || + minutes === 1 && ['m'] || + minutes < thresholds.m && ['mm', minutes] || + hours === 1 && ['h'] || + hours < thresholds.h && ['hh', hours] || + days === 1 && ['d'] || + days < thresholds.d && ['dd', days] || + months === 1 && ['M'] || + months < thresholds.M && ['MM', months] || + years === 1 && ['y'] || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } - // Set default locale, other locale will inherit from English. - moment.locale('en', { - ordinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal : function (number) { - var b = number % 10, - output = (toInt(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; + // This function allows you to set a threshold for relative time strings + function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; } + thresholds[threshold] = limit; + return true; + } + + function humanize (withSuffix) { + var locale = this.localeData(); + var output = duration_humanize__relativeTime(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var iso_string__abs = Math.abs; + + function iso_string__toISOString() { + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = iso_string__abs(this.years()); + var M = iso_string__abs(this.months()); + var D = iso_string__abs(this.days()); + var h = iso_string__abs(this.hours()); + var m = iso_string__abs(this.minutes()); + var s = iso_string__abs(this.seconds() + this.milliseconds() / 1000); + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + return (total < 0 ? '-' : '') + + 'P' + + (Y ? Y + 'Y' : '') + + (M ? M + 'M' : '') + + (D ? D + 'D' : '') + + ((h || m || s) ? 'T' : '') + + (h ? h + 'H' : '') + + (m ? m + 'M' : '') + + (s ? s + 'S' : ''); + } + + var duration_prototype__proto = Duration.prototype; + + duration_prototype__proto.abs = duration_abs__abs; + duration_prototype__proto.add = duration_add_subtract__add; + duration_prototype__proto.subtract = duration_add_subtract__subtract; + duration_prototype__proto.as = as; + duration_prototype__proto.asMilliseconds = asMilliseconds; + duration_prototype__proto.asSeconds = asSeconds; + duration_prototype__proto.asMinutes = asMinutes; + duration_prototype__proto.asHours = asHours; + duration_prototype__proto.asDays = asDays; + duration_prototype__proto.asWeeks = asWeeks; + duration_prototype__proto.asMonths = asMonths; + duration_prototype__proto.asYears = asYears; + duration_prototype__proto.valueOf = duration_as__valueOf; + duration_prototype__proto._bubble = bubble; + duration_prototype__proto.get = duration_get__get; + duration_prototype__proto.milliseconds = duration_get__milliseconds; + duration_prototype__proto.seconds = seconds; + duration_prototype__proto.minutes = minutes; + duration_prototype__proto.hours = hours; + duration_prototype__proto.days = days; + duration_prototype__proto.weeks = weeks; + duration_prototype__proto.months = months; + duration_prototype__proto.years = years; + duration_prototype__proto.humanize = humanize; + duration_prototype__proto.toISOString = iso_string__toISOString; + duration_prototype__proto.toString = iso_string__toISOString; + duration_prototype__proto.toJSON = iso_string__toISOString; + duration_prototype__proto.locale = locale; + duration_prototype__proto.localeData = localeData; + + // Deprecations + duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); + duration_prototype__proto.lang = lang; + + // Side effect imports + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); }); - /* EMBED_LOCALES */ + // Side effect imports - /************************************ - Exposing Moment - ************************************/ - function makeGlobal(shouldDeprecate) { - /*global ender:false */ - if (typeof ender !== 'undefined') { - return; - } - oldGlobalMoment = globalScope.moment; - if (shouldDeprecate) { - globalScope.moment = deprecate( - 'Accessing Moment through the global scope is ' + - 'deprecated, and will be removed in an upcoming ' + - 'release.', - moment); - } else { - globalScope.moment = moment; - } - } + utils_hooks__hooks.version = '2.10.2'; - // CommonJS module is defined - if (hasModule) { - module.exports = moment; - } else if (typeof define === 'function' && define.amd) { - define(function (require, exports, module) { - if (module.config && module.config() && module.config().noGlobal === true) { - // release the global variable - globalScope.moment = oldGlobalMoment; - } + setHookCallback(local__createLocal); - return moment; - }); - makeGlobal(true); - } else { - makeGlobal(); - } -}).call(this); + utils_hooks__hooks.fn = momentPrototype; + utils_hooks__hooks.min = min; + utils_hooks__hooks.max = max; + utils_hooks__hooks.utc = create_utc__createUTC; + utils_hooks__hooks.unix = moment__createUnix; + utils_hooks__hooks.months = lists__listMonths; + utils_hooks__hooks.isDate = isDate; + utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; + utils_hooks__hooks.invalid = valid__createInvalid; + utils_hooks__hooks.duration = create__createDuration; + utils_hooks__hooks.isMoment = isMoment; + utils_hooks__hooks.weekdays = lists__listWeekdays; + utils_hooks__hooks.parseZone = moment__createInZone; + utils_hooks__hooks.localeData = locale_locales__getLocale; + utils_hooks__hooks.isDuration = isDuration; + utils_hooks__hooks.monthsShort = lists__listMonthsShort; + utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; + utils_hooks__hooks.defineLocale = defineLocale; + utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; + utils_hooks__hooks.normalizeUnits = normalizeUnits; + utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; -}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + var _moment = utils_hooks__hooks; + + return _moment; + +})); },{}],84:[function(require,module,exports){ module.exports={ "name": "mermaid", @@ -31006,12 +31048,12 @@ exports.contentLoaded = function(){ if (typeof mermaid_config !== 'undefined') { // Check if property startOnLoad is set if (equals(true, mermaid_config.startOnLoad)) { - global.mermaid.init(mermaid.sequenceConfig); + global.mermaid.init(); } } else { // No config found, do autostart in this simple case - global.mermaid.init(mermaid.sequenceConfig); + global.mermaid.init(); } } diff --git a/dist/mermaid.full.min.js b/dist/mermaid.full.min.js index 3ab8deb343..6da0facafc 100644 --- a/dist/mermaid.full.min.js +++ b/dist/mermaid.full.min.js @@ -25,21 +25,21 @@ var t=x.length;if(t){x.sort(c);for(var e,r=1,u=x[0],i=[u];t>r;++r)e=x[r],l(e[0], * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ -module.exports={graphlib:require("./lib/graphlib"),dagre:require("./lib/dagre"),intersect:require("./lib/intersect"),render:require("./lib/render"),util:require("./lib/util"),version:require("./lib/version")}},{"./lib/dagre":8,"./lib/graphlib":9,"./lib/intersect":10,"./lib/render":23,"./lib/util":25,"./lib/version":26}],2:[function(require,module,exports){var util=require("./util");module.exports={"default":normal,normal:normal,vee:vee,undirected:undirected};function normal(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}function vee(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}function undirected(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}},{"./util":25}],3:[function(require,module,exports){var util=require("./util");module.exports=createClusters;function createClusters(selection,g){var clusters=g.nodes().filter(function(v){return util.isSubgraph(g,v)}),svgClusters=selection.selectAll("g.cluster").data(clusters,function(v){return v});svgClusters.enter().append("g").attr("class","cluster").style("opacity",0).append("rect");util.applyTransition(svgClusters.exit(),g).style("opacity",0).remove();util.applyTransition(svgClusters,g).style("opacity",1);util.applyTransition(svgClusters.selectAll("rect"),g).attr("width",function(v){return g.node(v).width}).attr("height",function(v){return g.node(v).height}).attr("x",function(v){var node=g.node(v);return node.x-node.width/2}).attr("y",function(v){var node=g.node(v);return node.y-node.height/2})}},{"./util":25}],4:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createEdgeLabels;function createEdgeLabels(selection,g){var svgEdgeLabels=selection.selectAll("g.edgeLabel").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);svgEdgeLabels.selectAll("*").remove();svgEdgeLabels.enter().append("g").classed("edgeLabel",true).style("opacity",0);svgEdgeLabels.each(function(e){var edge=g.edge(e),label=addLabel(d3.select(this),g.edge(e),0,0).classed("label",true),bbox=label.node().getBBox();if(edge.labelId){label.attr("id",edge.labelId)}if(!_.has(edge,"width")){edge.width=bbox.width}if(!_.has(edge,"height")){edge.height=bbox.height}});util.applyTransition(svgEdgeLabels.exit(),g).style("opacity",0).remove();return svgEdgeLabels}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],5:[function(require,module,exports){"use strict";var _=require("./lodash"),intersectNode=require("./intersect/intersect-node"),util=require("./util"),d3=require("./d3");module.exports=createEdgePaths;function createEdgePaths(selection,g,arrows){var svgPaths=selection.selectAll("g.edgePath").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);enter(svgPaths,g);exit(svgPaths,g);util.applyTransition(svgPaths,g).style("opacity",1);svgPaths.each(function(e){var edge=g.edge(e);edge.elem=this;if(edge.id){d3.select(this).attr("id",edge.id)}});svgPaths.selectAll("path.path").each(function(e){var edge=g.edge(e);edge.arrowheadId=_.uniqueId("arrowhead");var domEdge=d3.select(this).attr("marker-end",function(){return"url(#"+edge.arrowheadId+")"}).style("fill","none");util.applyTransition(domEdge,g).attr("d",function(e){return calcPoints(g,e)});util.applyStyle(domEdge,edge.style)});svgPaths.selectAll("defs *").remove();svgPaths.selectAll("defs").each(function(e){var edge=g.edge(e),arrowhead=arrows[edge.arrowhead];arrowhead(d3.select(this),edge.arrowheadId,edge,"arrowhead")});return svgPaths}function calcPoints(g,e){var edge=g.edge(e),tail=g.node(e.v),head=g.node(e.w),points=edge.points.slice(1,edge.points.length-1);points.unshift(intersectNode(tail,points[0]));points.push(intersectNode(head,points[points.length-1]));return createLine(edge,points)}function createLine(edge,points){var line=d3.svg.line().x(function(d){return d.x}).y(function(d){return d.y});if(_.has(edge,"lineInterpolate")){line.interpolate(edge.lineInterpolate)}if(_.has(edge,"lineTension")){line.tension(Number(edge.lineTension))}return line(points)}function getCoords(elem){var bbox=elem.getBBox(),matrix=elem.getTransformToElement(elem.ownerSVGElement).translate(bbox.width/2,bbox.height/2);return{x:matrix.e,y:matrix.f}}function enter(svgPaths,g){var svgPathsEnter=svgPaths.enter().append("g").attr("class","edgePath").style("opacity",0);svgPathsEnter.append("path").attr("class","path").attr("d",function(e){var edge=g.edge(e),sourceElem=g.node(e.v).elem,points=_.range(edge.points.length).map(function(){return getCoords(sourceElem)});return createLine(edge,points)});svgPathsEnter.append("defs")}function exit(svgPaths,g){var svgPathExit=svgPaths.exit();util.applyTransition(svgPathExit,g).style("opacity",0).remove();util.applyTransition(svgPathExit.select("path.path"),g).attr("d",function(e){var source=g.node(e.v);if(source){var points=_.range(this.pathSegList.length).map(function(){return source});return createLine({},points)}else{return d3.select(this).attr("d")}})}},{"./d3":7,"./intersect/intersect-node":14,"./lodash":20,"./util":25}],6:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createNodes;function createNodes(selection,g,shapes){var simpleNodes=g.nodes().filter(function(v){return!util.isSubgraph(g,v)});var svgNodes=selection.selectAll("g.node").data(simpleNodes,function(v){return v}).classed("update",true);svgNodes.selectAll("*").remove();svgNodes.enter().append("g").attr("class","node").style("opacity",0);svgNodes.each(function(v){var node=g.node(v),thisGroup=d3.select(this),labelGroup=thisGroup.append("g").attr("class","label"),labelDom=addLabel(labelGroup,node),shape=shapes[node.shape],bbox=_.pick(labelDom.node().getBBox(),"width","height");node.elem=this;if(node.id){thisGroup.attr("id",node.id)}if(node.labelId){labelGroup.attr("id",node.labelId)}util.applyClass(thisGroup,node["class"],(thisGroup.classed("update")?"update ":"")+"node");if(_.has(node,"width")){bbox.width=node.width}if(_.has(node,"height")){bbox.height=node.height}bbox.width+=node.paddingLeft+node.paddingRight;bbox.height+=node.paddingTop+node.paddingBottom;labelGroup.attr("transform","translate("+(node.paddingLeft-node.paddingRight)/2+","+(node.paddingTop-node.paddingBottom)/2+")");var shapeSvg=shape(d3.select(this),bbox,node);util.applyStyle(shapeSvg,node.style);var shapeBBox=shapeSvg.node().getBBox();node.width=shapeBBox.width;node.height=shapeBBox.height});util.applyTransition(svgNodes.exit(),g).style("opacity",0).remove();return svgNodes}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],7:[function(require,module,exports){module.exports=window.d3},{}],8:[function(require,module,exports){var dagre;if(require){try{dagre=require("dagre")}catch(e){}}if(!dagre){dagre=window.dagre}module.exports=dagre},{dagre:27}],9:[function(require,module,exports){var graphlib;if(require){try{graphlib=require("graphlib")}catch(e){}}if(!graphlib){graphlib=window.graphlib}module.exports=graphlib},{graphlib:57}],10:[function(require,module,exports){module.exports={node:require("./intersect-node"),circle:require("./intersect-circle"),ellipse:require("./intersect-ellipse"),polygon:require("./intersect-polygon"),rect:require("./intersect-rect")}},{"./intersect-circle":11,"./intersect-ellipse":12,"./intersect-node":14,"./intersect-polygon":15,"./intersect-rect":16}],11:[function(require,module,exports){var intersectEllipse=require("./intersect-ellipse");module.exports=intersectCircle;function intersectCircle(node,rx,point){return intersectEllipse(node,rx,rx,point)}},{"./intersect-ellipse":12}],12:[function(require,module,exports){module.exports=intersectEllipse;function intersectEllipse(node,rx,ry,point){var cx=node.x;var cy=node.y;var px=cx-point.x;var py=cy-point.y;var det=Math.sqrt(rx*rx*py*py+ry*ry*px*px);var dx=Math.abs(rx*ry*px/det);if(point.x0}},{}],14:[function(require,module,exports){module.exports=intersectNode;function intersectNode(node,point){return node.intersect(point)}},{}],15:[function(require,module,exports){var intersectLine=require("./intersect-line");module.exports=intersectPolygon;function intersectPolygon(node,polyPoints,point){var x1=node.x;var y1=node.y;var intersections=[];var minX=Number.POSITIVE_INFINITY,minY=Number.POSITIVE_INFINITY;polyPoints.forEach(function(entry){minX=Math.min(minX,entry.x);minY=Math.min(minY,entry.y)});var left=x1-node.width/2-minX;var top=y1-node.height/2-minY;for(var i=0;i1){intersections.sort(function(p,q){var pdx=p.x-point.x,pdy=p.y-point.y,distp=Math.sqrt(pdx*pdx+pdy*pdy),qdx=q.x-point.x,qdy=q.y-point.y,distq=Math.sqrt(qdx*qdx+qdy*qdy);return distpMath.abs(dx)*h){if(dy<0){h=-h}sx=dy===0?0:h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=dx===0?0:w*dy/dx}return{x:x+sx,y:y+sy}}},{}],17:[function(require,module,exports){var util=require("../util");module.exports=addHtmlLabel;function addHtmlLabel(root,node){var fo=root.append("foreignObject").attr("width","100000");var div=fo.append("xhtml:div");var label=node.label;switch(typeof label){case"function":div.insert(label);break;case"object":div.insert(function(){return label});break;default:div.html(label)}util.applyStyle(div,node.labelStyle);div.style("display","inline-block");div.style("white-space","nowrap");var w,h;div.each(function(){w=this.clientWidth;h=this.clientHeight});fo.attr("width",w).attr("height",h);return fo}},{"../util":25}],18:[function(require,module,exports){var addTextLabel=require("./add-text-label"),addHtmlLabel=require("./add-html-label");module.exports=addLabel;function addLabel(root,node){var label=node.label;var labelSvg=root.append("g");if(typeof label!=="string"||node.labelType==="html"){addHtmlLabel(labelSvg,node)}else{addTextLabel(labelSvg,node)}var labelBBox=labelSvg.node().getBBox();labelSvg.attr("transform","translate("+-labelBBox.width/2+","+-labelBBox.height/2+")");return labelSvg}},{"./add-html-label":17,"./add-text-label":19}],19:[function(require,module,exports){var util=require("../util");module.exports=addTextLabel;function addTextLabel(root,node){var domNode=root.append("text");var lines=processEscapeSequences(node.label).split("\n");for(var i=0;i0;--i){entry=buckets[i].dequeue();if(entry){results=results.concat(removeNode(g,buckets,zeroIdx,entry,true));break}}}}return results}function removeNode(g,buckets,zeroIdx,entry,collectPredecessors){var results=collectPredecessors?[]:undefined;_.each(g.inEdges(entry.v),function(edge){var weight=g.edge(edge),uEntry=g.node(edge.v);if(collectPredecessors){results.push({v:edge.v,w:edge.w})}uEntry.out-=weight;assignBucket(buckets,zeroIdx,uEntry)});_.each(g.outEdges(entry.v),function(edge){var weight=g.edge(edge),w=edge.w,wEntry=g.node(w);wEntry["in"]-=weight;assignBucket(buckets,zeroIdx,wEntry)});g.removeNode(entry.v);return results}function buildState(g,weightFn){var fasGraph=new Graph,maxIn=0,maxOut=0;_.each(g.nodes(),function(v){fasGraph.setNode(v,{v:v,"in":0,out:0})});_.each(g.edges(),function(e){var prevWeight=fasGraph.edge(e.v,e.w)||0,weight=weightFn(e),edgeWeight=prevWeight+weight;fasGraph.setEdge(e.v,e.w,edgeWeight);maxOut=Math.max(maxOut,fasGraph.node(e.v).out+=weight);maxIn=Math.max(maxIn,fasGraph.node(e.w)["in"]+=weight)});var buckets=_.range(maxOut+maxIn+3).map(function(){return new List});var zeroIdx=maxIn+1;_.each(fasGraph.nodes(),function(v){assignBucket(buckets,zeroIdx,fasGraph.node(v))});return{graph:fasGraph,buckets:buckets,zeroIdx:zeroIdx}}function assignBucket(buckets,zeroIdx,entry){if(!entry.out){buckets[0].enqueue(entry)}else if(!entry["in"]){buckets[buckets.length-1].enqueue(entry)}else{buckets[entry.out-entry["in"]+zeroIdx].enqueue(entry)}}},{"./data/list":31,"./graphlib":33,"./lodash":36}],35:[function(require,module,exports){"use strict";var _=require("./lodash"),acyclic=require("./acyclic"),normalize=require("./normalize"),rank=require("./rank"),normalizeRanks=require("./util").normalizeRanks,parentDummyChains=require("./parent-dummy-chains"),removeEmptyRanks=require("./util").removeEmptyRanks,nestingGraph=require("./nesting-graph"),addBorderSegments=require("./add-border-segments"),coordinateSystem=require("./coordinate-system"),order=require("./order"),position=require("./position"),util=require("./util"),Graph=require("./graphlib").Graph;module.exports=layout;function layout(g,opts){var time=opts&&opts.debugTiming?util.time:util.notime;time("layout",function(){var layoutGraph=time(" buildLayoutGraph",function(){return buildLayoutGraph(g)});time(" runLayout",function(){runLayout(layoutGraph,time)});time(" updateInputGraph",function(){updateInputGraph(g,layoutGraph)})})}function runLayout(g,time){time(" makeSpaceForEdgeLabels",function(){makeSpaceForEdgeLabels(g)});time(" removeSelfEdges",function(){removeSelfEdges(g)});time(" acyclic",function(){acyclic.run(g)});time(" nestingGraph.run",function(){nestingGraph.run(g)});time(" rank",function(){rank(util.asNonCompoundGraph(g))});time(" injectEdgeLabelProxies",function(){injectEdgeLabelProxies(g)});time(" removeEmptyRanks",function(){removeEmptyRanks(g)});time(" nestingGraph.cleanup",function(){nestingGraph.cleanup(g)});time(" normalizeRanks",function(){normalizeRanks(g)});time(" assignRankMinMax",function(){assignRankMinMax(g)});time(" removeEdgeLabelProxies",function(){removeEdgeLabelProxies(g)});time(" normalize.run",function(){normalize.run(g)});time(" parentDummyChains",function(){parentDummyChains(g)});time(" addBorderSegments",function(){addBorderSegments(g)});time(" order",function(){order(g)});time(" insertSelfEdges",function(){insertSelfEdges(g)});time(" adjustCoordinateSystem",function(){coordinateSystem.adjust(g)});time(" position",function(){position(g)});time(" positionSelfEdges",function(){positionSelfEdges(g)});time(" removeBorderNodes",function(){removeBorderNodes(g)});time(" normalize.undo",function(){normalize.undo(g)});time(" fixupEdgeLabelCoords",function(){fixupEdgeLabelCoords(g)});time(" undoCoordinateSystem",function(){coordinateSystem.undo(g)});time(" translateGraph",function(){translateGraph(g)});time(" assignNodeIntersects",function(){assignNodeIntersects(g)});time(" reversePoints",function(){reversePointsForReversedEdges(g)});time(" acyclic.undo",function(){acyclic.undo(g)})}function updateInputGraph(inputGraph,layoutGraph){_.each(inputGraph.nodes(),function(v){var inputLabel=inputGraph.node(v),layoutLabel=layoutGraph.node(v);if(inputLabel){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y;if(layoutGraph.children(v).length){inputLabel.width=layoutLabel.width;inputLabel.height=layoutLabel.height}}});_.each(inputGraph.edges(),function(e){var inputLabel=inputGraph.edge(e),layoutLabel=layoutGraph.edge(e);inputLabel.points=layoutLabel.points;if(_.has(layoutLabel,"x")){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y}});inputGraph.graph().width=layoutGraph.graph().width;inputGraph.graph().height=layoutGraph.graph().height}var graphNumAttrs=["nodesep","edgesep","ranksep","marginx","marginy"],graphDefaults={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},graphAttrs=["acyclicer","ranker","rankdir","align"],nodeNumAttrs=["width","height"],nodeDefaults={width:0,height:0},edgeNumAttrs=["minlen","weight","width","height","labeloffset"],edgeDefaults={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},edgeAttrs=["labelpos"];function buildLayoutGraph(inputGraph){var g=new Graph({multigraph:true,compound:true}),graph=canonicalize(inputGraph.graph());g.setGraph(_.merge({},graphDefaults,selectNumberAttrs(graph,graphNumAttrs),_.pick(graph,graphAttrs)));_.each(inputGraph.nodes(),function(v){var node=canonicalize(inputGraph.node(v));g.setNode(v,_.defaults(selectNumberAttrs(node,nodeNumAttrs),nodeDefaults));g.setParent(v,inputGraph.parent(v))});_.each(inputGraph.edges(),function(e){var edge=canonicalize(inputGraph.edge(e));g.setEdge(e,_.merge({},edgeDefaults,selectNumberAttrs(edge,edgeNumAttrs),_.pick(edge,edgeAttrs)))});return g}function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/=2;_.each(g.edges(),function(e){var edge=g.edge(e);edge.minlen*=2;if(edge.labelpos.toLowerCase()!=="c"){if(graph.rankdir==="TB"||graph.rankdir==="BT"){edge.width+=edge.labeloffset}else{edge.height+=edge.labeloffset}}})}function injectEdgeLabelProxies(g){_.each(g.edges(),function(e){var edge=g.edge(e); -if(edge.width&&edge.height){var v=g.node(e.v),w=g.node(e.w),label={rank:(w.rank-v.rank)/2+v.rank,e:e};util.addDummyNode(g,"edge-proxy",label,"_ep")}})}function assignRankMinMax(g){var maxRank=0;_.each(g.nodes(),function(v){var node=g.node(v);if(node.borderTop){node.minRank=g.node(node.borderTop).rank;node.maxRank=g.node(node.borderBottom).rank;maxRank=_.max(maxRank,node.maxRank)}});g.graph().maxRank=maxRank}function removeEdgeLabelProxies(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="edge-proxy"){g.edge(node.e).labelRank=node.rank;g.removeNode(v)}})}function translateGraph(g){var minX=Number.POSITIVE_INFINITY,maxX=0,minY=Number.POSITIVE_INFINITY,maxY=0,graphLabel=g.graph(),marginX=graphLabel.marginx||0,marginY=graphLabel.marginy||0;function getExtremes(attrs){var x=attrs.x,y=attrs.y,w=attrs.width,h=attrs.height;minX=Math.min(minX,x-w/2);maxX=Math.max(maxX,x+w/2);minY=Math.min(minY,y-h/2);maxY=Math.max(maxY,y+h/2)}_.each(g.nodes(),function(v){getExtremes(g.node(v))});_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){getExtremes(edge)}});minX-=marginX;minY-=marginY;_.each(g.nodes(),function(v){var node=g.node(v);node.x-=minX;node.y-=minY});_.each(g.edges(),function(e){var edge=g.edge(e);_.each(edge.points,function(p){p.x-=minX;p.y-=minY});if(_.has(edge,"x")){edge.x-=minX}if(_.has(edge,"y")){edge.y-=minY}});graphLabel.width=maxX-minX+marginX;graphLabel.height=maxY-minY+marginY}function assignNodeIntersects(g){_.each(g.edges(),function(e){var edge=g.edge(e),nodeV=g.node(e.v),nodeW=g.node(e.w),p1,p2;if(!edge.points){edge.points=[];p1=nodeW;p2=nodeV}else{p1=edge.points[0];p2=edge.points[edge.points.length-1]}edge.points.unshift(util.intersectRect(nodeV,p1));edge.points.push(util.intersectRect(nodeW,p2))})}function fixupEdgeLabelCoords(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){if(edge.labelpos==="l"||edge.labelpos==="r"){edge.width-=edge.labeloffset}switch(edge.labelpos){case"l":edge.x-=edge.width/2+edge.labeloffset;break;case"r":edge.x+=edge.width/2+edge.labeloffset;break}}})}function reversePointsForReversedEdges(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.reversed){edge.points.reverse()}})}function removeBorderNodes(g){_.each(g.nodes(),function(v){if(g.children(v).length){var node=g.node(v),t=g.node(node.borderTop),b=g.node(node.borderBottom),l=g.node(_.last(node.borderLeft)),r=g.node(_.last(node.borderRight));node.width=Math.abs(r.x-l.x);node.height=Math.abs(b.y-t.y);node.x=l.x+node.width/2;node.y=t.y+node.height/2}});_.each(g.nodes(),function(v){if(g.node(v).dummy==="border"){g.removeNode(v)}})}function removeSelfEdges(g){_.each(g.edges(),function(e){if(e.v===e.w){var node=g.node(e.v);if(!node.selfEdges){node.selfEdges=[]}node.selfEdges.push({e:e,label:g.edge(e)});g.removeEdge(e)}})}function insertSelfEdges(g){var layers=util.buildLayerMatrix(g);_.each(layers,function(layer){var orderShift=0;_.each(layer,function(v,i){var node=g.node(v);node.order=i+orderShift;_.each(node.selfEdges,function(selfEdge){util.addDummyNode(g,"selfedge",{width:selfEdge.label.width,height:selfEdge.label.height,rank:node.rank,order:i+ ++orderShift,e:selfEdge.e,label:selfEdge.label},"_se")});delete node.selfEdges})})}function positionSelfEdges(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="selfedge"){var selfNode=g.node(node.e.v),x=selfNode.x+selfNode.width/2,y=selfNode.y,dx=node.x-x,dy=selfNode.height/2;g.setEdge(node.e,node.label);g.removeNode(v);node.label.points=[{x:x+2*dx/3,y:y-dy},{x:x+5*dx/6,y:y-dy},{x:x+dx,y:y},{x:x+5*dx/6,y:y+dy},{x:x+2*dx/3,y:y+dy}];node.label.x=node.x;node.label.y=node.y}})}function selectNumberAttrs(obj,attrs){return _.mapValues(_.pick(obj,attrs),Number)}function canonicalize(attrs){var newAttrs={};_.each(attrs,function(v,k){newAttrs[k.toLowerCase()]=v});return newAttrs}},{"./acyclic":28,"./add-border-segments":29,"./coordinate-system":30,"./graphlib":33,"./lodash":36,"./nesting-graph":37,"./normalize":38,"./order":43,"./parent-dummy-chains":48,"./position":50,"./rank":52,"./util":55}],36:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],37:[function(require,module,exports){var _=require("./lodash"),util=require("./util");module.exports={run:run,cleanup:cleanup};function run(g){var root=util.addDummyNode(g,"root",{},"_root"),depths=treeDepths(g),height=_.max(depths)-1,nodeSep=2*height+1;g.graph().nestingRoot=root;_.each(g.edges(),function(e){g.edge(e).minlen*=nodeSep});var weight=sumWeights(g)+1;_.each(g.children(),function(child){dfs(g,root,nodeSep,weight,height,depths,child)});g.graph().nodeRankFactor=nodeSep}function dfs(g,root,nodeSep,weight,height,depths,v){var children=g.children(v);if(!children.length){if(v!==root){g.setEdge(root,v,{weight:0,minlen:nodeSep})}return}var top=util.addBorderNode(g,"_bt"),bottom=util.addBorderNode(g,"_bb"),label=g.node(v);g.setParent(top,v);label.borderTop=top;g.setParent(bottom,v);label.borderBottom=bottom;_.each(children,function(child){dfs(g,root,nodeSep,weight,height,depths,child);var childNode=g.node(child),childTop=childNode.borderTop?childNode.borderTop:child,childBottom=childNode.borderBottom?childNode.borderBottom:child,thisWeight=childNode.borderTop?weight:2*weight,minlen=childTop!==childBottom?1:height-depths[v]+1;g.setEdge(top,childTop,{weight:thisWeight,minlen:minlen,nestingEdge:true});g.setEdge(childBottom,bottom,{weight:thisWeight,minlen:minlen,nestingEdge:true})});if(!g.parent(v)){g.setEdge(root,top,{weight:0,minlen:height+depths[v]})}}function treeDepths(g){var depths={};function dfs(v,depth){var children=g.children(v);if(children&&children.length){_.each(children,function(child){dfs(child,depth+1)})}depths[v]=depth}_.each(g.children(),function(v){dfs(v,1)});return depths}function sumWeights(g){return _.reduce(g.edges(),function(acc,e){return acc+g.edge(e).weight},0)}function cleanup(g){var graphLabel=g.graph();g.removeNode(graphLabel.nestingRoot);delete graphLabel.nestingRoot;_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.nestingEdge){g.removeEdge(e)}})}},{"./lodash":36,"./util":55}],38:[function(require,module,exports){"use strict";var _=require("./lodash"),util=require("./util");module.exports={run:run,undo:undo};function run(g){g.graph().dummyChains=[];_.each(g.edges(),function(edge){normalizeEdge(g,edge)})}function normalizeEdge(g,e){var v=e.v,vRank=g.node(v).rank,w=e.w,wRank=g.node(w).rank,name=e.name,edgeLabel=g.edge(e),labelRank=edgeLabel.labelRank;if(wRank===vRank+1)return;g.removeEdge(e);var dummy,attrs,i;for(i=0,++vRank;vRank0){if(index%2){weightSum+=tree[index+1]}index=index-1>>1;tree[index]+=entry.weight}cc+=entry.weight*weightSum}));return cc}},{"../lodash":36}],43:[function(require,module,exports){"use strict";var _=require("../lodash"),initOrder=require("./init-order"),crossCount=require("./cross-count"),sortSubgraph=require("./sort-subgraph"),buildLayerGraph=require("./build-layer-graph"),addSubgraphConstraints=require("./add-subgraph-constraints"),Graph=require("../graphlib").Graph,util=require("../util");module.exports=order;function order(g){var maxRank=util.maxRank(g),downLayerGraphs=buildLayerGraphs(g,_.range(1,maxRank+1),"inEdges"),upLayerGraphs=buildLayerGraphs(g,_.range(maxRank-1,-1,-1),"outEdges");var layering=initOrder(g);assignOrder(g,layering);var bestCC=Number.POSITIVE_INFINITY,best;for(var i=0,lastBest=0;lastBest<4;++i,++lastBest){sweepLayerGraphs(i%2?downLayerGraphs:upLayerGraphs,i%4>=2);layering=util.buildLayerMatrix(g);var cc=crossCount(g,layering);if(cc=vEntry.barycenter){mergeEntries(vEntry,uEntry)}}}function handleOut(vEntry){return function(wEntry){wEntry["in"].push(vEntry);if(--wEntry.indegree===0){sourceSet.push(wEntry)}}}while(sourceSet.length){var entry=sourceSet.pop();entries.push(entry);_.each(entry["in"].reverse(),handleIn(entry));_.each(entry.out,handleOut(entry))}return _.chain(entries).filter(function(entry){return!entry.merged}).map(function(entry){return _.pick(entry,["vs","i","barycenter","weight"])}).value()}function mergeEntries(target,source){var sum=0,weight=0;if(target.weight){sum+=target.barycenter*target.weight;weight+=target.weight}if(source.weight){sum+=source.barycenter*source.weight;weight+=source.weight}target.vs=source.vs.concat(target.vs);target.barycenter=sum/weight;target.weight=weight;target.i=Math.min(source.i,target.i);source.merged=true}},{"../lodash":36}],46:[function(require,module,exports){var _=require("../lodash"),barycenter=require("./barycenter"),resolveConflicts=require("./resolve-conflicts"),sort=require("./sort");module.exports=sortSubgraph;function sortSubgraph(g,v,cg,biasRight){var movable=g.children(v),node=g.node(v),bl=node?node.borderLeft:undefined,br=node?node.borderRight:undefined,subgraphs={};if(bl){movable=_.filter(movable,function(w){return w!==bl&&w!==br})}var barycenters=barycenter(g,movable);_.each(barycenters,function(entry){if(g.children(entry.v).length){var subgraphResult=sortSubgraph(g,entry.v,cg,biasRight);subgraphs[entry.v]=subgraphResult;if(_.has(subgraphResult,"barycenter")){mergeBarycenters(entry,subgraphResult)}}});var entries=resolveConflicts(barycenters,cg);expandSubgraphs(entries,subgraphs);var result=sort(entries,biasRight);if(bl){result.vs=_.flatten([bl,result.vs,br],true);if(g.predecessors(bl).length){var blPred=g.node(g.predecessors(bl)[0]),brPred=g.node(g.predecessors(br)[0]);if(!_.has(result,"barycenter")){result.barycenter=0;result.weight=0}result.barycenter=(result.barycenter*result.weight+blPred.order+brPred.order)/(result.weight+2);result.weight+=2}}return result}function expandSubgraphs(entries,subgraphs){_.each(entries,function(entry){entry.vs=_.flatten(entry.vs.map(function(v){if(subgraphs[v]){return subgraphs[v].vs}return v}),true)})}function mergeBarycenters(target,other){if(!_.isUndefined(target.barycenter)){target.barycenter=(target.barycenter*target.weight+other.barycenter*other.weight)/(target.weight+other.weight);target.weight+=other.weight}else{target.barycenter=other.barycenter;target.weight=other.weight}}},{"../lodash":36,"./barycenter":40,"./resolve-conflicts":45,"./sort":47}],47:[function(require,module,exports){var _=require("../lodash"),util=require("../util");module.exports=sort;function sort(entries,biasRight){var parts=util.partition(entries,function(entry){return _.has(entry,"barycenter")});var sortable=parts.lhs,unsortable=_.sortBy(parts.rhs,function(entry){return-entry.i}),vs=[],sum=0,weight=0,vsIndex=0;sortable.sort(compareWithBias(!!biasRight));vsIndex=consumeUnsortable(vs,unsortable,vsIndex);_.each(sortable,function(entry){vsIndex+=entry.vs.length;vs.push(entry.vs);sum+=entry.barycenter*entry.weight;weight+=entry.weight;vsIndex=consumeUnsortable(vs,unsortable,vsIndex)});var result={vs:_.flatten(vs,true)};if(weight){result.barycenter=sum/weight;result.weight=weight}return result}function consumeUnsortable(vs,unsortable,index){var last;while(unsortable.length&&(last=_.last(unsortable)).i<=index){unsortable.pop();vs.push(last.vs);index++}return index}function compareWithBias(bias){return function(entryV,entryW){if(entryV.barycenterentryW.barycenter){return 1}return!bias?entryV.i-entryW.i:entryW.i-entryV.i}}},{"../lodash":36,"../util":55}],48:[function(require,module,exports){var _=require("./lodash");module.exports=parentDummyChains;function parentDummyChains(g){var postorderNums=postorder(g);_.each(g.graph().dummyChains,function(v){var node=g.node(v),edgeObj=node.edgeObj,pathData=findPath(g,postorderNums,edgeObj.v,edgeObj.w),path=pathData.path,lca=pathData.lca,pathIdx=0,pathV=path[pathIdx],ascending=true;while(v!==edgeObj.w){node=g.node(v);if(ascending){while((pathV=path[pathIdx])!==lca&&g.node(pathV).maxRanklow||lim>postorderNums[parent].lim));lca=parent;parent=w;while((parent=g.parent(parent))!==lca){wPath.push(parent)}return{path:vPath.concat(wPath.reverse()),lca:lca}}function postorder(g){var result={},lim=0;function dfs(v){var low=lim;_.each(g.children(v),dfs);result[v]={low:low,lim:lim++}}_.each(g.children(),dfs);return result}},{"./lodash":36}],49:[function(require,module,exports){"use strict";var _=require("../lodash"),Graph=require("../graphlib").Graph,util=require("../util");module.exports={positionX:positionX,findType1Conflicts:findType1Conflicts,findType2Conflicts:findType2Conflicts,addConflict:addConflict,hasConflict:hasConflict,verticalAlignment:verticalAlignment,horizontalCompaction:horizontalCompaction,alignCoordinates:alignCoordinates,findSmallestWidthAlignment:findSmallestWidthAlignment,balance:balance};function findType1Conflicts(g,layering){var conflicts={};function visitLayer(prevLayer,layer){var k0=0,scanPos=0,prevLayerLength=prevLayer.length,lastNode=_.last(layer);_.each(layer,function(v,i){var w=findOtherInnerSegmentNode(g,v),k1=w?g.node(w).order:prevLayerLength;if(w||v===lastNode){_.each(layer.slice(scanPos,i+1),function(scanNode){_.each(g.predecessors(scanNode),function(u){var uLabel=g.node(u),uPos=uLabel.order;if((uPosnextNorthBorder)){addConflict(conflicts,u,v)}})}})}function visitLayer(north,south){var prevNorthPos=-1,nextNorthPos,southPos=0;_.each(south,function(v,southLookahead){if(g.node(v).dummy==="border"){var predecessors=g.predecessors(v);if(predecessors.length){nextNorthPos=g.node(predecessors[0]).order;scan(south,southPos,southLookahead,prevNorthPos,nextNorthPos);southPos=southLookahead;prevNorthPos=nextNorthPos}}scan(south,southPos,south.length,nextNorthPos,north.length)});return south}_.reduce(layering,visitLayer);return conflicts}function findOtherInnerSegmentNode(g,v){if(g.node(v).dummy){return _.find(g.predecessors(v),function(u){return g.node(u).dummy})}}function addConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}var conflictsV=conflicts[v];if(!conflictsV){conflicts[v]=conflictsV={}}conflictsV[w]=true}function hasConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}return _.has(conflicts[v],w)}function verticalAlignment(g,layering,conflicts,neighborFn){var root={},align={},pos={};_.each(layering,function(layer){_.each(layer,function(v,order){root[v]=v;align[v]=v;pos[v]=order})});_.each(layering,function(layer){var prevIdx=-1;_.each(layer,function(v){var ws=neighborFn(v);if(ws.length){ws=_.sortBy(ws,function(w){return pos[w]});var mp=(ws.length-1)/2;for(var i=Math.floor(mp),il=Math.ceil(mp);i<=il;++i){var w=ws[i];if(align[v]===v&&prevIdxwLabel.lim){tailLabel=wLabel;flip=true}var candidates=_.filter(g.edges(),function(edge){return flip===isDescendant(t,t.node(edge.v),tailLabel)&&flip!==isDescendant(t,t.node(edge.w),tailLabel)});return _.min(candidates,function(edge){return slack(g,edge)})}function exchangeEdges(t,g,e,f){var v=e.v,w=e.w;t.removeEdge(v,w);t.setEdge(f.v,f.w,{});initLowLimValues(t);initCutValues(t,g);updateRanks(t,g)}function updateRanks(t,g){var root=_.find(t.nodes(),function(v){return!g.node(v).parent}),vs=preorder(t,root);vs=vs.slice(1);_.each(vs,function(v){var parent=t.node(v).parent,edge=g.edge(v,parent),flipped=false;if(!edge){edge=g.edge(parent,v);flipped=true}g.node(v).rank=g.node(parent).rank+(flipped?edge.minlen:-edge.minlen)})}function isTreeEdge(tree,u,v){return tree.hasEdge(u,v)}function isDescendant(tree,vLabel,rootLabel){return rootLabel.low<=vLabel.lim&&vLabel.lim<=rootLabel.lim}},{"../graphlib":33,"../lodash":36,"../util":55,"./feasible-tree":51,"./util":54}],54:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports={longestPath:longestPath,slack:slack};function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.min(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY){rank=0}return label.rank=rank}_.each(g.sources(),dfs)}function slack(g,e){return g.node(e.w).rank-g.node(e.v).rank-g.edge(e).minlen}},{"../lodash":36}],55:[function(require,module,exports){"use strict";var _=require("./lodash"),Graph=require("./graphlib").Graph;module.exports={addDummyNode:addDummyNode,simplify:simplify,asNonCompoundGraph:asNonCompoundGraph,successorWeights:successorWeights,predecessorWeights:predecessorWeights,intersectRect:intersectRect,buildLayerMatrix:buildLayerMatrix,normalizeRanks:normalizeRanks,removeEmptyRanks:removeEmptyRanks,addBorderNode:addBorderNode,maxRank:maxRank,partition:partition,time:time,notime:notime};function addDummyNode(g,type,attrs,name){var v;do{v=_.uniqueId(name)}while(g.hasNode(v));attrs.dummy=type;g.setNode(v,attrs);return v}function simplify(g){var simplified=(new Graph).setGraph(g.graph());_.each(g.nodes(),function(v){simplified.setNode(v,g.node(v))});_.each(g.edges(),function(e){var simpleLabel=simplified.edge(e.v,e.w)||{weight:0,minlen:1},label=g.edge(e);simplified.setEdge(e.v,e.w,{weight:simpleLabel.weight+label.weight,minlen:Math.max(simpleLabel.minlen,label.minlen)})});return simplified}function asNonCompoundGraph(g){var simplified=new Graph({multigraph:g.isMultigraph()}).setGraph(g.graph());_.each(g.nodes(),function(v){if(!g.children(v).length){simplified.setNode(v,g.node(v))}});_.each(g.edges(),function(e){simplified.setEdge(e,g.edge(e))});return simplified}function successorWeights(g){var weightMap=_.map(g.nodes(),function(v){var sucs={}; -_.each(g.outEdges(v),function(e){sucs[e.w]=(sucs[e.w]||0)+g.edge(e).weight});return sucs});return _.zipObject(g.nodes(),weightMap)}function predecessorWeights(g){var weightMap=_.map(g.nodes(),function(v){var preds={};_.each(g.inEdges(v),function(e){preds[e.v]=(preds[e.v]||0)+g.edge(e).weight});return preds});return _.zipObject(g.nodes(),weightMap)}function intersectRect(rect,point){var x=rect.x;var y=rect.y;var dx=point.x-x;var dy=point.y-y;var w=rect.width/2;var h=rect.height/2;if(!dx&&!dy){throw new Error("Not possible to find intersection inside of the rectangle")}var sx,sy;if(Math.abs(dy)*w>Math.abs(dx)*h){if(dy<0){h=-h}sx=h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=w*dy/dx}return{x:x+sx,y:y+sy}}function buildLayerMatrix(g){var layering=_.map(_.range(maxRank(g)+1),function(){return[]});_.each(g.nodes(),function(v){var node=g.node(v),rank=node.rank;if(!_.isUndefined(rank)){layering[rank][node.order]=v}});return layering}function normalizeRanks(g){var min=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));_.each(g.nodes(),function(v){var node=g.node(v);if(_.has(node,"rank")){node.rank-=min}})}function removeEmptyRanks(g){var offset=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));var layers=[];_.each(g.nodes(),function(v){var rank=g.node(v).rank-offset;if(!_.has(layers,rank)){layers[rank]=[]}layers[rank].push(v)});var delta=0,nodeRankFactor=g.graph().nodeRankFactor;_.each(layers,function(vs,i){if(_.isUndefined(vs)&&i%nodeRankFactor!==0){--delta}else if(delta){_.each(vs,function(v){g.node(v).rank+=delta})}})}function addBorderNode(g,prefix,rank,order){var node={width:0,height:0};if(arguments.length>=4){node.rank=rank;node.order=order}return addDummyNode(g,"border",node,prefix)}function maxRank(g){return _.max(_.map(g.nodes(),function(v){var rank=g.node(v).rank;if(!_.isUndefined(rank)){return rank}}))}function partition(collection,fn){var result={lhs:[],rhs:[]};_.each(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+" time: "+(_.now()-start)+"ms")}}function notime(name,fn){return fn()}},{"./graphlib":33,"./lodash":36}],56:[function(require,module,exports){module.exports="0.7.1"},{}],57:[function(require,module,exports){var lib=require("./lib");module.exports={Graph:lib.Graph,json:require("./lib/json"),alg:require("./lib/alg"),version:lib.version}},{"./lib":73,"./lib/alg":64,"./lib/json":74}],58:[function(require,module,exports){var _=require("../lodash");module.exports=components;function components(g){var visited={},cmpts=[],cmpt;function dfs(v){if(_.has(visited,v))return;visited[v]=true;cmpt.push(v);_.each(g.successors(v),dfs);_.each(g.predecessors(v),dfs)}_.each(g.nodes(),function(v){cmpt=[];dfs(v);if(cmpt.length){cmpts.push(cmpt)}});return cmpts}},{"../lodash":75}],59:[function(require,module,exports){var _=require("../lodash");module.exports=dfs;function dfs(g,vs,order){if(!_.isArray(vs)){vs=[vs]}var acc=[],visited={};_.each(vs,function(v){if(!g.hasNode(v)){throw new Error("Graph does not have node: "+v)}doDfs(g,v,order==="post",visited,acc)});return acc}function doDfs(g,v,postorder,visited,acc){if(!_.has(visited,v)){visited[v]=true;if(!postorder){acc.push(v)}_.each(g.neighbors(v),function(w){doDfs(g,w,postorder,visited,acc)});if(postorder){acc.push(v)}}}},{"../lodash":75}],60:[function(require,module,exports){var dijkstra=require("./dijkstra"),_=require("../lodash");module.exports=dijkstraAll;function dijkstraAll(g,weightFunc,edgeFunc){return _.transform(g.nodes(),function(acc,v){acc[v]=dijkstra(g,v,weightFunc,edgeFunc)},{})}},{"../lodash":75,"./dijkstra":61}],61:[function(require,module,exports){var _=require("../lodash"),PriorityQueue=require("../data/priority-queue");module.exports=dijkstra;var DEFAULT_WEIGHT_FUNC=_.constant(1);function dijkstra(g,source,weightFn,edgeFn){return runDijkstra(g,String(source),weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runDijkstra(g,source,weightFn,edgeFn){var results={},pq=new PriorityQueue,v,vEntry;var updateNeighbors=function(edge){var w=edge.v!==v?edge.v:edge.w,wEntry=results[w],weight=weightFn(edge),distance=vEntry.distance+weight;if(weight<0){throw new Error("dijkstra does not allow negative edge weights. "+"Bad edge: "+edge+" Weight: "+weight)}if(distance0){v=pq.removeMin();vEntry=results[v];if(vEntry.distance===Number.POSITIVE_INFINITY){break}edgeFn(v).forEach(updateNeighbors)}return results}},{"../data/priority-queue":71,"../lodash":75}],62:[function(require,module,exports){var _=require("../lodash"),tarjan=require("./tarjan");module.exports=findCycles;function findCycles(g){return _.filter(tarjan(g),function(cmpt){return cmpt.length>1})}},{"../lodash":75,"./tarjan":69}],63:[function(require,module,exports){var _=require("../lodash");module.exports=floydWarshall;var DEFAULT_WEIGHT_FUNC=_.constant(1);function floydWarshall(g,weightFn,edgeFn){return runFloydWarshall(g,weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runFloydWarshall(g,weightFn,edgeFn){var results={},nodes=g.nodes();nodes.forEach(function(v){results[v]={};results[v][v]={distance:0};nodes.forEach(function(w){if(v!==w){results[v][w]={distance:Number.POSITIVE_INFINITY}}});edgeFn(v).forEach(function(edge){var w=edge.v===v?edge.w:edge.v,d=weightFn(edge);results[v][w]={distance:d,predecessor:v}})});nodes.forEach(function(k){var rowK=results[k];nodes.forEach(function(i){var rowI=results[i];nodes.forEach(function(j){var ik=rowI[k];var kj=rowK[j];var ij=rowI[j];var altDistance=ik.distance+kj.distance;if(altDistance0){v=pq.removeMin();if(_.has(parents,v)){result.setEdge(v,parents[v])}else if(init){throw new Error("Input graph is not connected: "+g)}else{init=true}g.nodeEdges(v).forEach(updateNeighbors)}return result}},{"../data/priority-queue":71,"../graph":72,"../lodash":75}],69:[function(require,module,exports){var _=require("../lodash");module.exports=tarjan;function tarjan(g){var index=0,stack=[],visited={},results=[];function dfs(v){var entry=visited[v]={onStack:true,lowlink:index,index:index++};stack.push(v);g.successors(v).forEach(function(w){if(!_.has(visited,w)){dfs(w);entry.lowlink=Math.min(entry.lowlink,visited[w].lowlink)}else if(visited[w].onStack){entry.lowlink=Math.min(entry.lowlink,visited[w].index)}});if(entry.lowlink===entry.index){var cmpt=[],w;do{w=stack.pop();visited[w].onStack=false;cmpt.push(w)}while(v!==w);results.push(cmpt)}}g.nodes().forEach(function(v){if(!_.has(visited,v)){dfs(v)}});return results}},{"../lodash":75}],70:[function(require,module,exports){var _=require("../lodash");module.exports=topsort;topsort.CycleException=CycleException;function topsort(g){var visited={},stack={},results=[];function visit(node){if(_.has(stack,node)){throw new CycleException}if(!_.has(visited,node)){stack[node]=true;visited[node]=true;_.each(g.predecessors(node),visit);delete stack[node];results.push(node)}}_.each(g.sinks(),visit);if(_.size(visited)!==g.nodeCount()){throw new CycleException}return results}function CycleException(){}},{"../lodash":75}],71:[function(require,module,exports){var _=require("../lodash");module.exports=PriorityQueue;function PriorityQueue(){this._arr=[];this._keyIndices={}}PriorityQueue.prototype.size=function(){return this._arr.length};PriorityQueue.prototype.keys=function(){return this._arr.map(function(x){return x.key})};PriorityQueue.prototype.has=function(key){return _.has(this._keyIndices,key)};PriorityQueue.prototype.priority=function(key){var index=this._keyIndices[key];if(index!==undefined){return this._arr[index].priority}};PriorityQueue.prototype.min=function(){if(this.size()===0){throw new Error("Queue underflow")}return this._arr[0].key};PriorityQueue.prototype.add=function(key,priority){var keyIndices=this._keyIndices;key=String(key);if(!_.has(keyIndices,key)){var arr=this._arr;var index=arr.length;keyIndices[key]=index;arr.push({key:key,priority:priority});this._decrease(index);return true}return false};PriorityQueue.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var min=this._arr.pop();delete this._keyIndices[min.key];this._heapify(0);return min.key};PriorityQueue.prototype.decrease=function(key,priority){var index=this._keyIndices[key];if(priority>this._arr[index].priority){throw new Error("New priority is greater than current priority. "+"Key: "+key+" Old: "+this._arr[index].priority+" New: "+priority)}this._arr[index].priority=priority;this._decrease(index)};PriorityQueue.prototype._heapify=function(i){var arr=this._arr;var l=2*i,r=l+1,largest=i;if(l>1;if(arr[parent].priority1){this.setNode(v,value)}else{this.setNode(v)}},this);return this};Graph.prototype.setNode=function(v,value){if(_.has(this._nodes,v)){if(arguments.length>1){this._nodes[v]=value}return this}this._nodes[v]=arguments.length>1?value:this._defaultNodeLabelFn(v);if(this._isCompound){this._parent[v]=GRAPH_NODE;this._children[v]={};this._children[GRAPH_NODE][v]=true}this._in[v]={};this._preds[v]={};this._out[v]={};this._sucs[v]={};++this._nodeCount;return this};Graph.prototype.node=function(v){return this._nodes[v]};Graph.prototype.hasNode=function(v){return _.has(this._nodes,v)};Graph.prototype.removeNode=function(v){var self=this;if(_.has(this._nodes,v)){var removeEdge=function(e){self.removeEdge(self._edgeObjs[e])};delete this._nodes[v];if(this._isCompound){this._removeFromParentsChildList(v);delete this._parent[v];_.each(this.children(v),function(child){this.setParent(child)},this);delete this._children[v]}_.each(_.keys(this._in[v]),removeEdge);delete this._in[v];delete this._preds[v];_.each(_.keys(this._out[v]),removeEdge);delete this._out[v];delete this._sucs[v];--this._nodeCount}return this};Graph.prototype.setParent=function(v,parent){if(!this._isCompound){throw new Error("Cannot set parent in a non-compound graph")}if(_.isUndefined(parent)){parent=GRAPH_NODE}else{for(var ancestor=parent;!_.isUndefined(ancestor);ancestor=this.parent(ancestor)){if(ancestor===v){throw new Error("Setting "+parent+" as parent of "+v+" would create create a cycle")}}this.setNode(parent)}this.setNode(v);this._removeFromParentsChildList(v);this._parent[v]=parent;this._children[parent][v]=true;return this};Graph.prototype._removeFromParentsChildList=function(v){delete this._children[this._parent[v]][v]};Graph.prototype.parent=function(v){if(this._isCompound){var parent=this._parent[v];if(parent!==GRAPH_NODE){return parent}}};Graph.prototype.children=function(v){if(_.isUndefined(v)){v=GRAPH_NODE}if(this._isCompound){var children=this._children[v];if(children){return _.keys(children)}}else if(v===GRAPH_NODE){return this.nodes()}else if(this.hasNode(v)){return[]}};Graph.prototype.predecessors=function(v){var predsV=this._preds[v];if(predsV){return _.keys(predsV)}};Graph.prototype.successors=function(v){var sucsV=this._sucs[v];if(sucsV){return _.keys(sucsV)}};Graph.prototype.neighbors=function(v){var preds=this.predecessors(v);if(preds){return _.union(preds,this.successors(v))}};Graph.prototype.setDefaultEdgeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultEdgeLabelFn=newDefault;return this};Graph.prototype.edgeCount=function(){return this._edgeCount};Graph.prototype.edges=function(){return _.values(this._edgeObjs)};Graph.prototype.setPath=function(vs,value){var self=this,args=arguments;_.reduce(vs,function(v,w){if(args.length>1){self.setEdge(v,w,value)}else{self.setEdge(v,w)}return w});return this};Graph.prototype.setEdge=function(){var v,w,name,value,valueSpecified=false;if(_.isPlainObject(arguments[0])){v=arguments[0].v;w=arguments[0].w;name=arguments[0].name;if(arguments.length===2){value=arguments[1];valueSpecified=true}}else{v=arguments[0];w=arguments[1];name=arguments[3];if(arguments.length>2){value=arguments[2];valueSpecified=true}}v=""+v;w=""+w;if(!_.isUndefined(name)){name=""+name}var e=edgeArgsToId(this._isDirected,v,w,name);if(_.has(this._edgeLabels,e)){if(valueSpecified){this._edgeLabels[e]=value}return this}if(!_.isUndefined(name)&&!this._isMultigraph){throw new Error("Cannot set a named edge when isMultigraph = false")}this.setNode(v);this.setNode(w);this._edgeLabels[e]=valueSpecified?value:this._defaultEdgeLabelFn(v,w,name);var edgeObj=edgeArgsToObj(this._isDirected,v,w,name);v=edgeObj.v;w=edgeObj.w;Object.freeze(edgeObj);this._edgeObjs[e]=edgeObj;incrementOrInitEntry(this._preds[w],v);incrementOrInitEntry(this._sucs[v],w);this._in[w][e]=edgeObj;this._out[v][e]=edgeObj;this._edgeCount++;return this};Graph.prototype.edge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return this._edgeLabels[e]};Graph.prototype.hasEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return _.has(this._edgeLabels,e)};Graph.prototype.removeEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name),edge=this._edgeObjs[e];if(edge){v=edge.v;w=edge.w;delete this._edgeLabels[e];delete this._edgeObjs[e];decrementOrRemoveEntry(this._preds[w],v);decrementOrRemoveEntry(this._sucs[v],w);delete this._in[w][e];delete this._out[v][e];this._edgeCount--}return this};Graph.prototype.inEdges=function(v,u){var inV=this._in[v];if(inV){var edges=_.values(inV);if(!u){return edges}return _.filter(edges,function(edge){return edge.v===u})}};Graph.prototype.outEdges=function(v,w){var outV=this._out[v];if(outV){var edges=_.values(outV);if(!w){return edges}return _.filter(edges,function(edge){return edge.w===w})}};Graph.prototype.nodeEdges=function(v,w){var inEdges=this.inEdges(v,w);if(inEdges){return inEdges.concat(this.outEdges(v,w))}};function incrementOrInitEntry(map,k){if(_.has(map,k)){map[k]++}else{map[k]=1}}function decrementOrRemoveEntry(map,k){if(!--map[k]){delete map[k]}}function edgeArgsToId(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}return v+EDGE_KEY_DELIM+w+EDGE_KEY_DELIM+(_.isUndefined(name)?DEFAULT_EDGE_NAME:name)}function edgeArgsToObj(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}var edgeObj={v:v,w:w};if(name){edgeObj.name=name}return edgeObj}function edgeObjToId(isDirected,edgeObj){return edgeArgsToId(isDirected,edgeObj.v,edgeObj.w,edgeObj.name)}},{"./lodash":75}],73:[function(require,module,exports){module.exports={Graph:require("./graph"),version:require("./version")}},{"./graph":72,"./version":76}],74:[function(require,module,exports){var _=require("./lodash"),Graph=require("./graph");module.exports={write:write,read:read};function write(g){var json={options:{directed:g.isDirected(),multigraph:g.isMultigraph(),compound:g.isCompound()},nodes:writeNodes(g),edges:writeEdges(g)};if(!_.isUndefined(g.graph())){json.value=_.clone(g.graph())}return json}function writeNodes(g){return _.map(g.nodes(),function(v){var nodeValue=g.node(v),parent=g.parent(v),node={v:v};if(!_.isUndefined(nodeValue)){node.value=nodeValue}if(!_.isUndefined(parent)){node.parent=parent}return node})}function writeEdges(g){return _.map(g.edges(),function(e){var edgeValue=g.edge(e),edge={v:e.v,w:e.w};if(!_.isUndefined(e.name)){edge.name=e.name}if(!_.isUndefined(edgeValue)){edge.value=edgeValue}return edge})}function read(json){var g=new Graph(json.options).setGraph(json.value);_.each(json.nodes,function(entry){g.setNode(entry.v,entry.value);if(entry.parent){g.setParent(entry.v,entry.parent)}});_.each(json.edges,function(entry){g.setEdge({v:entry.v,w:entry.w,name:entry.name},entry.value)});return g}},{"./graph":72,"./lodash":75}],75:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],76:[function(require,module,exports){module.exports="1.0.1"},{}],77:[function(require,module,exports){(function(global){(function(){var undefined;var arrayPool=[],objectPool=[];var idCounter=0;var keyPrefix=+new Date+"";var largeArraySize=75;var maxPoolSize=40;var whitespace=" \f "+"\n\r\u2028\u2029"+" ᠎              ";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reFuncName=/^\s*function[ \n\r\t]+\w/;var reInterpolate=/<%=([\s\S]+?)%>/g;var reLeadingSpacesAndZeros=RegExp("^["+whitespace+"]*0+(?=.$)");var reNoMatch=/($^)/;var reThis=/\bthis\b/;var reUnescapedString=/['\n\r\t\u2028\u2029\\]/g;var contextProps=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"];var templateCounter=0;var argsClass="[object Arguments]",arrayClass="[object Array]",boolClass="[object Boolean]",dateClass="[object Date]",funcClass="[object Function]",numberClass="[object Number]",objectClass="[object Object]",regexpClass="[object RegExp]",stringClass="[object String]";var cloneableClasses={};cloneableClasses[funcClass]=false;cloneableClasses[argsClass]=cloneableClasses[arrayClass]=cloneableClasses[boolClass]=cloneableClasses[dateClass]=cloneableClasses[numberClass]=cloneableClasses[objectClass]=cloneableClasses[regexpClass]=cloneableClasses[stringClass]=true;var debounceOptions={leading:false,maxWait:0,trailing:false};var descriptor={configurable:false,enumerable:false,value:null,writable:false};var objectTypes={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};var root=objectTypes[typeof window]&&window||this;var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var freeGlobal=objectTypes[typeof global]&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal)){root=freeGlobal}function baseIndexOf(array,value,fromIndex){var index=(fromIndex||0)-1,length=array?array.length:0;while(++index-1?0:-1:cache?0:-1}function cachePush(value){var cache=this.cache,type=typeof value;if(type=="boolean"||value==null){cache[value]=true}else{if(type!="number"&&type!="string"){type="object"}var key=type=="number"?value:keyPrefix+value,typeCache=cache[type]||(cache[type]={});if(type=="object"){(typeCache[key]||(typeCache[key]=[])).push(value)}else{typeCache[key]=true}}}function charAtCallback(value){return value.charCodeAt(0)}function compareAscending(a,b){var ac=a.criteria,bc=b.criteria,index=-1,length=ac.length;while(++indexother||typeof value=="undefined"){return 1}if(value/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function baseBind(bindData){var func=bindData[0],partialArgs=bindData[2],thisArg=bindData[4];function bound(){if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(this instanceof bound){var thisBinding=baseCreate(func.prototype),result=func.apply(thisBinding,args||arguments);return isObject(result)?result:thisBinding}return func.apply(thisArg,args||arguments)}setBindData(bound,bindData);return bound}function baseClone(value,isDeep,callback,stackA,stackB){if(callback){var result=callback(value);if(typeof result!="undefined"){return result}}var isObj=isObject(value);if(isObj){var className=toString.call(value);if(!cloneableClasses[className]){return value}var ctor=ctorByClass[className];switch(className){case boolClass:case dateClass:return new ctor(+value);case numberClass:case stringClass:return new ctor(value);case regexpClass:result=ctor(value.source,reFlags.exec(value));result.lastIndex=value.lastIndex;return result}}else{return value}var isArr=isArray(value);if(isDeep){var initedStack=!stackA;stackA||(stackA=getArray());stackB||(stackB=getArray());var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}result=isArr?ctor(value.length):{}}else{result=isArr?slice(value):assign({},value)}if(isArr){if(hasOwnProperty.call(value,"index")){result.index=value.index}if(hasOwnProperty.call(value,"input")){result.input=value.input}}if(!isDeep){return result}stackA.push(value);stackB.push(result);(isArr?forEach:forOwn)(value,function(objValue,key){result[key]=baseClone(objValue,isDeep,callback,stackA,stackB)});if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseCreate(prototype,properties){return isObject(prototype)?nativeCreate(prototype):{}}if(!nativeCreate){baseCreate=function(){function Object(){}return function(prototype){if(isObject(prototype)){Object.prototype=prototype;var result=new Object;Object.prototype=null}return result||context.Object()}}()}function baseCreateCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(typeof thisArg=="undefined"||!("prototype"in func)){return func}var bindData=func.__bindData__;if(typeof bindData=="undefined"){if(support.funcNames){bindData=!func.name}bindData=bindData||!support.funcDecomp;if(!bindData){var source=fnToString.call(func);if(!support.funcNames){bindData=!reFuncName.test(source)}if(!bindData){bindData=reThis.test(source);setBindData(func,bindData)}}}if(bindData===false||bindData!==true&&bindData[1]&1){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 2:return function(a,b){return func.call(thisArg,a,b)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)}}return bind(func,thisArg)}function baseCreateWrapper(bindData){var func=bindData[0],bitmask=bindData[1],partialArgs=bindData[2],partialRightArgs=bindData[3],thisArg=bindData[4],arity=bindData[5];var isBind=bitmask&1,isBindKey=bitmask&2,isCurry=bitmask&4,isCurryBound=bitmask&8,key=func;function bound(){var thisBinding=isBind?thisArg:this;if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(partialRightArgs||isCurry){args||(args=slice(arguments));if(partialRightArgs){push.apply(args,partialRightArgs)}if(isCurry&&args.length=largeArraySize&&indexOf===baseIndexOf,result=[];if(isLarge){var cache=createCache(values);if(cache){indexOf=cacheIndexOf;values=cache}else{isLarge=false}}while(++index-1}})}}stackA.pop();stackB.pop();if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseMerge(object,source,callback,stackA,stackB){(isArray(source)?forEach:forOwn)(source,function(source,key){var found,isArr,result=source,value=object[key];if(source&&((isArr=isArray(source))||isPlainObject(source))){var stackLength=stackA.length;while(stackLength--){if(found=stackA[stackLength]==source){value=stackB[stackLength];break}}if(!found){var isShallow;if(callback){result=callback(value,source);if(isShallow=typeof result!="undefined"){value=result}}if(!isShallow){value=isArr?isArray(value)?value:[]:isPlainObject(value)?value:{}}stackA.push(source);stackB.push(value);if(!isShallow){baseMerge(value,source,callback,stackA,stackB)}}}else{if(callback){result=callback(value,source);if(typeof result=="undefined"){result=source}}if(typeof result!="undefined"){value=result}}object[key]=value})}function baseRandom(min,max){return min+floor(nativeRandom()*(max-min+1))}function baseUniq(array,isSorted,callback){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[];var isLarge=!isSorted&&length>=largeArraySize&&indexOf===baseIndexOf,seen=callback||isLarge?getArray():result;if(isLarge){var cache=createCache(seen);indexOf=cacheIndexOf;seen=cache}while(++index":">",'"':""","'":"'"};var htmlUnescapes=invert(htmlEscapes);var reEscapedHtml=RegExp("("+keys(htmlUnescapes).join("|")+")","g"),reUnescapedHtml=RegExp("["+keys(htmlEscapes).join("")+"]","g");var assign=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength=typeof guard=="number"?2:args.length;if(argsLength>3&&typeof args[argsLength-2]=="function"){var callback=baseCreateCallback(args[--argsLength-1],args[argsLength--],2)}else if(argsLength>2&&typeof args[argsLength-1]=="function"){callback=args[--argsLength]}while(++argsIndex3&&typeof args[length-2]=="function"){var callback=baseCreateCallback(args[--length-1],args[length--],2)}else if(length>2&&typeof args[length-1]=="function"){callback=args[--length]}var sources=slice(arguments,1,length),index=-1,stackA=getArray(),stackB=getArray();while(++index-1}else if(typeof length=="number"){result=(isString(collection)?collection.indexOf(target,fromIndex):indexOf(collection,target,fromIndex))>-1}else{forOwn(collection,function(value){if(++index>=fromIndex){return!(result=value===target)}})}return result}var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key]++:result[key]=1});function every(collection,callback,thisArg){var result=true;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++indexresult){result=value}}}else{callback=callback==null&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3);forEach(collection,function(value,index,collection){var current=callback(value,index,collection);if(current>computed){computed=current;result=value}})}return result}function min(collection,callback,thisArg){var computed=Infinity,result=computed;if(typeof callback!="function"&&thisArg&&thisArg[callback]===collection){callback=null}if(callback==null&&isArray(collection)){var index=-1,length=collection.length;while(++index=largeArraySize&&createCache(argsIndex?args[argsIndex]:seen))}}var array=args[0],index=-1,length=array?array.length:0,result=[];outer:while(++index>>1;callback(array[mid])1?arguments:arguments[0],index=-1,length=array?max(pluck(array,"length")):0,result=Array(length<0?0:length);while(++index2?createWrapper(func,17,slice(arguments,2),null,thisArg):createWrapper(func,1,null,null,thisArg)}function bindAll(object){var funcs=arguments.length>1?baseFlatten(arguments,true,false,1):functions(object),index=-1,length=funcs.length;while(++index2?createWrapper(key,19,slice(arguments,2),null,object):createWrapper(key,3,null,null,object)}function compose(){var funcs=arguments,length=funcs.length;while(length--){if(!isFunction(funcs[length])){throw new TypeError}}return function(){var args=arguments,length=funcs.length;while(length--){args=[funcs[length].apply(this,args)]}return args[0]}}function curry(func,arity){arity=typeof arity=="number"?arity:+arity||func.length;return createWrapper(func,4,null,null,null,arity)}function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(!isFunction(func)){throw new TypeError}wait=nativeMax(0,wait)||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&(nativeMax(wait,options.maxWait)||0);trailing="trailing"in options?options.trailing:trailing}var delayed=function(){var remaining=wait-(now()-stamp);if(remaining<=0){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}};var maxDelayed=function(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}};return function(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading);if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId) -}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}}function defer(func){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,1);return setTimeout(function(){func.apply(undefined,args)},1)}function delay(func,wait){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,2);return setTimeout(function(){func.apply(undefined,args)},wait)}function memoize(func,resolver){if(!isFunction(func)){throw new TypeError}var memoized=function(){var cache=memoized.cache,key=resolver?resolver.apply(this,arguments):keyPrefix+arguments[0];return hasOwnProperty.call(cache,key)?cache[key]:cache[key]=func.apply(this,arguments)};memoized.cache={};return memoized}function once(func){var ran,result;if(!isFunction(func)){throw new TypeError}return function(){if(ran){return result}ran=true;result=func.apply(this,arguments);func=null;return result}}function partial(func){return createWrapper(func,16,slice(arguments,1))}function partialRight(func){return createWrapper(func,32,null,slice(arguments,1))}function throttle(func,wait,options){var leading=true,trailing=true;if(!isFunction(func)){throw new TypeError}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?options.leading:leading;trailing="trailing"in options?options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function wrap(value,wrapper){return createWrapper(wrapper,16,[value])}function constant(value){return function(){return value}}function createCallback(func,thisArg,argCount){var type=typeof func;if(func==null||type=="function"){return baseCreateCallback(func,thisArg,argCount)}if(type!="object"){return property(func)}var props=keys(func),key=props[0],a=func[key];if(props.length==1&&a===a&&!isObject(a)){return function(object){var b=object[key];return a===b&&(a!==0||1/a==1/b)}}return function(object){var length=props.length,result=false;while(length--){if(!(result=baseIsEqual(object[props[length]],func[props[length]],null,true))){break}}return result}}function escape(string){return string==null?"":String(string).replace(reUnescapedHtml,escapeHtmlChar)}function identity(value){return value}function mixin(object,source,options){var chain=true,methodNames=source&&functions(source);if(!source||!options&&!methodNames.length){if(options==null){options=source}ctor=lodashWrapper;source=object;object=lodash;methodNames=functions(source)}if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}var ctor=object,isFunc=isFunction(ctor);forEach(methodNames,function(methodName){var func=object[methodName]=source[methodName];if(isFunc){ctor.prototype[methodName]=function(){var chainAll=this.__chain__,value=this.__wrapped__,args=[value];push.apply(args,arguments);var result=func.apply(object,args);if(chain||chainAll){if(value===result&&isObject(result)){return this}result=new ctor(result);result.__chain__=chainAll}return result}}})}function noConflict(){context._=oldDash;return this}function noop(){}var now=isNative(now=Date.now)&&now||function(){return(new Date).getTime()};var parseInt=nativeParseInt(whitespace+"08")==8?nativeParseInt:function(value,radix){return nativeParseInt(isString(value)?value.replace(reLeadingSpacesAndZeros,""):value,radix||0)};function property(key){return function(object){return object[key]}}function random(min,max,floating){var noMin=min==null,noMax=max==null;if(floating==null){if(typeof min=="boolean"&&noMax){floating=min;min=1}else if(!noMax&&typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}function result(object,key){if(object){var value=object[key];return isFunction(value)?object[key]():value}}function template(text,data,options){var settings=lodash.templateSettings;text=String(text||"");options=defaults({},options,settings);var imports=defaults({},options.imports,settings.imports),importsKeys=keys(imports),importsValues=values(imports);var isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");text.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=text.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable,hasVariable=variable;if(!hasVariable){variable="obj";source="with ("+variable+") {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+variable+") {\n"+(hasVariable?"":variable+" || ("+variable+" = {});\n")+"var __t, __p = '', __e = _.escape"+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var sourceURL="\n/*\n//# sourceURL="+(options.sourceURL||"/lodash/template/source["+templateCounter++ +"]")+"\n*/";try{var result=Function(importsKeys,"return "+source+sourceURL).apply(undefined,importsValues)}catch(e){e.source=source;throw e}if(data){return result(data)}result.source=source;return result}function times(n,callback,thisArg){n=(n=+n)>-1?n:0;var index=-1,result=Array(n);callback=baseCreateCallback(callback,thisArg,1);while(++indext?-1:t>e?1:t>=e?0:0/0}function n(t){return null===t?0/0:+t}function r(t){return!isNaN(t)}function i(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function a(t){return t.length}function o(t){for(var e=1;t*e%1;)e*=10;return e}function u(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function s(){this._=Object.create(null)}function c(t){return(t+="")===hu||t[0]===fu?fu+t:t}function l(t){return(t+="")[0]===fu?t.slice(1):t}function h(t){return c(t)in this._}function f(t){return(t=c(t))in this._&&delete this._[t]}function d(){var t=[];for(var e in this._)t.push(l(e));return t}function p(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function v(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=du.length;r>n;++n){var i=du[n]+e;if(i in t)return i}}function b(){}function _(){}function x(t){function e(){for(var e,r=n,i=-1,a=r.length;++in;n++)for(var i,a=t[n],o=0,u=a.length;u>o;o++)(i=a[o])&&e(i,o,n);return t}function Y(t){return gu(t,wu),t}function j(t){var e,n;return function(r,i,a){var o,u=t[a].update,s=u.length;for(a!=n&&(n=a,e=0),i>=e&&(e=i+1);!(o=u[e])&&++e0&&(t=t.slice(0,u));var c=Au.get(t);return c&&(t=c,s=G),u?e?i:r:e?b:a}function H(t,e){return function(n){var r=Xo.event;Xo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{Xo.event=r}}}function G(t,e){var n=H(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function $(){var t=".dragsuppress-"+ ++Du,e="click"+t,n=Xo.select(eu).on("touchmove"+t,w).on("dragstart"+t,w).on("selectstart"+t,w);if(Eu){var r=tu.style,i=r[Eu];r[Eu]="none"}return function(a){function o(){n.on(e,null)}n.on(t,null),Eu&&(r[Eu]=i),a&&(n.on(e,function(){w(),o()},!0),setTimeout(o,0))}}function W(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Mu&&(eu.scrollX||eu.scrollY)){n=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Mu=!(i.f||i.e),n.remove()}return Mu?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}function Z(){return Xo.event.changedTouches[0].identifier}function X(){return Xo.event.target}function K(){return eu}function J(t){return t>0?1:0>t?-1:0}function Q(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function te(t){return t>1?0:-1>t?Su:Math.acos(t)}function ee(t){return t>1?Tu:-1>t?-Tu:Math.asin(t)}function ne(t){return((t=Math.exp(t))-1/t)/2}function re(t){return((t=Math.exp(t))+1/t)/2}function ie(t){return((t=Math.exp(2*t))-1)/(t+1)}function ae(t){return(t=Math.sin(t/2))*t}function oe(){}function ue(t,e,n){return this instanceof ue?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ue?new ue(t.h,t.s,t.l):xe(""+t,we,ue):new ue(t,e,n)}function se(t,e,n){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?a+(o-a)*t/60:180>t?o:240>t?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*r(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,o=.5>=n?n*(1+e):n+e-n*e,a=2*n-o,new me(i(t+120),i(t),i(t-120))}function ce(t,e,n){return this instanceof ce?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ce?new ce(t.h,t.c,t.l):t instanceof he?de(t.l,t.a,t.b):de((t=ke((t=Xo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ce(t,e,n)}function le(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new he(n,Math.cos(t*=Bu)*e,Math.sin(t)*e)}function he(t,e,n){return this instanceof he?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof he?new he(t.l,t.a,t.b):t instanceof ce?le(t.h,t.c,t.l):ke((t=me(t)).r,t.g,t.b):new he(t,e,n)}function fe(t,e,n){var r=(t+16)/116,i=r+e/500,a=r-n/200;return i=pe(i)*Vu,r=pe(r)*Hu,a=pe(a)*Gu,new me(ye(3.2404542*i-1.5371385*r-.4985314*a),ye(-.969266*i+1.8760108*r+.041556*a),ye(.0556434*i-.2040259*r+1.0572252*a))}function de(t,e,n){return t>0?new ce(Math.atan2(n,e)*Nu,Math.sqrt(e*e+n*n),t):new ce(0/0,0/0,t)}function pe(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ge(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ye(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function me(t,e,n){return this instanceof me?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof me?new me(t.r,t.g,t.b):xe(""+t,me,se):new me(t,e,n)}function ve(t){return new me(t>>16,t>>8&255,255&t)}function be(t){return ve(t)+""}function _e(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function xe(t,e,n){var r,i,a,o=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/i.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(Ee(i[0]),Ee(i[1]),Ee(i[2]))}return(a=Zu.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o=o>>4|o,u=240&a,u=u>>4|u,s=15&a,s=s<<4|s):7===t.length&&(o=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),e(o,u,s))}function we(t,e,n){var r,i,a=Math.min(t/=255,e/=255,n/=255),o=Math.max(t,e,n),u=o-a,s=(o+a)/2;return u?(i=.5>s?u/(o+a):u/(2-o-a),r=t==o?(e-n)/u+(n>e?6:0):e==o?(n-t)/u+2:(t-e)/u+4,r*=60):(r=0/0,i=s>0&&1>s?0:r),new ue(r,i,s)}function ke(t,e,n){t=Ae(t),e=Ae(e),n=Ae(n);var r=ge((.4124564*t+.3575761*e+.1804375*n)/Vu),i=ge((.2126729*t+.7151522*e+.072175*n)/Hu),a=ge((.0193339*t+.119192*e+.9503041*n)/Gu);return he(116*i-16,500*(r-i),200*(i-a))}function Ae(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ee(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function De(t){return"function"==typeof t?t:function(){return t}}function Me(t){return t}function Se(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Ce(e,n,t,r)}}function Ce(t,e,n,r){function i(){var t,e=s.status;if(!e&&Fe(s)||e>=200&&300>e||304===e){try{t=n.call(a,s)}catch(r){return void o.error.call(a,r)}o.load.call(a,t)}else o.error.call(a,s)}var a={},o=Xo.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,c=null;return!eu.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var e=Xo.event;Xo.event=t;try{o.progress.call(a,s)}finally{Xo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(c=t,a):c},a.response=function(t){return n=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(Jo(arguments)))}}),a.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),s.setRequestHeader)for(var l in u)s.setRequestHeader(l,u[l]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=c&&(s.responseType=c),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,s),s.send(null==r?null:r),a},a.abort=function(){return s.abort(),a},Xo.rebind(a,o,"on"),null==r?a:a.get(Te(r))}function Te(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Fe(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Le(){var t=Be(),e=Ne()-t;e>24?(isFinite(e)&&(clearTimeout(Qu),Qu=setTimeout(Le,e)),Ju=0):(Ju=1,es(Le))}function Be(){var t=Date.now();for(ts=Xu;ts;)t>=ts.t&&(ts.f=ts.c(t-ts.t)),ts=ts.n;return t}function Ne(){for(var t,e=Xu,n=1/0;e;)e.f?e=t?t.n=e.n:Xu=e.n:(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function qe(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,a=r&&n?function(t,e){for(var i=t.length,a=[],o=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>e&&(u=Math.max(1,e-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>e));)u=r[o=(o+1)%r.length];return a.reverse().join(n)}:Me;return function(t){var n=rs.exec(t),r=n[1]||" ",o=n[2]||">",u=n[3]||"-",s=n[4]||"",c=n[5],l=+n[6],h=n[7],f=n[8],d=n[9],p=1,g="",y="",m=!1,v=!0;switch(f&&(f=+f.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,y="%",d="f";break;case"p":p=100,y="%",d="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+d.toLowerCase());case"c":v=!1;case"d":m=!0,f=0;break;case"s":p=-1,d="r"}"$"===s&&(g=i[0],y=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):("e"==d||"f"==d)&&(f=Math.max(0,Math.min(20,f)))),d=is.get(d)||Re;var b=c&&h;return function(t){var n=y;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>p){var s=Xo.formatPrefix(t,f);t=s.scale(t),n=s.symbol+y}else t*=p;t=d(t,f);var _,x,w=t.lastIndexOf(".");if(0>w){var k=v?t.lastIndexOf("e"):-1;0>k?(_=t,x=""):(_=t.substring(0,k),x=t.substring(k))}else _=t.substring(0,w),x=e+t.substring(w+1);!c&&h&&(_=a(_,1/0));var A=g.length+_.length+x.length+(b?0:i.length),E=l>A?new Array(A=l-A+1).join(r):"";return b&&(_=a(E+_,E.length?l-x.length:1/0)),i+=g,t=_+x,("<"===o?i+t+E:">"===o?E+i+t:"^"===o?E.substring(0,A>>=1)+i+t+E.substring(A):i+(b?t:E+t))+n}}}function Re(t){return t+""}function Pe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ue(t,e,n){function r(e){var n=t(e),r=a(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new os(n-1)),1),n}function a(t,n){return e(t=new os(+t),n),t}function o(t,r,a){var o=i(t),u=[];if(a>1)for(;r>o;)n(o)%a||u.push(new Date(+o)),e(o,1);else for(;r>o;)u.push(new Date(+o)),e(o,1);return u}function u(t,e,n){try{os=Pe;var r=new Pe;return r._=t,o(r,e,n)}finally{os=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Ye(t);return s.floor=s,s.round=Ye(r),s.ceil=Ye(i),s.offset=Ye(a),s.range=u,t}function Ye(t){return function(e,n){try{os=Pe;var r=new Pe;return r._=e,t(r,n)._}finally{os=Date}}}function je(t){function e(t){function e(e){for(var n,i,a,o=[],u=-1,s=0;++uu;){if(r>=c)return-1;if(i=e.charCodeAt(u++),37===i){if(o=e.charAt(u++),a=C[o in ss?e.charAt(u++):o],!a||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){w.lastIndex=0;var r=w.exec(e.slice(n));return r?(t.w=k.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){D.lastIndex=0;var r=D.exec(e.slice(n));return r?(t.m=M.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){A.lastIndex=0;var r=A.exec(e.slice(n));return r?(t.m=E.get(r[0].toLowerCase()),n+r[0].length):-1}function u(t,e,r){return n(t,S.c.toString(),e,r)}function s(t,e,r){return n(t,S.x.toString(),e,r)}function c(t,e,r){return n(t,S.X.toString(),e,r)}function l(t,e,n){var r=b.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,g=t.days,y=t.shortDays,m=t.months,v=t.shortMonths;e.utc=function(t){function n(t){try{os=Pe;var e=new os;return e._=t,r(e)}finally{os=Date}}var r=e(t);return n.parse=function(t){try{os=Pe;var e=r.parse(t);return e&&e._}finally{os=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=cn;var b=Xo.map(),_=Ve(g),x=He(g),w=Ve(y),k=He(y),A=Ve(m),E=He(m),D=Ve(v),M=He(v);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var S={a:function(t){return y[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:e(h),d:function(t,e){return ze(t.getDate(),e,2)},e:function(t,e){return ze(t.getDate(),e,2)},H:function(t,e){return ze(t.getHours(),e,2)},I:function(t,e){return ze(t.getHours()%12||12,e,2)},j:function(t,e){return ze(1+as.dayOfYear(t),e,3)},L:function(t,e){return ze(t.getMilliseconds(),e,3)},m:function(t,e){return ze(t.getMonth()+1,e,2)},M:function(t,e){return ze(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return ze(t.getSeconds(),e,2)},U:function(t,e){return ze(as.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return ze(as.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return ze(t.getFullYear()%100,e,2)},Y:function(t,e){return ze(t.getFullYear()%1e4,e,4)},Z:un,"%":function(){return"%"}},C={a:r,A:i,b:a,B:o,c:u,d:tn,e:tn,H:nn,I:nn,j:en,L:on,m:Qe,M:rn,p:l,S:an,U:$e,w:Ge,W:We,x:s,X:c,y:Xe,Y:Ze,Z:Ke,"%":sn};return e}function ze(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",a=i.length;return r+(n>a?new Array(n-a+1).join(e)+i:i)}function Ve(t){return new RegExp("^(?:"+t.map(Xo.requote).join("|")+")","i")}function He(t){for(var e=new s,n=-1,r=t.length;++n68?1900:2e3)}function Qe(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function tn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function en(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function nn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function rn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function an(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function on(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function un(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=lu(e)/60|0,i=lu(e)%60;return n+ze(r,"0",2)+ze(i,"0",2)}function sn(t,e,n){ls.lastIndex=0;var r=ls.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function cn(t){for(var e=t.length,n=-1;++n=0?1:-1,u=o*n,s=Math.cos(e),c=Math.sin(e),l=a*c,h=i*s+l*Math.cos(u),f=l*o*Math.sin(u);ys.add(Math.atan2(f,h)),r=t,i=s,a=c}var e,n,r,i,a;ms.point=function(o,u){ms.point=t,r=(e=o)*Bu,i=Math.cos(u=(n=u)*Bu/2+Su/4),a=Math.sin(u)},ms.lineEnd=function(){t(e,n)}}function yn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function vn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function bn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _n(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function wn(t){return[Math.atan2(t[1],t[0]),ee(t[2])]}function kn(t,e){return lu(t[0]-e[0])u;++u)i.point((n=t[u])[0],n[1]);return void i.lineEnd()}var s=new Ln(n,t,null,!0),c=new Ln(n,null,s,!1);s.o=c,a.push(s),o.push(c),s=new Ln(r,t,null,!1),c=new Ln(r,null,s,!0),s.o=c,a.push(s),o.push(c)}}),o.sort(e),Fn(a),Fn(o),a.length){for(var u=0,s=n,c=o.length;c>u;++u)o[u].e=s=!s;for(var l,h,f=a[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;l=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var u=0,c=l.length;c>u;++u)i.point((h=l[u])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p){l=d.p.z;for(var u=l.length-1;u>=0;--u)i.point((h=l[u])[0],h[1])}else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,l=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Fn(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o1&&2&e&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Nn))}var d,p,g,y=e(a),m=i.invert(r[0],r[1]),v={point:o,lineStart:s,lineEnd:c,polygonStart:function(){v.point=l,v.lineStart=h,v.lineEnd=f,d=[],p=[]},polygonEnd:function(){v.point=o,v.lineStart=s,v.lineEnd=c,d=Xo.merge(d);var t=Un(m,p);d.length?(x||(a.polygonStart(),x=!0),Tn(d,In,t,n,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=On(),_=e(b),x=!1;return v}}function Nn(t){return t.length>1}function On(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:b,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function In(t,e){return((t=t.x)[0]<0?t[1]-Tu-Fu:Tu-t[1])-((e=e.x)[0]<0?e[1]-Tu-Fu:Tu-e[1])}function qn(t){var e,n=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var u=a>0?Su:-Su,s=lu(a-n);lu(s-Su)0?Tu:-Tu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),e=0):i!==u&&s>=Su&&(lu(n-i)Fu?Math.atan((Math.sin(e)*(a=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+r)/2}function Pn(t,e,n,r){var i;if(null==t)i=n*Tu,r.point(-Su,i),r.point(0,i),r.point(Su,i),r.point(Su,0),r.point(Su,-i),r.point(0,-i),r.point(-Su,-i),r.point(-Su,0),r.point(-Su,i);else if(lu(t[0]-e[0])>Fu){var a=t[0]u;++u){var c=e[u],l=c.length;if(l)for(var h=c[0],f=h[0],d=h[1]/2+Su/4,p=Math.sin(d),g=Math.cos(d),y=1;;){y===l&&(y=0),t=c[y];var m=t[0],v=t[1]/2+Su/4,b=Math.sin(v),_=Math.cos(v),x=m-f,w=x>=0?1:-1,k=w*x,A=k>Su,E=p*b;if(ys.add(Math.atan2(E*w*Math.sin(k),g*_+E*Math.cos(k))),a+=A?x+w*Cu:x,A^f>=n^m>=n){var D=vn(yn(h),yn(t));xn(D);var M=vn(i,D);xn(M);var S=(A^x>=0?-1:1)*ee(M[2]);(r>S||r===S&&(D[0]||D[1]))&&(o+=A^x>=0?1:-1)}if(!y++)break;f=m,p=b,g=_,h=t}}return(-Fu>a||Fu>a&&0>ys)^1&o}function Yn(t){function e(t,e){return Math.cos(t)*Math.cos(e)>a}function n(t){var n,a,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(h,f){var d,p=[h,f],g=e(h,f),y=o?g?0:i(h,f):g?i(h+(0>h?Su:-Su),f):0;if(!n&&(c=s=g)&&t.lineStart(),g!==s&&(d=r(n,p),(kn(n,d)||kn(p,d))&&(p[0]+=Fu,p[1]+=Fu,g=e(p[0],p[1]))),g!==s)l=0,g?(t.lineStart(),d=r(p,n),t.point(d[0],d[1])):(d=r(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(u&&n&&o^g){var m;y&a||!(m=r(p,n,!0))||(l=0,o?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&kn(n,p)||t.point(p[0],p[1]),n=p,s=g,a=y},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return l|(c&&s)<<1}}}function r(t,e,n){var r=yn(t),i=yn(e),o=[1,0,0],u=vn(r,i),s=mn(u,u),c=u[0],l=s-c*c;if(!l)return!n&&t;var h=a*s/l,f=-a*c/l,d=vn(o,u),p=_n(o,h),g=_n(u,f);bn(p,g);var y=d,m=mn(p,y),v=mn(y,y),b=m*m-v*(mn(p,p)-1);if(!(0>b)){var _=Math.sqrt(b),x=_n(y,(-m-_)/v);if(bn(x,p),x=wn(x),!n)return x;var w,k=t[0],A=e[0],E=t[1],D=e[1];k>A&&(w=k,k=A,A=w);var M=A-k,S=lu(M-Su)M;if(!S&&E>D&&(w=E,E=D,D=w),C?S?E+D>0^x[1]<(lu(x[0]-k)Su^(k<=x[0]&&x[0]<=A)){var T=_n(y,(-m+_)/v);return bn(T,p),[x,wn(T)]}}}function i(e,n){var r=o?t:Su-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var a=Math.cos(t),o=a>0,u=lu(a)>Fu,s=gr(t,6*Bu);return Bn(e,n,s,o?[0,-t]:[-Su,t-Su])}function jn(t,e,n,r){return function(i){var a,o=i.a,u=i.b,s=o.x,c=o.y,l=u.x,h=u.y,f=0,d=1,p=l-s,g=h-c;if(a=t-s,p||!(a>0)){if(a/=p,0>p){if(f>a)return;d>a&&(d=a)}else if(p>0){if(a>d)return;a>f&&(f=a)}if(a=n-s,p||!(0>a)){if(a/=p,0>p){if(a>d)return;a>f&&(f=a)}else if(p>0){if(f>a)return;d>a&&(d=a)}if(a=e-c,g||!(a>0)){if(a/=g,0>g){if(f>a)return;d>a&&(d=a)}else if(g>0){if(a>d)return;a>f&&(f=a)}if(a=r-c,g||!(0>a)){if(a/=g,0>g){if(a>d)return;a>f&&(f=a)}else if(g>0){if(f>a)return;d>a&&(d=a)}return f>0&&(i.a={x:s+f*p,y:c+f*g}),1>d&&(i.b={x:s+d*p,y:c+d*g}),i}}}}}}function zn(t,e,n,r){function i(r,i){return lu(r[0]-t)0?0:3:lu(r[0]-n)0?2:1:lu(r[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(u){function s(t){for(var e=0,n=y.length,r=t[1],i=0;n>i;++i)for(var a,o=1,u=y[i],s=u.length,c=u[0];s>o;++o)a=u[o],c[1]<=r?a[1]>r&&Q(c,a,t)>0&&++e:a[1]<=r&&Q(c,a,t)<0&&--e,c=a;return 0!==e}function c(a,u,s,c){var l=0,h=0;if(null==a||(l=i(a,s))!==(h=i(u,s))||o(a,u)<0^s>0){do c.point(0===l||3===l?t:n,l>1?r:e);while((l=(l+s+4)%4)!==h)}else c.point(u[0],u[1])}function l(i,a){return i>=t&&n>=i&&a>=e&&r>=a}function h(t,e){l(t,e)&&u.point(t,e)}function f(){C.point=p,y&&y.push(m=[]),A=!0,k=!1,x=w=0/0}function d(){g&&(p(v,b),_&&k&&M.rejoin(),g.push(M.buffer())),C.point=h,k&&u.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var n=l(t,e);if(y&&m.push([t,e]),A)v=t,b=e,_=n,A=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&k)u.point(t,e);else{var r={a:{x:x,y:w},b:{x:t,y:e}};S(r)?(k||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),E=!1):n&&(u.lineStart(),u.point(t,e),E=!1)}x=t,w=e,k=n}var g,y,m,v,b,_,x,w,k,A,E,D=u,M=On(),S=jn(t,e,n,r),C={point:h,lineStart:f,lineEnd:d,polygonStart:function(){u=M,g=[],y=[],E=!0},polygonEnd:function(){u=D,g=Xo.merge(g);var e=s([t,r]),n=E&&e,i=g.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),c(null,null,1,u),u.lineEnd()),i&&Tn(g,a,e,c,u),u.polygonEnd()),g=y=m=null}};return C}}function Vn(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return n=e.invert(n,r),n&&t.invert(n[0],n[1])}),n}function Hn(t){var e=0,n=Su/3,r=ur(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Su/180,n=t[1]*Su/180):[e/Su*180,n/Su*180]},i}function Gn(t,e){function n(t,e){var n=Math.sqrt(a-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),o-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,a=1+r*(2*i-r),o=Math.sqrt(a)/i;return n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,ee((a-(t*t+n*n)*i*i)/(2*i))]},n}function $n(){function t(t,e){Bs+=i*t-r*e,r=t,i=e}var e,n,r,i;Rs.point=function(a,o){Rs.point=t,e=r=a,n=i=o},Rs.lineEnd=function(){t(e,n)}}function Wn(t,e){Ns>t&&(Ns=t),t>Is&&(Is=t),Os>e&&(Os=e),e>qs&&(qs=e)}function Zn(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),u.point=n}function n(t,e){o.push("L",t,",",e)}function r(){u.point=t}function i(){o.push("Z")}var a=Xn(4.5),o=[],u={point:t,lineStart:function(){u.point=e},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return a=Xn(t),u},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return u}function Xn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Kn(t,e){_s+=t,xs+=e,++ws}function Jn(){function t(t,r){var i=t-e,a=r-n,o=Math.sqrt(i*i+a*a);ks+=o*(e+t)/2,As+=o*(n+r)/2,Es+=o,Kn(e=t,n=r)}var e,n;Us.point=function(r,i){Us.point=t,Kn(e=r,n=i)}}function Qn(){Us.point=Kn}function tr(){function t(t,e){var n=t-r,a=e-i,o=Math.sqrt(n*n+a*a);ks+=o*(r+t)/2,As+=o*(i+e)/2,Es+=o,o=i*t-r*e,Ds+=o*(r+t),Ms+=o*(i+e),Ss+=3*o,Kn(r=t,i=e)}var e,n,r,i;Us.point=function(a,o){Us.point=t,Kn(e=r=a,n=i=o)},Us.lineEnd=function(){t(e,n)}}function er(t){function e(e,n){t.moveTo(e,n),t.arc(e,n,o,0,Cu)}function n(e,n){t.moveTo(e,n),u.point=r}function r(e,n){t.lineTo(e,n)}function i(){u.point=e}function a(){t.closePath()}var o=4.5,u={point:e,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=a},polygonEnd:function(){u.lineEnd=i,u.point=e},pointRadius:function(t){return o=t,u},result:b};return u}function nr(t){function e(t){return(u?r:n)(t)}function n(e){return ar(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){b=0/0,A.point=a,e.lineStart()}function a(n,r){var a=yn([n,r]),o=t(n,r);i(b,_,v,x,w,k,b=o[0],_=o[1],v=n,x=a[0],w=a[1],k=a[2],u,e),e.point(b,_)}function o(){A.point=n,e.lineEnd()}function s(){r(),A.point=c,A.lineEnd=l -}function c(t,e){a(h=t,f=e),d=b,p=_,g=x,y=w,m=k,A.point=a}function l(){i(b,_,v,x,w,k,d,p,h,g,y,m,u,e),A.lineEnd=o,o()}var h,f,d,p,g,y,m,v,b,_,x,w,k,A={point:n,lineStart:r,lineEnd:o,polygonStart:function(){e.polygonStart(),A.lineStart=s},polygonEnd:function(){e.polygonEnd(),A.lineStart=r}};return A}function i(e,n,r,u,s,c,l,h,f,d,p,g,y,m){var v=l-e,b=h-n,_=v*v+b*b;if(_>4*a&&y--){var x=u+d,w=s+p,k=c+g,A=Math.sqrt(x*x+w*w+k*k),E=Math.asin(k/=A),D=lu(lu(k)-1)a||lu((v*T+b*F)/_-.5)>.3||o>u*d+s*p+c*g)&&(i(e,n,r,u,s,c,S,C,D,x/=A,w/=A,k,y,m),m.point(S,C),i(S,C,D,x,w,k,l,h,f,d,p,g,y,m))}}var a=.5,o=Math.cos(30*Bu),u=16;return e.precision=function(t){return arguments.length?(u=(a=t*t)>0&&16,e):Math.sqrt(a)},e}function rr(t){var e=nr(function(e,n){return t([e*Nu,n*Nu])});return function(t){return sr(e(t))}}function ir(t){this.stream=t}function ar(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function or(t){return ur(function(){return t})()}function ur(t){function e(t){return t=u(t[0]*Bu,t[1]*Bu),[t[0]*f+s,c-t[1]*f]}function n(t){return t=u.invert((t[0]-s)/f,(c-t[1])/f),t&&[t[0]*Nu,t[1]*Nu]}function r(){u=Vn(o=hr(m,v,b),a);var t=a(g,y);return s=d-t[0]*f,c=p+t[1]*f,i()}function i(){return l&&(l.valid=!1,l=null),e}var a,o,u,s,c,l,h=nr(function(t,e){return t=a(t,e),[t[0]*f+s,c-t[1]*f]}),f=150,d=480,p=250,g=0,y=0,m=0,v=0,b=0,_=Ts,x=Me,w=null,k=null;return e.stream=function(t){return l&&(l.valid=!1),l=sr(_(o,h(x(t)))),l.valid=!0,l},e.clipAngle=function(t){return arguments.length?(_=null==t?(w=t,Ts):Yn((w=+t)*Bu),i()):w},e.clipExtent=function(t){return arguments.length?(k=t,x=t?zn(t[0][0],t[0][1],t[1][0],t[1][1]):Me,i()):k},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Bu,y=t[1]%360*Bu,r()):[g*Nu,y*Nu]},e.rotate=function(t){return arguments.length?(m=t[0]%360*Bu,v=t[1]%360*Bu,b=t.length>2?t[2]%360*Bu:0,r()):[m*Nu,v*Nu,b*Nu]},Xo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&n,r()}}function sr(t){return ar(t,function(e,n){t.point(e*Bu,n*Bu)})}function cr(t,e){return[t,e]}function lr(t,e){return[t>Su?t-Cu:-Su>t?t+Cu:t,e]}function hr(t,e,n){return t?e||n?Vn(dr(t),pr(e,n)):dr(t):e||n?pr(e,n):lr}function fr(t){return function(e,n){return e+=t,[e>Su?e-Cu:-Su>e?e+Cu:e,n]}}function dr(t){var e=fr(t);return e.invert=fr(-t),e}function pr(t,e){function n(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*r+u*i;return[Math.atan2(s*a-l*o,u*r-c*i),ee(l*a+s*o)]}var r=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*a-s*o;return[Math.atan2(s*a+c*o,u*r+l*i),ee(l*r-u*i)]},n}function gr(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,a,o,u){var s=o*e;null!=i?(i=yr(n,i),a=yr(n,a),(o>0?a>i:i>a)&&(i+=o*Cu)):(i=t+o*Cu,a=t-.5*s);for(var c,l=i;o>0?l>a:a>l;l-=s)u.point((c=wn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function yr(t,e){var n=yn(e);n[0]-=t,xn(n);var r=te(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Fu)%(2*Math.PI)}function mr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function vr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function br(t){return t.source}function _r(t){return t.target}function xr(t,e,n,r){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),l=o*Math.cos(n),h=o*Math.sin(n),f=2*Math.asin(Math.sqrt(ae(r-e)+i*o*ae(n-t))),d=1/Math.sin(f),p=f?function(t){var e=Math.sin(t*=f)*d,n=Math.sin(f-t)*d,r=n*s+e*l,i=n*c+e*h,o=n*a+e*u;return[Math.atan2(i,r)*Nu,Math.atan2(o,Math.sqrt(r*r+i*i))*Nu]}:function(){return[t*Nu,e*Nu]};return p.distance=f,p}function wr(){function t(t,i){var a=Math.sin(i*=Bu),o=Math.cos(i),u=lu((t*=Bu)-e),s=Math.cos(u);Ys+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=r*a-n*o*s)*u),n*a+r*o*s),e=t,n=a,r=o}var e,n,r;js.point=function(i,a){e=i*Bu,n=Math.sin(a*=Bu),r=Math.cos(a),js.point=t},js.lineEnd=function(){js.point=js.lineEnd=b}}function kr(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),a=t(r*i);return[a*i*Math.sin(e),a*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,r*o),Math.asin(r&&n*a/r)]},n}function Ar(t,e){function n(t,e){o>0?-Tu+Fu>e&&(e=-Tu+Fu):e>Tu-Fu&&(e=Tu-Fu);var n=o/Math.pow(i(e),a);return[n*Math.sin(a*t),o-n*Math.cos(a*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Su/4+t/2)},a=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),o=r*Math.pow(i(t),a)/a;return a?(n.invert=function(t,e){var n=o-e,r=J(a)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/a,2*Math.atan(Math.pow(o/r,1/a))-Tu]},n):Dr}function Er(t,e){function n(t,e){var n=a-e;return[n*Math.sin(i*t),a-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),a=r/i+t;return lu(i)i;i++){for(;r>1&&Q(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Lr(t,e){return t[0]-e[0]||t[1]-e[1]}function Br(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Nr(t,e,n,r){var i=t[0],a=n[0],o=e[0]-i,u=r[0]-a,s=t[1],c=n[1],l=e[1]-s,h=r[1]-c,f=(u*(s-c)-h*(i-a))/(h*o-u*l);return[i+f*o,s+f*l]}function Or(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Ir(){ri(this),this.edge=this.site=this.circle=null}function qr(t){var e=tc.pop()||new Ir;return e.site=t,e}function Rr(t){Wr(t),Ks.remove(t),tc.push(t),ri(t)}function Pr(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},a=t.P,o=t.N,u=[t];Rr(t);for(var s=a;s.circle&&lu(n-s.circle.x)l;++l)c=u[l],s=u[l-1],ti(c.edge,s.site,c.site,i);s=u[0],c=u[h-1],c.edge=Jr(s.site,c.site,null,i),$r(s),$r(c)}function Ur(t){for(var e,n,r,i,a=t.x,o=t.y,u=Ks._;u;)if(r=Yr(u,o)-a,r>Fu)u=u.L;else{if(i=a-jr(u,o),!(i>Fu)){r>-Fu?(e=u.P,n=u):i>-Fu?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}var s=qr(t);if(Ks.insert(e,s),e||n){if(e===n)return Wr(e),n=qr(e.site),Ks.insert(s,n),s.edge=n.edge=Jr(e.site,s.site),$r(e),void $r(n);if(!n)return void(s.edge=Jr(e.site,s.site));Wr(e),Wr(n);var c=e.site,l=c.x,h=c.y,f=t.x-l,d=t.y-h,p=n.site,g=p.x-l,y=p.y-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_={x:(y*v-d*b)/m+l,y:(f*b-g*v)/m+h};ti(n.edge,c,p,_),s.edge=Jr(c,t,null,_),n.edge=Jr(t,p,null,_),$r(e),$r(n)}}function Yr(t,e){var n=t.site,r=n.x,i=n.y,a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;n=o.site;var u=n.x,s=n.y,c=s-e;if(!c)return u;var l=u-r,h=1/a-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-s+c/2+i-a/2)))/h+r:(r+u)/2}function jr(t,e){var n=t.N;if(n)return Yr(n,e);var r=t.site;return r.y===e?r.x:1/0}function zr(t){this.site=t,this.edges=[]}function Vr(t){for(var e,n,r,i,a,o,u,s,c,l,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],g=Xs,y=g.length;y--;)if(a=g[y],a&&a.prepare())for(u=a.edges,s=u.length,o=0;s>o;)l=u[o].end(),r=l.x,i=l.y,c=u[++o%s].start(),e=c.x,n=c.y,(lu(r-e)>Fu||lu(i-n)>Fu)&&(u.splice(o,0,new ei(Qr(a.site,l,lu(r-h)Fu?{x:h,y:lu(e-h)Fu?{x:lu(n-p)Fu?{x:f,y:lu(e-f)Fu?{x:lu(n-d)=-Lu)){var d=s*s+c*c,p=l*l+h*h,g=(h*d-c*p)/f,y=(s*p-l*d)/f,h=y+u,m=ec.pop()||new Gr;m.arc=t,m.site=i,m.x=g+o,m.y=h+Math.sqrt(g*g+y*y),m.cy=h,t.circle=m;for(var v=null,b=Qs._;b;)if(m.yy||y>=u)return;if(f>p){if(a){if(a.y>=c)return}else a={x:y,y:s};n={x:y,y:c}}else{if(a){if(a.yr||r>1)if(f>p){if(a){if(a.y>=c)return}else a={x:(s-i)/r,y:s};n={x:(c-i)/r,y:c}}else{if(a){if(a.yd){if(a){if(a.x>=u)return}else a={x:o,y:r*o+i};n={x:u,y:r*u+i}}else{if(a){if(a.xa&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:yi(n,r)})),a=ic.lastIndex;return ar;++r)u[(n=s[r]).i]=n.x(t);return u.join("")})}function vi(t,e){for(var n,r=Xo.interpolators.length;--r>=0&&!(n=Xo.interpolators[r](t,e)););return n}function bi(t,e){var n,r=[],i=[],a=t.length,o=e.length,u=Math.min(t.length,e.length);for(n=0;u>n;++n)r.push(vi(t[n],e[n]));for(;a>n;++n)i[n]=t[n];for(;o>n;++n)i[n]=e[n];return function(t){for(n=0;u>n;++n)i[n]=r[n](t);return i}}function _i(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function xi(t){return function(e){return 1-t(1-e)}}function wi(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function ki(t){return t*t}function Ai(t){return t*t*t}function Ei(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Di(t){return function(e){return Math.pow(e,t)}}function Mi(t){return 1-Math.cos(t*Tu)}function Si(t){return Math.pow(2,10*(t-1))}function Ci(t){return 1-Math.sqrt(1-t*t)}function Ti(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Cu*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Cu/e)}}function Fi(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Li(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Bi(t,e){t=Xo.hcl(t),e=Xo.hcl(e);var n=t.h,r=t.c,i=t.l,a=e.h-n,o=e.c-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.c:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return le(n+a*t,r+o*t,i+u*t)+""}}function Ni(t,e){t=Xo.hsl(t),e=Xo.hsl(e);var n=t.h,r=t.s,i=t.l,a=e.h-n,o=e.s-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.s:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return se(n+a*t,r+o*t,i+u*t)+""}}function Oi(t,e){t=Xo.lab(t),e=Xo.lab(e);var n=t.l,r=t.a,i=t.b,a=e.l-n,o=e.a-r,u=e.b-i;return function(t){return fe(n+a*t,r+o*t,i+u*t)+""}}function Ii(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function qi(t){var e=[t.a,t.b],n=[t.c,t.d],r=Pi(e),i=Ri(e,n),a=Pi(Ui(n,e,-i))||0;e[0]*n[1]180?l+=360:l-c>180&&(c+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:yi(c,l)})):l&&r.push(r.pop()+"rotate("+l+")"),h!=f?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:yi(h,f)}):f&&r.push(r.pop()+"skewX("+f+")"),d[0]!=p[0]||d[1]!=p[1]?(n=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:n-4,x:yi(d[0],p[0])},{i:n-2,x:yi(d[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),n=i.length,function(t){for(var e,a=-1;++a=0;)n.push(i[r])}function ta(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++on;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function ha(t){return t.reduce(fa,0)}function fa(t,e){return t+e[1]}function da(t,e){return pa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function pa(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,a=[];++n<=e;)a[n]=i*n+r;return a}function ga(t){return[Xo.min(t),Xo.max(t)]}function ya(t,e){return t.value-e.value}function ma(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function va(t,e){t._pack_next=e,e._pack_prev=t}function ba(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function _a(t){function e(t){l=Math.min(t.x-t.r,l),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((n=t.children)&&(c=n.length)){var n,r,i,a,o,u,s,c,l=1/0,h=-1/0,f=1/0,d=-1/0;if(n.forEach(xa),r=n[0],r.x=-r.r,r.y=0,e(r),c>1&&(i=n[1],i.x=i.r,i.y=0,e(i),c>2))for(a=n[2],Aa(r,i,a),e(a),ma(r,a),r._pack_prev=a,ma(a,i),i=r._pack_next,o=3;c>o;o++){Aa(r,i,a=n[o]);var p=0,g=1,y=1;for(u=i._pack_next;u!==i;u=u._pack_next,g++)if(ba(u,a)){p=1;break}if(1==p)for(s=r._pack_prev;s!==u._pack_prev&&!ba(s,a);s=s._pack_prev,y++);p?(y>g||g==y&&i.ro;o++)a=n[o],a.x-=m,a.y-=v,b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=b,n.forEach(wa)}}function xa(t){t._pack_next=t._pack_prev=t}function wa(t){delete t._pack_next,delete t._pack_prev}function ka(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var a=-1,o=i.length;++a=0;)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function Ta(t,e,n){return t.a.parent===e.parent?t.a:n}function Fa(t){return 1+Xo.max(t,function(t){return t.y})}function La(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ba(t){var e=t.children;return e&&e.length?Ba(e[0]):t}function Na(t){var e,n=t.children;return n&&(e=n.length)?Na(n[e-1]):t}function Oa(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ia(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>a&&(r+=a/2,a=0),{x:n,y:r,dx:i,dy:a}}function qa(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Ra(t){return t.rangeExtent?t.rangeExtent():qa(t.range())}function Pa(t,e,n,r){var i=n(t[0],t[1]),a=r(e[0],e[1]);return function(t){return a(i(t))}}function Ua(t,e){var n,r=0,i=t.length-1,a=t[r],o=t[i];return a>o&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Ya(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:gc}function ja(t,e,n,r){var i=[],a=[],o=0,u=Math.min(t.length,e.length)-1;for(t[u]2?ja:Pa,s=r?zi:ji;return o=i(t,e,s,n),u=i(e,t,s,vi),a}function a(t){return o(t)}var o,u;return a.invert=function(t){return u(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Ii)},a.clamp=function(t){return arguments.length?(r=t,i()):r},a.interpolate=function(t){return arguments.length?(n=t,i()):n},a.ticks=function(e){return $a(t,e)},a.tickFormat=function(e,n){return Wa(t,e,n)},a.nice=function(e){return Ha(t,e),i()},a.copy=function(){return za(t,e,n,r)},i()}function Va(t,e){return Xo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ha(t,e){return Ua(t,Ya(Ga(t,e)[2]))}function Ga(t,e){null==e&&(e=10);var n=qa(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),a=e/r*i;return.15>=a?i*=10:.35>=a?i*=5:.75>=a&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function $a(t,e){return Xo.range.apply(Xo,Ga(t,e))}function Wa(t,e,n){var r=Ga(t,e);if(n){var i=rs.exec(n);if(i.shift(),"s"===i[8]){var a=Xo.formatPrefix(Math.max(lu(r[0]),lu(r[1])));return i[7]||(i[7]="."+Za(a.scale(r[2]))),i[8]="f",n=Xo.format(i.join("")),function(t){return n(a.scale(t))+a.symbol}}i[7]||(i[7]="."+Xa(i[8],r)),n=i.join("")}else n=",."+Za(r[2])+"f";return Xo.format(n)}function Za(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Xa(t,e){var n=Za(e[2]);return t in yc?Math.abs(n-Za(Math.max(lu(e[0]),lu(e[1]))))+ +("e"!==t):n-2*("%"===t)}function Ka(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),o):e},o.nice=function(){var e=Ua(r.map(i),n?Math:vc);return t.domain(e),r=e.map(a),o},o.ticks=function(){var t=qa(r),o=[],u=t[0],s=t[1],c=Math.floor(i(u)),l=Math.ceil(i(s)),h=e%1?2:e;if(isFinite(l-c)){if(n){for(;l>c;c++)for(var f=1;h>f;f++)o.push(a(c)*f);o.push(a(c))}else for(o.push(a(c));c++0;f--)o.push(a(c)*f);for(c=0;o[c]s;l--);o=o.slice(c,l)}return o},o.tickFormat=function(t,e){if(!arguments.length)return mc;arguments.length<2?e=mc:"function"!=typeof e&&(e=Xo.format(e));var r,u=Math.max(.1,t/o.ticks().length),s=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(t){return t/a(s(i(t)+r))<=u?e(t):""}},o.copy=function(){return Ka(t.copy(),e,n,r)},Va(o,t)}function Ja(t,e,n){function r(e){return t(i(e))}var i=Qa(e),a=Qa(1/e);return r.invert=function(e){return a(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return $a(n,t)},r.tickFormat=function(t,e){return Wa(n,t,e)},r.nice=function(t){return r.domain(Ha(n,t))},r.exponent=function(o){return arguments.length?(i=Qa(e=o),a=Qa(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return Ja(t.copy(),e,n)},Va(r,t)}function Qa(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function to(t,e){function n(n){return a[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):0/0))-1)%a.length]}function r(e,n){return Xo.range(t.length).map(function(t){return e+n*t})}var i,a,o;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new s;for(var a,o=-1,u=r.length;++ot?[0/0,0/0]:[t>0?u[t-1]:e[0],te?0/0:e/a+t,[e,e+1/a]},r.copy=function(){return no(t,e,n)},i()}function ro(t,e){function n(n){return n>=n?e[Xo.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return ro(t,e)},n}function io(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return $a(t,e)},e.tickFormat=function(e,n){return Wa(t,e,n)},e.copy=function(){return io(t)},e}function ao(t){return t.innerRadius}function oo(t){return t.outerRadius}function uo(t){return t.startAngle}function so(t){return t.endAngle}function co(t){function e(e){function o(){c.push("M",a(t(l),u))}for(var s,c=[],l=[],h=-1,f=e.length,d=De(n),p=De(r);++h1&&i.push("H",r[0]),i.join("")}function po(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e1){u=e[1],a=t[s],s++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var c=2;c9&&(i=3*e/Math.sqrt(i),o[u]=i*n,o[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),a.push([i||0,o[u]*i||0]);return a}function To(t){return t.length<3?lo(t):t[0]+bo(t,Co(t))}function Fo(t){for(var e,n,r,i=-1,a=t.length;++in?c():(i.active=n,a.event&&a.event.start.call(t,l,e),a.tween.forEach(function(n,r){(r=r.call(t,l,e))&&g.push(r)}),void Xo.timer(function(){return p.c=s(r||1)?Cn:s,1},0,o))}function s(r){if(i.active!==n)return c();for(var o=r/d,u=h(o),s=g.length;s>0;)g[--s].call(t,u);return o>=1?(a.event&&a.event.end.call(t,l,e),c()):void 0}function c(){return--i.count?delete i[n]:delete t.__transition__,1}var l=t.__data__,h=a.ease,f=a.delay,d=a.duration,p=ts,g=[];return p.t=f+o,r>=f?u(r-f):void(p.c=u)},0,o)}}function zo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function Vo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function Ho(t){return t.toISOString()}function Go(t,e,n){function r(e){return t(e)}function i(t,n){var r=t[1]-t[0],i=r/n,a=Xo.bisect(zc,i);return a==zc.length?[e.year,Ga(t.map(function(t){return t/31536e6}),n)[2]]:a?e[i/zc[a-1]1?{floor:function(e){for(;n(e=t.floor(e));)e=$o(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=$o(+e+1);return e}}:t))},r.ticks=function(t,e){var n=qa(r.domain()),a=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(n[0],$o(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return Go(t.copy(),e,n)},Va(r,t)}function $o(t){return new Date(t)}function Wo(t){return JSON.parse(t.responseText)}function Zo(t){var e=Qo.createRange();return e.selectNode(Qo.body),e.createContextualFragment(t.responseText)}var Xo={version:"3.4.13"};Date.now||(Date.now=function(){return+new Date});var Ko=[].slice,Jo=function(t){return Ko.call(t)},Qo=document,tu=Qo.documentElement,eu=window;try{Jo(tu.childNodes)[0].nodeType}catch(nu){Jo=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Qo.createElement("div").style.setProperty("opacity",0,"")}catch(ru){var iu=eu.Element.prototype,au=iu.setAttribute,ou=iu.setAttributeNS,uu=eu.CSSStyleDeclaration.prototype,su=uu.setProperty;iu.setAttribute=function(t,e){au.call(this,t,e+"")},iu.setAttributeNS=function(t,e,n){ou.call(this,t,e,n+"")},uu.setProperty=function(t,e,n){su.call(this,t,e+"",n)}}Xo.ascending=t,Xo.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},Xo.min=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++ir&&(n=r)}else{for(;++i=n);)n=void 0;for(;++ir&&(n=r)}return n},Xo.max=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++in&&(n=r)}else{for(;++i=n);)n=void 0;for(;++in&&(n=r)}return n},Xo.extent=function(t,e){var n,r,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n);)n=i=void 0;for(;++ar&&(n=r),r>i&&(i=r))}else{for(;++a=n);)n=void 0;for(;++ar&&(n=r),r>i&&(i=r))}return[n,i]},Xo.sum=function(t,e){var n,i=0,a=t.length,o=-1;if(1===arguments.length)for(;++or?0:r);r>n;)a[n]=[e=i,i=t[++n]];return a},Xo.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,e=Xo.min(arguments,a),n=new Array(e);++t=0;)for(r=t[i],e=r.length;--e>=0;)n[--o]=r[e];return n};var lu=Math.abs;Xo.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var r,i=[],a=o(lu(n)),u=-1;if(t*=a,e*=a,n*=a,0>n)for(;(r=t+n*++u)>e;)i.push(r/a);else for(;(r=t+n*++u)=a.length)return r?r.call(i,o):n?o.sort(n):o;for(var c,l,h,f,d=-1,p=o.length,g=a[u++],y=new s;++d=a.length)return t;var r=[],i=o[n++];return t.forEach(function(t,i){r.push({key:t,values:e(i,n)})}),i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,r,i={},a=[],o=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(Xo.map,n,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},Xo.set=function(t){var e=new y;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},u(y,{has:h,add:function(t){return this._[c(t+="")]=!0,t},remove:f,values:d,size:p,empty:g,forEach:function(t){for(var e in this._)t.call(this,l(e))}}),Xo.behavior={},Xo.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},Xo.event=null,Xo.requote=function(t){return t.replace(pu,"\\$&")};var pu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,gu={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},yu=function(t,e){return e.querySelector(t)},mu=function(t,e){return e.querySelectorAll(t)},vu=tu.matches||tu[v(tu,"matchesSelector")],bu=function(t,e){return vu.call(t,e)};"function"==typeof Sizzle&&(yu=function(t,e){return Sizzle(t,e)[0]||null},mu=Sizzle,bu=Sizzle.matchesSelector),Xo.selection=function(){return ku};var _u=Xo.selection.prototype=[];_u.select=function(t){var e,n,r,i,a=[];t=D(t);for(var o=-1,u=this.length;++o=0&&(n=t.slice(0,e),t=t.slice(e+1)),xu.hasOwnProperty(n)?{space:xu[n],local:t}:t}},_u.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=Xo.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(S(e,t[e]));return this}return this.each(S(t,e))},_u.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=F(t)).length,i=-1;if(e=n.classList){for(;++ir){if("string"!=typeof t){2>r&&(e="");for(n in t)this.each(N(n,t[n],e));return this}if(2>r)return eu.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(N(t,e,n))},_u.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(O(e,t[e]));return this}return this.each(O(t,e))},_u.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},_u.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},_u.append=function(t){return t=I(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},_u.insert=function(t,e){return t=I(t),e=D(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},_u.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},_u.data=function(t,e){function n(t,n){var r,i,a,o=t.length,h=n.length,f=Math.min(o,h),d=new Array(h),p=new Array(h),g=new Array(o);if(e){var y,m=new s,v=new Array(o);for(r=-1;++rr;++r)p[r]=q(n[r]);for(;o>r;++r)g[r]=t[r]}p.update=d,p.parentNode=d.parentNode=g.parentNode=t.parentNode,u.push(p),c.push(d),l.push(g)}var r,i,a=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(r=this[0]).length);++aa;a++){i.push(e=[]),e.parentNode=(n=this[a]).parentNode;for(var u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return E(i)},_u.order=function(){for(var t=-1,e=this.length;++t=0;)(n=r[i])&&(a&&a!==n.nextSibling&&a.parentNode.insertBefore(n,a),a=n);return this},_u.sort=function(t){t=P.apply(this,arguments);for(var e=-1,n=this.length;++et;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var a=n[r];if(a)return a}return null},_u.size=function(){var t=0;return U(this,function(){++t}),t};var wu=[];Xo.selection.enter=Y,Xo.selection.enter.prototype=wu,wu.append=_u.append,wu.empty=_u.empty,wu.node=_u.node,wu.call=_u.call,wu.size=_u.size,wu.select=function(t){for(var e,n,r,i,a,o=[],u=-1,s=this.length;++ur){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(V(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(V(t,e,n))};var Au=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});Au.forEach(function(t){"on"+t in Qo&&Au.remove(t)});var Eu="onselectstart"in Qo?null:v(tu.style,"userSelect"),Du=0;Xo.mouse=function(t){return W(t,k())};var Mu=/WebKit/.test(eu.navigator.userAgent)?-1:0;Xo.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=k().changedTouches),e)for(var r,i=0,a=e.length;a>i;++i)if((r=e[i]).identifier===n)return W(t,r)},Xo.behavior.drag=function(){function t(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(t,e,i,a,o){return function(){function u(){var t,n,r=e(f,g);r&&(t=r[0]-b[0],n=r[1]-b[1],p|=t|n,b=r,d({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:n}))}function s(){e(f,g)&&(m.on(a+y,null).on(o+y,null),v(p&&Xo.event.target===h),d({type:"dragend"}))}var c,l=this,h=Xo.event.target,f=l.parentNode,d=n.of(l,arguments),p=0,g=t(),y=".drag"+(null==g?"":"-"+g),m=Xo.select(i()).on(a+y,u).on(o+y,s),v=$(),b=e(f,g);r?(c=r.apply(l,arguments),c=[c.x-b[0],c.y-b[1]]):c=[0,0],d({type:"dragstart"})}}var n=A(t,"drag","dragstart","dragend"),r=null,i=e(b,Xo.mouse,K,"mousemove","mouseup"),a=e(Z,Xo.touch,X,"touchmove","touchend");return t.origin=function(e){return arguments.length?(r=e,t):r},Xo.rebind(t,n,"on")},Xo.touches=function(t,e){return arguments.length<2&&(e=k().touches),e?Jo(e).map(function(e){var n=W(t,e);return n.identifier=e.identifier,n}):[]};var Su=Math.PI,Cu=2*Su,Tu=Su/2,Fu=1e-6,Lu=Fu*Fu,Bu=Su/180,Nu=180/Su,Ou=Math.SQRT2,Iu=2,qu=4;Xo.interpolateZoom=function(t,e){function n(t){var e=t*v;if(m){var n=re(g),o=a/(Iu*f)*(n*ie(Ou*e+g)-ne(g));return[r+o*c,i+o*l,a*n/re(Ou*e+g)]}return[r+t*c,i+t*l,a*Math.exp(Ou*e)]}var r=t[0],i=t[1],a=t[2],o=e[0],u=e[1],s=e[2],c=o-r,l=u-i,h=c*c+l*l,f=Math.sqrt(h),d=(s*s-a*a+qu*h)/(2*a*Iu*f),p=(s*s-a*a-qu*h)/(2*s*Iu*f),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(p*p+1)-p),m=y-g,v=(m||Math.log(s/a))/Ou;return n.duration=1e3*v,n},Xo.behavior.zoom=function(){function t(t){t.on(M,c).on(Uu+".zoom",h).on("dblclick.zoom",f).on(T,l)}function e(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function n(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}function r(t){k.k=Math.max(D[0],Math.min(D[1],t))}function i(t,e){e=n(e),k.x+=t[0]-e[0],k.y+=t[1]-e[1]}function a(){b&&b.domain(v.range().map(function(t){return(t-k.x)/k.k}).map(v.invert)),x&&x.domain(_.range().map(function(t){return(t-k.y)/k.k}).map(_.invert))}function o(t){t({type:"zoomstart"})}function u(t){a(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(t){t({type:"zoomend"})}function c(){function t(){l=1,i(Xo.mouse(r),f),u(c)}function n(){h.on(S,null).on(C,null),d(l&&Xo.event.target===a),s(c)}var r=this,a=Xo.event.target,c=F.of(r,arguments),l=0,h=Xo.select(eu).on(S,t).on(C,n),f=e(Xo.mouse(r)),d=$();z.call(r),o(c)}function l(){function t(){var t=Xo.touches(d);return f=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function n(){var e=Xo.event.target;Xo.select(e).on(b,a).on(_,h),x.push(e);for(var n=Xo.event.changedTouches,o=0,s=n.length;s>o;++o)g[n[o].identifier]=null;var c=t(),l=Date.now();if(1===c.length){if(500>l-m){var f=c[0],d=g[f.identifier];r(2*k.k),i(f,d),w(),u(p)}m=l}else if(c.length>1){var f=c[0],v=c[1],A=f[0]-v[0],E=f[1]-v[1];y=A*A+E*E}}function a(){for(var t,e,n,a,o=Xo.touches(d),s=0,c=o.length;c>s;++s,a=null)if(n=o[s],a=g[n.identifier]){if(e)break;t=n,e=a}if(a){var l=(l=n[0]-t[0])*l+(l=n[1]-t[1])*l,h=y&&Math.sqrt(l/y);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+a[0])/2,(e[1]+a[1])/2],r(h*f)}m=null,i(t,e),u(p)}function h(){if(Xo.event.touches.length){for(var e=Xo.event.changedTouches,n=0,r=e.length;r>n;++n)delete g[e[n].identifier];for(var i in g)return void t()}Xo.selectAll(x).on(v,null),A.on(M,c).on(T,l),E(),s(p)}var f,d=this,p=F.of(d,arguments),g={},y=0,v=".zoom-"+Xo.event.changedTouches[0].identifier,b="touchmove"+v,_="touchend"+v,x=[],A=Xo.select(d),E=$();z.call(d),n(),o(p),A.on(M,null).on(T,n)}function h(){var t=F.of(this,arguments);y?clearTimeout(y):(d=e(p=g||Xo.mouse(this)),z.call(this),o(t)),y=setTimeout(function(){y=null,s(t)},50),w(),r(Math.pow(2,.002*Ru())*k.k),i(p,d),u(t)}function f(){var t=F.of(this,arguments),n=Xo.mouse(this),a=e(n),c=Math.log(k.k)/Math.LN2;o(t),r(Math.pow(2,Xo.event.shiftKey?Math.ceil(c)-1:Math.floor(c)+1)),i(n,a),u(t),s(t)}var d,p,g,y,m,v,b,_,x,k={x:0,y:0,k:1},E=[960,500],D=Pu,M="mousedown.zoom",S="mousemove.zoom",C="mouseup.zoom",T="touchstart.zoom",F=A(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=F.of(this,arguments),e=k;Tc?Xo.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},o(t)}).tween("zoom:zoom",function(){var n=E[0],r=E[1],i=n/2,a=r/2,o=Xo.interpolateZoom([(i-k.x)/k.k,(a-k.y)/k.k,n/k.k],[(i-e.x)/e.k,(a-e.y)/e.k,n/e.k]);return function(e){var r=o(e),s=n/r[2];this.__chart__=k={x:i-r[0]*s,y:a-r[1]*s,k:s},u(t)}}).each("end.zoom",function(){s(t)}):(this.__chart__=k,o(t),u(t),s(t))})},t.translate=function(e){return arguments.length?(k={x:+e[0],y:+e[1],k:k.k},a(),t):[k.x,k.y]},t.scale=function(e){return arguments.length?(k={x:k.x,y:k.y,k:+e},a(),t):k.k},t.scaleExtent=function(e){return arguments.length?(D=null==e?Pu:[+e[0],+e[1]],t):D},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(E=e&&[+e[0],+e[1]],t):E},t.x=function(e){return arguments.length?(b=e,v=e.copy(),k={x:0,y:0,k:1},t):b},t.y=function(e){return arguments.length?(x=e,_=e.copy(),k={x:0,y:0,k:1},t):x},Xo.rebind(t,F,"on")};var Ru,Pu=[0,1/0],Uu="onwheel"in Qo?(Ru=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Qo?(Ru=function(){return Xo.event.wheelDelta},"mousewheel"):(Ru=function(){return-Xo.event.detail},"MozMousePixelScroll");Xo.color=oe,oe.prototype.toString=function(){return this.rgb()+""},Xo.hsl=ue;var Yu=ue.prototype=new oe;Yu.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,this.l/t)},Yu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,t*this.l)},Yu.rgb=function(){return se(this.h,this.s,this.l)},Xo.hcl=ce;var ju=ce.prototype=new oe;ju.brighter=function(t){return new ce(this.h,this.c,Math.min(100,this.l+zu*(arguments.length?t:1)))},ju.darker=function(t){return new ce(this.h,this.c,Math.max(0,this.l-zu*(arguments.length?t:1)))},ju.rgb=function(){return le(this.h,this.c,this.l).rgb()},Xo.lab=he;var zu=18,Vu=.95047,Hu=1,Gu=1.08883,$u=he.prototype=new oe;$u.brighter=function(t){return new he(Math.min(100,this.l+zu*(arguments.length?t:1)),this.a,this.b)},$u.darker=function(t){return new he(Math.max(0,this.l-zu*(arguments.length?t:1)),this.a,this.b)},$u.rgb=function(){return fe(this.l,this.a,this.b)},Xo.rgb=me;var Wu=me.prototype=new oe;Wu.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new me(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new me(i,i,i)},Wu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new me(t*this.r,t*this.g,t*this.b)},Wu.hsl=function(){return we(this.r,this.g,this.b)},Wu.toString=function(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)};var Zu=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Zu.forEach(function(t,e){Zu.set(t,ve(e))}),Xo.functor=De,Xo.xhr=Se(Me),Xo.dsv=function(t,e){function n(t,n,a){arguments.length<3&&(a=n,n=null);var o=Ce(t,e,null==n?r:i(n),a);return o.row=function(t){return arguments.length?o.response(null==(n=t)?r:i(t)):n},o}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function a(e){return e.map(o).join(t)}function o(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i})},n.parseRows=function(t,e){function n(){if(l>=c)return o;if(i)return i=!1,a;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++l;){var r=t.charCodeAt(l++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(l)&&(++l,++u);else if(r!==s)continue;return t.slice(e,l-u)}return t.slice(e)}for(var r,i,a={},o={},u=[],c=t.length,l=0,h=0;(r=n())!==o;){for(var f=[];r!==a&&r!==o;)f.push(r),r=n();e&&null==(f=e(f,h++))||u.push(f)}return u},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new y,i=[];return e.forEach(function(t){for(var e in t)r.has(e)||i.push(r.add(e))}),[i.map(o).join(t)].concat(e.map(function(e){return i.map(function(t){return o(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(a).join("\n")},n},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv(" ","text/tab-separated-values");var Xu,Ku,Ju,Qu,ts,es=eu[v(eu,"requestAnimationFrame")]||function(t){setTimeout(t,17)};Xo.timer=function(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i=n+e,a={c:t,t:i,f:!1,n:null};Ku?Ku.n=a:Xu=a,Ku=a,Ju||(Qu=clearTimeout(Qu),Ju=1,es(Le))},Xo.timer.flush=function(){Be(),Ne()},Xo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var ns=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ie);Xo.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=Xo.round(t,Oe(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ns[8+n/3]};var rs=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,is=Xo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Xo.round(t,Oe(t,e))).toFixed(Math.max(0,Math.min(20,Oe(t*(1+1e-15),e))))}}),as=Xo.time={},os=Date;Pe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){us.setUTCDate.apply(this._,arguments)},setDay:function(){us.setUTCDay.apply(this._,arguments)},setFullYear:function(){us.setUTCFullYear.apply(this._,arguments)},setHours:function(){us.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){us.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){us.setUTCMinutes.apply(this._,arguments)},setMonth:function(){us.setUTCMonth.apply(this._,arguments)},setSeconds:function(){us.setUTCSeconds.apply(this._,arguments)},setTime:function(){us.setTime.apply(this._,arguments)}};var us=Date.prototype;as.year=Ue(function(t){return t=as.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),as.years=as.year.range,as.years.utc=as.year.utc.range,as.day=Ue(function(t){var e=new os(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),as.days=as.day.range,as.days.utc=as.day.utc.range,as.dayOfYear=function(t){var e=as.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=as[t]=Ue(function(t){return(t=as.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});as[t+"s"]=n.range,as[t+"s"].utc=n.utc.range,as[t+"OfYear"]=function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)}}),as.week=as.sunday,as.weeks=as.sunday.range,as.weeks.utc=as.sunday.utc.range,as.weekOfYear=as.sundayOfYear;var ss={"-":"",_:" ",0:"0"},cs=/^\s*\d+/,ls=/^%/;Xo.locale=function(t){return{numberFormat:qe(t),timeFormat:je(t)}};var hs=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=hs.numberFormat,Xo.geo={},ln.prototype={s:0,t:0,add:function(t){hn(t,this.t,fs),hn(fs.s,this.s,this),this.s?this.t+=fs.t:this.s=fs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var fs=new ln;Xo.geo.stream=function(t,e){t&&ds.hasOwnProperty(t.type)?ds[t.type](t,e):fn(t,e)};var ds={Feature:function(t,e){fn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rt?4*Su+t:t,ms.lineStart=ms.lineEnd=ms.point=b}};Xo.geo.bounds=function(){function t(t,e){b.push(_=[l=t,f=t]),h>e&&(h=e),e>d&&(d=e)}function e(e,n){var r=yn([e*Bu,n*Bu]);if(m){var i=vn(m,r),a=[i[1],-i[0],0],o=vn(a,i);xn(o),o=wn(o);var s=e-p,c=s>0?1:-1,g=o[0]*Nu*c,y=lu(s)>180;if(y^(g>c*p&&c*e>g)){var v=o[1]*Nu;v>d&&(d=v)}else if(g=(g+360)%360-180,y^(g>c*p&&c*e>g)){var v=-o[1]*Nu;h>v&&(h=v)}else h>n&&(h=n),n>d&&(d=n);y?p>e?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e):f>=l?(l>e&&(l=e),e>f&&(f=e)):e>p?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e)}else t(e,n);m=r,p=e}function n(){x.point=e}function r(){_[0]=l,_[1]=f,x.point=t,m=null}function i(t,n){if(m){var r=t-p;v+=lu(r)>180?r+(r>0?360:-360):r}else g=t,y=n;ms.point(t,n),e(t,n)}function a(){ms.lineStart()}function o(){i(g,y),ms.lineEnd(),lu(v)>Fu&&(l=-(f=180)),_[0]=l,_[1]=f,m=null -}function u(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tys?(l=-(f=180),h=-(d=90)):v>Fu?d=90:-Fu>v&&(h=-90),_[0]=l,_[1]=f}};return function(t){d=f=-(l=h=1/0),b=[],Xo.geo.stream(t,x);var e=b.length;if(e){b.sort(s);for(var n,r=1,i=b[0],a=[i];e>r;++r)n=b[r],c(n[0],i)||c(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(var o,n,p=-1/0,e=a.length-1,r=0,i=a[e];e>=r;i=n,++r)n=a[r],(o=u(i[1],n[0]))>p&&(p=o,l=n[0],f=i[1])}return b=_=null,1/0===l||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[l,h],[f,d]]}}(),Xo.geo.centroid=function(t){vs=bs=_s=xs=ws=ks=As=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,Cs);var e=Ds,n=Ms,r=Ss,i=e*e+n*n+r*r;return Lu>i&&(e=ks,n=As,r=Es,Fu>bs&&(e=_s,n=xs,r=ws),i=e*e+n*n+r*r,Lu>i)?[0/0,0/0]:[Math.atan2(n,e)*Nu,ee(r/Math.sqrt(i))*Nu]};var vs,bs,_s,xs,ws,ks,As,Es,Ds,Ms,Ss,Cs={sphere:b,point:An,lineStart:Dn,lineEnd:Mn,polygonStart:function(){Cs.lineStart=Sn},polygonEnd:function(){Cs.lineStart=Dn}},Ts=Bn(Cn,qn,Pn,[-Su,-Su/2]),Fs=1e9;Xo.geo.clipExtent=function(){var t,e,n,r,i,a,o={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(u){return arguments.length?(a=zn(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[n,r]]}};return o.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return Hn(Gn)}).raw=Gn,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function t(t){var a=t[0],o=t[1];return e=null,n(a,o),e||(r(a,o),e)||i(a,o),e}var e,n,r,i,a=Xo.geo.albers(),o=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:a).invert(t)},t.stream=function(t){var e=a.stream(t),n=o.stream(t),r=u.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),u.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),u.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var c=a.scale(),l=+e[0],h=+e[1];return n=a.translate(e).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(s).point,r=o.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+Fu,h+.12*c+Fu],[l-.214*c-Fu,h+.234*c-Fu]]).stream(s).point,i=u.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+Fu,h+.166*c+Fu],[l-.115*c-Fu,h+.234*c-Fu]]).stream(s).point,t},t.scale(1070)};var Ls,Bs,Ns,Os,Is,qs,Rs={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Bs=0,Rs.lineStart=$n},polygonEnd:function(){Rs.lineStart=Rs.lineEnd=Rs.point=b,Ls+=lu(Bs/2)}},Ps={point:Wn,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Us={point:Kn,lineStart:Jn,lineEnd:Qn,polygonStart:function(){Us.lineStart=tr},polygonEnd:function(){Us.point=Kn,Us.lineStart=Jn,Us.lineEnd=Qn}};Xo.geo.path=function(){function t(t){return t&&("function"==typeof u&&a.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(a)),Xo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var n,r,i,a,o,u=4.5;return t.area=function(t){return Ls=0,Xo.geo.stream(t,i(Rs)),Ls},t.centroid=function(t){return _s=xs=ws=ks=As=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,i(Us)),Ss?[Ds/Ss,Ms/Ss]:Es?[ks/Es,As/Es]:ws?[_s/ws,xs/ws]:[0/0,0/0]},t.bounds=function(t){return Is=qs=-(Ns=Os=1/0),Xo.geo.stream(t,i(Ps)),[[Ns,Os],[Is,qs]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||rr(t):Me,e()):n},t.context=function(t){return arguments.length?(a=null==(r=t)?new Zn:new er(t),"function"!=typeof u&&a.pointRadius(u),e()):r},t.pointRadius=function(e){return arguments.length?(u="function"==typeof e?e:(a.pointRadius(+e),+e),t):u},t.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(t){return{stream:function(e){var n=new ir(e);for(var r in t)n[r]=t[r];return n}}},ir.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=or,Xo.geo.projectionMutator=ur,(Xo.geo.equirectangular=function(){return or(cr)}).raw=cr.invert=cr,Xo.geo.rotation=function(t){function e(e){return e=t(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e}return t=hr(t[0]%360*Bu,t[1]*Bu,t.length>2?t[2]*Bu:0),e.invert=function(e){return e=t.invert(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e},e},lr.invert=cr,Xo.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=hr(-t[0]*Bu,-t[1]*Bu,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=Nu,t[1]*=Nu}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=gr((e=+r)*Bu,i*Bu),t):e},t.precision=function(r){return arguments.length?(n=gr(e*Bu,(i=+r)*Bu),t):i},t.angle(90)},Xo.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Bu,i=t[1]*Bu,a=e[1]*Bu,o=Math.sin(r),u=Math.cos(r),s=Math.sin(i),c=Math.cos(i),l=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((n=h*o)*n+(n=c*l-s*h*u)*n),s*l+c*h*u)},Xo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Xo.range(Math.ceil(a/y)*y,i,y).map(f).concat(Xo.range(Math.ceil(c/m)*m,s,m).map(d)).concat(Xo.range(Math.ceil(r/p)*p,n,p).filter(function(t){return lu(t%y)>Fu}).map(l)).concat(Xo.range(Math.ceil(u/g)*g,o,g).filter(function(t){return lu(t%m)>Fu}).map(h))}var n,r,i,a,o,u,s,c,l,h,f,d,p=10,g=p,y=90,m=360,v=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(s).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],c=+e[0][1],s=+e[1][1],a>i&&(e=a,a=i,i=e),c>s&&(e=c,c=s,s=e),t.precision(v)):[[a,c],[i,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),u>o&&(e=u,u=o,o=e),t.precision(v)):[[r,u],[n,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(y=+e[0],m=+e[1],t):[y,m]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(v=+e,l=mr(u,o,90),h=vr(r,n,v),f=mr(c,s,90),d=vr(a,i,v),t):v},t.majorExtent([[-180,-90+Fu],[180,90-Fu]]).minorExtent([[-180,-80-Fu],[180,80+Fu]])},Xo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=br,i=_r;return t.distance=function(){return Xo.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},Xo.geo.interpolate=function(t,e){return xr(t[0]*Bu,t[1]*Bu,e[0]*Bu,e[1]*Bu)},Xo.geo.length=function(t){return Ys=0,Xo.geo.stream(t,js),Ys};var Ys,js={sphere:b,point:b,lineStart:wr,lineEnd:b,polygonStart:b,polygonEnd:b},zs=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Xo.geo.azimuthalEqualArea=function(){return or(zs)}).raw=zs;var Vs=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},Me);(Xo.geo.azimuthalEquidistant=function(){return or(Vs)}).raw=Vs,(Xo.geo.conicConformal=function(){return Hn(Ar)}).raw=Ar,(Xo.geo.conicEquidistant=function(){return Hn(Er)}).raw=Er;var Hs=kr(function(t){return 1/t},Math.atan);(Xo.geo.gnomonic=function(){return or(Hs)}).raw=Hs,Dr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Tu]},(Xo.geo.mercator=function(){return Mr(Dr)}).raw=Dr;var Gs=kr(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return or(Gs)}).raw=Gs;var $s=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Xo.geo.stereographic=function(){return or($s)}).raw=$s,Sr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Tu]},(Xo.geo.transverseMercator=function(){var t=Mr(Sr),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Sr,Xo.geom={},Xo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=De(n),a=De(r),o=t.length,u=[],s=[];for(e=0;o>e;e++)u.push([+i.call(this,t[e],e),+a.call(this,t[e],e),e]);for(u.sort(Lr),e=0;o>e;e++)s.push([u[e][0],-u[e][1]]);var c=Fr(u),l=Fr(s),h=l[0]===c[0],f=l[l.length-1]===c[c.length-1],d=[];for(e=c.length-1;e>=0;--e)d.push(t[u[c[e]][2]]);for(e=+h;e=r&&c.x<=a&&c.y>=i&&c.y<=o?[[r,o],[a,o],[a,i],[r,i]]:[];l.point=t[u]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/Fu)*Fu,y:Math.round(o(t,e)/Fu)*Fu,i:e}})}var r=Cr,i=Tr,a=r,o=i,u=nc;return t?e(t):(e.links=function(t){return ui(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ui(n(t)).cells.forEach(function(n,r){for(var i,a,o=n.site,u=n.edges.sort(Hr),s=-1,c=u.length,l=u[c-1].edge,h=l.l===o?l.r:l.l;++s=c,f=r>=l,d=(f<<1)+h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=fi()),h?i=c:u=c,f?o=l:s=l,a(t,e,n,r,i,o,u,s)}var l,h,f,d,p,g,y,m,v,b=De(u),_=De(s);if(null!=e)g=e,y=n,m=r,v=i;else if(m=v=-(g=y=1/0),h=[],f=[],p=t.length,o)for(d=0;p>d;++d)l=t[d],l.xm&&(m=l.x),l.y>v&&(v=l.y),h.push(l.x),f.push(l.y);else for(d=0;p>d;++d){var x=+b(l=t[d],d),w=+_(l,d);g>x&&(g=x),y>w&&(y=w),x>m&&(m=x),w>v&&(v=w),h.push(x),f.push(w)}var k=m-g,A=v-y;k>A?v=y+k:m=g+A;var E=fi();if(E.add=function(t){a(E,t,+b(t,++d),+_(t,d),g,y,m,v)},E.visit=function(t){di(t,E,g,y,m,v)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=oc.get(n)||ac,r=uc.get(r)||Me,_i(r(n.apply(null,Ko.call(arguments,1))))},Xo.interpolateHcl=Bi,Xo.interpolateHsl=Ni,Xo.interpolateLab=Oi,Xo.interpolateRound=Ii,Xo.transform=function(t){var e=Qo.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new qi(n?n.matrix:sc)})(t)},qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sc={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Yi,Xo.layout={},Xo.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++nu*u/y){if(p>s){var c=e.charge/s;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&s&&p>s){var c=e.pointCharge/s;t.px-=a*c,t.py-=o*c}}return!e.charge}}function e(t){t.px=Xo.event.x,t.py=Xo.event.y,u.resume()}var n,r,i,a,o,u={},s=Xo.dispatch("start","tick","end"),c=[1,1],l=.9,h=cc,f=lc,d=-30,p=hc,g=.1,y=.64,m=[],v=[];return u.tick=function(){if((r*=.99)<.005)return s.end({type:"end",alpha:r=0}),!0;var e,n,u,h,f,p,y,b,_,x=m.length,w=v.length;for(n=0;w>n;++n)u=v[n],h=u.source,f=u.target,b=f.x-h.x,_=f.y-h.y,(p=b*b+_*_)&&(p=r*a[n]*((p=Math.sqrt(p))-i[n])/p,b*=p,_*=p,f.x-=b*(y=h.weight/(f.weight+h.weight)),f.y-=_*y,h.x+=b*(y=1-y),h.y+=_*y);if((y=r*g)&&(b=c[0]/2,_=c[1]/2,n=-1,y))for(;++n0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),Xo.timer(u.tick)),u):r},u.start=function(){function t(t,r){if(!n){for(n=new Array(s),u=0;s>u;++u)n[u]=[];for(u=0;c>u;++u){var i=v[u];n[i.source.index].push(i.target),n[i.target.index].push(i.source)}}for(var a,o=n[e],u=-1,c=o.length;++ue;++e)(r=m[e]).index=e,r.weight=0;for(e=0;l>e;++e)r=v[e],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(e=0;s>e;++e)r=m[e],isNaN(r.x)&&(r.x=t("x",p)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(e=0;l>e;++e)i[e]=+h.call(this,v[e],e);else for(e=0;l>e;++e)i[e]=h;if(a=[],"function"==typeof f)for(e=0;l>e;++e)a[e]=+f.call(this,v[e],e);else for(e=0;l>e;++e)a[e]=f;if(o=[],"function"==typeof d)for(e=0;s>e;++e)o[e]=+d.call(this,m[e],e);else for(e=0;s>e;++e)o[e]=d;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return n||(n=Xo.behavior.drag().origin(Me).on("dragstart.force",$i).on("drag.force",e).on("dragend.force",Wi)),arguments.length?void this.on("mouseover.force",Zi).on("mouseout.force",Xi).call(n):n},Xo.rebind(u,s,"on")};var cc=20,lc=1,hc=1/0;Xo.layout.hierarchy=function(){function t(i){var a,o=[i],u=[];for(i.depth=0;null!=(a=o.pop());)if(u.push(a),(c=n.call(t,a,a.depth))&&(s=c.length)){for(var s,c,l;--s>=0;)o.push(l=c[s]),l.parent=a,l.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(t,a,a.depth)||0),delete a.children;return ta(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),u}var e=ra,n=ea,r=na;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(Qi(e,function(t){t.children&&(t.value=0)}),ta(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},Xo.layout.partition=function(){function t(e,n,r,i){var a=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,a&&(o=a.length)){var o,u,s,c=-1;for(r=e.value?r/e.value:0;++cp;++p)for(i.call(t,c[0][p],g=y[p],l[0][p][1]),d=1;f>d;++d)i.call(t,c[d][p],g+=l[d-1][p][1],l[d][p][1]);return u}var e=Me,n=sa,r=ca,i=ua,a=aa,o=oa;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:dc.get(e)||sa,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:pc.get(e)||ca,t):r},t.x=function(e){return arguments.length?(a=e,t):a},t.y=function(e){return arguments.length?(o=e,t):o},t.out=function(e){return arguments.length?(i=e,t):i},t};var dc=Xo.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(la),a=t.map(ha),o=Xo.range(r).sort(function(t,e){return i[t]-i[e]}),u=0,s=0,c=[],l=[];for(e=0;r>e;++e)n=o[e],s>u?(u+=a[n],c.push(n)):(s+=a[n],l.push(n));return l.reverse().concat(c)},reverse:function(t){return Xo.range(t.length).reverse()},"default":sa}),pc=Xo.map({silhouette:function(t){var e,n,r,i=t.length,a=t[0].length,o=[],u=0,s=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>u&&(u=r),o.push(r)}for(n=0;a>n;++n)s[n]=(u-o[n])/2;return s},wiggle:function(t){var e,n,r,i,a,o,u,s,c,l=t.length,h=t[0],f=h.length,d=[];for(d[0]=s=c=0,n=1;f>n;++n){for(e=0,i=0;l>e;++e)i+=t[e][n][1];for(e=0,a=0,u=h[n][0]-h[n-1][0];l>e;++e){for(r=0,o=(t[e][n][1]-t[e][n-1][1])/(2*u);e>r;++r)o+=(t[r][n][1]-t[r][n-1][1])/u;a+=o*t[e][n][1]}d[n]=s-=i?a/i*u:0,c>s&&(c=s)}for(n=0;f>n;++n)d[n]-=c;return d},expand:function(t){var e,n,r,i=t.length,a=t[0].length,o=1/i,u=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=o}for(n=0;a>n;++n)u[n]=0;return u},zero:ca});Xo.layout.histogram=function(){function t(t,a){for(var o,u,s=[],c=t.map(n,this),l=r.call(this,c,a),h=i.call(this,l,c,a),a=-1,f=c.length,d=h.length-1,p=e?1:1/f;++a0)for(a=-1;++a=l[0]&&u<=l[1]&&(o=s[Xo.bisect(h,u,1,d)-1],o.y+=p,o.push(t[a]));return s}var e=!0,n=Number,r=ga,i=da;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=De(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return pa(t,e)}:De(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},Xo.layout.pack=function(){function t(t,a){var o=n.call(this,t,a),u=o[0],s=i[0],c=i[1],l=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(u.x=u.y=0,ta(u,function(t){t.r=+l(t.value)}),ta(u,_a),r){var h=r*(e?1:Math.max(2*u.r/s,2*u.r/c))/2;ta(u,function(t){t.r+=h}),ta(u,_a),ta(u,function(t){t.r-=h})}return ka(u,s/2,c/2,e?1:1/Math.max(2*u.r/s,2*u.r/c)),o}var e,n=Xo.layout.hierarchy().sort(ya),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},Ji(t,n)},Xo.layout.tree=function(){function t(t,i){var l=o.call(this,t,i),h=l[0],f=e(h);if(ta(f,n),f.parent.m=-f.z,Qi(f,r),c)Qi(h,a);else{var d=h,p=h,g=h;Qi(h,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var y=u(d,p)/2-d.x,m=s[0]/(p.x+u(p,d)/2+y),v=s[1]/(g.depth||1);Qi(h,function(t){t.x=(t.x+y)*m,t.y=t.depth*v})}return l}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,a=e.children,o=0,u=a.length;u>o;++o)r.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){Ca(t);var a=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||n[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],c=i.m,l=a.m,h=o.m,f=s.m;o=Ma(o),i=Da(i),o&&i;)s=Da(s),a=Ma(a),a.a=t,r=o.z+h-i.z-c+u(o._,i._),r>0&&(Sa(Ta(o,t,n),t,r),c+=r,l+=r),h+=o.m,c+=i.m,f+=s.m,l+=a.m;o&&!Ma(a)&&(a.t=o,a.m+=h-l),i&&!Da(s)&&(s.t=i,s.m+=c-f,n=t)}return n}function a(t){t.x*=s[0],t.y=t.depth*s[1]}var o=Xo.layout.hierarchy().sort(null).value(null),u=Ea,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(u=e,t):u},t.size=function(e){return arguments.length?(c=null==(s=e)?a:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:a,t):c?s:null},Ji(t,o)},Xo.layout.cluster=function(){function t(t,a){var o,u=e.call(this,t,a),s=u[0],c=0;ta(s,function(t){var e=t.children;e&&e.length?(t.x=La(e),t.y=Fa(e)):(t.x=o?c+=n(t,o):0,t.y=0,o=t)});var l=Ba(s),h=Na(s),f=l.x-n(l,h)/2,d=h.x+n(h,l)/2;return ta(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(d-f)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var e=Xo.layout.hierarchy().sort(null).value(null),n=Ea,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},Ji(t,e)},Xo.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,a=t.length;++ie?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var a=n.children;if(a&&a.length){var o,u,s,c=h(n),l=[],f=a.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(f,c.dx*c.dy/n.value),l.area=0;(s=f.length)>0;)l.push(o=f[s-1]),l.area+=o.area,"squarify"!==d||(u=r(l,g))<=p?(f.pop(),p=u):(l.area-=l.pop().area,i(l,g,c,!1),g=Math.min(c.dx,c.dy),l.length=l.area=0,p=1/0);l.length&&(i(l,g,c,!0),l.length=l.area=0),a.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var a,o=h(e),u=r.slice(),s=[];for(t(u,o.dx*o.dy/e.value),s.area=0;a=u.pop();)s.push(a),s.area+=a.area,null!=a.z&&(i(s,a.z?o.dx:o.dy,o,!u.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,a=1/0,o=-1,u=t.length;++on&&(a=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*p/r,r/(e*a*p)):1/0}function i(t,e,n,r){var i,a=-1,o=t.length,u=n.x,c=n.y,l=e?s(t.area/e):0;if(e==n.dx){for((r||l>n.dy)&&(l=n.dy);++an.dx)&&(l=n.dx);++an&&(e=1),1>n&&(t=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=Xo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},Xo.scale={};var gc={floor:Me,ceil:Me};Xo.scale.linear=function(){return za([0,1],[0,1],vi,!1)};var yc={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return Ka(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var mc=Xo.format(".0e"),vc={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Xo.scale.pow=function(){return Ja(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return to([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(bc)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(_c)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(xc)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(wc)};var bc=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(be),_c=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(be),xc=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(be),wc=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(be); -Xo.scale.quantile=function(){return eo([],[])},Xo.scale.quantize=function(){return no(0,1,[0,1])},Xo.scale.threshold=function(){return ro([.5],[0,1])},Xo.scale.identity=function(){return io([0,1])},Xo.svg={},Xo.svg.arc=function(){function t(){var t=e.apply(this,arguments),a=n.apply(this,arguments),o=r.apply(this,arguments)+kc,u=i.apply(this,arguments)+kc,s=(o>u&&(s=o,o=u,u=s),u-o),c=Su>s?"0":"1",l=Math.cos(o),h=Math.sin(o),f=Math.cos(u),d=Math.sin(u);return s>=Ac?t?"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z":t?"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L"+t*f+","+t*d+"A"+t+","+t+" 0 "+c+",0 "+t*l+","+t*h+"Z":"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L0,0Z"}var e=ao,n=oo,r=uo,i=so;return t.innerRadius=function(n){return arguments.length?(e=De(n),t):e},t.outerRadius=function(e){return arguments.length?(n=De(e),t):n},t.startAngle=function(e){return arguments.length?(r=De(e),t):r},t.endAngle=function(e){return arguments.length?(i=De(e),t):i},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,a=(r.apply(this,arguments)+i.apply(this,arguments))/2+kc;return[Math.cos(a)*t,Math.sin(a)*t]},t};var kc=-Tu,Ac=Cu-Fu;Xo.svg.line=function(){return co(Me)};var Ec=Xo.map({linear:lo,"linear-closed":ho,step:fo,"step-before":po,"step-after":go,basis:xo,"basis-open":wo,"basis-closed":ko,bundle:Ao,cardinal:vo,"cardinal-open":yo,"cardinal-closed":mo,monotone:To});Ec.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Dc=[0,2/3,1/3,0],Mc=[0,1/3,2/3,0],Sc=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var t=co(Fo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},po.reverse=go,go.reverse=po,Xo.svg.area=function(){return Lo(Me)},Xo.svg.area.radial=function(){var t=Lo(Fo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Xo.svg.chord=function(){function t(t,u){var s=e(this,a,t,u),c=e(this,o,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(n(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),a=u.call(t,i,r),o=s.call(t,i,r)+kc,l=c.call(t,i,r)+kc;return{r:a,a0:o,a1:l,p0:[a*Math.cos(o),a*Math.sin(o)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function r(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Su)+",1 "+e}function i(t,e,n,r){return"Q 0,0 "+r}var a=br,o=_r,u=Bo,s=uo,c=so;return t.radius=function(e){return arguments.length?(u=De(e),t):u},t.source=function(e){return arguments.length?(a=De(e),t):a},t.target=function(e){return arguments.length?(o=De(e),t):o},t.startAngle=function(e){return arguments.length?(s=De(e),t):s},t.endAngle=function(e){return arguments.length?(c=De(e),t):c},t},Xo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=n.call(this,t,i),u=(a.y+o.y)/2,s=[a,{x:a.x,y:u},{x:o.x,y:u},o];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=br,n=_r,r=No;return t.source=function(n){return arguments.length?(e=De(n),t):e},t.target=function(e){return arguments.length?(n=De(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},Xo.svg.diagonal.radial=function(){var t=Xo.svg.diagonal(),e=No,n=t.projection;return t.projection=function(t){return arguments.length?n(Oo(e=t)):e},t},Xo.svg.symbol=function(){function t(t,r){return(Cc.get(e.call(this,t,r))||Ro)(n.call(this,t,r))}var e=qo,n=Io;return t.type=function(n){return arguments.length?(e=De(n),t):e},t.size=function(e){return arguments.length?(n=De(e),t):n},t};var Cc=Xo.map({circle:Ro,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Bc)),n=e*Bc;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});Xo.svg.symbolTypes=Cc.keys();var Tc,Fc,Lc=Math.sqrt(3),Bc=Math.tan(30*Bu),Nc=[],Oc=0;Nc.call=_u.call,Nc.empty=_u.empty,Nc.node=_u.node,Nc.size=_u.size,Xo.transition=function(t){return arguments.length?Tc?t.transition():t:ku.transition()},Xo.transition.prototype=Nc,Nc.select=function(t){var e,n,r,i=this.id,a=[];t=D(t);for(var o=-1,u=this.length;++oa;a++){i.push(e=[]);for(var n=this[a],u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return Po(i,this.id)},Nc.tween=function(t,e){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(t):U(this,null==e?function(e){e.__transition__[n].tween.remove(t)}:function(r){r.__transition__[n].tween.set(t,e)})},Nc.attr=function(t,e){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(u);return n!==t&&(e=o(n,t),function(t){this.setAttribute(u,e(t))})})}function a(t){return null==t?r:(t+="",function(){var e,n=this.getAttributeNS(u.space,u.local);return n!==t&&(e=o(n,t),function(t){this.setAttributeNS(u.space,u.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var o="transform"==t?Yi:vi,u=Xo.ns.qualify(t);return Uo(this,"attr."+t,e,u.local?a:i)},Nc.attrTween=function(t,e){function n(t,n){var r=e.call(this,t,n,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,n){var r=e.call(this,t,n,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=Xo.ns.qualify(t);return this.tween("attr."+t,i.local?r:n)},Nc.style=function(t,e,n){function r(){this.style.removeProperty(t)}function i(e){return null==e?r:(e+="",function(){var r,i=eu.getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=vi(i,e),function(e){this.style.setProperty(t,r(e),n)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Uo(this,"style."+t,e,i)},Nc.styleTween=function(t,e,n){function r(r,i){var a=e.call(this,r,i,eu.getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,r)},Nc.text=function(t){return Uo(this,"text",t,Yo)},Nc.remove=function(){return this.each("end.transition",function(){var t;this.__transition__.count<2&&(t=this.parentNode)&&t.removeChild(this)})},Nc.ease=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].ease:("function"!=typeof t&&(t=Xo.ease.apply(Xo,arguments)),U(this,function(n){n.__transition__[e].ease=t}))},Nc.delay=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].delay:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].delay=+t.call(n,n.__data__,r,i)}:(t=+t,function(n){n.__transition__[e].delay=t}))},Nc.duration=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].duration:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].duration=Math.max(1,t.call(n,n.__data__,r,i))}:(t=Math.max(1,t),function(n){n.__transition__[e].duration=t}))},Nc.each=function(t,e){var n=this.id;if(arguments.length<2){var r=Fc,i=Tc;Tc=n,U(this,function(e,r,i){Fc=e.__transition__[n],t.call(e,e.__data__,r,i)}),Fc=r,Tc=i}else U(this,function(r){var i=r.__transition__[n];(i.event||(i.event=Xo.dispatch("start","end"))).on(t,e)});return this},Nc.transition=function(){for(var t,e,n,r,i=this.id,a=++Oc,o=[],u=0,s=this.length;s>u;u++){o.push(t=[]);for(var e=this[u],c=0,l=e.length;l>c;c++)(n=e[c])&&(r=Object.create(n.__transition__[i]),r.delay+=r.duration,jo(n,c,a,r)),t.push(n)}return Po(o,a)},Xo.svg.axis=function(){function t(t){t.each(function(){var t,c=Xo.select(this),l=this.__chart__||n,h=this.__chart__=n.copy(),f=null==s?h.ticks?h.ticks.apply(h,u):h.domain():s,d=null==e?h.tickFormat?h.tickFormat.apply(h,u):Me:e,p=c.selectAll(".tick").data(f,h),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Fu),y=Xo.transition(p.exit()).style("opacity",Fu).remove(),m=Xo.transition(p.order()).style("opacity",1),v=Math.max(i,0)+o,b=Ra(h),_=c.selectAll(".domain").data([0]),x=(_.enter().append("path").attr("class","domain"),Xo.transition(_));g.append("line"),g.append("text");var w,k,A,E,D=g.select("line"),M=m.select("line"),S=p.select("text").text(d),C=g.select("text"),T=m.select("text"),F="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=zo,w="x",A="y",k="x2",E="y2",S.attr("dy",0>F?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+b[0]+","+F*a+"V0H"+b[1]+"V"+F*a)):(t=Vo,w="y",A="x",k="y2",E="x2",S.attr("dy",".32em").style("text-anchor",0>F?"end":"start"),x.attr("d","M"+F*a+","+b[0]+"H0V"+b[1]+"H"+F*a)),D.attr(E,F*i),C.attr(A,F*v),M.attr(k,0).attr(E,F*i),T.attr(w,0).attr(A,F*v),h.rangeBand){var L=h,B=L.rangeBand()/2;l=h=function(t){return L(t)+B}}else l.rangeBand?l=h:y.call(t,h,l);g.call(t,l,h),m.call(t,h,h)})}var e,n=Xo.scale.linear(),r=Ic,i=6,a=6,o=3,u=[10],s=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in qc?e+"":Ic,t):r},t.ticks=function(){return arguments.length?(u=arguments,t):u},t.tickValues=function(e){return arguments.length?(s=e,t):s},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,a=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(a=+e,t):a},t.tickPadding=function(e){return arguments.length?(o=+e,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Ic="bottom",qc={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function t(a){a.each(function(){var a=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=a.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),a.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=a.selectAll(".resize").data(p,Me);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Rc[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var l,h=Xo.transition(a),f=Xo.transition(o);s&&(l=Ra(s),f.attr("x",l[0]).attr("width",l[1]-l[0]),n(h)),c&&(l=Ra(c),f.attr("y",l[0]).attr("height",l[1]-l[0]),r(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+l[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",l[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==Xo.event.keyCode&&(S||(v=null,T[0]-=l[1],T[1]-=h[1],S=2),w())}function p(){32==Xo.event.keyCode&&2==S&&(T[0]+=l[1],T[1]+=h[1],S=0,w())}function g(){var t=Xo.mouse(_),i=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(Xo.event.altKey?(v||(v=[(l[0]+l[1])/2,(h[0]+h[1])/2]),T[0]=l[+(t[0]p?(i=r,r=p):i=p),g[0]!=r||g[1]!=i?(n?o=null:a=null,g[0]=r,g[1]=i,!0):void 0}function m(){g(),A.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),Xo.select("body").style("cursor",null),F.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),k({type:"brushend"})}var v,b,_=this,x=Xo.select(Xo.event.target),k=u.of(_,arguments),A=Xo.select(_),E=x.datum(),D=!/^(n|s)$/.test(E)&&s,M=!/^(e|w)$/.test(E)&&c,S=x.classed("extent"),C=$(),T=Xo.mouse(_),F=Xo.select(eu).on("keydown.brush",i).on("keyup.brush",p);if(Xo.event.changedTouches?F.on("touchmove.brush",g).on("touchend.brush",m):F.on("mousemove.brush",g).on("mouseup.brush",m),A.interrupt().selectAll("*").interrupt(),S)T[0]=l[0]-T[0],T[1]=h[0]-T[1];else if(E){var L=+/w$/.test(E),B=+/^n/.test(E);b=[l[1-L]-T[0],h[1-B]-T[1]],T[0]=l[L],T[1]=h[B]}else Xo.event.altKey&&(v=T.slice());A.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",x.style("cursor")),k({type:"brushstart"}),g()}var a,o,u=A(t,"brushstart","brush","brushend"),s=null,c=null,l=[0,0],h=[0,0],f=!0,d=!0,p=Pc[0];return t.event=function(t){t.each(function(){var t=u.of(this,arguments),e={x:l,y:h,i:a,j:o},n=this.__chart__||e;this.__chart__=e,Tc?Xo.select(this).transition().each("start.brush",function(){a=n.i,o=n.j,l=n.x,h=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=bi(l,e.x),r=bi(h,e.y);return a=o=null,function(i){l=e.x=n(i),h=e.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=e.i,o=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(s=e,p=Pc[!s<<1|!c],t):s},t.y=function(e){return arguments.length?(c=e,p=Pc[!s<<1|!c],t):c},t.clamp=function(e){return arguments.length?(s&&c?(f=!!e[0],d=!!e[1]):s?f=!!e:c&&(d=!!e),t):s&&c?[f,d]:s?f:c?d:null},t.extent=function(e){var n,r,i,u,f;return arguments.length?(s&&(n=e[0],r=e[1],c&&(n=n[0],r=r[0]),a=[n,r],s.invert&&(n=s(n),r=s(r)),n>r&&(f=n,n=r,r=f),(n!=l[0]||r!=l[1])&&(l=[n,r])),c&&(i=e[0],u=e[1],s&&(i=i[1],u=u[1]),o=[i,u],c.invert&&(i=c(i),u=c(u)),i>u&&(f=i,i=u,u=f),(i!=h[0]||u!=h[1])&&(h=[i,u])),t):(s&&(a?(n=a[0],r=a[1]):(n=l[0],r=l[1],s.invert&&(n=s.invert(n),r=s.invert(r)),n>r&&(f=n,n=r,r=f))),c&&(o?(i=o[0],u=o[1]):(i=h[0],u=h[1],c.invert&&(i=c.invert(i),u=c.invert(u)),i>u&&(f=i,i=u,u=f))),s&&c?[[n,i],[r,u]]:s?[n,r]:c&&[i,u])},t.clear=function(){return t.empty()||(l=[0,0],h=[0,0],a=o=null),t},t.empty=function(){return!!s&&l[0]==l[1]||!!c&&h[0]==h[1]},Xo.rebind(t,u,"on")};var Rc={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Pc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Uc=as.format=hs.timeFormat,Yc=Uc.utc,jc=Yc("%Y-%m-%dT%H:%M:%S.%LZ");Uc.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ho:jc,Ho.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ho.toString=jc.toString,as.second=Ue(function(t){return new os(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),as.seconds=as.second.range,as.seconds.utc=as.second.utc.range,as.minute=Ue(function(t){return new os(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),as.minutes=as.minute.range,as.minutes.utc=as.minute.utc.range,as.hour=Ue(function(t){var e=t.getTimezoneOffset()/60;return new os(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),as.hours=as.hour.range,as.hours.utc=as.hour.utc.range,as.month=Ue(function(t){return t=as.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),as.months=as.month.range,as.months.utc=as.month.utc.range;var zc=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vc=[[as.second,1],[as.second,5],[as.second,15],[as.second,30],[as.minute,1],[as.minute,5],[as.minute,15],[as.minute,30],[as.hour,1],[as.hour,3],[as.hour,6],[as.hour,12],[as.day,1],[as.day,2],[as.week,1],[as.month,1],[as.month,3],[as.year,1]],Hc=Uc.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Cn]]),Gc={range:function(t,e,n){return Xo.range(Math.ceil(t/n)*n,+e,n).map($o)},floor:Me,ceil:Me};Vc.year=as.year,as.scale=function(){return Go(Xo.scale.linear(),Vc,Hc)};var $c=Vc.map(function(t){return[t[0].utc,t[1]]}),Wc=Yc.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Cn]]);$c.year=as.year.utc,as.scale.utc=function(){return Go(Xo.scale.linear(),$c,Wc)},Xo.text=Se(function(t){return t.responseText}),Xo.json=function(t,e){return Ce(t,"application/json",Wo,e)},Xo.html=function(t,e){return Ce(t,"text/html",Zo,e)},Xo.xml=Se(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof e&&e.exports&&(e.exports=Xo),this.d3=Xo}()},{}],2:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),dagre:t("./lib/dagre"),intersect:t("./lib/intersect"),render:t("./lib/render"),util:t("./lib/util"),version:t("./lib/version")}},{"./lib/dagre":9,"./lib/graphlib":10,"./lib/intersect":11,"./lib/render":24,"./lib/util":26,"./lib/version":27}],3:[function(t,e){function n(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function r(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function i(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}var a=t("./util");e.exports={"default":n,normal:n,vee:r,undirected:i}},{"./util":26}],4:[function(t,e){function n(t,e){var n=e.nodes().filter(function(t){return r.isSubgraph(e,t)}),i=t.selectAll("g.cluster").data(n,function(t){return t});i.enter().append("g").attr("class","cluster").style("opacity",0).append("rect"),r.applyTransition(i.exit(),e).style("opacity",0).remove(),r.applyTransition(i,e).style("opacity",1),r.applyTransition(i.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){var n=e.node(t);return n.x-n.width/2}).attr("y",function(t){var n=e.node(t);return n.y-n.height/2})}var r=t("./util");e.exports=n},{"./util":26}],5:[function(t,e){"use strict";function n(t,e){var n=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return n.selectAll("*").remove(),n.enter().append("g").classed("edgeLabel",!0).style("opacity",0),n.each(function(t){var n=e.edge(t),a=i(o.select(this),e.edge(t),0,0).classed("label",!0),u=a.node().getBBox();n.labelId&&a.attr("id",n.labelId),r.has(n,"width")||(n.width=u.width),r.has(n,"height")||(n.height=u.height)}),a.applyTransition(n.exit(),e).style("opacity",0).remove(),n}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],6:[function(t,e){"use strict";function n(t,e,n){var i=t.selectAll("g.edgePath").data(e.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return o(i,e),u(i,e),l.applyTransition(i,e).style("opacity",1),i.each(function(t){var n=e.edge(t);n.elem=this,n.id&&h.select(this).attr("id",n.id)}),i.selectAll("path.path").each(function(t){var n=e.edge(t);n.arrowheadId=s.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+n.arrowheadId+")"}).style("fill","none");l.applyTransition(i,e).attr("d",function(t){return r(e,t)}),l.applyStyle(i,n.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var r=e.edge(t),i=n[r.arrowhead];i(h.select(this),r.arrowheadId,r,"arrowhead")}),i}function r(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(c(r,o[0])),o.push(c(a,o[o.length-1])),i(n,o)}function i(t,e){var n=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return s.has(t,"lineInterpolate")&&n.interpolate(t.lineInterpolate),s.has(t,"lineTension")&&n.tension(Number(t.lineTension)),n(e)}function a(t){var e=t.getBBox(),n=t.getTransformToElement(t.ownerSVGElement).translate(e.width/2,e.height/2);return{x:n.e,y:n.f}}function o(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);n.append("path").attr("class","path").attr("d",function(t){var n=e.edge(t),r=e.node(t.v).elem,o=s.range(n.points.length).map(function(){return a(r)});return i(n,o)}),n.append("defs")}function u(t,e){var n=t.exit();l.applyTransition(n,e).style("opacity",0).remove(),l.applyTransition(n.select("path.path"),e).attr("d",function(t){var n=e.node(t.v);if(n){var r=s.range(this.pathSegList.length).map(function(){return n});return i({},r)}return h.select(this).attr("d")})}var s=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");e.exports=n},{"./d3":8,"./intersect/intersect-node":15,"./lodash":21,"./util":26}],7:[function(t,e){"use strict";function n(t,e,n){var u=e.nodes().filter(function(t){return!a.isSubgraph(e,t)}),s=t.selectAll("g.node").data(u,function(t){return t}).classed("update",!0);return s.selectAll("*").remove(),s.enter().append("g").attr("class","node").style("opacity",0),s.each(function(t){var u=e.node(t),s=o.select(this),c=s.append("g").attr("class","label"),l=i(c,u),h=n[u.shape],f=r.pick(l.node().getBBox(),"width","height");u.elem=this,u.id&&s.attr("id",u.id),u.labelId&&c.attr("id",u.labelId),a.applyClass(s,u["class"],(s.classed("update")?"update ":"")+"node"),r.has(u,"width")&&(f.width=u.width),r.has(u,"height")&&(f.height=u.height),f.width+=u.paddingLeft+u.paddingRight,f.height+=u.paddingTop+u.paddingBottom,c.attr("transform","translate("+(u.paddingLeft-u.paddingRight)/2+","+(u.paddingTop-u.paddingBottom)/2+")");var d=h(o.select(this),f,u);a.applyStyle(d,u.style);var p=d.node().getBBox();u.width=p.width,u.height=p.height}),a.applyTransition(s.exit(),e).style("opacity",0).remove(),s}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],8:[function(t,e){e.exports=window.d3},{}],9:[function(t,e){var n;if(t)try{n=t("dagre")}catch(r){}n||(n=window.dagre),e.exports=n},{dagre:28}],10:[function(t,e){var n;if(t)try{n=t("graphlib")}catch(r){}n||(n=window.graphlib),e.exports=n},{graphlib:58}],11:[function(t,e){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":12,"./intersect-ellipse":13,"./intersect-node":15,"./intersect-polygon":16,"./intersect-rect":17}],12:[function(t,e){function n(t,e,n){return r(t,e,e,n)}var r=t("./intersect-ellipse");e.exports=n},{"./intersect-ellipse":13}],13:[function(t,e){function n(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,u=a-r.y,s=Math.sqrt(e*e*u*u+n*n*o*o),c=Math.abs(e*n*o/s);r.xm?(m-y)/g:(m+y)/g,m=o*c-a*l,b=0>m?(m-y)/g:(m+y)/g,{x:v,y:b})}function r(t,e){return t*e>0}e.exports=n},{}],15:[function(t,e){function n(t,e){return t.intersect(e)}e.exports=n},{}],16:[function(t,e){function n(t,e,n){var i=t.x,a=t.y,o=[],u=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach(function(t){u=Math.min(u,t.x),s=Math.min(s,t.y)});for(var c=i-t.width/2-u,l=a-t.height/2-s,h=0;h1&&o.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,u=e.y-n.y,s=Math.sqrt(o*o+u*u);return s>a?-1:a===s?0:1}),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");e.exports=n},{"./intersect-line":14}],17:[function(t,e){function n(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,u=e.y-a,s=t.width/2,c=t.height/2;return Math.abs(u)*s>Math.abs(o)*c?(0>u&&(c=-c),n=0===u?0:c*o/u,r=c):(0>o&&(s=-s),n=s,r=0===o?0:s*u/o),{x:i+n,y:a+r}}e.exports=n},{}],18:[function(t,e){function n(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div"),a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o,u;return i.each(function(){o=this.clientWidth,u=this.clientHeight}),n.attr("width",o).attr("height",u),n}var r=t("../util");e.exports=n},{"../util":26}],19:[function(t,e){function n(t,e){var n=e.label,a=t.append("g");"string"!=typeof n||"html"===e.labelType?i(a,e):r(a,e);var o=a.node().getBBox();return a.attr("transform","translate("+-o.width/2+","+-o.height/2+")"),a}var r=t("./add-text-label"),i=t("./add-html-label");e.exports=n},{"./add-html-label":18,"./add-text-label":20}],20:[function(t,e){function n(t,e){for(var n=t.append("text"),a=r(e.label).split("\n"),o=0;ou;++u)r(t,"borderLeft","_bl",n,o,u),r(t,"borderRight","_br",n,o,u)}}i.each(t.children(),e)}function r(t,e,n,r,i,o){var u={width:0,height:0,rank:o},s=i[e][o-1],c=a.addDummyNode(t,"border",u,n);i[e][o]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var i=t("./lodash"),a=t("./util");e.exports=n},{"./lodash":37,"./util":56}],31:[function(t,e){"use strict";function n(t){var e=t.graph().rankdir.toLowerCase();("lr"===e||"rl"===e)&&i(t)}function r(t){var e=t.graph().rankdir.toLowerCase();("bt"===e||"rl"===e)&&o(t),("lr"===e||"rl"===e)&&(s(t),i(t))}function i(t){l.each(t.nodes(),function(e){a(t.node(e))}),l.each(t.edges(),function(e){a(t.edge(e))})}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){l.each(t.nodes(),function(e){u(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,u),l.has(n,"y")&&u(n)})}function u(t){t.y=-t.y}function s(t){l.each(t.nodes(),function(e){c(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,c),l.has(n,"x")&&c(n)})}function c(t){var e=t.x;t.x=t.y,t.y=e}var l=t("./lodash");e.exports={adjust:n,undo:r}},{"./lodash":37}],32:[function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){return"_next"!==t&&"_prev"!==t?e:void 0}e.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;return e!==t?(r(e),e):void 0},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},{}],33:[function(t,e){function n(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.each(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;e.exports={debugOrdering:n}},{"./graphlib":34,"./lodash":37,"./util":56}],34:[function(t,e){e.exports=t(10)},{graphlib:58}],35:[function(t,e){function n(t,e){if(t.nodeCount()<=1)return[];var n=a(t,e||l),i=r(n.graph,n.buckets,n.zeroIdx);return u.flatten(u.map(i,function(e){return t.outEdges(e.v,e.w)}),!0)}function r(t,e,n){for(var r,a=[],o=e[e.length-1],u=e[0];t.nodeCount();){for(;r=u.dequeue();)i(t,e,n,r);for(;r=o.dequeue();)i(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){a=a.concat(i(t,e,n,r,!0));break}}return a}function i(t,e,n,r,i){var a=i?[]:void 0;return u.each(t.inEdges(r.v),function(r){var u=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=u,o(e,n,s)}),u.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,u=t.node(a);u["in"]-=i,o(e,n,u)}),t.removeNode(r.v),a}function a(t,e){var n=new s,r=0,i=0;u.each(t.nodes(),function(t){n.setNode(t,{v:t,"in":0,out:0})}),u.each(t.edges(),function(t){var a=n.edge(t.v,t.w)||0,o=e(t),u=a+o;n.setEdge(t.v,t.w,u),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w)["in"]+=o)});var a=u.range(i+r+3).map(function(){return new c}),l=r+1;return u.each(n.nodes(),function(t){o(a,l,n.node(t))}),{graph:n,buckets:a,zeroIdx:l}}function o(t,e,n){n.out?n["in"]?t[n.out-n["in"]+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var u=t("./lodash"),s=t("./graphlib").Graph,c=t("./data/list");e.exports=n;var l=u.constant(1)},{"./data/list":32,"./graphlib":34,"./lodash":37}],36:[function(t,e){"use strict";function n(t,e){var n=e&&e.debugTiming?L.time:L.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return a(t)});n(" runLayout",function(){r(e,n)}),n(" updateInputGraph",function(){i(t,e)})})}function r(t,e){e(" makeSpaceForEdgeLabels",function(){o(t)}),e(" removeSelfEdges",function(){g(t)}),e(" acyclic",function(){x.run(t)}),e(" nestingGraph.run",function(){M.run(t)}),e(" rank",function(){k(L.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){u(t)}),e(" removeEmptyRanks",function(){D(t)}),e(" nestingGraph.cleanup",function(){M.cleanup(t)}),e(" normalizeRanks",function(){A(t)}),e(" assignRankMinMax",function(){s(t)}),e(" removeEdgeLabelProxies",function(){c(t)}),e(" normalize.run",function(){w.run(t)}),e(" parentDummyChains",function(){E(t)}),e(" addBorderSegments",function(){S(t)}),e(" order",function(){T(t)}),e(" insertSelfEdges",function(){y(t)}),e(" adjustCoordinateSystem",function(){C.adjust(t)}),e(" position",function(){F(t)}),e(" positionSelfEdges",function(){m(t)}),e(" removeBorderNodes",function(){p(t)}),e(" normalize.undo",function(){w.undo(t)}),e(" fixupEdgeLabelCoords",function(){f(t)}),e(" undoCoordinateSystem",function(){C.undo(t)}),e(" translateGraph",function(){l(t)}),e(" assignNodeIntersects",function(){h(t)}),e(" reversePoints",function(){d(t)}),e(" acyclic.undo",function(){x.undo(t)})}function i(t,e){_.each(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),_.each(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,_.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function a(t){var e=new B({multigraph:!0,compound:!0}),n=b(t.graph());return e.setGraph(_.merge({},O,v(n,N),_.pick(n,I))),_.each(t.nodes(),function(n){var r=b(t.node(n));e.setNode(n,_.defaults(v(r,q),R)),e.setParent(n,t.parent(n))}),_.each(t.edges(),function(n){var r=b(t.edge(n));e.setEdge(n,_.merge({},U,v(r,P),_.pick(r,Y)))}),e}function o(t){var e=t.graph();e.ranksep/=2,_.each(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function u(t){_.each(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-r.rank)/2+r.rank,e:e};L.addDummyNode(t,"edge-proxy",a,"_ep")}})}function s(t){var e=0;_.each(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=_.max(e,r.maxRank))}),t.graph().maxRank=e}function c(t){_.each(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function l(t){function e(t){var e=t.x,o=t.y,u=t.width,s=t.height;n=Math.min(n,e-u/2),r=Math.max(r,e+u/2),i=Math.min(i,o-s/2),a=Math.max(a,o+s/2)}var n=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),u=o.marginx||0,s=o.marginy||0;_.each(t.nodes(),function(n){e(t.node(n))}),_.each(t.edges(),function(n){var r=t.edge(n);_.has(r,"x")&&e(r)}),n-=u,i-=s,_.each(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),_.each(t.edges(),function(e){var r=t.edge(e);_.each(r.points,function(t){t.x-=n,t.y-=i}),_.has(r,"x")&&(r.x-=n),_.has(r,"y")&&(r.y-=i)}),o.width=r-n+u,o.height=a-i+s}function h(t){_.each(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(L.intersectRect(a,n)),i.points.push(L.intersectRect(o,r))})}function f(t){_.each(t.edges(),function(e){var n=t.edge(e);if(_.has(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function d(t){_.each(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function p(t){_.each(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(_.last(n.borderLeft)),o=t.node(_.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),_.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function g(t){_.each(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function y(t){var e=L.buildLayerMatrix(t);_.each(e,function(e){var n=0;_.each(e,function(e,r){var i=t.node(e);i.order=r+n,_.each(i.selfEdges,function(e){L.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}function m(t){_.each(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-u},{x:i+5*o/6,y:a-u},{x:i+o,y:a},{x:i+5*o/6,y:a+u},{x:i+2*o/3,y:a+u}],n.label.x=n.x,n.label.y=n.y}})}function v(t,e){return _.mapValues(_.pick(t,e),Number)}function b(t){var e={};return _.each(t,function(t,n){e[n.toLowerCase()]=t}),e}var _=t("./lodash"),x=t("./acyclic"),w=t("./normalize"),k=t("./rank"),A=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),D=t("./util").removeEmptyRanks,M=t("./nesting-graph"),S=t("./add-border-segments"),C=t("./coordinate-system"),T=t("./order"),F=t("./position"),L=t("./util"),B=t("./graphlib").Graph;e.exports=n;var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],q=["width","height"],R={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],U={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Y=["labelpos"]},{"./acyclic":29,"./add-border-segments":30,"./coordinate-system":31,"./graphlib":34,"./lodash":37,"./nesting-graph":38,"./normalize":39,"./order":44,"./parent-dummy-chains":49,"./position":51,"./rank":53,"./util":56}],37:[function(t,e){e.exports=t(21)},{lodash:82}],38:[function(t,e){function n(t){var e=s.addDummyNode(t,"root",{},"_root"),n=i(t),o=u.max(n)-1,c=2*o+1;t.graph().nestingRoot=e,u.each(t.edges(),function(e){t.edge(e).minlen*=c});var l=a(t)+1;u.each(t.children(),function(i){r(t,e,c,l,o,n,i)}),t.graph().nodeRankFactor=c}function r(t,e,n,i,a,o,c){var l=t.children(c);if(!l.length)return void(c!==e&&t.setEdge(e,c,{weight:0,minlen:n}));var h=s.addBorderNode(t,"_bt"),f=s.addBorderNode(t,"_bb"),d=t.node(c);t.setParent(h,c),d.borderTop=h,t.setParent(f,c),d.borderBottom=f,u.each(l,function(u){r(t,e,n,i,a,o,u);var s=t.node(u),l=s.borderTop?s.borderTop:u,d=s.borderBottom?s.borderBottom:u,p=s.borderTop?i:2*i,g=l!==d?1:a-o[c]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(c)||t.setEdge(e,h,{weight:0,minlen:a+o[c]})}function i(t){function e(r,i){var a=t.children(r);a&&a.length&&u.each(a,function(t){e(t,i+1)}),n[r]=i}var n={};return u.each(t.children(),function(t){e(t,1)}),n}function a(t){return u.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function o(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,u.each(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}var u=t("./lodash"),s=t("./util");e.exports={run:n,cleanup:o}},{"./lodash":37,"./util":56}],39:[function(t,e){"use strict";function n(t){t.graph().dummyChains=[],a.each(t.edges(),function(e){r(t,e)})}function r(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,u=e.name,s=t.edge(e),c=s.labelRank;if(a!==r+1){t.removeEdge(e);var l,h,f;for(f=0,++r;a>r;++f,++r)s.points=[],h={width:0,height:0,edgeLabel:s,edgeObj:e,rank:r},l=o.addDummyNode(t,"edge",h,"_d"),r===c&&(h.width=s.width,h.height=s.height,h.dummy="edge-label",h.labelpos=s.labelpos),t.setEdge(n,l,{weight:s.weight},u),0===f&&t.graph().dummyChains.push(l),n=l;t.setEdge(n,i,{weight:s.weight},u)}}function i(t){a.each(t.graph().dummyChains,function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}var a=t("./lodash"),o=t("./util");e.exports={run:n,undo:i}},{"./lodash":37,"./util":56}],40:[function(t,e){function n(t,e,n){var i,a={};r.each(n,function(n){for(var r,o,u=t.parent(n);u;){if(r=t.parent(u),r?(o=a[r],a[r]=u):(o=i,i=u),o&&o!==u)return void e.setEdge(o,u);u=r}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],41:[function(t,e){function n(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],42:[function(t,e){function n(t,e,n){var o=r(t),u=new a({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(e){return t.node(e)});return i.each(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(u.setNode(r),u.setParent(r,s||o),i.each(t[n](r),function(e){var n=e.v===r?e.w:e.v,a=u.edge(n,r),o=i.isUndefined(a)?0:a.weight;u.setEdge(n,r,{weight:t.edge(e).weight+o})}),i.has(a,"minRank")&&u.setNode(r,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),u}function r(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}var i=t("../lodash"),a=t("../graphlib").Graph;e.exports=n},{"../graphlib":34,"../lodash":37}],43:[function(t,e){"use strict";function n(t,e){for(var n=0,i=1;i0;)e%2&&(n+=s[e+1]),e=e-1>>1,s[e]+=t.weight;c+=t.weight*n})),c}var i=t("../lodash");e.exports=n},{"../lodash":37}],44:[function(t,e){"use strict";function n(t){var e=d.maxRank(t),n=r(t,o.range(1,e+1),"inEdges"),c=r(t,o.range(e-1,-1,-1),"outEdges"),l=u(t);a(t,l);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;4>g;++p,++g){i(p%2?n:c,p%4>=2),l=d.buildLayerMatrix(t);var y=s(t,l);f>y&&(g=0,h=o.cloneDeep(l),f=y)}a(t,h)}function r(t,e,n){return o.map(e,function(e){return l(t,e,n)})}function i(t,e){var n=new f;o.each(t,function(t){var r=t.graph().root,i=c(t,r,n,e);o.each(i.vs,function(e,n){t.node(e).order=n}),h(t,n,i.vs)})}function a(t,e){o.each(e,function(e){o.each(e,function(e,n){t.node(e).order=n})})}var o=t("../lodash"),u=t("./init-order"),s=t("./cross-count"),c=t("./sort-subgraph"),l=t("./build-layer-graph"),h=t("./add-subgraph-constraints"),f=t("../graphlib").Graph,d=t("../util");e.exports=n},{"../graphlib":34,"../lodash":37,"../util":56,"./add-subgraph-constraints":40,"./build-layer-graph":42,"./cross-count":43,"./init-order":45,"./sort-subgraph":47}],45:[function(t,e){"use strict";function n(t){function e(i){if(!r.has(n,i)){n[i]=!0;var a=t.node(i);o[a.rank].push(i),r.each(t.successors(i),e)}}var n={},i=r.filter(t.nodes(),function(e){return!t.children(e).length}),a=r.max(r.map(i,function(e){return t.node(e).rank})),o=r.map(r.range(a+1),function(){return[]}),u=r.sortBy(i,function(e){return t.node(e).rank});return r.each(u,e),o}var r=t("../lodash");e.exports=n},{"../lodash":37}],46:[function(t,e){"use strict";function n(t,e){var n={};a.each(t,function(t,e){var r=n[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:e};a.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.each(e.edges(),function(t){var e=n[t.v],r=n[t.w];a.isUndefined(e)||a.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))});var i=a.filter(n,function(t){return!t.indegree});return r(i)}function r(t){function e(t){return function(e){e.merged||(a.isUndefined(e.barycenter)||a.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&i(t,e)}}function n(e){return function(n){n["in"].push(e),0===--n.indegree&&t.push(n)}}for(var r=[];t.length;){var o=t.pop();r.push(o),a.each(o["in"].reverse(),e(o)),a.each(o.out,n(o))}return a.chain(r).filter(function(t){return!t.merged}).map(function(t){return a.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}var a=t("../lodash");e.exports=n},{"../lodash":37}],47:[function(t,e){function n(t,e,c,l){var h=t.children(e),f=t.node(e),d=f?f.borderLeft:void 0,p=f?f.borderRight:void 0,g={};d&&(h=a.filter(h,function(t){return t!==d&&t!==p}));var y=o(t,h);a.each(y,function(e){if(t.children(e.v).length){var r=n(t,e.v,c,l);g[e.v]=r,a.has(r,"barycenter")&&i(e,r)}});var m=u(y,c);r(m,g);var v=s(m,l);if(d&&(v.vs=a.flatten([d,v.vs,p],!0),t.predecessors(d).length)){var b=t.node(t.predecessors(d)[0]),_=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+_.order)/(v.weight+2),v.weight+=2}return v}function r(t,e){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}function i(t,e){a.isUndefined(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var a=t("../lodash"),o=t("./barycenter"),u=t("./resolve-conflicts"),s=t("./sort");e.exports=n},{"../lodash":37,"./barycenter":41,"./resolve-conflicts":46,"./sort":48}],48:[function(t,e){function n(t,e){var n=o.partition(t,function(t){return a.has(t,"barycenter")}),u=n.lhs,s=a.sortBy(n.rhs,function(t){return-t.i}),c=[],l=0,h=0,f=0;u.sort(i(!!e)),f=r(c,s,f),a.each(u,function(t){f+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=r(c,s,f)});var d={vs:a.flatten(c,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}function r(t,e,n){for(var r;e.length&&(r=a.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function i(t){return function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i}}var a=t("../lodash"),o=t("../util");e.exports=n},{"../lodash":37,"../util":56}],49:[function(t,e){function n(t){var e=i(t);a.each(t.graph().dummyChains,function(n){for(var i=t.node(n),a=i.edgeObj,o=r(t,e,a.v,a.w),u=o.path,s=o.lca,c=0,l=u[c],h=!0;n!==a.w;){if(i=t.node(n),h){for(;(l=u[c])!==s&&t.node(l).maxRanks||c>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)u.push(i);return{path:o.concat(u.reverse()),lca:a}}function i(t){function e(i){var o=r;a.each(t.children(i),e),n[i]={low:o,lim:r++}}var n={},r=0;return a.each(t.children(),e),n}var a=t("./lodash");e.exports=n},{"./lodash":37}],50:[function(t,e){"use strict";function n(t,e){function n(e,n){var o=0,u=0,s=e.length,c=y.last(n);return y.each(n,function(e,l){var h=i(t,e),f=h?t.node(h).order:s;(h||e===c)&&(y.each(n.slice(u,l+1),function(e){y.each(t.predecessors(e),function(n){var i=t.node(n),u=i.order;!(o>u||u>f)||i.dummy&&t.node(e).dummy||a(r,n,e)})}),u=l+1,o=f)}),n}var r={};return y.reduce(e,n),r}function r(t,e){function n(e,n,r,o,u){var s;y.each(y.range(n,r),function(n){s=e[n],t.node(s).dummy&&y.each(t.predecessors(s),function(e){var n=t.node(e);n.dummy&&(n.orderu)&&a(i,e,s)})})}function r(e,r){var i,a=-1,o=0;return y.each(r,function(u,s){if("border"===t.node(u).dummy){var c=t.predecessors(u);c.length&&(i=t.node(c[0]).order,n(r,o,s,a,i),o=s,a=i)}n(r,o,r.length,i,e.length)}),r}var i={};return y.reduce(e,r),i}function i(t,e){return t.node(e).dummy?y.find(t.predecessors(e),function(e){return t.node(e).dummy}):void 0}function a(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function o(t,e,n){if(e>n){var r=e;e=n,n=r}return y.has(t[e],n)}function u(t,e,n,r){var i={},a={},u={};return y.each(e,function(t){y.each(t,function(t,e){i[t]=t,a[t]=t,u[t]=e})}),y.each(e,function(t){var e=-1;y.each(t,function(t){var s=r(t);if(s.length){s=y.sortBy(s,function(t){return u[t]});for(var c=(s.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var f=s[l];a[t]===t&&eo.lim&&(u=o,s=!0);var c=p.filter(e.edges(),function(e){return s===d(t,t.node(e.v),u)&&s!==d(t,t.node(e.w),u)});return p.min(c,function(t){return y(e,t)})}function l(t,e,n,i){var a=n.v,u=n.w;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),o(t),r(t,e),h(t,e)}function h(t,e){var n=p.find(t.nodes(),function(t){return!e.node(t).parent}),r=v(t,n);r=r.slice(1),p.each(r,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}function f(t,e,n){return t.hasEdge(e,n)}function d(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}var p=t("../lodash"),g=t("./feasible-tree"),y=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,b=t("../graphlib").alg.postorder,_=t("../util").simplify;e.exports=n,n.initLowLimValues=o,n.initCutValues=r,n.calcCutValue=a,n.leaveEdge=s,n.enterEdge=c,n.exchangeEdges=l},{"../graphlib":34,"../lodash":37,"../util":56,"./feasible-tree":52,"./util":55}],55:[function(t,e){"use strict";function n(t){function e(r){var a=t.node(r);if(i.has(n,r))return a.rank;n[r]=!0;var o=i.min(i.map(t.outEdges(r),function(n){return e(n.w)-t.edge(n).minlen}));return o===Number.POSITIVE_INFINITY&&(o=0),a.rank=o}var n={};i.each(t.sources(),e)}function r(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var i=t("../lodash");e.exports={longestPath:n,slack:r}},{"../lodash":37}],56:[function(t,e){"use strict";function n(t,e,n,r){var i;do i=y.uniqueId(r);while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function r(t){var e=(new m).setGraph(t.graph());return y.each(t.nodes(),function(n){e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e}function i(t){var e=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return y.each(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e}function a(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function o(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function u(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r,o=t.width/2,u=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,c;return Math.abs(a)*o>Math.abs(i)*u?(0>a&&(u=-u),s=u*i/a,c=u):(0>i&&(o=-o),s=o,c=o*a/i),{x:n+s,y:r+c}}function s(t){var e=y.map(y.range(f(t)+1),function(){return[]});return y.each(t.nodes(),function(n){var r=t.node(n),i=r.rank;y.isUndefined(i)||(e[i][r.order]=n)}),e}function c(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank}));y.each(t.nodes(),function(n){var r=t.node(n);y.has(r,"rank")&&(r.rank-=e)})}function l(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank})),n=[];y.each(t.nodes(),function(r){var i=t.node(r).rank-e;y.has(n,i)||(n[i]=[]),n[i].push(r)});var r=0,i=t.graph().nodeRankFactor;y.each(n,function(e,n){y.isUndefined(e)&&n%i!==0?--r:r&&y.each(e,function(e){t.node(e).rank+=r})})}function h(t,e,r,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=i),n(t,"border",a,e)}function f(t){return y.max(y.map(t.nodes(),function(e){var n=t.node(e).rank;return y.isUndefined(n)?void 0:n}))}function d(t,e){var n={lhs:[],rhs:[]};return y.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function p(t,e){var n=y.now();try{return e()}finally{console.log(t+" time: "+(y.now()-n)+"ms")}}function g(t,e){return e()}var y=t("./lodash"),m=t("./graphlib").Graph;e.exports={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:u,buildLayerMatrix:s,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:f,partition:d,time:p,notime:g}},{"./graphlib":34,"./lodash":37}],57:[function(t,e){e.exports="0.7.1"},{}],58:[function(t,e){var n=t("./lib");e.exports={Graph:n.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:n.version}},{"./lib":74,"./lib/alg":65,"./lib/json":75}],59:[function(t,e){function n(t){function e(a){r.has(i,a)||(i[a]=!0,n.push(a),r.each(t.successors(a),e),r.each(t.predecessors(a),e))}var n,i={},a=[];return r.each(t.nodes(),function(t){n=[],e(t),n.length&&a.push(n)}),a}var r=t("../lodash");e.exports=n},{"../lodash":76}],60:[function(t,e){function n(t,e,n){i.isArray(e)||(e=[e]);var a=[],o={};return i.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);r(t,e,"post"===n,o,a)}),a}function r(t,e,n,a,o){i.has(a,e)||(a[e]=!0,n||o.push(e),i.each(t.neighbors(e),function(e){r(t,e,n,a,o)}),n&&o.push(e))}var i=t("../lodash");e.exports=n},{"../lodash":76}],61:[function(t,e){function n(t,e,n){return i.transform(t.nodes(),function(i,a){i[a]=r(t,a,e,n)},{})}var r=t("./dijkstra"),i=t("../lodash"); -e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e,n,i){return r(t,String(e),n||o,i||function(e){return t.outEdges(e)})}function r(t,e,n,r){var i,o,u={},s=new a,c=function(t){var e=t.v!==i?t.v:t.w,r=u[e],a=n(t),c=o.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c0&&(i=s.removeMin(),o=u[i],o.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return u}var i=t("../lodash"),a=t("../data/priority-queue");e.exports=n;var o=i.constant(1)},{"../data/priority-queue":72,"../lodash":76}],63:[function(t,e){function n(t){return r.filter(i(t),function(t){return t.length>1})}var r=t("../lodash"),i=t("./tarjan");e.exports=n},{"../lodash":76,"./tarjan":70}],64:[function(t,e){function n(t,e,n){return r(t,e||a,n||function(e){return t.outEdges(e)})}function r(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[t],i=e[n],o=a[n],u=r.distance+i.distance;ui&&(s[n]=o,c.decrease(n,i))}}var o,u=new i,s={},c=new a;if(0===t.nodeCount())return u;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),u.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(o=c.removeMin(),r.has(s,o))u.setEdge(o,s[o]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(o).forEach(n)}return u}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");e.exports=n},{"../data/priority-queue":72,"../graph":73,"../lodash":76}],70:[function(t,e){function n(t){function e(u){var s=a[u]={onStack:!0,lowlink:n,index:n++};if(i.push(u),t.successors(u).forEach(function(t){r.has(a,t)?a[t].onStack&&(s.lowlink=Math.min(s.lowlink,a[t].index)):(e(t),s.lowlink=Math.min(s.lowlink,a[t].lowlink))}),s.lowlink===s.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(u!==c);o.push(l)}}var n=0,i=[],a={},o=[];return t.nodes().forEach(function(t){r.has(a,t)||e(t)}),o}var r=t("../lodash");e.exports=n},{"../lodash":76}],71:[function(t,e){function n(t){function e(u){if(i.has(a,u))throw new r;i.has(n,u)||(a[u]=!0,n[u]=!0,i.each(t.predecessors(u),e),delete a[u],o.push(u))}var n={},a={},o=[];if(i.each(t.sinks(),e),i.size(n)!==t.nodeCount())throw new r;return o}function r(){}var i=t("../lodash");e.exports=n,n.CycleException=r},{"../lodash":76}],72:[function(t,e){function n(){this._arr=[],this._keyIndices={}}var r=t("../lodash");e.exports=n,n.prototype.size=function(){return this._arr.length},n.prototype.keys=function(){return this._arr.map(function(t){return t.key})},n.prototype.has=function(t){return r.has(this._keyIndices,t)},n.prototype.priority=function(t){var e=this._keyIndices[t];return void 0!==e?this._arr[e].priority:void 0},n.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},n.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},n.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},n.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},n.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1,!(n[e].priorityn){var i=e;e=n,n=i}return e+h+n+h+(s.isUndefined(r)?c:r)}function o(t,e,n,r){if(!t&&e>n){var i=e;e=n,n=i}var a={v:e,w:n};return r&&(a.name=r),a}function u(t,e){return a(t,e.v,e.w,e.name)}var s=t("./lodash");e.exports=n;var c="\x00",l="\x00",h="";n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(t){return this._label=t,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return s.keys(this._nodes)},n.prototype.sources=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._in[t])},this)},n.prototype.sinks=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._out[t])},this)},n.prototype.setNodes=function(t,e){var n=arguments;return s.each(t,function(t){n.length>1?this.setNode(t,e):this.setNode(t)},this),this},n.prototype.setNode=function(t,e){return s.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},n.prototype.node=function(t){return this._nodes[t]},n.prototype.hasNode=function(t){return s.has(this._nodes,t)},n.prototype.removeNode=function(t){var e=this;if(s.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],s.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),s.each(s.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],s.each(s.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(s.isUndefined(e))e=l;else{for(var n=e;!s.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},n.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},n.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==l)return e}},n.prototype.children=function(t){if(s.isUndefined(t)&&(t=l),this._isCompound){var e=this._children[t];if(e)return s.keys(e)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},n.prototype.predecessors=function(t){var e=this._preds[t];return e?s.keys(e):void 0},n.prototype.successors=function(t){var e=this._sucs[t];return e?s.keys(e):void 0},n.prototype.neighbors=function(t){var e=this.predecessors(t);return e?s.union(e,this.successors(t)):void 0},n.prototype.setDefaultEdgeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return s.values(this._edgeObjs)},n.prototype.setPath=function(t,e){var n=this,r=arguments;return s.reduce(t,function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i}),this},n.prototype.setEdge=function(){var t,e,n,i,u=!1;s.isPlainObject(arguments[0])?(t=arguments[0].v,e=arguments[0].w,n=arguments[0].name,2===arguments.length&&(i=arguments[1],u=!0)):(t=arguments[0],e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],u=!0)),t=""+t,e=""+e,s.isUndefined(n)||(n=""+n);var c=a(this._isDirected,t,e,n);if(s.has(this._edgeLabels,c))return u&&(this._edgeLabels[c]=i),this;if(!s.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[c]=u?i:this._defaultEdgeLabelFn(t,e,n);var l=o(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[c]=l,r(this._preds[e],t),r(this._sucs[t],e),this._in[e][c]=l,this._out[t][c]=l,this._edgeCount++,this},n.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return s.has(this._edgeLabels,r)},n.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n),o=this._edgeObjs[r];return o&&(t=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[e],t),i(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},n.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.v===e}):r}},n.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.w===e}):r}},n.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);return n?n.concat(this.outEdges(t,e)):void 0}},{"./lodash":76}],74:[function(t,e){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":73,"./version":77}],75:[function(t,e){function n(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:r(t),edges:i(t)};return o.isUndefined(t.graph())||(e.value=o.clone(t.graph())),e}function r(t){return o.map(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return o.isUndefined(n)||(i.value=n),o.isUndefined(r)||(i.parent=r),i})}function i(t){return o.map(t.edges(),function(e){var n=t.edge(e),r={v:e.v,w:e.w};return o.isUndefined(e.name)||(r.name=e.name),o.isUndefined(n)||(r.value=n),r})}function a(t){var e=new u(t.options).setGraph(t.value);return o.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),o.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}var o=t("./lodash"),u=t("./graph");e.exports={write:n,read:a}},{"./graph":73,"./lodash":76}],76:[function(t,e){e.exports=t(21)},{lodash:82}],77:[function(t,e){e.exports="1.0.1"},{}],78:[function(){},{}],79:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),a="/"===o(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),a=r(e.split("/")),o=Math.min(i.length,a.length),u=o,s=0;o>s;s++)if(i[s]!==a[s]){u=s;break}for(var c=[],s=u;se&&(e=t.length+e),t.substr(e,n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":80}],80:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],81:[function(t,e,n){(function(t){!function(r){var i="object"==typeof n&&n,a="object"==typeof e&&e&&e.exports==i&&e,o="object"==typeof t&&t;(o.global===o||o.window===o)&&(r=o);var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,h={"Á":"Aacute","á":"aacute","Ă":"Abreve","ă":"abreve","∾":"ac","∿":"acd","∾̳":"acE","Â":"Acirc","â":"acirc","´":"acute","А":"Acy","а":"acy","Æ":"AElig","æ":"aelig","⁡":"af","𝔄":"Afr","𝔞":"afr","À":"Agrave","à":"agrave","ℵ":"aleph","Α":"Alpha","α":"alpha","Ā":"Amacr","ā":"amacr","⨿":"amalg","&":"amp","⩕":"andand","⩓":"And","∧":"and","⩜":"andd","⩘":"andslope","⩚":"andv","∠":"ang","⦤":"ange","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","∡":"angmsd","∟":"angrt","⊾":"angrtvb","⦝":"angrtvbd","∢":"angsph","Å":"angst","⍼":"angzarr","Ą":"Aogon","ą":"aogon","𝔸":"Aopf","𝕒":"aopf","⩯":"apacir","≈":"ap","⩰":"apE","≊":"ape","≋":"apid","'":"apos","å":"aring","𝒜":"Ascr","𝒶":"ascr","≔":"colone","*":"ast","≍":"CupCap","Ã":"Atilde","ã":"atilde","Ä":"Auml","ä":"auml","∳":"awconint","⨑":"awint","≌":"bcong","϶":"bepsi","‵":"bprime","∽":"bsim","⋍":"bsime","∖":"setmn","⫧":"Barv","⊽":"barvee","⌅":"barwed","⌆":"Barwed","⎵":"bbrk","⎶":"bbrktbrk","Б":"Bcy","б":"bcy","„":"bdquo","∵":"becaus","⦰":"bemptyv","ℬ":"Bscr","Β":"Beta","β":"beta","ℶ":"beth","≬":"twixt","𝔅":"Bfr","𝔟":"bfr","⋂":"xcap","◯":"xcirc","⋃":"xcup","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨆":"xsqcup","★":"starf","▽":"xdtri","△":"xutri","⨄":"xuplus","⋁":"Vee","⋀":"Wedge","⤍":"rbarr","⧫":"lozf","▪":"squf","▴":"utrif","▾":"dtrif","◂":"ltrif","▸":"rtrif","␣":"blank","▒":"blk12","░":"blk14","▓":"blk34","█":"block","=⃥":"bne","≡⃥":"bnequiv","⫭":"bNot","⌐":"bnot","𝔹":"Bopf","𝕓":"bopf","⊥":"bot","⋈":"bowtie","⧉":"boxbox","┐":"boxdl","╕":"boxdL","╖":"boxDl","╗":"boxDL","┌":"boxdr","╒":"boxdR","╓":"boxDr","╔":"boxDR","─":"boxh","═":"boxH","┬":"boxhd","╤":"boxHd","╥":"boxhD","╦":"boxHD","┴":"boxhu","╧":"boxHu","╨":"boxhU","╩":"boxHU","⊟":"minusb","⊞":"plusb","⊠":"timesb","┘":"boxul","╛":"boxuL","╜":"boxUl","╝":"boxUL","└":"boxur","╘":"boxuR","╙":"boxUr","╚":"boxUR","│":"boxv","║":"boxV","┼":"boxvh","╪":"boxvH","╫":"boxVh","╬":"boxVH","┤":"boxvl","╡":"boxvL","╢":"boxVl","╣":"boxVL","├":"boxvr","╞":"boxvR","╟":"boxVr","╠":"boxVR","˘":"breve","¦":"brvbar","𝒷":"bscr","⁏":"bsemi","⧅":"bsolb","\\":"bsol","⟈":"bsolhsub","•":"bull","≎":"bump","⪮":"bumpE","≏":"bumpe","Ć":"Cacute","ć":"cacute","⩄":"capand","⩉":"capbrcup","⩋":"capcap","∩":"cap","⋒":"Cap","⩇":"capcup","⩀":"capdot","ⅅ":"DD","∩︀":"caps","⁁":"caret","ˇ":"caron","ℭ":"Cfr","⩍":"ccaps","Č":"Ccaron","č":"ccaron","Ç":"Ccedil","ç":"ccedil","Ĉ":"Ccirc","ĉ":"ccirc","∰":"Cconint","⩌":"ccups","⩐":"ccupssm","Ċ":"Cdot","ċ":"cdot","¸":"cedil","⦲":"cemptyv","¢":"cent","·":"middot","𝔠":"cfr","Ч":"CHcy","ч":"chcy","✓":"check","Χ":"Chi","χ":"chi","ˆ":"circ","≗":"cire","↺":"olarr","↻":"orarr","⊛":"oast","⊚":"ocir","⊝":"odash","⊙":"odot","®":"reg","Ⓢ":"oS","⊖":"ominus","⊕":"oplus","⊗":"otimes","○":"cir","⧃":"cirE","⨐":"cirfnint","⫯":"cirmid","⧂":"cirscir","∲":"cwconint","”":"rdquo","’":"rsquo","♣":"clubs",":":"colon","∷":"Colon","⩴":"Colone",",":"comma","@":"commat","∁":"comp","∘":"compfn","ℂ":"Copf","≅":"cong","⩭":"congdot","≡":"equiv","∮":"oint","∯":"Conint","𝕔":"copf","∐":"coprod","©":"copy","℗":"copysr","↵":"crarr","✗":"cross","⨯":"Cross","𝒞":"Cscr","𝒸":"cscr","⫏":"csub","⫑":"csube","⫐":"csup","⫒":"csupe","⋯":"ctdot","⤸":"cudarrl","⤵":"cudarrr","⋞":"cuepr","⋟":"cuesc","↶":"cularr","⤽":"cularrp","⩈":"cupbrcap","⩆":"cupcap","∪":"cup","⋓":"Cup","⩊":"cupcup","⊍":"cupdot","⩅":"cupor","∪︀":"cups","↷":"curarr","⤼":"curarrm","⋎":"cuvee","⋏":"cuwed","¤":"curren","∱":"cwint","⌭":"cylcty","†":"dagger","‡":"Dagger","ℸ":"daleth","↓":"darr","↡":"Darr","⇓":"dArr","‐":"dash","⫤":"Dashv","⊣":"dashv","⤏":"rBarr","˝":"dblac","Ď":"Dcaron","ď":"dcaron","Д":"Dcy","д":"dcy","⇊":"ddarr","ⅆ":"dd","⤑":"DDotrahd","⩷":"eDDot","°":"deg","∇":"Del","Δ":"Delta","δ":"delta","⦱":"demptyv","⥿":"dfisht","𝔇":"Dfr","𝔡":"dfr","⥥":"dHar","⇃":"dharl","⇂":"dharr","˙":"dot","`":"grave","˜":"tilde","⋄":"diam","♦":"diams","¨":"die","ϝ":"gammad","⋲":"disin","÷":"div","⋇":"divonx","Ђ":"DJcy","ђ":"djcy","⌞":"dlcorn","⌍":"dlcrop",$:"dollar","𝔻":"Dopf","𝕕":"dopf","⃜":"DotDot","≐":"doteq","≑":"eDot","∸":"minusd","∔":"plusdo","⊡":"sdotb","⇐":"lArr","⇔":"iff","⟸":"xlArr","⟺":"xhArr","⟹":"xrArr","⇒":"rArr","⊨":"vDash","⇑":"uArr","⇕":"vArr","∥":"par","⤓":"DownArrowBar","⇵":"duarr","̑":"DownBreve","⥐":"DownLeftRightVector","⥞":"DownLeftTeeVector","⥖":"DownLeftVectorBar","↽":"lhard","⥟":"DownRightTeeVector","⥗":"DownRightVectorBar","⇁":"rhard","↧":"mapstodown","⊤":"top","⤐":"RBarr","⌟":"drcorn","⌌":"drcrop","𝒟":"Dscr","𝒹":"dscr","Ѕ":"DScy","ѕ":"dscy","⧶":"dsol","Đ":"Dstrok","đ":"dstrok","⋱":"dtdot","▿":"dtri","⥯":"duhar","⦦":"dwangle","Џ":"DZcy","џ":"dzcy","⟿":"dzigrarr","É":"Eacute","é":"eacute","⩮":"easter","Ě":"Ecaron","ě":"ecaron","Ê":"Ecirc","ê":"ecirc","≖":"ecir","≕":"ecolon","Э":"Ecy","э":"ecy","Ė":"Edot","ė":"edot","ⅇ":"ee","≒":"efDot","𝔈":"Efr","𝔢":"efr","⪚":"eg","È":"Egrave","è":"egrave","⪖":"egs","⪘":"egsdot","⪙":"el","∈":"in","⏧":"elinters","ℓ":"ell","⪕":"els","⪗":"elsdot","Ē":"Emacr","ē":"emacr","∅":"empty","◻":"EmptySmallSquare","▫":"EmptyVerySmallSquare"," ":"emsp13"," ":"emsp14"," ":"emsp","Ŋ":"ENG","ŋ":"eng"," ":"ensp","Ę":"Eogon","ę":"eogon","𝔼":"Eopf","𝕖":"eopf","⋕":"epar","⧣":"eparsl","⩱":"eplus","ε":"epsi","Ε":"Epsilon","ϵ":"epsiv","≂":"esim","⩵":"Equal","=":"equals","≟":"equest","⇌":"rlhar","⩸":"equivDD","⧥":"eqvparsl","⥱":"erarr","≓":"erDot","ℯ":"escr","ℰ":"Escr","⩳":"Esim","Η":"Eta","η":"eta","Ð":"ETH","ð":"eth","Ë":"Euml","ë":"euml","€":"euro","!":"excl","∃":"exist","Ф":"Fcy","ф":"fcy","♀":"female","ffi":"ffilig","ff":"fflig","ffl":"ffllig","𝔉":"Ffr","𝔣":"ffr","fi":"filig","◼":"FilledSmallSquare",fj:"fjlig","♭":"flat","fl":"fllig","▱":"fltns","ƒ":"fnof","𝔽":"Fopf","𝕗":"fopf","∀":"forall","⋔":"fork","⫙":"forkv","ℱ":"Fscr","⨍":"fpartint","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","⅔":"frac23","⅖":"frac25","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","⁄":"frasl","⌢":"frown","𝒻":"fscr","ǵ":"gacute","Γ":"Gamma","γ":"gamma","Ϝ":"Gammad","⪆":"gap","Ğ":"Gbreve","ğ":"gbreve","Ģ":"Gcedil","Ĝ":"Gcirc","ĝ":"gcirc","Г":"Gcy","г":"gcy","Ġ":"Gdot","ġ":"gdot","≥":"ge","≧":"gE","⪌":"gEl","⋛":"gel","⩾":"ges","⪩":"gescc","⪀":"gesdot","⪂":"gesdoto","⪄":"gesdotol","⋛︀":"gesl","⪔":"gesles","𝔊":"Gfr","𝔤":"gfr","≫":"gg","⋙":"Gg","ℷ":"gimel","Ѓ":"GJcy","ѓ":"gjcy","⪥":"gla","≷":"gl","⪒":"glE","⪤":"glj","⪊":"gnap","⪈":"gne","≩":"gnE","⋧":"gnsim","𝔾":"Gopf","𝕘":"gopf","⪢":"GreaterGreater","≳":"gsim","𝒢":"Gscr","ℊ":"gscr","⪎":"gsime","⪐":"gsiml","⪧":"gtcc","⩺":"gtcir",">":"gt","⋗":"gtdot","⦕":"gtlPar","⩼":"gtquest","⥸":"gtrarr","≩︀":"gvnE"," ":"hairsp","ℋ":"Hscr","Ъ":"HARDcy","ъ":"hardcy","⥈":"harrcir","↔":"harr","↭":"harrw","^":"Hat","ℏ":"hbar","Ĥ":"Hcirc","ĥ":"hcirc","♥":"hearts","…":"mldr","⊹":"hercon","𝔥":"hfr","ℌ":"Hfr","⤥":"searhk","⤦":"swarhk","⇿":"hoarr","∻":"homtht","↩":"larrhk","↪":"rarrhk","𝕙":"hopf","ℍ":"Hopf","―":"horbar","𝒽":"hscr","Ħ":"Hstrok","ħ":"hstrok","⁃":"hybull","Í":"Iacute","í":"iacute","⁣":"ic","Î":"Icirc","î":"icirc","И":"Icy","и":"icy","İ":"Idot","Е":"IEcy","е":"iecy","¡":"iexcl","𝔦":"ifr","ℑ":"Im","Ì":"Igrave","ì":"igrave","ⅈ":"ii","⨌":"qint","∭":"tint","⧜":"iinfin","℩":"iiota","IJ":"IJlig","ij":"ijlig","Ī":"Imacr","ī":"imacr","ℐ":"Iscr","ı":"imath","⊷":"imof","Ƶ":"imped","℅":"incare","∞":"infin","⧝":"infintie","⊺":"intcal","∫":"int","∬":"Int","ℤ":"Zopf","⨗":"intlarhk","⨼":"iprod","⁢":"it","Ё":"IOcy","ё":"iocy","Į":"Iogon","į":"iogon","𝕀":"Iopf","𝕚":"iopf","Ι":"Iota","ι":"iota","¿":"iquest","𝒾":"iscr","⋵":"isindot","⋹":"isinE","⋴":"isins","⋳":"isinsv","Ĩ":"Itilde","ĩ":"itilde","І":"Iukcy","і":"iukcy","Ï":"Iuml","ï":"iuml","Ĵ":"Jcirc","ĵ":"jcirc","Й":"Jcy","й":"jcy","𝔍":"Jfr","𝔧":"jfr","ȷ":"jmath","𝕁":"Jopf","𝕛":"jopf","𝒥":"Jscr","𝒿":"jscr","Ј":"Jsercy","ј":"jsercy","Є":"Jukcy","є":"jukcy","Κ":"Kappa","κ":"kappa","ϰ":"kappav","Ķ":"Kcedil","ķ":"kcedil","К":"Kcy","к":"kcy","𝔎":"Kfr","𝔨":"kfr","ĸ":"kgreen","Х":"KHcy","х":"khcy","Ќ":"KJcy","ќ":"kjcy","𝕂":"Kopf","𝕜":"kopf","𝒦":"Kscr","𝓀":"kscr","⇚":"lAarr","Ĺ":"Lacute","ĺ":"lacute","⦴":"laemptyv","ℒ":"Lscr","Λ":"Lambda","λ":"lambda","⟨":"lang","⟪":"Lang","⦑":"langd","⪅":"lap","«":"laquo","⇤":"larrb","⤟":"larrbfs","←":"larr","↞":"Larr","⤝":"larrfs","↫":"larrlp","⤹":"larrpl","⥳":"larrsim","↢":"larrtl","⤙":"latail","⤛":"lAtail","⪫":"lat","⪭":"late","⪭︀":"lates","⤌":"lbarr","⤎":"lBarr","❲":"lbbrk","{":"lcub","[":"lsqb","⦋":"lbrke","⦏":"lbrksld","⦍":"lbrkslu","Ľ":"Lcaron","ľ":"lcaron","Ļ":"Lcedil","ļ":"lcedil","⌈":"lceil","Л":"Lcy","л":"lcy","⤶":"ldca","“":"ldquo","⥧":"ldrdhar","⥋":"ldrushar","↲":"ldsh","≤":"le","≦":"lE","⇆":"lrarr","⟦":"lobrk","⥡":"LeftDownTeeVector","⥙":"LeftDownVectorBar","⌊":"lfloor","↼":"lharu","⇇":"llarr","⇋":"lrhar","⥎":"LeftRightVector","↤":"mapstoleft","⥚":"LeftTeeVector","⋋":"lthree","⧏":"LeftTriangleBar","⊲":"vltri","⊴":"ltrie","⥑":"LeftUpDownVector","⥠":"LeftUpTeeVector","⥘":"LeftUpVectorBar","↿":"uharl","⥒":"LeftVectorBar","⪋":"lEg","⋚":"leg","⩽":"les","⪨":"lescc","⩿":"lesdot","⪁":"lesdoto","⪃":"lesdotor","⋚︀":"lesg","⪓":"lesges","⋖":"ltdot","≶":"lg","⪡":"LessLess","≲":"lsim","⥼":"lfisht","𝔏":"Lfr","𝔩":"lfr","⪑":"lgE","⥢":"lHar","⥪":"lharul","▄":"lhblk","Љ":"LJcy","љ":"ljcy","≪":"ll","⋘":"Ll","⥫":"llhard","◺":"lltri","Ŀ":"Lmidot","ŀ":"lmidot","⎰":"lmoust","⪉":"lnap","⪇":"lne","≨":"lnE","⋦":"lnsim","⟬":"loang","⇽":"loarr","⟵":"xlarr","⟷":"xharr","⟼":"xmap","⟶":"xrarr","↬":"rarrlp","⦅":"lopar","𝕃":"Lopf","𝕝":"lopf","⨭":"loplus","⨴":"lotimes","∗":"lowast",_:"lowbar","↙":"swarr","↘":"searr","◊":"loz","(":"lpar","⦓":"lparlt","⥭":"lrhard","‎":"lrm","⊿":"lrtri","‹":"lsaquo","𝓁":"lscr","↰":"lsh","⪍":"lsime","⪏":"lsimg","‘":"lsquo","‚":"sbquo","Ł":"Lstrok","ł":"lstrok","⪦":"ltcc","⩹":"ltcir","<":"lt","⋉":"ltimes","⥶":"ltlarr","⩻":"ltquest","◃":"ltri","⦖":"ltrPar","⥊":"lurdshar","⥦":"luruhar","≨︀":"lvnE","¯":"macr","♂":"male","✠":"malt","⤅":"Map","↦":"map","↥":"mapstoup","▮":"marker","⨩":"mcomma","М":"Mcy","м":"mcy","—":"mdash","∺":"mDDot"," ":"MediumSpace","ℳ":"Mscr","𝔐":"Mfr","𝔪":"mfr","℧":"mho","µ":"micro","⫰":"midcir","∣":"mid","−":"minus","⨪":"minusdu","∓":"mp","⫛":"mlcp","⊧":"models","𝕄":"Mopf","𝕞":"mopf","𝓂":"mscr","Μ":"Mu","μ":"mu","⊸":"mumap","Ń":"Nacute","ń":"nacute","∠⃒":"nang","≉":"nap","⩰̸":"napE","≋̸":"napid","ʼn":"napos","♮":"natur","ℕ":"Nopf"," ":"nbsp","≎̸":"nbump","≏̸":"nbumpe","⩃":"ncap","Ň":"Ncaron","ň":"ncaron","Ņ":"Ncedil","ņ":"ncedil","≇":"ncong","⩭̸":"ncongdot","⩂":"ncup","Н":"Ncy","н":"ncy","–":"ndash","⤤":"nearhk","↗":"nearr","⇗":"neArr","≠":"ne","≐̸":"nedot","​":"ZeroWidthSpace","≢":"nequiv","⤨":"toea","≂̸":"nesim","\n":"NewLine","∄":"nexist","𝔑":"Nfr","𝔫":"nfr","≧̸":"ngE","≱":"nge","⩾̸":"nges","⋙̸":"nGg","≵":"ngsim","≫⃒":"nGt","≯":"ngt","≫̸":"nGtv","↮":"nharr","⇎":"nhArr","⫲":"nhpar","∋":"ni","⋼":"nis","⋺":"nisd","Њ":"NJcy","њ":"njcy","↚":"nlarr","⇍":"nlArr","‥":"nldr","≦̸":"nlE","≰":"nle","⩽̸":"nles","≮":"nlt","⋘̸":"nLl","≴":"nlsim","≪⃒":"nLt","⋪":"nltri","⋬":"nltrie","≪̸":"nLtv","∤":"nmid","⁠":"NoBreak","𝕟":"nopf","⫬":"Not","¬":"not","≭":"NotCupCap","∦":"npar","∉":"notin","≹":"ntgl","⋵̸":"notindot","⋹̸":"notinE","⋷":"notinvb","⋶":"notinvc","⧏̸":"NotLeftTriangleBar","≸":"ntlg","⪢̸":"NotNestedGreaterGreater","⪡̸":"NotNestedLessLess","∌":"notni","⋾":"notnivb","⋽":"notnivc","⊀":"npr","⪯̸":"npre","⋠":"nprcue","⧐̸":"NotRightTriangleBar","⋫":"nrtri","⋭":"nrtrie","⊏̸":"NotSquareSubset","⋢":"nsqsube","⊐̸":"NotSquareSuperset","⋣":"nsqsupe","⊂⃒":"vnsub","⊈":"nsube","⊁":"nsc","⪰̸":"nsce","⋡":"nsccue","≿̸":"NotSucceedsTilde","⊃⃒":"vnsup","⊉":"nsupe","≁":"nsim","≄":"nsime","⫽⃥":"nparsl","∂̸":"npart","⨔":"npolint","⤳̸":"nrarrc","↛":"nrarr","⇏":"nrArr","↝̸":"nrarrw","𝒩":"Nscr","𝓃":"nscr","⊄":"nsub","⫅̸":"nsubE","⊅":"nsup","⫆̸":"nsupE","Ñ":"Ntilde","ñ":"ntilde","Ν":"Nu","ν":"nu","#":"num","№":"numero"," ":"numsp","≍⃒":"nvap","⊬":"nvdash","⊭":"nvDash","⊮":"nVdash","⊯":"nVDash","≥⃒":"nvge",">⃒":"nvgt","⤄":"nvHarr","⧞":"nvinfin","⤂":"nvlArr","≤⃒":"nvle","<⃒":"nvlt","⊴⃒":"nvltrie","⤃":"nvrArr","⊵⃒":"nvrtrie","∼⃒":"nvsim","⤣":"nwarhk","↖":"nwarr","⇖":"nwArr","⤧":"nwnear","Ó":"Oacute","ó":"oacute","Ô":"Ocirc","ô":"ocirc","О":"Ocy","о":"ocy","Ő":"Odblac","ő":"odblac","⨸":"odiv","⦼":"odsold","Œ":"OElig","œ":"oelig","⦿":"ofcir","𝔒":"Ofr","𝔬":"ofr","˛":"ogon","Ò":"Ograve","ò":"ograve","⧁":"ogt","⦵":"ohbar","Ω":"ohm","⦾":"olcir","⦻":"olcross","‾":"oline","⧀":"olt","Ō":"Omacr","ō":"omacr","ω":"omega","Ο":"Omicron","ο":"omicron","⦶":"omid","𝕆":"Oopf","𝕠":"oopf","⦷":"opar","⦹":"operp","⩔":"Or","∨":"or","⩝":"ord","ℴ":"oscr","ª":"ordf","º":"ordm","⊶":"origof","⩖":"oror","⩗":"orslope","⩛":"orv","𝒪":"Oscr","Ø":"Oslash","ø":"oslash","⊘":"osol","Õ":"Otilde","õ":"otilde","⨶":"otimesas","⨷":"Otimes","Ö":"Ouml","ö":"ouml","⌽":"ovbar","⏞":"OverBrace","⎴":"tbrk","⏜":"OverParenthesis","¶":"para","⫳":"parsim","⫽":"parsl","∂":"part","П":"Pcy","п":"pcy","%":"percnt",".":"period","‰":"permil","‱":"pertenk","𝔓":"Pfr","𝔭":"pfr","Φ":"Phi","φ":"phi","ϕ":"phiv","☎":"phone","Π":"Pi","π":"pi","ϖ":"piv","ℎ":"planckh","⨣":"plusacir","⨢":"pluscir","+":"plus","⨥":"plusdu","⩲":"pluse","±":"pm","⨦":"plussim","⨧":"plustwo","⨕":"pointint","𝕡":"popf","ℙ":"Popf","£":"pound","⪷":"prap","⪻":"Pr","≺":"pr","≼":"prcue","⪯":"pre","≾":"prsim","⪹":"prnap","⪵":"prnE","⋨":"prnsim","⪳":"prE","′":"prime","″":"Prime","∏":"prod","⌮":"profalar","⌒":"profline","⌓":"profsurf","∝":"prop","⊰":"prurel","𝒫":"Pscr","𝓅":"pscr","Ψ":"Psi","ψ":"psi"," ":"puncsp","𝔔":"Qfr","𝔮":"qfr","𝕢":"qopf","ℚ":"Qopf","⁗":"qprime","𝒬":"Qscr","𝓆":"qscr","⨖":"quatint","?":"quest",'"':"quot","⇛":"rAarr","∽̱":"race","Ŕ":"Racute","ŕ":"racute","√":"Sqrt","⦳":"raemptyv","⟩":"rang","⟫":"Rang","⦒":"rangd","⦥":"range","»":"raquo","⥵":"rarrap","⇥":"rarrb","⤠":"rarrbfs","⤳":"rarrc","→":"rarr","↠":"Rarr","⤞":"rarrfs","⥅":"rarrpl","⥴":"rarrsim","⤖":"Rarrtl","↣":"rarrtl","↝":"rarrw","⤚":"ratail","⤜":"rAtail","∶":"ratio","❳":"rbbrk","}":"rcub","]":"rsqb","⦌":"rbrke","⦎":"rbrksld","⦐":"rbrkslu","Ř":"Rcaron","ř":"rcaron","Ŗ":"Rcedil","ŗ":"rcedil","⌉":"rceil","Р":"Rcy","р":"rcy","⤷":"rdca","⥩":"rdldhar","↳":"rdsh","ℜ":"Re","ℛ":"Rscr","ℝ":"Ropf","▭":"rect","⥽":"rfisht","⌋":"rfloor","𝔯":"rfr","⥤":"rHar","⇀":"rharu","⥬":"rharul","Ρ":"Rho","ρ":"rho","ϱ":"rhov","⇄":"rlarr","⟧":"robrk","⥝":"RightDownTeeVector","⥕":"RightDownVectorBar","⇉":"rrarr","⊢":"vdash","⥛":"RightTeeVector","⋌":"rthree","⧐":"RightTriangleBar","⊳":"vrtri","⊵":"rtrie","⥏":"RightUpDownVector","⥜":"RightUpTeeVector","⥔":"RightUpVectorBar","↾":"uharr","⥓":"RightVectorBar","˚":"ring","‏":"rlm","⎱":"rmoust","⫮":"rnmid","⟭":"roang","⇾":"roarr","⦆":"ropar","𝕣":"ropf","⨮":"roplus","⨵":"rotimes","⥰":"RoundImplies",")":"rpar","⦔":"rpargt","⨒":"rppolint","›":"rsaquo","𝓇":"rscr","↱":"rsh","⋊":"rtimes","▹":"rtri","⧎":"rtriltri","⧴":"RuleDelayed","⥨":"ruluhar","℞":"rx","Ś":"Sacute","ś":"sacute","⪸":"scap","Š":"Scaron","š":"scaron","⪼":"Sc","≻":"sc","≽":"sccue","⪰":"sce","⪴":"scE","Ş":"Scedil","ş":"scedil","Ŝ":"Scirc","ŝ":"scirc","⪺":"scnap","⪶":"scnE","⋩":"scnsim","⨓":"scpolint","≿":"scsim","С":"Scy","с":"scy","⋅":"sdot","⩦":"sdote","⇘":"seArr","§":"sect",";":"semi","⤩":"tosa","✶":"sext","𝔖":"Sfr","𝔰":"sfr","♯":"sharp","Щ":"SHCHcy","щ":"shchcy","Ш":"SHcy","ш":"shcy","↑":"uarr","­":"shy","Σ":"Sigma","σ":"sigma","ς":"sigmaf","∼":"sim","⩪":"simdot","≃":"sime","⪞":"simg","⪠":"simgE","⪝":"siml","⪟":"simlE","≆":"simne","⨤":"simplus","⥲":"simrarr","⨳":"smashp","⧤":"smeparsl","⌣":"smile","⪪":"smt","⪬":"smte","⪬︀":"smtes","Ь":"SOFTcy","ь":"softcy","⌿":"solbar","⧄":"solb","/":"sol","𝕊":"Sopf","𝕤":"sopf","♠":"spades","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊏":"sqsub","⊑":"sqsube","⊐":"sqsup","⊒":"sqsupe","□":"squ","𝒮":"Sscr","𝓈":"sscr","⋆":"Star","☆":"star","⊂":"sub","⋐":"Sub","⪽":"subdot","⫅":"subE","⊆":"sube","⫃":"subedot","⫁":"submult","⫋":"subnE","⊊":"subne","⪿":"subplus","⥹":"subrarr","⫇":"subsim","⫕":"subsub","⫓":"subsup","∑":"sum","♪":"sung","¹":"sup1","²":"sup2","³":"sup3","⊃":"sup","⋑":"Sup","⪾":"supdot","⫘":"supdsub","⫆":"supE","⊇":"supe","⫄":"supedot","⟉":"suphsol","⫗":"suphsub","⥻":"suplarr","⫂":"supmult","⫌":"supnE","⊋":"supne","⫀":"supplus","⫈":"supsim","⫔":"supsub","⫖":"supsup","⇙":"swArr","⤪":"swnwar","ß":"szlig"," ":"Tab","⌖":"target","Τ":"Tau","τ":"tau","Ť":"Tcaron","ť":"tcaron","Ţ":"Tcedil","ţ":"tcedil","Т":"Tcy","т":"tcy","⃛":"tdot","⌕":"telrec","𝔗":"Tfr","𝔱":"tfr","∴":"there4","Θ":"Theta","θ":"theta","ϑ":"thetav","  ":"ThickSpace"," ":"thinsp","Þ":"THORN","þ":"thorn","⨱":"timesbar","×":"times","⨰":"timesd","⌶":"topbot","⫱":"topcir","𝕋":"Topf","𝕥":"topf","⫚":"topfork","‴":"tprime","™":"trade","▵":"utri","≜":"trie","◬":"tridot","⨺":"triminus","⨹":"triplus","⧍":"trisb","⨻":"tritime","⏢":"trpezium","𝒯":"Tscr","𝓉":"tscr","Ц":"TScy","ц":"tscy","Ћ":"TSHcy","ћ":"tshcy","Ŧ":"Tstrok","ŧ":"tstrok","Ú":"Uacute","ú":"uacute","↟":"Uarr","⥉":"Uarrocir","Ў":"Ubrcy","ў":"ubrcy","Ŭ":"Ubreve","ŭ":"ubreve","Û":"Ucirc","û":"ucirc","У":"Ucy","у":"ucy","⇅":"udarr","Ű":"Udblac","ű":"udblac","⥮":"udhar","⥾":"ufisht","𝔘":"Ufr","𝔲":"ufr","Ù":"Ugrave","ù":"ugrave","⥣":"uHar","▀":"uhblk","⌜":"ulcorn","⌏":"ulcrop","◸":"ultri","Ū":"Umacr","ū":"umacr","⏟":"UnderBrace","⏝":"UnderParenthesis","⊎":"uplus","Ų":"Uogon","ų":"uogon","𝕌":"Uopf","𝕦":"uopf","⤒":"UpArrowBar","↕":"varr","υ":"upsi","ϒ":"Upsi","Υ":"Upsilon","⇈":"uuarr","⌝":"urcorn","⌎":"urcrop","Ů":"Uring","ů":"uring","◹":"urtri","𝒰":"Uscr","𝓊":"uscr","⋰":"utdot","Ũ":"Utilde","ũ":"utilde","Ü":"Uuml","ü":"uuml","⦧":"uwangle","⦜":"vangrt","⊊︀":"vsubne","⫋︀":"vsubnE","⊋︀":"vsupne","⫌︀":"vsupnE","⫨":"vBar","⫫":"Vbar","⫩":"vBarv","В":"Vcy","в":"vcy","⊩":"Vdash","⊫":"VDash","⫦":"Vdashl","⊻":"veebar","≚":"veeeq","⋮":"vellip","|":"vert","‖":"Vert","❘":"VerticalSeparator","≀":"wr","𝔙":"Vfr","𝔳":"vfr","𝕍":"Vopf","𝕧":"vopf","𝒱":"Vscr","𝓋":"vscr","⊪":"Vvdash","⦚":"vzigzag","Ŵ":"Wcirc","ŵ":"wcirc","⩟":"wedbar","≙":"wedgeq","℘":"wp","𝔚":"Wfr","𝔴":"wfr","𝕎":"Wopf","𝕨":"wopf","𝒲":"Wscr","𝓌":"wscr","𝔛":"Xfr","𝔵":"xfr","Ξ":"Xi","ξ":"xi","⋻":"xnis","𝕏":"Xopf","𝕩":"xopf","𝒳":"Xscr","𝓍":"xscr","Ý":"Yacute","ý":"yacute","Я":"YAcy","я":"yacy","Ŷ":"Ycirc","ŷ":"ycirc","Ы":"Ycy","ы":"ycy","¥":"yen","𝔜":"Yfr","𝔶":"yfr","Ї":"YIcy","ї":"yicy","𝕐":"Yopf","𝕪":"yopf","𝒴":"Yscr","𝓎":"yscr","Ю":"YUcy","ю":"yucy","ÿ":"yuml","Ÿ":"Yuml","Ź":"Zacute","ź":"zacute","Ž":"Zcaron","ž":"zcaron","З":"Zcy","з":"zcy","Ż":"Zdot","ż":"zdot","ℨ":"Zfr","Ζ":"Zeta","ζ":"zeta","𝔷":"zfr","Ж":"ZHcy","ж":"zhcy","⇝":"zigrarr","𝕫":"zopf","𝒵":"Zscr","𝓏":"zscr","‍":"zwj","‌":"zwnj"},f=/["&'<>`]/g,d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},p=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|iacute|Uacute|plusmn|otilde|Otilde|Agrave|agrave|yacute|Yacute|oslash|Oslash|Atilde|atilde|brvbar|Ccedil|ccedil|ograve|curren|divide|Eacute|eacute|Ograve|oacute|Egrave|egrave|ugrave|frac12|frac14|frac34|Ugrave|Oacute|Iacute|ntilde|Ntilde|uacute|middot|Igrave|igrave|iquest|aacute|laquo|THORN|micro|iexcl|icirc|Icirc|Acirc|ucirc|ecirc|Ocirc|ocirc|Ecirc|Ucirc|aring|Aring|aelig|AElig|acute|pound|raquo|acirc|times|thorn|szlig|cedil|COPY|Auml|ordf|ordm|uuml|macr|Uuml|auml|Ouml|ouml|para|nbsp|Euml|quot|QUOT|euml|yuml|cent|sect|copy|sup1|sup2|sup3|Iuml|iuml|shy|eth|reg|not|yen|amp|AMP|REG|uml|ETH|deg|gt|GT|LT|lt)([=a-zA-Z0-9])?/g,m={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},v={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},b={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,w={},k=w.hasOwnProperty,A=function(t,e){return k.call(t,e) -},E=function(t,e){for(var n=-1,r=t.length;++n=55296&&57343>=t||t>1114111?(e&&C("character reference outside the permissible Unicode range"),"�"):A(b,t)?(e&&C("disallowed character reference"),b[t]):(e&&E(_,t)&&C("disallowed character reference"),t>65535&&(t-=65536,n+=x(t>>>10&1023|55296),t=56320|1023&t),n+=x(t))},S=function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"},C=function(t){throw Error("Parse error: "+t)},T=function(t,e){e=D(e,T.options);var n=e.strict;n&&g.test(t)&&C("forbidden code point");var r=e.encodeEverything,i=e.useNamedReferences,a=e.allowUnsafeSymbols;return r?(t=t.replace(s,function(t){return i&&A(h,t)?"&"+h[t]+";":S(t)}),i&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(t=t.replace(l,function(t){return"&"+h[t]+";"}))):i?(a||(t=t.replace(f,function(t){return"&"+h[t]+";"})),t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),t=t.replace(l,function(t){return"&"+h[t]+";"})):a||(t=t.replace(f,S)),t.replace(u,function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),r=1024*(e-55296)+n-56320+65536;return"&#x"+r.toString(16).toUpperCase()+";"}).replace(c,S)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var F=function(t,e){e=D(e,F.options);var n=e.strict;return n&&p.test(t)&&C("malformed character reference"),t.replace(y,function(t,r,i,a,o,u,s,c){var l,h,f,d,p;return r?(l=r,h=i,n&&!h&&C("character reference was not terminated by a semicolon"),M(l,n)):a?(f=a,h=o,n&&!h&&C("character reference was not terminated by a semicolon"),l=parseInt(f,16),M(l,n)):u?(d=u,A(m,d)?m[d]:(n&&C("named character reference was not terminated by a semicolon"),t)):(d=s,p=c,p&&e.isAttributeValue?(n&&"="==p&&C("`&` did not start a character reference"),t):(n&&C("named character reference was not terminated by a semicolon"),v[d]+(p||"")))})};F.options={isAttributeValue:!1,strict:!1};var L=function(t){return t.replace(f,function(t){return d[t]})},B={version:"0.5.0",encode:T,decode:F,escape:L,unescape:F};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return B});else if(i&&!i.nodeType)if(a)a.exports=B;else for(var N in B)A(B,N)&&(i[N]=B[N]);else r.he=B}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r-1?0:-1:t?0:-1}function a(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:_+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function o(t){return t.charCodeAt(0)}function u(t,e){for(var n=t.criteria,r=e.criteria,i=-1,a=n.length;++iu||"undefined"==typeof o)return 1;if(u>o||"undefined"==typeof u)return-1}}return t.index-e.index}function s(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],o=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&o&&"object"==typeof o)return!1;var u=h();u["false"]=u["null"]=u["true"]=u.undefined=!1;var s=h();for(s.array=t,s.cache=u,s.push=a;++ei?0:i);++r=x&&a===r,c=[];if(u){var l=s(e);l?(a=i,e=l):u=!1}for(;++n-1:void 0});return i.pop(),a.pop(),v&&(f(i),f(a)),o}function ee(t,e,n,r,i){(Jr(e)?Xe:si)(e,function(e,a){var o,u,s=e,c=t[a];if(e&&((u=Jr(e))||ci(e))){for(var l=r.length;l--;)if(o=r[l]==e){c=i[l];break}if(!o){var h;n&&(s=n(c,e),(h="undefined"!=typeof s)&&(c=s)),h||(c=u?Jr(c)?c:[]:ci(c)?c:{}),r.push(e),i.push(c),h||ee(c,e,n,r,i)}}else n&&(s=n(c,e),"undefined"==typeof s&&(s=e)),"undefined"!=typeof s&&(c=s);t[a]=c})}function re(t,e){return t+Fr(Wr()*(e-t+1))}function ie(t,e,n){var a=-1,o=se(),u=t?t.length:0,c=[],h=!e&&u>=x&&o===r,p=n||h?l():c;if(h){var g=s(p);o=i,p=g}for(;++a3&&"function"==typeof e[n-2])var r=w(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var i=p(arguments,1,n),a=-1,o=l(),u=l();++an?Hr(0,a+n):n)||0,Jr(t)?o=i(t,e,n)>-1:"number"==typeof a?o=(Oe(t)?t.indexOf(e,n):i(t,e,n))>-1:si(t,function(t){return++r>=n?!(o=t===e):void 0}),o}function Ge(t,n,r){var i=!0;n=e.createCallback(n,r,3);var a=-1,o=t?t.length:0;if("number"==typeof o)for(;++aa&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);o>i&&(i=o,a=t)});return a}function en(t,n,r){var i=1/0,a=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Jr(t))for(var u=-1,s=t.length;++uc&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);i>o&&(i=o,a=t)});return a}function nn(t,n,r,i){if(!t)return r;var a=arguments.length<3;n=e.createCallback(n,i,4);var o=-1,u=t.length;if("number"==typeof u)for(a&&(r=t[++o]);++on?Hr(0,i+n):n||0}else if(n){var a=Mn(t,e);return t[a]===e?a:-1}return r(t,e,n)}function bn(t,n,r){var i=0,a=t?t.length:0;if("number"!=typeof n&&null!=n){var o=a;for(n=e.createCallback(n,r,3);o--&&n(t[o],o,t);)i++}else i=null==n||r?1:n||i;return p(t,0,Gr(Hr(0,a-i),a))}function _n(){for(var t=[],e=-1,n=arguments.length,a=l(),o=se(),u=o===r,c=l();++e=x&&s(e?t[e]:c)))}var p=t[0],g=-1,y=p?p.length:0,m=[];t:for(;++gn?Hr(0,r+n):Gr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function kn(t){for(var e=arguments,n=0,r=e.length,i=t?t.length:0;++na;){var u=a+o>>>1;r(t[u])1?arguments:arguments[0],e=-1,n=t?tn(di(t,"length")):0,r=pr(0>n?0:n);++e2?oe(t,17,p(arguments,2),null,e):oe(t,1,null,null,e)}function In(t){for(var e=arguments.length>1?Q(arguments,!0,!1,1):_e(t),n=-1,r=e.length;++n2?oe(e,19,p(arguments,2),null,t):oe(e,3,null,null,t)}function Rn(){for(var t=arguments,e=t.length;e--;)if(!Ce(t[e]))throw new kr;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Pn(t,e){return e="number"==typeof e?e:+e||t.length,oe(t,4,null,null,null,e)}function Un(t,e,n){var r,i,a,o,u,s,c,l=0,h=!1,f=!0;if(!Ce(t))throw new kr;if(e=Hr(0,e)||0,n===!0){var d=!0;f=!1}else Te(n)&&(d=n.leading,h="maxWait"in n&&(Hr(e,n.maxWait)||0),f="trailing"in n?n.trailing:f);var p=function(){var n=e-(gi()-o);if(0>=n){i&&Tr(i);var h=c;i=s=c=y,h&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))}else s=Ir(p,n)},g=function(){s&&Tr(s),i=s=c=y,(f||h!==e)&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))};return function(){if(r=arguments,o=gi(),u=this,c=f&&(s||!d),h===!1)var n=d&&!s;else{i||d||(l=o);var y=h-(o-l),m=0>=y;m?(i&&(i=Tr(i)),l=o,a=t.apply(u,r)):i||(i=Ir(g,y))}return m&&s?s=Tr(s):s||e===h||(s=Ir(p,e)),n&&(m=!0,a=t.apply(u,r)),!m||s||i||(r=u=null),a}}function Yn(t){if(!Ce(t))throw new kr;var e=p(arguments,1);return Ir(function(){t.apply(y,e)},1)}function jn(t,e){if(!Ce(t))throw new kr;var n=p(arguments,2);return Ir(function(){t.apply(y,n)},e)}function zn(t,e){if(!Ce(t))throw new kr;var n=function(){var r=n.cache,i=e?e.apply(this,arguments):_+arguments[0];return Nr.call(r,i)?r[i]:r[i]=t.apply(this,arguments)};return n.cache={},n}function Vn(t){var e,n;if(!Ce(t))throw new kr;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Hn(t){return oe(t,16,p(arguments,1))}function Gn(t){return oe(t,32,null,p(arguments,1))}function $n(t,e,n){var r=!0,i=!0;if(!Ce(t))throw new kr;return n===!1?r=!1:Te(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),$.leading=r,$.maxWait=e,$.trailing=i,Un(t,e,$)}function Wn(t,e){return oe(e,16,[t])}function Zn(t){return function(){return t}}function Xn(t,e,n){var r=typeof t;if(null==t||"function"==r)return w(t,e,n);if("object"!=r)return nr(t);var i=ti(t),a=i[0],o=t[a];return 1!=i.length||o!==o||Te(o)?function(e){for(var n=i.length,r=!1;n--&&(r=te(e[i[n]],t[i[n]],null,!0)););return r}:function(t){var e=t[a];return o===e&&(0!==o||1/o==1/e)}}function Kn(t){return null==t?"":wr(t).replace(ii,ue)}function Jn(t){return t}function Qn(t,r,i){var a=!0,o=r&&_e(r);r&&(i||o.length)||(null==i&&(i=r),u=n,r=t,t=e,o=_e(r)),i===!1?a=!1:Te(i)&&"chain"in i&&(a=i.chain);var u=t,s=Ce(u);Xe(o,function(e){var n=t[e]=r[e];s&&(u.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=[r];Or.apply(i,arguments);var o=n.apply(t,i);if(a||e){if(r===o&&Te(o))return this;o=new u(o),o.__chain__=e}return o})})}function tr(){return t._=Dr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,i=null==e;if(null==n&&("boolean"==typeof t&&i?(n=t,t=1):i||"boolean"!=typeof e||(n=e,i=!0)),r&&i&&(e=1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var a=Wr();return Gr(t+a*(e-t+parseFloat("1e-"+((a+"").length-1))),e)}return re(t,e)}function ir(t,e){if(t){var n=t[e];return Ce(n)?t[e]():n}}function ar(t,n,r){var i=e.templateSettings;t=wr(t||""),r=oi({},r,i);var a,o=oi({},r.imports,i.imports),u=ti(o),s=ze(o),l=0,h=r.interpolate||L,f="__p += '",d=xr((r.escape||L).source+"|"+h.source+"|"+(h===T?M:L).source+"|"+(r.evaluate||L).source+"|$","g");t.replace(d,function(e,n,r,i,o,u){return r||(r=i),f+=t.slice(l,u).replace(N,c),n&&(f+="' +\n__e("+n+") +\n'"),o&&(a=!0,f+="';\n"+o+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),f+="';\n";var p=r.variable,g=p;g||(p="obj",f="with ("+p+") {\n"+f+"\n}\n"),f=(a?f.replace(A,""):f).replace(E,"$1").replace(D,"$1;"),f="function("+p+") {\n"+(g?"":p+" || ("+p+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+I++ +"]")+"\n*/";try{var v=mr(u,"return "+f+m).apply(y,s)}catch(b){throw b.source=f,b}return n?v(n):(v.source=f,v)}function or(t,e,n){t=(t=+t)>-1?t:0;var r=-1,i=pr(t);for(e=w(e,n,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:e}},Ur||(v=function(){function e(){}return function(n){if(Te(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Kr=Pr?function(t,e){W.value=e,Pr(t,"__bindData__",W)}:er,Jr=Yr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Mr.call(t)==R||!1},Qr=function(t){var e,n=t,r=[];if(!n)return r;if(!Z[typeof t])return r;for(e in n)Nr.call(n,e)&&r.push(e);return r},ti=Vr?function(t){return Te(t)?Vr(t):[]}:Qr,ei={"&":"&","<":"<",">":">",'"':""","'":"'"},ni=we(ei),ri=xr("("+ti(ni).join("|")+")","g"),ii=xr("["+ti(ei).join("")+"]","g"),ai=function(t,e,n){var r,i=t,a=i;if(!i)return a;var o=arguments,u=0,s="number"==typeof n?2:o.length;if(s>3&&"function"==typeof o[s-2])var c=w(o[--s-1],o[s--],2);else s>2&&"function"==typeof o[s-1]&&(c=o[--s]);for(;++u/g,F=RegExp("^["+k+"]*0+(?=.$)"),L=/($^)/,B=/\bthis\b/,N=/['\n\r\t\u2028\u2029\\]/g,O=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],I=0,q="[object Arguments]",R="[object Array]",P="[object Boolean]",U="[object Date]",Y="[object Function]",j="[object Number]",z="[object Object]",V="[object RegExp]",H="[object String]",G={};G[Y]=!1,G[q]=G[R]=G[P]=G[U]=G[j]=G[z]=G[V]=G[H]=!0;var $={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},X={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},K=Z[typeof window]&&window||this,J=Z[typeof n]&&n&&!n.nodeType&&n,Q=Z[typeof e]&&e&&!e.nodeType&&e,te=Q&&Q.exports===J&&J,ee=Z[typeof t]&&t;!ee||ee.global!==ee&&ee.window!==ee||(K=ee);var ne=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(K._=ne,define(function(){return ne})):J&&Q?te?(Q.exports=ne)._=ne:J._=ne:K._=ne}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(t,e){(function(n){(function(r){function i(t,e,n){switch(arguments.length){case 2:return null!=t?t:e;case 3:return null!=t?t:null!=e?e:n;default:throw new Error("Implement me")}}function a(t,e){return Te.call(t,e)}function o(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function u(t){Ae.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function s(t,e){var n=!0;return m(function(){return n&&(u(t),n=!1),e.apply(this,arguments)},e)}function c(t,e){wn[t]||(u(e),wn[t]=!0)}function l(t,e){return function(n){return _(t.call(this,n),e)}}function h(t,e){return function(n){return this.localeData().ordinal(t.call(this,n),e)}}function f(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months"); -return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1,"months"),r=(e-a)/(n-a)),-(i+r)}function d(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function p(){}function g(t,e){e!==!1&&I(t),v(this,t),this._d=new Date(+t._d),An===!1&&(An=!0,Ae.updateOffset(this),An=!1)}function y(t){var e=C(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||0,o=e.day||0,u=e.hour||0,s=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*s+36e5*u,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=Ae.localeData(),this._bubble()}function m(t,e){for(var n in e)a(e,n)&&(t[n]=e[n]);return a(e,"toString")&&(t.toString=e.toString),a(e,"valueOf")&&(t.valueOf=e.valueOf),t}function v(t,e){var n,r,i;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Pe.length>0)for(n in Pe)r=Pe[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function b(t){return 0>t?Math.ceil(t):Math.floor(t)}function _(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.lengthr;r++)(n&&t[r]!==e[r]||!n&&F(t[r])!==F(e[r]))&&o++;return o+a}function S(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=gn[t]||yn[e]||e}return t}function C(t){var e,n,r={};for(n in t)a(t,n)&&(e=S(n),e&&(r[e]=t[n]));return r}function T(t){var e,n;if(0===t.indexOf("week"))e=7,n="day";else{if(0!==t.indexOf("month"))return;e=12,n="month"}Ae[t]=function(i,a){var o,u,s=Ae._locale[t],c=[];if("number"==typeof i&&(a=i,i=r),u=function(t){var e=Ae().utc().set(n,t);return s.call(Ae._locale,e,i||"")},null!=a)return u(a);for(o=0;e>o;o++)c.push(u(o));return c}}function F(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function L(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function B(t,e,n){return fe(Ae([t,11,31+e-n]),e,n).week}function N(t){return O(t)?366:365}function O(t){return t%4===0&&t%100!==0||t%400===0}function I(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[Le]<0||t._a[Le]>11?Le:t._a[Be]<1||t._a[Be]>L(t._a[Fe],t._a[Le])?Be:t._a[Ne]<0||t._a[Ne]>24||24===t._a[Ne]&&(0!==t._a[Oe]||0!==t._a[Ie]||0!==t._a[qe])?Ne:t._a[Oe]<0||t._a[Oe]>59?Oe:t._a[Ie]<0||t._a[Ie]>59?Ie:t._a[qe]<0||t._a[qe]>999?qe:-1,t._pf._overflowDayOfYear&&(Fe>e||e>Be)&&(e=Be),t._pf.overflow=e)}function q(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===r)),t._isValid}function R(t){return t?t.toLowerCase().replace("_","-"):t}function P(t){for(var e,n,r,i,a=0;a0;){if(r=U(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&M(i,n,!0)>=e-1)break;e--}a++}return null}function U(e){var n=null;if(!Re[e]&&Ue)try{n=Ae.locale(),t("./locale/"+e),Ae.locale(n)}catch(r){}return Re[e]}function Y(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(Ae.isMoment(t)||D(t)?+t:+Ae(t))-+n,n._d.setTime(+n._d+r),Ae.updateOffset(n,!1),n):Ae(t).local()}function j(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function z(t){var e,n,r=t.match(Ve);for(e=0,n=r.length;n>e;e++)r[e]=xn[r[e]]?xn[r[e]]:j(r[e]);return function(i){var a="";for(e=0;n>e;e++)a+=r[e]instanceof Function?r[e].call(i,t):r[e];return a}}function V(t,e){return t.isValid()?(e=H(e,t.localeData()),mn[e]||(mn[e]=z(e)),mn[e](t)):t.localeData().invalidDate()}function H(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(He.lastIndex=0;r>=0&&He.test(t);)t=t.replace(He,n),He.lastIndex=0,r-=1;return t}function G(t,e){var n,r=e._strict;switch(t){case"Q":return nn;case"DDDD":return an;case"YYYY":case"GGGG":case"gggg":return r?on:We;case"Y":case"G":case"g":return sn;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?un:Ze;case"S":if(r)return nn;case"SS":if(r)return rn;case"SSS":if(r)return an;case"DDD":return $e;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ke;case"a":case"A":return e._locale._meridiemParse;case"x":return tn;case"X":return en;case"Z":case"ZZ":return Je;case"T":return Qe;case"SSSS":return Xe;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?rn:Ge;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ge;case"Do":return r?e._locale._ordinalParse:e._locale._ordinalParseLenient;default:return n=new RegExp(ee(te(t.replace("\\","")),"i"))}}function $(t){t=t||"";var e=t.match(Je)||[],n=e[e.length-1]||[],r=(n+"").match(dn)||["-",0,0],i=+(60*r[1])+F(r[2]);return"+"===r[0]?i:-i}function W(t,e,n){var r,i=n._a;switch(t){case"Q":null!=e&&(i[Le]=3*(F(e)-1));break;case"M":case"MM":null!=e&&(i[Le]=F(e)-1);break;case"MMM":case"MMMM":r=n._locale.monthsParse(e,t,n._strict),null!=r?i[Le]=r:n._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(i[Be]=F(e));break;case"Do":null!=e&&(i[Be]=F(parseInt(e.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=e&&(n._dayOfYear=F(e));break;case"YY":i[Fe]=Ae.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":i[Fe]=F(e);break;case"a":case"A":n._meridiem=e;break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":i[Ne]=F(e);break;case"m":case"mm":i[Oe]=F(e);break;case"s":case"ss":i[Ie]=F(e);break;case"S":case"SS":case"SSS":case"SSSS":i[qe]=F(1e3*("0."+e));break;case"x":n._d=new Date(F(e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=$(e);break;case"dd":case"ddd":case"dddd":r=n._locale.weekdaysParse(e),null!=r?(n._w=n._w||{},n._w.d=r):n._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(n._w=n._w||{},n._w[t]=F(e));break;case"gg":case"GG":n._w=n._w||{},n._w[t]=Ae.parseTwoDigitYear(e)}}function Z(t){var e,n,r,a,o,u,s;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,u=4,n=i(e.GG,t._a[Fe],fe(Ae(),1,4).year),r=i(e.W,1),a=i(e.E,1)):(o=t._locale._week.dow,u=t._locale._week.doy,n=i(e.gg,t._a[Fe],fe(Ae(),o,u).year),r=i(e.w,1),null!=e.d?(a=e.d,o>a&&++r):a=null!=e.e?e.e+o:o),s=de(n,r,a,u,o),t._a[Fe]=s.year,t._dayOfYear=s.dayOfYear}function X(t){var e,n,r,a,o=[];if(!t._d){for(r=J(t),t._w&&null==t._a[Be]&&null==t._a[Le]&&Z(t),t._dayOfYear&&(a=i(t._a[Fe],r[Fe]),t._dayOfYear>N(a)&&(t._pf._overflowDayOfYear=!0),n=se(a,0,t._dayOfYear),t._a[Le]=n.getUTCMonth(),t._a[Be]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ne]&&0===t._a[Oe]&&0===t._a[Ie]&&0===t._a[qe]&&(t._nextDay=!0,t._a[Ne]=0),t._d=(t._useUTC?se:ue).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ne]=24)}}function K(t){var e;t._d||(e=C(t._i),t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],X(t))}function J(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Q(t){if(t._f===Ae.ISO_8601)return void re(t);t._a=[],t._pf.empty=!0;var e,n,i,a,o,u=""+t._i,s=u.length,c=0;for(i=H(t._f,t._locale).match(Ve)||[],e=0;e0&&t._pf.unusedInput.push(o),u=u.slice(u.indexOf(n)+n.length),c+=n.length),xn[a]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(a),W(a,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(a);t._pf.charsLeftOver=s-c,u.length>0&&t._pf.unusedInput.push(u),t._pf.bigHour===!0&&t._a[Ne]<=12&&(t._pf.bigHour=r),t._a[Ne]=d(t._locale,t._a[Ne],t._meridiem),X(t),I(t)}function te(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i})}function ee(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ne(t){var e,n,r,i,a;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(i=0;ia)&&(r=a,n=e));m(t,n||e)}function re(t){var e,n,r=t._i,i=cn.exec(r);if(i){for(t._pf.iso=!0,e=0,n=hn.length;n>e;e++)if(hn[e][1].exec(r)){t._f=hn[e][0]+(i[6]||" ");break}for(e=0,n=fn.length;n>e;e++)if(fn[e][1].exec(r)){t._f+=fn[e][0];break}r.match(Je)&&(t._f+="Z"),Q(t)}else t._isValid=!1}function ie(t){re(t),t._isValid===!1&&(delete t._isValid,Ae.createFromInputFallback(t))}function ae(t,e){var n,r=[];for(n=0;nt&&u.setFullYear(t),u}function se(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ce(t,e){if("string"==typeof t)if(isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function le(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function he(t,e,n){var r=Ae.duration(t).abs(),i=Ce(r.as("s")),a=Ce(r.as("m")),o=Ce(r.as("h")),u=Ce(r.as("d")),s=Ce(r.as("M")),c=Ce(r.as("y")),l=i0,l[4]=n,le.apply({},l)}function fe(t,e,n){var r,i=n-e,a=n-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Ae(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function de(t,e,n,r,i){var a,o,u=se(t,0,1).getUTCDay();return u=0===u?7:u,n=null!=n?n:i,a=i-u+(u>r?7:0)-(i>u?7:0),o=7*(e-1)+(n-i)+a+1,{year:o>0?t:t-1,dayOfYear:o>0?o:N(t-1)+o}}function pe(t){var e,n=t._i,i=t._f;return t._locale=t._locale||Ae.localeData(t._l),null===n||i===r&&""===n?Ae.invalid({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),Ae.isMoment(n)?new g(n,!0):(i?E(i)?ne(t):Q(t):oe(t),e=new g(t),e._nextDay&&(e.add(1,"d"),e._nextDay=r),e))}function ge(t,e){var n,r;if(1===e.length&&E(e[0])&&(e=e[0]),!e.length)return Ae();for(n=e[0],r=1;r=0?"+":"-";return e+_(Math.abs(t),6)},gg:function(){return _(this.weekYear()%100,2)},gggg:function(){return _(this.weekYear(),4)},ggggg:function(){return _(this.weekYear(),5)},GG:function(){return _(this.isoWeekYear()%100,2)},GGGG:function(){return _(this.isoWeekYear(),4)},GGGGG:function(){return _(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return F(this.milliseconds()/100)},SS:function(){return _(F(this.milliseconds()/10),2)},SSS:function(){return _(this.milliseconds(),3)},SSSS:function(){return _(this.milliseconds(),3)},Z:function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+_(F(t/60),2)+":"+_(F(t)%60,2)},ZZ:function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+_(F(t/60),2)+_(F(t)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},wn={},kn=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],An=!1;bn.length;)De=bn.pop(),xn[De+"o"]=h(xn[De],De);for(;_n.length;)De=_n.pop(),xn[De+De]=l(xn[De],2);xn.DDDD=l(xn.DDD,3),m(p.prototype,{set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t,e,n){var r,i,a;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=Ae.utc([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=Ae([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.apply(e,[n]):r},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(t){return t},postformat:function(t){return t},week:function(t){return fe(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),Ae=function(t,e,n,i){var a;return"boolean"==typeof n&&(i=n,n=r),a={},a._isAMomentObject=!0,a._i=t,a._f=e,a._l=n,a._strict=i,a._isUTC=!1,a._pf=o(),pe(a)},Ae.suppressDeprecationWarnings=!1,Ae.createFromInputFallback=s("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),Ae.min=function(){var t=[].slice.call(arguments,0);return ge("isBefore",t)},Ae.max=function(){var t=[].slice.call(arguments,0);return ge("isAfter",t)},Ae.utc=function(t,e,n,i){var a;return"boolean"==typeof n&&(i=n,n=r),a={},a._isAMomentObject=!0,a._useUTC=!0,a._isUTC=!0,a._l=n,a._i=t,a._f=e,a._strict=i,a._pf=o(),pe(a).utc()},Ae.unix=function(t){return Ae(1e3*t)},Ae.duration=function(t,e){var n,r,i,o,u=t,s=null;return Ae.isDuration(t)?u={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(u={},e?u[e]=t:u.milliseconds=t):(s=je.exec(t))?(n="-"===s[1]?-1:1,u={y:0,d:F(s[Be])*n,h:F(s[Ne])*n,m:F(s[Oe])*n,s:F(s[Ie])*n,ms:F(s[qe])*n}):(s=ze.exec(t))?(n="-"===s[1]?-1:1,i=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*n},u={y:i(s[2]),M:i(s[3]),d:i(s[4]),h:i(s[5]),m:i(s[6]),s:i(s[7]),w:i(s[8])}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=w(Ae(u.from),Ae(u.to)),u={},u.ms=o.milliseconds,u.M=o.months),r=new y(u),Ae.isDuration(t)&&a(t,"_locale")&&(r._locale=t._locale),r},Ae.version=Me,Ae.defaultFormat=ln,Ae.ISO_8601=function(){},Ae.momentProperties=Pe,Ae.updateOffset=function(){},Ae.relativeTimeThreshold=function(t,e){return vn[t]===r?!1:e===r?vn[t]:(vn[t]=e,!0)},Ae.lang=s("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return Ae.locale(t,e)}),Ae.locale=function(t,e){var n;return t&&(n="undefined"!=typeof e?Ae.defineLocale(t,e):Ae.localeData(t),n&&(Ae.duration._locale=Ae._locale=n)),Ae._locale._abbr},Ae.defineLocale=function(t,e){return null!==e?(e.abbr=t,Re[t]||(Re[t]=new p),Re[t].set(e),Ae.locale(t),Re[t]):(delete Re[t],null)},Ae.langData=s("moment.langData is deprecated. Use moment.localeData instead.",function(t){return Ae.localeData(t)}),Ae.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ae._locale;if(!E(t)){if(e=U(t))return e;t=[t]}return P(t)},Ae.isMoment=function(t){return t instanceof g||null!=t&&a(t,"_isAMomentObject")},Ae.isDuration=function(t){return t instanceof y};for(De=kn.length-1;De>=0;--De)T(kn[De]);Ae.normalizeUnits=function(t){return S(t)},Ae.invalid=function(t){var e=Ae.utc(0/0);return null!=t?m(e._pf,t):e._pf.userInvalidated=!0,e},Ae.parseZone=function(){return Ae.apply(null,arguments).parseZone()},Ae.parseTwoDigitYear=function(t){return F(t)+(F(t)>68?1900:2e3)},Ae.isDate=D,m(Ae.fn=g.prototype,{clone:function(){return Ae(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var t=Ae(this).utc();return 00:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.utcOffset(0,t)},local:function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(t){var e=V(this,t||Ae.defaultFormat);return this.localeData().postformat(e)},add:k(1,"add"),subtract:k(-1,"subtract"),diff:function(t,e,n){var r,i,a=Y(t,this),o=6e4*(a.utcOffset()-this.utcOffset());return e=S(e),"year"===e||"month"===e||"quarter"===e?(i=f(this,a),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-a,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-o)/864e5:"week"===e?(r-o)/6048e5:r),n?i:b(i)},from:function(t,e){return Ae.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(Ae(),t)},calendar:function(t){var e=t||Ae(),n=Y(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Ae(e)))},isLeapYear:function(){return O(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ce(t,this.localeData()),this.add(t-e,"d")):e},month:be("Month",!0),startOf:function(t){switch(t=S(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.weekday(0):"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=S(t),t===r||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(t,e){var n;return e=S("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=Ae.isMoment(t)?t:Ae(t),+this>+t):(n=Ae.isMoment(t)?+t:+Ae(t),n<+this.clone().startOf(e))},isBefore:function(t,e){var n;return e=S("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=Ae.isMoment(t)?t:Ae(t),+t>+this):(n=Ae.isMoment(t)?+t:+Ae(t),+this.clone().endOf(e)t?this:t}),max:s("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=Ae.apply(null,arguments),t>this?this:t}),zone:s("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),utcOffset:function(t,e){var n,r=this._offset||0;return null!=t?("string"==typeof t&&(t=$(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=this._dateUtcOffset()),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==t&&(!e||this._changeInProgress?A(this,Ae.duration(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Ae.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset($(this._i)),this},hasAlignedHourOffset:function(t){return t=t?Ae(t).utcOffset():0,(this.utcOffset()-t)%60===0},daysInMonth:function(){return L(this.year(),this.month())},dayOfYear:function(t){var e=Ce((Ae(this).startOf("day")-Ae(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=fe(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=fe(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=fe(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return B(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return B(this.year(),t.dow,t.doy)},get:function(t){return t=S(t),this[t]()},set:function(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else t=S(t),"function"==typeof this[t]&&this[t](e);return this},locale:function(t){var e;return t===r?this._locale._abbr:(e=Ae.localeData(t),null!=e&&(this._locale=e),this)},lang:s("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===r?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),Ae.fn.millisecond=Ae.fn.milliseconds=be("Milliseconds",!1),Ae.fn.second=Ae.fn.seconds=be("Seconds",!1),Ae.fn.minute=Ae.fn.minutes=be("Minutes",!1),Ae.fn.hour=Ae.fn.hours=be("Hours",!0),Ae.fn.date=be("Date",!0),Ae.fn.dates=s("dates accessor is deprecated. Use date instead.",be("Date",!0)),Ae.fn.year=be("FullYear",!0),Ae.fn.years=s("years accessor is deprecated. Use year instead.",be("FullYear",!0)),Ae.fn.days=Ae.fn.day,Ae.fn.months=Ae.fn.month,Ae.fn.weeks=Ae.fn.week,Ae.fn.isoWeeks=Ae.fn.isoWeek,Ae.fn.quarters=Ae.fn.quarter,Ae.fn.toJSON=Ae.fn.toISOString,Ae.fn.isUTC=Ae.fn.isUtc,m(Ae.duration.fn=y.prototype,{_bubble:function(){var t,e,n,r=this._milliseconds,i=this._days,a=this._months,o=this._data,u=0;o.milliseconds=r%1e3,t=b(r/1e3),o.seconds=t%60,e=b(t/60),o.minutes=e%60,n=b(e/60),o.hours=n%24,i+=b(n/24),u=b(_e(i)),i-=b(xe(u)),a+=b(i/30),i%=30,u+=b(a/12),a%=12,o.days=i,o.months=a,o.years=u},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return b(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12)},humanize:function(t){var e=he(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var n=Ae.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=Ae.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=S(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,n;if(t=S(t),"month"===t||"year"===t)return e=this._days+this._milliseconds/864e5,n=this._months+12*_e(e),"month"===t?n:n/12;switch(e=this._days+Math.round(xe(this._months/12)),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4; -case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:Ae.fn.lang,locale:Ae.fn.locale,toIsoString:s("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),i=Math.abs(this.minutes()),a=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),Ae.duration.fn.toString=Ae.duration.fn.toISOString;for(De in pn)a(pn,De)&&we(De.toLowerCase());Ae.duration.fn.asMilliseconds=function(){return this.as("ms")},Ae.duration.fn.asSeconds=function(){return this.as("s")},Ae.duration.fn.asMinutes=function(){return this.as("m")},Ae.duration.fn.asHours=function(){return this.as("h")},Ae.duration.fn.asDays=function(){return this.as("d")},Ae.duration.fn.asWeeks=function(){return this.as("weeks")},Ae.duration.fn.asMonths=function(){return this.as("M")},Ae.duration.fn.asYears=function(){return this.as("y")},Ae.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===F(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),Ue?e.exports=Ae:"function"==typeof define&&define.amd?(define(function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(Se.moment=Ee),Ae}),ke(!0)):ke()}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],k=[10,28,37,57,58],A=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(k,A,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(k,[2,48]),e(k,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(k,[2,51],{45:[1,86]}),e(k,[2,52]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(k,A,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(k,[2,55]),{10:[1,94]},e(k,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(k,[2,54]),{5:[2,3]},e(k,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(k,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; -if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],k=[1,40],A=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; -case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),k=[];r=a.duration(x-_).asDays();for(var A=0;Ah&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) -},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init(mermaid.sequenceConfig):e.mermaid.init(mermaid.sequenceConfig))},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file +module.exports={graphlib:require("./lib/graphlib"),dagre:require("./lib/dagre"),intersect:require("./lib/intersect"),render:require("./lib/render"),util:require("./lib/util"),version:require("./lib/version")}},{"./lib/dagre":8,"./lib/graphlib":9,"./lib/intersect":10,"./lib/render":23,"./lib/util":25,"./lib/version":26}],2:[function(require,module,exports){var util=require("./util");module.exports={"default":normal,normal:normal,vee:vee,undirected:undirected};function normal(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}function vee(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}function undirected(parent,id,edge,type){var marker=parent.append("marker").attr("id",id).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto");var path=marker.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");util.applyStyle(path,edge[type+"Style"])}},{"./util":25}],3:[function(require,module,exports){var util=require("./util");module.exports=createClusters;function createClusters(selection,g){var clusters=g.nodes().filter(function(v){return util.isSubgraph(g,v)}),svgClusters=selection.selectAll("g.cluster").data(clusters,function(v){return v});svgClusters.enter().append("g").attr("class","cluster").style("opacity",0).append("rect");util.applyTransition(svgClusters.exit(),g).style("opacity",0).remove();util.applyTransition(svgClusters,g).style("opacity",1);util.applyTransition(svgClusters.selectAll("rect"),g).attr("width",function(v){return g.node(v).width}).attr("height",function(v){return g.node(v).height}).attr("x",function(v){var node=g.node(v);return node.x-node.width/2}).attr("y",function(v){var node=g.node(v);return node.y-node.height/2})}},{"./util":25}],4:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createEdgeLabels;function createEdgeLabels(selection,g){var svgEdgeLabels=selection.selectAll("g.edgeLabel").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);svgEdgeLabels.selectAll("*").remove();svgEdgeLabels.enter().append("g").classed("edgeLabel",true).style("opacity",0);svgEdgeLabels.each(function(e){var edge=g.edge(e),label=addLabel(d3.select(this),g.edge(e),0,0).classed("label",true),bbox=label.node().getBBox();if(edge.labelId){label.attr("id",edge.labelId)}if(!_.has(edge,"width")){edge.width=bbox.width}if(!_.has(edge,"height")){edge.height=bbox.height}});util.applyTransition(svgEdgeLabels.exit(),g).style("opacity",0).remove();return svgEdgeLabels}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],5:[function(require,module,exports){"use strict";var _=require("./lodash"),intersectNode=require("./intersect/intersect-node"),util=require("./util"),d3=require("./d3");module.exports=createEdgePaths;function createEdgePaths(selection,g,arrows){var svgPaths=selection.selectAll("g.edgePath").data(g.edges(),function(e){return util.edgeToId(e)}).classed("update",true);enter(svgPaths,g);exit(svgPaths,g);util.applyTransition(svgPaths,g).style("opacity",1);svgPaths.each(function(e){var domEdge=d3.select(this);var edge=g.edge(e);edge.elem=this;if(edge.id){domEdge.attr("id",edge.id)}util.applyClass(domEdge,edge["class"],(domEdge.classed("update")?"update ":"")+"edgePath")});svgPaths.selectAll("path.path").each(function(e){var edge=g.edge(e);edge.arrowheadId=_.uniqueId("arrowhead");var domEdge=d3.select(this).attr("marker-end",function(){return"url(#"+edge.arrowheadId+")"}).style("fill","none");util.applyTransition(domEdge,g).attr("d",function(e){return calcPoints(g,e)});util.applyStyle(domEdge,edge.style)});svgPaths.selectAll("defs *").remove();svgPaths.selectAll("defs").each(function(e){var edge=g.edge(e),arrowhead=arrows[edge.arrowhead];arrowhead(d3.select(this),edge.arrowheadId,edge,"arrowhead")});return svgPaths}function calcPoints(g,e){var edge=g.edge(e),tail=g.node(e.v),head=g.node(e.w),points=edge.points.slice(1,edge.points.length-1);points.unshift(intersectNode(tail,points[0]));points.push(intersectNode(head,points[points.length-1]));return createLine(edge,points)}function createLine(edge,points){var line=d3.svg.line().x(function(d){return d.x}).y(function(d){return d.y});if(_.has(edge,"lineInterpolate")){line.interpolate(edge.lineInterpolate)}if(_.has(edge,"lineTension")){line.tension(Number(edge.lineTension))}return line(points)}function getCoords(elem){var bbox=elem.getBBox(),matrix=elem.getTransformToElement(elem.ownerSVGElement).translate(bbox.width/2,bbox.height/2);return{x:matrix.e,y:matrix.f}}function enter(svgPaths,g){var svgPathsEnter=svgPaths.enter().append("g").attr("class","edgePath").style("opacity",0);svgPathsEnter.append("path").attr("class","path").attr("d",function(e){var edge=g.edge(e),sourceElem=g.node(e.v).elem,points=_.range(edge.points.length).map(function(){return getCoords(sourceElem)});return createLine(edge,points)});svgPathsEnter.append("defs")}function exit(svgPaths,g){var svgPathExit=svgPaths.exit();util.applyTransition(svgPathExit,g).style("opacity",0).remove();util.applyTransition(svgPathExit.select("path.path"),g).attr("d",function(e){var source=g.node(e.v);if(source){var points=_.range(this.pathSegList.length).map(function(){return source});return createLine({},points)}else{return d3.select(this).attr("d")}})}},{"./d3":7,"./intersect/intersect-node":14,"./lodash":20,"./util":25}],6:[function(require,module,exports){"use strict";var _=require("./lodash"),addLabel=require("./label/add-label"),util=require("./util"),d3=require("./d3");module.exports=createNodes;function createNodes(selection,g,shapes){var simpleNodes=g.nodes().filter(function(v){return!util.isSubgraph(g,v)});var svgNodes=selection.selectAll("g.node").data(simpleNodes,function(v){return v}).classed("update",true);svgNodes.selectAll("*").remove();svgNodes.enter().append("g").attr("class","node").style("opacity",0);svgNodes.each(function(v){var node=g.node(v),thisGroup=d3.select(this),labelGroup=thisGroup.append("g").attr("class","label"),labelDom=addLabel(labelGroup,node),shape=shapes[node.shape],bbox=_.pick(labelDom.node().getBBox(),"width","height");node.elem=this;if(node.id){thisGroup.attr("id",node.id)}if(node.labelId){labelGroup.attr("id",node.labelId)}util.applyClass(thisGroup,node["class"],(thisGroup.classed("update")?"update ":"")+"node");if(_.has(node,"width")){bbox.width=node.width}if(_.has(node,"height")){bbox.height=node.height}bbox.width+=node.paddingLeft+node.paddingRight;bbox.height+=node.paddingTop+node.paddingBottom;labelGroup.attr("transform","translate("+(node.paddingLeft-node.paddingRight)/2+","+(node.paddingTop-node.paddingBottom)/2+")");var shapeSvg=shape(d3.select(this),bbox,node);util.applyStyle(shapeSvg,node.style);var shapeBBox=shapeSvg.node().getBBox();node.width=shapeBBox.width;node.height=shapeBBox.height});util.applyTransition(svgNodes.exit(),g).style("opacity",0).remove();return svgNodes}},{"./d3":7,"./label/add-label":18,"./lodash":20,"./util":25}],7:[function(require,module,exports){module.exports=window.d3},{}],8:[function(require,module,exports){var dagre;if(require){try{dagre=require("dagre")}catch(e){}}if(!dagre){dagre=window.dagre}module.exports=dagre},{dagre:27}],9:[function(require,module,exports){var graphlib;if(require){try{graphlib=require("graphlib")}catch(e){}}if(!graphlib){graphlib=window.graphlib}module.exports=graphlib},{graphlib:57}],10:[function(require,module,exports){module.exports={node:require("./intersect-node"),circle:require("./intersect-circle"),ellipse:require("./intersect-ellipse"),polygon:require("./intersect-polygon"),rect:require("./intersect-rect")}},{"./intersect-circle":11,"./intersect-ellipse":12,"./intersect-node":14,"./intersect-polygon":15,"./intersect-rect":16}],11:[function(require,module,exports){var intersectEllipse=require("./intersect-ellipse");module.exports=intersectCircle;function intersectCircle(node,rx,point){return intersectEllipse(node,rx,rx,point)}},{"./intersect-ellipse":12}],12:[function(require,module,exports){module.exports=intersectEllipse;function intersectEllipse(node,rx,ry,point){var cx=node.x;var cy=node.y;var px=cx-point.x;var py=cy-point.y;var det=Math.sqrt(rx*rx*py*py+ry*ry*px*px);var dx=Math.abs(rx*ry*px/det);if(point.x0}},{}],14:[function(require,module,exports){module.exports=intersectNode;function intersectNode(node,point){return node.intersect(point)}},{}],15:[function(require,module,exports){var intersectLine=require("./intersect-line");module.exports=intersectPolygon;function intersectPolygon(node,polyPoints,point){var x1=node.x;var y1=node.y;var intersections=[];var minX=Number.POSITIVE_INFINITY,minY=Number.POSITIVE_INFINITY;polyPoints.forEach(function(entry){minX=Math.min(minX,entry.x);minY=Math.min(minY,entry.y)});var left=x1-node.width/2-minX;var top=y1-node.height/2-minY;for(var i=0;i1){intersections.sort(function(p,q){var pdx=p.x-point.x,pdy=p.y-point.y,distp=Math.sqrt(pdx*pdx+pdy*pdy),qdx=q.x-point.x,qdy=q.y-point.y,distq=Math.sqrt(qdx*qdx+qdy*qdy);return distpMath.abs(dx)*h){if(dy<0){h=-h}sx=dy===0?0:h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=dx===0?0:w*dy/dx}return{x:x+sx,y:y+sy}}},{}],17:[function(require,module,exports){var util=require("../util");module.exports=addHtmlLabel;function addHtmlLabel(root,node){var fo=root.append("foreignObject").attr("width","100000");var div=fo.append("xhtml:div");var label=node.label;switch(typeof label){case"function":div.insert(label);break;case"object":div.insert(function(){return label});break;default:div.html(label)}util.applyStyle(div,node.labelStyle);div.style("display","inline-block");div.style("white-space","nowrap");var w,h;div.each(function(){w=this.clientWidth;h=this.clientHeight});fo.attr("width",w).attr("height",h);return fo}},{"../util":25}],18:[function(require,module,exports){var addTextLabel=require("./add-text-label"),addHtmlLabel=require("./add-html-label");module.exports=addLabel;function addLabel(root,node){var label=node.label;var labelSvg=root.append("g");if(typeof label!=="string"||node.labelType==="html"){addHtmlLabel(labelSvg,node)}else{addTextLabel(labelSvg,node)}var labelBBox=labelSvg.node().getBBox();labelSvg.attr("transform","translate("+-labelBBox.width/2+","+-labelBBox.height/2+")");return labelSvg}},{"./add-html-label":17,"./add-text-label":19}],19:[function(require,module,exports){var util=require("../util");module.exports=addTextLabel;function addTextLabel(root,node){var domNode=root.append("text");var lines=processEscapeSequences(node.label).split("\n");for(var i=0;i0;--i){entry=buckets[i].dequeue();if(entry){results=results.concat(removeNode(g,buckets,zeroIdx,entry,true));break}}}}return results}function removeNode(g,buckets,zeroIdx,entry,collectPredecessors){var results=collectPredecessors?[]:undefined;_.each(g.inEdges(entry.v),function(edge){var weight=g.edge(edge),uEntry=g.node(edge.v);if(collectPredecessors){results.push({v:edge.v,w:edge.w})}uEntry.out-=weight;assignBucket(buckets,zeroIdx,uEntry)});_.each(g.outEdges(entry.v),function(edge){var weight=g.edge(edge),w=edge.w,wEntry=g.node(w);wEntry["in"]-=weight;assignBucket(buckets,zeroIdx,wEntry)});g.removeNode(entry.v);return results}function buildState(g,weightFn){var fasGraph=new Graph,maxIn=0,maxOut=0;_.each(g.nodes(),function(v){fasGraph.setNode(v,{v:v,"in":0,out:0})});_.each(g.edges(),function(e){var prevWeight=fasGraph.edge(e.v,e.w)||0,weight=weightFn(e),edgeWeight=prevWeight+weight;fasGraph.setEdge(e.v,e.w,edgeWeight);maxOut=Math.max(maxOut,fasGraph.node(e.v).out+=weight);maxIn=Math.max(maxIn,fasGraph.node(e.w)["in"]+=weight)});var buckets=_.range(maxOut+maxIn+3).map(function(){return new List});var zeroIdx=maxIn+1;_.each(fasGraph.nodes(),function(v){assignBucket(buckets,zeroIdx,fasGraph.node(v))});return{graph:fasGraph,buckets:buckets,zeroIdx:zeroIdx}}function assignBucket(buckets,zeroIdx,entry){if(!entry.out){buckets[0].enqueue(entry)}else if(!entry["in"]){buckets[buckets.length-1].enqueue(entry)}else{buckets[entry.out-entry["in"]+zeroIdx].enqueue(entry)}}},{"./data/list":31,"./graphlib":33,"./lodash":36}],35:[function(require,module,exports){"use strict";var _=require("./lodash"),acyclic=require("./acyclic"),normalize=require("./normalize"),rank=require("./rank"),normalizeRanks=require("./util").normalizeRanks,parentDummyChains=require("./parent-dummy-chains"),removeEmptyRanks=require("./util").removeEmptyRanks,nestingGraph=require("./nesting-graph"),addBorderSegments=require("./add-border-segments"),coordinateSystem=require("./coordinate-system"),order=require("./order"),position=require("./position"),util=require("./util"),Graph=require("./graphlib").Graph;module.exports=layout;function layout(g,opts){var time=opts&&opts.debugTiming?util.time:util.notime;time("layout",function(){var layoutGraph=time(" buildLayoutGraph",function(){return buildLayoutGraph(g)});time(" runLayout",function(){runLayout(layoutGraph,time)});time(" updateInputGraph",function(){updateInputGraph(g,layoutGraph)})})}function runLayout(g,time){time(" makeSpaceForEdgeLabels",function(){makeSpaceForEdgeLabels(g)});time(" removeSelfEdges",function(){removeSelfEdges(g)});time(" acyclic",function(){acyclic.run(g)});time(" nestingGraph.run",function(){nestingGraph.run(g)});time(" rank",function(){rank(util.asNonCompoundGraph(g))});time(" injectEdgeLabelProxies",function(){injectEdgeLabelProxies(g)});time(" removeEmptyRanks",function(){removeEmptyRanks(g)});time(" nestingGraph.cleanup",function(){nestingGraph.cleanup(g)});time(" normalizeRanks",function(){normalizeRanks(g)});time(" assignRankMinMax",function(){assignRankMinMax(g)});time(" removeEdgeLabelProxies",function(){removeEdgeLabelProxies(g)});time(" normalize.run",function(){normalize.run(g)});time(" parentDummyChains",function(){parentDummyChains(g)});time(" addBorderSegments",function(){addBorderSegments(g)});time(" order",function(){order(g)});time(" insertSelfEdges",function(){insertSelfEdges(g)});time(" adjustCoordinateSystem",function(){coordinateSystem.adjust(g)});time(" position",function(){position(g)});time(" positionSelfEdges",function(){positionSelfEdges(g)});time(" removeBorderNodes",function(){removeBorderNodes(g)});time(" normalize.undo",function(){normalize.undo(g)});time(" fixupEdgeLabelCoords",function(){fixupEdgeLabelCoords(g)});time(" undoCoordinateSystem",function(){coordinateSystem.undo(g)});time(" translateGraph",function(){translateGraph(g)});time(" assignNodeIntersects",function(){assignNodeIntersects(g)});time(" reversePoints",function(){reversePointsForReversedEdges(g)});time(" acyclic.undo",function(){acyclic.undo(g)})}function updateInputGraph(inputGraph,layoutGraph){_.each(inputGraph.nodes(),function(v){var inputLabel=inputGraph.node(v),layoutLabel=layoutGraph.node(v);if(inputLabel){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y;if(layoutGraph.children(v).length){inputLabel.width=layoutLabel.width;inputLabel.height=layoutLabel.height}}});_.each(inputGraph.edges(),function(e){var inputLabel=inputGraph.edge(e),layoutLabel=layoutGraph.edge(e);inputLabel.points=layoutLabel.points;if(_.has(layoutLabel,"x")){inputLabel.x=layoutLabel.x;inputLabel.y=layoutLabel.y}});inputGraph.graph().width=layoutGraph.graph().width;inputGraph.graph().height=layoutGraph.graph().height}var graphNumAttrs=["nodesep","edgesep","ranksep","marginx","marginy"],graphDefaults={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},graphAttrs=["acyclicer","ranker","rankdir","align"],nodeNumAttrs=["width","height"],nodeDefaults={width:0,height:0},edgeNumAttrs=["minlen","weight","width","height","labeloffset"],edgeDefaults={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},edgeAttrs=["labelpos"];function buildLayoutGraph(inputGraph){var g=new Graph({multigraph:true,compound:true}),graph=canonicalize(inputGraph.graph());g.setGraph(_.merge({},graphDefaults,selectNumberAttrs(graph,graphNumAttrs),_.pick(graph,graphAttrs)));_.each(inputGraph.nodes(),function(v){var node=canonicalize(inputGraph.node(v));g.setNode(v,_.defaults(selectNumberAttrs(node,nodeNumAttrs),nodeDefaults));g.setParent(v,inputGraph.parent(v))});_.each(inputGraph.edges(),function(e){var edge=canonicalize(inputGraph.edge(e));g.setEdge(e,_.merge({},edgeDefaults,selectNumberAttrs(edge,edgeNumAttrs),_.pick(edge,edgeAttrs)))});return g}function makeSpaceForEdgeLabels(g){var graph=g.graph();graph.ranksep/=2;_.each(g.edges(),function(e){var edge=g.edge(e);edge.minlen*=2;if(edge.labelpos.toLowerCase()!=="c"){if(graph.rankdir==="TB"||graph.rankdir==="BT"){edge.width+=edge.labeloffset +}else{edge.height+=edge.labeloffset}}})}function injectEdgeLabelProxies(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.width&&edge.height){var v=g.node(e.v),w=g.node(e.w),label={rank:(w.rank-v.rank)/2+v.rank,e:e};util.addDummyNode(g,"edge-proxy",label,"_ep")}})}function assignRankMinMax(g){var maxRank=0;_.each(g.nodes(),function(v){var node=g.node(v);if(node.borderTop){node.minRank=g.node(node.borderTop).rank;node.maxRank=g.node(node.borderBottom).rank;maxRank=_.max(maxRank,node.maxRank)}});g.graph().maxRank=maxRank}function removeEdgeLabelProxies(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="edge-proxy"){g.edge(node.e).labelRank=node.rank;g.removeNode(v)}})}function translateGraph(g){var minX=Number.POSITIVE_INFINITY,maxX=0,minY=Number.POSITIVE_INFINITY,maxY=0,graphLabel=g.graph(),marginX=graphLabel.marginx||0,marginY=graphLabel.marginy||0;function getExtremes(attrs){var x=attrs.x,y=attrs.y,w=attrs.width,h=attrs.height;minX=Math.min(minX,x-w/2);maxX=Math.max(maxX,x+w/2);minY=Math.min(minY,y-h/2);maxY=Math.max(maxY,y+h/2)}_.each(g.nodes(),function(v){getExtremes(g.node(v))});_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){getExtremes(edge)}});minX-=marginX;minY-=marginY;_.each(g.nodes(),function(v){var node=g.node(v);node.x-=minX;node.y-=minY});_.each(g.edges(),function(e){var edge=g.edge(e);_.each(edge.points,function(p){p.x-=minX;p.y-=minY});if(_.has(edge,"x")){edge.x-=minX}if(_.has(edge,"y")){edge.y-=minY}});graphLabel.width=maxX-minX+marginX;graphLabel.height=maxY-minY+marginY}function assignNodeIntersects(g){_.each(g.edges(),function(e){var edge=g.edge(e),nodeV=g.node(e.v),nodeW=g.node(e.w),p1,p2;if(!edge.points){edge.points=[];p1=nodeW;p2=nodeV}else{p1=edge.points[0];p2=edge.points[edge.points.length-1]}edge.points.unshift(util.intersectRect(nodeV,p1));edge.points.push(util.intersectRect(nodeW,p2))})}function fixupEdgeLabelCoords(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(_.has(edge,"x")){if(edge.labelpos==="l"||edge.labelpos==="r"){edge.width-=edge.labeloffset}switch(edge.labelpos){case"l":edge.x-=edge.width/2+edge.labeloffset;break;case"r":edge.x+=edge.width/2+edge.labeloffset;break}}})}function reversePointsForReversedEdges(g){_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.reversed){edge.points.reverse()}})}function removeBorderNodes(g){_.each(g.nodes(),function(v){if(g.children(v).length){var node=g.node(v),t=g.node(node.borderTop),b=g.node(node.borderBottom),l=g.node(_.last(node.borderLeft)),r=g.node(_.last(node.borderRight));node.width=Math.abs(r.x-l.x);node.height=Math.abs(b.y-t.y);node.x=l.x+node.width/2;node.y=t.y+node.height/2}});_.each(g.nodes(),function(v){if(g.node(v).dummy==="border"){g.removeNode(v)}})}function removeSelfEdges(g){_.each(g.edges(),function(e){if(e.v===e.w){var node=g.node(e.v);if(!node.selfEdges){node.selfEdges=[]}node.selfEdges.push({e:e,label:g.edge(e)});g.removeEdge(e)}})}function insertSelfEdges(g){var layers=util.buildLayerMatrix(g);_.each(layers,function(layer){var orderShift=0;_.each(layer,function(v,i){var node=g.node(v);node.order=i+orderShift;_.each(node.selfEdges,function(selfEdge){util.addDummyNode(g,"selfedge",{width:selfEdge.label.width,height:selfEdge.label.height,rank:node.rank,order:i+ ++orderShift,e:selfEdge.e,label:selfEdge.label},"_se")});delete node.selfEdges})})}function positionSelfEdges(g){_.each(g.nodes(),function(v){var node=g.node(v);if(node.dummy==="selfedge"){var selfNode=g.node(node.e.v),x=selfNode.x+selfNode.width/2,y=selfNode.y,dx=node.x-x,dy=selfNode.height/2;g.setEdge(node.e,node.label);g.removeNode(v);node.label.points=[{x:x+2*dx/3,y:y-dy},{x:x+5*dx/6,y:y-dy},{x:x+dx,y:y},{x:x+5*dx/6,y:y+dy},{x:x+2*dx/3,y:y+dy}];node.label.x=node.x;node.label.y=node.y}})}function selectNumberAttrs(obj,attrs){return _.mapValues(_.pick(obj,attrs),Number)}function canonicalize(attrs){var newAttrs={};_.each(attrs,function(v,k){newAttrs[k.toLowerCase()]=v});return newAttrs}},{"./acyclic":28,"./add-border-segments":29,"./coordinate-system":30,"./graphlib":33,"./lodash":36,"./nesting-graph":37,"./normalize":38,"./order":43,"./parent-dummy-chains":48,"./position":50,"./rank":52,"./util":55}],36:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],37:[function(require,module,exports){var _=require("./lodash"),util=require("./util");module.exports={run:run,cleanup:cleanup};function run(g){var root=util.addDummyNode(g,"root",{},"_root"),depths=treeDepths(g),height=_.max(depths)-1,nodeSep=2*height+1;g.graph().nestingRoot=root;_.each(g.edges(),function(e){g.edge(e).minlen*=nodeSep});var weight=sumWeights(g)+1;_.each(g.children(),function(child){dfs(g,root,nodeSep,weight,height,depths,child)});g.graph().nodeRankFactor=nodeSep}function dfs(g,root,nodeSep,weight,height,depths,v){var children=g.children(v);if(!children.length){if(v!==root){g.setEdge(root,v,{weight:0,minlen:nodeSep})}return}var top=util.addBorderNode(g,"_bt"),bottom=util.addBorderNode(g,"_bb"),label=g.node(v);g.setParent(top,v);label.borderTop=top;g.setParent(bottom,v);label.borderBottom=bottom;_.each(children,function(child){dfs(g,root,nodeSep,weight,height,depths,child);var childNode=g.node(child),childTop=childNode.borderTop?childNode.borderTop:child,childBottom=childNode.borderBottom?childNode.borderBottom:child,thisWeight=childNode.borderTop?weight:2*weight,minlen=childTop!==childBottom?1:height-depths[v]+1;g.setEdge(top,childTop,{weight:thisWeight,minlen:minlen,nestingEdge:true});g.setEdge(childBottom,bottom,{weight:thisWeight,minlen:minlen,nestingEdge:true})});if(!g.parent(v)){g.setEdge(root,top,{weight:0,minlen:height+depths[v]})}}function treeDepths(g){var depths={};function dfs(v,depth){var children=g.children(v);if(children&&children.length){_.each(children,function(child){dfs(child,depth+1)})}depths[v]=depth}_.each(g.children(),function(v){dfs(v,1)});return depths}function sumWeights(g){return _.reduce(g.edges(),function(acc,e){return acc+g.edge(e).weight},0)}function cleanup(g){var graphLabel=g.graph();g.removeNode(graphLabel.nestingRoot);delete graphLabel.nestingRoot;_.each(g.edges(),function(e){var edge=g.edge(e);if(edge.nestingEdge){g.removeEdge(e)}})}},{"./lodash":36,"./util":55}],38:[function(require,module,exports){"use strict";var _=require("./lodash"),util=require("./util");module.exports={run:run,undo:undo};function run(g){g.graph().dummyChains=[];_.each(g.edges(),function(edge){normalizeEdge(g,edge)})}function normalizeEdge(g,e){var v=e.v,vRank=g.node(v).rank,w=e.w,wRank=g.node(w).rank,name=e.name,edgeLabel=g.edge(e),labelRank=edgeLabel.labelRank;if(wRank===vRank+1)return;g.removeEdge(e);var dummy,attrs,i;for(i=0,++vRank;vRank0){if(index%2){weightSum+=tree[index+1]}index=index-1>>1;tree[index]+=entry.weight}cc+=entry.weight*weightSum}));return cc}},{"../lodash":36}],43:[function(require,module,exports){"use strict";var _=require("../lodash"),initOrder=require("./init-order"),crossCount=require("./cross-count"),sortSubgraph=require("./sort-subgraph"),buildLayerGraph=require("./build-layer-graph"),addSubgraphConstraints=require("./add-subgraph-constraints"),Graph=require("../graphlib").Graph,util=require("../util");module.exports=order;function order(g){var maxRank=util.maxRank(g),downLayerGraphs=buildLayerGraphs(g,_.range(1,maxRank+1),"inEdges"),upLayerGraphs=buildLayerGraphs(g,_.range(maxRank-1,-1,-1),"outEdges");var layering=initOrder(g);assignOrder(g,layering);var bestCC=Number.POSITIVE_INFINITY,best;for(var i=0,lastBest=0;lastBest<4;++i,++lastBest){sweepLayerGraphs(i%2?downLayerGraphs:upLayerGraphs,i%4>=2);layering=util.buildLayerMatrix(g);var cc=crossCount(g,layering);if(cc=vEntry.barycenter){mergeEntries(vEntry,uEntry)}}}function handleOut(vEntry){return function(wEntry){wEntry["in"].push(vEntry);if(--wEntry.indegree===0){sourceSet.push(wEntry)}}}while(sourceSet.length){var entry=sourceSet.pop();entries.push(entry);_.each(entry["in"].reverse(),handleIn(entry));_.each(entry.out,handleOut(entry))}return _.chain(entries).filter(function(entry){return!entry.merged}).map(function(entry){return _.pick(entry,["vs","i","barycenter","weight"])}).value()}function mergeEntries(target,source){var sum=0,weight=0;if(target.weight){sum+=target.barycenter*target.weight;weight+=target.weight}if(source.weight){sum+=source.barycenter*source.weight;weight+=source.weight}target.vs=source.vs.concat(target.vs);target.barycenter=sum/weight;target.weight=weight;target.i=Math.min(source.i,target.i);source.merged=true}},{"../lodash":36}],46:[function(require,module,exports){var _=require("../lodash"),barycenter=require("./barycenter"),resolveConflicts=require("./resolve-conflicts"),sort=require("./sort");module.exports=sortSubgraph;function sortSubgraph(g,v,cg,biasRight){var movable=g.children(v),node=g.node(v),bl=node?node.borderLeft:undefined,br=node?node.borderRight:undefined,subgraphs={};if(bl){movable=_.filter(movable,function(w){return w!==bl&&w!==br})}var barycenters=barycenter(g,movable);_.each(barycenters,function(entry){if(g.children(entry.v).length){var subgraphResult=sortSubgraph(g,entry.v,cg,biasRight);subgraphs[entry.v]=subgraphResult;if(_.has(subgraphResult,"barycenter")){mergeBarycenters(entry,subgraphResult)}}});var entries=resolveConflicts(barycenters,cg);expandSubgraphs(entries,subgraphs);var result=sort(entries,biasRight);if(bl){result.vs=_.flatten([bl,result.vs,br],true);if(g.predecessors(bl).length){var blPred=g.node(g.predecessors(bl)[0]),brPred=g.node(g.predecessors(br)[0]);if(!_.has(result,"barycenter")){result.barycenter=0;result.weight=0}result.barycenter=(result.barycenter*result.weight+blPred.order+brPred.order)/(result.weight+2);result.weight+=2}}return result}function expandSubgraphs(entries,subgraphs){_.each(entries,function(entry){entry.vs=_.flatten(entry.vs.map(function(v){if(subgraphs[v]){return subgraphs[v].vs}return v}),true)})}function mergeBarycenters(target,other){if(!_.isUndefined(target.barycenter)){target.barycenter=(target.barycenter*target.weight+other.barycenter*other.weight)/(target.weight+other.weight);target.weight+=other.weight}else{target.barycenter=other.barycenter;target.weight=other.weight}}},{"../lodash":36,"./barycenter":40,"./resolve-conflicts":45,"./sort":47}],47:[function(require,module,exports){var _=require("../lodash"),util=require("../util");module.exports=sort;function sort(entries,biasRight){var parts=util.partition(entries,function(entry){return _.has(entry,"barycenter")});var sortable=parts.lhs,unsortable=_.sortBy(parts.rhs,function(entry){return-entry.i}),vs=[],sum=0,weight=0,vsIndex=0;sortable.sort(compareWithBias(!!biasRight));vsIndex=consumeUnsortable(vs,unsortable,vsIndex);_.each(sortable,function(entry){vsIndex+=entry.vs.length;vs.push(entry.vs);sum+=entry.barycenter*entry.weight;weight+=entry.weight;vsIndex=consumeUnsortable(vs,unsortable,vsIndex)});var result={vs:_.flatten(vs,true)};if(weight){result.barycenter=sum/weight;result.weight=weight}return result}function consumeUnsortable(vs,unsortable,index){var last;while(unsortable.length&&(last=_.last(unsortable)).i<=index){unsortable.pop();vs.push(last.vs);index++}return index}function compareWithBias(bias){return function(entryV,entryW){if(entryV.barycenterentryW.barycenter){return 1}return!bias?entryV.i-entryW.i:entryW.i-entryV.i}}},{"../lodash":36,"../util":55}],48:[function(require,module,exports){var _=require("./lodash");module.exports=parentDummyChains;function parentDummyChains(g){var postorderNums=postorder(g);_.each(g.graph().dummyChains,function(v){var node=g.node(v),edgeObj=node.edgeObj,pathData=findPath(g,postorderNums,edgeObj.v,edgeObj.w),path=pathData.path,lca=pathData.lca,pathIdx=0,pathV=path[pathIdx],ascending=true;while(v!==edgeObj.w){node=g.node(v);if(ascending){while((pathV=path[pathIdx])!==lca&&g.node(pathV).maxRanklow||lim>postorderNums[parent].lim));lca=parent;parent=w;while((parent=g.parent(parent))!==lca){wPath.push(parent)}return{path:vPath.concat(wPath.reverse()),lca:lca}}function postorder(g){var result={},lim=0;function dfs(v){var low=lim;_.each(g.children(v),dfs);result[v]={low:low,lim:lim++}}_.each(g.children(),dfs);return result}},{"./lodash":36}],49:[function(require,module,exports){"use strict";var _=require("../lodash"),Graph=require("../graphlib").Graph,util=require("../util");module.exports={positionX:positionX,findType1Conflicts:findType1Conflicts,findType2Conflicts:findType2Conflicts,addConflict:addConflict,hasConflict:hasConflict,verticalAlignment:verticalAlignment,horizontalCompaction:horizontalCompaction,alignCoordinates:alignCoordinates,findSmallestWidthAlignment:findSmallestWidthAlignment,balance:balance};function findType1Conflicts(g,layering){var conflicts={};function visitLayer(prevLayer,layer){var k0=0,scanPos=0,prevLayerLength=prevLayer.length,lastNode=_.last(layer);_.each(layer,function(v,i){var w=findOtherInnerSegmentNode(g,v),k1=w?g.node(w).order:prevLayerLength;if(w||v===lastNode){_.each(layer.slice(scanPos,i+1),function(scanNode){_.each(g.predecessors(scanNode),function(u){var uLabel=g.node(u),uPos=uLabel.order;if((uPosnextNorthBorder)){addConflict(conflicts,u,v)}})}})}function visitLayer(north,south){var prevNorthPos=-1,nextNorthPos,southPos=0;_.each(south,function(v,southLookahead){if(g.node(v).dummy==="border"){var predecessors=g.predecessors(v);if(predecessors.length){nextNorthPos=g.node(predecessors[0]).order;scan(south,southPos,southLookahead,prevNorthPos,nextNorthPos);southPos=southLookahead;prevNorthPos=nextNorthPos}}scan(south,southPos,south.length,nextNorthPos,north.length)});return south}_.reduce(layering,visitLayer);return conflicts}function findOtherInnerSegmentNode(g,v){if(g.node(v).dummy){return _.find(g.predecessors(v),function(u){return g.node(u).dummy})}}function addConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}var conflictsV=conflicts[v];if(!conflictsV){conflicts[v]=conflictsV={}}conflictsV[w]=true}function hasConflict(conflicts,v,w){if(v>w){var tmp=v;v=w;w=tmp}return _.has(conflicts[v],w)}function verticalAlignment(g,layering,conflicts,neighborFn){var root={},align={},pos={};_.each(layering,function(layer){_.each(layer,function(v,order){root[v]=v;align[v]=v;pos[v]=order})});_.each(layering,function(layer){var prevIdx=-1;_.each(layer,function(v){var ws=neighborFn(v);if(ws.length){ws=_.sortBy(ws,function(w){return pos[w]});var mp=(ws.length-1)/2;for(var i=Math.floor(mp),il=Math.ceil(mp);i<=il;++i){var w=ws[i];if(align[v]===v&&prevIdxwLabel.lim){tailLabel=wLabel;flip=true}var candidates=_.filter(g.edges(),function(edge){return flip===isDescendant(t,t.node(edge.v),tailLabel)&&flip!==isDescendant(t,t.node(edge.w),tailLabel)});return _.min(candidates,function(edge){return slack(g,edge)})}function exchangeEdges(t,g,e,f){var v=e.v,w=e.w;t.removeEdge(v,w);t.setEdge(f.v,f.w,{});initLowLimValues(t);initCutValues(t,g);updateRanks(t,g)}function updateRanks(t,g){var root=_.find(t.nodes(),function(v){return!g.node(v).parent}),vs=preorder(t,root);vs=vs.slice(1);_.each(vs,function(v){var parent=t.node(v).parent,edge=g.edge(v,parent),flipped=false;if(!edge){edge=g.edge(parent,v);flipped=true}g.node(v).rank=g.node(parent).rank+(flipped?edge.minlen:-edge.minlen)})}function isTreeEdge(tree,u,v){return tree.hasEdge(u,v)}function isDescendant(tree,vLabel,rootLabel){return rootLabel.low<=vLabel.lim&&vLabel.lim<=rootLabel.lim}},{"../graphlib":33,"../lodash":36,"../util":55,"./feasible-tree":51,"./util":54}],54:[function(require,module,exports){"use strict";var _=require("../lodash");module.exports={longestPath:longestPath,slack:slack};function longestPath(g){var visited={};function dfs(v){var label=g.node(v);if(_.has(visited,v)){return label.rank}visited[v]=true;var rank=_.min(_.map(g.outEdges(v),function(e){return dfs(e.w)-g.edge(e).minlen}));if(rank===Number.POSITIVE_INFINITY){rank=0}return label.rank=rank}_.each(g.sources(),dfs)}function slack(g,e){return g.node(e.w).rank-g.node(e.v).rank-g.edge(e).minlen}},{"../lodash":36}],55:[function(require,module,exports){"use strict";var _=require("./lodash"),Graph=require("./graphlib").Graph;module.exports={addDummyNode:addDummyNode,simplify:simplify,asNonCompoundGraph:asNonCompoundGraph,successorWeights:successorWeights,predecessorWeights:predecessorWeights,intersectRect:intersectRect,buildLayerMatrix:buildLayerMatrix,normalizeRanks:normalizeRanks,removeEmptyRanks:removeEmptyRanks,addBorderNode:addBorderNode,maxRank:maxRank,partition:partition,time:time,notime:notime};function addDummyNode(g,type,attrs,name){var v;do{v=_.uniqueId(name)}while(g.hasNode(v));attrs.dummy=type;g.setNode(v,attrs);return v}function simplify(g){var simplified=(new Graph).setGraph(g.graph());_.each(g.nodes(),function(v){simplified.setNode(v,g.node(v))});_.each(g.edges(),function(e){var simpleLabel=simplified.edge(e.v,e.w)||{weight:0,minlen:1},label=g.edge(e);simplified.setEdge(e.v,e.w,{weight:simpleLabel.weight+label.weight,minlen:Math.max(simpleLabel.minlen,label.minlen)})});return simplified}function asNonCompoundGraph(g){var simplified=new Graph({multigraph:g.isMultigraph()}).setGraph(g.graph());_.each(g.nodes(),function(v){if(!g.children(v).length){simplified.setNode(v,g.node(v)) +}});_.each(g.edges(),function(e){simplified.setEdge(e,g.edge(e))});return simplified}function successorWeights(g){var weightMap=_.map(g.nodes(),function(v){var sucs={};_.each(g.outEdges(v),function(e){sucs[e.w]=(sucs[e.w]||0)+g.edge(e).weight});return sucs});return _.zipObject(g.nodes(),weightMap)}function predecessorWeights(g){var weightMap=_.map(g.nodes(),function(v){var preds={};_.each(g.inEdges(v),function(e){preds[e.v]=(preds[e.v]||0)+g.edge(e).weight});return preds});return _.zipObject(g.nodes(),weightMap)}function intersectRect(rect,point){var x=rect.x;var y=rect.y;var dx=point.x-x;var dy=point.y-y;var w=rect.width/2;var h=rect.height/2;if(!dx&&!dy){throw new Error("Not possible to find intersection inside of the rectangle")}var sx,sy;if(Math.abs(dy)*w>Math.abs(dx)*h){if(dy<0){h=-h}sx=h*dx/dy;sy=h}else{if(dx<0){w=-w}sx=w;sy=w*dy/dx}return{x:x+sx,y:y+sy}}function buildLayerMatrix(g){var layering=_.map(_.range(maxRank(g)+1),function(){return[]});_.each(g.nodes(),function(v){var node=g.node(v),rank=node.rank;if(!_.isUndefined(rank)){layering[rank][node.order]=v}});return layering}function normalizeRanks(g){var min=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));_.each(g.nodes(),function(v){var node=g.node(v);if(_.has(node,"rank")){node.rank-=min}})}function removeEmptyRanks(g){var offset=_.min(_.map(g.nodes(),function(v){return g.node(v).rank}));var layers=[];_.each(g.nodes(),function(v){var rank=g.node(v).rank-offset;if(!_.has(layers,rank)){layers[rank]=[]}layers[rank].push(v)});var delta=0,nodeRankFactor=g.graph().nodeRankFactor;_.each(layers,function(vs,i){if(_.isUndefined(vs)&&i%nodeRankFactor!==0){--delta}else if(delta){_.each(vs,function(v){g.node(v).rank+=delta})}})}function addBorderNode(g,prefix,rank,order){var node={width:0,height:0};if(arguments.length>=4){node.rank=rank;node.order=order}return addDummyNode(g,"border",node,prefix)}function maxRank(g){return _.max(_.map(g.nodes(),function(v){var rank=g.node(v).rank;if(!_.isUndefined(rank)){return rank}}))}function partition(collection,fn){var result={lhs:[],rhs:[]};_.each(collection,function(value){if(fn(value)){result.lhs.push(value)}else{result.rhs.push(value)}});return result}function time(name,fn){var start=_.now();try{return fn()}finally{console.log(name+" time: "+(_.now()-start)+"ms")}}function notime(name,fn){return fn()}},{"./graphlib":33,"./lodash":36}],56:[function(require,module,exports){module.exports="0.7.1"},{}],57:[function(require,module,exports){var lib=require("./lib");module.exports={Graph:lib.Graph,json:require("./lib/json"),alg:require("./lib/alg"),version:lib.version}},{"./lib":73,"./lib/alg":64,"./lib/json":74}],58:[function(require,module,exports){var _=require("../lodash");module.exports=components;function components(g){var visited={},cmpts=[],cmpt;function dfs(v){if(_.has(visited,v))return;visited[v]=true;cmpt.push(v);_.each(g.successors(v),dfs);_.each(g.predecessors(v),dfs)}_.each(g.nodes(),function(v){cmpt=[];dfs(v);if(cmpt.length){cmpts.push(cmpt)}});return cmpts}},{"../lodash":75}],59:[function(require,module,exports){var _=require("../lodash");module.exports=dfs;function dfs(g,vs,order){if(!_.isArray(vs)){vs=[vs]}var acc=[],visited={};_.each(vs,function(v){if(!g.hasNode(v)){throw new Error("Graph does not have node: "+v)}doDfs(g,v,order==="post",visited,acc)});return acc}function doDfs(g,v,postorder,visited,acc){if(!_.has(visited,v)){visited[v]=true;if(!postorder){acc.push(v)}_.each(g.neighbors(v),function(w){doDfs(g,w,postorder,visited,acc)});if(postorder){acc.push(v)}}}},{"../lodash":75}],60:[function(require,module,exports){var dijkstra=require("./dijkstra"),_=require("../lodash");module.exports=dijkstraAll;function dijkstraAll(g,weightFunc,edgeFunc){return _.transform(g.nodes(),function(acc,v){acc[v]=dijkstra(g,v,weightFunc,edgeFunc)},{})}},{"../lodash":75,"./dijkstra":61}],61:[function(require,module,exports){var _=require("../lodash"),PriorityQueue=require("../data/priority-queue");module.exports=dijkstra;var DEFAULT_WEIGHT_FUNC=_.constant(1);function dijkstra(g,source,weightFn,edgeFn){return runDijkstra(g,String(source),weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runDijkstra(g,source,weightFn,edgeFn){var results={},pq=new PriorityQueue,v,vEntry;var updateNeighbors=function(edge){var w=edge.v!==v?edge.v:edge.w,wEntry=results[w],weight=weightFn(edge),distance=vEntry.distance+weight;if(weight<0){throw new Error("dijkstra does not allow negative edge weights. "+"Bad edge: "+edge+" Weight: "+weight)}if(distance0){v=pq.removeMin();vEntry=results[v];if(vEntry.distance===Number.POSITIVE_INFINITY){break}edgeFn(v).forEach(updateNeighbors)}return results}},{"../data/priority-queue":71,"../lodash":75}],62:[function(require,module,exports){var _=require("../lodash"),tarjan=require("./tarjan");module.exports=findCycles;function findCycles(g){return _.filter(tarjan(g),function(cmpt){return cmpt.length>1})}},{"../lodash":75,"./tarjan":69}],63:[function(require,module,exports){var _=require("../lodash");module.exports=floydWarshall;var DEFAULT_WEIGHT_FUNC=_.constant(1);function floydWarshall(g,weightFn,edgeFn){return runFloydWarshall(g,weightFn||DEFAULT_WEIGHT_FUNC,edgeFn||function(v){return g.outEdges(v)})}function runFloydWarshall(g,weightFn,edgeFn){var results={},nodes=g.nodes();nodes.forEach(function(v){results[v]={};results[v][v]={distance:0};nodes.forEach(function(w){if(v!==w){results[v][w]={distance:Number.POSITIVE_INFINITY}}});edgeFn(v).forEach(function(edge){var w=edge.v===v?edge.w:edge.v,d=weightFn(edge);results[v][w]={distance:d,predecessor:v}})});nodes.forEach(function(k){var rowK=results[k];nodes.forEach(function(i){var rowI=results[i];nodes.forEach(function(j){var ik=rowI[k];var kj=rowK[j];var ij=rowI[j];var altDistance=ik.distance+kj.distance;if(altDistance0){v=pq.removeMin();if(_.has(parents,v)){result.setEdge(v,parents[v])}else if(init){throw new Error("Input graph is not connected: "+g)}else{init=true}g.nodeEdges(v).forEach(updateNeighbors)}return result}},{"../data/priority-queue":71,"../graph":72,"../lodash":75}],69:[function(require,module,exports){var _=require("../lodash");module.exports=tarjan;function tarjan(g){var index=0,stack=[],visited={},results=[];function dfs(v){var entry=visited[v]={onStack:true,lowlink:index,index:index++};stack.push(v);g.successors(v).forEach(function(w){if(!_.has(visited,w)){dfs(w);entry.lowlink=Math.min(entry.lowlink,visited[w].lowlink)}else if(visited[w].onStack){entry.lowlink=Math.min(entry.lowlink,visited[w].index)}});if(entry.lowlink===entry.index){var cmpt=[],w;do{w=stack.pop();visited[w].onStack=false;cmpt.push(w)}while(v!==w);results.push(cmpt)}}g.nodes().forEach(function(v){if(!_.has(visited,v)){dfs(v)}});return results}},{"../lodash":75}],70:[function(require,module,exports){var _=require("../lodash");module.exports=topsort;topsort.CycleException=CycleException;function topsort(g){var visited={},stack={},results=[];function visit(node){if(_.has(stack,node)){throw new CycleException}if(!_.has(visited,node)){stack[node]=true;visited[node]=true;_.each(g.predecessors(node),visit);delete stack[node];results.push(node)}}_.each(g.sinks(),visit);if(_.size(visited)!==g.nodeCount()){throw new CycleException}return results}function CycleException(){}},{"../lodash":75}],71:[function(require,module,exports){var _=require("../lodash");module.exports=PriorityQueue;function PriorityQueue(){this._arr=[];this._keyIndices={}}PriorityQueue.prototype.size=function(){return this._arr.length};PriorityQueue.prototype.keys=function(){return this._arr.map(function(x){return x.key})};PriorityQueue.prototype.has=function(key){return _.has(this._keyIndices,key)};PriorityQueue.prototype.priority=function(key){var index=this._keyIndices[key];if(index!==undefined){return this._arr[index].priority}};PriorityQueue.prototype.min=function(){if(this.size()===0){throw new Error("Queue underflow")}return this._arr[0].key};PriorityQueue.prototype.add=function(key,priority){var keyIndices=this._keyIndices;key=String(key);if(!_.has(keyIndices,key)){var arr=this._arr;var index=arr.length;keyIndices[key]=index;arr.push({key:key,priority:priority});this._decrease(index);return true}return false};PriorityQueue.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var min=this._arr.pop();delete this._keyIndices[min.key];this._heapify(0);return min.key};PriorityQueue.prototype.decrease=function(key,priority){var index=this._keyIndices[key];if(priority>this._arr[index].priority){throw new Error("New priority is greater than current priority. "+"Key: "+key+" Old: "+this._arr[index].priority+" New: "+priority)}this._arr[index].priority=priority;this._decrease(index)};PriorityQueue.prototype._heapify=function(i){var arr=this._arr;var l=2*i,r=l+1,largest=i;if(l>1;if(arr[parent].priority1){this.setNode(v,value)}else{this.setNode(v)}},this);return this};Graph.prototype.setNode=function(v,value){if(_.has(this._nodes,v)){if(arguments.length>1){this._nodes[v]=value}return this}this._nodes[v]=arguments.length>1?value:this._defaultNodeLabelFn(v);if(this._isCompound){this._parent[v]=GRAPH_NODE;this._children[v]={};this._children[GRAPH_NODE][v]=true}this._in[v]={};this._preds[v]={};this._out[v]={};this._sucs[v]={};++this._nodeCount;return this};Graph.prototype.node=function(v){return this._nodes[v]};Graph.prototype.hasNode=function(v){return _.has(this._nodes,v)};Graph.prototype.removeNode=function(v){var self=this;if(_.has(this._nodes,v)){var removeEdge=function(e){self.removeEdge(self._edgeObjs[e])};delete this._nodes[v];if(this._isCompound){this._removeFromParentsChildList(v);delete this._parent[v];_.each(this.children(v),function(child){this.setParent(child)},this);delete this._children[v]}_.each(_.keys(this._in[v]),removeEdge);delete this._in[v];delete this._preds[v];_.each(_.keys(this._out[v]),removeEdge);delete this._out[v];delete this._sucs[v];--this._nodeCount}return this};Graph.prototype.setParent=function(v,parent){if(!this._isCompound){throw new Error("Cannot set parent in a non-compound graph")}if(_.isUndefined(parent)){parent=GRAPH_NODE}else{for(var ancestor=parent;!_.isUndefined(ancestor);ancestor=this.parent(ancestor)){if(ancestor===v){throw new Error("Setting "+parent+" as parent of "+v+" would create create a cycle")}}this.setNode(parent)}this.setNode(v);this._removeFromParentsChildList(v);this._parent[v]=parent;this._children[parent][v]=true;return this};Graph.prototype._removeFromParentsChildList=function(v){delete this._children[this._parent[v]][v]};Graph.prototype.parent=function(v){if(this._isCompound){var parent=this._parent[v];if(parent!==GRAPH_NODE){return parent}}};Graph.prototype.children=function(v){if(_.isUndefined(v)){v=GRAPH_NODE}if(this._isCompound){var children=this._children[v];if(children){return _.keys(children)}}else if(v===GRAPH_NODE){return this.nodes()}else if(this.hasNode(v)){return[]}};Graph.prototype.predecessors=function(v){var predsV=this._preds[v];if(predsV){return _.keys(predsV)}};Graph.prototype.successors=function(v){var sucsV=this._sucs[v];if(sucsV){return _.keys(sucsV)}};Graph.prototype.neighbors=function(v){var preds=this.predecessors(v);if(preds){return _.union(preds,this.successors(v))}};Graph.prototype.setDefaultEdgeLabel=function(newDefault){if(!_.isFunction(newDefault)){newDefault=_.constant(newDefault)}this._defaultEdgeLabelFn=newDefault;return this};Graph.prototype.edgeCount=function(){return this._edgeCount};Graph.prototype.edges=function(){return _.values(this._edgeObjs)};Graph.prototype.setPath=function(vs,value){var self=this,args=arguments;_.reduce(vs,function(v,w){if(args.length>1){self.setEdge(v,w,value)}else{self.setEdge(v,w)}return w});return this};Graph.prototype.setEdge=function(){var v,w,name,value,valueSpecified=false;if(_.isPlainObject(arguments[0])){v=arguments[0].v;w=arguments[0].w;name=arguments[0].name;if(arguments.length===2){value=arguments[1];valueSpecified=true}}else{v=arguments[0];w=arguments[1];name=arguments[3];if(arguments.length>2){value=arguments[2];valueSpecified=true}}v=""+v;w=""+w;if(!_.isUndefined(name)){name=""+name}var e=edgeArgsToId(this._isDirected,v,w,name);if(_.has(this._edgeLabels,e)){if(valueSpecified){this._edgeLabels[e]=value}return this}if(!_.isUndefined(name)&&!this._isMultigraph){throw new Error("Cannot set a named edge when isMultigraph = false")}this.setNode(v);this.setNode(w);this._edgeLabels[e]=valueSpecified?value:this._defaultEdgeLabelFn(v,w,name);var edgeObj=edgeArgsToObj(this._isDirected,v,w,name);v=edgeObj.v;w=edgeObj.w;Object.freeze(edgeObj);this._edgeObjs[e]=edgeObj;incrementOrInitEntry(this._preds[w],v);incrementOrInitEntry(this._sucs[v],w);this._in[w][e]=edgeObj;this._out[v][e]=edgeObj;this._edgeCount++;return this};Graph.prototype.edge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return this._edgeLabels[e]};Graph.prototype.hasEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name);return _.has(this._edgeLabels,e)};Graph.prototype.removeEdge=function(v,w,name){var e=arguments.length===1?edgeObjToId(this._isDirected,arguments[0]):edgeArgsToId(this._isDirected,v,w,name),edge=this._edgeObjs[e];if(edge){v=edge.v;w=edge.w;delete this._edgeLabels[e];delete this._edgeObjs[e];decrementOrRemoveEntry(this._preds[w],v);decrementOrRemoveEntry(this._sucs[v],w);delete this._in[w][e];delete this._out[v][e];this._edgeCount--}return this};Graph.prototype.inEdges=function(v,u){var inV=this._in[v];if(inV){var edges=_.values(inV);if(!u){return edges}return _.filter(edges,function(edge){return edge.v===u})}};Graph.prototype.outEdges=function(v,w){var outV=this._out[v];if(outV){var edges=_.values(outV);if(!w){return edges}return _.filter(edges,function(edge){return edge.w===w})}};Graph.prototype.nodeEdges=function(v,w){var inEdges=this.inEdges(v,w);if(inEdges){return inEdges.concat(this.outEdges(v,w))}};function incrementOrInitEntry(map,k){if(_.has(map,k)){map[k]++}else{map[k]=1}}function decrementOrRemoveEntry(map,k){if(!--map[k]){delete map[k]}}function edgeArgsToId(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}return v+EDGE_KEY_DELIM+w+EDGE_KEY_DELIM+(_.isUndefined(name)?DEFAULT_EDGE_NAME:name)}function edgeArgsToObj(isDirected,v,w,name){if(!isDirected&&v>w){var tmp=v;v=w;w=tmp}var edgeObj={v:v,w:w};if(name){edgeObj.name=name}return edgeObj}function edgeObjToId(isDirected,edgeObj){return edgeArgsToId(isDirected,edgeObj.v,edgeObj.w,edgeObj.name)}},{"./lodash":75}],73:[function(require,module,exports){module.exports={Graph:require("./graph"),version:require("./version")}},{"./graph":72,"./version":76}],74:[function(require,module,exports){var _=require("./lodash"),Graph=require("./graph");module.exports={write:write,read:read};function write(g){var json={options:{directed:g.isDirected(),multigraph:g.isMultigraph(),compound:g.isCompound()},nodes:writeNodes(g),edges:writeEdges(g)};if(!_.isUndefined(g.graph())){json.value=_.clone(g.graph())}return json}function writeNodes(g){return _.map(g.nodes(),function(v){var nodeValue=g.node(v),parent=g.parent(v),node={v:v};if(!_.isUndefined(nodeValue)){node.value=nodeValue}if(!_.isUndefined(parent)){node.parent=parent}return node})}function writeEdges(g){return _.map(g.edges(),function(e){var edgeValue=g.edge(e),edge={v:e.v,w:e.w};if(!_.isUndefined(e.name)){edge.name=e.name}if(!_.isUndefined(edgeValue)){edge.value=edgeValue}return edge})}function read(json){var g=new Graph(json.options).setGraph(json.value);_.each(json.nodes,function(entry){g.setNode(entry.v,entry.value);if(entry.parent){g.setParent(entry.v,entry.parent)}});_.each(json.edges,function(entry){g.setEdge({v:entry.v,w:entry.w,name:entry.name},entry.value)});return g}},{"./graph":72,"./lodash":75}],75:[function(require,module,exports){module.exports=require(20)},{"/Users/cpettitt/projects/dagre-d3/lib/lodash.js":20,lodash:77}],76:[function(require,module,exports){module.exports="1.0.1"},{}],77:[function(require,module,exports){(function(global){(function(){var undefined;var arrayPool=[],objectPool=[];var idCounter=0;var keyPrefix=+new Date+"";var largeArraySize=75;var maxPoolSize=40;var whitespace=" \f "+"\n\r\u2028\u2029"+" ᠎              ";var reEmptyStringLeading=/\b__p \+= '';/g,reEmptyStringMiddle=/\b(__p \+=) '' \+/g,reEmptyStringTrailing=/(__e\(.*?\)|\b__t\)) \+\n'';/g;var reEsTemplate=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;var reFlags=/\w*$/;var reFuncName=/^\s*function[ \n\r\t]+\w/;var reInterpolate=/<%=([\s\S]+?)%>/g;var reLeadingSpacesAndZeros=RegExp("^["+whitespace+"]*0+(?=.$)");var reNoMatch=/($^)/;var reThis=/\bthis\b/;var reUnescapedString=/['\n\r\t\u2028\u2029\\]/g;var contextProps=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"];var templateCounter=0;var argsClass="[object Arguments]",arrayClass="[object Array]",boolClass="[object Boolean]",dateClass="[object Date]",funcClass="[object Function]",numberClass="[object Number]",objectClass="[object Object]",regexpClass="[object RegExp]",stringClass="[object String]";var cloneableClasses={};cloneableClasses[funcClass]=false;cloneableClasses[argsClass]=cloneableClasses[arrayClass]=cloneableClasses[boolClass]=cloneableClasses[dateClass]=cloneableClasses[numberClass]=cloneableClasses[objectClass]=cloneableClasses[regexpClass]=cloneableClasses[stringClass]=true;var debounceOptions={leading:false,maxWait:0,trailing:false};var descriptor={configurable:false,enumerable:false,value:null,writable:false};var objectTypes={"boolean":false,"function":true,object:true,number:false,string:false,undefined:false};var stringEscapes={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};var root=objectTypes[typeof window]&&window||this;var freeExports=objectTypes[typeof exports]&&exports&&!exports.nodeType&&exports;var freeModule=objectTypes[typeof module]&&module&&!module.nodeType&&module;var moduleExports=freeModule&&freeModule.exports===freeExports&&freeExports;var freeGlobal=objectTypes[typeof global]&&global;if(freeGlobal&&(freeGlobal.global===freeGlobal||freeGlobal.window===freeGlobal)){root=freeGlobal}function baseIndexOf(array,value,fromIndex){var index=(fromIndex||0)-1,length=array?array.length:0;while(++index-1?0:-1:cache?0:-1}function cachePush(value){var cache=this.cache,type=typeof value;if(type=="boolean"||value==null){cache[value]=true}else{if(type!="number"&&type!="string"){type="object"}var key=type=="number"?value:keyPrefix+value,typeCache=cache[type]||(cache[type]={});if(type=="object"){(typeCache[key]||(typeCache[key]=[])).push(value)}else{typeCache[key]=true}}}function charAtCallback(value){return value.charCodeAt(0)}function compareAscending(a,b){var ac=a.criteria,bc=b.criteria,index=-1,length=ac.length;while(++indexother||typeof value=="undefined"){return 1}if(value/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:reInterpolate,variable:"",imports:{_:lodash}};function baseBind(bindData){var func=bindData[0],partialArgs=bindData[2],thisArg=bindData[4];function bound(){if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(this instanceof bound){var thisBinding=baseCreate(func.prototype),result=func.apply(thisBinding,args||arguments);return isObject(result)?result:thisBinding}return func.apply(thisArg,args||arguments)}setBindData(bound,bindData);return bound}function baseClone(value,isDeep,callback,stackA,stackB){if(callback){var result=callback(value);if(typeof result!="undefined"){return result}}var isObj=isObject(value);if(isObj){var className=toString.call(value);if(!cloneableClasses[className]){return value}var ctor=ctorByClass[className];switch(className){case boolClass:case dateClass:return new ctor(+value);case numberClass:case stringClass:return new ctor(value);case regexpClass:result=ctor(value.source,reFlags.exec(value));result.lastIndex=value.lastIndex;return result}}else{return value}var isArr=isArray(value);if(isDeep){var initedStack=!stackA;stackA||(stackA=getArray());stackB||(stackB=getArray());var length=stackA.length;while(length--){if(stackA[length]==value){return stackB[length]}}result=isArr?ctor(value.length):{}}else{result=isArr?slice(value):assign({},value)}if(isArr){if(hasOwnProperty.call(value,"index")){result.index=value.index}if(hasOwnProperty.call(value,"input")){result.input=value.input}}if(!isDeep){return result}stackA.push(value);stackB.push(result);(isArr?forEach:forOwn)(value,function(objValue,key){result[key]=baseClone(objValue,isDeep,callback,stackA,stackB)});if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseCreate(prototype,properties){return isObject(prototype)?nativeCreate(prototype):{}}if(!nativeCreate){baseCreate=function(){function Object(){}return function(prototype){if(isObject(prototype)){Object.prototype=prototype;var result=new Object;Object.prototype=null}return result||context.Object()}}()}function baseCreateCallback(func,thisArg,argCount){if(typeof func!="function"){return identity}if(typeof thisArg=="undefined"||!("prototype"in func)){return func}var bindData=func.__bindData__;if(typeof bindData=="undefined"){if(support.funcNames){bindData=!func.name}bindData=bindData||!support.funcDecomp;if(!bindData){var source=fnToString.call(func);if(!support.funcNames){bindData=!reFuncName.test(source)}if(!bindData){bindData=reThis.test(source);setBindData(func,bindData)}}}if(bindData===false||bindData!==true&&bindData[1]&1){return func}switch(argCount){case 1:return function(value){return func.call(thisArg,value)};case 2:return function(a,b){return func.call(thisArg,a,b)};case 3:return function(value,index,collection){return func.call(thisArg,value,index,collection)};case 4:return function(accumulator,value,index,collection){return func.call(thisArg,accumulator,value,index,collection)}}return bind(func,thisArg)}function baseCreateWrapper(bindData){var func=bindData[0],bitmask=bindData[1],partialArgs=bindData[2],partialRightArgs=bindData[3],thisArg=bindData[4],arity=bindData[5];var isBind=bitmask&1,isBindKey=bitmask&2,isCurry=bitmask&4,isCurryBound=bitmask&8,key=func;function bound(){var thisBinding=isBind?thisArg:this;if(partialArgs){var args=slice(partialArgs);push.apply(args,arguments)}if(partialRightArgs||isCurry){args||(args=slice(arguments));if(partialRightArgs){push.apply(args,partialRightArgs)}if(isCurry&&args.length=largeArraySize&&indexOf===baseIndexOf,result=[];if(isLarge){var cache=createCache(values);if(cache){indexOf=cacheIndexOf;values=cache}else{isLarge=false}}while(++index-1}})}}stackA.pop();stackB.pop();if(initedStack){releaseArray(stackA);releaseArray(stackB)}return result}function baseMerge(object,source,callback,stackA,stackB){(isArray(source)?forEach:forOwn)(source,function(source,key){var found,isArr,result=source,value=object[key];if(source&&((isArr=isArray(source))||isPlainObject(source))){var stackLength=stackA.length;while(stackLength--){if(found=stackA[stackLength]==source){value=stackB[stackLength];break}}if(!found){var isShallow;if(callback){result=callback(value,source);if(isShallow=typeof result!="undefined"){value=result}}if(!isShallow){value=isArr?isArray(value)?value:[]:isPlainObject(value)?value:{}}stackA.push(source);stackB.push(value);if(!isShallow){baseMerge(value,source,callback,stackA,stackB)}}}else{if(callback){result=callback(value,source);if(typeof result=="undefined"){result=source}}if(typeof result!="undefined"){value=result}}object[key]=value})}function baseRandom(min,max){return min+floor(nativeRandom()*(max-min+1))}function baseUniq(array,isSorted,callback){var index=-1,indexOf=getIndexOf(),length=array?array.length:0,result=[];var isLarge=!isSorted&&length>=largeArraySize&&indexOf===baseIndexOf,seen=callback||isLarge?getArray():result;if(isLarge){var cache=createCache(seen);indexOf=cacheIndexOf;seen=cache}while(++index":">",'"':""","'":"'"};var htmlUnescapes=invert(htmlEscapes);var reEscapedHtml=RegExp("("+keys(htmlUnescapes).join("|")+")","g"),reUnescapedHtml=RegExp("["+keys(htmlEscapes).join("")+"]","g");var assign=function(object,source,guard){var index,iterable=object,result=iterable;if(!iterable)return result;var args=arguments,argsIndex=0,argsLength=typeof guard=="number"?2:args.length;if(argsLength>3&&typeof args[argsLength-2]=="function"){var callback=baseCreateCallback(args[--argsLength-1],args[argsLength--],2)}else if(argsLength>2&&typeof args[argsLength-1]=="function"){callback=args[--argsLength]}while(++argsIndex3&&typeof args[length-2]=="function"){var callback=baseCreateCallback(args[--length-1],args[length--],2)}else if(length>2&&typeof args[length-1]=="function"){callback=args[--length]}var sources=slice(arguments,1,length),index=-1,stackA=getArray(),stackB=getArray();while(++index-1}else if(typeof length=="number"){result=(isString(collection)?collection.indexOf(target,fromIndex):indexOf(collection,target,fromIndex))>-1}else{forOwn(collection,function(value){if(++index>=fromIndex){return!(result=value===target)}})}return result}var countBy=createAggregator(function(result,value,key){hasOwnProperty.call(result,key)?result[key]++:result[key]=1});function every(collection,callback,thisArg){var result=true;callback=lodash.createCallback(callback,thisArg,3);var index=-1,length=collection?collection.length:0;if(typeof length=="number"){while(++indexresult){result=value}}}else{callback=callback==null&&isString(collection)?charAtCallback:lodash.createCallback(callback,thisArg,3);forEach(collection,function(value,index,collection){var current=callback(value,index,collection);if(current>computed){computed=current;result=value}})}return result}function min(collection,callback,thisArg){var computed=Infinity,result=computed;if(typeof callback!="function"&&thisArg&&thisArg[callback]===collection){callback=null}if(callback==null&&isArray(collection)){var index=-1,length=collection.length;while(++index=largeArraySize&&createCache(argsIndex?args[argsIndex]:seen))}}var array=args[0],index=-1,length=array?array.length:0,result=[];outer:while(++index>>1;callback(array[mid])1?arguments:arguments[0],index=-1,length=array?max(pluck(array,"length")):0,result=Array(length<0?0:length);while(++index2?createWrapper(func,17,slice(arguments,2),null,thisArg):createWrapper(func,1,null,null,thisArg)}function bindAll(object){var funcs=arguments.length>1?baseFlatten(arguments,true,false,1):functions(object),index=-1,length=funcs.length;while(++index2?createWrapper(key,19,slice(arguments,2),null,object):createWrapper(key,3,null,null,object)}function compose(){var funcs=arguments,length=funcs.length;while(length--){if(!isFunction(funcs[length])){throw new TypeError}}return function(){var args=arguments,length=funcs.length;while(length--){args=[funcs[length].apply(this,args)]}return args[0]}}function curry(func,arity){arity=typeof arity=="number"?arity:+arity||func.length;return createWrapper(func,4,null,null,null,arity)}function debounce(func,wait,options){var args,maxTimeoutId,result,stamp,thisArg,timeoutId,trailingCall,lastCalled=0,maxWait=false,trailing=true;if(!isFunction(func)){throw new TypeError}wait=nativeMax(0,wait)||0;if(options===true){var leading=true;trailing=false}else if(isObject(options)){leading=options.leading;maxWait="maxWait"in options&&(nativeMax(wait,options.maxWait)||0);trailing="trailing"in options?options.trailing:trailing}var delayed=function(){var remaining=wait-(now()-stamp);if(remaining<=0){if(maxTimeoutId){clearTimeout(maxTimeoutId)}var isCalled=trailingCall;maxTimeoutId=timeoutId=trailingCall=undefined;if(isCalled){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}}else{timeoutId=setTimeout(delayed,remaining)}};var maxDelayed=function(){if(timeoutId){clearTimeout(timeoutId)}maxTimeoutId=timeoutId=trailingCall=undefined;if(trailing||maxWait!==wait){lastCalled=now();result=func.apply(thisArg,args);if(!timeoutId&&!maxTimeoutId){args=thisArg=null}}};return function(){args=arguments;stamp=now();thisArg=this;trailingCall=trailing&&(timeoutId||!leading); +if(maxWait===false){var leadingCall=leading&&!timeoutId}else{if(!maxTimeoutId&&!leading){lastCalled=stamp}var remaining=maxWait-(stamp-lastCalled),isCalled=remaining<=0;if(isCalled){if(maxTimeoutId){maxTimeoutId=clearTimeout(maxTimeoutId)}lastCalled=stamp;result=func.apply(thisArg,args)}else if(!maxTimeoutId){maxTimeoutId=setTimeout(maxDelayed,remaining)}}if(isCalled&&timeoutId){timeoutId=clearTimeout(timeoutId)}else if(!timeoutId&&wait!==maxWait){timeoutId=setTimeout(delayed,wait)}if(leadingCall){isCalled=true;result=func.apply(thisArg,args)}if(isCalled&&!timeoutId&&!maxTimeoutId){args=thisArg=null}return result}}function defer(func){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,1);return setTimeout(function(){func.apply(undefined,args)},1)}function delay(func,wait){if(!isFunction(func)){throw new TypeError}var args=slice(arguments,2);return setTimeout(function(){func.apply(undefined,args)},wait)}function memoize(func,resolver){if(!isFunction(func)){throw new TypeError}var memoized=function(){var cache=memoized.cache,key=resolver?resolver.apply(this,arguments):keyPrefix+arguments[0];return hasOwnProperty.call(cache,key)?cache[key]:cache[key]=func.apply(this,arguments)};memoized.cache={};return memoized}function once(func){var ran,result;if(!isFunction(func)){throw new TypeError}return function(){if(ran){return result}ran=true;result=func.apply(this,arguments);func=null;return result}}function partial(func){return createWrapper(func,16,slice(arguments,1))}function partialRight(func){return createWrapper(func,32,null,slice(arguments,1))}function throttle(func,wait,options){var leading=true,trailing=true;if(!isFunction(func)){throw new TypeError}if(options===false){leading=false}else if(isObject(options)){leading="leading"in options?options.leading:leading;trailing="trailing"in options?options.trailing:trailing}debounceOptions.leading=leading;debounceOptions.maxWait=wait;debounceOptions.trailing=trailing;return debounce(func,wait,debounceOptions)}function wrap(value,wrapper){return createWrapper(wrapper,16,[value])}function constant(value){return function(){return value}}function createCallback(func,thisArg,argCount){var type=typeof func;if(func==null||type=="function"){return baseCreateCallback(func,thisArg,argCount)}if(type!="object"){return property(func)}var props=keys(func),key=props[0],a=func[key];if(props.length==1&&a===a&&!isObject(a)){return function(object){var b=object[key];return a===b&&(a!==0||1/a==1/b)}}return function(object){var length=props.length,result=false;while(length--){if(!(result=baseIsEqual(object[props[length]],func[props[length]],null,true))){break}}return result}}function escape(string){return string==null?"":String(string).replace(reUnescapedHtml,escapeHtmlChar)}function identity(value){return value}function mixin(object,source,options){var chain=true,methodNames=source&&functions(source);if(!source||!options&&!methodNames.length){if(options==null){options=source}ctor=lodashWrapper;source=object;object=lodash;methodNames=functions(source)}if(options===false){chain=false}else if(isObject(options)&&"chain"in options){chain=options.chain}var ctor=object,isFunc=isFunction(ctor);forEach(methodNames,function(methodName){var func=object[methodName]=source[methodName];if(isFunc){ctor.prototype[methodName]=function(){var chainAll=this.__chain__,value=this.__wrapped__,args=[value];push.apply(args,arguments);var result=func.apply(object,args);if(chain||chainAll){if(value===result&&isObject(result)){return this}result=new ctor(result);result.__chain__=chainAll}return result}}})}function noConflict(){context._=oldDash;return this}function noop(){}var now=isNative(now=Date.now)&&now||function(){return(new Date).getTime()};var parseInt=nativeParseInt(whitespace+"08")==8?nativeParseInt:function(value,radix){return nativeParseInt(isString(value)?value.replace(reLeadingSpacesAndZeros,""):value,radix||0)};function property(key){return function(object){return object[key]}}function random(min,max,floating){var noMin=min==null,noMax=max==null;if(floating==null){if(typeof min=="boolean"&&noMax){floating=min;min=1}else if(!noMax&&typeof max=="boolean"){floating=max;noMax=true}}if(noMin&&noMax){max=1}min=+min||0;if(noMax){max=min;min=0}else{max=+max||0}if(floating||min%1||max%1){var rand=nativeRandom();return nativeMin(min+rand*(max-min+parseFloat("1e-"+((rand+"").length-1))),max)}return baseRandom(min,max)}function result(object,key){if(object){var value=object[key];return isFunction(value)?object[key]():value}}function template(text,data,options){var settings=lodash.templateSettings;text=String(text||"");options=defaults({},options,settings);var imports=defaults({},options.imports,settings.imports),importsKeys=keys(imports),importsValues=values(imports);var isEvaluating,index=0,interpolate=options.interpolate||reNoMatch,source="__p += '";var reDelimiters=RegExp((options.escape||reNoMatch).source+"|"+interpolate.source+"|"+(interpolate===reInterpolate?reEsTemplate:reNoMatch).source+"|"+(options.evaluate||reNoMatch).source+"|$","g");text.replace(reDelimiters,function(match,escapeValue,interpolateValue,esTemplateValue,evaluateValue,offset){interpolateValue||(interpolateValue=esTemplateValue);source+=text.slice(index,offset).replace(reUnescapedString,escapeStringChar);if(escapeValue){source+="' +\n__e("+escapeValue+") +\n'"}if(evaluateValue){isEvaluating=true;source+="';\n"+evaluateValue+";\n__p += '"}if(interpolateValue){source+="' +\n((__t = ("+interpolateValue+")) == null ? '' : __t) +\n'"}index=offset+match.length;return match});source+="';\n";var variable=options.variable,hasVariable=variable;if(!hasVariable){variable="obj";source="with ("+variable+") {\n"+source+"\n}\n"}source=(isEvaluating?source.replace(reEmptyStringLeading,""):source).replace(reEmptyStringMiddle,"$1").replace(reEmptyStringTrailing,"$1;");source="function("+variable+") {\n"+(hasVariable?"":variable+" || ("+variable+" = {});\n")+"var __t, __p = '', __e = _.escape"+(isEvaluating?", __j = Array.prototype.join;\n"+"function print() { __p += __j.call(arguments, '') }\n":";\n")+source+"return __p\n}";var sourceURL="\n/*\n//# sourceURL="+(options.sourceURL||"/lodash/template/source["+templateCounter++ +"]")+"\n*/";try{var result=Function(importsKeys,"return "+source+sourceURL).apply(undefined,importsValues)}catch(e){e.source=source;throw e}if(data){return result(data)}result.source=source;return result}function times(n,callback,thisArg){n=(n=+n)>-1?n:0;var index=-1,result=Array(n);callback=baseCreateCallback(callback,thisArg,1);while(++indext?-1:t>e?1:t>=e?0:0/0}function n(t){return null===t?0/0:+t}function r(t){return!isNaN(t)}function i(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function a(t){return t.length}function o(t){for(var e=1;t*e%1;)e*=10;return e}function u(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function s(){this._=Object.create(null)}function c(t){return(t+="")===hu||t[0]===fu?fu+t:t}function l(t){return(t+="")[0]===fu?t.slice(1):t}function h(t){return c(t)in this._}function f(t){return(t=c(t))in this._&&delete this._[t]}function d(){var t=[];for(var e in this._)t.push(l(e));return t}function p(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function v(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=du.length;r>n;++n){var i=du[n]+e;if(i in t)return i}}function b(){}function _(){}function x(t){function e(){for(var e,r=n,i=-1,a=r.length;++in;n++)for(var i,a=t[n],o=0,u=a.length;u>o;o++)(i=a[o])&&e(i,o,n);return t}function Y(t){return gu(t,wu),t}function j(t){var e,n;return function(r,i,a){var o,u=t[a].update,s=u.length;for(a!=n&&(n=a,e=0),i>=e&&(e=i+1);!(o=u[e])&&++e0&&(t=t.slice(0,u));var c=ku.get(t);return c&&(t=c,s=G),u?e?i:r:e?b:a}function H(t,e){return function(n){var r=Xo.event;Xo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{Xo.event=r}}}function G(t,e){var n=H(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function $(){var t=".dragsuppress-"+ ++Du,e="click"+t,n=Xo.select(eu).on("touchmove"+t,w).on("dragstart"+t,w).on("selectstart"+t,w);if(Eu){var r=tu.style,i=r[Eu];r[Eu]="none"}return function(a){function o(){n.on(e,null)}n.on(t,null),Eu&&(r[Eu]=i),a&&(n.on(e,function(){w(),o()},!0),setTimeout(o,0))}}function W(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Mu&&(eu.scrollX||eu.scrollY)){n=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Mu=!(i.f||i.e),n.remove()}return Mu?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}function Z(){return Xo.event.changedTouches[0].identifier}function X(){return Xo.event.target}function K(){return eu}function J(t){return t>0?1:0>t?-1:0}function Q(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function te(t){return t>1?0:-1>t?Su:Math.acos(t)}function ee(t){return t>1?Tu:-1>t?-Tu:Math.asin(t)}function ne(t){return((t=Math.exp(t))-1/t)/2}function re(t){return((t=Math.exp(t))+1/t)/2}function ie(t){return((t=Math.exp(2*t))-1)/(t+1)}function ae(t){return(t=Math.sin(t/2))*t}function oe(){}function ue(t,e,n){return this instanceof ue?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ue?new ue(t.h,t.s,t.l):xe(""+t,we,ue):new ue(t,e,n)}function se(t,e,n){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?a+(o-a)*t/60:180>t?o:240>t?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*r(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,o=.5>=n?n*(1+e):n+e-n*e,a=2*n-o,new me(i(t+120),i(t),i(t-120))}function ce(t,e,n){return this instanceof ce?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ce?new ce(t.h,t.c,t.l):t instanceof he?de(t.l,t.a,t.b):de((t=Ae((t=Xo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ce(t,e,n)}function le(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new he(n,Math.cos(t*=Bu)*e,Math.sin(t)*e)}function he(t,e,n){return this instanceof he?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof he?new he(t.l,t.a,t.b):t instanceof ce?le(t.h,t.c,t.l):Ae((t=me(t)).r,t.g,t.b):new he(t,e,n)}function fe(t,e,n){var r=(t+16)/116,i=r+e/500,a=r-n/200;return i=pe(i)*Vu,r=pe(r)*Hu,a=pe(a)*Gu,new me(ye(3.2404542*i-1.5371385*r-.4985314*a),ye(-.969266*i+1.8760108*r+.041556*a),ye(.0556434*i-.2040259*r+1.0572252*a))}function de(t,e,n){return t>0?new ce(Math.atan2(n,e)*Nu,Math.sqrt(e*e+n*n),t):new ce(0/0,0/0,t)}function pe(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ge(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ye(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function me(t,e,n){return this instanceof me?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof me?new me(t.r,t.g,t.b):xe(""+t,me,se):new me(t,e,n)}function ve(t){return new me(t>>16,t>>8&255,255&t)}function be(t){return ve(t)+""}function _e(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function xe(t,e,n){var r,i,a,o=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/i.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(Ee(i[0]),Ee(i[1]),Ee(i[2]))}return(a=Zu.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o=o>>4|o,u=240&a,u=u>>4|u,s=15&a,s=s<<4|s):7===t.length&&(o=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),e(o,u,s))}function we(t,e,n){var r,i,a=Math.min(t/=255,e/=255,n/=255),o=Math.max(t,e,n),u=o-a,s=(o+a)/2;return u?(i=.5>s?u/(o+a):u/(2-o-a),r=t==o?(e-n)/u+(n>e?6:0):e==o?(n-t)/u+2:(t-e)/u+4,r*=60):(r=0/0,i=s>0&&1>s?0:r),new ue(r,i,s)}function Ae(t,e,n){t=ke(t),e=ke(e),n=ke(n);var r=ge((.4124564*t+.3575761*e+.1804375*n)/Vu),i=ge((.2126729*t+.7151522*e+.072175*n)/Hu),a=ge((.0193339*t+.119192*e+.9503041*n)/Gu);return he(116*i-16,500*(r-i),200*(i-a))}function ke(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ee(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function De(t){return"function"==typeof t?t:function(){return t}}function Me(t){return t}function Se(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Ce(e,n,t,r)}}function Ce(t,e,n,r){function i(){var t,e=s.status;if(!e&&Fe(s)||e>=200&&300>e||304===e){try{t=n.call(a,s)}catch(r){return void o.error.call(a,r)}o.load.call(a,t)}else o.error.call(a,s)}var a={},o=Xo.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,c=null;return!eu.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var e=Xo.event;Xo.event=t;try{o.progress.call(a,s)}finally{Xo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(c=t,a):c},a.response=function(t){return n=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(Jo(arguments)))}}),a.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),s.setRequestHeader)for(var l in u)s.setRequestHeader(l,u[l]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=c&&(s.responseType=c),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,s),s.send(null==r?null:r),a},a.abort=function(){return s.abort(),a},Xo.rebind(a,o,"on"),null==r?a:a.get(Te(r))}function Te(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Fe(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Le(){var t=Be(),e=Ne()-t;e>24?(isFinite(e)&&(clearTimeout(Qu),Qu=setTimeout(Le,e)),Ju=0):(Ju=1,es(Le))}function Be(){var t=Date.now();for(ts=Xu;ts;)t>=ts.t&&(ts.f=ts.c(t-ts.t)),ts=ts.n;return t}function Ne(){for(var t,e=Xu,n=1/0;e;)e.f?e=t?t.n=e.n:Xu=e.n:(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function qe(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,a=r&&n?function(t,e){for(var i=t.length,a=[],o=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>e&&(u=Math.max(1,e-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>e));)u=r[o=(o+1)%r.length];return a.reverse().join(n)}:Me;return function(t){var n=rs.exec(t),r=n[1]||" ",o=n[2]||">",u=n[3]||"-",s=n[4]||"",c=n[5],l=+n[6],h=n[7],f=n[8],d=n[9],p=1,g="",y="",m=!1,v=!0;switch(f&&(f=+f.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,y="%",d="f";break;case"p":p=100,y="%",d="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+d.toLowerCase());case"c":v=!1;case"d":m=!0,f=0;break;case"s":p=-1,d="r"}"$"===s&&(g=i[0],y=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):("e"==d||"f"==d)&&(f=Math.max(0,Math.min(20,f)))),d=is.get(d)||Re;var b=c&&h;return function(t){var n=y;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>p){var s=Xo.formatPrefix(t,f);t=s.scale(t),n=s.symbol+y}else t*=p;t=d(t,f);var _,x,w=t.lastIndexOf(".");if(0>w){var A=v?t.lastIndexOf("e"):-1;0>A?(_=t,x=""):(_=t.substring(0,A),x=t.substring(A))}else _=t.substring(0,w),x=e+t.substring(w+1);!c&&h&&(_=a(_,1/0));var k=g.length+_.length+x.length+(b?0:i.length),E=l>k?new Array(k=l-k+1).join(r):"";return b&&(_=a(E+_,E.length?l-x.length:1/0)),i+=g,t=_+x,("<"===o?i+t+E:">"===o?E+i+t:"^"===o?E.substring(0,k>>=1)+i+t+E.substring(k):i+(b?t:E+t))+n}}}function Re(t){return t+""}function Pe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ue(t,e,n){function r(e){var n=t(e),r=a(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new os(n-1)),1),n}function a(t,n){return e(t=new os(+t),n),t}function o(t,r,a){var o=i(t),u=[];if(a>1)for(;r>o;)n(o)%a||u.push(new Date(+o)),e(o,1);else for(;r>o;)u.push(new Date(+o)),e(o,1);return u}function u(t,e,n){try{os=Pe;var r=new Pe;return r._=t,o(r,e,n)}finally{os=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Ye(t);return s.floor=s,s.round=Ye(r),s.ceil=Ye(i),s.offset=Ye(a),s.range=u,t}function Ye(t){return function(e,n){try{os=Pe;var r=new Pe;return r._=e,t(r,n)._}finally{os=Date}}}function je(t){function e(t){function e(e){for(var n,i,a,o=[],u=-1,s=0;++uu;){if(r>=c)return-1;if(i=e.charCodeAt(u++),37===i){if(o=e.charAt(u++),a=C[o in ss?e.charAt(u++):o],!a||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){w.lastIndex=0;var r=w.exec(e.slice(n));return r?(t.w=A.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){D.lastIndex=0;var r=D.exec(e.slice(n));return r?(t.m=M.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){k.lastIndex=0;var r=k.exec(e.slice(n));return r?(t.m=E.get(r[0].toLowerCase()),n+r[0].length):-1}function u(t,e,r){return n(t,S.c.toString(),e,r)}function s(t,e,r){return n(t,S.x.toString(),e,r)}function c(t,e,r){return n(t,S.X.toString(),e,r)}function l(t,e,n){var r=b.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,g=t.days,y=t.shortDays,m=t.months,v=t.shortMonths;e.utc=function(t){function n(t){try{os=Pe;var e=new os;return e._=t,r(e)}finally{os=Date}}var r=e(t);return n.parse=function(t){try{os=Pe;var e=r.parse(t);return e&&e._}finally{os=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=cn;var b=Xo.map(),_=Ve(g),x=He(g),w=Ve(y),A=He(y),k=Ve(m),E=He(m),D=Ve(v),M=He(v);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var S={a:function(t){return y[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:e(h),d:function(t,e){return ze(t.getDate(),e,2)},e:function(t,e){return ze(t.getDate(),e,2)},H:function(t,e){return ze(t.getHours(),e,2)},I:function(t,e){return ze(t.getHours()%12||12,e,2)},j:function(t,e){return ze(1+as.dayOfYear(t),e,3)},L:function(t,e){return ze(t.getMilliseconds(),e,3)},m:function(t,e){return ze(t.getMonth()+1,e,2)},M:function(t,e){return ze(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return ze(t.getSeconds(),e,2)},U:function(t,e){return ze(as.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return ze(as.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return ze(t.getFullYear()%100,e,2)},Y:function(t,e){return ze(t.getFullYear()%1e4,e,4)},Z:un,"%":function(){return"%"}},C={a:r,A:i,b:a,B:o,c:u,d:tn,e:tn,H:nn,I:nn,j:en,L:on,m:Qe,M:rn,p:l,S:an,U:$e,w:Ge,W:We,x:s,X:c,y:Xe,Y:Ze,Z:Ke,"%":sn};return e}function ze(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",a=i.length;return r+(n>a?new Array(n-a+1).join(e)+i:i)}function Ve(t){return new RegExp("^(?:"+t.map(Xo.requote).join("|")+")","i")}function He(t){for(var e=new s,n=-1,r=t.length;++n68?1900:2e3)}function Qe(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function tn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function en(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function nn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function rn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function an(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function on(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function un(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=lu(e)/60|0,i=lu(e)%60;return n+ze(r,"0",2)+ze(i,"0",2)}function sn(t,e,n){ls.lastIndex=0;var r=ls.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function cn(t){for(var e=t.length,n=-1;++n=0?1:-1,u=o*n,s=Math.cos(e),c=Math.sin(e),l=a*c,h=i*s+l*Math.cos(u),f=l*o*Math.sin(u);ys.add(Math.atan2(f,h)),r=t,i=s,a=c}var e,n,r,i,a;ms.point=function(o,u){ms.point=t,r=(e=o)*Bu,i=Math.cos(u=(n=u)*Bu/2+Su/4),a=Math.sin(u)},ms.lineEnd=function(){t(e,n)}}function yn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function vn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function bn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _n(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function wn(t){return[Math.atan2(t[1],t[0]),ee(t[2])]}function An(t,e){return lu(t[0]-e[0])u;++u)i.point((n=t[u])[0],n[1]);return void i.lineEnd()}var s=new Ln(n,t,null,!0),c=new Ln(n,null,s,!1);s.o=c,a.push(s),o.push(c),s=new Ln(r,t,null,!1),c=new Ln(r,null,s,!0),s.o=c,a.push(s),o.push(c)}}),o.sort(e),Fn(a),Fn(o),a.length){for(var u=0,s=n,c=o.length;c>u;++u)o[u].e=s=!s;for(var l,h,f=a[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;l=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var u=0,c=l.length;c>u;++u)i.point((h=l[u])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p){l=d.p.z;for(var u=l.length-1;u>=0;--u)i.point((h=l[u])[0],h[1])}else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,l=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Fn(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o1&&2&e&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Nn))}var d,p,g,y=e(a),m=i.invert(r[0],r[1]),v={point:o,lineStart:s,lineEnd:c,polygonStart:function(){v.point=l,v.lineStart=h,v.lineEnd=f,d=[],p=[]},polygonEnd:function(){v.point=o,v.lineStart=s,v.lineEnd=c,d=Xo.merge(d);var t=Un(m,p);d.length?(x||(a.polygonStart(),x=!0),Tn(d,In,t,n,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=On(),_=e(b),x=!1;return v}}function Nn(t){return t.length>1}function On(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:b,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function In(t,e){return((t=t.x)[0]<0?t[1]-Tu-Fu:Tu-t[1])-((e=e.x)[0]<0?e[1]-Tu-Fu:Tu-e[1])}function qn(t){var e,n=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var u=a>0?Su:-Su,s=lu(a-n);lu(s-Su)0?Tu:-Tu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),e=0):i!==u&&s>=Su&&(lu(n-i)Fu?Math.atan((Math.sin(e)*(a=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+r)/2}function Pn(t,e,n,r){var i;if(null==t)i=n*Tu,r.point(-Su,i),r.point(0,i),r.point(Su,i),r.point(Su,0),r.point(Su,-i),r.point(0,-i),r.point(-Su,-i),r.point(-Su,0),r.point(-Su,i);else if(lu(t[0]-e[0])>Fu){var a=t[0]u;++u){var c=e[u],l=c.length;if(l)for(var h=c[0],f=h[0],d=h[1]/2+Su/4,p=Math.sin(d),g=Math.cos(d),y=1;;){y===l&&(y=0),t=c[y];var m=t[0],v=t[1]/2+Su/4,b=Math.sin(v),_=Math.cos(v),x=m-f,w=x>=0?1:-1,A=w*x,k=A>Su,E=p*b;if(ys.add(Math.atan2(E*w*Math.sin(A),g*_+E*Math.cos(A))),a+=k?x+w*Cu:x,k^f>=n^m>=n){var D=vn(yn(h),yn(t));xn(D);var M=vn(i,D);xn(M);var S=(k^x>=0?-1:1)*ee(M[2]);(r>S||r===S&&(D[0]||D[1]))&&(o+=k^x>=0?1:-1)}if(!y++)break;f=m,p=b,g=_,h=t}}return(-Fu>a||Fu>a&&0>ys)^1&o}function Yn(t){function e(t,e){return Math.cos(t)*Math.cos(e)>a}function n(t){var n,a,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(h,f){var d,p=[h,f],g=e(h,f),y=o?g?0:i(h,f):g?i(h+(0>h?Su:-Su),f):0;if(!n&&(c=s=g)&&t.lineStart(),g!==s&&(d=r(n,p),(An(n,d)||An(p,d))&&(p[0]+=Fu,p[1]+=Fu,g=e(p[0],p[1]))),g!==s)l=0,g?(t.lineStart(),d=r(p,n),t.point(d[0],d[1])):(d=r(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(u&&n&&o^g){var m;y&a||!(m=r(p,n,!0))||(l=0,o?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&An(n,p)||t.point(p[0],p[1]),n=p,s=g,a=y},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return l|(c&&s)<<1}}}function r(t,e,n){var r=yn(t),i=yn(e),o=[1,0,0],u=vn(r,i),s=mn(u,u),c=u[0],l=s-c*c;if(!l)return!n&&t;var h=a*s/l,f=-a*c/l,d=vn(o,u),p=_n(o,h),g=_n(u,f);bn(p,g);var y=d,m=mn(p,y),v=mn(y,y),b=m*m-v*(mn(p,p)-1);if(!(0>b)){var _=Math.sqrt(b),x=_n(y,(-m-_)/v);if(bn(x,p),x=wn(x),!n)return x;var w,A=t[0],k=e[0],E=t[1],D=e[1];A>k&&(w=A,A=k,k=w);var M=k-A,S=lu(M-Su)M;if(!S&&E>D&&(w=E,E=D,D=w),C?S?E+D>0^x[1]<(lu(x[0]-A)Su^(A<=x[0]&&x[0]<=k)){var T=_n(y,(-m+_)/v);return bn(T,p),[x,wn(T)]}}}function i(e,n){var r=o?t:Su-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var a=Math.cos(t),o=a>0,u=lu(a)>Fu,s=gr(t,6*Bu);return Bn(e,n,s,o?[0,-t]:[-Su,t-Su])}function jn(t,e,n,r){return function(i){var a,o=i.a,u=i.b,s=o.x,c=o.y,l=u.x,h=u.y,f=0,d=1,p=l-s,g=h-c;if(a=t-s,p||!(a>0)){if(a/=p,0>p){if(f>a)return;d>a&&(d=a)}else if(p>0){if(a>d)return;a>f&&(f=a)}if(a=n-s,p||!(0>a)){if(a/=p,0>p){if(a>d)return;a>f&&(f=a)}else if(p>0){if(f>a)return;d>a&&(d=a)}if(a=e-c,g||!(a>0)){if(a/=g,0>g){if(f>a)return;d>a&&(d=a)}else if(g>0){if(a>d)return;a>f&&(f=a)}if(a=r-c,g||!(0>a)){if(a/=g,0>g){if(a>d)return;a>f&&(f=a)}else if(g>0){if(f>a)return;d>a&&(d=a)}return f>0&&(i.a={x:s+f*p,y:c+f*g}),1>d&&(i.b={x:s+d*p,y:c+d*g}),i}}}}}}function zn(t,e,n,r){function i(r,i){return lu(r[0]-t)0?0:3:lu(r[0]-n)0?2:1:lu(r[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(u){function s(t){for(var e=0,n=y.length,r=t[1],i=0;n>i;++i)for(var a,o=1,u=y[i],s=u.length,c=u[0];s>o;++o)a=u[o],c[1]<=r?a[1]>r&&Q(c,a,t)>0&&++e:a[1]<=r&&Q(c,a,t)<0&&--e,c=a;return 0!==e}function c(a,u,s,c){var l=0,h=0;if(null==a||(l=i(a,s))!==(h=i(u,s))||o(a,u)<0^s>0){do c.point(0===l||3===l?t:n,l>1?r:e);while((l=(l+s+4)%4)!==h)}else c.point(u[0],u[1])}function l(i,a){return i>=t&&n>=i&&a>=e&&r>=a}function h(t,e){l(t,e)&&u.point(t,e)}function f(){C.point=p,y&&y.push(m=[]),k=!0,A=!1,x=w=0/0}function d(){g&&(p(v,b),_&&A&&M.rejoin(),g.push(M.buffer())),C.point=h,A&&u.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var n=l(t,e);if(y&&m.push([t,e]),k)v=t,b=e,_=n,k=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&A)u.point(t,e);else{var r={a:{x:x,y:w},b:{x:t,y:e}};S(r)?(A||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),E=!1):n&&(u.lineStart(),u.point(t,e),E=!1)}x=t,w=e,A=n}var g,y,m,v,b,_,x,w,A,k,E,D=u,M=On(),S=jn(t,e,n,r),C={point:h,lineStart:f,lineEnd:d,polygonStart:function(){u=M,g=[],y=[],E=!0},polygonEnd:function(){u=D,g=Xo.merge(g);var e=s([t,r]),n=E&&e,i=g.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),c(null,null,1,u),u.lineEnd()),i&&Tn(g,a,e,c,u),u.polygonEnd()),g=y=m=null}};return C}}function Vn(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return n=e.invert(n,r),n&&t.invert(n[0],n[1])}),n}function Hn(t){var e=0,n=Su/3,r=ur(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Su/180,n=t[1]*Su/180):[e/Su*180,n/Su*180]},i}function Gn(t,e){function n(t,e){var n=Math.sqrt(a-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),o-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,a=1+r*(2*i-r),o=Math.sqrt(a)/i;return n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,ee((a-(t*t+n*n)*i*i)/(2*i))]},n}function $n(){function t(t,e){Bs+=i*t-r*e,r=t,i=e}var e,n,r,i;Rs.point=function(a,o){Rs.point=t,e=r=a,n=i=o},Rs.lineEnd=function(){t(e,n)}}function Wn(t,e){Ns>t&&(Ns=t),t>Is&&(Is=t),Os>e&&(Os=e),e>qs&&(qs=e)}function Zn(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),u.point=n}function n(t,e){o.push("L",t,",",e)}function r(){u.point=t}function i(){o.push("Z")}var a=Xn(4.5),o=[],u={point:t,lineStart:function(){u.point=e},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return a=Xn(t),u},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return u}function Xn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Kn(t,e){_s+=t,xs+=e,++ws}function Jn(){function t(t,r){var i=t-e,a=r-n,o=Math.sqrt(i*i+a*a);As+=o*(e+t)/2,ks+=o*(n+r)/2,Es+=o,Kn(e=t,n=r)}var e,n;Us.point=function(r,i){Us.point=t,Kn(e=r,n=i)}}function Qn(){Us.point=Kn}function tr(){function t(t,e){var n=t-r,a=e-i,o=Math.sqrt(n*n+a*a);As+=o*(r+t)/2,ks+=o*(i+e)/2,Es+=o,o=i*t-r*e,Ds+=o*(r+t),Ms+=o*(i+e),Ss+=3*o,Kn(r=t,i=e)}var e,n,r,i;Us.point=function(a,o){Us.point=t,Kn(e=r=a,n=i=o)},Us.lineEnd=function(){t(e,n)}}function er(t){function e(e,n){t.moveTo(e,n),t.arc(e,n,o,0,Cu)}function n(e,n){t.moveTo(e,n),u.point=r}function r(e,n){t.lineTo(e,n)}function i(){u.point=e}function a(){t.closePath()}var o=4.5,u={point:e,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=a},polygonEnd:function(){u.lineEnd=i,u.point=e},pointRadius:function(t){return o=t,u},result:b};return u}function nr(t){function e(t){return(u?r:n)(t)}function n(e){return ar(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){b=0/0,k.point=a,e.lineStart()}function a(n,r){var a=yn([n,r]),o=t(n,r);i(b,_,v,x,w,A,b=o[0],_=o[1],v=n,x=a[0],w=a[1],A=a[2],u,e),e.point(b,_)}function o(){k.point=n,e.lineEnd()}function s(){r(),k.point=c,k.lineEnd=l +}function c(t,e){a(h=t,f=e),d=b,p=_,g=x,y=w,m=A,k.point=a}function l(){i(b,_,v,x,w,A,d,p,h,g,y,m,u,e),k.lineEnd=o,o()}var h,f,d,p,g,y,m,v,b,_,x,w,A,k={point:n,lineStart:r,lineEnd:o,polygonStart:function(){e.polygonStart(),k.lineStart=s},polygonEnd:function(){e.polygonEnd(),k.lineStart=r}};return k}function i(e,n,r,u,s,c,l,h,f,d,p,g,y,m){var v=l-e,b=h-n,_=v*v+b*b;if(_>4*a&&y--){var x=u+d,w=s+p,A=c+g,k=Math.sqrt(x*x+w*w+A*A),E=Math.asin(A/=k),D=lu(lu(A)-1)a||lu((v*T+b*F)/_-.5)>.3||o>u*d+s*p+c*g)&&(i(e,n,r,u,s,c,S,C,D,x/=k,w/=k,A,y,m),m.point(S,C),i(S,C,D,x,w,A,l,h,f,d,p,g,y,m))}}var a=.5,o=Math.cos(30*Bu),u=16;return e.precision=function(t){return arguments.length?(u=(a=t*t)>0&&16,e):Math.sqrt(a)},e}function rr(t){var e=nr(function(e,n){return t([e*Nu,n*Nu])});return function(t){return sr(e(t))}}function ir(t){this.stream=t}function ar(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function or(t){return ur(function(){return t})()}function ur(t){function e(t){return t=u(t[0]*Bu,t[1]*Bu),[t[0]*f+s,c-t[1]*f]}function n(t){return t=u.invert((t[0]-s)/f,(c-t[1])/f),t&&[t[0]*Nu,t[1]*Nu]}function r(){u=Vn(o=hr(m,v,b),a);var t=a(g,y);return s=d-t[0]*f,c=p+t[1]*f,i()}function i(){return l&&(l.valid=!1,l=null),e}var a,o,u,s,c,l,h=nr(function(t,e){return t=a(t,e),[t[0]*f+s,c-t[1]*f]}),f=150,d=480,p=250,g=0,y=0,m=0,v=0,b=0,_=Ts,x=Me,w=null,A=null;return e.stream=function(t){return l&&(l.valid=!1),l=sr(_(o,h(x(t)))),l.valid=!0,l},e.clipAngle=function(t){return arguments.length?(_=null==t?(w=t,Ts):Yn((w=+t)*Bu),i()):w},e.clipExtent=function(t){return arguments.length?(A=t,x=t?zn(t[0][0],t[0][1],t[1][0],t[1][1]):Me,i()):A},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Bu,y=t[1]%360*Bu,r()):[g*Nu,y*Nu]},e.rotate=function(t){return arguments.length?(m=t[0]%360*Bu,v=t[1]%360*Bu,b=t.length>2?t[2]%360*Bu:0,r()):[m*Nu,v*Nu,b*Nu]},Xo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&n,r()}}function sr(t){return ar(t,function(e,n){t.point(e*Bu,n*Bu)})}function cr(t,e){return[t,e]}function lr(t,e){return[t>Su?t-Cu:-Su>t?t+Cu:t,e]}function hr(t,e,n){return t?e||n?Vn(dr(t),pr(e,n)):dr(t):e||n?pr(e,n):lr}function fr(t){return function(e,n){return e+=t,[e>Su?e-Cu:-Su>e?e+Cu:e,n]}}function dr(t){var e=fr(t);return e.invert=fr(-t),e}function pr(t,e){function n(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*r+u*i;return[Math.atan2(s*a-l*o,u*r-c*i),ee(l*a+s*o)]}var r=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*a-s*o;return[Math.atan2(s*a+c*o,u*r+l*i),ee(l*r-u*i)]},n}function gr(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,a,o,u){var s=o*e;null!=i?(i=yr(n,i),a=yr(n,a),(o>0?a>i:i>a)&&(i+=o*Cu)):(i=t+o*Cu,a=t-.5*s);for(var c,l=i;o>0?l>a:a>l;l-=s)u.point((c=wn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function yr(t,e){var n=yn(e);n[0]-=t,xn(n);var r=te(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Fu)%(2*Math.PI)}function mr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function vr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function br(t){return t.source}function _r(t){return t.target}function xr(t,e,n,r){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),l=o*Math.cos(n),h=o*Math.sin(n),f=2*Math.asin(Math.sqrt(ae(r-e)+i*o*ae(n-t))),d=1/Math.sin(f),p=f?function(t){var e=Math.sin(t*=f)*d,n=Math.sin(f-t)*d,r=n*s+e*l,i=n*c+e*h,o=n*a+e*u;return[Math.atan2(i,r)*Nu,Math.atan2(o,Math.sqrt(r*r+i*i))*Nu]}:function(){return[t*Nu,e*Nu]};return p.distance=f,p}function wr(){function t(t,i){var a=Math.sin(i*=Bu),o=Math.cos(i),u=lu((t*=Bu)-e),s=Math.cos(u);Ys+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=r*a-n*o*s)*u),n*a+r*o*s),e=t,n=a,r=o}var e,n,r;js.point=function(i,a){e=i*Bu,n=Math.sin(a*=Bu),r=Math.cos(a),js.point=t},js.lineEnd=function(){js.point=js.lineEnd=b}}function Ar(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),a=t(r*i);return[a*i*Math.sin(e),a*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,r*o),Math.asin(r&&n*a/r)]},n}function kr(t,e){function n(t,e){o>0?-Tu+Fu>e&&(e=-Tu+Fu):e>Tu-Fu&&(e=Tu-Fu);var n=o/Math.pow(i(e),a);return[n*Math.sin(a*t),o-n*Math.cos(a*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Su/4+t/2)},a=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),o=r*Math.pow(i(t),a)/a;return a?(n.invert=function(t,e){var n=o-e,r=J(a)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/a,2*Math.atan(Math.pow(o/r,1/a))-Tu]},n):Dr}function Er(t,e){function n(t,e){var n=a-e;return[n*Math.sin(i*t),a-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),a=r/i+t;return lu(i)i;i++){for(;r>1&&Q(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Lr(t,e){return t[0]-e[0]||t[1]-e[1]}function Br(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Nr(t,e,n,r){var i=t[0],a=n[0],o=e[0]-i,u=r[0]-a,s=t[1],c=n[1],l=e[1]-s,h=r[1]-c,f=(u*(s-c)-h*(i-a))/(h*o-u*l);return[i+f*o,s+f*l]}function Or(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Ir(){ri(this),this.edge=this.site=this.circle=null}function qr(t){var e=tc.pop()||new Ir;return e.site=t,e}function Rr(t){Wr(t),Ks.remove(t),tc.push(t),ri(t)}function Pr(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},a=t.P,o=t.N,u=[t];Rr(t);for(var s=a;s.circle&&lu(n-s.circle.x)l;++l)c=u[l],s=u[l-1],ti(c.edge,s.site,c.site,i);s=u[0],c=u[h-1],c.edge=Jr(s.site,c.site,null,i),$r(s),$r(c)}function Ur(t){for(var e,n,r,i,a=t.x,o=t.y,u=Ks._;u;)if(r=Yr(u,o)-a,r>Fu)u=u.L;else{if(i=a-jr(u,o),!(i>Fu)){r>-Fu?(e=u.P,n=u):i>-Fu?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}var s=qr(t);if(Ks.insert(e,s),e||n){if(e===n)return Wr(e),n=qr(e.site),Ks.insert(s,n),s.edge=n.edge=Jr(e.site,s.site),$r(e),void $r(n);if(!n)return void(s.edge=Jr(e.site,s.site));Wr(e),Wr(n);var c=e.site,l=c.x,h=c.y,f=t.x-l,d=t.y-h,p=n.site,g=p.x-l,y=p.y-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_={x:(y*v-d*b)/m+l,y:(f*b-g*v)/m+h};ti(n.edge,c,p,_),s.edge=Jr(c,t,null,_),n.edge=Jr(t,p,null,_),$r(e),$r(n)}}function Yr(t,e){var n=t.site,r=n.x,i=n.y,a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;n=o.site;var u=n.x,s=n.y,c=s-e;if(!c)return u;var l=u-r,h=1/a-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-s+c/2+i-a/2)))/h+r:(r+u)/2}function jr(t,e){var n=t.N;if(n)return Yr(n,e);var r=t.site;return r.y===e?r.x:1/0}function zr(t){this.site=t,this.edges=[]}function Vr(t){for(var e,n,r,i,a,o,u,s,c,l,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],g=Xs,y=g.length;y--;)if(a=g[y],a&&a.prepare())for(u=a.edges,s=u.length,o=0;s>o;)l=u[o].end(),r=l.x,i=l.y,c=u[++o%s].start(),e=c.x,n=c.y,(lu(r-e)>Fu||lu(i-n)>Fu)&&(u.splice(o,0,new ei(Qr(a.site,l,lu(r-h)Fu?{x:h,y:lu(e-h)Fu?{x:lu(n-p)Fu?{x:f,y:lu(e-f)Fu?{x:lu(n-d)=-Lu)){var d=s*s+c*c,p=l*l+h*h,g=(h*d-c*p)/f,y=(s*p-l*d)/f,h=y+u,m=ec.pop()||new Gr;m.arc=t,m.site=i,m.x=g+o,m.y=h+Math.sqrt(g*g+y*y),m.cy=h,t.circle=m;for(var v=null,b=Qs._;b;)if(m.yy||y>=u)return;if(f>p){if(a){if(a.y>=c)return}else a={x:y,y:s};n={x:y,y:c}}else{if(a){if(a.yr||r>1)if(f>p){if(a){if(a.y>=c)return}else a={x:(s-i)/r,y:s};n={x:(c-i)/r,y:c}}else{if(a){if(a.yd){if(a){if(a.x>=u)return}else a={x:o,y:r*o+i};n={x:u,y:r*u+i}}else{if(a){if(a.xa&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:yi(n,r)})),a=ic.lastIndex;return ar;++r)u[(n=s[r]).i]=n.x(t);return u.join("")})}function vi(t,e){for(var n,r=Xo.interpolators.length;--r>=0&&!(n=Xo.interpolators[r](t,e)););return n}function bi(t,e){var n,r=[],i=[],a=t.length,o=e.length,u=Math.min(t.length,e.length);for(n=0;u>n;++n)r.push(vi(t[n],e[n]));for(;a>n;++n)i[n]=t[n];for(;o>n;++n)i[n]=e[n];return function(t){for(n=0;u>n;++n)i[n]=r[n](t);return i}}function _i(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function xi(t){return function(e){return 1-t(1-e)}}function wi(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function Ai(t){return t*t}function ki(t){return t*t*t}function Ei(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Di(t){return function(e){return Math.pow(e,t)}}function Mi(t){return 1-Math.cos(t*Tu)}function Si(t){return Math.pow(2,10*(t-1))}function Ci(t){return 1-Math.sqrt(1-t*t)}function Ti(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Cu*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Cu/e)}}function Fi(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Li(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Bi(t,e){t=Xo.hcl(t),e=Xo.hcl(e);var n=t.h,r=t.c,i=t.l,a=e.h-n,o=e.c-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.c:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return le(n+a*t,r+o*t,i+u*t)+""}}function Ni(t,e){t=Xo.hsl(t),e=Xo.hsl(e);var n=t.h,r=t.s,i=t.l,a=e.h-n,o=e.s-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.s:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return se(n+a*t,r+o*t,i+u*t)+""}}function Oi(t,e){t=Xo.lab(t),e=Xo.lab(e);var n=t.l,r=t.a,i=t.b,a=e.l-n,o=e.a-r,u=e.b-i;return function(t){return fe(n+a*t,r+o*t,i+u*t)+""}}function Ii(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function qi(t){var e=[t.a,t.b],n=[t.c,t.d],r=Pi(e),i=Ri(e,n),a=Pi(Ui(n,e,-i))||0;e[0]*n[1]180?l+=360:l-c>180&&(c+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:yi(c,l)})):l&&r.push(r.pop()+"rotate("+l+")"),h!=f?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:yi(h,f)}):f&&r.push(r.pop()+"skewX("+f+")"),d[0]!=p[0]||d[1]!=p[1]?(n=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:n-4,x:yi(d[0],p[0])},{i:n-2,x:yi(d[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),n=i.length,function(t){for(var e,a=-1;++a=0;)n.push(i[r])}function ta(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++on;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function ha(t){return t.reduce(fa,0)}function fa(t,e){return t+e[1]}function da(t,e){return pa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function pa(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,a=[];++n<=e;)a[n]=i*n+r;return a}function ga(t){return[Xo.min(t),Xo.max(t)]}function ya(t,e){return t.value-e.value}function ma(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function va(t,e){t._pack_next=e,e._pack_prev=t}function ba(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function _a(t){function e(t){l=Math.min(t.x-t.r,l),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((n=t.children)&&(c=n.length)){var n,r,i,a,o,u,s,c,l=1/0,h=-1/0,f=1/0,d=-1/0;if(n.forEach(xa),r=n[0],r.x=-r.r,r.y=0,e(r),c>1&&(i=n[1],i.x=i.r,i.y=0,e(i),c>2))for(a=n[2],ka(r,i,a),e(a),ma(r,a),r._pack_prev=a,ma(a,i),i=r._pack_next,o=3;c>o;o++){ka(r,i,a=n[o]);var p=0,g=1,y=1;for(u=i._pack_next;u!==i;u=u._pack_next,g++)if(ba(u,a)){p=1;break}if(1==p)for(s=r._pack_prev;s!==u._pack_prev&&!ba(s,a);s=s._pack_prev,y++);p?(y>g||g==y&&i.ro;o++)a=n[o],a.x-=m,a.y-=v,b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=b,n.forEach(wa)}}function xa(t){t._pack_next=t._pack_prev=t}function wa(t){delete t._pack_next,delete t._pack_prev}function Aa(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var a=-1,o=i.length;++a=0;)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function Ta(t,e,n){return t.a.parent===e.parent?t.a:n}function Fa(t){return 1+Xo.max(t,function(t){return t.y})}function La(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ba(t){var e=t.children;return e&&e.length?Ba(e[0]):t}function Na(t){var e,n=t.children;return n&&(e=n.length)?Na(n[e-1]):t}function Oa(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ia(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>a&&(r+=a/2,a=0),{x:n,y:r,dx:i,dy:a}}function qa(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Ra(t){return t.rangeExtent?t.rangeExtent():qa(t.range())}function Pa(t,e,n,r){var i=n(t[0],t[1]),a=r(e[0],e[1]);return function(t){return a(i(t))}}function Ua(t,e){var n,r=0,i=t.length-1,a=t[r],o=t[i];return a>o&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Ya(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:gc}function ja(t,e,n,r){var i=[],a=[],o=0,u=Math.min(t.length,e.length)-1;for(t[u]2?ja:Pa,s=r?zi:ji;return o=i(t,e,s,n),u=i(e,t,s,vi),a}function a(t){return o(t)}var o,u;return a.invert=function(t){return u(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Ii)},a.clamp=function(t){return arguments.length?(r=t,i()):r},a.interpolate=function(t){return arguments.length?(n=t,i()):n},a.ticks=function(e){return $a(t,e)},a.tickFormat=function(e,n){return Wa(t,e,n)},a.nice=function(e){return Ha(t,e),i()},a.copy=function(){return za(t,e,n,r)},i()}function Va(t,e){return Xo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ha(t,e){return Ua(t,Ya(Ga(t,e)[2]))}function Ga(t,e){null==e&&(e=10);var n=qa(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),a=e/r*i;return.15>=a?i*=10:.35>=a?i*=5:.75>=a&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function $a(t,e){return Xo.range.apply(Xo,Ga(t,e))}function Wa(t,e,n){var r=Ga(t,e);if(n){var i=rs.exec(n);if(i.shift(),"s"===i[8]){var a=Xo.formatPrefix(Math.max(lu(r[0]),lu(r[1])));return i[7]||(i[7]="."+Za(a.scale(r[2]))),i[8]="f",n=Xo.format(i.join("")),function(t){return n(a.scale(t))+a.symbol}}i[7]||(i[7]="."+Xa(i[8],r)),n=i.join("")}else n=",."+Za(r[2])+"f";return Xo.format(n)}function Za(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Xa(t,e){var n=Za(e[2]);return t in yc?Math.abs(n-Za(Math.max(lu(e[0]),lu(e[1]))))+ +("e"!==t):n-2*("%"===t)}function Ka(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),o):e},o.nice=function(){var e=Ua(r.map(i),n?Math:vc);return t.domain(e),r=e.map(a),o},o.ticks=function(){var t=qa(r),o=[],u=t[0],s=t[1],c=Math.floor(i(u)),l=Math.ceil(i(s)),h=e%1?2:e;if(isFinite(l-c)){if(n){for(;l>c;c++)for(var f=1;h>f;f++)o.push(a(c)*f);o.push(a(c))}else for(o.push(a(c));c++0;f--)o.push(a(c)*f);for(c=0;o[c]s;l--);o=o.slice(c,l)}return o},o.tickFormat=function(t,e){if(!arguments.length)return mc;arguments.length<2?e=mc:"function"!=typeof e&&(e=Xo.format(e));var r,u=Math.max(.1,t/o.ticks().length),s=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(t){return t/a(s(i(t)+r))<=u?e(t):""}},o.copy=function(){return Ka(t.copy(),e,n,r)},Va(o,t)}function Ja(t,e,n){function r(e){return t(i(e))}var i=Qa(e),a=Qa(1/e);return r.invert=function(e){return a(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return $a(n,t)},r.tickFormat=function(t,e){return Wa(n,t,e)},r.nice=function(t){return r.domain(Ha(n,t))},r.exponent=function(o){return arguments.length?(i=Qa(e=o),a=Qa(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return Ja(t.copy(),e,n)},Va(r,t)}function Qa(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function to(t,e){function n(n){return a[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):0/0))-1)%a.length]}function r(e,n){return Xo.range(t.length).map(function(t){return e+n*t})}var i,a,o;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new s;for(var a,o=-1,u=r.length;++ot?[0/0,0/0]:[t>0?u[t-1]:e[0],te?0/0:e/a+t,[e,e+1/a]},r.copy=function(){return no(t,e,n)},i()}function ro(t,e){function n(n){return n>=n?e[Xo.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return ro(t,e)},n}function io(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return $a(t,e)},e.tickFormat=function(e,n){return Wa(t,e,n)},e.copy=function(){return io(t)},e}function ao(t){return t.innerRadius}function oo(t){return t.outerRadius}function uo(t){return t.startAngle}function so(t){return t.endAngle}function co(t){function e(e){function o(){c.push("M",a(t(l),u))}for(var s,c=[],l=[],h=-1,f=e.length,d=De(n),p=De(r);++h1&&i.push("H",r[0]),i.join("")}function po(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e1){u=e[1],a=t[s],s++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var c=2;c9&&(i=3*e/Math.sqrt(i),o[u]=i*n,o[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),a.push([i||0,o[u]*i||0]);return a}function To(t){return t.length<3?lo(t):t[0]+bo(t,Co(t))}function Fo(t){for(var e,n,r,i=-1,a=t.length;++in?c():(i.active=n,a.event&&a.event.start.call(t,l,e),a.tween.forEach(function(n,r){(r=r.call(t,l,e))&&g.push(r)}),void Xo.timer(function(){return p.c=s(r||1)?Cn:s,1},0,o))}function s(r){if(i.active!==n)return c();for(var o=r/d,u=h(o),s=g.length;s>0;)g[--s].call(t,u);return o>=1?(a.event&&a.event.end.call(t,l,e),c()):void 0}function c(){return--i.count?delete i[n]:delete t.__transition__,1}var l=t.__data__,h=a.ease,f=a.delay,d=a.duration,p=ts,g=[];return p.t=f+o,r>=f?u(r-f):void(p.c=u)},0,o)}}function zo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function Vo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function Ho(t){return t.toISOString()}function Go(t,e,n){function r(e){return t(e)}function i(t,n){var r=t[1]-t[0],i=r/n,a=Xo.bisect(zc,i);return a==zc.length?[e.year,Ga(t.map(function(t){return t/31536e6}),n)[2]]:a?e[i/zc[a-1]1?{floor:function(e){for(;n(e=t.floor(e));)e=$o(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=$o(+e+1);return e}}:t))},r.ticks=function(t,e){var n=qa(r.domain()),a=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(n[0],$o(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return Go(t.copy(),e,n)},Va(r,t)}function $o(t){return new Date(t)}function Wo(t){return JSON.parse(t.responseText)}function Zo(t){var e=Qo.createRange();return e.selectNode(Qo.body),e.createContextualFragment(t.responseText)}var Xo={version:"3.4.13"};Date.now||(Date.now=function(){return+new Date});var Ko=[].slice,Jo=function(t){return Ko.call(t)},Qo=document,tu=Qo.documentElement,eu=window;try{Jo(tu.childNodes)[0].nodeType}catch(nu){Jo=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Qo.createElement("div").style.setProperty("opacity",0,"")}catch(ru){var iu=eu.Element.prototype,au=iu.setAttribute,ou=iu.setAttributeNS,uu=eu.CSSStyleDeclaration.prototype,su=uu.setProperty;iu.setAttribute=function(t,e){au.call(this,t,e+"")},iu.setAttributeNS=function(t,e,n){ou.call(this,t,e,n+"")},uu.setProperty=function(t,e,n){su.call(this,t,e+"",n)}}Xo.ascending=t,Xo.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},Xo.min=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++ir&&(n=r)}else{for(;++i=n);)n=void 0;for(;++ir&&(n=r)}return n},Xo.max=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++in&&(n=r)}else{for(;++i=n);)n=void 0;for(;++in&&(n=r)}return n},Xo.extent=function(t,e){var n,r,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n);)n=i=void 0;for(;++ar&&(n=r),r>i&&(i=r))}else{for(;++a=n);)n=void 0;for(;++ar&&(n=r),r>i&&(i=r))}return[n,i]},Xo.sum=function(t,e){var n,i=0,a=t.length,o=-1;if(1===arguments.length)for(;++or?0:r);r>n;)a[n]=[e=i,i=t[++n]];return a},Xo.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,e=Xo.min(arguments,a),n=new Array(e);++t=0;)for(r=t[i],e=r.length;--e>=0;)n[--o]=r[e];return n};var lu=Math.abs;Xo.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var r,i=[],a=o(lu(n)),u=-1;if(t*=a,e*=a,n*=a,0>n)for(;(r=t+n*++u)>e;)i.push(r/a);else for(;(r=t+n*++u)=a.length)return r?r.call(i,o):n?o.sort(n):o;for(var c,l,h,f,d=-1,p=o.length,g=a[u++],y=new s;++d=a.length)return t;var r=[],i=o[n++];return t.forEach(function(t,i){r.push({key:t,values:e(i,n)})}),i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,r,i={},a=[],o=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(Xo.map,n,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},Xo.set=function(t){var e=new y;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},u(y,{has:h,add:function(t){return this._[c(t+="")]=!0,t},remove:f,values:d,size:p,empty:g,forEach:function(t){for(var e in this._)t.call(this,l(e))}}),Xo.behavior={},Xo.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},Xo.event=null,Xo.requote=function(t){return t.replace(pu,"\\$&")};var pu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,gu={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},yu=function(t,e){return e.querySelector(t)},mu=function(t,e){return e.querySelectorAll(t)},vu=tu.matches||tu[v(tu,"matchesSelector")],bu=function(t,e){return vu.call(t,e)};"function"==typeof Sizzle&&(yu=function(t,e){return Sizzle(t,e)[0]||null},mu=Sizzle,bu=Sizzle.matchesSelector),Xo.selection=function(){return Au};var _u=Xo.selection.prototype=[];_u.select=function(t){var e,n,r,i,a=[];t=D(t);for(var o=-1,u=this.length;++o=0&&(n=t.slice(0,e),t=t.slice(e+1)),xu.hasOwnProperty(n)?{space:xu[n],local:t}:t}},_u.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=Xo.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(S(e,t[e]));return this}return this.each(S(t,e))},_u.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=F(t)).length,i=-1;if(e=n.classList){for(;++ir){if("string"!=typeof t){2>r&&(e="");for(n in t)this.each(N(n,t[n],e));return this}if(2>r)return eu.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(N(t,e,n))},_u.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(O(e,t[e]));return this}return this.each(O(t,e))},_u.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},_u.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},_u.append=function(t){return t=I(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},_u.insert=function(t,e){return t=I(t),e=D(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},_u.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},_u.data=function(t,e){function n(t,n){var r,i,a,o=t.length,h=n.length,f=Math.min(o,h),d=new Array(h),p=new Array(h),g=new Array(o);if(e){var y,m=new s,v=new Array(o);for(r=-1;++rr;++r)p[r]=q(n[r]);for(;o>r;++r)g[r]=t[r]}p.update=d,p.parentNode=d.parentNode=g.parentNode=t.parentNode,u.push(p),c.push(d),l.push(g)}var r,i,a=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(r=this[0]).length);++aa;a++){i.push(e=[]),e.parentNode=(n=this[a]).parentNode;for(var u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return E(i)},_u.order=function(){for(var t=-1,e=this.length;++t=0;)(n=r[i])&&(a&&a!==n.nextSibling&&a.parentNode.insertBefore(n,a),a=n);return this},_u.sort=function(t){t=P.apply(this,arguments);for(var e=-1,n=this.length;++et;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var a=n[r];if(a)return a}return null},_u.size=function(){var t=0;return U(this,function(){++t}),t};var wu=[];Xo.selection.enter=Y,Xo.selection.enter.prototype=wu,wu.append=_u.append,wu.empty=_u.empty,wu.node=_u.node,wu.call=_u.call,wu.size=_u.size,wu.select=function(t){for(var e,n,r,i,a,o=[],u=-1,s=this.length;++ur){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(V(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(V(t,e,n))};var ku=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});ku.forEach(function(t){"on"+t in Qo&&ku.remove(t)});var Eu="onselectstart"in Qo?null:v(tu.style,"userSelect"),Du=0;Xo.mouse=function(t){return W(t,A())};var Mu=/WebKit/.test(eu.navigator.userAgent)?-1:0;Xo.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=A().changedTouches),e)for(var r,i=0,a=e.length;a>i;++i)if((r=e[i]).identifier===n)return W(t,r)},Xo.behavior.drag=function(){function t(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(t,e,i,a,o){return function(){function u(){var t,n,r=e(f,g);r&&(t=r[0]-b[0],n=r[1]-b[1],p|=t|n,b=r,d({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:n}))}function s(){e(f,g)&&(m.on(a+y,null).on(o+y,null),v(p&&Xo.event.target===h),d({type:"dragend"}))}var c,l=this,h=Xo.event.target,f=l.parentNode,d=n.of(l,arguments),p=0,g=t(),y=".drag"+(null==g?"":"-"+g),m=Xo.select(i()).on(a+y,u).on(o+y,s),v=$(),b=e(f,g);r?(c=r.apply(l,arguments),c=[c.x-b[0],c.y-b[1]]):c=[0,0],d({type:"dragstart"})}}var n=k(t,"drag","dragstart","dragend"),r=null,i=e(b,Xo.mouse,K,"mousemove","mouseup"),a=e(Z,Xo.touch,X,"touchmove","touchend");return t.origin=function(e){return arguments.length?(r=e,t):r},Xo.rebind(t,n,"on")},Xo.touches=function(t,e){return arguments.length<2&&(e=A().touches),e?Jo(e).map(function(e){var n=W(t,e);return n.identifier=e.identifier,n}):[]};var Su=Math.PI,Cu=2*Su,Tu=Su/2,Fu=1e-6,Lu=Fu*Fu,Bu=Su/180,Nu=180/Su,Ou=Math.SQRT2,Iu=2,qu=4;Xo.interpolateZoom=function(t,e){function n(t){var e=t*v;if(m){var n=re(g),o=a/(Iu*f)*(n*ie(Ou*e+g)-ne(g));return[r+o*c,i+o*l,a*n/re(Ou*e+g)]}return[r+t*c,i+t*l,a*Math.exp(Ou*e)]}var r=t[0],i=t[1],a=t[2],o=e[0],u=e[1],s=e[2],c=o-r,l=u-i,h=c*c+l*l,f=Math.sqrt(h),d=(s*s-a*a+qu*h)/(2*a*Iu*f),p=(s*s-a*a-qu*h)/(2*s*Iu*f),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(p*p+1)-p),m=y-g,v=(m||Math.log(s/a))/Ou;return n.duration=1e3*v,n},Xo.behavior.zoom=function(){function t(t){t.on(M,c).on(Uu+".zoom",h).on("dblclick.zoom",f).on(T,l)}function e(t){return[(t[0]-A.x)/A.k,(t[1]-A.y)/A.k]}function n(t){return[t[0]*A.k+A.x,t[1]*A.k+A.y]}function r(t){A.k=Math.max(D[0],Math.min(D[1],t))}function i(t,e){e=n(e),A.x+=t[0]-e[0],A.y+=t[1]-e[1]}function a(){b&&b.domain(v.range().map(function(t){return(t-A.x)/A.k}).map(v.invert)),x&&x.domain(_.range().map(function(t){return(t-A.y)/A.k}).map(_.invert))}function o(t){t({type:"zoomstart"})}function u(t){a(),t({type:"zoom",scale:A.k,translate:[A.x,A.y]})}function s(t){t({type:"zoomend"})}function c(){function t(){l=1,i(Xo.mouse(r),f),u(c)}function n(){h.on(S,null).on(C,null),d(l&&Xo.event.target===a),s(c)}var r=this,a=Xo.event.target,c=F.of(r,arguments),l=0,h=Xo.select(eu).on(S,t).on(C,n),f=e(Xo.mouse(r)),d=$();z.call(r),o(c)}function l(){function t(){var t=Xo.touches(d);return f=A.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function n(){var e=Xo.event.target;Xo.select(e).on(b,a).on(_,h),x.push(e);for(var n=Xo.event.changedTouches,o=0,s=n.length;s>o;++o)g[n[o].identifier]=null;var c=t(),l=Date.now();if(1===c.length){if(500>l-m){var f=c[0],d=g[f.identifier];r(2*A.k),i(f,d),w(),u(p)}m=l}else if(c.length>1){var f=c[0],v=c[1],k=f[0]-v[0],E=f[1]-v[1];y=k*k+E*E}}function a(){for(var t,e,n,a,o=Xo.touches(d),s=0,c=o.length;c>s;++s,a=null)if(n=o[s],a=g[n.identifier]){if(e)break;t=n,e=a}if(a){var l=(l=n[0]-t[0])*l+(l=n[1]-t[1])*l,h=y&&Math.sqrt(l/y);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+a[0])/2,(e[1]+a[1])/2],r(h*f)}m=null,i(t,e),u(p)}function h(){if(Xo.event.touches.length){for(var e=Xo.event.changedTouches,n=0,r=e.length;r>n;++n)delete g[e[n].identifier];for(var i in g)return void t()}Xo.selectAll(x).on(v,null),k.on(M,c).on(T,l),E(),s(p)}var f,d=this,p=F.of(d,arguments),g={},y=0,v=".zoom-"+Xo.event.changedTouches[0].identifier,b="touchmove"+v,_="touchend"+v,x=[],k=Xo.select(d),E=$();z.call(d),n(),o(p),k.on(M,null).on(T,n)}function h(){var t=F.of(this,arguments);y?clearTimeout(y):(d=e(p=g||Xo.mouse(this)),z.call(this),o(t)),y=setTimeout(function(){y=null,s(t)},50),w(),r(Math.pow(2,.002*Ru())*A.k),i(p,d),u(t)}function f(){var t=F.of(this,arguments),n=Xo.mouse(this),a=e(n),c=Math.log(A.k)/Math.LN2;o(t),r(Math.pow(2,Xo.event.shiftKey?Math.ceil(c)-1:Math.floor(c)+1)),i(n,a),u(t),s(t)}var d,p,g,y,m,v,b,_,x,A={x:0,y:0,k:1},E=[960,500],D=Pu,M="mousedown.zoom",S="mousemove.zoom",C="mouseup.zoom",T="touchstart.zoom",F=k(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=F.of(this,arguments),e=A;Tc?Xo.select(this).transition().each("start.zoom",function(){A=this.__chart__||{x:0,y:0,k:1},o(t)}).tween("zoom:zoom",function(){var n=E[0],r=E[1],i=n/2,a=r/2,o=Xo.interpolateZoom([(i-A.x)/A.k,(a-A.y)/A.k,n/A.k],[(i-e.x)/e.k,(a-e.y)/e.k,n/e.k]);return function(e){var r=o(e),s=n/r[2];this.__chart__=A={x:i-r[0]*s,y:a-r[1]*s,k:s},u(t)}}).each("end.zoom",function(){s(t)}):(this.__chart__=A,o(t),u(t),s(t))})},t.translate=function(e){return arguments.length?(A={x:+e[0],y:+e[1],k:A.k},a(),t):[A.x,A.y]},t.scale=function(e){return arguments.length?(A={x:A.x,y:A.y,k:+e},a(),t):A.k},t.scaleExtent=function(e){return arguments.length?(D=null==e?Pu:[+e[0],+e[1]],t):D},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(E=e&&[+e[0],+e[1]],t):E},t.x=function(e){return arguments.length?(b=e,v=e.copy(),A={x:0,y:0,k:1},t):b},t.y=function(e){return arguments.length?(x=e,_=e.copy(),A={x:0,y:0,k:1},t):x},Xo.rebind(t,F,"on")};var Ru,Pu=[0,1/0],Uu="onwheel"in Qo?(Ru=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Qo?(Ru=function(){return Xo.event.wheelDelta},"mousewheel"):(Ru=function(){return-Xo.event.detail},"MozMousePixelScroll");Xo.color=oe,oe.prototype.toString=function(){return this.rgb()+""},Xo.hsl=ue;var Yu=ue.prototype=new oe;Yu.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,this.l/t)},Yu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,t*this.l)},Yu.rgb=function(){return se(this.h,this.s,this.l)},Xo.hcl=ce;var ju=ce.prototype=new oe;ju.brighter=function(t){return new ce(this.h,this.c,Math.min(100,this.l+zu*(arguments.length?t:1)))},ju.darker=function(t){return new ce(this.h,this.c,Math.max(0,this.l-zu*(arguments.length?t:1)))},ju.rgb=function(){return le(this.h,this.c,this.l).rgb()},Xo.lab=he;var zu=18,Vu=.95047,Hu=1,Gu=1.08883,$u=he.prototype=new oe;$u.brighter=function(t){return new he(Math.min(100,this.l+zu*(arguments.length?t:1)),this.a,this.b)},$u.darker=function(t){return new he(Math.max(0,this.l-zu*(arguments.length?t:1)),this.a,this.b)},$u.rgb=function(){return fe(this.l,this.a,this.b)},Xo.rgb=me;var Wu=me.prototype=new oe;Wu.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new me(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new me(i,i,i)},Wu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new me(t*this.r,t*this.g,t*this.b)},Wu.hsl=function(){return we(this.r,this.g,this.b)},Wu.toString=function(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)};var Zu=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Zu.forEach(function(t,e){Zu.set(t,ve(e))}),Xo.functor=De,Xo.xhr=Se(Me),Xo.dsv=function(t,e){function n(t,n,a){arguments.length<3&&(a=n,n=null);var o=Ce(t,e,null==n?r:i(n),a);return o.row=function(t){return arguments.length?o.response(null==(n=t)?r:i(t)):n},o}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function a(e){return e.map(o).join(t)}function o(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i})},n.parseRows=function(t,e){function n(){if(l>=c)return o;if(i)return i=!1,a;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++l;){var r=t.charCodeAt(l++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(l)&&(++l,++u);else if(r!==s)continue;return t.slice(e,l-u)}return t.slice(e)}for(var r,i,a={},o={},u=[],c=t.length,l=0,h=0;(r=n())!==o;){for(var f=[];r!==a&&r!==o;)f.push(r),r=n();e&&null==(f=e(f,h++))||u.push(f)}return u},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new y,i=[];return e.forEach(function(t){for(var e in t)r.has(e)||i.push(r.add(e))}),[i.map(o).join(t)].concat(e.map(function(e){return i.map(function(t){return o(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(a).join("\n")},n},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv(" ","text/tab-separated-values");var Xu,Ku,Ju,Qu,ts,es=eu[v(eu,"requestAnimationFrame")]||function(t){setTimeout(t,17)};Xo.timer=function(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i=n+e,a={c:t,t:i,f:!1,n:null};Ku?Ku.n=a:Xu=a,Ku=a,Ju||(Qu=clearTimeout(Qu),Ju=1,es(Le))},Xo.timer.flush=function(){Be(),Ne()},Xo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var ns=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ie);Xo.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=Xo.round(t,Oe(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ns[8+n/3]};var rs=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,is=Xo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Xo.round(t,Oe(t,e))).toFixed(Math.max(0,Math.min(20,Oe(t*(1+1e-15),e))))}}),as=Xo.time={},os=Date;Pe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){us.setUTCDate.apply(this._,arguments)},setDay:function(){us.setUTCDay.apply(this._,arguments)},setFullYear:function(){us.setUTCFullYear.apply(this._,arguments)},setHours:function(){us.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){us.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){us.setUTCMinutes.apply(this._,arguments)},setMonth:function(){us.setUTCMonth.apply(this._,arguments)},setSeconds:function(){us.setUTCSeconds.apply(this._,arguments)},setTime:function(){us.setTime.apply(this._,arguments)}};var us=Date.prototype;as.year=Ue(function(t){return t=as.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),as.years=as.year.range,as.years.utc=as.year.utc.range,as.day=Ue(function(t){var e=new os(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),as.days=as.day.range,as.days.utc=as.day.utc.range,as.dayOfYear=function(t){var e=as.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=as[t]=Ue(function(t){return(t=as.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});as[t+"s"]=n.range,as[t+"s"].utc=n.utc.range,as[t+"OfYear"]=function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)}}),as.week=as.sunday,as.weeks=as.sunday.range,as.weeks.utc=as.sunday.utc.range,as.weekOfYear=as.sundayOfYear;var ss={"-":"",_:" ",0:"0"},cs=/^\s*\d+/,ls=/^%/;Xo.locale=function(t){return{numberFormat:qe(t),timeFormat:je(t)}};var hs=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=hs.numberFormat,Xo.geo={},ln.prototype={s:0,t:0,add:function(t){hn(t,this.t,fs),hn(fs.s,this.s,this),this.s?this.t+=fs.t:this.s=fs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var fs=new ln;Xo.geo.stream=function(t,e){t&&ds.hasOwnProperty(t.type)?ds[t.type](t,e):fn(t,e)};var ds={Feature:function(t,e){fn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rt?4*Su+t:t,ms.lineStart=ms.lineEnd=ms.point=b}};Xo.geo.bounds=function(){function t(t,e){b.push(_=[l=t,f=t]),h>e&&(h=e),e>d&&(d=e)}function e(e,n){var r=yn([e*Bu,n*Bu]);if(m){var i=vn(m,r),a=[i[1],-i[0],0],o=vn(a,i);xn(o),o=wn(o);var s=e-p,c=s>0?1:-1,g=o[0]*Nu*c,y=lu(s)>180;if(y^(g>c*p&&c*e>g)){var v=o[1]*Nu;v>d&&(d=v)}else if(g=(g+360)%360-180,y^(g>c*p&&c*e>g)){var v=-o[1]*Nu;h>v&&(h=v)}else h>n&&(h=n),n>d&&(d=n);y?p>e?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e):f>=l?(l>e&&(l=e),e>f&&(f=e)):e>p?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e)}else t(e,n);m=r,p=e}function n(){x.point=e}function r(){_[0]=l,_[1]=f,x.point=t,m=null}function i(t,n){if(m){var r=t-p;v+=lu(r)>180?r+(r>0?360:-360):r}else g=t,y=n;ms.point(t,n),e(t,n)}function a(){ms.lineStart()}function o(){i(g,y),ms.lineEnd(),lu(v)>Fu&&(l=-(f=180)),_[0]=l,_[1]=f,m=null +}function u(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tys?(l=-(f=180),h=-(d=90)):v>Fu?d=90:-Fu>v&&(h=-90),_[0]=l,_[1]=f}};return function(t){d=f=-(l=h=1/0),b=[],Xo.geo.stream(t,x);var e=b.length;if(e){b.sort(s);for(var n,r=1,i=b[0],a=[i];e>r;++r)n=b[r],c(n[0],i)||c(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(var o,n,p=-1/0,e=a.length-1,r=0,i=a[e];e>=r;i=n,++r)n=a[r],(o=u(i[1],n[0]))>p&&(p=o,l=n[0],f=i[1])}return b=_=null,1/0===l||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[l,h],[f,d]]}}(),Xo.geo.centroid=function(t){vs=bs=_s=xs=ws=As=ks=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,Cs);var e=Ds,n=Ms,r=Ss,i=e*e+n*n+r*r;return Lu>i&&(e=As,n=ks,r=Es,Fu>bs&&(e=_s,n=xs,r=ws),i=e*e+n*n+r*r,Lu>i)?[0/0,0/0]:[Math.atan2(n,e)*Nu,ee(r/Math.sqrt(i))*Nu]};var vs,bs,_s,xs,ws,As,ks,Es,Ds,Ms,Ss,Cs={sphere:b,point:kn,lineStart:Dn,lineEnd:Mn,polygonStart:function(){Cs.lineStart=Sn},polygonEnd:function(){Cs.lineStart=Dn}},Ts=Bn(Cn,qn,Pn,[-Su,-Su/2]),Fs=1e9;Xo.geo.clipExtent=function(){var t,e,n,r,i,a,o={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(u){return arguments.length?(a=zn(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[n,r]]}};return o.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return Hn(Gn)}).raw=Gn,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function t(t){var a=t[0],o=t[1];return e=null,n(a,o),e||(r(a,o),e)||i(a,o),e}var e,n,r,i,a=Xo.geo.albers(),o=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:a).invert(t)},t.stream=function(t){var e=a.stream(t),n=o.stream(t),r=u.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),u.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),u.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var c=a.scale(),l=+e[0],h=+e[1];return n=a.translate(e).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(s).point,r=o.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+Fu,h+.12*c+Fu],[l-.214*c-Fu,h+.234*c-Fu]]).stream(s).point,i=u.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+Fu,h+.166*c+Fu],[l-.115*c-Fu,h+.234*c-Fu]]).stream(s).point,t},t.scale(1070)};var Ls,Bs,Ns,Os,Is,qs,Rs={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Bs=0,Rs.lineStart=$n},polygonEnd:function(){Rs.lineStart=Rs.lineEnd=Rs.point=b,Ls+=lu(Bs/2)}},Ps={point:Wn,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Us={point:Kn,lineStart:Jn,lineEnd:Qn,polygonStart:function(){Us.lineStart=tr},polygonEnd:function(){Us.point=Kn,Us.lineStart=Jn,Us.lineEnd=Qn}};Xo.geo.path=function(){function t(t){return t&&("function"==typeof u&&a.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(a)),Xo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var n,r,i,a,o,u=4.5;return t.area=function(t){return Ls=0,Xo.geo.stream(t,i(Rs)),Ls},t.centroid=function(t){return _s=xs=ws=As=ks=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,i(Us)),Ss?[Ds/Ss,Ms/Ss]:Es?[As/Es,ks/Es]:ws?[_s/ws,xs/ws]:[0/0,0/0]},t.bounds=function(t){return Is=qs=-(Ns=Os=1/0),Xo.geo.stream(t,i(Ps)),[[Ns,Os],[Is,qs]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||rr(t):Me,e()):n},t.context=function(t){return arguments.length?(a=null==(r=t)?new Zn:new er(t),"function"!=typeof u&&a.pointRadius(u),e()):r},t.pointRadius=function(e){return arguments.length?(u="function"==typeof e?e:(a.pointRadius(+e),+e),t):u},t.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(t){return{stream:function(e){var n=new ir(e);for(var r in t)n[r]=t[r];return n}}},ir.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=or,Xo.geo.projectionMutator=ur,(Xo.geo.equirectangular=function(){return or(cr)}).raw=cr.invert=cr,Xo.geo.rotation=function(t){function e(e){return e=t(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e}return t=hr(t[0]%360*Bu,t[1]*Bu,t.length>2?t[2]*Bu:0),e.invert=function(e){return e=t.invert(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e},e},lr.invert=cr,Xo.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=hr(-t[0]*Bu,-t[1]*Bu,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=Nu,t[1]*=Nu}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=gr((e=+r)*Bu,i*Bu),t):e},t.precision=function(r){return arguments.length?(n=gr(e*Bu,(i=+r)*Bu),t):i},t.angle(90)},Xo.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Bu,i=t[1]*Bu,a=e[1]*Bu,o=Math.sin(r),u=Math.cos(r),s=Math.sin(i),c=Math.cos(i),l=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((n=h*o)*n+(n=c*l-s*h*u)*n),s*l+c*h*u)},Xo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Xo.range(Math.ceil(a/y)*y,i,y).map(f).concat(Xo.range(Math.ceil(c/m)*m,s,m).map(d)).concat(Xo.range(Math.ceil(r/p)*p,n,p).filter(function(t){return lu(t%y)>Fu}).map(l)).concat(Xo.range(Math.ceil(u/g)*g,o,g).filter(function(t){return lu(t%m)>Fu}).map(h))}var n,r,i,a,o,u,s,c,l,h,f,d,p=10,g=p,y=90,m=360,v=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(s).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],c=+e[0][1],s=+e[1][1],a>i&&(e=a,a=i,i=e),c>s&&(e=c,c=s,s=e),t.precision(v)):[[a,c],[i,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),u>o&&(e=u,u=o,o=e),t.precision(v)):[[r,u],[n,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(y=+e[0],m=+e[1],t):[y,m]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(v=+e,l=mr(u,o,90),h=vr(r,n,v),f=mr(c,s,90),d=vr(a,i,v),t):v},t.majorExtent([[-180,-90+Fu],[180,90-Fu]]).minorExtent([[-180,-80-Fu],[180,80+Fu]])},Xo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=br,i=_r;return t.distance=function(){return Xo.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},Xo.geo.interpolate=function(t,e){return xr(t[0]*Bu,t[1]*Bu,e[0]*Bu,e[1]*Bu)},Xo.geo.length=function(t){return Ys=0,Xo.geo.stream(t,js),Ys};var Ys,js={sphere:b,point:b,lineStart:wr,lineEnd:b,polygonStart:b,polygonEnd:b},zs=Ar(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Xo.geo.azimuthalEqualArea=function(){return or(zs)}).raw=zs;var Vs=Ar(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},Me);(Xo.geo.azimuthalEquidistant=function(){return or(Vs)}).raw=Vs,(Xo.geo.conicConformal=function(){return Hn(kr)}).raw=kr,(Xo.geo.conicEquidistant=function(){return Hn(Er)}).raw=Er;var Hs=Ar(function(t){return 1/t},Math.atan);(Xo.geo.gnomonic=function(){return or(Hs)}).raw=Hs,Dr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Tu]},(Xo.geo.mercator=function(){return Mr(Dr)}).raw=Dr;var Gs=Ar(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return or(Gs)}).raw=Gs;var $s=Ar(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Xo.geo.stereographic=function(){return or($s)}).raw=$s,Sr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Tu]},(Xo.geo.transverseMercator=function(){var t=Mr(Sr),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Sr,Xo.geom={},Xo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=De(n),a=De(r),o=t.length,u=[],s=[];for(e=0;o>e;e++)u.push([+i.call(this,t[e],e),+a.call(this,t[e],e),e]);for(u.sort(Lr),e=0;o>e;e++)s.push([u[e][0],-u[e][1]]);var c=Fr(u),l=Fr(s),h=l[0]===c[0],f=l[l.length-1]===c[c.length-1],d=[];for(e=c.length-1;e>=0;--e)d.push(t[u[c[e]][2]]);for(e=+h;e=r&&c.x<=a&&c.y>=i&&c.y<=o?[[r,o],[a,o],[a,i],[r,i]]:[];l.point=t[u]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/Fu)*Fu,y:Math.round(o(t,e)/Fu)*Fu,i:e}})}var r=Cr,i=Tr,a=r,o=i,u=nc;return t?e(t):(e.links=function(t){return ui(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ui(n(t)).cells.forEach(function(n,r){for(var i,a,o=n.site,u=n.edges.sort(Hr),s=-1,c=u.length,l=u[c-1].edge,h=l.l===o?l.r:l.l;++s=c,f=r>=l,d=(f<<1)+h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=fi()),h?i=c:u=c,f?o=l:s=l,a(t,e,n,r,i,o,u,s)}var l,h,f,d,p,g,y,m,v,b=De(u),_=De(s);if(null!=e)g=e,y=n,m=r,v=i;else if(m=v=-(g=y=1/0),h=[],f=[],p=t.length,o)for(d=0;p>d;++d)l=t[d],l.xm&&(m=l.x),l.y>v&&(v=l.y),h.push(l.x),f.push(l.y);else for(d=0;p>d;++d){var x=+b(l=t[d],d),w=+_(l,d);g>x&&(g=x),y>w&&(y=w),x>m&&(m=x),w>v&&(v=w),h.push(x),f.push(w)}var A=m-g,k=v-y;A>k?v=y+A:m=g+k;var E=fi();if(E.add=function(t){a(E,t,+b(t,++d),+_(t,d),g,y,m,v)},E.visit=function(t){di(t,E,g,y,m,v)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=oc.get(n)||ac,r=uc.get(r)||Me,_i(r(n.apply(null,Ko.call(arguments,1))))},Xo.interpolateHcl=Bi,Xo.interpolateHsl=Ni,Xo.interpolateLab=Oi,Xo.interpolateRound=Ii,Xo.transform=function(t){var e=Qo.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new qi(n?n.matrix:sc)})(t)},qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sc={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Yi,Xo.layout={},Xo.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++nu*u/y){if(p>s){var c=e.charge/s;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&s&&p>s){var c=e.pointCharge/s;t.px-=a*c,t.py-=o*c}}return!e.charge}}function e(t){t.px=Xo.event.x,t.py=Xo.event.y,u.resume()}var n,r,i,a,o,u={},s=Xo.dispatch("start","tick","end"),c=[1,1],l=.9,h=cc,f=lc,d=-30,p=hc,g=.1,y=.64,m=[],v=[];return u.tick=function(){if((r*=.99)<.005)return s.end({type:"end",alpha:r=0}),!0;var e,n,u,h,f,p,y,b,_,x=m.length,w=v.length;for(n=0;w>n;++n)u=v[n],h=u.source,f=u.target,b=f.x-h.x,_=f.y-h.y,(p=b*b+_*_)&&(p=r*a[n]*((p=Math.sqrt(p))-i[n])/p,b*=p,_*=p,f.x-=b*(y=h.weight/(f.weight+h.weight)),f.y-=_*y,h.x+=b*(y=1-y),h.y+=_*y);if((y=r*g)&&(b=c[0]/2,_=c[1]/2,n=-1,y))for(;++n0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),Xo.timer(u.tick)),u):r},u.start=function(){function t(t,r){if(!n){for(n=new Array(s),u=0;s>u;++u)n[u]=[];for(u=0;c>u;++u){var i=v[u];n[i.source.index].push(i.target),n[i.target.index].push(i.source)}}for(var a,o=n[e],u=-1,c=o.length;++ue;++e)(r=m[e]).index=e,r.weight=0;for(e=0;l>e;++e)r=v[e],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(e=0;s>e;++e)r=m[e],isNaN(r.x)&&(r.x=t("x",p)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(e=0;l>e;++e)i[e]=+h.call(this,v[e],e);else for(e=0;l>e;++e)i[e]=h;if(a=[],"function"==typeof f)for(e=0;l>e;++e)a[e]=+f.call(this,v[e],e);else for(e=0;l>e;++e)a[e]=f;if(o=[],"function"==typeof d)for(e=0;s>e;++e)o[e]=+d.call(this,m[e],e);else for(e=0;s>e;++e)o[e]=d;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return n||(n=Xo.behavior.drag().origin(Me).on("dragstart.force",$i).on("drag.force",e).on("dragend.force",Wi)),arguments.length?void this.on("mouseover.force",Zi).on("mouseout.force",Xi).call(n):n},Xo.rebind(u,s,"on")};var cc=20,lc=1,hc=1/0;Xo.layout.hierarchy=function(){function t(i){var a,o=[i],u=[];for(i.depth=0;null!=(a=o.pop());)if(u.push(a),(c=n.call(t,a,a.depth))&&(s=c.length)){for(var s,c,l;--s>=0;)o.push(l=c[s]),l.parent=a,l.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(t,a,a.depth)||0),delete a.children;return ta(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),u}var e=ra,n=ea,r=na;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(Qi(e,function(t){t.children&&(t.value=0)}),ta(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},Xo.layout.partition=function(){function t(e,n,r,i){var a=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,a&&(o=a.length)){var o,u,s,c=-1;for(r=e.value?r/e.value:0;++cp;++p)for(i.call(t,c[0][p],g=y[p],l[0][p][1]),d=1;f>d;++d)i.call(t,c[d][p],g+=l[d-1][p][1],l[d][p][1]);return u}var e=Me,n=sa,r=ca,i=ua,a=aa,o=oa;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:dc.get(e)||sa,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:pc.get(e)||ca,t):r},t.x=function(e){return arguments.length?(a=e,t):a},t.y=function(e){return arguments.length?(o=e,t):o},t.out=function(e){return arguments.length?(i=e,t):i},t};var dc=Xo.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(la),a=t.map(ha),o=Xo.range(r).sort(function(t,e){return i[t]-i[e]}),u=0,s=0,c=[],l=[];for(e=0;r>e;++e)n=o[e],s>u?(u+=a[n],c.push(n)):(s+=a[n],l.push(n));return l.reverse().concat(c)},reverse:function(t){return Xo.range(t.length).reverse()},"default":sa}),pc=Xo.map({silhouette:function(t){var e,n,r,i=t.length,a=t[0].length,o=[],u=0,s=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>u&&(u=r),o.push(r)}for(n=0;a>n;++n)s[n]=(u-o[n])/2;return s},wiggle:function(t){var e,n,r,i,a,o,u,s,c,l=t.length,h=t[0],f=h.length,d=[];for(d[0]=s=c=0,n=1;f>n;++n){for(e=0,i=0;l>e;++e)i+=t[e][n][1];for(e=0,a=0,u=h[n][0]-h[n-1][0];l>e;++e){for(r=0,o=(t[e][n][1]-t[e][n-1][1])/(2*u);e>r;++r)o+=(t[r][n][1]-t[r][n-1][1])/u;a+=o*t[e][n][1]}d[n]=s-=i?a/i*u:0,c>s&&(c=s)}for(n=0;f>n;++n)d[n]-=c;return d},expand:function(t){var e,n,r,i=t.length,a=t[0].length,o=1/i,u=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=o}for(n=0;a>n;++n)u[n]=0;return u},zero:ca});Xo.layout.histogram=function(){function t(t,a){for(var o,u,s=[],c=t.map(n,this),l=r.call(this,c,a),h=i.call(this,l,c,a),a=-1,f=c.length,d=h.length-1,p=e?1:1/f;++a0)for(a=-1;++a=l[0]&&u<=l[1]&&(o=s[Xo.bisect(h,u,1,d)-1],o.y+=p,o.push(t[a]));return s}var e=!0,n=Number,r=ga,i=da;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=De(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return pa(t,e)}:De(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},Xo.layout.pack=function(){function t(t,a){var o=n.call(this,t,a),u=o[0],s=i[0],c=i[1],l=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(u.x=u.y=0,ta(u,function(t){t.r=+l(t.value)}),ta(u,_a),r){var h=r*(e?1:Math.max(2*u.r/s,2*u.r/c))/2;ta(u,function(t){t.r+=h}),ta(u,_a),ta(u,function(t){t.r-=h})}return Aa(u,s/2,c/2,e?1:1/Math.max(2*u.r/s,2*u.r/c)),o}var e,n=Xo.layout.hierarchy().sort(ya),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},Ji(t,n)},Xo.layout.tree=function(){function t(t,i){var l=o.call(this,t,i),h=l[0],f=e(h);if(ta(f,n),f.parent.m=-f.z,Qi(f,r),c)Qi(h,a);else{var d=h,p=h,g=h;Qi(h,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var y=u(d,p)/2-d.x,m=s[0]/(p.x+u(p,d)/2+y),v=s[1]/(g.depth||1);Qi(h,function(t){t.x=(t.x+y)*m,t.y=t.depth*v})}return l}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,a=e.children,o=0,u=a.length;u>o;++o)r.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){Ca(t);var a=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||n[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],c=i.m,l=a.m,h=o.m,f=s.m;o=Ma(o),i=Da(i),o&&i;)s=Da(s),a=Ma(a),a.a=t,r=o.z+h-i.z-c+u(o._,i._),r>0&&(Sa(Ta(o,t,n),t,r),c+=r,l+=r),h+=o.m,c+=i.m,f+=s.m,l+=a.m;o&&!Ma(a)&&(a.t=o,a.m+=h-l),i&&!Da(s)&&(s.t=i,s.m+=c-f,n=t)}return n}function a(t){t.x*=s[0],t.y=t.depth*s[1]}var o=Xo.layout.hierarchy().sort(null).value(null),u=Ea,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(u=e,t):u},t.size=function(e){return arguments.length?(c=null==(s=e)?a:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:a,t):c?s:null},Ji(t,o)},Xo.layout.cluster=function(){function t(t,a){var o,u=e.call(this,t,a),s=u[0],c=0;ta(s,function(t){var e=t.children;e&&e.length?(t.x=La(e),t.y=Fa(e)):(t.x=o?c+=n(t,o):0,t.y=0,o=t)});var l=Ba(s),h=Na(s),f=l.x-n(l,h)/2,d=h.x+n(h,l)/2;return ta(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(d-f)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var e=Xo.layout.hierarchy().sort(null).value(null),n=Ea,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},Ji(t,e)},Xo.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,a=t.length;++ie?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var a=n.children;if(a&&a.length){var o,u,s,c=h(n),l=[],f=a.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(f,c.dx*c.dy/n.value),l.area=0;(s=f.length)>0;)l.push(o=f[s-1]),l.area+=o.area,"squarify"!==d||(u=r(l,g))<=p?(f.pop(),p=u):(l.area-=l.pop().area,i(l,g,c,!1),g=Math.min(c.dx,c.dy),l.length=l.area=0,p=1/0);l.length&&(i(l,g,c,!0),l.length=l.area=0),a.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var a,o=h(e),u=r.slice(),s=[];for(t(u,o.dx*o.dy/e.value),s.area=0;a=u.pop();)s.push(a),s.area+=a.area,null!=a.z&&(i(s,a.z?o.dx:o.dy,o,!u.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,a=1/0,o=-1,u=t.length;++on&&(a=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*p/r,r/(e*a*p)):1/0}function i(t,e,n,r){var i,a=-1,o=t.length,u=n.x,c=n.y,l=e?s(t.area/e):0;if(e==n.dx){for((r||l>n.dy)&&(l=n.dy);++an.dx)&&(l=n.dx);++an&&(e=1),1>n&&(t=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=Xo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},Xo.scale={};var gc={floor:Me,ceil:Me};Xo.scale.linear=function(){return za([0,1],[0,1],vi,!1)};var yc={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return Ka(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var mc=Xo.format(".0e"),vc={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Xo.scale.pow=function(){return Ja(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return to([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(bc)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(_c)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(xc)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(wc)};var bc=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(be),_c=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(be),xc=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(be),wc=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(be); +Xo.scale.quantile=function(){return eo([],[])},Xo.scale.quantize=function(){return no(0,1,[0,1])},Xo.scale.threshold=function(){return ro([.5],[0,1])},Xo.scale.identity=function(){return io([0,1])},Xo.svg={},Xo.svg.arc=function(){function t(){var t=e.apply(this,arguments),a=n.apply(this,arguments),o=r.apply(this,arguments)+Ac,u=i.apply(this,arguments)+Ac,s=(o>u&&(s=o,o=u,u=s),u-o),c=Su>s?"0":"1",l=Math.cos(o),h=Math.sin(o),f=Math.cos(u),d=Math.sin(u);return s>=kc?t?"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z":t?"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L"+t*f+","+t*d+"A"+t+","+t+" 0 "+c+",0 "+t*l+","+t*h+"Z":"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L0,0Z"}var e=ao,n=oo,r=uo,i=so;return t.innerRadius=function(n){return arguments.length?(e=De(n),t):e},t.outerRadius=function(e){return arguments.length?(n=De(e),t):n},t.startAngle=function(e){return arguments.length?(r=De(e),t):r},t.endAngle=function(e){return arguments.length?(i=De(e),t):i},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,a=(r.apply(this,arguments)+i.apply(this,arguments))/2+Ac;return[Math.cos(a)*t,Math.sin(a)*t]},t};var Ac=-Tu,kc=Cu-Fu;Xo.svg.line=function(){return co(Me)};var Ec=Xo.map({linear:lo,"linear-closed":ho,step:fo,"step-before":po,"step-after":go,basis:xo,"basis-open":wo,"basis-closed":Ao,bundle:ko,cardinal:vo,"cardinal-open":yo,"cardinal-closed":mo,monotone:To});Ec.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Dc=[0,2/3,1/3,0],Mc=[0,1/3,2/3,0],Sc=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var t=co(Fo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},po.reverse=go,go.reverse=po,Xo.svg.area=function(){return Lo(Me)},Xo.svg.area.radial=function(){var t=Lo(Fo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Xo.svg.chord=function(){function t(t,u){var s=e(this,a,t,u),c=e(this,o,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(n(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),a=u.call(t,i,r),o=s.call(t,i,r)+Ac,l=c.call(t,i,r)+Ac;return{r:a,a0:o,a1:l,p0:[a*Math.cos(o),a*Math.sin(o)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function r(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Su)+",1 "+e}function i(t,e,n,r){return"Q 0,0 "+r}var a=br,o=_r,u=Bo,s=uo,c=so;return t.radius=function(e){return arguments.length?(u=De(e),t):u},t.source=function(e){return arguments.length?(a=De(e),t):a},t.target=function(e){return arguments.length?(o=De(e),t):o},t.startAngle=function(e){return arguments.length?(s=De(e),t):s},t.endAngle=function(e){return arguments.length?(c=De(e),t):c},t},Xo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=n.call(this,t,i),u=(a.y+o.y)/2,s=[a,{x:a.x,y:u},{x:o.x,y:u},o];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=br,n=_r,r=No;return t.source=function(n){return arguments.length?(e=De(n),t):e},t.target=function(e){return arguments.length?(n=De(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},Xo.svg.diagonal.radial=function(){var t=Xo.svg.diagonal(),e=No,n=t.projection;return t.projection=function(t){return arguments.length?n(Oo(e=t)):e},t},Xo.svg.symbol=function(){function t(t,r){return(Cc.get(e.call(this,t,r))||Ro)(n.call(this,t,r))}var e=qo,n=Io;return t.type=function(n){return arguments.length?(e=De(n),t):e},t.size=function(e){return arguments.length?(n=De(e),t):n},t};var Cc=Xo.map({circle:Ro,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Bc)),n=e*Bc;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});Xo.svg.symbolTypes=Cc.keys();var Tc,Fc,Lc=Math.sqrt(3),Bc=Math.tan(30*Bu),Nc=[],Oc=0;Nc.call=_u.call,Nc.empty=_u.empty,Nc.node=_u.node,Nc.size=_u.size,Xo.transition=function(t){return arguments.length?Tc?t.transition():t:Au.transition()},Xo.transition.prototype=Nc,Nc.select=function(t){var e,n,r,i=this.id,a=[];t=D(t);for(var o=-1,u=this.length;++oa;a++){i.push(e=[]);for(var n=this[a],u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return Po(i,this.id)},Nc.tween=function(t,e){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(t):U(this,null==e?function(e){e.__transition__[n].tween.remove(t)}:function(r){r.__transition__[n].tween.set(t,e)})},Nc.attr=function(t,e){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(u);return n!==t&&(e=o(n,t),function(t){this.setAttribute(u,e(t))})})}function a(t){return null==t?r:(t+="",function(){var e,n=this.getAttributeNS(u.space,u.local);return n!==t&&(e=o(n,t),function(t){this.setAttributeNS(u.space,u.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var o="transform"==t?Yi:vi,u=Xo.ns.qualify(t);return Uo(this,"attr."+t,e,u.local?a:i)},Nc.attrTween=function(t,e){function n(t,n){var r=e.call(this,t,n,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,n){var r=e.call(this,t,n,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=Xo.ns.qualify(t);return this.tween("attr."+t,i.local?r:n)},Nc.style=function(t,e,n){function r(){this.style.removeProperty(t)}function i(e){return null==e?r:(e+="",function(){var r,i=eu.getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=vi(i,e),function(e){this.style.setProperty(t,r(e),n)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Uo(this,"style."+t,e,i)},Nc.styleTween=function(t,e,n){function r(r,i){var a=e.call(this,r,i,eu.getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,r)},Nc.text=function(t){return Uo(this,"text",t,Yo)},Nc.remove=function(){return this.each("end.transition",function(){var t;this.__transition__.count<2&&(t=this.parentNode)&&t.removeChild(this)})},Nc.ease=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].ease:("function"!=typeof t&&(t=Xo.ease.apply(Xo,arguments)),U(this,function(n){n.__transition__[e].ease=t}))},Nc.delay=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].delay:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].delay=+t.call(n,n.__data__,r,i)}:(t=+t,function(n){n.__transition__[e].delay=t}))},Nc.duration=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].duration:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].duration=Math.max(1,t.call(n,n.__data__,r,i))}:(t=Math.max(1,t),function(n){n.__transition__[e].duration=t}))},Nc.each=function(t,e){var n=this.id;if(arguments.length<2){var r=Fc,i=Tc;Tc=n,U(this,function(e,r,i){Fc=e.__transition__[n],t.call(e,e.__data__,r,i)}),Fc=r,Tc=i}else U(this,function(r){var i=r.__transition__[n];(i.event||(i.event=Xo.dispatch("start","end"))).on(t,e)});return this},Nc.transition=function(){for(var t,e,n,r,i=this.id,a=++Oc,o=[],u=0,s=this.length;s>u;u++){o.push(t=[]);for(var e=this[u],c=0,l=e.length;l>c;c++)(n=e[c])&&(r=Object.create(n.__transition__[i]),r.delay+=r.duration,jo(n,c,a,r)),t.push(n)}return Po(o,a)},Xo.svg.axis=function(){function t(t){t.each(function(){var t,c=Xo.select(this),l=this.__chart__||n,h=this.__chart__=n.copy(),f=null==s?h.ticks?h.ticks.apply(h,u):h.domain():s,d=null==e?h.tickFormat?h.tickFormat.apply(h,u):Me:e,p=c.selectAll(".tick").data(f,h),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Fu),y=Xo.transition(p.exit()).style("opacity",Fu).remove(),m=Xo.transition(p.order()).style("opacity",1),v=Math.max(i,0)+o,b=Ra(h),_=c.selectAll(".domain").data([0]),x=(_.enter().append("path").attr("class","domain"),Xo.transition(_));g.append("line"),g.append("text");var w,A,k,E,D=g.select("line"),M=m.select("line"),S=p.select("text").text(d),C=g.select("text"),T=m.select("text"),F="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=zo,w="x",k="y",A="x2",E="y2",S.attr("dy",0>F?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+b[0]+","+F*a+"V0H"+b[1]+"V"+F*a)):(t=Vo,w="y",k="x",A="y2",E="x2",S.attr("dy",".32em").style("text-anchor",0>F?"end":"start"),x.attr("d","M"+F*a+","+b[0]+"H0V"+b[1]+"H"+F*a)),D.attr(E,F*i),C.attr(k,F*v),M.attr(A,0).attr(E,F*i),T.attr(w,0).attr(k,F*v),h.rangeBand){var L=h,B=L.rangeBand()/2;l=h=function(t){return L(t)+B}}else l.rangeBand?l=h:y.call(t,h,l);g.call(t,l,h),m.call(t,h,h)})}var e,n=Xo.scale.linear(),r=Ic,i=6,a=6,o=3,u=[10],s=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in qc?e+"":Ic,t):r},t.ticks=function(){return arguments.length?(u=arguments,t):u},t.tickValues=function(e){return arguments.length?(s=e,t):s},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,a=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(a=+e,t):a},t.tickPadding=function(e){return arguments.length?(o=+e,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Ic="bottom",qc={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function t(a){a.each(function(){var a=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=a.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),a.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=a.selectAll(".resize").data(p,Me);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Rc[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var l,h=Xo.transition(a),f=Xo.transition(o);s&&(l=Ra(s),f.attr("x",l[0]).attr("width",l[1]-l[0]),n(h)),c&&(l=Ra(c),f.attr("y",l[0]).attr("height",l[1]-l[0]),r(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+l[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",l[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==Xo.event.keyCode&&(S||(v=null,T[0]-=l[1],T[1]-=h[1],S=2),w())}function p(){32==Xo.event.keyCode&&2==S&&(T[0]+=l[1],T[1]+=h[1],S=0,w())}function g(){var t=Xo.mouse(_),i=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(Xo.event.altKey?(v||(v=[(l[0]+l[1])/2,(h[0]+h[1])/2]),T[0]=l[+(t[0]p?(i=r,r=p):i=p),g[0]!=r||g[1]!=i?(n?o=null:a=null,g[0]=r,g[1]=i,!0):void 0}function m(){g(),k.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),Xo.select("body").style("cursor",null),F.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),A({type:"brushend"})}var v,b,_=this,x=Xo.select(Xo.event.target),A=u.of(_,arguments),k=Xo.select(_),E=x.datum(),D=!/^(n|s)$/.test(E)&&s,M=!/^(e|w)$/.test(E)&&c,S=x.classed("extent"),C=$(),T=Xo.mouse(_),F=Xo.select(eu).on("keydown.brush",i).on("keyup.brush",p);if(Xo.event.changedTouches?F.on("touchmove.brush",g).on("touchend.brush",m):F.on("mousemove.brush",g).on("mouseup.brush",m),k.interrupt().selectAll("*").interrupt(),S)T[0]=l[0]-T[0],T[1]=h[0]-T[1];else if(E){var L=+/w$/.test(E),B=+/^n/.test(E);b=[l[1-L]-T[0],h[1-B]-T[1]],T[0]=l[L],T[1]=h[B]}else Xo.event.altKey&&(v=T.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",x.style("cursor")),A({type:"brushstart"}),g()}var a,o,u=k(t,"brushstart","brush","brushend"),s=null,c=null,l=[0,0],h=[0,0],f=!0,d=!0,p=Pc[0];return t.event=function(t){t.each(function(){var t=u.of(this,arguments),e={x:l,y:h,i:a,j:o},n=this.__chart__||e;this.__chart__=e,Tc?Xo.select(this).transition().each("start.brush",function(){a=n.i,o=n.j,l=n.x,h=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=bi(l,e.x),r=bi(h,e.y);return a=o=null,function(i){l=e.x=n(i),h=e.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=e.i,o=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(s=e,p=Pc[!s<<1|!c],t):s},t.y=function(e){return arguments.length?(c=e,p=Pc[!s<<1|!c],t):c},t.clamp=function(e){return arguments.length?(s&&c?(f=!!e[0],d=!!e[1]):s?f=!!e:c&&(d=!!e),t):s&&c?[f,d]:s?f:c?d:null},t.extent=function(e){var n,r,i,u,f;return arguments.length?(s&&(n=e[0],r=e[1],c&&(n=n[0],r=r[0]),a=[n,r],s.invert&&(n=s(n),r=s(r)),n>r&&(f=n,n=r,r=f),(n!=l[0]||r!=l[1])&&(l=[n,r])),c&&(i=e[0],u=e[1],s&&(i=i[1],u=u[1]),o=[i,u],c.invert&&(i=c(i),u=c(u)),i>u&&(f=i,i=u,u=f),(i!=h[0]||u!=h[1])&&(h=[i,u])),t):(s&&(a?(n=a[0],r=a[1]):(n=l[0],r=l[1],s.invert&&(n=s.invert(n),r=s.invert(r)),n>r&&(f=n,n=r,r=f))),c&&(o?(i=o[0],u=o[1]):(i=h[0],u=h[1],c.invert&&(i=c.invert(i),u=c.invert(u)),i>u&&(f=i,i=u,u=f))),s&&c?[[n,i],[r,u]]:s?[n,r]:c&&[i,u])},t.clear=function(){return t.empty()||(l=[0,0],h=[0,0],a=o=null),t},t.empty=function(){return!!s&&l[0]==l[1]||!!c&&h[0]==h[1]},Xo.rebind(t,u,"on")};var Rc={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Pc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Uc=as.format=hs.timeFormat,Yc=Uc.utc,jc=Yc("%Y-%m-%dT%H:%M:%S.%LZ");Uc.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ho:jc,Ho.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ho.toString=jc.toString,as.second=Ue(function(t){return new os(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),as.seconds=as.second.range,as.seconds.utc=as.second.utc.range,as.minute=Ue(function(t){return new os(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),as.minutes=as.minute.range,as.minutes.utc=as.minute.utc.range,as.hour=Ue(function(t){var e=t.getTimezoneOffset()/60;return new os(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),as.hours=as.hour.range,as.hours.utc=as.hour.utc.range,as.month=Ue(function(t){return t=as.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),as.months=as.month.range,as.months.utc=as.month.utc.range;var zc=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vc=[[as.second,1],[as.second,5],[as.second,15],[as.second,30],[as.minute,1],[as.minute,5],[as.minute,15],[as.minute,30],[as.hour,1],[as.hour,3],[as.hour,6],[as.hour,12],[as.day,1],[as.day,2],[as.week,1],[as.month,1],[as.month,3],[as.year,1]],Hc=Uc.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Cn]]),Gc={range:function(t,e,n){return Xo.range(Math.ceil(t/n)*n,+e,n).map($o)},floor:Me,ceil:Me};Vc.year=as.year,as.scale=function(){return Go(Xo.scale.linear(),Vc,Hc)};var $c=Vc.map(function(t){return[t[0].utc,t[1]]}),Wc=Yc.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Cn]]);$c.year=as.year.utc,as.scale.utc=function(){return Go(Xo.scale.linear(),$c,Wc)},Xo.text=Se(function(t){return t.responseText}),Xo.json=function(t,e){return Ce(t,"application/json",Wo,e)},Xo.html=function(t,e){return Ce(t,"text/html",Zo,e)},Xo.xml=Se(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof e&&e.exports&&(e.exports=Xo),this.d3=Xo}()},{}],2:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),dagre:t("./lib/dagre"),intersect:t("./lib/intersect"),render:t("./lib/render"),util:t("./lib/util"),version:t("./lib/version")}},{"./lib/dagre":9,"./lib/graphlib":10,"./lib/intersect":11,"./lib/render":24,"./lib/util":26,"./lib/version":27}],3:[function(t,e){function n(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function r(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function i(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}var a=t("./util");e.exports={"default":n,normal:n,vee:r,undirected:i}},{"./util":26}],4:[function(t,e){function n(t,e){var n=e.nodes().filter(function(t){return r.isSubgraph(e,t)}),i=t.selectAll("g.cluster").data(n,function(t){return t});i.enter().append("g").attr("class","cluster").style("opacity",0).append("rect"),r.applyTransition(i.exit(),e).style("opacity",0).remove(),r.applyTransition(i,e).style("opacity",1),r.applyTransition(i.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){var n=e.node(t);return n.x-n.width/2}).attr("y",function(t){var n=e.node(t);return n.y-n.height/2})}var r=t("./util");e.exports=n},{"./util":26}],5:[function(t,e){"use strict";function n(t,e){var n=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return n.selectAll("*").remove(),n.enter().append("g").classed("edgeLabel",!0).style("opacity",0),n.each(function(t){var n=e.edge(t),a=i(o.select(this),e.edge(t),0,0).classed("label",!0),u=a.node().getBBox();n.labelId&&a.attr("id",n.labelId),r.has(n,"width")||(n.width=u.width),r.has(n,"height")||(n.height=u.height)}),a.applyTransition(n.exit(),e).style("opacity",0).remove(),n}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],6:[function(t,e){"use strict";function n(t,e,n){var i=t.selectAll("g.edgePath").data(e.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return o(i,e),u(i,e),l.applyTransition(i,e).style("opacity",1),i.each(function(t){var n=h.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),l.applyClass(n,r["class"],(n.classed("update")?"update ":"")+"edgePath")}),i.selectAll("path.path").each(function(t){var n=e.edge(t);n.arrowheadId=s.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+n.arrowheadId+")"}).style("fill","none");l.applyTransition(i,e).attr("d",function(t){return r(e,t)}),l.applyStyle(i,n.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var r=e.edge(t),i=n[r.arrowhead];i(h.select(this),r.arrowheadId,r,"arrowhead")}),i}function r(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(c(r,o[0])),o.push(c(a,o[o.length-1])),i(n,o)}function i(t,e){var n=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return s.has(t,"lineInterpolate")&&n.interpolate(t.lineInterpolate),s.has(t,"lineTension")&&n.tension(Number(t.lineTension)),n(e)}function a(t){var e=t.getBBox(),n=t.getTransformToElement(t.ownerSVGElement).translate(e.width/2,e.height/2);return{x:n.e,y:n.f}}function o(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);n.append("path").attr("class","path").attr("d",function(t){var n=e.edge(t),r=e.node(t.v).elem,o=s.range(n.points.length).map(function(){return a(r)});return i(n,o)}),n.append("defs")}function u(t,e){var n=t.exit();l.applyTransition(n,e).style("opacity",0).remove(),l.applyTransition(n.select("path.path"),e).attr("d",function(t){var n=e.node(t.v);if(n){var r=s.range(this.pathSegList.length).map(function(){return n});return i({},r)}return h.select(this).attr("d")})}var s=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");e.exports=n},{"./d3":8,"./intersect/intersect-node":15,"./lodash":21,"./util":26}],7:[function(t,e){"use strict";function n(t,e,n){var u=e.nodes().filter(function(t){return!a.isSubgraph(e,t)}),s=t.selectAll("g.node").data(u,function(t){return t}).classed("update",!0);return s.selectAll("*").remove(),s.enter().append("g").attr("class","node").style("opacity",0),s.each(function(t){var u=e.node(t),s=o.select(this),c=s.append("g").attr("class","label"),l=i(c,u),h=n[u.shape],f=r.pick(l.node().getBBox(),"width","height");u.elem=this,u.id&&s.attr("id",u.id),u.labelId&&c.attr("id",u.labelId),a.applyClass(s,u["class"],(s.classed("update")?"update ":"")+"node"),r.has(u,"width")&&(f.width=u.width),r.has(u,"height")&&(f.height=u.height),f.width+=u.paddingLeft+u.paddingRight,f.height+=u.paddingTop+u.paddingBottom,c.attr("transform","translate("+(u.paddingLeft-u.paddingRight)/2+","+(u.paddingTop-u.paddingBottom)/2+")");var d=h(o.select(this),f,u);a.applyStyle(d,u.style);var p=d.node().getBBox();u.width=p.width,u.height=p.height}),a.applyTransition(s.exit(),e).style("opacity",0).remove(),s}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],8:[function(t,e){e.exports=window.d3},{}],9:[function(t,e){var n;if(t)try{n=t("dagre")}catch(r){}n||(n=window.dagre),e.exports=n},{dagre:28}],10:[function(t,e){var n;if(t)try{n=t("graphlib")}catch(r){}n||(n=window.graphlib),e.exports=n},{graphlib:58}],11:[function(t,e){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":12,"./intersect-ellipse":13,"./intersect-node":15,"./intersect-polygon":16,"./intersect-rect":17}],12:[function(t,e){function n(t,e,n){return r(t,e,e,n)}var r=t("./intersect-ellipse");e.exports=n},{"./intersect-ellipse":13}],13:[function(t,e){function n(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,u=a-r.y,s=Math.sqrt(e*e*u*u+n*n*o*o),c=Math.abs(e*n*o/s);r.xm?(m-y)/g:(m+y)/g,m=o*c-a*l,b=0>m?(m-y)/g:(m+y)/g,{x:v,y:b})}function r(t,e){return t*e>0}e.exports=n},{}],15:[function(t,e){function n(t,e){return t.intersect(e)}e.exports=n},{}],16:[function(t,e){function n(t,e,n){var i=t.x,a=t.y,o=[],u=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach(function(t){u=Math.min(u,t.x),s=Math.min(s,t.y)});for(var c=i-t.width/2-u,l=a-t.height/2-s,h=0;h1&&o.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,u=e.y-n.y,s=Math.sqrt(o*o+u*u);return s>a?-1:a===s?0:1}),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");e.exports=n},{"./intersect-line":14}],17:[function(t,e){function n(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,u=e.y-a,s=t.width/2,c=t.height/2;return Math.abs(u)*s>Math.abs(o)*c?(0>u&&(c=-c),n=0===u?0:c*o/u,r=c):(0>o&&(s=-s),n=s,r=0===o?0:s*u/o),{x:i+n,y:a+r}}e.exports=n},{}],18:[function(t,e){function n(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div"),a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o,u;return i.each(function(){o=this.clientWidth,u=this.clientHeight}),n.attr("width",o).attr("height",u),n}var r=t("../util");e.exports=n},{"../util":26}],19:[function(t,e){function n(t,e){var n=e.label,a=t.append("g");"string"!=typeof n||"html"===e.labelType?i(a,e):r(a,e);var o=a.node().getBBox();return a.attr("transform","translate("+-o.width/2+","+-o.height/2+")"),a}var r=t("./add-text-label"),i=t("./add-html-label");e.exports=n},{"./add-html-label":18,"./add-text-label":20}],20:[function(t,e){function n(t,e){for(var n=t.append("text"),a=r(e.label).split("\n"),o=0;ou;++u)r(t,"borderLeft","_bl",n,o,u),r(t,"borderRight","_br",n,o,u)}}i.each(t.children(),e)}function r(t,e,n,r,i,o){var u={width:0,height:0,rank:o},s=i[e][o-1],c=a.addDummyNode(t,"border",u,n);i[e][o]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var i=t("./lodash"),a=t("./util");e.exports=n},{"./lodash":37,"./util":56}],31:[function(t,e){"use strict";function n(t){var e=t.graph().rankdir.toLowerCase();("lr"===e||"rl"===e)&&i(t)}function r(t){var e=t.graph().rankdir.toLowerCase();("bt"===e||"rl"===e)&&o(t),("lr"===e||"rl"===e)&&(s(t),i(t))}function i(t){l.each(t.nodes(),function(e){a(t.node(e))}),l.each(t.edges(),function(e){a(t.edge(e))})}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){l.each(t.nodes(),function(e){u(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,u),l.has(n,"y")&&u(n)})}function u(t){t.y=-t.y}function s(t){l.each(t.nodes(),function(e){c(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,c),l.has(n,"x")&&c(n)})}function c(t){var e=t.x;t.x=t.y,t.y=e}var l=t("./lodash");e.exports={adjust:n,undo:r}},{"./lodash":37}],32:[function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){return"_next"!==t&&"_prev"!==t?e:void 0}e.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;return e!==t?(r(e),e):void 0},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},{}],33:[function(t,e){function n(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.each(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;e.exports={debugOrdering:n}},{"./graphlib":34,"./lodash":37,"./util":56}],34:[function(t,e){e.exports=t(10)},{graphlib:58}],35:[function(t,e){function n(t,e){if(t.nodeCount()<=1)return[];var n=a(t,e||l),i=r(n.graph,n.buckets,n.zeroIdx);return u.flatten(u.map(i,function(e){return t.outEdges(e.v,e.w)}),!0)}function r(t,e,n){for(var r,a=[],o=e[e.length-1],u=e[0];t.nodeCount();){for(;r=u.dequeue();)i(t,e,n,r);for(;r=o.dequeue();)i(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){a=a.concat(i(t,e,n,r,!0));break}}return a}function i(t,e,n,r,i){var a=i?[]:void 0;return u.each(t.inEdges(r.v),function(r){var u=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=u,o(e,n,s)}),u.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,u=t.node(a);u["in"]-=i,o(e,n,u)}),t.removeNode(r.v),a}function a(t,e){var n=new s,r=0,i=0;u.each(t.nodes(),function(t){n.setNode(t,{v:t,"in":0,out:0})}),u.each(t.edges(),function(t){var a=n.edge(t.v,t.w)||0,o=e(t),u=a+o;n.setEdge(t.v,t.w,u),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w)["in"]+=o)});var a=u.range(i+r+3).map(function(){return new c}),l=r+1;return u.each(n.nodes(),function(t){o(a,l,n.node(t))}),{graph:n,buckets:a,zeroIdx:l}}function o(t,e,n){n.out?n["in"]?t[n.out-n["in"]+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var u=t("./lodash"),s=t("./graphlib").Graph,c=t("./data/list");e.exports=n;var l=u.constant(1)},{"./data/list":32,"./graphlib":34,"./lodash":37}],36:[function(t,e){"use strict";function n(t,e){var n=e&&e.debugTiming?L.time:L.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return a(t)});n(" runLayout",function(){r(e,n)}),n(" updateInputGraph",function(){i(t,e)})})}function r(t,e){e(" makeSpaceForEdgeLabels",function(){o(t)}),e(" removeSelfEdges",function(){g(t)}),e(" acyclic",function(){x.run(t)}),e(" nestingGraph.run",function(){M.run(t)}),e(" rank",function(){A(L.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){u(t)}),e(" removeEmptyRanks",function(){D(t)}),e(" nestingGraph.cleanup",function(){M.cleanup(t)}),e(" normalizeRanks",function(){k(t)}),e(" assignRankMinMax",function(){s(t)}),e(" removeEdgeLabelProxies",function(){c(t)}),e(" normalize.run",function(){w.run(t)}),e(" parentDummyChains",function(){E(t)}),e(" addBorderSegments",function(){S(t)}),e(" order",function(){T(t)}),e(" insertSelfEdges",function(){y(t)}),e(" adjustCoordinateSystem",function(){C.adjust(t)}),e(" position",function(){F(t)}),e(" positionSelfEdges",function(){m(t)}),e(" removeBorderNodes",function(){p(t)}),e(" normalize.undo",function(){w.undo(t)}),e(" fixupEdgeLabelCoords",function(){f(t)}),e(" undoCoordinateSystem",function(){C.undo(t)}),e(" translateGraph",function(){l(t)}),e(" assignNodeIntersects",function(){h(t)}),e(" reversePoints",function(){d(t)}),e(" acyclic.undo",function(){x.undo(t)})}function i(t,e){_.each(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),_.each(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,_.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function a(t){var e=new B({multigraph:!0,compound:!0}),n=b(t.graph());return e.setGraph(_.merge({},O,v(n,N),_.pick(n,I))),_.each(t.nodes(),function(n){var r=b(t.node(n));e.setNode(n,_.defaults(v(r,q),R)),e.setParent(n,t.parent(n))}),_.each(t.edges(),function(n){var r=b(t.edge(n));e.setEdge(n,_.merge({},U,v(r,P),_.pick(r,Y)))}),e}function o(t){var e=t.graph();e.ranksep/=2,_.each(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function u(t){_.each(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-r.rank)/2+r.rank,e:e};L.addDummyNode(t,"edge-proxy",a,"_ep")}})}function s(t){var e=0;_.each(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=_.max(e,r.maxRank))}),t.graph().maxRank=e}function c(t){_.each(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function l(t){function e(t){var e=t.x,o=t.y,u=t.width,s=t.height;n=Math.min(n,e-u/2),r=Math.max(r,e+u/2),i=Math.min(i,o-s/2),a=Math.max(a,o+s/2)}var n=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),u=o.marginx||0,s=o.marginy||0;_.each(t.nodes(),function(n){e(t.node(n))}),_.each(t.edges(),function(n){var r=t.edge(n);_.has(r,"x")&&e(r)}),n-=u,i-=s,_.each(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),_.each(t.edges(),function(e){var r=t.edge(e);_.each(r.points,function(t){t.x-=n,t.y-=i}),_.has(r,"x")&&(r.x-=n),_.has(r,"y")&&(r.y-=i)}),o.width=r-n+u,o.height=a-i+s}function h(t){_.each(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(L.intersectRect(a,n)),i.points.push(L.intersectRect(o,r))})}function f(t){_.each(t.edges(),function(e){var n=t.edge(e);if(_.has(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function d(t){_.each(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function p(t){_.each(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(_.last(n.borderLeft)),o=t.node(_.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),_.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function g(t){_.each(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function y(t){var e=L.buildLayerMatrix(t);_.each(e,function(e){var n=0;_.each(e,function(e,r){var i=t.node(e);i.order=r+n,_.each(i.selfEdges,function(e){L.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}function m(t){_.each(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-u},{x:i+5*o/6,y:a-u},{x:i+o,y:a},{x:i+5*o/6,y:a+u},{x:i+2*o/3,y:a+u}],n.label.x=n.x,n.label.y=n.y}})}function v(t,e){return _.mapValues(_.pick(t,e),Number)}function b(t){var e={};return _.each(t,function(t,n){e[n.toLowerCase()]=t}),e}var _=t("./lodash"),x=t("./acyclic"),w=t("./normalize"),A=t("./rank"),k=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),D=t("./util").removeEmptyRanks,M=t("./nesting-graph"),S=t("./add-border-segments"),C=t("./coordinate-system"),T=t("./order"),F=t("./position"),L=t("./util"),B=t("./graphlib").Graph;e.exports=n;var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],q=["width","height"],R={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],U={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Y=["labelpos"]},{"./acyclic":29,"./add-border-segments":30,"./coordinate-system":31,"./graphlib":34,"./lodash":37,"./nesting-graph":38,"./normalize":39,"./order":44,"./parent-dummy-chains":49,"./position":51,"./rank":53,"./util":56}],37:[function(t,e){e.exports=t(21)},{lodash:82}],38:[function(t,e){function n(t){var e=s.addDummyNode(t,"root",{},"_root"),n=i(t),o=u.max(n)-1,c=2*o+1;t.graph().nestingRoot=e,u.each(t.edges(),function(e){t.edge(e).minlen*=c});var l=a(t)+1;u.each(t.children(),function(i){r(t,e,c,l,o,n,i)}),t.graph().nodeRankFactor=c}function r(t,e,n,i,a,o,c){var l=t.children(c);if(!l.length)return void(c!==e&&t.setEdge(e,c,{weight:0,minlen:n}));var h=s.addBorderNode(t,"_bt"),f=s.addBorderNode(t,"_bb"),d=t.node(c);t.setParent(h,c),d.borderTop=h,t.setParent(f,c),d.borderBottom=f,u.each(l,function(u){r(t,e,n,i,a,o,u);var s=t.node(u),l=s.borderTop?s.borderTop:u,d=s.borderBottom?s.borderBottom:u,p=s.borderTop?i:2*i,g=l!==d?1:a-o[c]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(c)||t.setEdge(e,h,{weight:0,minlen:a+o[c]})}function i(t){function e(r,i){var a=t.children(r);a&&a.length&&u.each(a,function(t){e(t,i+1)}),n[r]=i}var n={};return u.each(t.children(),function(t){e(t,1)}),n}function a(t){return u.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function o(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,u.each(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}var u=t("./lodash"),s=t("./util");e.exports={run:n,cleanup:o}},{"./lodash":37,"./util":56}],39:[function(t,e){"use strict";function n(t){t.graph().dummyChains=[],a.each(t.edges(),function(e){r(t,e)})}function r(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,u=e.name,s=t.edge(e),c=s.labelRank;if(a!==r+1){t.removeEdge(e);var l,h,f;for(f=0,++r;a>r;++f,++r)s.points=[],h={width:0,height:0,edgeLabel:s,edgeObj:e,rank:r},l=o.addDummyNode(t,"edge",h,"_d"),r===c&&(h.width=s.width,h.height=s.height,h.dummy="edge-label",h.labelpos=s.labelpos),t.setEdge(n,l,{weight:s.weight},u),0===f&&t.graph().dummyChains.push(l),n=l;t.setEdge(n,i,{weight:s.weight},u)}}function i(t){a.each(t.graph().dummyChains,function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}var a=t("./lodash"),o=t("./util");e.exports={run:n,undo:i}},{"./lodash":37,"./util":56}],40:[function(t,e){function n(t,e,n){var i,a={};r.each(n,function(n){for(var r,o,u=t.parent(n);u;){if(r=t.parent(u),r?(o=a[r],a[r]=u):(o=i,i=u),o&&o!==u)return void e.setEdge(o,u);u=r}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],41:[function(t,e){function n(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],42:[function(t,e){function n(t,e,n){var o=r(t),u=new a({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(e){return t.node(e)});return i.each(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(u.setNode(r),u.setParent(r,s||o),i.each(t[n](r),function(e){var n=e.v===r?e.w:e.v,a=u.edge(n,r),o=i.isUndefined(a)?0:a.weight;u.setEdge(n,r,{weight:t.edge(e).weight+o})}),i.has(a,"minRank")&&u.setNode(r,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),u}function r(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}var i=t("../lodash"),a=t("../graphlib").Graph;e.exports=n},{"../graphlib":34,"../lodash":37}],43:[function(t,e){"use strict";function n(t,e){for(var n=0,i=1;i0;)e%2&&(n+=s[e+1]),e=e-1>>1,s[e]+=t.weight;c+=t.weight*n})),c}var i=t("../lodash");e.exports=n},{"../lodash":37}],44:[function(t,e){"use strict";function n(t){var e=d.maxRank(t),n=r(t,o.range(1,e+1),"inEdges"),c=r(t,o.range(e-1,-1,-1),"outEdges"),l=u(t);a(t,l);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;4>g;++p,++g){i(p%2?n:c,p%4>=2),l=d.buildLayerMatrix(t);var y=s(t,l);f>y&&(g=0,h=o.cloneDeep(l),f=y)}a(t,h)}function r(t,e,n){return o.map(e,function(e){return l(t,e,n)})}function i(t,e){var n=new f;o.each(t,function(t){var r=t.graph().root,i=c(t,r,n,e);o.each(i.vs,function(e,n){t.node(e).order=n}),h(t,n,i.vs)})}function a(t,e){o.each(e,function(e){o.each(e,function(e,n){t.node(e).order=n})})}var o=t("../lodash"),u=t("./init-order"),s=t("./cross-count"),c=t("./sort-subgraph"),l=t("./build-layer-graph"),h=t("./add-subgraph-constraints"),f=t("../graphlib").Graph,d=t("../util");e.exports=n},{"../graphlib":34,"../lodash":37,"../util":56,"./add-subgraph-constraints":40,"./build-layer-graph":42,"./cross-count":43,"./init-order":45,"./sort-subgraph":47}],45:[function(t,e){"use strict";function n(t){function e(i){if(!r.has(n,i)){n[i]=!0;var a=t.node(i);o[a.rank].push(i),r.each(t.successors(i),e)}}var n={},i=r.filter(t.nodes(),function(e){return!t.children(e).length}),a=r.max(r.map(i,function(e){return t.node(e).rank})),o=r.map(r.range(a+1),function(){return[]}),u=r.sortBy(i,function(e){return t.node(e).rank});return r.each(u,e),o}var r=t("../lodash");e.exports=n},{"../lodash":37}],46:[function(t,e){"use strict";function n(t,e){var n={};a.each(t,function(t,e){var r=n[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:e};a.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.each(e.edges(),function(t){var e=n[t.v],r=n[t.w];a.isUndefined(e)||a.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))});var i=a.filter(n,function(t){return!t.indegree});return r(i)}function r(t){function e(t){return function(e){e.merged||(a.isUndefined(e.barycenter)||a.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&i(t,e)}}function n(e){return function(n){n["in"].push(e),0===--n.indegree&&t.push(n)}}for(var r=[];t.length;){var o=t.pop();r.push(o),a.each(o["in"].reverse(),e(o)),a.each(o.out,n(o))}return a.chain(r).filter(function(t){return!t.merged}).map(function(t){return a.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}var a=t("../lodash");e.exports=n},{"../lodash":37}],47:[function(t,e){function n(t,e,c,l){var h=t.children(e),f=t.node(e),d=f?f.borderLeft:void 0,p=f?f.borderRight:void 0,g={};d&&(h=a.filter(h,function(t){return t!==d&&t!==p}));var y=o(t,h);a.each(y,function(e){if(t.children(e.v).length){var r=n(t,e.v,c,l);g[e.v]=r,a.has(r,"barycenter")&&i(e,r)}});var m=u(y,c);r(m,g);var v=s(m,l);if(d&&(v.vs=a.flatten([d,v.vs,p],!0),t.predecessors(d).length)){var b=t.node(t.predecessors(d)[0]),_=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+_.order)/(v.weight+2),v.weight+=2}return v}function r(t,e){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}function i(t,e){a.isUndefined(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var a=t("../lodash"),o=t("./barycenter"),u=t("./resolve-conflicts"),s=t("./sort");e.exports=n},{"../lodash":37,"./barycenter":41,"./resolve-conflicts":46,"./sort":48}],48:[function(t,e){function n(t,e){var n=o.partition(t,function(t){return a.has(t,"barycenter")}),u=n.lhs,s=a.sortBy(n.rhs,function(t){return-t.i}),c=[],l=0,h=0,f=0;u.sort(i(!!e)),f=r(c,s,f),a.each(u,function(t){f+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=r(c,s,f)});var d={vs:a.flatten(c,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}function r(t,e,n){for(var r;e.length&&(r=a.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function i(t){return function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i}}var a=t("../lodash"),o=t("../util");e.exports=n},{"../lodash":37,"../util":56}],49:[function(t,e){function n(t){var e=i(t);a.each(t.graph().dummyChains,function(n){for(var i=t.node(n),a=i.edgeObj,o=r(t,e,a.v,a.w),u=o.path,s=o.lca,c=0,l=u[c],h=!0;n!==a.w;){if(i=t.node(n),h){for(;(l=u[c])!==s&&t.node(l).maxRanks||c>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)u.push(i);return{path:o.concat(u.reverse()),lca:a}}function i(t){function e(i){var o=r;a.each(t.children(i),e),n[i]={low:o,lim:r++}}var n={},r=0;return a.each(t.children(),e),n}var a=t("./lodash");e.exports=n},{"./lodash":37}],50:[function(t,e){"use strict";function n(t,e){function n(e,n){var o=0,u=0,s=e.length,c=y.last(n);return y.each(n,function(e,l){var h=i(t,e),f=h?t.node(h).order:s;(h||e===c)&&(y.each(n.slice(u,l+1),function(e){y.each(t.predecessors(e),function(n){var i=t.node(n),u=i.order;!(o>u||u>f)||i.dummy&&t.node(e).dummy||a(r,n,e)})}),u=l+1,o=f)}),n}var r={};return y.reduce(e,n),r}function r(t,e){function n(e,n,r,o,u){var s;y.each(y.range(n,r),function(n){s=e[n],t.node(s).dummy&&y.each(t.predecessors(s),function(e){var n=t.node(e);n.dummy&&(n.orderu)&&a(i,e,s)})})}function r(e,r){var i,a=-1,o=0;return y.each(r,function(u,s){if("border"===t.node(u).dummy){var c=t.predecessors(u);c.length&&(i=t.node(c[0]).order,n(r,o,s,a,i),o=s,a=i)}n(r,o,r.length,i,e.length)}),r}var i={};return y.reduce(e,r),i}function i(t,e){return t.node(e).dummy?y.find(t.predecessors(e),function(e){return t.node(e).dummy}):void 0}function a(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function o(t,e,n){if(e>n){var r=e;e=n,n=r}return y.has(t[e],n)}function u(t,e,n,r){var i={},a={},u={};return y.each(e,function(t){y.each(t,function(t,e){i[t]=t,a[t]=t,u[t]=e})}),y.each(e,function(t){var e=-1;y.each(t,function(t){var s=r(t);if(s.length){s=y.sortBy(s,function(t){return u[t]});for(var c=(s.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var f=s[l];a[t]===t&&eo.lim&&(u=o,s=!0);var c=p.filter(e.edges(),function(e){return s===d(t,t.node(e.v),u)&&s!==d(t,t.node(e.w),u)});return p.min(c,function(t){return y(e,t)})}function l(t,e,n,i){var a=n.v,u=n.w;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),o(t),r(t,e),h(t,e)}function h(t,e){var n=p.find(t.nodes(),function(t){return!e.node(t).parent}),r=v(t,n);r=r.slice(1),p.each(r,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}function f(t,e,n){return t.hasEdge(e,n)}function d(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}var p=t("../lodash"),g=t("./feasible-tree"),y=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,b=t("../graphlib").alg.postorder,_=t("../util").simplify;e.exports=n,n.initLowLimValues=o,n.initCutValues=r,n.calcCutValue=a,n.leaveEdge=s,n.enterEdge=c,n.exchangeEdges=l},{"../graphlib":34,"../lodash":37,"../util":56,"./feasible-tree":52,"./util":55}],55:[function(t,e){"use strict";function n(t){function e(r){var a=t.node(r);if(i.has(n,r))return a.rank;n[r]=!0;var o=i.min(i.map(t.outEdges(r),function(n){return e(n.w)-t.edge(n).minlen}));return o===Number.POSITIVE_INFINITY&&(o=0),a.rank=o}var n={};i.each(t.sources(),e)}function r(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var i=t("../lodash");e.exports={longestPath:n,slack:r}},{"../lodash":37}],56:[function(t,e){"use strict";function n(t,e,n,r){var i;do i=y.uniqueId(r);while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function r(t){var e=(new m).setGraph(t.graph());return y.each(t.nodes(),function(n){e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e}function i(t){var e=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return y.each(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e}function a(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function o(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function u(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r,o=t.width/2,u=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,c;return Math.abs(a)*o>Math.abs(i)*u?(0>a&&(u=-u),s=u*i/a,c=u):(0>i&&(o=-o),s=o,c=o*a/i),{x:n+s,y:r+c}}function s(t){var e=y.map(y.range(f(t)+1),function(){return[]});return y.each(t.nodes(),function(n){var r=t.node(n),i=r.rank;y.isUndefined(i)||(e[i][r.order]=n)}),e}function c(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank}));y.each(t.nodes(),function(n){var r=t.node(n);y.has(r,"rank")&&(r.rank-=e)})}function l(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank})),n=[];y.each(t.nodes(),function(r){var i=t.node(r).rank-e;y.has(n,i)||(n[i]=[]),n[i].push(r)});var r=0,i=t.graph().nodeRankFactor;y.each(n,function(e,n){y.isUndefined(e)&&n%i!==0?--r:r&&y.each(e,function(e){t.node(e).rank+=r})})}function h(t,e,r,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=i),n(t,"border",a,e)}function f(t){return y.max(y.map(t.nodes(),function(e){var n=t.node(e).rank;return y.isUndefined(n)?void 0:n}))}function d(t,e){var n={lhs:[],rhs:[]};return y.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function p(t,e){var n=y.now();try{return e()}finally{console.log(t+" time: "+(y.now()-n)+"ms")}}function g(t,e){return e()}var y=t("./lodash"),m=t("./graphlib").Graph;e.exports={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:u,buildLayerMatrix:s,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:f,partition:d,time:p,notime:g}},{"./graphlib":34,"./lodash":37}],57:[function(t,e){e.exports="0.7.1"},{}],58:[function(t,e){var n=t("./lib");e.exports={Graph:n.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:n.version}},{"./lib":74,"./lib/alg":65,"./lib/json":75}],59:[function(t,e){function n(t){function e(a){r.has(i,a)||(i[a]=!0,n.push(a),r.each(t.successors(a),e),r.each(t.predecessors(a),e))}var n,i={},a=[];return r.each(t.nodes(),function(t){n=[],e(t),n.length&&a.push(n)}),a}var r=t("../lodash");e.exports=n},{"../lodash":76}],60:[function(t,e){function n(t,e,n){i.isArray(e)||(e=[e]);var a=[],o={};return i.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);r(t,e,"post"===n,o,a)}),a}function r(t,e,n,a,o){i.has(a,e)||(a[e]=!0,n||o.push(e),i.each(t.neighbors(e),function(e){r(t,e,n,a,o)}),n&&o.push(e))}var i=t("../lodash");e.exports=n},{"../lodash":76}],61:[function(t,e){function n(t,e,n){return i.transform(t.nodes(),function(i,a){i[a]=r(t,a,e,n)},{})}var r=t("./dijkstra"),i=t("../lodash"); +e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e,n,i){return r(t,String(e),n||o,i||function(e){return t.outEdges(e)})}function r(t,e,n,r){var i,o,u={},s=new a,c=function(t){var e=t.v!==i?t.v:t.w,r=u[e],a=n(t),c=o.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c0&&(i=s.removeMin(),o=u[i],o.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return u}var i=t("../lodash"),a=t("../data/priority-queue");e.exports=n;var o=i.constant(1)},{"../data/priority-queue":72,"../lodash":76}],63:[function(t,e){function n(t){return r.filter(i(t),function(t){return t.length>1})}var r=t("../lodash"),i=t("./tarjan");e.exports=n},{"../lodash":76,"./tarjan":70}],64:[function(t,e){function n(t,e,n){return r(t,e||a,n||function(e){return t.outEdges(e)})}function r(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[t],i=e[n],o=a[n],u=r.distance+i.distance;ui&&(s[n]=o,c.decrease(n,i))}}var o,u=new i,s={},c=new a;if(0===t.nodeCount())return u;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),u.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(o=c.removeMin(),r.has(s,o))u.setEdge(o,s[o]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(o).forEach(n)}return u}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");e.exports=n},{"../data/priority-queue":72,"../graph":73,"../lodash":76}],70:[function(t,e){function n(t){function e(u){var s=a[u]={onStack:!0,lowlink:n,index:n++};if(i.push(u),t.successors(u).forEach(function(t){r.has(a,t)?a[t].onStack&&(s.lowlink=Math.min(s.lowlink,a[t].index)):(e(t),s.lowlink=Math.min(s.lowlink,a[t].lowlink))}),s.lowlink===s.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(u!==c);o.push(l)}}var n=0,i=[],a={},o=[];return t.nodes().forEach(function(t){r.has(a,t)||e(t)}),o}var r=t("../lodash");e.exports=n},{"../lodash":76}],71:[function(t,e){function n(t){function e(u){if(i.has(a,u))throw new r;i.has(n,u)||(a[u]=!0,n[u]=!0,i.each(t.predecessors(u),e),delete a[u],o.push(u))}var n={},a={},o=[];if(i.each(t.sinks(),e),i.size(n)!==t.nodeCount())throw new r;return o}function r(){}var i=t("../lodash");e.exports=n,n.CycleException=r},{"../lodash":76}],72:[function(t,e){function n(){this._arr=[],this._keyIndices={}}var r=t("../lodash");e.exports=n,n.prototype.size=function(){return this._arr.length},n.prototype.keys=function(){return this._arr.map(function(t){return t.key})},n.prototype.has=function(t){return r.has(this._keyIndices,t)},n.prototype.priority=function(t){var e=this._keyIndices[t];return void 0!==e?this._arr[e].priority:void 0},n.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},n.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},n.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},n.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},n.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1,!(n[e].priorityn){var i=e;e=n,n=i}return e+h+n+h+(s.isUndefined(r)?c:r)}function o(t,e,n,r){if(!t&&e>n){var i=e;e=n,n=i}var a={v:e,w:n};return r&&(a.name=r),a}function u(t,e){return a(t,e.v,e.w,e.name)}var s=t("./lodash");e.exports=n;var c="\x00",l="\x00",h="";n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(t){return this._label=t,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return s.keys(this._nodes)},n.prototype.sources=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._in[t])},this)},n.prototype.sinks=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._out[t])},this)},n.prototype.setNodes=function(t,e){var n=arguments;return s.each(t,function(t){n.length>1?this.setNode(t,e):this.setNode(t)},this),this},n.prototype.setNode=function(t,e){return s.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},n.prototype.node=function(t){return this._nodes[t]},n.prototype.hasNode=function(t){return s.has(this._nodes,t)},n.prototype.removeNode=function(t){var e=this;if(s.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],s.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),s.each(s.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],s.each(s.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(s.isUndefined(e))e=l;else{for(var n=e;!s.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},n.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},n.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==l)return e}},n.prototype.children=function(t){if(s.isUndefined(t)&&(t=l),this._isCompound){var e=this._children[t];if(e)return s.keys(e)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},n.prototype.predecessors=function(t){var e=this._preds[t];return e?s.keys(e):void 0},n.prototype.successors=function(t){var e=this._sucs[t];return e?s.keys(e):void 0},n.prototype.neighbors=function(t){var e=this.predecessors(t);return e?s.union(e,this.successors(t)):void 0},n.prototype.setDefaultEdgeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return s.values(this._edgeObjs)},n.prototype.setPath=function(t,e){var n=this,r=arguments;return s.reduce(t,function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i}),this},n.prototype.setEdge=function(){var t,e,n,i,u=!1;s.isPlainObject(arguments[0])?(t=arguments[0].v,e=arguments[0].w,n=arguments[0].name,2===arguments.length&&(i=arguments[1],u=!0)):(t=arguments[0],e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],u=!0)),t=""+t,e=""+e,s.isUndefined(n)||(n=""+n);var c=a(this._isDirected,t,e,n);if(s.has(this._edgeLabels,c))return u&&(this._edgeLabels[c]=i),this;if(!s.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[c]=u?i:this._defaultEdgeLabelFn(t,e,n);var l=o(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[c]=l,r(this._preds[e],t),r(this._sucs[t],e),this._in[e][c]=l,this._out[t][c]=l,this._edgeCount++,this},n.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return s.has(this._edgeLabels,r)},n.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n),o=this._edgeObjs[r];return o&&(t=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[e],t),i(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},n.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.v===e}):r}},n.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.w===e}):r}},n.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);return n?n.concat(this.outEdges(t,e)):void 0}},{"./lodash":76}],74:[function(t,e){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":73,"./version":77}],75:[function(t,e){function n(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:r(t),edges:i(t)};return o.isUndefined(t.graph())||(e.value=o.clone(t.graph())),e}function r(t){return o.map(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return o.isUndefined(n)||(i.value=n),o.isUndefined(r)||(i.parent=r),i})}function i(t){return o.map(t.edges(),function(e){var n=t.edge(e),r={v:e.v,w:e.w};return o.isUndefined(e.name)||(r.name=e.name),o.isUndefined(n)||(r.value=n),r})}function a(t){var e=new u(t.options).setGraph(t.value);return o.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),o.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}var o=t("./lodash"),u=t("./graph");e.exports={write:n,read:a}},{"./graph":73,"./lodash":76}],76:[function(t,e){e.exports=t(21)},{lodash:82}],77:[function(t,e){e.exports="1.0.1"},{}],78:[function(){},{}],79:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),a="/"===o(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),a=r(e.split("/")),o=Math.min(i.length,a.length),u=o,s=0;o>s;s++)if(i[s]!==a[s]){u=s;break}for(var c=[],s=u;se&&(e=t.length+e),t.substr(e,n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":80}],80:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],81:[function(t,e,n){(function(t){!function(r){var i="object"==typeof n&&n,a="object"==typeof e&&e&&e.exports==i&&e,o="object"==typeof t&&t;(o.global===o||o.window===o)&&(r=o);var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,h={"Á":"Aacute","á":"aacute","Ă":"Abreve","ă":"abreve","∾":"ac","∿":"acd","∾̳":"acE","Â":"Acirc","â":"acirc","´":"acute","А":"Acy","а":"acy","Æ":"AElig","æ":"aelig","⁡":"af","𝔄":"Afr","𝔞":"afr","À":"Agrave","à":"agrave","ℵ":"aleph","Α":"Alpha","α":"alpha","Ā":"Amacr","ā":"amacr","⨿":"amalg","&":"amp","⩕":"andand","⩓":"And","∧":"and","⩜":"andd","⩘":"andslope","⩚":"andv","∠":"ang","⦤":"ange","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","∡":"angmsd","∟":"angrt","⊾":"angrtvb","⦝":"angrtvbd","∢":"angsph","Å":"angst","⍼":"angzarr","Ą":"Aogon","ą":"aogon","𝔸":"Aopf","𝕒":"aopf","⩯":"apacir","≈":"ap","⩰":"apE","≊":"ape","≋":"apid","'":"apos","å":"aring","𝒜":"Ascr","𝒶":"ascr","≔":"colone","*":"ast","≍":"CupCap","Ã":"Atilde","ã":"atilde","Ä":"Auml","ä":"auml","∳":"awconint","⨑":"awint","≌":"bcong","϶":"bepsi","‵":"bprime","∽":"bsim","⋍":"bsime","∖":"setmn","⫧":"Barv","⊽":"barvee","⌅":"barwed","⌆":"Barwed","⎵":"bbrk","⎶":"bbrktbrk","Б":"Bcy","б":"bcy","„":"bdquo","∵":"becaus","⦰":"bemptyv","ℬ":"Bscr","Β":"Beta","β":"beta","ℶ":"beth","≬":"twixt","𝔅":"Bfr","𝔟":"bfr","⋂":"xcap","◯":"xcirc","⋃":"xcup","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨆":"xsqcup","★":"starf","▽":"xdtri","△":"xutri","⨄":"xuplus","⋁":"Vee","⋀":"Wedge","⤍":"rbarr","⧫":"lozf","▪":"squf","▴":"utrif","▾":"dtrif","◂":"ltrif","▸":"rtrif","␣":"blank","▒":"blk12","░":"blk14","▓":"blk34","█":"block","=⃥":"bne","≡⃥":"bnequiv","⫭":"bNot","⌐":"bnot","𝔹":"Bopf","𝕓":"bopf","⊥":"bot","⋈":"bowtie","⧉":"boxbox","┐":"boxdl","╕":"boxdL","╖":"boxDl","╗":"boxDL","┌":"boxdr","╒":"boxdR","╓":"boxDr","╔":"boxDR","─":"boxh","═":"boxH","┬":"boxhd","╤":"boxHd","╥":"boxhD","╦":"boxHD","┴":"boxhu","╧":"boxHu","╨":"boxhU","╩":"boxHU","⊟":"minusb","⊞":"plusb","⊠":"timesb","┘":"boxul","╛":"boxuL","╜":"boxUl","╝":"boxUL","└":"boxur","╘":"boxuR","╙":"boxUr","╚":"boxUR","│":"boxv","║":"boxV","┼":"boxvh","╪":"boxvH","╫":"boxVh","╬":"boxVH","┤":"boxvl","╡":"boxvL","╢":"boxVl","╣":"boxVL","├":"boxvr","╞":"boxvR","╟":"boxVr","╠":"boxVR","˘":"breve","¦":"brvbar","𝒷":"bscr","⁏":"bsemi","⧅":"bsolb","\\":"bsol","⟈":"bsolhsub","•":"bull","≎":"bump","⪮":"bumpE","≏":"bumpe","Ć":"Cacute","ć":"cacute","⩄":"capand","⩉":"capbrcup","⩋":"capcap","∩":"cap","⋒":"Cap","⩇":"capcup","⩀":"capdot","ⅅ":"DD","∩︀":"caps","⁁":"caret","ˇ":"caron","ℭ":"Cfr","⩍":"ccaps","Č":"Ccaron","č":"ccaron","Ç":"Ccedil","ç":"ccedil","Ĉ":"Ccirc","ĉ":"ccirc","∰":"Cconint","⩌":"ccups","⩐":"ccupssm","Ċ":"Cdot","ċ":"cdot","¸":"cedil","⦲":"cemptyv","¢":"cent","·":"middot","𝔠":"cfr","Ч":"CHcy","ч":"chcy","✓":"check","Χ":"Chi","χ":"chi","ˆ":"circ","≗":"cire","↺":"olarr","↻":"orarr","⊛":"oast","⊚":"ocir","⊝":"odash","⊙":"odot","®":"reg","Ⓢ":"oS","⊖":"ominus","⊕":"oplus","⊗":"otimes","○":"cir","⧃":"cirE","⨐":"cirfnint","⫯":"cirmid","⧂":"cirscir","∲":"cwconint","”":"rdquo","’":"rsquo","♣":"clubs",":":"colon","∷":"Colon","⩴":"Colone",",":"comma","@":"commat","∁":"comp","∘":"compfn","ℂ":"Copf","≅":"cong","⩭":"congdot","≡":"equiv","∮":"oint","∯":"Conint","𝕔":"copf","∐":"coprod","©":"copy","℗":"copysr","↵":"crarr","✗":"cross","⨯":"Cross","𝒞":"Cscr","𝒸":"cscr","⫏":"csub","⫑":"csube","⫐":"csup","⫒":"csupe","⋯":"ctdot","⤸":"cudarrl","⤵":"cudarrr","⋞":"cuepr","⋟":"cuesc","↶":"cularr","⤽":"cularrp","⩈":"cupbrcap","⩆":"cupcap","∪":"cup","⋓":"Cup","⩊":"cupcup","⊍":"cupdot","⩅":"cupor","∪︀":"cups","↷":"curarr","⤼":"curarrm","⋎":"cuvee","⋏":"cuwed","¤":"curren","∱":"cwint","⌭":"cylcty","†":"dagger","‡":"Dagger","ℸ":"daleth","↓":"darr","↡":"Darr","⇓":"dArr","‐":"dash","⫤":"Dashv","⊣":"dashv","⤏":"rBarr","˝":"dblac","Ď":"Dcaron","ď":"dcaron","Д":"Dcy","д":"dcy","⇊":"ddarr","ⅆ":"dd","⤑":"DDotrahd","⩷":"eDDot","°":"deg","∇":"Del","Δ":"Delta","δ":"delta","⦱":"demptyv","⥿":"dfisht","𝔇":"Dfr","𝔡":"dfr","⥥":"dHar","⇃":"dharl","⇂":"dharr","˙":"dot","`":"grave","˜":"tilde","⋄":"diam","♦":"diams","¨":"die","ϝ":"gammad","⋲":"disin","÷":"div","⋇":"divonx","Ђ":"DJcy","ђ":"djcy","⌞":"dlcorn","⌍":"dlcrop",$:"dollar","𝔻":"Dopf","𝕕":"dopf","⃜":"DotDot","≐":"doteq","≑":"eDot","∸":"minusd","∔":"plusdo","⊡":"sdotb","⇐":"lArr","⇔":"iff","⟸":"xlArr","⟺":"xhArr","⟹":"xrArr","⇒":"rArr","⊨":"vDash","⇑":"uArr","⇕":"vArr","∥":"par","⤓":"DownArrowBar","⇵":"duarr","̑":"DownBreve","⥐":"DownLeftRightVector","⥞":"DownLeftTeeVector","⥖":"DownLeftVectorBar","↽":"lhard","⥟":"DownRightTeeVector","⥗":"DownRightVectorBar","⇁":"rhard","↧":"mapstodown","⊤":"top","⤐":"RBarr","⌟":"drcorn","⌌":"drcrop","𝒟":"Dscr","𝒹":"dscr","Ѕ":"DScy","ѕ":"dscy","⧶":"dsol","Đ":"Dstrok","đ":"dstrok","⋱":"dtdot","▿":"dtri","⥯":"duhar","⦦":"dwangle","Џ":"DZcy","џ":"dzcy","⟿":"dzigrarr","É":"Eacute","é":"eacute","⩮":"easter","Ě":"Ecaron","ě":"ecaron","Ê":"Ecirc","ê":"ecirc","≖":"ecir","≕":"ecolon","Э":"Ecy","э":"ecy","Ė":"Edot","ė":"edot","ⅇ":"ee","≒":"efDot","𝔈":"Efr","𝔢":"efr","⪚":"eg","È":"Egrave","è":"egrave","⪖":"egs","⪘":"egsdot","⪙":"el","∈":"in","⏧":"elinters","ℓ":"ell","⪕":"els","⪗":"elsdot","Ē":"Emacr","ē":"emacr","∅":"empty","◻":"EmptySmallSquare","▫":"EmptyVerySmallSquare"," ":"emsp13"," ":"emsp14"," ":"emsp","Ŋ":"ENG","ŋ":"eng"," ":"ensp","Ę":"Eogon","ę":"eogon","𝔼":"Eopf","𝕖":"eopf","⋕":"epar","⧣":"eparsl","⩱":"eplus","ε":"epsi","Ε":"Epsilon","ϵ":"epsiv","≂":"esim","⩵":"Equal","=":"equals","≟":"equest","⇌":"rlhar","⩸":"equivDD","⧥":"eqvparsl","⥱":"erarr","≓":"erDot","ℯ":"escr","ℰ":"Escr","⩳":"Esim","Η":"Eta","η":"eta","Ð":"ETH","ð":"eth","Ë":"Euml","ë":"euml","€":"euro","!":"excl","∃":"exist","Ф":"Fcy","ф":"fcy","♀":"female","ffi":"ffilig","ff":"fflig","ffl":"ffllig","𝔉":"Ffr","𝔣":"ffr","fi":"filig","◼":"FilledSmallSquare",fj:"fjlig","♭":"flat","fl":"fllig","▱":"fltns","ƒ":"fnof","𝔽":"Fopf","𝕗":"fopf","∀":"forall","⋔":"fork","⫙":"forkv","ℱ":"Fscr","⨍":"fpartint","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","⅔":"frac23","⅖":"frac25","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","⁄":"frasl","⌢":"frown","𝒻":"fscr","ǵ":"gacute","Γ":"Gamma","γ":"gamma","Ϝ":"Gammad","⪆":"gap","Ğ":"Gbreve","ğ":"gbreve","Ģ":"Gcedil","Ĝ":"Gcirc","ĝ":"gcirc","Г":"Gcy","г":"gcy","Ġ":"Gdot","ġ":"gdot","≥":"ge","≧":"gE","⪌":"gEl","⋛":"gel","⩾":"ges","⪩":"gescc","⪀":"gesdot","⪂":"gesdoto","⪄":"gesdotol","⋛︀":"gesl","⪔":"gesles","𝔊":"Gfr","𝔤":"gfr","≫":"gg","⋙":"Gg","ℷ":"gimel","Ѓ":"GJcy","ѓ":"gjcy","⪥":"gla","≷":"gl","⪒":"glE","⪤":"glj","⪊":"gnap","⪈":"gne","≩":"gnE","⋧":"gnsim","𝔾":"Gopf","𝕘":"gopf","⪢":"GreaterGreater","≳":"gsim","𝒢":"Gscr","ℊ":"gscr","⪎":"gsime","⪐":"gsiml","⪧":"gtcc","⩺":"gtcir",">":"gt","⋗":"gtdot","⦕":"gtlPar","⩼":"gtquest","⥸":"gtrarr","≩︀":"gvnE"," ":"hairsp","ℋ":"Hscr","Ъ":"HARDcy","ъ":"hardcy","⥈":"harrcir","↔":"harr","↭":"harrw","^":"Hat","ℏ":"hbar","Ĥ":"Hcirc","ĥ":"hcirc","♥":"hearts","…":"mldr","⊹":"hercon","𝔥":"hfr","ℌ":"Hfr","⤥":"searhk","⤦":"swarhk","⇿":"hoarr","∻":"homtht","↩":"larrhk","↪":"rarrhk","𝕙":"hopf","ℍ":"Hopf","―":"horbar","𝒽":"hscr","Ħ":"Hstrok","ħ":"hstrok","⁃":"hybull","Í":"Iacute","í":"iacute","⁣":"ic","Î":"Icirc","î":"icirc","И":"Icy","и":"icy","İ":"Idot","Е":"IEcy","е":"iecy","¡":"iexcl","𝔦":"ifr","ℑ":"Im","Ì":"Igrave","ì":"igrave","ⅈ":"ii","⨌":"qint","∭":"tint","⧜":"iinfin","℩":"iiota","IJ":"IJlig","ij":"ijlig","Ī":"Imacr","ī":"imacr","ℐ":"Iscr","ı":"imath","⊷":"imof","Ƶ":"imped","℅":"incare","∞":"infin","⧝":"infintie","⊺":"intcal","∫":"int","∬":"Int","ℤ":"Zopf","⨗":"intlarhk","⨼":"iprod","⁢":"it","Ё":"IOcy","ё":"iocy","Į":"Iogon","į":"iogon","𝕀":"Iopf","𝕚":"iopf","Ι":"Iota","ι":"iota","¿":"iquest","𝒾":"iscr","⋵":"isindot","⋹":"isinE","⋴":"isins","⋳":"isinsv","Ĩ":"Itilde","ĩ":"itilde","І":"Iukcy","і":"iukcy","Ï":"Iuml","ï":"iuml","Ĵ":"Jcirc","ĵ":"jcirc","Й":"Jcy","й":"jcy","𝔍":"Jfr","𝔧":"jfr","ȷ":"jmath","𝕁":"Jopf","𝕛":"jopf","𝒥":"Jscr","𝒿":"jscr","Ј":"Jsercy","ј":"jsercy","Є":"Jukcy","є":"jukcy","Κ":"Kappa","κ":"kappa","ϰ":"kappav","Ķ":"Kcedil","ķ":"kcedil","К":"Kcy","к":"kcy","𝔎":"Kfr","𝔨":"kfr","ĸ":"kgreen","Х":"KHcy","х":"khcy","Ќ":"KJcy","ќ":"kjcy","𝕂":"Kopf","𝕜":"kopf","𝒦":"Kscr","𝓀":"kscr","⇚":"lAarr","Ĺ":"Lacute","ĺ":"lacute","⦴":"laemptyv","ℒ":"Lscr","Λ":"Lambda","λ":"lambda","⟨":"lang","⟪":"Lang","⦑":"langd","⪅":"lap","«":"laquo","⇤":"larrb","⤟":"larrbfs","←":"larr","↞":"Larr","⤝":"larrfs","↫":"larrlp","⤹":"larrpl","⥳":"larrsim","↢":"larrtl","⤙":"latail","⤛":"lAtail","⪫":"lat","⪭":"late","⪭︀":"lates","⤌":"lbarr","⤎":"lBarr","❲":"lbbrk","{":"lcub","[":"lsqb","⦋":"lbrke","⦏":"lbrksld","⦍":"lbrkslu","Ľ":"Lcaron","ľ":"lcaron","Ļ":"Lcedil","ļ":"lcedil","⌈":"lceil","Л":"Lcy","л":"lcy","⤶":"ldca","“":"ldquo","⥧":"ldrdhar","⥋":"ldrushar","↲":"ldsh","≤":"le","≦":"lE","⇆":"lrarr","⟦":"lobrk","⥡":"LeftDownTeeVector","⥙":"LeftDownVectorBar","⌊":"lfloor","↼":"lharu","⇇":"llarr","⇋":"lrhar","⥎":"LeftRightVector","↤":"mapstoleft","⥚":"LeftTeeVector","⋋":"lthree","⧏":"LeftTriangleBar","⊲":"vltri","⊴":"ltrie","⥑":"LeftUpDownVector","⥠":"LeftUpTeeVector","⥘":"LeftUpVectorBar","↿":"uharl","⥒":"LeftVectorBar","⪋":"lEg","⋚":"leg","⩽":"les","⪨":"lescc","⩿":"lesdot","⪁":"lesdoto","⪃":"lesdotor","⋚︀":"lesg","⪓":"lesges","⋖":"ltdot","≶":"lg","⪡":"LessLess","≲":"lsim","⥼":"lfisht","𝔏":"Lfr","𝔩":"lfr","⪑":"lgE","⥢":"lHar","⥪":"lharul","▄":"lhblk","Љ":"LJcy","љ":"ljcy","≪":"ll","⋘":"Ll","⥫":"llhard","◺":"lltri","Ŀ":"Lmidot","ŀ":"lmidot","⎰":"lmoust","⪉":"lnap","⪇":"lne","≨":"lnE","⋦":"lnsim","⟬":"loang","⇽":"loarr","⟵":"xlarr","⟷":"xharr","⟼":"xmap","⟶":"xrarr","↬":"rarrlp","⦅":"lopar","𝕃":"Lopf","𝕝":"lopf","⨭":"loplus","⨴":"lotimes","∗":"lowast",_:"lowbar","↙":"swarr","↘":"searr","◊":"loz","(":"lpar","⦓":"lparlt","⥭":"lrhard","‎":"lrm","⊿":"lrtri","‹":"lsaquo","𝓁":"lscr","↰":"lsh","⪍":"lsime","⪏":"lsimg","‘":"lsquo","‚":"sbquo","Ł":"Lstrok","ł":"lstrok","⪦":"ltcc","⩹":"ltcir","<":"lt","⋉":"ltimes","⥶":"ltlarr","⩻":"ltquest","◃":"ltri","⦖":"ltrPar","⥊":"lurdshar","⥦":"luruhar","≨︀":"lvnE","¯":"macr","♂":"male","✠":"malt","⤅":"Map","↦":"map","↥":"mapstoup","▮":"marker","⨩":"mcomma","М":"Mcy","м":"mcy","—":"mdash","∺":"mDDot"," ":"MediumSpace","ℳ":"Mscr","𝔐":"Mfr","𝔪":"mfr","℧":"mho","µ":"micro","⫰":"midcir","∣":"mid","−":"minus","⨪":"minusdu","∓":"mp","⫛":"mlcp","⊧":"models","𝕄":"Mopf","𝕞":"mopf","𝓂":"mscr","Μ":"Mu","μ":"mu","⊸":"mumap","Ń":"Nacute","ń":"nacute","∠⃒":"nang","≉":"nap","⩰̸":"napE","≋̸":"napid","ʼn":"napos","♮":"natur","ℕ":"Nopf"," ":"nbsp","≎̸":"nbump","≏̸":"nbumpe","⩃":"ncap","Ň":"Ncaron","ň":"ncaron","Ņ":"Ncedil","ņ":"ncedil","≇":"ncong","⩭̸":"ncongdot","⩂":"ncup","Н":"Ncy","н":"ncy","–":"ndash","⤤":"nearhk","↗":"nearr","⇗":"neArr","≠":"ne","≐̸":"nedot","​":"ZeroWidthSpace","≢":"nequiv","⤨":"toea","≂̸":"nesim","\n":"NewLine","∄":"nexist","𝔑":"Nfr","𝔫":"nfr","≧̸":"ngE","≱":"nge","⩾̸":"nges","⋙̸":"nGg","≵":"ngsim","≫⃒":"nGt","≯":"ngt","≫̸":"nGtv","↮":"nharr","⇎":"nhArr","⫲":"nhpar","∋":"ni","⋼":"nis","⋺":"nisd","Њ":"NJcy","њ":"njcy","↚":"nlarr","⇍":"nlArr","‥":"nldr","≦̸":"nlE","≰":"nle","⩽̸":"nles","≮":"nlt","⋘̸":"nLl","≴":"nlsim","≪⃒":"nLt","⋪":"nltri","⋬":"nltrie","≪̸":"nLtv","∤":"nmid","⁠":"NoBreak","𝕟":"nopf","⫬":"Not","¬":"not","≭":"NotCupCap","∦":"npar","∉":"notin","≹":"ntgl","⋵̸":"notindot","⋹̸":"notinE","⋷":"notinvb","⋶":"notinvc","⧏̸":"NotLeftTriangleBar","≸":"ntlg","⪢̸":"NotNestedGreaterGreater","⪡̸":"NotNestedLessLess","∌":"notni","⋾":"notnivb","⋽":"notnivc","⊀":"npr","⪯̸":"npre","⋠":"nprcue","⧐̸":"NotRightTriangleBar","⋫":"nrtri","⋭":"nrtrie","⊏̸":"NotSquareSubset","⋢":"nsqsube","⊐̸":"NotSquareSuperset","⋣":"nsqsupe","⊂⃒":"vnsub","⊈":"nsube","⊁":"nsc","⪰̸":"nsce","⋡":"nsccue","≿̸":"NotSucceedsTilde","⊃⃒":"vnsup","⊉":"nsupe","≁":"nsim","≄":"nsime","⫽⃥":"nparsl","∂̸":"npart","⨔":"npolint","⤳̸":"nrarrc","↛":"nrarr","⇏":"nrArr","↝̸":"nrarrw","𝒩":"Nscr","𝓃":"nscr","⊄":"nsub","⫅̸":"nsubE","⊅":"nsup","⫆̸":"nsupE","Ñ":"Ntilde","ñ":"ntilde","Ν":"Nu","ν":"nu","#":"num","№":"numero"," ":"numsp","≍⃒":"nvap","⊬":"nvdash","⊭":"nvDash","⊮":"nVdash","⊯":"nVDash","≥⃒":"nvge",">⃒":"nvgt","⤄":"nvHarr","⧞":"nvinfin","⤂":"nvlArr","≤⃒":"nvle","<⃒":"nvlt","⊴⃒":"nvltrie","⤃":"nvrArr","⊵⃒":"nvrtrie","∼⃒":"nvsim","⤣":"nwarhk","↖":"nwarr","⇖":"nwArr","⤧":"nwnear","Ó":"Oacute","ó":"oacute","Ô":"Ocirc","ô":"ocirc","О":"Ocy","о":"ocy","Ő":"Odblac","ő":"odblac","⨸":"odiv","⦼":"odsold","Œ":"OElig","œ":"oelig","⦿":"ofcir","𝔒":"Ofr","𝔬":"ofr","˛":"ogon","Ò":"Ograve","ò":"ograve","⧁":"ogt","⦵":"ohbar","Ω":"ohm","⦾":"olcir","⦻":"olcross","‾":"oline","⧀":"olt","Ō":"Omacr","ō":"omacr","ω":"omega","Ο":"Omicron","ο":"omicron","⦶":"omid","𝕆":"Oopf","𝕠":"oopf","⦷":"opar","⦹":"operp","⩔":"Or","∨":"or","⩝":"ord","ℴ":"oscr","ª":"ordf","º":"ordm","⊶":"origof","⩖":"oror","⩗":"orslope","⩛":"orv","𝒪":"Oscr","Ø":"Oslash","ø":"oslash","⊘":"osol","Õ":"Otilde","õ":"otilde","⨶":"otimesas","⨷":"Otimes","Ö":"Ouml","ö":"ouml","⌽":"ovbar","⏞":"OverBrace","⎴":"tbrk","⏜":"OverParenthesis","¶":"para","⫳":"parsim","⫽":"parsl","∂":"part","П":"Pcy","п":"pcy","%":"percnt",".":"period","‰":"permil","‱":"pertenk","𝔓":"Pfr","𝔭":"pfr","Φ":"Phi","φ":"phi","ϕ":"phiv","☎":"phone","Π":"Pi","π":"pi","ϖ":"piv","ℎ":"planckh","⨣":"plusacir","⨢":"pluscir","+":"plus","⨥":"plusdu","⩲":"pluse","±":"pm","⨦":"plussim","⨧":"plustwo","⨕":"pointint","𝕡":"popf","ℙ":"Popf","£":"pound","⪷":"prap","⪻":"Pr","≺":"pr","≼":"prcue","⪯":"pre","≾":"prsim","⪹":"prnap","⪵":"prnE","⋨":"prnsim","⪳":"prE","′":"prime","″":"Prime","∏":"prod","⌮":"profalar","⌒":"profline","⌓":"profsurf","∝":"prop","⊰":"prurel","𝒫":"Pscr","𝓅":"pscr","Ψ":"Psi","ψ":"psi"," ":"puncsp","𝔔":"Qfr","𝔮":"qfr","𝕢":"qopf","ℚ":"Qopf","⁗":"qprime","𝒬":"Qscr","𝓆":"qscr","⨖":"quatint","?":"quest",'"':"quot","⇛":"rAarr","∽̱":"race","Ŕ":"Racute","ŕ":"racute","√":"Sqrt","⦳":"raemptyv","⟩":"rang","⟫":"Rang","⦒":"rangd","⦥":"range","»":"raquo","⥵":"rarrap","⇥":"rarrb","⤠":"rarrbfs","⤳":"rarrc","→":"rarr","↠":"Rarr","⤞":"rarrfs","⥅":"rarrpl","⥴":"rarrsim","⤖":"Rarrtl","↣":"rarrtl","↝":"rarrw","⤚":"ratail","⤜":"rAtail","∶":"ratio","❳":"rbbrk","}":"rcub","]":"rsqb","⦌":"rbrke","⦎":"rbrksld","⦐":"rbrkslu","Ř":"Rcaron","ř":"rcaron","Ŗ":"Rcedil","ŗ":"rcedil","⌉":"rceil","Р":"Rcy","р":"rcy","⤷":"rdca","⥩":"rdldhar","↳":"rdsh","ℜ":"Re","ℛ":"Rscr","ℝ":"Ropf","▭":"rect","⥽":"rfisht","⌋":"rfloor","𝔯":"rfr","⥤":"rHar","⇀":"rharu","⥬":"rharul","Ρ":"Rho","ρ":"rho","ϱ":"rhov","⇄":"rlarr","⟧":"robrk","⥝":"RightDownTeeVector","⥕":"RightDownVectorBar","⇉":"rrarr","⊢":"vdash","⥛":"RightTeeVector","⋌":"rthree","⧐":"RightTriangleBar","⊳":"vrtri","⊵":"rtrie","⥏":"RightUpDownVector","⥜":"RightUpTeeVector","⥔":"RightUpVectorBar","↾":"uharr","⥓":"RightVectorBar","˚":"ring","‏":"rlm","⎱":"rmoust","⫮":"rnmid","⟭":"roang","⇾":"roarr","⦆":"ropar","𝕣":"ropf","⨮":"roplus","⨵":"rotimes","⥰":"RoundImplies",")":"rpar","⦔":"rpargt","⨒":"rppolint","›":"rsaquo","𝓇":"rscr","↱":"rsh","⋊":"rtimes","▹":"rtri","⧎":"rtriltri","⧴":"RuleDelayed","⥨":"ruluhar","℞":"rx","Ś":"Sacute","ś":"sacute","⪸":"scap","Š":"Scaron","š":"scaron","⪼":"Sc","≻":"sc","≽":"sccue","⪰":"sce","⪴":"scE","Ş":"Scedil","ş":"scedil","Ŝ":"Scirc","ŝ":"scirc","⪺":"scnap","⪶":"scnE","⋩":"scnsim","⨓":"scpolint","≿":"scsim","С":"Scy","с":"scy","⋅":"sdot","⩦":"sdote","⇘":"seArr","§":"sect",";":"semi","⤩":"tosa","✶":"sext","𝔖":"Sfr","𝔰":"sfr","♯":"sharp","Щ":"SHCHcy","щ":"shchcy","Ш":"SHcy","ш":"shcy","↑":"uarr","­":"shy","Σ":"Sigma","σ":"sigma","ς":"sigmaf","∼":"sim","⩪":"simdot","≃":"sime","⪞":"simg","⪠":"simgE","⪝":"siml","⪟":"simlE","≆":"simne","⨤":"simplus","⥲":"simrarr","⨳":"smashp","⧤":"smeparsl","⌣":"smile","⪪":"smt","⪬":"smte","⪬︀":"smtes","Ь":"SOFTcy","ь":"softcy","⌿":"solbar","⧄":"solb","/":"sol","𝕊":"Sopf","𝕤":"sopf","♠":"spades","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊏":"sqsub","⊑":"sqsube","⊐":"sqsup","⊒":"sqsupe","□":"squ","𝒮":"Sscr","𝓈":"sscr","⋆":"Star","☆":"star","⊂":"sub","⋐":"Sub","⪽":"subdot","⫅":"subE","⊆":"sube","⫃":"subedot","⫁":"submult","⫋":"subnE","⊊":"subne","⪿":"subplus","⥹":"subrarr","⫇":"subsim","⫕":"subsub","⫓":"subsup","∑":"sum","♪":"sung","¹":"sup1","²":"sup2","³":"sup3","⊃":"sup","⋑":"Sup","⪾":"supdot","⫘":"supdsub","⫆":"supE","⊇":"supe","⫄":"supedot","⟉":"suphsol","⫗":"suphsub","⥻":"suplarr","⫂":"supmult","⫌":"supnE","⊋":"supne","⫀":"supplus","⫈":"supsim","⫔":"supsub","⫖":"supsup","⇙":"swArr","⤪":"swnwar","ß":"szlig"," ":"Tab","⌖":"target","Τ":"Tau","τ":"tau","Ť":"Tcaron","ť":"tcaron","Ţ":"Tcedil","ţ":"tcedil","Т":"Tcy","т":"tcy","⃛":"tdot","⌕":"telrec","𝔗":"Tfr","𝔱":"tfr","∴":"there4","Θ":"Theta","θ":"theta","ϑ":"thetav","  ":"ThickSpace"," ":"thinsp","Þ":"THORN","þ":"thorn","⨱":"timesbar","×":"times","⨰":"timesd","⌶":"topbot","⫱":"topcir","𝕋":"Topf","𝕥":"topf","⫚":"topfork","‴":"tprime","™":"trade","▵":"utri","≜":"trie","◬":"tridot","⨺":"triminus","⨹":"triplus","⧍":"trisb","⨻":"tritime","⏢":"trpezium","𝒯":"Tscr","𝓉":"tscr","Ц":"TScy","ц":"tscy","Ћ":"TSHcy","ћ":"tshcy","Ŧ":"Tstrok","ŧ":"tstrok","Ú":"Uacute","ú":"uacute","↟":"Uarr","⥉":"Uarrocir","Ў":"Ubrcy","ў":"ubrcy","Ŭ":"Ubreve","ŭ":"ubreve","Û":"Ucirc","û":"ucirc","У":"Ucy","у":"ucy","⇅":"udarr","Ű":"Udblac","ű":"udblac","⥮":"udhar","⥾":"ufisht","𝔘":"Ufr","𝔲":"ufr","Ù":"Ugrave","ù":"ugrave","⥣":"uHar","▀":"uhblk","⌜":"ulcorn","⌏":"ulcrop","◸":"ultri","Ū":"Umacr","ū":"umacr","⏟":"UnderBrace","⏝":"UnderParenthesis","⊎":"uplus","Ų":"Uogon","ų":"uogon","𝕌":"Uopf","𝕦":"uopf","⤒":"UpArrowBar","↕":"varr","υ":"upsi","ϒ":"Upsi","Υ":"Upsilon","⇈":"uuarr","⌝":"urcorn","⌎":"urcrop","Ů":"Uring","ů":"uring","◹":"urtri","𝒰":"Uscr","𝓊":"uscr","⋰":"utdot","Ũ":"Utilde","ũ":"utilde","Ü":"Uuml","ü":"uuml","⦧":"uwangle","⦜":"vangrt","⊊︀":"vsubne","⫋︀":"vsubnE","⊋︀":"vsupne","⫌︀":"vsupnE","⫨":"vBar","⫫":"Vbar","⫩":"vBarv","В":"Vcy","в":"vcy","⊩":"Vdash","⊫":"VDash","⫦":"Vdashl","⊻":"veebar","≚":"veeeq","⋮":"vellip","|":"vert","‖":"Vert","❘":"VerticalSeparator","≀":"wr","𝔙":"Vfr","𝔳":"vfr","𝕍":"Vopf","𝕧":"vopf","𝒱":"Vscr","𝓋":"vscr","⊪":"Vvdash","⦚":"vzigzag","Ŵ":"Wcirc","ŵ":"wcirc","⩟":"wedbar","≙":"wedgeq","℘":"wp","𝔚":"Wfr","𝔴":"wfr","𝕎":"Wopf","𝕨":"wopf","𝒲":"Wscr","𝓌":"wscr","𝔛":"Xfr","𝔵":"xfr","Ξ":"Xi","ξ":"xi","⋻":"xnis","𝕏":"Xopf","𝕩":"xopf","𝒳":"Xscr","𝓍":"xscr","Ý":"Yacute","ý":"yacute","Я":"YAcy","я":"yacy","Ŷ":"Ycirc","ŷ":"ycirc","Ы":"Ycy","ы":"ycy","¥":"yen","𝔜":"Yfr","𝔶":"yfr","Ї":"YIcy","ї":"yicy","𝕐":"Yopf","𝕪":"yopf","𝒴":"Yscr","𝓎":"yscr","Ю":"YUcy","ю":"yucy","ÿ":"yuml","Ÿ":"Yuml","Ź":"Zacute","ź":"zacute","Ž":"Zcaron","ž":"zcaron","З":"Zcy","з":"zcy","Ż":"Zdot","ż":"zdot","ℨ":"Zfr","Ζ":"Zeta","ζ":"zeta","𝔷":"zfr","Ж":"ZHcy","ж":"zhcy","⇝":"zigrarr","𝕫":"zopf","𝒵":"Zscr","𝓏":"zscr","‍":"zwj","‌":"zwnj"},f=/["&'<>`]/g,d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},p=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|iacute|Uacute|plusmn|otilde|Otilde|Agrave|agrave|yacute|Yacute|oslash|Oslash|Atilde|atilde|brvbar|Ccedil|ccedil|ograve|curren|divide|Eacute|eacute|Ograve|oacute|Egrave|egrave|ugrave|frac12|frac14|frac34|Ugrave|Oacute|Iacute|ntilde|Ntilde|uacute|middot|Igrave|igrave|iquest|aacute|laquo|THORN|micro|iexcl|icirc|Icirc|Acirc|ucirc|ecirc|Ocirc|ocirc|Ecirc|Ucirc|aring|Aring|aelig|AElig|acute|pound|raquo|acirc|times|thorn|szlig|cedil|COPY|Auml|ordf|ordm|uuml|macr|Uuml|auml|Ouml|ouml|para|nbsp|Euml|quot|QUOT|euml|yuml|cent|sect|copy|sup1|sup2|sup3|Iuml|iuml|shy|eth|reg|not|yen|amp|AMP|REG|uml|ETH|deg|gt|GT|LT|lt)([=a-zA-Z0-9])?/g,m={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},v={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},b={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,w={},A=w.hasOwnProperty,k=function(t,e){return A.call(t,e) +},E=function(t,e){for(var n=-1,r=t.length;++n=55296&&57343>=t||t>1114111?(e&&C("character reference outside the permissible Unicode range"),"�"):k(b,t)?(e&&C("disallowed character reference"),b[t]):(e&&E(_,t)&&C("disallowed character reference"),t>65535&&(t-=65536,n+=x(t>>>10&1023|55296),t=56320|1023&t),n+=x(t))},S=function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"},C=function(t){throw Error("Parse error: "+t)},T=function(t,e){e=D(e,T.options);var n=e.strict;n&&g.test(t)&&C("forbidden code point");var r=e.encodeEverything,i=e.useNamedReferences,a=e.allowUnsafeSymbols;return r?(t=t.replace(s,function(t){return i&&k(h,t)?"&"+h[t]+";":S(t)}),i&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(t=t.replace(l,function(t){return"&"+h[t]+";"}))):i?(a||(t=t.replace(f,function(t){return"&"+h[t]+";"})),t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),t=t.replace(l,function(t){return"&"+h[t]+";"})):a||(t=t.replace(f,S)),t.replace(u,function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),r=1024*(e-55296)+n-56320+65536;return"&#x"+r.toString(16).toUpperCase()+";"}).replace(c,S)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var F=function(t,e){e=D(e,F.options);var n=e.strict;return n&&p.test(t)&&C("malformed character reference"),t.replace(y,function(t,r,i,a,o,u,s,c){var l,h,f,d,p;return r?(l=r,h=i,n&&!h&&C("character reference was not terminated by a semicolon"),M(l,n)):a?(f=a,h=o,n&&!h&&C("character reference was not terminated by a semicolon"),l=parseInt(f,16),M(l,n)):u?(d=u,k(m,d)?m[d]:(n&&C("named character reference was not terminated by a semicolon"),t)):(d=s,p=c,p&&e.isAttributeValue?(n&&"="==p&&C("`&` did not start a character reference"),t):(n&&C("named character reference was not terminated by a semicolon"),v[d]+(p||"")))})};F.options={isAttributeValue:!1,strict:!1};var L=function(t){return t.replace(f,function(t){return d[t]})},B={version:"0.5.0",encode:T,decode:F,escape:L,unescape:F};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return B});else if(i&&!i.nodeType)if(a)a.exports=B;else for(var N in B)k(B,N)&&(i[N]=B[N]);else r.he=B}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r-1?0:-1:t?0:-1}function a(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:_+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function o(t){return t.charCodeAt(0)}function u(t,e){for(var n=t.criteria,r=e.criteria,i=-1,a=n.length;++iu||"undefined"==typeof o)return 1;if(u>o||"undefined"==typeof u)return-1}}return t.index-e.index}function s(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],o=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&o&&"object"==typeof o)return!1;var u=h();u["false"]=u["null"]=u["true"]=u.undefined=!1;var s=h();for(s.array=t,s.cache=u,s.push=a;++ei?0:i);++r=x&&a===r,c=[];if(u){var l=s(e);l?(a=i,e=l):u=!1}for(;++n-1:void 0});return i.pop(),a.pop(),v&&(f(i),f(a)),o}function ee(t,e,n,r,i){(Jr(e)?Xe:si)(e,function(e,a){var o,u,s=e,c=t[a];if(e&&((u=Jr(e))||ci(e))){for(var l=r.length;l--;)if(o=r[l]==e){c=i[l];break}if(!o){var h;n&&(s=n(c,e),(h="undefined"!=typeof s)&&(c=s)),h||(c=u?Jr(c)?c:[]:ci(c)?c:{}),r.push(e),i.push(c),h||ee(c,e,n,r,i)}}else n&&(s=n(c,e),"undefined"==typeof s&&(s=e)),"undefined"!=typeof s&&(c=s);t[a]=c})}function re(t,e){return t+Fr(Wr()*(e-t+1))}function ie(t,e,n){var a=-1,o=se(),u=t?t.length:0,c=[],h=!e&&u>=x&&o===r,p=n||h?l():c;if(h){var g=s(p);o=i,p=g}for(;++a3&&"function"==typeof e[n-2])var r=w(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var i=p(arguments,1,n),a=-1,o=l(),u=l();++an?Hr(0,a+n):n)||0,Jr(t)?o=i(t,e,n)>-1:"number"==typeof a?o=(Oe(t)?t.indexOf(e,n):i(t,e,n))>-1:si(t,function(t){return++r>=n?!(o=t===e):void 0}),o}function Ge(t,n,r){var i=!0;n=e.createCallback(n,r,3);var a=-1,o=t?t.length:0;if("number"==typeof o)for(;++aa&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);o>i&&(i=o,a=t)});return a}function en(t,n,r){var i=1/0,a=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Jr(t))for(var u=-1,s=t.length;++uc&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);i>o&&(i=o,a=t)});return a}function nn(t,n,r,i){if(!t)return r;var a=arguments.length<3;n=e.createCallback(n,i,4);var o=-1,u=t.length;if("number"==typeof u)for(a&&(r=t[++o]);++on?Hr(0,i+n):n||0}else if(n){var a=Mn(t,e);return t[a]===e?a:-1}return r(t,e,n)}function bn(t,n,r){var i=0,a=t?t.length:0;if("number"!=typeof n&&null!=n){var o=a;for(n=e.createCallback(n,r,3);o--&&n(t[o],o,t);)i++}else i=null==n||r?1:n||i;return p(t,0,Gr(Hr(0,a-i),a))}function _n(){for(var t=[],e=-1,n=arguments.length,a=l(),o=se(),u=o===r,c=l();++e=x&&s(e?t[e]:c)))}var p=t[0],g=-1,y=p?p.length:0,m=[];t:for(;++gn?Hr(0,r+n):Gr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function An(t){for(var e=arguments,n=0,r=e.length,i=t?t.length:0;++na;){var u=a+o>>>1;r(t[u])1?arguments:arguments[0],e=-1,n=t?tn(di(t,"length")):0,r=pr(0>n?0:n);++e2?oe(t,17,p(arguments,2),null,e):oe(t,1,null,null,e)}function In(t){for(var e=arguments.length>1?Q(arguments,!0,!1,1):_e(t),n=-1,r=e.length;++n2?oe(e,19,p(arguments,2),null,t):oe(e,3,null,null,t)}function Rn(){for(var t=arguments,e=t.length;e--;)if(!Ce(t[e]))throw new Ar;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Pn(t,e){return e="number"==typeof e?e:+e||t.length,oe(t,4,null,null,null,e)}function Un(t,e,n){var r,i,a,o,u,s,c,l=0,h=!1,f=!0;if(!Ce(t))throw new Ar;if(e=Hr(0,e)||0,n===!0){var d=!0;f=!1}else Te(n)&&(d=n.leading,h="maxWait"in n&&(Hr(e,n.maxWait)||0),f="trailing"in n?n.trailing:f);var p=function(){var n=e-(gi()-o);if(0>=n){i&&Tr(i);var h=c;i=s=c=y,h&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))}else s=Ir(p,n)},g=function(){s&&Tr(s),i=s=c=y,(f||h!==e)&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))};return function(){if(r=arguments,o=gi(),u=this,c=f&&(s||!d),h===!1)var n=d&&!s;else{i||d||(l=o);var y=h-(o-l),m=0>=y;m?(i&&(i=Tr(i)),l=o,a=t.apply(u,r)):i||(i=Ir(g,y))}return m&&s?s=Tr(s):s||e===h||(s=Ir(p,e)),n&&(m=!0,a=t.apply(u,r)),!m||s||i||(r=u=null),a}}function Yn(t){if(!Ce(t))throw new Ar;var e=p(arguments,1);return Ir(function(){t.apply(y,e)},1)}function jn(t,e){if(!Ce(t))throw new Ar;var n=p(arguments,2);return Ir(function(){t.apply(y,n)},e)}function zn(t,e){if(!Ce(t))throw new Ar;var n=function(){var r=n.cache,i=e?e.apply(this,arguments):_+arguments[0];return Nr.call(r,i)?r[i]:r[i]=t.apply(this,arguments)};return n.cache={},n}function Vn(t){var e,n;if(!Ce(t))throw new Ar;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Hn(t){return oe(t,16,p(arguments,1))}function Gn(t){return oe(t,32,null,p(arguments,1))}function $n(t,e,n){var r=!0,i=!0;if(!Ce(t))throw new Ar;return n===!1?r=!1:Te(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),$.leading=r,$.maxWait=e,$.trailing=i,Un(t,e,$)}function Wn(t,e){return oe(e,16,[t])}function Zn(t){return function(){return t}}function Xn(t,e,n){var r=typeof t;if(null==t||"function"==r)return w(t,e,n);if("object"!=r)return nr(t);var i=ti(t),a=i[0],o=t[a];return 1!=i.length||o!==o||Te(o)?function(e){for(var n=i.length,r=!1;n--&&(r=te(e[i[n]],t[i[n]],null,!0)););return r}:function(t){var e=t[a];return o===e&&(0!==o||1/o==1/e)}}function Kn(t){return null==t?"":wr(t).replace(ii,ue)}function Jn(t){return t}function Qn(t,r,i){var a=!0,o=r&&_e(r);r&&(i||o.length)||(null==i&&(i=r),u=n,r=t,t=e,o=_e(r)),i===!1?a=!1:Te(i)&&"chain"in i&&(a=i.chain);var u=t,s=Ce(u);Xe(o,function(e){var n=t[e]=r[e];s&&(u.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=[r];Or.apply(i,arguments);var o=n.apply(t,i);if(a||e){if(r===o&&Te(o))return this;o=new u(o),o.__chain__=e}return o})})}function tr(){return t._=Dr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,i=null==e;if(null==n&&("boolean"==typeof t&&i?(n=t,t=1):i||"boolean"!=typeof e||(n=e,i=!0)),r&&i&&(e=1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var a=Wr();return Gr(t+a*(e-t+parseFloat("1e-"+((a+"").length-1))),e)}return re(t,e)}function ir(t,e){if(t){var n=t[e];return Ce(n)?t[e]():n}}function ar(t,n,r){var i=e.templateSettings;t=wr(t||""),r=oi({},r,i);var a,o=oi({},r.imports,i.imports),u=ti(o),s=ze(o),l=0,h=r.interpolate||L,f="__p += '",d=xr((r.escape||L).source+"|"+h.source+"|"+(h===T?M:L).source+"|"+(r.evaluate||L).source+"|$","g");t.replace(d,function(e,n,r,i,o,u){return r||(r=i),f+=t.slice(l,u).replace(N,c),n&&(f+="' +\n__e("+n+") +\n'"),o&&(a=!0,f+="';\n"+o+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),f+="';\n";var p=r.variable,g=p;g||(p="obj",f="with ("+p+") {\n"+f+"\n}\n"),f=(a?f.replace(k,""):f).replace(E,"$1").replace(D,"$1;"),f="function("+p+") {\n"+(g?"":p+" || ("+p+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+I++ +"]")+"\n*/";try{var v=mr(u,"return "+f+m).apply(y,s)}catch(b){throw b.source=f,b}return n?v(n):(v.source=f,v)}function or(t,e,n){t=(t=+t)>-1?t:0;var r=-1,i=pr(t);for(e=w(e,n,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:e}},Ur||(v=function(){function e(){}return function(n){if(Te(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Kr=Pr?function(t,e){W.value=e,Pr(t,"__bindData__",W)}:er,Jr=Yr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Mr.call(t)==R||!1},Qr=function(t){var e,n=t,r=[];if(!n)return r;if(!Z[typeof t])return r;for(e in n)Nr.call(n,e)&&r.push(e);return r},ti=Vr?function(t){return Te(t)?Vr(t):[]}:Qr,ei={"&":"&","<":"<",">":">",'"':""","'":"'"},ni=we(ei),ri=xr("("+ti(ni).join("|")+")","g"),ii=xr("["+ti(ei).join("")+"]","g"),ai=function(t,e,n){var r,i=t,a=i;if(!i)return a;var o=arguments,u=0,s="number"==typeof n?2:o.length;if(s>3&&"function"==typeof o[s-2])var c=w(o[--s-1],o[s--],2);else s>2&&"function"==typeof o[s-1]&&(c=o[--s]);for(;++u/g,F=RegExp("^["+A+"]*0+(?=.$)"),L=/($^)/,B=/\bthis\b/,N=/['\n\r\t\u2028\u2029\\]/g,O=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],I=0,q="[object Arguments]",R="[object Array]",P="[object Boolean]",U="[object Date]",Y="[object Function]",j="[object Number]",z="[object Object]",V="[object RegExp]",H="[object String]",G={};G[Y]=!1,G[q]=G[R]=G[P]=G[U]=G[j]=G[z]=G[V]=G[H]=!0;var $={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},X={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},K=Z[typeof window]&&window||this,J=Z[typeof n]&&n&&!n.nodeType&&n,Q=Z[typeof e]&&e&&!e.nodeType&&e,te=Q&&Q.exports===J&&J,ee=Z[typeof t]&&t;!ee||ee.global!==ee&&ee.window!==ee||(K=ee);var ne=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(K._=ne,define(function(){return ne})):J&&Q?te?(Q.exports=ne)._=ne:J._=ne:K._=ne}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(t,e,n){!function(t,r){"object"==typeof n&&"undefined"!=typeof e?e.exports=r():"function"==typeof define&&define.amd?define(r):t.moment=r()}(this,function(){"use strict";function n(){return Cr.apply(null,arguments)}function r(t){Cr=t}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function a(t){return"[object Array]"===Object.prototype.toString.call(t)}function o(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function u(t,e){var n,r=[];for(n=0;n0)for(n in Fr)r=Fr[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function p(t){d(this,t),this._d=new Date(+t._d),Lr===!1&&(Lr=!0,n.updateOffset(this),Lr=!1)}function g(t){return t instanceof p||null!=t&&s(t,"_isAMomentObject")}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function m(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;i>r;r++)(n&&t[r]!==e[r]||!n&&y(t[r])!==y(e[r]))&&o++;return o+a}function v(){}function b(t){return t?t.toLowerCase().replace("_","-"):t}function _(t){for(var e,n,r,i,a=0;a0;){if(r=x(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&m(i,n,!0)>=e-1)break;e--}a++}return null}function x(n){var r=null;if(!Br[n]&&"undefined"!=typeof e&&e&&e.exports)try{r=Tr._abbr,t("./locale/"+n),w(r)}catch(i){}return Br[n]}function w(t,e){var n;return t&&(n="undefined"==typeof e?k(t):A(t,e),n&&(Tr=n)),Tr._abbr}function A(t,e){return null!==e?(e.abbr=t,Br[t]||(Br[t]=new v),Br[t].set(e),w(t),Br[t]):(delete Br[t],null)}function k(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Tr;if(!a(t)){if(e=x(t))return e;t=[t]}return _(t)}function E(t,e){var n=t.toLowerCase();Nr[n]=Nr[n+"s"]=Nr[e]=t}function D(t){return"string"==typeof t?Nr[t]||Nr[t.toLowerCase()]:void 0}function M(t){var e,n,r={};for(n in t)s(t,n)&&(e=D(n),e&&(r[e]=t[n]));return r}function S(t,e){return function(r){return null!=r?(T(this,t,r),n.updateOffset(this,e),this):C(this,t)}}function C(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function T(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function F(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=D(t),"function"==typeof this[t])return this[t](e);return this}function L(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.lengthe;e++)r[e]=Rr[r[e]]?Rr[r[e]]:N(r[e]);return function(i){var a="";for(e=0;n>e;e++)a+=r[e]instanceof Function?r[e].call(i,t):r[e];return a}}function I(t,e){return t.isValid()?(e=q(e,t.localeData()),qr[e]||(qr[e]=O(e)),qr[e](t)):t.localeData().invalidDate()}function q(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Ir.lastIndex=0;r>=0&&Ir.test(t);)t=t.replace(Ir,n),Ir.lastIndex=0,r-=1;return t}function R(t,e,n){Qr[t]="function"==typeof e?e:function(t){return t&&n?n:e}}function P(t,e){return s(Qr,t)?Qr[t](e._strict,e._locale):new RegExp(U(t))}function U(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=y(t)}),n=0;nr;r++){if(i=l([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function W(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function Z(t){return null!=t?(W(this,t),n.updateOffset(this,!0),this):C(this,"Month")}function X(){return V(this.year(),this.month())}function K(t){var e,n=t._a;return n&&-2===t._pf.overflow&&(e=n[ni]<0||n[ni]>11?ni:n[ri]<1||n[ri]>V(n[ei],n[ni])?ri:n[ii]<0||n[ii]>24||24===n[ii]&&(0!==n[ai]||0!==n[oi]||0!==n[ui])?ii:n[ai]<0||n[ai]>59?ai:n[oi]<0||n[oi]>59?oi:n[ui]<0||n[ui]>999?ui:-1,t._pf._overflowDayOfYear&&(ei>e||e>ri)&&(e=ri),t._pf.overflow=e),t}function J(t){n.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function Q(t,e){var n=!0;return c(function(){return n&&(J(t),n=!1),e.apply(this,arguments)},e)}function te(t,e){li[t]||(J(e),li[t]=!0)}function ee(t){var e,n,r=t._i,i=hi.exec(r);if(i){for(t._pf.iso=!0,e=0,n=fi.length;n>e;e++)if(fi[e][1].exec(r)){t._f=fi[e][0]+(i[6]||" ");break}for(e=0,n=di.length;n>e;e++)if(di[e][1].exec(r)){t._f+=di[e][0];break}r.match(Xr)&&(t._f+="Z"),_e(t)}else t._isValid=!1}function ne(t){var e=pi.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(ee(t),void(t._isValid===!1&&(delete t._isValid,n.createFromInputFallback(t))))}function re(t,e,n,r,i,a,o){var u=new Date(t,e,n,r,i,a,o);return 1970>t&&u.setFullYear(t),u}function ie(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ae(t){return oe(t)?366:365}function oe(t){return t%4===0&&t%100!==0||t%400===0}function ue(){return oe(this.year())}function se(t,e,n){var r,i=n-e,a=n-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Me(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ce(t){return se(t,this._week.dow,this._week.doy).week}function le(){return this._week.dow}function he(){return this._week.doy}function fe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function de(t){var e=se(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function pe(t,e,n,r,i){var a,o,u=ie(t,0,1).getUTCDay();return u=0===u?7:u,n=null!=n?n:i,a=i-u+(u>r?7:0)-(i>u?7:0),o=7*(e-1)+(n-i)+a+1,{year:o>0?t:t-1,dayOfYear:o>0?o:ae(t-1)+o}}function ge(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function ye(t,e,n){return null!=t?t:null!=e?e:n}function me(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ve(t){var e,n,r,i,a=[];if(!t._d){for(r=me(t),t._w&&null==t._a[ri]&&null==t._a[ni]&&be(t),t._dayOfYear&&(i=ye(t._a[ei],r[ei]),t._dayOfYear>ae(i)&&(t._pf._overflowDayOfYear=!0),n=ie(i,0,t._dayOfYear),t._a[ni]=n.getUTCMonth(),t._a[ri]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;7>e;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ii]&&0===t._a[ai]&&0===t._a[oi]&&0===t._a[ui]&&(t._nextDay=!0,t._a[ii]=0),t._d=(t._useUTC?ie:re).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ii]=24)}}function be(t){var e,n,r,i,a,o,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,o=4,n=ye(e.GG,t._a[ei],se(Me(),1,4).year),r=ye(e.W,1),i=ye(e.E,1)):(a=t._locale._week.dow,o=t._locale._week.doy,n=ye(e.gg,t._a[ei],se(Me(),a,o).year),r=ye(e.w,1),null!=e.d?(i=e.d,a>i&&++r):i=null!=e.e?e.e+a:a),u=pe(n,r,i,o,a),t._a[ei]=u.year,t._dayOfYear=u.dayOfYear}function _e(t){if(t._f===n.ISO_8601)return void ee(t);t._a=[],t._pf.empty=!0;var e,r,i,a,o,u=""+t._i,s=u.length,c=0;for(i=q(t._f,t._locale).match(Or)||[],e=0;e0&&t._pf.unusedInput.push(o),u=u.slice(u.indexOf(r)+r.length),c+=r.length),Rr[a]?(r?t._pf.empty=!1:t._pf.unusedTokens.push(a),z(a,r,t)):t._strict&&!r&&t._pf.unusedTokens.push(a);t._pf.charsLeftOver=s-c,u.length>0&&t._pf.unusedInput.push(u),t._pf.bigHour===!0&&t._a[ii]<=12&&(t._pf.bigHour=void 0),t._a[ii]=xe(t._locale,t._a[ii],t._meridiem),ve(t),K(t)}function xe(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function we(t){var e,n,r,a,o;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(a=0;ao)&&(r=o,n=e));c(t,n||e)}function Ae(t){if(!t._d){var e=M(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],ve(t)}}function ke(t){var e,n=t._i,r=t._f;return t._locale=t._locale||k(t._l),null===n||void 0===r&&""===n?f({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),g(n)?new p(K(n)):(a(r)?we(t):r?_e(t):Ee(t),e=new p(K(t)),e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e))}function Ee(t){var e=t._i;void 0===e?t._d=new Date:o(e)?t._d=new Date(+e):"string"==typeof e?ne(t):a(e)?(t._a=u(e.slice(0),function(t){return parseInt(t,10)}),ve(t)):"object"==typeof e?Ae(t):"number"==typeof e?t._d=new Date(e):n.createFromInputFallback(t)}function De(t,e,n,r,a){var o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=n,o._i=t,o._f=e,o._strict=r,o._pf=i(),ke(o)}function Me(t,e,n,r){return De(t,e,n,r,!1)}function Se(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Me();for(n=e[0],r=1;rt&&(t=-t,n="-"),n+L(~~(t/60),2)+e+L(~~t%60,2)})}function Ne(t){var e=(t||"").match(Xr)||[],n=e[e.length-1]||[],r=(n+"").match(bi)||["-",0,0],i=+(60*r[1])+y(r[2]);return"+"===r[0]?i:-i}function Oe(t,e){var r,i;return e._isUTC?(r=e.clone(),i=(g(t)||o(t)?+t:+Me(t))-+r,r._d.setTime(+r._d+i),n.updateOffset(r,!1),r):Me(t).local()}function Ie(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function qe(t,e){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Ne(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(r=Ie(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?Qe(this,We(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ie(this)}function Re(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Pe(t){return this.utcOffset(0,t)}function Ue(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),"m")),this}function Ye(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ne(this._i)),this}function je(t){return t=t?Me(t).utcOffset():0,(this.utcOffset()-t)%60===0}function ze(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ve(){if(this._a){var t=this._isUTC?l(this._a):Me(this._a);return this.isValid()&&m(this._a,t.toArray())>0}return!1}function He(){return!this._isUTC}function Ge(){return this._isUTC}function $e(){return this._isUTC&&0===this._offset}function We(t,e){var n,r,i,a=t,o=null;return Le(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=_i.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:y(o[ri])*n,h:y(o[ii])*n,m:y(o[ai])*n,s:y(o[oi])*n,ms:y(o[ui])*n}):(o=xi.exec(t))?(n="-"===o[1]?-1:1,a={y:Ze(o[2],n),M:Ze(o[3],n),d:Ze(o[4],n),h:Ze(o[5],n),m:Ze(o[6],n),s:Ze(o[7],n),w:Ze(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Ke(Me(a.from),Me(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new Fe(a),Le(t)&&s(t,"_locale")&&(r._locale=t._locale),r}function Ze(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Xe(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ke(t,e){var n;return e=Oe(e,t),t.isBefore(e)?n=Xe(t,e):(n=Xe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Je(t,e){return function(n,r){var i,a;return null===r||isNaN(+r)||(te(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),a=n,n=r,r=a),n="string"==typeof n?+n:n,i=We(n,r),Qe(this,i,t),this}}function Qe(t,e,r,i){var a=e._milliseconds,o=e._days,u=e._months;i=null==i?!0:i,a&&t._d.setTime(+t._d+a*r),o&&T(t,"Date",C(t,"Date")+o*r),u&&W(t,C(t,"Month")+u*r),i&&n.updateOffset(t,o||u)}function tn(t){var e=t||Me(),n=Oe(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Me(e)))}function en(){return new p(this)}function nn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+this>+t):(n=g(t)?+t:+Me(t),n<+this.clone().startOf(e))}function rn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+t>+this):(n=g(t)?+t:+Me(t),+this.clone().endOf(e)t?Math.ceil(t):Math.floor(t)}function sn(t,e,n){var r,i,a=Oe(t,this),o=6e4*(a.utcOffset()-this.utcOffset());return e=D(e),"year"===e||"month"===e||"quarter"===e?(i=cn(this,a),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-a,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-o)/864e5:"week"===e?(r-o)/6048e5:r),n?i:un(i)}function cn(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months");return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1,"months"),r=(e-a)/(n-a)),-(i+r)}function ln(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function hn(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=Me([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Rn(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Bn(t,this.localeData()),this.add(t-e,"d")):e}function Pn(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Un(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Yn(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function jn(t,e){return e._meridiemParse}function zn(t){return"p"===(t+"").toLowerCase().charAt(0)}function Vn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Hn(t){B(0,[t,3],0,"millisecond")}function Gn(){return this._isUTC?"UTC":""}function $n(){return this._isUTC?"Coordinated Universal Time":""}function Wn(t){return Me(1e3*t)}function Zn(){return Me.apply(null,arguments).parseZone()}function Xn(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.call(e,n):r}function Kn(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e}function Jn(){return this._invalidDate}function Qn(t){return this._ordinal.replace("%d",t)}function tr(t){return t}function er(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)}function nr(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function rr(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ir(t,e,n,r){var i=k(),a=l().set(r,e);return i[n](a,t)}function ar(t,e,n,r,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ir(t,e,n,i);var a,o=[];for(a=0;r>a;a++)o[a]=ir(t,a,n,i);return o}function or(t,e){return ar(t,e,"months",12,"month")}function ur(t,e){return ar(t,e,"monthsShort",12,"month")}function sr(t,e){return ar(t,e,"weekdays",7,"day")}function cr(t,e){return ar(t,e,"weekdaysShort",7,"day")}function lr(t,e){return ar(t,e,"weekdaysMin",7,"day")}function hr(){var t=this._data;return this._milliseconds=zi(this._milliseconds),this._days=zi(this._days),this._months=zi(this._months),t.milliseconds=zi(t.milliseconds),t.seconds=zi(t.seconds),t.minutes=zi(t.minutes),t.hours=zi(t.hours),t.months=zi(t.months),t.years=zi(t.years),this}function fr(t,e,n,r){var i=We(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function dr(t,e){return fr(this,t,e,1)}function pr(t,e){return fr(this,t,e,-1)}function gr(){var t,e,n,r=this._milliseconds,i=this._days,a=this._months,o=this._data,u=0;return o.milliseconds=r%1e3,t=un(r/1e3),o.seconds=t%60,e=un(t/60),o.minutes=e%60,n=un(e/60),o.hours=n%24,i+=un(n/24),u=un(yr(i)),i-=un(mr(u)),a+=un(i/30),i%=30,u+=un(a/12),a%=12,o.days=i,o.months=a,o.years=u,this}function yr(t){return 400*t/146097}function mr(t){return 146097*t/400}function vr(t){var e,n,r=this._milliseconds;if(t=D(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+12*yr(e),"month"===t?n:n/12;switch(e=this._days+Math.round(mr(this._months/12)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 24*e*60+r/6e4;case"second":return 24*e*60*60+r/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+r;default:throw new Error("Unknown unit "+t)}}function br(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function _r(t){return function(){return this.as(t)}}function xr(t){return t=D(t),this[t+"s"]()}function wr(t){return function(){return this._data[t]}}function Ar(){return un(this.days()/7)}function kr(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Er(t,e,n){var r=We(t).abs(),i=aa(r.as("s")),a=aa(r.as("m")),o=aa(r.as("h")),u=aa(r.as("d")),s=aa(r.as("M")),c=aa(r.as("y")),l=i0,l[4]=n,kr.apply(null,l)}function Dr(t,e){return void 0===oa[t]?!1:void 0===e?oa[t]:(oa[t]=e,!0)}function Mr(t){var e=this.localeData(),n=Er(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Sr(){var t=ua(this.years()),e=ua(this.months()),n=ua(this.days()),r=ua(this.hours()),i=ua(this.minutes()),a=ua(this.seconds()+this.milliseconds()/1e3),o=this.asSeconds();return o?(0>o?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"}var Cr,Tr,Fr=n.momentProperties=[],Lr=!1,Br={},Nr={},Or=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ir=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qr={},Rr={},Pr=/\d/,Ur=/\d\d/,Yr=/\d{3}/,jr=/\d{4}/,zr=/[+-]?\d{6}/,Vr=/\d\d?/,Hr=/\d{1,3}/,Gr=/\d{1,4}/,$r=/[+-]?\d{1,6}/,Wr=/\d+/,Zr=/[+-]?\d+/,Xr=/Z|[+-]\d\d:?\d\d/gi,Kr=/[+-]?\d+(\.\d{1,3})?/,Jr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Qr={},ti={},ei=0,ni=1,ri=2,ii=3,ai=4,oi=5,ui=6;B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),E("month","M"),R("M",Vr),R("MM",Vr,Ur),R("MMM",Jr),R("MMMM",Jr),Y(["M","MM"],function(t,e){e[ni]=y(t)-1}),Y(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[ni]=i:n._pf.invalidMonth=t});var si="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ci="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),li={};n.suppressDeprecationWarnings=!1;var hi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],di=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],pi=/^\/?Date\((\-?\d+)/i;n.createFromInputFallback=Q("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),E("year","y"),R("Y",Zr),R("YY",Vr,Ur),R("YYYY",Gr,jr),R("YYYYY",$r,zr),R("YYYYYY",$r,zr),Y(["YYYY","YYYYY","YYYYYY"],ei),Y("YY",function(t,e){e[ei]=n.parseTwoDigitYear(t)}),n.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var gi=S("FullYear",!1);B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),R("w",Vr),R("ww",Vr,Ur),R("W",Vr),R("WW",Vr,Ur),j(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=y(t)});var yi={dow:0,doy:6};B("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),R("DDD",Hr),R("DDDD",Yr),Y(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),n.ISO_8601=function(){};var mi=Q("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return this>t?this:t}),vi=Q("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return t>this?this:t});Be("Z",":"),Be("ZZ",""),R("Z",Xr),R("ZZ",Xr),Y(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ne(t)});var bi=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var _i=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,xi=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;We.fn=Fe.prototype;var wi=Je(1,"add"),Ai=Je(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var ki=Q("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Dn("gggg","weekYear"),Dn("ggggg","weekYear"),Dn("GGGG","isoWeekYear"),Dn("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),R("G",Zr),R("g",Zr),R("GG",Vr,Ur),R("gg",Vr,Ur),R("GGGG",Gr,jr),R("gggg",Gr,jr),R("GGGGG",$r,zr),R("ggggg",$r,zr),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=y(t)}),j(["gg","GG"],function(t,e,r,i){e[i]=n.parseTwoDigitYear(t)}),B("Q",0,0,"quarter"),E("quarter","Q"),R("Q",Pr),Y("Q",function(t,e){e[ni]=3*(y(t)-1)}),B("D",["DD",2],"Do","date"),E("date","D"),R("D",Vr),R("DD",Vr,Ur),R("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Y(["D","DD"],ri),Y("Do",function(t,e){e[ri]=y(t.match(Vr)[0],10)});var Ei=S("Date",!0);B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),R("d",Vr),R("e",Vr),R("E",Vr),R("dd",Jr),R("ddd",Jr),R("dddd",Jr),j(["dd","ddd","dddd"],function(t,e,n){var r=n._locale.weekdaysParse(t);null!=r?e.d=r:n._pf.invalidWeekday=t}),j(["d","e","E"],function(t,e,n,r){e[r]=y(t)});var Di="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Si="Su_Mo_Tu_We_Th_Fr_Sa".split("_");B("H",["HH",2],0,"hour"),B("h",["hh",2],0,function(){return this.hours()%12||12}),Yn("a",!0),Yn("A",!1),E("hour","h"),R("a",jn),R("A",jn),R("H",Vr),R("h",Vr),R("HH",Vr,Ur),R("hh",Vr,Ur),Y(["H","HH"],ii),Y(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Y(["h","hh"],function(t,e,n){e[ii]=y(t),n._pf.bigHour=!0});var Ci=/[ap]\.?m?\.?/i,Ti=S("Hours",!0);B("m",["mm",2],0,"minute"),E("minute","m"),R("m",Vr),R("mm",Vr,Ur),Y(["m","mm"],ai);var Fi=S("Minutes",!1);B("s",["ss",2],0,"second"),E("second","s"),R("s",Vr),R("ss",Vr,Ur),Y(["s","ss"],oi);var Li=S("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Hn("SSS"),Hn("SSSS"),E("millisecond","ms"),R("S",Hr,Pr),R("SS",Hr,Ur),R("SSS",Hr,Yr),R("SSSS",Wr),Y(["S","SS","SSS","SSSS"],function(t,e){e[ui]=y(1e3*("0."+t))});var Bi=S("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var Ni=p.prototype;Ni.add=wi,Ni.calendar=tn,Ni.clone=en,Ni.diff=sn,Ni.endOf=vn,Ni.format=fn,Ni.from=dn,Ni.fromNow=pn,Ni.get=F,Ni.invalidAt=En,Ni.isAfter=nn,Ni.isBefore=rn,Ni.isBetween=an,Ni.isSame=on,Ni.isValid=An,Ni.lang=ki,Ni.locale=gn,Ni.localeData=yn,Ni.max=vi,Ni.min=mi,Ni.parsingFlags=kn,Ni.set=F,Ni.startOf=mn,Ni.subtract=Ai,Ni.toArray=wn,Ni.toDate=xn,Ni.toISOString=hn,Ni.toJSON=hn,Ni.toString=ln,Ni.unix=_n,Ni.valueOf=bn,Ni.year=gi,Ni.isLeapYear=ue,Ni.weekYear=Sn,Ni.isoWeekYear=Cn,Ni.quarter=Ni.quarters=Ln,Ni.month=Z,Ni.daysInMonth=X,Ni.week=Ni.weeks=fe,Ni.isoWeek=Ni.isoWeeks=de,Ni.weeksInYear=Fn,Ni.isoWeeksInYear=Tn,Ni.date=Ei,Ni.day=Ni.days=Rn,Ni.weekday=Pn,Ni.isoWeekday=Un,Ni.dayOfYear=ge,Ni.hour=Ni.hours=Ti,Ni.minute=Ni.minutes=Fi,Ni.second=Ni.seconds=Li,Ni.millisecond=Ni.milliseconds=Bi,Ni.utcOffset=qe,Ni.utc=Pe,Ni.local=Ue,Ni.parseZone=Ye,Ni.hasAlignedHourOffset=je,Ni.isDST=ze,Ni.isDSTShifted=Ve,Ni.isLocal=He,Ni.isUtcOffset=Ge,Ni.isUtc=$e,Ni.isUTC=$e,Ni.zoneAbbr=Gn,Ni.zoneName=$n,Ni.dates=Q("dates accessor is deprecated. Use date instead.",Ei),Ni.months=Q("months accessor is deprecated. Use month instead",Z),Ni.years=Q("years accessor is deprecated. Use year instead",gi),Ni.zone=Q("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Re);var Oi=Ni,Ii={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},qi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Ri="Invalid date",Pi="%d",Ui=/\d{1,2}/,Yi={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ji=v.prototype;ji._calendar=Ii,ji.calendar=Xn,ji._longDateFormat=qi,ji.longDateFormat=Kn,ji._invalidDate=Ri,ji.invalidDate=Jn,ji._ordinal=Pi,ji.ordinal=Qn,ji._ordinalParse=Ui,ji.preparse=tr,ji.postformat=tr,ji._relativeTime=Yi,ji.relativeTime=er,ji.pastFuture=nr,ji.set=rr,ji.months=H,ji._months=si,ji.monthsShort=G,ji._monthsShort=ci,ji.monthsParse=$,ji.week=ce,ji._week=yi,ji.firstDayOfYear=he,ji.firstDayOfWeek=le,ji.weekdays=Nn,ji._weekdays=Di,ji.weekdaysMin=In,ji._weekdaysMin=Si,ji.weekdaysShort=On,ji._weekdaysShort=Mi,ji.weekdaysParse=qn,ji.isPM=zn,ji._meridiemParse=Ci,ji.meridiem=Vn,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),n.lang=Q("moment.lang is deprecated. Use moment.locale instead.",w),n.langData=Q("moment.langData is deprecated. Use moment.localeData instead.",k);var zi=Math.abs,Vi=_r("ms"),Hi=_r("s"),Gi=_r("m"),$i=_r("h"),Wi=_r("d"),Zi=_r("w"),Xi=_r("M"),Ki=_r("y"),Ji=wr("milliseconds"),Qi=wr("seconds"),ta=wr("minutes"),ea=wr("hours"),na=wr("days"),ra=wr("months"),ia=wr("years"),aa=Math.round,oa={s:45,m:45,h:22,d:26,M:11},ua=Math.abs,sa=Fe.prototype; +sa.abs=hr,sa.add=dr,sa.subtract=pr,sa.as=vr,sa.asMilliseconds=Vi,sa.asSeconds=Hi,sa.asMinutes=Gi,sa.asHours=$i,sa.asDays=Wi,sa.asWeeks=Zi,sa.asMonths=Xi,sa.asYears=Ki,sa.valueOf=br,sa._bubble=gr,sa.get=xr,sa.milliseconds=Ji,sa.seconds=Qi,sa.minutes=ta,sa.hours=ea,sa.days=na,sa.weeks=Ar,sa.months=ra,sa.years=ia,sa.humanize=Mr,sa.toISOString=Sr,sa.toString=Sr,sa.toJSON=Sr,sa.locale=gn,sa.localeData=yn,sa.toIsoString=Q("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Sr),sa.lang=ki,B("X",0,0,"unix"),B("x",0,0,"valueOf"),R("x",Zr),R("X",Kr),Y("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,n){n._d=new Date(y(t))}),n.version="2.10.2",r(Me),n.fn=Oi,n.min=Ce,n.max=Te,n.utc=l,n.unix=Wn,n.months=or,n.isDate=o,n.locale=w,n.invalid=f,n.duration=We,n.isMoment=g,n.weekdays=sr,n.parseZone=Zn,n.localeData=k,n.isDuration=Le,n.monthsShort=ur,n.weekdaysMin=lr,n.defineLocale=A,n.weekdaysShort=cr,n.normalizeUnits=D,n.relativeTimeThreshold=Dr;var ca=n;return ca})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],A=[10,28,37,57,58],k=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(A,k,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(A,[2,48]),e(A,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(A,[2,51],{45:[1,86]}),e(A,[2,52]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(A,[2,59]),e(A,[2,60]),e(A,[2,61]),e(A,[2,62]),e(A,[2,63]),e(A,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(A,k,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(A,[2,55]),{10:[1,94]},e(A,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(A,[2,54]),{5:[2,3]},e(A,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(A,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; +if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],A=[1,40],k=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; +case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) +},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file diff --git a/dist/mermaid.slim.js b/dist/mermaid.slim.js index bd1fd3396b..31c71b2112 100644 --- a/dist/mermaid.slim.js +++ b/dist/mermaid.slim.js @@ -9403,13 +9403,18 @@ function createEdgePaths(selection, g, arrows) { util.applyTransition(svgPaths, g) .style("opacity", 1); - // Save DOM element in the path group, and set ID + // Save DOM element in the path group, and set ID and class svgPaths.each(function(e) { + var domEdge = d3.select(this); var edge = g.edge(e); edge.elem = this; + if (edge.id) { - d3.select(this).attr("id", edge.id); + domEdge.attr("id", edge.id); } + + util.applyClass(domEdge, edge["class"], + (domEdge.classed("update") ? "update " : "") + "edgePath"); }); svgPaths.selectAll("path.path") @@ -10309,7 +10314,7 @@ function applyTransition(selection, g) { } },{"./lodash":21}],27:[function(require,module,exports){ -module.exports = "0.4.2"; +module.exports = "0.4.3"; },{}],28:[function(require,module,exports){ /* @@ -21733,485 +21738,66 @@ process.chdir = function (dir) { }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{}],83:[function(require,module,exports){ -(function (global){ //! moment.js -//! version : 2.9.0 +//! version : 2.10.2 //! authors : Tim Wood, Iskren Chernev, Moment.js contributors //! license : MIT //! momentjs.com -(function (undefined) { - /************************************ - Constants - ************************************/ - - var moment, - VERSION = '2.9.0', - // the global-scope this is NOT the global object in Node.js - globalScope = (typeof global !== 'undefined' && (typeof window === 'undefined' || window === global.window)) ? global : this, - oldGlobalMoment, - round = Math.round, - hasOwnProperty = Object.prototype.hasOwnProperty, - i, - - YEAR = 0, - MONTH = 1, - DATE = 2, - HOUR = 3, - MINUTE = 4, - SECOND = 5, - MILLISECOND = 6, - - // internal storage for locale config files - locales = {}, - - // extra moment internal properties (plugins register props here) - momentProperties = [], - - // check for nodeJS - hasModule = (typeof module !== 'undefined' && module && module.exports), - - // ASP.NET json date format regex - aspNetJsonRegex = /^\/?Date\((\-?\d+)/i, - aspNetTimeSpanJsonRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/, - - // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html - // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere - isoDurationRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/, - - // format tokens - formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g, - localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, - - // parsing token regexes - parseTokenOneOrTwoDigits = /\d\d?/, // 0 - 99 - parseTokenOneToThreeDigits = /\d{1,3}/, // 0 - 999 - parseTokenOneToFourDigits = /\d{1,4}/, // 0 - 9999 - parseTokenOneToSixDigits = /[+\-]?\d{1,6}/, // -999,999 - 999,999 - parseTokenDigits = /\d+/, // nonzero number of digits - parseTokenWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i, // any word (or two) characters or numbers including two/three word month in arabic. - parseTokenTimezone = /Z|[\+\-]\d\d:?\d\d/gi, // +00:00 -00:00 +0000 -0000 or Z - parseTokenT = /T/i, // T (ISO separator) - parseTokenOffsetMs = /[\+\-]?\d+/, // 1234567890123 - parseTokenTimestampMs = /[\+\-]?\d+(\.\d{1,3})?/, // 123456789 123456789.123 - - //strict parsing regexes - parseTokenOneDigit = /\d/, // 0 - 9 - parseTokenTwoDigits = /\d\d/, // 00 - 99 - parseTokenThreeDigits = /\d{3}/, // 000 - 999 - parseTokenFourDigits = /\d{4}/, // 0000 - 9999 - parseTokenSixDigits = /[+-]?\d{6}/, // -999,999 - 999,999 - parseTokenSignedNumber = /[+-]?\d+/, // -inf - inf - - // iso 8601 regex - // 0000-00-00 0000-W00 or 0000-W00-0 + T + 00 or 00:00 or 00:00:00 or 00:00:00.000 + +00:00 or +0000 or +00) - isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/, - - isoFormat = 'YYYY-MM-DDTHH:mm:ssZ', - - isoDates = [ - ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], - ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], - ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], - ['GGGG-[W]WW', /\d{4}-W\d{2}/], - ['YYYY-DDD', /\d{4}-\d{3}/] - ], - - // iso time formats and regexes - isoTimes = [ - ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], - ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], - ['HH:mm', /(T| )\d\d:\d\d/], - ['HH', /(T| )\d\d/] - ], - - // timezone chunker '+10:00' > ['10', '00'] or '-1530' > ['-', '15', '30'] - parseTimezoneChunker = /([\+\-]|\d\d)/gi, - - // getter and setter names - proxyGettersAndSetters = 'Date|Hours|Minutes|Seconds|Milliseconds'.split('|'), - unitMillisecondFactors = { - 'Milliseconds' : 1, - 'Seconds' : 1e3, - 'Minutes' : 6e4, - 'Hours' : 36e5, - 'Days' : 864e5, - 'Months' : 2592e6, - 'Years' : 31536e6 - }, - - unitAliases = { - ms : 'millisecond', - s : 'second', - m : 'minute', - h : 'hour', - d : 'day', - D : 'date', - w : 'week', - W : 'isoWeek', - M : 'month', - Q : 'quarter', - y : 'year', - DDD : 'dayOfYear', - e : 'weekday', - E : 'isoWeekday', - gg: 'weekYear', - GG: 'isoWeekYear' - }, - - camelFunctions = { - dayofyear : 'dayOfYear', - isoweekday : 'isoWeekday', - isoweek : 'isoWeek', - weekyear : 'weekYear', - isoweekyear : 'isoWeekYear' - }, - - // format function strings - formatFunctions = {}, - - // default relative time thresholds - relativeTimeThresholds = { - s: 45, // seconds to minute - m: 45, // minutes to hour - h: 22, // hours to day - d: 26, // days to month - M: 11 // months to year - }, - - // tokens to ordinalize and pad - ordinalizeTokens = 'DDD w W M D d'.split(' '), - paddedTokens = 'M D H h m s w W'.split(' '), - - formatTokenFunctions = { - M : function () { - return this.month() + 1; - }, - MMM : function (format) { - return this.localeData().monthsShort(this, format); - }, - MMMM : function (format) { - return this.localeData().months(this, format); - }, - D : function () { - return this.date(); - }, - DDD : function () { - return this.dayOfYear(); - }, - d : function () { - return this.day(); - }, - dd : function (format) { - return this.localeData().weekdaysMin(this, format); - }, - ddd : function (format) { - return this.localeData().weekdaysShort(this, format); - }, - dddd : function (format) { - return this.localeData().weekdays(this, format); - }, - w : function () { - return this.week(); - }, - W : function () { - return this.isoWeek(); - }, - YY : function () { - return leftZeroFill(this.year() % 100, 2); - }, - YYYY : function () { - return leftZeroFill(this.year(), 4); - }, - YYYYY : function () { - return leftZeroFill(this.year(), 5); - }, - YYYYYY : function () { - var y = this.year(), sign = y >= 0 ? '+' : '-'; - return sign + leftZeroFill(Math.abs(y), 6); - }, - gg : function () { - return leftZeroFill(this.weekYear() % 100, 2); - }, - gggg : function () { - return leftZeroFill(this.weekYear(), 4); - }, - ggggg : function () { - return leftZeroFill(this.weekYear(), 5); - }, - GG : function () { - return leftZeroFill(this.isoWeekYear() % 100, 2); - }, - GGGG : function () { - return leftZeroFill(this.isoWeekYear(), 4); - }, - GGGGG : function () { - return leftZeroFill(this.isoWeekYear(), 5); - }, - e : function () { - return this.weekday(); - }, - E : function () { - return this.isoWeekday(); - }, - a : function () { - return this.localeData().meridiem(this.hours(), this.minutes(), true); - }, - A : function () { - return this.localeData().meridiem(this.hours(), this.minutes(), false); - }, - H : function () { - return this.hours(); - }, - h : function () { - return this.hours() % 12 || 12; - }, - m : function () { - return this.minutes(); - }, - s : function () { - return this.seconds(); - }, - S : function () { - return toInt(this.milliseconds() / 100); - }, - SS : function () { - return leftZeroFill(toInt(this.milliseconds() / 10), 2); - }, - SSS : function () { - return leftZeroFill(this.milliseconds(), 3); - }, - SSSS : function () { - return leftZeroFill(this.milliseconds(), 3); - }, - Z : function () { - var a = this.utcOffset(), - b = '+'; - if (a < 0) { - a = -a; - b = '-'; - } - return b + leftZeroFill(toInt(a / 60), 2) + ':' + leftZeroFill(toInt(a) % 60, 2); - }, - ZZ : function () { - var a = this.utcOffset(), - b = '+'; - if (a < 0) { - a = -a; - b = '-'; - } - return b + leftZeroFill(toInt(a / 60), 2) + leftZeroFill(toInt(a) % 60, 2); - }, - z : function () { - return this.zoneAbbr(); - }, - zz : function () { - return this.zoneName(); - }, - x : function () { - return this.valueOf(); - }, - X : function () { - return this.unix(); - }, - Q : function () { - return this.quarter(); - } - }, - - deprecations = {}, - - lists = ['months', 'monthsShort', 'weekdays', 'weekdaysShort', 'weekdaysMin'], +(function (global, factory) { + typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : + typeof define === 'function' && define.amd ? define(factory) : + global.moment = factory() +}(this, function () { 'use strict'; - updateInProgress = false; + var hookCallback; - // Pick the first defined of two or three arguments. dfl comes from - // default. - function dfl(a, b, c) { - switch (arguments.length) { - case 2: return a != null ? a : b; - case 3: return a != null ? a : b != null ? b : c; - default: throw new Error('Implement me'); - } + function utils_hooks__hooks () { + return hookCallback.apply(null, arguments); } - function hasOwnProp(a, b) { - return hasOwnProperty.call(a, b); + // This is done to register the method called with moment() + // without creating circular dependencies. + function setHookCallback (callback) { + hookCallback = callback; } function defaultParsingFlags() { - // We need to deep clone this object, and es5 standard is not very - // helpful. + // We need to deep clone this object. return { - empty : false, - unusedTokens : [], - unusedInput : [], - overflow : -2, - charsLeftOver : 0, - nullInput : false, - invalidMonth : null, - invalidFormat : false, + empty : false, + unusedTokens : [], + unusedInput : [], + overflow : -2, + charsLeftOver : 0, + nullInput : false, + invalidMonth : null, + invalidFormat : false, userInvalidated : false, - iso: false - }; - } - - function printMsg(msg) { - if (moment.suppressDeprecationWarnings === false && - typeof console !== 'undefined' && console.warn) { - console.warn('Deprecation warning: ' + msg); - } - } - - function deprecate(msg, fn) { - var firstTime = true; - return extend(function () { - if (firstTime) { - printMsg(msg); - firstTime = false; - } - return fn.apply(this, arguments); - }, fn); - } - - function deprecateSimple(name, msg) { - if (!deprecations[name]) { - printMsg(msg); - deprecations[name] = true; - } - } - - function padToken(func, count) { - return function (a) { - return leftZeroFill(func.call(this, a), count); - }; - } - function ordinalizeToken(func, period) { - return function (a) { - return this.localeData().ordinal(func.call(this, a), period); + iso : false }; } - function monthDiff(a, b) { - // difference in months - var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), - // b is in (anchor - 1 month, anchor + 1 month) - anchor = a.clone().add(wholeMonthDiff, 'months'), - anchor2, adjust; - - if (b - anchor < 0) { - anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor - anchor2); - } else { - anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); - // linear across the month - adjust = (b - anchor) / (anchor2 - anchor); - } - - return -(wholeMonthDiff + adjust); - } - - while (ordinalizeTokens.length) { - i = ordinalizeTokens.pop(); - formatTokenFunctions[i + 'o'] = ordinalizeToken(formatTokenFunctions[i], i); - } - while (paddedTokens.length) { - i = paddedTokens.pop(); - formatTokenFunctions[i + i] = padToken(formatTokenFunctions[i], 2); - } - formatTokenFunctions.DDDD = padToken(formatTokenFunctions.DDD, 3); - - - function meridiemFixWrap(locale, hour, meridiem) { - var isPm; - - if (meridiem == null) { - // nothing to do - return hour; - } - if (locale.meridiemHour != null) { - return locale.meridiemHour(hour, meridiem); - } else if (locale.isPM != null) { - // Fallback - isPm = locale.isPM(meridiem); - if (isPm && hour < 12) { - hour += 12; - } - if (!isPm && hour === 12) { - hour = 0; - } - return hour; - } else { - // thie is not supposed to happen - return hour; - } + function isArray(input) { + return Object.prototype.toString.call(input) === '[object Array]'; } - /************************************ - Constructors - ************************************/ - - function Locale() { + function isDate(input) { + return Object.prototype.toString.call(input) === '[object Date]' || input instanceof Date; } - // Moment prototype object - function Moment(config, skipOverflow) { - if (skipOverflow !== false) { - checkOverflow(config); - } - copyConfig(this, config); - this._d = new Date(+config._d); - // Prevent infinite loop in case updateOffset creates new moment - // objects. - if (updateInProgress === false) { - updateInProgress = true; - moment.updateOffset(this); - updateInProgress = false; + function map(arr, fn) { + var res = [], i; + for (i = 0; i < arr.length; ++i) { + res.push(fn(arr[i], i)); } + return res; } - // Duration Constructor - function Duration(duration) { - var normalizedInput = normalizeObjectUnits(duration), - years = normalizedInput.year || 0, - quarters = normalizedInput.quarter || 0, - months = normalizedInput.month || 0, - weeks = normalizedInput.week || 0, - days = normalizedInput.day || 0, - hours = normalizedInput.hour || 0, - minutes = normalizedInput.minute || 0, - seconds = normalizedInput.second || 0, - milliseconds = normalizedInput.millisecond || 0; - - // representation for dateAddRemove - this._milliseconds = +milliseconds + - seconds * 1e3 + // 1000 - minutes * 6e4 + // 1000 * 60 - hours * 36e5; // 1000 * 60 * 60 - // Because of dateAddRemove treats 24 hours as different from a - // day when working around DST, we need to store them separately - this._days = +days + - weeks * 7; - // It is impossible translate months into days without knowing - // which months you are are talking about, so we have to store - // it separately. - this._months = +months + - quarters * 3 + - years * 12; - - this._data = {}; - - this._locale = moment.localeData(); - - this._bubble(); + function hasOwnProp(a, b) { + return Object.prototype.hasOwnProperty.call(a, b); } - /************************************ - Helpers - ************************************/ - - function extend(a, b) { for (var i in b) { if (hasOwnProp(b, i)) { @@ -22230,6 +21816,44 @@ process.chdir = function (dir) { return a; } + function create_utc__createUTC (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, true).utc(); + } + + function valid__isValid(m) { + if (m._isValid == null) { + m._isValid = !isNaN(m._d.getTime()) && + m._pf.overflow < 0 && + !m._pf.empty && + !m._pf.invalidMonth && + !m._pf.nullInput && + !m._pf.invalidFormat && + !m._pf.userInvalidated; + + if (m._strict) { + m._isValid = m._isValid && + m._pf.charsLeftOver === 0 && + m._pf.unusedTokens.length === 0 && + m._pf.bigHour === undefined; + } + } + return m._isValid; + } + + function valid__createInvalid (flags) { + var m = create_utc__createUTC(NaN); + if (flags != null) { + extend(m._pf, flags); + } + else { + m._pf.userInvalidated = true; + } + + return m; + } + + var momentProperties = utils_hooks__hooks.momentProperties = []; + function copyConfig(to, from) { var i, prop, val; @@ -22277,122 +21901,181 @@ process.chdir = function (dir) { return to; } - function absRound(number) { - if (number < 0) { - return Math.ceil(number); - } else { - return Math.floor(number); + var updateInProgress = false; + + // Moment prototype object + function Moment(config) { + copyConfig(this, config); + this._d = new Date(+config._d); + // Prevent infinite loop in case updateOffset creates new moment + // objects. + if (updateInProgress === false) { + updateInProgress = true; + utils_hooks__hooks.updateOffset(this); + updateInProgress = false; } } - // left zero fill a number - // see http://jsperf.com/left-zero-filling for performance comparison - function leftZeroFill(number, targetLength, forceSign) { - var output = '' + Math.abs(number), - sign = number >= 0; - - while (output.length < targetLength) { - output = '0' + output; - } - return (sign ? (forceSign ? '+' : '') : '-') + output; + function isMoment (obj) { + return obj instanceof Moment || (obj != null && hasOwnProp(obj, '_isAMomentObject')); } - function positiveMomentsDifference(base, other) { - var res = {milliseconds: 0, months: 0}; + function toInt(argumentForCoercion) { + var coercedNumber = +argumentForCoercion, + value = 0; - res.months = other.month() - base.month() + - (other.year() - base.year()) * 12; - if (base.clone().add(res.months, 'M').isAfter(other)) { - --res.months; + if (coercedNumber !== 0 && isFinite(coercedNumber)) { + if (coercedNumber >= 0) { + value = Math.floor(coercedNumber); + } else { + value = Math.ceil(coercedNumber); + } } - res.milliseconds = +other - +(base.clone().add(res.months, 'M')); - - return res; + return value; } - function momentsDifference(base, other) { - var res; - other = makeAs(other, base); - if (base.isBefore(other)) { - res = positiveMomentsDifference(base, other); - } else { - res = positiveMomentsDifference(other, base); - res.milliseconds = -res.milliseconds; - res.months = -res.months; + function compareArrays(array1, array2, dontConvert) { + var len = Math.min(array1.length, array2.length), + lengthDiff = Math.abs(array1.length - array2.length), + diffs = 0, + i; + for (i = 0; i < len; i++) { + if ((dontConvert && array1[i] !== array2[i]) || + (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { + diffs++; + } } + return diffs + lengthDiff; + } - return res; + function Locale() { } - // TODO: remove 'name' arg after deprecation is removed - function createAdder(direction, name) { - return function (val, period) { - var dur, tmp; - //invert the arguments, but complain about it - if (period !== null && !isNaN(+period)) { - deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); - tmp = val; val = period; period = tmp; - } + var locales = {}; + var globalLocale; - val = typeof val === 'string' ? +val : val; - dur = moment.duration(val, period); - addOrSubtractDurationFromMoment(this, dur, direction); - return this; - }; + function normalizeLocale(key) { + return key ? key.toLowerCase().replace('_', '-') : key; } - function addOrSubtractDurationFromMoment(mom, duration, isAdding, updateOffset) { - var milliseconds = duration._milliseconds, - days = duration._days, - months = duration._months; - updateOffset = updateOffset == null ? true : updateOffset; - - if (milliseconds) { - mom._d.setTime(+mom._d + milliseconds * isAdding); - } - if (days) { - rawSetter(mom, 'Date', rawGetter(mom, 'Date') + days * isAdding); - } - if (months) { - rawMonthSetter(mom, rawGetter(mom, 'Month') + months * isAdding); + // pick the locale from the array + // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each + // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root + function chooseLocale(names) { + var i = 0, j, next, locale, split; + + while (i < names.length) { + split = normalizeLocale(names[i]).split('-'); + j = split.length; + next = normalizeLocale(names[i + 1]); + next = next ? next.split('-') : null; + while (j > 0) { + locale = loadLocale(split.slice(0, j).join('-')); + if (locale) { + return locale; + } + if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { + //the next array item is better than a shallower substring of this one + break; + } + j--; + } + i++; } - if (updateOffset) { - moment.updateOffset(mom, days || months); + return null; + } + + function loadLocale(name) { + var oldLocale = null; + // TODO: Find a better way to register and load all the locales in Node + if (!locales[name] && typeof module !== 'undefined' && + module && module.exports) { + try { + oldLocale = globalLocale._abbr; + require('./locale/' + name); + // because defineLocale currently also sets the global locale, we + // want to undo that for lazy loaded locales + locale_locales__getSetGlobalLocale(oldLocale); + } catch (e) { } } + return locales[name]; } - // check if is an array - function isArray(input) { - return Object.prototype.toString.call(input) === '[object Array]'; + // This function will load locale and then set the global locale. If + // no arguments are passed in, it will simply return the current global + // locale key. + function locale_locales__getSetGlobalLocale (key, values) { + var data; + if (key) { + if (typeof values === 'undefined') { + data = locale_locales__getLocale(key); + } + else { + data = defineLocale(key, values); + } + + if (data) { + // moment.duration._locale = moment._locale = data; + globalLocale = data; + } + } + + return globalLocale._abbr; } - function isDate(input) { - return Object.prototype.toString.call(input) === '[object Date]' || - input instanceof Date; + function defineLocale (name, values) { + if (values !== null) { + values.abbr = name; + if (!locales[name]) { + locales[name] = new Locale(); + } + locales[name].set(values); + + // backwards compat for now: also set the locale + locale_locales__getSetGlobalLocale(name); + + return locales[name]; + } else { + // useful for testing + delete locales[name]; + return null; + } } - // compare two arrays, return the number of differences - function compareArrays(array1, array2, dontConvert) { - var len = Math.min(array1.length, array2.length), - lengthDiff = Math.abs(array1.length - array2.length), - diffs = 0, - i; - for (i = 0; i < len; i++) { - if ((dontConvert && array1[i] !== array2[i]) || - (!dontConvert && toInt(array1[i]) !== toInt(array2[i]))) { - diffs++; + // returns locale data + function locale_locales__getLocale (key) { + var locale; + + if (key && key._locale && key._locale._abbr) { + key = key._locale._abbr; + } + + if (!key) { + return globalLocale; + } + + if (!isArray(key)) { + //short-circuit everything else + locale = loadLocale(key); + if (locale) { + return locale; } + key = [key]; } - return diffs + lengthDiff; + + return chooseLocale(key); + } + + var aliases = {}; + + function addUnitAlias (unit, shorthand) { + var lowerCase = unit.toLowerCase(); + aliases[lowerCase] = aliases[lowerCase + 's'] = aliases[shorthand] = unit; } function normalizeUnits(units) { - if (units) { - var lowered = units.toLowerCase().replace(/(.)s$/, '$1'); - units = unitAliases[units] || camelFunctions[lowered] || lowered; - } - return units; + return typeof units === 'string' ? aliases[units] || aliases[units.toLowerCase()] : undefined; } function normalizeObjectUnits(inputObject) { @@ -22412,755 +22095,687 @@ process.chdir = function (dir) { return normalizedInput; } - function makeList(field) { - var count, setter; + function makeGetSet (unit, keepTime) { + return function (value) { + if (value != null) { + get_set__set(this, unit, value); + utils_hooks__hooks.updateOffset(this, keepTime); + return this; + } else { + return get_set__get(this, unit); + } + }; + } + + function get_set__get (mom, unit) { + return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); + } + + function get_set__set (mom, unit, value) { + return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); + } - if (field.indexOf('week') === 0) { - count = 7; - setter = 'day'; - } - else if (field.indexOf('month') === 0) { - count = 12; - setter = 'month'; + // MOMENTS + + function getSet (units, value) { + var unit; + if (typeof units === 'object') { + for (unit in units) { + this.set(unit, units[unit]); + } + } else { + units = normalizeUnits(units); + if (typeof this[units] === 'function') { + return this[units](value); + } } - else { - return; + return this; + } + + function zeroFill(number, targetLength, forceSign) { + var output = '' + Math.abs(number), + sign = number >= 0; + + while (output.length < targetLength) { + output = '0' + output; } + return (sign ? (forceSign ? '+' : '') : '-') + output; + } - moment[field] = function (format, index) { - var i, getter, - method = moment._locale[field], - results = []; + var formattingTokens = /(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g; - if (typeof format === 'number') { - index = format; - format = undefined; - } + var localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g; + + var formatFunctions = {}; + + var formatTokenFunctions = {}; - getter = function (i) { - var m = moment().utc().set(setter, i); - return method.call(moment._locale, m, format || ''); + // token: 'M' + // padded: ['MM', 2] + // ordinal: 'Mo' + // callback: function () { this.month() + 1 } + function addFormatToken (token, padded, ordinal, callback) { + var func = callback; + if (typeof callback === 'string') { + func = function () { + return this[callback](); + }; + } + if (token) { + formatTokenFunctions[token] = func; + } + if (padded) { + formatTokenFunctions[padded[0]] = function () { + return zeroFill(func.apply(this, arguments), padded[1], padded[2]); }; + } + if (ordinal) { + formatTokenFunctions[ordinal] = function () { + return this.localeData().ordinal(func.apply(this, arguments), token); + }; + } + } - if (index != null) { - return getter(index); - } - else { - for (i = 0; i < count; i++) { - results.push(getter(i)); - } - return results; - } - }; + function removeFormattingTokens(input) { + if (input.match(/\[[\s\S]/)) { + return input.replace(/^\[|\]$/g, ''); + } + return input.replace(/\\/g, ''); } - function toInt(argumentForCoercion) { - var coercedNumber = +argumentForCoercion, - value = 0; + function makeFormatFunction(format) { + var array = format.match(formattingTokens), i, length; - if (coercedNumber !== 0 && isFinite(coercedNumber)) { - if (coercedNumber >= 0) { - value = Math.floor(coercedNumber); + for (i = 0, length = array.length; i < length; i++) { + if (formatTokenFunctions[array[i]]) { + array[i] = formatTokenFunctions[array[i]]; } else { - value = Math.ceil(coercedNumber); + array[i] = removeFormattingTokens(array[i]); } } - return value; + return function (mom) { + var output = ''; + for (i = 0; i < length; i++) { + output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; + } + return output; + }; } - function daysInMonth(year, month) { - return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); + // format date using native date object + function formatMoment(m, format) { + if (!m.isValid()) { + return m.localeData().invalidDate(); + } + + format = expandFormat(format, m.localeData()); + + if (!formatFunctions[format]) { + formatFunctions[format] = makeFormatFunction(format); + } + + return formatFunctions[format](m); } - function weeksInYear(year, dow, doy) { - return weekOfYear(moment([year, 11, 31 + dow - doy]), dow, doy).week; + function expandFormat(format, locale) { + var i = 5; + + function replaceLongDateFormatTokens(input) { + return locale.longDateFormat(input) || input; + } + + localFormattingTokens.lastIndex = 0; + while (i >= 0 && localFormattingTokens.test(format)) { + format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); + localFormattingTokens.lastIndex = 0; + i -= 1; + } + + return format; } - function daysInYear(year) { - return isLeapYear(year) ? 366 : 365; + var match1 = /\d/; // 0 - 9 + var match2 = /\d\d/; // 00 - 99 + var match3 = /\d{3}/; // 000 - 999 + var match4 = /\d{4}/; // 0000 - 9999 + var match6 = /[+-]?\d{6}/; // -999999 - 999999 + var match1to2 = /\d\d?/; // 0 - 99 + var match1to3 = /\d{1,3}/; // 0 - 999 + var match1to4 = /\d{1,4}/; // 0 - 9999 + var match1to6 = /[+-]?\d{1,6}/; // -999999 - 999999 + + var matchUnsigned = /\d+/; // 0 - inf + var matchSigned = /[+-]?\d+/; // -inf - inf + + var matchOffset = /Z|[+-]\d\d:?\d\d/gi; // +00:00 -00:00 +0000 -0000 or Z + + var matchTimestamp = /[+-]?\d+(\.\d{1,3})?/; // 123456789 123456789.123 + + // any word (or two) characters or numbers including two/three word month in arabic. + var matchWord = /[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i; + + var regexes = {}; + + function addRegexToken (token, regex, strictRegex) { + regexes[token] = typeof regex === 'function' ? regex : function (isStrict) { + return (isStrict && strictRegex) ? strictRegex : regex; + }; } - function isLeapYear(year) { - return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + function getParseRegexForToken (token, config) { + if (!hasOwnProp(regexes, token)) { + return new RegExp(unescapeFormat(token)); + } + + return regexes[token](config._strict, config._locale); } - function checkOverflow(m) { - var overflow; - if (m._a && m._pf.overflow === -2) { - overflow = - m._a[MONTH] < 0 || m._a[MONTH] > 11 ? MONTH : - m._a[DATE] < 1 || m._a[DATE] > daysInMonth(m._a[YEAR], m._a[MONTH]) ? DATE : - m._a[HOUR] < 0 || m._a[HOUR] > 24 || - (m._a[HOUR] === 24 && (m._a[MINUTE] !== 0 || - m._a[SECOND] !== 0 || - m._a[MILLISECOND] !== 0)) ? HOUR : - m._a[MINUTE] < 0 || m._a[MINUTE] > 59 ? MINUTE : - m._a[SECOND] < 0 || m._a[SECOND] > 59 ? SECOND : - m._a[MILLISECOND] < 0 || m._a[MILLISECOND] > 999 ? MILLISECOND : - -1; + // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript + function unescapeFormat(s) { + return s.replace('\\', '').replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { + return p1 || p2 || p3 || p4; + }).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + } - if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { - overflow = DATE; - } + var tokens = {}; - m._pf.overflow = overflow; + function addParseToken (token, callback) { + var i, func = callback; + if (typeof token === 'string') { + token = [token]; + } + if (typeof callback === 'number') { + func = function (input, array) { + array[callback] = toInt(input); + }; + } + for (i = 0; i < token.length; i++) { + tokens[token[i]] = func; } } - function isValid(m) { - if (m._isValid == null) { - m._isValid = !isNaN(m._d.getTime()) && - m._pf.overflow < 0 && - !m._pf.empty && - !m._pf.invalidMonth && - !m._pf.nullInput && - !m._pf.invalidFormat && - !m._pf.userInvalidated; + function addWeekParseToken (token, callback) { + addParseToken(token, function (input, array, config, token) { + config._w = config._w || {}; + callback(input, config._w, config, token); + }); + } - if (m._strict) { - m._isValid = m._isValid && - m._pf.charsLeftOver === 0 && - m._pf.unusedTokens.length === 0 && - m._pf.bigHour === undefined; - } + function addTimeToArrayFromToken(token, input, config) { + if (input != null && hasOwnProp(tokens, token)) { + tokens[token](input, config._a, config, token); } - return m._isValid; } - function normalizeLocale(key) { - return key ? key.toLowerCase().replace('_', '-') : key; + var YEAR = 0; + var MONTH = 1; + var DATE = 2; + var HOUR = 3; + var MINUTE = 4; + var SECOND = 5; + var MILLISECOND = 6; + + function daysInMonth(year, month) { + return new Date(Date.UTC(year, month + 1, 0)).getUTCDate(); } - // pick the locale from the array - // try ['en-au', 'en-gb'] as 'en-au', 'en-gb', 'en', as in move through the list trying each - // substring from most specific to least, but move to the next array item if it's a more specific variant than the current root - function chooseLocale(names) { - var i = 0, j, next, locale, split; + // FORMATTING - while (i < names.length) { - split = normalizeLocale(names[i]).split('-'); - j = split.length; - next = normalizeLocale(names[i + 1]); - next = next ? next.split('-') : null; - while (j > 0) { - locale = loadLocale(split.slice(0, j).join('-')); - if (locale) { - return locale; - } - if (next && next.length >= j && compareArrays(split, next, true) >= j - 1) { - //the next array item is better than a shallower substring of this one - break; - } - j--; - } - i++; - } - return null; - } + addFormatToken('M', ['MM', 2], 'Mo', function () { + return this.month() + 1; + }); - function loadLocale(name) { - var oldLocale = null; - if (!locales[name] && hasModule) { - try { - oldLocale = moment.locale(); - require('./locale/' + name); - // because defineLocale currently also sets the global locale, we want to undo that for lazy loaded locales - moment.locale(oldLocale); - } catch (e) { } - } - return locales[name]; - } + addFormatToken('MMM', 0, 0, function (format) { + return this.localeData().monthsShort(this, format); + }); - // Return a moment from input, that is local/utc/utcOffset equivalent to - // model. - function makeAs(input, model) { - var res, diff; - if (model._isUTC) { - res = model.clone(); - diff = (moment.isMoment(input) || isDate(input) ? - +input : +moment(input)) - (+res); - // Use low-level api, because this fn is low-level api. - res._d.setTime(+res._d + diff); - moment.updateOffset(res, false); - return res; + addFormatToken('MMMM', 0, 0, function (format) { + return this.localeData().months(this, format); + }); + + // ALIASES + + addUnitAlias('month', 'M'); + + // PARSING + + addRegexToken('M', match1to2); + addRegexToken('MM', match1to2, match2); + addRegexToken('MMM', matchWord); + addRegexToken('MMMM', matchWord); + + addParseToken(['M', 'MM'], function (input, array) { + array[MONTH] = toInt(input) - 1; + }); + + addParseToken(['MMM', 'MMMM'], function (input, array, config, token) { + var month = config._locale.monthsParse(input, token, config._strict); + // if we didn't find a month name, mark the date as invalid. + if (month != null) { + array[MONTH] = month; } else { - return moment(input).local(); + config._pf.invalidMonth = input; } + }); + + // LOCALES + + var defaultLocaleMonths = 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'); + function localeMonths (m) { + return this._months[m.month()]; } - /************************************ - Locale - ************************************/ + var defaultLocaleMonthsShort = 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'); + function localeMonthsShort (m) { + return this._monthsShort[m.month()]; + } + function localeMonthsParse (monthName, format, strict) { + var i, mom, regex; - extend(Locale.prototype, { + if (!this._monthsParse) { + this._monthsParse = []; + this._longMonthsParse = []; + this._shortMonthsParse = []; + } - set : function (config) { - var prop, i; - for (i in config) { - prop = config[i]; - if (typeof prop === 'function') { - this[i] = prop; - } else { - this['_' + i] = prop; - } + for (i = 0; i < 12; i++) { + // make the regex if we don't have it already + mom = create_utc__createUTC([2000, i]); + if (strict && !this._longMonthsParse[i]) { + this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); + this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); } - // Lenient ordinal parsing accepts just a number in addition to - // number + (possibly) stuff coming from _ordinalParseLenient. - this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); - }, - - _months : 'January_February_March_April_May_June_July_August_September_October_November_December'.split('_'), - months : function (m) { - return this._months[m.month()]; - }, + if (!strict && !this._monthsParse[i]) { + regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); + this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); + } + // test the regex + if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { + return i; + } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { + return i; + } else if (!strict && this._monthsParse[i].test(monthName)) { + return i; + } + } + } - _monthsShort : 'Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec'.split('_'), - monthsShort : function (m) { - return this._monthsShort[m.month()]; - }, + // MOMENTS - monthsParse : function (monthName, format, strict) { - var i, mom, regex; + function setMonth (mom, value) { + var dayOfMonth; - if (!this._monthsParse) { - this._monthsParse = []; - this._longMonthsParse = []; - this._shortMonthsParse = []; + // TODO: Move this out of here! + if (typeof value === 'string') { + value = mom.localeData().monthsParse(value); + // TODO: Another silent failure? + if (typeof value !== 'number') { + return mom; } + } - for (i = 0; i < 12; i++) { - // make the regex if we don't have it already - mom = moment.utc([2000, i]); - if (strict && !this._longMonthsParse[i]) { - this._longMonthsParse[i] = new RegExp('^' + this.months(mom, '').replace('.', '') + '$', 'i'); - this._shortMonthsParse[i] = new RegExp('^' + this.monthsShort(mom, '').replace('.', '') + '$', 'i'); - } - if (!strict && !this._monthsParse[i]) { - regex = '^' + this.months(mom, '') + '|^' + this.monthsShort(mom, ''); - this._monthsParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (strict && format === 'MMMM' && this._longMonthsParse[i].test(monthName)) { - return i; - } else if (strict && format === 'MMM' && this._shortMonthsParse[i].test(monthName)) { - return i; - } else if (!strict && this._monthsParse[i].test(monthName)) { - return i; - } - } - }, + dayOfMonth = Math.min(mom.date(), daysInMonth(mom.year(), value)); + mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); + return mom; + } - _weekdays : 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'), - weekdays : function (m) { - return this._weekdays[m.day()]; - }, + function getSetMonth (value) { + if (value != null) { + setMonth(this, value); + utils_hooks__hooks.updateOffset(this, true); + return this; + } else { + return get_set__get(this, 'Month'); + } + } - _weekdaysShort : 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'), - weekdaysShort : function (m) { - return this._weekdaysShort[m.day()]; - }, + function getDaysInMonth () { + return daysInMonth(this.year(), this.month()); + } - _weekdaysMin : 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'), - weekdaysMin : function (m) { - return this._weekdaysMin[m.day()]; - }, + function checkOverflow (m) { + var overflow; + var a = m._a; - weekdaysParse : function (weekdayName) { - var i, mom, regex; + if (a && m._pf.overflow === -2) { + overflow = + a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : + a[DATE] < 1 || a[DATE] > daysInMonth(a[YEAR], a[MONTH]) ? DATE : + a[HOUR] < 0 || a[HOUR] > 24 || (a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0)) ? HOUR : + a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : + a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : + a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : + -1; - if (!this._weekdaysParse) { - this._weekdaysParse = []; + if (m._pf._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) { + overflow = DATE; } - for (i = 0; i < 7; i++) { - // make the regex if we don't have it already - if (!this._weekdaysParse[i]) { - mom = moment([2000, 1]).day(i); - regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); - this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); - } - // test the regex - if (this._weekdaysParse[i].test(weekdayName)) { - return i; - } - } - }, + m._pf.overflow = overflow; + } - _longDateFormat : { - LTS : 'h:mm:ss A', - LT : 'h:mm A', - L : 'MM/DD/YYYY', - LL : 'MMMM D, YYYY', - LLL : 'MMMM D, YYYY LT', - LLLL : 'dddd, MMMM D, YYYY LT' - }, - longDateFormat : function (key) { - var output = this._longDateFormat[key]; - if (!output && this._longDateFormat[key.toUpperCase()]) { - output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) { - return val.slice(1); - }); - this._longDateFormat[key] = output; - } - return output; - }, + return m; + } - isPM : function (input) { - // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays - // Using charAt should be more compatible. - return ((input + '').toLowerCase().charAt(0) === 'p'); - }, + function warn(msg) { + if (utils_hooks__hooks.suppressDeprecationWarnings === false && typeof console !== 'undefined' && console.warn) { + console.warn('Deprecation warning: ' + msg); + } + } - _meridiemParse : /[ap]\.?m?\.?/i, - meridiem : function (hours, minutes, isLower) { - if (hours > 11) { - return isLower ? 'pm' : 'PM'; - } else { - return isLower ? 'am' : 'AM'; + function deprecate(msg, fn) { + var firstTime = true; + return extend(function () { + if (firstTime) { + warn(msg); + firstTime = false; } - }, + return fn.apply(this, arguments); + }, fn); + } + var deprecations = {}; - _calendar : { - sameDay : '[Today at] LT', - nextDay : '[Tomorrow at] LT', - nextWeek : 'dddd [at] LT', - lastDay : '[Yesterday at] LT', - lastWeek : '[Last] dddd [at] LT', - sameElse : 'L' - }, - calendar : function (key, mom, now) { - var output = this._calendar[key]; - return typeof output === 'function' ? output.apply(mom, [now]) : output; - }, + function deprecateSimple(name, msg) { + if (!deprecations[name]) { + warn(msg); + deprecations[name] = true; + } + } - _relativeTime : { - future : 'in %s', - past : '%s ago', - s : 'a few seconds', - m : 'a minute', - mm : '%d minutes', - h : 'an hour', - hh : '%d hours', - d : 'a day', - dd : '%d days', - M : 'a month', - MM : '%d months', - y : 'a year', - yy : '%d years' - }, + utils_hooks__hooks.suppressDeprecationWarnings = false; - relativeTime : function (number, withoutSuffix, string, isFuture) { - var output = this._relativeTime[string]; - return (typeof output === 'function') ? - output(number, withoutSuffix, string, isFuture) : - output.replace(/%d/i, number); - }, + var from_string__isoRegex = /^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/; - pastFuture : function (diff, output) { - var format = this._relativeTime[diff > 0 ? 'future' : 'past']; - return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); - }, + var isoDates = [ + ['YYYYYY-MM-DD', /[+-]\d{6}-\d{2}-\d{2}/], + ['YYYY-MM-DD', /\d{4}-\d{2}-\d{2}/], + ['GGGG-[W]WW-E', /\d{4}-W\d{2}-\d/], + ['GGGG-[W]WW', /\d{4}-W\d{2}/], + ['YYYY-DDD', /\d{4}-\d{3}/] + ]; - ordinal : function (number) { - return this._ordinal.replace('%d', number); - }, - _ordinal : '%d', - _ordinalParse : /\d{1,2}/, + // iso time formats and regexes + var isoTimes = [ + ['HH:mm:ss.SSSS', /(T| )\d\d:\d\d:\d\d\.\d+/], + ['HH:mm:ss', /(T| )\d\d:\d\d:\d\d/], + ['HH:mm', /(T| )\d\d:\d\d/], + ['HH', /(T| )\d\d/] + ]; - preparse : function (string) { - return string; - }, + var aspNetJsonRegex = /^\/?Date\((\-?\d+)/i; - postformat : function (string) { - return string; - }, + // date from iso format + function configFromISO(config) { + var i, l, + string = config._i, + match = from_string__isoRegex.exec(string); - week : function (mom) { - return weekOfYear(mom, this._week.dow, this._week.doy).week; - }, + if (match) { + config._pf.iso = true; + for (i = 0, l = isoDates.length; i < l; i++) { + if (isoDates[i][1].exec(string)) { + // match[5] should be 'T' or undefined + config._f = isoDates[i][0] + (match[6] || ' '); + break; + } + } + for (i = 0, l = isoTimes.length; i < l; i++) { + if (isoTimes[i][1].exec(string)) { + config._f += isoTimes[i][0]; + break; + } + } + if (string.match(matchOffset)) { + config._f += 'Z'; + } + configFromStringAndFormat(config); + } else { + config._isValid = false; + } + } - _week : { - dow : 0, // Sunday is the first day of the week. - doy : 6 // The week that contains Jan 1st is the first week of the year. - }, + // date from iso format or fallback + function configFromString(config) { + var matched = aspNetJsonRegex.exec(config._i); - firstDayOfWeek : function () { - return this._week.dow; - }, + if (matched !== null) { + config._d = new Date(+matched[1]); + return; + } - firstDayOfYear : function () { - return this._week.doy; - }, + configFromISO(config); + if (config._isValid === false) { + delete config._isValid; + utils_hooks__hooks.createFromInputFallback(config); + } + } - _invalidDate: 'Invalid date', - invalidDate: function () { - return this._invalidDate; + utils_hooks__hooks.createFromInputFallback = deprecate( + 'moment construction falls back to js Date. This is ' + + 'discouraged and will be removed in upcoming major ' + + 'release. Please refer to ' + + 'https://github.com/moment/moment/issues/1407 for more info.', + function (config) { + config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); } - }); + ); - /************************************ - Formatting - ************************************/ + function createDate (y, m, d, h, M, s, ms) { + //can't just apply() to create a date: + //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply + var date = new Date(y, m, d, h, M, s, ms); + //the date constructor doesn't accept years < 1970 + if (y < 1970) { + date.setFullYear(y); + } + return date; + } - function removeFormattingTokens(input) { - if (input.match(/\[[\s\S]/)) { - return input.replace(/^\[|\]$/g, ''); + function createUTCDate (y) { + var date = new Date(Date.UTC.apply(null, arguments)); + if (y < 1970) { + date.setUTCFullYear(y); } - return input.replace(/\\/g, ''); + return date; } - function makeFormatFunction(format) { - var array = format.match(formattingTokens), i, length; + addFormatToken(0, ['YY', 2], 0, function () { + return this.year() % 100; + }); - for (i = 0, length = array.length; i < length; i++) { - if (formatTokenFunctions[array[i]]) { - array[i] = formatTokenFunctions[array[i]]; - } else { - array[i] = removeFormattingTokens(array[i]); - } - } + addFormatToken(0, ['YYYY', 4], 0, 'year'); + addFormatToken(0, ['YYYYY', 5], 0, 'year'); + addFormatToken(0, ['YYYYYY', 6, true], 0, 'year'); - return function (mom) { - var output = ''; - for (i = 0; i < length; i++) { - output += array[i] instanceof Function ? array[i].call(mom, format) : array[i]; - } - return output; - }; - } + // ALIASES - // format date using native date object - function formatMoment(m, format) { - if (!m.isValid()) { - return m.localeData().invalidDate(); - } + addUnitAlias('year', 'y'); - format = expandFormat(format, m.localeData()); + // PARSING - if (!formatFunctions[format]) { - formatFunctions[format] = makeFormatFunction(format); - } + addRegexToken('Y', matchSigned); + addRegexToken('YY', match1to2, match2); + addRegexToken('YYYY', match1to4, match4); + addRegexToken('YYYYY', match1to6, match6); + addRegexToken('YYYYYY', match1to6, match6); - return formatFunctions[format](m); + addParseToken(['YYYY', 'YYYYY', 'YYYYYY'], YEAR); + addParseToken('YY', function (input, array) { + array[YEAR] = utils_hooks__hooks.parseTwoDigitYear(input); + }); + + // HELPERS + + function daysInYear(year) { + return isLeapYear(year) ? 366 : 365; } - function expandFormat(format, locale) { - var i = 5; + function isLeapYear(year) { + return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; + } - function replaceLongDateFormatTokens(input) { - return locale.longDateFormat(input) || input; - } + // HOOKS - localFormattingTokens.lastIndex = 0; - while (i >= 0 && localFormattingTokens.test(format)) { - format = format.replace(localFormattingTokens, replaceLongDateFormatTokens); - localFormattingTokens.lastIndex = 0; - i -= 1; - } + utils_hooks__hooks.parseTwoDigitYear = function (input) { + return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); + }; - return format; - } + // MOMENTS + var getSetYear = makeGetSet('FullYear', false); - /************************************ - Parsing - ************************************/ - - - // get the regex to find the next token - function getParseRegexForToken(token, config) { - var a, strict = config._strict; - switch (token) { - case 'Q': - return parseTokenOneDigit; - case 'DDDD': - return parseTokenThreeDigits; - case 'YYYY': - case 'GGGG': - case 'gggg': - return strict ? parseTokenFourDigits : parseTokenOneToFourDigits; - case 'Y': - case 'G': - case 'g': - return parseTokenSignedNumber; - case 'YYYYYY': - case 'YYYYY': - case 'GGGGG': - case 'ggggg': - return strict ? parseTokenSixDigits : parseTokenOneToSixDigits; - case 'S': - if (strict) { - return parseTokenOneDigit; - } - /* falls through */ - case 'SS': - if (strict) { - return parseTokenTwoDigits; - } - /* falls through */ - case 'SSS': - if (strict) { - return parseTokenThreeDigits; - } - /* falls through */ - case 'DDD': - return parseTokenOneToThreeDigits; - case 'MMM': - case 'MMMM': - case 'dd': - case 'ddd': - case 'dddd': - return parseTokenWord; - case 'a': - case 'A': - return config._locale._meridiemParse; - case 'x': - return parseTokenOffsetMs; - case 'X': - return parseTokenTimestampMs; - case 'Z': - case 'ZZ': - return parseTokenTimezone; - case 'T': - return parseTokenT; - case 'SSSS': - return parseTokenDigits; - case 'MM': - case 'DD': - case 'YY': - case 'GG': - case 'gg': - case 'HH': - case 'hh': - case 'mm': - case 'ss': - case 'ww': - case 'WW': - return strict ? parseTokenTwoDigits : parseTokenOneOrTwoDigits; - case 'M': - case 'D': - case 'd': - case 'H': - case 'h': - case 'm': - case 's': - case 'w': - case 'W': - case 'e': - case 'E': - return parseTokenOneOrTwoDigits; - case 'Do': - return strict ? config._locale._ordinalParse : config._locale._ordinalParseLenient; - default : - a = new RegExp(regexpEscape(unescapeFormat(token.replace('\\', '')), 'i')); - return a; - } + function getIsLeapYear () { + return isLeapYear(this.year()); } - function utcOffsetFromString(string) { - string = string || ''; - var possibleTzMatches = (string.match(parseTokenTimezone) || []), - tzChunk = possibleTzMatches[possibleTzMatches.length - 1] || [], - parts = (tzChunk + '').match(parseTimezoneChunker) || ['-', 0, 0], - minutes = +(parts[1] * 60) + toInt(parts[2]); + addFormatToken('w', ['ww', 2], 'wo', 'week'); + addFormatToken('W', ['WW', 2], 'Wo', 'isoWeek'); - return parts[0] === '+' ? minutes : -minutes; - } + // ALIASES - // function to convert string input to date - function addTimeToArrayFromToken(token, input, config) { - var a, datePartArray = config._a; + addUnitAlias('week', 'w'); + addUnitAlias('isoWeek', 'W'); - switch (token) { - // QUARTER - case 'Q': - if (input != null) { - datePartArray[MONTH] = (toInt(input) - 1) * 3; - } - break; - // MONTH - case 'M' : // fall through to MM - case 'MM' : - if (input != null) { - datePartArray[MONTH] = toInt(input) - 1; - } - break; - case 'MMM' : // fall through to MMMM - case 'MMMM' : - a = config._locale.monthsParse(input, token, config._strict); - // if we didn't find a month name, mark the date as invalid. - if (a != null) { - datePartArray[MONTH] = a; - } else { - config._pf.invalidMonth = input; - } - break; - // DAY OF MONTH - case 'D' : // fall through to DD - case 'DD' : - if (input != null) { - datePartArray[DATE] = toInt(input); - } - break; - case 'Do' : - if (input != null) { - datePartArray[DATE] = toInt(parseInt( - input.match(/\d{1,2}/)[0], 10)); - } - break; - // DAY OF YEAR - case 'DDD' : // fall through to DDDD - case 'DDDD' : - if (input != null) { - config._dayOfYear = toInt(input); - } + // PARSING - break; - // YEAR - case 'YY' : - datePartArray[YEAR] = moment.parseTwoDigitYear(input); - break; - case 'YYYY' : - case 'YYYYY' : - case 'YYYYYY' : - datePartArray[YEAR] = toInt(input); - break; - // AM / PM - case 'a' : // fall through to A - case 'A' : - config._meridiem = input; - // config._isPm = config._locale.isPM(input); - break; - // HOUR - case 'h' : // fall through to hh - case 'hh' : - config._pf.bigHour = true; - /* falls through */ - case 'H' : // fall through to HH - case 'HH' : - datePartArray[HOUR] = toInt(input); - break; - // MINUTE - case 'm' : // fall through to mm - case 'mm' : - datePartArray[MINUTE] = toInt(input); - break; - // SECOND - case 's' : // fall through to ss - case 'ss' : - datePartArray[SECOND] = toInt(input); - break; - // MILLISECOND - case 'S' : - case 'SS' : - case 'SSS' : - case 'SSSS' : - datePartArray[MILLISECOND] = toInt(('0.' + input) * 1000); - break; - // UNIX OFFSET (MILLISECONDS) - case 'x': - config._d = new Date(toInt(input)); - break; - // UNIX TIMESTAMP WITH MS - case 'X': - config._d = new Date(parseFloat(input) * 1000); - break; - // TIMEZONE - case 'Z' : // fall through to ZZ - case 'ZZ' : - config._useUTC = true; - config._tzm = utcOffsetFromString(input); - break; - // WEEKDAY - human - case 'dd': - case 'ddd': - case 'dddd': - a = config._locale.weekdaysParse(input); - // if we didn't get a weekday name, mark the date as invalid - if (a != null) { - config._w = config._w || {}; - config._w['d'] = a; - } else { - config._pf.invalidWeekday = input; - } - break; - // WEEK, WEEK DAY - numeric - case 'w': - case 'ww': - case 'W': - case 'WW': - case 'd': - case 'e': - case 'E': - token = token.substr(0, 1); - /* falls through */ - case 'gggg': - case 'GGGG': - case 'GGGGG': - token = token.substr(0, 2); - if (input) { - config._w = config._w || {}; - config._w[token] = toInt(input); - } - break; - case 'gg': - case 'GG': - config._w = config._w || {}; - config._w[token] = moment.parseTwoDigitYear(input); + addRegexToken('w', match1to2); + addRegexToken('ww', match1to2, match2); + addRegexToken('W', match1to2); + addRegexToken('WW', match1to2, match2); + + addWeekParseToken(['w', 'ww', 'W', 'WW'], function (input, week, config, token) { + week[token.substr(0, 1)] = toInt(input); + }); + + // HELPERS + + // firstDayOfWeek 0 = sun, 6 = sat + // the day of the week that starts the week + // (usually sunday or monday) + // firstDayOfWeekOfYear 0 = sun, 6 = sat + // the first week is the week that contains the first + // of this day of the week + // (eg. ISO weeks use thursday (4)) + function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { + var end = firstDayOfWeekOfYear - firstDayOfWeek, + daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), + adjustedMoment; + + + if (daysToDayOfWeek > end) { + daysToDayOfWeek -= 7; } + + if (daysToDayOfWeek < end - 7) { + daysToDayOfWeek += 7; + } + + adjustedMoment = local__createLocal(mom).add(daysToDayOfWeek, 'd'); + return { + week: Math.ceil(adjustedMoment.dayOfYear() / 7), + year: adjustedMoment.year() + }; } - function dayOfYearFromWeekInfo(config) { - var w, weekYear, week, weekday, dow, doy, temp; + // LOCALES - w = config._w; - if (w.GG != null || w.W != null || w.E != null) { - dow = 1; - doy = 4; + function localeWeek (mom) { + return weekOfYear(mom, this._week.dow, this._week.doy).week; + } - // TODO: We need to take the current isoWeekYear, but that depends on - // how we interpret now (local, utc, fixed offset). So create - // a now version of current config (take local/utc/offset flags, and - // create now). - weekYear = dfl(w.GG, config._a[YEAR], weekOfYear(moment(), 1, 4).year); - week = dfl(w.W, 1); - weekday = dfl(w.E, 1); - } else { - dow = config._locale._week.dow; - doy = config._locale._week.doy; + var defaultLocaleWeek = { + dow : 0, // Sunday is the first day of the week. + doy : 6 // The week that contains Jan 1st is the first week of the year. + }; - weekYear = dfl(w.gg, config._a[YEAR], weekOfYear(moment(), dow, doy).year); - week = dfl(w.w, 1); + function localeFirstDayOfWeek () { + return this._week.dow; + } - if (w.d != null) { - // weekday -- low day numbers are considered next week - weekday = w.d; - if (weekday < dow) { - ++week; - } - } else if (w.e != null) { - // local weekday -- counting starts from begining of week - weekday = w.e + dow; - } else { - // default to begining of week - weekday = dow; - } + function localeFirstDayOfYear () { + return this._week.doy; + } + + // MOMENTS + + function getSetWeek (input) { + var week = this.localeData().week(this); + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + function getSetISOWeek (input) { + var week = weekOfYear(this, 1, 4).week; + return input == null ? week : this.add((input - week) * 7, 'd'); + } + + addFormatToken('DDD', ['DDDD', 3], 'DDDo', 'dayOfYear'); + + // ALIASES + + addUnitAlias('dayOfYear', 'DDD'); + + // PARSING + + addRegexToken('DDD', match1to3); + addRegexToken('DDDD', match3); + addParseToken(['DDD', 'DDDD'], function (input, array, config) { + config._dayOfYear = toInt(input); + }); + + // HELPERS + + //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday + function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { + var d = createUTCDate(year, 0, 1).getUTCDay(); + var daysToAdd; + var dayOfYear; + + d = d === 0 ? 7 : d; + weekday = weekday != null ? weekday : firstDayOfWeek; + daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0); + dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1; + + return { + year : dayOfYear > 0 ? year : year - 1, + dayOfYear : dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear + }; + } + + // MOMENTS + + function getSetDayOfYear (input) { + var dayOfYear = Math.round((this.clone().startOf('day') - this.clone().startOf('year')) / 864e5) + 1; + return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); + } + + // Pick the first defined of two or three arguments. + function defaults(a, b, c) { + if (a != null) { + return a; } - temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); + if (b != null) { + return b; + } + return c; + } - config._a[YEAR] = temp.year; - config._dayOfYear = temp.dayOfYear; + function currentDateArray(config) { + var now = new Date(); + if (config._useUTC) { + return [now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate()]; + } + return [now.getFullYear(), now.getMonth(), now.getDate()]; } // convert an array to a date. // the array should mirror the parameters below // note: all values past the year are optional and will default to the lowest possible value. // [year, month, day , hour, minute, second, millisecond] - function dateFromConfig(config) { + function configFromArray (config) { var i, date, input = [], currentDate, yearToUse; if (config._d) { @@ -23176,13 +22791,13 @@ process.chdir = function (dir) { //if the day of the year is set, figure out what it is if (config._dayOfYear) { - yearToUse = dfl(config._a[YEAR], currentDate[YEAR]); + yearToUse = defaults(config._a[YEAR], currentDate[YEAR]); if (config._dayOfYear > daysInYear(yearToUse)) { config._pf._overflowDayOfYear = true; } - date = makeUTCDate(yearToUse, 0, config._dayOfYear); + date = createUTCDate(yearToUse, 0, config._dayOfYear); config._a[MONTH] = date.getUTCMonth(); config._a[DATE] = date.getUTCDate(); } @@ -23210,7 +22825,7 @@ process.chdir = function (dir) { config._a[HOUR] = 0; } - config._d = (config._useUTC ? makeUTCDate : makeDate).apply(null, input); + config._d = (config._useUTC ? createUTCDate : createDate).apply(null, input); // Apply timezone offset from input. The actual utcOffset can be changed // with parseZone. if (config._tzm != null) { @@ -23222,44 +22837,55 @@ process.chdir = function (dir) { } } - function dateFromObject(config) { - var normalizedInput; + function dayOfYearFromWeekInfo(config) { + var w, weekYear, week, weekday, dow, doy, temp; - if (config._d) { - return; - } + w = config._w; + if (w.GG != null || w.W != null || w.E != null) { + dow = 1; + doy = 4; - normalizedInput = normalizeObjectUnits(config._i); - config._a = [ - normalizedInput.year, - normalizedInput.month, - normalizedInput.day || normalizedInput.date, - normalizedInput.hour, - normalizedInput.minute, - normalizedInput.second, - normalizedInput.millisecond - ]; + // TODO: We need to take the current isoWeekYear, but that depends on + // how we interpret now (local, utc, fixed offset). So create + // a now version of current config (take local/utc/offset flags, and + // create now). + weekYear = defaults(w.GG, config._a[YEAR], weekOfYear(local__createLocal(), 1, 4).year); + week = defaults(w.W, 1); + weekday = defaults(w.E, 1); + } else { + dow = config._locale._week.dow; + doy = config._locale._week.doy; - dateFromConfig(config); - } + weekYear = defaults(w.gg, config._a[YEAR], weekOfYear(local__createLocal(), dow, doy).year); + week = defaults(w.w, 1); - function currentDateArray(config) { - var now = new Date(); - if (config._useUTC) { - return [ - now.getUTCFullYear(), - now.getUTCMonth(), - now.getUTCDate() - ]; - } else { - return [now.getFullYear(), now.getMonth(), now.getDate()]; + if (w.d != null) { + // weekday -- low day numbers are considered next week + weekday = w.d; + if (weekday < dow) { + ++week; + } + } else if (w.e != null) { + // local weekday -- counting starts from begining of week + weekday = w.e + dow; + } else { + // default to begining of week + weekday = dow; + } } + temp = dayOfYearFromWeeks(weekYear, week, weekday, doy, dow); + + config._a[YEAR] = temp.year; + config._dayOfYear = temp.dayOfYear; } + utils_hooks__hooks.ISO_8601 = function () {}; + // date from string and format string - function makeDateFromStringAndFormat(config) { - if (config._f === moment.ISO_8601) { - parseISO(config); + function configFromStringAndFormat(config) { + // TODO: Move this to another part of the creation flow to prevent circular deps + if (config._f === utils_hooks__hooks.ISO_8601) { + configFromISO(config); return; } @@ -23311,25 +22937,39 @@ process.chdir = function (dir) { config._pf.bigHour = undefined; } // handle meridiem - config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], - config._meridiem); - dateFromConfig(config); + config._a[HOUR] = meridiemFixWrap(config._locale, config._a[HOUR], config._meridiem); + + configFromArray(config); checkOverflow(config); } - function unescapeFormat(s) { - return s.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g, function (matched, p1, p2, p3, p4) { - return p1 || p2 || p3 || p4; - }); - } - // Code from http://stackoverflow.com/questions/3561493/is-there-a-regexp-escape-function-in-javascript - function regexpEscape(s) { - return s.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&'); + function meridiemFixWrap (locale, hour, meridiem) { + var isPm; + + if (meridiem == null) { + // nothing to do + return hour; + } + if (locale.meridiemHour != null) { + return locale.meridiemHour(hour, meridiem); + } else if (locale.isPM != null) { + // Fallback + isPm = locale.isPM(meridiem); + if (isPm && hour < 12) { + hour += 12; + } + if (!isPm && hour === 12) { + hour = 0; + } + return hour; + } else { + // this is not supposed to happen + return hour; + } } - // date from string and array of format strings - function makeDateFromStringAndArray(config) { + function configFromStringAndArray(config) { var tempConfig, bestMoment, @@ -23351,9 +22991,9 @@ process.chdir = function (dir) { } tempConfig._pf = defaultParsingFlags(); tempConfig._f = config._f[i]; - makeDateFromStringAndFormat(tempConfig); + configFromStringAndFormat(tempConfig); - if (!isValid(tempConfig)) { + if (!valid__isValid(tempConfig)) { continue; } @@ -23374,1411 +23014,1813 @@ process.chdir = function (dir) { extend(config, bestMoment || tempConfig); } - // date from iso format - function parseISO(config) { - var i, l, - string = config._i, - match = isoRegex.exec(string); - - if (match) { - config._pf.iso = true; - for (i = 0, l = isoDates.length; i < l; i++) { - if (isoDates[i][1].exec(string)) { - // match[5] should be 'T' or undefined - config._f = isoDates[i][0] + (match[6] || ' '); - break; - } - } - for (i = 0, l = isoTimes.length; i < l; i++) { - if (isoTimes[i][1].exec(string)) { - config._f += isoTimes[i][0]; - break; - } - } - if (string.match(parseTokenTimezone)) { - config._f += 'Z'; - } - makeDateFromStringAndFormat(config); - } else { - config._isValid = false; + function configFromObject(config) { + if (config._d) { + return; } + + var i = normalizeObjectUnits(config._i); + config._a = [i.year, i.month, i.day || i.date, i.hour, i.minute, i.second, i.millisecond]; + + configFromArray(config); } - // date from iso format or fallback - function makeDateFromString(config) { - parseISO(config); - if (config._isValid === false) { - delete config._isValid; - moment.createFromInputFallback(config); + function createFromConfig (config) { + var input = config._i, + format = config._f, + res; + + config._locale = config._locale || locale_locales__getLocale(config._l); + + if (input === null || (format === undefined && input === '')) { + return valid__createInvalid({nullInput: true}); } - } - function map(arr, fn) { - var res = [], i; - for (i = 0; i < arr.length; ++i) { - res.push(fn(arr[i], i)); + if (typeof input === 'string') { + config._i = input = config._locale.preparse(input); + } + + if (isMoment(input)) { + return new Moment(checkOverflow(input)); + } else if (isArray(format)) { + configFromStringAndArray(config); + } else if (format) { + configFromStringAndFormat(config); + } else { + configFromInput(config); } + + res = new Moment(checkOverflow(config)); + if (res._nextDay) { + // Adding is smart enough around DST + res.add(1, 'd'); + res._nextDay = undefined; + } + return res; } - function makeDateFromInput(config) { - var input = config._i, matched; + function configFromInput(config) { + var input = config._i; if (input === undefined) { config._d = new Date(); } else if (isDate(input)) { config._d = new Date(+input); - } else if ((matched = aspNetJsonRegex.exec(input)) !== null) { - config._d = new Date(+matched[1]); } else if (typeof input === 'string') { - makeDateFromString(config); + configFromString(config); } else if (isArray(input)) { config._a = map(input.slice(0), function (obj) { return parseInt(obj, 10); }); - dateFromConfig(config); + configFromArray(config); } else if (typeof(input) === 'object') { - dateFromObject(config); + configFromObject(config); } else if (typeof(input) === 'number') { // from milliseconds config._d = new Date(input); } else { - moment.createFromInputFallback(config); + utils_hooks__hooks.createFromInputFallback(config); } } - function makeDate(y, m, d, h, M, s, ms) { - //can't just apply() to create a date: - //http://stackoverflow.com/questions/181348/instantiating-a-javascript-object-by-calling-prototype-constructor-apply - var date = new Date(y, m, d, h, M, s, ms); + function createLocalOrUTC (input, format, locale, strict, isUTC) { + var c = {}; - //the date constructor doesn't accept years < 1970 - if (y < 1970) { - date.setFullYear(y); - } - return date; + if (typeof(locale) === 'boolean') { + strict = locale; + locale = undefined; + } + // object construction must be done this way. + // https://github.com/moment/moment/issues/1423 + c._isAMomentObject = true; + c._useUTC = c._isUTC = isUTC; + c._l = locale; + c._i = input; + c._f = format; + c._strict = strict; + c._pf = defaultParsingFlags(); + + return createFromConfig(c); } - function makeUTCDate(y) { - var date = new Date(Date.UTC.apply(null, arguments)); - if (y < 1970) { - date.setUTCFullYear(y); - } - return date; + function local__createLocal (input, format, locale, strict) { + return createLocalOrUTC(input, format, locale, strict, false); } - function parseWeekday(input, locale) { - if (typeof input === 'string') { - if (!isNaN(input)) { - input = parseInt(input, 10); - } - else { - input = locale.weekdaysParse(input); - if (typeof input !== 'number') { - return null; - } + var prototypeMin = deprecate( + 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', + function () { + var other = local__createLocal.apply(null, arguments); + return other < this ? this : other; + } + ); + + var prototypeMax = deprecate( + 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', + function () { + var other = local__createLocal.apply(null, arguments); + return other > this ? this : other; + } + ); + + // Pick a moment m from moments so that m[fn](other) is true for all + // other. This relies on the function fn to be transitive. + // + // moments should either be an array of moment objects or an array, whose + // first element is an array of moment objects. + function pickBy(fn, moments) { + var res, i; + if (moments.length === 1 && isArray(moments[0])) { + moments = moments[0]; + } + if (!moments.length) { + return local__createLocal(); + } + res = moments[0]; + for (i = 1; i < moments.length; ++i) { + if (moments[i][fn](res)) { + res = moments[i]; } } - return input; + return res; } - /************************************ - Relative Time - ************************************/ + // TODO: Use [].sort instead? + function min () { + var args = [].slice.call(arguments, 0); + return pickBy('isBefore', args); + } - // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize - function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { - return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + function max () { + var args = [].slice.call(arguments, 0); + + return pickBy('isAfter', args); } - function relativeTime(posNegDuration, withoutSuffix, locale) { - var duration = moment.duration(posNegDuration).abs(), - seconds = round(duration.as('s')), - minutes = round(duration.as('m')), - hours = round(duration.as('h')), - days = round(duration.as('d')), - months = round(duration.as('M')), - years = round(duration.as('y')), + function Duration (duration) { + var normalizedInput = normalizeObjectUnits(duration), + years = normalizedInput.year || 0, + quarters = normalizedInput.quarter || 0, + months = normalizedInput.month || 0, + weeks = normalizedInput.week || 0, + days = normalizedInput.day || 0, + hours = normalizedInput.hour || 0, + minutes = normalizedInput.minute || 0, + seconds = normalizedInput.second || 0, + milliseconds = normalizedInput.millisecond || 0; - args = seconds < relativeTimeThresholds.s && ['s', seconds] || - minutes === 1 && ['m'] || - minutes < relativeTimeThresholds.m && ['mm', minutes] || - hours === 1 && ['h'] || - hours < relativeTimeThresholds.h && ['hh', hours] || - days === 1 && ['d'] || - days < relativeTimeThresholds.d && ['dd', days] || - months === 1 && ['M'] || - months < relativeTimeThresholds.M && ['MM', months] || - years === 1 && ['y'] || ['yy', years]; + // representation for dateAddRemove + this._milliseconds = +milliseconds + + seconds * 1e3 + // 1000 + minutes * 6e4 + // 1000 * 60 + hours * 36e5; // 1000 * 60 * 60 + // Because of dateAddRemove treats 24 hours as different from a + // day when working around DST, we need to store them separately + this._days = +days + + weeks * 7; + // It is impossible translate months into days without knowing + // which months you are are talking about, so we have to store + // it separately. + this._months = +months + + quarters * 3 + + years * 12; + + this._data = {}; + + this._locale = locale_locales__getLocale(); - args[2] = withoutSuffix; - args[3] = +posNegDuration > 0; - args[4] = locale; - return substituteTimeAgo.apply({}, args); + this._bubble(); } + function isDuration (obj) { + return obj instanceof Duration; + } - /************************************ - Week of Year - ************************************/ + function offset (token, separator) { + addFormatToken(token, 0, 0, function () { + var offset = this.utcOffset(); + var sign = '+'; + if (offset < 0) { + offset = -offset; + sign = '-'; + } + return sign + zeroFill(~~(offset / 60), 2) + separator + zeroFill(~~(offset) % 60, 2); + }); + } + offset('Z', ':'); + offset('ZZ', ''); - // firstDayOfWeek 0 = sun, 6 = sat - // the day of the week that starts the week - // (usually sunday or monday) - // firstDayOfWeekOfYear 0 = sun, 6 = sat - // the first week is the week that contains the first - // of this day of the week - // (eg. ISO weeks use thursday (4)) - function weekOfYear(mom, firstDayOfWeek, firstDayOfWeekOfYear) { - var end = firstDayOfWeekOfYear - firstDayOfWeek, - daysToDayOfWeek = firstDayOfWeekOfYear - mom.day(), - adjustedMoment; + // PARSING + addRegexToken('Z', matchOffset); + addRegexToken('ZZ', matchOffset); + addParseToken(['Z', 'ZZ'], function (input, array, config) { + config._useUTC = true; + config._tzm = offsetFromString(input); + }); - if (daysToDayOfWeek > end) { - daysToDayOfWeek -= 7; - } + // HELPERS - if (daysToDayOfWeek < end - 7) { - daysToDayOfWeek += 7; + // timezone chunker + // '+10:00' > ['10', '00'] + // '-1530' > ['-15', '30'] + var chunkOffset = /([\+\-]|\d\d)/gi; + + function offsetFromString(string) { + var matches = ((string || '').match(matchOffset) || []); + var chunk = matches[matches.length - 1] || []; + var parts = (chunk + '').match(chunkOffset) || ['-', 0, 0]; + var minutes = +(parts[1] * 60) + toInt(parts[2]); + + return parts[0] === '+' ? minutes : -minutes; + } + + // Return a moment from input, that is local/utc/zone equivalent to model. + function cloneWithOffset(input, model) { + var res, diff; + if (model._isUTC) { + res = model.clone(); + diff = (isMoment(input) || isDate(input) ? +input : +local__createLocal(input)) - (+res); + // Use low-level api, because this fn is low-level api. + res._d.setTime(+res._d + diff); + utils_hooks__hooks.updateOffset(res, false); + return res; + } else { + return local__createLocal(input).local(); } + return model._isUTC ? local__createLocal(input).zone(model._offset || 0) : local__createLocal(input).local(); + } - adjustedMoment = moment(mom).add(daysToDayOfWeek, 'd'); - return { - week: Math.ceil(adjustedMoment.dayOfYear() / 7), - year: adjustedMoment.year() - }; + function getDateOffset (m) { + // On Firefox.24 Date#getTimezoneOffset returns a floating point. + // https://github.com/moment/moment/pull/1871 + return -Math.round(m._d.getTimezoneOffset() / 15) * 15; } - //http://en.wikipedia.org/wiki/ISO_week_date#Calculating_a_date_given_the_year.2C_week_number_and_weekday - function dayOfYearFromWeeks(year, week, weekday, firstDayOfWeekOfYear, firstDayOfWeek) { - var d = makeUTCDate(year, 0, 1).getUTCDay(), daysToAdd, dayOfYear; + // HOOKS - d = d === 0 ? 7 : d; - weekday = weekday != null ? weekday : firstDayOfWeek; - daysToAdd = firstDayOfWeek - d + (d > firstDayOfWeekOfYear ? 7 : 0) - (d < firstDayOfWeek ? 7 : 0); - dayOfYear = 7 * (week - 1) + (weekday - firstDayOfWeek) + daysToAdd + 1; + // This function will be called whenever a moment is mutated. + // It is intended to keep the offset in sync with the timezone. + utils_hooks__hooks.updateOffset = function () {}; - return { - year: dayOfYear > 0 ? year : year - 1, - dayOfYear: dayOfYear > 0 ? dayOfYear : daysInYear(year - 1) + dayOfYear - }; + // MOMENTS + + // keepLocalTime = true means only change the timezone, without + // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> + // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset + // +0200, so we adjust the time as needed, to be valid. + // + // Keeping the time actually adds/subtracts (one hour) + // from the actual represented time. That is why we call updateOffset + // a second time. In case it wants us to change the offset again + // _changeInProgress == true case, then we have to adjust, because + // there is no such time in the given timezone. + function getSetOffset (input, keepLocalTime) { + var offset = this._offset || 0, + localAdjust; + if (input != null) { + if (typeof input === 'string') { + input = offsetFromString(input); + } + if (Math.abs(input) < 16) { + input = input * 60; + } + if (!this._isUTC && keepLocalTime) { + localAdjust = getDateOffset(this); + } + this._offset = input; + this._isUTC = true; + if (localAdjust != null) { + this.add(localAdjust, 'm'); + } + if (offset !== input) { + if (!keepLocalTime || this._changeInProgress) { + add_subtract__addSubtract(this, create__createDuration(input - offset, 'm'), 1, false); + } else if (!this._changeInProgress) { + this._changeInProgress = true; + utils_hooks__hooks.updateOffset(this, true); + this._changeInProgress = null; + } + } + return this; + } else { + return this._isUTC ? offset : getDateOffset(this); + } } - /************************************ - Top Level Functions - ************************************/ + function getSetZone (input, keepLocalTime) { + if (input != null) { + if (typeof input !== 'string') { + input = -input; + } - function makeMoment(config) { - var input = config._i, - format = config._f, - res; + this.utcOffset(input, keepLocalTime); + + return this; + } else { + return -this.utcOffset(); + } + } + + function setOffsetToUTC (keepLocalTime) { + return this.utcOffset(0, keepLocalTime); + } - config._locale = config._locale || moment.localeData(config._l); + function setOffsetToLocal (keepLocalTime) { + if (this._isUTC) { + this.utcOffset(0, keepLocalTime); + this._isUTC = false; - if (input === null || (format === undefined && input === '')) { - return moment.invalid({nullInput: true}); + if (keepLocalTime) { + this.subtract(getDateOffset(this), 'm'); + } } + return this; + } - if (typeof input === 'string') { - config._i = input = config._locale.preparse(input); + function setOffsetToParsedOffset () { + if (this._tzm) { + this.utcOffset(this._tzm); + } else if (typeof this._i === 'string') { + this.utcOffset(offsetFromString(this._i)); } + return this; + } - if (moment.isMoment(input)) { - return new Moment(input, true); - } else if (format) { - if (isArray(format)) { - makeDateFromStringAndArray(config); + function hasAlignedHourOffset (input) { + if (!input) { + input = 0; + } + else { + input = local__createLocal(input).utcOffset(); + } + + return (this.utcOffset() - input) % 60 === 0; + } + + function isDaylightSavingTime () { + return ( + this.utcOffset() > this.clone().month(0).utcOffset() || + this.utcOffset() > this.clone().month(5).utcOffset() + ); + } + + function isDaylightSavingTimeShifted () { + if (this._a) { + var other = this._isUTC ? create_utc__createUTC(this._a) : local__createLocal(this._a); + return this.isValid() && compareArrays(this._a, other.toArray()) > 0; + } + + return false; + } + + function isLocal () { + return !this._isUTC; + } + + function isUtcOffset () { + return this._isUTC; + } + + function isUtc () { + return this._isUTC && this._offset === 0; + } + + var aspNetRegex = /(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/; + + // from http://docs.closure-library.googlecode.com/git/closure_goog_date_date.js.source.html + // somewhat more in line with 4.4.3.2 2004 spec, but allows decimal anywhere + var create__isoRegex = /^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/; + + function create__createDuration (input, key) { + var duration = input, + // matching against regexp is expensive, do it on demand + match = null, + sign, + ret, + diffRes; + + if (isDuration(input)) { + duration = { + ms : input._milliseconds, + d : input._days, + M : input._months + }; + } else if (typeof input === 'number') { + duration = {}; + if (key) { + duration[key] = input; } else { - makeDateFromStringAndFormat(config); + duration.milliseconds = input; } - } else { - makeDateFromInput(config); + } else if (!!(match = aspNetRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : 0, + d : toInt(match[DATE]) * sign, + h : toInt(match[HOUR]) * sign, + m : toInt(match[MINUTE]) * sign, + s : toInt(match[SECOND]) * sign, + ms : toInt(match[MILLISECOND]) * sign + }; + } else if (!!(match = create__isoRegex.exec(input))) { + sign = (match[1] === '-') ? -1 : 1; + duration = { + y : parseIso(match[2], sign), + M : parseIso(match[3], sign), + d : parseIso(match[4], sign), + h : parseIso(match[5], sign), + m : parseIso(match[6], sign), + s : parseIso(match[7], sign), + w : parseIso(match[8], sign) + }; + } else if (duration == null) {// checks for null or undefined + duration = {}; + } else if (typeof duration === 'object' && ('from' in duration || 'to' in duration)) { + diffRes = momentsDifference(local__createLocal(duration.from), local__createLocal(duration.to)); + + duration = {}; + duration.ms = diffRes.milliseconds; + duration.M = diffRes.months; } - res = new Moment(config); - if (res._nextDay) { - // Adding is smart enough around DST - res.add(1, 'd'); - res._nextDay = undefined; + ret = new Duration(duration); + + if (isDuration(input) && hasOwnProp(input, '_locale')) { + ret._locale = input._locale; } - return res; + return ret; } - moment = function (input, format, locale, strict) { - var c; + create__createDuration.fn = Duration.prototype; - if (typeof(locale) === 'boolean') { - strict = locale; - locale = undefined; + function parseIso (inp, sign) { + // We'd normally use ~~inp for this, but unfortunately it also + // converts floats to ints. + // inp may be undefined, so careful calling replace on it. + var res = inp && parseFloat(inp.replace(',', '.')); + // apply sign while we're at it + return (isNaN(res) ? 0 : res) * sign; + } + + function positiveMomentsDifference(base, other) { + var res = {milliseconds: 0, months: 0}; + + res.months = other.month() - base.month() + + (other.year() - base.year()) * 12; + if (base.clone().add(res.months, 'M').isAfter(other)) { + --res.months; } - // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - c = {}; - c._isAMomentObject = true; - c._i = input; - c._f = format; - c._l = locale; - c._strict = strict; - c._isUTC = false; - c._pf = defaultParsingFlags(); - return makeMoment(c); - }; + res.milliseconds = +other - +(base.clone().add(res.months, 'M')); - moment.suppressDeprecationWarnings = false; + return res; + } - moment.createFromInputFallback = deprecate( - 'moment construction falls back to js Date. This is ' + - 'discouraged and will be removed in upcoming major ' + - 'release. Please refer to ' + - 'https://github.com/moment/moment/issues/1407 for more info.', - function (config) { - config._d = new Date(config._i + (config._useUTC ? ' UTC' : '')); + function momentsDifference(base, other) { + var res; + other = cloneWithOffset(other, base); + if (base.isBefore(other)) { + res = positiveMomentsDifference(base, other); + } else { + res = positiveMomentsDifference(other, base); + res.milliseconds = -res.milliseconds; + res.months = -res.months; } - ); - // Pick a moment m from moments so that m[fn](other) is true for all - // other. This relies on the function fn to be transitive. - // - // moments should either be an array of moment objects or an array, whose - // first element is an array of moment objects. - function pickBy(fn, moments) { - var res, i; - if (moments.length === 1 && isArray(moments[0])) { - moments = moments[0]; + return res; + } + + function createAdder(direction, name) { + return function (val, period) { + var dur, tmp; + //invert the arguments, but complain about it + if (period !== null && !isNaN(+period)) { + deprecateSimple(name, 'moment().' + name + '(period, number) is deprecated. Please use moment().' + name + '(number, period).'); + tmp = val; val = period; period = tmp; + } + + val = typeof val === 'string' ? +val : val; + dur = create__createDuration(val, period); + add_subtract__addSubtract(this, dur, direction); + return this; + }; + } + + function add_subtract__addSubtract (mom, duration, isAdding, updateOffset) { + var milliseconds = duration._milliseconds, + days = duration._days, + months = duration._months; + updateOffset = updateOffset == null ? true : updateOffset; + + if (milliseconds) { + mom._d.setTime(+mom._d + milliseconds * isAdding); } - if (!moments.length) { - return moment(); + if (days) { + get_set__set(mom, 'Date', get_set__get(mom, 'Date') + days * isAdding); } - res = moments[0]; - for (i = 1; i < moments.length; ++i) { - if (moments[i][fn](res)) { - res = moments[i]; - } + if (months) { + setMonth(mom, get_set__get(mom, 'Month') + months * isAdding); + } + if (updateOffset) { + utils_hooks__hooks.updateOffset(mom, days || months); + } + } + + var add_subtract__add = createAdder(1, 'add'); + var add_subtract__subtract = createAdder(-1, 'subtract'); + + function moment_calendar__calendar (time) { + // We want to compare the start of today, vs this. + // Getting start-of-today depends on whether we're local/utc/offset or not. + var now = time || local__createLocal(), + sod = cloneWithOffset(now, this).startOf('day'), + diff = this.diff(sod, 'days', true), + format = diff < -6 ? 'sameElse' : + diff < -1 ? 'lastWeek' : + diff < 0 ? 'lastDay' : + diff < 1 ? 'sameDay' : + diff < 2 ? 'nextDay' : + diff < 7 ? 'nextWeek' : 'sameElse'; + return this.format(this.localeData().calendar(format, this, local__createLocal(now))); + } + + function clone () { + return new Moment(this); + } + + function isAfter (input, units) { + var inputMs; + units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); + if (units === 'millisecond') { + input = isMoment(input) ? input : local__createLocal(input); + return +this > +input; + } else { + inputMs = isMoment(input) ? +input : +local__createLocal(input); + return inputMs < +this.clone().startOf(units); + } + } + + function isBefore (input, units) { + var inputMs; + units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); + if (units === 'millisecond') { + input = isMoment(input) ? input : local__createLocal(input); + return +this < +input; + } else { + inputMs = isMoment(input) ? +input : +local__createLocal(input); + return +this.clone().endOf(units) < inputMs; + } + } + + function isBetween (from, to, units) { + return this.isAfter(from, units) && this.isBefore(to, units); + } + + function isSame (input, units) { + var inputMs; + units = normalizeUnits(units || 'millisecond'); + if (units === 'millisecond') { + input = isMoment(input) ? input : local__createLocal(input); + return +this === +input; + } else { + inputMs = +local__createLocal(input); + return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); } - return res; } - moment.min = function () { - var args = [].slice.call(arguments, 0); + function absFloor (number) { + if (number < 0) { + return Math.ceil(number); + } else { + return Math.floor(number); + } + } - return pickBy('isBefore', args); - }; + function diff (input, units, asFloat) { + var that = cloneWithOffset(input, this), + zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4, + delta, output; - moment.max = function () { - var args = [].slice.call(arguments, 0); + units = normalizeUnits(units); - return pickBy('isAfter', args); - }; + if (units === 'year' || units === 'month' || units === 'quarter') { + output = monthDiff(this, that); + if (units === 'quarter') { + output = output / 3; + } else if (units === 'year') { + output = output / 12; + } + } else { + delta = this - that; + output = units === 'second' ? delta / 1e3 : // 1000 + units === 'minute' ? delta / 6e4 : // 1000 * 60 + units === 'hour' ? delta / 36e5 : // 1000 * 60 * 60 + units === 'day' ? (delta - zoneDelta) / 864e5 : // 1000 * 60 * 60 * 24, negate dst + units === 'week' ? (delta - zoneDelta) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst + delta; + } + return asFloat ? output : absFloor(output); + } - // creating with utc - moment.utc = function (input, format, locale, strict) { - var c; + function monthDiff (a, b) { + // difference in months + var wholeMonthDiff = ((b.year() - a.year()) * 12) + (b.month() - a.month()), + // b is in (anchor - 1 month, anchor + 1 month) + anchor = a.clone().add(wholeMonthDiff, 'months'), + anchor2, adjust; - if (typeof(locale) === 'boolean') { - strict = locale; - locale = undefined; + if (b - anchor < 0) { + anchor2 = a.clone().add(wholeMonthDiff - 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor - anchor2); + } else { + anchor2 = a.clone().add(wholeMonthDiff + 1, 'months'); + // linear across the month + adjust = (b - anchor) / (anchor2 - anchor); } - // object construction must be done this way. - // https://github.com/moment/moment/issues/1423 - c = {}; - c._isAMomentObject = true; - c._useUTC = true; - c._isUTC = true; - c._l = locale; - c._i = input; - c._f = format; - c._strict = strict; - c._pf = defaultParsingFlags(); - return makeMoment(c).utc(); - }; + return -(wholeMonthDiff + adjust); + } - // creating with unix timestamp (in seconds) - moment.unix = function (input) { - return moment(input * 1000); - }; + utils_hooks__hooks.defaultFormat = 'YYYY-MM-DDTHH:mm:ssZ'; - // duration - moment.duration = function (input, key) { - var duration = input, - // matching against regexp is expensive, do it on demand - match = null, - sign, - ret, - parseIso, - diffRes; + function toString () { + return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); + } - if (moment.isDuration(input)) { - duration = { - ms: input._milliseconds, - d: input._days, - M: input._months - }; - } else if (typeof input === 'number') { - duration = {}; - if (key) { - duration[key] = input; + function moment_format__toISOString () { + var m = this.clone().utc(); + if (0 < m.year() && m.year() <= 9999) { + if ('function' === typeof Date.prototype.toISOString) { + // native implementation is ~50x faster, use it when we can + return this.toDate().toISOString(); } else { - duration.milliseconds = input; + return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } - } else if (!!(match = aspNetTimeSpanJsonRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - duration = { - y: 0, - d: toInt(match[DATE]) * sign, - h: toInt(match[HOUR]) * sign, - m: toInt(match[MINUTE]) * sign, - s: toInt(match[SECOND]) * sign, - ms: toInt(match[MILLISECOND]) * sign - }; - } else if (!!(match = isoDurationRegex.exec(input))) { - sign = (match[1] === '-') ? -1 : 1; - parseIso = function (inp) { - // We'd normally use ~~inp for this, but unfortunately it also - // converts floats to ints. - // inp may be undefined, so careful calling replace on it. - var res = inp && parseFloat(inp.replace(',', '.')); - // apply sign while we're at it - return (isNaN(res) ? 0 : res) * sign; - }; - duration = { - y: parseIso(match[2]), - M: parseIso(match[3]), - d: parseIso(match[4]), - h: parseIso(match[5]), - m: parseIso(match[6]), - s: parseIso(match[7]), - w: parseIso(match[8]) - }; - } else if (duration == null) {// checks for null or undefined - duration = {}; - } else if (typeof duration === 'object' && - ('from' in duration || 'to' in duration)) { - diffRes = momentsDifference(moment(duration.from), moment(duration.to)); - - duration = {}; - duration.ms = diffRes.milliseconds; - duration.M = diffRes.months; + } else { + return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); } + } - ret = new Duration(duration); + function format (inputString) { + var output = formatMoment(this, inputString || utils_hooks__hooks.defaultFormat); + return this.localeData().postformat(output); + } - if (moment.isDuration(input) && hasOwnProp(input, '_locale')) { - ret._locale = input._locale; - } + function from (time, withoutSuffix) { + return create__createDuration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); + } - return ret; - }; + function fromNow (withoutSuffix) { + return this.from(local__createLocal(), withoutSuffix); + } - // version number - moment.version = VERSION; + function locale (key) { + var newLocaleData; - // default format - moment.defaultFormat = isoFormat; + if (key === undefined) { + return this._locale._abbr; + } else { + newLocaleData = locale_locales__getLocale(key); + if (newLocaleData != null) { + this._locale = newLocaleData; + } + return this; + } + } - // constant that refers to the ISO standard - moment.ISO_8601 = function () {}; + var lang = deprecate( + 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', + function (key) { + if (key === undefined) { + return this.localeData(); + } else { + return this.locale(key); + } + } + ); - // Plugins that add properties should also add the key here (null value), - // so we can properly clone ourselves. - moment.momentProperties = momentProperties; + function localeData () { + return this._locale; + } - // This function will be called whenever a moment is mutated. - // It is intended to keep the offset in sync with the timezone. - moment.updateOffset = function () {}; + function startOf (units) { + units = normalizeUnits(units); + // the following switch intentionally omits break keywords + // to utilize falling through the cases. + switch (units) { + case 'year': + this.month(0); + /* falls through */ + case 'quarter': + case 'month': + this.date(1); + /* falls through */ + case 'week': + case 'isoWeek': + case 'day': + this.hours(0); + /* falls through */ + case 'hour': + this.minutes(0); + /* falls through */ + case 'minute': + this.seconds(0); + /* falls through */ + case 'second': + this.milliseconds(0); + } - // This function allows you to set a threshold for relative time strings - moment.relativeTimeThreshold = function (threshold, limit) { - if (relativeTimeThresholds[threshold] === undefined) { - return false; + // weeks are a special case + if (units === 'week') { + this.weekday(0); } - if (limit === undefined) { - return relativeTimeThresholds[threshold]; + if (units === 'isoWeek') { + this.isoWeekday(1); } - relativeTimeThresholds[threshold] = limit; - return true; - }; - moment.lang = deprecate( - 'moment.lang is deprecated. Use moment.locale instead.', - function (key, value) { - return moment.locale(key, value); + // quarters are also special + if (units === 'quarter') { + this.month(Math.floor(this.month() / 3) * 3); } - ); - // This function will load locale and then set the global locale. If - // no arguments are passed in, it will simply return the current global - // locale key. - moment.locale = function (key, values) { - var data; - if (key) { - if (typeof(values) !== 'undefined') { - data = moment.defineLocale(key, values); - } - else { - data = moment.localeData(key); - } + return this; + } - if (data) { - moment.duration._locale = moment._locale = data; - } + function endOf (units) { + units = normalizeUnits(units); + if (units === undefined || units === 'millisecond') { + return this; } + return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); + } - return moment._locale._abbr; - }; + function to_type__valueOf () { + return +this._d - ((this._offset || 0) * 60000); + } - moment.defineLocale = function (name, values) { - if (values !== null) { - values.abbr = name; - if (!locales[name]) { - locales[name] = new Locale(); - } - locales[name].set(values); + function unix () { + return Math.floor(+this / 1000); + } - // backwards compat for now: also set the locale - moment.locale(name); + function toDate () { + return this._offset ? new Date(+this) : this._d; + } - return locales[name]; - } else { - // useful for testing - delete locales[name]; - return null; - } - }; + function toArray () { + var m = this; + return [m.year(), m.month(), m.date(), m.hour(), m.minute(), m.second(), m.millisecond()]; + } - moment.langData = deprecate( - 'moment.langData is deprecated. Use moment.localeData instead.', - function (key) { - return moment.localeData(key); - } - ); + function moment_valid__isValid () { + return valid__isValid(this); + } - // returns locale data - moment.localeData = function (key) { - var locale; + function parsingFlags () { + return extend({}, this._pf); + } - if (key && key._locale && key._locale._abbr) { - key = key._locale._abbr; - } + function invalidAt () { + return this._pf.overflow; + } - if (!key) { - return moment._locale; - } + addFormatToken(0, ['gg', 2], 0, function () { + return this.weekYear() % 100; + }); - if (!isArray(key)) { - //short-circuit everything else - locale = loadLocale(key); - if (locale) { - return locale; - } - key = [key]; - } + addFormatToken(0, ['GG', 2], 0, function () { + return this.isoWeekYear() % 100; + }); - return chooseLocale(key); - }; + function addWeekYearFormatToken (token, getter) { + addFormatToken(0, [token, token.length], 0, getter); + } - // compare moment object - moment.isMoment = function (obj) { - return obj instanceof Moment || - (obj != null && hasOwnProp(obj, '_isAMomentObject')); - }; + addWeekYearFormatToken('gggg', 'weekYear'); + addWeekYearFormatToken('ggggg', 'weekYear'); + addWeekYearFormatToken('GGGG', 'isoWeekYear'); + addWeekYearFormatToken('GGGGG', 'isoWeekYear'); - // for typechecking Duration objects - moment.isDuration = function (obj) { - return obj instanceof Duration; - }; + // ALIASES + + addUnitAlias('weekYear', 'gg'); + addUnitAlias('isoWeekYear', 'GG'); + + // PARSING + + addRegexToken('G', matchSigned); + addRegexToken('g', matchSigned); + addRegexToken('GG', match1to2, match2); + addRegexToken('gg', match1to2, match2); + addRegexToken('GGGG', match1to4, match4); + addRegexToken('gggg', match1to4, match4); + addRegexToken('GGGGG', match1to6, match6); + addRegexToken('ggggg', match1to6, match6); + + addWeekParseToken(['gggg', 'ggggg', 'GGGG', 'GGGGG'], function (input, week, config, token) { + week[token.substr(0, 2)] = toInt(input); + }); + + addWeekParseToken(['gg', 'GG'], function (input, week, config, token) { + week[token] = utils_hooks__hooks.parseTwoDigitYear(input); + }); + + // HELPERS - for (i = lists.length - 1; i >= 0; --i) { - makeList(lists[i]); + function weeksInYear(year, dow, doy) { + return weekOfYear(local__createLocal([year, 11, 31 + dow - doy]), dow, doy).week; } - moment.normalizeUnits = function (units) { - return normalizeUnits(units); - }; + // MOMENTS - moment.invalid = function (flags) { - var m = moment.utc(NaN); - if (flags != null) { - extend(m._pf, flags); - } - else { - m._pf.userInvalidated = true; - } + function getSetWeekYear (input) { + var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; + return input == null ? year : this.add((input - year), 'y'); + } - return m; - }; + function getSetISOWeekYear (input) { + var year = weekOfYear(this, 1, 4).year; + return input == null ? year : this.add((input - year), 'y'); + } - moment.parseZone = function () { - return moment.apply(null, arguments).parseZone(); - }; + function getISOWeeksInYear () { + return weeksInYear(this.year(), 1, 4); + } - moment.parseTwoDigitYear = function (input) { - return toInt(input) + (toInt(input) > 68 ? 1900 : 2000); - }; + function getWeeksInYear () { + var weekInfo = this.localeData()._week; + return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); + } - moment.isDate = isDate; + addFormatToken('Q', 0, 0, 'quarter'); - /************************************ - Moment Prototype - ************************************/ + // ALIASES + addUnitAlias('quarter', 'Q'); - extend(moment.fn = Moment.prototype, { + // PARSING - clone : function () { - return moment(this); - }, + addRegexToken('Q', match1); + addParseToken('Q', function (input, array) { + array[MONTH] = (toInt(input) - 1) * 3; + }); - valueOf : function () { - return +this._d - ((this._offset || 0) * 60000); - }, + // MOMENTS - unix : function () { - return Math.floor(+this / 1000); - }, + function getSetQuarter (input) { + return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); + } - toString : function () { - return this.clone().locale('en').format('ddd MMM DD YYYY HH:mm:ss [GMT]ZZ'); - }, + addFormatToken('D', ['DD', 2], 'Do', 'date'); - toDate : function () { - return this._offset ? new Date(+this) : this._d; - }, + // ALIASES - toISOString : function () { - var m = moment(this).utc(); - if (0 < m.year() && m.year() <= 9999) { - if ('function' === typeof Date.prototype.toISOString) { - // native implementation is ~50x faster, use it when we can - return this.toDate().toISOString(); - } else { - return formatMoment(m, 'YYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); - } - } else { - return formatMoment(m, 'YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]'); - } - }, + addUnitAlias('date', 'D'); - toArray : function () { - var m = this; - return [ - m.year(), - m.month(), - m.date(), - m.hours(), - m.minutes(), - m.seconds(), - m.milliseconds() - ]; - }, + // PARSING - isValid : function () { - return isValid(this); - }, + addRegexToken('D', match1to2); + addRegexToken('DD', match1to2, match2); + addRegexToken('Do', function (isStrict, locale) { + return isStrict ? locale._ordinalParse : locale._ordinalParseLenient; + }); - isDSTShifted : function () { - if (this._a) { - return this.isValid() && compareArrays(this._a, (this._isUTC ? moment.utc(this._a) : moment(this._a)).toArray()) > 0; - } + addParseToken(['D', 'DD'], DATE); + addParseToken('Do', function (input, array) { + array[DATE] = toInt(input.match(match1to2)[0], 10); + }); - return false; - }, + // MOMENTS - parsingFlags : function () { - return extend({}, this._pf); - }, + var getSetDayOfMonth = makeGetSet('Date', true); - invalidAt: function () { - return this._pf.overflow; - }, + addFormatToken('d', 0, 'do', 'day'); - utc : function (keepLocalTime) { - return this.utcOffset(0, keepLocalTime); - }, + addFormatToken('dd', 0, 0, function (format) { + return this.localeData().weekdaysMin(this, format); + }); - local : function (keepLocalTime) { - if (this._isUTC) { - this.utcOffset(0, keepLocalTime); - this._isUTC = false; + addFormatToken('ddd', 0, 0, function (format) { + return this.localeData().weekdaysShort(this, format); + }); - if (keepLocalTime) { - this.subtract(this._dateUtcOffset(), 'm'); - } - } - return this; - }, + addFormatToken('dddd', 0, 0, function (format) { + return this.localeData().weekdays(this, format); + }); - format : function (inputString) { - var output = formatMoment(this, inputString || moment.defaultFormat); - return this.localeData().postformat(output); - }, + addFormatToken('e', 0, 0, 'weekday'); + addFormatToken('E', 0, 0, 'isoWeekday'); - add : createAdder(1, 'add'), + // ALIASES - subtract : createAdder(-1, 'subtract'), + addUnitAlias('day', 'd'); + addUnitAlias('weekday', 'e'); + addUnitAlias('isoWeekday', 'E'); - diff : function (input, units, asFloat) { - var that = makeAs(input, this), - zoneDiff = (that.utcOffset() - this.utcOffset()) * 6e4, - anchor, diff, output, daysAdjust; + // PARSING - units = normalizeUnits(units); + addRegexToken('d', match1to2); + addRegexToken('e', match1to2); + addRegexToken('E', match1to2); + addRegexToken('dd', matchWord); + addRegexToken('ddd', matchWord); + addRegexToken('dddd', matchWord); + + addWeekParseToken(['dd', 'ddd', 'dddd'], function (input, week, config) { + var weekday = config._locale.weekdaysParse(input); + // if we didn't get a weekday name, mark the date as invalid + if (weekday != null) { + week.d = weekday; + } else { + config._pf.invalidWeekday = input; + } + }); + + addWeekParseToken(['d', 'e', 'E'], function (input, week, config, token) { + week[token] = toInt(input); + }); + + // HELPERS - if (units === 'year' || units === 'month' || units === 'quarter') { - output = monthDiff(this, that); - if (units === 'quarter') { - output = output / 3; - } else if (units === 'year') { - output = output / 12; + function parseWeekday(input, locale) { + if (typeof input === 'string') { + if (!isNaN(input)) { + input = parseInt(input, 10); + } + else { + input = locale.weekdaysParse(input); + if (typeof input !== 'number') { + return null; } - } else { - diff = this - that; - output = units === 'second' ? diff / 1e3 : // 1000 - units === 'minute' ? diff / 6e4 : // 1000 * 60 - units === 'hour' ? diff / 36e5 : // 1000 * 60 * 60 - units === 'day' ? (diff - zoneDiff) / 864e5 : // 1000 * 60 * 60 * 24, negate dst - units === 'week' ? (diff - zoneDiff) / 6048e5 : // 1000 * 60 * 60 * 24 * 7, negate dst - diff; } - return asFloat ? output : absRound(output); - }, + } + return input; + } - from : function (time, withoutSuffix) { - return moment.duration({to: this, from: time}).locale(this.locale()).humanize(!withoutSuffix); - }, + // LOCALES - fromNow : function (withoutSuffix) { - return this.from(moment(), withoutSuffix); - }, + var defaultLocaleWeekdays = 'Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday'.split('_'); + function localeWeekdays (m) { + return this._weekdays[m.day()]; + } - calendar : function (time) { - // We want to compare the start of today, vs this. - // Getting start-of-today depends on whether we're locat/utc/offset - // or not. - var now = time || moment(), - sod = makeAs(now, this).startOf('day'), - diff = this.diff(sod, 'days', true), - format = diff < -6 ? 'sameElse' : - diff < -1 ? 'lastWeek' : - diff < 0 ? 'lastDay' : - diff < 1 ? 'sameDay' : - diff < 2 ? 'nextDay' : - diff < 7 ? 'nextWeek' : 'sameElse'; - return this.format(this.localeData().calendar(format, this, moment(now))); - }, + var defaultLocaleWeekdaysShort = 'Sun_Mon_Tue_Wed_Thu_Fri_Sat'.split('_'); + function localeWeekdaysShort (m) { + return this._weekdaysShort[m.day()]; + } + + var defaultLocaleWeekdaysMin = 'Su_Mo_Tu_We_Th_Fr_Sa'.split('_'); + function localeWeekdaysMin (m) { + return this._weekdaysMin[m.day()]; + } - isLeapYear : function () { - return isLeapYear(this.year()); - }, + function localeWeekdaysParse (weekdayName) { + var i, mom, regex; - isDST : function () { - return (this.utcOffset() > this.clone().month(0).utcOffset() || - this.utcOffset() > this.clone().month(5).utcOffset()); - }, + if (!this._weekdaysParse) { + this._weekdaysParse = []; + } - day : function (input) { - var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); - if (input != null) { - input = parseWeekday(input, this.localeData()); - return this.add(input - day, 'd'); - } else { - return day; + for (i = 0; i < 7; i++) { + // make the regex if we don't have it already + if (!this._weekdaysParse[i]) { + mom = local__createLocal([2000, 1]).day(i); + regex = '^' + this.weekdays(mom, '') + '|^' + this.weekdaysShort(mom, '') + '|^' + this.weekdaysMin(mom, ''); + this._weekdaysParse[i] = new RegExp(regex.replace('.', ''), 'i'); } - }, + // test the regex + if (this._weekdaysParse[i].test(weekdayName)) { + return i; + } + } + } - month : makeAccessor('Month', true), + // MOMENTS - startOf : function (units) { - units = normalizeUnits(units); - // the following switch intentionally omits break keywords - // to utilize falling through the cases. - switch (units) { - case 'year': - this.month(0); - /* falls through */ - case 'quarter': - case 'month': - this.date(1); - /* falls through */ - case 'week': - case 'isoWeek': - case 'day': - this.hours(0); - /* falls through */ - case 'hour': - this.minutes(0); - /* falls through */ - case 'minute': - this.seconds(0); - /* falls through */ - case 'second': - this.milliseconds(0); - /* falls through */ - } + function getSetDayOfWeek (input) { + var day = this._isUTC ? this._d.getUTCDay() : this._d.getDay(); + if (input != null) { + input = parseWeekday(input, this.localeData()); + return this.add(input - day, 'd'); + } else { + return day; + } + } - // weeks are a special case - if (units === 'week') { - this.weekday(0); - } else if (units === 'isoWeek') { - this.isoWeekday(1); - } + function getSetLocaleDayOfWeek (input) { + var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; + return input == null ? weekday : this.add(input - weekday, 'd'); + } - // quarters are also special - if (units === 'quarter') { - this.month(Math.floor(this.month() / 3) * 3); - } + function getSetISODayOfWeek (input) { + // behaves the same as moment#day except + // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) + // as a setter, sunday should belong to the previous week. + return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); + } - return this; - }, + addFormatToken('H', ['HH', 2], 0, 'hour'); + addFormatToken('h', ['hh', 2], 0, function () { + return this.hours() % 12 || 12; + }); - endOf: function (units) { - units = normalizeUnits(units); - if (units === undefined || units === 'millisecond') { - return this; - } - return this.startOf(units).add(1, (units === 'isoWeek' ? 'week' : units)).subtract(1, 'ms'); - }, + function meridiem (token, lowercase) { + addFormatToken(token, 0, 0, function () { + return this.localeData().meridiem(this.hours(), this.minutes(), lowercase); + }); + } - isAfter: function (input, units) { - var inputMs; - units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); - if (units === 'millisecond') { - input = moment.isMoment(input) ? input : moment(input); - return +this > +input; - } else { - inputMs = moment.isMoment(input) ? +input : +moment(input); - return inputMs < +this.clone().startOf(units); - } - }, + meridiem('a', true); + meridiem('A', false); - isBefore: function (input, units) { - var inputMs; - units = normalizeUnits(typeof units !== 'undefined' ? units : 'millisecond'); - if (units === 'millisecond') { - input = moment.isMoment(input) ? input : moment(input); - return +this < +input; - } else { - inputMs = moment.isMoment(input) ? +input : +moment(input); - return +this.clone().endOf(units) < inputMs; - } - }, + // ALIASES - isBetween: function (from, to, units) { - return this.isAfter(from, units) && this.isBefore(to, units); - }, + addUnitAlias('hour', 'h'); - isSame: function (input, units) { - var inputMs; - units = normalizeUnits(units || 'millisecond'); - if (units === 'millisecond') { - input = moment.isMoment(input) ? input : moment(input); - return +this === +input; - } else { - inputMs = +moment(input); - return +(this.clone().startOf(units)) <= inputMs && inputMs <= +(this.clone().endOf(units)); - } - }, + // PARSING - min: deprecate( - 'moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548', - function (other) { - other = moment.apply(null, arguments); - return other < this ? this : other; - } - ), - - max: deprecate( - 'moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548', - function (other) { - other = moment.apply(null, arguments); - return other > this ? this : other; - } - ), - - zone : deprecate( - 'moment().zone is deprecated, use moment().utcOffset instead. ' + - 'https://github.com/moment/moment/issues/1779', - function (input, keepLocalTime) { - if (input != null) { - if (typeof input !== 'string') { - input = -input; - } + function matchMeridiem (isStrict, locale) { + return locale._meridiemParse; + } - this.utcOffset(input, keepLocalTime); + addRegexToken('a', matchMeridiem); + addRegexToken('A', matchMeridiem); + addRegexToken('H', match1to2); + addRegexToken('h', match1to2); + addRegexToken('HH', match1to2, match2); + addRegexToken('hh', match1to2, match2); - return this; - } else { - return -this.utcOffset(); - } - } - ), - - // keepLocalTime = true means only change the timezone, without - // affecting the local hour. So 5:31:26 +0300 --[utcOffset(2, true)]--> - // 5:31:26 +0200 It is possible that 5:31:26 doesn't exist with offset - // +0200, so we adjust the time as needed, to be valid. - // - // Keeping the time actually adds/subtracts (one hour) - // from the actual represented time. That is why we call updateOffset - // a second time. In case it wants us to change the offset again - // _changeInProgress == true case, then we have to adjust, because - // there is no such time in the given timezone. - utcOffset : function (input, keepLocalTime) { - var offset = this._offset || 0, - localAdjust; - if (input != null) { - if (typeof input === 'string') { - input = utcOffsetFromString(input); - } - if (Math.abs(input) < 16) { - input = input * 60; - } - if (!this._isUTC && keepLocalTime) { - localAdjust = this._dateUtcOffset(); - } - this._offset = input; - this._isUTC = true; - if (localAdjust != null) { - this.add(localAdjust, 'm'); - } - if (offset !== input) { - if (!keepLocalTime || this._changeInProgress) { - addOrSubtractDurationFromMoment(this, - moment.duration(input - offset, 'm'), 1, false); - } else if (!this._changeInProgress) { - this._changeInProgress = true; - moment.updateOffset(this, true); - this._changeInProgress = null; - } - } + addParseToken(['H', 'HH'], HOUR); + addParseToken(['a', 'A'], function (input, array, config) { + config._isPm = config._locale.isPM(input); + config._meridiem = input; + }); + addParseToken(['h', 'hh'], function (input, array, config) { + array[HOUR] = toInt(input); + config._pf.bigHour = true; + }); - return this; - } else { - return this._isUTC ? offset : this._dateUtcOffset(); - } - }, + // LOCALES - isLocal : function () { - return !this._isUTC; - }, + function localeIsPM (input) { + // IE8 Quirks Mode & IE7 Standards Mode do not allow accessing strings like arrays + // Using charAt should be more compatible. + return ((input + '').toLowerCase().charAt(0) === 'p'); + } - isUtcOffset : function () { - return this._isUTC; - }, + var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i; + function localeMeridiem (hours, minutes, isLower) { + if (hours > 11) { + return isLower ? 'pm' : 'PM'; + } else { + return isLower ? 'am' : 'AM'; + } + } - isUtc : function () { - return this._isUTC && this._offset === 0; - }, - zoneAbbr : function () { - return this._isUTC ? 'UTC' : ''; - }, + // MOMENTS - zoneName : function () { - return this._isUTC ? 'Coordinated Universal Time' : ''; - }, + // Setting the hour should keep the time, because the user explicitly + // specified which hour he wants. So trying to maintain the same hour (in + // a new timezone) makes sense. Adding/subtracting hours does not follow + // this rule. + var getSetHour = makeGetSet('Hours', true); - parseZone : function () { - if (this._tzm) { - this.utcOffset(this._tzm); - } else if (typeof this._i === 'string') { - this.utcOffset(utcOffsetFromString(this._i)); - } - return this; - }, + addFormatToken('m', ['mm', 2], 0, 'minute'); - hasAlignedHourOffset : function (input) { - if (!input) { - input = 0; - } - else { - input = moment(input).utcOffset(); - } + // ALIASES - return (this.utcOffset() - input) % 60 === 0; - }, + addUnitAlias('minute', 'm'); - daysInMonth : function () { - return daysInMonth(this.year(), this.month()); - }, + // PARSING - dayOfYear : function (input) { - var dayOfYear = round((moment(this).startOf('day') - moment(this).startOf('year')) / 864e5) + 1; - return input == null ? dayOfYear : this.add((input - dayOfYear), 'd'); - }, + addRegexToken('m', match1to2); + addRegexToken('mm', match1to2, match2); + addParseToken(['m', 'mm'], MINUTE); - quarter : function (input) { - return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3); - }, + // MOMENTS - weekYear : function (input) { - var year = weekOfYear(this, this.localeData()._week.dow, this.localeData()._week.doy).year; - return input == null ? year : this.add((input - year), 'y'); - }, + var getSetMinute = makeGetSet('Minutes', false); - isoWeekYear : function (input) { - var year = weekOfYear(this, 1, 4).year; - return input == null ? year : this.add((input - year), 'y'); - }, + addFormatToken('s', ['ss', 2], 0, 'second'); - week : function (input) { - var week = this.localeData().week(this); - return input == null ? week : this.add((input - week) * 7, 'd'); - }, + // ALIASES - isoWeek : function (input) { - var week = weekOfYear(this, 1, 4).week; - return input == null ? week : this.add((input - week) * 7, 'd'); - }, + addUnitAlias('second', 's'); - weekday : function (input) { - var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7; - return input == null ? weekday : this.add(input - weekday, 'd'); - }, + // PARSING - isoWeekday : function (input) { - // behaves the same as moment#day except - // as a getter, returns 7 instead of 0 (1-7 range instead of 0-6) - // as a setter, sunday should belong to the previous week. - return input == null ? this.day() || 7 : this.day(this.day() % 7 ? input : input - 7); - }, + addRegexToken('s', match1to2); + addRegexToken('ss', match1to2, match2); + addParseToken(['s', 'ss'], SECOND); - isoWeeksInYear : function () { - return weeksInYear(this.year(), 1, 4); - }, + // MOMENTS - weeksInYear : function () { - var weekInfo = this.localeData()._week; - return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy); - }, + var getSetSecond = makeGetSet('Seconds', false); - get : function (units) { - units = normalizeUnits(units); - return this[units](); - }, + addFormatToken('S', 0, 0, function () { + return ~~(this.millisecond() / 100); + }); - set : function (units, value) { - var unit; - if (typeof units === 'object') { - for (unit in units) { - this.set(unit, units[unit]); - } - } - else { - units = normalizeUnits(units); - if (typeof this[units] === 'function') { - this[units](value); - } - } - return this; - }, + addFormatToken(0, ['SS', 2], 0, function () { + return ~~(this.millisecond() / 10); + }); - // If passed a locale key, it will set the locale for this - // instance. Otherwise, it will return the locale configuration - // variables for this instance. - locale : function (key) { - var newLocaleData; + function millisecond__milliseconds (token) { + addFormatToken(0, [token, 3], 0, 'millisecond'); + } - if (key === undefined) { - return this._locale._abbr; - } else { - newLocaleData = moment.localeData(key); - if (newLocaleData != null) { - this._locale = newLocaleData; - } - return this; - } - }, + millisecond__milliseconds('SSS'); + millisecond__milliseconds('SSSS'); - lang : deprecate( - 'moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.', - function (key) { - if (key === undefined) { - return this.localeData(); - } else { - return this.locale(key); - } - } - ), + // ALIASES - localeData : function () { - return this._locale; - }, + addUnitAlias('millisecond', 'ms'); - _dateUtcOffset : function () { - // On Firefox.24 Date#getTimezoneOffset returns a floating point. - // https://github.com/moment/moment/pull/1871 - return -Math.round(this._d.getTimezoneOffset() / 15) * 15; - } + // PARSING + addRegexToken('S', match1to3, match1); + addRegexToken('SS', match1to3, match2); + addRegexToken('SSS', match1to3, match3); + addRegexToken('SSSS', matchUnsigned); + addParseToken(['S', 'SS', 'SSS', 'SSSS'], function (input, array) { + array[MILLISECOND] = toInt(('0.' + input) * 1000); }); - function rawMonthSetter(mom, value) { - var dayOfMonth; - - // TODO: Move this out of here! - if (typeof value === 'string') { - value = mom.localeData().monthsParse(value); - // TODO: Another silent failure? - if (typeof value !== 'number') { - return mom; - } + // MOMENTS + + var getSetMillisecond = makeGetSet('Milliseconds', false); + + addFormatToken('z', 0, 0, 'zoneAbbr'); + addFormatToken('zz', 0, 0, 'zoneName'); + + // MOMENTS + + function getZoneAbbr () { + return this._isUTC ? 'UTC' : ''; + } + + function getZoneName () { + return this._isUTC ? 'Coordinated Universal Time' : ''; + } + + var momentPrototype__proto = Moment.prototype; + + momentPrototype__proto.add = add_subtract__add; + momentPrototype__proto.calendar = moment_calendar__calendar; + momentPrototype__proto.clone = clone; + momentPrototype__proto.diff = diff; + momentPrototype__proto.endOf = endOf; + momentPrototype__proto.format = format; + momentPrototype__proto.from = from; + momentPrototype__proto.fromNow = fromNow; + momentPrototype__proto.get = getSet; + momentPrototype__proto.invalidAt = invalidAt; + momentPrototype__proto.isAfter = isAfter; + momentPrototype__proto.isBefore = isBefore; + momentPrototype__proto.isBetween = isBetween; + momentPrototype__proto.isSame = isSame; + momentPrototype__proto.isValid = moment_valid__isValid; + momentPrototype__proto.lang = lang; + momentPrototype__proto.locale = locale; + momentPrototype__proto.localeData = localeData; + momentPrototype__proto.max = prototypeMax; + momentPrototype__proto.min = prototypeMin; + momentPrototype__proto.parsingFlags = parsingFlags; + momentPrototype__proto.set = getSet; + momentPrototype__proto.startOf = startOf; + momentPrototype__proto.subtract = add_subtract__subtract; + momentPrototype__proto.toArray = toArray; + momentPrototype__proto.toDate = toDate; + momentPrototype__proto.toISOString = moment_format__toISOString; + momentPrototype__proto.toJSON = moment_format__toISOString; + momentPrototype__proto.toString = toString; + momentPrototype__proto.unix = unix; + momentPrototype__proto.valueOf = to_type__valueOf; + + // Year + momentPrototype__proto.year = getSetYear; + momentPrototype__proto.isLeapYear = getIsLeapYear; + + // Week Year + momentPrototype__proto.weekYear = getSetWeekYear; + momentPrototype__proto.isoWeekYear = getSetISOWeekYear; + + // Quarter + momentPrototype__proto.quarter = momentPrototype__proto.quarters = getSetQuarter; + + // Month + momentPrototype__proto.month = getSetMonth; + momentPrototype__proto.daysInMonth = getDaysInMonth; + + // Week + momentPrototype__proto.week = momentPrototype__proto.weeks = getSetWeek; + momentPrototype__proto.isoWeek = momentPrototype__proto.isoWeeks = getSetISOWeek; + momentPrototype__proto.weeksInYear = getWeeksInYear; + momentPrototype__proto.isoWeeksInYear = getISOWeeksInYear; + + // Day + momentPrototype__proto.date = getSetDayOfMonth; + momentPrototype__proto.day = momentPrototype__proto.days = getSetDayOfWeek; + momentPrototype__proto.weekday = getSetLocaleDayOfWeek; + momentPrototype__proto.isoWeekday = getSetISODayOfWeek; + momentPrototype__proto.dayOfYear = getSetDayOfYear; + + // Hour + momentPrototype__proto.hour = momentPrototype__proto.hours = getSetHour; + + // Minute + momentPrototype__proto.minute = momentPrototype__proto.minutes = getSetMinute; + + // Second + momentPrototype__proto.second = momentPrototype__proto.seconds = getSetSecond; + + // Millisecond + momentPrototype__proto.millisecond = momentPrototype__proto.milliseconds = getSetMillisecond; + + // Offset + momentPrototype__proto.utcOffset = getSetOffset; + momentPrototype__proto.utc = setOffsetToUTC; + momentPrototype__proto.local = setOffsetToLocal; + momentPrototype__proto.parseZone = setOffsetToParsedOffset; + momentPrototype__proto.hasAlignedHourOffset = hasAlignedHourOffset; + momentPrototype__proto.isDST = isDaylightSavingTime; + momentPrototype__proto.isDSTShifted = isDaylightSavingTimeShifted; + momentPrototype__proto.isLocal = isLocal; + momentPrototype__proto.isUtcOffset = isUtcOffset; + momentPrototype__proto.isUtc = isUtc; + momentPrototype__proto.isUTC = isUtc; + + // Timezone + momentPrototype__proto.zoneAbbr = getZoneAbbr; + momentPrototype__proto.zoneName = getZoneName; + + // Deprecations + momentPrototype__proto.dates = deprecate('dates accessor is deprecated. Use date instead.', getSetDayOfMonth); + momentPrototype__proto.months = deprecate('months accessor is deprecated. Use month instead', getSetMonth); + momentPrototype__proto.years = deprecate('years accessor is deprecated. Use year instead', getSetYear); + momentPrototype__proto.zone = deprecate('moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779', getSetZone); + + var momentPrototype = momentPrototype__proto; + + function moment__createUnix (input) { + return local__createLocal(input * 1000); + } + + function moment__createInZone () { + return local__createLocal.apply(null, arguments).parseZone(); + } + + var defaultCalendar = { + sameDay : '[Today at] LT', + nextDay : '[Tomorrow at] LT', + nextWeek : 'dddd [at] LT', + lastDay : '[Yesterday at] LT', + lastWeek : '[Last] dddd [at] LT', + sameElse : 'L' + }; + + function locale_calendar__calendar (key, mom, now) { + var output = this._calendar[key]; + return typeof output === 'function' ? output.call(mom, now) : output; + } + + var defaultLongDateFormat = { + LTS : 'h:mm:ss A', + LT : 'h:mm A', + L : 'MM/DD/YYYY', + LL : 'MMMM D, YYYY', + LLL : 'MMMM D, YYYY LT', + LLLL : 'dddd, MMMM D, YYYY LT' + }; + + function longDateFormat (key) { + var output = this._longDateFormat[key]; + if (!output && this._longDateFormat[key.toUpperCase()]) { + output = this._longDateFormat[key.toUpperCase()].replace(/MMMM|MM|DD|dddd/g, function (val) { + return val.slice(1); + }); + this._longDateFormat[key] = output; } - - dayOfMonth = Math.min(mom.date(), - daysInMonth(mom.year(), value)); - mom._d['set' + (mom._isUTC ? 'UTC' : '') + 'Month'](value, dayOfMonth); - return mom; + return output; } - function rawGetter(mom, unit) { - return mom._d['get' + (mom._isUTC ? 'UTC' : '') + unit](); - } + var defaultInvalidDate = 'Invalid date'; - function rawSetter(mom, unit, value) { - if (unit === 'Month') { - return rawMonthSetter(mom, value); - } else { - return mom._d['set' + (mom._isUTC ? 'UTC' : '') + unit](value); - } + function invalidDate () { + return this._invalidDate; } - function makeAccessor(unit, keepTime) { - return function (value) { - if (value != null) { - rawSetter(this, unit, value); - moment.updateOffset(this, keepTime); - return this; - } else { - return rawGetter(this, unit); - } - }; - } + var defaultOrdinal = '%d'; + var defaultOrdinalParse = /\d{1,2}/; - moment.fn.millisecond = moment.fn.milliseconds = makeAccessor('Milliseconds', false); - moment.fn.second = moment.fn.seconds = makeAccessor('Seconds', false); - moment.fn.minute = moment.fn.minutes = makeAccessor('Minutes', false); - // Setting the hour should keep the time, because the user explicitly - // specified which hour he wants. So trying to maintain the same hour (in - // a new timezone) makes sense. Adding/subtracting hours does not follow - // this rule. - moment.fn.hour = moment.fn.hours = makeAccessor('Hours', true); - // moment.fn.month is defined separately - moment.fn.date = makeAccessor('Date', true); - moment.fn.dates = deprecate('dates accessor is deprecated. Use date instead.', makeAccessor('Date', true)); - moment.fn.year = makeAccessor('FullYear', true); - moment.fn.years = deprecate('years accessor is deprecated. Use year instead.', makeAccessor('FullYear', true)); + function ordinal (number) { + return this._ordinal.replace('%d', number); + } - // add plural methods - moment.fn.days = moment.fn.day; - moment.fn.months = moment.fn.month; - moment.fn.weeks = moment.fn.week; - moment.fn.isoWeeks = moment.fn.isoWeek; - moment.fn.quarters = moment.fn.quarter; + function preParsePostFormat (string) { + return string; + } - // add aliased format methods - moment.fn.toJSON = moment.fn.toISOString; + var defaultRelativeTime = { + future : 'in %s', + past : '%s ago', + s : 'a few seconds', + m : 'a minute', + mm : '%d minutes', + h : 'an hour', + hh : '%d hours', + d : 'a day', + dd : '%d days', + M : 'a month', + MM : '%d months', + y : 'a year', + yy : '%d years' + }; - // alias isUtc for dev-friendliness - moment.fn.isUTC = moment.fn.isUtc; + function relative__relativeTime (number, withoutSuffix, string, isFuture) { + var output = this._relativeTime[string]; + return (typeof output === 'function') ? + output(number, withoutSuffix, string, isFuture) : + output.replace(/%d/i, number); + } - /************************************ - Duration Prototype - ************************************/ + function pastFuture (diff, output) { + var format = this._relativeTime[diff > 0 ? 'future' : 'past']; + return typeof format === 'function' ? format(output) : format.replace(/%s/i, output); + } + function locale_set__set (config) { + var prop, i; + for (i in config) { + prop = config[i]; + if (typeof prop === 'function') { + this[i] = prop; + } else { + this['_' + i] = prop; + } + } + // Lenient ordinal parsing accepts just a number in addition to + // number + (possibly) stuff coming from _ordinalParseLenient. + this._ordinalParseLenient = new RegExp(this._ordinalParse.source + '|' + /\d{1,2}/.source); + } + + var prototype__proto = Locale.prototype; + + prototype__proto._calendar = defaultCalendar; + prototype__proto.calendar = locale_calendar__calendar; + prototype__proto._longDateFormat = defaultLongDateFormat; + prototype__proto.longDateFormat = longDateFormat; + prototype__proto._invalidDate = defaultInvalidDate; + prototype__proto.invalidDate = invalidDate; + prototype__proto._ordinal = defaultOrdinal; + prototype__proto.ordinal = ordinal; + prototype__proto._ordinalParse = defaultOrdinalParse; + prototype__proto.preparse = preParsePostFormat; + prototype__proto.postformat = preParsePostFormat; + prototype__proto._relativeTime = defaultRelativeTime; + prototype__proto.relativeTime = relative__relativeTime; + prototype__proto.pastFuture = pastFuture; + prototype__proto.set = locale_set__set; + + // Month + prototype__proto.months = localeMonths; + prototype__proto._months = defaultLocaleMonths; + prototype__proto.monthsShort = localeMonthsShort; + prototype__proto._monthsShort = defaultLocaleMonthsShort; + prototype__proto.monthsParse = localeMonthsParse; + + // Week + prototype__proto.week = localeWeek; + prototype__proto._week = defaultLocaleWeek; + prototype__proto.firstDayOfYear = localeFirstDayOfYear; + prototype__proto.firstDayOfWeek = localeFirstDayOfWeek; + + // Day of Week + prototype__proto.weekdays = localeWeekdays; + prototype__proto._weekdays = defaultLocaleWeekdays; + prototype__proto.weekdaysMin = localeWeekdaysMin; + prototype__proto._weekdaysMin = defaultLocaleWeekdaysMin; + prototype__proto.weekdaysShort = localeWeekdaysShort; + prototype__proto._weekdaysShort = defaultLocaleWeekdaysShort; + prototype__proto.weekdaysParse = localeWeekdaysParse; + + // Hours + prototype__proto.isPM = localeIsPM; + prototype__proto._meridiemParse = defaultLocaleMeridiemParse; + prototype__proto.meridiem = localeMeridiem; + + function lists__get (format, index, field, setter) { + var locale = locale_locales__getLocale(); + var utc = create_utc__createUTC().set(setter, index); + return locale[field](utc, format); + } + + function list (format, index, field, count, setter) { + if (typeof format === 'number') { + index = format; + format = undefined; + } + + format = format || ''; + + if (index != null) { + return lists__get(format, index, field, setter); + } - function daysToYears (days) { - // 400 years have 146097 days (taking into account leap year rules) - return days * 400 / 146097; + var i; + var out = []; + for (i = 0; i < count; i++) { + out[i] = lists__get(format, i, field, setter); + } + return out; } - function yearsToDays (years) { - // years * 365 + absRound(years / 4) - - // absRound(years / 100) + absRound(years / 400); - return years * 146097 / 400; + function lists__listMonths (format, index) { + return list(format, index, 'months', 12, 'month'); } - extend(moment.duration.fn = Duration.prototype, { + function lists__listMonthsShort (format, index) { + return list(format, index, 'monthsShort', 12, 'month'); + } - _bubble : function () { - var milliseconds = this._milliseconds, - days = this._days, - months = this._months, - data = this._data, - seconds, minutes, hours, years = 0; + function lists__listWeekdays (format, index) { + return list(format, index, 'weekdays', 7, 'day'); + } - // The following code bubbles up values, see the tests for - // examples of what that means. - data.milliseconds = milliseconds % 1000; + function lists__listWeekdaysShort (format, index) { + return list(format, index, 'weekdaysShort', 7, 'day'); + } - seconds = absRound(milliseconds / 1000); - data.seconds = seconds % 60; + function lists__listWeekdaysMin (format, index) { + return list(format, index, 'weekdaysMin', 7, 'day'); + } - minutes = absRound(seconds / 60); - data.minutes = minutes % 60; + locale_locales__getSetGlobalLocale('en', { + ordinalParse: /\d{1,2}(th|st|nd|rd)/, + ordinal : function (number) { + var b = number % 10, + output = (toInt(number % 100 / 10) === 1) ? 'th' : + (b === 1) ? 'st' : + (b === 2) ? 'nd' : + (b === 3) ? 'rd' : 'th'; + return number + output; + } + }); - hours = absRound(minutes / 60); - data.hours = hours % 24; + // Side effect imports + utils_hooks__hooks.lang = deprecate('moment.lang is deprecated. Use moment.locale instead.', locale_locales__getSetGlobalLocale); + utils_hooks__hooks.langData = deprecate('moment.langData is deprecated. Use moment.localeData instead.', locale_locales__getLocale); - days += absRound(hours / 24); + var mathAbs = Math.abs; - // Accurately convert days to years, assume start from year 0. - years = absRound(daysToYears(days)); - days -= absRound(yearsToDays(years)); + function duration_abs__abs () { + var data = this._data; - // 30 days to a month - // TODO (iskren): Use anchor date (like 1st Jan) to compute this. - months += absRound(days / 30); - days %= 30; + this._milliseconds = mathAbs(this._milliseconds); + this._days = mathAbs(this._days); + this._months = mathAbs(this._months); - // 12 months -> 1 year - years += absRound(months / 12); - months %= 12; + data.milliseconds = mathAbs(data.milliseconds); + data.seconds = mathAbs(data.seconds); + data.minutes = mathAbs(data.minutes); + data.hours = mathAbs(data.hours); + data.months = mathAbs(data.months); + data.years = mathAbs(data.years); - data.days = days; - data.months = months; - data.years = years; - }, + return this; + } - abs : function () { - this._milliseconds = Math.abs(this._milliseconds); - this._days = Math.abs(this._days); - this._months = Math.abs(this._months); + function duration_add_subtract__addSubtract (duration, input, value, direction) { + var other = create__createDuration(input, value); - this._data.milliseconds = Math.abs(this._data.milliseconds); - this._data.seconds = Math.abs(this._data.seconds); - this._data.minutes = Math.abs(this._data.minutes); - this._data.hours = Math.abs(this._data.hours); - this._data.months = Math.abs(this._data.months); - this._data.years = Math.abs(this._data.years); + duration._milliseconds += direction * other._milliseconds; + duration._days += direction * other._days; + duration._months += direction * other._months; - return this; - }, + return duration._bubble(); + } - weeks : function () { - return absRound(this.days() / 7); - }, + // supports only 2.0-style add(1, 's') or add(duration) + function duration_add_subtract__add (input, value) { + return duration_add_subtract__addSubtract(this, input, value, 1); + } - valueOf : function () { - return this._milliseconds + - this._days * 864e5 + - (this._months % 12) * 2592e6 + - toInt(this._months / 12) * 31536e6; - }, + // supports only 2.0-style subtract(1, 's') or subtract(duration) + function duration_add_subtract__subtract (input, value) { + return duration_add_subtract__addSubtract(this, input, value, -1); + } - humanize : function (withSuffix) { - var output = relativeTime(this, !withSuffix, this.localeData()); + function bubble () { + var milliseconds = this._milliseconds; + var days = this._days; + var months = this._months; + var data = this._data; + var seconds, minutes, hours, years = 0; - if (withSuffix) { - output = this.localeData().pastFuture(+this, output); - } + // The following code bubbles up values, see the tests for + // examples of what that means. + data.milliseconds = milliseconds % 1000; - return this.localeData().postformat(output); - }, + seconds = absFloor(milliseconds / 1000); + data.seconds = seconds % 60; - add : function (input, val) { - // supports only 2.0-style add(1, 's') or add(moment) - var dur = moment.duration(input, val); + minutes = absFloor(seconds / 60); + data.minutes = minutes % 60; - this._milliseconds += dur._milliseconds; - this._days += dur._days; - this._months += dur._months; + hours = absFloor(minutes / 60); + data.hours = hours % 24; - this._bubble(); + days += absFloor(hours / 24); - return this; - }, + // Accurately convert days to years, assume start from year 0. + years = absFloor(daysToYears(days)); + days -= absFloor(yearsToDays(years)); - subtract : function (input, val) { - var dur = moment.duration(input, val); + // 30 days to a month + // TODO (iskren): Use anchor date (like 1st Jan) to compute this. + months += absFloor(days / 30); + days %= 30; - this._milliseconds -= dur._milliseconds; - this._days -= dur._days; - this._months -= dur._months; + // 12 months -> 1 year + years += absFloor(months / 12); + months %= 12; - this._bubble(); + data.days = days; + data.months = months; + data.years = years; - return this; - }, + return this; + } - get : function (units) { - units = normalizeUnits(units); - return this[units.toLowerCase() + 's'](); - }, + function daysToYears (days) { + // 400 years have 146097 days (taking into account leap year rules) + return days * 400 / 146097; + } - as : function (units) { - var days, months; - units = normalizeUnits(units); + function yearsToDays (years) { + // years * 365 + absFloor(years / 4) - + // absFloor(years / 100) + absFloor(years / 400); + return years * 146097 / 400; + } - if (units === 'month' || units === 'year') { - days = this._days + this._milliseconds / 864e5; - months = this._months + daysToYears(days) * 12; - return units === 'month' ? months : months / 12; - } else { - // handle milliseconds separately because of floating point math errors (issue #1867) - days = this._days + Math.round(yearsToDays(this._months / 12)); - switch (units) { - case 'week': return days / 7 + this._milliseconds / 6048e5; - case 'day': return days + this._milliseconds / 864e5; - case 'hour': return days * 24 + this._milliseconds / 36e5; - case 'minute': return days * 24 * 60 + this._milliseconds / 6e4; - case 'second': return days * 24 * 60 * 60 + this._milliseconds / 1000; - // Math.floor prevents floating point math errors here - case 'millisecond': return Math.floor(days * 24 * 60 * 60 * 1000) + this._milliseconds; - default: throw new Error('Unknown unit ' + units); - } - } - }, + function as (units) { + var days; + var months; + var milliseconds = this._milliseconds; - lang : moment.fn.lang, - locale : moment.fn.locale, + units = normalizeUnits(units); - toIsoString : deprecate( - 'toIsoString() is deprecated. Please use toISOString() instead ' + - '(notice the capitals)', - function () { - return this.toISOString(); - } - ), - - toISOString : function () { - // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js - var years = Math.abs(this.years()), - months = Math.abs(this.months()), - days = Math.abs(this.days()), - hours = Math.abs(this.hours()), - minutes = Math.abs(this.minutes()), - seconds = Math.abs(this.seconds() + this.milliseconds() / 1000); - - if (!this.asSeconds()) { - // this is the same as C#'s (Noda) and python (isodate)... - // but not other JS (goog.date) - return 'P0D'; + if (units === 'month' || units === 'year') { + days = this._days + milliseconds / 864e5; + months = this._months + daysToYears(days) * 12; + return units === 'month' ? months : months / 12; + } else { + // handle milliseconds separately because of floating point math errors (issue #1867) + days = this._days + Math.round(yearsToDays(this._months / 12)); + switch (units) { + case 'week' : return days / 7 + milliseconds / 6048e5; + case 'day' : return days + milliseconds / 864e5; + case 'hour' : return days * 24 + milliseconds / 36e5; + case 'minute' : return days * 24 * 60 + milliseconds / 6e4; + case 'second' : return days * 24 * 60 * 60 + milliseconds / 1000; + // Math.floor prevents floating point math errors here + case 'millisecond': return Math.floor(days * 24 * 60 * 60 * 1000) + milliseconds; + default: throw new Error('Unknown unit ' + units); } + } + } - return (this.asSeconds() < 0 ? '-' : '') + - 'P' + - (years ? years + 'Y' : '') + - (months ? months + 'M' : '') + - (days ? days + 'D' : '') + - ((hours || minutes || seconds) ? 'T' : '') + - (hours ? hours + 'H' : '') + - (minutes ? minutes + 'M' : '') + - (seconds ? seconds + 'S' : ''); - }, + // TODO: Use this.as('ms')? + function duration_as__valueOf () { + return ( + this._milliseconds + + this._days * 864e5 + + (this._months % 12) * 2592e6 + + toInt(this._months / 12) * 31536e6 + ); + } - localeData : function () { - return this._locale; - }, + function makeAs (alias) { + return function () { + return this.as(alias); + }; + } - toJSON : function () { - return this.toISOString(); - } - }); + var asMilliseconds = makeAs('ms'); + var asSeconds = makeAs('s'); + var asMinutes = makeAs('m'); + var asHours = makeAs('h'); + var asDays = makeAs('d'); + var asWeeks = makeAs('w'); + var asMonths = makeAs('M'); + var asYears = makeAs('y'); - moment.duration.fn.toString = moment.duration.fn.toISOString; + function duration_get__get (units) { + units = normalizeUnits(units); + return this[units + 's'](); + } - function makeDurationGetter(name) { - moment.duration.fn[name] = function () { + function makeGetter(name) { + return function () { return this._data[name]; }; } - for (i in unitMillisecondFactors) { - if (hasOwnProp(unitMillisecondFactors, i)) { - makeDurationGetter(i.toLowerCase()); - } + var duration_get__milliseconds = makeGetter('milliseconds'); + var seconds = makeGetter('seconds'); + var minutes = makeGetter('minutes'); + var hours = makeGetter('hours'); + var days = makeGetter('days'); + var months = makeGetter('months'); + var years = makeGetter('years'); + + function weeks () { + return absFloor(this.days() / 7); } - moment.duration.fn.asMilliseconds = function () { - return this.as('ms'); - }; - moment.duration.fn.asSeconds = function () { - return this.as('s'); - }; - moment.duration.fn.asMinutes = function () { - return this.as('m'); - }; - moment.duration.fn.asHours = function () { - return this.as('h'); - }; - moment.duration.fn.asDays = function () { - return this.as('d'); - }; - moment.duration.fn.asWeeks = function () { - return this.as('weeks'); - }; - moment.duration.fn.asMonths = function () { - return this.as('M'); - }; - moment.duration.fn.asYears = function () { - return this.as('y'); + var round = Math.round; + var thresholds = { + s: 45, // seconds to minute + m: 45, // minutes to hour + h: 22, // hours to day + d: 26, // days to month + M: 11 // months to year }; - /************************************ - Default Locale - ************************************/ + // helper function for moment.fn.from, moment.fn.fromNow, and moment.duration.fn.humanize + function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale) { + return locale.relativeTime(number || 1, !!withoutSuffix, string, isFuture); + } + function duration_humanize__relativeTime (posNegDuration, withoutSuffix, locale) { + var duration = create__createDuration(posNegDuration).abs(); + var seconds = round(duration.as('s')); + var minutes = round(duration.as('m')); + var hours = round(duration.as('h')); + var days = round(duration.as('d')); + var months = round(duration.as('M')); + var years = round(duration.as('y')); + + var a = seconds < thresholds.s && ['s', seconds] || + minutes === 1 && ['m'] || + minutes < thresholds.m && ['mm', minutes] || + hours === 1 && ['h'] || + hours < thresholds.h && ['hh', hours] || + days === 1 && ['d'] || + days < thresholds.d && ['dd', days] || + months === 1 && ['M'] || + months < thresholds.M && ['MM', months] || + years === 1 && ['y'] || ['yy', years]; + + a[2] = withoutSuffix; + a[3] = +posNegDuration > 0; + a[4] = locale; + return substituteTimeAgo.apply(null, a); + } - // Set default locale, other locale will inherit from English. - moment.locale('en', { - ordinalParse: /\d{1,2}(th|st|nd|rd)/, - ordinal : function (number) { - var b = number % 10, - output = (toInt(number % 100 / 10) === 1) ? 'th' : - (b === 1) ? 'st' : - (b === 2) ? 'nd' : - (b === 3) ? 'rd' : 'th'; - return number + output; + // This function allows you to set a threshold for relative time strings + function duration_humanize__getSetRelativeTimeThreshold (threshold, limit) { + if (thresholds[threshold] === undefined) { + return false; + } + if (limit === undefined) { + return thresholds[threshold]; } + thresholds[threshold] = limit; + return true; + } + + function humanize (withSuffix) { + var locale = this.localeData(); + var output = duration_humanize__relativeTime(this, !withSuffix, locale); + + if (withSuffix) { + output = locale.pastFuture(+this, output); + } + + return locale.postformat(output); + } + + var iso_string__abs = Math.abs; + + function iso_string__toISOString() { + // inspired by https://github.com/dordille/moment-isoduration/blob/master/moment.isoduration.js + var Y = iso_string__abs(this.years()); + var M = iso_string__abs(this.months()); + var D = iso_string__abs(this.days()); + var h = iso_string__abs(this.hours()); + var m = iso_string__abs(this.minutes()); + var s = iso_string__abs(this.seconds() + this.milliseconds() / 1000); + var total = this.asSeconds(); + + if (!total) { + // this is the same as C#'s (Noda) and python (isodate)... + // but not other JS (goog.date) + return 'P0D'; + } + + return (total < 0 ? '-' : '') + + 'P' + + (Y ? Y + 'Y' : '') + + (M ? M + 'M' : '') + + (D ? D + 'D' : '') + + ((h || m || s) ? 'T' : '') + + (h ? h + 'H' : '') + + (m ? m + 'M' : '') + + (s ? s + 'S' : ''); + } + + var duration_prototype__proto = Duration.prototype; + + duration_prototype__proto.abs = duration_abs__abs; + duration_prototype__proto.add = duration_add_subtract__add; + duration_prototype__proto.subtract = duration_add_subtract__subtract; + duration_prototype__proto.as = as; + duration_prototype__proto.asMilliseconds = asMilliseconds; + duration_prototype__proto.asSeconds = asSeconds; + duration_prototype__proto.asMinutes = asMinutes; + duration_prototype__proto.asHours = asHours; + duration_prototype__proto.asDays = asDays; + duration_prototype__proto.asWeeks = asWeeks; + duration_prototype__proto.asMonths = asMonths; + duration_prototype__proto.asYears = asYears; + duration_prototype__proto.valueOf = duration_as__valueOf; + duration_prototype__proto._bubble = bubble; + duration_prototype__proto.get = duration_get__get; + duration_prototype__proto.milliseconds = duration_get__milliseconds; + duration_prototype__proto.seconds = seconds; + duration_prototype__proto.minutes = minutes; + duration_prototype__proto.hours = hours; + duration_prototype__proto.days = days; + duration_prototype__proto.weeks = weeks; + duration_prototype__proto.months = months; + duration_prototype__proto.years = years; + duration_prototype__proto.humanize = humanize; + duration_prototype__proto.toISOString = iso_string__toISOString; + duration_prototype__proto.toString = iso_string__toISOString; + duration_prototype__proto.toJSON = iso_string__toISOString; + duration_prototype__proto.locale = locale; + duration_prototype__proto.localeData = localeData; + + // Deprecations + duration_prototype__proto.toIsoString = deprecate('toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)', iso_string__toISOString); + duration_prototype__proto.lang = lang; + + // Side effect imports + + addFormatToken('X', 0, 0, 'unix'); + addFormatToken('x', 0, 0, 'valueOf'); + + // PARSING + + addRegexToken('x', matchSigned); + addRegexToken('X', matchTimestamp); + addParseToken('X', function (input, array, config) { + config._d = new Date(parseFloat(input, 10) * 1000); + }); + addParseToken('x', function (input, array, config) { + config._d = new Date(toInt(input)); }); - /* EMBED_LOCALES */ + // Side effect imports - /************************************ - Exposing Moment - ************************************/ - function makeGlobal(shouldDeprecate) { - /*global ender:false */ - if (typeof ender !== 'undefined') { - return; - } - oldGlobalMoment = globalScope.moment; - if (shouldDeprecate) { - globalScope.moment = deprecate( - 'Accessing Moment through the global scope is ' + - 'deprecated, and will be removed in an upcoming ' + - 'release.', - moment); - } else { - globalScope.moment = moment; - } - } + utils_hooks__hooks.version = '2.10.2'; - // CommonJS module is defined - if (hasModule) { - module.exports = moment; - } else if (typeof define === 'function' && define.amd) { - define(function (require, exports, module) { - if (module.config && module.config() && module.config().noGlobal === true) { - // release the global variable - globalScope.moment = oldGlobalMoment; - } + setHookCallback(local__createLocal); - return moment; - }); - makeGlobal(true); - } else { - makeGlobal(); - } -}).call(this); + utils_hooks__hooks.fn = momentPrototype; + utils_hooks__hooks.min = min; + utils_hooks__hooks.max = max; + utils_hooks__hooks.utc = create_utc__createUTC; + utils_hooks__hooks.unix = moment__createUnix; + utils_hooks__hooks.months = lists__listMonths; + utils_hooks__hooks.isDate = isDate; + utils_hooks__hooks.locale = locale_locales__getSetGlobalLocale; + utils_hooks__hooks.invalid = valid__createInvalid; + utils_hooks__hooks.duration = create__createDuration; + utils_hooks__hooks.isMoment = isMoment; + utils_hooks__hooks.weekdays = lists__listWeekdays; + utils_hooks__hooks.parseZone = moment__createInZone; + utils_hooks__hooks.localeData = locale_locales__getLocale; + utils_hooks__hooks.isDuration = isDuration; + utils_hooks__hooks.monthsShort = lists__listMonthsShort; + utils_hooks__hooks.weekdaysMin = lists__listWeekdaysMin; + utils_hooks__hooks.defineLocale = defineLocale; + utils_hooks__hooks.weekdaysShort = lists__listWeekdaysShort; + utils_hooks__hooks.normalizeUnits = normalizeUnits; + utils_hooks__hooks.relativeTimeThreshold = duration_humanize__getSetRelativeTimeThreshold; -}).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) + var _moment = utils_hooks__hooks; + + return _moment; + +})); },{}],84:[function(require,module,exports){ module.exports={ "name": "mermaid", @@ -30974,12 +31016,12 @@ exports.contentLoaded = function(){ if (typeof mermaid_config !== 'undefined') { // Check if property startOnLoad is set if (equals(true, mermaid_config.startOnLoad)) { - global.mermaid.init(mermaid.sequenceConfig); + global.mermaid.init(); } } else { // No config found, do autostart in this simple case - global.mermaid.init(mermaid.sequenceConfig); + global.mermaid.init(); } } diff --git a/dist/mermaid.slim.min.js b/dist/mermaid.slim.min.js index 6019a352a1..ec3f820254 100644 --- a/dist/mermaid.slim.min.js +++ b/dist/mermaid.slim.min.js @@ -1,13 +1,13 @@ -!function(){var define=void 0;!function t(e,n,r){function i(o,u){if(!n[o]){if(!e[o]){var s="function"==typeof require&&require;if(!u&&s)return s(o,!0);if(a)return a(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;ot?-1:t>e?1:t>=e?0:0/0}function n(t){return null===t?0/0:+t}function r(t){return!isNaN(t)}function i(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function a(t){return t.length}function o(t){for(var e=1;t*e%1;)e*=10;return e}function u(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function s(){this._=Object.create(null)}function c(t){return(t+="")===hu||t[0]===fu?fu+t:t}function l(t){return(t+="")[0]===fu?t.slice(1):t}function h(t){return c(t)in this._}function f(t){return(t=c(t))in this._&&delete this._[t]}function d(){var t=[];for(var e in this._)t.push(l(e));return t}function p(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function v(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=du.length;r>n;++n){var i=du[n]+e;if(i in t)return i}}function b(){}function _(){}function x(t){function e(){for(var e,r=n,i=-1,a=r.length;++in;n++)for(var i,a=t[n],o=0,u=a.length;u>o;o++)(i=a[o])&&e(i,o,n);return t}function Y(t){return gu(t,wu),t}function j(t){var e,n;return function(r,i,a){var o,u=t[a].update,s=u.length;for(a!=n&&(n=a,e=0),i>=e&&(e=i+1);!(o=u[e])&&++e0&&(t=t.slice(0,u));var c=Au.get(t);return c&&(t=c,s=G),u?e?i:r:e?b:a}function H(t,e){return function(n){var r=Xo.event;Xo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{Xo.event=r}}}function G(t,e){var n=H(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function $(){var t=".dragsuppress-"+ ++Du,e="click"+t,n=Xo.select(eu).on("touchmove"+t,w).on("dragstart"+t,w).on("selectstart"+t,w);if(Eu){var r=tu.style,i=r[Eu];r[Eu]="none"}return function(a){function o(){n.on(e,null)}n.on(t,null),Eu&&(r[Eu]=i),a&&(n.on(e,function(){w(),o()},!0),setTimeout(o,0))}}function W(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Mu&&(eu.scrollX||eu.scrollY)){n=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Mu=!(i.f||i.e),n.remove()}return Mu?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}function Z(){return Xo.event.changedTouches[0].identifier}function X(){return Xo.event.target}function K(){return eu}function J(t){return t>0?1:0>t?-1:0}function Q(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function te(t){return t>1?0:-1>t?Su:Math.acos(t)}function ee(t){return t>1?Tu:-1>t?-Tu:Math.asin(t)}function ne(t){return((t=Math.exp(t))-1/t)/2}function re(t){return((t=Math.exp(t))+1/t)/2}function ie(t){return((t=Math.exp(2*t))-1)/(t+1)}function ae(t){return(t=Math.sin(t/2))*t}function oe(){}function ue(t,e,n){return this instanceof ue?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ue?new ue(t.h,t.s,t.l):xe(""+t,we,ue):new ue(t,e,n)}function se(t,e,n){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?a+(o-a)*t/60:180>t?o:240>t?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*r(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,o=.5>=n?n*(1+e):n+e-n*e,a=2*n-o,new me(i(t+120),i(t),i(t-120))}function ce(t,e,n){return this instanceof ce?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ce?new ce(t.h,t.c,t.l):t instanceof he?de(t.l,t.a,t.b):de((t=ke((t=Xo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ce(t,e,n)}function le(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new he(n,Math.cos(t*=Bu)*e,Math.sin(t)*e)}function he(t,e,n){return this instanceof he?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof he?new he(t.l,t.a,t.b):t instanceof ce?le(t.h,t.c,t.l):ke((t=me(t)).r,t.g,t.b):new he(t,e,n)}function fe(t,e,n){var r=(t+16)/116,i=r+e/500,a=r-n/200;return i=pe(i)*Vu,r=pe(r)*Hu,a=pe(a)*Gu,new me(ye(3.2404542*i-1.5371385*r-.4985314*a),ye(-.969266*i+1.8760108*r+.041556*a),ye(.0556434*i-.2040259*r+1.0572252*a))}function de(t,e,n){return t>0?new ce(Math.atan2(n,e)*Nu,Math.sqrt(e*e+n*n),t):new ce(0/0,0/0,t)}function pe(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ge(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ye(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function me(t,e,n){return this instanceof me?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof me?new me(t.r,t.g,t.b):xe(""+t,me,se):new me(t,e,n)}function ve(t){return new me(t>>16,t>>8&255,255&t)}function be(t){return ve(t)+""}function _e(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function xe(t,e,n){var r,i,a,o=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/i.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(Ee(i[0]),Ee(i[1]),Ee(i[2]))}return(a=Zu.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o=o>>4|o,u=240&a,u=u>>4|u,s=15&a,s=s<<4|s):7===t.length&&(o=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),e(o,u,s))}function we(t,e,n){var r,i,a=Math.min(t/=255,e/=255,n/=255),o=Math.max(t,e,n),u=o-a,s=(o+a)/2;return u?(i=.5>s?u/(o+a):u/(2-o-a),r=t==o?(e-n)/u+(n>e?6:0):e==o?(n-t)/u+2:(t-e)/u+4,r*=60):(r=0/0,i=s>0&&1>s?0:r),new ue(r,i,s)}function ke(t,e,n){t=Ae(t),e=Ae(e),n=Ae(n);var r=ge((.4124564*t+.3575761*e+.1804375*n)/Vu),i=ge((.2126729*t+.7151522*e+.072175*n)/Hu),a=ge((.0193339*t+.119192*e+.9503041*n)/Gu);return he(116*i-16,500*(r-i),200*(i-a))}function Ae(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ee(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function De(t){return"function"==typeof t?t:function(){return t}}function Me(t){return t}function Se(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Ce(e,n,t,r)}}function Ce(t,e,n,r){function i(){var t,e=s.status;if(!e&&Fe(s)||e>=200&&300>e||304===e){try{t=n.call(a,s)}catch(r){return void o.error.call(a,r)}o.load.call(a,t)}else o.error.call(a,s)}var a={},o=Xo.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,c=null;return!eu.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var e=Xo.event;Xo.event=t;try{o.progress.call(a,s)}finally{Xo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(c=t,a):c},a.response=function(t){return n=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(Jo(arguments)))}}),a.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),s.setRequestHeader)for(var l in u)s.setRequestHeader(l,u[l]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=c&&(s.responseType=c),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,s),s.send(null==r?null:r),a},a.abort=function(){return s.abort(),a},Xo.rebind(a,o,"on"),null==r?a:a.get(Te(r))}function Te(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Fe(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Le(){var t=Be(),e=Ne()-t;e>24?(isFinite(e)&&(clearTimeout(Qu),Qu=setTimeout(Le,e)),Ju=0):(Ju=1,es(Le))}function Be(){var t=Date.now();for(ts=Xu;ts;)t>=ts.t&&(ts.f=ts.c(t-ts.t)),ts=ts.n;return t}function Ne(){for(var t,e=Xu,n=1/0;e;)e.f?e=t?t.n=e.n:Xu=e.n:(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function qe(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,a=r&&n?function(t,e){for(var i=t.length,a=[],o=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>e&&(u=Math.max(1,e-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>e));)u=r[o=(o+1)%r.length];return a.reverse().join(n)}:Me;return function(t){var n=rs.exec(t),r=n[1]||" ",o=n[2]||">",u=n[3]||"-",s=n[4]||"",c=n[5],l=+n[6],h=n[7],f=n[8],d=n[9],p=1,g="",y="",m=!1,v=!0;switch(f&&(f=+f.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,y="%",d="f";break;case"p":p=100,y="%",d="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+d.toLowerCase());case"c":v=!1;case"d":m=!0,f=0;break;case"s":p=-1,d="r"}"$"===s&&(g=i[0],y=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):("e"==d||"f"==d)&&(f=Math.max(0,Math.min(20,f)))),d=is.get(d)||Re;var b=c&&h;return function(t){var n=y;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>p){var s=Xo.formatPrefix(t,f);t=s.scale(t),n=s.symbol+y}else t*=p;t=d(t,f);var _,x,w=t.lastIndexOf(".");if(0>w){var k=v?t.lastIndexOf("e"):-1;0>k?(_=t,x=""):(_=t.substring(0,k),x=t.substring(k))}else _=t.substring(0,w),x=e+t.substring(w+1);!c&&h&&(_=a(_,1/0));var A=g.length+_.length+x.length+(b?0:i.length),E=l>A?new Array(A=l-A+1).join(r):"";return b&&(_=a(E+_,E.length?l-x.length:1/0)),i+=g,t=_+x,("<"===o?i+t+E:">"===o?E+i+t:"^"===o?E.substring(0,A>>=1)+i+t+E.substring(A):i+(b?t:E+t))+n}}}function Re(t){return t+""}function Pe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ue(t,e,n){function r(e){var n=t(e),r=a(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new os(n-1)),1),n}function a(t,n){return e(t=new os(+t),n),t}function o(t,r,a){var o=i(t),u=[];if(a>1)for(;r>o;)n(o)%a||u.push(new Date(+o)),e(o,1);else for(;r>o;)u.push(new Date(+o)),e(o,1);return u}function u(t,e,n){try{os=Pe;var r=new Pe;return r._=t,o(r,e,n)}finally{os=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Ye(t);return s.floor=s,s.round=Ye(r),s.ceil=Ye(i),s.offset=Ye(a),s.range=u,t}function Ye(t){return function(e,n){try{os=Pe;var r=new Pe;return r._=e,t(r,n)._}finally{os=Date}}}function je(t){function e(t){function e(e){for(var n,i,a,o=[],u=-1,s=0;++uu;){if(r>=c)return-1;if(i=e.charCodeAt(u++),37===i){if(o=e.charAt(u++),a=C[o in ss?e.charAt(u++):o],!a||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){w.lastIndex=0;var r=w.exec(e.slice(n));return r?(t.w=k.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){D.lastIndex=0;var r=D.exec(e.slice(n));return r?(t.m=M.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){A.lastIndex=0;var r=A.exec(e.slice(n));return r?(t.m=E.get(r[0].toLowerCase()),n+r[0].length):-1}function u(t,e,r){return n(t,S.c.toString(),e,r)}function s(t,e,r){return n(t,S.x.toString(),e,r)}function c(t,e,r){return n(t,S.X.toString(),e,r)}function l(t,e,n){var r=b.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,g=t.days,y=t.shortDays,m=t.months,v=t.shortMonths;e.utc=function(t){function n(t){try{os=Pe;var e=new os;return e._=t,r(e)}finally{os=Date}}var r=e(t);return n.parse=function(t){try{os=Pe;var e=r.parse(t);return e&&e._}finally{os=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=cn;var b=Xo.map(),_=Ve(g),x=He(g),w=Ve(y),k=He(y),A=Ve(m),E=He(m),D=Ve(v),M=He(v);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var S={a:function(t){return y[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:e(h),d:function(t,e){return ze(t.getDate(),e,2)},e:function(t,e){return ze(t.getDate(),e,2)},H:function(t,e){return ze(t.getHours(),e,2)},I:function(t,e){return ze(t.getHours()%12||12,e,2)},j:function(t,e){return ze(1+as.dayOfYear(t),e,3)},L:function(t,e){return ze(t.getMilliseconds(),e,3)},m:function(t,e){return ze(t.getMonth()+1,e,2)},M:function(t,e){return ze(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return ze(t.getSeconds(),e,2)},U:function(t,e){return ze(as.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return ze(as.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return ze(t.getFullYear()%100,e,2)},Y:function(t,e){return ze(t.getFullYear()%1e4,e,4)},Z:un,"%":function(){return"%"}},C={a:r,A:i,b:a,B:o,c:u,d:tn,e:tn,H:nn,I:nn,j:en,L:on,m:Qe,M:rn,p:l,S:an,U:$e,w:Ge,W:We,x:s,X:c,y:Xe,Y:Ze,Z:Ke,"%":sn};return e}function ze(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",a=i.length;return r+(n>a?new Array(n-a+1).join(e)+i:i)}function Ve(t){return new RegExp("^(?:"+t.map(Xo.requote).join("|")+")","i")}function He(t){for(var e=new s,n=-1,r=t.length;++n68?1900:2e3)}function Qe(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function tn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function en(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function nn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function rn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function an(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function on(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function un(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=lu(e)/60|0,i=lu(e)%60;return n+ze(r,"0",2)+ze(i,"0",2)}function sn(t,e,n){ls.lastIndex=0;var r=ls.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function cn(t){for(var e=t.length,n=-1;++n=0?1:-1,u=o*n,s=Math.cos(e),c=Math.sin(e),l=a*c,h=i*s+l*Math.cos(u),f=l*o*Math.sin(u);ys.add(Math.atan2(f,h)),r=t,i=s,a=c}var e,n,r,i,a;ms.point=function(o,u){ms.point=t,r=(e=o)*Bu,i=Math.cos(u=(n=u)*Bu/2+Su/4),a=Math.sin(u)},ms.lineEnd=function(){t(e,n)}}function yn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function vn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function bn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _n(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function wn(t){return[Math.atan2(t[1],t[0]),ee(t[2])]}function kn(t,e){return lu(t[0]-e[0])u;++u)i.point((n=t[u])[0],n[1]);return void i.lineEnd()}var s=new Ln(n,t,null,!0),c=new Ln(n,null,s,!1);s.o=c,a.push(s),o.push(c),s=new Ln(r,t,null,!1),c=new Ln(r,null,s,!0),s.o=c,a.push(s),o.push(c)}}),o.sort(e),Fn(a),Fn(o),a.length){for(var u=0,s=n,c=o.length;c>u;++u)o[u].e=s=!s;for(var l,h,f=a[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;l=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var u=0,c=l.length;c>u;++u)i.point((h=l[u])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p){l=d.p.z;for(var u=l.length-1;u>=0;--u)i.point((h=l[u])[0],h[1])}else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,l=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Fn(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o1&&2&e&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Nn))}var d,p,g,y=e(a),m=i.invert(r[0],r[1]),v={point:o,lineStart:s,lineEnd:c,polygonStart:function(){v.point=l,v.lineStart=h,v.lineEnd=f,d=[],p=[]},polygonEnd:function(){v.point=o,v.lineStart=s,v.lineEnd=c,d=Xo.merge(d);var t=Un(m,p);d.length?(x||(a.polygonStart(),x=!0),Tn(d,In,t,n,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=On(),_=e(b),x=!1;return v}}function Nn(t){return t.length>1}function On(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:b,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function In(t,e){return((t=t.x)[0]<0?t[1]-Tu-Fu:Tu-t[1])-((e=e.x)[0]<0?e[1]-Tu-Fu:Tu-e[1])}function qn(t){var e,n=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var u=a>0?Su:-Su,s=lu(a-n);lu(s-Su)0?Tu:-Tu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),e=0):i!==u&&s>=Su&&(lu(n-i)Fu?Math.atan((Math.sin(e)*(a=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+r)/2}function Pn(t,e,n,r){var i;if(null==t)i=n*Tu,r.point(-Su,i),r.point(0,i),r.point(Su,i),r.point(Su,0),r.point(Su,-i),r.point(0,-i),r.point(-Su,-i),r.point(-Su,0),r.point(-Su,i);else if(lu(t[0]-e[0])>Fu){var a=t[0]u;++u){var c=e[u],l=c.length;if(l)for(var h=c[0],f=h[0],d=h[1]/2+Su/4,p=Math.sin(d),g=Math.cos(d),y=1;;){y===l&&(y=0),t=c[y];var m=t[0],v=t[1]/2+Su/4,b=Math.sin(v),_=Math.cos(v),x=m-f,w=x>=0?1:-1,k=w*x,A=k>Su,E=p*b;if(ys.add(Math.atan2(E*w*Math.sin(k),g*_+E*Math.cos(k))),a+=A?x+w*Cu:x,A^f>=n^m>=n){var D=vn(yn(h),yn(t));xn(D);var M=vn(i,D);xn(M);var S=(A^x>=0?-1:1)*ee(M[2]);(r>S||r===S&&(D[0]||D[1]))&&(o+=A^x>=0?1:-1)}if(!y++)break;f=m,p=b,g=_,h=t}}return(-Fu>a||Fu>a&&0>ys)^1&o}function Yn(t){function e(t,e){return Math.cos(t)*Math.cos(e)>a}function n(t){var n,a,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(h,f){var d,p=[h,f],g=e(h,f),y=o?g?0:i(h,f):g?i(h+(0>h?Su:-Su),f):0;if(!n&&(c=s=g)&&t.lineStart(),g!==s&&(d=r(n,p),(kn(n,d)||kn(p,d))&&(p[0]+=Fu,p[1]+=Fu,g=e(p[0],p[1]))),g!==s)l=0,g?(t.lineStart(),d=r(p,n),t.point(d[0],d[1])):(d=r(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(u&&n&&o^g){var m;y&a||!(m=r(p,n,!0))||(l=0,o?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&kn(n,p)||t.point(p[0],p[1]),n=p,s=g,a=y},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return l|(c&&s)<<1}}}function r(t,e,n){var r=yn(t),i=yn(e),o=[1,0,0],u=vn(r,i),s=mn(u,u),c=u[0],l=s-c*c;if(!l)return!n&&t;var h=a*s/l,f=-a*c/l,d=vn(o,u),p=_n(o,h),g=_n(u,f);bn(p,g);var y=d,m=mn(p,y),v=mn(y,y),b=m*m-v*(mn(p,p)-1);if(!(0>b)){var _=Math.sqrt(b),x=_n(y,(-m-_)/v);if(bn(x,p),x=wn(x),!n)return x;var w,k=t[0],A=e[0],E=t[1],D=e[1];k>A&&(w=k,k=A,A=w);var M=A-k,S=lu(M-Su)M;if(!S&&E>D&&(w=E,E=D,D=w),C?S?E+D>0^x[1]<(lu(x[0]-k)Su^(k<=x[0]&&x[0]<=A)){var T=_n(y,(-m+_)/v);return bn(T,p),[x,wn(T)]}}}function i(e,n){var r=o?t:Su-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var a=Math.cos(t),o=a>0,u=lu(a)>Fu,s=gr(t,6*Bu);return Bn(e,n,s,o?[0,-t]:[-Su,t-Su])}function jn(t,e,n,r){return function(i){var a,o=i.a,u=i.b,s=o.x,c=o.y,l=u.x,h=u.y,f=0,d=1,p=l-s,g=h-c;if(a=t-s,p||!(a>0)){if(a/=p,0>p){if(f>a)return;d>a&&(d=a)}else if(p>0){if(a>d)return;a>f&&(f=a)}if(a=n-s,p||!(0>a)){if(a/=p,0>p){if(a>d)return;a>f&&(f=a)}else if(p>0){if(f>a)return;d>a&&(d=a)}if(a=e-c,g||!(a>0)){if(a/=g,0>g){if(f>a)return;d>a&&(d=a)}else if(g>0){if(a>d)return;a>f&&(f=a)}if(a=r-c,g||!(0>a)){if(a/=g,0>g){if(a>d)return;a>f&&(f=a)}else if(g>0){if(f>a)return;d>a&&(d=a)}return f>0&&(i.a={x:s+f*p,y:c+f*g}),1>d&&(i.b={x:s+d*p,y:c+d*g}),i}}}}}}function zn(t,e,n,r){function i(r,i){return lu(r[0]-t)0?0:3:lu(r[0]-n)0?2:1:lu(r[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(u){function s(t){for(var e=0,n=y.length,r=t[1],i=0;n>i;++i)for(var a,o=1,u=y[i],s=u.length,c=u[0];s>o;++o)a=u[o],c[1]<=r?a[1]>r&&Q(c,a,t)>0&&++e:a[1]<=r&&Q(c,a,t)<0&&--e,c=a;return 0!==e}function c(a,u,s,c){var l=0,h=0;if(null==a||(l=i(a,s))!==(h=i(u,s))||o(a,u)<0^s>0){do c.point(0===l||3===l?t:n,l>1?r:e);while((l=(l+s+4)%4)!==h)}else c.point(u[0],u[1])}function l(i,a){return i>=t&&n>=i&&a>=e&&r>=a}function h(t,e){l(t,e)&&u.point(t,e)}function f(){C.point=p,y&&y.push(m=[]),A=!0,k=!1,x=w=0/0}function d(){g&&(p(v,b),_&&k&&M.rejoin(),g.push(M.buffer())),C.point=h,k&&u.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var n=l(t,e);if(y&&m.push([t,e]),A)v=t,b=e,_=n,A=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&k)u.point(t,e);else{var r={a:{x:x,y:w},b:{x:t,y:e}};S(r)?(k||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),E=!1):n&&(u.lineStart(),u.point(t,e),E=!1)}x=t,w=e,k=n}var g,y,m,v,b,_,x,w,k,A,E,D=u,M=On(),S=jn(t,e,n,r),C={point:h,lineStart:f,lineEnd:d,polygonStart:function(){u=M,g=[],y=[],E=!0},polygonEnd:function(){u=D,g=Xo.merge(g);var e=s([t,r]),n=E&&e,i=g.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),c(null,null,1,u),u.lineEnd()),i&&Tn(g,a,e,c,u),u.polygonEnd()),g=y=m=null}};return C}}function Vn(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return n=e.invert(n,r),n&&t.invert(n[0],n[1])}),n}function Hn(t){var e=0,n=Su/3,r=ur(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Su/180,n=t[1]*Su/180):[e/Su*180,n/Su*180]},i}function Gn(t,e){function n(t,e){var n=Math.sqrt(a-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),o-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,a=1+r*(2*i-r),o=Math.sqrt(a)/i;return n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,ee((a-(t*t+n*n)*i*i)/(2*i))]},n}function $n(){function t(t,e){Bs+=i*t-r*e,r=t,i=e}var e,n,r,i;Rs.point=function(a,o){Rs.point=t,e=r=a,n=i=o},Rs.lineEnd=function(){t(e,n)}}function Wn(t,e){Ns>t&&(Ns=t),t>Is&&(Is=t),Os>e&&(Os=e),e>qs&&(qs=e)}function Zn(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),u.point=n}function n(t,e){o.push("L",t,",",e)}function r(){u.point=t}function i(){o.push("Z")}var a=Xn(4.5),o=[],u={point:t,lineStart:function(){u.point=e},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return a=Xn(t),u},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return u}function Xn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Kn(t,e){_s+=t,xs+=e,++ws}function Jn(){function t(t,r){var i=t-e,a=r-n,o=Math.sqrt(i*i+a*a);ks+=o*(e+t)/2,As+=o*(n+r)/2,Es+=o,Kn(e=t,n=r)}var e,n;Us.point=function(r,i){Us.point=t,Kn(e=r,n=i)}}function Qn(){Us.point=Kn}function tr(){function t(t,e){var n=t-r,a=e-i,o=Math.sqrt(n*n+a*a);ks+=o*(r+t)/2,As+=o*(i+e)/2,Es+=o,o=i*t-r*e,Ds+=o*(r+t),Ms+=o*(i+e),Ss+=3*o,Kn(r=t,i=e)}var e,n,r,i;Us.point=function(a,o){Us.point=t,Kn(e=r=a,n=i=o)},Us.lineEnd=function(){t(e,n)}}function er(t){function e(e,n){t.moveTo(e,n),t.arc(e,n,o,0,Cu)}function n(e,n){t.moveTo(e,n),u.point=r}function r(e,n){t.lineTo(e,n)}function i(){u.point=e}function a(){t.closePath()}var o=4.5,u={point:e,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=a},polygonEnd:function(){u.lineEnd=i,u.point=e},pointRadius:function(t){return o=t,u},result:b};return u}function nr(t){function e(t){return(u?r:n)(t)}function n(e){return ar(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){b=0/0,A.point=a,e.lineStart()}function a(n,r){var a=yn([n,r]),o=t(n,r);i(b,_,v,x,w,k,b=o[0],_=o[1],v=n,x=a[0],w=a[1],k=a[2],u,e),e.point(b,_)}function o(){A.point=n,e.lineEnd()}function s(){r(),A.point=c,A.lineEnd=l -}function c(t,e){a(h=t,f=e),d=b,p=_,g=x,y=w,m=k,A.point=a}function l(){i(b,_,v,x,w,k,d,p,h,g,y,m,u,e),A.lineEnd=o,o()}var h,f,d,p,g,y,m,v,b,_,x,w,k,A={point:n,lineStart:r,lineEnd:o,polygonStart:function(){e.polygonStart(),A.lineStart=s},polygonEnd:function(){e.polygonEnd(),A.lineStart=r}};return A}function i(e,n,r,u,s,c,l,h,f,d,p,g,y,m){var v=l-e,b=h-n,_=v*v+b*b;if(_>4*a&&y--){var x=u+d,w=s+p,k=c+g,A=Math.sqrt(x*x+w*w+k*k),E=Math.asin(k/=A),D=lu(lu(k)-1)a||lu((v*T+b*F)/_-.5)>.3||o>u*d+s*p+c*g)&&(i(e,n,r,u,s,c,S,C,D,x/=A,w/=A,k,y,m),m.point(S,C),i(S,C,D,x,w,k,l,h,f,d,p,g,y,m))}}var a=.5,o=Math.cos(30*Bu),u=16;return e.precision=function(t){return arguments.length?(u=(a=t*t)>0&&16,e):Math.sqrt(a)},e}function rr(t){var e=nr(function(e,n){return t([e*Nu,n*Nu])});return function(t){return sr(e(t))}}function ir(t){this.stream=t}function ar(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function or(t){return ur(function(){return t})()}function ur(t){function e(t){return t=u(t[0]*Bu,t[1]*Bu),[t[0]*f+s,c-t[1]*f]}function n(t){return t=u.invert((t[0]-s)/f,(c-t[1])/f),t&&[t[0]*Nu,t[1]*Nu]}function r(){u=Vn(o=hr(m,v,b),a);var t=a(g,y);return s=d-t[0]*f,c=p+t[1]*f,i()}function i(){return l&&(l.valid=!1,l=null),e}var a,o,u,s,c,l,h=nr(function(t,e){return t=a(t,e),[t[0]*f+s,c-t[1]*f]}),f=150,d=480,p=250,g=0,y=0,m=0,v=0,b=0,_=Ts,x=Me,w=null,k=null;return e.stream=function(t){return l&&(l.valid=!1),l=sr(_(o,h(x(t)))),l.valid=!0,l},e.clipAngle=function(t){return arguments.length?(_=null==t?(w=t,Ts):Yn((w=+t)*Bu),i()):w},e.clipExtent=function(t){return arguments.length?(k=t,x=t?zn(t[0][0],t[0][1],t[1][0],t[1][1]):Me,i()):k},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Bu,y=t[1]%360*Bu,r()):[g*Nu,y*Nu]},e.rotate=function(t){return arguments.length?(m=t[0]%360*Bu,v=t[1]%360*Bu,b=t.length>2?t[2]%360*Bu:0,r()):[m*Nu,v*Nu,b*Nu]},Xo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&n,r()}}function sr(t){return ar(t,function(e,n){t.point(e*Bu,n*Bu)})}function cr(t,e){return[t,e]}function lr(t,e){return[t>Su?t-Cu:-Su>t?t+Cu:t,e]}function hr(t,e,n){return t?e||n?Vn(dr(t),pr(e,n)):dr(t):e||n?pr(e,n):lr}function fr(t){return function(e,n){return e+=t,[e>Su?e-Cu:-Su>e?e+Cu:e,n]}}function dr(t){var e=fr(t);return e.invert=fr(-t),e}function pr(t,e){function n(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*r+u*i;return[Math.atan2(s*a-l*o,u*r-c*i),ee(l*a+s*o)]}var r=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*a-s*o;return[Math.atan2(s*a+c*o,u*r+l*i),ee(l*r-u*i)]},n}function gr(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,a,o,u){var s=o*e;null!=i?(i=yr(n,i),a=yr(n,a),(o>0?a>i:i>a)&&(i+=o*Cu)):(i=t+o*Cu,a=t-.5*s);for(var c,l=i;o>0?l>a:a>l;l-=s)u.point((c=wn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function yr(t,e){var n=yn(e);n[0]-=t,xn(n);var r=te(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Fu)%(2*Math.PI)}function mr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function vr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function br(t){return t.source}function _r(t){return t.target}function xr(t,e,n,r){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),l=o*Math.cos(n),h=o*Math.sin(n),f=2*Math.asin(Math.sqrt(ae(r-e)+i*o*ae(n-t))),d=1/Math.sin(f),p=f?function(t){var e=Math.sin(t*=f)*d,n=Math.sin(f-t)*d,r=n*s+e*l,i=n*c+e*h,o=n*a+e*u;return[Math.atan2(i,r)*Nu,Math.atan2(o,Math.sqrt(r*r+i*i))*Nu]}:function(){return[t*Nu,e*Nu]};return p.distance=f,p}function wr(){function t(t,i){var a=Math.sin(i*=Bu),o=Math.cos(i),u=lu((t*=Bu)-e),s=Math.cos(u);Ys+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=r*a-n*o*s)*u),n*a+r*o*s),e=t,n=a,r=o}var e,n,r;js.point=function(i,a){e=i*Bu,n=Math.sin(a*=Bu),r=Math.cos(a),js.point=t},js.lineEnd=function(){js.point=js.lineEnd=b}}function kr(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),a=t(r*i);return[a*i*Math.sin(e),a*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,r*o),Math.asin(r&&n*a/r)]},n}function Ar(t,e){function n(t,e){o>0?-Tu+Fu>e&&(e=-Tu+Fu):e>Tu-Fu&&(e=Tu-Fu);var n=o/Math.pow(i(e),a);return[n*Math.sin(a*t),o-n*Math.cos(a*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Su/4+t/2)},a=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),o=r*Math.pow(i(t),a)/a;return a?(n.invert=function(t,e){var n=o-e,r=J(a)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/a,2*Math.atan(Math.pow(o/r,1/a))-Tu]},n):Dr}function Er(t,e){function n(t,e){var n=a-e;return[n*Math.sin(i*t),a-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),a=r/i+t;return lu(i)i;i++){for(;r>1&&Q(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Lr(t,e){return t[0]-e[0]||t[1]-e[1]}function Br(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Nr(t,e,n,r){var i=t[0],a=n[0],o=e[0]-i,u=r[0]-a,s=t[1],c=n[1],l=e[1]-s,h=r[1]-c,f=(u*(s-c)-h*(i-a))/(h*o-u*l);return[i+f*o,s+f*l]}function Or(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Ir(){ri(this),this.edge=this.site=this.circle=null}function qr(t){var e=tc.pop()||new Ir;return e.site=t,e}function Rr(t){Wr(t),Ks.remove(t),tc.push(t),ri(t)}function Pr(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},a=t.P,o=t.N,u=[t];Rr(t);for(var s=a;s.circle&&lu(n-s.circle.x)l;++l)c=u[l],s=u[l-1],ti(c.edge,s.site,c.site,i);s=u[0],c=u[h-1],c.edge=Jr(s.site,c.site,null,i),$r(s),$r(c)}function Ur(t){for(var e,n,r,i,a=t.x,o=t.y,u=Ks._;u;)if(r=Yr(u,o)-a,r>Fu)u=u.L;else{if(i=a-jr(u,o),!(i>Fu)){r>-Fu?(e=u.P,n=u):i>-Fu?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}var s=qr(t);if(Ks.insert(e,s),e||n){if(e===n)return Wr(e),n=qr(e.site),Ks.insert(s,n),s.edge=n.edge=Jr(e.site,s.site),$r(e),void $r(n);if(!n)return void(s.edge=Jr(e.site,s.site));Wr(e),Wr(n);var c=e.site,l=c.x,h=c.y,f=t.x-l,d=t.y-h,p=n.site,g=p.x-l,y=p.y-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_={x:(y*v-d*b)/m+l,y:(f*b-g*v)/m+h};ti(n.edge,c,p,_),s.edge=Jr(c,t,null,_),n.edge=Jr(t,p,null,_),$r(e),$r(n)}}function Yr(t,e){var n=t.site,r=n.x,i=n.y,a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;n=o.site;var u=n.x,s=n.y,c=s-e;if(!c)return u;var l=u-r,h=1/a-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-s+c/2+i-a/2)))/h+r:(r+u)/2}function jr(t,e){var n=t.N;if(n)return Yr(n,e);var r=t.site;return r.y===e?r.x:1/0}function zr(t){this.site=t,this.edges=[]}function Vr(t){for(var e,n,r,i,a,o,u,s,c,l,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],g=Xs,y=g.length;y--;)if(a=g[y],a&&a.prepare())for(u=a.edges,s=u.length,o=0;s>o;)l=u[o].end(),r=l.x,i=l.y,c=u[++o%s].start(),e=c.x,n=c.y,(lu(r-e)>Fu||lu(i-n)>Fu)&&(u.splice(o,0,new ei(Qr(a.site,l,lu(r-h)Fu?{x:h,y:lu(e-h)Fu?{x:lu(n-p)Fu?{x:f,y:lu(e-f)Fu?{x:lu(n-d)=-Lu)){var d=s*s+c*c,p=l*l+h*h,g=(h*d-c*p)/f,y=(s*p-l*d)/f,h=y+u,m=ec.pop()||new Gr;m.arc=t,m.site=i,m.x=g+o,m.y=h+Math.sqrt(g*g+y*y),m.cy=h,t.circle=m;for(var v=null,b=Qs._;b;)if(m.yy||y>=u)return;if(f>p){if(a){if(a.y>=c)return}else a={x:y,y:s};n={x:y,y:c}}else{if(a){if(a.yr||r>1)if(f>p){if(a){if(a.y>=c)return}else a={x:(s-i)/r,y:s};n={x:(c-i)/r,y:c}}else{if(a){if(a.yd){if(a){if(a.x>=u)return}else a={x:o,y:r*o+i};n={x:u,y:r*u+i}}else{if(a){if(a.xa&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:yi(n,r)})),a=ic.lastIndex;return ar;++r)u[(n=s[r]).i]=n.x(t);return u.join("")})}function vi(t,e){for(var n,r=Xo.interpolators.length;--r>=0&&!(n=Xo.interpolators[r](t,e)););return n}function bi(t,e){var n,r=[],i=[],a=t.length,o=e.length,u=Math.min(t.length,e.length);for(n=0;u>n;++n)r.push(vi(t[n],e[n]));for(;a>n;++n)i[n]=t[n];for(;o>n;++n)i[n]=e[n];return function(t){for(n=0;u>n;++n)i[n]=r[n](t);return i}}function _i(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function xi(t){return function(e){return 1-t(1-e)}}function wi(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function ki(t){return t*t}function Ai(t){return t*t*t}function Ei(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Di(t){return function(e){return Math.pow(e,t)}}function Mi(t){return 1-Math.cos(t*Tu)}function Si(t){return Math.pow(2,10*(t-1))}function Ci(t){return 1-Math.sqrt(1-t*t)}function Ti(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Cu*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Cu/e)}}function Fi(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Li(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Bi(t,e){t=Xo.hcl(t),e=Xo.hcl(e);var n=t.h,r=t.c,i=t.l,a=e.h-n,o=e.c-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.c:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return le(n+a*t,r+o*t,i+u*t)+""}}function Ni(t,e){t=Xo.hsl(t),e=Xo.hsl(e);var n=t.h,r=t.s,i=t.l,a=e.h-n,o=e.s-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.s:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return se(n+a*t,r+o*t,i+u*t)+""}}function Oi(t,e){t=Xo.lab(t),e=Xo.lab(e);var n=t.l,r=t.a,i=t.b,a=e.l-n,o=e.a-r,u=e.b-i;return function(t){return fe(n+a*t,r+o*t,i+u*t)+""}}function Ii(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function qi(t){var e=[t.a,t.b],n=[t.c,t.d],r=Pi(e),i=Ri(e,n),a=Pi(Ui(n,e,-i))||0;e[0]*n[1]180?l+=360:l-c>180&&(c+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:yi(c,l)})):l&&r.push(r.pop()+"rotate("+l+")"),h!=f?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:yi(h,f)}):f&&r.push(r.pop()+"skewX("+f+")"),d[0]!=p[0]||d[1]!=p[1]?(n=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:n-4,x:yi(d[0],p[0])},{i:n-2,x:yi(d[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),n=i.length,function(t){for(var e,a=-1;++a=0;)n.push(i[r])}function ta(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++on;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function ha(t){return t.reduce(fa,0)}function fa(t,e){return t+e[1]}function da(t,e){return pa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function pa(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,a=[];++n<=e;)a[n]=i*n+r;return a}function ga(t){return[Xo.min(t),Xo.max(t)]}function ya(t,e){return t.value-e.value}function ma(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function va(t,e){t._pack_next=e,e._pack_prev=t}function ba(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function _a(t){function e(t){l=Math.min(t.x-t.r,l),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((n=t.children)&&(c=n.length)){var n,r,i,a,o,u,s,c,l=1/0,h=-1/0,f=1/0,d=-1/0;if(n.forEach(xa),r=n[0],r.x=-r.r,r.y=0,e(r),c>1&&(i=n[1],i.x=i.r,i.y=0,e(i),c>2))for(a=n[2],Aa(r,i,a),e(a),ma(r,a),r._pack_prev=a,ma(a,i),i=r._pack_next,o=3;c>o;o++){Aa(r,i,a=n[o]);var p=0,g=1,y=1;for(u=i._pack_next;u!==i;u=u._pack_next,g++)if(ba(u,a)){p=1;break}if(1==p)for(s=r._pack_prev;s!==u._pack_prev&&!ba(s,a);s=s._pack_prev,y++);p?(y>g||g==y&&i.ro;o++)a=n[o],a.x-=m,a.y-=v,b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=b,n.forEach(wa)}}function xa(t){t._pack_next=t._pack_prev=t}function wa(t){delete t._pack_next,delete t._pack_prev}function ka(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var a=-1,o=i.length;++a=0;)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function Ta(t,e,n){return t.a.parent===e.parent?t.a:n}function Fa(t){return 1+Xo.max(t,function(t){return t.y})}function La(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ba(t){var e=t.children;return e&&e.length?Ba(e[0]):t}function Na(t){var e,n=t.children;return n&&(e=n.length)?Na(n[e-1]):t}function Oa(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ia(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>a&&(r+=a/2,a=0),{x:n,y:r,dx:i,dy:a}}function qa(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Ra(t){return t.rangeExtent?t.rangeExtent():qa(t.range())}function Pa(t,e,n,r){var i=n(t[0],t[1]),a=r(e[0],e[1]);return function(t){return a(i(t))}}function Ua(t,e){var n,r=0,i=t.length-1,a=t[r],o=t[i];return a>o&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Ya(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:gc}function ja(t,e,n,r){var i=[],a=[],o=0,u=Math.min(t.length,e.length)-1;for(t[u]2?ja:Pa,s=r?zi:ji;return o=i(t,e,s,n),u=i(e,t,s,vi),a}function a(t){return o(t)}var o,u;return a.invert=function(t){return u(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Ii)},a.clamp=function(t){return arguments.length?(r=t,i()):r},a.interpolate=function(t){return arguments.length?(n=t,i()):n},a.ticks=function(e){return $a(t,e)},a.tickFormat=function(e,n){return Wa(t,e,n)},a.nice=function(e){return Ha(t,e),i()},a.copy=function(){return za(t,e,n,r)},i()}function Va(t,e){return Xo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ha(t,e){return Ua(t,Ya(Ga(t,e)[2]))}function Ga(t,e){null==e&&(e=10);var n=qa(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),a=e/r*i;return.15>=a?i*=10:.35>=a?i*=5:.75>=a&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function $a(t,e){return Xo.range.apply(Xo,Ga(t,e))}function Wa(t,e,n){var r=Ga(t,e);if(n){var i=rs.exec(n);if(i.shift(),"s"===i[8]){var a=Xo.formatPrefix(Math.max(lu(r[0]),lu(r[1])));return i[7]||(i[7]="."+Za(a.scale(r[2]))),i[8]="f",n=Xo.format(i.join("")),function(t){return n(a.scale(t))+a.symbol}}i[7]||(i[7]="."+Xa(i[8],r)),n=i.join("")}else n=",."+Za(r[2])+"f";return Xo.format(n)}function Za(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Xa(t,e){var n=Za(e[2]);return t in yc?Math.abs(n-Za(Math.max(lu(e[0]),lu(e[1]))))+ +("e"!==t):n-2*("%"===t)}function Ka(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),o):e},o.nice=function(){var e=Ua(r.map(i),n?Math:vc);return t.domain(e),r=e.map(a),o},o.ticks=function(){var t=qa(r),o=[],u=t[0],s=t[1],c=Math.floor(i(u)),l=Math.ceil(i(s)),h=e%1?2:e;if(isFinite(l-c)){if(n){for(;l>c;c++)for(var f=1;h>f;f++)o.push(a(c)*f);o.push(a(c))}else for(o.push(a(c));c++0;f--)o.push(a(c)*f);for(c=0;o[c]s;l--);o=o.slice(c,l)}return o},o.tickFormat=function(t,e){if(!arguments.length)return mc;arguments.length<2?e=mc:"function"!=typeof e&&(e=Xo.format(e));var r,u=Math.max(.1,t/o.ticks().length),s=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(t){return t/a(s(i(t)+r))<=u?e(t):""}},o.copy=function(){return Ka(t.copy(),e,n,r)},Va(o,t)}function Ja(t,e,n){function r(e){return t(i(e))}var i=Qa(e),a=Qa(1/e);return r.invert=function(e){return a(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return $a(n,t)},r.tickFormat=function(t,e){return Wa(n,t,e)},r.nice=function(t){return r.domain(Ha(n,t))},r.exponent=function(o){return arguments.length?(i=Qa(e=o),a=Qa(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return Ja(t.copy(),e,n)},Va(r,t)}function Qa(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function to(t,e){function n(n){return a[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):0/0))-1)%a.length]}function r(e,n){return Xo.range(t.length).map(function(t){return e+n*t})}var i,a,o;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new s;for(var a,o=-1,u=r.length;++ot?[0/0,0/0]:[t>0?u[t-1]:e[0],te?0/0:e/a+t,[e,e+1/a]},r.copy=function(){return no(t,e,n)},i()}function ro(t,e){function n(n){return n>=n?e[Xo.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return ro(t,e)},n}function io(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return $a(t,e)},e.tickFormat=function(e,n){return Wa(t,e,n)},e.copy=function(){return io(t)},e}function ao(t){return t.innerRadius}function oo(t){return t.outerRadius}function uo(t){return t.startAngle}function so(t){return t.endAngle}function co(t){function e(e){function o(){c.push("M",a(t(l),u))}for(var s,c=[],l=[],h=-1,f=e.length,d=De(n),p=De(r);++h1&&i.push("H",r[0]),i.join("")}function po(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e1){u=e[1],a=t[s],s++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var c=2;c9&&(i=3*e/Math.sqrt(i),o[u]=i*n,o[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),a.push([i||0,o[u]*i||0]);return a}function To(t){return t.length<3?lo(t):t[0]+bo(t,Co(t))}function Fo(t){for(var e,n,r,i=-1,a=t.length;++in?c():(i.active=n,a.event&&a.event.start.call(t,l,e),a.tween.forEach(function(n,r){(r=r.call(t,l,e))&&g.push(r)}),void Xo.timer(function(){return p.c=s(r||1)?Cn:s,1},0,o))}function s(r){if(i.active!==n)return c();for(var o=r/d,u=h(o),s=g.length;s>0;)g[--s].call(t,u);return o>=1?(a.event&&a.event.end.call(t,l,e),c()):void 0}function c(){return--i.count?delete i[n]:delete t.__transition__,1}var l=t.__data__,h=a.ease,f=a.delay,d=a.duration,p=ts,g=[];return p.t=f+o,r>=f?u(r-f):void(p.c=u)},0,o)}}function zo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function Vo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function Ho(t){return t.toISOString()}function Go(t,e,n){function r(e){return t(e)}function i(t,n){var r=t[1]-t[0],i=r/n,a=Xo.bisect(zc,i);return a==zc.length?[e.year,Ga(t.map(function(t){return t/31536e6}),n)[2]]:a?e[i/zc[a-1]1?{floor:function(e){for(;n(e=t.floor(e));)e=$o(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=$o(+e+1);return e}}:t))},r.ticks=function(t,e){var n=qa(r.domain()),a=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(n[0],$o(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return Go(t.copy(),e,n)},Va(r,t)}function $o(t){return new Date(t)}function Wo(t){return JSON.parse(t.responseText)}function Zo(t){var e=Qo.createRange();return e.selectNode(Qo.body),e.createContextualFragment(t.responseText)}var Xo={version:"3.4.13"};Date.now||(Date.now=function(){return+new Date});var Ko=[].slice,Jo=function(t){return Ko.call(t)},Qo=document,tu=Qo.documentElement,eu=window;try{Jo(tu.childNodes)[0].nodeType}catch(nu){Jo=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Qo.createElement("div").style.setProperty("opacity",0,"")}catch(ru){var iu=eu.Element.prototype,au=iu.setAttribute,ou=iu.setAttributeNS,uu=eu.CSSStyleDeclaration.prototype,su=uu.setProperty;iu.setAttribute=function(t,e){au.call(this,t,e+"")},iu.setAttributeNS=function(t,e,n){ou.call(this,t,e,n+"")},uu.setProperty=function(t,e,n){su.call(this,t,e+"",n)}}Xo.ascending=t,Xo.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},Xo.min=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++ir&&(n=r)}else{for(;++i=n);)n=void 0;for(;++ir&&(n=r)}return n},Xo.max=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++in&&(n=r)}else{for(;++i=n);)n=void 0;for(;++in&&(n=r)}return n},Xo.extent=function(t,e){var n,r,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n);)n=i=void 0;for(;++ar&&(n=r),r>i&&(i=r))}else{for(;++a=n);)n=void 0;for(;++ar&&(n=r),r>i&&(i=r))}return[n,i]},Xo.sum=function(t,e){var n,i=0,a=t.length,o=-1;if(1===arguments.length)for(;++or?0:r);r>n;)a[n]=[e=i,i=t[++n]];return a},Xo.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,e=Xo.min(arguments,a),n=new Array(e);++t=0;)for(r=t[i],e=r.length;--e>=0;)n[--o]=r[e];return n};var lu=Math.abs;Xo.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var r,i=[],a=o(lu(n)),u=-1;if(t*=a,e*=a,n*=a,0>n)for(;(r=t+n*++u)>e;)i.push(r/a);else for(;(r=t+n*++u)=a.length)return r?r.call(i,o):n?o.sort(n):o;for(var c,l,h,f,d=-1,p=o.length,g=a[u++],y=new s;++d=a.length)return t;var r=[],i=o[n++];return t.forEach(function(t,i){r.push({key:t,values:e(i,n)})}),i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,r,i={},a=[],o=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(Xo.map,n,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},Xo.set=function(t){var e=new y;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},u(y,{has:h,add:function(t){return this._[c(t+="")]=!0,t},remove:f,values:d,size:p,empty:g,forEach:function(t){for(var e in this._)t.call(this,l(e))}}),Xo.behavior={},Xo.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},Xo.event=null,Xo.requote=function(t){return t.replace(pu,"\\$&")};var pu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,gu={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},yu=function(t,e){return e.querySelector(t)},mu=function(t,e){return e.querySelectorAll(t)},vu=tu.matches||tu[v(tu,"matchesSelector")],bu=function(t,e){return vu.call(t,e)};"function"==typeof Sizzle&&(yu=function(t,e){return Sizzle(t,e)[0]||null},mu=Sizzle,bu=Sizzle.matchesSelector),Xo.selection=function(){return ku};var _u=Xo.selection.prototype=[];_u.select=function(t){var e,n,r,i,a=[];t=D(t);for(var o=-1,u=this.length;++o=0&&(n=t.slice(0,e),t=t.slice(e+1)),xu.hasOwnProperty(n)?{space:xu[n],local:t}:t}},_u.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=Xo.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(S(e,t[e]));return this}return this.each(S(t,e))},_u.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=F(t)).length,i=-1;if(e=n.classList){for(;++ir){if("string"!=typeof t){2>r&&(e="");for(n in t)this.each(N(n,t[n],e));return this}if(2>r)return eu.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(N(t,e,n))},_u.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(O(e,t[e]));return this}return this.each(O(t,e))},_u.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},_u.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},_u.append=function(t){return t=I(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},_u.insert=function(t,e){return t=I(t),e=D(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},_u.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},_u.data=function(t,e){function n(t,n){var r,i,a,o=t.length,h=n.length,f=Math.min(o,h),d=new Array(h),p=new Array(h),g=new Array(o);if(e){var y,m=new s,v=new Array(o);for(r=-1;++rr;++r)p[r]=q(n[r]);for(;o>r;++r)g[r]=t[r]}p.update=d,p.parentNode=d.parentNode=g.parentNode=t.parentNode,u.push(p),c.push(d),l.push(g)}var r,i,a=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(r=this[0]).length);++aa;a++){i.push(e=[]),e.parentNode=(n=this[a]).parentNode;for(var u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return E(i)},_u.order=function(){for(var t=-1,e=this.length;++t=0;)(n=r[i])&&(a&&a!==n.nextSibling&&a.parentNode.insertBefore(n,a),a=n);return this},_u.sort=function(t){t=P.apply(this,arguments);for(var e=-1,n=this.length;++et;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var a=n[r];if(a)return a}return null},_u.size=function(){var t=0;return U(this,function(){++t}),t};var wu=[];Xo.selection.enter=Y,Xo.selection.enter.prototype=wu,wu.append=_u.append,wu.empty=_u.empty,wu.node=_u.node,wu.call=_u.call,wu.size=_u.size,wu.select=function(t){for(var e,n,r,i,a,o=[],u=-1,s=this.length;++ur){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(V(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(V(t,e,n))};var Au=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});Au.forEach(function(t){"on"+t in Qo&&Au.remove(t)});var Eu="onselectstart"in Qo?null:v(tu.style,"userSelect"),Du=0;Xo.mouse=function(t){return W(t,k())};var Mu=/WebKit/.test(eu.navigator.userAgent)?-1:0;Xo.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=k().changedTouches),e)for(var r,i=0,a=e.length;a>i;++i)if((r=e[i]).identifier===n)return W(t,r)},Xo.behavior.drag=function(){function t(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(t,e,i,a,o){return function(){function u(){var t,n,r=e(f,g);r&&(t=r[0]-b[0],n=r[1]-b[1],p|=t|n,b=r,d({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:n}))}function s(){e(f,g)&&(m.on(a+y,null).on(o+y,null),v(p&&Xo.event.target===h),d({type:"dragend"}))}var c,l=this,h=Xo.event.target,f=l.parentNode,d=n.of(l,arguments),p=0,g=t(),y=".drag"+(null==g?"":"-"+g),m=Xo.select(i()).on(a+y,u).on(o+y,s),v=$(),b=e(f,g);r?(c=r.apply(l,arguments),c=[c.x-b[0],c.y-b[1]]):c=[0,0],d({type:"dragstart"})}}var n=A(t,"drag","dragstart","dragend"),r=null,i=e(b,Xo.mouse,K,"mousemove","mouseup"),a=e(Z,Xo.touch,X,"touchmove","touchend");return t.origin=function(e){return arguments.length?(r=e,t):r},Xo.rebind(t,n,"on")},Xo.touches=function(t,e){return arguments.length<2&&(e=k().touches),e?Jo(e).map(function(e){var n=W(t,e);return n.identifier=e.identifier,n}):[]};var Su=Math.PI,Cu=2*Su,Tu=Su/2,Fu=1e-6,Lu=Fu*Fu,Bu=Su/180,Nu=180/Su,Ou=Math.SQRT2,Iu=2,qu=4;Xo.interpolateZoom=function(t,e){function n(t){var e=t*v;if(m){var n=re(g),o=a/(Iu*f)*(n*ie(Ou*e+g)-ne(g));return[r+o*c,i+o*l,a*n/re(Ou*e+g)]}return[r+t*c,i+t*l,a*Math.exp(Ou*e)]}var r=t[0],i=t[1],a=t[2],o=e[0],u=e[1],s=e[2],c=o-r,l=u-i,h=c*c+l*l,f=Math.sqrt(h),d=(s*s-a*a+qu*h)/(2*a*Iu*f),p=(s*s-a*a-qu*h)/(2*s*Iu*f),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(p*p+1)-p),m=y-g,v=(m||Math.log(s/a))/Ou;return n.duration=1e3*v,n},Xo.behavior.zoom=function(){function t(t){t.on(M,c).on(Uu+".zoom",h).on("dblclick.zoom",f).on(T,l)}function e(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function n(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}function r(t){k.k=Math.max(D[0],Math.min(D[1],t))}function i(t,e){e=n(e),k.x+=t[0]-e[0],k.y+=t[1]-e[1]}function a(){b&&b.domain(v.range().map(function(t){return(t-k.x)/k.k}).map(v.invert)),x&&x.domain(_.range().map(function(t){return(t-k.y)/k.k}).map(_.invert))}function o(t){t({type:"zoomstart"})}function u(t){a(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(t){t({type:"zoomend"})}function c(){function t(){l=1,i(Xo.mouse(r),f),u(c)}function n(){h.on(S,null).on(C,null),d(l&&Xo.event.target===a),s(c)}var r=this,a=Xo.event.target,c=F.of(r,arguments),l=0,h=Xo.select(eu).on(S,t).on(C,n),f=e(Xo.mouse(r)),d=$();z.call(r),o(c)}function l(){function t(){var t=Xo.touches(d);return f=k.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function n(){var e=Xo.event.target;Xo.select(e).on(b,a).on(_,h),x.push(e);for(var n=Xo.event.changedTouches,o=0,s=n.length;s>o;++o)g[n[o].identifier]=null;var c=t(),l=Date.now();if(1===c.length){if(500>l-m){var f=c[0],d=g[f.identifier];r(2*k.k),i(f,d),w(),u(p)}m=l}else if(c.length>1){var f=c[0],v=c[1],A=f[0]-v[0],E=f[1]-v[1];y=A*A+E*E}}function a(){for(var t,e,n,a,o=Xo.touches(d),s=0,c=o.length;c>s;++s,a=null)if(n=o[s],a=g[n.identifier]){if(e)break;t=n,e=a}if(a){var l=(l=n[0]-t[0])*l+(l=n[1]-t[1])*l,h=y&&Math.sqrt(l/y);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+a[0])/2,(e[1]+a[1])/2],r(h*f)}m=null,i(t,e),u(p)}function h(){if(Xo.event.touches.length){for(var e=Xo.event.changedTouches,n=0,r=e.length;r>n;++n)delete g[e[n].identifier];for(var i in g)return void t()}Xo.selectAll(x).on(v,null),A.on(M,c).on(T,l),E(),s(p)}var f,d=this,p=F.of(d,arguments),g={},y=0,v=".zoom-"+Xo.event.changedTouches[0].identifier,b="touchmove"+v,_="touchend"+v,x=[],A=Xo.select(d),E=$();z.call(d),n(),o(p),A.on(M,null).on(T,n)}function h(){var t=F.of(this,arguments);y?clearTimeout(y):(d=e(p=g||Xo.mouse(this)),z.call(this),o(t)),y=setTimeout(function(){y=null,s(t)},50),w(),r(Math.pow(2,.002*Ru())*k.k),i(p,d),u(t)}function f(){var t=F.of(this,arguments),n=Xo.mouse(this),a=e(n),c=Math.log(k.k)/Math.LN2;o(t),r(Math.pow(2,Xo.event.shiftKey?Math.ceil(c)-1:Math.floor(c)+1)),i(n,a),u(t),s(t)}var d,p,g,y,m,v,b,_,x,k={x:0,y:0,k:1},E=[960,500],D=Pu,M="mousedown.zoom",S="mousemove.zoom",C="mouseup.zoom",T="touchstart.zoom",F=A(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=F.of(this,arguments),e=k;Tc?Xo.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},o(t)}).tween("zoom:zoom",function(){var n=E[0],r=E[1],i=n/2,a=r/2,o=Xo.interpolateZoom([(i-k.x)/k.k,(a-k.y)/k.k,n/k.k],[(i-e.x)/e.k,(a-e.y)/e.k,n/e.k]);return function(e){var r=o(e),s=n/r[2];this.__chart__=k={x:i-r[0]*s,y:a-r[1]*s,k:s},u(t)}}).each("end.zoom",function(){s(t)}):(this.__chart__=k,o(t),u(t),s(t))})},t.translate=function(e){return arguments.length?(k={x:+e[0],y:+e[1],k:k.k},a(),t):[k.x,k.y]},t.scale=function(e){return arguments.length?(k={x:k.x,y:k.y,k:+e},a(),t):k.k},t.scaleExtent=function(e){return arguments.length?(D=null==e?Pu:[+e[0],+e[1]],t):D},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(E=e&&[+e[0],+e[1]],t):E},t.x=function(e){return arguments.length?(b=e,v=e.copy(),k={x:0,y:0,k:1},t):b},t.y=function(e){return arguments.length?(x=e,_=e.copy(),k={x:0,y:0,k:1},t):x},Xo.rebind(t,F,"on")};var Ru,Pu=[0,1/0],Uu="onwheel"in Qo?(Ru=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Qo?(Ru=function(){return Xo.event.wheelDelta},"mousewheel"):(Ru=function(){return-Xo.event.detail},"MozMousePixelScroll");Xo.color=oe,oe.prototype.toString=function(){return this.rgb()+""},Xo.hsl=ue;var Yu=ue.prototype=new oe;Yu.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,this.l/t)},Yu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,t*this.l)},Yu.rgb=function(){return se(this.h,this.s,this.l)},Xo.hcl=ce;var ju=ce.prototype=new oe;ju.brighter=function(t){return new ce(this.h,this.c,Math.min(100,this.l+zu*(arguments.length?t:1)))},ju.darker=function(t){return new ce(this.h,this.c,Math.max(0,this.l-zu*(arguments.length?t:1)))},ju.rgb=function(){return le(this.h,this.c,this.l).rgb()},Xo.lab=he;var zu=18,Vu=.95047,Hu=1,Gu=1.08883,$u=he.prototype=new oe;$u.brighter=function(t){return new he(Math.min(100,this.l+zu*(arguments.length?t:1)),this.a,this.b)},$u.darker=function(t){return new he(Math.max(0,this.l-zu*(arguments.length?t:1)),this.a,this.b)},$u.rgb=function(){return fe(this.l,this.a,this.b)},Xo.rgb=me;var Wu=me.prototype=new oe;Wu.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new me(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new me(i,i,i)},Wu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new me(t*this.r,t*this.g,t*this.b)},Wu.hsl=function(){return we(this.r,this.g,this.b)},Wu.toString=function(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)};var Zu=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Zu.forEach(function(t,e){Zu.set(t,ve(e))}),Xo.functor=De,Xo.xhr=Se(Me),Xo.dsv=function(t,e){function n(t,n,a){arguments.length<3&&(a=n,n=null);var o=Ce(t,e,null==n?r:i(n),a);return o.row=function(t){return arguments.length?o.response(null==(n=t)?r:i(t)):n},o}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function a(e){return e.map(o).join(t)}function o(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i})},n.parseRows=function(t,e){function n(){if(l>=c)return o;if(i)return i=!1,a;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++l;){var r=t.charCodeAt(l++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(l)&&(++l,++u);else if(r!==s)continue;return t.slice(e,l-u)}return t.slice(e)}for(var r,i,a={},o={},u=[],c=t.length,l=0,h=0;(r=n())!==o;){for(var f=[];r!==a&&r!==o;)f.push(r),r=n();e&&null==(f=e(f,h++))||u.push(f)}return u},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new y,i=[];return e.forEach(function(t){for(var e in t)r.has(e)||i.push(r.add(e))}),[i.map(o).join(t)].concat(e.map(function(e){return i.map(function(t){return o(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(a).join("\n")},n},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv(" ","text/tab-separated-values");var Xu,Ku,Ju,Qu,ts,es=eu[v(eu,"requestAnimationFrame")]||function(t){setTimeout(t,17)};Xo.timer=function(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i=n+e,a={c:t,t:i,f:!1,n:null};Ku?Ku.n=a:Xu=a,Ku=a,Ju||(Qu=clearTimeout(Qu),Ju=1,es(Le))},Xo.timer.flush=function(){Be(),Ne()},Xo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var ns=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ie);Xo.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=Xo.round(t,Oe(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ns[8+n/3]};var rs=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,is=Xo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Xo.round(t,Oe(t,e))).toFixed(Math.max(0,Math.min(20,Oe(t*(1+1e-15),e))))}}),as=Xo.time={},os=Date;Pe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){us.setUTCDate.apply(this._,arguments)},setDay:function(){us.setUTCDay.apply(this._,arguments)},setFullYear:function(){us.setUTCFullYear.apply(this._,arguments)},setHours:function(){us.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){us.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){us.setUTCMinutes.apply(this._,arguments)},setMonth:function(){us.setUTCMonth.apply(this._,arguments)},setSeconds:function(){us.setUTCSeconds.apply(this._,arguments)},setTime:function(){us.setTime.apply(this._,arguments)}};var us=Date.prototype;as.year=Ue(function(t){return t=as.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),as.years=as.year.range,as.years.utc=as.year.utc.range,as.day=Ue(function(t){var e=new os(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),as.days=as.day.range,as.days.utc=as.day.utc.range,as.dayOfYear=function(t){var e=as.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=as[t]=Ue(function(t){return(t=as.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});as[t+"s"]=n.range,as[t+"s"].utc=n.utc.range,as[t+"OfYear"]=function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)}}),as.week=as.sunday,as.weeks=as.sunday.range,as.weeks.utc=as.sunday.utc.range,as.weekOfYear=as.sundayOfYear;var ss={"-":"",_:" ",0:"0"},cs=/^\s*\d+/,ls=/^%/;Xo.locale=function(t){return{numberFormat:qe(t),timeFormat:je(t)}};var hs=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=hs.numberFormat,Xo.geo={},ln.prototype={s:0,t:0,add:function(t){hn(t,this.t,fs),hn(fs.s,this.s,this),this.s?this.t+=fs.t:this.s=fs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var fs=new ln;Xo.geo.stream=function(t,e){t&&ds.hasOwnProperty(t.type)?ds[t.type](t,e):fn(t,e)};var ds={Feature:function(t,e){fn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rt?4*Su+t:t,ms.lineStart=ms.lineEnd=ms.point=b}};Xo.geo.bounds=function(){function t(t,e){b.push(_=[l=t,f=t]),h>e&&(h=e),e>d&&(d=e)}function e(e,n){var r=yn([e*Bu,n*Bu]);if(m){var i=vn(m,r),a=[i[1],-i[0],0],o=vn(a,i);xn(o),o=wn(o);var s=e-p,c=s>0?1:-1,g=o[0]*Nu*c,y=lu(s)>180;if(y^(g>c*p&&c*e>g)){var v=o[1]*Nu;v>d&&(d=v)}else if(g=(g+360)%360-180,y^(g>c*p&&c*e>g)){var v=-o[1]*Nu;h>v&&(h=v)}else h>n&&(h=n),n>d&&(d=n);y?p>e?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e):f>=l?(l>e&&(l=e),e>f&&(f=e)):e>p?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e)}else t(e,n);m=r,p=e}function n(){x.point=e}function r(){_[0]=l,_[1]=f,x.point=t,m=null}function i(t,n){if(m){var r=t-p;v+=lu(r)>180?r+(r>0?360:-360):r}else g=t,y=n;ms.point(t,n),e(t,n)}function a(){ms.lineStart()}function o(){i(g,y),ms.lineEnd(),lu(v)>Fu&&(l=-(f=180)),_[0]=l,_[1]=f,m=null -}function u(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tys?(l=-(f=180),h=-(d=90)):v>Fu?d=90:-Fu>v&&(h=-90),_[0]=l,_[1]=f}};return function(t){d=f=-(l=h=1/0),b=[],Xo.geo.stream(t,x);var e=b.length;if(e){b.sort(s);for(var n,r=1,i=b[0],a=[i];e>r;++r)n=b[r],c(n[0],i)||c(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(var o,n,p=-1/0,e=a.length-1,r=0,i=a[e];e>=r;i=n,++r)n=a[r],(o=u(i[1],n[0]))>p&&(p=o,l=n[0],f=i[1])}return b=_=null,1/0===l||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[l,h],[f,d]]}}(),Xo.geo.centroid=function(t){vs=bs=_s=xs=ws=ks=As=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,Cs);var e=Ds,n=Ms,r=Ss,i=e*e+n*n+r*r;return Lu>i&&(e=ks,n=As,r=Es,Fu>bs&&(e=_s,n=xs,r=ws),i=e*e+n*n+r*r,Lu>i)?[0/0,0/0]:[Math.atan2(n,e)*Nu,ee(r/Math.sqrt(i))*Nu]};var vs,bs,_s,xs,ws,ks,As,Es,Ds,Ms,Ss,Cs={sphere:b,point:An,lineStart:Dn,lineEnd:Mn,polygonStart:function(){Cs.lineStart=Sn},polygonEnd:function(){Cs.lineStart=Dn}},Ts=Bn(Cn,qn,Pn,[-Su,-Su/2]),Fs=1e9;Xo.geo.clipExtent=function(){var t,e,n,r,i,a,o={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(u){return arguments.length?(a=zn(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[n,r]]}};return o.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return Hn(Gn)}).raw=Gn,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function t(t){var a=t[0],o=t[1];return e=null,n(a,o),e||(r(a,o),e)||i(a,o),e}var e,n,r,i,a=Xo.geo.albers(),o=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:a).invert(t)},t.stream=function(t){var e=a.stream(t),n=o.stream(t),r=u.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),u.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),u.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var c=a.scale(),l=+e[0],h=+e[1];return n=a.translate(e).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(s).point,r=o.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+Fu,h+.12*c+Fu],[l-.214*c-Fu,h+.234*c-Fu]]).stream(s).point,i=u.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+Fu,h+.166*c+Fu],[l-.115*c-Fu,h+.234*c-Fu]]).stream(s).point,t},t.scale(1070)};var Ls,Bs,Ns,Os,Is,qs,Rs={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Bs=0,Rs.lineStart=$n},polygonEnd:function(){Rs.lineStart=Rs.lineEnd=Rs.point=b,Ls+=lu(Bs/2)}},Ps={point:Wn,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Us={point:Kn,lineStart:Jn,lineEnd:Qn,polygonStart:function(){Us.lineStart=tr},polygonEnd:function(){Us.point=Kn,Us.lineStart=Jn,Us.lineEnd=Qn}};Xo.geo.path=function(){function t(t){return t&&("function"==typeof u&&a.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(a)),Xo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var n,r,i,a,o,u=4.5;return t.area=function(t){return Ls=0,Xo.geo.stream(t,i(Rs)),Ls},t.centroid=function(t){return _s=xs=ws=ks=As=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,i(Us)),Ss?[Ds/Ss,Ms/Ss]:Es?[ks/Es,As/Es]:ws?[_s/ws,xs/ws]:[0/0,0/0]},t.bounds=function(t){return Is=qs=-(Ns=Os=1/0),Xo.geo.stream(t,i(Ps)),[[Ns,Os],[Is,qs]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||rr(t):Me,e()):n},t.context=function(t){return arguments.length?(a=null==(r=t)?new Zn:new er(t),"function"!=typeof u&&a.pointRadius(u),e()):r},t.pointRadius=function(e){return arguments.length?(u="function"==typeof e?e:(a.pointRadius(+e),+e),t):u},t.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(t){return{stream:function(e){var n=new ir(e);for(var r in t)n[r]=t[r];return n}}},ir.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=or,Xo.geo.projectionMutator=ur,(Xo.geo.equirectangular=function(){return or(cr)}).raw=cr.invert=cr,Xo.geo.rotation=function(t){function e(e){return e=t(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e}return t=hr(t[0]%360*Bu,t[1]*Bu,t.length>2?t[2]*Bu:0),e.invert=function(e){return e=t.invert(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e},e},lr.invert=cr,Xo.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=hr(-t[0]*Bu,-t[1]*Bu,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=Nu,t[1]*=Nu}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=gr((e=+r)*Bu,i*Bu),t):e},t.precision=function(r){return arguments.length?(n=gr(e*Bu,(i=+r)*Bu),t):i},t.angle(90)},Xo.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Bu,i=t[1]*Bu,a=e[1]*Bu,o=Math.sin(r),u=Math.cos(r),s=Math.sin(i),c=Math.cos(i),l=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((n=h*o)*n+(n=c*l-s*h*u)*n),s*l+c*h*u)},Xo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Xo.range(Math.ceil(a/y)*y,i,y).map(f).concat(Xo.range(Math.ceil(c/m)*m,s,m).map(d)).concat(Xo.range(Math.ceil(r/p)*p,n,p).filter(function(t){return lu(t%y)>Fu}).map(l)).concat(Xo.range(Math.ceil(u/g)*g,o,g).filter(function(t){return lu(t%m)>Fu}).map(h))}var n,r,i,a,o,u,s,c,l,h,f,d,p=10,g=p,y=90,m=360,v=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(s).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],c=+e[0][1],s=+e[1][1],a>i&&(e=a,a=i,i=e),c>s&&(e=c,c=s,s=e),t.precision(v)):[[a,c],[i,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),u>o&&(e=u,u=o,o=e),t.precision(v)):[[r,u],[n,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(y=+e[0],m=+e[1],t):[y,m]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(v=+e,l=mr(u,o,90),h=vr(r,n,v),f=mr(c,s,90),d=vr(a,i,v),t):v},t.majorExtent([[-180,-90+Fu],[180,90-Fu]]).minorExtent([[-180,-80-Fu],[180,80+Fu]])},Xo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=br,i=_r;return t.distance=function(){return Xo.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},Xo.geo.interpolate=function(t,e){return xr(t[0]*Bu,t[1]*Bu,e[0]*Bu,e[1]*Bu)},Xo.geo.length=function(t){return Ys=0,Xo.geo.stream(t,js),Ys};var Ys,js={sphere:b,point:b,lineStart:wr,lineEnd:b,polygonStart:b,polygonEnd:b},zs=kr(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Xo.geo.azimuthalEqualArea=function(){return or(zs)}).raw=zs;var Vs=kr(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},Me);(Xo.geo.azimuthalEquidistant=function(){return or(Vs)}).raw=Vs,(Xo.geo.conicConformal=function(){return Hn(Ar)}).raw=Ar,(Xo.geo.conicEquidistant=function(){return Hn(Er)}).raw=Er;var Hs=kr(function(t){return 1/t},Math.atan);(Xo.geo.gnomonic=function(){return or(Hs)}).raw=Hs,Dr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Tu]},(Xo.geo.mercator=function(){return Mr(Dr)}).raw=Dr;var Gs=kr(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return or(Gs)}).raw=Gs;var $s=kr(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Xo.geo.stereographic=function(){return or($s)}).raw=$s,Sr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Tu]},(Xo.geo.transverseMercator=function(){var t=Mr(Sr),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Sr,Xo.geom={},Xo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=De(n),a=De(r),o=t.length,u=[],s=[];for(e=0;o>e;e++)u.push([+i.call(this,t[e],e),+a.call(this,t[e],e),e]);for(u.sort(Lr),e=0;o>e;e++)s.push([u[e][0],-u[e][1]]);var c=Fr(u),l=Fr(s),h=l[0]===c[0],f=l[l.length-1]===c[c.length-1],d=[];for(e=c.length-1;e>=0;--e)d.push(t[u[c[e]][2]]);for(e=+h;e=r&&c.x<=a&&c.y>=i&&c.y<=o?[[r,o],[a,o],[a,i],[r,i]]:[];l.point=t[u]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/Fu)*Fu,y:Math.round(o(t,e)/Fu)*Fu,i:e}})}var r=Cr,i=Tr,a=r,o=i,u=nc;return t?e(t):(e.links=function(t){return ui(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ui(n(t)).cells.forEach(function(n,r){for(var i,a,o=n.site,u=n.edges.sort(Hr),s=-1,c=u.length,l=u[c-1].edge,h=l.l===o?l.r:l.l;++s=c,f=r>=l,d=(f<<1)+h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=fi()),h?i=c:u=c,f?o=l:s=l,a(t,e,n,r,i,o,u,s)}var l,h,f,d,p,g,y,m,v,b=De(u),_=De(s);if(null!=e)g=e,y=n,m=r,v=i;else if(m=v=-(g=y=1/0),h=[],f=[],p=t.length,o)for(d=0;p>d;++d)l=t[d],l.xm&&(m=l.x),l.y>v&&(v=l.y),h.push(l.x),f.push(l.y);else for(d=0;p>d;++d){var x=+b(l=t[d],d),w=+_(l,d);g>x&&(g=x),y>w&&(y=w),x>m&&(m=x),w>v&&(v=w),h.push(x),f.push(w)}var k=m-g,A=v-y;k>A?v=y+k:m=g+A;var E=fi();if(E.add=function(t){a(E,t,+b(t,++d),+_(t,d),g,y,m,v)},E.visit=function(t){di(t,E,g,y,m,v)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=oc.get(n)||ac,r=uc.get(r)||Me,_i(r(n.apply(null,Ko.call(arguments,1))))},Xo.interpolateHcl=Bi,Xo.interpolateHsl=Ni,Xo.interpolateLab=Oi,Xo.interpolateRound=Ii,Xo.transform=function(t){var e=Qo.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new qi(n?n.matrix:sc)})(t)},qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sc={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Yi,Xo.layout={},Xo.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++nu*u/y){if(p>s){var c=e.charge/s;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&s&&p>s){var c=e.pointCharge/s;t.px-=a*c,t.py-=o*c}}return!e.charge}}function e(t){t.px=Xo.event.x,t.py=Xo.event.y,u.resume()}var n,r,i,a,o,u={},s=Xo.dispatch("start","tick","end"),c=[1,1],l=.9,h=cc,f=lc,d=-30,p=hc,g=.1,y=.64,m=[],v=[];return u.tick=function(){if((r*=.99)<.005)return s.end({type:"end",alpha:r=0}),!0;var e,n,u,h,f,p,y,b,_,x=m.length,w=v.length;for(n=0;w>n;++n)u=v[n],h=u.source,f=u.target,b=f.x-h.x,_=f.y-h.y,(p=b*b+_*_)&&(p=r*a[n]*((p=Math.sqrt(p))-i[n])/p,b*=p,_*=p,f.x-=b*(y=h.weight/(f.weight+h.weight)),f.y-=_*y,h.x+=b*(y=1-y),h.y+=_*y);if((y=r*g)&&(b=c[0]/2,_=c[1]/2,n=-1,y))for(;++n0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),Xo.timer(u.tick)),u):r},u.start=function(){function t(t,r){if(!n){for(n=new Array(s),u=0;s>u;++u)n[u]=[];for(u=0;c>u;++u){var i=v[u];n[i.source.index].push(i.target),n[i.target.index].push(i.source)}}for(var a,o=n[e],u=-1,c=o.length;++ue;++e)(r=m[e]).index=e,r.weight=0;for(e=0;l>e;++e)r=v[e],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(e=0;s>e;++e)r=m[e],isNaN(r.x)&&(r.x=t("x",p)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(e=0;l>e;++e)i[e]=+h.call(this,v[e],e);else for(e=0;l>e;++e)i[e]=h;if(a=[],"function"==typeof f)for(e=0;l>e;++e)a[e]=+f.call(this,v[e],e);else for(e=0;l>e;++e)a[e]=f;if(o=[],"function"==typeof d)for(e=0;s>e;++e)o[e]=+d.call(this,m[e],e);else for(e=0;s>e;++e)o[e]=d;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return n||(n=Xo.behavior.drag().origin(Me).on("dragstart.force",$i).on("drag.force",e).on("dragend.force",Wi)),arguments.length?void this.on("mouseover.force",Zi).on("mouseout.force",Xi).call(n):n},Xo.rebind(u,s,"on")};var cc=20,lc=1,hc=1/0;Xo.layout.hierarchy=function(){function t(i){var a,o=[i],u=[];for(i.depth=0;null!=(a=o.pop());)if(u.push(a),(c=n.call(t,a,a.depth))&&(s=c.length)){for(var s,c,l;--s>=0;)o.push(l=c[s]),l.parent=a,l.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(t,a,a.depth)||0),delete a.children;return ta(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),u}var e=ra,n=ea,r=na;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(Qi(e,function(t){t.children&&(t.value=0)}),ta(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},Xo.layout.partition=function(){function t(e,n,r,i){var a=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,a&&(o=a.length)){var o,u,s,c=-1;for(r=e.value?r/e.value:0;++cp;++p)for(i.call(t,c[0][p],g=y[p],l[0][p][1]),d=1;f>d;++d)i.call(t,c[d][p],g+=l[d-1][p][1],l[d][p][1]);return u}var e=Me,n=sa,r=ca,i=ua,a=aa,o=oa;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:dc.get(e)||sa,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:pc.get(e)||ca,t):r},t.x=function(e){return arguments.length?(a=e,t):a},t.y=function(e){return arguments.length?(o=e,t):o},t.out=function(e){return arguments.length?(i=e,t):i},t};var dc=Xo.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(la),a=t.map(ha),o=Xo.range(r).sort(function(t,e){return i[t]-i[e]}),u=0,s=0,c=[],l=[];for(e=0;r>e;++e)n=o[e],s>u?(u+=a[n],c.push(n)):(s+=a[n],l.push(n));return l.reverse().concat(c)},reverse:function(t){return Xo.range(t.length).reverse()},"default":sa}),pc=Xo.map({silhouette:function(t){var e,n,r,i=t.length,a=t[0].length,o=[],u=0,s=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>u&&(u=r),o.push(r)}for(n=0;a>n;++n)s[n]=(u-o[n])/2;return s},wiggle:function(t){var e,n,r,i,a,o,u,s,c,l=t.length,h=t[0],f=h.length,d=[];for(d[0]=s=c=0,n=1;f>n;++n){for(e=0,i=0;l>e;++e)i+=t[e][n][1];for(e=0,a=0,u=h[n][0]-h[n-1][0];l>e;++e){for(r=0,o=(t[e][n][1]-t[e][n-1][1])/(2*u);e>r;++r)o+=(t[r][n][1]-t[r][n-1][1])/u;a+=o*t[e][n][1]}d[n]=s-=i?a/i*u:0,c>s&&(c=s)}for(n=0;f>n;++n)d[n]-=c;return d},expand:function(t){var e,n,r,i=t.length,a=t[0].length,o=1/i,u=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=o}for(n=0;a>n;++n)u[n]=0;return u},zero:ca});Xo.layout.histogram=function(){function t(t,a){for(var o,u,s=[],c=t.map(n,this),l=r.call(this,c,a),h=i.call(this,l,c,a),a=-1,f=c.length,d=h.length-1,p=e?1:1/f;++a0)for(a=-1;++a=l[0]&&u<=l[1]&&(o=s[Xo.bisect(h,u,1,d)-1],o.y+=p,o.push(t[a]));return s}var e=!0,n=Number,r=ga,i=da;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=De(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return pa(t,e)}:De(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},Xo.layout.pack=function(){function t(t,a){var o=n.call(this,t,a),u=o[0],s=i[0],c=i[1],l=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(u.x=u.y=0,ta(u,function(t){t.r=+l(t.value)}),ta(u,_a),r){var h=r*(e?1:Math.max(2*u.r/s,2*u.r/c))/2;ta(u,function(t){t.r+=h}),ta(u,_a),ta(u,function(t){t.r-=h})}return ka(u,s/2,c/2,e?1:1/Math.max(2*u.r/s,2*u.r/c)),o}var e,n=Xo.layout.hierarchy().sort(ya),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},Ji(t,n)},Xo.layout.tree=function(){function t(t,i){var l=o.call(this,t,i),h=l[0],f=e(h);if(ta(f,n),f.parent.m=-f.z,Qi(f,r),c)Qi(h,a);else{var d=h,p=h,g=h;Qi(h,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var y=u(d,p)/2-d.x,m=s[0]/(p.x+u(p,d)/2+y),v=s[1]/(g.depth||1);Qi(h,function(t){t.x=(t.x+y)*m,t.y=t.depth*v})}return l}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,a=e.children,o=0,u=a.length;u>o;++o)r.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){Ca(t);var a=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||n[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],c=i.m,l=a.m,h=o.m,f=s.m;o=Ma(o),i=Da(i),o&&i;)s=Da(s),a=Ma(a),a.a=t,r=o.z+h-i.z-c+u(o._,i._),r>0&&(Sa(Ta(o,t,n),t,r),c+=r,l+=r),h+=o.m,c+=i.m,f+=s.m,l+=a.m;o&&!Ma(a)&&(a.t=o,a.m+=h-l),i&&!Da(s)&&(s.t=i,s.m+=c-f,n=t)}return n}function a(t){t.x*=s[0],t.y=t.depth*s[1]}var o=Xo.layout.hierarchy().sort(null).value(null),u=Ea,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(u=e,t):u},t.size=function(e){return arguments.length?(c=null==(s=e)?a:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:a,t):c?s:null},Ji(t,o)},Xo.layout.cluster=function(){function t(t,a){var o,u=e.call(this,t,a),s=u[0],c=0;ta(s,function(t){var e=t.children;e&&e.length?(t.x=La(e),t.y=Fa(e)):(t.x=o?c+=n(t,o):0,t.y=0,o=t)});var l=Ba(s),h=Na(s),f=l.x-n(l,h)/2,d=h.x+n(h,l)/2;return ta(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(d-f)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var e=Xo.layout.hierarchy().sort(null).value(null),n=Ea,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},Ji(t,e)},Xo.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,a=t.length;++ie?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var a=n.children;if(a&&a.length){var o,u,s,c=h(n),l=[],f=a.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(f,c.dx*c.dy/n.value),l.area=0;(s=f.length)>0;)l.push(o=f[s-1]),l.area+=o.area,"squarify"!==d||(u=r(l,g))<=p?(f.pop(),p=u):(l.area-=l.pop().area,i(l,g,c,!1),g=Math.min(c.dx,c.dy),l.length=l.area=0,p=1/0);l.length&&(i(l,g,c,!0),l.length=l.area=0),a.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var a,o=h(e),u=r.slice(),s=[];for(t(u,o.dx*o.dy/e.value),s.area=0;a=u.pop();)s.push(a),s.area+=a.area,null!=a.z&&(i(s,a.z?o.dx:o.dy,o,!u.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,a=1/0,o=-1,u=t.length;++on&&(a=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*p/r,r/(e*a*p)):1/0}function i(t,e,n,r){var i,a=-1,o=t.length,u=n.x,c=n.y,l=e?s(t.area/e):0;if(e==n.dx){for((r||l>n.dy)&&(l=n.dy);++an.dx)&&(l=n.dx);++an&&(e=1),1>n&&(t=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=Xo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},Xo.scale={};var gc={floor:Me,ceil:Me};Xo.scale.linear=function(){return za([0,1],[0,1],vi,!1)};var yc={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return Ka(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var mc=Xo.format(".0e"),vc={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Xo.scale.pow=function(){return Ja(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return to([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(bc)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(_c)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(xc)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(wc)};var bc=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(be),_c=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(be),xc=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(be),wc=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(be); -Xo.scale.quantile=function(){return eo([],[])},Xo.scale.quantize=function(){return no(0,1,[0,1])},Xo.scale.threshold=function(){return ro([.5],[0,1])},Xo.scale.identity=function(){return io([0,1])},Xo.svg={},Xo.svg.arc=function(){function t(){var t=e.apply(this,arguments),a=n.apply(this,arguments),o=r.apply(this,arguments)+kc,u=i.apply(this,arguments)+kc,s=(o>u&&(s=o,o=u,u=s),u-o),c=Su>s?"0":"1",l=Math.cos(o),h=Math.sin(o),f=Math.cos(u),d=Math.sin(u);return s>=Ac?t?"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z":t?"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L"+t*f+","+t*d+"A"+t+","+t+" 0 "+c+",0 "+t*l+","+t*h+"Z":"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L0,0Z"}var e=ao,n=oo,r=uo,i=so;return t.innerRadius=function(n){return arguments.length?(e=De(n),t):e},t.outerRadius=function(e){return arguments.length?(n=De(e),t):n},t.startAngle=function(e){return arguments.length?(r=De(e),t):r},t.endAngle=function(e){return arguments.length?(i=De(e),t):i},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,a=(r.apply(this,arguments)+i.apply(this,arguments))/2+kc;return[Math.cos(a)*t,Math.sin(a)*t]},t};var kc=-Tu,Ac=Cu-Fu;Xo.svg.line=function(){return co(Me)};var Ec=Xo.map({linear:lo,"linear-closed":ho,step:fo,"step-before":po,"step-after":go,basis:xo,"basis-open":wo,"basis-closed":ko,bundle:Ao,cardinal:vo,"cardinal-open":yo,"cardinal-closed":mo,monotone:To});Ec.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Dc=[0,2/3,1/3,0],Mc=[0,1/3,2/3,0],Sc=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var t=co(Fo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},po.reverse=go,go.reverse=po,Xo.svg.area=function(){return Lo(Me)},Xo.svg.area.radial=function(){var t=Lo(Fo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Xo.svg.chord=function(){function t(t,u){var s=e(this,a,t,u),c=e(this,o,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(n(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),a=u.call(t,i,r),o=s.call(t,i,r)+kc,l=c.call(t,i,r)+kc;return{r:a,a0:o,a1:l,p0:[a*Math.cos(o),a*Math.sin(o)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function r(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Su)+",1 "+e}function i(t,e,n,r){return"Q 0,0 "+r}var a=br,o=_r,u=Bo,s=uo,c=so;return t.radius=function(e){return arguments.length?(u=De(e),t):u},t.source=function(e){return arguments.length?(a=De(e),t):a},t.target=function(e){return arguments.length?(o=De(e),t):o},t.startAngle=function(e){return arguments.length?(s=De(e),t):s},t.endAngle=function(e){return arguments.length?(c=De(e),t):c},t},Xo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=n.call(this,t,i),u=(a.y+o.y)/2,s=[a,{x:a.x,y:u},{x:o.x,y:u},o];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=br,n=_r,r=No;return t.source=function(n){return arguments.length?(e=De(n),t):e},t.target=function(e){return arguments.length?(n=De(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},Xo.svg.diagonal.radial=function(){var t=Xo.svg.diagonal(),e=No,n=t.projection;return t.projection=function(t){return arguments.length?n(Oo(e=t)):e},t},Xo.svg.symbol=function(){function t(t,r){return(Cc.get(e.call(this,t,r))||Ro)(n.call(this,t,r))}var e=qo,n=Io;return t.type=function(n){return arguments.length?(e=De(n),t):e},t.size=function(e){return arguments.length?(n=De(e),t):n},t};var Cc=Xo.map({circle:Ro,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Bc)),n=e*Bc;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});Xo.svg.symbolTypes=Cc.keys();var Tc,Fc,Lc=Math.sqrt(3),Bc=Math.tan(30*Bu),Nc=[],Oc=0;Nc.call=_u.call,Nc.empty=_u.empty,Nc.node=_u.node,Nc.size=_u.size,Xo.transition=function(t){return arguments.length?Tc?t.transition():t:ku.transition()},Xo.transition.prototype=Nc,Nc.select=function(t){var e,n,r,i=this.id,a=[];t=D(t);for(var o=-1,u=this.length;++oa;a++){i.push(e=[]);for(var n=this[a],u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return Po(i,this.id)},Nc.tween=function(t,e){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(t):U(this,null==e?function(e){e.__transition__[n].tween.remove(t)}:function(r){r.__transition__[n].tween.set(t,e)})},Nc.attr=function(t,e){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(u);return n!==t&&(e=o(n,t),function(t){this.setAttribute(u,e(t))})})}function a(t){return null==t?r:(t+="",function(){var e,n=this.getAttributeNS(u.space,u.local);return n!==t&&(e=o(n,t),function(t){this.setAttributeNS(u.space,u.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var o="transform"==t?Yi:vi,u=Xo.ns.qualify(t);return Uo(this,"attr."+t,e,u.local?a:i)},Nc.attrTween=function(t,e){function n(t,n){var r=e.call(this,t,n,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,n){var r=e.call(this,t,n,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=Xo.ns.qualify(t);return this.tween("attr."+t,i.local?r:n)},Nc.style=function(t,e,n){function r(){this.style.removeProperty(t)}function i(e){return null==e?r:(e+="",function(){var r,i=eu.getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=vi(i,e),function(e){this.style.setProperty(t,r(e),n)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Uo(this,"style."+t,e,i)},Nc.styleTween=function(t,e,n){function r(r,i){var a=e.call(this,r,i,eu.getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,r)},Nc.text=function(t){return Uo(this,"text",t,Yo)},Nc.remove=function(){return this.each("end.transition",function(){var t;this.__transition__.count<2&&(t=this.parentNode)&&t.removeChild(this)})},Nc.ease=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].ease:("function"!=typeof t&&(t=Xo.ease.apply(Xo,arguments)),U(this,function(n){n.__transition__[e].ease=t}))},Nc.delay=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].delay:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].delay=+t.call(n,n.__data__,r,i)}:(t=+t,function(n){n.__transition__[e].delay=t}))},Nc.duration=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].duration:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].duration=Math.max(1,t.call(n,n.__data__,r,i))}:(t=Math.max(1,t),function(n){n.__transition__[e].duration=t}))},Nc.each=function(t,e){var n=this.id;if(arguments.length<2){var r=Fc,i=Tc;Tc=n,U(this,function(e,r,i){Fc=e.__transition__[n],t.call(e,e.__data__,r,i)}),Fc=r,Tc=i}else U(this,function(r){var i=r.__transition__[n];(i.event||(i.event=Xo.dispatch("start","end"))).on(t,e)});return this},Nc.transition=function(){for(var t,e,n,r,i=this.id,a=++Oc,o=[],u=0,s=this.length;s>u;u++){o.push(t=[]);for(var e=this[u],c=0,l=e.length;l>c;c++)(n=e[c])&&(r=Object.create(n.__transition__[i]),r.delay+=r.duration,jo(n,c,a,r)),t.push(n)}return Po(o,a)},Xo.svg.axis=function(){function t(t){t.each(function(){var t,c=Xo.select(this),l=this.__chart__||n,h=this.__chart__=n.copy(),f=null==s?h.ticks?h.ticks.apply(h,u):h.domain():s,d=null==e?h.tickFormat?h.tickFormat.apply(h,u):Me:e,p=c.selectAll(".tick").data(f,h),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Fu),y=Xo.transition(p.exit()).style("opacity",Fu).remove(),m=Xo.transition(p.order()).style("opacity",1),v=Math.max(i,0)+o,b=Ra(h),_=c.selectAll(".domain").data([0]),x=(_.enter().append("path").attr("class","domain"),Xo.transition(_));g.append("line"),g.append("text");var w,k,A,E,D=g.select("line"),M=m.select("line"),S=p.select("text").text(d),C=g.select("text"),T=m.select("text"),F="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=zo,w="x",A="y",k="x2",E="y2",S.attr("dy",0>F?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+b[0]+","+F*a+"V0H"+b[1]+"V"+F*a)):(t=Vo,w="y",A="x",k="y2",E="x2",S.attr("dy",".32em").style("text-anchor",0>F?"end":"start"),x.attr("d","M"+F*a+","+b[0]+"H0V"+b[1]+"H"+F*a)),D.attr(E,F*i),C.attr(A,F*v),M.attr(k,0).attr(E,F*i),T.attr(w,0).attr(A,F*v),h.rangeBand){var L=h,B=L.rangeBand()/2;l=h=function(t){return L(t)+B}}else l.rangeBand?l=h:y.call(t,h,l);g.call(t,l,h),m.call(t,h,h)})}var e,n=Xo.scale.linear(),r=Ic,i=6,a=6,o=3,u=[10],s=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in qc?e+"":Ic,t):r},t.ticks=function(){return arguments.length?(u=arguments,t):u},t.tickValues=function(e){return arguments.length?(s=e,t):s},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,a=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(a=+e,t):a},t.tickPadding=function(e){return arguments.length?(o=+e,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Ic="bottom",qc={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function t(a){a.each(function(){var a=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=a.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),a.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=a.selectAll(".resize").data(p,Me);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Rc[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var l,h=Xo.transition(a),f=Xo.transition(o);s&&(l=Ra(s),f.attr("x",l[0]).attr("width",l[1]-l[0]),n(h)),c&&(l=Ra(c),f.attr("y",l[0]).attr("height",l[1]-l[0]),r(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+l[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",l[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==Xo.event.keyCode&&(S||(v=null,T[0]-=l[1],T[1]-=h[1],S=2),w())}function p(){32==Xo.event.keyCode&&2==S&&(T[0]+=l[1],T[1]+=h[1],S=0,w())}function g(){var t=Xo.mouse(_),i=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(Xo.event.altKey?(v||(v=[(l[0]+l[1])/2,(h[0]+h[1])/2]),T[0]=l[+(t[0]p?(i=r,r=p):i=p),g[0]!=r||g[1]!=i?(n?o=null:a=null,g[0]=r,g[1]=i,!0):void 0}function m(){g(),A.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),Xo.select("body").style("cursor",null),F.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),k({type:"brushend"})}var v,b,_=this,x=Xo.select(Xo.event.target),k=u.of(_,arguments),A=Xo.select(_),E=x.datum(),D=!/^(n|s)$/.test(E)&&s,M=!/^(e|w)$/.test(E)&&c,S=x.classed("extent"),C=$(),T=Xo.mouse(_),F=Xo.select(eu).on("keydown.brush",i).on("keyup.brush",p);if(Xo.event.changedTouches?F.on("touchmove.brush",g).on("touchend.brush",m):F.on("mousemove.brush",g).on("mouseup.brush",m),A.interrupt().selectAll("*").interrupt(),S)T[0]=l[0]-T[0],T[1]=h[0]-T[1];else if(E){var L=+/w$/.test(E),B=+/^n/.test(E);b=[l[1-L]-T[0],h[1-B]-T[1]],T[0]=l[L],T[1]=h[B]}else Xo.event.altKey&&(v=T.slice());A.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",x.style("cursor")),k({type:"brushstart"}),g()}var a,o,u=A(t,"brushstart","brush","brushend"),s=null,c=null,l=[0,0],h=[0,0],f=!0,d=!0,p=Pc[0];return t.event=function(t){t.each(function(){var t=u.of(this,arguments),e={x:l,y:h,i:a,j:o},n=this.__chart__||e;this.__chart__=e,Tc?Xo.select(this).transition().each("start.brush",function(){a=n.i,o=n.j,l=n.x,h=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=bi(l,e.x),r=bi(h,e.y);return a=o=null,function(i){l=e.x=n(i),h=e.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=e.i,o=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(s=e,p=Pc[!s<<1|!c],t):s},t.y=function(e){return arguments.length?(c=e,p=Pc[!s<<1|!c],t):c},t.clamp=function(e){return arguments.length?(s&&c?(f=!!e[0],d=!!e[1]):s?f=!!e:c&&(d=!!e),t):s&&c?[f,d]:s?f:c?d:null},t.extent=function(e){var n,r,i,u,f;return arguments.length?(s&&(n=e[0],r=e[1],c&&(n=n[0],r=r[0]),a=[n,r],s.invert&&(n=s(n),r=s(r)),n>r&&(f=n,n=r,r=f),(n!=l[0]||r!=l[1])&&(l=[n,r])),c&&(i=e[0],u=e[1],s&&(i=i[1],u=u[1]),o=[i,u],c.invert&&(i=c(i),u=c(u)),i>u&&(f=i,i=u,u=f),(i!=h[0]||u!=h[1])&&(h=[i,u])),t):(s&&(a?(n=a[0],r=a[1]):(n=l[0],r=l[1],s.invert&&(n=s.invert(n),r=s.invert(r)),n>r&&(f=n,n=r,r=f))),c&&(o?(i=o[0],u=o[1]):(i=h[0],u=h[1],c.invert&&(i=c.invert(i),u=c.invert(u)),i>u&&(f=i,i=u,u=f))),s&&c?[[n,i],[r,u]]:s?[n,r]:c&&[i,u])},t.clear=function(){return t.empty()||(l=[0,0],h=[0,0],a=o=null),t},t.empty=function(){return!!s&&l[0]==l[1]||!!c&&h[0]==h[1]},Xo.rebind(t,u,"on")};var Rc={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Pc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Uc=as.format=hs.timeFormat,Yc=Uc.utc,jc=Yc("%Y-%m-%dT%H:%M:%S.%LZ");Uc.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ho:jc,Ho.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ho.toString=jc.toString,as.second=Ue(function(t){return new os(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),as.seconds=as.second.range,as.seconds.utc=as.second.utc.range,as.minute=Ue(function(t){return new os(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),as.minutes=as.minute.range,as.minutes.utc=as.minute.utc.range,as.hour=Ue(function(t){var e=t.getTimezoneOffset()/60;return new os(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),as.hours=as.hour.range,as.hours.utc=as.hour.utc.range,as.month=Ue(function(t){return t=as.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),as.months=as.month.range,as.months.utc=as.month.utc.range;var zc=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vc=[[as.second,1],[as.second,5],[as.second,15],[as.second,30],[as.minute,1],[as.minute,5],[as.minute,15],[as.minute,30],[as.hour,1],[as.hour,3],[as.hour,6],[as.hour,12],[as.day,1],[as.day,2],[as.week,1],[as.month,1],[as.month,3],[as.year,1]],Hc=Uc.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Cn]]),Gc={range:function(t,e,n){return Xo.range(Math.ceil(t/n)*n,+e,n).map($o)},floor:Me,ceil:Me};Vc.year=as.year,as.scale=function(){return Go(Xo.scale.linear(),Vc,Hc)};var $c=Vc.map(function(t){return[t[0].utc,t[1]]}),Wc=Yc.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Cn]]);$c.year=as.year.utc,as.scale.utc=function(){return Go(Xo.scale.linear(),$c,Wc)},Xo.text=Se(function(t){return t.responseText}),Xo.json=function(t,e){return Ce(t,"application/json",Wo,e)},Xo.html=function(t,e){return Ce(t,"text/html",Zo,e)},Xo.xml=Se(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof e&&e.exports&&(e.exports=Xo),this.d3=Xo}()},{}],2:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),dagre:t("./lib/dagre"),intersect:t("./lib/intersect"),render:t("./lib/render"),util:t("./lib/util"),version:t("./lib/version")}},{"./lib/dagre":9,"./lib/graphlib":10,"./lib/intersect":11,"./lib/render":24,"./lib/util":26,"./lib/version":27}],3:[function(t,e){function n(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function r(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function i(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}var a=t("./util");e.exports={"default":n,normal:n,vee:r,undirected:i}},{"./util":26}],4:[function(t,e){function n(t,e){var n=e.nodes().filter(function(t){return r.isSubgraph(e,t)}),i=t.selectAll("g.cluster").data(n,function(t){return t});i.enter().append("g").attr("class","cluster").style("opacity",0).append("rect"),r.applyTransition(i.exit(),e).style("opacity",0).remove(),r.applyTransition(i,e).style("opacity",1),r.applyTransition(i.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){var n=e.node(t);return n.x-n.width/2}).attr("y",function(t){var n=e.node(t);return n.y-n.height/2})}var r=t("./util");e.exports=n},{"./util":26}],5:[function(t,e){"use strict";function n(t,e){var n=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return n.selectAll("*").remove(),n.enter().append("g").classed("edgeLabel",!0).style("opacity",0),n.each(function(t){var n=e.edge(t),a=i(o.select(this),e.edge(t),0,0).classed("label",!0),u=a.node().getBBox();n.labelId&&a.attr("id",n.labelId),r.has(n,"width")||(n.width=u.width),r.has(n,"height")||(n.height=u.height)}),a.applyTransition(n.exit(),e).style("opacity",0).remove(),n}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],6:[function(t,e){"use strict";function n(t,e,n){var i=t.selectAll("g.edgePath").data(e.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return o(i,e),u(i,e),l.applyTransition(i,e).style("opacity",1),i.each(function(t){var n=e.edge(t);n.elem=this,n.id&&h.select(this).attr("id",n.id)}),i.selectAll("path.path").each(function(t){var n=e.edge(t);n.arrowheadId=s.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+n.arrowheadId+")"}).style("fill","none");l.applyTransition(i,e).attr("d",function(t){return r(e,t)}),l.applyStyle(i,n.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var r=e.edge(t),i=n[r.arrowhead];i(h.select(this),r.arrowheadId,r,"arrowhead")}),i}function r(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(c(r,o[0])),o.push(c(a,o[o.length-1])),i(n,o)}function i(t,e){var n=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return s.has(t,"lineInterpolate")&&n.interpolate(t.lineInterpolate),s.has(t,"lineTension")&&n.tension(Number(t.lineTension)),n(e)}function a(t){var e=t.getBBox(),n=t.getTransformToElement(t.ownerSVGElement).translate(e.width/2,e.height/2);return{x:n.e,y:n.f}}function o(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);n.append("path").attr("class","path").attr("d",function(t){var n=e.edge(t),r=e.node(t.v).elem,o=s.range(n.points.length).map(function(){return a(r)});return i(n,o)}),n.append("defs")}function u(t,e){var n=t.exit();l.applyTransition(n,e).style("opacity",0).remove(),l.applyTransition(n.select("path.path"),e).attr("d",function(t){var n=e.node(t.v);if(n){var r=s.range(this.pathSegList.length).map(function(){return n});return i({},r)}return h.select(this).attr("d")})}var s=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");e.exports=n},{"./d3":8,"./intersect/intersect-node":15,"./lodash":21,"./util":26}],7:[function(t,e){"use strict";function n(t,e,n){var u=e.nodes().filter(function(t){return!a.isSubgraph(e,t)}),s=t.selectAll("g.node").data(u,function(t){return t}).classed("update",!0);return s.selectAll("*").remove(),s.enter().append("g").attr("class","node").style("opacity",0),s.each(function(t){var u=e.node(t),s=o.select(this),c=s.append("g").attr("class","label"),l=i(c,u),h=n[u.shape],f=r.pick(l.node().getBBox(),"width","height");u.elem=this,u.id&&s.attr("id",u.id),u.labelId&&c.attr("id",u.labelId),a.applyClass(s,u["class"],(s.classed("update")?"update ":"")+"node"),r.has(u,"width")&&(f.width=u.width),r.has(u,"height")&&(f.height=u.height),f.width+=u.paddingLeft+u.paddingRight,f.height+=u.paddingTop+u.paddingBottom,c.attr("transform","translate("+(u.paddingLeft-u.paddingRight)/2+","+(u.paddingTop-u.paddingBottom)/2+")");var d=h(o.select(this),f,u);a.applyStyle(d,u.style);var p=d.node().getBBox();u.width=p.width,u.height=p.height}),a.applyTransition(s.exit(),e).style("opacity",0).remove(),s}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],8:[function(t,e){e.exports=window.d3},{}],9:[function(t,e){var n;if(t)try{n=t("dagre")}catch(r){}n||(n=window.dagre),e.exports=n},{dagre:28}],10:[function(t,e){var n;if(t)try{n=t("graphlib")}catch(r){}n||(n=window.graphlib),e.exports=n},{graphlib:58}],11:[function(t,e){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":12,"./intersect-ellipse":13,"./intersect-node":15,"./intersect-polygon":16,"./intersect-rect":17}],12:[function(t,e){function n(t,e,n){return r(t,e,e,n)}var r=t("./intersect-ellipse");e.exports=n},{"./intersect-ellipse":13}],13:[function(t,e){function n(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,u=a-r.y,s=Math.sqrt(e*e*u*u+n*n*o*o),c=Math.abs(e*n*o/s);r.xm?(m-y)/g:(m+y)/g,m=o*c-a*l,b=0>m?(m-y)/g:(m+y)/g,{x:v,y:b})}function r(t,e){return t*e>0}e.exports=n},{}],15:[function(t,e){function n(t,e){return t.intersect(e)}e.exports=n},{}],16:[function(t,e){function n(t,e,n){var i=t.x,a=t.y,o=[],u=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach(function(t){u=Math.min(u,t.x),s=Math.min(s,t.y)});for(var c=i-t.width/2-u,l=a-t.height/2-s,h=0;h1&&o.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,u=e.y-n.y,s=Math.sqrt(o*o+u*u);return s>a?-1:a===s?0:1}),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");e.exports=n},{"./intersect-line":14}],17:[function(t,e){function n(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,u=e.y-a,s=t.width/2,c=t.height/2;return Math.abs(u)*s>Math.abs(o)*c?(0>u&&(c=-c),n=0===u?0:c*o/u,r=c):(0>o&&(s=-s),n=s,r=0===o?0:s*u/o),{x:i+n,y:a+r}}e.exports=n},{}],18:[function(t,e){function n(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div"),a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o,u;return i.each(function(){o=this.clientWidth,u=this.clientHeight}),n.attr("width",o).attr("height",u),n}var r=t("../util");e.exports=n},{"../util":26}],19:[function(t,e){function n(t,e){var n=e.label,a=t.append("g");"string"!=typeof n||"html"===e.labelType?i(a,e):r(a,e);var o=a.node().getBBox();return a.attr("transform","translate("+-o.width/2+","+-o.height/2+")"),a}var r=t("./add-text-label"),i=t("./add-html-label");e.exports=n},{"./add-html-label":18,"./add-text-label":20}],20:[function(t,e){function n(t,e){for(var n=t.append("text"),a=r(e.label).split("\n"),o=0;ou;++u)r(t,"borderLeft","_bl",n,o,u),r(t,"borderRight","_br",n,o,u)}}i.each(t.children(),e)}function r(t,e,n,r,i,o){var u={width:0,height:0,rank:o},s=i[e][o-1],c=a.addDummyNode(t,"border",u,n);i[e][o]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var i=t("./lodash"),a=t("./util");e.exports=n},{"./lodash":37,"./util":56}],31:[function(t,e){"use strict";function n(t){var e=t.graph().rankdir.toLowerCase();("lr"===e||"rl"===e)&&i(t)}function r(t){var e=t.graph().rankdir.toLowerCase();("bt"===e||"rl"===e)&&o(t),("lr"===e||"rl"===e)&&(s(t),i(t))}function i(t){l.each(t.nodes(),function(e){a(t.node(e))}),l.each(t.edges(),function(e){a(t.edge(e))})}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){l.each(t.nodes(),function(e){u(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,u),l.has(n,"y")&&u(n)})}function u(t){t.y=-t.y}function s(t){l.each(t.nodes(),function(e){c(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,c),l.has(n,"x")&&c(n)})}function c(t){var e=t.x;t.x=t.y,t.y=e}var l=t("./lodash");e.exports={adjust:n,undo:r}},{"./lodash":37}],32:[function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){return"_next"!==t&&"_prev"!==t?e:void 0}e.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;return e!==t?(r(e),e):void 0},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},{}],33:[function(t,e){function n(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.each(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;e.exports={debugOrdering:n}},{"./graphlib":34,"./lodash":37,"./util":56}],34:[function(t,e){e.exports=t(10)},{graphlib:58}],35:[function(t,e){function n(t,e){if(t.nodeCount()<=1)return[];var n=a(t,e||l),i=r(n.graph,n.buckets,n.zeroIdx);return u.flatten(u.map(i,function(e){return t.outEdges(e.v,e.w)}),!0)}function r(t,e,n){for(var r,a=[],o=e[e.length-1],u=e[0];t.nodeCount();){for(;r=u.dequeue();)i(t,e,n,r);for(;r=o.dequeue();)i(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){a=a.concat(i(t,e,n,r,!0));break}}return a}function i(t,e,n,r,i){var a=i?[]:void 0;return u.each(t.inEdges(r.v),function(r){var u=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=u,o(e,n,s)}),u.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,u=t.node(a);u["in"]-=i,o(e,n,u)}),t.removeNode(r.v),a}function a(t,e){var n=new s,r=0,i=0;u.each(t.nodes(),function(t){n.setNode(t,{v:t,"in":0,out:0})}),u.each(t.edges(),function(t){var a=n.edge(t.v,t.w)||0,o=e(t),u=a+o;n.setEdge(t.v,t.w,u),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w)["in"]+=o)});var a=u.range(i+r+3).map(function(){return new c}),l=r+1;return u.each(n.nodes(),function(t){o(a,l,n.node(t))}),{graph:n,buckets:a,zeroIdx:l}}function o(t,e,n){n.out?n["in"]?t[n.out-n["in"]+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var u=t("./lodash"),s=t("./graphlib").Graph,c=t("./data/list");e.exports=n;var l=u.constant(1)},{"./data/list":32,"./graphlib":34,"./lodash":37}],36:[function(t,e){"use strict";function n(t,e){var n=e&&e.debugTiming?L.time:L.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return a(t)});n(" runLayout",function(){r(e,n)}),n(" updateInputGraph",function(){i(t,e)})})}function r(t,e){e(" makeSpaceForEdgeLabels",function(){o(t)}),e(" removeSelfEdges",function(){g(t)}),e(" acyclic",function(){x.run(t)}),e(" nestingGraph.run",function(){M.run(t)}),e(" rank",function(){k(L.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){u(t)}),e(" removeEmptyRanks",function(){D(t)}),e(" nestingGraph.cleanup",function(){M.cleanup(t)}),e(" normalizeRanks",function(){A(t)}),e(" assignRankMinMax",function(){s(t)}),e(" removeEdgeLabelProxies",function(){c(t)}),e(" normalize.run",function(){w.run(t)}),e(" parentDummyChains",function(){E(t)}),e(" addBorderSegments",function(){S(t)}),e(" order",function(){T(t)}),e(" insertSelfEdges",function(){y(t)}),e(" adjustCoordinateSystem",function(){C.adjust(t)}),e(" position",function(){F(t)}),e(" positionSelfEdges",function(){m(t)}),e(" removeBorderNodes",function(){p(t)}),e(" normalize.undo",function(){w.undo(t)}),e(" fixupEdgeLabelCoords",function(){f(t)}),e(" undoCoordinateSystem",function(){C.undo(t)}),e(" translateGraph",function(){l(t)}),e(" assignNodeIntersects",function(){h(t)}),e(" reversePoints",function(){d(t)}),e(" acyclic.undo",function(){x.undo(t)})}function i(t,e){_.each(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),_.each(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,_.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function a(t){var e=new B({multigraph:!0,compound:!0}),n=b(t.graph());return e.setGraph(_.merge({},O,v(n,N),_.pick(n,I))),_.each(t.nodes(),function(n){var r=b(t.node(n));e.setNode(n,_.defaults(v(r,q),R)),e.setParent(n,t.parent(n))}),_.each(t.edges(),function(n){var r=b(t.edge(n));e.setEdge(n,_.merge({},U,v(r,P),_.pick(r,Y)))}),e}function o(t){var e=t.graph();e.ranksep/=2,_.each(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function u(t){_.each(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-r.rank)/2+r.rank,e:e};L.addDummyNode(t,"edge-proxy",a,"_ep")}})}function s(t){var e=0;_.each(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=_.max(e,r.maxRank))}),t.graph().maxRank=e}function c(t){_.each(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function l(t){function e(t){var e=t.x,o=t.y,u=t.width,s=t.height;n=Math.min(n,e-u/2),r=Math.max(r,e+u/2),i=Math.min(i,o-s/2),a=Math.max(a,o+s/2)}var n=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),u=o.marginx||0,s=o.marginy||0;_.each(t.nodes(),function(n){e(t.node(n))}),_.each(t.edges(),function(n){var r=t.edge(n);_.has(r,"x")&&e(r)}),n-=u,i-=s,_.each(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),_.each(t.edges(),function(e){var r=t.edge(e);_.each(r.points,function(t){t.x-=n,t.y-=i}),_.has(r,"x")&&(r.x-=n),_.has(r,"y")&&(r.y-=i)}),o.width=r-n+u,o.height=a-i+s}function h(t){_.each(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(L.intersectRect(a,n)),i.points.push(L.intersectRect(o,r))})}function f(t){_.each(t.edges(),function(e){var n=t.edge(e);if(_.has(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function d(t){_.each(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function p(t){_.each(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(_.last(n.borderLeft)),o=t.node(_.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),_.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function g(t){_.each(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function y(t){var e=L.buildLayerMatrix(t);_.each(e,function(e){var n=0;_.each(e,function(e,r){var i=t.node(e);i.order=r+n,_.each(i.selfEdges,function(e){L.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}function m(t){_.each(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-u},{x:i+5*o/6,y:a-u},{x:i+o,y:a},{x:i+5*o/6,y:a+u},{x:i+2*o/3,y:a+u}],n.label.x=n.x,n.label.y=n.y}})}function v(t,e){return _.mapValues(_.pick(t,e),Number)}function b(t){var e={};return _.each(t,function(t,n){e[n.toLowerCase()]=t}),e}var _=t("./lodash"),x=t("./acyclic"),w=t("./normalize"),k=t("./rank"),A=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),D=t("./util").removeEmptyRanks,M=t("./nesting-graph"),S=t("./add-border-segments"),C=t("./coordinate-system"),T=t("./order"),F=t("./position"),L=t("./util"),B=t("./graphlib").Graph;e.exports=n;var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],q=["width","height"],R={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],U={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Y=["labelpos"]},{"./acyclic":29,"./add-border-segments":30,"./coordinate-system":31,"./graphlib":34,"./lodash":37,"./nesting-graph":38,"./normalize":39,"./order":44,"./parent-dummy-chains":49,"./position":51,"./rank":53,"./util":56}],37:[function(t,e){e.exports=t(21)},{lodash:82}],38:[function(t,e){function n(t){var e=s.addDummyNode(t,"root",{},"_root"),n=i(t),o=u.max(n)-1,c=2*o+1;t.graph().nestingRoot=e,u.each(t.edges(),function(e){t.edge(e).minlen*=c});var l=a(t)+1;u.each(t.children(),function(i){r(t,e,c,l,o,n,i)}),t.graph().nodeRankFactor=c}function r(t,e,n,i,a,o,c){var l=t.children(c);if(!l.length)return void(c!==e&&t.setEdge(e,c,{weight:0,minlen:n}));var h=s.addBorderNode(t,"_bt"),f=s.addBorderNode(t,"_bb"),d=t.node(c);t.setParent(h,c),d.borderTop=h,t.setParent(f,c),d.borderBottom=f,u.each(l,function(u){r(t,e,n,i,a,o,u);var s=t.node(u),l=s.borderTop?s.borderTop:u,d=s.borderBottom?s.borderBottom:u,p=s.borderTop?i:2*i,g=l!==d?1:a-o[c]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(c)||t.setEdge(e,h,{weight:0,minlen:a+o[c]})}function i(t){function e(r,i){var a=t.children(r);a&&a.length&&u.each(a,function(t){e(t,i+1)}),n[r]=i}var n={};return u.each(t.children(),function(t){e(t,1)}),n}function a(t){return u.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function o(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,u.each(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}var u=t("./lodash"),s=t("./util");e.exports={run:n,cleanup:o}},{"./lodash":37,"./util":56}],39:[function(t,e){"use strict";function n(t){t.graph().dummyChains=[],a.each(t.edges(),function(e){r(t,e)})}function r(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,u=e.name,s=t.edge(e),c=s.labelRank;if(a!==r+1){t.removeEdge(e);var l,h,f;for(f=0,++r;a>r;++f,++r)s.points=[],h={width:0,height:0,edgeLabel:s,edgeObj:e,rank:r},l=o.addDummyNode(t,"edge",h,"_d"),r===c&&(h.width=s.width,h.height=s.height,h.dummy="edge-label",h.labelpos=s.labelpos),t.setEdge(n,l,{weight:s.weight},u),0===f&&t.graph().dummyChains.push(l),n=l;t.setEdge(n,i,{weight:s.weight},u)}}function i(t){a.each(t.graph().dummyChains,function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}var a=t("./lodash"),o=t("./util");e.exports={run:n,undo:i}},{"./lodash":37,"./util":56}],40:[function(t,e){function n(t,e,n){var i,a={};r.each(n,function(n){for(var r,o,u=t.parent(n);u;){if(r=t.parent(u),r?(o=a[r],a[r]=u):(o=i,i=u),o&&o!==u)return void e.setEdge(o,u);u=r}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],41:[function(t,e){function n(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],42:[function(t,e){function n(t,e,n){var o=r(t),u=new a({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(e){return t.node(e)});return i.each(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(u.setNode(r),u.setParent(r,s||o),i.each(t[n](r),function(e){var n=e.v===r?e.w:e.v,a=u.edge(n,r),o=i.isUndefined(a)?0:a.weight;u.setEdge(n,r,{weight:t.edge(e).weight+o})}),i.has(a,"minRank")&&u.setNode(r,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),u}function r(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}var i=t("../lodash"),a=t("../graphlib").Graph;e.exports=n},{"../graphlib":34,"../lodash":37}],43:[function(t,e){"use strict";function n(t,e){for(var n=0,i=1;i0;)e%2&&(n+=s[e+1]),e=e-1>>1,s[e]+=t.weight;c+=t.weight*n})),c}var i=t("../lodash");e.exports=n},{"../lodash":37}],44:[function(t,e){"use strict";function n(t){var e=d.maxRank(t),n=r(t,o.range(1,e+1),"inEdges"),c=r(t,o.range(e-1,-1,-1),"outEdges"),l=u(t);a(t,l);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;4>g;++p,++g){i(p%2?n:c,p%4>=2),l=d.buildLayerMatrix(t);var y=s(t,l);f>y&&(g=0,h=o.cloneDeep(l),f=y)}a(t,h)}function r(t,e,n){return o.map(e,function(e){return l(t,e,n)})}function i(t,e){var n=new f;o.each(t,function(t){var r=t.graph().root,i=c(t,r,n,e);o.each(i.vs,function(e,n){t.node(e).order=n}),h(t,n,i.vs)})}function a(t,e){o.each(e,function(e){o.each(e,function(e,n){t.node(e).order=n})})}var o=t("../lodash"),u=t("./init-order"),s=t("./cross-count"),c=t("./sort-subgraph"),l=t("./build-layer-graph"),h=t("./add-subgraph-constraints"),f=t("../graphlib").Graph,d=t("../util");e.exports=n},{"../graphlib":34,"../lodash":37,"../util":56,"./add-subgraph-constraints":40,"./build-layer-graph":42,"./cross-count":43,"./init-order":45,"./sort-subgraph":47}],45:[function(t,e){"use strict";function n(t){function e(i){if(!r.has(n,i)){n[i]=!0;var a=t.node(i);o[a.rank].push(i),r.each(t.successors(i),e)}}var n={},i=r.filter(t.nodes(),function(e){return!t.children(e).length}),a=r.max(r.map(i,function(e){return t.node(e).rank})),o=r.map(r.range(a+1),function(){return[]}),u=r.sortBy(i,function(e){return t.node(e).rank});return r.each(u,e),o}var r=t("../lodash");e.exports=n},{"../lodash":37}],46:[function(t,e){"use strict";function n(t,e){var n={};a.each(t,function(t,e){var r=n[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:e};a.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.each(e.edges(),function(t){var e=n[t.v],r=n[t.w];a.isUndefined(e)||a.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))});var i=a.filter(n,function(t){return!t.indegree});return r(i)}function r(t){function e(t){return function(e){e.merged||(a.isUndefined(e.barycenter)||a.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&i(t,e)}}function n(e){return function(n){n["in"].push(e),0===--n.indegree&&t.push(n)}}for(var r=[];t.length;){var o=t.pop();r.push(o),a.each(o["in"].reverse(),e(o)),a.each(o.out,n(o))}return a.chain(r).filter(function(t){return!t.merged}).map(function(t){return a.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}var a=t("../lodash");e.exports=n},{"../lodash":37}],47:[function(t,e){function n(t,e,c,l){var h=t.children(e),f=t.node(e),d=f?f.borderLeft:void 0,p=f?f.borderRight:void 0,g={};d&&(h=a.filter(h,function(t){return t!==d&&t!==p}));var y=o(t,h);a.each(y,function(e){if(t.children(e.v).length){var r=n(t,e.v,c,l);g[e.v]=r,a.has(r,"barycenter")&&i(e,r)}});var m=u(y,c);r(m,g);var v=s(m,l);if(d&&(v.vs=a.flatten([d,v.vs,p],!0),t.predecessors(d).length)){var b=t.node(t.predecessors(d)[0]),_=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+_.order)/(v.weight+2),v.weight+=2}return v}function r(t,e){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}function i(t,e){a.isUndefined(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var a=t("../lodash"),o=t("./barycenter"),u=t("./resolve-conflicts"),s=t("./sort");e.exports=n},{"../lodash":37,"./barycenter":41,"./resolve-conflicts":46,"./sort":48}],48:[function(t,e){function n(t,e){var n=o.partition(t,function(t){return a.has(t,"barycenter")}),u=n.lhs,s=a.sortBy(n.rhs,function(t){return-t.i}),c=[],l=0,h=0,f=0;u.sort(i(!!e)),f=r(c,s,f),a.each(u,function(t){f+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=r(c,s,f)});var d={vs:a.flatten(c,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}function r(t,e,n){for(var r;e.length&&(r=a.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function i(t){return function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i}}var a=t("../lodash"),o=t("../util");e.exports=n},{"../lodash":37,"../util":56}],49:[function(t,e){function n(t){var e=i(t);a.each(t.graph().dummyChains,function(n){for(var i=t.node(n),a=i.edgeObj,o=r(t,e,a.v,a.w),u=o.path,s=o.lca,c=0,l=u[c],h=!0;n!==a.w;){if(i=t.node(n),h){for(;(l=u[c])!==s&&t.node(l).maxRanks||c>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)u.push(i);return{path:o.concat(u.reverse()),lca:a}}function i(t){function e(i){var o=r;a.each(t.children(i),e),n[i]={low:o,lim:r++}}var n={},r=0;return a.each(t.children(),e),n}var a=t("./lodash");e.exports=n},{"./lodash":37}],50:[function(t,e){"use strict";function n(t,e){function n(e,n){var o=0,u=0,s=e.length,c=y.last(n);return y.each(n,function(e,l){var h=i(t,e),f=h?t.node(h).order:s;(h||e===c)&&(y.each(n.slice(u,l+1),function(e){y.each(t.predecessors(e),function(n){var i=t.node(n),u=i.order;!(o>u||u>f)||i.dummy&&t.node(e).dummy||a(r,n,e)})}),u=l+1,o=f)}),n}var r={};return y.reduce(e,n),r}function r(t,e){function n(e,n,r,o,u){var s;y.each(y.range(n,r),function(n){s=e[n],t.node(s).dummy&&y.each(t.predecessors(s),function(e){var n=t.node(e);n.dummy&&(n.orderu)&&a(i,e,s)})})}function r(e,r){var i,a=-1,o=0;return y.each(r,function(u,s){if("border"===t.node(u).dummy){var c=t.predecessors(u);c.length&&(i=t.node(c[0]).order,n(r,o,s,a,i),o=s,a=i)}n(r,o,r.length,i,e.length)}),r}var i={};return y.reduce(e,r),i}function i(t,e){return t.node(e).dummy?y.find(t.predecessors(e),function(e){return t.node(e).dummy}):void 0}function a(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function o(t,e,n){if(e>n){var r=e;e=n,n=r}return y.has(t[e],n)}function u(t,e,n,r){var i={},a={},u={};return y.each(e,function(t){y.each(t,function(t,e){i[t]=t,a[t]=t,u[t]=e})}),y.each(e,function(t){var e=-1;y.each(t,function(t){var s=r(t);if(s.length){s=y.sortBy(s,function(t){return u[t]});for(var c=(s.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var f=s[l];a[t]===t&&eo.lim&&(u=o,s=!0);var c=p.filter(e.edges(),function(e){return s===d(t,t.node(e.v),u)&&s!==d(t,t.node(e.w),u)});return p.min(c,function(t){return y(e,t)})}function l(t,e,n,i){var a=n.v,u=n.w;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),o(t),r(t,e),h(t,e)}function h(t,e){var n=p.find(t.nodes(),function(t){return!e.node(t).parent}),r=v(t,n);r=r.slice(1),p.each(r,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}function f(t,e,n){return t.hasEdge(e,n)}function d(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}var p=t("../lodash"),g=t("./feasible-tree"),y=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,b=t("../graphlib").alg.postorder,_=t("../util").simplify;e.exports=n,n.initLowLimValues=o,n.initCutValues=r,n.calcCutValue=a,n.leaveEdge=s,n.enterEdge=c,n.exchangeEdges=l},{"../graphlib":34,"../lodash":37,"../util":56,"./feasible-tree":52,"./util":55}],55:[function(t,e){"use strict";function n(t){function e(r){var a=t.node(r);if(i.has(n,r))return a.rank;n[r]=!0;var o=i.min(i.map(t.outEdges(r),function(n){return e(n.w)-t.edge(n).minlen}));return o===Number.POSITIVE_INFINITY&&(o=0),a.rank=o}var n={};i.each(t.sources(),e)}function r(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var i=t("../lodash");e.exports={longestPath:n,slack:r}},{"../lodash":37}],56:[function(t,e){"use strict";function n(t,e,n,r){var i;do i=y.uniqueId(r);while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function r(t){var e=(new m).setGraph(t.graph());return y.each(t.nodes(),function(n){e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e}function i(t){var e=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return y.each(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e}function a(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function o(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function u(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r,o=t.width/2,u=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,c;return Math.abs(a)*o>Math.abs(i)*u?(0>a&&(u=-u),s=u*i/a,c=u):(0>i&&(o=-o),s=o,c=o*a/i),{x:n+s,y:r+c}}function s(t){var e=y.map(y.range(f(t)+1),function(){return[]});return y.each(t.nodes(),function(n){var r=t.node(n),i=r.rank;y.isUndefined(i)||(e[i][r.order]=n)}),e}function c(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank}));y.each(t.nodes(),function(n){var r=t.node(n);y.has(r,"rank")&&(r.rank-=e)})}function l(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank})),n=[];y.each(t.nodes(),function(r){var i=t.node(r).rank-e;y.has(n,i)||(n[i]=[]),n[i].push(r)});var r=0,i=t.graph().nodeRankFactor;y.each(n,function(e,n){y.isUndefined(e)&&n%i!==0?--r:r&&y.each(e,function(e){t.node(e).rank+=r})})}function h(t,e,r,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=i),n(t,"border",a,e)}function f(t){return y.max(y.map(t.nodes(),function(e){var n=t.node(e).rank;return y.isUndefined(n)?void 0:n}))}function d(t,e){var n={lhs:[],rhs:[]};return y.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function p(t,e){var n=y.now();try{return e()}finally{console.log(t+" time: "+(y.now()-n)+"ms")}}function g(t,e){return e()}var y=t("./lodash"),m=t("./graphlib").Graph;e.exports={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:u,buildLayerMatrix:s,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:f,partition:d,time:p,notime:g}},{"./graphlib":34,"./lodash":37}],57:[function(t,e){e.exports="0.7.1"},{}],58:[function(t,e){var n=t("./lib");e.exports={Graph:n.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:n.version}},{"./lib":74,"./lib/alg":65,"./lib/json":75}],59:[function(t,e){function n(t){function e(a){r.has(i,a)||(i[a]=!0,n.push(a),r.each(t.successors(a),e),r.each(t.predecessors(a),e))}var n,i={},a=[];return r.each(t.nodes(),function(t){n=[],e(t),n.length&&a.push(n)}),a}var r=t("../lodash");e.exports=n},{"../lodash":76}],60:[function(t,e){function n(t,e,n){i.isArray(e)||(e=[e]);var a=[],o={};return i.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);r(t,e,"post"===n,o,a)}),a}function r(t,e,n,a,o){i.has(a,e)||(a[e]=!0,n||o.push(e),i.each(t.neighbors(e),function(e){r(t,e,n,a,o)}),n&&o.push(e))}var i=t("../lodash");e.exports=n},{"../lodash":76}],61:[function(t,e){function n(t,e,n){return i.transform(t.nodes(),function(i,a){i[a]=r(t,a,e,n)},{})}var r=t("./dijkstra"),i=t("../lodash"); -e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e,n,i){return r(t,String(e),n||o,i||function(e){return t.outEdges(e)})}function r(t,e,n,r){var i,o,u={},s=new a,c=function(t){var e=t.v!==i?t.v:t.w,r=u[e],a=n(t),c=o.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c0&&(i=s.removeMin(),o=u[i],o.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return u}var i=t("../lodash"),a=t("../data/priority-queue");e.exports=n;var o=i.constant(1)},{"../data/priority-queue":72,"../lodash":76}],63:[function(t,e){function n(t){return r.filter(i(t),function(t){return t.length>1})}var r=t("../lodash"),i=t("./tarjan");e.exports=n},{"../lodash":76,"./tarjan":70}],64:[function(t,e){function n(t,e,n){return r(t,e||a,n||function(e){return t.outEdges(e)})}function r(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[t],i=e[n],o=a[n],u=r.distance+i.distance;ui&&(s[n]=o,c.decrease(n,i))}}var o,u=new i,s={},c=new a;if(0===t.nodeCount())return u;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),u.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(o=c.removeMin(),r.has(s,o))u.setEdge(o,s[o]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(o).forEach(n)}return u}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");e.exports=n},{"../data/priority-queue":72,"../graph":73,"../lodash":76}],70:[function(t,e){function n(t){function e(u){var s=a[u]={onStack:!0,lowlink:n,index:n++};if(i.push(u),t.successors(u).forEach(function(t){r.has(a,t)?a[t].onStack&&(s.lowlink=Math.min(s.lowlink,a[t].index)):(e(t),s.lowlink=Math.min(s.lowlink,a[t].lowlink))}),s.lowlink===s.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(u!==c);o.push(l)}}var n=0,i=[],a={},o=[];return t.nodes().forEach(function(t){r.has(a,t)||e(t)}),o}var r=t("../lodash");e.exports=n},{"../lodash":76}],71:[function(t,e){function n(t){function e(u){if(i.has(a,u))throw new r;i.has(n,u)||(a[u]=!0,n[u]=!0,i.each(t.predecessors(u),e),delete a[u],o.push(u))}var n={},a={},o=[];if(i.each(t.sinks(),e),i.size(n)!==t.nodeCount())throw new r;return o}function r(){}var i=t("../lodash");e.exports=n,n.CycleException=r},{"../lodash":76}],72:[function(t,e){function n(){this._arr=[],this._keyIndices={}}var r=t("../lodash");e.exports=n,n.prototype.size=function(){return this._arr.length},n.prototype.keys=function(){return this._arr.map(function(t){return t.key})},n.prototype.has=function(t){return r.has(this._keyIndices,t)},n.prototype.priority=function(t){var e=this._keyIndices[t];return void 0!==e?this._arr[e].priority:void 0},n.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},n.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},n.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},n.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},n.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1,!(n[e].priorityn){var i=e;e=n,n=i}return e+h+n+h+(s.isUndefined(r)?c:r)}function o(t,e,n,r){if(!t&&e>n){var i=e;e=n,n=i}var a={v:e,w:n};return r&&(a.name=r),a}function u(t,e){return a(t,e.v,e.w,e.name)}var s=t("./lodash");e.exports=n;var c="\x00",l="\x00",h="";n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(t){return this._label=t,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return s.keys(this._nodes)},n.prototype.sources=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._in[t])},this)},n.prototype.sinks=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._out[t])},this)},n.prototype.setNodes=function(t,e){var n=arguments;return s.each(t,function(t){n.length>1?this.setNode(t,e):this.setNode(t)},this),this},n.prototype.setNode=function(t,e){return s.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},n.prototype.node=function(t){return this._nodes[t]},n.prototype.hasNode=function(t){return s.has(this._nodes,t)},n.prototype.removeNode=function(t){var e=this;if(s.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],s.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),s.each(s.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],s.each(s.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(s.isUndefined(e))e=l;else{for(var n=e;!s.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},n.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},n.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==l)return e}},n.prototype.children=function(t){if(s.isUndefined(t)&&(t=l),this._isCompound){var e=this._children[t];if(e)return s.keys(e)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},n.prototype.predecessors=function(t){var e=this._preds[t];return e?s.keys(e):void 0},n.prototype.successors=function(t){var e=this._sucs[t];return e?s.keys(e):void 0},n.prototype.neighbors=function(t){var e=this.predecessors(t);return e?s.union(e,this.successors(t)):void 0},n.prototype.setDefaultEdgeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return s.values(this._edgeObjs)},n.prototype.setPath=function(t,e){var n=this,r=arguments;return s.reduce(t,function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i}),this},n.prototype.setEdge=function(){var t,e,n,i,u=!1;s.isPlainObject(arguments[0])?(t=arguments[0].v,e=arguments[0].w,n=arguments[0].name,2===arguments.length&&(i=arguments[1],u=!0)):(t=arguments[0],e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],u=!0)),t=""+t,e=""+e,s.isUndefined(n)||(n=""+n);var c=a(this._isDirected,t,e,n);if(s.has(this._edgeLabels,c))return u&&(this._edgeLabels[c]=i),this;if(!s.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[c]=u?i:this._defaultEdgeLabelFn(t,e,n);var l=o(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[c]=l,r(this._preds[e],t),r(this._sucs[t],e),this._in[e][c]=l,this._out[t][c]=l,this._edgeCount++,this},n.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return s.has(this._edgeLabels,r)},n.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n),o=this._edgeObjs[r];return o&&(t=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[e],t),i(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},n.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.v===e}):r}},n.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.w===e}):r}},n.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);return n?n.concat(this.outEdges(t,e)):void 0}},{"./lodash":76}],74:[function(t,e){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":73,"./version":77}],75:[function(t,e){function n(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:r(t),edges:i(t)};return o.isUndefined(t.graph())||(e.value=o.clone(t.graph())),e}function r(t){return o.map(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return o.isUndefined(n)||(i.value=n),o.isUndefined(r)||(i.parent=r),i})}function i(t){return o.map(t.edges(),function(e){var n=t.edge(e),r={v:e.v,w:e.w};return o.isUndefined(e.name)||(r.name=e.name),o.isUndefined(n)||(r.value=n),r})}function a(t){var e=new u(t.options).setGraph(t.value);return o.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),o.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}var o=t("./lodash"),u=t("./graph");e.exports={write:n,read:a}},{"./graph":73,"./lodash":76}],76:[function(t,e){e.exports=t(21)},{lodash:82}],77:[function(t,e){e.exports="1.0.1"},{}],78:[function(){},{}],79:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),a="/"===o(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),a=r(e.split("/")),o=Math.min(i.length,a.length),u=o,s=0;o>s;s++)if(i[s]!==a[s]){u=s;break}for(var c=[],s=u;se&&(e=t.length+e),t.substr(e,n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":80}],80:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],81:[function(t,e,n){(function(t){!function(r){var i="object"==typeof n&&n,a="object"==typeof e&&e&&e.exports==i&&e,o="object"==typeof t&&t;(o.global===o||o.window===o)&&(r=o);var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,h={"Á":"Aacute","á":"aacute","Ă":"Abreve","ă":"abreve","∾":"ac","∿":"acd","∾̳":"acE","Â":"Acirc","â":"acirc","´":"acute","А":"Acy","а":"acy","Æ":"AElig","æ":"aelig","⁡":"af","𝔄":"Afr","𝔞":"afr","À":"Agrave","à":"agrave","ℵ":"aleph","Α":"Alpha","α":"alpha","Ā":"Amacr","ā":"amacr","⨿":"amalg","&":"amp","⩕":"andand","⩓":"And","∧":"and","⩜":"andd","⩘":"andslope","⩚":"andv","∠":"ang","⦤":"ange","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","∡":"angmsd","∟":"angrt","⊾":"angrtvb","⦝":"angrtvbd","∢":"angsph","Å":"angst","⍼":"angzarr","Ą":"Aogon","ą":"aogon","𝔸":"Aopf","𝕒":"aopf","⩯":"apacir","≈":"ap","⩰":"apE","≊":"ape","≋":"apid","'":"apos","å":"aring","𝒜":"Ascr","𝒶":"ascr","≔":"colone","*":"ast","≍":"CupCap","Ã":"Atilde","ã":"atilde","Ä":"Auml","ä":"auml","∳":"awconint","⨑":"awint","≌":"bcong","϶":"bepsi","‵":"bprime","∽":"bsim","⋍":"bsime","∖":"setmn","⫧":"Barv","⊽":"barvee","⌅":"barwed","⌆":"Barwed","⎵":"bbrk","⎶":"bbrktbrk","Б":"Bcy","б":"bcy","„":"bdquo","∵":"becaus","⦰":"bemptyv","ℬ":"Bscr","Β":"Beta","β":"beta","ℶ":"beth","≬":"twixt","𝔅":"Bfr","𝔟":"bfr","⋂":"xcap","◯":"xcirc","⋃":"xcup","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨆":"xsqcup","★":"starf","▽":"xdtri","△":"xutri","⨄":"xuplus","⋁":"Vee","⋀":"Wedge","⤍":"rbarr","⧫":"lozf","▪":"squf","▴":"utrif","▾":"dtrif","◂":"ltrif","▸":"rtrif","␣":"blank","▒":"blk12","░":"blk14","▓":"blk34","█":"block","=⃥":"bne","≡⃥":"bnequiv","⫭":"bNot","⌐":"bnot","𝔹":"Bopf","𝕓":"bopf","⊥":"bot","⋈":"bowtie","⧉":"boxbox","┐":"boxdl","╕":"boxdL","╖":"boxDl","╗":"boxDL","┌":"boxdr","╒":"boxdR","╓":"boxDr","╔":"boxDR","─":"boxh","═":"boxH","┬":"boxhd","╤":"boxHd","╥":"boxhD","╦":"boxHD","┴":"boxhu","╧":"boxHu","╨":"boxhU","╩":"boxHU","⊟":"minusb","⊞":"plusb","⊠":"timesb","┘":"boxul","╛":"boxuL","╜":"boxUl","╝":"boxUL","└":"boxur","╘":"boxuR","╙":"boxUr","╚":"boxUR","│":"boxv","║":"boxV","┼":"boxvh","╪":"boxvH","╫":"boxVh","╬":"boxVH","┤":"boxvl","╡":"boxvL","╢":"boxVl","╣":"boxVL","├":"boxvr","╞":"boxvR","╟":"boxVr","╠":"boxVR","˘":"breve","¦":"brvbar","𝒷":"bscr","⁏":"bsemi","⧅":"bsolb","\\":"bsol","⟈":"bsolhsub","•":"bull","≎":"bump","⪮":"bumpE","≏":"bumpe","Ć":"Cacute","ć":"cacute","⩄":"capand","⩉":"capbrcup","⩋":"capcap","∩":"cap","⋒":"Cap","⩇":"capcup","⩀":"capdot","ⅅ":"DD","∩︀":"caps","⁁":"caret","ˇ":"caron","ℭ":"Cfr","⩍":"ccaps","Č":"Ccaron","č":"ccaron","Ç":"Ccedil","ç":"ccedil","Ĉ":"Ccirc","ĉ":"ccirc","∰":"Cconint","⩌":"ccups","⩐":"ccupssm","Ċ":"Cdot","ċ":"cdot","¸":"cedil","⦲":"cemptyv","¢":"cent","·":"middot","𝔠":"cfr","Ч":"CHcy","ч":"chcy","✓":"check","Χ":"Chi","χ":"chi","ˆ":"circ","≗":"cire","↺":"olarr","↻":"orarr","⊛":"oast","⊚":"ocir","⊝":"odash","⊙":"odot","®":"reg","Ⓢ":"oS","⊖":"ominus","⊕":"oplus","⊗":"otimes","○":"cir","⧃":"cirE","⨐":"cirfnint","⫯":"cirmid","⧂":"cirscir","∲":"cwconint","”":"rdquo","’":"rsquo","♣":"clubs",":":"colon","∷":"Colon","⩴":"Colone",",":"comma","@":"commat","∁":"comp","∘":"compfn","ℂ":"Copf","≅":"cong","⩭":"congdot","≡":"equiv","∮":"oint","∯":"Conint","𝕔":"copf","∐":"coprod","©":"copy","℗":"copysr","↵":"crarr","✗":"cross","⨯":"Cross","𝒞":"Cscr","𝒸":"cscr","⫏":"csub","⫑":"csube","⫐":"csup","⫒":"csupe","⋯":"ctdot","⤸":"cudarrl","⤵":"cudarrr","⋞":"cuepr","⋟":"cuesc","↶":"cularr","⤽":"cularrp","⩈":"cupbrcap","⩆":"cupcap","∪":"cup","⋓":"Cup","⩊":"cupcup","⊍":"cupdot","⩅":"cupor","∪︀":"cups","↷":"curarr","⤼":"curarrm","⋎":"cuvee","⋏":"cuwed","¤":"curren","∱":"cwint","⌭":"cylcty","†":"dagger","‡":"Dagger","ℸ":"daleth","↓":"darr","↡":"Darr","⇓":"dArr","‐":"dash","⫤":"Dashv","⊣":"dashv","⤏":"rBarr","˝":"dblac","Ď":"Dcaron","ď":"dcaron","Д":"Dcy","д":"dcy","⇊":"ddarr","ⅆ":"dd","⤑":"DDotrahd","⩷":"eDDot","°":"deg","∇":"Del","Δ":"Delta","δ":"delta","⦱":"demptyv","⥿":"dfisht","𝔇":"Dfr","𝔡":"dfr","⥥":"dHar","⇃":"dharl","⇂":"dharr","˙":"dot","`":"grave","˜":"tilde","⋄":"diam","♦":"diams","¨":"die","ϝ":"gammad","⋲":"disin","÷":"div","⋇":"divonx","Ђ":"DJcy","ђ":"djcy","⌞":"dlcorn","⌍":"dlcrop",$:"dollar","𝔻":"Dopf","𝕕":"dopf","⃜":"DotDot","≐":"doteq","≑":"eDot","∸":"minusd","∔":"plusdo","⊡":"sdotb","⇐":"lArr","⇔":"iff","⟸":"xlArr","⟺":"xhArr","⟹":"xrArr","⇒":"rArr","⊨":"vDash","⇑":"uArr","⇕":"vArr","∥":"par","⤓":"DownArrowBar","⇵":"duarr","̑":"DownBreve","⥐":"DownLeftRightVector","⥞":"DownLeftTeeVector","⥖":"DownLeftVectorBar","↽":"lhard","⥟":"DownRightTeeVector","⥗":"DownRightVectorBar","⇁":"rhard","↧":"mapstodown","⊤":"top","⤐":"RBarr","⌟":"drcorn","⌌":"drcrop","𝒟":"Dscr","𝒹":"dscr","Ѕ":"DScy","ѕ":"dscy","⧶":"dsol","Đ":"Dstrok","đ":"dstrok","⋱":"dtdot","▿":"dtri","⥯":"duhar","⦦":"dwangle","Џ":"DZcy","џ":"dzcy","⟿":"dzigrarr","É":"Eacute","é":"eacute","⩮":"easter","Ě":"Ecaron","ě":"ecaron","Ê":"Ecirc","ê":"ecirc","≖":"ecir","≕":"ecolon","Э":"Ecy","э":"ecy","Ė":"Edot","ė":"edot","ⅇ":"ee","≒":"efDot","𝔈":"Efr","𝔢":"efr","⪚":"eg","È":"Egrave","è":"egrave","⪖":"egs","⪘":"egsdot","⪙":"el","∈":"in","⏧":"elinters","ℓ":"ell","⪕":"els","⪗":"elsdot","Ē":"Emacr","ē":"emacr","∅":"empty","◻":"EmptySmallSquare","▫":"EmptyVerySmallSquare"," ":"emsp13"," ":"emsp14"," ":"emsp","Ŋ":"ENG","ŋ":"eng"," ":"ensp","Ę":"Eogon","ę":"eogon","𝔼":"Eopf","𝕖":"eopf","⋕":"epar","⧣":"eparsl","⩱":"eplus","ε":"epsi","Ε":"Epsilon","ϵ":"epsiv","≂":"esim","⩵":"Equal","=":"equals","≟":"equest","⇌":"rlhar","⩸":"equivDD","⧥":"eqvparsl","⥱":"erarr","≓":"erDot","ℯ":"escr","ℰ":"Escr","⩳":"Esim","Η":"Eta","η":"eta","Ð":"ETH","ð":"eth","Ë":"Euml","ë":"euml","€":"euro","!":"excl","∃":"exist","Ф":"Fcy","ф":"fcy","♀":"female","ffi":"ffilig","ff":"fflig","ffl":"ffllig","𝔉":"Ffr","𝔣":"ffr","fi":"filig","◼":"FilledSmallSquare",fj:"fjlig","♭":"flat","fl":"fllig","▱":"fltns","ƒ":"fnof","𝔽":"Fopf","𝕗":"fopf","∀":"forall","⋔":"fork","⫙":"forkv","ℱ":"Fscr","⨍":"fpartint","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","⅔":"frac23","⅖":"frac25","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","⁄":"frasl","⌢":"frown","𝒻":"fscr","ǵ":"gacute","Γ":"Gamma","γ":"gamma","Ϝ":"Gammad","⪆":"gap","Ğ":"Gbreve","ğ":"gbreve","Ģ":"Gcedil","Ĝ":"Gcirc","ĝ":"gcirc","Г":"Gcy","г":"gcy","Ġ":"Gdot","ġ":"gdot","≥":"ge","≧":"gE","⪌":"gEl","⋛":"gel","⩾":"ges","⪩":"gescc","⪀":"gesdot","⪂":"gesdoto","⪄":"gesdotol","⋛︀":"gesl","⪔":"gesles","𝔊":"Gfr","𝔤":"gfr","≫":"gg","⋙":"Gg","ℷ":"gimel","Ѓ":"GJcy","ѓ":"gjcy","⪥":"gla","≷":"gl","⪒":"glE","⪤":"glj","⪊":"gnap","⪈":"gne","≩":"gnE","⋧":"gnsim","𝔾":"Gopf","𝕘":"gopf","⪢":"GreaterGreater","≳":"gsim","𝒢":"Gscr","ℊ":"gscr","⪎":"gsime","⪐":"gsiml","⪧":"gtcc","⩺":"gtcir",">":"gt","⋗":"gtdot","⦕":"gtlPar","⩼":"gtquest","⥸":"gtrarr","≩︀":"gvnE"," ":"hairsp","ℋ":"Hscr","Ъ":"HARDcy","ъ":"hardcy","⥈":"harrcir","↔":"harr","↭":"harrw","^":"Hat","ℏ":"hbar","Ĥ":"Hcirc","ĥ":"hcirc","♥":"hearts","…":"mldr","⊹":"hercon","𝔥":"hfr","ℌ":"Hfr","⤥":"searhk","⤦":"swarhk","⇿":"hoarr","∻":"homtht","↩":"larrhk","↪":"rarrhk","𝕙":"hopf","ℍ":"Hopf","―":"horbar","𝒽":"hscr","Ħ":"Hstrok","ħ":"hstrok","⁃":"hybull","Í":"Iacute","í":"iacute","⁣":"ic","Î":"Icirc","î":"icirc","И":"Icy","и":"icy","İ":"Idot","Е":"IEcy","е":"iecy","¡":"iexcl","𝔦":"ifr","ℑ":"Im","Ì":"Igrave","ì":"igrave","ⅈ":"ii","⨌":"qint","∭":"tint","⧜":"iinfin","℩":"iiota","IJ":"IJlig","ij":"ijlig","Ī":"Imacr","ī":"imacr","ℐ":"Iscr","ı":"imath","⊷":"imof","Ƶ":"imped","℅":"incare","∞":"infin","⧝":"infintie","⊺":"intcal","∫":"int","∬":"Int","ℤ":"Zopf","⨗":"intlarhk","⨼":"iprod","⁢":"it","Ё":"IOcy","ё":"iocy","Į":"Iogon","į":"iogon","𝕀":"Iopf","𝕚":"iopf","Ι":"Iota","ι":"iota","¿":"iquest","𝒾":"iscr","⋵":"isindot","⋹":"isinE","⋴":"isins","⋳":"isinsv","Ĩ":"Itilde","ĩ":"itilde","І":"Iukcy","і":"iukcy","Ï":"Iuml","ï":"iuml","Ĵ":"Jcirc","ĵ":"jcirc","Й":"Jcy","й":"jcy","𝔍":"Jfr","𝔧":"jfr","ȷ":"jmath","𝕁":"Jopf","𝕛":"jopf","𝒥":"Jscr","𝒿":"jscr","Ј":"Jsercy","ј":"jsercy","Є":"Jukcy","є":"jukcy","Κ":"Kappa","κ":"kappa","ϰ":"kappav","Ķ":"Kcedil","ķ":"kcedil","К":"Kcy","к":"kcy","𝔎":"Kfr","𝔨":"kfr","ĸ":"kgreen","Х":"KHcy","х":"khcy","Ќ":"KJcy","ќ":"kjcy","𝕂":"Kopf","𝕜":"kopf","𝒦":"Kscr","𝓀":"kscr","⇚":"lAarr","Ĺ":"Lacute","ĺ":"lacute","⦴":"laemptyv","ℒ":"Lscr","Λ":"Lambda","λ":"lambda","⟨":"lang","⟪":"Lang","⦑":"langd","⪅":"lap","«":"laquo","⇤":"larrb","⤟":"larrbfs","←":"larr","↞":"Larr","⤝":"larrfs","↫":"larrlp","⤹":"larrpl","⥳":"larrsim","↢":"larrtl","⤙":"latail","⤛":"lAtail","⪫":"lat","⪭":"late","⪭︀":"lates","⤌":"lbarr","⤎":"lBarr","❲":"lbbrk","{":"lcub","[":"lsqb","⦋":"lbrke","⦏":"lbrksld","⦍":"lbrkslu","Ľ":"Lcaron","ľ":"lcaron","Ļ":"Lcedil","ļ":"lcedil","⌈":"lceil","Л":"Lcy","л":"lcy","⤶":"ldca","“":"ldquo","⥧":"ldrdhar","⥋":"ldrushar","↲":"ldsh","≤":"le","≦":"lE","⇆":"lrarr","⟦":"lobrk","⥡":"LeftDownTeeVector","⥙":"LeftDownVectorBar","⌊":"lfloor","↼":"lharu","⇇":"llarr","⇋":"lrhar","⥎":"LeftRightVector","↤":"mapstoleft","⥚":"LeftTeeVector","⋋":"lthree","⧏":"LeftTriangleBar","⊲":"vltri","⊴":"ltrie","⥑":"LeftUpDownVector","⥠":"LeftUpTeeVector","⥘":"LeftUpVectorBar","↿":"uharl","⥒":"LeftVectorBar","⪋":"lEg","⋚":"leg","⩽":"les","⪨":"lescc","⩿":"lesdot","⪁":"lesdoto","⪃":"lesdotor","⋚︀":"lesg","⪓":"lesges","⋖":"ltdot","≶":"lg","⪡":"LessLess","≲":"lsim","⥼":"lfisht","𝔏":"Lfr","𝔩":"lfr","⪑":"lgE","⥢":"lHar","⥪":"lharul","▄":"lhblk","Љ":"LJcy","љ":"ljcy","≪":"ll","⋘":"Ll","⥫":"llhard","◺":"lltri","Ŀ":"Lmidot","ŀ":"lmidot","⎰":"lmoust","⪉":"lnap","⪇":"lne","≨":"lnE","⋦":"lnsim","⟬":"loang","⇽":"loarr","⟵":"xlarr","⟷":"xharr","⟼":"xmap","⟶":"xrarr","↬":"rarrlp","⦅":"lopar","𝕃":"Lopf","𝕝":"lopf","⨭":"loplus","⨴":"lotimes","∗":"lowast",_:"lowbar","↙":"swarr","↘":"searr","◊":"loz","(":"lpar","⦓":"lparlt","⥭":"lrhard","‎":"lrm","⊿":"lrtri","‹":"lsaquo","𝓁":"lscr","↰":"lsh","⪍":"lsime","⪏":"lsimg","‘":"lsquo","‚":"sbquo","Ł":"Lstrok","ł":"lstrok","⪦":"ltcc","⩹":"ltcir","<":"lt","⋉":"ltimes","⥶":"ltlarr","⩻":"ltquest","◃":"ltri","⦖":"ltrPar","⥊":"lurdshar","⥦":"luruhar","≨︀":"lvnE","¯":"macr","♂":"male","✠":"malt","⤅":"Map","↦":"map","↥":"mapstoup","▮":"marker","⨩":"mcomma","М":"Mcy","м":"mcy","—":"mdash","∺":"mDDot"," ":"MediumSpace","ℳ":"Mscr","𝔐":"Mfr","𝔪":"mfr","℧":"mho","µ":"micro","⫰":"midcir","∣":"mid","−":"minus","⨪":"minusdu","∓":"mp","⫛":"mlcp","⊧":"models","𝕄":"Mopf","𝕞":"mopf","𝓂":"mscr","Μ":"Mu","μ":"mu","⊸":"mumap","Ń":"Nacute","ń":"nacute","∠⃒":"nang","≉":"nap","⩰̸":"napE","≋̸":"napid","ʼn":"napos","♮":"natur","ℕ":"Nopf"," ":"nbsp","≎̸":"nbump","≏̸":"nbumpe","⩃":"ncap","Ň":"Ncaron","ň":"ncaron","Ņ":"Ncedil","ņ":"ncedil","≇":"ncong","⩭̸":"ncongdot","⩂":"ncup","Н":"Ncy","н":"ncy","–":"ndash","⤤":"nearhk","↗":"nearr","⇗":"neArr","≠":"ne","≐̸":"nedot","​":"ZeroWidthSpace","≢":"nequiv","⤨":"toea","≂̸":"nesim","\n":"NewLine","∄":"nexist","𝔑":"Nfr","𝔫":"nfr","≧̸":"ngE","≱":"nge","⩾̸":"nges","⋙̸":"nGg","≵":"ngsim","≫⃒":"nGt","≯":"ngt","≫̸":"nGtv","↮":"nharr","⇎":"nhArr","⫲":"nhpar","∋":"ni","⋼":"nis","⋺":"nisd","Њ":"NJcy","њ":"njcy","↚":"nlarr","⇍":"nlArr","‥":"nldr","≦̸":"nlE","≰":"nle","⩽̸":"nles","≮":"nlt","⋘̸":"nLl","≴":"nlsim","≪⃒":"nLt","⋪":"nltri","⋬":"nltrie","≪̸":"nLtv","∤":"nmid","⁠":"NoBreak","𝕟":"nopf","⫬":"Not","¬":"not","≭":"NotCupCap","∦":"npar","∉":"notin","≹":"ntgl","⋵̸":"notindot","⋹̸":"notinE","⋷":"notinvb","⋶":"notinvc","⧏̸":"NotLeftTriangleBar","≸":"ntlg","⪢̸":"NotNestedGreaterGreater","⪡̸":"NotNestedLessLess","∌":"notni","⋾":"notnivb","⋽":"notnivc","⊀":"npr","⪯̸":"npre","⋠":"nprcue","⧐̸":"NotRightTriangleBar","⋫":"nrtri","⋭":"nrtrie","⊏̸":"NotSquareSubset","⋢":"nsqsube","⊐̸":"NotSquareSuperset","⋣":"nsqsupe","⊂⃒":"vnsub","⊈":"nsube","⊁":"nsc","⪰̸":"nsce","⋡":"nsccue","≿̸":"NotSucceedsTilde","⊃⃒":"vnsup","⊉":"nsupe","≁":"nsim","≄":"nsime","⫽⃥":"nparsl","∂̸":"npart","⨔":"npolint","⤳̸":"nrarrc","↛":"nrarr","⇏":"nrArr","↝̸":"nrarrw","𝒩":"Nscr","𝓃":"nscr","⊄":"nsub","⫅̸":"nsubE","⊅":"nsup","⫆̸":"nsupE","Ñ":"Ntilde","ñ":"ntilde","Ν":"Nu","ν":"nu","#":"num","№":"numero"," ":"numsp","≍⃒":"nvap","⊬":"nvdash","⊭":"nvDash","⊮":"nVdash","⊯":"nVDash","≥⃒":"nvge",">⃒":"nvgt","⤄":"nvHarr","⧞":"nvinfin","⤂":"nvlArr","≤⃒":"nvle","<⃒":"nvlt","⊴⃒":"nvltrie","⤃":"nvrArr","⊵⃒":"nvrtrie","∼⃒":"nvsim","⤣":"nwarhk","↖":"nwarr","⇖":"nwArr","⤧":"nwnear","Ó":"Oacute","ó":"oacute","Ô":"Ocirc","ô":"ocirc","О":"Ocy","о":"ocy","Ő":"Odblac","ő":"odblac","⨸":"odiv","⦼":"odsold","Œ":"OElig","œ":"oelig","⦿":"ofcir","𝔒":"Ofr","𝔬":"ofr","˛":"ogon","Ò":"Ograve","ò":"ograve","⧁":"ogt","⦵":"ohbar","Ω":"ohm","⦾":"olcir","⦻":"olcross","‾":"oline","⧀":"olt","Ō":"Omacr","ō":"omacr","ω":"omega","Ο":"Omicron","ο":"omicron","⦶":"omid","𝕆":"Oopf","𝕠":"oopf","⦷":"opar","⦹":"operp","⩔":"Or","∨":"or","⩝":"ord","ℴ":"oscr","ª":"ordf","º":"ordm","⊶":"origof","⩖":"oror","⩗":"orslope","⩛":"orv","𝒪":"Oscr","Ø":"Oslash","ø":"oslash","⊘":"osol","Õ":"Otilde","õ":"otilde","⨶":"otimesas","⨷":"Otimes","Ö":"Ouml","ö":"ouml","⌽":"ovbar","⏞":"OverBrace","⎴":"tbrk","⏜":"OverParenthesis","¶":"para","⫳":"parsim","⫽":"parsl","∂":"part","П":"Pcy","п":"pcy","%":"percnt",".":"period","‰":"permil","‱":"pertenk","𝔓":"Pfr","𝔭":"pfr","Φ":"Phi","φ":"phi","ϕ":"phiv","☎":"phone","Π":"Pi","π":"pi","ϖ":"piv","ℎ":"planckh","⨣":"plusacir","⨢":"pluscir","+":"plus","⨥":"plusdu","⩲":"pluse","±":"pm","⨦":"plussim","⨧":"plustwo","⨕":"pointint","𝕡":"popf","ℙ":"Popf","£":"pound","⪷":"prap","⪻":"Pr","≺":"pr","≼":"prcue","⪯":"pre","≾":"prsim","⪹":"prnap","⪵":"prnE","⋨":"prnsim","⪳":"prE","′":"prime","″":"Prime","∏":"prod","⌮":"profalar","⌒":"profline","⌓":"profsurf","∝":"prop","⊰":"prurel","𝒫":"Pscr","𝓅":"pscr","Ψ":"Psi","ψ":"psi"," ":"puncsp","𝔔":"Qfr","𝔮":"qfr","𝕢":"qopf","ℚ":"Qopf","⁗":"qprime","𝒬":"Qscr","𝓆":"qscr","⨖":"quatint","?":"quest",'"':"quot","⇛":"rAarr","∽̱":"race","Ŕ":"Racute","ŕ":"racute","√":"Sqrt","⦳":"raemptyv","⟩":"rang","⟫":"Rang","⦒":"rangd","⦥":"range","»":"raquo","⥵":"rarrap","⇥":"rarrb","⤠":"rarrbfs","⤳":"rarrc","→":"rarr","↠":"Rarr","⤞":"rarrfs","⥅":"rarrpl","⥴":"rarrsim","⤖":"Rarrtl","↣":"rarrtl","↝":"rarrw","⤚":"ratail","⤜":"rAtail","∶":"ratio","❳":"rbbrk","}":"rcub","]":"rsqb","⦌":"rbrke","⦎":"rbrksld","⦐":"rbrkslu","Ř":"Rcaron","ř":"rcaron","Ŗ":"Rcedil","ŗ":"rcedil","⌉":"rceil","Р":"Rcy","р":"rcy","⤷":"rdca","⥩":"rdldhar","↳":"rdsh","ℜ":"Re","ℛ":"Rscr","ℝ":"Ropf","▭":"rect","⥽":"rfisht","⌋":"rfloor","𝔯":"rfr","⥤":"rHar","⇀":"rharu","⥬":"rharul","Ρ":"Rho","ρ":"rho","ϱ":"rhov","⇄":"rlarr","⟧":"robrk","⥝":"RightDownTeeVector","⥕":"RightDownVectorBar","⇉":"rrarr","⊢":"vdash","⥛":"RightTeeVector","⋌":"rthree","⧐":"RightTriangleBar","⊳":"vrtri","⊵":"rtrie","⥏":"RightUpDownVector","⥜":"RightUpTeeVector","⥔":"RightUpVectorBar","↾":"uharr","⥓":"RightVectorBar","˚":"ring","‏":"rlm","⎱":"rmoust","⫮":"rnmid","⟭":"roang","⇾":"roarr","⦆":"ropar","𝕣":"ropf","⨮":"roplus","⨵":"rotimes","⥰":"RoundImplies",")":"rpar","⦔":"rpargt","⨒":"rppolint","›":"rsaquo","𝓇":"rscr","↱":"rsh","⋊":"rtimes","▹":"rtri","⧎":"rtriltri","⧴":"RuleDelayed","⥨":"ruluhar","℞":"rx","Ś":"Sacute","ś":"sacute","⪸":"scap","Š":"Scaron","š":"scaron","⪼":"Sc","≻":"sc","≽":"sccue","⪰":"sce","⪴":"scE","Ş":"Scedil","ş":"scedil","Ŝ":"Scirc","ŝ":"scirc","⪺":"scnap","⪶":"scnE","⋩":"scnsim","⨓":"scpolint","≿":"scsim","С":"Scy","с":"scy","⋅":"sdot","⩦":"sdote","⇘":"seArr","§":"sect",";":"semi","⤩":"tosa","✶":"sext","𝔖":"Sfr","𝔰":"sfr","♯":"sharp","Щ":"SHCHcy","щ":"shchcy","Ш":"SHcy","ш":"shcy","↑":"uarr","­":"shy","Σ":"Sigma","σ":"sigma","ς":"sigmaf","∼":"sim","⩪":"simdot","≃":"sime","⪞":"simg","⪠":"simgE","⪝":"siml","⪟":"simlE","≆":"simne","⨤":"simplus","⥲":"simrarr","⨳":"smashp","⧤":"smeparsl","⌣":"smile","⪪":"smt","⪬":"smte","⪬︀":"smtes","Ь":"SOFTcy","ь":"softcy","⌿":"solbar","⧄":"solb","/":"sol","𝕊":"Sopf","𝕤":"sopf","♠":"spades","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊏":"sqsub","⊑":"sqsube","⊐":"sqsup","⊒":"sqsupe","□":"squ","𝒮":"Sscr","𝓈":"sscr","⋆":"Star","☆":"star","⊂":"sub","⋐":"Sub","⪽":"subdot","⫅":"subE","⊆":"sube","⫃":"subedot","⫁":"submult","⫋":"subnE","⊊":"subne","⪿":"subplus","⥹":"subrarr","⫇":"subsim","⫕":"subsub","⫓":"subsup","∑":"sum","♪":"sung","¹":"sup1","²":"sup2","³":"sup3","⊃":"sup","⋑":"Sup","⪾":"supdot","⫘":"supdsub","⫆":"supE","⊇":"supe","⫄":"supedot","⟉":"suphsol","⫗":"suphsub","⥻":"suplarr","⫂":"supmult","⫌":"supnE","⊋":"supne","⫀":"supplus","⫈":"supsim","⫔":"supsub","⫖":"supsup","⇙":"swArr","⤪":"swnwar","ß":"szlig"," ":"Tab","⌖":"target","Τ":"Tau","τ":"tau","Ť":"Tcaron","ť":"tcaron","Ţ":"Tcedil","ţ":"tcedil","Т":"Tcy","т":"tcy","⃛":"tdot","⌕":"telrec","𝔗":"Tfr","𝔱":"tfr","∴":"there4","Θ":"Theta","θ":"theta","ϑ":"thetav","  ":"ThickSpace"," ":"thinsp","Þ":"THORN","þ":"thorn","⨱":"timesbar","×":"times","⨰":"timesd","⌶":"topbot","⫱":"topcir","𝕋":"Topf","𝕥":"topf","⫚":"topfork","‴":"tprime","™":"trade","▵":"utri","≜":"trie","◬":"tridot","⨺":"triminus","⨹":"triplus","⧍":"trisb","⨻":"tritime","⏢":"trpezium","𝒯":"Tscr","𝓉":"tscr","Ц":"TScy","ц":"tscy","Ћ":"TSHcy","ћ":"tshcy","Ŧ":"Tstrok","ŧ":"tstrok","Ú":"Uacute","ú":"uacute","↟":"Uarr","⥉":"Uarrocir","Ў":"Ubrcy","ў":"ubrcy","Ŭ":"Ubreve","ŭ":"ubreve","Û":"Ucirc","û":"ucirc","У":"Ucy","у":"ucy","⇅":"udarr","Ű":"Udblac","ű":"udblac","⥮":"udhar","⥾":"ufisht","𝔘":"Ufr","𝔲":"ufr","Ù":"Ugrave","ù":"ugrave","⥣":"uHar","▀":"uhblk","⌜":"ulcorn","⌏":"ulcrop","◸":"ultri","Ū":"Umacr","ū":"umacr","⏟":"UnderBrace","⏝":"UnderParenthesis","⊎":"uplus","Ų":"Uogon","ų":"uogon","𝕌":"Uopf","𝕦":"uopf","⤒":"UpArrowBar","↕":"varr","υ":"upsi","ϒ":"Upsi","Υ":"Upsilon","⇈":"uuarr","⌝":"urcorn","⌎":"urcrop","Ů":"Uring","ů":"uring","◹":"urtri","𝒰":"Uscr","𝓊":"uscr","⋰":"utdot","Ũ":"Utilde","ũ":"utilde","Ü":"Uuml","ü":"uuml","⦧":"uwangle","⦜":"vangrt","⊊︀":"vsubne","⫋︀":"vsubnE","⊋︀":"vsupne","⫌︀":"vsupnE","⫨":"vBar","⫫":"Vbar","⫩":"vBarv","В":"Vcy","в":"vcy","⊩":"Vdash","⊫":"VDash","⫦":"Vdashl","⊻":"veebar","≚":"veeeq","⋮":"vellip","|":"vert","‖":"Vert","❘":"VerticalSeparator","≀":"wr","𝔙":"Vfr","𝔳":"vfr","𝕍":"Vopf","𝕧":"vopf","𝒱":"Vscr","𝓋":"vscr","⊪":"Vvdash","⦚":"vzigzag","Ŵ":"Wcirc","ŵ":"wcirc","⩟":"wedbar","≙":"wedgeq","℘":"wp","𝔚":"Wfr","𝔴":"wfr","𝕎":"Wopf","𝕨":"wopf","𝒲":"Wscr","𝓌":"wscr","𝔛":"Xfr","𝔵":"xfr","Ξ":"Xi","ξ":"xi","⋻":"xnis","𝕏":"Xopf","𝕩":"xopf","𝒳":"Xscr","𝓍":"xscr","Ý":"Yacute","ý":"yacute","Я":"YAcy","я":"yacy","Ŷ":"Ycirc","ŷ":"ycirc","Ы":"Ycy","ы":"ycy","¥":"yen","𝔜":"Yfr","𝔶":"yfr","Ї":"YIcy","ї":"yicy","𝕐":"Yopf","𝕪":"yopf","𝒴":"Yscr","𝓎":"yscr","Ю":"YUcy","ю":"yucy","ÿ":"yuml","Ÿ":"Yuml","Ź":"Zacute","ź":"zacute","Ž":"Zcaron","ž":"zcaron","З":"Zcy","з":"zcy","Ż":"Zdot","ż":"zdot","ℨ":"Zfr","Ζ":"Zeta","ζ":"zeta","𝔷":"zfr","Ж":"ZHcy","ж":"zhcy","⇝":"zigrarr","𝕫":"zopf","𝒵":"Zscr","𝓏":"zscr","‍":"zwj","‌":"zwnj"},f=/["&'<>`]/g,d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},p=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|iacute|Uacute|plusmn|otilde|Otilde|Agrave|agrave|yacute|Yacute|oslash|Oslash|Atilde|atilde|brvbar|Ccedil|ccedil|ograve|curren|divide|Eacute|eacute|Ograve|oacute|Egrave|egrave|ugrave|frac12|frac14|frac34|Ugrave|Oacute|Iacute|ntilde|Ntilde|uacute|middot|Igrave|igrave|iquest|aacute|laquo|THORN|micro|iexcl|icirc|Icirc|Acirc|ucirc|ecirc|Ocirc|ocirc|Ecirc|Ucirc|aring|Aring|aelig|AElig|acute|pound|raquo|acirc|times|thorn|szlig|cedil|COPY|Auml|ordf|ordm|uuml|macr|Uuml|auml|Ouml|ouml|para|nbsp|Euml|quot|QUOT|euml|yuml|cent|sect|copy|sup1|sup2|sup3|Iuml|iuml|shy|eth|reg|not|yen|amp|AMP|REG|uml|ETH|deg|gt|GT|LT|lt)([=a-zA-Z0-9])?/g,m={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},v={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},b={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,w={},k=w.hasOwnProperty,A=function(t,e){return k.call(t,e) -},E=function(t,e){for(var n=-1,r=t.length;++n=55296&&57343>=t||t>1114111?(e&&C("character reference outside the permissible Unicode range"),"�"):A(b,t)?(e&&C("disallowed character reference"),b[t]):(e&&E(_,t)&&C("disallowed character reference"),t>65535&&(t-=65536,n+=x(t>>>10&1023|55296),t=56320|1023&t),n+=x(t))},S=function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"},C=function(t){throw Error("Parse error: "+t)},T=function(t,e){e=D(e,T.options);var n=e.strict;n&&g.test(t)&&C("forbidden code point");var r=e.encodeEverything,i=e.useNamedReferences,a=e.allowUnsafeSymbols;return r?(t=t.replace(s,function(t){return i&&A(h,t)?"&"+h[t]+";":S(t)}),i&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(t=t.replace(l,function(t){return"&"+h[t]+";"}))):i?(a||(t=t.replace(f,function(t){return"&"+h[t]+";"})),t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),t=t.replace(l,function(t){return"&"+h[t]+";"})):a||(t=t.replace(f,S)),t.replace(u,function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),r=1024*(e-55296)+n-56320+65536;return"&#x"+r.toString(16).toUpperCase()+";"}).replace(c,S)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var F=function(t,e){e=D(e,F.options);var n=e.strict;return n&&p.test(t)&&C("malformed character reference"),t.replace(y,function(t,r,i,a,o,u,s,c){var l,h,f,d,p;return r?(l=r,h=i,n&&!h&&C("character reference was not terminated by a semicolon"),M(l,n)):a?(f=a,h=o,n&&!h&&C("character reference was not terminated by a semicolon"),l=parseInt(f,16),M(l,n)):u?(d=u,A(m,d)?m[d]:(n&&C("named character reference was not terminated by a semicolon"),t)):(d=s,p=c,p&&e.isAttributeValue?(n&&"="==p&&C("`&` did not start a character reference"),t):(n&&C("named character reference was not terminated by a semicolon"),v[d]+(p||"")))})};F.options={isAttributeValue:!1,strict:!1};var L=function(t){return t.replace(f,function(t){return d[t]})},B={version:"0.5.0",encode:T,decode:F,escape:L,unescape:F};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return B});else if(i&&!i.nodeType)if(a)a.exports=B;else for(var N in B)A(B,N)&&(i[N]=B[N]);else r.he=B}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r-1?0:-1:t?0:-1}function a(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:_+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function o(t){return t.charCodeAt(0)}function u(t,e){for(var n=t.criteria,r=e.criteria,i=-1,a=n.length;++iu||"undefined"==typeof o)return 1;if(u>o||"undefined"==typeof u)return-1}}return t.index-e.index}function s(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],o=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&o&&"object"==typeof o)return!1;var u=h();u["false"]=u["null"]=u["true"]=u.undefined=!1;var s=h();for(s.array=t,s.cache=u,s.push=a;++ei?0:i);++r=x&&a===r,c=[];if(u){var l=s(e);l?(a=i,e=l):u=!1}for(;++n-1:void 0});return i.pop(),a.pop(),v&&(f(i),f(a)),o}function ee(t,e,n,r,i){(Jr(e)?Xe:si)(e,function(e,a){var o,u,s=e,c=t[a];if(e&&((u=Jr(e))||ci(e))){for(var l=r.length;l--;)if(o=r[l]==e){c=i[l];break}if(!o){var h;n&&(s=n(c,e),(h="undefined"!=typeof s)&&(c=s)),h||(c=u?Jr(c)?c:[]:ci(c)?c:{}),r.push(e),i.push(c),h||ee(c,e,n,r,i)}}else n&&(s=n(c,e),"undefined"==typeof s&&(s=e)),"undefined"!=typeof s&&(c=s);t[a]=c})}function re(t,e){return t+Fr(Wr()*(e-t+1))}function ie(t,e,n){var a=-1,o=se(),u=t?t.length:0,c=[],h=!e&&u>=x&&o===r,p=n||h?l():c;if(h){var g=s(p);o=i,p=g}for(;++a3&&"function"==typeof e[n-2])var r=w(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var i=p(arguments,1,n),a=-1,o=l(),u=l();++an?Hr(0,a+n):n)||0,Jr(t)?o=i(t,e,n)>-1:"number"==typeof a?o=(Oe(t)?t.indexOf(e,n):i(t,e,n))>-1:si(t,function(t){return++r>=n?!(o=t===e):void 0}),o}function Ge(t,n,r){var i=!0;n=e.createCallback(n,r,3);var a=-1,o=t?t.length:0;if("number"==typeof o)for(;++aa&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);o>i&&(i=o,a=t)});return a}function en(t,n,r){var i=1/0,a=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Jr(t))for(var u=-1,s=t.length;++uc&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);i>o&&(i=o,a=t)});return a}function nn(t,n,r,i){if(!t)return r;var a=arguments.length<3;n=e.createCallback(n,i,4);var o=-1,u=t.length;if("number"==typeof u)for(a&&(r=t[++o]);++on?Hr(0,i+n):n||0}else if(n){var a=Mn(t,e);return t[a]===e?a:-1}return r(t,e,n)}function bn(t,n,r){var i=0,a=t?t.length:0;if("number"!=typeof n&&null!=n){var o=a;for(n=e.createCallback(n,r,3);o--&&n(t[o],o,t);)i++}else i=null==n||r?1:n||i;return p(t,0,Gr(Hr(0,a-i),a))}function _n(){for(var t=[],e=-1,n=arguments.length,a=l(),o=se(),u=o===r,c=l();++e=x&&s(e?t[e]:c)))}var p=t[0],g=-1,y=p?p.length:0,m=[];t:for(;++gn?Hr(0,r+n):Gr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function kn(t){for(var e=arguments,n=0,r=e.length,i=t?t.length:0;++na;){var u=a+o>>>1;r(t[u])1?arguments:arguments[0],e=-1,n=t?tn(di(t,"length")):0,r=pr(0>n?0:n);++e2?oe(t,17,p(arguments,2),null,e):oe(t,1,null,null,e)}function In(t){for(var e=arguments.length>1?Q(arguments,!0,!1,1):_e(t),n=-1,r=e.length;++n2?oe(e,19,p(arguments,2),null,t):oe(e,3,null,null,t)}function Rn(){for(var t=arguments,e=t.length;e--;)if(!Ce(t[e]))throw new kr;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Pn(t,e){return e="number"==typeof e?e:+e||t.length,oe(t,4,null,null,null,e)}function Un(t,e,n){var r,i,a,o,u,s,c,l=0,h=!1,f=!0;if(!Ce(t))throw new kr;if(e=Hr(0,e)||0,n===!0){var d=!0;f=!1}else Te(n)&&(d=n.leading,h="maxWait"in n&&(Hr(e,n.maxWait)||0),f="trailing"in n?n.trailing:f);var p=function(){var n=e-(gi()-o);if(0>=n){i&&Tr(i);var h=c;i=s=c=y,h&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))}else s=Ir(p,n)},g=function(){s&&Tr(s),i=s=c=y,(f||h!==e)&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))};return function(){if(r=arguments,o=gi(),u=this,c=f&&(s||!d),h===!1)var n=d&&!s;else{i||d||(l=o);var y=h-(o-l),m=0>=y;m?(i&&(i=Tr(i)),l=o,a=t.apply(u,r)):i||(i=Ir(g,y))}return m&&s?s=Tr(s):s||e===h||(s=Ir(p,e)),n&&(m=!0,a=t.apply(u,r)),!m||s||i||(r=u=null),a}}function Yn(t){if(!Ce(t))throw new kr;var e=p(arguments,1);return Ir(function(){t.apply(y,e)},1)}function jn(t,e){if(!Ce(t))throw new kr;var n=p(arguments,2);return Ir(function(){t.apply(y,n)},e)}function zn(t,e){if(!Ce(t))throw new kr;var n=function(){var r=n.cache,i=e?e.apply(this,arguments):_+arguments[0];return Nr.call(r,i)?r[i]:r[i]=t.apply(this,arguments)};return n.cache={},n}function Vn(t){var e,n;if(!Ce(t))throw new kr;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Hn(t){return oe(t,16,p(arguments,1))}function Gn(t){return oe(t,32,null,p(arguments,1))}function $n(t,e,n){var r=!0,i=!0;if(!Ce(t))throw new kr;return n===!1?r=!1:Te(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),$.leading=r,$.maxWait=e,$.trailing=i,Un(t,e,$)}function Wn(t,e){return oe(e,16,[t])}function Zn(t){return function(){return t}}function Xn(t,e,n){var r=typeof t;if(null==t||"function"==r)return w(t,e,n);if("object"!=r)return nr(t);var i=ti(t),a=i[0],o=t[a];return 1!=i.length||o!==o||Te(o)?function(e){for(var n=i.length,r=!1;n--&&(r=te(e[i[n]],t[i[n]],null,!0)););return r}:function(t){var e=t[a];return o===e&&(0!==o||1/o==1/e)}}function Kn(t){return null==t?"":wr(t).replace(ii,ue)}function Jn(t){return t}function Qn(t,r,i){var a=!0,o=r&&_e(r);r&&(i||o.length)||(null==i&&(i=r),u=n,r=t,t=e,o=_e(r)),i===!1?a=!1:Te(i)&&"chain"in i&&(a=i.chain);var u=t,s=Ce(u);Xe(o,function(e){var n=t[e]=r[e];s&&(u.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=[r];Or.apply(i,arguments);var o=n.apply(t,i);if(a||e){if(r===o&&Te(o))return this;o=new u(o),o.__chain__=e}return o})})}function tr(){return t._=Dr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,i=null==e;if(null==n&&("boolean"==typeof t&&i?(n=t,t=1):i||"boolean"!=typeof e||(n=e,i=!0)),r&&i&&(e=1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var a=Wr();return Gr(t+a*(e-t+parseFloat("1e-"+((a+"").length-1))),e)}return re(t,e)}function ir(t,e){if(t){var n=t[e];return Ce(n)?t[e]():n}}function ar(t,n,r){var i=e.templateSettings;t=wr(t||""),r=oi({},r,i);var a,o=oi({},r.imports,i.imports),u=ti(o),s=ze(o),l=0,h=r.interpolate||L,f="__p += '",d=xr((r.escape||L).source+"|"+h.source+"|"+(h===T?M:L).source+"|"+(r.evaluate||L).source+"|$","g");t.replace(d,function(e,n,r,i,o,u){return r||(r=i),f+=t.slice(l,u).replace(N,c),n&&(f+="' +\n__e("+n+") +\n'"),o&&(a=!0,f+="';\n"+o+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),f+="';\n";var p=r.variable,g=p;g||(p="obj",f="with ("+p+") {\n"+f+"\n}\n"),f=(a?f.replace(A,""):f).replace(E,"$1").replace(D,"$1;"),f="function("+p+") {\n"+(g?"":p+" || ("+p+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+I++ +"]")+"\n*/";try{var v=mr(u,"return "+f+m).apply(y,s)}catch(b){throw b.source=f,b}return n?v(n):(v.source=f,v)}function or(t,e,n){t=(t=+t)>-1?t:0;var r=-1,i=pr(t);for(e=w(e,n,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:e}},Ur||(v=function(){function e(){}return function(n){if(Te(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Kr=Pr?function(t,e){W.value=e,Pr(t,"__bindData__",W)}:er,Jr=Yr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Mr.call(t)==R||!1},Qr=function(t){var e,n=t,r=[];if(!n)return r;if(!Z[typeof t])return r;for(e in n)Nr.call(n,e)&&r.push(e);return r},ti=Vr?function(t){return Te(t)?Vr(t):[]}:Qr,ei={"&":"&","<":"<",">":">",'"':""","'":"'"},ni=we(ei),ri=xr("("+ti(ni).join("|")+")","g"),ii=xr("["+ti(ei).join("")+"]","g"),ai=function(t,e,n){var r,i=t,a=i;if(!i)return a;var o=arguments,u=0,s="number"==typeof n?2:o.length;if(s>3&&"function"==typeof o[s-2])var c=w(o[--s-1],o[s--],2);else s>2&&"function"==typeof o[s-1]&&(c=o[--s]);for(;++u/g,F=RegExp("^["+k+"]*0+(?=.$)"),L=/($^)/,B=/\bthis\b/,N=/['\n\r\t\u2028\u2029\\]/g,O=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],I=0,q="[object Arguments]",R="[object Array]",P="[object Boolean]",U="[object Date]",Y="[object Function]",j="[object Number]",z="[object Object]",V="[object RegExp]",H="[object String]",G={};G[Y]=!1,G[q]=G[R]=G[P]=G[U]=G[j]=G[z]=G[V]=G[H]=!0;var $={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},X={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},K=Z[typeof window]&&window||this,J=Z[typeof n]&&n&&!n.nodeType&&n,Q=Z[typeof e]&&e&&!e.nodeType&&e,te=Q&&Q.exports===J&&J,ee=Z[typeof t]&&t;!ee||ee.global!==ee&&ee.window!==ee||(K=ee);var ne=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(K._=ne,define(function(){return ne})):J&&Q?te?(Q.exports=ne)._=ne:J._=ne:K._=ne}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(t,e){(function(n){(function(r){function i(t,e,n){switch(arguments.length){case 2:return null!=t?t:e;case 3:return null!=t?t:null!=e?e:n;default:throw new Error("Implement me")}}function a(t,e){return Te.call(t,e)}function o(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function u(t){Ae.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function s(t,e){var n=!0;return m(function(){return n&&(u(t),n=!1),e.apply(this,arguments)},e)}function c(t,e){wn[t]||(u(e),wn[t]=!0)}function l(t,e){return function(n){return _(t.call(this,n),e)}}function h(t,e){return function(n){return this.localeData().ordinal(t.call(this,n),e)}}function f(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months"); -return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1,"months"),r=(e-a)/(n-a)),-(i+r)}function d(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function p(){}function g(t,e){e!==!1&&I(t),v(this,t),this._d=new Date(+t._d),An===!1&&(An=!0,Ae.updateOffset(this),An=!1)}function y(t){var e=C(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||0,o=e.day||0,u=e.hour||0,s=e.minute||0,c=e.second||0,l=e.millisecond||0;this._milliseconds=+l+1e3*c+6e4*s+36e5*u,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=Ae.localeData(),this._bubble()}function m(t,e){for(var n in e)a(e,n)&&(t[n]=e[n]);return a(e,"toString")&&(t.toString=e.toString),a(e,"valueOf")&&(t.valueOf=e.valueOf),t}function v(t,e){var n,r,i;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Pe.length>0)for(n in Pe)r=Pe[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function b(t){return 0>t?Math.ceil(t):Math.floor(t)}function _(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.lengthr;r++)(n&&t[r]!==e[r]||!n&&F(t[r])!==F(e[r]))&&o++;return o+a}function S(t){if(t){var e=t.toLowerCase().replace(/(.)s$/,"$1");t=gn[t]||yn[e]||e}return t}function C(t){var e,n,r={};for(n in t)a(t,n)&&(e=S(n),e&&(r[e]=t[n]));return r}function T(t){var e,n;if(0===t.indexOf("week"))e=7,n="day";else{if(0!==t.indexOf("month"))return;e=12,n="month"}Ae[t]=function(i,a){var o,u,s=Ae._locale[t],c=[];if("number"==typeof i&&(a=i,i=r),u=function(t){var e=Ae().utc().set(n,t);return s.call(Ae._locale,e,i||"")},null!=a)return u(a);for(o=0;e>o;o++)c.push(u(o));return c}}function F(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function L(t,e){return new Date(Date.UTC(t,e+1,0)).getUTCDate()}function B(t,e,n){return fe(Ae([t,11,31+e-n]),e,n).week}function N(t){return O(t)?366:365}function O(t){return t%4===0&&t%100!==0||t%400===0}function I(t){var e;t._a&&-2===t._pf.overflow&&(e=t._a[Le]<0||t._a[Le]>11?Le:t._a[Be]<1||t._a[Be]>L(t._a[Fe],t._a[Le])?Be:t._a[Ne]<0||t._a[Ne]>24||24===t._a[Ne]&&(0!==t._a[Oe]||0!==t._a[Ie]||0!==t._a[qe])?Ne:t._a[Oe]<0||t._a[Oe]>59?Oe:t._a[Ie]<0||t._a[Ie]>59?Ie:t._a[qe]<0||t._a[qe]>999?qe:-1,t._pf._overflowDayOfYear&&(Fe>e||e>Be)&&(e=Be),t._pf.overflow=e)}function q(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&t._pf.bigHour===r)),t._isValid}function R(t){return t?t.toLowerCase().replace("_","-"):t}function P(t){for(var e,n,r,i,a=0;a0;){if(r=U(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&M(i,n,!0)>=e-1)break;e--}a++}return null}function U(e){var n=null;if(!Re[e]&&Ue)try{n=Ae.locale(),t("./locale/"+e),Ae.locale(n)}catch(r){}return Re[e]}function Y(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(Ae.isMoment(t)||D(t)?+t:+Ae(t))-+n,n._d.setTime(+n._d+r),Ae.updateOffset(n,!1),n):Ae(t).local()}function j(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function z(t){var e,n,r=t.match(Ve);for(e=0,n=r.length;n>e;e++)r[e]=xn[r[e]]?xn[r[e]]:j(r[e]);return function(i){var a="";for(e=0;n>e;e++)a+=r[e]instanceof Function?r[e].call(i,t):r[e];return a}}function V(t,e){return t.isValid()?(e=H(e,t.localeData()),mn[e]||(mn[e]=z(e)),mn[e](t)):t.localeData().invalidDate()}function H(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(He.lastIndex=0;r>=0&&He.test(t);)t=t.replace(He,n),He.lastIndex=0,r-=1;return t}function G(t,e){var n,r=e._strict;switch(t){case"Q":return nn;case"DDDD":return an;case"YYYY":case"GGGG":case"gggg":return r?on:We;case"Y":case"G":case"g":return sn;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return r?un:Ze;case"S":if(r)return nn;case"SS":if(r)return rn;case"SSS":if(r)return an;case"DDD":return $e;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return Ke;case"a":case"A":return e._locale._meridiemParse;case"x":return tn;case"X":return en;case"Z":case"ZZ":return Je;case"T":return Qe;case"SSSS":return Xe;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return r?rn:Ge;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return Ge;case"Do":return r?e._locale._ordinalParse:e._locale._ordinalParseLenient;default:return n=new RegExp(ee(te(t.replace("\\","")),"i"))}}function $(t){t=t||"";var e=t.match(Je)||[],n=e[e.length-1]||[],r=(n+"").match(dn)||["-",0,0],i=+(60*r[1])+F(r[2]);return"+"===r[0]?i:-i}function W(t,e,n){var r,i=n._a;switch(t){case"Q":null!=e&&(i[Le]=3*(F(e)-1));break;case"M":case"MM":null!=e&&(i[Le]=F(e)-1);break;case"MMM":case"MMMM":r=n._locale.monthsParse(e,t,n._strict),null!=r?i[Le]=r:n._pf.invalidMonth=e;break;case"D":case"DD":null!=e&&(i[Be]=F(e));break;case"Do":null!=e&&(i[Be]=F(parseInt(e.match(/\d{1,2}/)[0],10)));break;case"DDD":case"DDDD":null!=e&&(n._dayOfYear=F(e));break;case"YY":i[Fe]=Ae.parseTwoDigitYear(e);break;case"YYYY":case"YYYYY":case"YYYYYY":i[Fe]=F(e);break;case"a":case"A":n._meridiem=e;break;case"h":case"hh":n._pf.bigHour=!0;case"H":case"HH":i[Ne]=F(e);break;case"m":case"mm":i[Oe]=F(e);break;case"s":case"ss":i[Ie]=F(e);break;case"S":case"SS":case"SSS":case"SSSS":i[qe]=F(1e3*("0."+e));break;case"x":n._d=new Date(F(e));break;case"X":n._d=new Date(1e3*parseFloat(e));break;case"Z":case"ZZ":n._useUTC=!0,n._tzm=$(e);break;case"dd":case"ddd":case"dddd":r=n._locale.weekdaysParse(e),null!=r?(n._w=n._w||{},n._w.d=r):n._pf.invalidWeekday=e;break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":t=t.substr(0,1);case"gggg":case"GGGG":case"GGGGG":t=t.substr(0,2),e&&(n._w=n._w||{},n._w[t]=F(e));break;case"gg":case"GG":n._w=n._w||{},n._w[t]=Ae.parseTwoDigitYear(e)}}function Z(t){var e,n,r,a,o,u,s;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(o=1,u=4,n=i(e.GG,t._a[Fe],fe(Ae(),1,4).year),r=i(e.W,1),a=i(e.E,1)):(o=t._locale._week.dow,u=t._locale._week.doy,n=i(e.gg,t._a[Fe],fe(Ae(),o,u).year),r=i(e.w,1),null!=e.d?(a=e.d,o>a&&++r):a=null!=e.e?e.e+o:o),s=de(n,r,a,u,o),t._a[Fe]=s.year,t._dayOfYear=s.dayOfYear}function X(t){var e,n,r,a,o=[];if(!t._d){for(r=J(t),t._w&&null==t._a[Be]&&null==t._a[Le]&&Z(t),t._dayOfYear&&(a=i(t._a[Fe],r[Fe]),t._dayOfYear>N(a)&&(t._pf._overflowDayOfYear=!0),n=se(a,0,t._dayOfYear),t._a[Le]=n.getUTCMonth(),t._a[Be]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=o[e]=r[e];for(;7>e;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[Ne]&&0===t._a[Oe]&&0===t._a[Ie]&&0===t._a[qe]&&(t._nextDay=!0,t._a[Ne]=0),t._d=(t._useUTC?se:ue).apply(null,o),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[Ne]=24)}}function K(t){var e;t._d||(e=C(t._i),t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],X(t))}function J(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function Q(t){if(t._f===Ae.ISO_8601)return void re(t);t._a=[],t._pf.empty=!0;var e,n,i,a,o,u=""+t._i,s=u.length,c=0;for(i=H(t._f,t._locale).match(Ve)||[],e=0;e0&&t._pf.unusedInput.push(o),u=u.slice(u.indexOf(n)+n.length),c+=n.length),xn[a]?(n?t._pf.empty=!1:t._pf.unusedTokens.push(a),W(a,n,t)):t._strict&&!n&&t._pf.unusedTokens.push(a);t._pf.charsLeftOver=s-c,u.length>0&&t._pf.unusedInput.push(u),t._pf.bigHour===!0&&t._a[Ne]<=12&&(t._pf.bigHour=r),t._a[Ne]=d(t._locale,t._a[Ne],t._meridiem),X(t),I(t)}function te(t){return t.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i})}function ee(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function ne(t){var e,n,r,i,a;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(i=0;ia)&&(r=a,n=e));m(t,n||e)}function re(t){var e,n,r=t._i,i=cn.exec(r);if(i){for(t._pf.iso=!0,e=0,n=hn.length;n>e;e++)if(hn[e][1].exec(r)){t._f=hn[e][0]+(i[6]||" ");break}for(e=0,n=fn.length;n>e;e++)if(fn[e][1].exec(r)){t._f+=fn[e][0];break}r.match(Je)&&(t._f+="Z"),Q(t)}else t._isValid=!1}function ie(t){re(t),t._isValid===!1&&(delete t._isValid,Ae.createFromInputFallback(t))}function ae(t,e){var n,r=[];for(n=0;nt&&u.setFullYear(t),u}function se(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ce(t,e){if("string"==typeof t)if(isNaN(t)){if(t=e.weekdaysParse(t),"number"!=typeof t)return null}else t=parseInt(t,10);return t}function le(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function he(t,e,n){var r=Ae.duration(t).abs(),i=Ce(r.as("s")),a=Ce(r.as("m")),o=Ce(r.as("h")),u=Ce(r.as("d")),s=Ce(r.as("M")),c=Ce(r.as("y")),l=i0,l[4]=n,le.apply({},l)}function fe(t,e,n){var r,i=n-e,a=n-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Ae(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function de(t,e,n,r,i){var a,o,u=se(t,0,1).getUTCDay();return u=0===u?7:u,n=null!=n?n:i,a=i-u+(u>r?7:0)-(i>u?7:0),o=7*(e-1)+(n-i)+a+1,{year:o>0?t:t-1,dayOfYear:o>0?o:N(t-1)+o}}function pe(t){var e,n=t._i,i=t._f;return t._locale=t._locale||Ae.localeData(t._l),null===n||i===r&&""===n?Ae.invalid({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),Ae.isMoment(n)?new g(n,!0):(i?E(i)?ne(t):Q(t):oe(t),e=new g(t),e._nextDay&&(e.add(1,"d"),e._nextDay=r),e))}function ge(t,e){var n,r;if(1===e.length&&E(e[0])&&(e=e[0]),!e.length)return Ae();for(n=e[0],r=1;r=0?"+":"-";return e+_(Math.abs(t),6)},gg:function(){return _(this.weekYear()%100,2)},gggg:function(){return _(this.weekYear(),4)},ggggg:function(){return _(this.weekYear(),5)},GG:function(){return _(this.isoWeekYear()%100,2)},GGGG:function(){return _(this.isoWeekYear(),4)},GGGGG:function(){return _(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!0)},A:function(){return this.localeData().meridiem(this.hours(),this.minutes(),!1)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return F(this.milliseconds()/100)},SS:function(){return _(F(this.milliseconds()/10),2)},SSS:function(){return _(this.milliseconds(),3)},SSSS:function(){return _(this.milliseconds(),3)},Z:function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+_(F(t/60),2)+":"+_(F(t)%60,2)},ZZ:function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+_(F(t/60),2)+_(F(t)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},x:function(){return this.valueOf()},X:function(){return this.unix()},Q:function(){return this.quarter()}},wn={},kn=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"],An=!1;bn.length;)De=bn.pop(),xn[De+"o"]=h(xn[De],De);for(;_n.length;)De=_n.pop(),xn[De+De]=l(xn[De],2);xn.DDDD=l(xn.DDD,3),m(p.prototype,{set:function(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(t){return this._months[t.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(t){return this._monthsShort[t.month()]},monthsParse:function(t,e,n){var r,i,a;for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=Ae.utc([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(t){return this._weekdays[t.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(t){return this._weekdaysShort[t.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(t){return this._weekdaysMin[t.day()]},weekdaysParse:function(t){var e,n,r;for(this._weekdaysParse||(this._weekdaysParse=[]),e=0;7>e;e++)if(this._weekdaysParse[e]||(n=Ae([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e},_longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},longDateFormat:function(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e},isPM:function(t){return"p"===(t+"").toLowerCase().charAt(0)},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.apply(e,[n]):r},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)},pastFuture:function(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)},ordinal:function(t){return this._ordinal.replace("%d",t)},_ordinal:"%d",_ordinalParse:/\d{1,2}/,preparse:function(t){return t},postformat:function(t){return t},week:function(t){return fe(t,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},firstDayOfWeek:function(){return this._week.dow},firstDayOfYear:function(){return this._week.doy},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}}),Ae=function(t,e,n,i){var a;return"boolean"==typeof n&&(i=n,n=r),a={},a._isAMomentObject=!0,a._i=t,a._f=e,a._l=n,a._strict=i,a._isUTC=!1,a._pf=o(),pe(a)},Ae.suppressDeprecationWarnings=!1,Ae.createFromInputFallback=s("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),Ae.min=function(){var t=[].slice.call(arguments,0);return ge("isBefore",t)},Ae.max=function(){var t=[].slice.call(arguments,0);return ge("isAfter",t)},Ae.utc=function(t,e,n,i){var a;return"boolean"==typeof n&&(i=n,n=r),a={},a._isAMomentObject=!0,a._useUTC=!0,a._isUTC=!0,a._l=n,a._i=t,a._f=e,a._strict=i,a._pf=o(),pe(a).utc()},Ae.unix=function(t){return Ae(1e3*t)},Ae.duration=function(t,e){var n,r,i,o,u=t,s=null;return Ae.isDuration(t)?u={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(u={},e?u[e]=t:u.milliseconds=t):(s=je.exec(t))?(n="-"===s[1]?-1:1,u={y:0,d:F(s[Be])*n,h:F(s[Ne])*n,m:F(s[Oe])*n,s:F(s[Ie])*n,ms:F(s[qe])*n}):(s=ze.exec(t))?(n="-"===s[1]?-1:1,i=function(t){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*n},u={y:i(s[2]),M:i(s[3]),d:i(s[4]),h:i(s[5]),m:i(s[6]),s:i(s[7]),w:i(s[8])}):null==u?u={}:"object"==typeof u&&("from"in u||"to"in u)&&(o=w(Ae(u.from),Ae(u.to)),u={},u.ms=o.milliseconds,u.M=o.months),r=new y(u),Ae.isDuration(t)&&a(t,"_locale")&&(r._locale=t._locale),r},Ae.version=Me,Ae.defaultFormat=ln,Ae.ISO_8601=function(){},Ae.momentProperties=Pe,Ae.updateOffset=function(){},Ae.relativeTimeThreshold=function(t,e){return vn[t]===r?!1:e===r?vn[t]:(vn[t]=e,!0)},Ae.lang=s("moment.lang is deprecated. Use moment.locale instead.",function(t,e){return Ae.locale(t,e)}),Ae.locale=function(t,e){var n;return t&&(n="undefined"!=typeof e?Ae.defineLocale(t,e):Ae.localeData(t),n&&(Ae.duration._locale=Ae._locale=n)),Ae._locale._abbr},Ae.defineLocale=function(t,e){return null!==e?(e.abbr=t,Re[t]||(Re[t]=new p),Re[t].set(e),Ae.locale(t),Re[t]):(delete Re[t],null)},Ae.langData=s("moment.langData is deprecated. Use moment.localeData instead.",function(t){return Ae.localeData(t)}),Ae.localeData=function(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ae._locale;if(!E(t)){if(e=U(t))return e;t=[t]}return P(t)},Ae.isMoment=function(t){return t instanceof g||null!=t&&a(t,"_isAMomentObject")},Ae.isDuration=function(t){return t instanceof y};for(De=kn.length-1;De>=0;--De)T(kn[De]);Ae.normalizeUnits=function(t){return S(t)},Ae.invalid=function(t){var e=Ae.utc(0/0);return null!=t?m(e._pf,t):e._pf.userInvalidated=!0,e},Ae.parseZone=function(){return Ae.apply(null,arguments).parseZone()},Ae.parseTwoDigitYear=function(t){return F(t)+(F(t)>68?1900:2e3)},Ae.isDate=D,m(Ae.fn=g.prototype,{clone:function(){return Ae(this)},valueOf:function(){return+this._d-6e4*(this._offset||0)},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var t=Ae(this).utc();return 00:!1},parsingFlags:function(){return m({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(t){return this.utcOffset(0,t)},local:function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(this._dateUtcOffset(),"m")),this},format:function(t){var e=V(this,t||Ae.defaultFormat);return this.localeData().postformat(e)},add:k(1,"add"),subtract:k(-1,"subtract"),diff:function(t,e,n){var r,i,a=Y(t,this),o=6e4*(a.utcOffset()-this.utcOffset());return e=S(e),"year"===e||"month"===e||"quarter"===e?(i=f(this,a),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-a,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-o)/864e5:"week"===e?(r-o)/6048e5:r),n?i:b(i)},from:function(t,e){return Ae.duration({to:this,from:t}).locale(this.locale()).humanize(!e)},fromNow:function(t){return this.from(Ae(),t)},calendar:function(t){var e=t||Ae(),n=Y(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Ae(e)))},isLeapYear:function(){return O(this.year())},isDST:function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},day:function(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=ce(t,this.localeData()),this.add(t-e,"d")):e},month:be("Month",!0),startOf:function(t){switch(t=S(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.weekday(0):"isoWeek"===t&&this.isoWeekday(1),"quarter"===t&&this.month(3*Math.floor(this.month()/3)),this},endOf:function(t){return t=S(t),t===r||"millisecond"===t?this:this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms")},isAfter:function(t,e){var n;return e=S("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=Ae.isMoment(t)?t:Ae(t),+this>+t):(n=Ae.isMoment(t)?+t:+Ae(t),n<+this.clone().startOf(e))},isBefore:function(t,e){var n;return e=S("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=Ae.isMoment(t)?t:Ae(t),+t>+this):(n=Ae.isMoment(t)?+t:+Ae(t),+this.clone().endOf(e)t?this:t}),max:s("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(t){return t=Ae.apply(null,arguments),t>this?this:t}),zone:s("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),utcOffset:function(t,e){var n,r=this._offset||0;return null!=t?("string"==typeof t&&(t=$(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(n=this._dateUtcOffset()),this._offset=t,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==t&&(!e||this._changeInProgress?A(this,Ae.duration(t-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,Ae.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:this._dateUtcOffset()},isLocal:function(){return!this._isUTC},isUtcOffset:function(){return this._isUTC},isUtc:function(){return this._isUTC&&0===this._offset},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset($(this._i)),this},hasAlignedHourOffset:function(t){return t=t?Ae(t).utcOffset():0,(this.utcOffset()-t)%60===0},daysInMonth:function(){return L(this.year(),this.month())},dayOfYear:function(t){var e=Ce((Ae(this).startOf("day")-Ae(this).startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},quarter:function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},weekYear:function(t){var e=fe(this,this.localeData()._week.dow,this.localeData()._week.doy).year;return null==t?e:this.add(t-e,"y")},isoWeekYear:function(t){var e=fe(this,1,4).year;return null==t?e:this.add(t-e,"y")},week:function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},isoWeek:function(t){var e=fe(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},weekday:function(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},isoWeekday:function(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)},isoWeeksInYear:function(){return B(this.year(),1,4)},weeksInYear:function(){var t=this.localeData()._week;return B(this.year(),t.dow,t.doy)},get:function(t){return t=S(t),this[t]()},set:function(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else t=S(t),"function"==typeof this[t]&&this[t](e);return this},locale:function(t){var e;return t===r?this._locale._abbr:(e=Ae.localeData(t),null!=e&&(this._locale=e),this)},lang:s("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return t===r?this.localeData():this.locale(t)}),localeData:function(){return this._locale},_dateUtcOffset:function(){return 15*-Math.round(this._d.getTimezoneOffset()/15)}}),Ae.fn.millisecond=Ae.fn.milliseconds=be("Milliseconds",!1),Ae.fn.second=Ae.fn.seconds=be("Seconds",!1),Ae.fn.minute=Ae.fn.minutes=be("Minutes",!1),Ae.fn.hour=Ae.fn.hours=be("Hours",!0),Ae.fn.date=be("Date",!0),Ae.fn.dates=s("dates accessor is deprecated. Use date instead.",be("Date",!0)),Ae.fn.year=be("FullYear",!0),Ae.fn.years=s("years accessor is deprecated. Use year instead.",be("FullYear",!0)),Ae.fn.days=Ae.fn.day,Ae.fn.months=Ae.fn.month,Ae.fn.weeks=Ae.fn.week,Ae.fn.isoWeeks=Ae.fn.isoWeek,Ae.fn.quarters=Ae.fn.quarter,Ae.fn.toJSON=Ae.fn.toISOString,Ae.fn.isUTC=Ae.fn.isUtc,m(Ae.duration.fn=y.prototype,{_bubble:function(){var t,e,n,r=this._milliseconds,i=this._days,a=this._months,o=this._data,u=0;o.milliseconds=r%1e3,t=b(r/1e3),o.seconds=t%60,e=b(t/60),o.minutes=e%60,n=b(e/60),o.hours=n%24,i+=b(n/24),u=b(_e(i)),i-=b(xe(u)),a+=b(i/30),i%=30,u+=b(a/12),a%=12,o.days=i,o.months=a,o.years=u},abs:function(){return this._milliseconds=Math.abs(this._milliseconds),this._days=Math.abs(this._days),this._months=Math.abs(this._months),this._data.milliseconds=Math.abs(this._data.milliseconds),this._data.seconds=Math.abs(this._data.seconds),this._data.minutes=Math.abs(this._data.minutes),this._data.hours=Math.abs(this._data.hours),this._data.months=Math.abs(this._data.months),this._data.years=Math.abs(this._data.years),this},weeks:function(){return b(this.days()/7)},valueOf:function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12)},humanize:function(t){var e=he(this,!t,this.localeData());return t&&(e=this.localeData().pastFuture(+this,e)),this.localeData().postformat(e)},add:function(t,e){var n=Ae.duration(t,e);return this._milliseconds+=n._milliseconds,this._days+=n._days,this._months+=n._months,this._bubble(),this},subtract:function(t,e){var n=Ae.duration(t,e);return this._milliseconds-=n._milliseconds,this._days-=n._days,this._months-=n._months,this._bubble(),this},get:function(t){return t=S(t),this[t.toLowerCase()+"s"]()},as:function(t){var e,n;if(t=S(t),"month"===t||"year"===t)return e=this._days+this._milliseconds/864e5,n=this._months+12*_e(e),"month"===t?n:n/12;switch(e=this._days+Math.round(xe(this._months/12)),t){case"week":return e/7+this._milliseconds/6048e5;case"day":return e+this._milliseconds/864e5;case"hour":return 24*e+this._milliseconds/36e5;case"minute":return 24*e*60+this._milliseconds/6e4; -case"second":return 24*e*60*60+this._milliseconds/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+this._milliseconds;default:throw new Error("Unknown unit "+t)}},lang:Ae.fn.lang,locale:Ae.fn.locale,toIsoString:s("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",function(){return this.toISOString()}),toISOString:function(){var t=Math.abs(this.years()),e=Math.abs(this.months()),n=Math.abs(this.days()),r=Math.abs(this.hours()),i=Math.abs(this.minutes()),a=Math.abs(this.seconds()+this.milliseconds()/1e3);return this.asSeconds()?(this.asSeconds()<0?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"},localeData:function(){return this._locale},toJSON:function(){return this.toISOString()}}),Ae.duration.fn.toString=Ae.duration.fn.toISOString;for(De in pn)a(pn,De)&&we(De.toLowerCase());Ae.duration.fn.asMilliseconds=function(){return this.as("ms")},Ae.duration.fn.asSeconds=function(){return this.as("s")},Ae.duration.fn.asMinutes=function(){return this.as("m")},Ae.duration.fn.asHours=function(){return this.as("h")},Ae.duration.fn.asDays=function(){return this.as("d")},Ae.duration.fn.asWeeks=function(){return this.as("weeks")},Ae.duration.fn.asMonths=function(){return this.as("M")},Ae.duration.fn.asYears=function(){return this.as("y")},Ae.locale("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===F(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),Ue?e.exports=Ae:"function"==typeof define&&define.amd?(define(function(t,e,n){return n.config&&n.config()&&n.config().noGlobal===!0&&(Se.moment=Ee),Ae}),ke(!0)):ke()}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],k=[10,28,37,57,58],A=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(k,A,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(k,[2,48]),e(k,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(k,[2,51],{45:[1,86]}),e(k,[2,52]),e(k,[2,56]),e(k,[2,57]),e(k,[2,58]),e(k,[2,59]),e(k,[2,60]),e(k,[2,61]),e(k,[2,62]),e(k,[2,63]),e(k,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(k,A,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(k,[2,55]),{10:[1,94]},e(k,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(k,[2,54]),{5:[2,3]},e(k,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(k,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; -if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],k=[1,40],A=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:k,89:A,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; -case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),k=[];r=a.duration(x-_).asDays();for(var A=0;Ah&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,k,A,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(A in o[x])this.terminals_[A]&&A>h&&M.push("'"+this.terminals_[A]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),k=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof k)return k;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) -},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init(mermaid.sequenceConfig):e.mermaid.init(mermaid.sequenceConfig))},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file +!function(){var define=void 0;!function t(e,n,r){function i(o,u){if(!n[o]){if(!e[o]){var s="function"==typeof require&&require;if(!u&&s)return s(o,!0);if(a)return a(o,!0);throw new Error("Cannot find module '"+o+"'")}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return i(n?n:t)},c,c.exports,t,e,n,r)}return n[o].exports}for(var a="function"==typeof require&&require,o=0;ot?-1:t>e?1:t>=e?0:0/0}function n(t){return null===t?0/0:+t}function r(t){return!isNaN(t)}function i(t){return{left:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=e.length);i>r;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}function a(t){return t.length}function o(t){for(var e=1;t*e%1;)e*=10;return e}function u(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}function s(){this._=Object.create(null)}function c(t){return(t+="")===hu||t[0]===fu?fu+t:t}function l(t){return(t+="")[0]===fu?t.slice(1):t}function h(t){return c(t)in this._}function f(t){return(t=c(t))in this._&&delete this._[t]}function d(){var t=[];for(var e in this._)t.push(l(e));return t}function p(){var t=0;for(var e in this._)++t;return t}function g(){for(var t in this._)return!1;return!0}function y(){this._=Object.create(null)}function m(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function v(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=du.length;r>n;++n){var i=du[n]+e;if(i in t)return i}}function b(){}function _(){}function x(t){function e(){for(var e,r=n,i=-1,a=r.length;++in;n++)for(var i,a=t[n],o=0,u=a.length;u>o;o++)(i=a[o])&&e(i,o,n);return t}function Y(t){return gu(t,wu),t}function j(t){var e,n;return function(r,i,a){var o,u=t[a].update,s=u.length;for(a!=n&&(n=a,e=0),i>=e&&(e=i+1);!(o=u[e])&&++e0&&(t=t.slice(0,u));var c=ku.get(t);return c&&(t=c,s=G),u?e?i:r:e?b:a}function H(t,e){return function(n){var r=Xo.event;Xo.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{Xo.event=r}}}function G(t,e){var n=H(t,e);return function(t){var e=this,r=t.relatedTarget;r&&(r===e||8&r.compareDocumentPosition(e))||n.call(e,t)}}function $(){var t=".dragsuppress-"+ ++Du,e="click"+t,n=Xo.select(eu).on("touchmove"+t,w).on("dragstart"+t,w).on("selectstart"+t,w);if(Eu){var r=tu.style,i=r[Eu];r[Eu]="none"}return function(a){function o(){n.on(e,null)}n.on(t,null),Eu&&(r[Eu]=i),a&&(n.on(e,function(){w(),o()},!0),setTimeout(o,0))}}function W(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(0>Mu&&(eu.scrollX||eu.scrollY)){n=Xo.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=n[0][0].getScreenCTM();Mu=!(i.f||i.e),n.remove()}return Mu?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var a=t.getBoundingClientRect();return[e.clientX-a.left-t.clientLeft,e.clientY-a.top-t.clientTop]}function Z(){return Xo.event.changedTouches[0].identifier}function X(){return Xo.event.target}function K(){return eu}function J(t){return t>0?1:0>t?-1:0}function Q(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function te(t){return t>1?0:-1>t?Su:Math.acos(t)}function ee(t){return t>1?Tu:-1>t?-Tu:Math.asin(t)}function ne(t){return((t=Math.exp(t))-1/t)/2}function re(t){return((t=Math.exp(t))+1/t)/2}function ie(t){return((t=Math.exp(2*t))-1)/(t+1)}function ae(t){return(t=Math.sin(t/2))*t}function oe(){}function ue(t,e,n){return this instanceof ue?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof ue?new ue(t.h,t.s,t.l):xe(""+t,we,ue):new ue(t,e,n)}function se(t,e,n){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?a+(o-a)*t/60:180>t?o:240>t?a+(o-a)*(240-t)/60:a}function i(t){return Math.round(255*r(t))}var a,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)?0:0>e?0:e>1?1:e,n=0>n?0:n>1?1:n,o=.5>=n?n*(1+e):n+e-n*e,a=2*n-o,new me(i(t+120),i(t),i(t-120))}function ce(t,e,n){return this instanceof ce?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof ce?new ce(t.h,t.c,t.l):t instanceof he?de(t.l,t.a,t.b):de((t=Ae((t=Xo.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ce(t,e,n)}function le(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new he(n,Math.cos(t*=Bu)*e,Math.sin(t)*e)}function he(t,e,n){return this instanceof he?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof he?new he(t.l,t.a,t.b):t instanceof ce?le(t.h,t.c,t.l):Ae((t=me(t)).r,t.g,t.b):new he(t,e,n)}function fe(t,e,n){var r=(t+16)/116,i=r+e/500,a=r-n/200;return i=pe(i)*Vu,r=pe(r)*Hu,a=pe(a)*Gu,new me(ye(3.2404542*i-1.5371385*r-.4985314*a),ye(-.969266*i+1.8760108*r+.041556*a),ye(.0556434*i-.2040259*r+1.0572252*a))}function de(t,e,n){return t>0?new ce(Math.atan2(n,e)*Nu,Math.sqrt(e*e+n*n),t):new ce(0/0,0/0,t)}function pe(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ge(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function ye(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function me(t,e,n){return this instanceof me?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof me?new me(t.r,t.g,t.b):xe(""+t,me,se):new me(t,e,n)}function ve(t){return new me(t>>16,t>>8&255,255&t)}function be(t){return ve(t)+""}function _e(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function xe(t,e,n){var r,i,a,o=0,u=0,s=0;if(r=/([a-z]+)\((.*)\)/i.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return n(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return e(Ee(i[0]),Ee(i[1]),Ee(i[2]))}return(a=Zu.get(t))?e(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&a)>>4,o=o>>4|o,u=240&a,u=u>>4|u,s=15&a,s=s<<4|s):7===t.length&&(o=(16711680&a)>>16,u=(65280&a)>>8,s=255&a)),e(o,u,s))}function we(t,e,n){var r,i,a=Math.min(t/=255,e/=255,n/=255),o=Math.max(t,e,n),u=o-a,s=(o+a)/2;return u?(i=.5>s?u/(o+a):u/(2-o-a),r=t==o?(e-n)/u+(n>e?6:0):e==o?(n-t)/u+2:(t-e)/u+4,r*=60):(r=0/0,i=s>0&&1>s?0:r),new ue(r,i,s)}function Ae(t,e,n){t=ke(t),e=ke(e),n=ke(n);var r=ge((.4124564*t+.3575761*e+.1804375*n)/Vu),i=ge((.2126729*t+.7151522*e+.072175*n)/Hu),a=ge((.0193339*t+.119192*e+.9503041*n)/Gu);return he(116*i-16,500*(r-i),200*(i-a))}function ke(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Ee(t){var e=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*e):e}function De(t){return"function"==typeof t?t:function(){return t}}function Me(t){return t}function Se(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),Ce(e,n,t,r)}}function Ce(t,e,n,r){function i(){var t,e=s.status;if(!e&&Fe(s)||e>=200&&300>e||304===e){try{t=n.call(a,s)}catch(r){return void o.error.call(a,r)}o.load.call(a,t)}else o.error.call(a,s)}var a={},o=Xo.dispatch("beforesend","progress","load","error"),u={},s=new XMLHttpRequest,c=null;return!eu.XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=i:s.onreadystatechange=function(){s.readyState>3&&i()},s.onprogress=function(t){var e=Xo.event;Xo.event=t;try{o.progress.call(a,s)}finally{Xo.event=e}},a.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",a)},a.mimeType=function(t){return arguments.length?(e=null==t?null:t+"",a):e},a.responseType=function(t){return arguments.length?(c=t,a):c},a.response=function(t){return n=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(Jo(arguments)))}}),a.send=function(n,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(n,t,!0),null==e||"accept"in u||(u.accept=e+",*/*"),s.setRequestHeader)for(var l in u)s.setRequestHeader(l,u[l]);return null!=e&&s.overrideMimeType&&s.overrideMimeType(e),null!=c&&(s.responseType=c),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),o.beforesend.call(a,s),s.send(null==r?null:r),a},a.abort=function(){return s.abort(),a},Xo.rebind(a,o,"on"),null==r?a:a.get(Te(r))}function Te(t){return 1===t.length?function(e,n){t(null==e?n:null)}:t}function Fe(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function Le(){var t=Be(),e=Ne()-t;e>24?(isFinite(e)&&(clearTimeout(Qu),Qu=setTimeout(Le,e)),Ju=0):(Ju=1,es(Le))}function Be(){var t=Date.now();for(ts=Xu;ts;)t>=ts.t&&(ts.f=ts.c(t-ts.t)),ts=ts.n;return t}function Ne(){for(var t,e=Xu,n=1/0;e;)e.f?e=t?t.n=e.n:Xu=e.n:(e.t8?function(t){return t/n}:function(t){return t*n},symbol:t}}function qe(t){var e=t.decimal,n=t.thousands,r=t.grouping,i=t.currency,a=r&&n?function(t,e){for(var i=t.length,a=[],o=0,u=r[0],s=0;i>0&&u>0&&(s+u+1>e&&(u=Math.max(1,e-s)),a.push(t.substring(i-=u,i+u)),!((s+=u+1)>e));)u=r[o=(o+1)%r.length];return a.reverse().join(n)}:Me;return function(t){var n=rs.exec(t),r=n[1]||" ",o=n[2]||">",u=n[3]||"-",s=n[4]||"",c=n[5],l=+n[6],h=n[7],f=n[8],d=n[9],p=1,g="",y="",m=!1,v=!0;switch(f&&(f=+f.substring(1)),(c||"0"===r&&"="===o)&&(c=r="0",o="="),d){case"n":h=!0,d="g";break;case"%":p=100,y="%",d="f";break;case"p":p=100,y="%",d="r";break;case"b":case"o":case"x":case"X":"#"===s&&(g="0"+d.toLowerCase());case"c":v=!1;case"d":m=!0,f=0;break;case"s":p=-1,d="r"}"$"===s&&(g=i[0],y=i[1]),"r"!=d||f||(d="g"),null!=f&&("g"==d?f=Math.max(1,Math.min(21,f)):("e"==d||"f"==d)&&(f=Math.max(0,Math.min(20,f)))),d=is.get(d)||Re;var b=c&&h;return function(t){var n=y;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===u?"":u;if(0>p){var s=Xo.formatPrefix(t,f);t=s.scale(t),n=s.symbol+y}else t*=p;t=d(t,f);var _,x,w=t.lastIndexOf(".");if(0>w){var A=v?t.lastIndexOf("e"):-1;0>A?(_=t,x=""):(_=t.substring(0,A),x=t.substring(A))}else _=t.substring(0,w),x=e+t.substring(w+1);!c&&h&&(_=a(_,1/0));var k=g.length+_.length+x.length+(b?0:i.length),E=l>k?new Array(k=l-k+1).join(r):"";return b&&(_=a(E+_,E.length?l-x.length:1/0)),i+=g,t=_+x,("<"===o?i+t+E:">"===o?E+i+t:"^"===o?E.substring(0,k>>=1)+i+t+E.substring(k):i+(b?t:E+t))+n}}}function Re(t){return t+""}function Pe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ue(t,e,n){function r(e){var n=t(e),r=a(n,1);return r-e>e-n?n:r}function i(n){return e(n=t(new os(n-1)),1),n}function a(t,n){return e(t=new os(+t),n),t}function o(t,r,a){var o=i(t),u=[];if(a>1)for(;r>o;)n(o)%a||u.push(new Date(+o)),e(o,1);else for(;r>o;)u.push(new Date(+o)),e(o,1);return u}function u(t,e,n){try{os=Pe;var r=new Pe;return r._=t,o(r,e,n)}finally{os=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=a,t.range=o;var s=t.utc=Ye(t);return s.floor=s,s.round=Ye(r),s.ceil=Ye(i),s.offset=Ye(a),s.range=u,t}function Ye(t){return function(e,n){try{os=Pe;var r=new Pe;return r._=e,t(r,n)._}finally{os=Date}}}function je(t){function e(t){function e(e){for(var n,i,a,o=[],u=-1,s=0;++uu;){if(r>=c)return-1;if(i=e.charCodeAt(u++),37===i){if(o=e.charAt(u++),a=C[o in ss?e.charAt(u++):o],!a||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}function r(t,e,n){w.lastIndex=0;var r=w.exec(e.slice(n));return r?(t.w=A.get(r[0].toLowerCase()),n+r[0].length):-1}function i(t,e,n){_.lastIndex=0;var r=_.exec(e.slice(n));return r?(t.w=x.get(r[0].toLowerCase()),n+r[0].length):-1}function a(t,e,n){D.lastIndex=0;var r=D.exec(e.slice(n));return r?(t.m=M.get(r[0].toLowerCase()),n+r[0].length):-1}function o(t,e,n){k.lastIndex=0;var r=k.exec(e.slice(n));return r?(t.m=E.get(r[0].toLowerCase()),n+r[0].length):-1}function u(t,e,r){return n(t,S.c.toString(),e,r)}function s(t,e,r){return n(t,S.x.toString(),e,r)}function c(t,e,r){return n(t,S.X.toString(),e,r)}function l(t,e,n){var r=b.get(e.slice(n,n+=2).toLowerCase());return null==r?-1:(t.p=r,n)}var h=t.dateTime,f=t.date,d=t.time,p=t.periods,g=t.days,y=t.shortDays,m=t.months,v=t.shortMonths;e.utc=function(t){function n(t){try{os=Pe;var e=new os;return e._=t,r(e)}finally{os=Date}}var r=e(t);return n.parse=function(t){try{os=Pe;var e=r.parse(t);return e&&e._}finally{os=Date}},n.toString=r.toString,n},e.multi=e.utc.multi=cn;var b=Xo.map(),_=Ve(g),x=He(g),w=Ve(y),A=He(y),k=Ve(m),E=He(m),D=Ve(v),M=He(v);p.forEach(function(t,e){b.set(t.toLowerCase(),e)});var S={a:function(t){return y[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return v[t.getMonth()]},B:function(t){return m[t.getMonth()]},c:e(h),d:function(t,e){return ze(t.getDate(),e,2)},e:function(t,e){return ze(t.getDate(),e,2)},H:function(t,e){return ze(t.getHours(),e,2)},I:function(t,e){return ze(t.getHours()%12||12,e,2)},j:function(t,e){return ze(1+as.dayOfYear(t),e,3)},L:function(t,e){return ze(t.getMilliseconds(),e,3)},m:function(t,e){return ze(t.getMonth()+1,e,2)},M:function(t,e){return ze(t.getMinutes(),e,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,e){return ze(t.getSeconds(),e,2)},U:function(t,e){return ze(as.sundayOfYear(t),e,2)},w:function(t){return t.getDay()},W:function(t,e){return ze(as.mondayOfYear(t),e,2)},x:e(f),X:e(d),y:function(t,e){return ze(t.getFullYear()%100,e,2)},Y:function(t,e){return ze(t.getFullYear()%1e4,e,4)},Z:un,"%":function(){return"%"}},C={a:r,A:i,b:a,B:o,c:u,d:tn,e:tn,H:nn,I:nn,j:en,L:on,m:Qe,M:rn,p:l,S:an,U:$e,w:Ge,W:We,x:s,X:c,y:Xe,Y:Ze,Z:Ke,"%":sn};return e}function ze(t,e,n){var r=0>t?"-":"",i=(r?-t:t)+"",a=i.length;return r+(n>a?new Array(n-a+1).join(e)+i:i)}function Ve(t){return new RegExp("^(?:"+t.map(Xo.requote).join("|")+")","i")}function He(t){for(var e=new s,n=-1,r=t.length;++n68?1900:2e3)}function Qe(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function tn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function en(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function nn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function rn(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function an(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function on(t,e,n){cs.lastIndex=0;var r=cs.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function un(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=lu(e)/60|0,i=lu(e)%60;return n+ze(r,"0",2)+ze(i,"0",2)}function sn(t,e,n){ls.lastIndex=0;var r=ls.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function cn(t){for(var e=t.length,n=-1;++n=0?1:-1,u=o*n,s=Math.cos(e),c=Math.sin(e),l=a*c,h=i*s+l*Math.cos(u),f=l*o*Math.sin(u);ys.add(Math.atan2(f,h)),r=t,i=s,a=c}var e,n,r,i,a;ms.point=function(o,u){ms.point=t,r=(e=o)*Bu,i=Math.cos(u=(n=u)*Bu/2+Su/4),a=Math.sin(u)},ms.lineEnd=function(){t(e,n)}}function yn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function mn(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function vn(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function bn(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function _n(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xn(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function wn(t){return[Math.atan2(t[1],t[0]),ee(t[2])]}function An(t,e){return lu(t[0]-e[0])u;++u)i.point((n=t[u])[0],n[1]);return void i.lineEnd()}var s=new Ln(n,t,null,!0),c=new Ln(n,null,s,!1);s.o=c,a.push(s),o.push(c),s=new Ln(r,t,null,!1),c=new Ln(r,null,s,!0),s.o=c,a.push(s),o.push(c)}}),o.sort(e),Fn(a),Fn(o),a.length){for(var u=0,s=n,c=o.length;c>u;++u)o[u].e=s=!s;for(var l,h,f=a[0];;){for(var d=f,p=!0;d.v;)if((d=d.n)===f)return;l=d.z,i.lineStart();do{if(d.v=d.o.v=!0,d.e){if(p)for(var u=0,c=l.length;c>u;++u)i.point((h=l[u])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p){l=d.p.z;for(var u=l.length-1;u>=0;--u)i.point((h=l[u])[0],h[1])}else r(d.x,d.p.x,-1,i);d=d.p}d=d.o,l=d.z,p=!p}while(!d.v);i.lineEnd()}}}function Fn(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r0){for(x||(a.polygonStart(),x=!0),a.lineStart();++o1&&2&e&&n.push(n.pop().concat(n.shift())),d.push(n.filter(Nn))}var d,p,g,y=e(a),m=i.invert(r[0],r[1]),v={point:o,lineStart:s,lineEnd:c,polygonStart:function(){v.point=l,v.lineStart=h,v.lineEnd=f,d=[],p=[]},polygonEnd:function(){v.point=o,v.lineStart=s,v.lineEnd=c,d=Xo.merge(d);var t=Un(m,p);d.length?(x||(a.polygonStart(),x=!0),Tn(d,In,t,n,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}},b=On(),_=e(b),x=!1;return v}}function Nn(t){return t.length>1}function On(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(e,n){t.push([e,n])},lineEnd:b,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function In(t,e){return((t=t.x)[0]<0?t[1]-Tu-Fu:Tu-t[1])-((e=e.x)[0]<0?e[1]-Tu-Fu:Tu-e[1])}function qn(t){var e,n=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var u=a>0?Su:-Su,s=lu(a-n);lu(s-Su)0?Tu:-Tu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(a,r),e=0):i!==u&&s>=Su&&(lu(n-i)Fu?Math.atan((Math.sin(e)*(a=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(e))*Math.sin(t))/(i*a*o)):(e+r)/2}function Pn(t,e,n,r){var i;if(null==t)i=n*Tu,r.point(-Su,i),r.point(0,i),r.point(Su,i),r.point(Su,0),r.point(Su,-i),r.point(0,-i),r.point(-Su,-i),r.point(-Su,0),r.point(-Su,i);else if(lu(t[0]-e[0])>Fu){var a=t[0]u;++u){var c=e[u],l=c.length;if(l)for(var h=c[0],f=h[0],d=h[1]/2+Su/4,p=Math.sin(d),g=Math.cos(d),y=1;;){y===l&&(y=0),t=c[y];var m=t[0],v=t[1]/2+Su/4,b=Math.sin(v),_=Math.cos(v),x=m-f,w=x>=0?1:-1,A=w*x,k=A>Su,E=p*b;if(ys.add(Math.atan2(E*w*Math.sin(A),g*_+E*Math.cos(A))),a+=k?x+w*Cu:x,k^f>=n^m>=n){var D=vn(yn(h),yn(t));xn(D);var M=vn(i,D);xn(M);var S=(k^x>=0?-1:1)*ee(M[2]);(r>S||r===S&&(D[0]||D[1]))&&(o+=k^x>=0?1:-1)}if(!y++)break;f=m,p=b,g=_,h=t}}return(-Fu>a||Fu>a&&0>ys)^1&o}function Yn(t){function e(t,e){return Math.cos(t)*Math.cos(e)>a}function n(t){var n,a,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(h,f){var d,p=[h,f],g=e(h,f),y=o?g?0:i(h,f):g?i(h+(0>h?Su:-Su),f):0;if(!n&&(c=s=g)&&t.lineStart(),g!==s&&(d=r(n,p),(An(n,d)||An(p,d))&&(p[0]+=Fu,p[1]+=Fu,g=e(p[0],p[1]))),g!==s)l=0,g?(t.lineStart(),d=r(p,n),t.point(d[0],d[1])):(d=r(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(u&&n&&o^g){var m;y&a||!(m=r(p,n,!0))||(l=0,o?(t.lineStart(),t.point(m[0][0],m[0][1]),t.point(m[1][0],m[1][1]),t.lineEnd()):(t.point(m[1][0],m[1][1]),t.lineEnd(),t.lineStart(),t.point(m[0][0],m[0][1])))}!g||n&&An(n,p)||t.point(p[0],p[1]),n=p,s=g,a=y},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return l|(c&&s)<<1}}}function r(t,e,n){var r=yn(t),i=yn(e),o=[1,0,0],u=vn(r,i),s=mn(u,u),c=u[0],l=s-c*c;if(!l)return!n&&t;var h=a*s/l,f=-a*c/l,d=vn(o,u),p=_n(o,h),g=_n(u,f);bn(p,g);var y=d,m=mn(p,y),v=mn(y,y),b=m*m-v*(mn(p,p)-1);if(!(0>b)){var _=Math.sqrt(b),x=_n(y,(-m-_)/v);if(bn(x,p),x=wn(x),!n)return x;var w,A=t[0],k=e[0],E=t[1],D=e[1];A>k&&(w=A,A=k,k=w);var M=k-A,S=lu(M-Su)M;if(!S&&E>D&&(w=E,E=D,D=w),C?S?E+D>0^x[1]<(lu(x[0]-A)Su^(A<=x[0]&&x[0]<=k)){var T=_n(y,(-m+_)/v);return bn(T,p),[x,wn(T)]}}}function i(e,n){var r=o?t:Su-t,i=0;return-r>e?i|=1:e>r&&(i|=2),-r>n?i|=4:n>r&&(i|=8),i}var a=Math.cos(t),o=a>0,u=lu(a)>Fu,s=gr(t,6*Bu);return Bn(e,n,s,o?[0,-t]:[-Su,t-Su])}function jn(t,e,n,r){return function(i){var a,o=i.a,u=i.b,s=o.x,c=o.y,l=u.x,h=u.y,f=0,d=1,p=l-s,g=h-c;if(a=t-s,p||!(a>0)){if(a/=p,0>p){if(f>a)return;d>a&&(d=a)}else if(p>0){if(a>d)return;a>f&&(f=a)}if(a=n-s,p||!(0>a)){if(a/=p,0>p){if(a>d)return;a>f&&(f=a)}else if(p>0){if(f>a)return;d>a&&(d=a)}if(a=e-c,g||!(a>0)){if(a/=g,0>g){if(f>a)return;d>a&&(d=a)}else if(g>0){if(a>d)return;a>f&&(f=a)}if(a=r-c,g||!(0>a)){if(a/=g,0>g){if(a>d)return;a>f&&(f=a)}else if(g>0){if(f>a)return;d>a&&(d=a)}return f>0&&(i.a={x:s+f*p,y:c+f*g}),1>d&&(i.b={x:s+d*p,y:c+d*g}),i}}}}}}function zn(t,e,n,r){function i(r,i){return lu(r[0]-t)0?0:3:lu(r[0]-n)0?2:1:lu(r[1]-e)0?1:0:i>0?3:2}function a(t,e){return o(t.x,e.x)}function o(t,e){var n=i(t,1),r=i(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(u){function s(t){for(var e=0,n=y.length,r=t[1],i=0;n>i;++i)for(var a,o=1,u=y[i],s=u.length,c=u[0];s>o;++o)a=u[o],c[1]<=r?a[1]>r&&Q(c,a,t)>0&&++e:a[1]<=r&&Q(c,a,t)<0&&--e,c=a;return 0!==e}function c(a,u,s,c){var l=0,h=0;if(null==a||(l=i(a,s))!==(h=i(u,s))||o(a,u)<0^s>0){do c.point(0===l||3===l?t:n,l>1?r:e);while((l=(l+s+4)%4)!==h)}else c.point(u[0],u[1])}function l(i,a){return i>=t&&n>=i&&a>=e&&r>=a}function h(t,e){l(t,e)&&u.point(t,e)}function f(){C.point=p,y&&y.push(m=[]),k=!0,A=!1,x=w=0/0}function d(){g&&(p(v,b),_&&A&&M.rejoin(),g.push(M.buffer())),C.point=h,A&&u.lineEnd()}function p(t,e){t=Math.max(-Fs,Math.min(Fs,t)),e=Math.max(-Fs,Math.min(Fs,e));var n=l(t,e);if(y&&m.push([t,e]),k)v=t,b=e,_=n,k=!1,n&&(u.lineStart(),u.point(t,e));else if(n&&A)u.point(t,e);else{var r={a:{x:x,y:w},b:{x:t,y:e}};S(r)?(A||(u.lineStart(),u.point(r.a.x,r.a.y)),u.point(r.b.x,r.b.y),n||u.lineEnd(),E=!1):n&&(u.lineStart(),u.point(t,e),E=!1)}x=t,w=e,A=n}var g,y,m,v,b,_,x,w,A,k,E,D=u,M=On(),S=jn(t,e,n,r),C={point:h,lineStart:f,lineEnd:d,polygonStart:function(){u=M,g=[],y=[],E=!0},polygonEnd:function(){u=D,g=Xo.merge(g);var e=s([t,r]),n=E&&e,i=g.length;(n||i)&&(u.polygonStart(),n&&(u.lineStart(),c(null,null,1,u),u.lineEnd()),i&&Tn(g,a,e,c,u),u.polygonEnd()),g=y=m=null}};return C}}function Vn(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return n=e.invert(n,r),n&&t.invert(n[0],n[1])}),n}function Hn(t){var e=0,n=Su/3,r=ur(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*Su/180,n=t[1]*Su/180):[e/Su*180,n/Su*180]},i}function Gn(t,e){function n(t,e){var n=Math.sqrt(a-2*i*Math.sin(e))/i;return[n*Math.sin(t*=i),o-n*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(e))/2,a=1+r*(2*i-r),o=Math.sqrt(a)/i;return n.invert=function(t,e){var n=o-e;return[Math.atan2(t,n)/i,ee((a-(t*t+n*n)*i*i)/(2*i))]},n}function $n(){function t(t,e){Bs+=i*t-r*e,r=t,i=e}var e,n,r,i;Rs.point=function(a,o){Rs.point=t,e=r=a,n=i=o},Rs.lineEnd=function(){t(e,n)}}function Wn(t,e){Ns>t&&(Ns=t),t>Is&&(Is=t),Os>e&&(Os=e),e>qs&&(qs=e)}function Zn(){function t(t,e){o.push("M",t,",",e,a)}function e(t,e){o.push("M",t,",",e),u.point=n}function n(t,e){o.push("L",t,",",e)}function r(){u.point=t}function i(){o.push("Z")}var a=Xn(4.5),o=[],u={point:t,lineStart:function(){u.point=e},lineEnd:r,polygonStart:function(){u.lineEnd=i},polygonEnd:function(){u.lineEnd=r,u.point=t},pointRadius:function(t){return a=Xn(t),u},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return u}function Xn(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Kn(t,e){_s+=t,xs+=e,++ws}function Jn(){function t(t,r){var i=t-e,a=r-n,o=Math.sqrt(i*i+a*a);As+=o*(e+t)/2,ks+=o*(n+r)/2,Es+=o,Kn(e=t,n=r)}var e,n;Us.point=function(r,i){Us.point=t,Kn(e=r,n=i)}}function Qn(){Us.point=Kn}function tr(){function t(t,e){var n=t-r,a=e-i,o=Math.sqrt(n*n+a*a);As+=o*(r+t)/2,ks+=o*(i+e)/2,Es+=o,o=i*t-r*e,Ds+=o*(r+t),Ms+=o*(i+e),Ss+=3*o,Kn(r=t,i=e)}var e,n,r,i;Us.point=function(a,o){Us.point=t,Kn(e=r=a,n=i=o)},Us.lineEnd=function(){t(e,n)}}function er(t){function e(e,n){t.moveTo(e,n),t.arc(e,n,o,0,Cu)}function n(e,n){t.moveTo(e,n),u.point=r}function r(e,n){t.lineTo(e,n)}function i(){u.point=e}function a(){t.closePath()}var o=4.5,u={point:e,lineStart:function(){u.point=n},lineEnd:i,polygonStart:function(){u.lineEnd=a},polygonEnd:function(){u.lineEnd=i,u.point=e},pointRadius:function(t){return o=t,u},result:b};return u}function nr(t){function e(t){return(u?r:n)(t)}function n(e){return ar(e,function(n,r){n=t(n,r),e.point(n[0],n[1])})}function r(e){function n(n,r){n=t(n,r),e.point(n[0],n[1])}function r(){b=0/0,k.point=a,e.lineStart()}function a(n,r){var a=yn([n,r]),o=t(n,r);i(b,_,v,x,w,A,b=o[0],_=o[1],v=n,x=a[0],w=a[1],A=a[2],u,e),e.point(b,_)}function o(){k.point=n,e.lineEnd()}function s(){r(),k.point=c,k.lineEnd=l +}function c(t,e){a(h=t,f=e),d=b,p=_,g=x,y=w,m=A,k.point=a}function l(){i(b,_,v,x,w,A,d,p,h,g,y,m,u,e),k.lineEnd=o,o()}var h,f,d,p,g,y,m,v,b,_,x,w,A,k={point:n,lineStart:r,lineEnd:o,polygonStart:function(){e.polygonStart(),k.lineStart=s},polygonEnd:function(){e.polygonEnd(),k.lineStart=r}};return k}function i(e,n,r,u,s,c,l,h,f,d,p,g,y,m){var v=l-e,b=h-n,_=v*v+b*b;if(_>4*a&&y--){var x=u+d,w=s+p,A=c+g,k=Math.sqrt(x*x+w*w+A*A),E=Math.asin(A/=k),D=lu(lu(A)-1)a||lu((v*T+b*F)/_-.5)>.3||o>u*d+s*p+c*g)&&(i(e,n,r,u,s,c,S,C,D,x/=k,w/=k,A,y,m),m.point(S,C),i(S,C,D,x,w,A,l,h,f,d,p,g,y,m))}}var a=.5,o=Math.cos(30*Bu),u=16;return e.precision=function(t){return arguments.length?(u=(a=t*t)>0&&16,e):Math.sqrt(a)},e}function rr(t){var e=nr(function(e,n){return t([e*Nu,n*Nu])});return function(t){return sr(e(t))}}function ir(t){this.stream=t}function ar(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function or(t){return ur(function(){return t})()}function ur(t){function e(t){return t=u(t[0]*Bu,t[1]*Bu),[t[0]*f+s,c-t[1]*f]}function n(t){return t=u.invert((t[0]-s)/f,(c-t[1])/f),t&&[t[0]*Nu,t[1]*Nu]}function r(){u=Vn(o=hr(m,v,b),a);var t=a(g,y);return s=d-t[0]*f,c=p+t[1]*f,i()}function i(){return l&&(l.valid=!1,l=null),e}var a,o,u,s,c,l,h=nr(function(t,e){return t=a(t,e),[t[0]*f+s,c-t[1]*f]}),f=150,d=480,p=250,g=0,y=0,m=0,v=0,b=0,_=Ts,x=Me,w=null,A=null;return e.stream=function(t){return l&&(l.valid=!1),l=sr(_(o,h(x(t)))),l.valid=!0,l},e.clipAngle=function(t){return arguments.length?(_=null==t?(w=t,Ts):Yn((w=+t)*Bu),i()):w},e.clipExtent=function(t){return arguments.length?(A=t,x=t?zn(t[0][0],t[0][1],t[1][0],t[1][1]):Me,i()):A},e.scale=function(t){return arguments.length?(f=+t,r()):f},e.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},e.center=function(t){return arguments.length?(g=t[0]%360*Bu,y=t[1]%360*Bu,r()):[g*Nu,y*Nu]},e.rotate=function(t){return arguments.length?(m=t[0]%360*Bu,v=t[1]%360*Bu,b=t.length>2?t[2]%360*Bu:0,r()):[m*Nu,v*Nu,b*Nu]},Xo.rebind(e,h,"precision"),function(){return a=t.apply(this,arguments),e.invert=a.invert&&n,r()}}function sr(t){return ar(t,function(e,n){t.point(e*Bu,n*Bu)})}function cr(t,e){return[t,e]}function lr(t,e){return[t>Su?t-Cu:-Su>t?t+Cu:t,e]}function hr(t,e,n){return t?e||n?Vn(dr(t),pr(e,n)):dr(t):e||n?pr(e,n):lr}function fr(t){return function(e,n){return e+=t,[e>Su?e-Cu:-Su>e?e+Cu:e,n]}}function dr(t){var e=fr(t);return e.invert=fr(-t),e}function pr(t,e){function n(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*r+u*i;return[Math.atan2(s*a-l*o,u*r-c*i),ee(l*a+s*o)]}var r=Math.cos(t),i=Math.sin(t),a=Math.cos(e),o=Math.sin(e);return n.invert=function(t,e){var n=Math.cos(e),u=Math.cos(t)*n,s=Math.sin(t)*n,c=Math.sin(e),l=c*a-s*o;return[Math.atan2(s*a+c*o,u*r+l*i),ee(l*r-u*i)]},n}function gr(t,e){var n=Math.cos(t),r=Math.sin(t);return function(i,a,o,u){var s=o*e;null!=i?(i=yr(n,i),a=yr(n,a),(o>0?a>i:i>a)&&(i+=o*Cu)):(i=t+o*Cu,a=t-.5*s);for(var c,l=i;o>0?l>a:a>l;l-=s)u.point((c=wn([n,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function yr(t,e){var n=yn(e);n[0]-=t,xn(n);var r=te(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Fu)%(2*Math.PI)}function mr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[t,e]})}}function vr(t,e,n){var r=Xo.range(t,e-Fu,n).concat(e);return function(t){return r.map(function(e){return[e,t]})}}function br(t){return t.source}function _r(t){return t.target}function xr(t,e,n,r){var i=Math.cos(e),a=Math.sin(e),o=Math.cos(r),u=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),l=o*Math.cos(n),h=o*Math.sin(n),f=2*Math.asin(Math.sqrt(ae(r-e)+i*o*ae(n-t))),d=1/Math.sin(f),p=f?function(t){var e=Math.sin(t*=f)*d,n=Math.sin(f-t)*d,r=n*s+e*l,i=n*c+e*h,o=n*a+e*u;return[Math.atan2(i,r)*Nu,Math.atan2(o,Math.sqrt(r*r+i*i))*Nu]}:function(){return[t*Nu,e*Nu]};return p.distance=f,p}function wr(){function t(t,i){var a=Math.sin(i*=Bu),o=Math.cos(i),u=lu((t*=Bu)-e),s=Math.cos(u);Ys+=Math.atan2(Math.sqrt((u=o*Math.sin(u))*u+(u=r*a-n*o*s)*u),n*a+r*o*s),e=t,n=a,r=o}var e,n,r;js.point=function(i,a){e=i*Bu,n=Math.sin(a*=Bu),r=Math.cos(a),js.point=t},js.lineEnd=function(){js.point=js.lineEnd=b}}function Ar(t,e){function n(e,n){var r=Math.cos(e),i=Math.cos(n),a=t(r*i);return[a*i*Math.sin(e),a*Math.sin(n)]}return n.invert=function(t,n){var r=Math.sqrt(t*t+n*n),i=e(r),a=Math.sin(i),o=Math.cos(i);return[Math.atan2(t*a,r*o),Math.asin(r&&n*a/r)]},n}function kr(t,e){function n(t,e){o>0?-Tu+Fu>e&&(e=-Tu+Fu):e>Tu-Fu&&(e=Tu-Fu);var n=o/Math.pow(i(e),a);return[n*Math.sin(a*t),o-n*Math.cos(a*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Su/4+t/2)},a=t===e?Math.sin(t):Math.log(r/Math.cos(e))/Math.log(i(e)/i(t)),o=r*Math.pow(i(t),a)/a;return a?(n.invert=function(t,e){var n=o-e,r=J(a)*Math.sqrt(t*t+n*n);return[Math.atan2(t,n)/a,2*Math.atan(Math.pow(o/r,1/a))-Tu]},n):Dr}function Er(t,e){function n(t,e){var n=a-e;return[n*Math.sin(i*t),a-n*Math.cos(i*t)]}var r=Math.cos(t),i=t===e?Math.sin(t):(r-Math.cos(e))/(e-t),a=r/i+t;return lu(i)i;i++){for(;r>1&&Q(t[n[r-2]],t[n[r-1]],t[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function Lr(t,e){return t[0]-e[0]||t[1]-e[1]}function Br(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Nr(t,e,n,r){var i=t[0],a=n[0],o=e[0]-i,u=r[0]-a,s=t[1],c=n[1],l=e[1]-s,h=r[1]-c,f=(u*(s-c)-h*(i-a))/(h*o-u*l);return[i+f*o,s+f*l]}function Or(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}function Ir(){ri(this),this.edge=this.site=this.circle=null}function qr(t){var e=tc.pop()||new Ir;return e.site=t,e}function Rr(t){Wr(t),Ks.remove(t),tc.push(t),ri(t)}function Pr(t){var e=t.circle,n=e.x,r=e.cy,i={x:n,y:r},a=t.P,o=t.N,u=[t];Rr(t);for(var s=a;s.circle&&lu(n-s.circle.x)l;++l)c=u[l],s=u[l-1],ti(c.edge,s.site,c.site,i);s=u[0],c=u[h-1],c.edge=Jr(s.site,c.site,null,i),$r(s),$r(c)}function Ur(t){for(var e,n,r,i,a=t.x,o=t.y,u=Ks._;u;)if(r=Yr(u,o)-a,r>Fu)u=u.L;else{if(i=a-jr(u,o),!(i>Fu)){r>-Fu?(e=u.P,n=u):i>-Fu?(e=u,n=u.N):e=n=u;break}if(!u.R){e=u;break}u=u.R}var s=qr(t);if(Ks.insert(e,s),e||n){if(e===n)return Wr(e),n=qr(e.site),Ks.insert(s,n),s.edge=n.edge=Jr(e.site,s.site),$r(e),void $r(n);if(!n)return void(s.edge=Jr(e.site,s.site));Wr(e),Wr(n);var c=e.site,l=c.x,h=c.y,f=t.x-l,d=t.y-h,p=n.site,g=p.x-l,y=p.y-h,m=2*(f*y-d*g),v=f*f+d*d,b=g*g+y*y,_={x:(y*v-d*b)/m+l,y:(f*b-g*v)/m+h};ti(n.edge,c,p,_),s.edge=Jr(c,t,null,_),n.edge=Jr(t,p,null,_),$r(e),$r(n)}}function Yr(t,e){var n=t.site,r=n.x,i=n.y,a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;n=o.site;var u=n.x,s=n.y,c=s-e;if(!c)return u;var l=u-r,h=1/a-1/c,f=l/c;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*c)-s+c/2+i-a/2)))/h+r:(r+u)/2}function jr(t,e){var n=t.N;if(n)return Yr(n,e);var r=t.site;return r.y===e?r.x:1/0}function zr(t){this.site=t,this.edges=[]}function Vr(t){for(var e,n,r,i,a,o,u,s,c,l,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],g=Xs,y=g.length;y--;)if(a=g[y],a&&a.prepare())for(u=a.edges,s=u.length,o=0;s>o;)l=u[o].end(),r=l.x,i=l.y,c=u[++o%s].start(),e=c.x,n=c.y,(lu(r-e)>Fu||lu(i-n)>Fu)&&(u.splice(o,0,new ei(Qr(a.site,l,lu(r-h)Fu?{x:h,y:lu(e-h)Fu?{x:lu(n-p)Fu?{x:f,y:lu(e-f)Fu?{x:lu(n-d)=-Lu)){var d=s*s+c*c,p=l*l+h*h,g=(h*d-c*p)/f,y=(s*p-l*d)/f,h=y+u,m=ec.pop()||new Gr;m.arc=t,m.site=i,m.x=g+o,m.y=h+Math.sqrt(g*g+y*y),m.cy=h,t.circle=m;for(var v=null,b=Qs._;b;)if(m.yy||y>=u)return;if(f>p){if(a){if(a.y>=c)return}else a={x:y,y:s};n={x:y,y:c}}else{if(a){if(a.yr||r>1)if(f>p){if(a){if(a.y>=c)return}else a={x:(s-i)/r,y:s};n={x:(c-i)/r,y:c}}else{if(a){if(a.yd){if(a){if(a.x>=u)return}else a={x:o,y:r*o+i};n={x:u,y:r*u+i}}else{if(a){if(a.xa&&(i=e.slice(a,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(r=r[0])?u[o]?u[o]+=r:u[++o]=r:(u[++o]=null,s.push({i:o,x:yi(n,r)})),a=ic.lastIndex;return ar;++r)u[(n=s[r]).i]=n.x(t);return u.join("")})}function vi(t,e){for(var n,r=Xo.interpolators.length;--r>=0&&!(n=Xo.interpolators[r](t,e)););return n}function bi(t,e){var n,r=[],i=[],a=t.length,o=e.length,u=Math.min(t.length,e.length);for(n=0;u>n;++n)r.push(vi(t[n],e[n]));for(;a>n;++n)i[n]=t[n];for(;o>n;++n)i[n]=e[n];return function(t){for(n=0;u>n;++n)i[n]=r[n](t);return i}}function _i(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function xi(t){return function(e){return 1-t(1-e)}}function wi(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function Ai(t){return t*t}function ki(t){return t*t*t}function Ei(t){if(0>=t)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(.5>t?n:3*(t-e)+n-.75)}function Di(t){return function(e){return Math.pow(e,t)}}function Mi(t){return 1-Math.cos(t*Tu)}function Si(t){return Math.pow(2,10*(t-1))}function Ci(t){return 1-Math.sqrt(1-t*t)}function Ti(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/Cu*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*Cu/e)}}function Fi(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Li(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function Bi(t,e){t=Xo.hcl(t),e=Xo.hcl(e);var n=t.h,r=t.c,i=t.l,a=e.h-n,o=e.c-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.c:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return le(n+a*t,r+o*t,i+u*t)+""}}function Ni(t,e){t=Xo.hsl(t),e=Xo.hsl(e);var n=t.h,r=t.s,i=t.l,a=e.h-n,o=e.s-r,u=e.l-i;return isNaN(o)&&(o=0,r=isNaN(r)?e.s:r),isNaN(a)?(a=0,n=isNaN(n)?e.h:n):a>180?a-=360:-180>a&&(a+=360),function(t){return se(n+a*t,r+o*t,i+u*t)+""}}function Oi(t,e){t=Xo.lab(t),e=Xo.lab(e);var n=t.l,r=t.a,i=t.b,a=e.l-n,o=e.a-r,u=e.b-i;return function(t){return fe(n+a*t,r+o*t,i+u*t)+""}}function Ii(t,e){return e-=t,function(n){return Math.round(t+e*n)}}function qi(t){var e=[t.a,t.b],n=[t.c,t.d],r=Pi(e),i=Ri(e,n),a=Pi(Ui(n,e,-i))||0;e[0]*n[1]180?l+=360:l-c>180&&(c+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:yi(c,l)})):l&&r.push(r.pop()+"rotate("+l+")"),h!=f?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:yi(h,f)}):f&&r.push(r.pop()+"skewX("+f+")"),d[0]!=p[0]||d[1]!=p[1]?(n=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:n-4,x:yi(d[0],p[0])},{i:n-2,x:yi(d[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),n=i.length,function(t){for(var e,a=-1;++a=0;)n.push(i[r])}function ta(t,e){for(var n=[t],r=[];null!=(t=n.pop());)if(r.push(t),(a=t.children)&&(i=a.length))for(var i,a,o=-1;++on;++n)(e=t[n][1])>i&&(r=n,i=e);return r}function ha(t){return t.reduce(fa,0)}function fa(t,e){return t+e[1]}function da(t,e){return pa(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function pa(t,e){for(var n=-1,r=+t[0],i=(t[1]-r)/e,a=[];++n<=e;)a[n]=i*n+r;return a}function ga(t){return[Xo.min(t),Xo.max(t)]}function ya(t,e){return t.value-e.value}function ma(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function va(t,e){t._pack_next=e,e._pack_prev=t}function ba(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return.999*i*i>n*n+r*r}function _a(t){function e(t){l=Math.min(t.x-t.r,l),h=Math.max(t.x+t.r,h),f=Math.min(t.y-t.r,f),d=Math.max(t.y+t.r,d)}if((n=t.children)&&(c=n.length)){var n,r,i,a,o,u,s,c,l=1/0,h=-1/0,f=1/0,d=-1/0;if(n.forEach(xa),r=n[0],r.x=-r.r,r.y=0,e(r),c>1&&(i=n[1],i.x=i.r,i.y=0,e(i),c>2))for(a=n[2],ka(r,i,a),e(a),ma(r,a),r._pack_prev=a,ma(a,i),i=r._pack_next,o=3;c>o;o++){ka(r,i,a=n[o]);var p=0,g=1,y=1;for(u=i._pack_next;u!==i;u=u._pack_next,g++)if(ba(u,a)){p=1;break}if(1==p)for(s=r._pack_prev;s!==u._pack_prev&&!ba(s,a);s=s._pack_prev,y++);p?(y>g||g==y&&i.ro;o++)a=n[o],a.x-=m,a.y-=v,b=Math.max(b,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=b,n.forEach(wa)}}function xa(t){t._pack_next=t._pack_prev=t}function wa(t){delete t._pack_next,delete t._pack_prev}function Aa(t,e,n,r){var i=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,i)for(var a=-1,o=i.length;++a=0;)e=i[a],e.z+=n,e.m+=n,n+=e.s+(r+=e.c)}function Ta(t,e,n){return t.a.parent===e.parent?t.a:n}function Fa(t){return 1+Xo.max(t,function(t){return t.y})}function La(t){return t.reduce(function(t,e){return t+e.x},0)/t.length}function Ba(t){var e=t.children;return e&&e.length?Ba(e[0]):t}function Na(t){var e,n=t.children;return n&&(e=n.length)?Na(n[e-1]):t}function Oa(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Ia(t,e){var n=t.x+e[3],r=t.y+e[0],i=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>i&&(n+=i/2,i=0),0>a&&(r+=a/2,a=0),{x:n,y:r,dx:i,dy:a}}function qa(t){var e=t[0],n=t[t.length-1];return n>e?[e,n]:[n,e]}function Ra(t){return t.rangeExtent?t.rangeExtent():qa(t.range())}function Pa(t,e,n,r){var i=n(t[0],t[1]),a=r(e[0],e[1]);return function(t){return a(i(t))}}function Ua(t,e){var n,r=0,i=t.length-1,a=t[r],o=t[i];return a>o&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Ya(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:gc}function ja(t,e,n,r){var i=[],a=[],o=0,u=Math.min(t.length,e.length)-1;for(t[u]2?ja:Pa,s=r?zi:ji;return o=i(t,e,s,n),u=i(e,t,s,vi),a}function a(t){return o(t)}var o,u;return a.invert=function(t){return u(t)},a.domain=function(e){return arguments.length?(t=e.map(Number),i()):t},a.range=function(t){return arguments.length?(e=t,i()):e},a.rangeRound=function(t){return a.range(t).interpolate(Ii)},a.clamp=function(t){return arguments.length?(r=t,i()):r},a.interpolate=function(t){return arguments.length?(n=t,i()):n},a.ticks=function(e){return $a(t,e)},a.tickFormat=function(e,n){return Wa(t,e,n)},a.nice=function(e){return Ha(t,e),i()},a.copy=function(){return za(t,e,n,r)},i()}function Va(t,e){return Xo.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Ha(t,e){return Ua(t,Ya(Ga(t,e)[2]))}function Ga(t,e){null==e&&(e=10);var n=qa(t),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),a=e/r*i;return.15>=a?i*=10:.35>=a?i*=5:.75>=a&&(i*=2),n[0]=Math.ceil(n[0]/i)*i,n[1]=Math.floor(n[1]/i)*i+.5*i,n[2]=i,n}function $a(t,e){return Xo.range.apply(Xo,Ga(t,e))}function Wa(t,e,n){var r=Ga(t,e);if(n){var i=rs.exec(n);if(i.shift(),"s"===i[8]){var a=Xo.formatPrefix(Math.max(lu(r[0]),lu(r[1])));return i[7]||(i[7]="."+Za(a.scale(r[2]))),i[8]="f",n=Xo.format(i.join("")),function(t){return n(a.scale(t))+a.symbol}}i[7]||(i[7]="."+Xa(i[8],r)),n=i.join("")}else n=",."+Za(r[2])+"f";return Xo.format(n)}function Za(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Xa(t,e){var n=Za(e[2]);return t in yc?Math.abs(n-Za(Math.max(lu(e[0]),lu(e[1]))))+ +("e"!==t):n-2*("%"===t)}function Ka(t,e,n,r){function i(t){return(n?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return n?Math.pow(e,t):-Math.pow(e,-t)}function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((r=e.map(Number)).map(i)),o):r},o.base=function(n){return arguments.length?(e=+n,t.domain(r.map(i)),o):e},o.nice=function(){var e=Ua(r.map(i),n?Math:vc);return t.domain(e),r=e.map(a),o},o.ticks=function(){var t=qa(r),o=[],u=t[0],s=t[1],c=Math.floor(i(u)),l=Math.ceil(i(s)),h=e%1?2:e;if(isFinite(l-c)){if(n){for(;l>c;c++)for(var f=1;h>f;f++)o.push(a(c)*f);o.push(a(c))}else for(o.push(a(c));c++0;f--)o.push(a(c)*f);for(c=0;o[c]s;l--);o=o.slice(c,l)}return o},o.tickFormat=function(t,e){if(!arguments.length)return mc;arguments.length<2?e=mc:"function"!=typeof e&&(e=Xo.format(e));var r,u=Math.max(.1,t/o.ticks().length),s=n?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(t){return t/a(s(i(t)+r))<=u?e(t):""}},o.copy=function(){return Ka(t.copy(),e,n,r)},Va(o,t)}function Ja(t,e,n){function r(e){return t(i(e))}var i=Qa(e),a=Qa(1/e);return r.invert=function(e){return a(t.invert(e))},r.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),r):n},r.ticks=function(t){return $a(n,t)},r.tickFormat=function(t,e){return Wa(n,t,e)},r.nice=function(t){return r.domain(Ha(n,t))},r.exponent=function(o){return arguments.length?(i=Qa(e=o),a=Qa(1/e),t.domain(n.map(i)),r):e},r.copy=function(){return Ja(t.copy(),e,n)},Va(r,t)}function Qa(t){return function(e){return 0>e?-Math.pow(-e,t):Math.pow(e,t)}}function to(t,e){function n(n){return a[((i.get(n)||("range"===e.t?i.set(n,t.push(n)):0/0))-1)%a.length]}function r(e,n){return Xo.range(t.length).map(function(t){return e+n*t})}var i,a,o;return n.domain=function(r){if(!arguments.length)return t;t=[],i=new s;for(var a,o=-1,u=r.length;++ot?[0/0,0/0]:[t>0?u[t-1]:e[0],te?0/0:e/a+t,[e,e+1/a]},r.copy=function(){return no(t,e,n)},i()}function ro(t,e){function n(n){return n>=n?e[Xo.bisect(t,n)]:void 0}return n.domain=function(e){return arguments.length?(t=e,n):t},n.range=function(t){return arguments.length?(e=t,n):e},n.invertExtent=function(n){return n=e.indexOf(n),[t[n-1],t[n]]},n.copy=function(){return ro(t,e)},n}function io(t){function e(t){return+t}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(e){return $a(t,e)},e.tickFormat=function(e,n){return Wa(t,e,n)},e.copy=function(){return io(t)},e}function ao(t){return t.innerRadius}function oo(t){return t.outerRadius}function uo(t){return t.startAngle}function so(t){return t.endAngle}function co(t){function e(e){function o(){c.push("M",a(t(l),u))}for(var s,c=[],l=[],h=-1,f=e.length,d=De(n),p=De(r);++h1&&i.push("H",r[0]),i.join("")}function po(t){for(var e=0,n=t.length,r=t[0],i=[r[0],",",r[1]];++e1){u=e[1],a=t[s],s++,r+="C"+(i[0]+o[0])+","+(i[1]+o[1])+","+(a[0]-u[0])+","+(a[1]-u[1])+","+a[0]+","+a[1];for(var c=2;c9&&(i=3*e/Math.sqrt(i),o[u]=i*n,o[u+1]=i*r));for(u=-1;++u<=s;)i=(t[Math.min(s,u+1)][0]-t[Math.max(0,u-1)][0])/(6*(1+o[u]*o[u])),a.push([i||0,o[u]*i||0]);return a}function To(t){return t.length<3?lo(t):t[0]+bo(t,Co(t))}function Fo(t){for(var e,n,r,i=-1,a=t.length;++in?c():(i.active=n,a.event&&a.event.start.call(t,l,e),a.tween.forEach(function(n,r){(r=r.call(t,l,e))&&g.push(r)}),void Xo.timer(function(){return p.c=s(r||1)?Cn:s,1},0,o))}function s(r){if(i.active!==n)return c();for(var o=r/d,u=h(o),s=g.length;s>0;)g[--s].call(t,u);return o>=1?(a.event&&a.event.end.call(t,l,e),c()):void 0}function c(){return--i.count?delete i[n]:delete t.__transition__,1}var l=t.__data__,h=a.ease,f=a.delay,d=a.duration,p=ts,g=[];return p.t=f+o,r>=f?u(r-f):void(p.c=u)},0,o)}}function zo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate("+(isFinite(r)?r:n(t))+",0)"})}function Vo(t,e,n){t.attr("transform",function(t){var r=e(t);return"translate(0,"+(isFinite(r)?r:n(t))+")"})}function Ho(t){return t.toISOString()}function Go(t,e,n){function r(e){return t(e)}function i(t,n){var r=t[1]-t[0],i=r/n,a=Xo.bisect(zc,i);return a==zc.length?[e.year,Ga(t.map(function(t){return t/31536e6}),n)[2]]:a?e[i/zc[a-1]1?{floor:function(e){for(;n(e=t.floor(e));)e=$o(e-1);return e},ceil:function(e){for(;n(e=t.ceil(e));)e=$o(+e+1);return e}}:t))},r.ticks=function(t,e){var n=qa(r.domain()),a=null==t?i(n,10):"number"==typeof t?i(n,t):!t.range&&[{range:t},e];return a&&(t=a[0],e=a[1]),t.range(n[0],$o(+n[1]+1),1>e?1:e)},r.tickFormat=function(){return n},r.copy=function(){return Go(t.copy(),e,n)},Va(r,t)}function $o(t){return new Date(t)}function Wo(t){return JSON.parse(t.responseText)}function Zo(t){var e=Qo.createRange();return e.selectNode(Qo.body),e.createContextualFragment(t.responseText)}var Xo={version:"3.4.13"};Date.now||(Date.now=function(){return+new Date});var Ko=[].slice,Jo=function(t){return Ko.call(t)},Qo=document,tu=Qo.documentElement,eu=window;try{Jo(tu.childNodes)[0].nodeType}catch(nu){Jo=function(t){for(var e=t.length,n=new Array(e);e--;)n[e]=t[e];return n}}try{Qo.createElement("div").style.setProperty("opacity",0,"")}catch(ru){var iu=eu.Element.prototype,au=iu.setAttribute,ou=iu.setAttributeNS,uu=eu.CSSStyleDeclaration.prototype,su=uu.setProperty;iu.setAttribute=function(t,e){au.call(this,t,e+"")},iu.setAttributeNS=function(t,e,n){ou.call(this,t,e,n+"")},uu.setProperty=function(t,e,n){su.call(this,t,e+"",n)}}Xo.ascending=t,Xo.descending=function(t,e){return t>e?-1:e>t?1:e>=t?0:0/0},Xo.min=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++ir&&(n=r)}else{for(;++i=n);)n=void 0;for(;++ir&&(n=r)}return n},Xo.max=function(t,e){var n,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=n);)n=void 0;for(;++in&&(n=r)}else{for(;++i=n);)n=void 0;for(;++in&&(n=r)}return n},Xo.extent=function(t,e){var n,r,i,a=-1,o=t.length;if(1===arguments.length){for(;++a=n);)n=i=void 0;for(;++ar&&(n=r),r>i&&(i=r))}else{for(;++a=n);)n=void 0;for(;++ar&&(n=r),r>i&&(i=r))}return[n,i]},Xo.sum=function(t,e){var n,i=0,a=t.length,o=-1;if(1===arguments.length)for(;++or?0:r);r>n;)a[n]=[e=i,i=t[++n]];return a},Xo.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,e=Xo.min(arguments,a),n=new Array(e);++t=0;)for(r=t[i],e=r.length;--e>=0;)n[--o]=r[e];return n};var lu=Math.abs;Xo.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var r,i=[],a=o(lu(n)),u=-1;if(t*=a,e*=a,n*=a,0>n)for(;(r=t+n*++u)>e;)i.push(r/a);else for(;(r=t+n*++u)=a.length)return r?r.call(i,o):n?o.sort(n):o;for(var c,l,h,f,d=-1,p=o.length,g=a[u++],y=new s;++d=a.length)return t;var r=[],i=o[n++];return t.forEach(function(t,i){r.push({key:t,values:e(i,n)})}),i?r.sort(function(t,e){return i(t.key,e.key)}):r}var n,r,i={},a=[],o=[];return i.map=function(e,n){return t(n,e,0)},i.entries=function(n){return e(t(Xo.map,n,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return o[a.length-1]=t,i},i.sortValues=function(t){return n=t,i},i.rollup=function(t){return r=t,i},i},Xo.set=function(t){var e=new y;if(t)for(var n=0,r=t.length;r>n;++n)e.add(t[n]);return e},u(y,{has:h,add:function(t){return this._[c(t+="")]=!0,t},remove:f,values:d,size:p,empty:g,forEach:function(t){for(var e in this._)t.call(this,l(e))}}),Xo.behavior={},Xo.rebind=function(t,e){for(var n,r=1,i=arguments.length;++r=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},Xo.event=null,Xo.requote=function(t){return t.replace(pu,"\\$&")};var pu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,gu={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]},yu=function(t,e){return e.querySelector(t)},mu=function(t,e){return e.querySelectorAll(t)},vu=tu.matches||tu[v(tu,"matchesSelector")],bu=function(t,e){return vu.call(t,e)};"function"==typeof Sizzle&&(yu=function(t,e){return Sizzle(t,e)[0]||null},mu=Sizzle,bu=Sizzle.matchesSelector),Xo.selection=function(){return Au};var _u=Xo.selection.prototype=[];_u.select=function(t){var e,n,r,i,a=[];t=D(t);for(var o=-1,u=this.length;++o=0&&(n=t.slice(0,e),t=t.slice(e+1)),xu.hasOwnProperty(n)?{space:xu[n],local:t}:t}},_u.attr=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node();return t=Xo.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(S(e,t[e]));return this}return this.each(S(t,e))},_u.classed=function(t,e){if(arguments.length<2){if("string"==typeof t){var n=this.node(),r=(t=F(t)).length,i=-1;if(e=n.classList){for(;++ir){if("string"!=typeof t){2>r&&(e="");for(n in t)this.each(N(n,t[n],e));return this}if(2>r)return eu.getComputedStyle(this.node(),null).getPropertyValue(t);n=""}return this.each(N(t,e,n))},_u.property=function(t,e){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(e in t)this.each(O(e,t[e]));return this}return this.each(O(t,e))},_u.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},_u.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},_u.append=function(t){return t=I(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},_u.insert=function(t,e){return t=I(t),e=D(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},_u.remove=function(){return this.each(function(){var t=this.parentNode;t&&t.removeChild(this)})},_u.data=function(t,e){function n(t,n){var r,i,a,o=t.length,h=n.length,f=Math.min(o,h),d=new Array(h),p=new Array(h),g=new Array(o);if(e){var y,m=new s,v=new Array(o);for(r=-1;++rr;++r)p[r]=q(n[r]);for(;o>r;++r)g[r]=t[r]}p.update=d,p.parentNode=d.parentNode=g.parentNode=t.parentNode,u.push(p),c.push(d),l.push(g)}var r,i,a=-1,o=this.length;if(!arguments.length){for(t=new Array(o=(r=this[0]).length);++aa;a++){i.push(e=[]),e.parentNode=(n=this[a]).parentNode;for(var u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return E(i)},_u.order=function(){for(var t=-1,e=this.length;++t=0;)(n=r[i])&&(a&&a!==n.nextSibling&&a.parentNode.insertBefore(n,a),a=n);return this},_u.sort=function(t){t=P.apply(this,arguments);for(var e=-1,n=this.length;++et;t++)for(var n=this[t],r=0,i=n.length;i>r;r++){var a=n[r];if(a)return a}return null},_u.size=function(){var t=0;return U(this,function(){++t}),t};var wu=[];Xo.selection.enter=Y,Xo.selection.enter.prototype=wu,wu.append=_u.append,wu.empty=_u.empty,wu.node=_u.node,wu.call=_u.call,wu.size=_u.size,wu.select=function(t){for(var e,n,r,i,a,o=[],u=-1,s=this.length;++ur){if("string"!=typeof t){2>r&&(e=!1);for(n in t)this.each(V(n,t[n],e));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(V(t,e,n))};var ku=Xo.map({mouseenter:"mouseover",mouseleave:"mouseout"});ku.forEach(function(t){"on"+t in Qo&&ku.remove(t)});var Eu="onselectstart"in Qo?null:v(tu.style,"userSelect"),Du=0;Xo.mouse=function(t){return W(t,A())};var Mu=/WebKit/.test(eu.navigator.userAgent)?-1:0;Xo.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=A().changedTouches),e)for(var r,i=0,a=e.length;a>i;++i)if((r=e[i]).identifier===n)return W(t,r)},Xo.behavior.drag=function(){function t(){this.on("mousedown.drag",i).on("touchstart.drag",a)}function e(t,e,i,a,o){return function(){function u(){var t,n,r=e(f,g);r&&(t=r[0]-b[0],n=r[1]-b[1],p|=t|n,b=r,d({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:n}))}function s(){e(f,g)&&(m.on(a+y,null).on(o+y,null),v(p&&Xo.event.target===h),d({type:"dragend"}))}var c,l=this,h=Xo.event.target,f=l.parentNode,d=n.of(l,arguments),p=0,g=t(),y=".drag"+(null==g?"":"-"+g),m=Xo.select(i()).on(a+y,u).on(o+y,s),v=$(),b=e(f,g);r?(c=r.apply(l,arguments),c=[c.x-b[0],c.y-b[1]]):c=[0,0],d({type:"dragstart"})}}var n=k(t,"drag","dragstart","dragend"),r=null,i=e(b,Xo.mouse,K,"mousemove","mouseup"),a=e(Z,Xo.touch,X,"touchmove","touchend");return t.origin=function(e){return arguments.length?(r=e,t):r},Xo.rebind(t,n,"on")},Xo.touches=function(t,e){return arguments.length<2&&(e=A().touches),e?Jo(e).map(function(e){var n=W(t,e);return n.identifier=e.identifier,n}):[]};var Su=Math.PI,Cu=2*Su,Tu=Su/2,Fu=1e-6,Lu=Fu*Fu,Bu=Su/180,Nu=180/Su,Ou=Math.SQRT2,Iu=2,qu=4;Xo.interpolateZoom=function(t,e){function n(t){var e=t*v;if(m){var n=re(g),o=a/(Iu*f)*(n*ie(Ou*e+g)-ne(g));return[r+o*c,i+o*l,a*n/re(Ou*e+g)]}return[r+t*c,i+t*l,a*Math.exp(Ou*e)]}var r=t[0],i=t[1],a=t[2],o=e[0],u=e[1],s=e[2],c=o-r,l=u-i,h=c*c+l*l,f=Math.sqrt(h),d=(s*s-a*a+qu*h)/(2*a*Iu*f),p=(s*s-a*a-qu*h)/(2*s*Iu*f),g=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(p*p+1)-p),m=y-g,v=(m||Math.log(s/a))/Ou;return n.duration=1e3*v,n},Xo.behavior.zoom=function(){function t(t){t.on(M,c).on(Uu+".zoom",h).on("dblclick.zoom",f).on(T,l)}function e(t){return[(t[0]-A.x)/A.k,(t[1]-A.y)/A.k]}function n(t){return[t[0]*A.k+A.x,t[1]*A.k+A.y]}function r(t){A.k=Math.max(D[0],Math.min(D[1],t))}function i(t,e){e=n(e),A.x+=t[0]-e[0],A.y+=t[1]-e[1]}function a(){b&&b.domain(v.range().map(function(t){return(t-A.x)/A.k}).map(v.invert)),x&&x.domain(_.range().map(function(t){return(t-A.y)/A.k}).map(_.invert))}function o(t){t({type:"zoomstart"})}function u(t){a(),t({type:"zoom",scale:A.k,translate:[A.x,A.y]})}function s(t){t({type:"zoomend"})}function c(){function t(){l=1,i(Xo.mouse(r),f),u(c)}function n(){h.on(S,null).on(C,null),d(l&&Xo.event.target===a),s(c)}var r=this,a=Xo.event.target,c=F.of(r,arguments),l=0,h=Xo.select(eu).on(S,t).on(C,n),f=e(Xo.mouse(r)),d=$();z.call(r),o(c)}function l(){function t(){var t=Xo.touches(d);return f=A.k,t.forEach(function(t){t.identifier in g&&(g[t.identifier]=e(t))}),t}function n(){var e=Xo.event.target;Xo.select(e).on(b,a).on(_,h),x.push(e);for(var n=Xo.event.changedTouches,o=0,s=n.length;s>o;++o)g[n[o].identifier]=null;var c=t(),l=Date.now();if(1===c.length){if(500>l-m){var f=c[0],d=g[f.identifier];r(2*A.k),i(f,d),w(),u(p)}m=l}else if(c.length>1){var f=c[0],v=c[1],k=f[0]-v[0],E=f[1]-v[1];y=k*k+E*E}}function a(){for(var t,e,n,a,o=Xo.touches(d),s=0,c=o.length;c>s;++s,a=null)if(n=o[s],a=g[n.identifier]){if(e)break;t=n,e=a}if(a){var l=(l=n[0]-t[0])*l+(l=n[1]-t[1])*l,h=y&&Math.sqrt(l/y);t=[(t[0]+n[0])/2,(t[1]+n[1])/2],e=[(e[0]+a[0])/2,(e[1]+a[1])/2],r(h*f)}m=null,i(t,e),u(p)}function h(){if(Xo.event.touches.length){for(var e=Xo.event.changedTouches,n=0,r=e.length;r>n;++n)delete g[e[n].identifier];for(var i in g)return void t()}Xo.selectAll(x).on(v,null),k.on(M,c).on(T,l),E(),s(p)}var f,d=this,p=F.of(d,arguments),g={},y=0,v=".zoom-"+Xo.event.changedTouches[0].identifier,b="touchmove"+v,_="touchend"+v,x=[],k=Xo.select(d),E=$();z.call(d),n(),o(p),k.on(M,null).on(T,n)}function h(){var t=F.of(this,arguments);y?clearTimeout(y):(d=e(p=g||Xo.mouse(this)),z.call(this),o(t)),y=setTimeout(function(){y=null,s(t)},50),w(),r(Math.pow(2,.002*Ru())*A.k),i(p,d),u(t)}function f(){var t=F.of(this,arguments),n=Xo.mouse(this),a=e(n),c=Math.log(A.k)/Math.LN2;o(t),r(Math.pow(2,Xo.event.shiftKey?Math.ceil(c)-1:Math.floor(c)+1)),i(n,a),u(t),s(t)}var d,p,g,y,m,v,b,_,x,A={x:0,y:0,k:1},E=[960,500],D=Pu,M="mousedown.zoom",S="mousemove.zoom",C="mouseup.zoom",T="touchstart.zoom",F=k(t,"zoomstart","zoom","zoomend");return t.event=function(t){t.each(function(){var t=F.of(this,arguments),e=A;Tc?Xo.select(this).transition().each("start.zoom",function(){A=this.__chart__||{x:0,y:0,k:1},o(t)}).tween("zoom:zoom",function(){var n=E[0],r=E[1],i=n/2,a=r/2,o=Xo.interpolateZoom([(i-A.x)/A.k,(a-A.y)/A.k,n/A.k],[(i-e.x)/e.k,(a-e.y)/e.k,n/e.k]);return function(e){var r=o(e),s=n/r[2];this.__chart__=A={x:i-r[0]*s,y:a-r[1]*s,k:s},u(t)}}).each("end.zoom",function(){s(t)}):(this.__chart__=A,o(t),u(t),s(t))})},t.translate=function(e){return arguments.length?(A={x:+e[0],y:+e[1],k:A.k},a(),t):[A.x,A.y]},t.scale=function(e){return arguments.length?(A={x:A.x,y:A.y,k:+e},a(),t):A.k},t.scaleExtent=function(e){return arguments.length?(D=null==e?Pu:[+e[0],+e[1]],t):D},t.center=function(e){return arguments.length?(g=e&&[+e[0],+e[1]],t):g},t.size=function(e){return arguments.length?(E=e&&[+e[0],+e[1]],t):E},t.x=function(e){return arguments.length?(b=e,v=e.copy(),A={x:0,y:0,k:1},t):b},t.y=function(e){return arguments.length?(x=e,_=e.copy(),A={x:0,y:0,k:1},t):x},Xo.rebind(t,F,"on")};var Ru,Pu=[0,1/0],Uu="onwheel"in Qo?(Ru=function(){return-Xo.event.deltaY*(Xo.event.deltaMode?120:1)},"wheel"):"onmousewheel"in Qo?(Ru=function(){return Xo.event.wheelDelta},"mousewheel"):(Ru=function(){return-Xo.event.detail},"MozMousePixelScroll");Xo.color=oe,oe.prototype.toString=function(){return this.rgb()+""},Xo.hsl=ue;var Yu=ue.prototype=new oe;Yu.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,this.l/t)},Yu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new ue(this.h,this.s,t*this.l)},Yu.rgb=function(){return se(this.h,this.s,this.l)},Xo.hcl=ce;var ju=ce.prototype=new oe;ju.brighter=function(t){return new ce(this.h,this.c,Math.min(100,this.l+zu*(arguments.length?t:1)))},ju.darker=function(t){return new ce(this.h,this.c,Math.max(0,this.l-zu*(arguments.length?t:1)))},ju.rgb=function(){return le(this.h,this.c,this.l).rgb()},Xo.lab=he;var zu=18,Vu=.95047,Hu=1,Gu=1.08883,$u=he.prototype=new oe;$u.brighter=function(t){return new he(Math.min(100,this.l+zu*(arguments.length?t:1)),this.a,this.b)},$u.darker=function(t){return new he(Math.max(0,this.l-zu*(arguments.length?t:1)),this.a,this.b)},$u.rgb=function(){return fe(this.l,this.a,this.b)},Xo.rgb=me;var Wu=me.prototype=new oe;Wu.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,i=30;return e||n||r?(e&&i>e&&(e=i),n&&i>n&&(n=i),r&&i>r&&(r=i),new me(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t))):new me(i,i,i)},Wu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new me(t*this.r,t*this.g,t*this.b)},Wu.hsl=function(){return we(this.r,this.g,this.b)},Wu.toString=function(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)};var Zu=Xo.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Zu.forEach(function(t,e){Zu.set(t,ve(e))}),Xo.functor=De,Xo.xhr=Se(Me),Xo.dsv=function(t,e){function n(t,n,a){arguments.length<3&&(a=n,n=null);var o=Ce(t,e,null==n?r:i(n),a);return o.row=function(t){return arguments.length?o.response(null==(n=t)?r:i(t)):n},o}function r(t){return n.parse(t.responseText)}function i(t){return function(e){return n.parse(e.responseText,t)}}function a(e){return e.map(o).join(t)}function o(t){return u.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return n.parse=function(t,e){var r;return n.parseRows(t,function(t,n){if(r)return r(t,n-1);var i=new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+"]"}).join(",")+"}");r=e?function(t,n){return e(i(t),n)}:i})},n.parseRows=function(t,e){function n(){if(l>=c)return o;if(i)return i=!1,a;var e=l;if(34===t.charCodeAt(e)){for(var n=e;n++l;){var r=t.charCodeAt(l++),u=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(l)&&(++l,++u);else if(r!==s)continue;return t.slice(e,l-u)}return t.slice(e)}for(var r,i,a={},o={},u=[],c=t.length,l=0,h=0;(r=n())!==o;){for(var f=[];r!==a&&r!==o;)f.push(r),r=n();e&&null==(f=e(f,h++))||u.push(f)}return u},n.format=function(e){if(Array.isArray(e[0]))return n.formatRows(e);var r=new y,i=[];return e.forEach(function(t){for(var e in t)r.has(e)||i.push(r.add(e))}),[i.map(o).join(t)].concat(e.map(function(e){return i.map(function(t){return o(e[t])}).join(t)})).join("\n")},n.formatRows=function(t){return t.map(a).join("\n")},n},Xo.csv=Xo.dsv(",","text/csv"),Xo.tsv=Xo.dsv(" ","text/tab-separated-values");var Xu,Ku,Ju,Qu,ts,es=eu[v(eu,"requestAnimationFrame")]||function(t){setTimeout(t,17)};Xo.timer=function(t,e,n){var r=arguments.length;2>r&&(e=0),3>r&&(n=Date.now());var i=n+e,a={c:t,t:i,f:!1,n:null};Ku?Ku.n=a:Xu=a,Ku=a,Ju||(Qu=clearTimeout(Qu),Ju=1,es(Le))},Xo.timer.flush=function(){Be(),Ne()},Xo.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var ns=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Ie);Xo.formatPrefix=function(t,e){var n=0;return t&&(0>t&&(t*=-1),e&&(t=Xo.round(t,Oe(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),ns[8+n/3]};var rs=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,is=Xo.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=Xo.round(t,Oe(t,e))).toFixed(Math.max(0,Math.min(20,Oe(t*(1+1e-15),e))))}}),as=Xo.time={},os=Date;Pe.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){us.setUTCDate.apply(this._,arguments)},setDay:function(){us.setUTCDay.apply(this._,arguments)},setFullYear:function(){us.setUTCFullYear.apply(this._,arguments)},setHours:function(){us.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){us.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){us.setUTCMinutes.apply(this._,arguments)},setMonth:function(){us.setUTCMonth.apply(this._,arguments)},setSeconds:function(){us.setUTCSeconds.apply(this._,arguments)},setTime:function(){us.setTime.apply(this._,arguments)}};var us=Date.prototype;as.year=Ue(function(t){return t=as.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),as.years=as.year.range,as.years.utc=as.year.utc.range,as.day=Ue(function(t){var e=new os(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),as.days=as.day.range,as.days.utc=as.day.utc.range,as.dayOfYear=function(t){var e=as.year(t);return Math.floor((t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=as[t]=Ue(function(t){return(t=as.day(t)).setDate(t.getDate()-(t.getDay()+e)%7),t},function(t,e){t.setDate(t.getDate()+7*Math.floor(e))},function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)-(n!==e)});as[t+"s"]=n.range,as[t+"s"].utc=n.utc.range,as[t+"OfYear"]=function(t){var n=as.year(t).getDay();return Math.floor((as.dayOfYear(t)+(n+e)%7)/7)}}),as.week=as.sunday,as.weeks=as.sunday.range,as.weeks.utc=as.sunday.utc.range,as.weekOfYear=as.sundayOfYear;var ss={"-":"",_:" ",0:"0"},cs=/^\s*\d+/,ls=/^%/;Xo.locale=function(t){return{numberFormat:qe(t),timeFormat:je(t)}};var hs=Xo.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});Xo.format=hs.numberFormat,Xo.geo={},ln.prototype={s:0,t:0,add:function(t){hn(t,this.t,fs),hn(fs.s,this.s,this),this.s?this.t+=fs.t:this.s=fs.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var fs=new ln;Xo.geo.stream=function(t,e){t&&ds.hasOwnProperty(t.type)?ds[t.type](t,e):fn(t,e)};var ds={Feature:function(t,e){fn(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++rt?4*Su+t:t,ms.lineStart=ms.lineEnd=ms.point=b}};Xo.geo.bounds=function(){function t(t,e){b.push(_=[l=t,f=t]),h>e&&(h=e),e>d&&(d=e)}function e(e,n){var r=yn([e*Bu,n*Bu]);if(m){var i=vn(m,r),a=[i[1],-i[0],0],o=vn(a,i);xn(o),o=wn(o);var s=e-p,c=s>0?1:-1,g=o[0]*Nu*c,y=lu(s)>180;if(y^(g>c*p&&c*e>g)){var v=o[1]*Nu;v>d&&(d=v)}else if(g=(g+360)%360-180,y^(g>c*p&&c*e>g)){var v=-o[1]*Nu;h>v&&(h=v)}else h>n&&(h=n),n>d&&(d=n);y?p>e?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e):f>=l?(l>e&&(l=e),e>f&&(f=e)):e>p?u(l,e)>u(l,f)&&(f=e):u(e,f)>u(l,f)&&(l=e)}else t(e,n);m=r,p=e}function n(){x.point=e}function r(){_[0]=l,_[1]=f,x.point=t,m=null}function i(t,n){if(m){var r=t-p;v+=lu(r)>180?r+(r>0?360:-360):r}else g=t,y=n;ms.point(t,n),e(t,n)}function a(){ms.lineStart()}function o(){i(g,y),ms.lineEnd(),lu(v)>Fu&&(l=-(f=180)),_[0]=l,_[1]=f,m=null +}function u(t,e){return(e-=t)<0?e+360:e}function s(t,e){return t[0]-e[0]}function c(t,e){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:tys?(l=-(f=180),h=-(d=90)):v>Fu?d=90:-Fu>v&&(h=-90),_[0]=l,_[1]=f}};return function(t){d=f=-(l=h=1/0),b=[],Xo.geo.stream(t,x);var e=b.length;if(e){b.sort(s);for(var n,r=1,i=b[0],a=[i];e>r;++r)n=b[r],c(n[0],i)||c(n[1],i)?(u(i[0],n[1])>u(i[0],i[1])&&(i[1]=n[1]),u(n[0],i[1])>u(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(var o,n,p=-1/0,e=a.length-1,r=0,i=a[e];e>=r;i=n,++r)n=a[r],(o=u(i[1],n[0]))>p&&(p=o,l=n[0],f=i[1])}return b=_=null,1/0===l||1/0===h?[[0/0,0/0],[0/0,0/0]]:[[l,h],[f,d]]}}(),Xo.geo.centroid=function(t){vs=bs=_s=xs=ws=As=ks=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,Cs);var e=Ds,n=Ms,r=Ss,i=e*e+n*n+r*r;return Lu>i&&(e=As,n=ks,r=Es,Fu>bs&&(e=_s,n=xs,r=ws),i=e*e+n*n+r*r,Lu>i)?[0/0,0/0]:[Math.atan2(n,e)*Nu,ee(r/Math.sqrt(i))*Nu]};var vs,bs,_s,xs,ws,As,ks,Es,Ds,Ms,Ss,Cs={sphere:b,point:kn,lineStart:Dn,lineEnd:Mn,polygonStart:function(){Cs.lineStart=Sn},polygonEnd:function(){Cs.lineStart=Dn}},Ts=Bn(Cn,qn,Pn,[-Su,-Su/2]),Fs=1e9;Xo.geo.clipExtent=function(){var t,e,n,r,i,a,o={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(u){return arguments.length?(a=zn(t=+u[0][0],e=+u[0][1],n=+u[1][0],r=+u[1][1]),i&&(i.valid=!1,i=null),o):[[t,e],[n,r]]}};return o.extent([[0,0],[960,500]])},(Xo.geo.conicEqualArea=function(){return Hn(Gn)}).raw=Gn,Xo.geo.albers=function(){return Xo.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},Xo.geo.albersUsa=function(){function t(t){var a=t[0],o=t[1];return e=null,n(a,o),e||(r(a,o),e)||i(a,o),e}var e,n,r,i,a=Xo.geo.albers(),o=Xo.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),u=Xo.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){e=[t,n]}};return t.invert=function(t){var e=a.scale(),n=a.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?o:i>=.166&&.234>i&&r>=-.214&&-.115>r?u:a).invert(t)},t.stream=function(t){var e=a.stream(t),n=o.stream(t),r=u.stream(t);return{point:function(t,i){e.point(t,i),n.point(t,i),r.point(t,i)},sphere:function(){e.sphere(),n.sphere(),r.sphere()},lineStart:function(){e.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){e.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){e.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){e.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},t.precision=function(e){return arguments.length?(a.precision(e),o.precision(e),u.precision(e),t):a.precision()},t.scale=function(e){return arguments.length?(a.scale(e),o.scale(.35*e),u.scale(e),t.translate(a.translate())):a.scale()},t.translate=function(e){if(!arguments.length)return a.translate();var c=a.scale(),l=+e[0],h=+e[1];return n=a.translate(e).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(s).point,r=o.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+Fu,h+.12*c+Fu],[l-.214*c-Fu,h+.234*c-Fu]]).stream(s).point,i=u.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+Fu,h+.166*c+Fu],[l-.115*c-Fu,h+.234*c-Fu]]).stream(s).point,t},t.scale(1070)};var Ls,Bs,Ns,Os,Is,qs,Rs={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Bs=0,Rs.lineStart=$n},polygonEnd:function(){Rs.lineStart=Rs.lineEnd=Rs.point=b,Ls+=lu(Bs/2)}},Ps={point:Wn,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Us={point:Kn,lineStart:Jn,lineEnd:Qn,polygonStart:function(){Us.lineStart=tr},polygonEnd:function(){Us.point=Kn,Us.lineStart=Jn,Us.lineEnd=Qn}};Xo.geo.path=function(){function t(t){return t&&("function"==typeof u&&a.pointRadius(+u.apply(this,arguments)),o&&o.valid||(o=i(a)),Xo.geo.stream(t,o)),a.result()}function e(){return o=null,t}var n,r,i,a,o,u=4.5;return t.area=function(t){return Ls=0,Xo.geo.stream(t,i(Rs)),Ls},t.centroid=function(t){return _s=xs=ws=As=ks=Es=Ds=Ms=Ss=0,Xo.geo.stream(t,i(Us)),Ss?[Ds/Ss,Ms/Ss]:Es?[As/Es,ks/Es]:ws?[_s/ws,xs/ws]:[0/0,0/0]},t.bounds=function(t){return Is=qs=-(Ns=Os=1/0),Xo.geo.stream(t,i(Ps)),[[Ns,Os],[Is,qs]]},t.projection=function(t){return arguments.length?(i=(n=t)?t.stream||rr(t):Me,e()):n},t.context=function(t){return arguments.length?(a=null==(r=t)?new Zn:new er(t),"function"!=typeof u&&a.pointRadius(u),e()):r},t.pointRadius=function(e){return arguments.length?(u="function"==typeof e?e:(a.pointRadius(+e),+e),t):u},t.projection(Xo.geo.albersUsa()).context(null)},Xo.geo.transform=function(t){return{stream:function(e){var n=new ir(e);for(var r in t)n[r]=t[r];return n}}},ir.prototype={point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},Xo.geo.projection=or,Xo.geo.projectionMutator=ur,(Xo.geo.equirectangular=function(){return or(cr)}).raw=cr.invert=cr,Xo.geo.rotation=function(t){function e(e){return e=t(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e}return t=hr(t[0]%360*Bu,t[1]*Bu,t.length>2?t[2]*Bu:0),e.invert=function(e){return e=t.invert(e[0]*Bu,e[1]*Bu),e[0]*=Nu,e[1]*=Nu,e},e},lr.invert=cr,Xo.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,e=hr(-t[0]*Bu,-t[1]*Bu,0).invert,i=[];return n(null,null,1,{point:function(t,n){i.push(t=e(t,n)),t[0]*=Nu,t[1]*=Nu}}),{type:"Polygon",coordinates:[i]}}var e,n,r=[0,0],i=6;return t.origin=function(e){return arguments.length?(r=e,t):r},t.angle=function(r){return arguments.length?(n=gr((e=+r)*Bu,i*Bu),t):e},t.precision=function(r){return arguments.length?(n=gr(e*Bu,(i=+r)*Bu),t):i},t.angle(90)},Xo.geo.distance=function(t,e){var n,r=(e[0]-t[0])*Bu,i=t[1]*Bu,a=e[1]*Bu,o=Math.sin(r),u=Math.cos(r),s=Math.sin(i),c=Math.cos(i),l=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((n=h*o)*n+(n=c*l-s*h*u)*n),s*l+c*h*u)},Xo.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:e()}}function e(){return Xo.range(Math.ceil(a/y)*y,i,y).map(f).concat(Xo.range(Math.ceil(c/m)*m,s,m).map(d)).concat(Xo.range(Math.ceil(r/p)*p,n,p).filter(function(t){return lu(t%y)>Fu}).map(l)).concat(Xo.range(Math.ceil(u/g)*g,o,g).filter(function(t){return lu(t%m)>Fu}).map(h))}var n,r,i,a,o,u,s,c,l,h,f,d,p=10,g=p,y=90,m=360,v=2.5;return t.lines=function(){return e().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[f(a).concat(d(s).slice(1),f(i).reverse().slice(1),d(c).reverse().slice(1))]}},t.extent=function(e){return arguments.length?t.majorExtent(e).minorExtent(e):t.minorExtent()},t.majorExtent=function(e){return arguments.length?(a=+e[0][0],i=+e[1][0],c=+e[0][1],s=+e[1][1],a>i&&(e=a,a=i,i=e),c>s&&(e=c,c=s,s=e),t.precision(v)):[[a,c],[i,s]]},t.minorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],u=+e[0][1],o=+e[1][1],r>n&&(e=r,r=n,n=e),u>o&&(e=u,u=o,o=e),t.precision(v)):[[r,u],[n,o]]},t.step=function(e){return arguments.length?t.majorStep(e).minorStep(e):t.minorStep()},t.majorStep=function(e){return arguments.length?(y=+e[0],m=+e[1],t):[y,m]},t.minorStep=function(e){return arguments.length?(p=+e[0],g=+e[1],t):[p,g]},t.precision=function(e){return arguments.length?(v=+e,l=mr(u,o,90),h=vr(r,n,v),f=mr(c,s,90),d=vr(a,i,v),t):v},t.majorExtent([[-180,-90+Fu],[180,90-Fu]]).minorExtent([[-180,-80-Fu],[180,80+Fu]])},Xo.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[e||r.apply(this,arguments),n||i.apply(this,arguments)]}}var e,n,r=br,i=_r;return t.distance=function(){return Xo.geo.distance(e||r.apply(this,arguments),n||i.apply(this,arguments))},t.source=function(n){return arguments.length?(r=n,e="function"==typeof n?null:n,t):r},t.target=function(e){return arguments.length?(i=e,n="function"==typeof e?null:e,t):i},t.precision=function(){return arguments.length?t:0},t},Xo.geo.interpolate=function(t,e){return xr(t[0]*Bu,t[1]*Bu,e[0]*Bu,e[1]*Bu)},Xo.geo.length=function(t){return Ys=0,Xo.geo.stream(t,js),Ys};var Ys,js={sphere:b,point:b,lineStart:wr,lineEnd:b,polygonStart:b,polygonEnd:b},zs=Ar(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(Xo.geo.azimuthalEqualArea=function(){return or(zs)}).raw=zs;var Vs=Ar(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},Me);(Xo.geo.azimuthalEquidistant=function(){return or(Vs)}).raw=Vs,(Xo.geo.conicConformal=function(){return Hn(kr)}).raw=kr,(Xo.geo.conicEquidistant=function(){return Hn(Er)}).raw=Er;var Hs=Ar(function(t){return 1/t},Math.atan);(Xo.geo.gnomonic=function(){return or(Hs)}).raw=Hs,Dr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-Tu]},(Xo.geo.mercator=function(){return Mr(Dr)}).raw=Dr;var Gs=Ar(function(){return 1},Math.asin);(Xo.geo.orthographic=function(){return or(Gs)}).raw=Gs;var $s=Ar(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(Xo.geo.stereographic=function(){return or($s)}).raw=$s,Sr.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-Tu]},(Xo.geo.transverseMercator=function(){var t=Mr(Sr),e=t.center,n=t.rotate;return t.center=function(t){return t?e([-t[1],t[0]]):(t=e(),[t[1],-t[0]])},t.rotate=function(t){return t?n([t[0],t[1],t.length>2?t[2]+90:90]):(t=n(),[t[0],t[1],t[2]-90])},n([0,0,90])}).raw=Sr,Xo.geom={},Xo.geom.hull=function(t){function e(t){if(t.length<3)return[];var e,i=De(n),a=De(r),o=t.length,u=[],s=[];for(e=0;o>e;e++)u.push([+i.call(this,t[e],e),+a.call(this,t[e],e),e]);for(u.sort(Lr),e=0;o>e;e++)s.push([u[e][0],-u[e][1]]);var c=Fr(u),l=Fr(s),h=l[0]===c[0],f=l[l.length-1]===c[c.length-1],d=[];for(e=c.length-1;e>=0;--e)d.push(t[u[c[e]][2]]);for(e=+h;e=r&&c.x<=a&&c.y>=i&&c.y<=o?[[r,o],[a,o],[a,i],[r,i]]:[];l.point=t[u]}),e}function n(t){return t.map(function(t,e){return{x:Math.round(a(t,e)/Fu)*Fu,y:Math.round(o(t,e)/Fu)*Fu,i:e}})}var r=Cr,i=Tr,a=r,o=i,u=nc;return t?e(t):(e.links=function(t){return ui(n(t)).edges.filter(function(t){return t.l&&t.r}).map(function(e){return{source:t[e.l.i],target:t[e.r.i]}})},e.triangles=function(t){var e=[];return ui(n(t)).cells.forEach(function(n,r){for(var i,a,o=n.site,u=n.edges.sort(Hr),s=-1,c=u.length,l=u[c-1].edge,h=l.l===o?l.r:l.l;++s=c,f=r>=l,d=(f<<1)+h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=fi()),h?i=c:u=c,f?o=l:s=l,a(t,e,n,r,i,o,u,s)}var l,h,f,d,p,g,y,m,v,b=De(u),_=De(s);if(null!=e)g=e,y=n,m=r,v=i;else if(m=v=-(g=y=1/0),h=[],f=[],p=t.length,o)for(d=0;p>d;++d)l=t[d],l.xm&&(m=l.x),l.y>v&&(v=l.y),h.push(l.x),f.push(l.y);else for(d=0;p>d;++d){var x=+b(l=t[d],d),w=+_(l,d);g>x&&(g=x),y>w&&(y=w),x>m&&(m=x),w>v&&(v=w),h.push(x),f.push(w)}var A=m-g,k=v-y;A>k?v=y+A:m=g+k;var E=fi();if(E.add=function(t){a(E,t,+b(t,++d),+_(t,d),g,y,m,v)},E.visit=function(t){di(t,E,g,y,m,v)},d=-1,null==e){for(;++d=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=oc.get(n)||ac,r=uc.get(r)||Me,_i(r(n.apply(null,Ko.call(arguments,1))))},Xo.interpolateHcl=Bi,Xo.interpolateHsl=Ni,Xo.interpolateLab=Oi,Xo.interpolateRound=Ii,Xo.transform=function(t){var e=Qo.createElementNS(Xo.ns.prefix.svg,"g");return(Xo.transform=function(t){if(null!=t){e.setAttribute("transform",t);var n=e.transform.baseVal.consolidate()}return new qi(n?n.matrix:sc)})(t)},qi.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var sc={a:1,b:0,c:0,d:1,e:0,f:0};Xo.interpolateTransform=Yi,Xo.layout={},Xo.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++nu*u/y){if(p>s){var c=e.charge/s;t.px-=a*c,t.py-=o*c}return!0}if(e.point&&s&&p>s){var c=e.pointCharge/s;t.px-=a*c,t.py-=o*c}}return!e.charge}}function e(t){t.px=Xo.event.x,t.py=Xo.event.y,u.resume()}var n,r,i,a,o,u={},s=Xo.dispatch("start","tick","end"),c=[1,1],l=.9,h=cc,f=lc,d=-30,p=hc,g=.1,y=.64,m=[],v=[];return u.tick=function(){if((r*=.99)<.005)return s.end({type:"end",alpha:r=0}),!0;var e,n,u,h,f,p,y,b,_,x=m.length,w=v.length;for(n=0;w>n;++n)u=v[n],h=u.source,f=u.target,b=f.x-h.x,_=f.y-h.y,(p=b*b+_*_)&&(p=r*a[n]*((p=Math.sqrt(p))-i[n])/p,b*=p,_*=p,f.x-=b*(y=h.weight/(f.weight+h.weight)),f.y-=_*y,h.x+=b*(y=1-y),h.y+=_*y);if((y=r*g)&&(b=c[0]/2,_=c[1]/2,n=-1,y))for(;++n0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),Xo.timer(u.tick)),u):r},u.start=function(){function t(t,r){if(!n){for(n=new Array(s),u=0;s>u;++u)n[u]=[];for(u=0;c>u;++u){var i=v[u];n[i.source.index].push(i.target),n[i.target.index].push(i.source)}}for(var a,o=n[e],u=-1,c=o.length;++ue;++e)(r=m[e]).index=e,r.weight=0;for(e=0;l>e;++e)r=v[e],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(e=0;s>e;++e)r=m[e],isNaN(r.x)&&(r.x=t("x",p)),isNaN(r.y)&&(r.y=t("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(i=[],"function"==typeof h)for(e=0;l>e;++e)i[e]=+h.call(this,v[e],e);else for(e=0;l>e;++e)i[e]=h;if(a=[],"function"==typeof f)for(e=0;l>e;++e)a[e]=+f.call(this,v[e],e);else for(e=0;l>e;++e)a[e]=f;if(o=[],"function"==typeof d)for(e=0;s>e;++e)o[e]=+d.call(this,m[e],e);else for(e=0;s>e;++e)o[e]=d;return u.resume()},u.resume=function(){return u.alpha(.1)},u.stop=function(){return u.alpha(0)},u.drag=function(){return n||(n=Xo.behavior.drag().origin(Me).on("dragstart.force",$i).on("drag.force",e).on("dragend.force",Wi)),arguments.length?void this.on("mouseover.force",Zi).on("mouseout.force",Xi).call(n):n},Xo.rebind(u,s,"on")};var cc=20,lc=1,hc=1/0;Xo.layout.hierarchy=function(){function t(i){var a,o=[i],u=[];for(i.depth=0;null!=(a=o.pop());)if(u.push(a),(c=n.call(t,a,a.depth))&&(s=c.length)){for(var s,c,l;--s>=0;)o.push(l=c[s]),l.parent=a,l.depth=a.depth+1;r&&(a.value=0),a.children=c}else r&&(a.value=+r.call(t,a,a.depth)||0),delete a.children;return ta(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),u}var e=ra,n=ea,r=na;return t.sort=function(n){return arguments.length?(e=n,t):e},t.children=function(e){return arguments.length?(n=e,t):n},t.value=function(e){return arguments.length?(r=e,t):r},t.revalue=function(e){return r&&(Qi(e,function(t){t.children&&(t.value=0)}),ta(e,function(e){var n;e.children||(e.value=+r.call(t,e,e.depth)||0),(n=e.parent)&&(n.value+=e.value)})),e},t},Xo.layout.partition=function(){function t(e,n,r,i){var a=e.children;if(e.x=n,e.y=e.depth*i,e.dx=r,e.dy=i,a&&(o=a.length)){var o,u,s,c=-1;for(r=e.value?r/e.value:0;++cp;++p)for(i.call(t,c[0][p],g=y[p],l[0][p][1]),d=1;f>d;++d)i.call(t,c[d][p],g+=l[d-1][p][1],l[d][p][1]);return u}var e=Me,n=sa,r=ca,i=ua,a=aa,o=oa;return t.values=function(n){return arguments.length?(e=n,t):e},t.order=function(e){return arguments.length?(n="function"==typeof e?e:dc.get(e)||sa,t):n},t.offset=function(e){return arguments.length?(r="function"==typeof e?e:pc.get(e)||ca,t):r},t.x=function(e){return arguments.length?(a=e,t):a},t.y=function(e){return arguments.length?(o=e,t):o},t.out=function(e){return arguments.length?(i=e,t):i},t};var dc=Xo.map({"inside-out":function(t){var e,n,r=t.length,i=t.map(la),a=t.map(ha),o=Xo.range(r).sort(function(t,e){return i[t]-i[e]}),u=0,s=0,c=[],l=[];for(e=0;r>e;++e)n=o[e],s>u?(u+=a[n],c.push(n)):(s+=a[n],l.push(n));return l.reverse().concat(c)},reverse:function(t){return Xo.range(t.length).reverse()},"default":sa}),pc=Xo.map({silhouette:function(t){var e,n,r,i=t.length,a=t[0].length,o=[],u=0,s=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];r>u&&(u=r),o.push(r)}for(n=0;a>n;++n)s[n]=(u-o[n])/2;return s},wiggle:function(t){var e,n,r,i,a,o,u,s,c,l=t.length,h=t[0],f=h.length,d=[];for(d[0]=s=c=0,n=1;f>n;++n){for(e=0,i=0;l>e;++e)i+=t[e][n][1];for(e=0,a=0,u=h[n][0]-h[n-1][0];l>e;++e){for(r=0,o=(t[e][n][1]-t[e][n-1][1])/(2*u);e>r;++r)o+=(t[r][n][1]-t[r][n-1][1])/u;a+=o*t[e][n][1]}d[n]=s-=i?a/i*u:0,c>s&&(c=s)}for(n=0;f>n;++n)d[n]-=c;return d},expand:function(t){var e,n,r,i=t.length,a=t[0].length,o=1/i,u=[];for(n=0;a>n;++n){for(e=0,r=0;i>e;e++)r+=t[e][n][1];if(r)for(e=0;i>e;e++)t[e][n][1]/=r;else for(e=0;i>e;e++)t[e][n][1]=o}for(n=0;a>n;++n)u[n]=0;return u},zero:ca});Xo.layout.histogram=function(){function t(t,a){for(var o,u,s=[],c=t.map(n,this),l=r.call(this,c,a),h=i.call(this,l,c,a),a=-1,f=c.length,d=h.length-1,p=e?1:1/f;++a0)for(a=-1;++a=l[0]&&u<=l[1]&&(o=s[Xo.bisect(h,u,1,d)-1],o.y+=p,o.push(t[a]));return s}var e=!0,n=Number,r=ga,i=da;return t.value=function(e){return arguments.length?(n=e,t):n},t.range=function(e){return arguments.length?(r=De(e),t):r},t.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return pa(t,e)}:De(e),t):i},t.frequency=function(n){return arguments.length?(e=!!n,t):e},t},Xo.layout.pack=function(){function t(t,a){var o=n.call(this,t,a),u=o[0],s=i[0],c=i[1],l=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(u.x=u.y=0,ta(u,function(t){t.r=+l(t.value)}),ta(u,_a),r){var h=r*(e?1:Math.max(2*u.r/s,2*u.r/c))/2;ta(u,function(t){t.r+=h}),ta(u,_a),ta(u,function(t){t.r-=h})}return Aa(u,s/2,c/2,e?1:1/Math.max(2*u.r/s,2*u.r/c)),o}var e,n=Xo.layout.hierarchy().sort(ya),r=0,i=[1,1];return t.size=function(e){return arguments.length?(i=e,t):i},t.radius=function(n){return arguments.length?(e=null==n||"function"==typeof n?n:+n,t):e},t.padding=function(e){return arguments.length?(r=+e,t):r},Ji(t,n)},Xo.layout.tree=function(){function t(t,i){var l=o.call(this,t,i),h=l[0],f=e(h);if(ta(f,n),f.parent.m=-f.z,Qi(f,r),c)Qi(h,a);else{var d=h,p=h,g=h;Qi(h,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var y=u(d,p)/2-d.x,m=s[0]/(p.x+u(p,d)/2+y),v=s[1]/(g.depth||1);Qi(h,function(t){t.x=(t.x+y)*m,t.y=t.depth*v})}return l}function e(t){for(var e,n={A:null,children:[t]},r=[n];null!=(e=r.pop());)for(var i,a=e.children,o=0,u=a.length;u>o;++o)r.push((a[o]=i={_:a[o],parent:e,children:(i=a[o].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=i);return n.children[0]}function n(t){var e=t.children,n=t.parent.children,r=t.i?n[t.i-1]:null;if(e.length){Ca(t);var a=(e[0].z+e[e.length-1].z)/2;r?(t.z=r.z+u(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+u(t._,r._));t.parent.A=i(t,r,t.parent.A||n[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,e,n){if(e){for(var r,i=t,a=t,o=e,s=i.parent.children[0],c=i.m,l=a.m,h=o.m,f=s.m;o=Ma(o),i=Da(i),o&&i;)s=Da(s),a=Ma(a),a.a=t,r=o.z+h-i.z-c+u(o._,i._),r>0&&(Sa(Ta(o,t,n),t,r),c+=r,l+=r),h+=o.m,c+=i.m,f+=s.m,l+=a.m;o&&!Ma(a)&&(a.t=o,a.m+=h-l),i&&!Da(s)&&(s.t=i,s.m+=c-f,n=t)}return n}function a(t){t.x*=s[0],t.y=t.depth*s[1]}var o=Xo.layout.hierarchy().sort(null).value(null),u=Ea,s=[1,1],c=null;return t.separation=function(e){return arguments.length?(u=e,t):u},t.size=function(e){return arguments.length?(c=null==(s=e)?a:null,t):c?null:s},t.nodeSize=function(e){return arguments.length?(c=null==(s=e)?null:a,t):c?s:null},Ji(t,o)},Xo.layout.cluster=function(){function t(t,a){var o,u=e.call(this,t,a),s=u[0],c=0;ta(s,function(t){var e=t.children;e&&e.length?(t.x=La(e),t.y=Fa(e)):(t.x=o?c+=n(t,o):0,t.y=0,o=t)});var l=Ba(s),h=Na(s),f=l.x-n(l,h)/2,d=h.x+n(h,l)/2;return ta(s,i?function(t){t.x=(t.x-s.x)*r[0],t.y=(s.y-t.y)*r[1]}:function(t){t.x=(t.x-f)/(d-f)*r[0],t.y=(1-(s.y?t.y/s.y:1))*r[1]}),u}var e=Xo.layout.hierarchy().sort(null).value(null),n=Ea,r=[1,1],i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(e){return arguments.length?(i=null==(r=e),t):i?null:r},t.nodeSize=function(e){return arguments.length?(i=null!=(r=e),t):i?r:null},Ji(t,e)},Xo.layout.treemap=function(){function t(t,e){for(var n,r,i=-1,a=t.length;++ie?0:e),n.area=isNaN(r)||0>=r?0:r}function e(n){var a=n.children;if(a&&a.length){var o,u,s,c=h(n),l=[],f=a.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&n.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(f,c.dx*c.dy/n.value),l.area=0;(s=f.length)>0;)l.push(o=f[s-1]),l.area+=o.area,"squarify"!==d||(u=r(l,g))<=p?(f.pop(),p=u):(l.area-=l.pop().area,i(l,g,c,!1),g=Math.min(c.dx,c.dy),l.length=l.area=0,p=1/0);l.length&&(i(l,g,c,!0),l.length=l.area=0),a.forEach(e)}}function n(e){var r=e.children;if(r&&r.length){var a,o=h(e),u=r.slice(),s=[];for(t(u,o.dx*o.dy/e.value),s.area=0;a=u.pop();)s.push(a),s.area+=a.area,null!=a.z&&(i(s,a.z?o.dx:o.dy,o,!u.length),s.length=s.area=0);r.forEach(n)}}function r(t,e){for(var n,r=t.area,i=0,a=1/0,o=-1,u=t.length;++on&&(a=n),n>i&&(i=n));return r*=r,e*=e,r?Math.max(e*i*p/r,r/(e*a*p)):1/0}function i(t,e,n,r){var i,a=-1,o=t.length,u=n.x,c=n.y,l=e?s(t.area/e):0;if(e==n.dx){for((r||l>n.dy)&&(l=n.dy);++an.dx)&&(l=n.dx);++an&&(e=1),1>n&&(t=0),function(){var n,r,i;do n=2*Math.random()-1,r=2*Math.random()-1,i=n*n+r*r;while(!i||i>1);return t+e*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=Xo.random.normal.apply(Xo,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=Xo.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;t>n;n++)e+=Math.random();return e}}},Xo.scale={};var gc={floor:Me,ceil:Me};Xo.scale.linear=function(){return za([0,1],[0,1],vi,!1)};var yc={s:1,g:1,p:1,r:1,e:1};Xo.scale.log=function(){return Ka(Xo.scale.linear().domain([0,1]),10,!0,[1,10])};var mc=Xo.format(".0e"),vc={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};Xo.scale.pow=function(){return Ja(Xo.scale.linear(),1,[0,1])},Xo.scale.sqrt=function(){return Xo.scale.pow().exponent(.5)},Xo.scale.ordinal=function(){return to([],{t:"range",a:[[]]})},Xo.scale.category10=function(){return Xo.scale.ordinal().range(bc)},Xo.scale.category20=function(){return Xo.scale.ordinal().range(_c)},Xo.scale.category20b=function(){return Xo.scale.ordinal().range(xc)},Xo.scale.category20c=function(){return Xo.scale.ordinal().range(wc)};var bc=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(be),_c=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(be),xc=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(be),wc=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(be); +Xo.scale.quantile=function(){return eo([],[])},Xo.scale.quantize=function(){return no(0,1,[0,1])},Xo.scale.threshold=function(){return ro([.5],[0,1])},Xo.scale.identity=function(){return io([0,1])},Xo.svg={},Xo.svg.arc=function(){function t(){var t=e.apply(this,arguments),a=n.apply(this,arguments),o=r.apply(this,arguments)+Ac,u=i.apply(this,arguments)+Ac,s=(o>u&&(s=o,o=u,u=s),u-o),c=Su>s?"0":"1",l=Math.cos(o),h=Math.sin(o),f=Math.cos(u),d=Math.sin(u);return s>=kc?t?"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"M0,"+t+"A"+t+","+t+" 0 1,0 0,"+-t+"A"+t+","+t+" 0 1,0 0,"+t+"Z":"M0,"+a+"A"+a+","+a+" 0 1,1 0,"+-a+"A"+a+","+a+" 0 1,1 0,"+a+"Z":t?"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L"+t*f+","+t*d+"A"+t+","+t+" 0 "+c+",0 "+t*l+","+t*h+"Z":"M"+a*l+","+a*h+"A"+a+","+a+" 0 "+c+",1 "+a*f+","+a*d+"L0,0Z"}var e=ao,n=oo,r=uo,i=so;return t.innerRadius=function(n){return arguments.length?(e=De(n),t):e},t.outerRadius=function(e){return arguments.length?(n=De(e),t):n},t.startAngle=function(e){return arguments.length?(r=De(e),t):r},t.endAngle=function(e){return arguments.length?(i=De(e),t):i},t.centroid=function(){var t=(e.apply(this,arguments)+n.apply(this,arguments))/2,a=(r.apply(this,arguments)+i.apply(this,arguments))/2+Ac;return[Math.cos(a)*t,Math.sin(a)*t]},t};var Ac=-Tu,kc=Cu-Fu;Xo.svg.line=function(){return co(Me)};var Ec=Xo.map({linear:lo,"linear-closed":ho,step:fo,"step-before":po,"step-after":go,basis:xo,"basis-open":wo,"basis-closed":Ao,bundle:ko,cardinal:vo,"cardinal-open":yo,"cardinal-closed":mo,monotone:To});Ec.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var Dc=[0,2/3,1/3,0],Mc=[0,1/3,2/3,0],Sc=[0,1/6,2/3,1/6];Xo.svg.line.radial=function(){var t=co(Fo);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},po.reverse=go,go.reverse=po,Xo.svg.area=function(){return Lo(Me)},Xo.svg.area.radial=function(){var t=Lo(Fo);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},Xo.svg.chord=function(){function t(t,u){var s=e(this,a,t,u),c=e(this,o,t,u);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(n(s,c)?i(s.r,s.p1,s.r,s.p0):i(s.r,s.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,s.r,s.p0))+"Z"}function e(t,e,n,r){var i=e.call(t,n,r),a=u.call(t,i,r),o=s.call(t,i,r)+Ac,l=c.call(t,i,r)+Ac;return{r:a,a0:o,a1:l,p0:[a*Math.cos(o),a*Math.sin(o)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function n(t,e){return t.a0==e.a0&&t.a1==e.a1}function r(t,e,n){return"A"+t+","+t+" 0 "+ +(n>Su)+",1 "+e}function i(t,e,n,r){return"Q 0,0 "+r}var a=br,o=_r,u=Bo,s=uo,c=so;return t.radius=function(e){return arguments.length?(u=De(e),t):u},t.source=function(e){return arguments.length?(a=De(e),t):a},t.target=function(e){return arguments.length?(o=De(e),t):o},t.startAngle=function(e){return arguments.length?(s=De(e),t):s},t.endAngle=function(e){return arguments.length?(c=De(e),t):c},t},Xo.svg.diagonal=function(){function t(t,i){var a=e.call(this,t,i),o=n.call(this,t,i),u=(a.y+o.y)/2,s=[a,{x:a.x,y:u},{x:o.x,y:u},o];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var e=br,n=_r,r=No;return t.source=function(n){return arguments.length?(e=De(n),t):e},t.target=function(e){return arguments.length?(n=De(e),t):n},t.projection=function(e){return arguments.length?(r=e,t):r},t},Xo.svg.diagonal.radial=function(){var t=Xo.svg.diagonal(),e=No,n=t.projection;return t.projection=function(t){return arguments.length?n(Oo(e=t)):e},t},Xo.svg.symbol=function(){function t(t,r){return(Cc.get(e.call(this,t,r))||Ro)(n.call(this,t,r))}var e=qo,n=Io;return t.type=function(n){return arguments.length?(e=De(n),t):e},t.size=function(e){return arguments.length?(n=De(e),t):n},t};var Cc=Xo.map({circle:Ro,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*Bc)),n=e*Bc;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/Lc),n=e*Lc/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});Xo.svg.symbolTypes=Cc.keys();var Tc,Fc,Lc=Math.sqrt(3),Bc=Math.tan(30*Bu),Nc=[],Oc=0;Nc.call=_u.call,Nc.empty=_u.empty,Nc.node=_u.node,Nc.size=_u.size,Xo.transition=function(t){return arguments.length?Tc?t.transition():t:Au.transition()},Xo.transition.prototype=Nc,Nc.select=function(t){var e,n,r,i=this.id,a=[];t=D(t);for(var o=-1,u=this.length;++oa;a++){i.push(e=[]);for(var n=this[a],u=0,s=n.length;s>u;u++)(r=n[u])&&t.call(r,r.__data__,u,a)&&e.push(r)}return Po(i,this.id)},Nc.tween=function(t,e){var n=this.id;return arguments.length<2?this.node().__transition__[n].tween.get(t):U(this,null==e?function(e){e.__transition__[n].tween.remove(t)}:function(r){r.__transition__[n].tween.set(t,e)})},Nc.attr=function(t,e){function n(){this.removeAttribute(u)}function r(){this.removeAttributeNS(u.space,u.local)}function i(t){return null==t?n:(t+="",function(){var e,n=this.getAttribute(u);return n!==t&&(e=o(n,t),function(t){this.setAttribute(u,e(t))})})}function a(t){return null==t?r:(t+="",function(){var e,n=this.getAttributeNS(u.space,u.local);return n!==t&&(e=o(n,t),function(t){this.setAttributeNS(u.space,u.local,e(t))})})}if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var o="transform"==t?Yi:vi,u=Xo.ns.qualify(t);return Uo(this,"attr."+t,e,u.local?a:i)},Nc.attrTween=function(t,e){function n(t,n){var r=e.call(this,t,n,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,n){var r=e.call(this,t,n,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=Xo.ns.qualify(t);return this.tween("attr."+t,i.local?r:n)},Nc.style=function(t,e,n){function r(){this.style.removeProperty(t)}function i(e){return null==e?r:(e+="",function(){var r,i=eu.getComputedStyle(this,null).getPropertyValue(t);return i!==e&&(r=vi(i,e),function(e){this.style.setProperty(t,r(e),n)})})}var a=arguments.length;if(3>a){if("string"!=typeof t){2>a&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}return Uo(this,"style."+t,e,i)},Nc.styleTween=function(t,e,n){function r(r,i){var a=e.call(this,r,i,eu.getComputedStyle(this,null).getPropertyValue(t));return a&&function(e){this.style.setProperty(t,a(e),n)}}return arguments.length<3&&(n=""),this.tween("style."+t,r)},Nc.text=function(t){return Uo(this,"text",t,Yo)},Nc.remove=function(){return this.each("end.transition",function(){var t;this.__transition__.count<2&&(t=this.parentNode)&&t.removeChild(this)})},Nc.ease=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].ease:("function"!=typeof t&&(t=Xo.ease.apply(Xo,arguments)),U(this,function(n){n.__transition__[e].ease=t}))},Nc.delay=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].delay:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].delay=+t.call(n,n.__data__,r,i)}:(t=+t,function(n){n.__transition__[e].delay=t}))},Nc.duration=function(t){var e=this.id;return arguments.length<1?this.node().__transition__[e].duration:U(this,"function"==typeof t?function(n,r,i){n.__transition__[e].duration=Math.max(1,t.call(n,n.__data__,r,i))}:(t=Math.max(1,t),function(n){n.__transition__[e].duration=t}))},Nc.each=function(t,e){var n=this.id;if(arguments.length<2){var r=Fc,i=Tc;Tc=n,U(this,function(e,r,i){Fc=e.__transition__[n],t.call(e,e.__data__,r,i)}),Fc=r,Tc=i}else U(this,function(r){var i=r.__transition__[n];(i.event||(i.event=Xo.dispatch("start","end"))).on(t,e)});return this},Nc.transition=function(){for(var t,e,n,r,i=this.id,a=++Oc,o=[],u=0,s=this.length;s>u;u++){o.push(t=[]);for(var e=this[u],c=0,l=e.length;l>c;c++)(n=e[c])&&(r=Object.create(n.__transition__[i]),r.delay+=r.duration,jo(n,c,a,r)),t.push(n)}return Po(o,a)},Xo.svg.axis=function(){function t(t){t.each(function(){var t,c=Xo.select(this),l=this.__chart__||n,h=this.__chart__=n.copy(),f=null==s?h.ticks?h.ticks.apply(h,u):h.domain():s,d=null==e?h.tickFormat?h.tickFormat.apply(h,u):Me:e,p=c.selectAll(".tick").data(f,h),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Fu),y=Xo.transition(p.exit()).style("opacity",Fu).remove(),m=Xo.transition(p.order()).style("opacity",1),v=Math.max(i,0)+o,b=Ra(h),_=c.selectAll(".domain").data([0]),x=(_.enter().append("path").attr("class","domain"),Xo.transition(_));g.append("line"),g.append("text");var w,A,k,E,D=g.select("line"),M=m.select("line"),S=p.select("text").text(d),C=g.select("text"),T=m.select("text"),F="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=zo,w="x",k="y",A="x2",E="y2",S.attr("dy",0>F?"0em":".71em").style("text-anchor","middle"),x.attr("d","M"+b[0]+","+F*a+"V0H"+b[1]+"V"+F*a)):(t=Vo,w="y",k="x",A="y2",E="x2",S.attr("dy",".32em").style("text-anchor",0>F?"end":"start"),x.attr("d","M"+F*a+","+b[0]+"H0V"+b[1]+"H"+F*a)),D.attr(E,F*i),C.attr(k,F*v),M.attr(A,0).attr(E,F*i),T.attr(w,0).attr(k,F*v),h.rangeBand){var L=h,B=L.rangeBand()/2;l=h=function(t){return L(t)+B}}else l.rangeBand?l=h:y.call(t,h,l);g.call(t,l,h),m.call(t,h,h)})}var e,n=Xo.scale.linear(),r=Ic,i=6,a=6,o=3,u=[10],s=null;return t.scale=function(e){return arguments.length?(n=e,t):n},t.orient=function(e){return arguments.length?(r=e in qc?e+"":Ic,t):r},t.ticks=function(){return arguments.length?(u=arguments,t):u},t.tickValues=function(e){return arguments.length?(s=e,t):s},t.tickFormat=function(n){return arguments.length?(e=n,t):e},t.tickSize=function(e){var n=arguments.length;return n?(i=+e,a=+arguments[n-1],t):i},t.innerTickSize=function(e){return arguments.length?(i=+e,t):i},t.outerTickSize=function(e){return arguments.length?(a=+e,t):a},t.tickPadding=function(e){return arguments.length?(o=+e,t):o},t.tickSubdivide=function(){return arguments.length&&t},t};var Ic="bottom",qc={top:1,right:1,bottom:1,left:1};Xo.svg.brush=function(){function t(a){a.each(function(){var a=Xo.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",i).on("touchstart.brush",i),o=a.selectAll(".background").data([0]);o.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),a.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var u=a.selectAll(".resize").data(p,Me);u.exit().remove(),u.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Rc[t]}).append("rect").attr("x",function(t){return/[ew]$/.test(t)?-3:null}).attr("y",function(t){return/^[ns]/.test(t)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),u.style("display",t.empty()?"none":null);var l,h=Xo.transition(a),f=Xo.transition(o);s&&(l=Ra(s),f.attr("x",l[0]).attr("width",l[1]-l[0]),n(h)),c&&(l=Ra(c),f.attr("y",l[0]).attr("height",l[1]-l[0]),r(h)),e(h)})}function e(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+l[+/e$/.test(t)]+","+h[+/^s/.test(t)]+")"})}function n(t){t.select(".extent").attr("x",l[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",l[1]-l[0])}function r(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function i(){function i(){32==Xo.event.keyCode&&(S||(v=null,T[0]-=l[1],T[1]-=h[1],S=2),w())}function p(){32==Xo.event.keyCode&&2==S&&(T[0]+=l[1],T[1]+=h[1],S=0,w())}function g(){var t=Xo.mouse(_),i=!1;b&&(t[0]+=b[0],t[1]+=b[1]),S||(Xo.event.altKey?(v||(v=[(l[0]+l[1])/2,(h[0]+h[1])/2]),T[0]=l[+(t[0]p?(i=r,r=p):i=p),g[0]!=r||g[1]!=i?(n?o=null:a=null,g[0]=r,g[1]=i,!0):void 0}function m(){g(),k.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),Xo.select("body").style("cursor",null),F.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),C(),A({type:"brushend"})}var v,b,_=this,x=Xo.select(Xo.event.target),A=u.of(_,arguments),k=Xo.select(_),E=x.datum(),D=!/^(n|s)$/.test(E)&&s,M=!/^(e|w)$/.test(E)&&c,S=x.classed("extent"),C=$(),T=Xo.mouse(_),F=Xo.select(eu).on("keydown.brush",i).on("keyup.brush",p);if(Xo.event.changedTouches?F.on("touchmove.brush",g).on("touchend.brush",m):F.on("mousemove.brush",g).on("mouseup.brush",m),k.interrupt().selectAll("*").interrupt(),S)T[0]=l[0]-T[0],T[1]=h[0]-T[1];else if(E){var L=+/w$/.test(E),B=+/^n/.test(E);b=[l[1-L]-T[0],h[1-B]-T[1]],T[0]=l[L],T[1]=h[B]}else Xo.event.altKey&&(v=T.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),Xo.select("body").style("cursor",x.style("cursor")),A({type:"brushstart"}),g()}var a,o,u=k(t,"brushstart","brush","brushend"),s=null,c=null,l=[0,0],h=[0,0],f=!0,d=!0,p=Pc[0];return t.event=function(t){t.each(function(){var t=u.of(this,arguments),e={x:l,y:h,i:a,j:o},n=this.__chart__||e;this.__chart__=e,Tc?Xo.select(this).transition().each("start.brush",function(){a=n.i,o=n.j,l=n.x,h=n.y,t({type:"brushstart"})}).tween("brush:brush",function(){var n=bi(l,e.x),r=bi(h,e.y);return a=o=null,function(i){l=e.x=n(i),h=e.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){a=e.i,o=e.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(e){return arguments.length?(s=e,p=Pc[!s<<1|!c],t):s},t.y=function(e){return arguments.length?(c=e,p=Pc[!s<<1|!c],t):c},t.clamp=function(e){return arguments.length?(s&&c?(f=!!e[0],d=!!e[1]):s?f=!!e:c&&(d=!!e),t):s&&c?[f,d]:s?f:c?d:null},t.extent=function(e){var n,r,i,u,f;return arguments.length?(s&&(n=e[0],r=e[1],c&&(n=n[0],r=r[0]),a=[n,r],s.invert&&(n=s(n),r=s(r)),n>r&&(f=n,n=r,r=f),(n!=l[0]||r!=l[1])&&(l=[n,r])),c&&(i=e[0],u=e[1],s&&(i=i[1],u=u[1]),o=[i,u],c.invert&&(i=c(i),u=c(u)),i>u&&(f=i,i=u,u=f),(i!=h[0]||u!=h[1])&&(h=[i,u])),t):(s&&(a?(n=a[0],r=a[1]):(n=l[0],r=l[1],s.invert&&(n=s.invert(n),r=s.invert(r)),n>r&&(f=n,n=r,r=f))),c&&(o?(i=o[0],u=o[1]):(i=h[0],u=h[1],c.invert&&(i=c.invert(i),u=c.invert(u)),i>u&&(f=i,i=u,u=f))),s&&c?[[n,i],[r,u]]:s?[n,r]:c&&[i,u])},t.clear=function(){return t.empty()||(l=[0,0],h=[0,0],a=o=null),t},t.empty=function(){return!!s&&l[0]==l[1]||!!c&&h[0]==h[1]},Xo.rebind(t,u,"on")};var Rc={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Pc=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Uc=as.format=hs.timeFormat,Yc=Uc.utc,jc=Yc("%Y-%m-%dT%H:%M:%S.%LZ");Uc.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ho:jc,Ho.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},Ho.toString=jc.toString,as.second=Ue(function(t){return new os(1e3*Math.floor(t/1e3))},function(t,e){t.setTime(t.getTime()+1e3*Math.floor(e))},function(t){return t.getSeconds()}),as.seconds=as.second.range,as.seconds.utc=as.second.utc.range,as.minute=Ue(function(t){return new os(6e4*Math.floor(t/6e4))},function(t,e){t.setTime(t.getTime()+6e4*Math.floor(e))},function(t){return t.getMinutes()}),as.minutes=as.minute.range,as.minutes.utc=as.minute.utc.range,as.hour=Ue(function(t){var e=t.getTimezoneOffset()/60;return new os(36e5*(Math.floor(t/36e5-e)+e))},function(t,e){t.setTime(t.getTime()+36e5*Math.floor(e))},function(t){return t.getHours()}),as.hours=as.hour.range,as.hours.utc=as.hour.utc.range,as.month=Ue(function(t){return t=as.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),as.months=as.month.range,as.months.utc=as.month.utc.range;var zc=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Vc=[[as.second,1],[as.second,5],[as.second,15],[as.second,30],[as.minute,1],[as.minute,5],[as.minute,15],[as.minute,30],[as.hour,1],[as.hour,3],[as.hour,6],[as.hour,12],[as.day,1],[as.day,2],[as.week,1],[as.month,1],[as.month,3],[as.year,1]],Hc=Uc.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}],["%Y",Cn]]),Gc={range:function(t,e,n){return Xo.range(Math.ceil(t/n)*n,+e,n).map($o)},floor:Me,ceil:Me};Vc.year=as.year,as.scale=function(){return Go(Xo.scale.linear(),Vc,Hc)};var $c=Vc.map(function(t){return[t[0].utc,t[1]]}),Wc=Yc.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&1!=t.getUTCDate()}],["%b %d",function(t){return 1!=t.getUTCDate()}],["%B",function(t){return t.getUTCMonth()}],["%Y",Cn]]);$c.year=as.year.utc,as.scale.utc=function(){return Go(Xo.scale.linear(),$c,Wc)},Xo.text=Se(function(t){return t.responseText}),Xo.json=function(t,e){return Ce(t,"application/json",Wo,e)},Xo.html=function(t,e){return Ce(t,"text/html",Zo,e)},Xo.xml=Se(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(Xo):"object"==typeof e&&e.exports&&(e.exports=Xo),this.d3=Xo}()},{}],2:[function(t,e){e.exports={graphlib:t("./lib/graphlib"),dagre:t("./lib/dagre"),intersect:t("./lib/intersect"),render:t("./lib/render"),util:t("./lib/util"),version:t("./lib/version")}},{"./lib/dagre":9,"./lib/graphlib":10,"./lib/intersect":11,"./lib/render":24,"./lib/util":26,"./lib/version":27}],3:[function(t,e){function n(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function r(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}function i(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),o=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(o,n[r+"Style"])}var a=t("./util");e.exports={"default":n,normal:n,vee:r,undirected:i}},{"./util":26}],4:[function(t,e){function n(t,e){var n=e.nodes().filter(function(t){return r.isSubgraph(e,t)}),i=t.selectAll("g.cluster").data(n,function(t){return t});i.enter().append("g").attr("class","cluster").style("opacity",0).append("rect"),r.applyTransition(i.exit(),e).style("opacity",0).remove(),r.applyTransition(i,e).style("opacity",1),r.applyTransition(i.selectAll("rect"),e).attr("width",function(t){return e.node(t).width}).attr("height",function(t){return e.node(t).height}).attr("x",function(t){var n=e.node(t);return n.x-n.width/2}).attr("y",function(t){var n=e.node(t);return n.y-n.height/2})}var r=t("./util");e.exports=n},{"./util":26}],5:[function(t,e){"use strict";function n(t,e){var n=t.selectAll("g.edgeLabel").data(e.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return n.selectAll("*").remove(),n.enter().append("g").classed("edgeLabel",!0).style("opacity",0),n.each(function(t){var n=e.edge(t),a=i(o.select(this),e.edge(t),0,0).classed("label",!0),u=a.node().getBBox();n.labelId&&a.attr("id",n.labelId),r.has(n,"width")||(n.width=u.width),r.has(n,"height")||(n.height=u.height)}),a.applyTransition(n.exit(),e).style("opacity",0).remove(),n}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],6:[function(t,e){"use strict";function n(t,e,n){var i=t.selectAll("g.edgePath").data(e.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return o(i,e),u(i,e),l.applyTransition(i,e).style("opacity",1),i.each(function(t){var n=h.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),l.applyClass(n,r["class"],(n.classed("update")?"update ":"")+"edgePath")}),i.selectAll("path.path").each(function(t){var n=e.edge(t);n.arrowheadId=s.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+n.arrowheadId+")"}).style("fill","none");l.applyTransition(i,e).attr("d",function(t){return r(e,t)}),l.applyStyle(i,n.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var r=e.edge(t),i=n[r.arrowhead];i(h.select(this),r.arrowheadId,r,"arrowhead")}),i}function r(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(c(r,o[0])),o.push(c(a,o[o.length-1])),i(n,o)}function i(t,e){var n=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return s.has(t,"lineInterpolate")&&n.interpolate(t.lineInterpolate),s.has(t,"lineTension")&&n.tension(Number(t.lineTension)),n(e)}function a(t){var e=t.getBBox(),n=t.getTransformToElement(t.ownerSVGElement).translate(e.width/2,e.height/2);return{x:n.e,y:n.f}}function o(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);n.append("path").attr("class","path").attr("d",function(t){var n=e.edge(t),r=e.node(t.v).elem,o=s.range(n.points.length).map(function(){return a(r)});return i(n,o)}),n.append("defs")}function u(t,e){var n=t.exit();l.applyTransition(n,e).style("opacity",0).remove(),l.applyTransition(n.select("path.path"),e).attr("d",function(t){var n=e.node(t.v);if(n){var r=s.range(this.pathSegList.length).map(function(){return n});return i({},r)}return h.select(this).attr("d")})}var s=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");e.exports=n},{"./d3":8,"./intersect/intersect-node":15,"./lodash":21,"./util":26}],7:[function(t,e){"use strict";function n(t,e,n){var u=e.nodes().filter(function(t){return!a.isSubgraph(e,t)}),s=t.selectAll("g.node").data(u,function(t){return t}).classed("update",!0);return s.selectAll("*").remove(),s.enter().append("g").attr("class","node").style("opacity",0),s.each(function(t){var u=e.node(t),s=o.select(this),c=s.append("g").attr("class","label"),l=i(c,u),h=n[u.shape],f=r.pick(l.node().getBBox(),"width","height");u.elem=this,u.id&&s.attr("id",u.id),u.labelId&&c.attr("id",u.labelId),a.applyClass(s,u["class"],(s.classed("update")?"update ":"")+"node"),r.has(u,"width")&&(f.width=u.width),r.has(u,"height")&&(f.height=u.height),f.width+=u.paddingLeft+u.paddingRight,f.height+=u.paddingTop+u.paddingBottom,c.attr("transform","translate("+(u.paddingLeft-u.paddingRight)/2+","+(u.paddingTop-u.paddingBottom)/2+")");var d=h(o.select(this),f,u);a.applyStyle(d,u.style);var p=d.node().getBBox();u.width=p.width,u.height=p.height}),a.applyTransition(s.exit(),e).style("opacity",0).remove(),s}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),o=t("./d3");e.exports=n},{"./d3":8,"./label/add-label":19,"./lodash":21,"./util":26}],8:[function(t,e){e.exports=window.d3},{}],9:[function(t,e){var n;if(t)try{n=t("dagre")}catch(r){}n||(n=window.dagre),e.exports=n},{dagre:28}],10:[function(t,e){var n;if(t)try{n=t("graphlib")}catch(r){}n||(n=window.graphlib),e.exports=n},{graphlib:58}],11:[function(t,e){e.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":12,"./intersect-ellipse":13,"./intersect-node":15,"./intersect-polygon":16,"./intersect-rect":17}],12:[function(t,e){function n(t,e,n){return r(t,e,e,n)}var r=t("./intersect-ellipse");e.exports=n},{"./intersect-ellipse":13}],13:[function(t,e){function n(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,u=a-r.y,s=Math.sqrt(e*e*u*u+n*n*o*o),c=Math.abs(e*n*o/s);r.xm?(m-y)/g:(m+y)/g,m=o*c-a*l,b=0>m?(m-y)/g:(m+y)/g,{x:v,y:b})}function r(t,e){return t*e>0}e.exports=n},{}],15:[function(t,e){function n(t,e){return t.intersect(e)}e.exports=n},{}],16:[function(t,e){function n(t,e,n){var i=t.x,a=t.y,o=[],u=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;e.forEach(function(t){u=Math.min(u,t.x),s=Math.min(s,t.y)});for(var c=i-t.width/2-u,l=a-t.height/2-s,h=0;h1&&o.sort(function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,u=e.y-n.y,s=Math.sqrt(o*o+u*u);return s>a?-1:a===s?0:1}),o[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");e.exports=n},{"./intersect-line":14}],17:[function(t,e){function n(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,u=e.y-a,s=t.width/2,c=t.height/2;return Math.abs(u)*s>Math.abs(o)*c?(0>u&&(c=-c),n=0===u?0:c*o/u,r=c):(0>o&&(s=-s),n=s,r=0===o?0:s*u/o),{x:i+n,y:a+r}}e.exports=n},{}],18:[function(t,e){function n(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div"),a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert(function(){return a});break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o,u;return i.each(function(){o=this.clientWidth,u=this.clientHeight}),n.attr("width",o).attr("height",u),n}var r=t("../util");e.exports=n},{"../util":26}],19:[function(t,e){function n(t,e){var n=e.label,a=t.append("g");"string"!=typeof n||"html"===e.labelType?i(a,e):r(a,e);var o=a.node().getBBox();return a.attr("transform","translate("+-o.width/2+","+-o.height/2+")"),a}var r=t("./add-text-label"),i=t("./add-html-label");e.exports=n},{"./add-html-label":18,"./add-text-label":20}],20:[function(t,e){function n(t,e){for(var n=t.append("text"),a=r(e.label).split("\n"),o=0;ou;++u)r(t,"borderLeft","_bl",n,o,u),r(t,"borderRight","_br",n,o,u)}}i.each(t.children(),e)}function r(t,e,n,r,i,o){var u={width:0,height:0,rank:o},s=i[e][o-1],c=a.addDummyNode(t,"border",u,n);i[e][o]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var i=t("./lodash"),a=t("./util");e.exports=n},{"./lodash":37,"./util":56}],31:[function(t,e){"use strict";function n(t){var e=t.graph().rankdir.toLowerCase();("lr"===e||"rl"===e)&&i(t)}function r(t){var e=t.graph().rankdir.toLowerCase();("bt"===e||"rl"===e)&&o(t),("lr"===e||"rl"===e)&&(s(t),i(t))}function i(t){l.each(t.nodes(),function(e){a(t.node(e))}),l.each(t.edges(),function(e){a(t.edge(e))})}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){l.each(t.nodes(),function(e){u(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,u),l.has(n,"y")&&u(n)})}function u(t){t.y=-t.y}function s(t){l.each(t.nodes(),function(e){c(t.node(e))}),l.each(t.edges(),function(e){var n=t.edge(e);l.each(n.points,c),l.has(n,"x")&&c(n)})}function c(t){var e=t.x;t.x=t.y,t.y=e}var l=t("./lodash");e.exports={adjust:n,undo:r}},{"./lodash":37}],32:[function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){return"_next"!==t&&"_prev"!==t?e:void 0}e.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;return e!==t?(r(e),e):void 0},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},{}],33:[function(t,e){function n(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)}),r.each(t.edges(),function(t){n.setEdge(t.v,t.w,{},t.name)}),r.each(e,function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,function(t,e){return n.setEdge(t,e,{style:"invis"}),e})}),n}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;e.exports={debugOrdering:n}},{"./graphlib":34,"./lodash":37,"./util":56}],34:[function(t,e){e.exports=t(10)},{graphlib:58}],35:[function(t,e){function n(t,e){if(t.nodeCount()<=1)return[];var n=a(t,e||l),i=r(n.graph,n.buckets,n.zeroIdx);return u.flatten(u.map(i,function(e){return t.outEdges(e.v,e.w)}),!0)}function r(t,e,n){for(var r,a=[],o=e[e.length-1],u=e[0];t.nodeCount();){for(;r=u.dequeue();)i(t,e,n,r);for(;r=o.dequeue();)i(t,e,n,r);if(t.nodeCount())for(var s=e.length-2;s>0;--s)if(r=e[s].dequeue()){a=a.concat(i(t,e,n,r,!0));break}}return a}function i(t,e,n,r,i){var a=i?[]:void 0;return u.each(t.inEdges(r.v),function(r){var u=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=u,o(e,n,s)}),u.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,u=t.node(a);u["in"]-=i,o(e,n,u)}),t.removeNode(r.v),a}function a(t,e){var n=new s,r=0,i=0;u.each(t.nodes(),function(t){n.setNode(t,{v:t,"in":0,out:0})}),u.each(t.edges(),function(t){var a=n.edge(t.v,t.w)||0,o=e(t),u=a+o;n.setEdge(t.v,t.w,u),i=Math.max(i,n.node(t.v).out+=o),r=Math.max(r,n.node(t.w)["in"]+=o)});var a=u.range(i+r+3).map(function(){return new c}),l=r+1;return u.each(n.nodes(),function(t){o(a,l,n.node(t))}),{graph:n,buckets:a,zeroIdx:l}}function o(t,e,n){n.out?n["in"]?t[n.out-n["in"]+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}var u=t("./lodash"),s=t("./graphlib").Graph,c=t("./data/list");e.exports=n;var l=u.constant(1)},{"./data/list":32,"./graphlib":34,"./lodash":37}],36:[function(t,e){"use strict";function n(t,e){var n=e&&e.debugTiming?L.time:L.notime;n("layout",function(){var e=n(" buildLayoutGraph",function(){return a(t)});n(" runLayout",function(){r(e,n)}),n(" updateInputGraph",function(){i(t,e)})})}function r(t,e){e(" makeSpaceForEdgeLabels",function(){o(t)}),e(" removeSelfEdges",function(){g(t)}),e(" acyclic",function(){x.run(t)}),e(" nestingGraph.run",function(){M.run(t)}),e(" rank",function(){A(L.asNonCompoundGraph(t))}),e(" injectEdgeLabelProxies",function(){u(t)}),e(" removeEmptyRanks",function(){D(t)}),e(" nestingGraph.cleanup",function(){M.cleanup(t)}),e(" normalizeRanks",function(){k(t)}),e(" assignRankMinMax",function(){s(t)}),e(" removeEdgeLabelProxies",function(){c(t)}),e(" normalize.run",function(){w.run(t)}),e(" parentDummyChains",function(){E(t)}),e(" addBorderSegments",function(){S(t)}),e(" order",function(){T(t)}),e(" insertSelfEdges",function(){y(t)}),e(" adjustCoordinateSystem",function(){C.adjust(t)}),e(" position",function(){F(t)}),e(" positionSelfEdges",function(){m(t)}),e(" removeBorderNodes",function(){p(t)}),e(" normalize.undo",function(){w.undo(t)}),e(" fixupEdgeLabelCoords",function(){f(t)}),e(" undoCoordinateSystem",function(){C.undo(t)}),e(" translateGraph",function(){l(t)}),e(" assignNodeIntersects",function(){h(t)}),e(" reversePoints",function(){d(t)}),e(" acyclic.undo",function(){x.undo(t)})}function i(t,e){_.each(t.nodes(),function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))}),_.each(t.edges(),function(n){var r=t.edge(n),i=e.edge(n);r.points=i.points,_.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}function a(t){var e=new B({multigraph:!0,compound:!0}),n=b(t.graph());return e.setGraph(_.merge({},O,v(n,N),_.pick(n,I))),_.each(t.nodes(),function(n){var r=b(t.node(n));e.setNode(n,_.defaults(v(r,q),R)),e.setParent(n,t.parent(n))}),_.each(t.edges(),function(n){var r=b(t.edge(n));e.setEdge(n,_.merge({},U,v(r,P),_.pick(r,Y)))}),e}function o(t){var e=t.graph();e.ranksep/=2,_.each(t.edges(),function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function u(t){_.each(t.edges(),function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i=t.node(e.w),a={rank:(i.rank-r.rank)/2+r.rank,e:e};L.addDummyNode(t,"edge-proxy",a,"_ep")}})}function s(t){var e=0;_.each(t.nodes(),function(n){var r=t.node(n);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,e=_.max(e,r.maxRank))}),t.graph().maxRank=e}function c(t){_.each(t.nodes(),function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))})}function l(t){function e(t){var e=t.x,o=t.y,u=t.width,s=t.height;n=Math.min(n,e-u/2),r=Math.max(r,e+u/2),i=Math.min(i,o-s/2),a=Math.max(a,o+s/2)}var n=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),u=o.marginx||0,s=o.marginy||0;_.each(t.nodes(),function(n){e(t.node(n))}),_.each(t.edges(),function(n){var r=t.edge(n);_.has(r,"x")&&e(r)}),n-=u,i-=s,_.each(t.nodes(),function(e){var r=t.node(e);r.x-=n,r.y-=i}),_.each(t.edges(),function(e){var r=t.edge(e);_.each(r.points,function(t){t.x-=n,t.y-=i}),_.has(r,"x")&&(r.x-=n),_.has(r,"y")&&(r.y-=i)}),o.width=r-n+u,o.height=a-i+s}function h(t){_.each(t.edges(),function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(L.intersectRect(a,n)),i.points.push(L.intersectRect(o,r))})}function f(t){_.each(t.edges(),function(e){var n=t.edge(e);if(_.has(n,"x"))switch(("l"===n.labelpos||"r"===n.labelpos)&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}})}function d(t){_.each(t.edges(),function(e){var n=t.edge(e);n.reversed&&n.points.reverse()})}function p(t){_.each(t.nodes(),function(e){if(t.children(e).length){var n=t.node(e),r=t.node(n.borderTop),i=t.node(n.borderBottom),a=t.node(_.last(n.borderLeft)),o=t.node(_.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),_.each(t.nodes(),function(e){"border"===t.node(e).dummy&&t.removeNode(e)})}function g(t){_.each(t.edges(),function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}})}function y(t){var e=L.buildLayerMatrix(t);_.each(e,function(e){var n=0;_.each(e,function(e,r){var i=t.node(e);i.order=r+n,_.each(i.selfEdges,function(e){L.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:i.rank,order:r+ ++n,e:e.e,label:e.label},"_se")}),delete i.selfEdges})})}function m(t){_.each(t.nodes(),function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,u=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-u},{x:i+5*o/6,y:a-u},{x:i+o,y:a},{x:i+5*o/6,y:a+u},{x:i+2*o/3,y:a+u}],n.label.x=n.x,n.label.y=n.y}})}function v(t,e){return _.mapValues(_.pick(t,e),Number)}function b(t){var e={};return _.each(t,function(t,n){e[n.toLowerCase()]=t}),e}var _=t("./lodash"),x=t("./acyclic"),w=t("./normalize"),A=t("./rank"),k=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),D=t("./util").removeEmptyRanks,M=t("./nesting-graph"),S=t("./add-border-segments"),C=t("./coordinate-system"),T=t("./order"),F=t("./position"),L=t("./util"),B=t("./graphlib").Graph;e.exports=n;var N=["nodesep","edgesep","ranksep","marginx","marginy"],O={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},I=["acyclicer","ranker","rankdir","align"],q=["width","height"],R={width:0,height:0},P=["minlen","weight","width","height","labeloffset"],U={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Y=["labelpos"]},{"./acyclic":29,"./add-border-segments":30,"./coordinate-system":31,"./graphlib":34,"./lodash":37,"./nesting-graph":38,"./normalize":39,"./order":44,"./parent-dummy-chains":49,"./position":51,"./rank":53,"./util":56}],37:[function(t,e){e.exports=t(21)},{lodash:82}],38:[function(t,e){function n(t){var e=s.addDummyNode(t,"root",{},"_root"),n=i(t),o=u.max(n)-1,c=2*o+1;t.graph().nestingRoot=e,u.each(t.edges(),function(e){t.edge(e).minlen*=c});var l=a(t)+1;u.each(t.children(),function(i){r(t,e,c,l,o,n,i)}),t.graph().nodeRankFactor=c}function r(t,e,n,i,a,o,c){var l=t.children(c);if(!l.length)return void(c!==e&&t.setEdge(e,c,{weight:0,minlen:n}));var h=s.addBorderNode(t,"_bt"),f=s.addBorderNode(t,"_bb"),d=t.node(c);t.setParent(h,c),d.borderTop=h,t.setParent(f,c),d.borderBottom=f,u.each(l,function(u){r(t,e,n,i,a,o,u);var s=t.node(u),l=s.borderTop?s.borderTop:u,d=s.borderBottom?s.borderBottom:u,p=s.borderTop?i:2*i,g=l!==d?1:a-o[c]+1;t.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(c)||t.setEdge(e,h,{weight:0,minlen:a+o[c]})}function i(t){function e(r,i){var a=t.children(r);a&&a.length&&u.each(a,function(t){e(t,i+1)}),n[r]=i}var n={};return u.each(t.children(),function(t){e(t,1)}),n}function a(t){return u.reduce(t.edges(),function(e,n){return e+t.edge(n).weight},0)}function o(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,u.each(t.edges(),function(e){var n=t.edge(e);n.nestingEdge&&t.removeEdge(e)})}var u=t("./lodash"),s=t("./util");e.exports={run:n,cleanup:o}},{"./lodash":37,"./util":56}],39:[function(t,e){"use strict";function n(t){t.graph().dummyChains=[],a.each(t.edges(),function(e){r(t,e)})}function r(t,e){var n=e.v,r=t.node(n).rank,i=e.w,a=t.node(i).rank,u=e.name,s=t.edge(e),c=s.labelRank;if(a!==r+1){t.removeEdge(e);var l,h,f;for(f=0,++r;a>r;++f,++r)s.points=[],h={width:0,height:0,edgeLabel:s,edgeObj:e,rank:r},l=o.addDummyNode(t,"edge",h,"_d"),r===c&&(h.width=s.width,h.height=s.height,h.dummy="edge-label",h.labelpos=s.labelpos),t.setEdge(n,l,{weight:s.weight},u),0===f&&t.graph().dummyChains.push(l),n=l;t.setEdge(n,i,{weight:s.weight},u)}}function i(t){a.each(t.graph().dummyChains,function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}var a=t("./lodash"),o=t("./util");e.exports={run:n,undo:i}},{"./lodash":37,"./util":56}],40:[function(t,e){function n(t,e,n){var i,a={};r.each(n,function(n){for(var r,o,u=t.parent(n);u;){if(r=t.parent(u),r?(o=a[r],a[r]=u):(o=i,i=u),o&&o!==u)return void e.setEdge(o,u);u=r}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],41:[function(t,e){function n(t,e){return r.map(e,function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}},{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}})}var r=t("../lodash");e.exports=n},{"../lodash":37}],42:[function(t,e){function n(t,e,n){var o=r(t),u=new a({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(e){return t.node(e)});return i.each(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(u.setNode(r),u.setParent(r,s||o),i.each(t[n](r),function(e){var n=e.v===r?e.w:e.v,a=u.edge(n,r),o=i.isUndefined(a)?0:a.weight;u.setEdge(n,r,{weight:t.edge(e).weight+o})}),i.has(a,"minRank")&&u.setNode(r,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),u}function r(t){for(var e;t.hasNode(e=i.uniqueId("_root")););return e}var i=t("../lodash"),a=t("../graphlib").Graph;e.exports=n},{"../graphlib":34,"../lodash":37}],43:[function(t,e){"use strict";function n(t,e){for(var n=0,i=1;i0;)e%2&&(n+=s[e+1]),e=e-1>>1,s[e]+=t.weight;c+=t.weight*n})),c}var i=t("../lodash");e.exports=n},{"../lodash":37}],44:[function(t,e){"use strict";function n(t){var e=d.maxRank(t),n=r(t,o.range(1,e+1),"inEdges"),c=r(t,o.range(e-1,-1,-1),"outEdges"),l=u(t);a(t,l);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;4>g;++p,++g){i(p%2?n:c,p%4>=2),l=d.buildLayerMatrix(t);var y=s(t,l);f>y&&(g=0,h=o.cloneDeep(l),f=y)}a(t,h)}function r(t,e,n){return o.map(e,function(e){return l(t,e,n)})}function i(t,e){var n=new f;o.each(t,function(t){var r=t.graph().root,i=c(t,r,n,e);o.each(i.vs,function(e,n){t.node(e).order=n}),h(t,n,i.vs)})}function a(t,e){o.each(e,function(e){o.each(e,function(e,n){t.node(e).order=n})})}var o=t("../lodash"),u=t("./init-order"),s=t("./cross-count"),c=t("./sort-subgraph"),l=t("./build-layer-graph"),h=t("./add-subgraph-constraints"),f=t("../graphlib").Graph,d=t("../util");e.exports=n},{"../graphlib":34,"../lodash":37,"../util":56,"./add-subgraph-constraints":40,"./build-layer-graph":42,"./cross-count":43,"./init-order":45,"./sort-subgraph":47}],45:[function(t,e){"use strict";function n(t){function e(i){if(!r.has(n,i)){n[i]=!0;var a=t.node(i);o[a.rank].push(i),r.each(t.successors(i),e)}}var n={},i=r.filter(t.nodes(),function(e){return!t.children(e).length}),a=r.max(r.map(i,function(e){return t.node(e).rank})),o=r.map(r.range(a+1),function(){return[]}),u=r.sortBy(i,function(e){return t.node(e).rank});return r.each(u,e),o}var r=t("../lodash");e.exports=n},{"../lodash":37}],46:[function(t,e){"use strict";function n(t,e){var n={};a.each(t,function(t,e){var r=n[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:e};a.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.each(e.edges(),function(t){var e=n[t.v],r=n[t.w];a.isUndefined(e)||a.isUndefined(r)||(r.indegree++,e.out.push(n[t.w]))});var i=a.filter(n,function(t){return!t.indegree});return r(i)}function r(t){function e(t){return function(e){e.merged||(a.isUndefined(e.barycenter)||a.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&i(t,e)}}function n(e){return function(n){n["in"].push(e),0===--n.indegree&&t.push(n)}}for(var r=[];t.length;){var o=t.pop();r.push(o),a.each(o["in"].reverse(),e(o)),a.each(o.out,n(o))}return a.chain(r).filter(function(t){return!t.merged}).map(function(t){return a.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}var a=t("../lodash");e.exports=n},{"../lodash":37}],47:[function(t,e){function n(t,e,c,l){var h=t.children(e),f=t.node(e),d=f?f.borderLeft:void 0,p=f?f.borderRight:void 0,g={};d&&(h=a.filter(h,function(t){return t!==d&&t!==p}));var y=o(t,h);a.each(y,function(e){if(t.children(e.v).length){var r=n(t,e.v,c,l);g[e.v]=r,a.has(r,"barycenter")&&i(e,r)}});var m=u(y,c);r(m,g);var v=s(m,l);if(d&&(v.vs=a.flatten([d,v.vs,p],!0),t.predecessors(d).length)){var b=t.node(t.predecessors(d)[0]),_=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+b.order+_.order)/(v.weight+2),v.weight+=2}return v}function r(t,e){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return e[t]?e[t].vs:t}),!0)})}function i(t,e){a.isUndefined(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var a=t("../lodash"),o=t("./barycenter"),u=t("./resolve-conflicts"),s=t("./sort");e.exports=n},{"../lodash":37,"./barycenter":41,"./resolve-conflicts":46,"./sort":48}],48:[function(t,e){function n(t,e){var n=o.partition(t,function(t){return a.has(t,"barycenter")}),u=n.lhs,s=a.sortBy(n.rhs,function(t){return-t.i}),c=[],l=0,h=0,f=0;u.sort(i(!!e)),f=r(c,s,f),a.each(u,function(t){f+=t.vs.length,c.push(t.vs),l+=t.barycenter*t.weight,h+=t.weight,f=r(c,s,f)});var d={vs:a.flatten(c,!0)};return h&&(d.barycenter=l/h,d.weight=h),d}function r(t,e,n){for(var r;e.length&&(r=a.last(e)).i<=n;)e.pop(),t.push(r.vs),n++;return n}function i(t){return function(e,n){return e.barycentern.barycenter?1:t?n.i-e.i:e.i-n.i}}var a=t("../lodash"),o=t("../util");e.exports=n},{"../lodash":37,"../util":56}],49:[function(t,e){function n(t){var e=i(t);a.each(t.graph().dummyChains,function(n){for(var i=t.node(n),a=i.edgeObj,o=r(t,e,a.v,a.w),u=o.path,s=o.lca,c=0,l=u[c],h=!0;n!==a.w;){if(i=t.node(n),h){for(;(l=u[c])!==s&&t.node(l).maxRanks||c>e[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)u.push(i);return{path:o.concat(u.reverse()),lca:a}}function i(t){function e(i){var o=r;a.each(t.children(i),e),n[i]={low:o,lim:r++}}var n={},r=0;return a.each(t.children(),e),n}var a=t("./lodash");e.exports=n},{"./lodash":37}],50:[function(t,e){"use strict";function n(t,e){function n(e,n){var o=0,u=0,s=e.length,c=y.last(n);return y.each(n,function(e,l){var h=i(t,e),f=h?t.node(h).order:s;(h||e===c)&&(y.each(n.slice(u,l+1),function(e){y.each(t.predecessors(e),function(n){var i=t.node(n),u=i.order;!(o>u||u>f)||i.dummy&&t.node(e).dummy||a(r,n,e)})}),u=l+1,o=f)}),n}var r={};return y.reduce(e,n),r}function r(t,e){function n(e,n,r,o,u){var s;y.each(y.range(n,r),function(n){s=e[n],t.node(s).dummy&&y.each(t.predecessors(s),function(e){var n=t.node(e);n.dummy&&(n.orderu)&&a(i,e,s)})})}function r(e,r){var i,a=-1,o=0;return y.each(r,function(u,s){if("border"===t.node(u).dummy){var c=t.predecessors(u);c.length&&(i=t.node(c[0]).order,n(r,o,s,a,i),o=s,a=i)}n(r,o,r.length,i,e.length)}),r}var i={};return y.reduce(e,r),i}function i(t,e){return t.node(e).dummy?y.find(t.predecessors(e),function(e){return t.node(e).dummy}):void 0}function a(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function o(t,e,n){if(e>n){var r=e;e=n,n=r}return y.has(t[e],n)}function u(t,e,n,r){var i={},a={},u={};return y.each(e,function(t){y.each(t,function(t,e){i[t]=t,a[t]=t,u[t]=e})}),y.each(e,function(t){var e=-1;y.each(t,function(t){var s=r(t);if(s.length){s=y.sortBy(s,function(t){return u[t]});for(var c=(s.length-1)/2,l=Math.floor(c),h=Math.ceil(c);h>=l;++l){var f=s[l];a[t]===t&&eo.lim&&(u=o,s=!0);var c=p.filter(e.edges(),function(e){return s===d(t,t.node(e.v),u)&&s!==d(t,t.node(e.w),u)});return p.min(c,function(t){return y(e,t)})}function l(t,e,n,i){var a=n.v,u=n.w;t.removeEdge(a,u),t.setEdge(i.v,i.w,{}),o(t),r(t,e),h(t,e)}function h(t,e){var n=p.find(t.nodes(),function(t){return!e.node(t).parent}),r=v(t,n);r=r.slice(1),p.each(r,function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)})}function f(t,e,n){return t.hasEdge(e,n)}function d(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}var p=t("../lodash"),g=t("./feasible-tree"),y=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,b=t("../graphlib").alg.postorder,_=t("../util").simplify;e.exports=n,n.initLowLimValues=o,n.initCutValues=r,n.calcCutValue=a,n.leaveEdge=s,n.enterEdge=c,n.exchangeEdges=l},{"../graphlib":34,"../lodash":37,"../util":56,"./feasible-tree":52,"./util":55}],55:[function(t,e){"use strict";function n(t){function e(r){var a=t.node(r);if(i.has(n,r))return a.rank;n[r]=!0;var o=i.min(i.map(t.outEdges(r),function(n){return e(n.w)-t.edge(n).minlen}));return o===Number.POSITIVE_INFINITY&&(o=0),a.rank=o}var n={};i.each(t.sources(),e)}function r(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var i=t("../lodash");e.exports={longestPath:n,slack:r}},{"../lodash":37}],56:[function(t,e){"use strict";function n(t,e,n,r){var i;do i=y.uniqueId(r);while(t.hasNode(i));return n.dummy=e,t.setNode(i,n),i}function r(t){var e=(new m).setGraph(t.graph());return y.each(t.nodes(),function(n){e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),e}function i(t){var e=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return y.each(t.nodes(),function(n){t.children(n).length||e.setNode(n,t.node(n))}),y.each(t.edges(),function(n){e.setEdge(n,t.edge(n))}),e}function a(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.outEdges(e),function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function o(t){var e=y.map(t.nodes(),function(e){var n={};return y.each(t.inEdges(e),function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight}),n});return y.zipObject(t.nodes(),e)}function u(t,e){var n=t.x,r=t.y,i=e.x-n,a=e.y-r,o=t.width/2,u=t.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var s,c;return Math.abs(a)*o>Math.abs(i)*u?(0>a&&(u=-u),s=u*i/a,c=u):(0>i&&(o=-o),s=o,c=o*a/i),{x:n+s,y:r+c}}function s(t){var e=y.map(y.range(f(t)+1),function(){return[]});return y.each(t.nodes(),function(n){var r=t.node(n),i=r.rank;y.isUndefined(i)||(e[i][r.order]=n)}),e}function c(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank}));y.each(t.nodes(),function(n){var r=t.node(n);y.has(r,"rank")&&(r.rank-=e)})}function l(t){var e=y.min(y.map(t.nodes(),function(e){return t.node(e).rank})),n=[];y.each(t.nodes(),function(r){var i=t.node(r).rank-e;y.has(n,i)||(n[i]=[]),n[i].push(r)});var r=0,i=t.graph().nodeRankFactor;y.each(n,function(e,n){y.isUndefined(e)&&n%i!==0?--r:r&&y.each(e,function(e){t.node(e).rank+=r})})}function h(t,e,r,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=i),n(t,"border",a,e)}function f(t){return y.max(y.map(t.nodes(),function(e){var n=t.node(e).rank;return y.isUndefined(n)?void 0:n}))}function d(t,e){var n={lhs:[],rhs:[]};return y.each(t,function(t){e(t)?n.lhs.push(t):n.rhs.push(t)}),n}function p(t,e){var n=y.now();try{return e()}finally{console.log(t+" time: "+(y.now()-n)+"ms")}}function g(t,e){return e()}var y=t("./lodash"),m=t("./graphlib").Graph;e.exports={addDummyNode:n,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:o,intersectRect:u,buildLayerMatrix:s,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:f,partition:d,time:p,notime:g}},{"./graphlib":34,"./lodash":37}],57:[function(t,e){e.exports="0.7.1"},{}],58:[function(t,e){var n=t("./lib");e.exports={Graph:n.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:n.version}},{"./lib":74,"./lib/alg":65,"./lib/json":75}],59:[function(t,e){function n(t){function e(a){r.has(i,a)||(i[a]=!0,n.push(a),r.each(t.successors(a),e),r.each(t.predecessors(a),e))}var n,i={},a=[];return r.each(t.nodes(),function(t){n=[],e(t),n.length&&a.push(n)}),a}var r=t("../lodash");e.exports=n},{"../lodash":76}],60:[function(t,e){function n(t,e,n){i.isArray(e)||(e=[e]);var a=[],o={};return i.each(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);r(t,e,"post"===n,o,a)}),a}function r(t,e,n,a,o){i.has(a,e)||(a[e]=!0,n||o.push(e),i.each(t.neighbors(e),function(e){r(t,e,n,a,o)}),n&&o.push(e))}var i=t("../lodash");e.exports=n},{"../lodash":76}],61:[function(t,e){function n(t,e,n){return i.transform(t.nodes(),function(i,a){i[a]=r(t,a,e,n)},{})}var r=t("./dijkstra"),i=t("../lodash"); +e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e,n,i){return r(t,String(e),n||o,i||function(e){return t.outEdges(e)})}function r(t,e,n,r){var i,o,u={},s=new a,c=function(t){var e=t.v!==i?t.v:t.w,r=u[e],a=n(t),c=o.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c0&&(i=s.removeMin(),o=u[i],o.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return u}var i=t("../lodash"),a=t("../data/priority-queue");e.exports=n;var o=i.constant(1)},{"../data/priority-queue":72,"../lodash":76}],63:[function(t,e){function n(t){return r.filter(i(t),function(t){return t.length>1})}var r=t("../lodash"),i=t("./tarjan");e.exports=n},{"../lodash":76,"./tarjan":70}],64:[function(t,e){function n(t,e,n){return r(t,e||a,n||function(e){return t.outEdges(e)})}function r(t,e,n){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})}),n(t).forEach(function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var e=r[t];i.forEach(function(n){var a=r[n];i.forEach(function(n){var r=a[t],i=e[n],o=a[n],u=r.distance+i.distance;ui&&(s[n]=o,c.decrease(n,i))}}var o,u=new i,s={},c=new a;if(0===t.nodeCount())return u;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),u.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(o=c.removeMin(),r.has(s,o))u.setEdge(o,s[o]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(o).forEach(n)}return u}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");e.exports=n},{"../data/priority-queue":72,"../graph":73,"../lodash":76}],70:[function(t,e){function n(t){function e(u){var s=a[u]={onStack:!0,lowlink:n,index:n++};if(i.push(u),t.successors(u).forEach(function(t){r.has(a,t)?a[t].onStack&&(s.lowlink=Math.min(s.lowlink,a[t].index)):(e(t),s.lowlink=Math.min(s.lowlink,a[t].lowlink))}),s.lowlink===s.index){var c,l=[];do c=i.pop(),a[c].onStack=!1,l.push(c);while(u!==c);o.push(l)}}var n=0,i=[],a={},o=[];return t.nodes().forEach(function(t){r.has(a,t)||e(t)}),o}var r=t("../lodash");e.exports=n},{"../lodash":76}],71:[function(t,e){function n(t){function e(u){if(i.has(a,u))throw new r;i.has(n,u)||(a[u]=!0,n[u]=!0,i.each(t.predecessors(u),e),delete a[u],o.push(u))}var n={},a={},o=[];if(i.each(t.sinks(),e),i.size(n)!==t.nodeCount())throw new r;return o}function r(){}var i=t("../lodash");e.exports=n,n.CycleException=r},{"../lodash":76}],72:[function(t,e){function n(){this._arr=[],this._keyIndices={}}var r=t("../lodash");e.exports=n,n.prototype.size=function(){return this._arr.length},n.prototype.keys=function(){return this._arr.map(function(t){return t.key})},n.prototype.has=function(t){return r.has(this._keyIndices,t)},n.prototype.priority=function(t){var e=this._keyIndices[t];return void 0!==e?this._arr[e].priority:void 0},n.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},n.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},n.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},n.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},n.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n>1,!(n[e].priorityn){var i=e;e=n,n=i}return e+h+n+h+(s.isUndefined(r)?c:r)}function o(t,e,n,r){if(!t&&e>n){var i=e;e=n,n=i}var a={v:e,w:n};return r&&(a.name=r),a}function u(t,e){return a(t,e.v,e.w,e.name)}var s=t("./lodash");e.exports=n;var c="\x00",l="\x00",h="";n.prototype._nodeCount=0,n.prototype._edgeCount=0,n.prototype.isDirected=function(){return this._isDirected},n.prototype.isMultigraph=function(){return this._isMultigraph},n.prototype.isCompound=function(){return this._isCompound},n.prototype.setGraph=function(t){return this._label=t,this},n.prototype.graph=function(){return this._label},n.prototype.setDefaultNodeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultNodeLabelFn=t,this},n.prototype.nodeCount=function(){return this._nodeCount},n.prototype.nodes=function(){return s.keys(this._nodes)},n.prototype.sources=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._in[t])},this)},n.prototype.sinks=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._out[t])},this)},n.prototype.setNodes=function(t,e){var n=arguments;return s.each(t,function(t){n.length>1?this.setNode(t,e):this.setNode(t)},this),this},n.prototype.setNode=function(t,e){return s.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=l,this._children[t]={},this._children[l][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},n.prototype.node=function(t){return this._nodes[t]},n.prototype.hasNode=function(t){return s.has(this._nodes,t)},n.prototype.removeNode=function(t){var e=this;if(s.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],s.each(this.children(t),function(t){this.setParent(t)},this),delete this._children[t]),s.each(s.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],s.each(s.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},n.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(s.isUndefined(e))e=l;else{for(var n=e;!s.isUndefined(n);n=this.parent(n))if(n===t)throw new Error("Setting "+e+" as parent of "+t+" would create create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this},n.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},n.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==l)return e}},n.prototype.children=function(t){if(s.isUndefined(t)&&(t=l),this._isCompound){var e=this._children[t];if(e)return s.keys(e)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},n.prototype.predecessors=function(t){var e=this._preds[t];return e?s.keys(e):void 0},n.prototype.successors=function(t){var e=this._sucs[t];return e?s.keys(e):void 0},n.prototype.neighbors=function(t){var e=this.predecessors(t);return e?s.union(e,this.successors(t)):void 0},n.prototype.setDefaultEdgeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultEdgeLabelFn=t,this},n.prototype.edgeCount=function(){return this._edgeCount},n.prototype.edges=function(){return s.values(this._edgeObjs)},n.prototype.setPath=function(t,e){var n=this,r=arguments;return s.reduce(t,function(t,i){return r.length>1?n.setEdge(t,i,e):n.setEdge(t,i),i}),this},n.prototype.setEdge=function(){var t,e,n,i,u=!1;s.isPlainObject(arguments[0])?(t=arguments[0].v,e=arguments[0].w,n=arguments[0].name,2===arguments.length&&(i=arguments[1],u=!0)):(t=arguments[0],e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],u=!0)),t=""+t,e=""+e,s.isUndefined(n)||(n=""+n);var c=a(this._isDirected,t,e,n);if(s.has(this._edgeLabels,c))return u&&(this._edgeLabels[c]=i),this;if(!s.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[c]=u?i:this._defaultEdgeLabelFn(t,e,n);var l=o(this._isDirected,t,e,n);return t=l.v,e=l.w,Object.freeze(l),this._edgeObjs[c]=l,r(this._preds[e],t),r(this._sucs[t],e),this._in[e][c]=l,this._out[t][c]=l,this._edgeCount++,this},n.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return this._edgeLabels[r]},n.prototype.hasEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n);return s.has(this._edgeLabels,r)},n.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):a(this._isDirected,t,e,n),o=this._edgeObjs[r];return o&&(t=o.v,e=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[e],t),i(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},n.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.v===e}):r}},n.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var r=s.values(n);return e?s.filter(r,function(t){return t.w===e}):r}},n.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);return n?n.concat(this.outEdges(t,e)):void 0}},{"./lodash":76}],74:[function(t,e){e.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":73,"./version":77}],75:[function(t,e){function n(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:r(t),edges:i(t)};return o.isUndefined(t.graph())||(e.value=o.clone(t.graph())),e}function r(t){return o.map(t.nodes(),function(e){var n=t.node(e),r=t.parent(e),i={v:e};return o.isUndefined(n)||(i.value=n),o.isUndefined(r)||(i.parent=r),i})}function i(t){return o.map(t.edges(),function(e){var n=t.edge(e),r={v:e.v,w:e.w};return o.isUndefined(e.name)||(r.name=e.name),o.isUndefined(n)||(r.value=n),r})}function a(t){var e=new u(t.options).setGraph(t.value);return o.each(t.nodes,function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)}),o.each(t.edges,function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),e}var o=t("./lodash"),u=t("./graph");e.exports={write:n,read:a}},{"./graph":73,"./lodash":76}],76:[function(t,e){e.exports=t(21)},{lodash:82}],77:[function(t,e){e.exports="1.0.1"},{}],78:[function(){},{}],79:[function(t,e,n){(function(t){function e(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(n=o+"/"+n,i="/"===o.charAt(0))}return n=e(r(n.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+n||"."},n.normalize=function(t){var i=n.isAbsolute(t),a="/"===o(t,-1);return t=e(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},n.isAbsolute=function(t){return"/"===t.charAt(0)},n.join=function(){var t=Array.prototype.slice.call(arguments,0);return n.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},n.relative=function(t,e){function r(t){for(var e=0;e=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=n.resolve(t).substr(1),e=n.resolve(e).substr(1);for(var i=r(t.split("/")),a=r(e.split("/")),o=Math.min(i.length,a.length),u=o,s=0;o>s;s++)if(i[s]!==a[s]){u=s;break}for(var c=[],s=u;se&&(e=t.length+e),t.substr(e,n)}}).call(this,t("1YiZ5S"))},{"1YiZ5S":80}],80:[function(t,e){function n(){}var r=e.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){var e=t.source;if((e===window||null===e)&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var r=n.shift();r()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=n,r.addListener=n,r.once=n,r.off=n,r.removeListener=n,r.removeAllListeners=n,r.emit=n,r.binding=function(){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(){throw new Error("process.chdir is not supported")}},{}],81:[function(t,e,n){(function(t){!function(r){var i="object"==typeof n&&n,a="object"==typeof e&&e&&e.exports==i&&e,o="object"==typeof t&&t;(o.global===o||o.window===o)&&(r=o);var u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=/[\x01-\x7F]/g,c=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,l=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,h={"Á":"Aacute","á":"aacute","Ă":"Abreve","ă":"abreve","∾":"ac","∿":"acd","∾̳":"acE","Â":"Acirc","â":"acirc","´":"acute","А":"Acy","а":"acy","Æ":"AElig","æ":"aelig","⁡":"af","𝔄":"Afr","𝔞":"afr","À":"Agrave","à":"agrave","ℵ":"aleph","Α":"Alpha","α":"alpha","Ā":"Amacr","ā":"amacr","⨿":"amalg","&":"amp","⩕":"andand","⩓":"And","∧":"and","⩜":"andd","⩘":"andslope","⩚":"andv","∠":"ang","⦤":"ange","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","∡":"angmsd","∟":"angrt","⊾":"angrtvb","⦝":"angrtvbd","∢":"angsph","Å":"angst","⍼":"angzarr","Ą":"Aogon","ą":"aogon","𝔸":"Aopf","𝕒":"aopf","⩯":"apacir","≈":"ap","⩰":"apE","≊":"ape","≋":"apid","'":"apos","å":"aring","𝒜":"Ascr","𝒶":"ascr","≔":"colone","*":"ast","≍":"CupCap","Ã":"Atilde","ã":"atilde","Ä":"Auml","ä":"auml","∳":"awconint","⨑":"awint","≌":"bcong","϶":"bepsi","‵":"bprime","∽":"bsim","⋍":"bsime","∖":"setmn","⫧":"Barv","⊽":"barvee","⌅":"barwed","⌆":"Barwed","⎵":"bbrk","⎶":"bbrktbrk","Б":"Bcy","б":"bcy","„":"bdquo","∵":"becaus","⦰":"bemptyv","ℬ":"Bscr","Β":"Beta","β":"beta","ℶ":"beth","≬":"twixt","𝔅":"Bfr","𝔟":"bfr","⋂":"xcap","◯":"xcirc","⋃":"xcup","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨆":"xsqcup","★":"starf","▽":"xdtri","△":"xutri","⨄":"xuplus","⋁":"Vee","⋀":"Wedge","⤍":"rbarr","⧫":"lozf","▪":"squf","▴":"utrif","▾":"dtrif","◂":"ltrif","▸":"rtrif","␣":"blank","▒":"blk12","░":"blk14","▓":"blk34","█":"block","=⃥":"bne","≡⃥":"bnequiv","⫭":"bNot","⌐":"bnot","𝔹":"Bopf","𝕓":"bopf","⊥":"bot","⋈":"bowtie","⧉":"boxbox","┐":"boxdl","╕":"boxdL","╖":"boxDl","╗":"boxDL","┌":"boxdr","╒":"boxdR","╓":"boxDr","╔":"boxDR","─":"boxh","═":"boxH","┬":"boxhd","╤":"boxHd","╥":"boxhD","╦":"boxHD","┴":"boxhu","╧":"boxHu","╨":"boxhU","╩":"boxHU","⊟":"minusb","⊞":"plusb","⊠":"timesb","┘":"boxul","╛":"boxuL","╜":"boxUl","╝":"boxUL","└":"boxur","╘":"boxuR","╙":"boxUr","╚":"boxUR","│":"boxv","║":"boxV","┼":"boxvh","╪":"boxvH","╫":"boxVh","╬":"boxVH","┤":"boxvl","╡":"boxvL","╢":"boxVl","╣":"boxVL","├":"boxvr","╞":"boxvR","╟":"boxVr","╠":"boxVR","˘":"breve","¦":"brvbar","𝒷":"bscr","⁏":"bsemi","⧅":"bsolb","\\":"bsol","⟈":"bsolhsub","•":"bull","≎":"bump","⪮":"bumpE","≏":"bumpe","Ć":"Cacute","ć":"cacute","⩄":"capand","⩉":"capbrcup","⩋":"capcap","∩":"cap","⋒":"Cap","⩇":"capcup","⩀":"capdot","ⅅ":"DD","∩︀":"caps","⁁":"caret","ˇ":"caron","ℭ":"Cfr","⩍":"ccaps","Č":"Ccaron","č":"ccaron","Ç":"Ccedil","ç":"ccedil","Ĉ":"Ccirc","ĉ":"ccirc","∰":"Cconint","⩌":"ccups","⩐":"ccupssm","Ċ":"Cdot","ċ":"cdot","¸":"cedil","⦲":"cemptyv","¢":"cent","·":"middot","𝔠":"cfr","Ч":"CHcy","ч":"chcy","✓":"check","Χ":"Chi","χ":"chi","ˆ":"circ","≗":"cire","↺":"olarr","↻":"orarr","⊛":"oast","⊚":"ocir","⊝":"odash","⊙":"odot","®":"reg","Ⓢ":"oS","⊖":"ominus","⊕":"oplus","⊗":"otimes","○":"cir","⧃":"cirE","⨐":"cirfnint","⫯":"cirmid","⧂":"cirscir","∲":"cwconint","”":"rdquo","’":"rsquo","♣":"clubs",":":"colon","∷":"Colon","⩴":"Colone",",":"comma","@":"commat","∁":"comp","∘":"compfn","ℂ":"Copf","≅":"cong","⩭":"congdot","≡":"equiv","∮":"oint","∯":"Conint","𝕔":"copf","∐":"coprod","©":"copy","℗":"copysr","↵":"crarr","✗":"cross","⨯":"Cross","𝒞":"Cscr","𝒸":"cscr","⫏":"csub","⫑":"csube","⫐":"csup","⫒":"csupe","⋯":"ctdot","⤸":"cudarrl","⤵":"cudarrr","⋞":"cuepr","⋟":"cuesc","↶":"cularr","⤽":"cularrp","⩈":"cupbrcap","⩆":"cupcap","∪":"cup","⋓":"Cup","⩊":"cupcup","⊍":"cupdot","⩅":"cupor","∪︀":"cups","↷":"curarr","⤼":"curarrm","⋎":"cuvee","⋏":"cuwed","¤":"curren","∱":"cwint","⌭":"cylcty","†":"dagger","‡":"Dagger","ℸ":"daleth","↓":"darr","↡":"Darr","⇓":"dArr","‐":"dash","⫤":"Dashv","⊣":"dashv","⤏":"rBarr","˝":"dblac","Ď":"Dcaron","ď":"dcaron","Д":"Dcy","д":"dcy","⇊":"ddarr","ⅆ":"dd","⤑":"DDotrahd","⩷":"eDDot","°":"deg","∇":"Del","Δ":"Delta","δ":"delta","⦱":"demptyv","⥿":"dfisht","𝔇":"Dfr","𝔡":"dfr","⥥":"dHar","⇃":"dharl","⇂":"dharr","˙":"dot","`":"grave","˜":"tilde","⋄":"diam","♦":"diams","¨":"die","ϝ":"gammad","⋲":"disin","÷":"div","⋇":"divonx","Ђ":"DJcy","ђ":"djcy","⌞":"dlcorn","⌍":"dlcrop",$:"dollar","𝔻":"Dopf","𝕕":"dopf","⃜":"DotDot","≐":"doteq","≑":"eDot","∸":"minusd","∔":"plusdo","⊡":"sdotb","⇐":"lArr","⇔":"iff","⟸":"xlArr","⟺":"xhArr","⟹":"xrArr","⇒":"rArr","⊨":"vDash","⇑":"uArr","⇕":"vArr","∥":"par","⤓":"DownArrowBar","⇵":"duarr","̑":"DownBreve","⥐":"DownLeftRightVector","⥞":"DownLeftTeeVector","⥖":"DownLeftVectorBar","↽":"lhard","⥟":"DownRightTeeVector","⥗":"DownRightVectorBar","⇁":"rhard","↧":"mapstodown","⊤":"top","⤐":"RBarr","⌟":"drcorn","⌌":"drcrop","𝒟":"Dscr","𝒹":"dscr","Ѕ":"DScy","ѕ":"dscy","⧶":"dsol","Đ":"Dstrok","đ":"dstrok","⋱":"dtdot","▿":"dtri","⥯":"duhar","⦦":"dwangle","Џ":"DZcy","џ":"dzcy","⟿":"dzigrarr","É":"Eacute","é":"eacute","⩮":"easter","Ě":"Ecaron","ě":"ecaron","Ê":"Ecirc","ê":"ecirc","≖":"ecir","≕":"ecolon","Э":"Ecy","э":"ecy","Ė":"Edot","ė":"edot","ⅇ":"ee","≒":"efDot","𝔈":"Efr","𝔢":"efr","⪚":"eg","È":"Egrave","è":"egrave","⪖":"egs","⪘":"egsdot","⪙":"el","∈":"in","⏧":"elinters","ℓ":"ell","⪕":"els","⪗":"elsdot","Ē":"Emacr","ē":"emacr","∅":"empty","◻":"EmptySmallSquare","▫":"EmptyVerySmallSquare"," ":"emsp13"," ":"emsp14"," ":"emsp","Ŋ":"ENG","ŋ":"eng"," ":"ensp","Ę":"Eogon","ę":"eogon","𝔼":"Eopf","𝕖":"eopf","⋕":"epar","⧣":"eparsl","⩱":"eplus","ε":"epsi","Ε":"Epsilon","ϵ":"epsiv","≂":"esim","⩵":"Equal","=":"equals","≟":"equest","⇌":"rlhar","⩸":"equivDD","⧥":"eqvparsl","⥱":"erarr","≓":"erDot","ℯ":"escr","ℰ":"Escr","⩳":"Esim","Η":"Eta","η":"eta","Ð":"ETH","ð":"eth","Ë":"Euml","ë":"euml","€":"euro","!":"excl","∃":"exist","Ф":"Fcy","ф":"fcy","♀":"female","ffi":"ffilig","ff":"fflig","ffl":"ffllig","𝔉":"Ffr","𝔣":"ffr","fi":"filig","◼":"FilledSmallSquare",fj:"fjlig","♭":"flat","fl":"fllig","▱":"fltns","ƒ":"fnof","𝔽":"Fopf","𝕗":"fopf","∀":"forall","⋔":"fork","⫙":"forkv","ℱ":"Fscr","⨍":"fpartint","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","⅔":"frac23","⅖":"frac25","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","⁄":"frasl","⌢":"frown","𝒻":"fscr","ǵ":"gacute","Γ":"Gamma","γ":"gamma","Ϝ":"Gammad","⪆":"gap","Ğ":"Gbreve","ğ":"gbreve","Ģ":"Gcedil","Ĝ":"Gcirc","ĝ":"gcirc","Г":"Gcy","г":"gcy","Ġ":"Gdot","ġ":"gdot","≥":"ge","≧":"gE","⪌":"gEl","⋛":"gel","⩾":"ges","⪩":"gescc","⪀":"gesdot","⪂":"gesdoto","⪄":"gesdotol","⋛︀":"gesl","⪔":"gesles","𝔊":"Gfr","𝔤":"gfr","≫":"gg","⋙":"Gg","ℷ":"gimel","Ѓ":"GJcy","ѓ":"gjcy","⪥":"gla","≷":"gl","⪒":"glE","⪤":"glj","⪊":"gnap","⪈":"gne","≩":"gnE","⋧":"gnsim","𝔾":"Gopf","𝕘":"gopf","⪢":"GreaterGreater","≳":"gsim","𝒢":"Gscr","ℊ":"gscr","⪎":"gsime","⪐":"gsiml","⪧":"gtcc","⩺":"gtcir",">":"gt","⋗":"gtdot","⦕":"gtlPar","⩼":"gtquest","⥸":"gtrarr","≩︀":"gvnE"," ":"hairsp","ℋ":"Hscr","Ъ":"HARDcy","ъ":"hardcy","⥈":"harrcir","↔":"harr","↭":"harrw","^":"Hat","ℏ":"hbar","Ĥ":"Hcirc","ĥ":"hcirc","♥":"hearts","…":"mldr","⊹":"hercon","𝔥":"hfr","ℌ":"Hfr","⤥":"searhk","⤦":"swarhk","⇿":"hoarr","∻":"homtht","↩":"larrhk","↪":"rarrhk","𝕙":"hopf","ℍ":"Hopf","―":"horbar","𝒽":"hscr","Ħ":"Hstrok","ħ":"hstrok","⁃":"hybull","Í":"Iacute","í":"iacute","⁣":"ic","Î":"Icirc","î":"icirc","И":"Icy","и":"icy","İ":"Idot","Е":"IEcy","е":"iecy","¡":"iexcl","𝔦":"ifr","ℑ":"Im","Ì":"Igrave","ì":"igrave","ⅈ":"ii","⨌":"qint","∭":"tint","⧜":"iinfin","℩":"iiota","IJ":"IJlig","ij":"ijlig","Ī":"Imacr","ī":"imacr","ℐ":"Iscr","ı":"imath","⊷":"imof","Ƶ":"imped","℅":"incare","∞":"infin","⧝":"infintie","⊺":"intcal","∫":"int","∬":"Int","ℤ":"Zopf","⨗":"intlarhk","⨼":"iprod","⁢":"it","Ё":"IOcy","ё":"iocy","Į":"Iogon","į":"iogon","𝕀":"Iopf","𝕚":"iopf","Ι":"Iota","ι":"iota","¿":"iquest","𝒾":"iscr","⋵":"isindot","⋹":"isinE","⋴":"isins","⋳":"isinsv","Ĩ":"Itilde","ĩ":"itilde","І":"Iukcy","і":"iukcy","Ï":"Iuml","ï":"iuml","Ĵ":"Jcirc","ĵ":"jcirc","Й":"Jcy","й":"jcy","𝔍":"Jfr","𝔧":"jfr","ȷ":"jmath","𝕁":"Jopf","𝕛":"jopf","𝒥":"Jscr","𝒿":"jscr","Ј":"Jsercy","ј":"jsercy","Є":"Jukcy","є":"jukcy","Κ":"Kappa","κ":"kappa","ϰ":"kappav","Ķ":"Kcedil","ķ":"kcedil","К":"Kcy","к":"kcy","𝔎":"Kfr","𝔨":"kfr","ĸ":"kgreen","Х":"KHcy","х":"khcy","Ќ":"KJcy","ќ":"kjcy","𝕂":"Kopf","𝕜":"kopf","𝒦":"Kscr","𝓀":"kscr","⇚":"lAarr","Ĺ":"Lacute","ĺ":"lacute","⦴":"laemptyv","ℒ":"Lscr","Λ":"Lambda","λ":"lambda","⟨":"lang","⟪":"Lang","⦑":"langd","⪅":"lap","«":"laquo","⇤":"larrb","⤟":"larrbfs","←":"larr","↞":"Larr","⤝":"larrfs","↫":"larrlp","⤹":"larrpl","⥳":"larrsim","↢":"larrtl","⤙":"latail","⤛":"lAtail","⪫":"lat","⪭":"late","⪭︀":"lates","⤌":"lbarr","⤎":"lBarr","❲":"lbbrk","{":"lcub","[":"lsqb","⦋":"lbrke","⦏":"lbrksld","⦍":"lbrkslu","Ľ":"Lcaron","ľ":"lcaron","Ļ":"Lcedil","ļ":"lcedil","⌈":"lceil","Л":"Lcy","л":"lcy","⤶":"ldca","“":"ldquo","⥧":"ldrdhar","⥋":"ldrushar","↲":"ldsh","≤":"le","≦":"lE","⇆":"lrarr","⟦":"lobrk","⥡":"LeftDownTeeVector","⥙":"LeftDownVectorBar","⌊":"lfloor","↼":"lharu","⇇":"llarr","⇋":"lrhar","⥎":"LeftRightVector","↤":"mapstoleft","⥚":"LeftTeeVector","⋋":"lthree","⧏":"LeftTriangleBar","⊲":"vltri","⊴":"ltrie","⥑":"LeftUpDownVector","⥠":"LeftUpTeeVector","⥘":"LeftUpVectorBar","↿":"uharl","⥒":"LeftVectorBar","⪋":"lEg","⋚":"leg","⩽":"les","⪨":"lescc","⩿":"lesdot","⪁":"lesdoto","⪃":"lesdotor","⋚︀":"lesg","⪓":"lesges","⋖":"ltdot","≶":"lg","⪡":"LessLess","≲":"lsim","⥼":"lfisht","𝔏":"Lfr","𝔩":"lfr","⪑":"lgE","⥢":"lHar","⥪":"lharul","▄":"lhblk","Љ":"LJcy","љ":"ljcy","≪":"ll","⋘":"Ll","⥫":"llhard","◺":"lltri","Ŀ":"Lmidot","ŀ":"lmidot","⎰":"lmoust","⪉":"lnap","⪇":"lne","≨":"lnE","⋦":"lnsim","⟬":"loang","⇽":"loarr","⟵":"xlarr","⟷":"xharr","⟼":"xmap","⟶":"xrarr","↬":"rarrlp","⦅":"lopar","𝕃":"Lopf","𝕝":"lopf","⨭":"loplus","⨴":"lotimes","∗":"lowast",_:"lowbar","↙":"swarr","↘":"searr","◊":"loz","(":"lpar","⦓":"lparlt","⥭":"lrhard","‎":"lrm","⊿":"lrtri","‹":"lsaquo","𝓁":"lscr","↰":"lsh","⪍":"lsime","⪏":"lsimg","‘":"lsquo","‚":"sbquo","Ł":"Lstrok","ł":"lstrok","⪦":"ltcc","⩹":"ltcir","<":"lt","⋉":"ltimes","⥶":"ltlarr","⩻":"ltquest","◃":"ltri","⦖":"ltrPar","⥊":"lurdshar","⥦":"luruhar","≨︀":"lvnE","¯":"macr","♂":"male","✠":"malt","⤅":"Map","↦":"map","↥":"mapstoup","▮":"marker","⨩":"mcomma","М":"Mcy","м":"mcy","—":"mdash","∺":"mDDot"," ":"MediumSpace","ℳ":"Mscr","𝔐":"Mfr","𝔪":"mfr","℧":"mho","µ":"micro","⫰":"midcir","∣":"mid","−":"minus","⨪":"minusdu","∓":"mp","⫛":"mlcp","⊧":"models","𝕄":"Mopf","𝕞":"mopf","𝓂":"mscr","Μ":"Mu","μ":"mu","⊸":"mumap","Ń":"Nacute","ń":"nacute","∠⃒":"nang","≉":"nap","⩰̸":"napE","≋̸":"napid","ʼn":"napos","♮":"natur","ℕ":"Nopf"," ":"nbsp","≎̸":"nbump","≏̸":"nbumpe","⩃":"ncap","Ň":"Ncaron","ň":"ncaron","Ņ":"Ncedil","ņ":"ncedil","≇":"ncong","⩭̸":"ncongdot","⩂":"ncup","Н":"Ncy","н":"ncy","–":"ndash","⤤":"nearhk","↗":"nearr","⇗":"neArr","≠":"ne","≐̸":"nedot","​":"ZeroWidthSpace","≢":"nequiv","⤨":"toea","≂̸":"nesim","\n":"NewLine","∄":"nexist","𝔑":"Nfr","𝔫":"nfr","≧̸":"ngE","≱":"nge","⩾̸":"nges","⋙̸":"nGg","≵":"ngsim","≫⃒":"nGt","≯":"ngt","≫̸":"nGtv","↮":"nharr","⇎":"nhArr","⫲":"nhpar","∋":"ni","⋼":"nis","⋺":"nisd","Њ":"NJcy","њ":"njcy","↚":"nlarr","⇍":"nlArr","‥":"nldr","≦̸":"nlE","≰":"nle","⩽̸":"nles","≮":"nlt","⋘̸":"nLl","≴":"nlsim","≪⃒":"nLt","⋪":"nltri","⋬":"nltrie","≪̸":"nLtv","∤":"nmid","⁠":"NoBreak","𝕟":"nopf","⫬":"Not","¬":"not","≭":"NotCupCap","∦":"npar","∉":"notin","≹":"ntgl","⋵̸":"notindot","⋹̸":"notinE","⋷":"notinvb","⋶":"notinvc","⧏̸":"NotLeftTriangleBar","≸":"ntlg","⪢̸":"NotNestedGreaterGreater","⪡̸":"NotNestedLessLess","∌":"notni","⋾":"notnivb","⋽":"notnivc","⊀":"npr","⪯̸":"npre","⋠":"nprcue","⧐̸":"NotRightTriangleBar","⋫":"nrtri","⋭":"nrtrie","⊏̸":"NotSquareSubset","⋢":"nsqsube","⊐̸":"NotSquareSuperset","⋣":"nsqsupe","⊂⃒":"vnsub","⊈":"nsube","⊁":"nsc","⪰̸":"nsce","⋡":"nsccue","≿̸":"NotSucceedsTilde","⊃⃒":"vnsup","⊉":"nsupe","≁":"nsim","≄":"nsime","⫽⃥":"nparsl","∂̸":"npart","⨔":"npolint","⤳̸":"nrarrc","↛":"nrarr","⇏":"nrArr","↝̸":"nrarrw","𝒩":"Nscr","𝓃":"nscr","⊄":"nsub","⫅̸":"nsubE","⊅":"nsup","⫆̸":"nsupE","Ñ":"Ntilde","ñ":"ntilde","Ν":"Nu","ν":"nu","#":"num","№":"numero"," ":"numsp","≍⃒":"nvap","⊬":"nvdash","⊭":"nvDash","⊮":"nVdash","⊯":"nVDash","≥⃒":"nvge",">⃒":"nvgt","⤄":"nvHarr","⧞":"nvinfin","⤂":"nvlArr","≤⃒":"nvle","<⃒":"nvlt","⊴⃒":"nvltrie","⤃":"nvrArr","⊵⃒":"nvrtrie","∼⃒":"nvsim","⤣":"nwarhk","↖":"nwarr","⇖":"nwArr","⤧":"nwnear","Ó":"Oacute","ó":"oacute","Ô":"Ocirc","ô":"ocirc","О":"Ocy","о":"ocy","Ő":"Odblac","ő":"odblac","⨸":"odiv","⦼":"odsold","Œ":"OElig","œ":"oelig","⦿":"ofcir","𝔒":"Ofr","𝔬":"ofr","˛":"ogon","Ò":"Ograve","ò":"ograve","⧁":"ogt","⦵":"ohbar","Ω":"ohm","⦾":"olcir","⦻":"olcross","‾":"oline","⧀":"olt","Ō":"Omacr","ō":"omacr","ω":"omega","Ο":"Omicron","ο":"omicron","⦶":"omid","𝕆":"Oopf","𝕠":"oopf","⦷":"opar","⦹":"operp","⩔":"Or","∨":"or","⩝":"ord","ℴ":"oscr","ª":"ordf","º":"ordm","⊶":"origof","⩖":"oror","⩗":"orslope","⩛":"orv","𝒪":"Oscr","Ø":"Oslash","ø":"oslash","⊘":"osol","Õ":"Otilde","õ":"otilde","⨶":"otimesas","⨷":"Otimes","Ö":"Ouml","ö":"ouml","⌽":"ovbar","⏞":"OverBrace","⎴":"tbrk","⏜":"OverParenthesis","¶":"para","⫳":"parsim","⫽":"parsl","∂":"part","П":"Pcy","п":"pcy","%":"percnt",".":"period","‰":"permil","‱":"pertenk","𝔓":"Pfr","𝔭":"pfr","Φ":"Phi","φ":"phi","ϕ":"phiv","☎":"phone","Π":"Pi","π":"pi","ϖ":"piv","ℎ":"planckh","⨣":"plusacir","⨢":"pluscir","+":"plus","⨥":"plusdu","⩲":"pluse","±":"pm","⨦":"plussim","⨧":"plustwo","⨕":"pointint","𝕡":"popf","ℙ":"Popf","£":"pound","⪷":"prap","⪻":"Pr","≺":"pr","≼":"prcue","⪯":"pre","≾":"prsim","⪹":"prnap","⪵":"prnE","⋨":"prnsim","⪳":"prE","′":"prime","″":"Prime","∏":"prod","⌮":"profalar","⌒":"profline","⌓":"profsurf","∝":"prop","⊰":"prurel","𝒫":"Pscr","𝓅":"pscr","Ψ":"Psi","ψ":"psi"," ":"puncsp","𝔔":"Qfr","𝔮":"qfr","𝕢":"qopf","ℚ":"Qopf","⁗":"qprime","𝒬":"Qscr","𝓆":"qscr","⨖":"quatint","?":"quest",'"':"quot","⇛":"rAarr","∽̱":"race","Ŕ":"Racute","ŕ":"racute","√":"Sqrt","⦳":"raemptyv","⟩":"rang","⟫":"Rang","⦒":"rangd","⦥":"range","»":"raquo","⥵":"rarrap","⇥":"rarrb","⤠":"rarrbfs","⤳":"rarrc","→":"rarr","↠":"Rarr","⤞":"rarrfs","⥅":"rarrpl","⥴":"rarrsim","⤖":"Rarrtl","↣":"rarrtl","↝":"rarrw","⤚":"ratail","⤜":"rAtail","∶":"ratio","❳":"rbbrk","}":"rcub","]":"rsqb","⦌":"rbrke","⦎":"rbrksld","⦐":"rbrkslu","Ř":"Rcaron","ř":"rcaron","Ŗ":"Rcedil","ŗ":"rcedil","⌉":"rceil","Р":"Rcy","р":"rcy","⤷":"rdca","⥩":"rdldhar","↳":"rdsh","ℜ":"Re","ℛ":"Rscr","ℝ":"Ropf","▭":"rect","⥽":"rfisht","⌋":"rfloor","𝔯":"rfr","⥤":"rHar","⇀":"rharu","⥬":"rharul","Ρ":"Rho","ρ":"rho","ϱ":"rhov","⇄":"rlarr","⟧":"robrk","⥝":"RightDownTeeVector","⥕":"RightDownVectorBar","⇉":"rrarr","⊢":"vdash","⥛":"RightTeeVector","⋌":"rthree","⧐":"RightTriangleBar","⊳":"vrtri","⊵":"rtrie","⥏":"RightUpDownVector","⥜":"RightUpTeeVector","⥔":"RightUpVectorBar","↾":"uharr","⥓":"RightVectorBar","˚":"ring","‏":"rlm","⎱":"rmoust","⫮":"rnmid","⟭":"roang","⇾":"roarr","⦆":"ropar","𝕣":"ropf","⨮":"roplus","⨵":"rotimes","⥰":"RoundImplies",")":"rpar","⦔":"rpargt","⨒":"rppolint","›":"rsaquo","𝓇":"rscr","↱":"rsh","⋊":"rtimes","▹":"rtri","⧎":"rtriltri","⧴":"RuleDelayed","⥨":"ruluhar","℞":"rx","Ś":"Sacute","ś":"sacute","⪸":"scap","Š":"Scaron","š":"scaron","⪼":"Sc","≻":"sc","≽":"sccue","⪰":"sce","⪴":"scE","Ş":"Scedil","ş":"scedil","Ŝ":"Scirc","ŝ":"scirc","⪺":"scnap","⪶":"scnE","⋩":"scnsim","⨓":"scpolint","≿":"scsim","С":"Scy","с":"scy","⋅":"sdot","⩦":"sdote","⇘":"seArr","§":"sect",";":"semi","⤩":"tosa","✶":"sext","𝔖":"Sfr","𝔰":"sfr","♯":"sharp","Щ":"SHCHcy","щ":"shchcy","Ш":"SHcy","ш":"shcy","↑":"uarr","­":"shy","Σ":"Sigma","σ":"sigma","ς":"sigmaf","∼":"sim","⩪":"simdot","≃":"sime","⪞":"simg","⪠":"simgE","⪝":"siml","⪟":"simlE","≆":"simne","⨤":"simplus","⥲":"simrarr","⨳":"smashp","⧤":"smeparsl","⌣":"smile","⪪":"smt","⪬":"smte","⪬︀":"smtes","Ь":"SOFTcy","ь":"softcy","⌿":"solbar","⧄":"solb","/":"sol","𝕊":"Sopf","𝕤":"sopf","♠":"spades","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊏":"sqsub","⊑":"sqsube","⊐":"sqsup","⊒":"sqsupe","□":"squ","𝒮":"Sscr","𝓈":"sscr","⋆":"Star","☆":"star","⊂":"sub","⋐":"Sub","⪽":"subdot","⫅":"subE","⊆":"sube","⫃":"subedot","⫁":"submult","⫋":"subnE","⊊":"subne","⪿":"subplus","⥹":"subrarr","⫇":"subsim","⫕":"subsub","⫓":"subsup","∑":"sum","♪":"sung","¹":"sup1","²":"sup2","³":"sup3","⊃":"sup","⋑":"Sup","⪾":"supdot","⫘":"supdsub","⫆":"supE","⊇":"supe","⫄":"supedot","⟉":"suphsol","⫗":"suphsub","⥻":"suplarr","⫂":"supmult","⫌":"supnE","⊋":"supne","⫀":"supplus","⫈":"supsim","⫔":"supsub","⫖":"supsup","⇙":"swArr","⤪":"swnwar","ß":"szlig"," ":"Tab","⌖":"target","Τ":"Tau","τ":"tau","Ť":"Tcaron","ť":"tcaron","Ţ":"Tcedil","ţ":"tcedil","Т":"Tcy","т":"tcy","⃛":"tdot","⌕":"telrec","𝔗":"Tfr","𝔱":"tfr","∴":"there4","Θ":"Theta","θ":"theta","ϑ":"thetav","  ":"ThickSpace"," ":"thinsp","Þ":"THORN","þ":"thorn","⨱":"timesbar","×":"times","⨰":"timesd","⌶":"topbot","⫱":"topcir","𝕋":"Topf","𝕥":"topf","⫚":"topfork","‴":"tprime","™":"trade","▵":"utri","≜":"trie","◬":"tridot","⨺":"triminus","⨹":"triplus","⧍":"trisb","⨻":"tritime","⏢":"trpezium","𝒯":"Tscr","𝓉":"tscr","Ц":"TScy","ц":"tscy","Ћ":"TSHcy","ћ":"tshcy","Ŧ":"Tstrok","ŧ":"tstrok","Ú":"Uacute","ú":"uacute","↟":"Uarr","⥉":"Uarrocir","Ў":"Ubrcy","ў":"ubrcy","Ŭ":"Ubreve","ŭ":"ubreve","Û":"Ucirc","û":"ucirc","У":"Ucy","у":"ucy","⇅":"udarr","Ű":"Udblac","ű":"udblac","⥮":"udhar","⥾":"ufisht","𝔘":"Ufr","𝔲":"ufr","Ù":"Ugrave","ù":"ugrave","⥣":"uHar","▀":"uhblk","⌜":"ulcorn","⌏":"ulcrop","◸":"ultri","Ū":"Umacr","ū":"umacr","⏟":"UnderBrace","⏝":"UnderParenthesis","⊎":"uplus","Ų":"Uogon","ų":"uogon","𝕌":"Uopf","𝕦":"uopf","⤒":"UpArrowBar","↕":"varr","υ":"upsi","ϒ":"Upsi","Υ":"Upsilon","⇈":"uuarr","⌝":"urcorn","⌎":"urcrop","Ů":"Uring","ů":"uring","◹":"urtri","𝒰":"Uscr","𝓊":"uscr","⋰":"utdot","Ũ":"Utilde","ũ":"utilde","Ü":"Uuml","ü":"uuml","⦧":"uwangle","⦜":"vangrt","⊊︀":"vsubne","⫋︀":"vsubnE","⊋︀":"vsupne","⫌︀":"vsupnE","⫨":"vBar","⫫":"Vbar","⫩":"vBarv","В":"Vcy","в":"vcy","⊩":"Vdash","⊫":"VDash","⫦":"Vdashl","⊻":"veebar","≚":"veeeq","⋮":"vellip","|":"vert","‖":"Vert","❘":"VerticalSeparator","≀":"wr","𝔙":"Vfr","𝔳":"vfr","𝕍":"Vopf","𝕧":"vopf","𝒱":"Vscr","𝓋":"vscr","⊪":"Vvdash","⦚":"vzigzag","Ŵ":"Wcirc","ŵ":"wcirc","⩟":"wedbar","≙":"wedgeq","℘":"wp","𝔚":"Wfr","𝔴":"wfr","𝕎":"Wopf","𝕨":"wopf","𝒲":"Wscr","𝓌":"wscr","𝔛":"Xfr","𝔵":"xfr","Ξ":"Xi","ξ":"xi","⋻":"xnis","𝕏":"Xopf","𝕩":"xopf","𝒳":"Xscr","𝓍":"xscr","Ý":"Yacute","ý":"yacute","Я":"YAcy","я":"yacy","Ŷ":"Ycirc","ŷ":"ycirc","Ы":"Ycy","ы":"ycy","¥":"yen","𝔜":"Yfr","𝔶":"yfr","Ї":"YIcy","ї":"yicy","𝕐":"Yopf","𝕪":"yopf","𝒴":"Yscr","𝓎":"yscr","Ю":"YUcy","ю":"yucy","ÿ":"yuml","Ÿ":"Yuml","Ź":"Zacute","ź":"zacute","Ž":"Zcaron","ž":"zcaron","З":"Zcy","з":"zcy","Ż":"Zdot","ż":"zdot","ℨ":"Zfr","Ζ":"Zeta","ζ":"zeta","𝔷":"zfr","Ж":"ZHcy","ж":"zhcy","⇝":"zigrarr","𝕫":"zopf","𝒵":"Zscr","𝓏":"zscr","‍":"zwj","‌":"zwnj"},f=/["&'<>`]/g,d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},p=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+);|&(Aacute|iacute|Uacute|plusmn|otilde|Otilde|Agrave|agrave|yacute|Yacute|oslash|Oslash|Atilde|atilde|brvbar|Ccedil|ccedil|ograve|curren|divide|Eacute|eacute|Ograve|oacute|Egrave|egrave|ugrave|frac12|frac14|frac34|Ugrave|Oacute|Iacute|ntilde|Ntilde|uacute|middot|Igrave|igrave|iquest|aacute|laquo|THORN|micro|iexcl|icirc|Icirc|Acirc|ucirc|ecirc|Ocirc|ocirc|Ecirc|Ucirc|aring|Aring|aelig|AElig|acute|pound|raquo|acirc|times|thorn|szlig|cedil|COPY|Auml|ordf|ordm|uuml|macr|Uuml|auml|Ouml|ouml|para|nbsp|Euml|quot|QUOT|euml|yuml|cent|sect|copy|sup1|sup2|sup3|Iuml|iuml|shy|eth|reg|not|yen|amp|AMP|REG|uml|ETH|deg|gt|GT|LT|lt)([=a-zA-Z0-9])?/g,m={Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",amp:"&",AMP:"&",andand:"⩕",And:"⩓",and:"∧",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angmsd:"∡",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",apacir:"⩯",ap:"≈",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxHd:"╤",boxhD:"╥",boxHD:"╦",boxhu:"┴",boxHu:"╧",boxhU:"╨",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsolb:"⧅",bsol:"\\",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",capand:"⩄",capbrcup:"⩉",capcap:"⩋",cap:"∩",Cap:"⋒",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cir:"○",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cup:"∪",Cup:"⋓",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",Darr:"↡",dArr:"⇓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",ddagger:"‡",ddarr:"⇊",DD:"ⅅ",dd:"ⅆ",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrowBar:"⤓",downarrow:"↓",DownArrow:"↓",Downarrow:"⇓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVectorBar:"⥖",DownLeftVector:"↽",DownRightTeeVector:"⥟",DownRightVectorBar:"⥗",DownRightVector:"⇁",DownTeeArrow:"↧",DownTee:"⊤",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",Ecirc:"Ê",ecirc:"ê",ecir:"≖",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",edot:"ė",eDot:"≑",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp13:" ",emsp14:" ",emsp:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",ge:"≥",gE:"≧",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",gescc:"⪩",ges:"⩾",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gla:"⪥",gl:"≷",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",gtcc:"⪧",gtcir:"⩺",gt:">",GT:">",Gt:"≫",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",harrcir:"⥈",harr:"↔",hArr:"⇔",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",Im:"ℑ",imof:"⊷",imped:"Ƶ",Implies:"⇒",incare:"℅","in":"∈",infin:"∞",infintie:"⧝",inodot:"ı",intcal:"⊺","int":"∫",Int:"∬",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larrb:"⇤",larrbfs:"⤟",larr:"←",Larr:"↞",lArr:"⇐",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",latail:"⤙",lAtail:"⤛",lat:"⪫",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",LeftArrowBar:"⇤",leftarrow:"←",LeftArrow:"←",Leftarrow:"⇐",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVectorBar:"⥙",LeftDownVector:"⇃",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTeeArrow:"↤",LeftTee:"⊣",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangleBar:"⧏",LeftTriangle:"⊲",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVectorBar:"⥘",LeftUpVector:"↿",LeftVectorBar:"⥒",LeftVector:"↼",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",lescc:"⪨",les:"⩽",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",llarr:"⇇",ll:"≪",Ll:"⋘",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoustache:"⎰",lmoust:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftrightarrow:"⟷",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longmapsto:"⟼",longrightarrow:"⟶",LongRightArrow:"⟶",Longrightarrow:"⟹",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",ltcc:"⪦",ltcir:"⩹",lt:"<",LT:"<",Lt:"≪",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",midast:"*",midcir:"⫰",mid:"∣",middot:"·",minusb:"⊟",minus:"−",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natural:"♮",naturals:"ℕ",natur:"♮",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",ne:"≠",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nlE:"≦̸",nle:"≰",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangleBar:"⧏̸",NotLeftTriangle:"⋪",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangleBar:"⧐̸",NotRightTriangle:"⋫",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",nparallel:"∦",npar:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",nprec:"⊀",npreceq:"⪯̸",npre:"⪯̸",nrarrc:"⤳̸",nrarr:"↛",nrArr:"⇏",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",Ocirc:"Ô",ocirc:"ô",ocir:"⊚",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",orarr:"↻",Or:"⩔",or:"∨",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",otimesas:"⨶",Otimes:"⨷",otimes:"⊗",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",para:"¶",parallel:"∥",par:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plus:"+",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",prap:"⪷",Pr:"⪻",pr:"≺",prcue:"≼",precapprox:"⪷",prec:"≺",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",pre:"⪯",prE:"⪳",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportional:"∝",Proportion:"∷",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarr:"→",Rarr:"↠",rArr:"⇒",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",Re:"ℜ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrowBar:"⇥",rightarrow:"→",RightArrow:"→",Rightarrow:"⇒",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVectorBar:"⥕",RightDownVector:"⇂",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTeeArrow:"↦",RightTee:"⊢",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangleBar:"⧐",RightTriangle:"⊳",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVectorBar:"⥔",RightUpVector:"↾",RightVectorBar:"⥓",RightVector:"⇀",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoustache:"⎱",rmoust:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",scap:"⪸",Scaron:"Š",scaron:"š",Sc:"⪼",sc:"≻",sccue:"≽",sce:"⪰",scE:"⪴",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdotb:"⊡",sdot:"⋅",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",solbar:"⌿",solb:"⧄",sol:"/",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squ:"□",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succapprox:"⪸",succ:"≻",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup1:"¹",sup2:"²",sup3:"³",sup:"⊃",Sup:"⋑",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",therefore:"∴",Therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",ThinSpace:" ",thinsp:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",timesbar:"⨱",timesb:"⊠",times:"×",timesd:"⨰",tint:"∭",toea:"⤨",topbot:"⌶",topcir:"⫱",top:"⊤",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",uarr:"↑",Uarr:"↟",uArr:"⇑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrowBar:"⤒",uparrow:"↑",UpArrow:"↑",Uparrow:"⇑",UpArrowDownArrow:"⇅",updownarrow:"↕",UpDownArrow:"↕",Updownarrow:"⇕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTeeArrow:"↥",UpTee:"⊥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",Vcy:"В",vcy:"в",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",veebar:"⊻",vee:"∨",Vee:"⋁",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xharr:"⟷",xhArr:"⟺",Xi:"Ξ",xi:"ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",yuml:"ÿ",Yuml:"Ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",zfr:"𝔷",Zfr:"ℨ",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"},v={Aacute:"Á",aacute:"á",Acirc:"Â",acirc:"â",acute:"´",AElig:"Æ",aelig:"æ",Agrave:"À",agrave:"à",amp:"&",AMP:"&",Aring:"Å",aring:"å",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",brvbar:"¦",Ccedil:"Ç",ccedil:"ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",Eacute:"É",eacute:"é",Ecirc:"Ê",ecirc:"ê",Egrave:"È",egrave:"è",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",Iacute:"Í",iacute:"í",Icirc:"Î",icirc:"î",iexcl:"¡",Igrave:"Ì",igrave:"ì",iquest:"¿",Iuml:"Ï",iuml:"ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",Ntilde:"Ñ",ntilde:"ñ",Oacute:"Ó",oacute:"ó",Ocirc:"Ô",ocirc:"ô",Ograve:"Ò",ograve:"ò",ordf:"ª",ordm:"º",Oslash:"Ø",oslash:"ø",Otilde:"Õ",otilde:"õ",Ouml:"Ö",ouml:"ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",THORN:"Þ",thorn:"þ",times:"×",Uacute:"Ú",uacute:"ú",Ucirc:"Û",ucirc:"û",Ugrave:"Ù",ugrave:"ù",uml:"¨",Uuml:"Ü",uuml:"ü",Yacute:"Ý",yacute:"ý",yen:"¥",yuml:"ÿ"},b={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},_=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,w={},A=w.hasOwnProperty,k=function(t,e){return A.call(t,e) +},E=function(t,e){for(var n=-1,r=t.length;++n=55296&&57343>=t||t>1114111?(e&&C("character reference outside the permissible Unicode range"),"�"):k(b,t)?(e&&C("disallowed character reference"),b[t]):(e&&E(_,t)&&C("disallowed character reference"),t>65535&&(t-=65536,n+=x(t>>>10&1023|55296),t=56320|1023&t),n+=x(t))},S=function(t){return"&#x"+t.charCodeAt(0).toString(16).toUpperCase()+";"},C=function(t){throw Error("Parse error: "+t)},T=function(t,e){e=D(e,T.options);var n=e.strict;n&&g.test(t)&&C("forbidden code point");var r=e.encodeEverything,i=e.useNamedReferences,a=e.allowUnsafeSymbols;return r?(t=t.replace(s,function(t){return i&&k(h,t)?"&"+h[t]+";":S(t)}),i&&(t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),i&&(t=t.replace(l,function(t){return"&"+h[t]+";"}))):i?(a||(t=t.replace(f,function(t){return"&"+h[t]+";"})),t=t.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),t=t.replace(l,function(t){return"&"+h[t]+";"})):a||(t=t.replace(f,S)),t.replace(u,function(t){var e=t.charCodeAt(0),n=t.charCodeAt(1),r=1024*(e-55296)+n-56320+65536;return"&#x"+r.toString(16).toUpperCase()+";"}).replace(c,S)};T.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1};var F=function(t,e){e=D(e,F.options);var n=e.strict;return n&&p.test(t)&&C("malformed character reference"),t.replace(y,function(t,r,i,a,o,u,s,c){var l,h,f,d,p;return r?(l=r,h=i,n&&!h&&C("character reference was not terminated by a semicolon"),M(l,n)):a?(f=a,h=o,n&&!h&&C("character reference was not terminated by a semicolon"),l=parseInt(f,16),M(l,n)):u?(d=u,k(m,d)?m[d]:(n&&C("named character reference was not terminated by a semicolon"),t)):(d=s,p=c,p&&e.isAttributeValue?(n&&"="==p&&C("`&` did not start a character reference"),t):(n&&C("named character reference was not terminated by a semicolon"),v[d]+(p||"")))})};F.options={isAttributeValue:!1,strict:!1};var L=function(t){return t.replace(f,function(t){return d[t]})},B={version:"0.5.0",encode:T,decode:F,escape:L,unescape:F};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return B});else if(i&&!i.nodeType)if(a)a.exports=B;else for(var N in B)k(B,N)&&(i[N]=B[N]);else r.he=B}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],82:[function(t,e,n){(function(t){(function(){function r(t,e,n){for(var r=(n||0)-1,i=t?t.length:0;++r-1?0:-1:t?0:-1}function a(t){var e=this.cache,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:_+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t):i[r]=!0}}function o(t){return t.charCodeAt(0)}function u(t,e){for(var n=t.criteria,r=e.criteria,i=-1,a=n.length;++iu||"undefined"==typeof o)return 1;if(u>o||"undefined"==typeof u)return-1}}return t.index-e.index}function s(t){var e=-1,n=t.length,r=t[0],i=t[n/2|0],o=t[n-1];if(r&&"object"==typeof r&&i&&"object"==typeof i&&o&&"object"==typeof o)return!1;var u=h();u["false"]=u["null"]=u["true"]=u.undefined=!1;var s=h();for(s.array=t,s.cache=u,s.push=a;++ei?0:i);++r=x&&a===r,c=[];if(u){var l=s(e);l?(a=i,e=l):u=!1}for(;++n-1:void 0});return i.pop(),a.pop(),v&&(f(i),f(a)),o}function ee(t,e,n,r,i){(Jr(e)?Xe:si)(e,function(e,a){var o,u,s=e,c=t[a];if(e&&((u=Jr(e))||ci(e))){for(var l=r.length;l--;)if(o=r[l]==e){c=i[l];break}if(!o){var h;n&&(s=n(c,e),(h="undefined"!=typeof s)&&(c=s)),h||(c=u?Jr(c)?c:[]:ci(c)?c:{}),r.push(e),i.push(c),h||ee(c,e,n,r,i)}}else n&&(s=n(c,e),"undefined"==typeof s&&(s=e)),"undefined"!=typeof s&&(c=s);t[a]=c})}function re(t,e){return t+Fr(Wr()*(e-t+1))}function ie(t,e,n){var a=-1,o=se(),u=t?t.length:0,c=[],h=!e&&u>=x&&o===r,p=n||h?l():c;if(h){var g=s(p);o=i,p=g}for(;++a3&&"function"==typeof e[n-2])var r=w(e[--n-1],e[n--],2);else n>2&&"function"==typeof e[n-1]&&(r=e[--n]);for(var i=p(arguments,1,n),a=-1,o=l(),u=l();++an?Hr(0,a+n):n)||0,Jr(t)?o=i(t,e,n)>-1:"number"==typeof a?o=(Oe(t)?t.indexOf(e,n):i(t,e,n))>-1:si(t,function(t){return++r>=n?!(o=t===e):void 0}),o}function Ge(t,n,r){var i=!0;n=e.createCallback(n,r,3);var a=-1,o=t?t.length:0;if("number"==typeof o)for(;++aa&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);o>i&&(i=o,a=t)});return a}function en(t,n,r){var i=1/0,a=i;if("function"!=typeof n&&r&&r[n]===t&&(n=null),null==n&&Jr(t))for(var u=-1,s=t.length;++uc&&(a=c)}else n=null==n&&Oe(t)?o:e.createCallback(n,r,3),Xe(t,function(t,e,r){var o=n(t,e,r);i>o&&(i=o,a=t)});return a}function nn(t,n,r,i){if(!t)return r;var a=arguments.length<3;n=e.createCallback(n,i,4);var o=-1,u=t.length;if("number"==typeof u)for(a&&(r=t[++o]);++on?Hr(0,i+n):n||0}else if(n){var a=Mn(t,e);return t[a]===e?a:-1}return r(t,e,n)}function bn(t,n,r){var i=0,a=t?t.length:0;if("number"!=typeof n&&null!=n){var o=a;for(n=e.createCallback(n,r,3);o--&&n(t[o],o,t);)i++}else i=null==n||r?1:n||i;return p(t,0,Gr(Hr(0,a-i),a))}function _n(){for(var t=[],e=-1,n=arguments.length,a=l(),o=se(),u=o===r,c=l();++e=x&&s(e?t[e]:c)))}var p=t[0],g=-1,y=p?p.length:0,m=[];t:for(;++gn?Hr(0,r+n):Gr(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function An(t){for(var e=arguments,n=0,r=e.length,i=t?t.length:0;++na;){var u=a+o>>>1;r(t[u])1?arguments:arguments[0],e=-1,n=t?tn(di(t,"length")):0,r=pr(0>n?0:n);++e2?oe(t,17,p(arguments,2),null,e):oe(t,1,null,null,e)}function In(t){for(var e=arguments.length>1?Q(arguments,!0,!1,1):_e(t),n=-1,r=e.length;++n2?oe(e,19,p(arguments,2),null,t):oe(e,3,null,null,t)}function Rn(){for(var t=arguments,e=t.length;e--;)if(!Ce(t[e]))throw new Ar;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Pn(t,e){return e="number"==typeof e?e:+e||t.length,oe(t,4,null,null,null,e)}function Un(t,e,n){var r,i,a,o,u,s,c,l=0,h=!1,f=!0;if(!Ce(t))throw new Ar;if(e=Hr(0,e)||0,n===!0){var d=!0;f=!1}else Te(n)&&(d=n.leading,h="maxWait"in n&&(Hr(e,n.maxWait)||0),f="trailing"in n?n.trailing:f);var p=function(){var n=e-(gi()-o);if(0>=n){i&&Tr(i);var h=c;i=s=c=y,h&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))}else s=Ir(p,n)},g=function(){s&&Tr(s),i=s=c=y,(f||h!==e)&&(l=gi(),a=t.apply(u,r),s||i||(r=u=null))};return function(){if(r=arguments,o=gi(),u=this,c=f&&(s||!d),h===!1)var n=d&&!s;else{i||d||(l=o);var y=h-(o-l),m=0>=y;m?(i&&(i=Tr(i)),l=o,a=t.apply(u,r)):i||(i=Ir(g,y))}return m&&s?s=Tr(s):s||e===h||(s=Ir(p,e)),n&&(m=!0,a=t.apply(u,r)),!m||s||i||(r=u=null),a}}function Yn(t){if(!Ce(t))throw new Ar;var e=p(arguments,1);return Ir(function(){t.apply(y,e)},1)}function jn(t,e){if(!Ce(t))throw new Ar;var n=p(arguments,2);return Ir(function(){t.apply(y,n)},e)}function zn(t,e){if(!Ce(t))throw new Ar;var n=function(){var r=n.cache,i=e?e.apply(this,arguments):_+arguments[0];return Nr.call(r,i)?r[i]:r[i]=t.apply(this,arguments)};return n.cache={},n}function Vn(t){var e,n;if(!Ce(t))throw new Ar;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Hn(t){return oe(t,16,p(arguments,1))}function Gn(t){return oe(t,32,null,p(arguments,1))}function $n(t,e,n){var r=!0,i=!0;if(!Ce(t))throw new Ar;return n===!1?r=!1:Te(n)&&(r="leading"in n?n.leading:r,i="trailing"in n?n.trailing:i),$.leading=r,$.maxWait=e,$.trailing=i,Un(t,e,$)}function Wn(t,e){return oe(e,16,[t])}function Zn(t){return function(){return t}}function Xn(t,e,n){var r=typeof t;if(null==t||"function"==r)return w(t,e,n);if("object"!=r)return nr(t);var i=ti(t),a=i[0],o=t[a];return 1!=i.length||o!==o||Te(o)?function(e){for(var n=i.length,r=!1;n--&&(r=te(e[i[n]],t[i[n]],null,!0)););return r}:function(t){var e=t[a];return o===e&&(0!==o||1/o==1/e)}}function Kn(t){return null==t?"":wr(t).replace(ii,ue)}function Jn(t){return t}function Qn(t,r,i){var a=!0,o=r&&_e(r);r&&(i||o.length)||(null==i&&(i=r),u=n,r=t,t=e,o=_e(r)),i===!1?a=!1:Te(i)&&"chain"in i&&(a=i.chain);var u=t,s=Ce(u);Xe(o,function(e){var n=t[e]=r[e];s&&(u.prototype[e]=function(){var e=this.__chain__,r=this.__wrapped__,i=[r];Or.apply(i,arguments);var o=n.apply(t,i);if(a||e){if(r===o&&Te(o))return this;o=new u(o),o.__chain__=e}return o})})}function tr(){return t._=Dr,this}function er(){}function nr(t){return function(e){return e[t]}}function rr(t,e,n){var r=null==t,i=null==e;if(null==n&&("boolean"==typeof t&&i?(n=t,t=1):i||"boolean"!=typeof e||(n=e,i=!0)),r&&i&&(e=1),t=+t||0,i?(e=t,t=0):e=+e||0,n||t%1||e%1){var a=Wr();return Gr(t+a*(e-t+parseFloat("1e-"+((a+"").length-1))),e)}return re(t,e)}function ir(t,e){if(t){var n=t[e];return Ce(n)?t[e]():n}}function ar(t,n,r){var i=e.templateSettings;t=wr(t||""),r=oi({},r,i);var a,o=oi({},r.imports,i.imports),u=ti(o),s=ze(o),l=0,h=r.interpolate||L,f="__p += '",d=xr((r.escape||L).source+"|"+h.source+"|"+(h===T?M:L).source+"|"+(r.evaluate||L).source+"|$","g");t.replace(d,function(e,n,r,i,o,u){return r||(r=i),f+=t.slice(l,u).replace(N,c),n&&(f+="' +\n__e("+n+") +\n'"),o&&(a=!0,f+="';\n"+o+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=u+e.length,e}),f+="';\n";var p=r.variable,g=p;g||(p="obj",f="with ("+p+") {\n"+f+"\n}\n"),f=(a?f.replace(k,""):f).replace(E,"$1").replace(D,"$1;"),f="function("+p+") {\n"+(g?"":p+" || ("+p+" = {});\n")+"var __t, __p = '', __e = _.escape"+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m="\n/*\n//# sourceURL="+(r.sourceURL||"/lodash/template/source["+I++ +"]")+"\n*/";try{var v=mr(u,"return "+f+m).apply(y,s)}catch(b){throw b.source=f,b}return n?v(n):(v.source=f,v)}function or(t,e,n){t=(t=+t)>-1?t:0;var r=-1,i=pr(t);for(e=w(e,n,1);++r/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:T,variable:"",imports:{_:e}},Ur||(v=function(){function e(){}return function(n){if(Te(n)){e.prototype=n;var r=new e;e.prototype=null}return r||t.Object()}}());var Kr=Pr?function(t,e){W.value=e,Pr(t,"__bindData__",W)}:er,Jr=Yr||function(t){return t&&"object"==typeof t&&"number"==typeof t.length&&Mr.call(t)==R||!1},Qr=function(t){var e,n=t,r=[];if(!n)return r;if(!Z[typeof t])return r;for(e in n)Nr.call(n,e)&&r.push(e);return r},ti=Vr?function(t){return Te(t)?Vr(t):[]}:Qr,ei={"&":"&","<":"<",">":">",'"':""","'":"'"},ni=we(ei),ri=xr("("+ti(ni).join("|")+")","g"),ii=xr("["+ti(ei).join("")+"]","g"),ai=function(t,e,n){var r,i=t,a=i;if(!i)return a;var o=arguments,u=0,s="number"==typeof n?2:o.length;if(s>3&&"function"==typeof o[s-2])var c=w(o[--s-1],o[s--],2);else s>2&&"function"==typeof o[s-1]&&(c=o[--s]);for(;++u/g,F=RegExp("^["+A+"]*0+(?=.$)"),L=/($^)/,B=/\bthis\b/,N=/['\n\r\t\u2028\u2029\\]/g,O=["Array","Boolean","Date","Function","Math","Number","Object","RegExp","String","_","attachEvent","clearTimeout","isFinite","isNaN","parseInt","setTimeout"],I=0,q="[object Arguments]",R="[object Array]",P="[object Boolean]",U="[object Date]",Y="[object Function]",j="[object Number]",z="[object Object]",V="[object RegExp]",H="[object String]",G={};G[Y]=!1,G[q]=G[R]=G[P]=G[U]=G[j]=G[z]=G[V]=G[H]=!0;var $={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},X={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"},K=Z[typeof window]&&window||this,J=Z[typeof n]&&n&&!n.nodeType&&n,Q=Z[typeof e]&&e&&!e.nodeType&&e,te=Q&&Q.exports===J&&J,ee=Z[typeof t]&&t;!ee||ee.global!==ee&&ee.window!==ee||(K=ee);var ne=g();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(K._=ne,define(function(){return ne})):J&&Q?te?(Q.exports=ne)._=ne:J._=ne:K._=ne}).call(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],83:[function(t,e,n){!function(t,r){"object"==typeof n&&"undefined"!=typeof e?e.exports=r():"function"==typeof define&&define.amd?define(r):t.moment=r()}(this,function(){"use strict";function n(){return Cr.apply(null,arguments)}function r(t){Cr=t}function i(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1}}function a(t){return"[object Array]"===Object.prototype.toString.call(t)}function o(t){return"[object Date]"===Object.prototype.toString.call(t)||t instanceof Date}function u(t,e){var n,r=[];for(n=0;n0)for(n in Fr)r=Fr[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function p(t){d(this,t),this._d=new Date(+t._d),Lr===!1&&(Lr=!0,n.updateOffset(this),Lr=!1)}function g(t){return t instanceof p||null!=t&&s(t,"_isAMomentObject")}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function m(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;i>r;r++)(n&&t[r]!==e[r]||!n&&y(t[r])!==y(e[r]))&&o++;return o+a}function v(){}function b(t){return t?t.toLowerCase().replace("_","-"):t}function _(t){for(var e,n,r,i,a=0;a0;){if(r=x(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&m(i,n,!0)>=e-1)break;e--}a++}return null}function x(n){var r=null;if(!Br[n]&&"undefined"!=typeof e&&e&&e.exports)try{r=Tr._abbr,t("./locale/"+n),w(r)}catch(i){}return Br[n]}function w(t,e){var n;return t&&(n="undefined"==typeof e?k(t):A(t,e),n&&(Tr=n)),Tr._abbr}function A(t,e){return null!==e?(e.abbr=t,Br[t]||(Br[t]=new v),Br[t].set(e),w(t),Br[t]):(delete Br[t],null)}function k(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Tr;if(!a(t)){if(e=x(t))return e;t=[t]}return _(t)}function E(t,e){var n=t.toLowerCase();Nr[n]=Nr[n+"s"]=Nr[e]=t}function D(t){return"string"==typeof t?Nr[t]||Nr[t.toLowerCase()]:void 0}function M(t){var e,n,r={};for(n in t)s(t,n)&&(e=D(n),e&&(r[e]=t[n]));return r}function S(t,e){return function(r){return null!=r?(T(this,t,r),n.updateOffset(this,e),this):C(this,t)}}function C(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function T(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function F(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=D(t),"function"==typeof this[t])return this[t](e);return this}function L(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.lengthe;e++)r[e]=Rr[r[e]]?Rr[r[e]]:N(r[e]);return function(i){var a="";for(e=0;n>e;e++)a+=r[e]instanceof Function?r[e].call(i,t):r[e];return a}}function I(t,e){return t.isValid()?(e=q(e,t.localeData()),qr[e]||(qr[e]=O(e)),qr[e](t)):t.localeData().invalidDate()}function q(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Ir.lastIndex=0;r>=0&&Ir.test(t);)t=t.replace(Ir,n),Ir.lastIndex=0,r-=1;return t}function R(t,e,n){Qr[t]="function"==typeof e?e:function(t){return t&&n?n:e}}function P(t,e){return s(Qr,t)?Qr[t](e._strict,e._locale):new RegExp(U(t))}function U(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=y(t)}),n=0;nr;r++){if(i=l([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function W(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function Z(t){return null!=t?(W(this,t),n.updateOffset(this,!0),this):C(this,"Month")}function X(){return V(this.year(),this.month())}function K(t){var e,n=t._a;return n&&-2===t._pf.overflow&&(e=n[ni]<0||n[ni]>11?ni:n[ri]<1||n[ri]>V(n[ei],n[ni])?ri:n[ii]<0||n[ii]>24||24===n[ii]&&(0!==n[ai]||0!==n[oi]||0!==n[ui])?ii:n[ai]<0||n[ai]>59?ai:n[oi]<0||n[oi]>59?oi:n[ui]<0||n[ui]>999?ui:-1,t._pf._overflowDayOfYear&&(ei>e||e>ri)&&(e=ri),t._pf.overflow=e),t}function J(t){n.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function Q(t,e){var n=!0;return c(function(){return n&&(J(t),n=!1),e.apply(this,arguments)},e)}function te(t,e){li[t]||(J(e),li[t]=!0)}function ee(t){var e,n,r=t._i,i=hi.exec(r);if(i){for(t._pf.iso=!0,e=0,n=fi.length;n>e;e++)if(fi[e][1].exec(r)){t._f=fi[e][0]+(i[6]||" ");break}for(e=0,n=di.length;n>e;e++)if(di[e][1].exec(r)){t._f+=di[e][0];break}r.match(Xr)&&(t._f+="Z"),_e(t)}else t._isValid=!1}function ne(t){var e=pi.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(ee(t),void(t._isValid===!1&&(delete t._isValid,n.createFromInputFallback(t))))}function re(t,e,n,r,i,a,o){var u=new Date(t,e,n,r,i,a,o);return 1970>t&&u.setFullYear(t),u}function ie(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ae(t){return oe(t)?366:365}function oe(t){return t%4===0&&t%100!==0||t%400===0}function ue(){return oe(this.year())}function se(t,e,n){var r,i=n-e,a=n-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Me(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ce(t){return se(t,this._week.dow,this._week.doy).week}function le(){return this._week.dow}function he(){return this._week.doy}function fe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function de(t){var e=se(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function pe(t,e,n,r,i){var a,o,u=ie(t,0,1).getUTCDay();return u=0===u?7:u,n=null!=n?n:i,a=i-u+(u>r?7:0)-(i>u?7:0),o=7*(e-1)+(n-i)+a+1,{year:o>0?t:t-1,dayOfYear:o>0?o:ae(t-1)+o}}function ge(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function ye(t,e,n){return null!=t?t:null!=e?e:n}function me(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ve(t){var e,n,r,i,a=[];if(!t._d){for(r=me(t),t._w&&null==t._a[ri]&&null==t._a[ni]&&be(t),t._dayOfYear&&(i=ye(t._a[ei],r[ei]),t._dayOfYear>ae(i)&&(t._pf._overflowDayOfYear=!0),n=ie(i,0,t._dayOfYear),t._a[ni]=n.getUTCMonth(),t._a[ri]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;7>e;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ii]&&0===t._a[ai]&&0===t._a[oi]&&0===t._a[ui]&&(t._nextDay=!0,t._a[ii]=0),t._d=(t._useUTC?ie:re).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ii]=24)}}function be(t){var e,n,r,i,a,o,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,o=4,n=ye(e.GG,t._a[ei],se(Me(),1,4).year),r=ye(e.W,1),i=ye(e.E,1)):(a=t._locale._week.dow,o=t._locale._week.doy,n=ye(e.gg,t._a[ei],se(Me(),a,o).year),r=ye(e.w,1),null!=e.d?(i=e.d,a>i&&++r):i=null!=e.e?e.e+a:a),u=pe(n,r,i,o,a),t._a[ei]=u.year,t._dayOfYear=u.dayOfYear}function _e(t){if(t._f===n.ISO_8601)return void ee(t);t._a=[],t._pf.empty=!0;var e,r,i,a,o,u=""+t._i,s=u.length,c=0;for(i=q(t._f,t._locale).match(Or)||[],e=0;e0&&t._pf.unusedInput.push(o),u=u.slice(u.indexOf(r)+r.length),c+=r.length),Rr[a]?(r?t._pf.empty=!1:t._pf.unusedTokens.push(a),z(a,r,t)):t._strict&&!r&&t._pf.unusedTokens.push(a);t._pf.charsLeftOver=s-c,u.length>0&&t._pf.unusedInput.push(u),t._pf.bigHour===!0&&t._a[ii]<=12&&(t._pf.bigHour=void 0),t._a[ii]=xe(t._locale,t._a[ii],t._meridiem),ve(t),K(t)}function xe(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function we(t){var e,n,r,a,o;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(a=0;ao)&&(r=o,n=e));c(t,n||e)}function Ae(t){if(!t._d){var e=M(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],ve(t)}}function ke(t){var e,n=t._i,r=t._f;return t._locale=t._locale||k(t._l),null===n||void 0===r&&""===n?f({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),g(n)?new p(K(n)):(a(r)?we(t):r?_e(t):Ee(t),e=new p(K(t)),e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e))}function Ee(t){var e=t._i;void 0===e?t._d=new Date:o(e)?t._d=new Date(+e):"string"==typeof e?ne(t):a(e)?(t._a=u(e.slice(0),function(t){return parseInt(t,10)}),ve(t)):"object"==typeof e?Ae(t):"number"==typeof e?t._d=new Date(e):n.createFromInputFallback(t)}function De(t,e,n,r,a){var o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=n,o._i=t,o._f=e,o._strict=r,o._pf=i(),ke(o)}function Me(t,e,n,r){return De(t,e,n,r,!1)}function Se(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Me();for(n=e[0],r=1;rt&&(t=-t,n="-"),n+L(~~(t/60),2)+e+L(~~t%60,2)})}function Ne(t){var e=(t||"").match(Xr)||[],n=e[e.length-1]||[],r=(n+"").match(bi)||["-",0,0],i=+(60*r[1])+y(r[2]);return"+"===r[0]?i:-i}function Oe(t,e){var r,i;return e._isUTC?(r=e.clone(),i=(g(t)||o(t)?+t:+Me(t))-+r,r._d.setTime(+r._d+i),n.updateOffset(r,!1),r):Me(t).local()}function Ie(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function qe(t,e){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Ne(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(r=Ie(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?Qe(this,We(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ie(this)}function Re(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Pe(t){return this.utcOffset(0,t)}function Ue(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),"m")),this}function Ye(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ne(this._i)),this}function je(t){return t=t?Me(t).utcOffset():0,(this.utcOffset()-t)%60===0}function ze(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ve(){if(this._a){var t=this._isUTC?l(this._a):Me(this._a);return this.isValid()&&m(this._a,t.toArray())>0}return!1}function He(){return!this._isUTC}function Ge(){return this._isUTC}function $e(){return this._isUTC&&0===this._offset}function We(t,e){var n,r,i,a=t,o=null;return Le(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=_i.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:y(o[ri])*n,h:y(o[ii])*n,m:y(o[ai])*n,s:y(o[oi])*n,ms:y(o[ui])*n}):(o=xi.exec(t))?(n="-"===o[1]?-1:1,a={y:Ze(o[2],n),M:Ze(o[3],n),d:Ze(o[4],n),h:Ze(o[5],n),m:Ze(o[6],n),s:Ze(o[7],n),w:Ze(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Ke(Me(a.from),Me(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new Fe(a),Le(t)&&s(t,"_locale")&&(r._locale=t._locale),r}function Ze(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Xe(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ke(t,e){var n;return e=Oe(e,t),t.isBefore(e)?n=Xe(t,e):(n=Xe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Je(t,e){return function(n,r){var i,a;return null===r||isNaN(+r)||(te(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),a=n,n=r,r=a),n="string"==typeof n?+n:n,i=We(n,r),Qe(this,i,t),this}}function Qe(t,e,r,i){var a=e._milliseconds,o=e._days,u=e._months;i=null==i?!0:i,a&&t._d.setTime(+t._d+a*r),o&&T(t,"Date",C(t,"Date")+o*r),u&&W(t,C(t,"Month")+u*r),i&&n.updateOffset(t,o||u)}function tn(t){var e=t||Me(),n=Oe(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Me(e)))}function en(){return new p(this)}function nn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+this>+t):(n=g(t)?+t:+Me(t),n<+this.clone().startOf(e))}function rn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+t>+this):(n=g(t)?+t:+Me(t),+this.clone().endOf(e)t?Math.ceil(t):Math.floor(t)}function sn(t,e,n){var r,i,a=Oe(t,this),o=6e4*(a.utcOffset()-this.utcOffset());return e=D(e),"year"===e||"month"===e||"quarter"===e?(i=cn(this,a),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-a,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-o)/864e5:"week"===e?(r-o)/6048e5:r),n?i:un(i)}function cn(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months");return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1,"months"),r=(e-a)/(n-a)),-(i+r)}function ln(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function hn(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=Me([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Rn(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Bn(t,this.localeData()),this.add(t-e,"d")):e}function Pn(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Un(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Yn(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function jn(t,e){return e._meridiemParse}function zn(t){return"p"===(t+"").toLowerCase().charAt(0)}function Vn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Hn(t){B(0,[t,3],0,"millisecond")}function Gn(){return this._isUTC?"UTC":""}function $n(){return this._isUTC?"Coordinated Universal Time":""}function Wn(t){return Me(1e3*t)}function Zn(){return Me.apply(null,arguments).parseZone()}function Xn(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.call(e,n):r}function Kn(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e}function Jn(){return this._invalidDate}function Qn(t){return this._ordinal.replace("%d",t)}function tr(t){return t}function er(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)}function nr(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function rr(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ir(t,e,n,r){var i=k(),a=l().set(r,e);return i[n](a,t)}function ar(t,e,n,r,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ir(t,e,n,i);var a,o=[];for(a=0;r>a;a++)o[a]=ir(t,a,n,i);return o}function or(t,e){return ar(t,e,"months",12,"month")}function ur(t,e){return ar(t,e,"monthsShort",12,"month")}function sr(t,e){return ar(t,e,"weekdays",7,"day")}function cr(t,e){return ar(t,e,"weekdaysShort",7,"day")}function lr(t,e){return ar(t,e,"weekdaysMin",7,"day")}function hr(){var t=this._data;return this._milliseconds=zi(this._milliseconds),this._days=zi(this._days),this._months=zi(this._months),t.milliseconds=zi(t.milliseconds),t.seconds=zi(t.seconds),t.minutes=zi(t.minutes),t.hours=zi(t.hours),t.months=zi(t.months),t.years=zi(t.years),this}function fr(t,e,n,r){var i=We(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function dr(t,e){return fr(this,t,e,1)}function pr(t,e){return fr(this,t,e,-1)}function gr(){var t,e,n,r=this._milliseconds,i=this._days,a=this._months,o=this._data,u=0;return o.milliseconds=r%1e3,t=un(r/1e3),o.seconds=t%60,e=un(t/60),o.minutes=e%60,n=un(e/60),o.hours=n%24,i+=un(n/24),u=un(yr(i)),i-=un(mr(u)),a+=un(i/30),i%=30,u+=un(a/12),a%=12,o.days=i,o.months=a,o.years=u,this}function yr(t){return 400*t/146097}function mr(t){return 146097*t/400}function vr(t){var e,n,r=this._milliseconds;if(t=D(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+12*yr(e),"month"===t?n:n/12;switch(e=this._days+Math.round(mr(this._months/12)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 24*e*60+r/6e4;case"second":return 24*e*60*60+r/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+r;default:throw new Error("Unknown unit "+t)}}function br(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function _r(t){return function(){return this.as(t)}}function xr(t){return t=D(t),this[t+"s"]()}function wr(t){return function(){return this._data[t]}}function Ar(){return un(this.days()/7)}function kr(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Er(t,e,n){var r=We(t).abs(),i=aa(r.as("s")),a=aa(r.as("m")),o=aa(r.as("h")),u=aa(r.as("d")),s=aa(r.as("M")),c=aa(r.as("y")),l=i0,l[4]=n,kr.apply(null,l)}function Dr(t,e){return void 0===oa[t]?!1:void 0===e?oa[t]:(oa[t]=e,!0)}function Mr(t){var e=this.localeData(),n=Er(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Sr(){var t=ua(this.years()),e=ua(this.months()),n=ua(this.days()),r=ua(this.hours()),i=ua(this.minutes()),a=ua(this.seconds()+this.milliseconds()/1e3),o=this.asSeconds();return o?(0>o?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"}var Cr,Tr,Fr=n.momentProperties=[],Lr=!1,Br={},Nr={},Or=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ir=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qr={},Rr={},Pr=/\d/,Ur=/\d\d/,Yr=/\d{3}/,jr=/\d{4}/,zr=/[+-]?\d{6}/,Vr=/\d\d?/,Hr=/\d{1,3}/,Gr=/\d{1,4}/,$r=/[+-]?\d{1,6}/,Wr=/\d+/,Zr=/[+-]?\d+/,Xr=/Z|[+-]\d\d:?\d\d/gi,Kr=/[+-]?\d+(\.\d{1,3})?/,Jr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Qr={},ti={},ei=0,ni=1,ri=2,ii=3,ai=4,oi=5,ui=6;B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),E("month","M"),R("M",Vr),R("MM",Vr,Ur),R("MMM",Jr),R("MMMM",Jr),Y(["M","MM"],function(t,e){e[ni]=y(t)-1}),Y(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[ni]=i:n._pf.invalidMonth=t});var si="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ci="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),li={};n.suppressDeprecationWarnings=!1;var hi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],di=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],pi=/^\/?Date\((\-?\d+)/i;n.createFromInputFallback=Q("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),E("year","y"),R("Y",Zr),R("YY",Vr,Ur),R("YYYY",Gr,jr),R("YYYYY",$r,zr),R("YYYYYY",$r,zr),Y(["YYYY","YYYYY","YYYYYY"],ei),Y("YY",function(t,e){e[ei]=n.parseTwoDigitYear(t)}),n.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var gi=S("FullYear",!1);B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),R("w",Vr),R("ww",Vr,Ur),R("W",Vr),R("WW",Vr,Ur),j(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=y(t)});var yi={dow:0,doy:6};B("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),R("DDD",Hr),R("DDDD",Yr),Y(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),n.ISO_8601=function(){};var mi=Q("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return this>t?this:t}),vi=Q("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return t>this?this:t});Be("Z",":"),Be("ZZ",""),R("Z",Xr),R("ZZ",Xr),Y(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ne(t)});var bi=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var _i=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,xi=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;We.fn=Fe.prototype;var wi=Je(1,"add"),Ai=Je(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var ki=Q("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Dn("gggg","weekYear"),Dn("ggggg","weekYear"),Dn("GGGG","isoWeekYear"),Dn("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),R("G",Zr),R("g",Zr),R("GG",Vr,Ur),R("gg",Vr,Ur),R("GGGG",Gr,jr),R("gggg",Gr,jr),R("GGGGG",$r,zr),R("ggggg",$r,zr),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=y(t)}),j(["gg","GG"],function(t,e,r,i){e[i]=n.parseTwoDigitYear(t)}),B("Q",0,0,"quarter"),E("quarter","Q"),R("Q",Pr),Y("Q",function(t,e){e[ni]=3*(y(t)-1)}),B("D",["DD",2],"Do","date"),E("date","D"),R("D",Vr),R("DD",Vr,Ur),R("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Y(["D","DD"],ri),Y("Do",function(t,e){e[ri]=y(t.match(Vr)[0],10)});var Ei=S("Date",!0);B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),R("d",Vr),R("e",Vr),R("E",Vr),R("dd",Jr),R("ddd",Jr),R("dddd",Jr),j(["dd","ddd","dddd"],function(t,e,n){var r=n._locale.weekdaysParse(t);null!=r?e.d=r:n._pf.invalidWeekday=t}),j(["d","e","E"],function(t,e,n,r){e[r]=y(t)});var Di="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Si="Su_Mo_Tu_We_Th_Fr_Sa".split("_");B("H",["HH",2],0,"hour"),B("h",["hh",2],0,function(){return this.hours()%12||12}),Yn("a",!0),Yn("A",!1),E("hour","h"),R("a",jn),R("A",jn),R("H",Vr),R("h",Vr),R("HH",Vr,Ur),R("hh",Vr,Ur),Y(["H","HH"],ii),Y(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Y(["h","hh"],function(t,e,n){e[ii]=y(t),n._pf.bigHour=!0});var Ci=/[ap]\.?m?\.?/i,Ti=S("Hours",!0);B("m",["mm",2],0,"minute"),E("minute","m"),R("m",Vr),R("mm",Vr,Ur),Y(["m","mm"],ai);var Fi=S("Minutes",!1);B("s",["ss",2],0,"second"),E("second","s"),R("s",Vr),R("ss",Vr,Ur),Y(["s","ss"],oi);var Li=S("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Hn("SSS"),Hn("SSSS"),E("millisecond","ms"),R("S",Hr,Pr),R("SS",Hr,Ur),R("SSS",Hr,Yr),R("SSSS",Wr),Y(["S","SS","SSS","SSSS"],function(t,e){e[ui]=y(1e3*("0."+t))});var Bi=S("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var Ni=p.prototype;Ni.add=wi,Ni.calendar=tn,Ni.clone=en,Ni.diff=sn,Ni.endOf=vn,Ni.format=fn,Ni.from=dn,Ni.fromNow=pn,Ni.get=F,Ni.invalidAt=En,Ni.isAfter=nn,Ni.isBefore=rn,Ni.isBetween=an,Ni.isSame=on,Ni.isValid=An,Ni.lang=ki,Ni.locale=gn,Ni.localeData=yn,Ni.max=vi,Ni.min=mi,Ni.parsingFlags=kn,Ni.set=F,Ni.startOf=mn,Ni.subtract=Ai,Ni.toArray=wn,Ni.toDate=xn,Ni.toISOString=hn,Ni.toJSON=hn,Ni.toString=ln,Ni.unix=_n,Ni.valueOf=bn,Ni.year=gi,Ni.isLeapYear=ue,Ni.weekYear=Sn,Ni.isoWeekYear=Cn,Ni.quarter=Ni.quarters=Ln,Ni.month=Z,Ni.daysInMonth=X,Ni.week=Ni.weeks=fe,Ni.isoWeek=Ni.isoWeeks=de,Ni.weeksInYear=Fn,Ni.isoWeeksInYear=Tn,Ni.date=Ei,Ni.day=Ni.days=Rn,Ni.weekday=Pn,Ni.isoWeekday=Un,Ni.dayOfYear=ge,Ni.hour=Ni.hours=Ti,Ni.minute=Ni.minutes=Fi,Ni.second=Ni.seconds=Li,Ni.millisecond=Ni.milliseconds=Bi,Ni.utcOffset=qe,Ni.utc=Pe,Ni.local=Ue,Ni.parseZone=Ye,Ni.hasAlignedHourOffset=je,Ni.isDST=ze,Ni.isDSTShifted=Ve,Ni.isLocal=He,Ni.isUtcOffset=Ge,Ni.isUtc=$e,Ni.isUTC=$e,Ni.zoneAbbr=Gn,Ni.zoneName=$n,Ni.dates=Q("dates accessor is deprecated. Use date instead.",Ei),Ni.months=Q("months accessor is deprecated. Use month instead",Z),Ni.years=Q("years accessor is deprecated. Use year instead",gi),Ni.zone=Q("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Re);var Oi=Ni,Ii={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},qi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Ri="Invalid date",Pi="%d",Ui=/\d{1,2}/,Yi={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ji=v.prototype;ji._calendar=Ii,ji.calendar=Xn,ji._longDateFormat=qi,ji.longDateFormat=Kn,ji._invalidDate=Ri,ji.invalidDate=Jn,ji._ordinal=Pi,ji.ordinal=Qn,ji._ordinalParse=Ui,ji.preparse=tr,ji.postformat=tr,ji._relativeTime=Yi,ji.relativeTime=er,ji.pastFuture=nr,ji.set=rr,ji.months=H,ji._months=si,ji.monthsShort=G,ji._monthsShort=ci,ji.monthsParse=$,ji.week=ce,ji._week=yi,ji.firstDayOfYear=he,ji.firstDayOfWeek=le,ji.weekdays=Nn,ji._weekdays=Di,ji.weekdaysMin=In,ji._weekdaysMin=Si,ji.weekdaysShort=On,ji._weekdaysShort=Mi,ji.weekdaysParse=qn,ji.isPM=zn,ji._meridiemParse=Ci,ji.meridiem=Vn,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),n.lang=Q("moment.lang is deprecated. Use moment.locale instead.",w),n.langData=Q("moment.langData is deprecated. Use moment.localeData instead.",k);var zi=Math.abs,Vi=_r("ms"),Hi=_r("s"),Gi=_r("m"),$i=_r("h"),Wi=_r("d"),Zi=_r("w"),Xi=_r("M"),Ki=_r("y"),Ji=wr("milliseconds"),Qi=wr("seconds"),ta=wr("minutes"),ea=wr("hours"),na=wr("days"),ra=wr("months"),ia=wr("years"),aa=Math.round,oa={s:45,m:45,h:22,d:26,M:11},ua=Math.abs,sa=Fe.prototype; +sa.abs=hr,sa.add=dr,sa.subtract=pr,sa.as=vr,sa.asMilliseconds=Vi,sa.asSeconds=Hi,sa.asMinutes=Gi,sa.asHours=$i,sa.asDays=Wi,sa.asWeeks=Zi,sa.asMonths=Xi,sa.asYears=Ki,sa.valueOf=br,sa._bubble=gr,sa.get=xr,sa.milliseconds=Ji,sa.seconds=Qi,sa.minutes=ta,sa.hours=ea,sa.days=na,sa.weeks=Ar,sa.months=ra,sa.years=ia,sa.humanize=Mr,sa.toISOString=Sr,sa.toString=Sr,sa.toJSON=Sr,sa.locale=gn,sa.localeData=yn,sa.toIsoString=Q("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Sr),sa.lang=ki,B("X",0,0,"unix"),B("x",0,0,"valueOf"),R("x",Zr),R("X",Kr),Y("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,n){n._d=new Date(y(t))}),n.version="2.10.2",r(Me),n.fn=Oi,n.min=Ce,n.max=Te,n.utc=l,n.unix=Wn,n.months=or,n.isDate=o,n.locale=w,n.invalid=f,n.duration=We,n.isMoment=g,n.weekdays=sr,n.parseZone=Zn,n.localeData=k,n.isDuration=Le,n.monthsShort=ur,n.weekdaysMin=lr,n.defineLocale=A,n.weekdaysShort=cr,n.normalizeUnits=D,n.relativeTimeThreshold=Dr;var ca=n;return ca})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],A=[10,28,37,57,58],k=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(A,k,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(A,[2,48]),e(A,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(A,[2,51],{45:[1,86]}),e(A,[2,52]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(A,[2,59]),e(A,[2,60]),e(A,[2,61]),e(A,[2,62]),e(A,[2,63]),e(A,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(A,k,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(A,[2,55]),{10:[1,94]},e(A,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(A,[2,54]),{5:[2,3]},e(A,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(A,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; +if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],A=[1,40],k=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; +case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) +},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file diff --git a/src/diagrams/gantt/exGantt.md b/src/diagrams/gantt/exGantt.md index 69cb7ce990..958b3ad622 100644 --- a/src/diagrams/gantt/exGantt.md +++ b/src/diagrams/gantt/exGantt.md @@ -21,3 +21,4 @@ gantt Add gantt diagram to demo page :after a1 , 2h Add gantt to diagram to demo page :after a1 , 2h ``` +testa \ No newline at end of file diff --git a/test/gantt.html b/test/gantt.html index a14b730370..c07ac69cab 100644 --- a/test/gantt.html +++ b/test/gantt.html @@ -9,7 +9,8 @@ var mermaid_config = { startOnLoad:true } - mermaid.sequenceConfig = '{"diagramMarginX":50,"diagramMarginY":10,"actorMargin":50,"width":150,"height":45,"boxMargin":10,"boxTextMargin":5,"noteMargin":10,"messageMargin":35, "mirrorActors":false}'; + mermaid.startOnLoad = true; + mermaid.sequenceConfig = {"diagramMarginX":50,"diagramMarginY":10,"actorMargin":50,"width":150,"height":45,"boxMargin":10,"boxTextMargin":5,"noteMargin":10,"messageMargin":35, "mirrorActors":false}; mermaid.ganttConfig = { titleTopMargin:25, barHeight:20, From e0d90def936d2f1dc73de668a31b954bad0ff557 Mon Sep 17 00:00:00 2001 From: Tyler Long Date: Sun, 19 Apr 2015 15:58:09 +0800 Subject: [PATCH 3/6] IE, local html, cssRules access is denied IE, open html file directly from hard disk(insead of from a http server), cssRules access is denied. Thus an expection is thrown. But in the catch statement, another one is thrown again thus caused the whole mermaid code break. In this line `console.warn('Invalid CSS selector "' + rule.selectorText + '"', err);` rule is undefined, so exception will be thrown if we don't check. --- src/utils.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index 537af07ea5..29d864a929 100644 --- a/src/utils.js +++ b/src/utils.js @@ -66,7 +66,9 @@ module.exports.cloneCssStyles = function(svg, classes){ catch(err) { if(typeof console !== 'undefined'){ if(console.warn !== 'undefined'){ - console.warn('Invalid CSS selector "' + rule.selectorText + '"', err); + if(rule !== 'undefined'){ + console.warn('Invalid CSS selector "' + rule.selectorText + '"', err); + } } } } From 2204d46ce110a632277235e4f3f5b47f32870004 Mon Sep 17 00:00:00 2001 From: knsv Date: Mon, 20 Apr 2015 21:21:17 +0200 Subject: [PATCH 4/6] Fix for defect #158 --- dist/mermaid.full.js | 88 +++++++------ dist/mermaid.full.min.js | 2 +- dist/mermaid.slim.js | 88 +++++++------ dist/mermaid.slim.min.js | 2 +- lib/cli.js | 10 +- lib/index.js | 1 + lib/phantomscript.js | 27 +++- src/diagrams/gantt/exGantt.md | 1 - src/diagrams/gantt/ganttRenderer.js | 1 + src/diagrams/sequenceDiagram/sequenceDb.js | 51 ++++---- src/diagrams/sequenceDiagram/svgDraw.js | 18 +-- src/main.js | 18 +-- test/gantt.html | 140 +-------------------- 13 files changed, 181 insertions(+), 266 deletions(-) diff --git a/dist/mermaid.full.js b/dist/mermaid.full.js index bb13d1461d..908e2a0659 100644 --- a/dist/mermaid.full.js +++ b/dist/mermaid.full.js @@ -28315,6 +28315,7 @@ module.exports.draw = function (text, id) { var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding; elem.style.height = h + 'px'; + elem.setAttribute('height', h); var svg = d3.select('#' + id); // http://codepen.io/anon/pen/azLvWR @@ -30093,10 +30094,11 @@ if (typeof module !== 'undefined' && require.main === module) { /** * Created by knut on 14-11-19. */ -var actors = {}; +var actors = {}; var actorKeys = []; -var messages = []; -var notes = []; +var messages = []; +var notes = []; + exports.addActor = function(id,name,description){ //console.log('Adding actor: '+id); actors[id] = {name:name, description:description}; @@ -30108,6 +30110,9 @@ exports.addMessage = function(idFrom, idTo, message, answer){ messages.push({from:idFrom, to:idTo, message:message, answer:answer}); }; +/** + * + */ exports.addSignal = function(idFrom, idTo, message, messageType){ //console.log('Adding message from='+idFrom+' to='+idTo+' message='+message+' answer='+answer); messages.push({from:idFrom, to:idTo, message:message, type:messageType}); @@ -30128,37 +30133,36 @@ exports.getActorKeys = function(){ }; exports.clear = function(){ - actors = {}; + actors = {}; messages = []; }; exports.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 - + 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 }; exports.ARROWTYPE = { - FILLED : 0, - OPEN : 1 + FILLED : 0, + OPEN : 1 }; exports.PLACEMENT = { - LEFTOF : 0, - RIGHTOF : 1, - OVER : 2 + LEFTOF : 0, + RIGHTOF : 1, + OVER : 2 }; exports.addNote = function (actor, placement, message){ @@ -30809,15 +30813,15 @@ exports.getTextObj = function(){ exports.getNoteRect = function(){ var rect = { - x: 0, - y: 0, - fill: '#EDF2AE', - stroke: '#666', - width: 100, - anchor:'start', - height: 100, - rx: 0, - ry: 0 + x : 0, + y : 0, + fill : '#EDF2AE', + stroke : '#666', + width : 100, + anchor : 'start', + height : 100, + rx : 0, + ry : 0 }; return rect; }; @@ -31012,21 +31016,22 @@ var equals = function (val, variable){ }; global.mermaid = { - startOnLoad:true, - htmlLabels:true, - init:function(sequenceConfig, nodes){ + startOnLoad: true, + htmlLabels: true, + + init: function(sequenceConfig, nodes) { init.apply(null, arguments); }, - version:function(){ + version: function() { return exports.version(); }, - getParser:function(){ + getParser: function() { return flow.parser; }, - parse:function(text){ + parse: function(text) { return parse(text); }, - parseError:function(err,hash){ + parseError: function(err, hash) { console.log('Mermaid Syntax error:'); console.log(err); } @@ -31068,6 +31073,9 @@ if(typeof document !== 'undefined'){ }, false); } +var apa = 1; +var bapselsin = 2; + }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,"he":81}],104:[function(require,module,exports){ /** diff --git a/dist/mermaid.full.min.js b/dist/mermaid.full.min.js index 6da0facafc..86772b70bb 100644 --- a/dist/mermaid.full.min.js +++ b/dist/mermaid.full.min.js @@ -41,5 +41,5 @@ e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e, }function h(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&void 0===t._pf.bigHour)),t._isValid}function f(t){var e=l(0/0);return null!=t?c(e._pf,t):e._pf.userInvalidated=!0,e}function d(t,e){var n,r,i;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Fr.length>0)for(n in Fr)r=Fr[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function p(t){d(this,t),this._d=new Date(+t._d),Lr===!1&&(Lr=!0,n.updateOffset(this),Lr=!1)}function g(t){return t instanceof p||null!=t&&s(t,"_isAMomentObject")}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function m(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;i>r;r++)(n&&t[r]!==e[r]||!n&&y(t[r])!==y(e[r]))&&o++;return o+a}function v(){}function b(t){return t?t.toLowerCase().replace("_","-"):t}function _(t){for(var e,n,r,i,a=0;a0;){if(r=x(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&m(i,n,!0)>=e-1)break;e--}a++}return null}function x(n){var r=null;if(!Br[n]&&"undefined"!=typeof e&&e&&e.exports)try{r=Tr._abbr,t("./locale/"+n),w(r)}catch(i){}return Br[n]}function w(t,e){var n;return t&&(n="undefined"==typeof e?k(t):A(t,e),n&&(Tr=n)),Tr._abbr}function A(t,e){return null!==e?(e.abbr=t,Br[t]||(Br[t]=new v),Br[t].set(e),w(t),Br[t]):(delete Br[t],null)}function k(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Tr;if(!a(t)){if(e=x(t))return e;t=[t]}return _(t)}function E(t,e){var n=t.toLowerCase();Nr[n]=Nr[n+"s"]=Nr[e]=t}function D(t){return"string"==typeof t?Nr[t]||Nr[t.toLowerCase()]:void 0}function M(t){var e,n,r={};for(n in t)s(t,n)&&(e=D(n),e&&(r[e]=t[n]));return r}function S(t,e){return function(r){return null!=r?(T(this,t,r),n.updateOffset(this,e),this):C(this,t)}}function C(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function T(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function F(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=D(t),"function"==typeof this[t])return this[t](e);return this}function L(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.lengthe;e++)r[e]=Rr[r[e]]?Rr[r[e]]:N(r[e]);return function(i){var a="";for(e=0;n>e;e++)a+=r[e]instanceof Function?r[e].call(i,t):r[e];return a}}function I(t,e){return t.isValid()?(e=q(e,t.localeData()),qr[e]||(qr[e]=O(e)),qr[e](t)):t.localeData().invalidDate()}function q(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Ir.lastIndex=0;r>=0&&Ir.test(t);)t=t.replace(Ir,n),Ir.lastIndex=0,r-=1;return t}function R(t,e,n){Qr[t]="function"==typeof e?e:function(t){return t&&n?n:e}}function P(t,e){return s(Qr,t)?Qr[t](e._strict,e._locale):new RegExp(U(t))}function U(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=y(t)}),n=0;nr;r++){if(i=l([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function W(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function Z(t){return null!=t?(W(this,t),n.updateOffset(this,!0),this):C(this,"Month")}function X(){return V(this.year(),this.month())}function K(t){var e,n=t._a;return n&&-2===t._pf.overflow&&(e=n[ni]<0||n[ni]>11?ni:n[ri]<1||n[ri]>V(n[ei],n[ni])?ri:n[ii]<0||n[ii]>24||24===n[ii]&&(0!==n[ai]||0!==n[oi]||0!==n[ui])?ii:n[ai]<0||n[ai]>59?ai:n[oi]<0||n[oi]>59?oi:n[ui]<0||n[ui]>999?ui:-1,t._pf._overflowDayOfYear&&(ei>e||e>ri)&&(e=ri),t._pf.overflow=e),t}function J(t){n.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function Q(t,e){var n=!0;return c(function(){return n&&(J(t),n=!1),e.apply(this,arguments)},e)}function te(t,e){li[t]||(J(e),li[t]=!0)}function ee(t){var e,n,r=t._i,i=hi.exec(r);if(i){for(t._pf.iso=!0,e=0,n=fi.length;n>e;e++)if(fi[e][1].exec(r)){t._f=fi[e][0]+(i[6]||" ");break}for(e=0,n=di.length;n>e;e++)if(di[e][1].exec(r)){t._f+=di[e][0];break}r.match(Xr)&&(t._f+="Z"),_e(t)}else t._isValid=!1}function ne(t){var e=pi.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(ee(t),void(t._isValid===!1&&(delete t._isValid,n.createFromInputFallback(t))))}function re(t,e,n,r,i,a,o){var u=new Date(t,e,n,r,i,a,o);return 1970>t&&u.setFullYear(t),u}function ie(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ae(t){return oe(t)?366:365}function oe(t){return t%4===0&&t%100!==0||t%400===0}function ue(){return oe(this.year())}function se(t,e,n){var r,i=n-e,a=n-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Me(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ce(t){return se(t,this._week.dow,this._week.doy).week}function le(){return this._week.dow}function he(){return this._week.doy}function fe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function de(t){var e=se(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function pe(t,e,n,r,i){var a,o,u=ie(t,0,1).getUTCDay();return u=0===u?7:u,n=null!=n?n:i,a=i-u+(u>r?7:0)-(i>u?7:0),o=7*(e-1)+(n-i)+a+1,{year:o>0?t:t-1,dayOfYear:o>0?o:ae(t-1)+o}}function ge(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function ye(t,e,n){return null!=t?t:null!=e?e:n}function me(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ve(t){var e,n,r,i,a=[];if(!t._d){for(r=me(t),t._w&&null==t._a[ri]&&null==t._a[ni]&&be(t),t._dayOfYear&&(i=ye(t._a[ei],r[ei]),t._dayOfYear>ae(i)&&(t._pf._overflowDayOfYear=!0),n=ie(i,0,t._dayOfYear),t._a[ni]=n.getUTCMonth(),t._a[ri]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;7>e;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ii]&&0===t._a[ai]&&0===t._a[oi]&&0===t._a[ui]&&(t._nextDay=!0,t._a[ii]=0),t._d=(t._useUTC?ie:re).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ii]=24)}}function be(t){var e,n,r,i,a,o,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,o=4,n=ye(e.GG,t._a[ei],se(Me(),1,4).year),r=ye(e.W,1),i=ye(e.E,1)):(a=t._locale._week.dow,o=t._locale._week.doy,n=ye(e.gg,t._a[ei],se(Me(),a,o).year),r=ye(e.w,1),null!=e.d?(i=e.d,a>i&&++r):i=null!=e.e?e.e+a:a),u=pe(n,r,i,o,a),t._a[ei]=u.year,t._dayOfYear=u.dayOfYear}function _e(t){if(t._f===n.ISO_8601)return void ee(t);t._a=[],t._pf.empty=!0;var e,r,i,a,o,u=""+t._i,s=u.length,c=0;for(i=q(t._f,t._locale).match(Or)||[],e=0;e0&&t._pf.unusedInput.push(o),u=u.slice(u.indexOf(r)+r.length),c+=r.length),Rr[a]?(r?t._pf.empty=!1:t._pf.unusedTokens.push(a),z(a,r,t)):t._strict&&!r&&t._pf.unusedTokens.push(a);t._pf.charsLeftOver=s-c,u.length>0&&t._pf.unusedInput.push(u),t._pf.bigHour===!0&&t._a[ii]<=12&&(t._pf.bigHour=void 0),t._a[ii]=xe(t._locale,t._a[ii],t._meridiem),ve(t),K(t)}function xe(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function we(t){var e,n,r,a,o;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(a=0;ao)&&(r=o,n=e));c(t,n||e)}function Ae(t){if(!t._d){var e=M(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],ve(t)}}function ke(t){var e,n=t._i,r=t._f;return t._locale=t._locale||k(t._l),null===n||void 0===r&&""===n?f({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),g(n)?new p(K(n)):(a(r)?we(t):r?_e(t):Ee(t),e=new p(K(t)),e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e))}function Ee(t){var e=t._i;void 0===e?t._d=new Date:o(e)?t._d=new Date(+e):"string"==typeof e?ne(t):a(e)?(t._a=u(e.slice(0),function(t){return parseInt(t,10)}),ve(t)):"object"==typeof e?Ae(t):"number"==typeof e?t._d=new Date(e):n.createFromInputFallback(t)}function De(t,e,n,r,a){var o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=n,o._i=t,o._f=e,o._strict=r,o._pf=i(),ke(o)}function Me(t,e,n,r){return De(t,e,n,r,!1)}function Se(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Me();for(n=e[0],r=1;rt&&(t=-t,n="-"),n+L(~~(t/60),2)+e+L(~~t%60,2)})}function Ne(t){var e=(t||"").match(Xr)||[],n=e[e.length-1]||[],r=(n+"").match(bi)||["-",0,0],i=+(60*r[1])+y(r[2]);return"+"===r[0]?i:-i}function Oe(t,e){var r,i;return e._isUTC?(r=e.clone(),i=(g(t)||o(t)?+t:+Me(t))-+r,r._d.setTime(+r._d+i),n.updateOffset(r,!1),r):Me(t).local()}function Ie(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function qe(t,e){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Ne(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(r=Ie(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?Qe(this,We(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ie(this)}function Re(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Pe(t){return this.utcOffset(0,t)}function Ue(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),"m")),this}function Ye(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ne(this._i)),this}function je(t){return t=t?Me(t).utcOffset():0,(this.utcOffset()-t)%60===0}function ze(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ve(){if(this._a){var t=this._isUTC?l(this._a):Me(this._a);return this.isValid()&&m(this._a,t.toArray())>0}return!1}function He(){return!this._isUTC}function Ge(){return this._isUTC}function $e(){return this._isUTC&&0===this._offset}function We(t,e){var n,r,i,a=t,o=null;return Le(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=_i.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:y(o[ri])*n,h:y(o[ii])*n,m:y(o[ai])*n,s:y(o[oi])*n,ms:y(o[ui])*n}):(o=xi.exec(t))?(n="-"===o[1]?-1:1,a={y:Ze(o[2],n),M:Ze(o[3],n),d:Ze(o[4],n),h:Ze(o[5],n),m:Ze(o[6],n),s:Ze(o[7],n),w:Ze(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Ke(Me(a.from),Me(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new Fe(a),Le(t)&&s(t,"_locale")&&(r._locale=t._locale),r}function Ze(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Xe(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ke(t,e){var n;return e=Oe(e,t),t.isBefore(e)?n=Xe(t,e):(n=Xe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Je(t,e){return function(n,r){var i,a;return null===r||isNaN(+r)||(te(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),a=n,n=r,r=a),n="string"==typeof n?+n:n,i=We(n,r),Qe(this,i,t),this}}function Qe(t,e,r,i){var a=e._milliseconds,o=e._days,u=e._months;i=null==i?!0:i,a&&t._d.setTime(+t._d+a*r),o&&T(t,"Date",C(t,"Date")+o*r),u&&W(t,C(t,"Month")+u*r),i&&n.updateOffset(t,o||u)}function tn(t){var e=t||Me(),n=Oe(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Me(e)))}function en(){return new p(this)}function nn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+this>+t):(n=g(t)?+t:+Me(t),n<+this.clone().startOf(e))}function rn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+t>+this):(n=g(t)?+t:+Me(t),+this.clone().endOf(e)t?Math.ceil(t):Math.floor(t)}function sn(t,e,n){var r,i,a=Oe(t,this),o=6e4*(a.utcOffset()-this.utcOffset());return e=D(e),"year"===e||"month"===e||"quarter"===e?(i=cn(this,a),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-a,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-o)/864e5:"week"===e?(r-o)/6048e5:r),n?i:un(i)}function cn(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months");return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1,"months"),r=(e-a)/(n-a)),-(i+r)}function ln(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function hn(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=Me([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Rn(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Bn(t,this.localeData()),this.add(t-e,"d")):e}function Pn(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Un(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Yn(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function jn(t,e){return e._meridiemParse}function zn(t){return"p"===(t+"").toLowerCase().charAt(0)}function Vn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Hn(t){B(0,[t,3],0,"millisecond")}function Gn(){return this._isUTC?"UTC":""}function $n(){return this._isUTC?"Coordinated Universal Time":""}function Wn(t){return Me(1e3*t)}function Zn(){return Me.apply(null,arguments).parseZone()}function Xn(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.call(e,n):r}function Kn(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e}function Jn(){return this._invalidDate}function Qn(t){return this._ordinal.replace("%d",t)}function tr(t){return t}function er(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)}function nr(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function rr(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ir(t,e,n,r){var i=k(),a=l().set(r,e);return i[n](a,t)}function ar(t,e,n,r,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ir(t,e,n,i);var a,o=[];for(a=0;r>a;a++)o[a]=ir(t,a,n,i);return o}function or(t,e){return ar(t,e,"months",12,"month")}function ur(t,e){return ar(t,e,"monthsShort",12,"month")}function sr(t,e){return ar(t,e,"weekdays",7,"day")}function cr(t,e){return ar(t,e,"weekdaysShort",7,"day")}function lr(t,e){return ar(t,e,"weekdaysMin",7,"day")}function hr(){var t=this._data;return this._milliseconds=zi(this._milliseconds),this._days=zi(this._days),this._months=zi(this._months),t.milliseconds=zi(t.milliseconds),t.seconds=zi(t.seconds),t.minutes=zi(t.minutes),t.hours=zi(t.hours),t.months=zi(t.months),t.years=zi(t.years),this}function fr(t,e,n,r){var i=We(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function dr(t,e){return fr(this,t,e,1)}function pr(t,e){return fr(this,t,e,-1)}function gr(){var t,e,n,r=this._milliseconds,i=this._days,a=this._months,o=this._data,u=0;return o.milliseconds=r%1e3,t=un(r/1e3),o.seconds=t%60,e=un(t/60),o.minutes=e%60,n=un(e/60),o.hours=n%24,i+=un(n/24),u=un(yr(i)),i-=un(mr(u)),a+=un(i/30),i%=30,u+=un(a/12),a%=12,o.days=i,o.months=a,o.years=u,this}function yr(t){return 400*t/146097}function mr(t){return 146097*t/400}function vr(t){var e,n,r=this._milliseconds;if(t=D(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+12*yr(e),"month"===t?n:n/12;switch(e=this._days+Math.round(mr(this._months/12)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 24*e*60+r/6e4;case"second":return 24*e*60*60+r/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+r;default:throw new Error("Unknown unit "+t)}}function br(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function _r(t){return function(){return this.as(t)}}function xr(t){return t=D(t),this[t+"s"]()}function wr(t){return function(){return this._data[t]}}function Ar(){return un(this.days()/7)}function kr(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Er(t,e,n){var r=We(t).abs(),i=aa(r.as("s")),a=aa(r.as("m")),o=aa(r.as("h")),u=aa(r.as("d")),s=aa(r.as("M")),c=aa(r.as("y")),l=i0,l[4]=n,kr.apply(null,l)}function Dr(t,e){return void 0===oa[t]?!1:void 0===e?oa[t]:(oa[t]=e,!0)}function Mr(t){var e=this.localeData(),n=Er(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Sr(){var t=ua(this.years()),e=ua(this.months()),n=ua(this.days()),r=ua(this.hours()),i=ua(this.minutes()),a=ua(this.seconds()+this.milliseconds()/1e3),o=this.asSeconds();return o?(0>o?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"}var Cr,Tr,Fr=n.momentProperties=[],Lr=!1,Br={},Nr={},Or=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ir=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qr={},Rr={},Pr=/\d/,Ur=/\d\d/,Yr=/\d{3}/,jr=/\d{4}/,zr=/[+-]?\d{6}/,Vr=/\d\d?/,Hr=/\d{1,3}/,Gr=/\d{1,4}/,$r=/[+-]?\d{1,6}/,Wr=/\d+/,Zr=/[+-]?\d+/,Xr=/Z|[+-]\d\d:?\d\d/gi,Kr=/[+-]?\d+(\.\d{1,3})?/,Jr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Qr={},ti={},ei=0,ni=1,ri=2,ii=3,ai=4,oi=5,ui=6;B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),E("month","M"),R("M",Vr),R("MM",Vr,Ur),R("MMM",Jr),R("MMMM",Jr),Y(["M","MM"],function(t,e){e[ni]=y(t)-1}),Y(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[ni]=i:n._pf.invalidMonth=t});var si="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ci="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),li={};n.suppressDeprecationWarnings=!1;var hi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],di=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],pi=/^\/?Date\((\-?\d+)/i;n.createFromInputFallback=Q("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),E("year","y"),R("Y",Zr),R("YY",Vr,Ur),R("YYYY",Gr,jr),R("YYYYY",$r,zr),R("YYYYYY",$r,zr),Y(["YYYY","YYYYY","YYYYYY"],ei),Y("YY",function(t,e){e[ei]=n.parseTwoDigitYear(t)}),n.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var gi=S("FullYear",!1);B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),R("w",Vr),R("ww",Vr,Ur),R("W",Vr),R("WW",Vr,Ur),j(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=y(t)});var yi={dow:0,doy:6};B("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),R("DDD",Hr),R("DDDD",Yr),Y(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),n.ISO_8601=function(){};var mi=Q("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return this>t?this:t}),vi=Q("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return t>this?this:t});Be("Z",":"),Be("ZZ",""),R("Z",Xr),R("ZZ",Xr),Y(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ne(t)});var bi=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var _i=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,xi=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;We.fn=Fe.prototype;var wi=Je(1,"add"),Ai=Je(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var ki=Q("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Dn("gggg","weekYear"),Dn("ggggg","weekYear"),Dn("GGGG","isoWeekYear"),Dn("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),R("G",Zr),R("g",Zr),R("GG",Vr,Ur),R("gg",Vr,Ur),R("GGGG",Gr,jr),R("gggg",Gr,jr),R("GGGGG",$r,zr),R("ggggg",$r,zr),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=y(t)}),j(["gg","GG"],function(t,e,r,i){e[i]=n.parseTwoDigitYear(t)}),B("Q",0,0,"quarter"),E("quarter","Q"),R("Q",Pr),Y("Q",function(t,e){e[ni]=3*(y(t)-1)}),B("D",["DD",2],"Do","date"),E("date","D"),R("D",Vr),R("DD",Vr,Ur),R("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Y(["D","DD"],ri),Y("Do",function(t,e){e[ri]=y(t.match(Vr)[0],10)});var Ei=S("Date",!0);B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),R("d",Vr),R("e",Vr),R("E",Vr),R("dd",Jr),R("ddd",Jr),R("dddd",Jr),j(["dd","ddd","dddd"],function(t,e,n){var r=n._locale.weekdaysParse(t);null!=r?e.d=r:n._pf.invalidWeekday=t}),j(["d","e","E"],function(t,e,n,r){e[r]=y(t)});var Di="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Si="Su_Mo_Tu_We_Th_Fr_Sa".split("_");B("H",["HH",2],0,"hour"),B("h",["hh",2],0,function(){return this.hours()%12||12}),Yn("a",!0),Yn("A",!1),E("hour","h"),R("a",jn),R("A",jn),R("H",Vr),R("h",Vr),R("HH",Vr,Ur),R("hh",Vr,Ur),Y(["H","HH"],ii),Y(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Y(["h","hh"],function(t,e,n){e[ii]=y(t),n._pf.bigHour=!0});var Ci=/[ap]\.?m?\.?/i,Ti=S("Hours",!0);B("m",["mm",2],0,"minute"),E("minute","m"),R("m",Vr),R("mm",Vr,Ur),Y(["m","mm"],ai);var Fi=S("Minutes",!1);B("s",["ss",2],0,"second"),E("second","s"),R("s",Vr),R("ss",Vr,Ur),Y(["s","ss"],oi);var Li=S("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Hn("SSS"),Hn("SSSS"),E("millisecond","ms"),R("S",Hr,Pr),R("SS",Hr,Ur),R("SSS",Hr,Yr),R("SSSS",Wr),Y(["S","SS","SSS","SSSS"],function(t,e){e[ui]=y(1e3*("0."+t))});var Bi=S("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var Ni=p.prototype;Ni.add=wi,Ni.calendar=tn,Ni.clone=en,Ni.diff=sn,Ni.endOf=vn,Ni.format=fn,Ni.from=dn,Ni.fromNow=pn,Ni.get=F,Ni.invalidAt=En,Ni.isAfter=nn,Ni.isBefore=rn,Ni.isBetween=an,Ni.isSame=on,Ni.isValid=An,Ni.lang=ki,Ni.locale=gn,Ni.localeData=yn,Ni.max=vi,Ni.min=mi,Ni.parsingFlags=kn,Ni.set=F,Ni.startOf=mn,Ni.subtract=Ai,Ni.toArray=wn,Ni.toDate=xn,Ni.toISOString=hn,Ni.toJSON=hn,Ni.toString=ln,Ni.unix=_n,Ni.valueOf=bn,Ni.year=gi,Ni.isLeapYear=ue,Ni.weekYear=Sn,Ni.isoWeekYear=Cn,Ni.quarter=Ni.quarters=Ln,Ni.month=Z,Ni.daysInMonth=X,Ni.week=Ni.weeks=fe,Ni.isoWeek=Ni.isoWeeks=de,Ni.weeksInYear=Fn,Ni.isoWeeksInYear=Tn,Ni.date=Ei,Ni.day=Ni.days=Rn,Ni.weekday=Pn,Ni.isoWeekday=Un,Ni.dayOfYear=ge,Ni.hour=Ni.hours=Ti,Ni.minute=Ni.minutes=Fi,Ni.second=Ni.seconds=Li,Ni.millisecond=Ni.milliseconds=Bi,Ni.utcOffset=qe,Ni.utc=Pe,Ni.local=Ue,Ni.parseZone=Ye,Ni.hasAlignedHourOffset=je,Ni.isDST=ze,Ni.isDSTShifted=Ve,Ni.isLocal=He,Ni.isUtcOffset=Ge,Ni.isUtc=$e,Ni.isUTC=$e,Ni.zoneAbbr=Gn,Ni.zoneName=$n,Ni.dates=Q("dates accessor is deprecated. Use date instead.",Ei),Ni.months=Q("months accessor is deprecated. Use month instead",Z),Ni.years=Q("years accessor is deprecated. Use year instead",gi),Ni.zone=Q("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Re);var Oi=Ni,Ii={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},qi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Ri="Invalid date",Pi="%d",Ui=/\d{1,2}/,Yi={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ji=v.prototype;ji._calendar=Ii,ji.calendar=Xn,ji._longDateFormat=qi,ji.longDateFormat=Kn,ji._invalidDate=Ri,ji.invalidDate=Jn,ji._ordinal=Pi,ji.ordinal=Qn,ji._ordinalParse=Ui,ji.preparse=tr,ji.postformat=tr,ji._relativeTime=Yi,ji.relativeTime=er,ji.pastFuture=nr,ji.set=rr,ji.months=H,ji._months=si,ji.monthsShort=G,ji._monthsShort=ci,ji.monthsParse=$,ji.week=ce,ji._week=yi,ji.firstDayOfYear=he,ji.firstDayOfWeek=le,ji.weekdays=Nn,ji._weekdays=Di,ji.weekdaysMin=In,ji._weekdaysMin=Si,ji.weekdaysShort=On,ji._weekdaysShort=Mi,ji.weekdaysParse=qn,ji.isPM=zn,ji._meridiemParse=Ci,ji.meridiem=Vn,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),n.lang=Q("moment.lang is deprecated. Use moment.locale instead.",w),n.langData=Q("moment.langData is deprecated. Use moment.localeData instead.",k);var zi=Math.abs,Vi=_r("ms"),Hi=_r("s"),Gi=_r("m"),$i=_r("h"),Wi=_r("d"),Zi=_r("w"),Xi=_r("M"),Ki=_r("y"),Ji=wr("milliseconds"),Qi=wr("seconds"),ta=wr("minutes"),ea=wr("hours"),na=wr("days"),ra=wr("months"),ia=wr("years"),aa=Math.round,oa={s:45,m:45,h:22,d:26,M:11},ua=Math.abs,sa=Fe.prototype; sa.abs=hr,sa.add=dr,sa.subtract=pr,sa.as=vr,sa.asMilliseconds=Vi,sa.asSeconds=Hi,sa.asMinutes=Gi,sa.asHours=$i,sa.asDays=Wi,sa.asWeeks=Zi,sa.asMonths=Xi,sa.asYears=Ki,sa.valueOf=br,sa._bubble=gr,sa.get=xr,sa.milliseconds=Ji,sa.seconds=Qi,sa.minutes=ta,sa.hours=ea,sa.days=na,sa.weeks=Ar,sa.months=ra,sa.years=ia,sa.humanize=Mr,sa.toISOString=Sr,sa.toString=Sr,sa.toJSON=Sr,sa.locale=gn,sa.localeData=yn,sa.toIsoString=Q("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Sr),sa.lang=ki,B("X",0,0,"unix"),B("x",0,0,"valueOf"),R("x",Zr),R("X",Kr),Y("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,n){n._d=new Date(y(t))}),n.version="2.10.2",r(Me),n.fn=Oi,n.min=Ce,n.max=Te,n.utc=l,n.unix=Wn,n.months=or,n.isDate=o,n.locale=w,n.invalid=f,n.duration=We,n.isMoment=g,n.weekdays=sr,n.parseZone=Zn,n.localeData=k,n.isDuration=Le,n.monthsShort=ur,n.weekdaysMin=lr,n.defineLocale=A,n.weekdaysShort=cr,n.normalizeUnits=D,n.relativeTimeThreshold=Dr;var ca=n;return ca})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],A=[10,28,37,57,58],k=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(A,k,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(A,[2,48]),e(A,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(A,[2,51],{45:[1,86]}),e(A,[2,52]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(A,[2,59]),e(A,[2,60]),e(A,[2,61]),e(A,[2,62]),e(A,[2,63]),e(A,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(A,k,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(A,[2,55]),{10:[1,94]},e(A,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(A,[2,54]),{5:[2,3]},e(A,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(A,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],A=[1,40],k=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; -case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) +case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px",y.setAttribute("height",v);var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) },less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file diff --git a/dist/mermaid.slim.js b/dist/mermaid.slim.js index 31c71b2112..78d2612d82 100644 --- a/dist/mermaid.slim.js +++ b/dist/mermaid.slim.js @@ -28283,6 +28283,7 @@ module.exports.draw = function (text, id) { var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding; elem.style.height = h + 'px'; + elem.setAttribute('height', h); var svg = d3.select('#' + id); // http://codepen.io/anon/pen/azLvWR @@ -30061,10 +30062,11 @@ if (typeof module !== 'undefined' && require.main === module) { /** * Created by knut on 14-11-19. */ -var actors = {}; +var actors = {}; var actorKeys = []; -var messages = []; -var notes = []; +var messages = []; +var notes = []; + exports.addActor = function(id,name,description){ //console.log('Adding actor: '+id); actors[id] = {name:name, description:description}; @@ -30076,6 +30078,9 @@ exports.addMessage = function(idFrom, idTo, message, answer){ messages.push({from:idFrom, to:idTo, message:message, answer:answer}); }; +/** + * + */ exports.addSignal = function(idFrom, idTo, message, messageType){ //console.log('Adding message from='+idFrom+' to='+idTo+' message='+message+' answer='+answer); messages.push({from:idFrom, to:idTo, message:message, type:messageType}); @@ -30096,37 +30101,36 @@ exports.getActorKeys = function(){ }; exports.clear = function(){ - actors = {}; + actors = {}; messages = []; }; exports.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 - + 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 }; exports.ARROWTYPE = { - FILLED : 0, - OPEN : 1 + FILLED : 0, + OPEN : 1 }; exports.PLACEMENT = { - LEFTOF : 0, - RIGHTOF : 1, - OVER : 2 + LEFTOF : 0, + RIGHTOF : 1, + OVER : 2 }; exports.addNote = function (actor, placement, message){ @@ -30777,15 +30781,15 @@ exports.getTextObj = function(){ exports.getNoteRect = function(){ var rect = { - x: 0, - y: 0, - fill: '#EDF2AE', - stroke: '#666', - width: 100, - anchor:'start', - height: 100, - rx: 0, - ry: 0 + x : 0, + y : 0, + fill : '#EDF2AE', + stroke : '#666', + width : 100, + anchor : 'start', + height : 100, + rx : 0, + ry : 0 }; return rect; }; @@ -30980,21 +30984,22 @@ var equals = function (val, variable){ }; global.mermaid = { - startOnLoad:true, - htmlLabels:true, - init:function(sequenceConfig, nodes){ + startOnLoad: true, + htmlLabels: true, + + init: function(sequenceConfig, nodes) { init.apply(null, arguments); }, - version:function(){ + version: function() { return exports.version(); }, - getParser:function(){ + getParser: function() { return flow.parser; }, - parse:function(text){ + parse: function(text) { return parse(text); }, - parseError:function(err,hash){ + parseError: function(err, hash) { console.log('Mermaid Syntax error:'); console.log(err); } @@ -31036,6 +31041,9 @@ if(typeof document !== 'undefined'){ }, false); } +var apa = 1; +var bapselsin = 2; + }).call(this,typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) },{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,"he":81}],104:[function(require,module,exports){ /** diff --git a/dist/mermaid.slim.min.js b/dist/mermaid.slim.min.js index ec3f820254..d349cdd485 100644 --- a/dist/mermaid.slim.min.js +++ b/dist/mermaid.slim.min.js @@ -9,5 +9,5 @@ e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e, }function h(t){return null==t._isValid&&(t._isValid=!isNaN(t._d.getTime())&&t._pf.overflow<0&&!t._pf.empty&&!t._pf.invalidMonth&&!t._pf.nullInput&&!t._pf.invalidFormat&&!t._pf.userInvalidated,t._strict&&(t._isValid=t._isValid&&0===t._pf.charsLeftOver&&0===t._pf.unusedTokens.length&&void 0===t._pf.bigHour)),t._isValid}function f(t){var e=l(0/0);return null!=t?c(e._pf,t):e._pf.userInvalidated=!0,e}function d(t,e){var n,r,i;if("undefined"!=typeof e._isAMomentObject&&(t._isAMomentObject=e._isAMomentObject),"undefined"!=typeof e._i&&(t._i=e._i),"undefined"!=typeof e._f&&(t._f=e._f),"undefined"!=typeof e._l&&(t._l=e._l),"undefined"!=typeof e._strict&&(t._strict=e._strict),"undefined"!=typeof e._tzm&&(t._tzm=e._tzm),"undefined"!=typeof e._isUTC&&(t._isUTC=e._isUTC),"undefined"!=typeof e._offset&&(t._offset=e._offset),"undefined"!=typeof e._pf&&(t._pf=e._pf),"undefined"!=typeof e._locale&&(t._locale=e._locale),Fr.length>0)for(n in Fr)r=Fr[n],i=e[r],"undefined"!=typeof i&&(t[r]=i);return t}function p(t){d(this,t),this._d=new Date(+t._d),Lr===!1&&(Lr=!0,n.updateOffset(this),Lr=!1)}function g(t){return t instanceof p||null!=t&&s(t,"_isAMomentObject")}function y(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=e>=0?Math.floor(e):Math.ceil(e)),n}function m(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;i>r;r++)(n&&t[r]!==e[r]||!n&&y(t[r])!==y(e[r]))&&o++;return o+a}function v(){}function b(t){return t?t.toLowerCase().replace("_","-"):t}function _(t){for(var e,n,r,i,a=0;a0;){if(r=x(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&m(i,n,!0)>=e-1)break;e--}a++}return null}function x(n){var r=null;if(!Br[n]&&"undefined"!=typeof e&&e&&e.exports)try{r=Tr._abbr,t("./locale/"+n),w(r)}catch(i){}return Br[n]}function w(t,e){var n;return t&&(n="undefined"==typeof e?k(t):A(t,e),n&&(Tr=n)),Tr._abbr}function A(t,e){return null!==e?(e.abbr=t,Br[t]||(Br[t]=new v),Br[t].set(e),w(t),Br[t]):(delete Br[t],null)}function k(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Tr;if(!a(t)){if(e=x(t))return e;t=[t]}return _(t)}function E(t,e){var n=t.toLowerCase();Nr[n]=Nr[n+"s"]=Nr[e]=t}function D(t){return"string"==typeof t?Nr[t]||Nr[t.toLowerCase()]:void 0}function M(t){var e,n,r={};for(n in t)s(t,n)&&(e=D(n),e&&(r[e]=t[n]));return r}function S(t,e){return function(r){return null!=r?(T(this,t,r),n.updateOffset(this,e),this):C(this,t)}}function C(t,e){return t._d["get"+(t._isUTC?"UTC":"")+e]()}function T(t,e,n){return t._d["set"+(t._isUTC?"UTC":"")+e](n)}function F(t,e){var n;if("object"==typeof t)for(n in t)this.set(n,t[n]);else if(t=D(t),"function"==typeof this[t])return this[t](e);return this}function L(t,e,n){for(var r=""+Math.abs(t),i=t>=0;r.lengthe;e++)r[e]=Rr[r[e]]?Rr[r[e]]:N(r[e]);return function(i){var a="";for(e=0;n>e;e++)a+=r[e]instanceof Function?r[e].call(i,t):r[e];return a}}function I(t,e){return t.isValid()?(e=q(e,t.localeData()),qr[e]||(qr[e]=O(e)),qr[e](t)):t.localeData().invalidDate()}function q(t,e){function n(t){return e.longDateFormat(t)||t}var r=5;for(Ir.lastIndex=0;r>=0&&Ir.test(t);)t=t.replace(Ir,n),Ir.lastIndex=0,r-=1;return t}function R(t,e,n){Qr[t]="function"==typeof e?e:function(t){return t&&n?n:e}}function P(t,e){return s(Qr,t)?Qr[t](e._strict,e._locale):new RegExp(U(t))}function U(t){return t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,e,n,r,i){return e||n||r||i}).replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Y(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),"number"==typeof e&&(r=function(t,n){n[e]=y(t)}),n=0;nr;r++){if(i=l([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}}function W(t,e){var n;return"string"==typeof e&&(e=t.localeData().monthsParse(e),"number"!=typeof e)?t:(n=Math.min(t.date(),V(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t)}function Z(t){return null!=t?(W(this,t),n.updateOffset(this,!0),this):C(this,"Month")}function X(){return V(this.year(),this.month())}function K(t){var e,n=t._a;return n&&-2===t._pf.overflow&&(e=n[ni]<0||n[ni]>11?ni:n[ri]<1||n[ri]>V(n[ei],n[ni])?ri:n[ii]<0||n[ii]>24||24===n[ii]&&(0!==n[ai]||0!==n[oi]||0!==n[ui])?ii:n[ai]<0||n[ai]>59?ai:n[oi]<0||n[oi]>59?oi:n[ui]<0||n[ui]>999?ui:-1,t._pf._overflowDayOfYear&&(ei>e||e>ri)&&(e=ri),t._pf.overflow=e),t}function J(t){n.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function Q(t,e){var n=!0;return c(function(){return n&&(J(t),n=!1),e.apply(this,arguments)},e)}function te(t,e){li[t]||(J(e),li[t]=!0)}function ee(t){var e,n,r=t._i,i=hi.exec(r);if(i){for(t._pf.iso=!0,e=0,n=fi.length;n>e;e++)if(fi[e][1].exec(r)){t._f=fi[e][0]+(i[6]||" ");break}for(e=0,n=di.length;n>e;e++)if(di[e][1].exec(r)){t._f+=di[e][0];break}r.match(Xr)&&(t._f+="Z"),_e(t)}else t._isValid=!1}function ne(t){var e=pi.exec(t._i);return null!==e?void(t._d=new Date(+e[1])):(ee(t),void(t._isValid===!1&&(delete t._isValid,n.createFromInputFallback(t))))}function re(t,e,n,r,i,a,o){var u=new Date(t,e,n,r,i,a,o);return 1970>t&&u.setFullYear(t),u}function ie(t){var e=new Date(Date.UTC.apply(null,arguments));return 1970>t&&e.setUTCFullYear(t),e}function ae(t){return oe(t)?366:365}function oe(t){return t%4===0&&t%100!==0||t%400===0}function ue(){return oe(this.year())}function se(t,e,n){var r,i=n-e,a=n-t.day();return a>i&&(a-=7),i-7>a&&(a+=7),r=Me(t).add(a,"d"),{week:Math.ceil(r.dayOfYear()/7),year:r.year()}}function ce(t){return se(t,this._week.dow,this._week.doy).week}function le(){return this._week.dow}function he(){return this._week.doy}function fe(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")}function de(t){var e=se(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")}function pe(t,e,n,r,i){var a,o,u=ie(t,0,1).getUTCDay();return u=0===u?7:u,n=null!=n?n:i,a=i-u+(u>r?7:0)-(i>u?7:0),o=7*(e-1)+(n-i)+a+1,{year:o>0?t:t-1,dayOfYear:o>0?o:ae(t-1)+o}}function ge(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")}function ye(t,e,n){return null!=t?t:null!=e?e:n}function me(t){var e=new Date;return t._useUTC?[e.getUTCFullYear(),e.getUTCMonth(),e.getUTCDate()]:[e.getFullYear(),e.getMonth(),e.getDate()]}function ve(t){var e,n,r,i,a=[];if(!t._d){for(r=me(t),t._w&&null==t._a[ri]&&null==t._a[ni]&&be(t),t._dayOfYear&&(i=ye(t._a[ei],r[ei]),t._dayOfYear>ae(i)&&(t._pf._overflowDayOfYear=!0),n=ie(i,0,t._dayOfYear),t._a[ni]=n.getUTCMonth(),t._a[ri]=n.getUTCDate()),e=0;3>e&&null==t._a[e];++e)t._a[e]=a[e]=r[e];for(;7>e;e++)t._a[e]=a[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[ii]&&0===t._a[ai]&&0===t._a[oi]&&0===t._a[ui]&&(t._nextDay=!0,t._a[ii]=0),t._d=(t._useUTC?ie:re).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[ii]=24)}}function be(t){var e,n,r,i,a,o,u;e=t._w,null!=e.GG||null!=e.W||null!=e.E?(a=1,o=4,n=ye(e.GG,t._a[ei],se(Me(),1,4).year),r=ye(e.W,1),i=ye(e.E,1)):(a=t._locale._week.dow,o=t._locale._week.doy,n=ye(e.gg,t._a[ei],se(Me(),a,o).year),r=ye(e.w,1),null!=e.d?(i=e.d,a>i&&++r):i=null!=e.e?e.e+a:a),u=pe(n,r,i,o,a),t._a[ei]=u.year,t._dayOfYear=u.dayOfYear}function _e(t){if(t._f===n.ISO_8601)return void ee(t);t._a=[],t._pf.empty=!0;var e,r,i,a,o,u=""+t._i,s=u.length,c=0;for(i=q(t._f,t._locale).match(Or)||[],e=0;e0&&t._pf.unusedInput.push(o),u=u.slice(u.indexOf(r)+r.length),c+=r.length),Rr[a]?(r?t._pf.empty=!1:t._pf.unusedTokens.push(a),z(a,r,t)):t._strict&&!r&&t._pf.unusedTokens.push(a);t._pf.charsLeftOver=s-c,u.length>0&&t._pf.unusedInput.push(u),t._pf.bigHour===!0&&t._a[ii]<=12&&(t._pf.bigHour=void 0),t._a[ii]=xe(t._locale,t._a[ii],t._meridiem),ve(t),K(t)}function xe(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):null!=t.isPM?(r=t.isPM(n),r&&12>e&&(e+=12),r||12!==e||(e=0),e):e}function we(t){var e,n,r,a,o;if(0===t._f.length)return t._pf.invalidFormat=!0,void(t._d=new Date(0/0));for(a=0;ao)&&(r=o,n=e));c(t,n||e)}function Ae(t){if(!t._d){var e=M(t._i);t._a=[e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],ve(t)}}function ke(t){var e,n=t._i,r=t._f;return t._locale=t._locale||k(t._l),null===n||void 0===r&&""===n?f({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),g(n)?new p(K(n)):(a(r)?we(t):r?_e(t):Ee(t),e=new p(K(t)),e._nextDay&&(e.add(1,"d"),e._nextDay=void 0),e))}function Ee(t){var e=t._i;void 0===e?t._d=new Date:o(e)?t._d=new Date(+e):"string"==typeof e?ne(t):a(e)?(t._a=u(e.slice(0),function(t){return parseInt(t,10)}),ve(t)):"object"==typeof e?Ae(t):"number"==typeof e?t._d=new Date(e):n.createFromInputFallback(t)}function De(t,e,n,r,a){var o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=a,o._l=n,o._i=t,o._f=e,o._strict=r,o._pf=i(),ke(o)}function Me(t,e,n,r){return De(t,e,n,r,!1)}function Se(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return Me();for(n=e[0],r=1;rt&&(t=-t,n="-"),n+L(~~(t/60),2)+e+L(~~t%60,2)})}function Ne(t){var e=(t||"").match(Xr)||[],n=e[e.length-1]||[],r=(n+"").match(bi)||["-",0,0],i=+(60*r[1])+y(r[2]);return"+"===r[0]?i:-i}function Oe(t,e){var r,i;return e._isUTC?(r=e.clone(),i=(g(t)||o(t)?+t:+Me(t))-+r,r._d.setTime(+r._d+i),n.updateOffset(r,!1),r):Me(t).local()}function Ie(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function qe(t,e){var r,i=this._offset||0;return null!=t?("string"==typeof t&&(t=Ne(t)),Math.abs(t)<16&&(t=60*t),!this._isUTC&&e&&(r=Ie(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),i!==t&&(!e||this._changeInProgress?Qe(this,We(t-i,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?i:Ie(this)}function Re(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}function Pe(t){return this.utcOffset(0,t)}function Ue(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ie(this),"m")),this}function Ye(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(Ne(this._i)),this}function je(t){return t=t?Me(t).utcOffset():0,(this.utcOffset()-t)%60===0}function ze(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Ve(){if(this._a){var t=this._isUTC?l(this._a):Me(this._a);return this.isValid()&&m(this._a,t.toArray())>0}return!1}function He(){return!this._isUTC}function Ge(){return this._isUTC}function $e(){return this._isUTC&&0===this._offset}function We(t,e){var n,r,i,a=t,o=null;return Le(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:"number"==typeof t?(a={},e?a[e]=t:a.milliseconds=t):(o=_i.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:y(o[ri])*n,h:y(o[ii])*n,m:y(o[ai])*n,s:y(o[oi])*n,ms:y(o[ui])*n}):(o=xi.exec(t))?(n="-"===o[1]?-1:1,a={y:Ze(o[2],n),M:Ze(o[3],n),d:Ze(o[4],n),h:Ze(o[5],n),m:Ze(o[6],n),s:Ze(o[7],n),w:Ze(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Ke(Me(a.from),Me(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new Fe(a),Le(t)&&s(t,"_locale")&&(r._locale=t._locale),r}function Ze(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function Xe(t,e){var n={milliseconds:0,months:0};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Ke(t,e){var n;return e=Oe(e,t),t.isBefore(e)?n=Xe(t,e):(n=Xe(e,t),n.milliseconds=-n.milliseconds,n.months=-n.months),n}function Je(t,e){return function(n,r){var i,a;return null===r||isNaN(+r)||(te(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period)."),a=n,n=r,r=a),n="string"==typeof n?+n:n,i=We(n,r),Qe(this,i,t),this}}function Qe(t,e,r,i){var a=e._milliseconds,o=e._days,u=e._months;i=null==i?!0:i,a&&t._d.setTime(+t._d+a*r),o&&T(t,"Date",C(t,"Date")+o*r),u&&W(t,C(t,"Month")+u*r),i&&n.updateOffset(t,o||u)}function tn(t){var e=t||Me(),n=Oe(e,this).startOf("day"),r=this.diff(n,"days",!0),i=-6>r?"sameElse":-1>r?"lastWeek":0>r?"lastDay":1>r?"sameDay":2>r?"nextDay":7>r?"nextWeek":"sameElse";return this.format(this.localeData().calendar(i,this,Me(e)))}function en(){return new p(this)}function nn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+this>+t):(n=g(t)?+t:+Me(t),n<+this.clone().startOf(e))}function rn(t,e){var n;return e=D("undefined"!=typeof e?e:"millisecond"),"millisecond"===e?(t=g(t)?t:Me(t),+t>+this):(n=g(t)?+t:+Me(t),+this.clone().endOf(e)t?Math.ceil(t):Math.floor(t)}function sn(t,e,n){var r,i,a=Oe(t,this),o=6e4*(a.utcOffset()-this.utcOffset());return e=D(e),"year"===e||"month"===e||"quarter"===e?(i=cn(this,a),"quarter"===e?i/=3:"year"===e&&(i/=12)):(r=this-a,i="second"===e?r/1e3:"minute"===e?r/6e4:"hour"===e?r/36e5:"day"===e?(r-o)/864e5:"week"===e?(r-o)/6048e5:r),n?i:un(i)}function cn(t,e){var n,r,i=12*(e.year()-t.year())+(e.month()-t.month()),a=t.clone().add(i,"months");return 0>e-a?(n=t.clone().add(i-1,"months"),r=(e-a)/(a-n)):(n=t.clone().add(i+1,"months"),r=(e-a)/(n-a)),-(i+r)}function ln(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function hn(){var t=this.clone().utc();return 0e;e++)if(this._weekdaysParse[e]||(n=Me([2e3,1]).day(e),r="^"+this.weekdays(n,"")+"|^"+this.weekdaysShort(n,"")+"|^"+this.weekdaysMin(n,""),this._weekdaysParse[e]=new RegExp(r.replace(".",""),"i")),this._weekdaysParse[e].test(t))return e}function Rn(t){var e=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Bn(t,this.localeData()),this.add(t-e,"d")):e}function Pn(t){var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")}function Un(t){return null==t?this.day()||7:this.day(this.day()%7?t:t-7)}function Yn(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function jn(t,e){return e._meridiemParse}function zn(t){return"p"===(t+"").toLowerCase().charAt(0)}function Vn(t,e,n){return t>11?n?"pm":"PM":n?"am":"AM"}function Hn(t){B(0,[t,3],0,"millisecond")}function Gn(){return this._isUTC?"UTC":""}function $n(){return this._isUTC?"Coordinated Universal Time":""}function Wn(t){return Me(1e3*t)}function Zn(){return Me.apply(null,arguments).parseZone()}function Xn(t,e,n){var r=this._calendar[t];return"function"==typeof r?r.call(e,n):r}function Kn(t){var e=this._longDateFormat[t];return!e&&this._longDateFormat[t.toUpperCase()]&&(e=this._longDateFormat[t.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(t){return t.slice(1)}),this._longDateFormat[t]=e),e}function Jn(){return this._invalidDate}function Qn(t){return this._ordinal.replace("%d",t)}function tr(t){return t}function er(t,e,n,r){var i=this._relativeTime[n];return"function"==typeof i?i(t,e,n,r):i.replace(/%d/i,t)}function nr(t,e){var n=this._relativeTime[t>0?"future":"past"];return"function"==typeof n?n(e):n.replace(/%s/i,e)}function rr(t){var e,n;for(n in t)e=t[n],"function"==typeof e?this[n]=e:this["_"+n]=e;this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)}function ir(t,e,n,r){var i=k(),a=l().set(r,e);return i[n](a,t)}function ar(t,e,n,r,i){if("number"==typeof t&&(e=t,t=void 0),t=t||"",null!=e)return ir(t,e,n,i);var a,o=[];for(a=0;r>a;a++)o[a]=ir(t,a,n,i);return o}function or(t,e){return ar(t,e,"months",12,"month")}function ur(t,e){return ar(t,e,"monthsShort",12,"month")}function sr(t,e){return ar(t,e,"weekdays",7,"day")}function cr(t,e){return ar(t,e,"weekdaysShort",7,"day")}function lr(t,e){return ar(t,e,"weekdaysMin",7,"day")}function hr(){var t=this._data;return this._milliseconds=zi(this._milliseconds),this._days=zi(this._days),this._months=zi(this._months),t.milliseconds=zi(t.milliseconds),t.seconds=zi(t.seconds),t.minutes=zi(t.minutes),t.hours=zi(t.hours),t.months=zi(t.months),t.years=zi(t.years),this}function fr(t,e,n,r){var i=We(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function dr(t,e){return fr(this,t,e,1)}function pr(t,e){return fr(this,t,e,-1)}function gr(){var t,e,n,r=this._milliseconds,i=this._days,a=this._months,o=this._data,u=0;return o.milliseconds=r%1e3,t=un(r/1e3),o.seconds=t%60,e=un(t/60),o.minutes=e%60,n=un(e/60),o.hours=n%24,i+=un(n/24),u=un(yr(i)),i-=un(mr(u)),a+=un(i/30),i%=30,u+=un(a/12),a%=12,o.days=i,o.months=a,o.years=u,this}function yr(t){return 400*t/146097}function mr(t){return 146097*t/400}function vr(t){var e,n,r=this._milliseconds;if(t=D(t),"month"===t||"year"===t)return e=this._days+r/864e5,n=this._months+12*yr(e),"month"===t?n:n/12;switch(e=this._days+Math.round(mr(this._months/12)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 24*e*60+r/6e4;case"second":return 24*e*60*60+r/1e3;case"millisecond":return Math.floor(24*e*60*60*1e3)+r;default:throw new Error("Unknown unit "+t)}}function br(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*y(this._months/12)}function _r(t){return function(){return this.as(t)}}function xr(t){return t=D(t),this[t+"s"]()}function wr(t){return function(){return this._data[t]}}function Ar(){return un(this.days()/7)}function kr(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}function Er(t,e,n){var r=We(t).abs(),i=aa(r.as("s")),a=aa(r.as("m")),o=aa(r.as("h")),u=aa(r.as("d")),s=aa(r.as("M")),c=aa(r.as("y")),l=i0,l[4]=n,kr.apply(null,l)}function Dr(t,e){return void 0===oa[t]?!1:void 0===e?oa[t]:(oa[t]=e,!0)}function Mr(t){var e=this.localeData(),n=Er(this,!t,e);return t&&(n=e.pastFuture(+this,n)),e.postformat(n)}function Sr(){var t=ua(this.years()),e=ua(this.months()),n=ua(this.days()),r=ua(this.hours()),i=ua(this.minutes()),a=ua(this.seconds()+this.milliseconds()/1e3),o=this.asSeconds();return o?(0>o?"-":"")+"P"+(t?t+"Y":"")+(e?e+"M":"")+(n?n+"D":"")+(r||i||a?"T":"")+(r?r+"H":"")+(i?i+"M":"")+(a?a+"S":""):"P0D"}var Cr,Tr,Fr=n.momentProperties=[],Lr=!1,Br={},Nr={},Or=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|x|X|zz?|ZZ?|.)/g,Ir=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,qr={},Rr={},Pr=/\d/,Ur=/\d\d/,Yr=/\d{3}/,jr=/\d{4}/,zr=/[+-]?\d{6}/,Vr=/\d\d?/,Hr=/\d{1,3}/,Gr=/\d{1,4}/,$r=/[+-]?\d{1,6}/,Wr=/\d+/,Zr=/[+-]?\d+/,Xr=/Z|[+-]\d\d:?\d\d/gi,Kr=/[+-]?\d+(\.\d{1,3})?/,Jr=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,Qr={},ti={},ei=0,ni=1,ri=2,ii=3,ai=4,oi=5,ui=6;B("M",["MM",2],"Mo",function(){return this.month()+1}),B("MMM",0,0,function(t){return this.localeData().monthsShort(this,t)}),B("MMMM",0,0,function(t){return this.localeData().months(this,t)}),E("month","M"),R("M",Vr),R("MM",Vr,Ur),R("MMM",Jr),R("MMMM",Jr),Y(["M","MM"],function(t,e){e[ni]=y(t)-1}),Y(["MMM","MMMM"],function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[ni]=i:n._pf.invalidMonth=t});var si="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ci="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),li={};n.suppressDeprecationWarnings=!1;var hi=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,fi=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],di=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],pi=/^\/?Date\((\-?\d+)/i;n.createFromInputFallback=Q("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),B(0,["YY",2],0,function(){return this.year()%100}),B(0,["YYYY",4],0,"year"),B(0,["YYYYY",5],0,"year"),B(0,["YYYYYY",6,!0],0,"year"),E("year","y"),R("Y",Zr),R("YY",Vr,Ur),R("YYYY",Gr,jr),R("YYYYY",$r,zr),R("YYYYYY",$r,zr),Y(["YYYY","YYYYY","YYYYYY"],ei),Y("YY",function(t,e){e[ei]=n.parseTwoDigitYear(t)}),n.parseTwoDigitYear=function(t){return y(t)+(y(t)>68?1900:2e3)};var gi=S("FullYear",!1);B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),E("week","w"),E("isoWeek","W"),R("w",Vr),R("ww",Vr,Ur),R("W",Vr),R("WW",Vr,Ur),j(["w","ww","W","WW"],function(t,e,n,r){e[r.substr(0,1)]=y(t)});var yi={dow:0,doy:6};B("DDD",["DDDD",3],"DDDo","dayOfYear"),E("dayOfYear","DDD"),R("DDD",Hr),R("DDDD",Yr),Y(["DDD","DDDD"],function(t,e,n){n._dayOfYear=y(t)}),n.ISO_8601=function(){};var mi=Q("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return this>t?this:t}),vi=Q("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var t=Me.apply(null,arguments);return t>this?this:t});Be("Z",":"),Be("ZZ",""),R("Z",Xr),R("ZZ",Xr),Y(["Z","ZZ"],function(t,e,n){n._useUTC=!0,n._tzm=Ne(t)});var bi=/([\+\-]|\d\d)/gi;n.updateOffset=function(){};var _i=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,xi=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/;We.fn=Fe.prototype;var wi=Je(1,"add"),Ai=Je(-1,"subtract");n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ";var ki=Q("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(t){return void 0===t?this.localeData():this.locale(t)});B(0,["gg",2],0,function(){return this.weekYear()%100}),B(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Dn("gggg","weekYear"),Dn("ggggg","weekYear"),Dn("GGGG","isoWeekYear"),Dn("GGGGG","isoWeekYear"),E("weekYear","gg"),E("isoWeekYear","GG"),R("G",Zr),R("g",Zr),R("GG",Vr,Ur),R("gg",Vr,Ur),R("GGGG",Gr,jr),R("gggg",Gr,jr),R("GGGGG",$r,zr),R("ggggg",$r,zr),j(["gggg","ggggg","GGGG","GGGGG"],function(t,e,n,r){e[r.substr(0,2)]=y(t)}),j(["gg","GG"],function(t,e,r,i){e[i]=n.parseTwoDigitYear(t)}),B("Q",0,0,"quarter"),E("quarter","Q"),R("Q",Pr),Y("Q",function(t,e){e[ni]=3*(y(t)-1)}),B("D",["DD",2],"Do","date"),E("date","D"),R("D",Vr),R("DD",Vr,Ur),R("Do",function(t,e){return t?e._ordinalParse:e._ordinalParseLenient}),Y(["D","DD"],ri),Y("Do",function(t,e){e[ri]=y(t.match(Vr)[0],10)});var Ei=S("Date",!0);B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),E("day","d"),E("weekday","e"),E("isoWeekday","E"),R("d",Vr),R("e",Vr),R("E",Vr),R("dd",Jr),R("ddd",Jr),R("dddd",Jr),j(["dd","ddd","dddd"],function(t,e,n){var r=n._locale.weekdaysParse(t);null!=r?e.d=r:n._pf.invalidWeekday=t}),j(["d","e","E"],function(t,e,n,r){e[r]=y(t)});var Di="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Mi="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Si="Su_Mo_Tu_We_Th_Fr_Sa".split("_");B("H",["HH",2],0,"hour"),B("h",["hh",2],0,function(){return this.hours()%12||12}),Yn("a",!0),Yn("A",!1),E("hour","h"),R("a",jn),R("A",jn),R("H",Vr),R("h",Vr),R("HH",Vr,Ur),R("hh",Vr,Ur),Y(["H","HH"],ii),Y(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),Y(["h","hh"],function(t,e,n){e[ii]=y(t),n._pf.bigHour=!0});var Ci=/[ap]\.?m?\.?/i,Ti=S("Hours",!0);B("m",["mm",2],0,"minute"),E("minute","m"),R("m",Vr),R("mm",Vr,Ur),Y(["m","mm"],ai);var Fi=S("Minutes",!1);B("s",["ss",2],0,"second"),E("second","s"),R("s",Vr),R("ss",Vr,Ur),Y(["s","ss"],oi);var Li=S("Seconds",!1);B("S",0,0,function(){return~~(this.millisecond()/100)}),B(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Hn("SSS"),Hn("SSSS"),E("millisecond","ms"),R("S",Hr,Pr),R("SS",Hr,Ur),R("SSS",Hr,Yr),R("SSSS",Wr),Y(["S","SS","SSS","SSSS"],function(t,e){e[ui]=y(1e3*("0."+t))});var Bi=S("Milliseconds",!1);B("z",0,0,"zoneAbbr"),B("zz",0,0,"zoneName");var Ni=p.prototype;Ni.add=wi,Ni.calendar=tn,Ni.clone=en,Ni.diff=sn,Ni.endOf=vn,Ni.format=fn,Ni.from=dn,Ni.fromNow=pn,Ni.get=F,Ni.invalidAt=En,Ni.isAfter=nn,Ni.isBefore=rn,Ni.isBetween=an,Ni.isSame=on,Ni.isValid=An,Ni.lang=ki,Ni.locale=gn,Ni.localeData=yn,Ni.max=vi,Ni.min=mi,Ni.parsingFlags=kn,Ni.set=F,Ni.startOf=mn,Ni.subtract=Ai,Ni.toArray=wn,Ni.toDate=xn,Ni.toISOString=hn,Ni.toJSON=hn,Ni.toString=ln,Ni.unix=_n,Ni.valueOf=bn,Ni.year=gi,Ni.isLeapYear=ue,Ni.weekYear=Sn,Ni.isoWeekYear=Cn,Ni.quarter=Ni.quarters=Ln,Ni.month=Z,Ni.daysInMonth=X,Ni.week=Ni.weeks=fe,Ni.isoWeek=Ni.isoWeeks=de,Ni.weeksInYear=Fn,Ni.isoWeeksInYear=Tn,Ni.date=Ei,Ni.day=Ni.days=Rn,Ni.weekday=Pn,Ni.isoWeekday=Un,Ni.dayOfYear=ge,Ni.hour=Ni.hours=Ti,Ni.minute=Ni.minutes=Fi,Ni.second=Ni.seconds=Li,Ni.millisecond=Ni.milliseconds=Bi,Ni.utcOffset=qe,Ni.utc=Pe,Ni.local=Ue,Ni.parseZone=Ye,Ni.hasAlignedHourOffset=je,Ni.isDST=ze,Ni.isDSTShifted=Ve,Ni.isLocal=He,Ni.isUtcOffset=Ge,Ni.isUtc=$e,Ni.isUTC=$e,Ni.zoneAbbr=Gn,Ni.zoneName=$n,Ni.dates=Q("dates accessor is deprecated. Use date instead.",Ei),Ni.months=Q("months accessor is deprecated. Use month instead",Z),Ni.years=Q("years accessor is deprecated. Use year instead",gi),Ni.zone=Q("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",Re);var Oi=Ni,Ii={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},qi={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY LT",LLLL:"dddd, MMMM D, YYYY LT"},Ri="Invalid date",Pi="%d",Ui=/\d{1,2}/,Yi={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},ji=v.prototype;ji._calendar=Ii,ji.calendar=Xn,ji._longDateFormat=qi,ji.longDateFormat=Kn,ji._invalidDate=Ri,ji.invalidDate=Jn,ji._ordinal=Pi,ji.ordinal=Qn,ji._ordinalParse=Ui,ji.preparse=tr,ji.postformat=tr,ji._relativeTime=Yi,ji.relativeTime=er,ji.pastFuture=nr,ji.set=rr,ji.months=H,ji._months=si,ji.monthsShort=G,ji._monthsShort=ci,ji.monthsParse=$,ji.week=ce,ji._week=yi,ji.firstDayOfYear=he,ji.firstDayOfWeek=le,ji.weekdays=Nn,ji._weekdays=Di,ji.weekdaysMin=In,ji._weekdaysMin=Si,ji.weekdaysShort=On,ji._weekdaysShort=Mi,ji.weekdaysParse=qn,ji.isPM=zn,ji._meridiemParse=Ci,ji.meridiem=Vn,w("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10,n=1===y(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th";return t+n}}),n.lang=Q("moment.lang is deprecated. Use moment.locale instead.",w),n.langData=Q("moment.langData is deprecated. Use moment.localeData instead.",k);var zi=Math.abs,Vi=_r("ms"),Hi=_r("s"),Gi=_r("m"),$i=_r("h"),Wi=_r("d"),Zi=_r("w"),Xi=_r("M"),Ki=_r("y"),Ji=wr("milliseconds"),Qi=wr("seconds"),ta=wr("minutes"),ea=wr("hours"),na=wr("days"),ra=wr("months"),ia=wr("years"),aa=Math.round,oa={s:45,m:45,h:22,d:26,M:11},ua=Math.abs,sa=Fe.prototype; sa.abs=hr,sa.add=dr,sa.subtract=pr,sa.as=vr,sa.asMilliseconds=Vi,sa.asSeconds=Hi,sa.asMinutes=Gi,sa.asHours=$i,sa.asDays=Wi,sa.asWeeks=Zi,sa.asMonths=Xi,sa.asYears=Ki,sa.valueOf=br,sa._bubble=gr,sa.get=xr,sa.milliseconds=Ji,sa.seconds=Qi,sa.minutes=ta,sa.hours=ea,sa.days=na,sa.weeks=Ar,sa.months=ra,sa.years=ia,sa.humanize=Mr,sa.toISOString=Sr,sa.toString=Sr,sa.toJSON=Sr,sa.locale=gn,sa.localeData=yn,sa.toIsoString=Q("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Sr),sa.lang=ki,B("X",0,0,"unix"),B("x",0,0,"valueOf"),R("x",Zr),R("X",Kr),Y("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,n){n._d=new Date(y(t))}),n.version="2.10.2",r(Me),n.fn=Oi,n.min=Ce,n.max=Te,n.utc=l,n.unix=Wn,n.months=or,n.isDate=o,n.locale=w,n.invalid=f,n.duration=We,n.isMoment=g,n.weekdays=sr,n.parseZone=Zn,n.localeData=k,n.isDuration=Le,n.monthsShort=ur,n.weekdaysMin=lr,n.defineLocale=A,n.weekdaysShort=cr,n.normalizeUnits=D,n.relativeTimeThreshold=Dr;var ca=n;return ca})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],A=[10,28,37,57,58],k=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(A,k,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(A,[2,48]),e(A,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(A,[2,51],{45:[1,86]}),e(A,[2,52]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(A,[2,59]),e(A,[2,60]),e(A,[2,61]),e(A,[2,62]),e(A,[2,63]),e(A,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(A,k,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(A,[2,55]),{10:[1,94]},e(A,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(A,[2,54]),{5:[2,3]},e(A,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(A,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],A=[1,40],k=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; -case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px";var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) +case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px",y.setAttribute("height",v);var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) },less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file diff --git a/lib/cli.js b/lib/cli.js index af4a2de709..7c8208caab 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -24,6 +24,7 @@ function cli(options) { , verbose: 'v' , phantomPath: 'e' , sequenceConfig: 'c' + , ganttConfig: 'g' , css: 't' } , 'boolean': ['help', 'png', 'svg'] @@ -45,6 +46,7 @@ function cli(options) { , " -e --phantomPath Specify the path to the phantomjs executable" , " -t --css Specify the path to a CSS file to be included when processing output" , " -c --sequenceConfig Specify the path to the file with the configuration to be applied in the sequence diagram" + , " -g --ganttConfig Specify the path to the file with the configuration to be applied in the gantt diagram" , " -h --help Show this message" , " -v --verbose Show logging" , " --version Print version and quit" @@ -74,7 +76,7 @@ cli.prototype.parse = function(argv, next) { } // ensure that parameter-expecting options have parameters - ;['outputDir', 'phantomPath', 'sequenceConfig', 'css'].forEach(function(i) { + ;['outputDir', 'phantomPath', 'sequenceConfig', 'ganttConfig', 'css'].forEach(function(i) { if(typeof options[i] !== 'undefined') { if (typeof options[i] !== 'string' || options[i].length < 1) { this.errors.push(new Error(i + " expects a value.")) @@ -94,6 +96,12 @@ cli.prototype.parse = function(argv, next) { options.sequenceConfig = checkConfig(options.sequenceConfig) } + + if (options.ganttConfig) { + options.ganttConfig = checkConfig(options.ganttConfig) + console.log('Got conf'+options.ganttConfig); + } + if (options.css) { try { options.css = fs.readFileSync(options.css, 'utf8') diff --git a/lib/index.js b/lib/index.js index 50c4d7fa6b..284634a7a1 100644 --- a/lib/index.js +++ b/lib/index.js @@ -20,6 +20,7 @@ function processMermaid(files, _options, _next) { , options.svg , options.css || '' , options.sequenceConfig + , options.ganttConfig , options.verbose ] diff --git a/lib/phantomscript.js b/lib/phantomscript.js index 8f3d28ab21..8d2d7f7747 100644 --- a/lib/phantomscript.js +++ b/lib/phantomscript.js @@ -28,18 +28,24 @@ var system = require('system') , fs = require('fs') , webpage = require('webpage') + var page = webpage.create() - , files = phantom.args.slice(6, phantom.args.length) + , files = phantom.args.slice(7, phantom.args.length) , options = { outputDir: phantom.args[0] , png: phantom.args[1] === 'true' ? true : false , svg: phantom.args[2] === 'true' ? true : false , css: phantom.args[3] !== '' ? phantom.args[3] : '* { margin: 0; padding: 0; }' , sequenceConfig: phantom.args[4] - , verbose: phantom.args[5] === 'true' ? true : false + , ganttConfig: phantom.args[5] + , verbose: phantom.args[6] === 'true' ? true : false } , log = logger(options.verbose) + +console.log('options'); +console.log(options.ganttConfig); + page.content = [ '' , '' @@ -68,8 +74,9 @@ files.forEach(function(file) { // look like it. we need to serialize then unserialize the svgContent that's // taken from the DOM svgContent = page.evaluate(executeInPage, { - contents: contents, - sequenceConfig: options.sequenceConfig + contents : contents, + ganttConfig : options.ganttConfig, + sequenceConfig : options.sequenceConfig }) oDOM = oParser.parseFromString(svgContent, "text/xml") @@ -193,6 +200,7 @@ function executeInPage(data) { var xmlSerializer = new XMLSerializer() , contents = data.contents , sequenceConfig = data.sequenceConfig + , ganttConfig = data.ganttConfig , toRemove , el , elContent @@ -221,6 +229,17 @@ function executeInPage(data) { document.body.appendChild(sc) } + if(typeof ganttConfig !== undefined && ganttConfig !== 'undefined'){ + console.log('Got ganttConfig'); + sc = document.createElement("script") + scContent = document.createTextNode('mermaid.ganttConfig = JSON.parse(' + JSON.stringify(ganttConfig) + ');') + sc.appendChild(scContent) + + document.body.appendChild(sc) + }else{ + console.log('No gantt config'); + } + mermaid.init(); svg = document.querySelector('svg') diff --git a/src/diagrams/gantt/exGantt.md b/src/diagrams/gantt/exGantt.md index 958b3ad622..69cb7ce990 100644 --- a/src/diagrams/gantt/exGantt.md +++ b/src/diagrams/gantt/exGantt.md @@ -21,4 +21,3 @@ gantt Add gantt diagram to demo page :after a1 , 2h Add gantt to diagram to demo page :after a1 , 2h ``` -testa \ No newline at end of file diff --git a/src/diagrams/gantt/ganttRenderer.js b/src/diagrams/gantt/ganttRenderer.js index fe9ccd7c3e..c3e939a947 100644 --- a/src/diagrams/gantt/ganttRenderer.js +++ b/src/diagrams/gantt/ganttRenderer.js @@ -38,6 +38,7 @@ module.exports.draw = function (text, id) { var h = taskArray.length * (conf.barHeight + conf.barGap) + 2 * conf.topPadding; elem.style.height = h + 'px'; + elem.setAttribute('height', h); var svg = d3.select('#' + id); // http://codepen.io/anon/pen/azLvWR diff --git a/src/diagrams/sequenceDiagram/sequenceDb.js b/src/diagrams/sequenceDiagram/sequenceDb.js index 1100a48980..6369dffc7e 100644 --- a/src/diagrams/sequenceDiagram/sequenceDb.js +++ b/src/diagrams/sequenceDiagram/sequenceDb.js @@ -1,10 +1,11 @@ /** * Created by knut on 14-11-19. */ -var actors = {}; +var actors = {}; var actorKeys = []; -var messages = []; -var notes = []; +var messages = []; +var notes = []; + exports.addActor = function(id,name,description){ //console.log('Adding actor: '+id); actors[id] = {name:name, description:description}; @@ -16,6 +17,9 @@ exports.addMessage = function(idFrom, idTo, message, answer){ messages.push({from:idFrom, to:idTo, message:message, answer:answer}); }; +/** + * + */ exports.addSignal = function(idFrom, idTo, message, messageType){ //console.log('Adding message from='+idFrom+' to='+idTo+' message='+message+' answer='+answer); messages.push({from:idFrom, to:idTo, message:message, type:messageType}); @@ -36,37 +40,36 @@ exports.getActorKeys = function(){ }; exports.clear = function(){ - actors = {}; + actors = {}; messages = []; }; exports.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 - + 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 }; exports.ARROWTYPE = { - FILLED : 0, - OPEN : 1 + FILLED : 0, + OPEN : 1 }; exports.PLACEMENT = { - LEFTOF : 0, - RIGHTOF : 1, - OVER : 2 + LEFTOF : 0, + RIGHTOF : 1, + OVER : 2 }; exports.addNote = function (actor, placement, message){ diff --git a/src/diagrams/sequenceDiagram/svgDraw.js b/src/diagrams/sequenceDiagram/svgDraw.js index 8aa13a3840..f6cf899921 100644 --- a/src/diagrams/sequenceDiagram/svgDraw.js +++ b/src/diagrams/sequenceDiagram/svgDraw.js @@ -217,15 +217,15 @@ exports.getTextObj = function(){ exports.getNoteRect = function(){ var rect = { - x: 0, - y: 0, - fill: '#EDF2AE', - stroke: '#666', - width: 100, - anchor:'start', - height: 100, - rx: 0, - ry: 0 + x : 0, + y : 0, + fill : '#EDF2AE', + stroke : '#666', + width : 100, + anchor : 'start', + height : 100, + rx : 0, + ry : 0 }; return rect; }; diff --git a/src/main.js b/src/main.js index 9bd72462dc..442eb6d1d8 100644 --- a/src/main.js +++ b/src/main.js @@ -186,21 +186,22 @@ var equals = function (val, variable){ }; global.mermaid = { - startOnLoad:true, - htmlLabels:true, - init:function(sequenceConfig, nodes){ + startOnLoad: true, + htmlLabels: true, + + init: function(sequenceConfig, nodes) { init.apply(null, arguments); }, - version:function(){ + version: function() { return exports.version(); }, - getParser:function(){ + getParser: function() { return flow.parser; }, - parse:function(text){ + parse: function(text) { return parse(text); }, - parseError:function(err,hash){ + parseError: function(err, hash) { console.log('Mermaid Syntax error:'); console.log(err); } @@ -241,3 +242,6 @@ if(typeof document !== 'undefined'){ exports.contentLoaded(); }, false); } + +var apa = 1; +var bapselsin = 2; diff --git a/test/gantt.html b/test/gantt.html index c07ac69cab..ee5dd9c051 100644 --- a/test/gantt.html +++ b/test/gantt.html @@ -4,7 +4,7 @@ - + - - +

scale tests

From 22cee7e4b076eb05cc5de47d72b0e8a348942f70 Mon Sep 17 00:00:00 2001 From: knsv Date: Mon, 20 Apr 2015 21:22:05 +0200 Subject: [PATCH 5/6] Fix for defect #158 --- CHANGELOG.md | 1 - dist/mermaid.forest.css | 3 +++ dist/mermaid.full.js | 4 +++- dist/mermaid.full.min.js | 2 +- dist/mermaid.slim.js | 4 +++- dist/mermaid.slim.min.js | 2 +- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d378914373..3bbf313664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -383,5 +383,4 @@ ## [0.1.0](https://github.com/knsv/mermaid/tree/0.1.0) (2014-11-16) - \* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)* \ No newline at end of file diff --git a/dist/mermaid.forest.css b/dist/mermaid.forest.css index 729b035015..b7e2b70813 100644 --- a/dist/mermaid.forest.css +++ b/dist/mermaid.forest.css @@ -4,6 +4,9 @@ .mermaid .label { color: #333333; } + +body {width:800px;} + .node rect, .node circle, .node polygon { diff --git a/dist/mermaid.full.js b/dist/mermaid.full.js index 908e2a0659..f852a5a2af 100644 --- a/dist/mermaid.full.js +++ b/dist/mermaid.full.js @@ -31146,7 +31146,9 @@ module.exports.cloneCssStyles = function(svg, classes){ catch(err) { if(typeof console !== 'undefined'){ if(console.warn !== 'undefined'){ - console.warn('Invalid CSS selector "' + rule.selectorText + '"', err); + if(rule !== 'undefined'){ + console.warn('Invalid CSS selector "' + rule.selectorText + '"', err); + } } } } diff --git a/dist/mermaid.full.min.js b/dist/mermaid.full.min.js index 86772b70bb..e41477bb51 100644 --- a/dist/mermaid.full.min.js +++ b/dist/mermaid.full.min.js @@ -42,4 +42,4 @@ e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e, sa.abs=hr,sa.add=dr,sa.subtract=pr,sa.as=vr,sa.asMilliseconds=Vi,sa.asSeconds=Hi,sa.asMinutes=Gi,sa.asHours=$i,sa.asDays=Wi,sa.asWeeks=Zi,sa.asMonths=Xi,sa.asYears=Ki,sa.valueOf=br,sa._bubble=gr,sa.get=xr,sa.milliseconds=Ji,sa.seconds=Qi,sa.minutes=ta,sa.hours=ea,sa.days=na,sa.weeks=Ar,sa.months=ra,sa.years=ia,sa.humanize=Mr,sa.toISOString=Sr,sa.toString=Sr,sa.toJSON=Sr,sa.locale=gn,sa.localeData=yn,sa.toIsoString=Q("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Sr),sa.lang=ki,B("X",0,0,"unix"),B("x",0,0,"valueOf"),R("x",Zr),R("X",Kr),Y("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,n){n._d=new Date(y(t))}),n.version="2.10.2",r(Me),n.fn=Oi,n.min=Ce,n.max=Te,n.utc=l,n.unix=Wn,n.months=or,n.isDate=o,n.locale=w,n.invalid=f,n.duration=We,n.isMoment=g,n.weekdays=sr,n.parseZone=Zn,n.localeData=k,n.isDuration=Le,n.monthsShort=ur,n.weekdaysMin=lr,n.defineLocale=A,n.weekdaysShort=cr,n.normalizeUnits=D,n.relativeTimeThreshold=Dr;var ca=n;return ca})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],A=[10,28,37,57,58],k=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(A,k,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(A,[2,48]),e(A,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(A,[2,51],{45:[1,86]}),e(A,[2,52]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(A,[2,59]),e(A,[2,60]),e(A,[2,61]),e(A,[2,62]),e(A,[2,63]),e(A,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(A,k,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(A,[2,55]),{10:[1,94]},e(A,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(A,[2,54]),{5:[2,3]},e(A,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(A,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],A=[1,40],k=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px",y.setAttribute("height",v);var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) -},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file +},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&"undefined"!==u&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file diff --git a/dist/mermaid.slim.js b/dist/mermaid.slim.js index 78d2612d82..27dac13da0 100644 --- a/dist/mermaid.slim.js +++ b/dist/mermaid.slim.js @@ -31114,7 +31114,9 @@ module.exports.cloneCssStyles = function(svg, classes){ catch(err) { if(typeof console !== 'undefined'){ if(console.warn !== 'undefined'){ - console.warn('Invalid CSS selector "' + rule.selectorText + '"', err); + if(rule !== 'undefined'){ + console.warn('Invalid CSS selector "' + rule.selectorText + '"', err); + } } } } diff --git a/dist/mermaid.slim.min.js b/dist/mermaid.slim.min.js index d349cdd485..e81feb2612 100644 --- a/dist/mermaid.slim.min.js +++ b/dist/mermaid.slim.min.js @@ -10,4 +10,4 @@ e.exports=n},{"../lodash":76,"./dijkstra":62}],62:[function(t,e){function n(t,e, sa.abs=hr,sa.add=dr,sa.subtract=pr,sa.as=vr,sa.asMilliseconds=Vi,sa.asSeconds=Hi,sa.asMinutes=Gi,sa.asHours=$i,sa.asDays=Wi,sa.asWeeks=Zi,sa.asMonths=Xi,sa.asYears=Ki,sa.valueOf=br,sa._bubble=gr,sa.get=xr,sa.milliseconds=Ji,sa.seconds=Qi,sa.minutes=ta,sa.hours=ea,sa.days=na,sa.weeks=Ar,sa.months=ra,sa.years=ia,sa.humanize=Mr,sa.toISOString=Sr,sa.toString=Sr,sa.toJSON=Sr,sa.locale=gn,sa.localeData=yn,sa.toIsoString=Q("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Sr),sa.lang=ki,B("X",0,0,"unix"),B("x",0,0,"valueOf"),R("x",Zr),R("X",Kr),Y("X",function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))}),Y("x",function(t,e,n){n._d=new Date(y(t))}),n.version="2.10.2",r(Me),n.fn=Oi,n.min=Ce,n.max=Te,n.utc=l,n.unix=Wn,n.months=or,n.isDate=o,n.locale=w,n.invalid=f,n.duration=We,n.isMoment=g,n.weekdays=sr,n.parseZone=Zn,n.localeData=k,n.isDuration=Le,n.monthsShort=ur,n.weekdaysMin=lr,n.defineLocale=A,n.weekdaysShort=cr,n.normalizeUnits=D,n.relativeTimeThreshold=Dr;var ca=n;return ca})},{}],84:[function(t,e){e.exports={name:"mermaid",version:"0.4.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams and gantt charts.",main:"src/main.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{test:"gulp test"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"~3.4.13","dagre-d3":"~0.4.2",he:"^0.5.0",minimist:"^1.1.0",mkdirp:"^0.5.0",moment:"^2.9.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.3",dateformat:"^1.0.11","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-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~1.0.1","gulp-jison":"~1.0.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","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",proxyquire:"^1.3.1",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3"}}},{}],85:[function(t,e,n){var r="",i=!1;n.setMessage=function(t){r=t},n.getMessage=function(){return r},n.setInfo=function(t){i=t},n.getInfo=function(){return i},n.parseError=function(t,e){mermaid.parseError(t,e)}},{}],86:[function(t,e,n){var r=t("./exampleDb"),i=t("./parser/example.js");n.draw=function(t,e,n){var a;a=i.parser,a.yy=r,a.parse(t);var o=d3.select("#"+e),u=o.append("g");u.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+n),o.attr("height",100),o.attr("width",400)}},{"./exampleDb":85,"./parser/example.js":87}],87:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,9,10,12],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,message:11,say:12,TXT:13,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo",12:"say",13:"TXT"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1],[8,1],[11,2]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[o]);break;case 8:this.$=a[o-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8],11:9,12:[1,10]},{1:[2,1]},e(n,[2,3]),e(n,[2,4]),e(n,[2,5]),e(n,[2,6]),e(n,[2,7]),{13:[1,11]},e(n,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 9;case 1:return 10;case 2:return 4;case 3:return 12;case 4:return 13;case 5:return 6;case 6:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:showInfo\b)/i,/^(?:info\b)/i,/^(?:say\b)/i,/^(?::[^#\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6],inclusive:!0}}};return t}();return r.lexer=i,t.prototype=r,r.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],88:[function(t,e){var n;if(t)try{n=t("d3")}catch(r){}n||(n=window.d3),e.exports=n},{d3:1}],89:[function(t,e){var n;if(t)try{n=t("dagre-d3")}catch(r){}n||(n=window.dagreD3),e.exports=n},{"dagre-d3":2}],90:[function(t,e,n){(function(r){var i=t("./graphDb"),a=t("./parser/flow"),o=t("./parser/dot"),u=t("./dagre-d3"),s=t("./d3"),c={};e.exports.setConf=function(t){var e,n=Object.keys(t);for(e=0;e0&&(u=o.classes.join(" "));var s="";s=i(s,o.styles),a="undefined"==typeof o.text?o.id:o.text;var c="";r.mermaid.htmlLabels?c="html":(a=a.replace(/
/g,"\n"),c="text");var l=0,h="";switch(o.type){case"round":l=5,h="rect";break;case"square":h="rect";break;case"diamond":h="question";break;case"odd":h="rect_left_inv_arrow";break;case"odd_right":h="rect_left_inv_arrow";break;case"circle":h="circle";break;default:h="rect"}e.setNode(o.id,{labelType:c,shape:h,label:a,rx:l,ry:l,"class":u,style:s,id:o.id})})},n.addEdges=function(t,e){var n,i,a=0;"undefined"!=typeof t.defaultStyle&&(i=t.defaultStyle.toString().replace(/,/g,";")),t.forEach(function(t){a++,n="arrow_open"===t.type?"none":"normal";var o="";if("undefined"!=typeof t.style)t.style.forEach(function(t){o=o+t+";"});else switch(t.stroke){case"normal":o="fill:none","undefined"!=typeof i&&(o=i);break;case"dotted":o="stroke: #333; fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":o="stroke: #333; stroke-width: 3.5px;fill:none"}if("undefined"==typeof t.text)"undefined"==typeof t.style?e.setEdge(t.start,t.end,{style:o,arrowhead:n},a):e.setEdge(t.start,t.end,{style:o,arrowheadStyle:"fill: #333",arrowhead:n},a);else{var u=t.text.replace(/
/g,"\n");"undefined"==typeof t.style?r.mermaid.htmlLabels?e.setEdge(t.start,t.end,{labelType:"html",style:o,labelpos:"c",label:''+t.text+"",arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:"stroke: #333; stroke-width: 1.5px;fill:none",labelpos:"c",label:u,arrowheadStyle:"fill: #333",arrowhead:n},a):e.setEdge(t.start,t.end,{labelType:"text",style:o,arrowheadStyle:"fill: #333",label:u,arrowhead:n},a)}})},n.getClasses=function(t,e){var n;i.clear(),n=e?o.parser:a.parser,n.yy=i,n.parse(t);var r=i.getClasses();return"undefined"==typeof r.default&&(r.default={id:"default"},r.default.styles=["fill:#ffa","stroke:#666","stroke-width:3px"],r.default.nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],r.default.edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),r},n.draw=function(t,e,r){var l;i.clear(),l=r?o.parser:a.parser,l.yy=i;try{l.parse(t)}catch(h){}var f;f=i.getDirection(),"undefined"==typeof f&&(f="TD");var d=new u.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:f,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),p=i.getSubGraphs(),g=0;p.forEach(function(){g+=1;var t="subG"+g;i.addVertex(t,void 0,void 0,void 0)});var y=i.getVertices(),m=i.getEdges();g=0,p.forEach(function(t){g+=1;var e="subG"+g;s.selectAll("cluster").append("text"),t.nodes.forEach(function(t){d.setParent(t,e)})}),n.addVertices(y,d),n.addEdges(m,d);var v=new u.render;v.shapes().question=function(t,e,n){var r=e.width,i=e.height,a=.8*(r+i),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],s=t.insert("polygon",":first-child").attr("points",o.map(function(t){return t.x+","+t.y}).join(" ")).attr("rx",5).attr("ry",5).attr("transform","translate("+-a/2+","+2*a/4+")");return n.intersect=function(t){return u.intersect.polygon(n,o,t)},s},v.shapes().rect_left_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.shapes().rect_right_inv_arrow=function(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("transform","translate("+-r/2+","+2*i/4+")");return n.intersect=function(t){return u.intersect.polygon(n,a,t)},o},v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),a=i.append("path").attr("d","M 0 0 L 0 0 L 0 0 z");u.util.applyStyle(a,n[r+"Style"])};var b=s.select("#"+e);svgGroup=s.select("#"+e+" g"),v(s.select("#"+e+" g"),d);document.querySelector("#"+e);b.attr("height",d.graph().height),"undefined"==typeof c.width?b.attr("width",d.graph().width):b.attr("width",c.width),b.attr("viewBox","0 0 "+(d.graph().width+20)+" "+(d.graph().height+20)),setTimeout(function(){var t=0;p.forEach(function(n){var r=document.querySelectorAll("#"+e+" .clusters rect"),i=document.querySelectorAll("#"+e+" .cluster");if("undefined"!==n.title){var a=r[t].x.baseVal.value,o=r[t].y.baseVal.value,u=r[t].width.baseVal.value,c=s.select(i[t]),l=c.append("text");l.attr("x",a+u/2),l.attr("y",o+14),l.attr("fill","black"),l.attr("stroke","none"),l.attr("id",e+"Text"),l.style("text-anchor","middle"),l.text(n.title)}t+=1})},20)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./d3":88,"./dagre-d3":89,"./graphDb":91,"./parser/dot":92,"./parser/flow":93}],91:[function(require,module,exports){var vertices={},edges=[],classes=[],subGraphs=[],direction,funs=[];exports.addVertex=function(t,e,n,r){"undefined"!=typeof t&&0!==t.trim().length&&("undefined"==typeof vertices[t]&&(vertices[t]={id:t,styles:[],classes:[]}),"undefined"!=typeof e&&(vertices[t].text=e),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof n&&(vertices[t].type=n),"undefined"!=typeof r&&null!==r&&r.forEach(function(e){vertices[t].styles.push(e)}))},exports.addLink=function(t,e,n,r){var i={start:t,end:e,type:void 0,text:""};r=n.text,"undefined"!=typeof r&&(i.text=r),"undefined"!=typeof n&&(i.type=n.type,i.stroke=n.stroke),edges.push(i)},exports.updateLink=function(t,e){t.substr(1);"default"===t?edges.defaultStyle=e:edges[t].style=e},exports.addClass=function(t,e){"undefined"==typeof classes[t]&&(classes[t]={id:t,styles:[]}),"undefined"!=typeof e&&null!==e&&e.forEach(function(e){classes[t].styles.push(e)})},exports.setDirection=function(t){direction=t},exports.setClass=function(t,e){t.indexOf(",")>0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(e)},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(t){t()})},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=[],subGraphs=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,e){function n(t){var e={"boolean":{},number:{},string:{}},n=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in e?e[r].hasOwnProperty(t)?!1:e[r][t]=!0:n.indexOf(t)>=0?!1:n.push(t)})}var r=[];r=n(r.concat.apply(r,t)),subGraphs.push({nodes:r,title:e})},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,e){mermaid.parseError(t,e)}},{}],92:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,5],r=[1,6],i=[1,12],a=[1,13],o=[1,14],u=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],f=[1,20],d=[1,21],p=[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],_=[1,36],x=[8,10,16,17,18,19,20,21,22,23,24,25,26,28,32,37,39,40,45,57,58],w=[10,28],A=[10,28,37,57,58],k=[2,49],E=[1,45],D=[1,48],M=[1,49],S=[1,52],C=[2,65],T=[1,65],F=[1,66],L=[1,67],B=[1,68],N=[1,69],O=[1,70],I=[1,71],q=[1,72],R=[1,73],P=[8,16,17,18,19,20,21,22,23,24,25,26,47],U=[10,28,37],Y={trace:function(){},yy:{},symbols_:{error:2,expressions:3,graph:4,EOF:5,graphStatement:6,idStatement:7,"{":8,stmt_list:9,"}":10,strict:11,GRAPH:12,DIGRAPH:13,textNoTags:14,textNoTagsToken:15,ALPHA:16,NUM:17,COLON:18,PLUS:19,EQUALS:20,MULT:21,DOT:22,BRKT:23,SPACE:24,MINUS:25,keywords:26,stmt:27,";":28,node_stmt:29,edge_stmt:30,attr_stmt:31,"=":32,subgraph:33,attr_list:34,NODE:35,EDGE:36,"[":37,a_list:38,"]":39,",":40,edgeRHS:41,node_id:42,edgeop:43,port:44,":":45,compass_pt:46,SUBGRAPH:47,n:48,ne:49,e:50,se:51,s:52,sw:53,w:54,nw:55,c:56,ARROW_POINT:57,ARROW_OPEN:58,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",8:"{",10:"}",11:"strict",12:"GRAPH",13:"DIGRAPH",16:"ALPHA",17:"NUM",18:"COLON",19:"PLUS",20:"EQUALS",21:"MULT",22:"DOT",23:"BRKT",24:"SPACE",25:"MINUS",26:"keywords",28:";",32:"=",35:"NODE",36:"EDGE",37:"[",39:"]",40:",",45:":",47:"SUBGRAPH",48:"n",49:"ne",50:"e",51:"se",52:"s",53:"sw",54:"w",55:"nw",56:"c",57:"ARROW_POINT",58:"ARROW_OPEN"},productions_:[0,[3,2],[4,5],[4,6],[4,4],[6,1],[6,1],[7,1],[14,1],[14,2],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[15,1],[9,1],[9,3],[27,1],[27,1],[27,1],[27,3],[27,1],[31,2],[31,2],[31,2],[34,4],[34,3],[34,3],[34,2],[38,5],[38,5],[38,3],[30,3],[30,3],[30,2],[30,2],[41,3],[41,3],[41,2],[41,2],[29,2],[29,1],[42,2],[42,1],[44,4],[44,2],[44,2],[33,5],[33,4],[33,3],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,1],[46,0],[43,1],[43,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:this.$=a[o-1];break;case 2:this.$=a[o-4];break;case 3:this.$=a[o-5];break;case 4:this.$=a[o-3];break;case 8:case 10:case 11:this.$=a[o];break;case 9:this.$=a[o-1]+""+a[o];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[o];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[o-1],a[o].id,a[o].op),this.$="oy";break;case 42:r.addLink(a[o-1],a[o].id,a[o].op),this.$={op:a[o-2],id:a[o-1]};break;case 44:this.$={op:a[o-1],id:a[o]};break;case 48:r.addVertex(a[o-1]),this.$=a[o-1];break;case 49:r.addVertex(a[o]),this.$=a[o];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:n,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:n,13:r},e(g,[2,5]),e(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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),e(x,[2,8]),e(x,[2,10]),e(x,[2,11]),e(x,[2,12]),e(x,[2,13]),e(x,[2,14]),e(x,[2,15]),e(x,[2,16]),e(x,[2,17]),e(x,[2,18]),e(x,[2,19]),e(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,41]},{10:[2,21],28:[1,42]},e(w,[2,23]),e(w,[2,24]),e(w,[2,25]),e(A,k,{44:44,32:[1,43],45:E}),e(w,[2,27],{41:46,43:47,57:D,58:M}),e(w,[2,47],{43:47,34:50,41:51,37:S,57:D,58:M}),{34:53,37:S},{34:54,37:S},{34:55,37:S},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},e(x,[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:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{7:62,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},e(A,[2,48]),e(A,C,{14:10,15:11,7:63,46:64,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(w,[2,41],{34:74,37:S}),{7:77,8:y,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:_},e(P,[2,66]),e(P,[2,67]),e(w,[2,46]),e(w,[2,40],{34:78,37:S}),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},e(w,[2,28]),e(w,[2,29]),e(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{5:[2,2]},{10:[2,22]},e(w,[2,26]),e(A,[2,51],{45:[1,86]}),e(A,[2,52]),e(A,[2,56]),e(A,[2,57]),e(A,[2,58]),e(A,[2,59]),e(A,[2,60]),e(A,[2,61]),e(A,[2,62]),e(A,[2,63]),e(A,[2,64]),e(w,[2,38]),e(U,[2,44],{43:47,41:87,57:D,58:M}),e(U,[2,45],{43:47,41:88,57:D,58:M}),e(A,k,{44:44,45:E}),e(w,[2,39]),{39:[1,89]},e(w,[2,34],{34:90,37:S}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:b,42:32,47:_},{10:[1,93]},e(A,[2,55]),{10:[1,94]},e(A,C,{46:95,48:T,49:F,50:L,51:B,52:N,53:O,54:I,55:q,56:R}),e(U,[2,42]),e(U,[2,43]),e(w,[2,33],{34:96,37:S}),e(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},e(A,[2,54]),{5:[2,3]},e(A,[2,50]),e(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},e(A,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:o,19:u,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:102},{39:[2,35]},{39:[2,36]}],defaultActions:{7:[2,1],41:[2,4],60:[2,2],61:[2,22],94:[2,3],101:[2,35],102:[2,36]},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},j=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n; if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){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 t}();return Y.lexer=j,t.prototype=Y,Y.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],93:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,30,67,68,69,70,71,77,81,83,84,86,87,89,90,91],o=[2,2],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,22],d=[1,24],p=[1,25],g=[1,26],y=[1,27],m=[1,28],v=[1,34],b=[1,36],_=[1,33],x=[1,35],w=[1,41],A=[1,40],k=[1,37],E=[1,38],D=[1,39],M=[1,8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],S=[1,49],C=[1,48],T=[1,50],F=[1,67],L=[1,75],B=[1,76],N=[1,61],O=[1,60],I=[1,80],q=[1,79],R=[1,77],P=[1,78],U=[1,68],Y=[1,63],j=[1,62],z=[1,70],V=[1,71],H=[1,72],G=[1,73],$=[1,74],W=[1,65],Z=[1,64],X=[8,9,11],K=[8,9,11,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61],J=[1,109],Q=[8,9,10,11,13,15,36,38,40,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,81,83,84,86,87,89,90,91],te=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ee=[1,112],ne=[1,113],re=[8,9,10,11,13,30,32,67,68,69,70,71,77,81,83,84,86,87,89,90,91],ie=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,44,47,48,49,50,51,53,54,55,56,57,58,59,60,61,62,67,68,69,70,71,74,77,79,81,83,84,86,87,89,90,91],ae=[13,77,81,83,84,86,87,89,90,91],oe=[13,62,77,81,83,84,86,87,89,90,91],ue=[1,184],se=[1,181],ce=[1,188],le=[1,185],he=[1,182],fe=[1,189],de=[1,179],pe=[1,180],ge=[1,183],ye=[1,186],me=[1,187],ve=[1,203],be=[8,9,11,81],_e=[8,9,10,11,44,67,76,77,79,81,83,84,85,86,87],xe={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,DIAMOND_START:40,DIAMOND_STOP:41,alphaNumStatement:42,alphaNumToken:43,MINUS:44,linkStatement:45,arrowText:46,"--":47,ARROW_POINT:48,ARROW_CIRCLE:49,ARROW_CROSS:50,ARROW_OPEN:51,"-.":52,DOTTED_ARROW_POINT:53,DOTTED_ARROW_CIRCLE:54,DOTTED_ARROW_CROSS:55,DOTTED_ARROW_OPEN:56,"==":57,THICK_ARROW_POINT:58,THICK_ARROW_CIRCLE:59,THICK_ARROW_CROSS:60,THICK_ARROW_OPEN:61,PIPE:62,textToken:63,commentText:64,commentToken:65,keywords:66,STYLE:67,LINKSTYLE:68,CLASSDEF:69,CLASS:70,CLICK:71,textNoTags:72,textNoTagsToken:73,DEFAULT:74,stylesOpt:75,HEX:76,NUM:77,commentStatement:78,PCT:79,style:80,COMMA:81,styleComponent:82,ALPHA:83,COLON:84,UNIT:85,BRKT:86,DOT:87,graphCodeTokens:88,PLUS:89,EQUALS:90,MULT:91,TAG_START:92,TAG_END:93,QUOTE:94,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"DIAMOND_START",41:"DIAMOND_STOP",44:"MINUS",47:"--",48:"ARROW_POINT",49:"ARROW_CIRCLE",50:"ARROW_CROSS",51:"ARROW_OPEN",52:"-.",53:"DOTTED_ARROW_POINT",54:"DOTTED_ARROW_CIRCLE",55:"DOTTED_ARROW_CROSS",56:"DOTTED_ARROW_OPEN",57:"==",58:"THICK_ARROW_POINT",59:"THICK_ARROW_CIRCLE",60:"THICK_ARROW_CROSS",61:"THICK_ARROW_OPEN",62:"PIPE",67:"STYLE",68:"LINKSTYLE",69:"CLASSDEF",70:"CLASS",71:"CLICK",74:"DEFAULT",76:"HEX",77:"NUM",79:"PCT",81:"COMMA",83:"ALPHA",84:"COLON",85:"UNIT",86:"BRKT",87:"DOT",89:"PLUS",90:"EQUALS",91:"MULT",92:"TAG_START",93:"TAG_END",94:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,6],[7,5],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[42,1],[42,1],[42,3],[34,2],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[46,3],[31,1],[31,2],[64,1],[64,2],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[72,1],[72,2],[27,5],[27,5],[28,5],[29,5],[25,5],[25,5],[26,5],[26,5],[78,3],[75,1],[75,3],[80,1],[80,2],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[82,1],[65,1],[65,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[63,1],[73,1],[73,1],[73,1],[73,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[43,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1],[88,1]],performAction:function(t,e,n,r,i,a){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[o]!==[]&&a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 55:case 57:case 58:case 88:case 90:case 103:this.$=a[o];break;case 11:r.setDirection(a[o-1]),this.$=a[o-1];break;case 12:r.setDirection("LR"),this.$=a[o-1];break;case 13:r.setDirection("RL"),this.$=a[o-1];break;case 14:r.setDirection("BT"),this.$=a[o-1];break;case 15:r.setDirection("TB"),this.$=a[o-1];break;case 30:this.$=a[o-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:r.addSubGraph(a[o-2],a[o-4]);break;case 37:r.addSubGraph(a[o-2],void 0);break;case 41:r.addLink(a[o-2],a[o],a[o-1]),this.$=[a[o-2],a[o]];break;case 42:this.$=[a[o]];break;case 43:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"square");break;case 44:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"square");break;case 45:this.$=a[o-5],r.addVertex(a[o-5],a[o-2],"circle");break;case 46:this.$=a[o-6],r.addVertex(a[o-6],a[o-3],"circle");break;case 47:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"round");break;case 48:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"round");break;case 49:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"diamond");break;case 50:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"diamond");break;case 51:this.$=a[o-3],r.addVertex(a[o-3],a[o-1],"odd");break;case 52:this.$=a[o-4],r.addVertex(a[o-4],a[o-2],"odd");break;case 53:this.$=a[o],r.addVertex(a[o]);break;case 54:this.$=a[o-1],r.addVertex(a[o-1]);break;case 56:case 89:case 91:case 104:this.$=a[o-1]+""+a[o];break;case 59:this.$=a[o-2]+"-"+a[o];break;case 60:a[o-1].text=a[o],this.$=a[o-1];break;case 61:a[o-2].text=a[o-1],this.$=a[o-2];break;case 62:this.$=a[o];break;case 63:this.$={type:"arrow",stroke:"normal",text:a[o-1]};break;case 64:this.$={type:"arrow_circle",stroke:"normal",text:a[o-1]};break;case 65:this.$={type:"arrow_cross",stroke:"normal",text:a[o-1]};break;case 66:this.$={type:"arrow_open",stroke:"normal",text:a[o-1]};break;case 67:this.$={type:"arrow",stroke:"dotted",text:a[o-1]};break;case 68:this.$={type:"arrow_circle",stroke:"dotted",text:a[o-1]};break;case 69:this.$={type:"arrow_cross",stroke:"dotted",text:a[o-1]};break;case 70:this.$={type:"arrow_open",stroke:"dotted",text:a[o-1]};break;case 71:this.$={type:"arrow",stroke:"thick",text:a[o-1]};break;case 72:this.$={type:"arrow_circle",stroke:"thick",text:a[o-1]};break;case 73:this.$={type:"arrow_cross",stroke:"thick",text:a[o-1]};break;case 74:this.$={type:"arrow_open",stroke:"thick",text:a[o-1]};break;case 75:this.$={type:"arrow",stroke:"normal"};break;case 76:this.$={type:"arrow_circle",stroke:"normal"};break;case 77:this.$={type:"arrow_cross",stroke:"normal"};break;case 78:this.$={type:"arrow_open",stroke:"normal"};break;case 79:this.$={type:"arrow",stroke:"dotted"};break;case 80:this.$={type:"arrow_circle",stroke:"dotted"};break;case 81:this.$={type:"arrow_cross",stroke:"dotted"};break;case 82:this.$={type:"arrow_open",stroke:"dotted"};break;case 83:this.$={type:"arrow",stroke:"thick"};break;case 84:this.$={type:"arrow_circle",stroke:"thick"};break;case 85:this.$={type:"arrow_cross",stroke:"thick"};break;case 86:this.$={type:"arrow_open",stroke:"thick"};break;case 87:this.$=a[o-1];break;case 105:case 106:this.$=a[o-4],r.addClass(a[o-2],a[o]);break;case 107:this.$=a[o-4],r.setClass(a[o-2],a[o]);break;case 108:this.$=a[o-4],r.setClickEvent(a[o-2],a[o]);break;case 109:this.$=a[o-4],r.addVertex(a[o-2],void 0,void 0,a[o]);break;case 110:case 111:case 112:this.$=a[o-4],r.updateLink(a[o-2],a[o]);break;case 114:this.$=[a[o]];break;case 115:a[o-2].push(a[o]),this.$=a[o-2];break;case 117:this.$=a[o-1]+a[o]}},table:[{3:1,4:2,9:n,10:r,12:i},{1:[3]},e(a,o,{5:6}),{4:7,9:n,10:r,12:i},{4:8,9:n,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,9]),e(a,[2,10]),{13:[1,42],15:[1,43],16:[1,44],17:[1,45],18:[1,46]},e(M,[2,3]),e(M,[2,4]),e(M,[2,5]),e(M,[2,6]),e(M,[2,7]),e(M,[2,8]),{8:S,9:C,11:T,24:47},{8:S,9:C,11:T,24:51},{8:S,9:C,11:T,24:52},{8:S,9:C,11:T,24:53},{8:S,9:C,11:T,24:54},{8:S,9:C,11:T,24:55},{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:57,30:R,31:56,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,42],{34:81,45:82,47:[1,83],48:[1,86],49:[1,87],50:[1,88],51:[1,89],52:[1,84],53:[1,90],54:[1,91],55:[1,92],56:[1,93],57:[1,85],58:[1,94],59:[1,95],60:[1,96],61:[1,97]}),{10:[1,98]},{10:[1,99]},{10:[1,100]},{10:[1,101]},{10:[1,102]},e(K,[2,53],{43:32,21:107,42:108,10:J,13:h,15:[1,106],36:[1,103],38:[1,104],40:[1,105],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(Q,[2,55]),e(Q,[2,57]),e(Q,[2,58],{44:[1,110]}),e(te,[2,142]),e(te,[2,143]),e(te,[2,144]),e(te,[2,145]),e(te,[2,146]),e(te,[2,147]),e(te,[2,148]),e(te,[2,149]),e(te,[2,150]),{8:ee,9:ne,10:J,14:111,21:114},{8:ee,9:ne,10:J,14:115,21:114},{8:ee,9:ne,10:J,14:116,21:114},{8:ee,9:ne,10:J,14:117,21:114},{8:ee,9:ne,10:J,14:118,21:114},e(M,[2,30]),e(M,[2,38]),e(M,[2,39]),e(M,[2,40]),e(M,[2,31]),e(M,[2,32]),e(M,[2,33]),e(M,[2,34]),e(M,[2,35]),{8:S,9:C,10:F,11:T,12:L,13:B,15:N,16:O,17:I,18:q,24:119,30:R,32:P,43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(re,o,{5:121}),e(ie,[2,88]),e(ie,[2,131]),e(ie,[2,132]),e(ie,[2,133]),e(ie,[2,134]),e(ie,[2,135]),e(ie,[2,136]),e(ie,[2,137]),e(ie,[2,138]),e(ie,[2,139]),e(ie,[2,140]),e(ie,[2,141]),e(ie,[2,92]),e(ie,[2,93]),e(ie,[2,94]),e(ie,[2,95]),e(ie,[2,96]),e(ie,[2,97]),e(ie,[2,98]),e(ie,[2,99]),e(ie,[2,100]),e(ie,[2,101]),e(ie,[2,102]),{13:h,33:122,35:29,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,62],{46:123,62:[1,124]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:125,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:126,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:127,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(oe,[2,75]),e(oe,[2,76]),e(oe,[2,77]),e(oe,[2,78]),e(oe,[2,79]),e(oe,[2,80]),e(oe,[2,81]),e(oe,[2,82]),e(oe,[2,83]),e(oe,[2,84]),e(oe,[2,85]),e(oe,[2,86]),{13:h,35:128,42:30,43:32,76:[1,129],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{74:[1,130],77:[1,131]},{13:h,35:133,42:30,43:32,74:[1,132],77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:134,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:135,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:136,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:138,32:P,38:[1,137],43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:139,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:140,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,54]),e(Q,[2,56]),e(K,[2,29],{21:141,10:J}),{43:142,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(a,[2,11]),e(a,[2,21]),e(a,[2,22]),{9:[1,143]},e(a,[2,12]),e(a,[2,13]),e(a,[2,14]),e(a,[2,15]),e(re,o,{5:144}),e(ie,[2,89]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,145],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(X,[2,41]),e(ae,[2,60],{10:[1,146]}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:147,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,48:[1,148],49:[1,149],50:[1,150],51:[1,151],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,53:[1,152],54:[1,153],55:[1,154],56:[1,155],57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,58:[1,156],59:[1,157],60:[1,158],61:[1,159],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,160],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,161]},{10:[1,162]},{10:[1,163]},{10:[1,164]},{10:[1,165],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,166],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:[1,167],13:h,42:108,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,168],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,31:169,32:P,43:66,44:U,47:Y,57:j,63:58,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,170],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,41:[1,171],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,37:[1,172],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,28]),e(Q,[2,59]),e(a,[2,23]),{6:10,7:11,8:u,9:s,10:c,11:l,13:h,23:16,25:17,26:18,27:19,28:20,29:21,30:f,32:[1,173],33:23,35:29,42:30,43:32,67:d,68:p,69:g,70:y,71:m,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{8:S,9:C,11:T,24:174},e(ae,[2,61]),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,43:66,44:U,47:Y,57:j,62:[1,175],63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(ae,[2,63]),e(ae,[2,64]),e(ae,[2,65]),e(ae,[2,66]),e(ae,[2,67]),e(ae,[2,68]),e(ae,[2,69]),e(ae,[2,70]),e(ae,[2,71]),e(ae,[2,72]),e(ae,[2,73]),e(ae,[2,74]),{10:ue,44:se,67:ce,75:176,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:190,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:191,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:192,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:193,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{10:ue,44:se,67:ce,75:194,76:le,77:he,79:fe,80:177,82:178,83:de,84:pe,85:ge,86:ye,87:me},{13:h,35:195,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},{13:h,35:196,42:30,43:32,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,43],{21:197,10:J}),{10:F,12:L,13:B,15:N,16:O,17:I,18:q,30:R,32:P,39:[1,198],43:66,44:U,47:Y,57:j,63:120,66:69,67:z,68:V,69:H,70:G,71:$,73:59,74:W,77:v,79:Z,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D},e(K,[2,47],{21:199,10:J}),e(K,[2,49],{21:200,10:J}),e(K,[2,51],{21:201,10:J}),{8:S,9:C,11:T,24:202},e(M,[2,37]),e([10,13,77,81,83,84,86,87,89,90,91],[2,87]),e(X,[2,109],{81:ve}),e(be,[2,114],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(_e,[2,116]),e(_e,[2,118]),e(_e,[2,119]),e(_e,[2,120]),e(_e,[2,121]),e(_e,[2,122]),e(_e,[2,123]),e(_e,[2,124]),e(_e,[2,125]),e(_e,[2,126]),e(_e,[2,127]),e(_e,[2,128]),e(X,[2,110],{81:ve}),e(X,[2,111],{81:ve}),e(X,[2,112],{81:ve}),e(X,[2,105],{81:ve}),e(X,[2,106],{81:ve}),e(X,[2,107],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(X,[2,108],{43:32,42:108,13:h,77:v,81:b,83:_,84:x,86:w,87:A,89:k,90:E,91:D}),e(K,[2,44]),{39:[1,205]},e(K,[2,48]),e(K,[2,50]),e(K,[2,52]),e(M,[2,36]),{10:ue,44:se,67:ce,76:le,77:he,79:fe,80:206,82:178,83:de,84:pe,85:ge,86:ye,87:me},e(_e,[2,117]),e(K,[2,45],{21:207,10:J}),e(be,[2,115],{82:204,10:ue,44:se,67:ce,76:le,77:he,79:fe,83:de,84:pe,85:ge,86:ye,87:me}),e(K,[2,46])],defaultActions:{},parseError:function(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},we=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:break; case 1:return 67;case 2:return 74;case 3:return 68;case 4:return 69;case 5:return 70;case 6:return 71;case 7:return 12;case 8:return 30;case 9:return 32;case 10:return 13;case 11:return 13;case 12:return 13;case 13:return 13;case 14:return 13;case 15:return 13;case 16:return 77;case 17:return 86;case 18:return 84;case 19:return 8;case 20:return 81;case 21:return 91;case 22:return 16;case 23:return 15;case 24:return 17;case 25:return 18;case 26:return 50;case 27:return 48;case 28:return 49;case 29:return 51;case 30:return 55;case 31:return 53;case 32:return 54;case 33:return 56;case 34:return 55;case 35:return 53;case 36:return 54;case 37:return 56;case 38:return 60;case 39:return 58;case 40:return 59;case 41:return 61;case 42:return 47;case 43:return 52;case 44:return 57;case 45:return 44;case 46:return 87;case 47:return 89;case 48:return 79;case 49:return 90;case 50:return 90;case 51:return 83;case 52:return 62;case 53:return 38;case 54:return 39;case 55:return 36;case 56:return 37;case 57:return 40;case 58:return 41;case 59:return 94;case 60:return 9;case 61:return 10;case 62:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[\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,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62],inclusive:!0}}};return t}();return xe.lexer=we,t.prototype=xe,xe.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],94:[function(t,e){e.exports=t(88)},{d3:1}],95:[function(t,e,n){var r=t("moment"),i="",a="",o=[],u=[],s="";n.clear=function(){o=[],u=[],s="",a="",f=0,c=void 0},n.setDateFormat=function(t){i=t},n.getDateFormat=function(){return i},n.setTitle=function(t){a=t},n.getTitle=function(){return a},n.addSection=function(t){s=t,o.push(t)},n.findTaskById=function(t){var e;for(e=0;en-e?n+i+1.5*o.sidePadding>u?e+r-5:n+r+5:(n-e)/2+e+r}).attr("y",function(t,r){return r*e+o.barHeight/2+(o.fontSize/2-2)+n}).attr("text-height",i).attr("class",function(t){for(var e=w(t.startTime),n=w(t.endTime),r=this.getBBox().width,i=0,a=0;an-e?n+r+1.5*o.sidePadding>u?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}}function l(t,e,n,a){var u,s=[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["h1 %I:%M",function(t){return t.getMinutes()}]],c=[["%Y",function(){return!0}]],l=[["%I:%M",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%B",function(t){return t.getMonth()}]];"undefined"!=typeof o.axisFormatter&&(l=[],o.axisFormatter.forEach(function(t){var e=[];e[0]=t[0],e[1]=t[1],l.push(e)})),u=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+e+o.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(u));r>7&&230>r&&(h=h.ticks(i.time.monday.range));b.append("g").attr("class","grid").attr("transform","translate("+t+", "+(a-50)+")").call(h).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")}function h(t,e){for(var n=[],r=0,i=0;i0))return i[1]*t/2+e;for(var o=0;a>o;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e}).attr("class",function(t){for(var e=0;er;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}function p(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}function g(t,e){return p(e)[t]||0}n.yy.clear(),n.parse(t);var y=document.getElementById(e);u=y.offsetWidth,"undefined"==typeof u&&(u=800);var m=n.yy.getTasks(),v=m.length*(o.barHeight+o.barGap)+2*o.topPadding;y.style.height=v+"px",y.setAttribute("height",v);var b=i.select("#"+e),_=(i.time.format("%Y-%m-%d"),i.min(m,function(t){return t.startTime})),x=i.max(m,function(t){return t.endTime}),w=i.time.scale().domain([i.min(m,function(t){return t.startTime}),i.max(m,function(t){return t.endTime})]).rangeRound([0,u-150]),A=[];r=a.duration(x-_).asDays();for(var k=0;kh&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 10;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 11;case 6:return"date";case 7:return 12;case 8:return 13;case 9:return 14;case 10:return 15;case 11:return":";case 12:return 6;case 13:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}}};return t}();return u.lexer=s,t.prototype=u,u.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],98:[function(t,e){e.exports=t(88)},{d3:1}],99:[function(t,e,n){(function(r){var i=function(){function t(){this.yy={}}var e=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},n=[6,8,10,11,15,17,19,20,22,33],r=[2,2],i=[1,6],a=[1,8],o=[1,9],u=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[2,7],p=[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(t,e,n,r,i,a){var o=a.length-1;switch(i){case 1:return r.apply(a[o-1]),a[o-1];case 2:this.$=[];break;case 3:a[o-1].push(a[o]),this.$=a[o-1];break;case 4:case 5:this.$=a[o];break;case 6:case 7:this.$=[];break;case 8:this.$=a[o-1];break;case 12:a[o-1].unshift({type:"loopStart",loopText:a[o-2].actor,signalType:r.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 13:a[o-1].unshift({type:"optStart",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:a[o-2].actor,signalType:r.LINETYPE.OPT_END}),this.$=a[o-1];break;case 14:a[o-4].unshift({type:"altStart",altText:a[o-5].actor,signalType:r.LINETYPE.ALT_START}),a[o-4].push({type:"else",altText:a[o-2].actor,signalType:r.LINETYPE.ALT_ELSE}),a[o-4]=a[o-4].concat(a[o-1]),a[o-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[o-4];break;case 15:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 19:this.$=a[o];break;case 20:this.$=[a[o-2],a[o]];break;case 21:this.$=r.PLACEMENT.LEFTOF;break;case 22:this.$=r.PLACEMENT.RIGHTOF;break;case 23:this.$=[a[o-3],a[o-1],{type:"addMessage",from:a[o-3].actor,to:a[o-1].actor,signalType:a[o-2],msg:a[o]}];break;case 26:this.$={type:"addActor",actor:a[o]};break;case 27:this.$=r.LINETYPE.SOLID_OPEN;break;case 28:this.$=r.LINETYPE.DOTTED_OPEN;break;case 29:this.$=r.LINETYPE.SOLID;break;case 30:this.$=r.LINETYPE.DOTTED;break;case 31:this.$=r.LINETYPE.SOLID_CROSS;break;case 32:this.$=r.LINETYPE.DOTTED_CROSS;break;case 33:this.$=a[o].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},e(n,r,{5:3}),{6:[1,4],7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(n,d,{1:[2,1]}),e(p,[2,3]),{9:19,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,22:h,33:f},e(p,[2,5]),e(p,[2,6]),{12:20,33:f},{10:[1,21]},{10:[1,22]},{8:[1,23]},{12:24,33:f},{12:25,33:f},{12:26,33:f},{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]},e([6,8,10,11,15,17,18,19,20,21,22,28,33,34,35,36,37,38,39,40],[2,26]),e(p,[2,4]),{10:[1,38]},e(p,[2,9]),e(p,[2,10]),{16:[1,39]},e(g,r,{5:40}),e(g,r,{5:41}),e([6,8,10,11,15,17,19,20,21,22,33],r,{5:42}),{12:43,33:f},{33:[2,27]},{33:[2,28]},{33:[2,29]},{33:[2,30]},{33:[2,31]},{33:[2,32]},{12:44,33:f},{8:y,26:45},{33:[2,21]},{33:[2,22]},e(p,[2,8]),{10:[1,47]},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,48],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,50],19:c,20:l,22:h,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,19:c,20:l,21:[1,51],22:h,33:f},{24:52,40:v},{24:54,40:v},{12:56,27:55,33:f},{8:y,26:57,33:[2,18]},e(p,[2,11]),e(p,[2,12]),e(p,d),e(p,[2,13]),{12:58,33:f},{10:[2,23]},{10:[2,33]},{10:[2,15]},{12:59,33:f},{28:[1,60],33:[2,19]},{33:[2,17]},e(g,r,{5:61}),{10:[2,16]},{12:62,33:f},{6:m,7:5,8:i,9:7,10:a,11:o,12:16,13:10,14:11,15:u,17:s,18:[1,63],19:c,20:l,22:h,33:f},{33:[2,20]},e(p,[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(t,e){if(!e.recoverable)throw new Error(t);this.trace(t)},parse:function(t){function e(){var t;return t=p.lex()||f,"number"!=typeof t&&(t=n.symbols_[t]||t),t}var n=this,r=[0],i=[null],a=[],o=this.table,u="",s=0,c=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=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]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,"undefined"==typeof p.yylloc&&(p.yylloc={});var m=p.yylloc;a.push(m);var v=p.options&&p.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,_,x,w,A,k,E,D,M,S={};;){if(x=r[r.length-1],this.defaultActions[x]?w=this.defaultActions[x]:((null===b||"undefined"==typeof b)&&(b=e()),w=o[x]&&o[x][b]),"undefined"==typeof w||!w.length||!w[0]){var C="";M=[];for(k in o[x])this.terminals_[k]&&k>h&&M.push("'"+this.terminals_[k]+"'");C=p.showPosition?"Parse error on line "+(s+1)+":\n"+p.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(s+1)+": Unexpected "+(b==f?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(C,{text:p.match,token:this.terminals_[b]||b,line:p.yylineno,loc:m,expected:M})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+x+", token: "+b);switch(w[0]){case 1:r.push(b),i.push(p.yytext),a.push(p.yylloc),r.push(w[1]),b=null,_?(b=_,_=null):(c=p.yyleng,u=p.yytext,s=p.yylineno,m=p.yylloc,l>0&&l--);break;case 2:if(E=this.productions_[w[1]][1],S.$=i[i.length-E],S._$={first_line:a[a.length-(E||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(E||1)].first_column,last_column:a[a.length-1].last_column},v&&(S._$.range=[a[a.length-(E||1)].range[0],a[a.length-1].range[1]]),A=this.performAction.apply(S,[u,c,s,g.yy,w[1],i,a].concat(d)),"undefined"!=typeof A)return A;E&&(r=r.slice(0,-1*E*2),i=i.slice(0,-1*E),a=a.slice(0,-1*E)),r.push(this.productions_[w[1]][0]),i.push(S.$),a.push(S._$),D=o[r[r.length-2]][r[r.length-1]],r.push(D);break;case 3:return!0}}return!0}},_=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var 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:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno}) -},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file +},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,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))),r=t[0].match(/(?:\r\n?|\n).*/g),r&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var 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 t,e,n,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;ae[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(t=this.test_match(n,i[a]),t!==!1)return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?(t=this.test_match(e,i[r]),t!==!1?t:!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 t=this.next();return t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){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 10;case 22:return 33;case 23:return 34;case 24:return 35;case 25:return 36;case 26:return 37;case 27:return 40;case 28:return 6;case 29: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,/^(?:;)/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,29],inclusive:!0}}};return t}();return b.lexer=_,t.prototype=b,b.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof n&&(n.parser=i,n.Parser=i.Parser,n.parse=function(){return i.parse.apply(i,arguments)},n.main=function(e){e[1]||(console.log("Usage: "+e[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(e[1]),"utf8");return n.parser.parse(i)},"undefined"!=typeof e&&t.main===e&&n.main(r.argv.slice(1)))}).call(this,t("1YiZ5S"))},{"1YiZ5S":80,fs:78,path:79}],100:[function(t,e,n){var r={},i=[],a=[],o=[];n.addActor=function(t,e,n){r[t]={name:e,description:n},i.push(t)},n.addMessage=function(t,e,n,r){a.push({from:t,to:e,message:n,answer:r})},n.addSignal=function(t,e,n,r){a.push({from:t,to:e,message:n,type:r})},n.getMessages=function(){return a},n.getActors=function(){return r},n.getActor=function(t){return r[t]},n.getActorKeys=function(){return Object.keys(r)},n.clear=function(){r={},a=[]},n.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},n.ARROWTYPE={FILLED:0,OPEN:1},n.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},n.addNote=function(t,e,r){var i={actor:t,placement:e,message:r};o.push(i),a.push({from:t,to:t,message:r,type:n.LINETYPE.NOTE,placement:e})},n.parseError=function(t,e){mermaid.parseError(t,e)},n.apply=function(t){if(t instanceof Array)t.forEach(function(t){n.apply(t)});else switch(t.type){case"addActor":n.addActor(t.actor,t.actor,t.actor);break;case"addNote":n.addNote(t.actor,t.placement,t.text);break;case"addMessage":n.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":n.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":n.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":n.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":n.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":n.addSignal(void 0,void 0,void 0,t.signalType)}}},{}],101:[function(t,e,n){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("./d3"),o={diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1};n.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(t,e,n,r){t[e]="undefined"==typeof t[e]?n:r(n,t[e])},updateLoops:function(t,e,r,i){var a=this,u=0;this.list.forEach(function(s){u++;var c=a.list.length-u+1;a.updateVal(s,"startx",t-c*o.boxMargin,Math.min),a.updateVal(s,"starty",e-c*o.boxMargin,Math.min),a.updateVal(s,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(s,"stopy",i+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"startx",t-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"starty",e-c*o.boxMargin,Math.min),a.updateVal(n.bounds.data,"stopx",r+c*o.boxMargin,Math.max),a.updateVal(n.bounds.data,"stopy",i+c*o.boxMargin,Math.max)})},insert:function(t,e,r,i){var a,o,u,s;a=Math.min(t,r),u=Math.max(t,r),o=Math.min(e,i),s=Math.max(e,i),this.updateVal(n.bounds.data,"startx",a,Math.min),this.updateVal(n.bounds.data,"starty",o,Math.min),this.updateVal(n.bounds.data,"stopx",u,Math.max),this.updateVal(n.bounds.data,"stopy",s,Math.max),this.updateLoops(a,o,u,s)},newLoop:function(t){this.list.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.list.pop();return t},addElseToLoop:function(t){var e=this.list.pop();e.elsey=n.bounds.getVerticalPos(),e.elseText=t,this.list.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var u=function(t,e,r,a){var u=i.getNoteRect();u.x=e,u.y=r,u.width=o.width,u.class="note";var s=t.append("g"),c=i.drawRect(s,u),l=i.getTextObj();l.x=e,l.y=r+o.noteMargin,l.textMargin=o.noteMargin,l.dy="1em",l.text=a.message,l.class="noteText";var h=i.drawText(s,l),f=h[0][0].getBBox().height;n.bounds.insert(e,r,e+o.width,r+2*o.noteMargin+f),c.attr("height",f+2*o.noteMargin),n.bounds.bumpVerticalPos(f+2*o.noteMargin)},s=function(t,e,i,a,o){var u,s=t.append("g"),c=e+(i-e)/2,l=s.append("text").attr("x",c).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(o.message),h=l[0][0].getBBox().width;if(e===i){u=s.append("path").attr("d","M "+e+","+a+" C "+(e+60)+","+(a-10)+" "+(e+60)+","+(a+30)+" "+e+","+(a+20)),n.bounds.bumpVerticalPos(30);var f=Math.max(h/2,100);n.bounds.insert(e-f,n.bounds.getVerticalPos()-10,i+f,n.bounds.getVerticalPos())}else u=s.append("line"),u.attr("x1",e),u.attr("y1",a),u.attr("x2",i),u.attr("y2",a),n.bounds.insert(e,n.bounds.getVerticalPos()-10,i,n.bounds.getVerticalPos());o.type===r.yy.LINETYPE.DOTTED||o.type===r.yy.LINETYPE.DOTTED_CROSS||o.type===r.yy.LINETYPE.DOTTED_OPEN?(u.style("stroke-dasharray","3, 3"),u.attr("class","messageLine1")):u.attr("class","messageLine0"),u.attr("stroke-width",2),u.attr("stroke","black"),u.style("fill","none"),(o.type===r.yy.LINETYPE.SOLID||o.type===r.yy.LINETYPE.DOTTED)&&u.attr("marker-end","url(#arrowhead)"),(o.type===r.yy.LINETYPE.SOLID_CROSS||o.type===r.yy.LINETYPE.DOTTED_CROSS)&&u.attr("marker-end","url(#crosshead)")};e.exports.drawActors=function(t,e,r,a){var u;for(u=0;u/gi).forEach(function(t){var r=n.append("tspan");r.attr("x",e.x+e.textMargin),r.attr("dy",e.dy),r.text(t)}),"undefined"!=typeof e.class&&n.attr("class",e.class),n},n.drawLabel=function(t,e){var r=n.getNoteRect();r.x=e.x,r.y=e.y,r.width=50,r.height=20,r.fill="#526e52",r.stroke="none",r.class="labelBox",n.drawRect(t,r),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,e.fill="white",n.drawText(t,e)},n.drawActor=function(t,e,r,i,a){var o=e+a.width/2,u=t.append("g");0===r&&u.append("line").attr("x1",o).attr("y1",5).attr("x2",o).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999");var s=n.getNoteRect();s.x=e,s.y=r,s.fill="#eaeaea",s.width=a.width,s.height=a.height,s.class="actor",s.rx=3,s.ry=3,n.drawRect(u,s),u.append("text").attr("x",o).attr("y",r+a.height/2+5).attr("class","actor").style("text-anchor","middle").text(i)},n.drawLoop=function(t,e,r,i){var a=t.append("g"),o=function(t,e,n,r){a.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};o(e.startx,e.starty,e.stopx,e.starty),o(e.stopx,e.starty,e.stopx,e.stopy),o(e.startx,e.stopy,e.stopx,e.stopy),o(e.startx,e.starty,e.startx,e.stopy),"undefined"!=typeof e.elsey&&o(e.startx,e.elsey,e.stopx,e.elsey);var u=n.getTextObj();u.text=r,u.x=e.startx,u.y=e.starty,u.labelMargin=1.5*i.boxMargin,u.class="labelText",u.fill="white",n.drawLabel(a,u),u=n.getTextObj(),u.text="[ "+e.title+" ]",u.x=e.startx+(e.stopx-e.startx)/2,u.y=e.starty+1.5*i.boxMargin,u.anchor="middle",u.class="loopText",n.drawText(a,u),"undefined"!=typeof e.elseText&&(u.text="[ "+e.elseText+" ]",u.y=e.elsey+1.5*i.boxMargin,n.drawText(a,u))},n.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},n.insertArrowCrossHead=function(t){var e=t.append("defs"),n=e.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);n.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),n.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},n.getTextObj=function(){var t={x:0,y:0,fill:"black","text-anchor":"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0};return t},n.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t}},{}],103:[function(t,e,n){(function(e){var r=t("./diagrams/flowchart/graphDb"),i=t("./diagrams/flowchart/parser/flow"),a=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),u=t("./diagrams/sequenceDiagram/sequenceRenderer"),s=t("./diagrams/example/exampleRenderer"),c=t("he"),l=t("./diagrams/example/parser/example"),h=t("./diagrams/flowchart/parser/flow"),f=t("./diagrams/flowchart/parser/dot"),d=t("./diagrams/sequenceDiagram/parser/sequenceDiagram"),p=t("./diagrams/sequenceDiagram/sequenceDb"),g=t("./diagrams/example/exampleDb"),y=t("./diagrams/gantt/ganttRenderer"),m=t("./diagrams/gantt/parser/gantt"),v=t("./diagrams/gantt/ganttDb"),b=0,_=function(t){var e,n=a.detectType(t);switch(n){case"graph":e=h,e.parser.yy=r;break;case"dotGraph":e=f,e.parser.yy=r;break;case"sequenceDiagram":e=d,e.parser.yy=p;break;case"info":e=l,e.parser.yy=g;break;case"gantt":e=m,e.parser.yy=v}try{return e.parse(t),!0}catch(i){return!1}},x=function(){var t;2===arguments.length?("undefined"!=typeof arguments[0]&&(mermaid.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof Node?[t]:t;var e;for(e=0;e/g,">"),h=h.replace(/';var f=a.detectType(h),d={};switch(f){case"graph":d=o.getClasses(h,!1),"object"==typeof mermaid.flowchartConfig&&o.setConf(mermaid.flowchartConfig),o.draw(h,l,!1),a.cloneCssStyles(i.firstChild,d),r.bindFunctions();break;case"dotGraph":d=o.getClasses(h,!0),o.draw(h,l,!0),a.cloneCssStyles(i.firstChild,d);break;case"sequenceDiagram":"object"==typeof mermaid.sequenceConfig&&u.setConf(mermaid.sequenceConfig),u.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"gantt":"object"==typeof mermaid.ganttConfig&&y.setConf(mermaid.ganttConfig),y.draw(h,l),a.cloneCssStyles(i.firstChild,[]);break;case"info":s.draw(h,l,n.version()),a.cloneCssStyles(i.firstChild,[])}}}};n.tester=function(){},n.version=function(){return t("../package.json").version};var w=function(t,e){return"undefined"==typeof e?!1:t===e};e.mermaid={startOnLoad:!0,htmlLabels:!0,init:function(){x.apply(null,arguments)},version:function(){return n.version()},getParser:function(){return i.parser},parse:function(t){return _(t)},parseError:function(t){console.log("Mermaid Syntax error:"),console.log(t)}},n.contentLoaded=function(){"undefined"!=typeof mermaid_config&&w(!1,mermaid_config.htmlLabels)&&(e.mermaid.htmlLabels=!1),e.mermaid.startOnLoad&&("undefined"!=typeof mermaid_config?w(!0,mermaid_config.startOnLoad)&&e.mermaid.init():e.mermaid.init())},"undefined"!=typeof document&&document.addEventListener("DOMContentLoaded",function(){n.contentLoaded()},!1)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../package.json":84,"./diagrams/example/exampleDb":85,"./diagrams/example/exampleRenderer":86,"./diagrams/example/parser/example":87,"./diagrams/flowchart/flowRenderer":90,"./diagrams/flowchart/graphDb":91,"./diagrams/flowchart/parser/dot":92,"./diagrams/flowchart/parser/flow":93,"./diagrams/gantt/ganttDb":95,"./diagrams/gantt/ganttRenderer":96,"./diagrams/gantt/parser/gantt":97,"./diagrams/sequenceDiagram/parser/sequenceDiagram":99,"./diagrams/sequenceDiagram/sequenceDb":100,"./diagrams/sequenceDiagram/sequenceRenderer":101,"./utils":104,he:81}],104:[function(t,e){e.exports.detectType=function(t){return t.match(/^\s*sequenceDiagram/)?"sequenceDiagram":t.match(/^\s*sequence/)?"sequence":t.match(/^\s*digraph/)?"dotGraph":t.match(/^\s*info/)?"info":t.match(/^\s*gantt/)?"gantt":"graph"},e.exports.cloneCssStyles=function(t,e){for(var n="",r=document.styleSheets,i=0;i0&&(n+=u.selectorText+" { "+u.style.cssText+" }\n")}}}catch(c){"undefined"!=typeof console&&"undefined"!==console.warn&&"undefined"!==u&&console.warn('Invalid CSS selector "'+u.selectorText+'"',c)}var l="",h="";for(var f in e)e.hasOwnProperty(f)&&"undefined"!=typeof f&&("default"===f?(e.default.styles instanceof Array&&(l+="#"+t.id.trim()+" .node { "+e[f].styles.join("; ")+"; }\n"),e.default.nodeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .node text { "+e[f].nodeLabelStyles.join("; ")+"; }\n"),e.default.edgeLabelStyles instanceof Array&&(l+="#"+t.id.trim()+" .edgeLabel text { "+e[f].edgeLabelStyles.join("; ")+"; }\n")):e[f].styles instanceof Array&&(h+="#"+t.id.trim()+" ."+f+" { "+e[f].styles.join("; ")+"; }\n"));if(""!==n||""!==l||""!==h){var d=document.createElement("style");d.setAttribute("type","text/css"),d.setAttribute("title","mermaid-svg-internal-css"),d.innerHTML="/* */\n",t.insertBefore(d,t.firstChild)}}},{}]},{},[103])}(); \ No newline at end of file From 82dffe0a1d51b1611e2caf97fb7751493f521441 Mon Sep 17 00:00:00 2001 From: knsv Date: Mon, 20 Apr 2015 21:22:37 +0200 Subject: [PATCH 6/6] Fix for defect #158 --- dist/mermaid.forest.css | 2 -- 1 file changed, 2 deletions(-) diff --git a/dist/mermaid.forest.css b/dist/mermaid.forest.css index b7e2b70813..9a0002c334 100644 --- a/dist/mermaid.forest.css +++ b/dist/mermaid.forest.css @@ -5,8 +5,6 @@ color: #333333; } -body {width:800px;} - .node rect, .node circle, .node polygon {