!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n;"undefined"!=typeof window?n=window:"undefined"!=typeof global?n=global:"undefined"!=typeof self&&(n=self),n.mermaidAPI=t()}}(function(){var define,module,exports;return function t(n,e,r){function i(u,o){if(!e[u]){if(!n[u]){var s="function"==typeof require&&require;if(!o&&s)return s(u,!0);if(a)return a(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var l=e[u]={exports:{}};n[u][0].call(l.exports,function(t){var e=n[u][1][t];return i(e?e:t)},l,l.exports,t,n,e,r)}return e[u].exports}for(var a="function"==typeof require&&require,u=0;ut?-1:t>n?1:t>=n?0:0/0}function i(t){return null===t?0/0:+t}function a(t){return!isNaN(t)}function u(t){return{left:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var a=r+i>>>1;t(n[a],e)<0?r=a+1:i=a}return r},right:function(n,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=n.length);i>r;){var a=r+i>>>1;t(n[a],e)>0?i=a:r=a+1}return r}}}function o(t){return t.length}function s(t){for(var n=1;t*n%1;)n*=10;return n}function c(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function l(){this._=Object.create(null)}function h(t){return(t+="")===gu||t[0]===yu?yu+t:t}function f(t){return(t+="")[0]===yu?t.slice(1):t}function d(t){return h(t)in this._}function p(t){return(t=h(t))in this._&&delete this._[t]}function g(){var t=[];for(var n in this._)t.push(f(n));return t}function y(){var t=0;for(var n in this._)++t;return t}function m(){for(var t in this._)return!1;return!0}function v(){this._=Object.create(null)}function _(t){return t}function b(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function x(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=mu.length;r>e;++e){var i=mu[e]+n;if(i in t)return i}}function w(){}function A(){}function k(t){function n(){for(var n,r=e,i=-1,a=r.length;++ie;e++)for(var i,a=t[e],u=0,o=a.length;o>u;u++)(i=a[u])&&n(i,u,e);return t}function q(t){return _u(t,Eu),t}function G(t){var n,e;return function(r,i,a){var u,o=t[a].update,s=o.length;for(a!=e&&(e=a,n=0),i>=n&&(n=i+1);!(u=o[n])&&++n0&&(t=t.slice(0,o));var c=Mu.get(t);return c&&(t=c,s=Z),o?n?i:r:n?w:a}function H(t,n){return function(e){var r=eu.event;eu.event=e,n[0]=this.__data__;try{t.apply(this,n)}finally{eu.event=r}}}function Z(t,n){var e=H(t,n);return function(t){var n=this,r=t.relatedTarget;r&&(r===n||8&r.compareDocumentPosition(n))||e.call(n,t)}}function X(n){var r=".dragsuppress-"+ ++Du,i="click"+r,a=eu.select(e(n)).on("touchmove"+r,E).on("dragstart"+r,E).on("selectstart"+r,E);if(null==Su&&(Su="onselectstart"in n?!1:x(n.style,"userSelect")),Su){var u=t(n).style,o=u[Su];u[Su]="none"}return function(t){if(a.on(r,null),Su&&(u[Su]=o),t){var n=function(){a.on(i,null)};a.on(i,function(){E(),n()},!0),setTimeout(n,0)}}}function K(t,n){n.changedTouches&&(n=n.changedTouches[0]);var r=t.ownerSVGElement||t;if(r.createSVGPoint){var i=r.createSVGPoint();if(0>Tu){var a=e(t);if(a.scrollX||a.scrollY){r=eu.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=r[0][0].getScreenCTM();Tu=!(u.f||u.e),r.remove()}}return Tu?(i.x=n.pageX,i.y=n.pageY):(i.x=n.clientX,i.y=n.clientY),i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}var o=t.getBoundingClientRect();return[n.clientX-o.left-t.clientLeft,n.clientY-o.top-t.clientTop]}function J(){return eu.event.changedTouches[0].identifier}function Q(t){return t>0?1:0>t?-1:0}function tt(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function nt(t){return t>1?0:-1>t?Ou:Math.acos(t)}function et(t){return t>1?Bu:-1>t?-Bu:Math.asin(t)}function rt(t){return((t=Math.exp(t))-1/t)/2}function it(t){return((t=Math.exp(t))+1/t)/2}function at(t){return((t=Math.exp(2*t))-1)/(t+1)}function ut(t){return(t=Math.sin(t/2))*t}function ot(){}function st(t,n,e){return this instanceof st?(this.h=+t,this.s=+n,void(this.l=+e)):arguments.length<2?t instanceof st?new st(t.h,t.s,t.l):wt(""+t,At,st):new st(t,n,e)}function ct(t,n,e){function r(t){return t>360?t-=360:0>t&&(t+=360),60>t?a+(u-a)*t/60:180>t?u:240>t?a+(u-a)*(240-t)/60:a}function i(t){return Math.round(255*r(t))}var a,u;return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:0>n?0:n>1?1:n,e=0>e?0:e>1?1:e,u=.5>=e?e*(1+n):e+n-e*n,a=2*e-u,new vt(i(t+120),i(t),i(t-120))}function lt(t,n,e){return this instanceof lt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof lt?new lt(t.h,t.c,t.l):t instanceof ft?pt(t.l,t.a,t.b):pt((t=kt((t=eu.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new lt(t,n,e)}function ht(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new ft(e,Math.cos(t*=Nu)*n,Math.sin(t)*n)}function ft(t,n,e){return this instanceof ft?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof ft?new ft(t.l,t.a,t.b):t instanceof lt?ht(t.h,t.c,t.l):kt((t=vt(t)).r,t.g,t.b):new ft(t,n,e)}function dt(t,n,e){var r=(t+16)/116,i=r+n/500,a=r-e/200;return i=gt(i)*Vu,r=gt(r)*Hu,a=gt(a)*Zu,new vt(mt(3.2404542*i-1.5371385*r-.4985314*a),mt(-.969266*i+1.8760108*r+.041556*a),mt(.0556434*i-.2040259*r+1.0572252*a))}function pt(t,n,e){return t>0?new lt(Math.atan2(e,n)*Pu,Math.sqrt(n*n+e*e),t):new lt(0/0,0/0,t)}function gt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function yt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function mt(t){return Math.round(255*(.00304>=t?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function vt(t,n,e){return this instanceof vt?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof vt?new vt(t.r,t.g,t.b):wt(""+t,vt,ct):new vt(t,n,e)}function _t(t){return new vt(t>>16,t>>8&255,255&t)}function bt(t){return _t(t)+""}function xt(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function wt(t,n,e){t=t.toLowerCase();var r,i,a,u=0,o=0,s=0;if(r=/([a-z]+)\((.*)\)/.exec(t))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return n(Mt(i[0]),Mt(i[1]),Mt(i[2]))}return(a=Ju.get(t))?n(a.r,a.g,a.b):(null==t||"#"!==t.charAt(0)||isNaN(a=parseInt(t.slice(1),16))||(4===t.length?(u=(3840&a)>>4,u=u>>4|u,o=240&a,o=o>>4|o,s=15&a,s=s<<4|s):7===t.length&&(u=(16711680&a)>>16,o=(65280&a)>>8,s=255&a)),n(u,o,s))}function At(t,n,e){var r,i,a=Math.min(t/=255,n/=255,e/=255),u=Math.max(t,n,e),o=u-a,s=(u+a)/2;return o?(i=.5>s?o/(u+a):o/(2-u-a),r=t==u?(n-e)/o+(e>n?6:0):n==u?(e-t)/o+2:(t-n)/o+4,r*=60):(r=0/0,i=s>0&&1>s?0:r),new st(r,i,s)}function kt(t,n,e){t=Et(t),n=Et(n),e=Et(e);var r=yt((.4124564*t+.3575761*n+.1804375*e)/Vu),i=yt((.2126729*t+.7151522*n+.072175*e)/Hu),a=yt((.0193339*t+.119192*n+.9503041*e)/Zu);return ft(116*i-16,500*(r-i),200*(i-a))}function Et(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Mt(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}function St(t){return"function"==typeof t?t:function(){return t}}function Dt(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Tt(n,e,t,r)}}function Tt(t,n,e,r){function i(){var t,n=s.status;if(!n&&Ft(s)||n>=200&&300>n||304===n){try{t=e.call(a,s)}catch(r){return void u.error.call(a,r)}u.load.call(a,t)}else u.error.call(a,s)}var a={},u=eu.dispatch("beforesend","progress","load","error"),o={},s=new XMLHttpRequest,c=null;return!this.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 n=eu.event;eu.event=t;try{u.progress.call(a,s)}finally{eu.event=n}},a.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?o[t]:(null==n?delete o[t]:o[t]=n+"",a)},a.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",a):n},a.responseType=function(t){return arguments.length?(c=t,a):c},a.response=function(t){return e=t,a},["get","post"].forEach(function(t){a[t]=function(){return a.send.apply(a,[t].concat(iu(arguments)))}}),a.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),s.open(e,t,!0),null==n||"accept"in o||(o.accept=n+",*/*"),s.setRequestHeader)for(var l in o)s.setRequestHeader(l,o[l]);return null!=n&&s.overrideMimeType&&s.overrideMimeType(n),null!=c&&(s.responseType=c),null!=i&&a.on("error",i).on("load",function(t){i(null,t)}),u.beforesend.call(a,s),s.send(null==r?null:r),a},a.abort=function(){return s.abort(),a},eu.rebind(a,u,"on"),null==r?a:a.get(Ct(r))}function Ct(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function Ft(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function Ot(){var t=Lt(),n=It()-t;n>24?(isFinite(n)&&(clearTimeout(eo),eo=setTimeout(Ot,n)),no=0):(no=1,io(Ot))}function Lt(){var t=Date.now();for(ro=Qu;ro;)t>=ro.t&&(ro.f=ro.c(t-ro.t)),ro=ro.n;return t}function It(){for(var t,n=Qu,e=1/0;n;)n.f?n=t?t.n=n.n:Qu=n.n:(n.t8?function(t){return t/e}:function(t){return t*e},symbol:t}}function Pt(t){var n=t.decimal,e=t.thousands,r=t.grouping,i=t.currency,a=r&&e?function(t,n){for(var i=t.length,a=[],u=0,o=r[0],s=0;i>0&&o>0&&(s+o+1>n&&(o=Math.max(1,n-s)),a.push(t.substring(i-=o,i+o)),!((s+=o+1)>n));)o=r[u=(u+1)%r.length];return a.reverse().join(e)}:_;return function(t){var e=uo.exec(t),r=e[1]||" ",u=e[2]||">",o=e[3]||"-",s=e[4]||"",c=e[5],l=+e[6],h=e[7],f=e[8],d=e[9],p=1,g="",y="",m=!1,v=!0;switch(f&&(f=+f.substring(1)),(c||"0"===r&&"="===u)&&(c=r="0",u="="),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=oo.get(d)||Rt;var _=c&&h;return function(t){var e=y;if(m&&t%1)return"";var i=0>t||0===t&&0>1/t?(t=-t,"-"):"-"===o?"":o;if(0>p){var s=eu.formatPrefix(t,f);t=s.scale(t),e=s.symbol+y}else t*=p;t=d(t,f);var b,x,w=t.lastIndexOf(".");if(0>w){var A=v?t.lastIndexOf("e"):-1;0>A?(b=t,x=""):(b=t.substring(0,A),x=t.substring(A))}else b=t.substring(0,w),x=n+t.substring(w+1);!c&&h&&(b=a(b,1/0));var k=g.length+b.length+x.length+(_?0:i.length),E=l>k?new Array(k=l-k+1).join(r):"";return _&&(b=a(E+b,E.length?l-x.length:1/0)),i+=g,t=b+x,("<"===u?i+t+E:">"===u?E+i+t:"^"===u?E.substring(0,k>>=1)+i+t+E.substring(k):i+(_?t:E+t))+e}}}function Rt(t){return t+""}function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Yt(t,n,e){function r(n){var e=t(n),r=a(e,1);return r-n>n-e?e:r}function i(e){return n(e=t(new co(e-1)),1),e}function a(t,e){return n(t=new co(+t),e),t}function u(t,r,a){var u=i(t),o=[];if(a>1)for(;r>u;)e(u)%a||o.push(new Date(+u)),n(u,1);else for(;r>u;)o.push(new Date(+u)),n(u,1);return o}function o(t,n,e){try{co=jt;var r=new jt;return r._=t,u(r,n,e)}finally{co=Date}}t.floor=t,t.round=r,t.ceil=i,t.offset=a,t.range=u;var s=t.utc=$t(t);return s.floor=s,s.round=$t(r),s.ceil=$t(i),s.offset=$t(a),s.range=o,t}function $t(t){return function(n,e){try{co=jt;var r=new jt;return r._=n,t(r,e)._}finally{co=Date}}}function Ut(t){function n(t){function n(n){for(var e,i,a,u=[],o=-1,s=0;++oo;){if(r>=c)return-1;if(i=n.charCodeAt(o++),37===i){if(u=n.charAt(o++),a=T[u in ho?n.charAt(o++):u],!a||(r=a(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(t,n,e){w.lastIndex=0;var r=w.exec(n.slice(e));return r?(t.w=A.get(r[0].toLowerCase()),e+r[0].length):-1}function i(t,n,e){b.lastIndex=0;var r=b.exec(n.slice(e));return r?(t.w=x.get(r[0].toLowerCase()),e+r[0].length):-1}function a(t,n,e){M.lastIndex=0;var r=M.exec(n.slice(e));return r?(t.m=S.get(r[0].toLowerCase()),e+r[0].length):-1}function u(t,n,e){k.lastIndex=0;var r=k.exec(n.slice(e));return r?(t.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function o(t,n,r){return e(t,D.c.toString(),n,r)}function s(t,n,r){return e(t,D.x.toString(),n,r)}function c(t,n,r){return e(t,D.X.toString(),n,r)}function l(t,n,e){var r=_.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}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;n.utc=function(t){function e(t){try{co=jt;var n=new co;return n._=t,r(n)}finally{co=Date}}var r=n(t);return e.parse=function(t){try{co=jt;var n=r.parse(t);return n&&n._}finally{co=Date}},e.toString=r.toString,e},n.multi=n.utc.multi=cn;var _=eu.map(),b=Wt(g),x=qt(g),w=Wt(y),A=qt(y),k=Wt(m),E=qt(m),M=Wt(v),S=qt(v);p.forEach(function(t,n){_.set(t.toLowerCase(),n)});var D={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:n(h),d:function(t,n){return zt(t.getDate(),n,2)},e:function(t,n){return zt(t.getDate(),n,2)},H:function(t,n){return zt(t.getHours(),n,2)},I:function(t,n){return zt(t.getHours()%12||12,n,2)},j:function(t,n){return zt(1+so.dayOfYear(t),n,3)},L:function(t,n){return zt(t.getMilliseconds(),n,3)},m:function(t,n){return zt(t.getMonth()+1,n,2)},M:function(t,n){return zt(t.getMinutes(),n,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,n){return zt(t.getSeconds(),n,2)},U:function(t,n){return zt(so.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return zt(so.mondayOfYear(t),n,2)},x:n(f),X:n(d),y:function(t,n){return zt(t.getFullYear()%100,n,2)},Y:function(t,n){return zt(t.getFullYear()%1e4,n,4)},Z:on,"%":function(){return"%"}},T={a:r,A:i,b:a,B:u,c:o,d:tn,e:tn,H:en,I:en,j:nn,L:un,m:Qt,M:rn,p:l,S:an,U:Vt,w:Gt,W:Ht,x:s,X:c,y:Xt,Y:Zt,Z:Kt,"%":sn};return n}function zt(t,n,e){var r=0>t?"-":"",i=(r?-t:t)+"",a=i.length;return r+(e>a?new Array(e-a+1).join(n)+i:i)}function Wt(t){return new RegExp("^(?:"+t.map(eu.requote).join("|")+")","i")}function qt(t){for(var n=new l,e=-1,r=t.length;++e68?1900:2e3)}function Qt(t,n,e){fo.lastIndex=0;var r=fo.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function tn(t,n,e){fo.lastIndex=0;var r=fo.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function nn(t,n,e){fo.lastIndex=0;var r=fo.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function en(t,n,e){fo.lastIndex=0;var r=fo.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function rn(t,n,e){fo.lastIndex=0;var r=fo.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function an(t,n,e){fo.lastIndex=0;var r=fo.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function un(t,n,e){fo.lastIndex=0;var r=fo.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function on(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=pu(n)/60|0,i=pu(n)%60;return e+zt(r,"0",2)+zt(i,"0",2)}function sn(t,n,e){po.lastIndex=0;var r=po.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function cn(t){for(var n=t.length,e=-1;++e=0?1:-1,o=u*e,s=Math.cos(n),c=Math.sin(n),l=a*c,h=i*s+l*Math.cos(o),f=l*u*Math.sin(o);bo.add(Math.atan2(f,h)),r=t,i=s,a=c}var n,e,r,i,a;xo.point=function(u,o){xo.point=t,r=(n=u)*Nu,i=Math.cos(o=(e=o)*Nu/2+Ou/4),a=Math.sin(o)},xo.lineEnd=function(){t(n,e)}}function yn(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function mn(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function vn(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function _n(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function bn(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function xn(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function wn(t){return[Math.atan2(t[1],t[0]),et(t[2])]}function An(t,n){return pu(t[0]-n[0])o;++o)i.point((e=t[o])[0],e[1]);return void i.lineEnd()}var s=new Ln(e,t,null,!0),c=new Ln(e,null,s,!1);s.o=c,a.push(s),u.push(c),s=new Ln(r,t,null,!1),c=new Ln(r,null,s,!0),s.o=c,a.push(s),u.push(c)}}),u.sort(n),On(a),On(u),a.length){for(var o=0,s=e,c=u.length;c>o;++o)u[o].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 o=0,c=l.length;c>o;++o)i.point((h=l[o])[0],h[1]);else r(d.x,d.n.x,1,i);d=d.n}else{if(p){l=d.p.z;for(var o=l.length-1;o>=0;--o)i.point((h=l[o])[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 On(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r0){for(x||(a.polygonStart(),x=!0),a.lineStart();++u1&&2&n&&e.push(e.pop().concat(e.shift())),d.push(e.filter(Bn))}var d,p,g,y=n(a),m=i.invert(r[0],r[1]),v={point:u,lineStart:s,lineEnd:c,polygonStart:function(){v.point=l,v.lineStart=h,v.lineEnd=f,d=[],p=[]},polygonEnd:function(){v.point=u,v.lineStart=s,v.lineEnd=c,d=eu.merge(d);var t=$n(m,p);d.length?(x||(a.polygonStart(),x=!0),Fn(d,Pn,t,e,a)):t&&(x||(a.polygonStart(),x=!0),a.lineStart(),e(null,null,1,a),a.lineEnd()),x&&(a.polygonEnd(),x=!1),d=p=null},sphere:function(){a.polygonStart(),a.lineStart(),e(null,null,1,a),a.lineEnd(),a.polygonEnd()}},_=Nn(),b=n(_),x=!1;return v}}function Bn(t){return t.length>1}function Nn(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:w,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function Pn(t,n){return((t=t.x)[0]<0?t[1]-Bu-Cu:Bu-t[1])-((n=n.x)[0]<0?n[1]-Bu-Cu:Bu-n[1])}function Rn(t){var n,e=0/0,r=0/0,i=0/0;return{lineStart:function(){t.lineStart(),n=1},point:function(a,u){var o=a>0?Ou:-Ou,s=pu(a-e);pu(s-Ou)0?Bu:-Bu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(o,r),t.point(a,r),n=0):i!==o&&s>=Ou&&(pu(e-i)Cu?Math.atan((Math.sin(n)*(a=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(n))*Math.sin(t))/(i*a*u)):(n+r)/2}function Yn(t,n,e,r){var i;if(null==t)i=e*Bu,r.point(-Ou,i),r.point(0,i),r.point(Ou,i),r.point(Ou,0),r.point(Ou,-i),r.point(0,-i),r.point(-Ou,-i),r.point(-Ou,0),r.point(-Ou,i);else if(pu(t[0]-n[0])>Cu){var a=t[0]o;++o){var c=n[o],l=c.length;if(l)for(var h=c[0],f=h[0],d=h[1]/2+Ou/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+Ou/4,_=Math.sin(v),b=Math.cos(v),x=m-f,w=x>=0?1:-1,A=w*x,k=A>Ou,E=p*_;if(bo.add(Math.atan2(E*w*Math.sin(A),g*b+E*Math.cos(A))),a+=k?x+w*Lu:x,k^f>=e^m>=e){var M=vn(yn(h),yn(t));xn(M);var S=vn(i,M);xn(S);var D=(k^x>=0?-1:1)*et(S[2]);(r>D||r===D&&(M[0]||M[1]))&&(u+=k^x>=0?1:-1)}if(!y++)break;f=m,p=_,g=b,h=t}}return(-Cu>a||Cu>a&&0>bo)^1&u}function Un(t){function n(t,n){return Math.cos(t)*Math.cos(n)>a}function e(t){var e,a,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(h,f){var d,p=[h,f],g=n(h,f),y=u?g?0:i(h,f):g?i(h+(0>h?Ou:-Ou),f):0;if(!e&&(c=s=g)&&t.lineStart(),g!==s&&(d=r(e,p),(An(e,d)||An(p,d))&&(p[0]+=Cu,p[1]+=Cu,g=n(p[0],p[1]))),g!==s)l=0,g?(t.lineStart(),d=r(p,e),t.point(d[0],d[1])):(d=r(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(o&&e&&u^g){var m;y&a||!(m=r(p,e,!0))||(l=0,u?(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||e&&An(e,p)||t.point(p[0],p[1]),e=p,s=g,a=y},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return l|(c&&s)<<1}}}function r(t,n,e){var r=yn(t),i=yn(n),u=[1,0,0],o=vn(r,i),s=mn(o,o),c=o[0],l=s-c*c;if(!l)return!e&&t;var h=a*s/l,f=-a*c/l,d=vn(u,o),p=bn(u,h),g=bn(o,f);_n(p,g);var y=d,m=mn(p,y),v=mn(y,y),_=m*m-v*(mn(p,p)-1);if(!(0>_)){var b=Math.sqrt(_),x=bn(y,(-m-b)/v);if(_n(x,p),x=wn(x),!e)return x;var w,A=t[0],k=n[0],E=t[1],M=n[1];A>k&&(w=A,A=k,k=w);var S=k-A,D=pu(S-Ou)S;if(!D&&E>M&&(w=E,E=M,M=w),T?D?E+M>0^x[1]<(pu(x[0]-A)Ou^(A<=x[0]&&x[0]<=k)){var C=bn(y,(-m+b)/v);return _n(C,p),[x,wn(C)]}}}function i(n,e){var r=u?t:Ou-t,i=0;return-r>n?i|=1:n>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var a=Math.cos(t),u=a>0,o=pu(a)>Cu,s=ge(t,6*Nu);return In(n,e,s,u?[0,-t]:[-Ou,t-Ou])}function zn(t,n,e,r){return function(i){var a,u=i.a,o=i.b,s=u.x,c=u.y,l=o.x,h=o.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=e-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=n-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 Wn(t,n,e,r){function i(r,i){return pu(r[0]-t)0?0:3:pu(r[0]-e)0?2:1:pu(r[1]-n)0?1:0:i>0?3:2}function a(t,n){return u(t.x,n.x)}function u(t,n){var e=i(t,1),r=i(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(o){function s(t){for(var n=0,e=y.length,r=t[1],i=0;e>i;++i)for(var a,u=1,o=y[i],s=o.length,c=o[0];s>u;++u)a=o[u],c[1]<=r?a[1]>r&&tt(c,a,t)>0&&++n:a[1]<=r&&tt(c,a,t)<0&&--n,c=a;return 0!==n}function c(a,o,s,c){var l=0,h=0;if(null==a||(l=i(a,s))!==(h=i(o,s))||u(a,o)<0^s>0){do c.point(0===l||3===l?t:e,l>1?r:n);while((l=(l+s+4)%4)!==h)}else c.point(o[0],o[1])}function l(i,a){return i>=t&&e>=i&&a>=n&&r>=a}function h(t,n){l(t,n)&&o.point(t,n)}function f(){T.point=p,y&&y.push(m=[]),k=!0,A=!1,x=w=0/0}function d(){g&&(p(v,_),b&&A&&S.rejoin(),g.push(S.buffer())),T.point=h,A&&o.lineEnd()}function p(t,n){t=Math.max(-Bo,Math.min(Bo,t)),n=Math.max(-Bo,Math.min(Bo,n));var e=l(t,n);if(y&&m.push([t,n]),k)v=t,_=n,b=e,k=!1,e&&(o.lineStart(),o.point(t,n));else if(e&&A)o.point(t,n);else{var r={a:{x:x,y:w},b:{x:t,y:n}};D(r)?(A||(o.lineStart(),o.point(r.a.x,r.a.y)),o.point(r.b.x,r.b.y),e||o.lineEnd(),E=!1):e&&(o.lineStart(),o.point(t,n),E=!1)}x=t,w=n,A=e}var g,y,m,v,_,b,x,w,A,k,E,M=o,S=Nn(),D=zn(t,n,e,r),T={point:h,lineStart:f,lineEnd:d,polygonStart:function(){o=S,g=[],y=[],E=!0},polygonEnd:function(){o=M,g=eu.merge(g);var n=s([t,r]),e=E&&n,i=g.length;(e||i)&&(o.polygonStart(),e&&(o.lineStart(),c(null,null,1,o),o.lineEnd()),i&&Fn(g,a,n,c,o),o.polygonEnd()),g=y=m=null}};return T}}function qn(t){var n=0,e=Ou/3,r=oe(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Ou/180,e=t[1]*Ou/180):[n/Ou*180,e/Ou*180]},i}function Gn(t,n){function e(t,n){var e=Math.sqrt(a-2*i*Math.sin(n))/i;return[e*Math.sin(t*=i),u-e*Math.cos(t)]}var r=Math.sin(t),i=(r+Math.sin(n))/2,a=1+r*(2*i-r),u=Math.sqrt(a)/i;return e.invert=function(t,n){var e=u-n;return[Math.atan2(t,e)/i,et((a-(t*t+e*e)*i*i)/(2*i))]},e}function Vn(){function t(t,n){Po+=i*t-r*n,r=t,i=n}var n,e,r,i;Uo.point=function(a,u){Uo.point=t,n=r=a,e=i=u},Uo.lineEnd=function(){t(n,e)}}function Hn(t,n){Ro>t&&(Ro=t),t>Yo&&(Yo=t),jo>n&&(jo=n),n>$o&&($o=n)}function Zn(){function t(t,n){u.push("M",t,",",n,a)}function n(t,n){u.push("M",t,",",n),o.point=e}function e(t,n){u.push("L",t,",",n)}function r(){o.point=t}function i(){u.push("Z")}var a=Xn(4.5),u=[],o={point:t,lineStart:function(){o.point=n},lineEnd:r,polygonStart:function(){o.lineEnd=i},polygonEnd:function(){o.lineEnd=r,o.point=t},pointRadius:function(t){return a=Xn(t),o},result:function(){if(u.length){var t=u.join("");return u=[],t}}};return o}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,n){ko+=t,Eo+=n,++Mo}function Jn(){function t(t,r){var i=t-n,a=r-e,u=Math.sqrt(i*i+a*a);So+=u*(n+t)/2,Do+=u*(e+r)/2,To+=u,Kn(n=t,e=r)}var n,e;Wo.point=function(r,i){Wo.point=t,Kn(n=r,e=i)}}function Qn(){Wo.point=Kn}function te(){function t(t,n){var e=t-r,a=n-i,u=Math.sqrt(e*e+a*a);So+=u*(r+t)/2,Do+=u*(i+n)/2,To+=u,u=i*t-r*n,Co+=u*(r+t),Fo+=u*(i+n),Oo+=3*u,Kn(r=t,i=n)}var n,e,r,i;Wo.point=function(a,u){Wo.point=t,Kn(n=r=a,e=i=u)},Wo.lineEnd=function(){t(n,e)}}function ne(t){function n(n,e){t.moveTo(n+u,e),t.arc(n,e,u,0,Lu)}function e(n,e){t.moveTo(n,e),o.point=r}function r(n,e){t.lineTo(n,e)}function i(){o.point=n}function a(){ t.closePath()}var u=4.5,o={point:n,lineStart:function(){o.point=e},lineEnd:i,polygonStart:function(){o.lineEnd=a},polygonEnd:function(){o.lineEnd=i,o.point=n},pointRadius:function(t){return u=t,o},result:w};return o}function ee(t){function n(t){return(o?r:e)(t)}function e(n){return ae(n,function(e,r){e=t(e,r),n.point(e[0],e[1])})}function r(n){function e(e,r){e=t(e,r),n.point(e[0],e[1])}function r(){_=0/0,k.point=a,n.lineStart()}function a(e,r){var a=yn([e,r]),u=t(e,r);i(_,b,v,x,w,A,_=u[0],b=u[1],v=e,x=a[0],w=a[1],A=a[2],o,n),n.point(_,b)}function u(){k.point=e,n.lineEnd()}function s(){r(),k.point=c,k.lineEnd=l}function c(t,n){a(h=t,f=n),d=_,p=b,g=x,y=w,m=A,k.point=a}function l(){i(_,b,v,x,w,A,d,p,h,g,y,m,o,n),k.lineEnd=u,u()}var h,f,d,p,g,y,m,v,_,b,x,w,A,k={point:e,lineStart:r,lineEnd:u,polygonStart:function(){n.polygonStart(),k.lineStart=s},polygonEnd:function(){n.polygonEnd(),k.lineStart=r}};return k}function i(n,e,r,o,s,c,l,h,f,d,p,g,y,m){var v=l-n,_=h-e,b=v*v+_*_;if(b>4*a&&y--){var x=o+d,w=s+p,A=c+g,k=Math.sqrt(x*x+w*w+A*A),E=Math.asin(A/=k),M=pu(pu(A)-1)a||pu((v*C+_*F)/b-.5)>.3||u>o*d+s*p+c*g)&&(i(n,e,r,o,s,c,D,T,M,x/=k,w/=k,A,y,m),m.point(D,T),i(D,T,M,x,w,A,l,h,f,d,p,g,y,m))}}var a=.5,u=Math.cos(30*Nu),o=16;return n.precision=function(t){return arguments.length?(o=(a=t*t)>0&&16,n):Math.sqrt(a)},n}function re(t){var n=ee(function(n,e){return t([n*Pu,e*Pu])});return function(t){return se(n(t))}}function ie(t){this.stream=t}function ae(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function ue(t){return oe(function(){return t})()}function oe(t){function n(t){return t=o(t[0]*Nu,t[1]*Nu),[t[0]*f+s,c-t[1]*f]}function e(t){return t=o.invert((t[0]-s)/f,(c-t[1])/f),t&&[t[0]*Pu,t[1]*Pu]}function r(){o=Tn(u=he(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),n}var a,u,o,s,c,l,h=ee(function(t,n){return t=a(t,n),[t[0]*f+s,c-t[1]*f]}),f=150,d=480,p=250,g=0,y=0,m=0,v=0,b=0,x=Io,w=_,A=null,k=null;return n.stream=function(t){return l&&(l.valid=!1),l=se(x(u,h(w(t)))),l.valid=!0,l},n.clipAngle=function(t){return arguments.length?(x=null==t?(A=t,Io):Un((A=+t)*Nu),i()):A},n.clipExtent=function(t){return arguments.length?(k=t,w=t?Wn(t[0][0],t[0][1],t[1][0],t[1][1]):_,i()):k},n.scale=function(t){return arguments.length?(f=+t,r()):f},n.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},n.center=function(t){return arguments.length?(g=t[0]%360*Nu,y=t[1]%360*Nu,r()):[g*Pu,y*Pu]},n.rotate=function(t){return arguments.length?(m=t[0]%360*Nu,v=t[1]%360*Nu,b=t.length>2?t[2]%360*Nu:0,r()):[m*Pu,v*Pu,b*Pu]},eu.rebind(n,h,"precision"),function(){return a=t.apply(this,arguments),n.invert=a.invert&&e,r()}}function se(t){return ae(t,function(n,e){t.point(n*Nu,e*Nu)})}function ce(t,n){return[t,n]}function le(t,n){return[t>Ou?t-Lu:-Ou>t?t+Lu:t,n]}function he(t,n,e){return t?n||e?Tn(de(t),pe(n,e)):de(t):n||e?pe(n,e):le}function fe(t){return function(n,e){return n+=t,[n>Ou?n-Lu:-Ou>n?n+Lu:n,e]}}function de(t){var n=fe(t);return n.invert=fe(-t),n}function pe(t,n){function e(t,n){var e=Math.cos(n),o=Math.cos(t)*e,s=Math.sin(t)*e,c=Math.sin(n),l=c*r+o*i;return[Math.atan2(s*a-l*u,o*r-c*i),et(l*a+s*u)]}var r=Math.cos(t),i=Math.sin(t),a=Math.cos(n),u=Math.sin(n);return e.invert=function(t,n){var e=Math.cos(n),o=Math.cos(t)*e,s=Math.sin(t)*e,c=Math.sin(n),l=c*a-s*u;return[Math.atan2(s*a+c*u,o*r+l*i),et(l*r-o*i)]},e}function ge(t,n){var e=Math.cos(t),r=Math.sin(t);return function(i,a,u,o){var s=u*n;null!=i?(i=ye(e,i),a=ye(e,a),(u>0?a>i:i>a)&&(i+=u*Lu)):(i=t+u*Lu,a=t-.5*s);for(var c,l=i;u>0?l>a:a>l;l-=s)o.point((c=wn([e,-r*Math.cos(l),-r*Math.sin(l)]))[0],c[1])}}function ye(t,n){var e=yn(n);e[0]-=t,xn(e);var r=nt(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Cu)%(2*Math.PI)}function me(t,n,e){var r=eu.range(t,n-Cu,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function ve(t,n,e){var r=eu.range(t,n-Cu,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function _e(t){return t.source}function be(t){return t.target}function xe(t,n,e,r){var i=Math.cos(n),a=Math.sin(n),u=Math.cos(r),o=Math.sin(r),s=i*Math.cos(t),c=i*Math.sin(t),l=u*Math.cos(e),h=u*Math.sin(e),f=2*Math.asin(Math.sqrt(ut(r-n)+i*u*ut(e-t))),d=1/Math.sin(f),p=f?function(t){var n=Math.sin(t*=f)*d,e=Math.sin(f-t)*d,r=e*s+n*l,i=e*c+n*h,u=e*a+n*o;return[Math.atan2(i,r)*Pu,Math.atan2(u,Math.sqrt(r*r+i*i))*Pu]}:function(){return[t*Pu,n*Pu]};return p.distance=f,p}function we(){function t(t,i){var a=Math.sin(i*=Nu),u=Math.cos(i),o=pu((t*=Nu)-n),s=Math.cos(o);qo+=Math.atan2(Math.sqrt((o=u*Math.sin(o))*o+(o=r*a-e*u*s)*o),e*a+r*u*s),n=t,e=a,r=u}var n,e,r;Go.point=function(i,a){n=i*Nu,e=Math.sin(a*=Nu),r=Math.cos(a),Go.point=t},Go.lineEnd=function(){Go.point=Go.lineEnd=w}}function Ae(t,n){function e(n,e){var r=Math.cos(n),i=Math.cos(e),a=t(r*i);return[a*i*Math.sin(n),a*Math.sin(e)]}return e.invert=function(t,e){var r=Math.sqrt(t*t+e*e),i=n(r),a=Math.sin(i),u=Math.cos(i);return[Math.atan2(t*a,r*u),Math.asin(r&&e*a/r)]},e}function ke(t,n){function e(t,n){u>0?-Bu+Cu>n&&(n=-Bu+Cu):n>Bu-Cu&&(n=Bu-Cu);var e=u/Math.pow(i(n),a);return[e*Math.sin(a*t),u-e*Math.cos(a*t)]}var r=Math.cos(t),i=function(t){return Math.tan(Ou/4+t/2)},a=t===n?Math.sin(t):Math.log(r/Math.cos(n))/Math.log(i(n)/i(t)),u=r*Math.pow(i(t),a)/a;return a?(e.invert=function(t,n){var e=u-n,r=Q(a)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/a,2*Math.atan(Math.pow(u/r,1/a))-Bu]},e):Me}function Ee(t,n){function e(t,n){var e=a-n;return[e*Math.sin(i*t),a-e*Math.cos(i*t)]}var r=Math.cos(t),i=t===n?Math.sin(t):(r-Math.cos(n))/(n-t),a=r/i+t;return pu(i)i;i++){for(;r>1&&tt(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Oe(t,n){return t[0]-n[0]||t[1]-n[1]}function Le(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function Ie(t,n,e,r){var i=t[0],a=e[0],u=n[0]-i,o=r[0]-a,s=t[1],c=e[1],l=n[1]-s,h=r[1]-c,f=(o*(s-c)-h*(i-a))/(h*u-o*l);return[i+f*u,s+f*l]}function Be(t){var n=t[0],e=t[t.length-1];return!(n[0]-e[0]||n[1]-e[1])}function Ne(){rr(this),this.edge=this.site=this.circle=null}function Pe(t){var n=is.pop()||new Ne;return n.site=t,n}function Re(t){He(t),ns.remove(t),is.push(t),rr(t)}function je(t){var n=t.circle,e=n.x,r=n.cy,i={x:e,y:r},a=t.P,u=t.N,o=[t];Re(t);for(var s=a;s.circle&&pu(e-s.circle.x)l;++l)c=o[l],s=o[l-1],tr(c.edge,s.site,c.site,i);s=o[0],c=o[h-1],c.edge=Je(s.site,c.site,null,i),Ve(s),Ve(c)}function Ye(t){for(var n,e,r,i,a=t.x,u=t.y,o=ns._;o;)if(r=$e(o,u)-a,r>Cu)o=o.L;else{if(i=a-Ue(o,u),!(i>Cu)){r>-Cu?(n=o.P,e=o):i>-Cu?(n=o,e=o.N):n=e=o;break}if(!o.R){n=o;break}o=o.R}var s=Pe(t);if(ns.insert(n,s),n||e){if(n===e)return He(n),e=Pe(n.site),ns.insert(s,e),s.edge=e.edge=Je(n.site,s.site),Ve(n),void Ve(e);if(!e)return void(s.edge=Je(n.site,s.site));He(n),He(e);var c=n.site,l=c.x,h=c.y,f=t.x-l,d=t.y-h,p=e.site,g=p.x-l,y=p.y-h,m=2*(f*y-d*g),v=f*f+d*d,_=g*g+y*y,b={x:(y*v-d*_)/m+l,y:(f*_-g*v)/m+h};tr(e.edge,c,p,b),s.edge=Je(c,t,null,b),e.edge=Je(t,p,null,b),Ve(n),Ve(e)}}function $e(t,n){var e=t.site,r=e.x,i=e.y,a=i-n;if(!a)return r;var u=t.P;if(!u)return-(1/0);e=u.site;var o=e.x,s=e.y,c=s-n;if(!c)return o;var l=o-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+o)/2}function Ue(t,n){var e=t.N;if(e)return $e(e,n);var r=t.site;return r.y===n?r.x:1/0}function ze(t){this.site=t,this.edges=[]}function We(t){for(var n,e,r,i,a,u,o,s,c,l,h=t[0][0],f=t[1][0],d=t[0][1],p=t[1][1],g=ts,y=g.length;y--;)if(a=g[y],a&&a.prepare())for(o=a.edges,s=o.length,u=0;s>u;)l=o[u].end(),r=l.x,i=l.y,c=o[++u%s].start(),n=c.x,e=c.y,(pu(r-n)>Cu||pu(i-e)>Cu)&&(o.splice(u,0,new nr(Qe(a.site,l,pu(r-h)Cu?{x:h,y:pu(n-h)Cu?{x:pu(e-p)Cu?{x:f,y:pu(n-f)Cu?{x:pu(e-d)=-Fu)){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+o,m=as.pop()||new Ge;m.arc=t,m.site=i,m.x=g+u,m.y=h+Math.sqrt(g*g+y*y),m.cy=h,t.circle=m;for(var v=null,_=rs._;_;)if(m.y<_.y||m.y===_.y&&m.x<=_.x){if(!_.L){v=_.P;break}_=_.L}else{if(!_.R){v=_;break}_=_.R}rs.insert(v,m),v||(es=m)}}}}function He(t){var n=t.circle;n&&(n.P||(es=n.N),rs.remove(n),as.push(n),rr(n),t.circle=null)}function Ze(t){for(var n,e=Qo,r=zn(t[0][0],t[0][1],t[1][0],t[1][1]),i=e.length;i--;)n=e[i],(!Xe(n,t)||!r(n)||pu(n.a.x-n.b.x)y||y>=o)return;if(f>p){if(a){if(a.y>=c)return}else a={x:y,y:s};e={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};e={x:(c-i)/r,y:c}}else{if(a){if(a.yd){if(a){if(a.x>=o)return}else a={x:u,y:r*u+i};e={x:o,y:r*o+i}}else{if(a){if(a.xa||h>u||r>f||i>d)){if(p=t.point){var p,g=n-t.x,y=e-t.y,m=g*g+y*y;if(s>m){var v=Math.sqrt(s=m);r=n-v,i=e-v,a=n+v,u=e+v,o=p}}for(var _=t.nodes,b=.5*(l+f),x=.5*(h+d),w=n>=b,A=e>=x,k=A<<1|w,E=k+4;E>k;++k)if(t=_[3&k])switch(3&k){case 0:c(t,l,h,b,x);break;case 1:c(t,b,h,f,x);break;case 2:c(t,l,x,b,d);break;case 3:c(t,b,x,f,d)}}}(t,r,i,a,u),o}function gr(t,n){t=eu.rgb(t),n=eu.rgb(n);var e=t.r,r=t.g,i=t.b,a=n.r-e,u=n.g-r,o=n.b-i;return function(t){return"#"+xt(Math.round(e+a*t))+xt(Math.round(r+u*t))+xt(Math.round(i+o*t))}}function yr(t,n){var e,r={},i={};for(e in t)e in n?r[e]=_r(t[e],n[e]):i[e]=t[e];for(e in n)e in t||(i[e]=n[e]);return function(t){for(e in r)i[e]=r[e](t);return i}}function mr(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}function vr(t,n){var e,r,i,a=os.lastIndex=ss.lastIndex=0,u=-1,o=[],s=[];for(t+="",n+="";(e=os.exec(t))&&(r=ss.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[u]?o[u]+=i:o[++u]=i),(e=e[0])===(r=r[0])?o[u]?o[u]+=r:o[++u]=r:(o[++u]=null,s.push({i:u,x:mr(e,r)})),a=ss.lastIndex;return ar;++r)o[(e=s[r]).i]=e.x(t);return o.join("")})}function _r(t,n){for(var e,r=eu.interpolators.length;--r>=0&&!(e=eu.interpolators[r](t,n)););return e}function br(t,n){var e,r=[],i=[],a=t.length,u=n.length,o=Math.min(t.length,n.length);for(e=0;o>e;++e)r.push(_r(t[e],n[e]));for(;a>e;++e)i[e]=t[e];for(;u>e;++e)i[e]=n[e];return function(t){for(e=0;o>e;++e)i[e]=r[e](t);return i}}function xr(t){return function(n){return 0>=n?0:n>=1?1:t(n)}}function wr(t){return function(n){return 1-t(1-n)}}function Ar(t){return function(n){return.5*(.5>n?t(2*n):2-t(2-2*n))}}function kr(t){return t*t}function Er(t){return t*t*t}function Mr(t){if(0>=t)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(.5>t?e:3*(t-n)+e-.75)}function Sr(t){return function(n){return Math.pow(n,t)}}function Dr(t){return 1-Math.cos(t*Bu)}function Tr(t){return Math.pow(2,10*(t-1))}function Cr(t){return 1-Math.sqrt(1-t*t)}function Fr(t,n){var e;return arguments.length<2&&(n=.45),arguments.length?e=n/Lu*Math.asin(1/t):(t=1,e=n/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-e)*Lu/n)}}function Or(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}}function Lr(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 Ir(t,n){t=eu.hcl(t),n=eu.hcl(n);var e=t.h,r=t.c,i=t.l,a=n.h-e,u=n.c-r,o=n.l-i;return isNaN(u)&&(u=0,r=isNaN(r)?n.c:r),isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:-180>a&&(a+=360),function(t){return ht(e+a*t,r+u*t,i+o*t)+""}}function Br(t,n){t=eu.hsl(t),n=eu.hsl(n);var e=t.h,r=t.s,i=t.l,a=n.h-e,u=n.s-r,o=n.l-i;return isNaN(u)&&(u=0,r=isNaN(r)?n.s:r),isNaN(a)?(a=0,e=isNaN(e)?n.h:e):a>180?a-=360:-180>a&&(a+=360),function(t){return ct(e+a*t,r+u*t,i+o*t)+""}}function Nr(t,n){t=eu.lab(t),n=eu.lab(n);var e=t.l,r=t.a,i=t.b,a=n.l-e,u=n.a-r,o=n.b-i;return function(t){return dt(e+a*t,r+u*t,i+o*t)+""}}function Pr(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function Rr(t){var n=[t.a,t.b],e=[t.c,t.d],r=Yr(n),i=jr(n,e),a=Yr($r(e,n,-i))||0;n[0]*e[1]180?l+=360:l-c>180&&(c+=360),i.push({i:r.push(r.pop()+"rotate(",null,")")-2,x:mr(c,l)})):l&&r.push(r.pop()+"rotate("+l+")"),h!=f?i.push({i:r.push(r.pop()+"skewX(",null,")")-2,x:mr(h,f)}):f&&r.push(r.pop()+"skewX("+f+")"),d[0]!=p[0]||d[1]!=p[1]?(e=r.push(r.pop()+"scale(",null,",",null,")"),i.push({i:e-4,x:mr(d[0],p[0])},{i:e-2,x:mr(d[1],p[1])})):(1!=p[0]||1!=p[1])&&r.push(r.pop()+"scale("+p+")"),e=i.length,function(t){for(var n,a=-1;++a=0;)e.push(i[r])}function ni(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(a=t.children)&&(i=a.length))for(var i,a,u=-1;++ue;++e)(n=t[e][1])>i&&(r=e,i=n);return r}function fi(t){return t.reduce(di,0)}function di(t,n){return t+n[1]}function pi(t,n){return gi(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function gi(t,n){for(var e=-1,r=+t[0],i=(t[1]-r)/n,a=[];++e<=n;)a[e]=i*e+r;return a}function yi(t){return[eu.min(t),eu.max(t)]}function mi(t,n){return t.value-n.value}function vi(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function _i(t,n){t._pack_next=n,n._pack_prev=t}function bi(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return.999*i*i>e*e+r*r}function xi(t){function n(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((e=t.children)&&(c=e.length)){var e,r,i,a,u,o,s,c,l=1/0,h=-(1/0),f=1/0,d=-(1/0);if(e.forEach(wi),r=e[0],r.x=-r.r,r.y=0,n(r),c>1&&(i=e[1],i.x=i.r,i.y=0,n(i),c>2))for(a=e[2],Ei(r,i,a),n(a),vi(r,a),r._pack_prev=a,vi(a,i),i=r._pack_next,u=3;c>u;u++){Ei(r,i,a=e[u]);var p=0,g=1,y=1;for(o=i._pack_next;o!==i;o=o._pack_next,g++)if(bi(o,a)){p=1;break}if(1==p)for(s=r._pack_prev;s!==o._pack_prev&&!bi(s,a);s=s._pack_prev,y++);p?(y>g||g==y&&i.ru;u++)a=e[u],a.x-=m,a.y-=v,_=Math.max(_,a.r+Math.sqrt(a.x*a.x+a.y*a.y));t.r=_,e.forEach(Ai)}}function wi(t){t._pack_next=t._pack_prev=t}function Ai(t){delete t._pack_next,delete t._pack_prev}function ki(t,n,e,r){var i=t.children;if(t.x=n+=r*t.x,t.y=e+=r*t.y,t.r*=r,i)for(var a=-1,u=i.length;++a=0;)n=i[a],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function Fi(t,n,e){return t.a.parent===n.parent?t.a:e}function Oi(t){return 1+eu.max(t,function(t){return t.y})}function Li(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}function Ii(t){var n=t.children;return n&&n.length?Ii(n[0]):t}function Bi(t){var n,e=t.children;return e&&(n=e.length)?Bi(e[n-1]):t}function Ni(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Pi(t,n){var e=t.x+n[3],r=t.y+n[0],i=t.dx-n[1]-n[3],a=t.dy-n[0]-n[2];return 0>i&&(e+=i/2,i=0),0>a&&(r+=a/2,a=0),{x:e,y:r,dx:i,dy:a}}function Ri(t){var n=t[0],e=t[t.length-1];return e>n?[n,e]:[e,n]}function ji(t){return t.rangeExtent?t.rangeExtent():Ri(t.range())}function Yi(t,n,e,r){var i=e(t[0],t[1]),a=r(n[0],n[1]);return function(t){return a(i(t))}}function $i(t,n){var e,r=0,i=t.length-1,a=t[r],u=t[i];return a>u&&(e=r,r=i,i=e,e=a,a=u,u=e),t[r]=n.floor(a),t[i]=n.ceil(u),t}function Ui(t){return t?{floor:function(n){return Math.floor(n/t)*t},ceil:function(n){return Math.ceil(n/t)*t}}:_s}function zi(t,n,e,r){var i=[],a=[],u=0,o=Math.min(t.length,n.length)-1;for(t[o]2?zi:Yi,s=r?Wr:zr;return u=i(t,n,s,e),o=i(n,t,s,_r),a}function a(t){return u(t)}var u,o;return a.invert=function(t){return o(t)},a.domain=function(n){return arguments.length?(t=n.map(Number),i()):t},a.range=function(t){return arguments.length?(n=t,i()):n},a.rangeRound=function(t){return a.range(t).interpolate(Pr)},a.clamp=function(t){return arguments.length?(r=t,i()):r},a.interpolate=function(t){return arguments.length?(e=t,i()):e},a.ticks=function(n){return Hi(t,n)},a.tickFormat=function(n,e){return Zi(t,n,e)},a.nice=function(n){return Gi(t,n),i()},a.copy=function(){return Wi(t,n,e,r)},i()}function qi(t,n){return eu.rebind(t,n,"range","rangeRound","interpolate","clamp")}function Gi(t,n){return $i(t,Ui(Vi(t,n)[2]))}function Vi(t,n){null==n&&(n=10);var e=Ri(t),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),a=n/r*i;return.15>=a?i*=10:.35>=a?i*=5:.75>=a&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function Hi(t,n){return eu.range.apply(eu,Vi(t,n))}function Zi(t,n,e){var r=Vi(t,n);if(e){var i=uo.exec(e);if(i.shift(),"s"===i[8]){var a=eu.formatPrefix(Math.max(pu(r[0]),pu(r[1])));return i[7]||(i[7]="."+Xi(a.scale(r[2]))),i[8]="f",e=eu.format(i.join("")),function(t){return e(a.scale(t))+a.symbol}}i[7]||(i[7]="."+Ki(i[8],r)),e=i.join("")}else e=",."+Xi(r[2])+"f";return eu.format(e)}function Xi(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Ki(t,n){var e=Xi(n[2]);return t in bs?Math.abs(e-Xi(Math.max(pu(n[0]),pu(n[1]))))+ +("e"!==t):e-2*("%"===t)}function Ji(t,n,e,r){function i(t){return(e?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function a(t){return e?Math.pow(n,t):-Math.pow(n,-t)}function u(n){return t(i(n))}return u.invert=function(n){return a(t.invert(n))},u.domain=function(n){return arguments.length?(e=n[0]>=0,t.domain((r=n.map(Number)).map(i)),u):r},u.base=function(e){return arguments.length?(n=+e,t.domain(r.map(i)),u):n},u.nice=function(){var n=$i(r.map(i),e?Math:ws);return t.domain(n),r=n.map(a),u},u.ticks=function(){var t=Ri(r),u=[],o=t[0],s=t[1],c=Math.floor(i(o)),l=Math.ceil(i(s)),h=n%1?2:n;if(isFinite(l-c)){if(e){for(;l>c;c++)for(var f=1;h>f;f++)u.push(a(c)*f);u.push(a(c))}else for(u.push(a(c));c++0;f--)u.push(a(c)*f);for(c=0;u[c]s;l--);u=u.slice(c,l)}return u},u.tickFormat=function(t,n){if(!arguments.length)return xs;arguments.length<2?n=xs:"function"!=typeof n&&(n=eu.format(n));var r,o=Math.max(.1,t/u.ticks().length),s=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(t){return t/a(s(i(t)+r))<=o?n(t):""}},u.copy=function(){return Ji(t.copy(),n,e,r)},qi(u,t)}function Qi(t,n,e){function r(n){return t(i(n))}var i=ta(n),a=ta(1/n);return r.invert=function(n){return a(t.invert(n))},r.domain=function(n){return arguments.length?(t.domain((e=n.map(Number)).map(i)),r):e},r.ticks=function(t){return Hi(e,t)},r.tickFormat=function(t,n){return Zi(e,t,n)},r.nice=function(t){return r.domain(Gi(e,t))},r.exponent=function(u){return arguments.length?(i=ta(n=u),a=ta(1/n),t.domain(e.map(i)),r):n},r.copy=function(){return Qi(t.copy(),n,e)},qi(r,t)}function ta(t){return function(n){return 0>n?-Math.pow(-n,t):Math.pow(n,t)}}function na(t,n){function e(e){return a[((i.get(e)||("range"===n.t?i.set(e,t.push(e)):0/0))-1)%a.length]}function r(n,e){return eu.range(t.length).map(function(t){return n+e*t})}var i,a,u;return e.domain=function(r){if(!arguments.length)return t;t=[],i=new l;for(var a,u=-1,o=r.length;++ue?[0/0,0/0]:[e>0?o[e-1]:t[0],en?0/0:n/a+t,[n,n+1/a]},r.copy=function(){return ra(t,n,e)},i()}function ia(t,n){function e(e){return e>=e?n[eu.bisect(t,e)]:void 0}return e.domain=function(n){return arguments.length?(t=n,e):t},e.range=function(t){return arguments.length?(n=t,e):n},e.invertExtent=function(e){return e=n.indexOf(e),[t[e-1],t[e]]},e.copy=function(){return ia(t,n)},e}function aa(t){function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=e.map(n),n):t},n.ticks=function(n){return Hi(t,n)},n.tickFormat=function(n,e){return Zi(t,n,e)},n.copy=function(){return aa(t)},n}function ua(){return 0}function oa(t){return t.innerRadius}function sa(t){return t.outerRadius}function ca(t){return t.startAngle}function la(t){return t.endAngle}function ha(t){return t&&t.padAngle}function fa(t,n,e,r){return(t-e)*n-(n-r)*t>0?0:1}function da(t,n,e,r,i){var a=t[0]-n[0],u=t[1]-n[1],o=(i?r:-r)/Math.sqrt(a*a+u*u),s=o*u,c=-o*a,l=t[0]+s,h=t[1]+c,f=n[0]+s,d=n[1]+c,p=(l+f)/2,g=(h+d)/2,y=f-l,m=d-h,v=y*y+m*m,_=e-r,b=l*d-f*h,x=(0>m?-1:1)*Math.sqrt(_*_*v-b*b),w=(b*m-y*x)/v,A=(-b*y-m*x)/v,k=(b*m+y*x)/v,E=(-b*y+m*x)/v,M=w-p,S=A-g,D=k-p,T=E-g;return M*M+S*S>D*D+T*T&&(w=k,A=E),[[w-s,A-c],[w*e/_,A*e/_]]}function pa(t){function n(n){function u(){c.push("M",a(t(l),o))}for(var s,c=[],l=[],h=-1,f=n.length,d=St(e),p=St(r);++h1&&i.push("H",r[0]),i.join("")}function va(t){for(var n=0,e=t.length,r=t[0],i=[r[0],",",r[1]];++n1){o=n[1],a=t[s],s++,r+="C"+(i[0]+u[0])+","+(i[1]+u[1])+","+(a[0]-o[0])+","+(a[1]-o[1])+","+a[0]+","+a[1];for(var c=2;c9&&(i=3*n/Math.sqrt(i),u[o]=i*e,u[o+1]=i*r));for(o=-1;++o<=s;)i=(t[Math.min(s,o+1)][0]-t[Math.max(0,o-1)][0])/(6*(1+u[o]*u[o])), a.push([i||0,u[o]*i||0]);return a}function Ia(t){return t.length<3?ga(t):t[0]+Aa(t,La(t))}function Ba(t){for(var n,e,r,i=-1,a=t.length;++ir)return l();var i=a[a.active];i&&(--a.count,delete a[a.active],i.event&&i.event.interrupt.call(t,t.__data__,i.index)),a.active=r,u.event&&u.event.start.call(t,t.__data__,n),u.tween.forEach(function(e,r){(r=r.call(t,t.__data__,n))&&g.push(r)}),f=u.ease,h=u.duration,eu.timer(function(){return p.c=c(e||1)?Cn:c,1},0,o)}function c(e){if(a.active!==r)return 1;for(var i=e/h,o=f(i),s=g.length;s>0;)g[--s].call(t,o);return i>=1?(u.event&&u.event.end.call(t,t.__data__,n),l()):void 0}function l(){return--a.count?delete a[r]:delete t[e],1}var h,f,d=u.delay,p=ro,g=[];return p.t=d+o,i>=d?s(i-d):void(p.c=s)},0,o)}}function Za(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate("+(isFinite(r)?r:e(t))+",0)"})}function Xa(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate(0,"+(isFinite(r)?r:e(t))+")"})}function Ka(t){return t.toISOString()}function Ja(t,n,e){function r(n){return t(n)}function i(t,e){var r=t[1]-t[0],i=r/e,a=eu.bisect(Vs,i);return a==Vs.length?[n.year,Vi(t.map(function(t){return t/31536e6}),e)[2]]:a?n[i/Vs[a-1]1?{floor:function(n){for(;e(n=t.floor(n));)n=Qa(n-1);return n},ceil:function(n){for(;e(n=t.ceil(n));)n=Qa(+n+1);return n}}:t))},r.ticks=function(t,n){var e=Ri(r.domain()),a=null==t?i(e,10):"number"==typeof t?i(e,t):!t.range&&[{range:t},n];return a&&(t=a[0],n=a[1]),t.range(e[0],Qa(+e[1]+1),1>n?1:n)},r.tickFormat=function(){return e},r.copy=function(){return Ja(t.copy(),n,e)},qi(r,t)}function Qa(t){return new Date(t)}function tu(t){return JSON.parse(t.responseText)}function nu(t){var n=au.createRange();return n.selectNode(au.body),n.createContextualFragment(t.responseText)}var eu={version:"3.5.6"},ru=[].slice,iu=function(t){return ru.call(t)},au=this.document;if(au)try{iu(au.documentElement.childNodes)[0].nodeType}catch(uu){iu=function(t){for(var n=t.length,e=new Array(n);n--;)e[n]=t[n];return e}}if(Date.now||(Date.now=function(){return+new Date}),au)try{au.createElement("DIV").style.setProperty("opacity",0,"")}catch(ou){var su=this.Element.prototype,cu=su.setAttribute,lu=su.setAttributeNS,hu=this.CSSStyleDeclaration.prototype,fu=hu.setProperty;su.setAttribute=function(t,n){cu.call(this,t,n+"")},su.setAttributeNS=function(t,n,e){lu.call(this,t,n,e+"")},hu.setProperty=function(t,n,e){fu.call(this,t,n+"",e)}}eu.ascending=r,eu.descending=function(t,n){return t>n?-1:n>t?1:n>=t?0:0/0},eu.min=function(t,n){var e,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ir&&(e=r)}else{for(;++i=r){e=r;break}for(;++ir&&(e=r)}return e},eu.max=function(t,n){var e,r,i=-1,a=t.length;if(1===arguments.length){for(;++i=r){e=r;break}for(;++ie&&(e=r)}else{for(;++i=r){e=r;break}for(;++ie&&(e=r)}return e},eu.extent=function(t,n){var e,r,i,a=-1,u=t.length;if(1===arguments.length){for(;++a=r){e=i=r;break}for(;++ar&&(e=r),r>i&&(i=r))}else{for(;++a=r){e=i=r;break}for(;++ar&&(e=r),r>i&&(i=r))}return[e,i]},eu.sum=function(t,n){var e,r=0,i=t.length,u=-1;if(1===arguments.length)for(;++u1?s/(l-1):void 0},eu.deviation=function(){var t=eu.variance.apply(this,arguments);return t?Math.sqrt(t):t};var du=u(r);eu.bisectLeft=du.left,eu.bisect=eu.bisectRight=du.right,eu.bisector=function(t){return u(1===t.length?function(n,e){return r(t(n),e)}:t)},eu.shuffle=function(t,n,e){(a=arguments.length)<3&&(e=t.length,2>a&&(n=0));for(var r,i,a=e-n;a;)i=Math.random()*a--|0,r=t[a+n],t[a+n]=t[i+n],t[i+n]=r;return t},eu.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},eu.pairs=function(t){for(var n,e=0,r=t.length-1,i=t[0],a=new Array(0>r?0:r);r>e;)a[e]=[n=i,i=t[++e]];return a},eu.zip=function(){if(!(r=arguments.length))return[];for(var t=-1,n=eu.min(arguments,o),e=new Array(n);++t=0;)for(r=t[i],n=r.length;--n>=0;)e[--u]=r[n];return e};var pu=Math.abs;eu.range=function(t,n,e){if(arguments.length<3&&(e=1,arguments.length<2&&(n=t,t=0)),(n-t)/e===1/0)throw new Error("infinite range");var r,i=[],a=s(pu(e)),u=-1;if(t*=a,n*=a,e*=a,0>e)for(;(r=t+e*++u)>n;)i.push(r/a);else for(;(r=t+e*++u)=a.length)return r?r.call(i,u):e?u.sort(e):u;for(var s,c,h,f,d=-1,p=u.length,g=a[o++],y=new l;++d=a.length)return t;var r=[],i=u[e++];return t.forEach(function(t,i){r.push({key:t,values:n(i,e)})}),i?r.sort(function(t,n){return i(t.key,n.key)}):r}var e,r,i={},a=[],u=[];return i.map=function(n,e){return t(e,n,0)},i.entries=function(e){return n(t(eu.map,e,0),0)},i.key=function(t){return a.push(t),i},i.sortKeys=function(t){return u[a.length-1]=t,i},i.sortValues=function(t){return e=t,i},i.rollup=function(t){return r=t,i},i},eu.set=function(t){var n=new v;if(t)for(var e=0,r=t.length;r>e;++e)n.add(t[e]);return n},c(v,{has:d,add:function(t){return this._[h(t+="")]=!0,t},remove:p,values:g,size:y,empty:m,forEach:function(t){for(var n in this._)t.call(this,f(n))}}),eu.behavior={},eu.rebind=function(t,n){for(var e,r=1,i=arguments.length;++r=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},eu.event=null,eu.requote=function(t){return t.replace(vu,"\\$&")};var vu=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,_u={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]},bu=function(t,n){return n.querySelector(t)},xu=function(t,n){return n.querySelectorAll(t)},wu=function(t,n){var e=t.matches||t[x(t,"matchesSelector")];return(wu=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(bu=function(t,n){return Sizzle(t,n)[0]||null},xu=Sizzle,wu=Sizzle.matchesSelector),eu.selection=function(){return eu.select(au.documentElement)};var Au=eu.selection.prototype=[];Au.select=function(t){var n,e,r,i,a=[];t=T(t);for(var u=-1,o=this.length;++u=0&&(e=t.slice(0,n),t=t.slice(n+1)),ku.hasOwnProperty(e)?{space:ku[e],local:t}:t}},Au.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return t=eu.ns.qualify(t),t.local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(F(n,t[n]));return this}return this.each(F(t,n))},Au.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=I(t)).length,i=-1;if(n=e.classList){for(;++ii){if("string"!=typeof t){2>i&&(n="");for(r in t)this.each(P(r,t[r],n));return this}if(2>i){var a=this.node();return e(a).getComputedStyle(a,null).getPropertyValue(t)}r=""}return this.each(P(t,n,r))},Au.property=function(t,n){if(arguments.length<2){if("string"==typeof t)return this.node()[t];for(n in t)this.each(R(n,t[n]));return this}return this.each(R(t,n))},Au.text=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}:null==t?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},Au.html=function(t){return arguments.length?this.each("function"==typeof t?function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}:null==t?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},Au.append=function(t){return t=j(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})},Au.insert=function(t,n){return t=j(t),n=T(n),this.select(function(){return this.insertBefore(t.apply(this,arguments),n.apply(this,arguments)||null)})},Au.remove=function(){return this.each(Y)},Au.data=function(t,n){function e(t,e){var r,i,a,u=t.length,h=e.length,f=Math.min(u,h),d=new Array(h),p=new Array(h),g=new Array(u);if(n){var y,m=new l,v=new Array(u);for(r=-1;++rr;++r)p[r]=$(e[r]);for(;u>r;++r)g[r]=t[r]}p.update=d,p.parentNode=d.parentNode=g.parentNode=t.parentNode,o.push(p),s.push(d),c.push(g)}var r,i,a=-1,u=this.length;if(!arguments.length){for(t=new Array(u=(r=this[0]).length);++aa;a++){i.push(n=[]),n.parentNode=(e=this[a]).parentNode;for(var o=0,s=e.length;s>o;o++)(r=e[o])&&t.call(r,r.__data__,o,a)&&n.push(r)}return D(i)},Au.order=function(){for(var t=-1,n=this.length;++t=0;)(e=r[i])&&(a&&a!==e.nextSibling&&a.parentNode.insertBefore(e,a),a=e);return this},Au.sort=function(t){t=z.apply(this,arguments);for(var n=-1,e=this.length;++nt;t++)for(var e=this[t],r=0,i=e.length;i>r;r++){var a=e[r];if(a)return a}return null},Au.size=function(){var t=0;return W(this,function(){++t}),t};var Eu=[];eu.selection.enter=q,eu.selection.enter.prototype=Eu,Eu.append=Au.append,Eu.empty=Au.empty,Eu.node=Au.node,Eu.call=Au.call,Eu.size=Au.size,Eu.select=function(t){for(var n,e,r,i,a,u=[],o=-1,s=this.length;++or){if("string"!=typeof t){2>r&&(n=!1);for(e in t)this.each(V(e,t[e],n));return this}if(2>r)return(r=this.node()["__on"+t])&&r._;e=!1}return this.each(V(t,n,e))};var Mu=eu.map({mouseenter:"mouseover",mouseleave:"mouseout"});au&&Mu.forEach(function(t){"on"+t in au&&Mu.remove(t)});var Su,Du=0;eu.mouse=function(t){return K(t,M())};var Tu=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;eu.touch=function(t,n,e){if(arguments.length<3&&(e=n,n=M().changedTouches),n)for(var r,i=0,a=n.length;a>i;++i)if((r=n[i]).identifier===e)return K(t,r)},eu.behavior.drag=function(){function t(){this.on("mousedown.drag",a).on("touchstart.drag",u)}function n(t,n,e,a,u){return function(){function o(){var t,e,r=n(f,g);r&&(t=r[0]-_[0],e=r[1]-_[1],p|=t|e,_=r,d({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:t,dy:e}))}function s(){n(f,g)&&(m.on(a+y,null).on(u+y,null),v(p&&eu.event.target===h),d({type:"dragend"}))}var c,l=this,h=eu.event.target,f=l.parentNode,d=r.of(l,arguments),p=0,g=t(),y=".drag"+(null==g?"":"-"+g),m=eu.select(e(h)).on(a+y,o).on(u+y,s),v=X(h),_=n(f,g);i?(c=i.apply(l,arguments),c=[c.x-_[0],c.y-_[1]]):c=[0,0],d({type:"dragstart"})}}var r=S(t,"drag","dragstart","dragend"),i=null,a=n(w,eu.mouse,e,"mousemove","mouseup"),u=n(J,eu.touch,_,"touchmove","touchend");return t.origin=function(n){return arguments.length?(i=n,t):i},eu.rebind(t,r,"on")},eu.touches=function(t,n){return arguments.length<2&&(n=M().touches),n?iu(n).map(function(n){var e=K(t,n);return e.identifier=n.identifier,e}):[]};var Cu=1e-6,Fu=Cu*Cu,Ou=Math.PI,Lu=2*Ou,Iu=Lu-Cu,Bu=Ou/2,Nu=Ou/180,Pu=180/Ou,Ru=Math.SQRT2,ju=2,Yu=4;eu.interpolateZoom=function(t,n){function e(t){var n=t*v;if(m){var e=it(g),u=a/(ju*f)*(e*at(Ru*n+g)-rt(g));return[r+u*c,i+u*l,a*e/it(Ru*n+g)]}return[r+t*c,i+t*l,a*Math.exp(Ru*n)]}var r=t[0],i=t[1],a=t[2],u=n[0],o=n[1],s=n[2],c=u-r,l=o-i,h=c*c+l*l,f=Math.sqrt(h),d=(s*s-a*a+Yu*h)/(2*a*ju*f),p=(s*s-a*a-Yu*h)/(2*s*ju*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))/Ru;return e.duration=1e3*v,e},eu.behavior.zoom=function(){function t(t){t.on(F,h).on(Uu+".zoom",d).on("dblclick.zoom",p).on(I,f)}function n(t){return[(t[0]-k.x)/k.k,(t[1]-k.y)/k.k]}function r(t){return[t[0]*k.k+k.x,t[1]*k.k+k.y]}function i(t){k.k=Math.max(D[0],Math.min(D[1],t))}function a(t,n){n=r(n),k.x+=t[0]-n[0],k.y+=t[1]-n[1]}function u(n,e,r,u){n.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,u)),a(y=e,r),n=eu.select(n),T>0&&(n=n.transition().duration(T)),n.call(t.event)}function o(){x&&x.domain(b.range().map(function(t){return(t-k.x)/k.k}).map(b.invert)),A&&A.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function s(t){C++||t({type:"zoomstart"})}function c(t){o(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(t){--C||(t({type:"zoomend"}),y=null)}function h(){function t(){h=1,a(eu.mouse(i),d),c(o)}function r(){f.on(O,null).on(L,null),p(h&&eu.event.target===u),l(o)}var i=this,u=eu.event.target,o=B.of(i,arguments),h=0,f=eu.select(e(i)).on(O,t).on(L,r),d=n(eu.mouse(i)),p=X(i);Ps.call(i),s(o)}function f(){function t(){var t=eu.touches(p);return d=k.k,t.forEach(function(t){t.identifier in y&&(y[t.identifier]=n(t))}),t}function e(){var n=eu.event.target;eu.select(n).on(b,r).on(x,o),w.push(n);for(var e=eu.event.changedTouches,i=0,a=e.length;a>i;++i)y[e[i].identifier]=null;var s=t(),c=Date.now();if(1===s.length){if(500>c-_){var l=s[0];u(p,l,y[l.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),E()}_=c}else if(s.length>1){var l=s[0],h=s[1],f=l[0]-h[0],d=l[1]-h[1];m=f*f+d*d}}function r(){var t,n,e,r,u=eu.touches(p);Ps.call(p);for(var o=0,s=u.length;s>o;++o,r=null)if(e=u[o],r=y[e.identifier]){if(n)break;t=e,n=r}if(r){var l=(l=e[0]-t[0])*l+(l=e[1]-t[1])*l,h=m&&Math.sqrt(l/m);t=[(t[0]+e[0])/2,(t[1]+e[1])/2],n=[(n[0]+r[0])/2,(n[1]+r[1])/2],i(h*d)}_=null,a(t,n),c(g)}function o(){if(eu.event.touches.length){for(var n=eu.event.changedTouches,e=0,r=n.length;r>e;++e)delete y[n[e].identifier];for(var i in y)return void t()}eu.selectAll(w).on(v,null),A.on(F,h).on(I,f),M(),l(g)}var d,p=this,g=B.of(p,arguments),y={},m=0,v=".zoom-"+eu.event.changedTouches[0].identifier,b="touchmove"+v,x="touchend"+v,w=[],A=eu.select(p),M=X(p);e(),s(g),A.on(F,null).on(I,e)}function d(){var t=B.of(this,arguments);v?clearTimeout(v):(Ps.call(this),g=n(y=m||eu.mouse(this)),s(t)),v=setTimeout(function(){v=null,l(t)},50),E(),i(Math.pow(2,.002*$u())*k.k),a(y,g),c(t)}function p(){var t=eu.mouse(this),e=Math.log(k.k)/Math.LN2;u(this,t,n(t),eu.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var g,y,m,v,_,b,x,w,A,k={x:0,y:0,k:1},M=[960,500],D=zu,T=250,C=0,F="mousedown.zoom",O="mousemove.zoom",L="mouseup.zoom",I="touchstart.zoom",B=S(t,"zoomstart","zoom","zoomend");return Uu||(Uu="onwheel"in au?($u=function(){return-eu.event.deltaY*(eu.event.deltaMode?120:1)},"wheel"):"onmousewheel"in au?($u=function(){return eu.event.wheelDelta},"mousewheel"):($u=function(){return-eu.event.detail},"MozMousePixelScroll")),t.event=function(t){t.each(function(){var t=B.of(this,arguments),n=k;Bs?eu.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},s(t)}).tween("zoom:zoom",function(){var e=M[0],r=M[1],i=y?y[0]:e/2,a=y?y[1]:r/2,u=eu.interpolateZoom([(i-k.x)/k.k,(a-k.y)/k.k,e/k.k],[(i-n.x)/n.k,(a-n.y)/n.k,e/n.k]);return function(n){var r=u(n),o=e/r[2];this.__chart__=k={x:i-r[0]*o,y:a-r[1]*o,k:o},c(t)}}).each("interrupt.zoom",function(){l(t)}).each("end.zoom",function(){l(t)}):(this.__chart__=k,s(t),c(t),l(t))})},t.translate=function(n){return arguments.length?(k={x:+n[0],y:+n[1],k:k.k},o(),t):[k.x,k.y]},t.scale=function(n){return arguments.length?(k={x:k.x,y:k.y,k:+n},o(),t):k.k},t.scaleExtent=function(n){return arguments.length?(D=null==n?zu:[+n[0],+n[1]],t):D},t.center=function(n){return arguments.length?(m=n&&[+n[0],+n[1]],t):m},t.size=function(n){return arguments.length?(M=n&&[+n[0],+n[1]],t):M},t.duration=function(n){return arguments.length?(T=+n,t):T},t.x=function(n){return arguments.length?(x=n,b=n.copy(),k={x:0,y:0,k:1},t):x},t.y=function(n){return arguments.length?(A=n,w=n.copy(),k={x:0,y:0,k:1},t):A},eu.rebind(t,B,"on")};var $u,Uu,zu=[0,1/0];eu.color=ot,ot.prototype.toString=function(){return this.rgb()+""},eu.hsl=st;var Wu=st.prototype=new ot;Wu.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new st(this.h,this.s,this.l/t)},Wu.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new st(this.h,this.s,t*this.l)},Wu.rgb=function(){return ct(this.h,this.s,this.l)},eu.hcl=lt;var qu=lt.prototype=new ot;qu.brighter=function(t){return new lt(this.h,this.c,Math.min(100,this.l+Gu*(arguments.length?t:1)))},qu.darker=function(t){return new lt(this.h,this.c,Math.max(0,this.l-Gu*(arguments.length?t:1)))},qu.rgb=function(){return ht(this.h,this.c,this.l).rgb()},eu.lab=ft;var Gu=18,Vu=.95047,Hu=1,Zu=1.08883,Xu=ft.prototype=new ot;Xu.brighter=function(t){return new ft(Math.min(100,this.l+Gu*(arguments.length?t:1)),this.a,this.b)},Xu.darker=function(t){return new ft(Math.max(0,this.l-Gu*(arguments.length?t:1)),this.a,this.b)},Xu.rgb=function(){return dt(this.l,this.a,this.b)},eu.rgb=vt;var Ku=vt.prototype=new ot;Ku.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var n=this.r,e=this.g,r=this.b,i=30;return n||e||r?(n&&i>n&&(n=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new vt(Math.min(255,n/t),Math.min(255,e/t),Math.min(255,r/t))):new vt(i,i,i)},Ku.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new vt(t*this.r,t*this.g,t*this.b)},Ku.hsl=function(){return At(this.r,this.g,this.b)},Ku.toString=function(){return"#"+xt(this.r)+xt(this.g)+xt(this.b)};var Ju=eu.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,rebeccapurple:6697881,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});Ju.forEach(function(t,n){Ju.set(t,_t(n))}),eu.functor=St,eu.xhr=Dt(_),eu.dsv=function(t,n){function e(t,e,a){arguments.length<3&&(a=e,e=null);var u=Tt(t,n,null==e?r:i(e),a);return u.row=function(t){return arguments.length?u.response(null==(e=t)?r:i(t)):e},u}function r(t){return e.parse(t.responseText)}function i(t){return function(n){return e.parse(n.responseText,t)}}function a(n){return n.map(u).join(t)}function u(t){return o.test(t)?'"'+t.replace(/\"/g,'""')+'"':t}var o=new RegExp('["'+t+"\n]"),s=t.charCodeAt(0);return e.parse=function(t,n){var r;return e.parseRows(t,function(t,e){if(r)return r(t,e-1);var i=new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}");r=n?function(t,e){return n(i(t),e)}:i})},e.parseRows=function(t,n){function e(){if(l>=c)return u;if(i)return i=!1,a;var n=l;if(34===t.charCodeAt(n)){for(var e=n;e++l;){var r=t.charCodeAt(l++),o=1;if(10===r)i=!0;else if(13===r)i=!0,10===t.charCodeAt(l)&&(++l,++o);else if(r!==s)continue;return t.slice(n,l-o)}return t.slice(n)}for(var r,i,a={},u={},o=[],c=t.length,l=0,h=0;(r=e())!==u;){for(var f=[];r!==a&&r!==u;)f.push(r),r=e();n&&null==(f=n(f,h++))||o.push(f)}return o},e.format=function(n){if(Array.isArray(n[0]))return e.formatRows(n);var r=new v,i=[];return n.forEach(function(t){for(var n in t)r.has(n)||i.push(r.add(n))}),[i.map(u).join(t)].concat(n.map(function(n){return i.map(function(t){return u(n[t])}).join(t)})).join("\n")},e.formatRows=function(t){return t.map(a).join("\n")},e},eu.csv=eu.dsv(",","text/csv"),eu.tsv=eu.dsv(" ","text/tab-separated-values");var Qu,to,no,eo,ro,io=this[x(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};eu.timer=function(t,n,e){var r=arguments.length;2>r&&(n=0),3>r&&(e=Date.now());var i=e+n,a={c:t,t:i,f:!1,n:null};to?to.n=a:Qu=a,to=a,no||(eo=clearTimeout(eo),no=1,io(Ot))},eu.timer.flush=function(){Lt(),It()},eu.round=function(t,n){return n?Math.round(t*(n=Math.pow(10,n)))/n:Math.round(t)};var ao=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Nt);eu.formatPrefix=function(t,n){var e=0;return t&&(0>t&&(t*=-1),n&&(t=eu.round(t,Bt(t,n))),e=1+Math.floor(1e-12+Math.log(t)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),ao[8+e/3]};var uo=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,oo=eu.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,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=eu.round(t,Bt(t,n))).toFixed(Math.max(0,Math.min(20,Bt(t*(1+1e-15),n))))}}),so=eu.time={},co=Date;jt.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(){lo.setUTCDate.apply(this._,arguments)},setDay:function(){lo.setUTCDay.apply(this._,arguments)},setFullYear:function(){lo.setUTCFullYear.apply(this._,arguments)},setHours:function(){lo.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){lo.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){lo.setUTCMinutes.apply(this._,arguments)},setMonth:function(){lo.setUTCMonth.apply(this._,arguments)},setSeconds:function(){lo.setUTCSeconds.apply(this._,arguments)},setTime:function(){lo.setTime.apply(this._,arguments)}};var lo=Date.prototype;so.year=Yt(function(t){return t=so.day(t),t.setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),so.years=so.year.range,so.years.utc=so.year.utc.range,so.day=Yt(function(t){var n=new co(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),so.days=so.day.range,so.days.utc=so.day.utc.range,so.dayOfYear=function(t){var n=so.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,n){n=7-n;var e=so[t]=Yt(function(t){return(t=so.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=so.year(t).getDay();return Math.floor((so.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});so[t+"s"]=e.range,so[t+"s"].utc=e.utc.range,so[t+"OfYear"]=function(t){var e=so.year(t).getDay();return Math.floor((so.dayOfYear(t)+(e+n)%7)/7); }}),so.week=so.sunday,so.weeks=so.sunday.range,so.weeks.utc=so.sunday.utc.range,so.weekOfYear=so.sundayOfYear;var ho={"-":"",_:" ",0:"0"},fo=/^\s*\d+/,po=/^%/;eu.locale=function(t){return{numberFormat:Pt(t),timeFormat:Ut(t)}};var go=eu.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"]});eu.format=go.numberFormat,eu.geo={},ln.prototype={s:0,t:0,add:function(t){hn(t,this.t,yo),hn(yo.s,this.s,this),this.s?this.t+=yo.t:this.s=yo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var yo=new ln;eu.geo.stream=function(t,n){t&&mo.hasOwnProperty(t.type)?mo[t.type](t,n):fn(t,n)};var mo={Feature:function(t,n){fn(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++rt?4*Ou+t:t,xo.lineStart=xo.lineEnd=xo.point=w}};eu.geo.bounds=function(){function t(t,n){_.push(b=[l=t,f=t]),h>n&&(h=n),n>d&&(d=n)}function n(n,e){var r=yn([n*Nu,e*Nu]);if(m){var i=vn(m,r),a=[i[1],-i[0],0],u=vn(a,i);xn(u),u=wn(u);var s=n-p,c=s>0?1:-1,g=u[0]*Pu*c,y=pu(s)>180;if(y^(g>c*p&&c*n>g)){var v=u[1]*Pu;v>d&&(d=v)}else if(g=(g+360)%360-180,y^(g>c*p&&c*n>g)){var v=-u[1]*Pu;h>v&&(h=v)}else h>e&&(h=e),e>d&&(d=e);y?p>n?o(l,n)>o(l,f)&&(f=n):o(n,f)>o(l,f)&&(l=n):f>=l?(l>n&&(l=n),n>f&&(f=n)):n>p?o(l,n)>o(l,f)&&(f=n):o(n,f)>o(l,f)&&(l=n)}else t(n,e);m=r,p=n}function e(){x.point=n}function r(){b[0]=l,b[1]=f,x.point=t,m=null}function i(t,e){if(m){var r=t-p;v+=pu(r)>180?r+(r>0?360:-360):r}else g=t,y=e;xo.point(t,e),n(t,e)}function a(){xo.lineStart()}function u(){i(g,y),xo.lineEnd(),pu(v)>Cu&&(l=-(f=180)),b[0]=l,b[1]=f,m=null}function o(t,n){return(n-=t)<0?n+360:n}function s(t,n){return t[0]-n[0]}function c(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tbo?(l=-(f=180),h=-(d=90)):v>Cu?d=90:-Cu>v&&(h=-90),b[0]=l,b[1]=f}};return function(t){d=f=-(l=h=1/0),_=[],eu.geo.stream(t,x);var n=_.length;if(n){_.sort(s);for(var e,r=1,i=_[0],a=[i];n>r;++r)e=_[r],c(e[0],i)||c(e[1],i)?(o(i[0],e[1])>o(i[0],i[1])&&(i[1]=e[1]),o(e[0],i[1])>o(i[0],i[1])&&(i[0]=e[0])):a.push(i=e);for(var u,e,p=-(1/0),n=a.length-1,r=0,i=a[n];n>=r;i=e,++r)e=a[r],(u=o(i[1],e[0]))>p&&(p=u,l=e[0],f=i[1])}return _=b=null,l===1/0||h===1/0?[[0/0,0/0],[0/0,0/0]]:[[l,h],[f,d]]}}(),eu.geo.centroid=function(t){wo=Ao=ko=Eo=Mo=So=Do=To=Co=Fo=Oo=0,eu.geo.stream(t,Lo);var n=Co,e=Fo,r=Oo,i=n*n+e*e+r*r;return Fu>i&&(n=So,e=Do,r=To,Cu>Ao&&(n=ko,e=Eo,r=Mo),i=n*n+e*e+r*r,Fu>i)?[0/0,0/0]:[Math.atan2(e,n)*Pu,et(r/Math.sqrt(i))*Pu]};var wo,Ao,ko,Eo,Mo,So,Do,To,Co,Fo,Oo,Lo={sphere:w,point:kn,lineStart:Mn,lineEnd:Sn,polygonStart:function(){Lo.lineStart=Dn},polygonEnd:function(){Lo.lineStart=Mn}},Io=In(Cn,Rn,Yn,[-Ou,-Ou/2]),Bo=1e9;eu.geo.clipExtent=function(){var t,n,e,r,i,a,u={stream:function(t){return i&&(i.valid=!1),i=a(t),i.valid=!0,i},extent:function(o){return arguments.length?(a=Wn(t=+o[0][0],n=+o[0][1],e=+o[1][0],r=+o[1][1]),i&&(i.valid=!1,i=null),u):[[t,n],[e,r]]}};return u.extent([[0,0],[960,500]])},(eu.geo.conicEqualArea=function(){return qn(Gn)}).raw=Gn,eu.geo.albers=function(){return eu.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},eu.geo.albersUsa=function(){function t(t){var a=t[0],u=t[1];return n=null,e(a,u),n||(r(a,u),n)||i(a,u),n}var n,e,r,i,a=eu.geo.albers(),u=eu.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),o=eu.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,e){n=[t,e]}};return t.invert=function(t){var n=a.scale(),e=a.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&.234>i&&r>=-.425&&-.214>r?u:i>=.166&&.234>i&&r>=-.214&&-.115>r?o:a).invert(t)},t.stream=function(t){var n=a.stream(t),e=u.stream(t),r=o.stream(t);return{point:function(t,i){n.point(t,i),e.point(t,i),r.point(t,i)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},t.precision=function(n){return arguments.length?(a.precision(n),u.precision(n),o.precision(n),t):a.precision()},t.scale=function(n){return arguments.length?(a.scale(n),u.scale(.35*n),o.scale(n),t.translate(a.translate())):a.scale()},t.translate=function(n){if(!arguments.length)return a.translate();var c=a.scale(),l=+n[0],h=+n[1];return e=a.translate(n).clipExtent([[l-.455*c,h-.238*c],[l+.455*c,h+.238*c]]).stream(s).point,r=u.translate([l-.307*c,h+.201*c]).clipExtent([[l-.425*c+Cu,h+.12*c+Cu],[l-.214*c-Cu,h+.234*c-Cu]]).stream(s).point,i=o.translate([l-.205*c,h+.212*c]).clipExtent([[l-.214*c+Cu,h+.166*c+Cu],[l-.115*c-Cu,h+.234*c-Cu]]).stream(s).point,t},t.scale(1070)};var No,Po,Ro,jo,Yo,$o,Uo={point:w,lineStart:w,lineEnd:w,polygonStart:function(){Po=0,Uo.lineStart=Vn},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=w,No+=pu(Po/2)}},zo={point:Hn,lineStart:w,lineEnd:w,polygonStart:w,polygonEnd:w},Wo={point:Kn,lineStart:Jn,lineEnd:Qn,polygonStart:function(){Wo.lineStart=te},polygonEnd:function(){Wo.point=Kn,Wo.lineStart=Jn,Wo.lineEnd=Qn}};eu.geo.path=function(){function t(t){return t&&("function"==typeof o&&a.pointRadius(+o.apply(this,arguments)),u&&u.valid||(u=i(a)),eu.geo.stream(t,u)),a.result()}function n(){return u=null,t}var e,r,i,a,u,o=4.5;return t.area=function(t){return No=0,eu.geo.stream(t,i(Uo)),No},t.centroid=function(t){return ko=Eo=Mo=So=Do=To=Co=Fo=Oo=0,eu.geo.stream(t,i(Wo)),Oo?[Co/Oo,Fo/Oo]:To?[So/To,Do/To]:Mo?[ko/Mo,Eo/Mo]:[0/0,0/0]},t.bounds=function(t){return Yo=$o=-(Ro=jo=1/0),eu.geo.stream(t,i(zo)),[[Ro,jo],[Yo,$o]]},t.projection=function(t){return arguments.length?(i=(e=t)?t.stream||re(t):_,n()):e},t.context=function(t){return arguments.length?(a=null==(r=t)?new Zn:new ne(t),"function"!=typeof o&&a.pointRadius(o),n()):r},t.pointRadius=function(n){return arguments.length?(o="function"==typeof n?n:(a.pointRadius(+n),+n),t):o},t.projection(eu.geo.albersUsa()).context(null)},eu.geo.transform=function(t){return{stream:function(n){var e=new ie(n);for(var r in t)e[r]=t[r];return e}}},ie.prototype={point:function(t,n){this.stream.point(t,n)},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()}},eu.geo.projection=ue,eu.geo.projectionMutator=oe,(eu.geo.equirectangular=function(){return ue(ce)}).raw=ce.invert=ce,eu.geo.rotation=function(t){function n(n){return n=t(n[0]*Nu,n[1]*Nu),n[0]*=Pu,n[1]*=Pu,n}return t=he(t[0]%360*Nu,t[1]*Nu,t.length>2?t[2]*Nu:0),n.invert=function(n){return n=t.invert(n[0]*Nu,n[1]*Nu),n[0]*=Pu,n[1]*=Pu,n},n},le.invert=ce,eu.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,n=he(-t[0]*Nu,-t[1]*Nu,0).invert,i=[];return e(null,null,1,{point:function(t,e){i.push(t=n(t,e)),t[0]*=Pu,t[1]*=Pu}}),{type:"Polygon",coordinates:[i]}}var n,e,r=[0,0],i=6;return t.origin=function(n){return arguments.length?(r=n,t):r},t.angle=function(r){return arguments.length?(e=ge((n=+r)*Nu,i*Nu),t):n},t.precision=function(r){return arguments.length?(e=ge(n*Nu,(i=+r)*Nu),t):i},t.angle(90)},eu.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Nu,i=t[1]*Nu,a=n[1]*Nu,u=Math.sin(r),o=Math.cos(r),s=Math.sin(i),c=Math.cos(i),l=Math.sin(a),h=Math.cos(a);return Math.atan2(Math.sqrt((e=h*u)*e+(e=c*l-s*h*o)*e),s*l+c*h*o)},eu.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return eu.range(Math.ceil(a/y)*y,i,y).map(f).concat(eu.range(Math.ceil(c/m)*m,s,m).map(d)).concat(eu.range(Math.ceil(r/p)*p,e,p).filter(function(t){return pu(t%y)>Cu}).map(l)).concat(eu.range(Math.ceil(o/g)*g,u,g).filter(function(t){return pu(t%m)>Cu}).map(h))}var e,r,i,a,u,o,s,c,l,h,f,d,p=10,g=p,y=90,m=360,v=2.5;return t.lines=function(){return n().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(n){return arguments.length?t.majorExtent(n).minorExtent(n):t.minorExtent()},t.majorExtent=function(n){return arguments.length?(a=+n[0][0],i=+n[1][0],c=+n[0][1],s=+n[1][1],a>i&&(n=a,a=i,i=n),c>s&&(n=c,c=s,s=n),t.precision(v)):[[a,c],[i,s]]},t.minorExtent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],o=+n[0][1],u=+n[1][1],r>e&&(n=r,r=e,e=n),o>u&&(n=o,o=u,u=n),t.precision(v)):[[r,o],[e,u]]},t.step=function(n){return arguments.length?t.majorStep(n).minorStep(n):t.minorStep()},t.majorStep=function(n){return arguments.length?(y=+n[0],m=+n[1],t):[y,m]},t.minorStep=function(n){return arguments.length?(p=+n[0],g=+n[1],t):[p,g]},t.precision=function(n){return arguments.length?(v=+n,l=me(o,u,90),h=ve(r,e,v),f=me(c,s,90),d=ve(a,i,v),t):v},t.majorExtent([[-180,-90+Cu],[180,90-Cu]]).minorExtent([[-180,-80-Cu],[180,80+Cu]])},eu.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[n||r.apply(this,arguments),e||i.apply(this,arguments)]}}var n,e,r=_e,i=be;return t.distance=function(){return eu.geo.distance(n||r.apply(this,arguments),e||i.apply(this,arguments))},t.source=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.target=function(n){return arguments.length?(i=n,e="function"==typeof n?null:n,t):i},t.precision=function(){return arguments.length?t:0},t},eu.geo.interpolate=function(t,n){return xe(t[0]*Nu,t[1]*Nu,n[0]*Nu,n[1]*Nu)},eu.geo.length=function(t){return qo=0,eu.geo.stream(t,Go),qo};var qo,Go={sphere:w,point:w,lineStart:we,lineEnd:w,polygonStart:w,polygonEnd:w},Vo=Ae(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(eu.geo.azimuthalEqualArea=function(){return ue(Vo)}).raw=Vo;var Ho=Ae(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},_);(eu.geo.azimuthalEquidistant=function(){return ue(Ho)}).raw=Ho,(eu.geo.conicConformal=function(){return qn(ke)}).raw=ke,(eu.geo.conicEquidistant=function(){return qn(Ee)}).raw=Ee;var Zo=Ae(function(t){return 1/t},Math.atan);(eu.geo.gnomonic=function(){return ue(Zo)}).raw=Zo,Me.invert=function(t,n){return[t,2*Math.atan(Math.exp(n))-Bu]},(eu.geo.mercator=function(){return Se(Me)}).raw=Me;var Xo=Ae(function(){return 1},Math.asin);(eu.geo.orthographic=function(){return ue(Xo)}).raw=Xo;var Ko=Ae(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(eu.geo.stereographic=function(){return ue(Ko)}).raw=Ko,De.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Bu]},(eu.geo.transverseMercator=function(){var t=Se(De),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90])}).raw=De,eu.geom={},eu.geom.hull=function(t){function n(t){if(t.length<3)return[];var n,i=St(e),a=St(r),u=t.length,o=[],s=[];for(n=0;u>n;n++)o.push([+i.call(this,t[n],n),+a.call(this,t[n],n),n]);for(o.sort(Oe),n=0;u>n;n++)s.push([o[n][0],-o[n][1]]);var c=Fe(o),l=Fe(s),h=l[0]===c[0],f=l[l.length-1]===c[c.length-1],d=[];for(n=c.length-1;n>=0;--n)d.push(t[o[c[n]][2]]);for(n=+h;n=r&&c.x<=a&&c.y>=i&&c.y<=u?[[r,u],[a,u],[a,i],[r,i]]:[];l.point=t[o]}),n}function e(t){return t.map(function(t,n){return{x:Math.round(a(t,n)/Cu)*Cu,y:Math.round(u(t,n)/Cu)*Cu,i:n}})}var r=Te,i=Ce,a=r,u=i,o=us;return t?n(t):(n.links=function(t){return or(e(t)).edges.filter(function(t){return t.l&&t.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},n.triangles=function(t){var n=[];return or(e(t)).cells.forEach(function(e,r){for(var i,a,u=e.site,o=e.edges.sort(qe),s=-1,c=o.length,l=o[c-1].edge,h=l.l===u?l.r:l.l;++s=c,f=r>=l,d=f<<1|h;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=fr()),h?i=c:o=c,f?u=l:s=l,a(t,n,e,r,i,u,o,s)}var l,h,f,d,p,g,y,m,v,_=St(o),b=St(s);if(null!=n)g=n,y=e,m=r,v=i;else if(m=v=-(g=y=1/0),h=[],f=[],p=t.length,u)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=+_(l=t[d],d),w=+b(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=fr();if(E.add=function(t){a(E,t,+_(t,++d),+b(t,d),g,y,m,v)},E.visit=function(t){dr(t,E,g,y,m,v)},E.find=function(t){return pr(E,t[0],t[1],g,y,m,v)},d=-1,null==n){for(;++d=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=ls.get(e)||cs,r=hs.get(r)||_,xr(r(e.apply(null,ru.call(arguments,1))))},eu.interpolateHcl=Ir,eu.interpolateHsl=Br,eu.interpolateLab=Nr,eu.interpolateRound=Pr,eu.transform=function(t){var n=au.createElementNS(eu.ns.prefix.svg,"g");return(eu.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new Rr(e?e.matrix:fs)})(t)},Rr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var fs={a:1,b:0,c:0,d:1,e:0,f:0};eu.interpolateTransform=Ur,eu.layout={},eu.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;++eo*o/y){if(p>s){var c=n.charge/s;t.px-=a*c,t.py-=u*c}return!0}if(n.point&&s&&p>s){var c=n.pointCharge/s;t.px-=a*c,t.py-=u*c}}return!n.charge}}function n(t){t.px=eu.event.x,t.py=eu.event.y,o.resume()}var e,r,i,a,u,o={},s=eu.dispatch("start","tick","end"),c=[1,1],l=.9,h=ds,f=ps,d=-30,p=gs,g=.1,y=.64,m=[],v=[];return o.tick=function(){if((r*=.99)<.005)return s.end({type:"end",alpha:r=0}),!0;var n,e,o,h,f,p,y,_,b,x=m.length,w=v.length;for(e=0;w>e;++e)o=v[e],h=o.source,f=o.target,_=f.x-h.x,b=f.y-h.y,(p=_*_+b*b)&&(p=r*a[e]*((p=Math.sqrt(p))-i[e])/p,_*=p,b*=p,f.x-=_*(y=h.weight/(f.weight+h.weight)),f.y-=b*y,h.x+=_*(y=1-y),h.y+=b*y);if((y=r*g)&&(_=c[0]/2,b=c[1]/2,e=-1,y))for(;++e0?t:0:t>0&&(s.start({type:"start",alpha:r=t}),eu.timer(o.tick)),o):r},o.start=function(){function t(t,r){if(!e){for(e=new Array(s),o=0;s>o;++o)e[o]=[];for(o=0;l>o;++o){var i=v[o];e[i.source.index].push(i.target),e[i.target.index].push(i.source)}}for(var a,u=e[n],o=-1,c=u.length;++on;++n)(r=m[n]).index=n,r.weight=0;for(n=0;l>n;++n)r=v[n],"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(n=0;s>n;++n)r=m[n],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(n=0;l>n;++n)i[n]=+h.call(this,v[n],n);else for(n=0;l>n;++n)i[n]=h;if(a=[],"function"==typeof f)for(n=0;l>n;++n)a[n]=+f.call(this,v[n],n);else for(n=0;l>n;++n)a[n]=f;if(u=[],"function"==typeof d)for(n=0;s>n;++n)u[n]=+d.call(this,m[n],n);else for(n=0;s>n;++n)u[n]=d;return o.resume()},o.resume=function(){return o.alpha(.1)},o.stop=function(){return o.alpha(0)},o.drag=function(){return e||(e=eu.behavior.drag().origin(_).on("dragstart.force",Hr).on("drag.force",n).on("dragend.force",Zr)),arguments.length?void this.on("mouseover.force",Xr).on("mouseout.force",Kr).call(e):e},eu.rebind(o,s,"on")};var ds=20,ps=1,gs=1/0;eu.layout.hierarchy=function(){function t(i){var a,u=[i],o=[];for(i.depth=0;null!=(a=u.pop());)if(o.push(a),(c=e.call(t,a,a.depth))&&(s=c.length)){for(var s,c,l;--s>=0;)u.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 ni(i,function(t){var e,i;n&&(e=t.children)&&e.sort(n),r&&(i=t.parent)&&(i.value+=t.value)}),o}var n=ii,e=ei,r=ri;return t.sort=function(e){return arguments.length?(n=e,t):n},t.children=function(n){return arguments.length?(e=n,t):e},t.value=function(n){return arguments.length?(r=n,t):r},t.revalue=function(n){return r&&(ti(n,function(t){t.children&&(t.value=0)}),ni(n,function(n){var e;n.children||(n.value=+r.call(t,n,n.depth)||0),(e=n.parent)&&(e.value+=n.value)})),n},t},eu.layout.partition=function(){function t(n,e,r,i){var a=n.children;if(n.x=e,n.y=n.depth*i,n.dx=r,n.dy=i,a&&(u=a.length)){var u,o,s,c=-1;for(r=n.value?r/n.value:0;++ch?-1:1),p=(h-s*d)/eu.sum(c),g=eu.range(s),y=[];return null!=e&&g.sort(e===ys?function(t,n){return c[n]-c[t]}:function(t,n){return e(u[t],u[n])}),g.forEach(function(t){y[t]={data:u[t],value:o=c[t],startAngle:l,endAngle:l+=o*p+d,padAngle:f}}),y}var n=Number,e=ys,r=0,i=Lu,a=0;return t.value=function(e){return arguments.length?(n=e,t):n},t.sort=function(n){return arguments.length?(e=n,t):e},t.startAngle=function(n){return arguments.length?(r=n,t):r},t.endAngle=function(n){return arguments.length?(i=n,t):i},t.padAngle=function(n){return arguments.length?(a=n,t):a},t};var ys={};eu.layout.stack=function(){function t(o,s){if(!(f=o.length))return o;var c=o.map(function(e,r){return n.call(t,e,r)}),l=c.map(function(n){return n.map(function(n,e){return[a.call(t,n,e),u.call(t,n,e)]})}),h=e.call(t,l,s);c=eu.permute(c,h),l=eu.permute(l,h);var f,d,p,g,y=r.call(t,l,s),m=c[0].length;for(p=0;m>p;++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 o}var n=_,e=ci,r=li,i=si,a=ui,u=oi;return t.values=function(e){return arguments.length?(n=e,t):n},t.order=function(n){return arguments.length?(e="function"==typeof n?n:ms.get(n)||ci,t):e},t.offset=function(n){return arguments.length?(r="function"==typeof n?n:vs.get(n)||li,t):r},t.x=function(n){return arguments.length?(a=n,t):a},t.y=function(n){return arguments.length?(u=n,t):u},t.out=function(n){return arguments.length?(i=n,t):i},t};var ms=eu.map({"inside-out":function(t){var n,e,r=t.length,i=t.map(hi),a=t.map(fi),u=eu.range(r).sort(function(t,n){return i[t]-i[n]}),o=0,s=0,c=[],l=[];for(n=0;r>n;++n)e=u[n],s>o?(o+=a[e],c.push(e)):(s+=a[e],l.push(e));return l.reverse().concat(c)},reverse:function(t){return eu.range(t.length).reverse()},"default":ci}),vs=eu.map({silhouette:function(t){var n,e,r,i=t.length,a=t[0].length,u=[],o=0,s=[];for(e=0;a>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];r>o&&(o=r),u.push(r)}for(e=0;a>e;++e)s[e]=(o-u[e])/2;return s},wiggle:function(t){var n,e,r,i,a,u,o,s,c,l=t.length,h=t[0],f=h.length,d=[];for(d[0]=s=c=0,e=1;f>e;++e){for(n=0,i=0;l>n;++n)i+=t[n][e][1];for(n=0,a=0,o=h[e][0]-h[e-1][0];l>n;++n){for(r=0,u=(t[n][e][1]-t[n][e-1][1])/(2*o);n>r;++r)u+=(t[r][e][1]-t[r][e-1][1])/o;a+=u*t[n][e][1]}d[e]=s-=i?a/i*o:0,c>s&&(c=s)}for(e=0;f>e;++e)d[e]-=c;return d},expand:function(t){var n,e,r,i=t.length,a=t[0].length,u=1/i,o=[];for(e=0;a>e;++e){for(n=0,r=0;i>n;n++)r+=t[n][e][1];if(r)for(n=0;i>n;n++)t[n][e][1]/=r;else for(n=0;i>n;n++)t[n][e][1]=u}for(e=0;a>e;++e)o[e]=0;return o},zero:li});eu.layout.histogram=function(){function t(t,a){for(var u,o,s=[],c=t.map(e,this),l=r.call(this,c,a),h=i.call(this,l,c,a),a=-1,f=c.length,d=h.length-1,p=n?1:1/f;++a0)for(a=-1;++a=l[0]&&o<=l[1]&&(u=s[eu.bisect(h,o,1,d)-1],u.y+=p,u.push(t[a]));return s}var n=!0,e=Number,r=yi,i=pi;return t.value=function(n){return arguments.length?(e=n,t):e},t.range=function(n){return arguments.length?(r=St(n),t):r},t.bins=function(n){return arguments.length?(i="number"==typeof n?function(t){return gi(t,n)}:St(n),t):i},t.frequency=function(e){return arguments.length?(n=!!e,t):n},t},eu.layout.pack=function(){function t(t,a){var u=e.call(this,t,a),o=u[0],s=i[0],c=i[1],l=null==n?Math.sqrt:"function"==typeof n?n:function(){return n};if(o.x=o.y=0,ni(o,function(t){t.r=+l(t.value)}),ni(o,xi),r){var h=r*(n?1:Math.max(2*o.r/s,2*o.r/c))/2;ni(o,function(t){t.r+=h}),ni(o,xi),ni(o,function(t){t.r-=h})}return ki(o,s/2,c/2,n?1:1/Math.max(2*o.r/s,2*o.r/c)),u}var n,e=eu.layout.hierarchy().sort(mi),r=0,i=[1,1];return t.size=function(n){return arguments.length?(i=n,t):i},t.radius=function(e){return arguments.length?(n=null==e||"function"==typeof e?e:+e,t):n},t.padding=function(n){return arguments.length?(r=+n,t):r},Qr(t,e)},eu.layout.tree=function(){function t(t,i){var l=u.call(this,t,i),h=l[0],f=n(h);if(ni(f,e),f.parent.m=-f.z,ti(f,r),c)ti(h,a);else{var d=h,p=h,g=h;ti(h,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var y=o(d,p)/2-d.x,m=s[0]/(p.x+o(p,d)/2+y),v=s[1]/(g.depth||1);ti(h,function(t){t.x=(t.x+y)*m,t.y=t.depth*v})}return l}function n(t){for(var n,e={A:null,children:[t]},r=[e];null!=(n=r.pop());)for(var i,a=n.children,u=0,o=a.length;o>u;++u)r.push((a[u]=i={_:a[u],parent:n,children:(i=a[u].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:u}).a=i);return e.children[0]}function e(t){var n=t.children,e=t.parent.children,r=t.i?e[t.i-1]:null;if(n.length){Ci(t);var a=(n[0].z+n[n.length-1].z)/2;r?(t.z=r.z+o(t._,r._),t.m=t.z-a):t.z=a}else r&&(t.z=r.z+o(t._,r._));t.parent.A=i(t,r,t.parent.A||e[0])}function r(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function i(t,n,e){if(n){for(var r,i=t,a=t,u=n,s=i.parent.children[0],c=i.m,l=a.m,h=u.m,f=s.m;u=Di(u),i=Si(i),u&&i;)s=Si(s),a=Di(a),a.a=t,r=u.z+h-i.z-c+o(u._,i._),r>0&&(Ti(Fi(u,t,e),t,r),c+=r,l+=r),h+=u.m,c+=i.m,f+=s.m,l+=a.m;u&&!Di(a)&&(a.t=u,a.m+=h-l),i&&!Si(s)&&(s.t=i,s.m+=c-f,e=t)}return e}function a(t){t.x*=s[0],t.y=t.depth*s[1]}var u=eu.layout.hierarchy().sort(null).value(null),o=Mi,s=[1,1],c=null;return t.separation=function(n){return arguments.length?(o=n,t):o},t.size=function(n){return arguments.length?(c=null==(s=n)?a:null,t):c?null:s},t.nodeSize=function(n){return arguments.length?(c=null==(s=n)?null:a,t):c?s:null},Qr(t,u)},eu.layout.cluster=function(){function t(t,a){var u,o=n.call(this,t,a),s=o[0],c=0;ni(s,function(t){var n=t.children;n&&n.length?(t.x=Li(n),t.y=Oi(n)):(t.x=u?c+=e(t,u):0,t.y=0,u=t)});var l=Ii(s),h=Bi(s),f=l.x-e(l,h)/2,d=h.x+e(h,l)/2;return ni(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]}),o}var n=eu.layout.hierarchy().sort(null).value(null),e=Mi,r=[1,1],i=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(i=null==(r=n),t):i?null:r},t.nodeSize=function(n){return arguments.length?(i=null!=(r=n),t):i?r:null},Qr(t,n)},eu.layout.treemap=function(){function t(t,n){for(var e,r,i=-1,a=t.length;++in?0:n),e.area=isNaN(r)||0>=r?0:r}function n(e){var a=e.children;if(a&&a.length){var u,o,s,c=h(e),l=[],f=a.slice(),p=1/0,g="slice"===d?c.dx:"dice"===d?c.dy:"slice-dice"===d?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(t(f,c.dx*c.dy/e.value),l.area=0;(s=f.length)>0;)l.push(u=f[s-1]),l.area+=u.area,"squarify"!==d||(o=r(l,g))<=p?(f.pop(),p=o):(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(n)}}function e(n){var r=n.children;if(r&&r.length){ var a,u=h(n),o=r.slice(),s=[];for(t(o,u.dx*u.dy/n.value),s.area=0;a=o.pop();)s.push(a),s.area+=a.area,null!=a.z&&(i(s,a.z?u.dx:u.dy,u,!o.length),s.length=s.area=0);r.forEach(e)}}function r(t,n){for(var e,r=t.area,i=0,a=1/0,u=-1,o=t.length;++ue&&(a=e),e>i&&(i=e));return r*=r,n*=n,r?Math.max(n*i*p/r,r/(n*a*p)):1/0}function i(t,n,e,r){var i,a=-1,u=t.length,o=e.x,c=e.y,l=n?s(t.area/n):0;if(n==e.dx){for((r||l>e.dy)&&(l=e.dy);++ae.dx)&&(l=e.dx);++ae&&(n=1),1>e&&(t=0),function(){var e,r,i;do e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r;while(!i||i>1);return t+n*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=eu.random.normal.apply(eu,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=eu.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;t>e;e++)n+=Math.random();return n}}},eu.scale={};var _s={floor:_,ceil:_};eu.scale.linear=function(){return Wi([0,1],[0,1],_r,!1)};var bs={s:1,g:1,p:1,r:1,e:1};eu.scale.log=function(){return Ji(eu.scale.linear().domain([0,1]),10,!0,[1,10])};var xs=eu.format(".0e"),ws={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};eu.scale.pow=function(){return Qi(eu.scale.linear(),1,[0,1])},eu.scale.sqrt=function(){return eu.scale.pow().exponent(.5)},eu.scale.ordinal=function(){return na([],{t:"range",a:[[]]})},eu.scale.category10=function(){return eu.scale.ordinal().range(As)},eu.scale.category20=function(){return eu.scale.ordinal().range(ks)},eu.scale.category20b=function(){return eu.scale.ordinal().range(Es)},eu.scale.category20c=function(){return eu.scale.ordinal().range(Ms)};var As=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(bt),ks=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(bt),Es=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(bt),Ms=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(bt);eu.scale.quantile=function(){return ea([],[])},eu.scale.quantize=function(){return ra(0,1,[0,1])},eu.scale.threshold=function(){return ia([.5],[0,1])},eu.scale.identity=function(){return aa([0,1])},eu.svg={},eu.svg.arc=function(){function t(){var t=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),l=u.apply(this,arguments)-Bu,h=o.apply(this,arguments)-Bu,f=Math.abs(h-l),d=l>h?0:1;if(t>c&&(p=c,c=t,t=p),f>=Iu)return n(c,d)+(t?n(t,1-d):"")+"Z";var p,g,y,m,v,_,b,x,w,A,k,E,M=0,S=0,D=[];if((m=(+s.apply(this,arguments)||0)/2)&&(y=a===Ss?Math.sqrt(t*t+c*c):+a.apply(this,arguments),d||(S*=-1),c&&(S=et(y/c*Math.sin(m))),t&&(M=et(y/t*Math.sin(m)))),c){v=c*Math.cos(l+S),_=c*Math.sin(l+S),b=c*Math.cos(h-S),x=c*Math.sin(h-S);var T=Math.abs(h-l-2*S)<=Ou?0:1;if(S&&fa(v,_,b,x)===d^T){var C=(l+h)/2;v=c*Math.cos(C),_=c*Math.sin(C),b=x=null}}else v=_=0;if(t){w=t*Math.cos(h-M),A=t*Math.sin(h-M),k=t*Math.cos(l+M),E=t*Math.sin(l+M);var F=Math.abs(l-h+2*M)<=Ou?0:1;if(M&&fa(w,A,k,E)===1-d^F){var O=(l+h)/2;w=t*Math.cos(O),A=t*Math.sin(O),k=E=null}}else w=A=0;if((p=Math.min(Math.abs(c-t)/2,+i.apply(this,arguments)))>.001){g=c>t^d?0:1;var L=null==k?[w,A]:null==b?[v,_]:Ie([v,_],[k,E],[b,x],[w,A]),I=v-L[0],B=_-L[1],N=b-L[0],P=x-L[1],R=1/Math.sin(Math.acos((I*N+B*P)/(Math.sqrt(I*I+B*B)*Math.sqrt(N*N+P*P)))/2),j=Math.sqrt(L[0]*L[0]+L[1]*L[1]);if(null!=b){var Y=Math.min(p,(c-j)/(R+1)),$=da(null==k?[w,A]:[k,E],[v,_],c,Y,d),U=da([b,x],[w,A],c,Y,d);p===Y?D.push("M",$[0],"A",Y,",",Y," 0 0,",g," ",$[1],"A",c,",",c," 0 ",1-d^fa($[1][0],$[1][1],U[1][0],U[1][1]),",",d," ",U[1],"A",Y,",",Y," 0 0,",g," ",U[0]):D.push("M",$[0],"A",Y,",",Y," 0 1,",g," ",U[0])}else D.push("M",v,",",_);if(null!=k){var z=Math.min(p,(t-j)/(R-1)),W=da([v,_],[k,E],t,-z,d),q=da([w,A],null==b?[v,_]:[b,x],t,-z,d);p===z?D.push("L",q[0],"A",z,",",z," 0 0,",g," ",q[1],"A",t,",",t," 0 ",d^fa(q[1][0],q[1][1],W[1][0],W[1][1]),",",1-d," ",W[1],"A",z,",",z," 0 0,",g," ",W[0]):D.push("L",q[0],"A",z,",",z," 0 0,",g," ",W[0])}else D.push("L",w,",",A)}else D.push("M",v,",",_),null!=b&&D.push("A",c,",",c," 0 ",T,",",d," ",b,",",x),D.push("L",w,",",A),null!=k&&D.push("A",t,",",t," 0 ",F,",",1-d," ",k,",",E);return D.push("Z"),D.join("")}function n(t,n){return"M0,"+t+"A"+t+","+t+" 0 1,"+n+" 0,"+-t+"A"+t+","+t+" 0 1,"+n+" 0,"+t}var e=oa,r=sa,i=ua,a=Ss,u=ca,o=la,s=ha;return t.innerRadius=function(n){return arguments.length?(e=St(n),t):e},t.outerRadius=function(n){return arguments.length?(r=St(n),t):r},t.cornerRadius=function(n){return arguments.length?(i=St(n),t):i},t.padRadius=function(n){return arguments.length?(a=n==Ss?Ss:St(n),t):a},t.startAngle=function(n){return arguments.length?(u=St(n),t):u},t.endAngle=function(n){return arguments.length?(o=St(n),t):o},t.padAngle=function(n){return arguments.length?(s=St(n),t):s},t.centroid=function(){var t=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,n=(+u.apply(this,arguments)+ +o.apply(this,arguments))/2-Bu;return[Math.cos(n)*t,Math.sin(n)*t]},t};var Ss="auto";eu.svg.line=function(){return pa(_)};var Ds=eu.map({linear:ga,"linear-closed":ya,step:ma,"step-before":va,"step-after":_a,basis:Ea,"basis-open":Ma,"basis-closed":Sa,bundle:Da,cardinal:wa,"cardinal-open":ba,"cardinal-closed":xa,monotone:Ia});Ds.forEach(function(t,n){n.key=t,n.closed=/-closed$/.test(t)});var Ts=[0,2/3,1/3,0],Cs=[0,1/3,2/3,0],Fs=[0,1/6,2/3,1/6];eu.svg.line.radial=function(){var t=pa(Ba);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},va.reverse=_a,_a.reverse=va,eu.svg.area=function(){return Na(_)},eu.svg.area.radial=function(){var t=Na(Ba);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},eu.svg.chord=function(){function t(t,o){var s=n(this,a,t,o),c=n(this,u,t,o);return"M"+s.p0+r(s.r,s.p1,s.a1-s.a0)+(e(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 n(t,n,e,r){var i=n.call(t,e,r),a=o.call(t,i,r),u=s.call(t,i,r)-Bu,l=c.call(t,i,r)-Bu;return{r:a,a0:u,a1:l,p0:[a*Math.cos(u),a*Math.sin(u)],p1:[a*Math.cos(l),a*Math.sin(l)]}}function e(t,n){return t.a0==n.a0&&t.a1==n.a1}function r(t,n,e){return"A"+t+","+t+" 0 "+ +(e>Ou)+",1 "+n}function i(t,n,e,r){return"Q 0,0 "+r}var a=_e,u=be,o=Pa,s=ca,c=la;return t.radius=function(n){return arguments.length?(o=St(n),t):o},t.source=function(n){return arguments.length?(a=St(n),t):a},t.target=function(n){return arguments.length?(u=St(n),t):u},t.startAngle=function(n){return arguments.length?(s=St(n),t):s},t.endAngle=function(n){return arguments.length?(c=St(n),t):c},t},eu.svg.diagonal=function(){function t(t,i){var a=n.call(this,t,i),u=e.call(this,t,i),o=(a.y+u.y)/2,s=[a,{x:a.x,y:o},{x:u.x,y:o},u];return s=s.map(r),"M"+s[0]+"C"+s[1]+" "+s[2]+" "+s[3]}var n=_e,e=be,r=Ra;return t.source=function(e){return arguments.length?(n=St(e),t):n},t.target=function(n){return arguments.length?(e=St(n),t):e},t.projection=function(n){return arguments.length?(r=n,t):r},t},eu.svg.diagonal.radial=function(){var t=eu.svg.diagonal(),n=Ra,e=t.projection;return t.projection=function(t){return arguments.length?e(ja(n=t)):n},t},eu.svg.symbol=function(){function t(t,r){return(Os.get(n.call(this,t,r))||Ua)(e.call(this,t,r))}var n=$a,e=Ya;return t.type=function(e){return arguments.length?(n=St(e),t):n},t.size=function(n){return arguments.length?(e=St(n),t):e},t};var Os=eu.map({circle:Ua,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Is)),e=n*Is;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/Ls),e=n*Ls/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/Ls),e=n*Ls/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});eu.svg.symbolTypes=Os.keys();var Ls=Math.sqrt(3),Is=Math.tan(30*Nu);Au.transition=function(t){for(var n,e,r=Bs||++js,i=Va(t),a=[],u=Ns||{time:Date.now(),ease:Mr,delay:0,duration:250},o=-1,s=this.length;++oa;a++){i.push(n=[]);for(var e=this[a],o=0,s=e.length;s>o;o++)(r=e[o])&&t.call(r,r.__data__,o,a)&&n.push(r)}return Wa(i,this.namespace,this.id)},Rs.tween=function(t,n){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(t):W(this,null==n?function(n){n[r][e].tween.remove(t)}:function(i){i[r][e].tween.set(t,n)})},Rs.attr=function(t,n){function e(){this.removeAttribute(o)}function r(){this.removeAttributeNS(o.space,o.local)}function i(t){return null==t?e:(t+="",function(){var n,e=this.getAttribute(o);return e!==t&&(n=u(e,t),function(t){this.setAttribute(o,n(t))})})}function a(t){return null==t?r:(t+="",function(){var n,e=this.getAttributeNS(o.space,o.local);return e!==t&&(n=u(e,t),function(t){this.setAttributeNS(o.space,o.local,n(t))})})}if(arguments.length<2){for(n in t)this.attr(n,t[n]);return this}var u="transform"==t?Ur:_r,o=eu.ns.qualify(t);return qa(this,"attr."+t,n,o.local?a:i)},Rs.attrTween=function(t,n){function e(t,e){var r=n.call(this,t,e,this.getAttribute(i));return r&&function(t){this.setAttribute(i,r(t))}}function r(t,e){var r=n.call(this,t,e,this.getAttributeNS(i.space,i.local));return r&&function(t){this.setAttributeNS(i.space,i.local,r(t))}}var i=eu.ns.qualify(t);return this.tween("attr."+t,i.local?r:e)},Rs.style=function(t,n,r){function i(){this.style.removeProperty(t)}function a(n){return null==n?i:(n+="",function(){var i,a=e(this).getComputedStyle(this,null).getPropertyValue(t);return a!==n&&(i=_r(a,n),function(n){this.style.setProperty(t,i(n),r)})})}var u=arguments.length;if(3>u){if("string"!=typeof t){2>u&&(n="");for(r in t)this.style(r,t[r],n);return this}r=""}return qa(this,"style."+t,n,a)},Rs.styleTween=function(t,n,r){function i(i,a){var u=n.call(this,i,a,e(this).getComputedStyle(this,null).getPropertyValue(t));return u&&function(n){this.style.setProperty(t,u(n),r)}}return arguments.length<3&&(r=""),this.tween("style."+t,i)},Rs.text=function(t){return qa(this,"text",t,Ga)},Rs.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var n;this[t].count<2&&(n=this.parentNode)&&n.removeChild(this)})},Rs.ease=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].ease:("function"!=typeof t&&(t=eu.ease.apply(eu,arguments)),W(this,function(r){r[e][n].ease=t}))},Rs.delay=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].delay:W(this,"function"==typeof t?function(r,i,a){r[e][n].delay=+t.call(r,r.__data__,i,a)}:(t=+t,function(r){r[e][n].delay=t}))},Rs.duration=function(t){var n=this.id,e=this.namespace;return arguments.length<1?this.node()[e][n].duration:W(this,"function"==typeof t?function(r,i,a){r[e][n].duration=Math.max(1,t.call(r,r.__data__,i,a))}:(t=Math.max(1,t),function(r){r[e][n].duration=t}))},Rs.each=function(t,n){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ns,a=Bs;try{Bs=e,W(this,function(n,i,a){Ns=n[r][e],t.call(n,n.__data__,i,a)})}finally{Ns=i,Bs=a}}else W(this,function(i){var a=i[r][e];(a.event||(a.event=eu.dispatch("start","end","interrupt"))).on(t,n)});return this},Rs.transition=function(){for(var t,n,e,r,i=this.id,a=++js,u=this.namespace,o=[],s=0,c=this.length;c>s;s++){o.push(t=[]);for(var n=this[s],l=0,h=n.length;h>l;l++)(e=n[l])&&(r=e[u][i],Ha(e,l,u,a,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),t.push(e)}return Wa(o,u,a)},eu.svg.axis=function(){function t(t){t.each(function(){var t,c=eu.select(this),l=this.__chart__||e,h=this.__chart__=e.copy(),f=null==s?h.ticks?h.ticks.apply(h,o):h.domain():s,d=null==n?h.tickFormat?h.tickFormat.apply(h,o):_:n,p=c.selectAll(".tick").data(f,h),g=p.enter().insert("g",".domain").attr("class","tick").style("opacity",Cu),y=eu.transition(p.exit()).style("opacity",Cu).remove(),m=eu.transition(p.order()).style("opacity",1),v=Math.max(i,0)+u,b=ji(h),x=c.selectAll(".domain").data([0]),w=(x.enter().append("path").attr("class","domain"),eu.transition(x));g.append("line"),g.append("text");var A,k,E,M,S=g.select("line"),D=m.select("line"),T=p.select("text").text(d),C=g.select("text"),F=m.select("text"),O="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(t=Za,A="x",E="y",k="x2",M="y2",T.attr("dy",0>O?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+b[0]+","+O*a+"V0H"+b[1]+"V"+O*a)):(t=Xa,A="y",E="x",k="y2",M="x2",T.attr("dy",".32em").style("text-anchor",0>O?"end":"start"),w.attr("d","M"+O*a+","+b[0]+"H0V"+b[1]+"H"+O*a)),S.attr(M,O*i),C.attr(E,O*v),D.attr(k,0).attr(M,O*i),F.attr(A,0).attr(E,O*v),h.rangeBand){var L=h,I=L.rangeBand()/2;l=h=function(t){return L(t)+I}}else l.rangeBand?l=h:y.call(t,h,l);g.call(t,l,h),m.call(t,h,h)})}var n,e=eu.scale.linear(),r=Ys,i=6,a=6,u=3,o=[10],s=null;return t.scale=function(n){return arguments.length?(e=n,t):e},t.orient=function(n){return arguments.length?(r=n in $s?n+"":Ys,t):r},t.ticks=function(){return arguments.length?(o=arguments,t):o},t.tickValues=function(n){return arguments.length?(s=n,t):s},t.tickFormat=function(e){return arguments.length?(n=e,t):n},t.tickSize=function(n){var e=arguments.length;return e?(i=+n,a=+arguments[e-1],t):i},t.innerTickSize=function(n){return arguments.length?(i=+n,t):i},t.outerTickSize=function(n){return arguments.length?(a=+n,t):a},t.tickPadding=function(n){return arguments.length?(u=+n,t):u},t.tickSubdivide=function(){return arguments.length&&t},t};var Ys="bottom",$s={top:1,right:1,bottom:1,left:1};eu.svg.brush=function(){function t(e){e.each(function(){var e=eu.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",a).on("touchstart.brush",a),u=e.selectAll(".background").data([0]);u.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var o=e.selectAll(".resize").data(g,_);o.exit().remove(),o.enter().append("g").attr("class",function(t){return"resize "+t}).style("cursor",function(t){return Us[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"),o.style("display",t.empty()?"none":null);var s,h=eu.transition(e),f=eu.transition(u);c&&(s=ji(c),f.attr("x",s[0]).attr("width",s[1]-s[0]),r(h)),l&&(s=ji(l),f.attr("y",s[0]).attr("height",s[1]-s[0]),i(h)),n(h)})}function n(t){t.selectAll(".resize").attr("transform",function(t){return"translate("+h[+/e$/.test(t)]+","+f[+/^s/.test(t)]+")"})}function r(t){t.select(".extent").attr("x",h[0]),t.selectAll(".extent,.n>rect,.s>rect").attr("width",h[1]-h[0])}function i(t){t.select(".extent").attr("y",f[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",f[1]-f[0])}function a(){function a(){32==eu.event.keyCode&&(T||(_=null,F[0]-=h[1],F[1]-=f[1],T=2),E())}function g(){32==eu.event.keyCode&&2==T&&(F[0]+=h[1],F[1]+=f[1],T=0,E())}function y(){var t=eu.mouse(x),e=!1;b&&(t[0]+=b[0],t[1]+=b[1]),T||(eu.event.altKey?(_||(_=[(h[0]+h[1])/2,(f[0]+f[1])/2]),F[0]=h[+(t[0]<_[0])],F[1]=f[+(t[1]<_[1])]):_=null),S&&m(t,c,0)&&(r(k),e=!0),D&&m(t,l,1)&&(i(k),e=!0),e&&(n(k),A({type:"brush",mode:T?"move":"resize"}))}function m(t,n,e){var r,i,a=ji(n),s=a[0],c=a[1],l=F[e],g=e?f:h,y=g[1]-g[0];return T&&(s-=l,c-=y+l),r=(e?p:d)?Math.max(s,Math.min(c,t[e])):t[e],T?i=(r+=l)+y:(_&&(l=Math.max(s,Math.min(c,2*_[e]-r))),r>l?(i=r,r=l):i=l),g[0]!=r||g[1]!=i?(e?o=null:u=null,g[0]=r,g[1]=i,!0):void 0}function v(){y(),k.style("pointer-events","all").selectAll(".resize").style("display",t.empty()?"none":null),eu.select("body").style("cursor",null),O.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 _,b,x=this,w=eu.select(eu.event.target),A=s.of(x,arguments),k=eu.select(x),M=w.datum(),S=!/^(n|s)$/.test(M)&&c,D=!/^(e|w)$/.test(M)&&l,T=w.classed("extent"),C=X(x),F=eu.mouse(x),O=eu.select(e(x)).on("keydown.brush",a).on("keyup.brush",g);if(eu.event.changedTouches?O.on("touchmove.brush",y).on("touchend.brush",v):O.on("mousemove.brush",y).on("mouseup.brush",v),k.interrupt().selectAll("*").interrupt(),T)F[0]=h[0]-F[0],F[1]=f[0]-F[1];else if(M){var L=+/w$/.test(M),I=+/^n/.test(M);b=[h[1-L]-F[0],f[1-I]-F[1]],F[0]=h[L],F[1]=f[I]}else eu.event.altKey&&(_=F.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),eu.select("body").style("cursor",w.style("cursor")),A({type:"brushstart"}),y()}var u,o,s=S(t,"brushstart","brush","brushend"),c=null,l=null,h=[0,0],f=[0,0],d=!0,p=!0,g=zs[0];return t.event=function(t){t.each(function(){var t=s.of(this,arguments),n={x:h,y:f,i:u,j:o},e=this.__chart__||n;this.__chart__=n,Bs?eu.select(this).transition().each("start.brush",function(){u=e.i,o=e.j,h=e.x,f=e.y,t({type:"brushstart"})}).tween("brush:brush",function(){var e=br(h,n.x),r=br(f,n.y);return u=o=null,function(i){h=n.x=e(i),f=n.y=r(i),t({type:"brush",mode:"resize"})}}).each("end.brush",function(){u=n.i,o=n.j,t({type:"brush",mode:"resize"}),t({type:"brushend"})}):(t({type:"brushstart"}),t({type:"brush",mode:"resize"}),t({type:"brushend"}))})},t.x=function(n){return arguments.length?(c=n,g=zs[!c<<1|!l],t):c},t.y=function(n){return arguments.length?(l=n,g=zs[!c<<1|!l],t):l},t.clamp=function(n){return arguments.length?(c&&l?(d=!!n[0],p=!!n[1]):c?d=!!n:l&&(p=!!n),t):c&&l?[d,p]:c?d:l?p:null},t.extent=function(n){var e,r,i,a,s;return arguments.length?(c&&(e=n[0],r=n[1],l&&(e=e[0],r=r[0]),u=[e,r],c.invert&&(e=c(e),r=c(r)),e>r&&(s=e,e=r,r=s),(e!=h[0]||r!=h[1])&&(h=[e,r])),l&&(i=n[0],a=n[1],c&&(i=i[1],a=a[1]),o=[i,a],l.invert&&(i=l(i),a=l(a)),i>a&&(s=i,i=a,a=s),(i!=f[0]||a!=f[1])&&(f=[i,a])),t):(c&&(u?(e=u[0],r=u[1]):(e=h[0],r=h[1],c.invert&&(e=c.invert(e),r=c.invert(r)),e>r&&(s=e,e=r,r=s))),l&&(o?(i=o[0],a=o[1]):(i=f[0],a=f[1],l.invert&&(i=l.invert(i),a=l.invert(a)),i>a&&(s=i,i=a,a=s))),c&&l?[[e,i],[r,a]]:c?[e,r]:l&&[i,a])},t.clear=function(){return t.empty()||(h=[0,0],f=[0,0],u=o=null),t},t.empty=function(){return!!c&&h[0]==h[1]||!!l&&f[0]==f[1]},eu.rebind(t,s,"on")};var Us={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},zs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Ws=so.format=go.timeFormat,qs=Ws.utc,Gs=qs("%Y-%m-%dT%H:%M:%S.%LZ");Ws.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?Ka:Gs,Ka.parse=function(t){var n=new Date(t);return isNaN(n)?null:n},Ka.toString=Gs.toString,so.second=Yt(function(t){return new co(1e3*Math.floor(t/1e3))},function(t,n){t.setTime(t.getTime()+1e3*Math.floor(n))},function(t){return t.getSeconds()}),so.seconds=so.second.range,so.seconds.utc=so.second.utc.range,so.minute=Yt(function(t){return new co(6e4*Math.floor(t/6e4))},function(t,n){t.setTime(t.getTime()+6e4*Math.floor(n))},function(t){return t.getMinutes()}),so.minutes=so.minute.range,so.minutes.utc=so.minute.utc.range,so.hour=Yt(function(t){var n=t.getTimezoneOffset()/60;return new co(36e5*(Math.floor(t/36e5-n)+n))},function(t,n){t.setTime(t.getTime()+36e5*Math.floor(n))},function(t){return t.getHours()}),so.hours=so.hour.range,so.hours.utc=so.hour.utc.range,so.month=Yt(function(t){return t=so.day(t),t.setDate(1),t},function(t,n){t.setMonth(t.getMonth()+n)},function(t){return t.getMonth()}),so.months=so.month.range,so.months.utc=so.month.utc.range;var Vs=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Hs=[[so.second,1],[so.second,5],[so.second,15],[so.second,30],[so.minute,1],[so.minute,5],[so.minute,15],[so.minute,30],[so.hour,1],[so.hour,3],[so.hour,6],[so.hour,12],[so.day,1],[so.day,2],[so.week,1],[so.month,1],[so.month,3],[so.year,1]],Zs=Ws.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]]),Xs={range:function(t,n,e){return eu.range(Math.ceil(t/e)*e,+n,e).map(Qa)},floor:_,ceil:_};Hs.year=so.year,so.scale=function(){return Ja(eu.scale.linear(),Hs,Zs)};var Ks=Hs.map(function(t){return[t[0].utc,t[1]]}),Js=qs.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]]);Ks.year=so.year.utc,so.scale.utc=function(){return Ja(eu.scale.linear(),Ks,Js)},eu.text=Dt(function(t){return t.responseText}),eu.json=function(t,n){return Tt(t,"application/json",tu,n)},eu.html=function(t,n){return Tt(t,"text/html",nu,n)},eu.xml=Dt(function(t){return t.responseXML}),"function"==typeof define&&define.amd?define(eu):"object"==typeof n&&n.exports&&(n.exports=eu),this.d3=eu}()},{}],3:[function(t,n){n.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":10,"./lib/graphlib":11,"./lib/intersect":12,"./lib/render":27,"./lib/util":29,"./lib/version":30}],4:[function(t,n){function e(t,n,e,r){var i=t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=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(u,e[r+"Style"])}function r(t,n,e,r){var i=t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=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(u,e[r+"Style"])}function i(t,n,e,r){var i=t.append("marker").attr("id",n).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=i.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");a.applyStyle(u,e[r+"Style"])}var a=t("./util");n.exports={"default":e,normal:e,vee:r,undirected:i}},{"./util":29}],5:[function(t,n){function e(t,n){var e=n.nodes().filter(function(t){return r.isSubgraph(n,t)}),a=t.selectAll("g.cluster").data(e,function(t){return t});return a.selectAll("*").remove(),a.enter().append("g").attr("class","cluster").attr("id",function(t){var e=n.node(t);return e.id}).style("opacity",0),r.applyTransition(a,n).style("opacity",1),a.each(function(t){var e=n.node(t),r=d3.select(this);d3.select(this).append("rect");var a=r.append("g").attr("class","label");i(a,e,e.clusterLabelPos)}),a.selectAll("rect").each(function(t){var e=n.node(t),i=d3.select(this);r.applyStyle(i,e.style)}),r.applyTransition(a.exit(),n).style("opacity",0).remove(),a}var r=t("./util"),i=t("./label/add-label");n.exports=e},{"./label/add-label":20,"./util":29}],6:[function(t,n){"use strict";function e(t,n){var e=t.selectAll("g.edgeLabel").data(n.edges(),function(t){return a.edgeToId(t)}).classed("update",!0);return e.selectAll("*").remove(),e.enter().append("g").classed("edgeLabel",!0).style("opacity",0),e.each(function(t){var e=n.edge(t),a=i(u.select(this),n.edge(t),0,0).classed("label",!0),o=a.node().getBBox();e.labelId&&a.attr("id",e.labelId),r.has(e,"width")||(e.width=o.width),r.has(e,"height")||(e.height=o.height)}),a.applyTransition(e.exit(),n).style("opacity",0).remove(),e}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),u=t("./d3");n.exports=e},{"./d3":9,"./label/add-label":20,"./lodash":23,"./util":29}],7:[function(t,n){"use strict";function e(t,n,e){var i=t.selectAll("g.edgePath").data(n.edges(),function(t){return l.edgeToId(t)}).classed("update",!0);return u(i,n),o(i,n),l.applyTransition(i,n).style("opacity",1),i.each(function(t){var e=h.select(this),r=n.edge(t);r.elem=this,r.id&&e.attr("id",r.id),l.applyClass(e,r["class"],(e.classed("update")?"update ":"")+"edgePath")}),i.selectAll("path.path").each(function(t){var e=n.edge(t);e.arrowheadId=s.uniqueId("arrowhead");var i=h.select(this).attr("marker-end",function(){return"url(#"+e.arrowheadId+")"}).style("fill","none");l.applyTransition(i,n).attr("d",function(t){return r(n,t)}),l.applyStyle(i,e.style)}),i.selectAll("defs *").remove(),i.selectAll("defs").each(function(t){var r=n.edge(t),i=e[r.arrowhead];i(h.select(this),r.arrowheadId,r,"arrowhead")}),i}function r(t,n){var e=t.edge(n),r=t.node(n.v),a=t.node(n.w),u=e.points.slice(1,e.points.length-1);return u.unshift(c(r,u[0])),u.push(c(a,u[u.length-1])),i(e,u)}function i(t,n){var e=h.svg.line().x(function(t){return t.x}).y(function(t){return t.y});return s.has(t,"lineInterpolate")&&e.interpolate(t.lineInterpolate),s.has(t,"lineTension")&&e.tension(Number(t.lineTension)),e(n)}function a(t){var n=t.getBBox(),e=t.getTransformToElement(t.ownerSVGElement).translate(n.width/2,n.height/2);return{x:e.e,y:e.f}}function u(t,n){var e=t.enter().append("g").attr("class","edgePath").style("opacity",0);e.append("path").attr("class","path").attr("d",function(t){var e=n.edge(t),r=n.node(t.v).elem,u=s.range(e.points.length).map(function(){return a(r)});return i(e,u)}),e.append("defs")}function o(t,n){var e=t.exit();l.applyTransition(e,n).style("opacity",0).remove(),l.applyTransition(e.select("path.path"),n).attr("d",function(t){var e=n.node(t.v);if(e){var r=s.range(this.pathSegList.length).map(function(){return e});return i({},r)}return h.select(this).attr("d")})}var s=t("./lodash"),c=t("./intersect/intersect-node"),l=t("./util"),h=t("./d3");n.exports=e},{"./d3":9,"./intersect/intersect-node":16,"./lodash":23,"./util":29}],8:[function(t,n){"use strict";function e(t,n,e){var o=n.nodes().filter(function(t){return!a.isSubgraph(n,t)}),s=t.selectAll("g.node").data(o,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 o=n.node(t),s=u.select(this),c=s.append("g").attr("class","label"),l=i(c,o),h=e[o.shape],f=r.pick(l.node().getBBox(),"width","height");o.elem=this,o.id&&s.attr("id",o.id),o.labelId&&c.attr("id",o.labelId),a.applyClass(s,o["class"],(s.classed("update")?"update ":"")+"node"),r.has(o,"width")&&(f.width=o.width),r.has(o,"height")&&(f.height=o.height),f.width+=o.paddingLeft+o.paddingRight,f.height+=o.paddingTop+o.paddingBottom,c.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var d=h(u.select(this),f,o);a.applyStyle(d,o.style);var p=d.node().getBBox();o.width=p.width,o.height=p.height}),a.applyTransition(s.exit(),n).style("opacity",0).remove(),s}var r=t("./lodash"),i=t("./label/add-label"),a=t("./util"),u=t("./d3");n.exports=e},{"./d3":9,"./label/add-label":20,"./lodash":23,"./util":29}],9:[function(t,n){n.exports=window.d3},{}],10:[function(t,n){var e;if(t)try{e=t("dagre")}catch(r){}e||(e=window.dagre),n.exports=e},{dagre:32}],11:[function(t,n){var e;if(t)try{e=t("graphlib")}catch(r){}e||(e=window.graphlib),n.exports=e},{graphlib:63}],12:[function(t,n){n.exports={node:t("./intersect-node"),circle:t("./intersect-circle"),ellipse:t("./intersect-ellipse"),polygon:t("./intersect-polygon"),rect:t("./intersect-rect")}},{"./intersect-circle":13,"./intersect-ellipse":14,"./intersect-node":16,"./intersect-polygon":17,"./intersect-rect":18}],13:[function(t,n){function e(t,n,e){return r(t,n,n,e)}var r=t("./intersect-ellipse");n.exports=e},{"./intersect-ellipse":14}],14:[function(t,n){function e(t,n,e,r){var i=t.x,a=t.y,u=i-r.x,o=a-r.y,s=Math.sqrt(n*n*o*o+e*e*u*u),c=Math.abs(n*e*u/s);r.xm?(m-y)/g:(m+y)/g,m=u*c-a*l,_=0>m?(m-y)/g:(m+y)/g,{x:v,y:_})}function r(t,n){return t*n>0}n.exports=e},{}],16:[function(t,n){function e(t,n){return t.intersect(n)}n.exports=e},{}],17:[function(t,n){function e(t,n,e){var i=t.x,a=t.y,u=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;n.forEach(function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)});for(var c=i-t.width/2-o,l=a-t.height/2-s,h=0;h1&&u.sort(function(t,n){var r=t.x-e.x,i=t.y-e.y,a=Math.sqrt(r*r+i*i),u=n.x-e.x,o=n.y-e.y,s=Math.sqrt(u*u+o*o);return s>a?-1:a===s?0:1}),u[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var r=t("./intersect-line");n.exports=e},{"./intersect-line":15}],18:[function(t,n){ function e(t,n){var e,r,i=t.x,a=t.y,u=n.x-i,o=n.y-a,s=t.width/2,c=t.height/2;return Math.abs(o)*s>Math.abs(u)*c?(0>o&&(c=-c),e=0===o?0:c*u/o,r=c):(0>u&&(s=-s),e=s,r=0===u?0:s*o/u),{x:i+e,y:a+r}}n.exports=e},{}],19:[function(t,n){function e(t,n){var e=t.append("foreignObject").attr("width","100000"),i=e.append("xhtml:div"),a=n.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,n.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var u,o;return i.each(function(){u=this.clientWidth,o=this.clientHeight}),e.attr("width",u).attr("height",o),e}var r=t("../util");n.exports=e},{"../util":29}],20:[function(t,n){function e(t,n,e){var u=n.label,o=t.append("g");"svg"===n.labelType?a(o,n):"string"!=typeof u||"html"===n.labelType?i(o,n):r(o,n);var s,c=o.node().getBBox();switch(e){case"top":s=-n.height/2;break;case"bottom":s=n.height/2-c.height;break;default:s=-c.height/2}return o.attr("transform","translate("+-c.width/2+","+s+")"),o}var r=t("./add-text-label"),i=t("./add-html-label"),a=t("./add-svg-label");n.exports=e},{"./add-html-label":19,"./add-svg-label":21,"./add-text-label":22}],21:[function(t,n){function e(t,n){var e=t;return e.node().appendChild(n.label),r.applyStyle(e,n.labelStyle),e}var r=t("../util");n.exports=e},{"../util":29}],22:[function(t,n){function e(t,n){for(var e=t.append("text"),a=r(n.label).split("\n"),u=0;un&&!a||!i||e&&!u&&o||r&&o)return 1;if(n>t&&!e||!o||a&&!r&&i||u&&i)return-1}return 0}function i(t,n,e){for(var r=t.length,i=e?r:-1;e?i--:++i-1;);return e}function c(t,n){for(var e=t.length;e--&&n.indexOf(t.charAt(e))>-1;);return e}function l(t,n){return r(t.criteria,n.criteria)||t.index-n.index}function h(t,n,e){for(var i=-1,a=t.criteria,u=n.criteria,o=a.length,s=e.length;++i=s)return c;var l=e[i];return c*("asc"===l||l===!0?1:-1)}}return t.index-n.index}function f(t){return Wt[t]}function d(t){return qt[t]}function p(t,n,e){return n?t=Ht[t]:e&&(t=Zt[t]),"\\"+t}function g(t){return"\\"+Zt[t]}function y(t,n,e){for(var r=t.length,i=n+(e?0:-1);e?i--:++i=t&&t>=9&&13>=t||32==t||160==t||5760==t||6158==t||t>=8192&&(8202>=t||8232==t||8233==t||8239==t||8287==t||12288==t||65279==t)}function _(t,n){for(var e=-1,r=t.length,i=-1,a=[];++en,i=e?t.length:0,a=Ge(0,i,this.__views__),u=a.start,o=a.end,s=o-u,c=r?o:u-1,l=this.__iteratees__,h=l.length,f=0,d=wu(s,this.__takeCount__);if(!e||Y>i||i==s&&d==s)return re(r&&e?t.reverse():t,this.__actions__);var p=[];t:for(;s--&&d>f;){c+=n;for(var g=-1,y=t[c];++g=Y?ge(n):null,c=n.length;s&&(u=Kt,o=!1,n=s);t:for(;++ie&&(e=-e>i?0:i+e),r=r===E||r>i?i:+r||0,0>r&&(r+=i),i=e>r?0:r>>>0,e>>>=0;i>e;)t[e++]=n;return t}function Dn(t,n){var e=[];return Bu(t,function(t,r,i){n(t,r,i)&&e.push(t)}),e}function Tn(t,n,e,r){var i;return e(t,function(t,e,a){return n(t,e,a)?(i=r?e:t,!1):void 0}),i}function Cn(t,n,e,r){r||(r=[]);for(var i=-1,a=t.length;++ir;)t=t[n[r++]];return r&&r==i?t:E}}function Nn(t,n,e,r,i,a){return t===n?!0:null==t||null==n||!Ii(t)&&!m(n)?t!==t&&n!==n:Pn(t,n,Nn,e,r,i,a)}function Pn(t,n,e,r,i,a,u){var o=To(t),s=To(n),c=G,l=G;o||(c=eu.call(t),c==q?c=Q:c!=Q&&(o=zi(t))),s||(l=eu.call(n),l==q?l=Q:l!=Q&&(s=zi(n)));var h=c==Q,f=l==Q,d=c==l;if(d&&!o&&!h)return je(t,n,c);if(!i){var p=h&&tu.call(t,"__wrapped__"),g=f&&tu.call(n,"__wrapped__");if(p||g)return e(p?t.value():t,g?n.value():n,r,i,a,u)}if(!d)return!1;a||(a=[]),u||(u=[]);for(var y=a.length;y--;)if(a[y]==t)return u[y]==n;a.push(t),u.push(n);var m=(o?Re:Ye)(t,n,e,r,i,a,u);return a.pop(),u.pop(),m}function Rn(t,n,e){var r=n.length,i=r,a=!e;if(null==t)return!i;for(t=hr(t);r--;){var u=n[r];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++rn&&(n=-n>i?0:i+n),e=e===E||e>i?i:+e||0,0>e&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var a=Ya(i);++r=Y,s=o?ge():null,c=[];s?(r=Kt,u=!1):(o=!1,s=n?[]:c);t:for(;++e=i){for(;i>r;){var a=r+i>>>1,u=t[a];(e?n>=u:n>u)&&null!==u?r=a+1:i=a}return i}return ae(t,n,Sa,e)}function ae(t,n,e,r){n=e(n);for(var i=0,a=t?t.length:0,u=n!==n,o=null===n,s=n===E;a>i;){var c=mu((i+a)/2),l=e(t[c]),h=l!==E,f=l===l;if(u)var d=f||r;else d=o?f&&h&&(r||null!=l):s?f&&(r||h):null==l?!1:r?n>=l:n>l;d?i=c+1:a=c}return wu(a,Tu)}function ue(t,n,e){if("function"!=typeof t)return Sa;if(n===E)return t;switch(e){case 1:return function(e){return t.call(n,e)};case 3:return function(e,r,i){return t.call(n,e,r,i)};case 4:return function(e,r,i,a){return t.call(n,e,r,i,a)};case 5:return function(e,r,i,a,u){return t.call(n,e,r,i,a,u)}}return function(){return t.apply(n,arguments)}}function oe(t){var n=new au(t.byteLength),e=new du(n);return e.set(new du(t)),n}function se(t,n,e){for(var r=e.length,i=-1,a=xu(t.length-r,0),u=-1,o=n.length,s=Ya(o+a);++u2?e[i-2]:E,u=i>2?e[2]:E,o=i>1?e[i-1]:E;for("function"==typeof a?(a=ue(a,o,5),i-=2):(a="function"==typeof o?o:E,i-=a?1:0),u&&Qe(e[0],e[1],u)&&(a=3>i?E:a,i=1);++r-1?e[u]:E}return Tn(e,r,t)}}function we(t){return function(n,e,r){return n&&n.length?(e=$e(e,r,3),i(n,e,t)):-1}}function Ae(t){return function(n,e,r){return e=$e(e,r,3),Tn(n,e,t,!0)}}function ke(t){return function(){for(var n,e=arguments.length,r=t?e:-1,i=0,a=Ya(e);t?r--:++r=Y)return n.plant(r).value();for(var i=0,u=e?a[i].apply(this,t):r;++iv){var k=o?tn(o):E,M=xu(c-v,0),T=p?A:E,C=p?E:A,F=p?x:E,I=p?E:x;n|=p?O:L,n&=~(p?L:O),g||(n&=~(S|D));var B=[t,n,e,F,T,I,C,k,s,M],N=Oe.apply(E,B);return nr(t)&&Uu(N,B),N.placeholder=w,N}}var P=f?e:this,R=d?P[t]:t;return o&&(x=sr(x,o)),h&&s=n||!_u(n))return"";var i=n-r;return e=null==e?" ":e+"",ya(e,gu(i/e.length)).slice(0,i)}function Ie(t,n,e,r){function i(){for(var n=-1,o=arguments.length,s=-1,c=r.length,l=Ya(c+o);++ss))return!1;for(;++o-1&&t%1==0&&n>t}function Qe(t,n,e){if(!Ii(e))return!1;var r=typeof n;if("number"==r?Ke(e)&&Je(n,e.length):"string"==r&&n in e){var i=e[n];return t===t?t===i:i!==i}return!1}function tr(t,n){var e=typeof t;if("string"==e&&Et.test(t)||"number"==e)return!0;if(To(t))return!1;var r=!kt.test(t);return r||null!=n&&t in hr(n)}function nr(t){var e=Ue(t);if(!(e in K.prototype))return!1;var r=n[e];if(t===r)return!0;var i=Yu(r);return!!i&&t===i[0]}function er(t){return"number"==typeof t&&t>-1&&t%1==0&&Fu>=t}function rr(t){return t===t&&!Ii(t)}function ir(t,n){var e=t[1],r=n[1],i=e|r,a=I>i,u=r==I&&e==C||r==I&&e==B&&t[7].length<=n[8]||r==(I|B)&&e==C;if(!a&&!u)return t;r&S&&(t[2]=n[2],i|=e&S?0:T);var o=n[3];if(o){var s=t[3];t[3]=s?se(s,o,n[4]):tn(o),t[4]=s?_(t[3],W):tn(n[4])}return o=n[5],o&&(s=t[5],t[5]=s?ce(s,o,n[6]):tn(o),t[6]=s?_(t[5],W):tn(n[6])),o=n[7],o&&(t[7]=tn(o)),r&I&&(t[8]=null==t[8]?n[8]:wu(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i,t}function ar(t,n){return t===E?n:Co(t,n,ar)}function ur(t,n){t=hr(t);for(var e=-1,r=n.length,i={};++er;)u[++a]=Zn(t,r,r+=n);return u}function gr(t){for(var n=-1,e=t?t.length:0,r=-1,i=[];++nn?0:n)):[]}function mr(t,n,e){var r=t?t.length:0;return r?((e?Qe(t,n,e):null==n)&&(n=1),n=r-(+n||0),Zn(t,0,0>n?0:n)):[]}function vr(t,n,e){return t&&t.length?ee(t,$e(n,e,3),!0,!0):[]}function _r(t,n,e){return t&&t.length?ee(t,$e(n,e,3),!0):[]}function br(t,n,e,r){var i=t?t.length:0;return i?(e&&"number"!=typeof e&&Qe(t,n,e)&&(e=0,r=i),Sn(t,n,e,r)):[]}function xr(t){return t?t[0]:E}function wr(t,n,e){var r=t?t.length:0;return e&&Qe(t,n,e)&&(n=!1),r?Cn(t,n):[]}function Ar(t){var n=t?t.length:0;return n?Cn(t,!0):[]}function kr(t,n,e){var r=t?t.length:0;if(!r)return-1;if("number"==typeof e)e=0>e?xu(r+e,0):e;else if(e){var i=ie(t,n);return r>i&&(n===n?n===t[i]:t[i]!==t[i])?i:-1}return a(t,n,e||0)}function Er(t){return mr(t,1)}function Mr(t){var n=t?t.length:0;return n?t[n-1]:E}function Sr(t,n,e){var r=t?t.length:0;if(!r)return-1;var i=r;if("number"==typeof e)i=(0>e?xu(r+e,0):wu(e||0,r-1))+1;else if(e){i=ie(t,n,!0)-1;var a=t[i];return(n===n?n===a:a!==a)?i:-1}if(n!==n)return y(t,i,!0);for(;i--;)if(t[i]===n)return i;return-1}function Dr(){var t=arguments,n=t[0];if(!n||!n.length)return n;for(var e=0,r=ze(),i=t.length;++e-1;)fu.call(n,a,1);return n}function Tr(t,n,e){var r=[];if(!t||!t.length)return r;var i=-1,a=[],u=t.length;for(n=$e(n,e,3);++in?0:n)):[]}function Lr(t,n,e){var r=t?t.length:0;return r?((e?Qe(t,n,e):null==n)&&(n=1),n=r-(+n||0),Zn(t,0>n?0:n)):[]}function Ir(t,n,e){return t&&t.length?ee(t,$e(n,e,3),!1,!0):[]}function Br(t,n,e){return t&&t.length?ee(t,$e(n,e,3)):[]}function Nr(t,n,e,r){var i=t?t.length:0;if(!i)return[];null!=n&&"boolean"!=typeof n&&(r=e,e=Qe(t,n,r)?E:n,n=!1);var u=$e();return(null!=e||u!==xn)&&(e=u(e,r,3)),n&&ze()==a?b(t,e):te(t,e)}function Pr(t){if(!t||!t.length)return[];var n=-1,e=0;t=sn(t,function(t){return Ke(t)?(e=xu(t.length,e),!0):void 0});for(var r=Ya(e);++ne?xu(i+e,0):e||0,"string"==typeof t||!To(t)&&Ui(t)?i>=e&&t.indexOf(n,e)>-1:!!i&&ze(t,n,e)>-1}function ti(t,n,e){var r=To(t)?cn:jn;return n=$e(n,e,3),r(t,n)}function ni(t,n){return ti(t,La(n))}function ei(t,n,e){var r=To(t)?sn:Dn;return n=$e(n,e,3),r(t,function(t,e,r){return!n(t,e,r)})}function ri(t,n,e){if(e?Qe(t,n,e):null==n){t=lr(t);var r=t.length;return r>0?t[Vn(0,r-1)]:E}var i=-1,a=Vi(t),r=a.length,u=r-1;for(n=wu(0>n?0:+n||0,r);++i0&&(e=n.apply(this,arguments)),1>=t&&(n=E),e}}function di(t,n,e){function r(){d&&uu(d),c&&uu(c),g=0,c=d=p=E}function i(n,e){e&&uu(e),c=d=p=E,n&&(g=go(),l=t.apply(f,s),d||c||(s=f=E))}function a(){var t=n-(go()-h);0>=t||t>n?i(p,c):d=hu(a,t)}function u(){i(m,d)}function o(){if(s=arguments,h=go(),f=this,p=m&&(d||!v),y===!1)var e=v&&!d;else{c||v||(g=h);var r=y-(h-g),i=0>=r||r>y;i?(c&&(c=uu(c)),g=h,l=t.apply(f,s)):c||(c=hu(u,r))}return i&&d?d=uu(d):d||n===y||(d=hu(a,n)),e&&(i=!0,l=t.apply(f,s)),!i||d||c||(s=f=E),l}var s,c,l,h,f,d,p,g=0,y=!1,m=!0;if("function"!=typeof t)throw new Za(z);if(n=0>n?0:+n||0,e===!0){var v=!0;m=!1}else Ii(e)&&(v=!!e.leading,y="maxWait"in e&&xu(+e.maxWait||0,n),m="trailing"in e?!!e.trailing:m);return o.cancel=r,o}function pi(t,n){if("function"!=typeof t||n&&"function"!=typeof n)throw new Za(z);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],a=e.cache;if(a.has(i))return a.get(i);var u=t.apply(this,r);return e.cache=a.set(i,u),u};return e.cache=new pi.Cache,e}function gi(t){if("function"!=typeof t)throw new Za(z);return function(){return!t.apply(this,arguments)}}function yi(t){return fi(2,t)}function mi(t,n){if("function"!=typeof t)throw new Za(z);return n=xu(n===E?t.length-1:+n||0,0),function(){for(var e=arguments,r=-1,i=xu(e.length-n,0),a=Ya(i);++rn}function ki(t,n){return t>=n}function Ei(t){return m(t)&&Ke(t)&&tu.call(t,"callee")&&!cu.call(t,"callee")}function Mi(t){return t===!0||t===!1||m(t)&&eu.call(t)==V}function Si(t){return m(t)&&eu.call(t)==H}function Di(t){return!!t&&1===t.nodeType&&m(t)&&!Yi(t)}function Ti(t){return null==t?!0:Ke(t)&&(To(t)||Ui(t)||Ei(t)||m(t)&&Li(t.splice))?!t.length:!Yo(t).length}function Ci(t,n,e,r){e="function"==typeof e?ue(e,r,3):E;var i=e?e(t,n):E;return i===E?Nn(t,n,e):!!i}function Fi(t){return m(t)&&"string"==typeof t.message&&eu.call(t)==Z}function Oi(t){return"number"==typeof t&&_u(t)}function Li(t){return Ii(t)&&eu.call(t)==X}function Ii(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function Bi(t,n,e,r){return e="function"==typeof e?ue(e,r,3):E,Rn(t,We(n),e)}function Ni(t){return ji(t)&&t!=+t}function Pi(t){return null==t?!1:Li(t)?iu.test(Qa.call(t)):m(t)&&It.test(t)}function Ri(t){return null===t}function ji(t){return"number"==typeof t||m(t)&&eu.call(t)==J}function Yi(t){var n;if(!m(t)||eu.call(t)!=Q||Ei(t)||!tu.call(t,"constructor")&&(n=t.constructor,"function"==typeof n&&!(n instanceof n)))return!1;var e;return Fn(t,function(t,n){e=n}),e===E||tu.call(t,e)}function $i(t){return Ii(t)&&eu.call(t)==tt}function Ui(t){return"string"==typeof t||m(t)&&eu.call(t)==et}function zi(t){return m(t)&&er(t.length)&&!!Ut[eu.call(t)]}function Wi(t){return t===E}function qi(t,n){return n>t}function Gi(t,n){return n>=t}function Vi(t){var n=t?$u(t):0;return er(n)?n?tn(t):[]:aa(t)}function Hi(t){return bn(t,ta(t))}function Zi(t,n,e){var r=Iu(t);return e&&Qe(t,n,e)&&(n=E),n?vn(r,n):r}function Xi(t){return In(t,ta(t))}function Ki(t,n,e){var r=null==t?E:Bn(t,fr(n),n+"");return r===E?e:r}function Ji(t,n){if(null==t)return!1;var e=tu.call(t,n);if(!e&&!tr(n)){if(n=fr(n),t=1==n.length?t:Bn(t,Zn(n,0,-1)),null==t)return!1;n=Mr(n),e=tu.call(t,n)}return e||er(t.length)&&Je(n,t.length)&&(To(t)||Ei(t))}function Qi(t,n,e){e&&Qe(t,n,e)&&(n=E);for(var r=-1,i=Yo(t),a=i.length,u={};++r0;++r=wu(n,e)&&te?0:+e||0,r),e-=n.length,e>=0&&t.indexOf(n,e)==e}function fa(t){return t=o(t),t&&bt.test(t)?t.replace(vt,d):t}function da(t){return t=o(t),t&&Dt.test(t)?t.replace(St,p):t||"(?:)"}function pa(t,n,e){t=o(t),n=+n;var r=t.length;if(r>=n||!_u(n))return t;var i=(n-r)/2,a=mu(i),u=gu(i);return e=Le("",u,e),e.slice(0,a)+t+e}function ga(t,n,e){return(e?Qe(t,n,e):null==n)?n=0:n&&(n=+n),t=_a(t),ku(t,n||(Lt.test(t)?16:10))}function ya(t,n){var e="";if(t=o(t),n=+n,1>n||!t||!_u(n))return e;do n%2&&(e+=t),n=mu(n/2),t+=t;while(n);return e}function ma(t,n,e){return t=o(t),e=null==e?0:wu(0>e?0:+e||0,t.length),t.lastIndexOf(n,e)==e}function va(t,e,r){var i=n.templateSettings;r&&Qe(t,e,r)&&(e=r=E),t=o(t),e=mn(vn({},r||e),i,yn);var a,u,s=mn(vn({},e.imports),i.imports,yn),c=Yo(s),l=ne(s,c),h=0,f=e.interpolate||Pt,d="__p += '",p=Va((e.escape||Pt).source+"|"+f.source+"|"+(f===At?Ft:Pt).source+"|"+(e.evaluate||Pt).source+"|$","g"),y="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++$t+"]")+"\n";t.replace(p,function(n,e,r,i,o,s){return r||(r=i),d+=t.slice(h,s).replace(Rt,g),e&&(a=!0,d+="' +\n__e("+e+") +\n'"),o&&(u=!0,d+="';\n"+o+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=s+n.length,n}),d+="';\n";var m=e.variable;m||(d="with (obj) {\n"+d+"\n}\n"),d=(u?d.replace(pt,""):d).replace(gt,"$1").replace(yt,"$1;"),d="function("+(m||"obj")+") {\n"+(m?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Ko(function(){return za(c,y+"return "+d).apply(E,l)});if(v.source=d,Fi(v))throw v;return v}function _a(t,n,e){var r=t;return(t=o(t))?(e?Qe(r,n,e):null==n)?t.slice(x(t),w(t)+1):(n+="",t.slice(s(t,n),c(t,n)+1)):t}function ba(t,n,e){var r=t;return t=o(t),t?t.slice((e?Qe(r,n,e):null==n)?x(t):s(t,n+"")):t}function xa(t,n,e){var r=t;return t=o(t),t?(e?Qe(r,n,e):null==n)?t.slice(0,w(t)+1):t.slice(0,c(t,n+"")+1):t}function wa(t,n,e){e&&Qe(t,n,e)&&(n=E);var r=N,i=P;if(null!=n)if(Ii(n)){var a="separator"in n?n.separator:a;r="length"in n?+n.length||0:r,i="omission"in n?o(n.omission):i}else r=+n||0;if(t=o(t),r>=t.length)return t;var u=r-i.length;if(1>u)return i;var s=t.slice(0,u);if(null==a)return s+i;if($i(a)){if(t.slice(u).search(a)){var c,l,h=t.slice(0,u);for(a.global||(a=Va(a.source,(Ot.exec(a)||"")+"g")),a.lastIndex=0;c=a.exec(h);)l=c.index;s=s.slice(0,null==l?u:l)}}else if(t.indexOf(a,u)!=u){var f=s.lastIndexOf(a);f>-1&&(s=s.slice(0,f))}return s+i}function Aa(t){return t=o(t),t&&_t.test(t)?t.replace(mt,A):t}function ka(t,n,e){return e&&Qe(t,n,e)&&(n=E),t=o(t),t.match(n||jt)||[]}function Ea(t,n,e){return e&&Qe(t,n,e)&&(n=E),m(t)?Da(t):xn(t,n)}function Ma(t){return function(){return t}}function Sa(t){return t}function Da(t){return Yn(wn(t,!0))}function Ta(t,n){return $n(t,wn(n,!0))}function Ca(t,n,e){if(null==e){var r=Ii(n),i=r?Yo(n):E,a=i&&i.length?In(n,i):E;(a?a.length:r)||(a=!1,e=n,n=t,t=this)}a||(a=In(n,Yo(n)));var u=!0,o=-1,s=Li(t),c=a.length;e===!1?u=!1:Ii(e)&&"chain"in e&&(u=e.chain);for(;++ot||!_u(t))return[];var r=-1,i=Ya(wu(t,Du));for(n=ue(n,e,1);++rr?i[r]=n(r):n(r);return i}function Pa(t){var n=++nu;return o(t)+n}function Ra(t,n){return(+t||0)+(+n||0)}function ja(t,n,e){return e&&Qe(t,n,e)&&(n=E),n=$e(n,e,3),1==n.length?pn(To(t)?t:lr(t),n):Qn(t,n)}t=t?rn.defaults(en.Object(),t,rn.pick(en,Yt)):en;{var Ya=t.Array,$a=t.Date,Ua=t.Error,za=t.Function,Wa=t.Math,qa=t.Number,Ga=t.Object,Va=t.RegExp,Ha=t.String,Za=t.TypeError,Xa=Ya.prototype,Ka=Ga.prototype,Ja=Ha.prototype,Qa=za.prototype.toString,tu=Ka.hasOwnProperty,nu=0,eu=Ka.toString,ru=en._,iu=Va("^"+Qa.call(tu).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),au=t.ArrayBuffer,uu=t.clearTimeout,ou=t.parseFloat,su=Wa.pow,cu=Ka.propertyIsEnumerable,lu=qe(t,"Set"),hu=t.setTimeout,fu=Xa.splice,du=t.Uint8Array,pu=qe(t,"WeakMap"),gu=Wa.ceil,yu=qe(Ga,"create"),mu=Wa.floor,vu=qe(Ya,"isArray"),_u=t.isFinite,bu=qe(Ga,"keys"),xu=Wa.max,wu=Wa.min,Au=qe($a,"now"),ku=t.parseInt,Eu=Wa.random,Mu=qa.NEGATIVE_INFINITY,Su=qa.POSITIVE_INFINITY,Du=4294967295,Tu=Du-1,Cu=Du>>>1,Fu=9007199254740991,Ou=pu&&new pu,Lu={};n.support={}}n.templateSettings={escape:xt,evaluate:wt,interpolate:At,variable:"",imports:{_:n}};var Iu=function(){function t(){}return function(n){if(Ii(n)){t.prototype=n;var e=new t;t.prototype=E}return e||{}}}(),Bu=fe(On),Nu=fe(Ln,!0),Pu=de(),Ru=de(!0),ju=Ou?function(t,n){return Ou.set(t,n),t}:Sa,Yu=Ou?function(t){return Ou.get(t)}:Oa,$u=Wn("length"),Uu=function(){var t=0,n=0;return function(e,r){var i=go(),a=j-(i-n);if(n=i,a>0){if(++t>=R)return e}else t=0;return ju(e,r)}}(),zu=mi(function(t,n){return m(t)&&Ke(t)?kn(t,Cn(n,!1,!0)):[]}),Wu=we(),qu=we(!0),Gu=mi(function(t){for(var n=t.length,e=n,r=Ya(h),i=ze(),u=i==a,o=[];e--;){var s=t[e]=Ke(s=t[e])?s:[];r[e]=u&&s.length>=120?ge(e&&s):null}var c=t[0],l=-1,h=c?c.length:0,f=r[0];t:for(;++l2?t[n-2]:E,r=n>1?t[n-1]:E;return n>2&&"function"==typeof e?n-=2:(e=n>1&&"function"==typeof r?(--n,r):E,r=E),t.length=n,Rr(t,e,r)}),to=mi(function(t){return t=Cn(t),this.thru(function(n){return Qt(To(n)?n:[hr(n)],t)})}),no=mi(function(t,n){return _n(t,Cn(n))}),eo=le(function(t,n,e){tu.call(t,e)?++t[e]:t[e]=1}),ro=xe(Bu),io=xe(Nu,!0),ao=Ee(nn,Bu),uo=Ee(an,Nu),oo=le(function(t,n,e){tu.call(t,e)?t[e].push(n):t[e]=[n]}),so=le(function(t,n,e){t[e]=n}),co=mi(function(t,n,e){var r=-1,i="function"==typeof n,a=tr(n),u=Ke(t)?Ya(t.length):[];return Bu(t,function(t){var o=i?n:a&&null!=t?t[n]:E;u[++r]=o?o.apply(t,e):Xe(t,n,e)}),u}),lo=le(function(t,n,e){t[e?0:1].push(n)},function(){return[[],[]]}),ho=Fe(hn,Bu),fo=Fe(fn,Nu),po=mi(function(t,n){if(null==t)return[];var e=n[2];return e&&Qe(n[0],n[1],e)&&(n.length=1),Jn(t,Cn(n),[])}),go=Au||function(){return(new $a).getTime()},yo=mi(function(t,n,e){var r=S;if(e.length){var i=_(e,yo.placeholder);r|=O}return Pe(t,r,n,e,i)}),mo=mi(function(t,n){n=n.length?Cn(n):Xi(t);for(var e=-1,r=n.length;++e0||0>n)?new K(e):(0>t?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==E&&(n=+n||0,e=0>n?e.dropRight(-n):e.take(n-t)),e)},K.prototype.takeRightWhile=function(t,n){return this.reverse().takeWhile(t,n).reverse()},K.prototype.toArray=function(){return this.take(Su)},On(K.prototype,function(t,e){var r=/^(?:filter|map|reject)|While$/.test(e),i=/^(?:first|last)$/.test(e),a=n[i?"take"+("last"==e?"Right":""):e];a&&(n.prototype[e]=function(){var n=i?[1]:arguments,e=this.__chain__,u=this.__wrapped__,o=!!this.__actions__.length,s=u instanceof K,c=n[0],l=s||To(u);l&&r&&"function"==typeof c&&1!=c.length&&(s=l=!1);var h=function(t){return i&&e?a(t,1)[0]:a.apply(E,ln([t],n))},f={func:zr,args:[h],thisArg:E},d=s&&!o;if(i&&!e)return d?(u=u.clone(),u.__actions__.push(f),t.call(u)):a.call(E,this.value())[0];if(!i&&l){u=d?u:new K(this);var p=t.apply(u,n);return p.__actions__.push(f),new v(p,e)}return this.thru(h)})}),nn(["join","pop","push","replace","shift","sort","splice","split","unshift"],function(t){var e=(/^(?:replace|split)$/.test(t)?Ja:Xa)[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:join|pop|replace|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;return i&&!this.__chain__?e.apply(this.value(),t):this[r](function(n){return e.apply(n,t)})}}),On(K.prototype,function(t,e){var r=n[e];if(r){var i=r.name,a=Lu[i]||(Lu[i]=[]);a.push({name:e,func:r})}}),Lu[Oe(E,D).name]=[{name:"wrapper",func:E}],K.prototype.clone=nt,K.prototype.reverse=rt,K.prototype.value=Wt,n.prototype.chain=Wr,n.prototype.commit=qr,n.prototype.concat=to,n.prototype.plant=Gr,n.prototype.reverse=Vr,n.prototype.toString=Hr,n.prototype.run=n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=Zr,n.prototype.collect=n.prototype.map,n.prototype.head=n.prototype.first,n.prototype.select=n.prototype.filter,n.prototype.tail=n.prototype.rest,n}var E,M="3.10.1",S=1,D=2,T=4,C=8,F=16,O=32,L=64,I=128,B=256,N=30,P="...",R=150,j=16,Y=200,$=1,U=2,z="Expected a function",W="__lodash_placeholder__",q="[object Arguments]",G="[object Array]",V="[object Boolean]",H="[object Date]",Z="[object Error]",X="[object Function]",K="[object Map]",J="[object Number]",Q="[object Object]",tt="[object RegExp]",nt="[object Set]",et="[object String]",rt="[object WeakMap]",it="[object ArrayBuffer]",at="[object Float32Array]",ut="[object Float64Array]",ot="[object Int8Array]",st="[object Int16Array]",ct="[object Int32Array]",lt="[object Uint8Array]",ht="[object Uint8ClampedArray]",ft="[object Uint16Array]",dt="[object Uint32Array]",pt=/\b__p \+= '';/g,gt=/\b(__p \+=) '' \+/g,yt=/(__e\(.*?\)|\b__t\)) \+\n'';/g,mt=/&(?:amp|lt|gt|quot|#39|#96);/g,vt=/[&<>"'`]/g,_t=RegExp(mt.source),bt=RegExp(vt.source),xt=/<%-([\s\S]+?)%>/g,wt=/<%([\s\S]+?)%>/g,At=/<%=([\s\S]+?)%>/g,kt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/,Et=/^\w*$/,Mt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g,St=/^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g,Dt=RegExp(St.source),Tt=/[\u0300-\u036f\ufe20-\ufe23]/g,Ct=/\\(\\)?/g,Ft=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ot=/\w*$/,Lt=/^0[xX]/,It=/^\[object .+?Constructor\]$/,Bt=/^\d+$/,Nt=/[\xc0-\xd6\xd8-\xde\xdf-\xf6\xf8-\xff]/g,Pt=/($^)/,Rt=/['\n\r\u2028\u2029\\]/g,jt=function(){var t="[A-Z\\xc0-\\xd6\\xd8-\\xde]",n="[a-z\\xdf-\\xf6\\xf8-\\xff]+";return RegExp(t+"+(?="+t+n+")|"+t+"?"+n+"|"+t+"+|[0-9]+","g")}(),Yt=["Array","ArrayBuffer","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Math","Number","Object","RegExp","Set","String","_","clearTimeout","isFinite","parseFloat","parseInt","setTimeout","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap"],$t=-1,Ut={};Ut[at]=Ut[ut]=Ut[ot]=Ut[st]=Ut[ct]=Ut[lt]=Ut[ht]=Ut[ft]=Ut[dt]=!0,Ut[q]=Ut[G]=Ut[it]=Ut[V]=Ut[H]=Ut[Z]=Ut[X]=Ut[K]=Ut[J]=Ut[Q]=Ut[tt]=Ut[nt]=Ut[et]=Ut[rt]=!1;var zt={};zt[q]=zt[G]=zt[it]=zt[V]=zt[H]=zt[at]=zt[ut]=zt[ot]=zt[st]=zt[ct]=zt[J]=zt[Q]=zt[tt]=zt[et]=zt[lt]=zt[ht]=zt[ft]=zt[dt]=!0,zt[Z]=zt[X]=zt[K]=zt[nt]=zt[rt]=!1;var Wt={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss"},qt={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},Gt={"&":"&","<":"<",">":">",""":'"',"'":"'","`":"`"},Vt={"function":!0,object:!0},Ht={0:"x30",1:"x31",2:"x32",3:"x33",4:"x34",5:"x35",6:"x36",7:"x37",8:"x38",9:"x39",A:"x41",B:"x42",C:"x43",D:"x44",E:"x45",F:"x46",a:"x61",b:"x62",c:"x63",d:"x64",e:"x65",f:"x66",n:"x6e",r:"x72",t:"x74",u:"x75",v:"x76",x:"x78"},Zt={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Xt=Vt[typeof e]&&e&&!e.nodeType&&e,Kt=Vt[typeof n]&&n&&!n.nodeType&&n,Jt=Xt&&Kt&&"object"==typeof t&&t&&t.Object&&t,Qt=Vt[typeof self]&&self&&self.Object&&self,tn=Vt[typeof window]&&window&&window.Object&&window,nn=Kt&&Kt.exports===Xt&&Xt,en=Jt||tn!==(this&&this.window)&&tn||Qt||this,rn=k();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(en._=rn,define(function(){return rn})):Xt&&Kt?nn?(Kt.exports=rn)._=rn:Xt._=rn:en._=rn}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],32:[function(t,n){n.exports={graphlib:t("./lib/graphlib"),layout:t("./lib/layout"),debug:t("./lib/debug"),util:{time:t("./lib/util").time,notime:t("./lib/util").notime},version:t("./lib/version")}},{"./lib/debug":37,"./lib/graphlib":38,"./lib/layout":40,"./lib/util":60,"./lib/version":61}],33:[function(t,n){"use strict";function e(t){function n(t){return function(n){return t.edge(n).weight}}var e="greedy"===t.graph().acyclicer?u(t,n(t)):r(t);a.each(e,function(n){var e=t.edge(n);t.removeEdge(n),e.forwardName=n.name,e.reversed=!0,t.setEdge(n.w,n.v,e,a.uniqueId("rev"))})}function r(t){function n(u){a.has(i,u)||(i[u]=!0,r[u]=!0,a.each(t.outEdges(u),function(t){a.has(r,t.w)?e.push(t):n(t.w)}),delete r[u])}var e=[],r={},i={};return a.each(t.nodes(),n),e}function i(t){a.each(t.edges(),function(n){var e=t.edge(n);if(e.reversed){t.removeEdge(n);var r=e.forwardName;delete e.reversed,delete e.forwardName,t.setEdge(n.w,n.v,e,r)}})}var a=t("./lodash"),u=t("./greedy-fas");n.exports={run:e,undo:i}},{"./greedy-fas":39,"./lodash":41}],34:[function(t,n){function e(t){function n(e){var a=t.children(e),u=t.node(e);if(a.length&&i.each(a,n),i.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var o=u.minRank,s=u.maxRank+1;s>o;++o)r(t,"borderLeft","_bl",e,u,o),r(t,"borderRight","_br",e,u,o)}}i.each(t.children(),n)}function r(t,n,e,r,i,u){var o={width:0,height:0,rank:u,borderType:n},s=i[n][u-1],c=a.addDummyNode(t,"border",o,e);i[n][u]=c,t.setParent(c,r),s&&t.setEdge(s,c,{weight:1})}var i=t("./lodash"),a=t("./util");n.exports=e},{"./lodash":41,"./util":60}],35:[function(t,n){"use strict";function e(t){var n=t.graph().rankdir.toLowerCase();("lr"===n||"rl"===n)&&i(t)}function r(t){var n=t.graph().rankdir.toLowerCase();("bt"===n||"rl"===n)&&u(t),("lr"===n||"rl"===n)&&(s(t),i(t))}function i(t){l.each(t.nodes(),function(n){a(t.node(n))}),l.each(t.edges(),function(n){a(t.edge(n))})}function a(t){var n=t.width;t.width=t.height,t.height=n}function u(t){l.each(t.nodes(),function(n){o(t.node(n))}),l.each(t.edges(),function(n){var e=t.edge(n);l.each(e.points,o),l.has(e,"y")&&o(e)})}function o(t){t.y=-t.y}function s(t){l.each(t.nodes(),function(n){c(t.node(n))}),l.each(t.edges(),function(n){var e=t.edge(n);l.each(e.points,c),l.has(e,"x")&&c(e)})}function c(t){var n=t.x;t.x=t.y,t.y=n}var l=t("./lodash");n.exports={adjust:e,undo:r}},{"./lodash":41}],36:[function(t,n){function e(){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,n){return"_next"!==t&&"_prev"!==t?n:void 0}n.exports=e,e.prototype.dequeue=function(){var t=this._sentinel,n=t._prev;return n!==t?(r(n),n):void 0},e.prototype.enqueue=function(t){var n=this._sentinel;t._prev&&t._next&&r(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n},e.prototype.toString=function(){for(var t=[],n=this._sentinel,e=n._prev;e!==n;)t.push(JSON.stringify(e,i)),e=e._prev;return"["+t.join(", ")+"]"}},{}],37:[function(t,n){function e(t){var n=i.buildLayerMatrix(t),e=new a({compound:!0,multigraph:!0}).setGraph({});return r.each(t.nodes(),function(n){e.setNode(n,{label:n}),e.setParent(n,"layer"+t.node(n).rank)}),r.each(t.edges(),function(t){e.setEdge(t.v,t.w,{},t.name)}),r.each(n,function(t,n){var i="layer"+n;e.setNode(i,{rank:"same"}),r.reduce(t,function(t,n){return e.setEdge(t,n,{style:"invis"}),n})}),e}var r=t("./lodash"),i=t("./util"),a=t("./graphlib").Graph;n.exports={debugOrdering:e}},{"./graphlib":38,"./lodash":41,"./util":60}],38:[function(t,n){var e;if("function"==typeof t)try{e=t("graphlib")}catch(r){}e||(e=window.graphlib),n.exports=e},{graphlib:63}],39:[function(t,n){function e(t,n){if(t.nodeCount()<=1)return[];var e=a(t,n||l),i=r(e.graph,e.buckets,e.zeroIdx);return o.flatten(o.map(i,function(n){return t.outEdges(n.v,n.w)}),!0)}function r(t,n,e){for(var r,a=[],u=n[n.length-1],o=n[0];t.nodeCount();){for(;r=o.dequeue();)i(t,n,e,r);for(;r=u.dequeue();)i(t,n,e,r);if(t.nodeCount())for(var s=n.length-2;s>0;--s)if(r=n[s].dequeue()){a=a.concat(i(t,n,e,r,!0));break}}return a}function i(t,n,e,r,i){var a=i?[]:void 0;return o.each(t.inEdges(r.v),function(r){var o=t.edge(r),s=t.node(r.v);i&&a.push({v:r.v,w:r.w}),s.out-=o,u(n,e,s)}),o.each(t.outEdges(r.v),function(r){var i=t.edge(r),a=r.w,o=t.node(a);o["in"]-=i,u(n,e,o)}),t.removeNode(r.v),a}function a(t,n){var e=new s,r=0,i=0;o.each(t.nodes(),function(t){e.setNode(t,{v:t,"in":0,out:0})}),o.each(t.edges(),function(t){var a=e.edge(t.v,t.w)||0,u=n(t),o=a+u;e.setEdge(t.v,t.w,o),i=Math.max(i,e.node(t.v).out+=u),r=Math.max(r,e.node(t.w)["in"]+=u)});var a=o.range(i+r+3).map(function(){return new c}),l=r+1;return o.each(e.nodes(),function(t){u(a,l,e.node(t))}),{graph:e,buckets:a,zeroIdx:l}}function u(t,n,e){e.out?e["in"]?t[e.out-e["in"]+n].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}var o=t("./lodash"),s=t("./graphlib").Graph,c=t("./data/list");n.exports=e;var l=o.constant(1)},{"./data/list":36,"./graphlib":38,"./lodash":41}],40:[function(t,n){"use strict";function e(t,n){var e=n&&n.debugTiming?O.time:O.notime;e("layout",function(){var n=e(" buildLayoutGraph",function(){return a(t)});e(" runLayout",function(){r(n,e)}),e(" updateInputGraph",function(){i(t,n)})})}function r(t,n){n(" makeSpaceForEdgeLabels",function(){u(t)}),n(" removeSelfEdges",function(){g(t)}),n(" acyclic",function(){x.run(t)}),n(" nestingGraph.run",function(){S.run(t)}),n(" rank",function(){A(O.asNonCompoundGraph(t))}),n(" injectEdgeLabelProxies",function(){o(t)}),n(" removeEmptyRanks",function(){M(t)}),n(" nestingGraph.cleanup",function(){S.cleanup(t)}),n(" normalizeRanks",function(){k(t)}),n(" assignRankMinMax",function(){ s(t)}),n(" removeEdgeLabelProxies",function(){c(t)}),n(" normalize.run",function(){w.run(t)}),n(" parentDummyChains",function(){E(t)}),n(" addBorderSegments",function(){D(t)}),n(" order",function(){C(t)}),n(" insertSelfEdges",function(){y(t)}),n(" adjustCoordinateSystem",function(){T.adjust(t)}),n(" position",function(){F(t)}),n(" positionSelfEdges",function(){m(t)}),n(" removeBorderNodes",function(){p(t)}),n(" normalize.undo",function(){w.undo(t)}),n(" fixupEdgeLabelCoords",function(){f(t)}),n(" undoCoordinateSystem",function(){T.undo(t)}),n(" translateGraph",function(){l(t)}),n(" assignNodeIntersects",function(){h(t)}),n(" reversePoints",function(){d(t)}),n(" acyclic.undo",function(){x.undo(t)})}function i(t,n){b.each(t.nodes(),function(e){var r=t.node(e),i=n.node(e);r&&(r.x=i.x,r.y=i.y,n.children(e).length&&(r.width=i.width,r.height=i.height))}),b.each(t.edges(),function(e){var r=t.edge(e),i=n.edge(e);r.points=i.points,b.has(i,"x")&&(r.x=i.x,r.y=i.y)}),t.graph().width=n.graph().width,t.graph().height=n.graph().height}function a(t){var n=new L({multigraph:!0,compound:!0}),e=_(t.graph());return n.setGraph(b.merge({},B,v(e,I),b.pick(e,N))),b.each(t.nodes(),function(e){var r=_(t.node(e));n.setNode(e,b.defaults(v(r,P),R)),n.setParent(e,t.parent(e))}),b.each(t.edges(),function(e){var r=_(t.edge(e));n.setEdge(e,b.merge({},Y,v(r,j),b.pick(r,$)))}),n}function u(t){var n=t.graph();n.ranksep/=2,b.each(t.edges(),function(e){var r=t.edge(e);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===n.rankdir||"BT"===n.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function o(t){b.each(t.edges(),function(n){var e=t.edge(n);if(e.width&&e.height){var r=t.node(n.v),i=t.node(n.w),a={rank:(i.rank-r.rank)/2+r.rank,e:n};O.addDummyNode(t,"edge-proxy",a,"_ep")}})}function s(t){var n=0;b.each(t.nodes(),function(e){var r=t.node(e);r.borderTop&&(r.minRank=t.node(r.borderTop).rank,r.maxRank=t.node(r.borderBottom).rank,n=b.max(n,r.maxRank))}),t.graph().maxRank=n}function c(t){b.each(t.nodes(),function(n){var e=t.node(n);"edge-proxy"===e.dummy&&(t.edge(e.e).labelRank=e.rank,t.removeNode(n))})}function l(t){function n(t){var n=t.x,u=t.y,o=t.width,s=t.height;e=Math.min(e,n-o/2),r=Math.max(r,n+o/2),i=Math.min(i,u-s/2),a=Math.max(a,u+s/2)}var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,a=0,u=t.graph(),o=u.marginx||0,s=u.marginy||0;b.each(t.nodes(),function(e){n(t.node(e))}),b.each(t.edges(),function(e){var r=t.edge(e);b.has(r,"x")&&n(r)}),e-=o,i-=s,b.each(t.nodes(),function(n){var r=t.node(n);r.x-=e,r.y-=i}),b.each(t.edges(),function(n){var r=t.edge(n);b.each(r.points,function(t){t.x-=e,t.y-=i}),b.has(r,"x")&&(r.x-=e),b.has(r,"y")&&(r.y-=i)}),u.width=r-e+o,u.height=a-i+s}function h(t){b.each(t.edges(),function(n){var e,r,i=t.edge(n),a=t.node(n.v),u=t.node(n.w);i.points?(e=i.points[0],r=i.points[i.points.length-1]):(i.points=[],e=u,r=a),i.points.unshift(O.intersectRect(a,e)),i.points.push(O.intersectRect(u,r))})}function f(t){b.each(t.edges(),function(n){var e=t.edge(n);if(b.has(e,"x"))switch(("l"===e.labelpos||"r"===e.labelpos)&&(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function d(t){b.each(t.edges(),function(n){var e=t.edge(n);e.reversed&&e.points.reverse()})}function p(t){b.each(t.nodes(),function(n){if(t.children(n).length){var e=t.node(n),r=t.node(e.borderTop),i=t.node(e.borderBottom),a=t.node(b.last(e.borderLeft)),u=t.node(b.last(e.borderRight));e.width=Math.abs(u.x-a.x),e.height=Math.abs(i.y-r.y),e.x=a.x+e.width/2,e.y=r.y+e.height/2}}),b.each(t.nodes(),function(n){"border"===t.node(n).dummy&&t.removeNode(n)})}function g(t){b.each(t.edges(),function(n){if(n.v===n.w){var e=t.node(n.v);e.selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:n,label:t.edge(n)}),t.removeEdge(n)}})}function y(t){var n=O.buildLayerMatrix(t);b.each(n,function(n){var e=0;b.each(n,function(n,r){var i=t.node(n);i.order=r+e,b.each(i.selfEdges,function(n){O.addDummyNode(t,"selfedge",{width:n.label.width,height:n.label.height,rank:i.rank,order:r+ ++e,e:n.e,label:n.label},"_se")}),delete i.selfEdges})})}function m(t){b.each(t.nodes(),function(n){var e=t.node(n);if("selfedge"===e.dummy){var r=t.node(e.e.v),i=r.x+r.width/2,a=r.y,u=e.x-i,o=r.height/2;t.setEdge(e.e,e.label),t.removeNode(n),e.label.points=[{x:i+2*u/3,y:a-o},{x:i+5*u/6,y:a-o},{x:i+u,y:a},{x:i+5*u/6,y:a+o},{x:i+2*u/3,y:a+o}],e.label.x=e.x,e.label.y=e.y}})}function v(t,n){return b.mapValues(b.pick(t,n),Number)}function _(t){var n={};return b.each(t,function(t,e){n[e.toLowerCase()]=t}),n}var b=t("./lodash"),x=t("./acyclic"),w=t("./normalize"),A=t("./rank"),k=t("./util").normalizeRanks,E=t("./parent-dummy-chains"),M=t("./util").removeEmptyRanks,S=t("./nesting-graph"),D=t("./add-border-segments"),T=t("./coordinate-system"),C=t("./order"),F=t("./position"),O=t("./util"),L=t("./graphlib").Graph;n.exports=e;var I=["nodesep","edgesep","ranksep","marginx","marginy"],B={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},N=["acyclicer","ranker","rankdir","align"],P=["width","height"],R={width:0,height:0},j=["minlen","weight","width","height","labeloffset"],Y={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$=["labelpos"]},{"./acyclic":33,"./add-border-segments":34,"./coordinate-system":35,"./graphlib":38,"./lodash":41,"./nesting-graph":42,"./normalize":43,"./order":48,"./parent-dummy-chains":53,"./position":55,"./rank":57,"./util":60}],41:[function(t,n){var e;if("function"==typeof t)try{e=t("lodash")}catch(r){}e||(e=window._),n.exports=e},{lodash:62}],42:[function(t,n){function e(t){var n=s.addDummyNode(t,"root",{},"_root"),e=i(t),u=o.max(e)-1,c=2*u+1;t.graph().nestingRoot=n,o.each(t.edges(),function(n){t.edge(n).minlen*=c});var l=a(t)+1;o.each(t.children(),function(i){r(t,n,c,l,u,e,i)}),t.graph().nodeRankFactor=c}function r(t,n,e,i,a,u,c){var l=t.children(c);if(!l.length)return void(c!==n&&t.setEdge(n,c,{weight:0,minlen:e}));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,o.each(l,function(o){r(t,n,e,i,a,u,o);var s=t.node(o),l=s.borderTop?s.borderTop:o,d=s.borderBottom?s.borderBottom:o,p=s.borderTop?i:2*i,g=l!==d?1:a-u[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(n,h,{weight:0,minlen:a+u[c]})}function i(t){function n(r,i){var a=t.children(r);a&&a.length&&o.each(a,function(t){n(t,i+1)}),e[r]=i}var e={};return o.each(t.children(),function(t){n(t,1)}),e}function a(t){return o.reduce(t.edges(),function(n,e){return n+t.edge(e).weight},0)}function u(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,o.each(t.edges(),function(n){var e=t.edge(n);e.nestingEdge&&t.removeEdge(n)})}var o=t("./lodash"),s=t("./util");n.exports={run:e,cleanup:u}},{"./lodash":41,"./util":60}],43:[function(t,n){"use strict";function e(t){t.graph().dummyChains=[],a.each(t.edges(),function(n){r(t,n)})}function r(t,n){var e=n.v,r=t.node(e).rank,i=n.w,a=t.node(i).rank,o=n.name,s=t.edge(n),c=s.labelRank;if(a!==r+1){t.removeEdge(n);var l,h,f;for(f=0,++r;a>r;++f,++r)s.points=[],h={width:0,height:0,edgeLabel:s,edgeObj:n,rank:r},l=u.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(e,l,{weight:s.weight},o),0===f&&t.graph().dummyChains.push(l),e=l;t.setEdge(e,i,{weight:s.weight},o)}}function i(t){a.each(t.graph().dummyChains,function(n){var e,r=t.node(n),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)e=t.successors(n)[0],t.removeNode(n),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),n=e,r=t.node(n)})}var a=t("./lodash"),u=t("./util");n.exports={run:e,undo:i}},{"./lodash":41,"./util":60}],44:[function(t,n){function e(t,n,e){var i,a={};r.each(e,function(e){for(var r,u,o=t.parent(e);o;){if(r=t.parent(o),r?(u=a[r],a[r]=o):(u=i,i=o),u&&u!==o)return void n.setEdge(u,o);o=r}})}var r=t("../lodash");n.exports=e},{"../lodash":41}],45:[function(t,n){function e(t,n){return r.map(n,function(n){var e=t.inEdges(n);if(e.length){var i=r.reduce(e,function(n,e){var r=t.edge(e),i=t.node(e.v);return{sum:n.sum+r.weight*i.order,weight:n.weight+r.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}return{v:n}})}var r=t("../lodash");n.exports=e},{"../lodash":41}],46:[function(t,n){function e(t,n,e){var u=r(t),o=new a({compound:!0}).setGraph({root:u}).setDefaultNodeLabel(function(n){return t.node(n)});return i.each(t.nodes(),function(r){var a=t.node(r),s=t.parent(r);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(o.setNode(r),o.setParent(r,s||u),i.each(t[e](r),function(n){var e=n.v===r?n.w:n.v,a=o.edge(e,r),u=i.isUndefined(a)?0:a.weight;o.setEdge(e,r,{weight:t.edge(n).weight+u})}),i.has(a,"minRank")&&o.setNode(r,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),o}function r(t){for(var n;t.hasNode(n=i.uniqueId("_root")););return n}var i=t("../lodash"),a=t("../graphlib").Graph;n.exports=e},{"../graphlib":38,"../lodash":41}],47:[function(t,n){"use strict";function e(t,n){for(var e=0,i=1;i0;)n%2&&(e+=s[n+1]),n=n-1>>1,s[n]+=t.weight;c+=t.weight*e})),c}var i=t("../lodash");n.exports=e},{"../lodash":41}],48:[function(t,n){"use strict";function e(t){var n=d.maxRank(t),e=r(t,u.range(1,n+1),"inEdges"),c=r(t,u.range(n-1,-1,-1),"outEdges"),l=o(t);a(t,l);for(var h,f=Number.POSITIVE_INFINITY,p=0,g=0;4>g;++p,++g){i(p%2?e:c,p%4>=2),l=d.buildLayerMatrix(t);var y=s(t,l);f>y&&(g=0,h=u.cloneDeep(l),f=y)}a(t,h)}function r(t,n,e){return u.map(n,function(n){return l(t,n,e)})}function i(t,n){var e=new f;u.each(t,function(t){var r=t.graph().root,i=c(t,r,e,n);u.each(i.vs,function(n,e){t.node(n).order=e}),h(t,e,i.vs)})}function a(t,n){u.each(n,function(n){u.each(n,function(n,e){t.node(n).order=e})})}var u=t("../lodash"),o=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");n.exports=e},{"../graphlib":38,"../lodash":41,"../util":60,"./add-subgraph-constraints":44,"./build-layer-graph":46,"./cross-count":47,"./init-order":49,"./sort-subgraph":51}],49:[function(t,n){"use strict";function e(t){function n(i){if(!r.has(e,i)){e[i]=!0;var a=t.node(i);u[a.rank].push(i),r.each(t.successors(i),n)}}var e={},i=r.filter(t.nodes(),function(n){return!t.children(n).length}),a=r.max(r.map(i,function(n){return t.node(n).rank})),u=r.map(r.range(a+1),function(){return[]}),o=r.sortBy(i,function(n){return t.node(n).rank});return r.each(o,n),u}var r=t("../lodash");n.exports=e},{"../lodash":41}],50:[function(t,n){"use strict";function e(t,n){var e={};a.each(t,function(t,n){var r=e[t.v]={indegree:0,"in":[],out:[],vs:[t.v],i:n};a.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.each(n.edges(),function(t){var n=e[t.v],r=e[t.w];a.isUndefined(n)||a.isUndefined(r)||(r.indegree++,n.out.push(e[t.w]))});var i=a.filter(e,function(t){return!t.indegree});return r(i)}function r(t){function n(t){return function(n){n.merged||(a.isUndefined(n.barycenter)||a.isUndefined(t.barycenter)||n.barycenter>=t.barycenter)&&i(t,n)}}function e(n){return function(e){e["in"].push(n),0===--e.indegree&&t.push(e)}}for(var r=[];t.length;){var u=t.pop();r.push(u),a.each(u["in"].reverse(),n(u)),a.each(u.out,e(u))}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,n){var e=0,r=0;t.weight&&(e+=t.barycenter*t.weight,r+=t.weight),n.weight&&(e+=n.barycenter*n.weight,r+=n.weight),t.vs=n.vs.concat(t.vs),t.barycenter=e/r,t.weight=r,t.i=Math.min(n.i,t.i),n.merged=!0}var a=t("../lodash");n.exports=e},{"../lodash":41}],51:[function(t,n){function e(t,n,c,l){var h=t.children(n),f=t.node(n),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=u(t,h);a.each(y,function(n){if(t.children(n.v).length){var r=e(t,n.v,c,l);g[n.v]=r,a.has(r,"barycenter")&&i(n,r)}});var m=o(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 _=t.node(t.predecessors(d)[0]),b=t.node(t.predecessors(p)[0]);a.has(v,"barycenter")||(v.barycenter=0,v.weight=0),v.barycenter=(v.barycenter*v.weight+_.order+b.order)/(v.weight+2),v.weight+=2}return v}function r(t,n){a.each(t,function(t){t.vs=a.flatten(t.vs.map(function(t){return n[t]?n[t].vs:t}),!0)})}function i(t,n){a.isUndefined(t.barycenter)?(t.barycenter=n.barycenter,t.weight=n.weight):(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight)}var a=t("../lodash"),u=t("./barycenter"),o=t("./resolve-conflicts"),s=t("./sort");n.exports=e},{"../lodash":41,"./barycenter":45,"./resolve-conflicts":50,"./sort":52}],52:[function(t,n){function e(t,n){var e=u.partition(t,function(t){return a.has(t,"barycenter")}),o=e.lhs,s=a.sortBy(e.rhs,function(t){return-t.i}),c=[],l=0,h=0,f=0;o.sort(i(!!n)),f=r(c,s,f),a.each(o,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,n,e){for(var r;n.length&&(r=a.last(n)).i<=e;)n.pop(),t.push(r.vs),e++;return e}function i(t){return function(n,e){return n.barycentere.barycenter?1:t?e.i-n.i:n.i-e.i}}var a=t("../lodash"),u=t("../util");n.exports=e},{"../lodash":41,"../util":60}],53:[function(t,n){function e(t){var n=i(t);a.each(t.graph().dummyChains,function(e){for(var i=t.node(e),a=i.edgeObj,u=r(t,n,a.v,a.w),o=u.path,s=u.lca,c=0,l=o[c],h=!0;e!==a.w;){if(i=t.node(e),h){for(;(l=o[c])!==s&&t.node(l).maxRanks||c>n[i].lim));for(a=i,i=r;(i=t.parent(i))!==a;)o.push(i);return{path:u.concat(o.reverse()),lca:a}}function i(t){function n(i){var u=r;a.each(t.children(i),n),e[i]={low:u,lim:r++}}var e={},r=0;return a.each(t.children(),n),e}var a=t("./lodash");n.exports=e},{"./lodash":41}],54:[function(t,n){"use strict";function e(t,n){function e(n,e){var u=0,o=0,s=n.length,c=y.last(e);return y.each(e,function(n,l){var h=i(t,n),f=h?t.node(h).order:s;(h||n===c)&&(y.each(e.slice(o,l+1),function(n){y.each(t.predecessors(n),function(e){var i=t.node(e),o=i.order;!(u>o||o>f)||i.dummy&&t.node(n).dummy||a(r,e,n)})}),o=l+1,u=f)}),e}var r={};return y.reduce(n,e),r}function r(t,n){function e(n,e,r,u,o){var s;y.each(y.range(e,r),function(e){s=n[e],t.node(s).dummy&&y.each(t.predecessors(s),function(n){var e=t.node(n);e.dummy&&(e.ordero)&&a(i,n,s)})})}function r(n,r){var i,a=-1,u=0;return y.each(r,function(o,s){if("border"===t.node(o).dummy){var c=t.predecessors(o);c.length&&(i=t.node(c[0]).order,e(r,u,s,a,i),u=s,a=i)}e(r,u,r.length,i,n.length)}),r}var i={};return y.reduce(n,r),i}function i(t,n){return t.node(n).dummy?y.find(t.predecessors(n),function(n){return t.node(n).dummy}):void 0}function a(t,n,e){if(n>e){var r=n;n=e,e=r}var i=t[n];i||(t[n]=i={}),i[e]=!0}function u(t,n,e){if(n>e){var r=n;n=e,e=r}return y.has(t[n],e)}function o(t,n,e,r){var i={},a={},o={};return y.each(n,function(t){y.each(t,function(t,n){i[t]=t,a[t]=t,o[t]=n})}),y.each(n,function(t){var n=-1;y.each(t,function(t){var s=r(t);if(s.length){s=y.sortBy(s,function(t){return o[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&&nu.lim&&(o=u,s=!0);var c=p.filter(n.edges(),function(n){return s===d(t,t.node(n.v),o)&&s!==d(t,t.node(n.w),o)});return p.min(c,function(t){return y(n,t)})}function l(t,n,e,i){var a=e.v,o=e.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),u(t),r(t,n),h(t,n)}function h(t,n){var e=p.find(t.nodes(),function(t){return!n.node(t).parent}),r=v(t,e);r=r.slice(1),p.each(r,function(e){var r=t.node(e).parent,i=n.edge(e,r),a=!1;i||(i=n.edge(r,e),a=!0),n.node(e).rank=n.node(r).rank+(a?i.minlen:-i.minlen)})}function f(t,n,e){return t.hasEdge(n,e)}function d(t,n,e){return e.low<=n.lim&&n.lim<=e.lim}var p=t("../lodash"),g=t("./feasible-tree"),y=t("./util").slack,m=t("./util").longestPath,v=t("../graphlib").alg.preorder,_=t("../graphlib").alg.postorder,b=t("../util").simplify;n.exports=e,e.initLowLimValues=u,e.initCutValues=r,e.calcCutValue=a,e.leaveEdge=s,e.enterEdge=c,e.exchangeEdges=l},{"../graphlib":38,"../lodash":41,"../util":60,"./feasible-tree":56,"./util":59}],59:[function(t,n){"use strict";function e(t){function n(r){var a=t.node(r);if(i.has(e,r))return a.rank;e[r]=!0;var u=i.min(i.map(t.outEdges(r),function(e){return n(e.w)-t.edge(e).minlen}));return u===Number.POSITIVE_INFINITY&&(u=0),a.rank=u}var e={};i.each(t.sources(),n)}function r(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}var i=t("../lodash");n.exports={longestPath:e,slack:r}},{"../lodash":41}],60:[function(t,n){"use strict";function e(t,n,e,r){var i;do i=y.uniqueId(r);while(t.hasNode(i));return e.dummy=n,t.setNode(i,e),i}function r(t){var n=(new m).setGraph(t.graph());return y.each(t.nodes(),function(e){n.setNode(e,t.node(e))}),y.each(t.edges(),function(e){var r=n.edge(e.v,e.w)||{weight:0,minlen:1},i=t.edge(e);n.setEdge(e.v,e.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),n}function i(t){var n=new m({multigraph:t.isMultigraph()}).setGraph(t.graph());return y.each(t.nodes(),function(e){t.children(e).length||n.setNode(e,t.node(e))}),y.each(t.edges(),function(e){n.setEdge(e,t.edge(e))}),n}function a(t){var n=y.map(t.nodes(),function(n){var e={};return y.each(t.outEdges(n),function(n){e[n.w]=(e[n.w]||0)+t.edge(n).weight}),e});return y.zipObject(t.nodes(),n)}function u(t){var n=y.map(t.nodes(),function(n){var e={};return y.each(t.inEdges(n),function(n){e[n.v]=(e[n.v]||0)+t.edge(n).weight}),e});return y.zipObject(t.nodes(),n)}function o(t,n){var e=t.x,r=t.y,i=n.x-e,a=n.y-r,u=t.width/2,o=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)*u>Math.abs(i)*o?(0>a&&(o=-o),s=o*i/a,c=o):(0>i&&(u=-u),s=u,c=u*a/i),{x:e+s,y:r+c}}function s(t){var n=y.map(y.range(f(t)+1),function(){return[]});return y.each(t.nodes(),function(e){var r=t.node(e),i=r.rank;y.isUndefined(i)||(n[i][r.order]=e)}),n}function c(t){var n=y.min(y.map(t.nodes(),function(n){return t.node(n).rank}));y.each(t.nodes(),function(e){var r=t.node(e);y.has(r,"rank")&&(r.rank-=n)})}function l(t){var n=y.min(y.map(t.nodes(),function(n){return t.node(n).rank})),e=[];y.each(t.nodes(),function(r){var i=t.node(r).rank-n;e[i]||(e[i]=[]),e[i].push(r)});var r=0,i=t.graph().nodeRankFactor;y.each(e,function(n,e){y.isUndefined(n)&&e%i!==0?--r:r&&y.each(n,function(n){t.node(n).rank+=r})})}function h(t,n,r,i){var a={width:0,height:0};return arguments.length>=4&&(a.rank=r,a.order=i),e(t,"border",a,n)}function f(t){return y.max(y.map(t.nodes(),function(n){var e=t.node(n).rank;return y.isUndefined(e)?void 0:e}))}function d(t,n){var e={lhs:[],rhs:[]};return y.each(t,function(t){n(t)?e.lhs.push(t):e.rhs.push(t)}),e}function p(t,n){var e=y.now();try{return n()}finally{console.log(t+" time: "+(y.now()-e)+"ms")}}function g(t,n){return n()}var y=t("./lodash"),m=t("./graphlib").Graph;n.exports={addDummyNode:e,simplify:r,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:u,intersectRect:o,buildLayerMatrix:s,normalizeRanks:c,removeEmptyRanks:l,addBorderNode:h,maxRank:f,partition:d,time:p,notime:g}},{"./graphlib":38,"./lodash":41}],61:[function(t,n){n.exports="0.7.4"},{}],62:[function(t,n){n.exports=t(31)},{"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/lodash/index.js":31}],63:[function(t,n){var e=t("./lib");n.exports={Graph:e.Graph,json:t("./lib/json"),alg:t("./lib/alg"),version:e.version}},{"./lib":79,"./lib/alg":70,"./lib/json":80}],64:[function(t,n){function e(t){function n(a){r.has(i,a)||(i[a]=!0,e.push(a),r.each(t.successors(a),n),r.each(t.predecessors(a),n))}var e,i={},a=[];return r.each(t.nodes(),function(t){e=[],n(t),e.length&&a.push(e)}),a}var r=t("../lodash");n.exports=e},{"../lodash":81}],65:[function(t,n){function e(t,n,e){i.isArray(n)||(n=[n]);var a=[],u={};return i.each(n,function(n){if(!t.hasNode(n))throw new Error("Graph does not have node: "+n);r(t,n,"post"===e,u,a)}),a}function r(t,n,e,a,u){i.has(a,n)||(a[n]=!0,e||u.push(n),i.each(t.neighbors(n),function(n){r(t,n,e,a,u)}),e&&u.push(n))}var i=t("../lodash");n.exports=e},{"../lodash":81}],66:[function(t,n){function e(t,n,e){return i.transform(t.nodes(),function(i,a){i[a]=r(t,a,n,e)},{})}var r=t("./dijkstra"),i=t("../lodash");n.exports=e},{"../lodash":81,"./dijkstra":67}],67:[function(t,n){function e(t,n,e,i){return r(t,String(n),e||u,i||function(n){return t.outEdges(n)})}function r(t,n,e,r){var i,u,o={},s=new a,c=function(t){var n=t.v!==i?t.v:t.w,r=o[n],a=e(t),c=u.distance+a;if(0>a)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c0&&(i=s.removeMin(),u=o[i],u.distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return o}var i=t("../lodash"),a=t("../data/priority-queue");n.exports=e;var u=i.constant(1)},{"../data/priority-queue":77,"../lodash":81}],68:[function(t,n){function e(t){return r.filter(i(t),function(n){return n.length>1||1===n.length&&t.hasEdge(n[0],n[0])})}var r=t("../lodash"),i=t("./tarjan");n.exports=e},{"../lodash":81,"./tarjan":75}],69:[function(t,n){function e(t,n,e){return r(t,n||a,e||function(n){return t.outEdges(n)})}function r(t,n,e){var r={},i=t.nodes();return i.forEach(function(t){r[t]={},r[t][t]={distance:0},i.forEach(function(n){t!==n&&(r[t][n]={distance:Number.POSITIVE_INFINITY})}),e(t).forEach(function(e){var i=e.v===t?e.w:e.v,a=n(e);r[t][i]={distance:a,predecessor:t}})}),i.forEach(function(t){var n=r[t];i.forEach(function(e){var a=r[e];i.forEach(function(e){var r=a[t],i=n[e],u=a[e],o=r.distance+i.distance;oi&&(s[e]=u,c.decrease(e,i))}}var u,o=new i,s={},c=new a;if(0===t.nodeCount())return o;r.each(t.nodes(),function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)}),c.decrease(t.nodes()[0],0);for(var l=!1;c.size()>0;){if(u=c.removeMin(),r.has(s,u))o.setEdge(u,s[u]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(u).forEach(e)}return o}var r=t("../lodash"),i=t("../graph"),a=t("../data/priority-queue");n.exports=e},{"../data/priority-queue":77,"../graph":78,"../lodash":81}],75:[function(t,n){function e(t){function n(o){var s=a[o]={onStack:!0,lowlink:e,index:e++};if(i.push(o),t.successors(o).forEach(function(t){r.has(a,t)?a[t].onStack&&(s.lowlink=Math.min(s.lowlink,a[t].index)):(n(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(o!==c);u.push(l)}}var e=0,i=[],a={},u=[];return t.nodes().forEach(function(t){r.has(a,t)||n(t)}),u}var r=t("../lodash");n.exports=e},{"../lodash":81}],76:[function(t,n){function e(t){function n(o){if(i.has(a,o))throw new r;i.has(e,o)||(a[o]=!0,e[o]=!0,i.each(t.predecessors(o),n),delete a[o],u.push(o))}var e={},a={},u=[];if(i.each(t.sinks(),n),i.size(e)!==t.nodeCount())throw new r;return u}function r(){}var i=t("../lodash");n.exports=e,e.CycleException=r},{"../lodash":81}],77:[function(t,n){function e(){this._arr=[],this._keyIndices={}}var r=t("../lodash");n.exports=e,e.prototype.size=function(){return this._arr.length},e.prototype.keys=function(){return this._arr.map(function(t){return t.key})},e.prototype.has=function(t){return r.has(this._keyIndices,t)},e.prototype.priority=function(t){var n=this._keyIndices[t];return void 0!==n?this._arr[n].priority:void 0},e.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},e.prototype.add=function(t,n){var e=this._keyIndices;if(t=String(t),!r.has(e,t)){var i=this._arr,a=i.length;return e[t]=a,i.push({key:t,priority:n}),this._decrease(a),!0}return!1},e.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},e.prototype.decrease=function(t,n){var e=this._keyIndices[t];if(n>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+n);this._arr[e].priority=n,this._decrease(e)},e.prototype._heapify=function(t){var n=this._arr,e=2*t,r=e+1,i=t;e>1,!(e[n].prioritya){var u=i;i=a,a=u}return i+h+a+h+(s.isUndefined(r)?c:r)}function u(t,n,e,r){var i=""+n,a=""+e;if(!t&&i>a){var u=i;i=a,a=u}var o={v:i,w:a};return r&&(o.name=r),o}function o(t,n){return a(t,n.v,n.w,n.name)}var s=t("./lodash");n.exports=e;var c="\x00",l="\x00",h="";e.prototype._nodeCount=0,e.prototype._edgeCount=0,e.prototype.isDirected=function(){return this._isDirected},e.prototype.isMultigraph=function(){return this._isMultigraph},e.prototype.isCompound=function(){return this._isCompound},e.prototype.setGraph=function(t){return this._label=t,this},e.prototype.graph=function(){return this._label},e.prototype.setDefaultNodeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultNodeLabelFn=t,this},e.prototype.nodeCount=function(){return this._nodeCount},e.prototype.nodes=function(){return s.keys(this._nodes)},e.prototype.sources=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._in[t])},this)},e.prototype.sinks=function(){return s.filter(this.nodes(),function(t){return s.isEmpty(this._out[t])},this)},e.prototype.setNodes=function(t,n){var e=arguments;return s.each(t,function(t){e.length>1?this.setNode(t,n):this.setNode(t)},this),this},e.prototype.setNode=function(t,n){return s.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n: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)},e.prototype.node=function(t){return this._nodes[t]},e.prototype.hasNode=function(t){return s.has(this._nodes,t)},e.prototype.removeNode=function(t){var n=this;if(s.has(this._nodes,t)){var e=function(t){n.removeEdge(n._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]),e),delete this._in[t],delete this._preds[t],s.each(s.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},e.prototype.setParent=function(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(s.isUndefined(n))n=l;else{n+="";for(var e=n;!s.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+n+" as parent of "+t+" would create create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this},e.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},e.prototype.parent=function(t){if(this._isCompound){var n=this._parent[t];if(n!==l)return n}},e.prototype.children=function(t){if(s.isUndefined(t)&&(t=l),this._isCompound){var n=this._children[t];if(n)return s.keys(n)}else{if(t===l)return this.nodes();if(this.hasNode(t))return[]}},e.prototype.predecessors=function(t){var n=this._preds[t];return n?s.keys(n):void 0},e.prototype.successors=function(t){var n=this._sucs[t];return n?s.keys(n):void 0},e.prototype.neighbors=function(t){var n=this.predecessors(t);return n?s.union(n,this.successors(t)):void 0},e.prototype.filterNodes=function(t){function n(t){var a=r.parent(t);return void 0===a||e.hasNode(a)?(i[t]=a,a):a in i?i[a]:n(a)}var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph()),s.each(this._nodes,function(n,r){t(r)&&e.setNode(r,n)},this),s.each(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,this.edge(t))},this);var r=this,i={};return this._isCompound&&s.each(e.nodes(),function(t){e.setParent(t,n(t))}),e},e.prototype.setDefaultEdgeLabel=function(t){return s.isFunction(t)||(t=s.constant(t)),this._defaultEdgeLabelFn=t,this},e.prototype.edgeCount=function(){return this._edgeCount},e.prototype.edges=function(){return s.values(this._edgeObjs)},e.prototype.setPath=function(t,n){var e=this,r=arguments;return s.reduce(t,function(t,i){return r.length>1?e.setEdge(t,i,n):e.setEdge(t,i),i}),this},e.prototype.setEdge=function(){var t,n,e,i,o=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,n=c.w,e=c.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=c,n=arguments[1],e=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,n=""+n,s.isUndefined(e)||(e=""+e);var l=a(this._isDirected,t,n,e);if(s.has(this._edgeLabels,l))return o&&(this._edgeLabels[l]=i),this;if(!s.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[l]=o?i:this._defaultEdgeLabelFn(t,n,e);var h=u(this._isDirected,t,n,e);return t=h.v,n=h.w,Object.freeze(h),this._edgeObjs[l]=h,r(this._preds[n],t),r(this._sucs[t],n),this._in[n][l]=h,this._out[t][l]=h,this._edgeCount++,this},e.prototype.edge=function(t,n,e){var r=1===arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,t,n,e);return this._edgeLabels[r]},e.prototype.hasEdge=function(t,n,e){var r=1===arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,t,n,e);return s.has(this._edgeLabels,r)},e.prototype.removeEdge=function(t,n,e){var r=1===arguments.length?o(this._isDirected,arguments[0]):a(this._isDirected,t,n,e),u=this._edgeObjs[r];return u&&(t=u.v,n=u.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[n],t),i(this._sucs[t],n),delete this._in[n][r],delete this._out[t][r],this._edgeCount--),this},e.prototype.inEdges=function(t,n){var e=this._in[t];if(e){var r=s.values(e);return n?s.filter(r,function(t){return t.v===n}):r}},e.prototype.outEdges=function(t,n){var e=this._out[t];if(e){var r=s.values(e);return n?s.filter(r,function(t){return t.w===n}):r}},e.prototype.nodeEdges=function(t,n){var e=this.inEdges(t,n);return e?e.concat(this.outEdges(t,n)):void 0}},{"./lodash":81}],79:[function(t,n){n.exports={Graph:t("./graph"),version:t("./version")}},{"./graph":78,"./version":82}],80:[function(t,n){function e(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:r(t),edges:i(t)};return u.isUndefined(t.graph())||(n.value=u.clone(t.graph())),n}function r(t){return u.map(t.nodes(),function(n){var e=t.node(n),r=t.parent(n),i={v:n};return u.isUndefined(e)||(i.value=e),u.isUndefined(r)||(i.parent=r),i})}function i(t){return u.map(t.edges(),function(n){var e=t.edge(n),r={v:n.v,w:n.w};return u.isUndefined(n.name)||(r.name=n.name),u.isUndefined(e)||(r.value=e),r})}function a(t){var n=new o(t.options).setGraph(t.value);return u.each(t.nodes,function(t){n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)}),u.each(t.edges,function(t){n.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),n}var u=t("./lodash"),o=t("./graph");n.exports={write:e,read:a}},{"./graph":78,"./lodash":81}],81:[function(t,n){n.exports=t(41)},{"/Users/knut/source/mermaid/node_modules/dagre/lib/lodash.js":41,lodash:83}],82:[function(t,n){n.exports="1.0.7"},{}],83:[function(t,n){n.exports=t(31)},{"/Users/knut/source/mermaid/node_modules/dagre-d3/node_modules/lodash/index.js":31}],84:[function(t,n,e){(function(t){(function(){function r(t,n){return t.set(n[0],n[1]),t}function i(t,n){return t.add(n),t}function a(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function u(t,n,e,r){for(var i=-1,a=null==t?0:t.length;++i-1}function f(t,n,e){for(var r=-1,i=null==t?0:t.length;++r-1;);return e}function P(t,n){for(var e=t.length;e--&&w(n,t[e],0)>-1;);return e}function R(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}function j(t){return"\\"+tr[t]}function Y(t,n){return null==t?et:t[n]}function $(t){return qe.test(t)}function U(t){return Ge.test(t)}function z(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}function W(t){var n=-1,e=Array(t.size);return t.forEach(function(t,r){e[++n]=[r,t]}),e}function q(t,n){return function(e){return t(n(e))}}function G(t,n){for(var e=-1,r=t.length,i=0,a=[];++e>>1,jt=[["ary",wt],["bind",gt],["bindKey",yt],["curry",vt],["curryRight",_t],["flip",kt],["partial",bt],["partialRight",xt],["rearg",At]],Yt="[object Arguments]",$t="[object Array]",Ut="[object AsyncFunction]",zt="[object Boolean]",Wt="[object Date]",qt="[object DOMException]",Gt="[object Error]",Vt="[object Function]",Ht="[object GeneratorFunction]",Zt="[object Map]",Xt="[object Number]",Kt="[object Null]",Jt="[object Object]",Qt="[object Promise]",tn="[object Proxy]",nn="[object RegExp]",en="[object Set]",rn="[object String]",an="[object Symbol]",un="[object Undefined]",on="[object WeakMap]",sn="[object WeakSet]",cn="[object ArrayBuffer]",ln="[object DataView]",hn="[object Float32Array]",fn="[object Float64Array]",dn="[object Int8Array]",pn="[object Int16Array]",gn="[object Int32Array]",yn="[object Uint8Array]",mn="[object Uint8ClampedArray]",vn="[object Uint16Array]",_n="[object Uint32Array]",bn=/\b__p \+= '';/g,xn=/\b(__p \+=) '' \+/g,wn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,An=/&(?:amp|lt|gt|quot|#39);/g,kn=/[&<>"']/g,En=RegExp(An.source),Mn=RegExp(kn.source),Sn=/<%-([\s\S]+?)%>/g,Dn=/<%([\s\S]+?)%>/g,Tn=/<%=([\s\S]+?)%>/g,Cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Fn=/^\w*$/,On=/^\./,Ln=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,In=/[\\^$.*+?()[\]{}|]/g,Bn=RegExp(In.source),Nn=/^\s+|\s+$/g,Pn=/^\s+/,Rn=/\s+$/,jn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Yn=/\{\n\/\* \[wrapped with (.+)\] \*/,$n=/,? & /,Un=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,zn=/\\(\\)?/g,Wn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,qn=/\w*$/,Gn=/^[-+]0x[0-9a-f]+$/i,Vn=/^0b[01]+$/i,Hn=/^\[object .+?Constructor\]$/,Zn=/^0o[0-7]+$/i,Xn=/^(?:0|[1-9]\d*)$/,Kn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jn=/($^)/,Qn=/['\n\r\u2028\u2029\\]/g,te="\\ud800-\\udfff",ne="\\u0300-\\u036f",ee="\\ufe20-\\ufe2f",re="\\u20d0-\\u20ff",ie=ne+ee+re,ae="\\u2700-\\u27bf",ue="a-z\\xdf-\\xf6\\xf8-\\xff",oe="\\xac\\xb1\\xd7\\xf7",se="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ce="\\u2000-\\u206f",le=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",he="A-Z\\xc0-\\xd6\\xd8-\\xde",fe="\\ufe0e\\ufe0f",de=oe+se+ce+le,pe="['’]",ge="["+te+"]",ye="["+de+"]",me="["+ie+"]",ve="\\d+",_e="["+ae+"]",be="["+ue+"]",xe="[^"+te+de+ve+ae+ue+he+"]",we="\\ud83c[\\udffb-\\udfff]",Ae="(?:"+me+"|"+we+")",ke="[^"+te+"]",Ee="(?:\\ud83c[\\udde6-\\uddff]){2}",Me="[\\ud800-\\udbff][\\udc00-\\udfff]",Se="["+he+"]",De="\\u200d",Te="(?:"+be+"|"+xe+")",Ce="(?:"+Se+"|"+xe+")",Fe="(?:"+pe+"(?:d|ll|m|re|s|t|ve))?",Oe="(?:"+pe+"(?:D|LL|M|RE|S|T|VE))?",Le=Ae+"?",Ie="["+fe+"]?",Be="(?:"+De+"(?:"+[ke,Ee,Me].join("|")+")"+Ie+Le+")*",Ne="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Pe="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",Re=Ie+Le+Be,je="(?:"+[_e,Ee,Me].join("|")+")"+Re,Ye="(?:"+[ke+me+"?",me,Ee,Me,ge].join("|")+")",$e=RegExp(pe,"g"),Ue=RegExp(me,"g"),ze=RegExp(we+"(?="+we+")|"+Ye+Re,"g"),We=RegExp([Se+"?"+be+"+"+Fe+"(?="+[ye,Se,"$"].join("|")+")",Ce+"+"+Oe+"(?="+[ye,Se+Te,"$"].join("|")+")",Se+"?"+Te+"+"+Fe,Se+"+"+Oe,Pe,Ne,ve,je].join("|"),"g"),qe=RegExp("["+De+te+ie+fe+"]"),Ge=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ve=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],He=-1,Ze={};Ze[hn]=Ze[fn]=Ze[dn]=Ze[pn]=Ze[gn]=Ze[yn]=Ze[mn]=Ze[vn]=Ze[_n]=!0,Ze[Yt]=Ze[$t]=Ze[cn]=Ze[zt]=Ze[ln]=Ze[Wt]=Ze[Gt]=Ze[Vt]=Ze[Zt]=Ze[Xt]=Ze[Jt]=Ze[nn]=Ze[en]=Ze[rn]=Ze[on]=!1;var Xe={};Xe[Yt]=Xe[$t]=Xe[cn]=Xe[ln]=Xe[zt]=Xe[Wt]=Xe[hn]=Xe[fn]=Xe[dn]=Xe[pn]=Xe[gn]=Xe[Zt]=Xe[Xt]=Xe[Jt]=Xe[nn]=Xe[en]=Xe[rn]=Xe[an]=Xe[yn]=Xe[mn]=Xe[vn]=Xe[_n]=!0,Xe[Gt]=Xe[Vt]=Xe[on]=!1;var Ke={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Je={"&":"&","<":"<",">":">",'"':""","'":"'"},Qe={"&":"&","<":"<",">":">",""":'"',"'":"'"},tr={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nr=parseFloat,er=parseInt,rr="object"==typeof t&&t&&t.Object===Object&&t,ir="object"==typeof self&&self&&self.Object===Object&&self,ar=rr||ir||Function("return this")(),ur="object"==typeof e&&e&&!e.nodeType&&e,or=ur&&"object"==typeof n&&n&&!n.nodeType&&n,sr=or&&or.exports===ur,cr=sr&&rr.process,lr=function(){try{return cr&&cr.binding&&cr.binding("util")}catch(t){}}(),hr=lr&&lr.isArrayBuffer,fr=lr&&lr.isDate,dr=lr&&lr.isMap,pr=lr&&lr.isRegExp,gr=lr&&lr.isSet,yr=lr&&lr.isTypedArray,mr=M("length"),vr=S(Ke),_r=S(Je),br=S(Qe),xr=function Ar(t){function n(t){if(cs(t)&&!xf(t)&&!(t instanceof S)){if(t instanceof v)return t;if(bl.call(t,"__wrapped__"))return au(t)}return new v(t)}function e(){}function v(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=et}function S(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Nt,this.__views__=[]}function Z(){var t=new S(this.__wrapped__);return t.__actions__=Yi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Yi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Yi(this.__views__),t}function Q(){if(this.__filtered__){var t=new S(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function tt(){var t=this.__wrapped__.value(),n=this.__dir__,e=xf(t),r=0>n,i=e?t.length:0,a=Ta(0,i,this.__views__),u=a.start,o=a.end,s=o-u,c=r?o:u-1,l=this.__iteratees__,h=l.length,f=0,d=Xl(s,this.__takeCount__);if(!e||!r&&i==s&&d==s)return xi(t,this.__actions__);var p=[];t:for(;s--&&d>f;){c+=n;for(var g=-1,y=t[c];++ge)return!1;var r=n.length-1;return e==r?n.pop():Il.call(n,e,1),--this.size,!0}function se(t){var n=this.__data__,e=Oe(n,t);return 0>e?et:n[e][1]}function ce(t){return Oe(this.__data__,t)>-1}function le(t,n){var e=this.__data__,r=Oe(e,t);return 0>r?(++this.size,e.push([t,n])):e[r][1]=n,this}function he(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n=t?t:e),n!==et&&(t=t>=n?t:n)),t}function je(t,n,e,r,i,a){var u,s=n<,c=n&ht,l=n&ft;if(e&&(u=i?e(t,r,i,a):e(t)),u!==et)return u;if(!ss(t))return t;var h=xf(t);if(h){if(u=Oa(t),!s)return Yi(t,u)}else{var f=Ch(t),d=f==Vt||f==Ht;if(Af(t))return Di(t,s);if(f==Jt||f==Yt||d&&!i){if(u=c||d?{}:La(t),!s)return c?zi(t,Be(u,t)):Ui(t,Ie(u,t))}else{if(!Xe[f])return i?t:{};u=Ia(t,f,je,s)}}a||(a=new be);var p=a.get(t);if(p)return p;a.set(t,u);var g=l?c?xa:ba:c?qs:Ws,y=h?et:g(t);return o(y||t,function(r,i){y&&(i=r,r=t[i]),Fe(u,i,je(r,n,e,i,t,a))}),u}function Ye(t){var n=Ws(t);return function(e){return ze(e,t,n)}}function ze(t,n,e){var r=e.length;if(null==t)return!r;for(t=hl(t);r--;){var i=e[r],a=n[i],u=t[i];if(u===et&&!(i in t)||!a(u))return!1}return!0}function We(t,n,e){if("function"!=typeof t)throw new pl(ut);return Lh(function(){t.apply(et,e)},n)}function qe(t,n,e,r){var i=-1,a=h,u=!0,o=t.length,s=[],c=n.length;if(!o)return s;e&&(n=d(n,L(e))),r?(a=f,u=!1):n.length>=it&&(a=B,u=!1,n=new me(n));t:for(;++ie&&(e=-e>i?0:i+e),r=r===et||r>i?i:Ms(r),0>r&&(r+=i),r=e>r?0:Ss(r);r>e;)t[e++]=n;return t}function Qe(t,n){var e=[];return vh(t,function(t,r,i){n(t,r,i)&&e.push(t)}),e}function tr(t,n,e,r,i){var a=-1,u=t.length;for(e||(e=Na),i||(i=[]);++a0&&e(o)?n>1?tr(o,n-1,e,r,i):p(i,o):r||(i[i.length]=o)}return i}function rr(t,n){return t&&bh(t,n,Ws)}function ir(t,n){return t&&xh(t,n,Ws)}function ur(t,n){return l(n,function(n){return as(t[n])})}function or(t,n){n=Mi(n,t);for(var e=0,r=n.length;null!=t&&r>e;)t=t[eu(n[e++])];return e&&e==r?t:et}function cr(t,n,e){var r=n(t);return xf(t)?r:p(r,e(t))}function lr(t){return null==t?t===et?un:Kt:Pl&&Pl in hl(t)?Da(t):Za(t)}function mr(t,n){return t>n}function xr(t,n){return null!=t&&bl.call(t,n)}function kr(t,n){return null!=t&&n in hl(t)}function Er(t,n,e){return t>=Xl(n,e)&&t=120&&l.length>=120)?new me(u&&l):et}l=t[0];var p=-1,g=o[0];t:for(;++pt}function Wr(t,n){var e=-1,r=Xo(t)?ul(t.length):[];return vh(t,function(t,i,a){r[++e]=n(t,i,a)}),r}function qr(t){var n=Ma(t);return 1==n.length&&n[0][2]?qa(n[0][0],n[0][1]):function(e){return e===t||Br(e,t,n)}}function Gr(t,n){return ja(t)&&Wa(n)?qa(eu(t),n):function(e){var r=$s(e,t);return r===et&&r===n?zs(e,t):Or(n,r,dt|pt)}}function Vr(t,n,e,r,i){t!==n&&bh(n,function(a,u){if(ss(a))i||(i=new be),Hr(t,n,u,e,Vr,r,i);else{var o=r?r(t[u],a,u+"",t,n,i):et;o===et&&(o=a),Ce(t,u,o)}},qs)}function Hr(t,n,e,r,i,a,u){var o=t[e],s=n[e],c=u.get(s);if(c)return void Ce(t,e,c);var l=a?a(o,s,e+"",t,n,u):et,h=l===et;if(h){var f=xf(s),d=!f&&Af(s),p=!f&&!d&&Df(s);l=s,f||d||p?xf(o)?l=o:Ko(o)?l=Yi(o):d?(h=!1,l=Di(s,!0)):p?(h=!1,l=Bi(s,!0)):l=[]:ms(s)||bf(s)?(l=o,bf(o)?l=Ts(o):(!ss(o)||r&&as(o))&&(l=La(s))):h=!1}h&&(u.set(s,l),i(l,s,r,a,u),u["delete"](s)),Ce(t,e,l)}function Zr(t,n){var e=t.length;if(e)return n+=0>n?e:0,Pa(n,e)?t[n]:et}function Xr(t,n,e){var r=-1;n=d(n.length?n:[Ic],L(ka()));var i=Wr(t,function(t){var e=d(n,function(n){return n(t)});return{criteria:e,index:++r,value:t}});return T(i,function(t,n){return Pi(t,n,e)})}function Kr(t,n){return Jr(t,n,function(n,e){return zs(t,e)})}function Jr(t,n,e){for(var r=-1,i=n.length,a={};++r-1;)o!==t&&Il.call(o,s,1),Il.call(t,s,1);return t}function ni(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==a){var a=i;Pa(i)?Il.call(t,i,1):vi(t,i)}}return t}function ei(t,n){return t+zl(Ql()*(n-t+1))}function ri(t,n,e,r){for(var i=-1,a=Zl(Ul((n-t)/(e||1)),0),u=ul(a);a--;)u[r?a:++i]=t,t+=e;return u}function ii(t,n){var e="";if(!t||1>n||n>Lt)return e;do n%2&&(e+=t),n=zl(n/2),n&&(t+=t);while(n);return e}function ai(t,n){return Ih(Xa(t,n,Ic),t+"")}function ui(t){return Se(rc(t))}function oi(t,n){var e=rc(t);return nu(e,Re(n,0,e.length))}function si(t,n,e,r){if(!ss(t))return t;n=Mi(n,t);for(var i=-1,a=n.length,u=a-1,o=t;null!=o&&++in&&(n=-n>i?0:i+n),e=e>i?i:e,0>e&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var a=ul(i);++r=i){for(;i>r;){var a=r+i>>>1,u=t[a];null!==u&&!bs(u)&&(e?n>=u:n>u)?r=a+1:i=a}return i}return di(t,n,Ic,e)}function di(t,n,e,r){n=e(n);for(var i=0,a=null==t?0:t.length,u=n!==n,o=null===n,s=bs(n),c=n===et;a>i;){var l=zl((i+a)/2),h=e(t[l]),f=h!==et,d=null===h,p=h===h,g=bs(h);if(u)var y=r||p;else y=c?p&&(r||f):o?p&&f&&(r||!d):s?p&&f&&!d&&(r||!g):d||g?!1:r?n>=h:n>h;y?i=l+1:a=l}return Xl(a,Pt)}function pi(t,n){for(var e=-1,r=t.length,i=0,a=[];++e=it){var c=n?null:Mh(t);if(c)return V(c);u=!1,i=B,s=new me}else s=n?[]:o;t:for(;++rr)return r?mi(t[0]):[];for(var i=-1,a=ul(r);++ir?n[r]:et;e(u,t[r],o)}return u}function ki(t){return Ko(t)?t:[]}function Ei(t){return"function"==typeof t?t:Ic}function Mi(t,n){return xf(t)?t:ja(t,n)?[t]:Bh(Fs(t))}function Si(t,n,e){var r=t.length;return e=e===et?r:e,!n&&e>=r?t:li(t,n,e)}function Di(t,n){if(n)return t.slice();var e=t.length,r=Cl?Cl(e):new t.constructor(e);return t.copy(r),r}function Ti(t){var n=new t.constructor(t.byteLength);return new Tl(n).set(new Tl(t)),n}function Ci(t,n){var e=n?Ti(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}function Fi(t,n,e){var i=n?e(W(t),lt):W(t);return g(i,r,new t.constructor)}function Oi(t){var n=new t.constructor(t.source,qn.exec(t));return n.lastIndex=t.lastIndex,n}function Li(t,n,e){var r=n?e(V(t),lt):V(t);return g(r,i,new t.constructor)}function Ii(t){return gh?hl(gh.call(t)):{}}function Bi(t,n){var e=n?Ti(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Ni(t,n){if(t!==n){var e=t!==et,r=null===t,i=t===t,a=bs(t),u=n!==et,o=null===n,s=n===n,c=bs(n);if(!o&&!c&&!a&&t>n||a&&u&&s&&!o&&!c||r&&u&&s||!e&&s||!i)return 1;if(!r&&!a&&!c&&n>t||c&&e&&i&&!r&&!a||o&&e&&i||!u&&i||!s)return-1}return 0}function Pi(t,n,e){for(var r=-1,i=t.criteria,a=n.criteria,u=i.length,o=e.length;++r=o)return s;var c=e[r];return s*("desc"==c?-1:1)}}return t.index-n.index}function Ri(t,n,e,r){for(var i=-1,a=t.length,u=e.length,o=-1,s=n.length,c=Zl(a-u,0),l=ul(s+c),h=!r;++oi)&&(l[e[i]]=t[i]);for(;c--;)l[o++]=t[i++];return l}function ji(t,n,e,r){for(var i=-1,a=t.length,u=-1,o=e.length,s=-1,c=n.length,l=Zl(a-o,0),h=ul(l+c),f=!r;++ii)&&(h[d+e[u]]=t[i++]);return h}function Yi(t,n){var e=-1,r=t.length;for(n||(n=ul(r));++e1?e[i-1]:et,u=i>2?e[2]:et;for(a=t.length>3&&"function"==typeof a?(i--,a):et,u&&Ra(e[0],e[1],u)&&(a=3>i?et:a,i=1),n=hl(n);++ru&&o[0]!==c&&o[u-1]!==c?[]:G(o,c);if(u-=l.length,e>u)return ca(t,n,na,r.placeholder,et,o,l,et,et,e-u);var h=this&&this!==ar&&this instanceof r?i:t;return a(h,this,o)}var i=Ki(t);return r}function Qi(t){return function(n,e,r){var i=hl(n);if(!Xo(n)){var a=ka(e,3);n=Ws(n),e=function(t){return a(i[t],t,i)}}var u=t(n,e,r);return u>-1?i[a?n[u]:u]:et}}function ta(t){return _a(function(n){var e=n.length,r=e,i=v.prototype.thru;for(t&&n.reverse();r--;){var a=n[r];if("function"!=typeof a)throw new pl(ut);if(i&&!u&&"wrapper"==wa(a))var u=new v([],!0)}for(r=u?r:e;++rm){var w=G(v,b);return ca(t,n,na,l.placeholder,e,v,w,o,s,c-m)}var A=f?e:this,k=d?A[t]:t;return m=v.length,o?v=Ja(v,o):g&&m>1&&v.reverse(),h&&m>s&&(v.length=s),this&&this!==ar&&this instanceof l&&(k=y||Ki(k)),k.apply(A,v)}var h=n&wt,f=n>,d=n&yt,p=n&(vt|_t),g=n&kt,y=d?et:Ki(t);return l}function ea(t,n){return function(e,r){return Sr(e,t,n(r),{})}}function ra(t,n){return function(e,r){var i;if(e===et&&r===et)return n;if(e!==et&&(i=e),r!==et){if(i===et)return r;"string"==typeof e||"string"==typeof r?(e=yi(e),r=yi(r)):(e=gi(e),r=gi(r)),i=t(e,r)}return i}}function ia(t){return _a(function(n){return n=d(n,L(ka())),ai(function(e){var r=this;return t(n,function(t){return a(t,r,e)})})})}function aa(t,n){n=n===et?" ":yi(n);var e=n.length;if(2>e)return e?ii(n,t):n;var r=ii(n,Ul(t/K(n)));return $(n)?Si(J(r),0,t).join(""):r.slice(0,t)}function ua(t,n,e,r){function i(){for(var n=-1,s=arguments.length,c=-1,l=r.length,h=ul(l+s),f=this&&this!==ar&&this instanceof i?o:t;++cn?1:-1:Es(r),ri(n,e,r,t)}}function sa(t){return function(n,e){return("string"!=typeof n||"string"!=typeof e)&&(n=Ds(n),e=Ds(e)),t(n,e)}}function ca(t,n,e,r,i,a,u,o,s,c){var l=n&vt,h=l?u:et,f=l?et:u,d=l?a:et,p=l?et:a;n|=l?bt:xt,n&=~(l?xt:bt),n&mt||(n&=~(gt|yt));var g=[t,n,i,d,h,p,f,o,s,c],y=e.apply(et,g);return $a(t)&&Oh(y,g),y.placeholder=r,Qa(y,t,n)}function la(t){var n=ll[t];return function(t,e){if(t=Ds(t),e=null==e?0:Xl(Ms(e),292)){var r=(Fs(t)+"e").split("e"),i=n(r[0]+"e"+(+r[1]+e));return r=(Fs(i)+"e").split("e"),+(r[0]+"e"+(+r[1]-e))}return n(t)}}function ha(t){return function(n){var e=Ch(n);return e==Zt?W(n):e==en?H(n):O(n,t(n))}}function fa(t,n,e,r,i,a,u,o){var s=n&yt;if(!s&&"function"!=typeof t)throw new pl(ut);var c=r?r.length:0;if(c||(n&=~(bt|xt),r=i=et),u=u===et?u:Zl(Ms(u),0),o=o===et?o:Ms(o),c-=i?i.length:0,n&xt){var l=r,h=i;r=i=et}var f=s?et:Sh(t),d=[t,n,e,r,i,l,h,a,u,o];if(f&&Va(d,f),t=d[0],n=d[1],e=d[2],r=d[3],i=d[4],o=d[9]=d[9]===et?s?0:t.length:Zl(d[9]-c,0),!o&&n&(vt|_t)&&(n&=~(vt|_t)),n&&n!=gt)p=n==vt||n==_t?Ji(t,n,o):n!=bt&&n!=(gt|bt)||i.length?na.apply(et,d):ua(t,n,e,r);else var p=Hi(t,n,e);var g=f?wh:Oh;return Qa(g(p,d),t,n)}function da(t,n,e,r){return t===et||Zo(t,ml[e])&&!bl.call(r,e)?n:t}function pa(t,n,e,r,i,a){return ss(t)&&ss(n)&&(a.set(n,t),Vr(t,n,et,pa,a),a["delete"](n)),t}function ga(t){return ms(t)?et:t}function ya(t,n,e,r,i,a){var u=e&dt,o=t.length,s=n.length;if(o!=s&&!(u&&s>o))return!1;var c=a.get(t);if(c&&a.get(n))return c==n;var l=-1,h=!0,f=e&pt?new me:et;for(a.set(t,n),a.set(n,t);++l1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(jn,"{\n/* [wrapped with "+n+"] */\n")}function Na(t){return xf(t)||bf(t)||!!(Bl&&t&&t[Bl])}function Pa(t,n){return n=null==n?Lt:n,!!n&&("number"==typeof t||Xn.test(t))&&t>-1&&t%1==0&&n>t}function Ra(t,n,e){if(!ss(e))return!1;var r=typeof n;return("number"==r?Xo(e)&&Pa(n,e.length):"string"==r&&n in e)?Zo(e[n],t):!1}function ja(t,n){if(xf(t))return!1;var e=typeof t;return"number"==e||"symbol"==e||"boolean"==e||null==t||bs(t)?!0:Fn.test(t)||!Cn.test(t)||null!=n&&t in hl(n)}function Ya(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}function $a(t){var e=wa(t),r=n[e];if("function"!=typeof r||!(e in S.prototype))return!1;if(t===r)return!0;var i=Sh(r);return!!i&&t===i[0]}function Ua(t){return!!wl&&wl in t}function za(t){var n=t&&t.constructor,e="function"==typeof n&&n.prototype||ml;return t===e}function Wa(t){return t===t&&!ss(t)}function qa(t,n){return function(e){return null==e?!1:e[t]===n&&(n!==et||t in hl(e))}}function Ga(t){var n=Bo(t,function(t){return e.size===st&&e.clear(),t}),e=n.cache;return n}function Va(t,n){var e=t[1],r=n[1],i=e|r,a=(gt|yt|wt)>i,u=r==wt&&e==vt||r==wt&&e==At&&t[7].length<=n[8]||r==(wt|At)&&n[7].length<=n[8]&&e==vt;if(!a&&!u)return t;r>&&(t[2]=n[2],i|=e>?0:mt);var o=n[3];if(o){var s=t[3];t[3]=s?Ri(s,o,n[4]):o,t[4]=s?G(t[3],ct):n[4]}return o=n[5],o&&(s=t[5],t[5]=s?ji(s,o,n[6]):o,t[6]=s?G(t[5],ct):n[6]),o=n[7],o&&(t[7]=o),r&wt&&(t[8]=null==t[8]?n[8]:Xl(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i,t}function Ha(t){var n=[];if(null!=t)for(var e in hl(t))n.push(e);return n}function Za(t){return Al.call(t)}function Xa(t,n,e){return n=Zl(n===et?t.length-1:n,0),function(){for(var r=arguments,i=-1,u=Zl(r.length-n,0),o=ul(u);++i0){if(++n>=St)return arguments[0]}else n=0;return t.apply(et,arguments)}}function nu(t,n){var e=-1,r=t.length,i=r-1;for(n=n===et?r:n;++en)return[];for(var i=0,a=0,u=ul(Ul(r/n));r>i;)u[a++]=li(t,i,i+=n);return u}function ou(t){for(var n=-1,e=null==t?0:t.length,r=0,i=[];++nn?0:n,r)):[]}function lu(t,n,e){var r=null==t?0:t.length;return r?(n=e||n===et?1:Ms(n),n=r-n,li(t,0,0>n?0:n)):[]}function hu(t,n){return t&&t.length?bi(t,ka(n,3),!0,!0):[]}function fu(t,n){return t&&t.length?bi(t,ka(n,3),!0):[]}function du(t,n,e,r){var i=null==t?0:t.length;return i?(e&&"number"!=typeof e&&Ra(t,n,e)&&(e=0,r=i),Je(t,n,e,r)):[]}function pu(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:Ms(e);return 0>i&&(i=Zl(r+i,0)),x(t,ka(n,3),i)}function gu(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return e!==et&&(i=Ms(e),i=0>e?Zl(r+i,0):Xl(i,r-1)),x(t,ka(n,3),i,!0)}function yu(t){var n=null==t?0:t.length;return n?tr(t,1):[]}function mu(t){var n=null==t?0:t.length;return n?tr(t,Ot):[]}function vu(t,n){var e=null==t?0:t.length;return e?(n=n===et?1:Ms(n),tr(t,n)):[]}function _u(t){for(var n=-1,e=null==t?0:t.length,r={};++ni&&(i=Zl(r+i,0)),w(t,n,i)}function wu(t){var n=null==t?0:t.length;return n?li(t,0,-1):[]}function Au(t,n){return null==t?"":Vl.call(t,n)}function ku(t){var n=null==t?0:t.length;return n?t[n-1]:et}function Eu(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=r;return e!==et&&(i=Ms(e),i=0>i?Zl(r+i,0):Xl(i,r-1)),n===n?X(t,n,i):x(t,k,i,!0)}function Mu(t,n){return t&&t.length?Zr(t,Ms(n)):et}function Su(t,n){return t&&t.length&&n&&n.length?ti(t,n):t}function Du(t,n,e){return t&&t.length&&n&&n.length?ti(t,n,ka(e,2)):t}function Tu(t,n,e){return t&&t.length&&n&&n.length?ti(t,n,et,e):t}function Cu(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],a=t.length;for(n=ka(n,3);++rr&&Zo(t[r],n))return r}return-1}function Nu(t,n){return fi(t,n,!0)}function Pu(t,n,e){return di(t,n,ka(e,2),!0)}function Ru(t,n){var e=null==t?0:t.length;if(e){var r=fi(t,n,!0)-1;if(Zo(t[r],n))return r}return-1}function ju(t){return t&&t.length?pi(t):[]}function Yu(t,n){return t&&t.length?pi(t,ka(n,2)):[]}function $u(t){var n=null==t?0:t.length;return n?li(t,1,n):[]}function Uu(t,n,e){return t&&t.length?(n=e||n===et?1:Ms(n),li(t,0,0>n?0:n)):[]}function zu(t,n,e){var r=null==t?0:t.length;return r?(n=e||n===et?1:Ms(n),n=r-n,li(t,0>n?0:n,r)):[]}function Wu(t,n){return t&&t.length?bi(t,ka(n,3),!1,!0):[]}function qu(t,n){return t&&t.length?bi(t,ka(n,3)):[]}function Gu(t){return t&&t.length?mi(t):[]}function Vu(t,n){return t&&t.length?mi(t,ka(n,2)):[]}function Hu(t,n){return n="function"==typeof n?n:et,t&&t.length?mi(t,et,n):[]}function Zu(t){if(!t||!t.length)return[];var n=0;return t=l(t,function(t){return Ko(t)?(n=Zl(t.length,n),!0):void 0}),F(n,function(n){return d(t,M(n))})}function Xu(t,n){if(!t||!t.length)return[];var e=Zu(t);return null==n?e:d(e,function(t){return a(n,et,t)})}function Ku(t,n){return Ai(t||[],n||[],Fe)}function Ju(t,n){return Ai(t||[],n||[],si)}function Qu(t){var e=n(t);return e.__chain__=!0,e}function to(t,n){return n(t),t}function no(t,n){return n(t)}function eo(){return Qu(this)}function ro(){return new v(this.value(),this.__chain__)}function io(){this.__values__===et&&(this.__values__=ks(this.value()));var t=this.__index__>=this.__values__.length,n=t?et:this.__values__[this.__index__++];return{done:t,value:n}}function ao(){return this}function uo(t){for(var n,r=this;r instanceof e;){var i=au(r);i.__index__=0,i.__values__=et,n?a.__wrapped__=i:n=i;var a=i;r=r.__wrapped__}return a.__wrapped__=t,n}function oo(){var t=this.__wrapped__;if(t instanceof S){var n=t;return this.__actions__.length&&(n=new S(this)),n=n.reverse(),n.__actions__.push({func:no,args:[Fu],thisArg:et}),new v(n,this.__chain__)}return this.thru(Fu)}function so(){return xi(this.__wrapped__,this.__actions__)}function co(t,n,e){var r=xf(t)?c:Ge;return e&&Ra(t,n,e)&&(n=et),r(t,ka(n,3))}function lo(t,n){var e=xf(t)?l:Qe;return e(t,ka(n,3))}function ho(t,n){return tr(vo(t,n),1)}function fo(t,n){return tr(vo(t,n),Ot)}function po(t,n,e){return e=e===et?1:Ms(e),tr(vo(t,n),e)}function go(t,n){var e=xf(t)?o:vh;return e(t,ka(n,3))}function yo(t,n){var e=xf(t)?s:_h;return e(t,ka(n,3))}function mo(t,n,e,r){t=Xo(t)?t:rc(t),e=e&&!r?Ms(e):0;var i=t.length;return 0>e&&(e=Zl(i+e,0)),_s(t)?i>=e&&t.indexOf(n,e)>-1:!!i&&w(t,n,e)>-1}function vo(t,n){var e=xf(t)?d:Wr;return e(t,ka(n,3))}function _o(t,n,e,r){return null==t?[]:(xf(n)||(n=null==n?[]:[n]),e=r?et:e,xf(e)||(e=null==e?[]:[e]),Xr(t,n,e))}function bo(t,n,e){var r=xf(t)?g:D,i=arguments.length<3;return r(t,ka(n,4),e,i,vh)}function xo(t,n,e){var r=xf(t)?y:D,i=arguments.length<3;return r(t,ka(n,4),e,i,_h)}function wo(t,n){var e=xf(t)?l:Qe;return e(t,No(ka(n,3)))}function Ao(t){var n=xf(t)?Se:ui;return n(t)}function ko(t,n,e){n=(e?Ra(t,n,e):n===et)?1:Ms(n);var r=xf(t)?De:oi;return r(t,n)}function Eo(t){var n=xf(t)?Te:ci;return n(t)}function Mo(t){if(null==t)return 0;if(Xo(t))return _s(t)?K(t):t.length;var n=Ch(t);return n==Zt||n==en?t.size:$r(t).length}function So(t,n,e){var r=xf(t)?m:hi;return e&&Ra(t,n,e)&&(n=et),r(t,ka(n,3))}function Do(t,n){if("function"!=typeof n)throw new pl(ut);return t=Ms(t),function(){return--t<1?n.apply(this,arguments):void 0}}function To(t,n,e){return n=e?et:n,n=t&&null==n?t.length:n,fa(t,wt,et,et,et,et,n)}function Co(t,n){var e;if("function"!=typeof n)throw new pl(ut);return t=Ms(t),function(){return--t>0&&(e=n.apply(this,arguments)),1>=t&&(n=et),e}}function Fo(t,n,e){n=e?et:n;var r=fa(t,vt,et,et,et,et,et,n);return r.placeholder=Fo.placeholder,r}function Oo(t,n,e){n=e?et:n;var r=fa(t,_t,et,et,et,et,et,n);return r.placeholder=Oo.placeholder,r}function Lo(t,n,e){function r(n){var e=f,r=d;return f=d=et,v=n,g=t.apply(r,e)}function i(t){return v=t,y=Lh(o,n),_?r(t):g}function a(t){var e=t-m,r=t-v,i=n-e;return b?Xl(i,p-r):i}function u(t){var e=t-m,r=t-v;return m===et||e>=n||0>e||b&&r>=p}function o(){var t=cf();return u(t)?s(t):void(y=Lh(o,a(t)))}function s(t){return y=et,x&&f?r(t):(f=d=et,g)}function c(){y!==et&&Eh(y),v=0,f=m=d=y=et}function l(){return y===et?g:s(cf())}function h(){var t=cf(),e=u(t);if(f=arguments,d=this,m=t,e){if(y===et)return i(m);if(b)return y=Lh(o,n),r(m)}return y===et&&(y=Lh(o,n)),g}var f,d,p,g,y,m,v=0,_=!1,b=!1,x=!0;if("function"!=typeof t)throw new pl(ut);return n=Ds(n)||0,ss(e)&&(_=!!e.leading,b="maxWait"in e,p=b?Zl(Ds(e.maxWait)||0,n):p,x="trailing"in e?!!e.trailing:x),h.cancel=c,h.flush=l,h}function Io(t){return fa(t,kt)}function Bo(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new pl(ut);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],a=e.cache;if(a.has(i))return a.get(i);var u=t.apply(this,r);return e.cache=a.set(i,u)||a,u};return e.cache=new(Bo.Cache||he),e}function No(t){if("function"!=typeof t)throw new pl(ut);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Po(t){return Co(2,t)}function Ro(t,n){if("function"!=typeof t)throw new pl(ut);return n=n===et?n:Ms(n),ai(t,n)}function jo(t,n){if("function"!=typeof t)throw new pl(ut);return n=null==n?0:Zl(Ms(n),0),ai(function(e){var r=e[n],i=Si(e,0,n);return r&&p(i,r),a(t,this,i)})}function Yo(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new pl(ut);return ss(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),Lo(t,n,{leading:r,maxWait:n,trailing:i})}function $o(t){return To(t,1)}function Uo(t,n){return gf(Ei(n),t)}function zo(){if(!arguments.length)return[];var t=arguments[0];return xf(t)?t:[t]}function Wo(t){return je(t,ft)}function qo(t,n){return n="function"==typeof n?n:et,je(t,ft,n)}function Go(t){return je(t,lt|ft)}function Vo(t,n){return n="function"==typeof n?n:et,je(t,lt|ft,n)}function Ho(t,n){return null==n||ze(t,n,Ws(n))}function Zo(t,n){return t===n||t!==t&&n!==n}function Xo(t){return null!=t&&os(t.length)&&!as(t)}function Ko(t){return cs(t)&&Xo(t)}function Jo(t){return t===!0||t===!1||cs(t)&&lr(t)==zt}function Qo(t){return cs(t)&&1===t.nodeType&&!ms(t)}function ts(t){if(null==t)return!0;if(Xo(t)&&(xf(t)||"string"==typeof t||"function"==typeof t.splice||Af(t)||Df(t)||bf(t)))return!t.length;var n=Ch(t);if(n==Zt||n==en)return!t.size;if(za(t))return!$r(t).length;for(var e in t)if(bl.call(t,e))return!1;return!0}function ns(t,n){return Or(t,n)}function es(t,n,e){e="function"==typeof e?e:et;var r=e?e(t,n):et;return r===et?Or(t,n,et,e):!!r}function rs(t){if(!cs(t))return!1;var n=lr(t);return n==Gt||n==qt||"string"==typeof t.message&&"string"==typeof t.name&&!ms(t)}function is(t){return"number"==typeof t&&Gl(t)}function as(t){if(!ss(t))return!1;var n=lr(t);return n==Vt||n==Ht||n==Ut||n==tn}function us(t){return"number"==typeof t&&t==Ms(t)}function os(t){return"number"==typeof t&&t>-1&&t%1==0&&Lt>=t}function ss(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function cs(t){return null!=t&&"object"==typeof t}function ls(t,n){return t===n||Br(t,n,Ma(n))}function hs(t,n,e){return e="function"==typeof e?e:et,Br(t,n,Ma(n),e)}function fs(t){return ys(t)&&t!=+t}function ds(t){if(Fh(t))throw new sl(at);return Nr(t)}function ps(t){return null===t}function gs(t){return null==t}function ys(t){return"number"==typeof t||cs(t)&&lr(t)==Xt}function ms(t){if(!cs(t)||lr(t)!=Jt)return!1;var n=Fl(t);if(null===n)return!0;var e=bl.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&_l.call(e)==kl}function vs(t){return us(t)&&t>=-Lt&&Lt>=t}function _s(t){return"string"==typeof t||!xf(t)&&cs(t)&&lr(t)==rn}function bs(t){return"symbol"==typeof t||cs(t)&&lr(t)==an}function xs(t){return t===et}function ws(t){return cs(t)&&Ch(t)==on}function As(t){return cs(t)&&lr(t)==sn}function ks(t){if(!t)return[];if(Xo(t))return _s(t)?J(t):Yi(t);if(Nl&&t[Nl])return z(t[Nl]());var n=Ch(t),e=n==Zt?W:n==en?V:rc;return e(t)}function Es(t){if(!t)return 0===t?t:0;if(t=Ds(t),t===Ot||t===-Ot){var n=0>t?-1:1;return n*It}return t===t?t:0}function Ms(t){var n=Es(t),e=n%1;return n===n?e?n-e:n:0}function Ss(t){return t?Re(Ms(t),0,Nt):0}function Ds(t){if("number"==typeof t)return t;if(bs(t))return Bt;if(ss(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=ss(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Nn,"");var e=Vn.test(t);return e||Zn.test(t)?er(t.slice(2),e?2:8):Gn.test(t)?Bt:+t}function Ts(t){return $i(t,qs(t))}function Cs(t){return t?Re(Ms(t),-Lt,Lt):0===t?t:0}function Fs(t){return null==t?"":yi(t)}function Os(t,n){var e=mh(t);return null==n?e:Ie(e,n)}function Ls(t,n){return b(t,ka(n,3),rr)}function Is(t,n){return b(t,ka(n,3),ir)}function Bs(t,n){return null==t?t:bh(t,ka(n,3),qs)}function Ns(t,n){return null==t?t:xh(t,ka(n,3),qs)}function Ps(t,n){return t&&rr(t,ka(n,3))}function Rs(t,n){return t&&ir(t,ka(n,3))}function js(t){return null==t?[]:ur(t,Ws(t))}function Ys(t){return null==t?[]:ur(t,qs(t))}function $s(t,n,e){var r=null==t?et:or(t,n);return r===et?e:r}function Us(t,n){return null!=t&&Fa(t,n,xr)}function zs(t,n){return null!=t&&Fa(t,n,kr)}function Ws(t){return Xo(t)?Me(t):$r(t)}function qs(t){return Xo(t)?Me(t,!0):Ur(t)}function Gs(t,n){var e={};return n=ka(n,3),rr(t,function(t,r,i){Ne(e,n(t,r,i),t)}),e}function Vs(t,n){var e={};return n=ka(n,3),rr(t,function(t,r,i){Ne(e,r,n(t,r,i))}),e}function Hs(t,n){return Zs(t,No(ka(n)))}function Zs(t,n){if(null==t)return{};var e=d(xa(t),function(t){return[t]});return n=ka(n),Jr(t,e,function(t,e){return n(t,e[0])})}function Xs(t,n,e){n=Mi(n,t);var r=-1,i=n.length;for(i||(i=1,t=et);++rn){var r=t;t=n,n=r}if(e||t%1||n%1){var i=Ql();return Xl(t+i*(n-t+nr("1e-"+((i+"").length-1))),n)}return ei(t,n)}function sc(t){return td(Fs(t).toLowerCase())}function cc(t){return t=Fs(t),t&&t.replace(Kn,vr).replace(Ue,"")}function lc(t,n,e){t=Fs(t),n=yi(n);var r=t.length;e=e===et?r:Re(Ms(e),0,r);var i=e;return e-=n.length,e>=0&&t.slice(e,i)==n}function hc(t){return t=Fs(t),t&&Mn.test(t)?t.replace(kn,_r):t}function fc(t){return t=Fs(t),t&&Bn.test(t)?t.replace(In,"\\$&"):t}function dc(t,n,e){t=Fs(t),n=Ms(n);var r=n?K(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return aa(zl(i),e)+t+aa(Ul(i),e)}function pc(t,n,e){t=Fs(t),n=Ms(n);var r=n?K(t):0;return n&&n>r?t+aa(n-r,e):t}function gc(t,n,e){t=Fs(t),n=Ms(n);var r=n?K(t):0;return n&&n>r?aa(n-r,e)+t:t}function yc(t,n,e){return e||null==n?n=0:n&&(n=+n),Jl(Fs(t).replace(Pn,""),n||0)}function mc(t,n,e){return n=(e?Ra(t,n,e):n===et)?1:Ms(n),ii(Fs(t),n)}function vc(){var t=arguments,n=Fs(t[0]);return t.length<3?n:n.replace(t[1],t[2])}function _c(t,n,e){return e&&"number"!=typeof e&&Ra(t,n,e)&&(n=e=et),(e=e===et?Nt:e>>>0)?(t=Fs(t),t&&("string"==typeof n||null!=n&&!Mf(n))&&(n=yi(n),!n&&$(t))?Si(J(t),0,e):t.split(n,e)):[]}function bc(t,n,e){return t=Fs(t),e=null==e?0:Re(Ms(e),0,t.length),n=yi(n),t.slice(e,e+n.length)==n}function xc(t,e,r){var i=n.templateSettings;r&&Ra(t,e,r)&&(e=et),t=Fs(t),e=Lf({},e,i,da);var a,u,o=Lf({},e.imports,i.imports,da),s=Ws(o),c=I(o,s),l=0,h=e.interpolate||Jn,f="__p += '",d=fl((e.escape||Jn).source+"|"+h.source+"|"+(h===Tn?Wn:Jn).source+"|"+(e.evaluate||Jn).source+"|$","g"),p="//# sourceURL="+("sourceURL"in e?e.sourceURL:"lodash.templateSources["+ ++He+"]")+"\n";t.replace(d,function(n,e,r,i,o,s){return r||(r=i),f+=t.slice(l,s).replace(Qn,j),e&&(a=!0,f+="' +\n__e("+e+") +\n'"),o&&(u=!0,f+="';\n"+o+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=s+n.length,n}),f+="';\n";var g=e.variable;g||(f="with (obj) {\n"+f+"\n}\n"),f=(u?f.replace(bn,""):f).replace(xn,"$1").replace(wn,"$1;"),f="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(a?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var y=nd(function(){return cl(s,p+"return "+f).apply(et,c)});if(y.source=f,rs(y))throw y;return y}function wc(t){return Fs(t).toLowerCase()}function Ac(t){return Fs(t).toUpperCase()}function kc(t,n,e){if(t=Fs(t),t&&(e||n===et))return t.replace(Nn,"");if(!t||!(n=yi(n)))return t;var r=J(t),i=J(n),a=N(r,i),u=P(r,i)+1;return Si(r,a,u).join("")}function Ec(t,n,e){if(t=Fs(t),t&&(e||n===et))return t.replace(Rn,"");if(!t||!(n=yi(n)))return t;var r=J(t),i=P(r,J(n))+1;return Si(r,0,i).join("")}function Mc(t,n,e){if(t=Fs(t),t&&(e||n===et))return t.replace(Pn,"");if(!t||!(n=yi(n)))return t;var r=J(t),i=N(r,J(n));return Si(r,i).join("")}function Sc(t,n){var e=Et,r=Mt;if(ss(n)){var i="separator"in n?n.separator:i;e="length"in n?Ms(n.length):e,r="omission"in n?yi(n.omission):r}t=Fs(t);var a=t.length;if($(t)){var u=J(t);a=u.length}if(e>=a)return t;var o=e-K(r);if(1>o)return r;var s=u?Si(u,0,o).join(""):t.slice(0,o);if(i===et)return s+r;if(u&&(o+=s.length-o),Mf(i)){if(t.slice(o).search(i)){var c,l=s;for(i.global||(i=fl(i.source,Fs(qn.exec(i))+"g")),i.lastIndex=0;c=i.exec(l);)var h=c.index;s=s.slice(0,h===et?o:h)}}else if(t.indexOf(yi(i),o)!=o){var f=s.lastIndexOf(i);f>-1&&(s=s.slice(0,f))}return s+r}function Dc(t){return t=Fs(t),t&&En.test(t)?t.replace(An,br):t}function Tc(t,n,e){return t=Fs(t),n=e?et:n,n===et?U(t)?nt(t):_(t):t.match(n)||[]}function Cc(t){var n=null==t?0:t.length,e=ka();return t=n?d(t,function(t){if("function"!=typeof t[1])throw new pl(ut);return[e(t[0]),t[1]]}):[],ai(function(e){for(var r=-1;++rt||t>Lt)return[];var e=Nt,r=Xl(t,Nt);n=ka(n),t-=Nt;for(var i=F(r,n);++e1?t[n-1]:et;return e="function"==typeof e?(t.pop(),e):et,Xu(t,e)}),Qh=_a(function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return Pe(n,t)};return!(n>1||this.__actions__.length)&&r instanceof S&&Pa(e)?(r=r.slice(e,+e+(n?1:0)),r.__actions__.push({func:no,args:[i],thisArg:et}),new v(r,this.__chain__).thru(function(t){return n&&!t.length&&t.push(et),t})):this.thru(i)}),tf=Wi(function(t,n,e){bl.call(t,e)?++t[e]:Ne(t,e,1)}),nf=Qi(pu),ef=Qi(gu),rf=Wi(function(t,n,e){bl.call(t,e)?t[e].push(n):Ne(t,e,[n])}),af=ai(function(t,n,e){var r=-1,i="function"==typeof n,u=Xo(t)?ul(t.length):[];return vh(t,function(t){u[++r]=i?a(n,t,e):Dr(t,n,e)}),u}),uf=Wi(function(t,n,e){Ne(t,e,n)}),of=Wi(function(t,n,e){t[e?0:1].push(n)},function(){return[[],[]]}),sf=ai(function(t,n){if(null==t)return[];var e=n.length;return e>1&&Ra(t,n[0],n[1])?n=[]:e>2&&Ra(n[0],n[1],n[2])&&(n=[n[0]]),Xr(t,tr(n,1),[])}),cf=Yl||function(){return ar.Date.now()},lf=ai(function(t,n,e){var r=gt;if(e.length){var i=G(e,Aa(lf));r|=bt}return fa(t,r,n,e,i)}),hf=ai(function(t,n,e){var r=gt|yt;if(e.length){var i=G(e,Aa(hf));r|=bt}return fa(n,r,t,e,i)}),ff=ai(function(t,n){return We(t,1,n)}),df=ai(function(t,n,e){return We(t,Ds(n)||0,e)});Bo.Cache=he;var pf=kh(function(t,n){n=1==n.length&&xf(n[0])?d(n[0],L(ka())):d(tr(n,1),L(ka()));var e=n.length;return ai(function(r){for(var i=-1,u=Xl(r.length,e);++i=n}),bf=Tr(function(){return arguments}())?Tr:function(t){return cs(t)&&bl.call(t,"callee")&&!Ll.call(t,"callee")},xf=ul.isArray,wf=hr?L(hr):Cr,Af=ql||qc,kf=fr?L(fr):Fr,Ef=dr?L(dr):Ir,Mf=pr?L(pr):Pr,Sf=gr?L(gr):Rr,Df=yr?L(yr):jr,Tf=sa(zr),Cf=sa(function(t,n){return n>=t}),Ff=qi(function(t,n){if(za(n)||Xo(n))return void $i(n,Ws(n),t);for(var e in n)bl.call(n,e)&&Fe(t,e,n[e])}),Of=qi(function(t,n){$i(n,qs(n),t)}),Lf=qi(function(t,n,e,r){$i(n,qs(n),t,r)}),If=qi(function(t,n,e,r){$i(n,Ws(n),t,r)}),Bf=_a(Pe),Nf=ai(function(t){return t.push(et,da),a(Lf,et,t)}),Pf=ai(function(t){return t.push(et,pa),a(Uf,et,t)}),Rf=ea(function(t,n,e){t[n]=e},Oc(Ic)),jf=ea(function(t,n,e){bl.call(t,n)?t[n].push(e):t[n]=[e]},ka),Yf=ai(Dr),$f=qi(function(t,n,e){Vr(t,n,e)}),Uf=qi(function(t,n,e,r){Vr(t,n,e,r)}),zf=_a(function(t,n){var e={};if(null==t)return e;var r=!1;n=d(n,function(n){return n=Mi(n,t),r||(r=n.length>1),n}),$i(t,xa(t),e),r&&(e=je(e,lt|ht|ft,ga));for(var i=n.length;i--;)vi(e,n[i]);return e}),Wf=_a(function(t,n){return null==t?{}:Kr(t,n)}),qf=ha(Ws),Gf=ha(qs),Vf=Xi(function(t,n,e){return n=n.toLowerCase(),t+(e?sc(n):n)}),Hf=Xi(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Zf=Xi(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),Xf=Zi("toLowerCase"),Kf=Xi(function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}),Jf=Xi(function(t,n,e){return t+(e?" ":"")+td(n)}),Qf=Xi(function(t,n,e){return t+(e?" ":"")+n.toUpperCase()}),td=Zi("toUpperCase"),nd=ai(function(t,n){try{return a(t,et,n)}catch(e){return rs(e)?e:new sl(e)}}),ed=_a(function(t,n){return o(n,function(n){n=eu(n),Ne(t,n,lf(t[n],t))}),t}),rd=ta(),id=ta(!0),ad=ai(function(t,n){return function(e){return Dr(e,t,n)}}),ud=ai(function(t,n){return function(e){return Dr(t,e,n)}}),od=ia(d),sd=ia(c),cd=ia(m),ld=oa(),hd=oa(!0),fd=ra(function(t,n){return t+n},0),dd=la("ceil"),pd=ra(function(t,n){return t/n},1),gd=la("floor"),yd=ra(function(t,n){return t*n},1),md=la("round"),vd=ra(function(t,n){return t-n},0);return n.after=Do,n.ary=To,n.assign=Ff,n.assignIn=Of,n.assignInWith=Lf,n.assignWith=If,n.at=Bf,n.before=Co,n.bind=lf,n.bindAll=ed,n.bindKey=hf,n.castArray=zo,n.chain=Qu,n.chunk=uu,n.compact=ou,n.concat=su,n.cond=Cc,n.conforms=Fc,n.constant=Oc,n.countBy=tf,n.create=Os,n.curry=Fo,n.curryRight=Oo,n.debounce=Lo,n.defaults=Nf,n.defaultsDeep=Pf,n.defer=ff,n.delay=df,n.difference=Nh,n.differenceBy=Ph,n.differenceWith=Rh,n.drop=cu,n.dropRight=lu,n.dropRightWhile=hu,n.dropWhile=fu,n.fill=du,n.filter=lo,n.flatMap=ho,n.flatMapDeep=fo,n.flatMapDepth=po,n.flatten=yu,n.flattenDeep=mu,n.flattenDepth=vu,n.flip=Io,n.flow=rd,n.flowRight=id,n.fromPairs=_u,n.functions=js,n.functionsIn=Ys,n.groupBy=rf,n.initial=wu,n.intersection=jh,n.intersectionBy=Yh,n.intersectionWith=$h,n.invert=Rf,n.invertBy=jf,n.invokeMap=af,n.iteratee=Bc,n.keyBy=uf,n.keys=Ws,n.keysIn=qs,n.map=vo,n.mapKeys=Gs,n.mapValues=Vs,n.matches=Nc,n.matchesProperty=Pc,n.memoize=Bo,n.merge=$f,n.mergeWith=Uf,n.method=ad,n.methodOf=ud,n.mixin=Rc,n.negate=No,n.nthArg=$c,n.omit=zf,n.omitBy=Hs,n.once=Po,n.orderBy=_o,n.over=od,n.overArgs=pf,n.overEvery=sd,n.overSome=cd,n.partial=gf,n.partialRight=yf,n.partition=of,n.pick=Wf,n.pickBy=Zs,n.property=Uc,n.propertyOf=zc,n.pull=Uh,n.pullAll=Su,n.pullAllBy=Du,n.pullAllWith=Tu,n.pullAt=zh,n.range=ld,n.rangeRight=hd,n.rearg=mf,n.reject=wo,n.remove=Cu,n.rest=Ro,n.reverse=Fu,n.sampleSize=ko,n.set=Ks,n.setWith=Js,n.shuffle=Eo,n.slice=Ou,n.sortBy=sf,n.sortedUniq=ju,n.sortedUniqBy=Yu,n.split=_c,n.spread=jo,n.tail=$u,n.take=Uu,n.takeRight=zu,n.takeRightWhile=Wu,n.takeWhile=qu,n.tap=to,n.throttle=Yo,n.thru=no,n.toArray=ks,n.toPairs=qf,n.toPairsIn=Gf,n.toPath=Xc,n.toPlainObject=Ts,n.transform=Qs,n.unary=$o,n.union=Wh,n.unionBy=qh,n.unionWith=Gh,n.uniq=Gu,n.uniqBy=Vu,n.uniqWith=Hu,n.unset=tc,n.unzip=Zu,n.unzipWith=Xu,n.update=nc,n.updateWith=ec,n.values=rc,n.valuesIn=ic,n.without=Vh,n.words=Tc,n.wrap=Uo,n.xor=Hh,n.xorBy=Zh,n.xorWith=Xh,n.zip=Kh,n.zipObject=Ku,n.zipObjectDeep=Ju,n.zipWith=Jh,n.entries=qf,n.entriesIn=Gf,n.extend=Of,n.extendWith=Lf,Rc(n,n),n.add=fd,n.attempt=nd,n.camelCase=Vf,n.capitalize=sc,n.ceil=dd,n.clamp=ac,n.clone=Wo,n.cloneDeep=Go,n.cloneDeepWith=Vo,n.cloneWith=qo,n.conformsTo=Ho,n.deburr=cc,n.defaultTo=Lc,n.divide=pd,n.endsWith=lc,n.eq=Zo,n.escape=hc,n.escapeRegExp=fc,n.every=co,n.find=nf,n.findIndex=pu,n.findKey=Ls,n.findLast=ef,n.findLastIndex=gu,n.findLastKey=Is,n.floor=gd,n.forEach=go,n.forEachRight=yo,n.forIn=Bs,n.forInRight=Ns,n.forOwn=Ps,n.forOwnRight=Rs,n.get=$s,n.gt=vf,n.gte=_f,n.has=Us,n.hasIn=zs,n.head=bu,n.identity=Ic,n.includes=mo,n.indexOf=xu,n.inRange=uc,n.invoke=Yf,n.isArguments=bf,n.isArray=xf,n.isArrayBuffer=wf,n.isArrayLike=Xo,n.isArrayLikeObject=Ko,n.isBoolean=Jo,n.isBuffer=Af,n.isDate=kf,n.isElement=Qo,n.isEmpty=ts,n.isEqual=ns,n.isEqualWith=es,n.isError=rs,n.isFinite=is,n.isFunction=as,n.isInteger=us,n.isLength=os,n.isMap=Ef,n.isMatch=ls,n.isMatchWith=hs,n.isNaN=fs,n.isNative=ds,n.isNil=gs,n.isNull=ps,n.isNumber=ys,n.isObject=ss,n.isObjectLike=cs,n.isPlainObject=ms,n.isRegExp=Mf,n.isSafeInteger=vs,n.isSet=Sf,n.isString=_s,n.isSymbol=bs,n.isTypedArray=Df,n.isUndefined=xs,n.isWeakMap=ws,n.isWeakSet=As,n.join=Au,n.kebabCase=Hf,n.last=ku,n.lastIndexOf=Eu,n.lowerCase=Zf,n.lowerFirst=Xf,n.lt=Tf,n.lte=Cf,n.max=Jc,n.maxBy=Qc,n.mean=tl,n.meanBy=nl,n.min=el,n.minBy=rl,n.stubArray=Wc,n.stubFalse=qc,n.stubObject=Gc,n.stubString=Vc,n.stubTrue=Hc,n.multiply=yd,n.nth=Mu,n.noConflict=jc,n.noop=Yc,n.now=cf,n.pad=dc,n.padEnd=pc,n.padStart=gc,n.parseInt=yc,n.random=oc,n.reduce=bo,n.reduceRight=xo,n.repeat=mc,n.replace=vc,n.result=Xs,n.round=md,n.runInContext=Ar,n.sample=Ao,n.size=Mo,n.snakeCase=Kf,n.some=So,n.sortedIndex=Lu,n.sortedIndexBy=Iu,n.sortedIndexOf=Bu,n.sortedLastIndex=Nu,n.sortedLastIndexBy=Pu,n.sortedLastIndexOf=Ru,n.startCase=Jf,n.startsWith=bc,n.subtract=vd,n.sum=il,n.sumBy=al,n.template=xc,n.times=Zc,n.toFinite=Es,n.toInteger=Ms,n.toLength=Ss,n.toLower=wc,n.toNumber=Ds,n.toSafeInteger=Cs,n.toString=Fs,n.toUpper=Ac,n.trim=kc,n.trimEnd=Ec,n.trimStart=Mc,n.truncate=Sc,n.unescape=Dc,n.uniqueId=Kc,n.upperCase=Qf,n.upperFirst=td,n.each=go,n.eachRight=yo,n.first=bu,Rc(n,function(){var t={};return rr(n,function(e,r){bl.call(n.prototype,r)||(t[r]=e)}),t}(),{chain:!1}),n.VERSION=rt,o(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){n[t].placeholder=n}),o(["drop","take"],function(t,n){S.prototype[t]=function(e){e=e===et?1:Zl(Ms(e),0);var r=this.__filtered__&&!n?new S(this):this.clone();return r.__filtered__?r.__takeCount__=Xl(e,r.__takeCount__):r.__views__.push({size:Xl(e,Nt),type:t+(r.__dir__<0?"Right":"")}),r},S.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),o(["filter","map","takeWhile"],function(t,n){var e=n+1,r=e==Tt||e==Ft;S.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ka(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}}),o(["head","last"],function(t,n){var e="take"+(n?"Right":"");S.prototype[t]=function(){return this[e](1).value()[0]}}),o(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");S.prototype[t]=function(){return this.__filtered__?new S(this):this[e](1)}}),S.prototype.compact=function(){return this.filter(Ic)},S.prototype.find=function(t){return this.filter(t).head()},S.prototype.findLast=function(t){return this.reverse().find(t)},S.prototype.invokeMap=ai(function(t,n){return"function"==typeof t?new S(this):this.map(function(e){return Dr(e,t,n)})}),S.prototype.reject=function(t){return this.filter(No(ka(t)))},S.prototype.slice=function(t,n){t=Ms(t);var e=this;return e.__filtered__&&(t>0||0>n)?new S(e):(0>t?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==et&&(n=Ms(n),e=0>n?e.dropRight(-n):e.take(n-t)),e)},S.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},S.prototype.toArray=function(){return this.take(Nt)},rr(S.prototype,function(t,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),a=n[i?"take"+("last"==e?"Right":""):e],u=i||/^find/.test(e);a&&(n.prototype[e]=function(){var e=this.__wrapped__,o=i?[1]:arguments,s=e instanceof S,c=o[0],l=s||xf(e),h=function(t){var e=a.apply(n,p([t],o));return i&&f?e[0]:e};l&&r&&"function"==typeof c&&1!=c.length&&(s=l=!1);var f=this.__chain__,d=!!this.__actions__.length,g=u&&!f,y=s&&!d;if(!u&&l){e=y?e:new S(this);var m=t.apply(e,o);return m.__actions__.push({func:no,args:[h],thisArg:et}),new v(m,f)}return g&&y?t.apply(this,o):(m=this.thru(h),g?i?m.value()[0]:m.value():m)})}),o(["pop","push","shift","sort","splice","unshift"],function(t){var e=gl[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",i=/^(?:pop|shift)$/.test(t);n.prototype[t]=function(){var t=arguments;if(i&&!this.__chain__){var n=this.value();return e.apply(xf(n)?n:[],t)}return this[r](function(n){return e.apply(xf(n)?n:[],t)})}}),rr(S.prototype,function(t,e){var r=n[e];if(r){var i=r.name+"",a=sh[i]||(sh[i]=[]);a.push({name:e,func:r})}}),sh[na(et,yt).name]=[{name:"wrapper",func:et}],S.prototype.clone=Z,S.prototype.reverse=Q,S.prototype.value=tt,n.prototype.at=Qh,n.prototype.chain=eo,n.prototype.commit=ro,n.prototype.next=io,n.prototype.plant=uo,n.prototype.reverse=oo,n.prototype.toJSON=n.prototype.valueOf=n.prototype.value=so,n.prototype.first=n.prototype.head,Nl&&(n.prototype[Nl]=ao),n},wr=xr();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(ar._=wr,define(function(){return wr})):or?((or.exports=wr)._=wr,ur._=wr):ar._=wr}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],85:[function(t,n,e){!function(t,r){"object"==typeof e&&"undefined"!=typeof n?n.exports=r():"function"==typeof define&&define.amd?define(r):t.moment=r()}(this,function(){"use strict";function e(){return xr.apply(null,arguments)}function r(t){xr=t}function i(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function a(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function u(t){var n;for(n in t)return!1;return!0}function o(t){return void 0===t}function s(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function c(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,n){var e,r=[];for(e=0;e0)for(e=0;et?Math.ceil(t)||0:Math.floor(t)}function w(t){var n=+t,e=0;return 0!==n&&isFinite(n)&&(e=x(n)),e}function A(t,n,e){var r,i=Math.min(t.length,n.length),a=Math.abs(t.length-n.length),u=0;for(r=0;i>r;r++)(e&&t[r]!==n[r]||!e&&w(t[r])!==w(n[r]))&&u++;return u+a}function k(t){e.suppressDeprecationWarnings===!1&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function E(t,n){var r=!0;return f(function(){if(null!=e.deprecationHandler&&e.deprecationHandler(null,t),r){for(var i,a=[],u=0;u0?"future":"past"];return S(e)?e(n):e.replace(/%s/i,n)}function P(t,n){var e=t.toLowerCase();Nr[e]=Nr[e+"s"]=Nr[n]=t}function R(t){return"string"==typeof t?Nr[t]||Nr[t.toLowerCase()]:void 0}function j(t){var n,e,r={};for(e in t)h(t,e)&&(n=R(e),n&&(r[n]=t[e]));return r}function Y(t,n){Pr[t]=n}function $(t){var n=[];for(var e in t)n.push({unit:e,priority:Pr[e]});return n.sort(function(t,n){return t.priority-n.priority}),n}function U(t,n){return function(r){return null!=r?(W(this,t,r),e.updateOffset(this,n),this):z(this,t)}}function z(t,n){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+n]():0/0}function W(t,n,e){t.isValid()&&t._d["set"+(t._isUTC?"UTC":"")+n](e)}function q(t){return t=R(t),S(this[t])?this[t]():this}function G(t,n){if("object"==typeof t){t=j(t);for(var e=$(t),r=0;r=0;return(a?e?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}function H(t,n,e,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($r[t]=i),n&&($r[n[0]]=function(){return V(i.apply(this,arguments),n[1],n[2])}),e&&($r[e]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function Z(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function X(t){var n,e,r=t.match(Rr);for(n=0,e=r.length;e>n;n++)r[n]=$r[r[n]]?$r[r[n]]:Z(r[n]);return function(n){var i,a="";for(i=0;e>i;i++)a+=S(r[i])?r[i].call(n,t):r[i];return a}}function K(t,n){return t.isValid()?(n=J(n,t.localeData()),Yr[n]=Yr[n]||X(n),Yr[n](t)):t.localeData().invalidDate()}function J(t,n){function e(t){return n.longDateFormat(t)||t}var r=5;for(jr.lastIndex=0;r>=0&&jr.test(t);)t=t.replace(jr,e),jr.lastIndex=0,r-=1;return t}function Q(t,n,e){ai[t]=S(n)?n:function(t){return t&&e?e:n}}function tt(t,n){return h(ai,t)?ai[t](n._strict,n._locale):new RegExp(nt(t))}function nt(t){return et(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(t,n,e,r,i){return n||e||r||i}))}function et(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function rt(t,n){var e,r=n;for("string"==typeof t&&(t=[t]),s(n)&&(r=function(t,e){e[n]=w(t)}),e=0;er;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return e?"MMM"===n?(i=yi.call(this._shortMonthsParse,u),-1!==i?i:null):(i=yi.call(this._longMonthsParse,u),-1!==i?i:null):"MMM"===n?(i=yi.call(this._shortMonthsParse,u),-1!==i?i:(i=yi.call(this._longMonthsParse,u),-1!==i?i:null)):(i=yi.call(this._longMonthsParse,u),-1!==i?i:(i=yi.call(this._shortMonthsParse,u),-1!==i?i:null))}function lt(t,n,e){var r,i,a;if(this._monthsParseExact)return ct.call(this,t,n,e);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;12>r;r++){if(i=d([2e3,r]),e&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),e||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),e&&"MMMM"===n&&this._longMonthsParse[r].test(t))return r;if(e&&"MMM"===n&&this._shortMonthsParse[r].test(t))return r;if(!e&&this._monthsParse[r].test(t))return r}}function ht(t,n){var e;if(!t.isValid())return t;if("string"==typeof n)if(/^\d+$/.test(n))n=w(n);else if(n=t.localeData().monthsParse(n),!s(n))return t;return e=Math.min(t.date(),ut(t.year(),n)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](n,e),t}function ft(t){return null!=t?(ht(this,t),e.updateOffset(this,!0),this):z(this,"Month")}function dt(){return ut(this.year(),this.month())}function pt(t){return this._monthsParseExact?(h(this,"_monthsRegex")||yt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=bi),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)}function gt(t){return this._monthsParseExact?(h(this,"_monthsRegex")||yt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=xi),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)}function yt(){function t(t,n){return n.length-t.length}var n,e,r=[],i=[],a=[];for(n=0;12>n;n++)e=d([2e3,n]),r.push(this.monthsShort(e,"")),i.push(this.months(e,"")),a.push(this.months(e,"")),a.push(this.monthsShort(e,""));for(r.sort(t),i.sort(t),a.sort(t),n=0;12>n;n++)r[n]=et(r[n]),i[n]=et(i[n]);for(n=0;24>n;n++)a[n]=et(a[n]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function mt(t){return vt(t)?366:365}function vt(t){return t%4===0&&t%100!==0||t%400===0}function _t(){return vt(this.year())}function bt(t,n,e,r,i,a,u){var o=new Date(t,n,e,r,i,a,u);return 100>t&&t>=0&&isFinite(o.getFullYear())&&o.setFullYear(t),o}function xt(t){var n=new Date(Date.UTC.apply(null,arguments));return 100>t&&t>=0&&isFinite(n.getUTCFullYear())&&n.setUTCFullYear(t),n}function wt(t,n,e){var r=7+n-e,i=(7+xt(t,0,r).getUTCDay()-n)%7;return-i+r-1}function At(t,n,e,r,i){var a,u,o=(7+e-r)%7,s=wt(t,r,i),c=1+7*(n-1)+o+s;return 0>=c?(a=t-1,u=mt(a)+c):c>mt(t)?(a=t+1,u=c-mt(t)):(a=t,u=c),{year:a,dayOfYear:u}}function kt(t,n,e){var r,i,a=wt(t.year(),n,e),u=Math.floor((t.dayOfYear()-a-1)/7)+1;return 1>u?(i=t.year()-1,r=u+Et(i,n,e)):u>Et(t.year(),n,e)?(r=u-Et(t.year(),n,e),i=t.year()+1):(i=t.year(),r=u),{week:r,year:i}}function Et(t,n,e){var r=wt(t,n,e),i=wt(t+1,n,e);return(mt(t)-r+i)/7}function Mt(t){return kt(t,this._week.dow,this._week.doy).week}function St(){return this._week.dow}function Dt(){return this._week.doy}function Tt(t){var n=this.localeData().week(this);return null==t?n:this.add(7*(t-n),"d")}function Ct(t){var n=kt(this,1,4).week;return null==t?n:this.add(7*(t-n),"d")}function Ft(t,n){return"string"!=typeof t?t:isNaN(t)?(t=n.weekdaysParse(t),"number"==typeof t?t:null):parseInt(t,10)}function Ot(t,n){return"string"==typeof t?n.weekdaysParse(t)%7||7:isNaN(t)?null:t}function Lt(t,n){return t?i(this._weekdays)?this._weekdays[t.day()]:this._weekdays[this._weekdays.isFormat.test(n)?"format":"standalone"][t.day()]:i(this._weekdays)?this._weekdays:this._weekdays.standalone}function It(t){return t?this._weekdaysShort[t.day()]:this._weekdaysShort}function Bt(t){return t?this._weekdaysMin[t.day()]:this._weekdaysMin}function Nt(t,n,e){var r,i,a,u=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;7>r;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return e?"dddd"===n?(i=yi.call(this._weekdaysParse,u),-1!==i?i:null):"ddd"===n?(i=yi.call(this._shortWeekdaysParse,u),-1!==i?i:null):(i=yi.call(this._minWeekdaysParse,u),-1!==i?i:null):"dddd"===n?(i=yi.call(this._weekdaysParse,u),-1!==i?i:(i=yi.call(this._shortWeekdaysParse,u),-1!==i?i:(i=yi.call(this._minWeekdaysParse,u),-1!==i?i:null))):"ddd"===n?(i=yi.call(this._shortWeekdaysParse,u),-1!==i?i:(i=yi.call(this._weekdaysParse,u),-1!==i?i:(i=yi.call(this._minWeekdaysParse,u),-1!==i?i:null))):(i=yi.call(this._minWeekdaysParse,u),-1!==i?i:(i=yi.call(this._weekdaysParse,u),-1!==i?i:(i=yi.call(this._shortWeekdaysParse,u),-1!==i?i:null)))}function Pt(t,n,e){var r,i,a;if(this._weekdaysParseExact)return Nt.call(this,t,n,e);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;7>r;r++){if(i=d([2e3,1]).day(r),e&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),e&&"dddd"===n&&this._fullWeekdaysParse[r].test(t))return r;if(e&&"ddd"===n&&this._shortWeekdaysParse[r].test(t))return r;if(e&&"dd"===n&&this._minWeekdaysParse[r].test(t))return r;if(!e&&this._weekdaysParse[r].test(t))return r}}function Rt(t){if(!this.isValid())return null!=t?this:0/0;var n=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(t=Ft(t,this.localeData()),this.add(t-n,"d")):n}function jt(t){if(!this.isValid())return null!=t?this:0/0;var n=(this.day()+7-this.localeData()._week.dow)%7;return null==t?n:this.add(t-n,"d")}function Yt(t){if(!this.isValid())return null!=t?this:0/0;if(null!=t){var n=Ot(t,this.localeData());return this.day(this.day()%7?n:n-7)}return this.day()||7}function $t(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=Si),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)}function Ut(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Di),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function zt(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Ti),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function Wt(){function t(t,n){return n.length-t.length}var n,e,r,i,a,u=[],o=[],s=[],c=[];for(n=0;7>n;n++)e=d([2e3,1]).day(n),r=this.weekdaysMin(e,""),i=this.weekdaysShort(e,""),a=this.weekdays(e,""),u.push(r),o.push(i),s.push(a),c.push(r),c.push(i),c.push(a);for(u.sort(t),o.sort(t),s.sort(t),c.sort(t),n=0;7>n;n++)o[n]=et(o[n]),s[n]=et(s[n]),c[n]=et(c[n]);this._weekdaysRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+u.join("|")+")","i")}function qt(){return this.hours()%12||12}function Gt(){return this.hours()||24}function Vt(t,n){H(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),n)})}function Ht(t,n){return n._meridiemParse}function Zt(t){return"p"===(t+"").toLowerCase().charAt(0)}function Xt(t,n,e){return t>11?e?"pm":"PM":e?"am":"AM"}function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function Jt(t){for(var n,e,r,i,a=0;a0;){if(r=Qt(i.slice(0,n).join("-")))return r;if(e&&e.length>=n&&A(i,e,!0)>=n-1)break;n--}a++}return null}function Qt(e){var r=null;if(!Ii[e]&&"undefined"!=typeof n&&n&&n.exports)try{r=Ci._abbr,t("./locale/"+e),tn(r)}catch(i){}return Ii[e]}function tn(t,n){var e;return t&&(e=o(n)?rn(t):nn(t,n),e&&(Ci=e)),Ci._abbr}function nn(t,n){if(null!==n){var e=Li;if(n.abbr=t,null!=Ii[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),e=Ii[t]._config;else if(null!=n.parentLocale){if(null==Ii[n.parentLocale])return Bi[n.parentLocale]||(Bi[n.parentLocale]=[]), Bi[n.parentLocale].push({name:t,config:n}),null;e=Ii[n.parentLocale]._config}return Ii[t]=new C(T(e,n)),Bi[t]&&Bi[t].forEach(function(t){nn(t.name,t.config)}),tn(t),Ii[t]}return delete Ii[t],null}function en(t,n){if(null!=n){var e,r=Li;null!=Ii[t]&&(r=Ii[t]._config),n=T(r,n),e=new C(n),e.parentLocale=Ii[t],Ii[t]=e,tn(t)}else null!=Ii[t]&&(null!=Ii[t].parentLocale?Ii[t]=Ii[t].parentLocale:null!=Ii[t]&&delete Ii[t]);return Ii[t]}function rn(t){var n;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return Ci;if(!i(t)){if(n=Qt(t))return n;t=[t]}return Jt(t)}function an(){return Tr(Ii)}function un(t){var n,e=t._a;return e&&-2===g(t).overflow&&(n=e[si]<0||e[si]>11?si:e[ci]<1||e[ci]>ut(e[oi],e[si])?ci:e[li]<0||e[li]>24||24===e[li]&&(0!==e[hi]||0!==e[fi]||0!==e[di])?li:e[hi]<0||e[hi]>59?hi:e[fi]<0||e[fi]>59?fi:e[di]<0||e[di]>999?di:-1,g(t)._overflowDayOfYear&&(oi>n||n>ci)&&(n=ci),g(t)._overflowWeeks&&-1===n&&(n=pi),g(t)._overflowWeekday&&-1===n&&(n=gi),g(t).overflow=n),t}function on(t){var n,e,r,i,a,u,o=t._i,s=Ni.exec(o)||Pi.exec(o);if(s){for(g(t).iso=!0,n=0,e=ji.length;e>n;n++)if(ji[n][1].exec(s[1])){i=ji[n][0],r=ji[n][2]!==!1;break}if(null==i)return void(t._isValid=!1);if(s[3]){for(n=0,e=Yi.length;e>n;n++)if(Yi[n][1].exec(s[3])){a=(s[2]||" ")+Yi[n][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(s[4]){if(!Ri.exec(s[4]))return void(t._isValid=!1);u="Z"}t._f=i+(a||"")+(u||""),pn(t)}else t._isValid=!1}function sn(t){var n,e,r,i,a,u,o,s,c={" GMT":" +0000"," EDT":" -0400"," EST":" -0500"," CDT":" -0500"," CST":" -0600"," MDT":" -0600"," MST":" -0700"," PDT":" -0700"," PST":" -0800"},l="YXWVUTSRQPONZABCDEFGHIKLM";if(n=t._i.replace(/\([^\)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s|\s$/g,""),e=Ui.exec(n)){if(r=e[1]?"ddd"+(5===e[1].length?", ":" "):"",i="D MMM "+(e[2].length>10?"YYYY ":"YY "),a="HH:mm"+(e[4]?":ss":""),e[1]){var h=new Date(e[2]),f=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"][h.getDay()];if(e[1].substr(0,3)!==f)return g(t).weekdayMismatch=!0,void(t._isValid=!1)}switch(e[5].length){case 2:0===s?o=" +0000":(s=l.indexOf(e[5][1].toUpperCase())-12,o=(0>s?" -":" +")+(""+s).replace(/^-?/,"0").match(/..$/)[0]+"00");break;case 4:o=c[e[5]];break;default:o=c[" GMT"]}e[5]=o,t._i=e.splice(1).join(""),u=" ZZ",t._f=r+i+a+u,pn(t),g(t).rfc2822=!0}else t._isValid=!1}function cn(t){var n=$i.exec(t._i);return null!==n?void(t._d=new Date(+n[1])):(on(t),void(t._isValid===!1&&(delete t._isValid,sn(t),t._isValid===!1&&(delete t._isValid,e.createFromInputFallback(t)))))}function ln(t,n,e){return null!=t?t:null!=n?n:e}function hn(t){var n=new Date(e.now());return t._useUTC?[n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate()]:[n.getFullYear(),n.getMonth(),n.getDate()]}function fn(t){var n,e,r,i,a=[];if(!t._d){for(r=hn(t),t._w&&null==t._a[ci]&&null==t._a[si]&&dn(t),null!=t._dayOfYear&&(i=ln(t._a[oi],r[oi]),(t._dayOfYear>mt(i)||0===t._dayOfYear)&&(g(t)._overflowDayOfYear=!0),e=xt(i,0,t._dayOfYear),t._a[si]=e.getUTCMonth(),t._a[ci]=e.getUTCDate()),n=0;3>n&&null==t._a[n];++n)t._a[n]=a[n]=r[n];for(;7>n;n++)t._a[n]=a[n]=null==t._a[n]?2===n?1:0:t._a[n];24===t._a[li]&&0===t._a[hi]&&0===t._a[fi]&&0===t._a[di]&&(t._nextDay=!0,t._a[li]=0),t._d=(t._useUTC?xt:bt).apply(null,a),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[li]=24)}}function dn(t){var n,e,r,i,a,u,o,s;if(n=t._w,null!=n.GG||null!=n.W||null!=n.E)a=1,u=4,e=ln(n.GG,t._a[oi],kt(wn(),1,4).year),r=ln(n.W,1),i=ln(n.E,1),(1>i||i>7)&&(s=!0);else{a=t._locale._week.dow,u=t._locale._week.doy;var c=kt(wn(),a,u);e=ln(n.gg,t._a[oi],c.year),r=ln(n.w,c.week),null!=n.d?(i=n.d,(0>i||i>6)&&(s=!0)):null!=n.e?(i=n.e+a,(n.e<0||n.e>6)&&(s=!0)):i=a}1>r||r>Et(e,a,u)?g(t)._overflowWeeks=!0:null!=s?g(t)._overflowWeekday=!0:(o=At(e,r,i,a,u),t._a[oi]=o.year,t._dayOfYear=o.dayOfYear)}function pn(t){if(t._f===e.ISO_8601)return void on(t);if(t._f===e.RFC_2822)return void sn(t);t._a=[],g(t).empty=!0;var n,r,i,a,u,o=""+t._i,s=o.length,c=0;for(i=J(t._f,t._locale).match(Rr)||[],n=0;n0&&g(t).unusedInput.push(u),o=o.slice(o.indexOf(r)+r.length),c+=r.length),$r[a]?(r?g(t).empty=!1:g(t).unusedTokens.push(a),at(a,r,t)):t._strict&&!r&&g(t).unusedTokens.push(a);g(t).charsLeftOver=s-c,o.length>0&&g(t).unusedInput.push(o),t._a[li]<=12&&g(t).bigHour===!0&&t._a[li]>0&&(g(t).bigHour=void 0),g(t).parsedDateParts=t._a.slice(0),g(t).meridiem=t._meridiem,t._a[li]=gn(t._locale,t._a[li],t._meridiem),fn(t),un(t)}function gn(t,n,e){var r;return null==e?n:null!=t.meridiemHour?t.meridiemHour(n,e):null!=t.isPM?(r=t.isPM(e),r&&12>n&&(n+=12),r||12!==n||(n=0),n):n}function yn(t){var n,e,r,i,a;if(0===t._f.length)return g(t).invalidFormat=!0,void(t._d=new Date(0/0));for(i=0;ia)&&(r=a,e=n));f(t,e||n)}function mn(t){if(!t._d){var n=j(t._i);t._a=l([n.year,n.month,n.day||n.date,n.hour,n.minute,n.second,n.millisecond],function(t){return t&&parseInt(t,10)}),fn(t)}}function vn(t){var n=new _(un(_n(t)));return n._nextDay&&(n.add(1,"d"),n._nextDay=void 0),n}function _n(t){var n=t._i,e=t._f;return t._locale=t._locale||rn(t._l),null===n||void 0===e&&""===n?m({nullInput:!0}):("string"==typeof n&&(t._i=n=t._locale.preparse(n)),b(n)?new _(un(n)):(c(n)?t._d=n:i(e)?yn(t):e?pn(t):bn(t),y(t)||(t._d=null),t))}function bn(t){var n=t._i;o(n)?t._d=new Date(e.now()):c(n)?t._d=new Date(n.valueOf()):"string"==typeof n?cn(t):i(n)?(t._a=l(n.slice(0),function(t){return parseInt(t,10)}),fn(t)):a(n)?mn(t):s(n)?t._d=new Date(n):e.createFromInputFallback(t)}function xn(t,n,e,r,o){var s={};return(e===!0||e===!1)&&(r=e,e=void 0),(a(t)&&u(t)||i(t)&&0===t.length)&&(t=void 0),s._isAMomentObject=!0,s._useUTC=s._isUTC=o,s._l=e,s._i=t,s._f=n,s._strict=r,vn(s)}function wn(t,n,e,r){return xn(t,n,e,r,!1)}function An(t,n){var e,r;if(1===n.length&&i(n[0])&&(n=n[0]),!n.length)return wn();for(e=n[0],r=1;rt?-1*Math.round(-1*t):Math.round(t)}function On(t,n){H(t,0,0,function(){var t=this.utcOffset(),e="+";return 0>t&&(t=-t,e="-"),e+V(~~(t/60),2)+n+V(~~t%60,2)})}function Ln(t,n){var e=(n||"").match(t);if(null===e)return null;var r=e[e.length-1]||[],i=(r+"").match(Vi)||["-",0,0],a=+(60*i[1])+w(i[2]);return 0===a?0:"+"===i[0]?a:-a}function In(t,n){var r,i;return n._isUTC?(r=n.clone(),i=(b(t)||c(t)?t.valueOf():wn(t).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+i),e.updateOffset(r,!1),r):wn(t).local()}function Bn(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Nn(t,n,r){var i,a=this._offset||0;if(!this.isValid())return null!=t?this:0/0;if(null!=t){if("string"==typeof t){if(t=Ln(ei,t),null===t)return this}else Math.abs(t)<16&&!r&&(t=60*t);return!this._isUTC&&n&&(i=Bn(this)),this._offset=t,this._isUTC=!0,null!=i&&this.add(i,"m"),a!==t&&(!n||this._changeInProgress?Jn(this,Vn(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,e.updateOffset(this,!0),this._changeInProgress=null)),this}return this._isUTC?a:Bn(this)}function Pn(t,n){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,n),this):-this.utcOffset()}function Rn(t){return this.utcOffset(0,t)}function jn(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Bn(this),"m")),this}function Yn(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Ln(ni,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this}function $n(t){return this.isValid()?(t=t?wn(t).utcOffset():0,(this.utcOffset()-t)%60===0):!1}function Un(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function zn(){if(!o(this._isDSTShifted))return this._isDSTShifted;var t={};if(v(t,this),t=_n(t),t._a){var n=t._isUTC?d(t._a):wn(t._a);this._isDSTShifted=this.isValid()&&A(t._a,n.toArray())>0}else this._isDSTShifted=!1;return this._isDSTShifted}function Wn(){return this.isValid()?!this._isUTC:!1}function qn(){return this.isValid()?this._isUTC:!1}function Gn(){return this.isValid()?this._isUTC&&0===this._offset:!1}function Vn(t,n){var e,r,i,a=t,u=null;return Cn(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:s(t)?(a={},n?a[n]=t:a.milliseconds=t):(u=Hi.exec(t))?(e="-"===u[1]?-1:1,a={y:0,d:w(u[ci])*e,h:w(u[li])*e,m:w(u[hi])*e,s:w(u[fi])*e,ms:w(Fn(1e3*u[di]))*e}):(u=Zi.exec(t))?(e="-"===u[1]?-1:1,a={y:Hn(u[2],e),M:Hn(u[3],e),w:Hn(u[4],e),d:Hn(u[5],e),h:Hn(u[6],e),m:Hn(u[7],e),s:Hn(u[8],e)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=Xn(wn(a.from),wn(a.to)),a={},a.ms=i.milliseconds,a.M=i.months),r=new Tn(a),Cn(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Hn(t,n){var e=t&&parseFloat(t.replace(",","."));return(isNaN(e)?0:e)*n}function Zn(t,n){var e={milliseconds:0,months:0};return e.months=n.month()-t.month()+12*(n.year()-t.year()),t.clone().add(e.months,"M").isAfter(n)&&--e.months,e.milliseconds=+n-+t.clone().add(e.months,"M"),e}function Xn(t,n){var e;return t.isValid()&&n.isValid()?(n=In(n,t),t.isBefore(n)?e=Zn(t,n):(e=Zn(n,t),e.milliseconds=-e.milliseconds,e.months=-e.months),e):{milliseconds:0,months:0}}function Kn(t,n){return function(e,r){var i,a;return null===r||isNaN(+r)||(M(n,"moment()."+n+"(period, number) is deprecated. Please use moment()."+n+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),a=e,e=r,r=a),e="string"==typeof e?+e:e,i=Vn(e,r),Jn(this,i,t),this}}function Jn(t,n,r,i){var a=n._milliseconds,u=Fn(n._days),o=Fn(n._months);t.isValid()&&(i=null==i?!0:i,a&&t._d.setTime(t._d.valueOf()+a*r),u&&W(t,"Date",z(t,"Date")+u*r),o&&ht(t,z(t,"Month")+o*r),i&&e.updateOffset(t,u||o))}function Qn(t,n){var e=t.diff(n,"days",!0);return-6>e?"sameElse":-1>e?"lastWeek":0>e?"lastDay":1>e?"sameDay":2>e?"nextDay":7>e?"nextWeek":"sameElse"}function te(t,n){var r=t||wn(),i=In(r,this).startOf("day"),a=e.calendarFormat(this,i)||"sameElse",u=n&&(S(n[a])?n[a].call(this,r):n[a]);return this.format(u||this.localeData().calendar(a,this,wn(r)))}function ne(){return new _(this)}function ee(t,n){var e=b(t)?t:wn(t);return this.isValid()&&e.isValid()?(n=R(o(n)?"millisecond":n),"millisecond"===n?this.valueOf()>e.valueOf():e.valueOf()n-a?(e=t.clone().add(i-1,"months"),r=(n-a)/(a-e)):(e=t.clone().add(i+1,"months"),r=(n-a)/(e-a)),-(i+r)||0}function le(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")}function he(){if(!this.isValid())return null;var t=this.clone().utc();return t.year()<0||t.year()>9999?K(t,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):S(Date.prototype.toISOString)?this.toDate().toISOString():K(t,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}function fe(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",n="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",n="Z");var e="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i="-MM-DD[T]HH:mm:ss.SSS",a=n+'[")]';return this.format(e+r+i+a)}function de(t){t||(t=this.isUtc()?e.defaultFormatUtc:e.defaultFormat);var n=K(this,t);return this.localeData().postformat(n)}function pe(t,n){return this.isValid()&&(b(t)&&t.isValid()||wn(t).isValid())?Vn({to:this,from:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function ge(t){return this.from(wn(),t)}function ye(t,n){return this.isValid()&&(b(t)&&t.isValid()||wn(t).isValid())?Vn({from:this,to:t}).locale(this.locale()).humanize(!n):this.localeData().invalidDate()}function me(t){return this.to(wn(),t)}function ve(t){var n;return void 0===t?this._locale._abbr:(n=rn(t),null!=n&&(this._locale=n),this)}function _e(){return this._locale}function be(t){switch(t=R(t)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":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}function xe(t){return t=R(t),void 0===t||"millisecond"===t?this:("date"===t&&(t="day"),this.startOf(t).add(1,"isoWeek"===t?"week":t).subtract(1,"ms"))}function we(){return this._d.valueOf()-6e4*(this._offset||0)}function Ae(){return Math.floor(this.valueOf()/1e3)}function ke(){return new Date(this.valueOf())}function Ee(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]}function Me(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}}function Se(){return this.isValid()?this.toISOString():null}function De(){return y(this)}function Te(){return f({},g(this))}function Ce(){return g(this).overflow}function Fe(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}function Oe(t,n){H(0,[t,t.length],0,n)}function Le(t){return Pe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)}function Ie(t){return Pe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)}function Be(){return Et(this.year(),1,4)}function Ne(){var t=this.localeData()._week;return Et(this.year(),t.dow,t.doy)}function Pe(t,n,e,r,i){var a;return null==t?kt(this,r,i).year:(a=Et(t,r,i),n>a&&(n=a),Re.call(this,t,n,e,r,i))}function Re(t,n,e,r,i){var a=At(t,n,e,r,i),u=xt(a.year,0,a.dayOfYear);return this.year(u.getUTCFullYear()),this.month(u.getUTCMonth()),this.date(u.getUTCDate()),this}function je(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)}function Ye(t){var n=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?n:this.add(t-n,"d")}function $e(t,n){n[di]=w(1e3*("0."+t))}function Ue(){return this._isUTC?"UTC":""}function ze(){return this._isUTC?"Coordinated Universal Time":""}function We(t){return wn(1e3*t)}function qe(){return wn.apply(null,arguments).parseZone()}function Ge(t){return t}function Ve(t,n,e,r){var i=rn(),a=d().set(r,n);return i[e](a,t)}function He(t,n,e){if(s(t)&&(n=t,t=void 0),t=t||"",null!=n)return Ve(t,n,e,"month");var r,i=[];for(r=0;12>r;r++)i[r]=Ve(t,r,e,"month");return i}function Ze(t,n,e,r){"boolean"==typeof t?(s(n)&&(e=n,n=void 0),n=n||""):(n=t,e=n,t=!1,s(n)&&(e=n,n=void 0),n=n||"");var i=rn(),a=t?i._week.dow:0;if(null!=e)return Ve(n,(e+a)%7,r,"day");var u,o=[];for(u=0;7>u;u++)o[u]=Ve(n,(u+a)%7,r,"day");return o}function Xe(t,n){return He(t,n,"months")}function Ke(t,n){return He(t,n,"monthsShort")}function Je(t,n,e){return Ze(t,n,e,"weekdays")}function Qe(t,n,e){return Ze(t,n,e,"weekdaysShort")}function tr(t,n,e){return Ze(t,n,e,"weekdaysMin")}function nr(){var t=this._data;return this._milliseconds=ua(this._milliseconds),this._days=ua(this._days),this._months=ua(this._months),t.milliseconds=ua(t.milliseconds),t.seconds=ua(t.seconds),t.minutes=ua(t.minutes),t.hours=ua(t.hours),t.months=ua(t.months),t.years=ua(t.years),this}function er(t,n,e,r){var i=Vn(n,e);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function rr(t,n){return er(this,t,n,1)}function ir(t,n){return er(this,t,n,-1)}function ar(t){return 0>t?Math.floor(t):Math.ceil(t)}function ur(){var t,n,e,r,i,a=this._milliseconds,u=this._days,o=this._months,s=this._data;return a>=0&&u>=0&&o>=0||0>=a&&0>=u&&0>=o||(a+=864e5*ar(sr(o)+u),u=0,o=0),s.milliseconds=a%1e3,t=x(a/1e3),s.seconds=t%60,n=x(t/60),s.minutes=n%60,e=x(n/60),s.hours=e%24,u+=x(e/24),i=x(or(u)),o+=i,u-=ar(sr(i)),r=x(o/12),o%=12,s.days=u,s.months=o,s.years=r,this}function or(t){return 4800*t/146097}function sr(t){return 146097*t/4800}function cr(t){if(!this.isValid())return 0/0;var n,e,r=this._milliseconds;if(t=R(t),"month"===t||"year"===t)return n=this._days+r/864e5,e=this._months+or(n),"month"===t?e:e/12;switch(n=this._days+Math.round(sr(this._months)),t){case"week":return n/7+r/6048e5;case"day":return n+r/864e5;case"hour":return 24*n+r/36e5;case"minute":return 1440*n+r/6e4;case"second":return 86400*n+r/1e3;case"millisecond":return Math.floor(864e5*n)+r;default:throw new Error("Unknown unit "+t)}}function lr(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):0/0}function hr(t){return function(){return this.as(t)}}function fr(t){return t=R(t),this.isValid()?this[t+"s"]():0/0}function dr(t){return function(){return this.isValid()?this._data[t]:0/0}}function pr(){return x(this.days()/7)}function gr(t,n,e,r,i){return i.relativeTime(n||1,!!e,t,r)}function yr(t,n,e){var r=Vn(t).abs(),i=wa(r.as("s")),a=wa(r.as("m")),u=wa(r.as("h")),o=wa(r.as("d")),s=wa(r.as("M")),c=wa(r.as("y")),l=i<=Aa.ss&&["s",i]||i=a&&["m"]||a=u&&["h"]||u=o&&["d"]||o=s&&["M"]||s=c&&["y"]||["yy",c];return l[2]=n,l[3]=+t>0,l[4]=e,gr.apply(null,l)}function mr(t){return void 0===t?wa:"function"==typeof t?(wa=t,!0):!1}function vr(t,n){return void 0===Aa[t]?!1:void 0===n?Aa[t]:(Aa[t]=n,"s"===t&&(Aa.ss=n-1),!0)}function _r(t){if(!this.isValid())return this.localeData().invalidDate();var n=this.localeData(),e=yr(this,!t,n);return t&&(e=n.pastFuture(+this,e)),n.postformat(e)}function br(){if(!this.isValid())return this.localeData().invalidDate();var t,n,e,r=ka(this._milliseconds)/1e3,i=ka(this._days),a=ka(this._months);t=x(r/60),n=x(t/60),r%=60,t%=60,e=x(a/12),a%=12;var u=e,o=a,s=i,c=n,l=t,h=r,f=this.asSeconds();return f?(0>f?"-":"")+"P"+(u?u+"Y":"")+(o?o+"M":"")+(s?s+"D":"")+(c||l||h?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(h?h+"S":""):"P0D"}var xr,wr;wr=Array.prototype.some?Array.prototype.some:function(t){for(var n=Object(this),e=n.length>>>0,r=0;e>r;r++)if(r in n&&t.call(this,n[r],r,n))return!0;return!1};var Ar=wr,kr=e.momentProperties=[],Er=!1,Mr={};e.suppressDeprecationWarnings=!1,e.deprecationHandler=null;var Sr;Sr=Object.keys?Object.keys:function(t){var n,e=[];for(n in t)h(t,n)&&e.push(n);return e};var Dr,Tr=Sr,Cr={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},Fr={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},Or="Invalid date",Lr="%d",Ir=/\d{1,2}/,Br={future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d 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"},Nr={},Pr={},Rr=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,jr=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Yr={},$r={},Ur=/\d/,zr=/\d\d/,Wr=/\d{3}/,qr=/\d{4}/,Gr=/[+-]?\d{6}/,Vr=/\d\d?/,Hr=/\d\d\d\d?/,Zr=/\d\d\d\d\d\d?/,Xr=/\d{1,3}/,Kr=/\d{1,4}/,Jr=/[+-]?\d{1,6}/,Qr=/\d+/,ti=/[+-]?\d+/,ni=/Z|[+-]\d\d:?\d\d/gi,ei=/Z|[+-]\d\d(?::?\d\d)?/gi,ri=/[+-]?\d+(\.\d{1,3})?/,ii=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,ai={},ui={},oi=0,si=1,ci=2,li=3,hi=4,fi=5,di=6,pi=7,gi=8;Dr=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var n;for(n=0;n=t?""+t:"+"+t}),H(0,["YY",2],0,function(){return this.year()%100}),H(0,["YYYY",4],0,"year"),H(0,["YYYYY",5],0,"year"),H(0,["YYYYYY",6,!0],0,"year"),P("year","y"),Y("year",1),Q("Y",ti),Q("YY",Vr,zr),Q("YYYY",Kr,qr),Q("YYYYY",Jr,Gr),Q("YYYYYY",Jr,Gr),rt(["YYYYY","YYYYYY"],oi),rt("YYYY",function(t,n){n[oi]=2===t.length?e.parseTwoDigitYear(t):w(t)}),rt("YY",function(t,n){n[oi]=e.parseTwoDigitYear(t)}),rt("Y",function(t,n){n[oi]=parseInt(t,10)}),e.parseTwoDigitYear=function(t){return w(t)+(w(t)>68?1900:2e3)};var wi=U("FullYear",!0);H("w",["ww",2],"wo","week"),H("W",["WW",2],"Wo","isoWeek"),P("week","w"),P("isoWeek","W"),Y("week",5),Y("isoWeek",5),Q("w",Vr),Q("ww",Vr,zr),Q("W",Vr),Q("WW",Vr,zr),it(["w","ww","W","WW"],function(t,n,e,r){n[r.substr(0,1)]=w(t)});var Ai={dow:0,doy:6};H("d",0,"do","day"),H("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),H("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),H("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),H("e",0,0,"weekday"),H("E",0,0,"isoWeekday"),P("day","d"),P("weekday","e"),P("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),Q("d",Vr),Q("e",Vr),Q("E",Vr),Q("dd",function(t,n){return n.weekdaysMinRegex(t)}),Q("ddd",function(t,n){return n.weekdaysShortRegex(t)}),Q("dddd",function(t,n){return n.weekdaysRegex(t)}),it(["dd","ddd","dddd"],function(t,n,e,r){var i=e._locale.weekdaysParse(t,r,e._strict);null!=i?n.d=i:g(e).invalidWeekday=t}),it(["d","e","E"],function(t,n,e,r){n[r]=w(t)});var ki="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ei="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Mi="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),Si=ii,Di=ii,Ti=ii;H("H",["HH",2],0,"hour"),H("h",["hh",2],0,qt),H("k",["kk",2],0,Gt),H("hmm",0,0,function(){return""+qt.apply(this)+V(this.minutes(),2)}),H("hmmss",0,0,function(){return""+qt.apply(this)+V(this.minutes(),2)+V(this.seconds(),2)}),H("Hmm",0,0,function(){return""+this.hours()+V(this.minutes(),2)}),H("Hmmss",0,0,function(){return""+this.hours()+V(this.minutes(),2)+V(this.seconds(),2)}),Vt("a",!0),Vt("A",!1),P("hour","h"),Y("hour",13),Q("a",Ht),Q("A",Ht),Q("H",Vr),Q("h",Vr),Q("k",Vr),Q("HH",Vr,zr),Q("hh",Vr,zr),Q("kk",Vr,zr),Q("hmm",Hr),Q("hmmss",Zr),Q("Hmm",Hr),Q("Hmmss",Zr),rt(["H","HH"],li),rt(["k","kk"],function(t,n){var e=w(t);n[li]=24===e?0:e}),rt(["a","A"],function(t,n,e){e._isPm=e._locale.isPM(t),e._meridiem=t}),rt(["h","hh"],function(t,n,e){n[li]=w(t),g(e).bigHour=!0}),rt("hmm",function(t,n,e){var r=t.length-2;n[li]=w(t.substr(0,r)),n[hi]=w(t.substr(r)),g(e).bigHour=!0}),rt("hmmss",function(t,n,e){var r=t.length-4,i=t.length-2;n[li]=w(t.substr(0,r)),n[hi]=w(t.substr(r,2)),n[fi]=w(t.substr(i)),g(e).bigHour=!0}),rt("Hmm",function(t,n){var e=t.length-2;n[li]=w(t.substr(0,e)),n[hi]=w(t.substr(e))}),rt("Hmmss",function(t,n){var e=t.length-4,r=t.length-2;n[li]=w(t.substr(0,e)),n[hi]=w(t.substr(e,2)),n[fi]=w(t.substr(r))});var Ci,Fi=/[ap]\.?m?\.?/i,Oi=U("Hours",!0),Li={calendar:Cr,longDateFormat:Fr,invalidDate:Or,ordinal:Lr,dayOfMonthOrdinalParse:Ir,relativeTime:Br,months:vi,monthsShort:_i,week:Ai,weekdays:ki,weekdaysMin:Mi,weekdaysShort:Ei,meridiemParse:Fi},Ii={},Bi={},Ni=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Pi=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ri=/Z|[+-]\d\d(?::?\d\d)?/,ji=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],Yi=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],$i=/^\/?Date\((\-?\d+)/i,Ui=/^((?:Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d?\d\s(?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(?:\d\d)?\d\d\s)(\d\d:\d\d)(\:\d\d)?(\s(?:UT|GMT|[ECMP][SD]T|[A-IK-Za-ik-z]|[+-]\d{4}))$/;e.createFromInputFallback=E("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))}),e.ISO_8601=function(){},e.RFC_2822=function(){};var zi=E("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=wn.apply(null,arguments);return this.isValid()&&t.isValid()?this>t?this:t:m()}),Wi=E("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var t=wn.apply(null,arguments);return this.isValid()&&t.isValid()?t>this?this:t:m()}),qi=function(){return Date.now?Date.now():+new Date},Gi=["year","quarter","month","week","day","hour","minute","second","millisecond"];On("Z",":"),On("ZZ",""),Q("Z",ei),Q("ZZ",ei),rt(["Z","ZZ"],function(t,n,e){e._useUTC=!0,e._tzm=Ln(ei,t)});var Vi=/([\+\-]|\d\d)/gi;e.updateOffset=function(){};var Hi=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Zi=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;Vn.fn=Tn.prototype,Vn.invalid=Dn;var Xi=Kn(1,"add"),Ki=Kn(-1,"subtract");e.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",e.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ji=E("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)});H(0,["gg",2],0,function(){return this.weekYear()%100}),H(0,["GG",2],0,function(){return this.isoWeekYear()%100}),Oe("gggg","weekYear"),Oe("ggggg","weekYear"),Oe("GGGG","isoWeekYear"),Oe("GGGGG","isoWeekYear"),P("weekYear","gg"),P("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),Q("G",ti),Q("g",ti),Q("GG",Vr,zr),Q("gg",Vr,zr),Q("GGGG",Kr,qr),Q("gggg",Kr,qr),Q("GGGGG",Jr,Gr),Q("ggggg",Jr,Gr),it(["gggg","ggggg","GGGG","GGGGG"],function(t,n,e,r){n[r.substr(0,2)]=w(t)}),it(["gg","GG"],function(t,n,r,i){n[i]=e.parseTwoDigitYear(t)}),H("Q",0,"Qo","quarter"),P("quarter","Q"),Y("quarter",7),Q("Q",Ur),rt("Q",function(t,n){n[si]=3*(w(t)-1)}),H("D",["DD",2],"Do","date"),P("date","D"),Y("date",9),Q("D",Vr),Q("DD",Vr,zr),Q("Do",function(t,n){return t?n._dayOfMonthOrdinalParse||n._ordinalParse:n._dayOfMonthOrdinalParseLenient}),rt(["D","DD"],ci),rt("Do",function(t,n){n[ci]=w(t.match(Vr)[0],10)});var Qi=U("Date",!0);H("DDD",["DDDD",3],"DDDo","dayOfYear"),P("dayOfYear","DDD"),Y("dayOfYear",4),Q("DDD",Xr),Q("DDDD",Wr),rt(["DDD","DDDD"],function(t,n,e){e._dayOfYear=w(t)}),H("m",["mm",2],0,"minute"),P("minute","m"),Y("minute",14),Q("m",Vr),Q("mm",Vr,zr),rt(["m","mm"],hi);var ta=U("Minutes",!1);H("s",["ss",2],0,"second"),P("second","s"),Y("second",15),Q("s",Vr),Q("ss",Vr,zr),rt(["s","ss"],fi);var na=U("Seconds",!1);H("S",0,0,function(){return~~(this.millisecond()/100)}),H(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),H(0,["SSS",3],0,"millisecond"),H(0,["SSSS",4],0,function(){return 10*this.millisecond()}),H(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),H(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),H(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),H(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),H(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),P("millisecond","ms"),Y("millisecond",16),Q("S",Xr,Ur),Q("SS",Xr,zr),Q("SSS",Xr,Wr);var ea;for(ea="SSSS";ea.length<=9;ea+="S")Q(ea,Qr);for(ea="S";ea.length<=9;ea+="S")rt(ea,$e);var ra=U("Milliseconds",!1);H("z",0,0,"zoneAbbr"),H("zz",0,0,"zoneName");var ia=_.prototype;ia.add=Xi,ia.calendar=te,ia.clone=ne,ia.diff=se,ia.endOf=xe,ia.format=de,ia.from=pe,ia.fromNow=ge,ia.to=ye,ia.toNow=me,ia.get=q,ia.invalidAt=Ce,ia.isAfter=ee,ia.isBefore=re,ia.isBetween=ie,ia.isSame=ae,ia.isSameOrAfter=ue,ia.isSameOrBefore=oe,ia.isValid=De,ia.lang=Ji,ia.locale=ve,ia.localeData=_e,ia.max=Wi,ia.min=zi,ia.parsingFlags=Te,ia.set=G,ia.startOf=be,ia.subtract=Ki,ia.toArray=Ee,ia.toObject=Me,ia.toDate=ke,ia.toISOString=he,ia.inspect=fe,ia.toJSON=Se,ia.toString=le,ia.unix=Ae,ia.valueOf=we,ia.creationData=Fe,ia.year=wi,ia.isLeapYear=_t,ia.weekYear=Le,ia.isoWeekYear=Ie,ia.quarter=ia.quarters=je,ia.month=ft,ia.daysInMonth=dt,ia.week=ia.weeks=Tt,ia.isoWeek=ia.isoWeeks=Ct,ia.weeksInYear=Ne,ia.isoWeeksInYear=Be,ia.date=Qi,ia.day=ia.days=Rt,ia.weekday=jt,ia.isoWeekday=Yt,ia.dayOfYear=Ye,ia.hour=ia.hours=Oi,ia.minute=ia.minutes=ta,ia.second=ia.seconds=na,ia.millisecond=ia.milliseconds=ra,ia.utcOffset=Nn,ia.utc=Rn,ia.local=jn,ia.parseZone=Yn,ia.hasAlignedHourOffset=$n,ia.isDST=Un,ia.isLocal=Wn,ia.isUtcOffset=qn,ia.isUtc=Gn,ia.isUTC=Gn,ia.zoneAbbr=Ue,ia.zoneName=ze,ia.dates=E("dates accessor is deprecated. Use date instead.",Qi),ia.months=E("months accessor is deprecated. Use month instead",ft),ia.years=E("years accessor is deprecated. Use year instead",wi),ia.zone=E("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",Pn),ia.isDSTShifted=E("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",zn);var aa=C.prototype;aa.calendar=F,aa.longDateFormat=O,aa.invalidDate=L,aa.ordinal=I,aa.preparse=Ge, aa.postformat=Ge,aa.relativeTime=B,aa.pastFuture=N,aa.set=D,aa.months=ot,aa.monthsShort=st,aa.monthsParse=lt,aa.monthsRegex=gt,aa.monthsShortRegex=pt,aa.week=Mt,aa.firstDayOfYear=Dt,aa.firstDayOfWeek=St,aa.weekdays=Lt,aa.weekdaysMin=Bt,aa.weekdaysShort=It,aa.weekdaysParse=Pt,aa.weekdaysRegex=$t,aa.weekdaysShortRegex=Ut,aa.weekdaysMinRegex=zt,aa.isPM=Zt,aa.meridiem=Xt,tn("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var n=t%10,e=1===w(t%100/10)?"th":1===n?"st":2===n?"nd":3===n?"rd":"th";return t+e}}),e.lang=E("moment.lang is deprecated. Use moment.locale instead.",tn),e.langData=E("moment.langData is deprecated. Use moment.localeData instead.",rn);var ua=Math.abs,oa=hr("ms"),sa=hr("s"),ca=hr("m"),la=hr("h"),ha=hr("d"),fa=hr("w"),da=hr("M"),pa=hr("y"),ga=dr("milliseconds"),ya=dr("seconds"),ma=dr("minutes"),va=dr("hours"),_a=dr("days"),ba=dr("months"),xa=dr("years"),wa=Math.round,Aa={ss:44,s:45,m:45,h:22,d:26,M:11},ka=Math.abs,Ea=Tn.prototype;return Ea.isValid=Sn,Ea.abs=nr,Ea.add=rr,Ea.subtract=ir,Ea.as=cr,Ea.asMilliseconds=oa,Ea.asSeconds=sa,Ea.asMinutes=ca,Ea.asHours=la,Ea.asDays=ha,Ea.asWeeks=fa,Ea.asMonths=da,Ea.asYears=pa,Ea.valueOf=lr,Ea._bubble=ur,Ea.get=fr,Ea.milliseconds=ga,Ea.seconds=ya,Ea.minutes=ma,Ea.hours=va,Ea.days=_a,Ea.weeks=pr,Ea.months=ba,Ea.years=xa,Ea.humanize=_r,Ea.toISOString=br,Ea.toString=br,Ea.toJSON=br,Ea.locale=ve,Ea.localeData=_e,Ea.toIsoString=E("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",br),Ea.lang=Ji,H("X",0,0,"unix"),H("x",0,0,"valueOf"),Q("x",ti),Q("X",ri),rt("X",function(t,n,e){e._d=new Date(1e3*parseFloat(t,10))}),rt("x",function(t,n,e){e._d=new Date(w(t))}),e.version="2.18.1",r(wn),e.fn=ia,e.min=kn,e.max=En,e.now=qi,e.utc=d,e.unix=We,e.months=Xe,e.isDate=c,e.locale=tn,e.invalid=m,e.duration=Vn,e.isMoment=b,e.weekdays=Je,e.parseZone=qe,e.localeData=rn,e.isDuration=Cn,e.monthsShort=Ke,e.weekdaysMin=tr,e.defineLocale=nn,e.updateLocale=en,e.locales=an,e.weekdaysShort=Qe,e.normalizeUnits=R,e.relativeTimeRounding=mr,e.relativeTimeThreshold=vr,e.calendarFormat=Qn,e.prototype=ia,e})},{}],86:[function(t,n,e){(function(t){function n(t,n){for(var e=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),e++):e&&(t.splice(r,1),e--)}if(n)for(;e--;e)t.unshift("..");return t}function r(t,n){if(t.filter)return t.filter(n);for(var e=[],r=0;r=-1&&!i;a--){var u=a>=0?arguments[a]:t.cwd();if("string"!=typeof u)throw new TypeError("Arguments to path.resolve must be strings");u&&(e=u+"/"+e,i="/"===u.charAt(0))}return e=n(r(e.split("/"),function(t){return!!t}),!i).join("/"),(i?"/":"")+e||"."},e.normalize=function(t){var i=e.isAbsolute(t),a="/"===u(t,-1);return t=n(r(t.split("/"),function(t){return!!t}),!i).join("/"),t||i||(t="."),t&&a&&(t+="/"),(i?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,function(t){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t}).join("/"))},e.relative=function(t,n){function r(t){for(var n=0;n=0&&""===t[e];e--);return n>e?[]:t.slice(n,e-n+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),u=Math.min(i.length,a.length),o=u,s=0;u>s;s++)if(i[s]!==a[s]){o=s;break}for(var c=[],s=o;sn&&(n=t.length+n),t.substr(n,e)}}).call(this,t("_process"))},{_process:87}],87:[function(t,n){function e(){}var r=n.exports={};r.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,n="undefined"!=typeof window&&window.MutationObserver,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};var r=[];if(n){var i=document.createElement("div"),a=new MutationObserver(function(){var t=r.slice();r.length=0,t.forEach(function(t){t()})});return a.observe(i,{attributes:!0}),function(t){r.length||i.setAttribute("yes","no"),r.push(t)}}return e?(window.addEventListener("message",function(t){var n=t.source;if((n===window||null===n)&&"process-tick"===t.data&&(t.stopPropagation(),r.length>0)){var e=r.shift();e()}},!0),function(t){r.push(t),window.postMessage("process-tick","*")}):function(t){setTimeout(t,0)}}(),r.title="browser",r.browser=!0,r.env={},r.argv=[],r.on=e,r.addListener=e,r.once=e,r.off=e,r.removeListener=e,r.removeAllListeners=e,r.emit=e,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")}},{}],88:[function(t,n){n.exports={name:"mermaid",version:"7.0.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams and gantt charts.",main:"src/mermaid.js",keywords:["diagram","markdown","flowchart","sequence diagram","gantt"],bin:{mermaid:"./bin/mermaid.js"},scripts:{live:"live-server ./test/examples",lint:"node node_modules/eslint/bin/eslint.js src",jison:"gulp jison_legacy",karma:"node node_modules/karma/bin/karma start karma.conf.js --single-run",watch:"source ./scripts/watch.sh",doc:"rm -r build;rm -r dist/www;gulp vartree;cp dist/www/all.html ../mermaid-pages/index.html;cp dist/mermaid.js ../mermaid-pages/javascripts/lib;cp dist/mermaid.forest.css ../mermaid-pages/stylesheets",tape:"node node_modules/tape/bin/tape test/cli_test-*.js",jasmine:"npm run jison &&node node_modules/jasmine-es6/bin/jasmine.js",pretest:"npm run jison",test:"npm run dist && npm run karma && npm run tape","dist-slim-mermaid":"node node_modules/browserify/bin/cmd.js src/mermaid.js -s mermaid -o dist/mermaid.slim.js -x d3 && cat dist/mermaid.slim.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaid.slim.min.js","dist-slim-mermaidAPI":"node node_modules/browserify/bin/cmd.js src/mermaidAPI.js -s mermaidAPI -o dist/mermaidAPI.slim.js -x d3 && cat dist/mermaidAPI.slim.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaidAPI.slim.min.js","dist-mermaid":"node node_modules/browserify/bin/cmd.js src/mermaid.js -s mermaid -o dist/mermaid.js && cat dist/mermaid.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaid.min.js","dist-mermaid-nomin":"node node_modules/browserify/bin/cmd.js src/mermaid.js -s mermaid -o dist/mermaid.js","dist-mermaidAPI":"node node_modules/browserify/bin/cmd.js src/mermaidAPI.js -s mermaidAPI -o dist/mermaidAPI.js && cat dist/mermaidAPI.js | node node_modules/uglifyjs/bin/uglifyjs -mc > dist/mermaidAPI.min.js",dist:"npm run dist-slim-mermaid && npm run dist-slim-mermaidAPI && npm run dist-mermaid && npm run dist-mermaidAPI"},repository:{type:"git",url:"https://github.com/knsv/mermaid"},author:"Knut Sveidqvist",license:"MIT",dependencies:{chalk:"^0.5.1",d3:"3.5.6",dagre:"^0.7.4","dagre-d3":"0.4.10",he:"^0.5.0",lodash:"^4.6.1",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","babel-eslint":"^4.1.3",babelify:"^6.4.0",browserify:"~6.2.0",clone:"^0.2.0","codeclimate-test-reporter":"0.0.4",dateformat:"^1.0.11",dox:"^0.8.0",eslint:"^1.6.0","eslint-watch":"^2.1.2","event-stream":"^3.2.0",foundation:"^4.2.1-1","front-matter":"^0.2.0",gulp:"~3.9.0","gulp-bower":"0.0.10","gulp-browserify":"^0.5.0","gulp-bump":"^0.1.11","gulp-concat":"~2.4.1","gulp-data":"^1.1.1","gulp-dox":"^0.1.6","gulp-ext-replace":"^0.2.0","gulp-filelog":"^0.4.1","gulp-front-matter":"^1.2.3","gulp-hogan":"^1.1.0","gulp-if":"^1.2.5","gulp-insert":"^0.4.0","gulp-istanbul":"^0.4.0","gulp-jasmine":"~2.1.0","gulp-jasmine-browser":"^0.2.3","gulp-jison":"~1.2.0","gulp-jshint":"^1.9.0","gulp-less":"^3.0.1","gulp-livereload":"^3.8.0","gulp-marked":"^1.0.0","gulp-mdvars":"^2.0.0","gulp-qunit":"~1.2.1","gulp-rename":"~1.2.0","gulp-shell":"^0.2.10","gulp-tag-version":"^1.2.1","gulp-uglify":"~1.0.1","gulp-util":"^3.0.7","gulp-vartree":"^2.0.1","hogan.js":"^3.0.2",jasmine:"2.3.2","jasmine-es6":"0.0.18",jison:"zaach/jison",jsdom:"^7.0.2","jshint-stylish":"^2.0.1",karma:"^0.13.15","karma-babel-preprocessor":"^6.0.1","karma-browserify":"^4.4.0","karma-jasmine":"^0.3.6","karma-phantomjs-launcher":"^0.2.1","live-server":"^0.9.0","map-stream":"0.0.6",marked:"^0.3.2","mock-browser":"^0.91.34",path:"^0.4.9",phantomjs:"^2.1.3",proxyquire:"^1.7.3","proxyquire-universal":"^1.0.8",proxyquireify:"^3.0.0","require-dir":"^0.3.0",rewire:"^2.1.3",rimraf:"^2.2.8",tape:"^3.0.3",testdom:"^2.0.0",uglifyjs:"^2.4.10","vinyl-source-stream":"^1.1.0",watchify:"^3.6.1"}}},{}],89:[function(t,n){var e;if("undefined"!=typeof t)try{e=t("d3")}catch(r){}e||(e=window.d3),n.exports=e,function(){var t=!1;if(t="tspans",e.selection.prototype.textwrap)return!1;if("undefined"==typeof t)var t=!1;e.selection.prototype.textwrap=e.selection.enter.prototype.textwrap=function(n,r){var i,r=parseInt(r)||0,a=this,u=function(t){var n=t[0][0],r=n.tagName.toString();if("rect"!==r)return!1;var i={};return i.x=e.select(n).attr("x")||0,i.y=e.select(n).attr("y")||0,i.width=e.select(n).attr("width")||0,i.height=e.select(n).attr("height")||0,i.attr=t.attr,i},o=function(t){if(t.attr||(t.attr=function(t){return this[t]?this[t]:void 0}),"object"==typeof t&&"undefined"!=typeof t.x&&"undefined"!=typeof t.y&&"undefined"!=typeof t.width&&"undefined"!=typeof t.height)return t;if("function"==typeof Array.isArray&&Array.isArray(t)||"[object Array]"===Object.prototype.toString.call(t)){var n=u(t);return n}return!1},s=function(t,n){var e=t;return 0!==n&&(e.x=parseInt(e.x)+n,e.y=parseInt(e.y)+n,e.width-=2*n,e.height-=2*n),e},c=o(n);if(r&&(c=s(c,r)),0!=a.length&&e&&n&&c){n=c;var l,h=function(t){var r=e.select(t[0].parentNode),a=r.select("text"),u=a.style("line-height"),o=a.text();a.remove();var s=r.append("foreignObject");s.attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height);var c=s.append("xhtml:div").attr("class","wrapped");c.style("height",n.height).style("width",n.width).html(o),u&&c.style("line-height",u),i=r.select("foreignObject")},f=function(t){var a,u=t[0],o=u.parentNode,s=e.select(u),c=u.getBBox().height,l=u.getBBox().width,h=c,f=s.style("line-height");if(a=f&&parseInt(f)?parseInt(f.replace("px","")):h,l>n.width){var d=s.text();if(s.text(""),d){var p,g;if(-1!==d.indexOf(" ")){var p=" ";g=d.split(" ")}else{p="";var y=d.length,m=Math.ceil(l/n.width),v=Math.floor(y/m);v*m>=y||m++;for(var _,b,g=[],x=0;m>x;x++)b=x*v,_=d.substr(b,v),g.push(_)}for(var w=[],A=0,k={},x=0;xn.width&&S&&""!==S&&(A+=D,k={string:S,width:D,offset:A},w.push(k),s.text(""),s.text(M),x==g.length-1&&(E=M,s.text(E),T=u.getComputedTextLength())),x==g.length-1){s.text("");var C=E;C&&""!==C&&(T-A>0&&(T-=A),k={string:C,width:T,offset:A},w.push(k))}}var F;s.text("");for(var x=0;x0){w[x-1]}x*a0?a:void 0}),F.attr("x",function(){var t=n.x;return r&&(t+=r),t}))}}}s.attr("y",function(){var t=n.y;return a&&(t+=a),r&&(t+=r),t}),s.attr("x",function(){var t=n.x;return r&&(t+=r),t}),i=e.select(o).selectAll("text")};t&&("foreignobjects"==t?l=h:"tspans"==t&&(l=f)),t||(l="undefined"!=typeof SVGForeignObjectElement?h:f);for(var d=0;d "+t.w+": "+JSON.stringify(u.edge(t))),p(i,u.edge(t),u.edge(t).relation)}),i.attr("height","100%"),i.attr("width","100%"),i.attr("viewBox","0 0 "+(u.graph().width+20)+" "+(u.graph().height+20))}},{"../../d3":89,"../../logger":111,"./classDb":90,"./parser/classDiagram":92,dagre:32}],92:[function(t,n,e){(function(r){var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[1,11],r=[1,12],i=[1,13],a=[1,15],u=[1,16],o=[1,17],s=[6,8],c=[1,26],l=[1,27],h=[1,28],f=[1,29],d=[1,30],p=[1,31],g=[6,8,13,17,23,26,27,28,29,30,31],y=[6,8,13,17,23,26,27,28,29,30,31,45,46,47],m=[23,45,46,47],v=[23,30,31,45,46,47],_=[23,26,27,28,29,45,46,47],b=[6,8,13],x=[1,46],w={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,CLASS_DIAGRAM:5,NEWLINE:6,statements:7,EOF:8,statement:9,className:10,alphaNumToken:11,relationStatement:12,LABEL:13,classStatement:14,methodStatement:15,CLASS:16,STRUCT_START:17,members:18,STRUCT_STOP:19,MEMBER:20,SEPARATOR:21,relation:22,STR:23,relationType:24,lineType:25,AGGREGATION:26,EXTENSION:27,COMPOSITION:28,DEPENDENCY:29,LINE:30,DOTTED_LINE:31,commentToken:32,textToken:33,graphCodeTokens:34,textNoTagsToken:35,TAGSTART:36,TAGEND:37,"==":38,"--":39,PCT:40,DEFAULT:41,SPACE:42,MINUS:43,keywords:44,UNICODE_TEXT:45,NUM:46,ALPHA:47,$accept:0,$end:1},terminals_:{2:"error",5:"CLASS_DIAGRAM",6:"NEWLINE",8:"EOF",13:"LABEL",16:"CLASS",17:"STRUCT_START",19:"STRUCT_STOP",20:"MEMBER",21:"SEPARATOR",23:"STR",26:"AGGREGATION",27:"EXTENSION",28:"COMPOSITION",29:"DEPENDENCY",30:"LINE",31:"DOTTED_LINE",34:"graphCodeTokens",36:"TAGSTART",37:"TAGEND",38:"==",39:"--",40:"PCT",41:"DEFAULT",42:"SPACE",43:"MINUS",44:"keywords",45:"UNICODE_TEXT",46:"NUM",47:"ALPHA"},productions_:[0,[3,1],[4,4],[7,1],[7,3],[10,2],[10,1],[9,1],[9,2],[9,1],[9,1],[14,2],[14,5],[18,1],[18,2],[15,1],[15,2],[15,1],[15,1],[12,3],[12,4],[12,4],[12,5],[22,3],[22,2],[22,2],[22,1],[24,1],[24,1],[24,1],[24,1],[25,1],[25,1],[32,1],[32,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[33,1],[35,1],[35,1],[35,1],[35,1],[11,1],[11,1],[11,1]],performAction:function(t,n,e,r,i,a){var u=a.length-1;switch(i){case 5:this.$=a[u-1]+a[u];break;case 6:this.$=a[u];break;case 7:r.addRelation(a[u]);break;case 8:a[u-1].title=r.cleanupLabel(a[u]),r.addRelation(a[u-1]);break;case 12:r.addMembers(a[u-3],a[u-1]);break;case 13:this.$=[a[u]];break;case 14:a[u].push(a[u-1]),this.$=a[u];break;case 15:break;case 16:r.addMembers(a[u-1],r.cleanupLabel(a[u]));break;case 17:console.warn("Member",a[u]);break;case 18:break;case 19:this.$={id1:a[u-2],id2:a[u],relation:a[u-1],relationTitle1:"none",relationTitle2:"none"};break;case 20:this.$={id1:a[u-3],id2:a[u],relation:a[u-1],relationTitle1:a[u-2],relationTitle2:"none"};break;case 21:this.$={id1:a[u-3],id2:a[u],relation:a[u-2],relationTitle1:"none",relationTitle2:a[u-1]};break;case 22:this.$={id1:a[u-4],id2:a[u],relation:a[u-2],relationTitle1:a[u-3],relationTitle2:a[u-1]};break;case 23:this.$={type1:a[u-2],type2:a[u],lineType:a[u-1]};break;case 24:this.$={type1:"none",type2:a[u],lineType:a[u-1]};break;case 25:this.$={type1:a[u-1],type2:"none",lineType:a[u]};break;case 26:this.$={type1:"none",type2:"none",lineType:a[u]};break;case 27:this.$=r.relationType.AGGREGATION;break;case 28:this.$=r.relationType.EXTENSION;break;case 29:this.$=r.relationType.COMPOSITION;break;case 30:this.$=r.relationType.DEPENDENCY;break;case 31:this.$=r.lineType.LINE;break;case 32:this.$=r.lineType.DOTTED_LINE}},table:[{3:1,4:2,5:[1,3]},{1:[3]},{1:[2,1]},{6:[1,4]},{7:5,9:6,10:10,11:14,12:7,14:8,15:9,16:e,20:r,21:i,45:a,46:u,47:o},{8:[1,18]},{6:[1,19],8:[2,3]},n(s,[2,7],{13:[1,20]}),n(s,[2,9]),n(s,[2,10]),n(s,[2,15],{22:21,24:24,25:25,13:[1,23],23:[1,22],26:c,27:l,28:h,29:f,30:d,31:p}),{10:32,11:14,45:a,46:u,47:o},n(s,[2,17]),n(s,[2,18]),n(g,[2,6],{11:14,10:33,45:a,46:u,47:o}),n(y,[2,46]),n(y,[2,47]),n(y,[2,48]),{1:[2,2]},{7:34,9:6,10:10,11:14,12:7,14:8,15:9,16:e,20:r,21:i,45:a,46:u,47:o},n(s,[2,8]),{10:35,11:14,23:[1,36],45:a,46:u,47:o},{22:37,24:24,25:25,26:c,27:l,28:h,29:f,30:d,31:p},n(s,[2,16]),{25:38,30:d,31:p},n(m,[2,26],{24:39,26:c,27:l,28:h,29:f}),n(v,[2,27]),n(v,[2,28]),n(v,[2,29]),n(v,[2,30]),n(_,[2,31]),n(_,[2,32]),n(s,[2,11],{17:[1,40]}),n(g,[2,5]),{8:[2,4]},n(b,[2,19]),{10:41,11:14,45:a,46:u,47:o},{10:42,11:14,23:[1,43],45:a,46:u,47:o},n(m,[2,25],{24:44,26:c,27:l,28:h,29:f}),n(m,[2,24]),{18:45,20:x},n(b,[2,21]),n(b,[2,20]),{10:47,11:14,45:a,46:u,47:o},n(m,[2,23]),{19:[1,48]},{18:49,19:[2,13],20:x},n(b,[2,22]),n(s,[2,12]),{19:[2,14]}],defaultActions:{2:[2,1],18:[2,2],34:[2,4],49:[2,14]},parseError:function(t,n){function e(t,n){this.message=t,this.hash=n}if(!n.recoverable)throw e.prototype=Error,new e(t,n);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,u="",o=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,A,k,E,M,S=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},D={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=S()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(A in a[b])this.terminals_[A]&&A>l&&M.push("'"+this.terminals_[A]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(o+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,u=d.yytext,o=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[x[1]][1],D.$=r[r.length-k],D._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(D._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(D,[u,s,o,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;k&&(e=e.slice(0,-1*k*2),r=r.slice(0,-1*k),i=i.slice(0,-1*k)),e.push(this.productions_[x[1]][0]),r.push(D.$),i.push(D._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},A=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||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 n=t.match(/(?:\r\n?|\n).*/g);return n?(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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.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:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;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,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;an[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,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,n,e,r){switch(e){case 0:break;case 1:return 6;case 2:break;case 3:return 5;case 4:return this.begin("struct"),17;case 5:return this.popState(),19;case 6:break;case 7:return"MEMBER";case 8:return 16;case 9:this.begin("string");break;case 10:this.popState();break;case 11:return"STR";case 12:return 27;case 13:return 27;case 14:return 29;case 15:return 29;case 16:return 28;case 17:return 26;case 18:return 30;case 19:return 31;case 20:return 13;case 21:return 43;case 22:return"DOT";case 23:return"PLUS";case 24:return 40;case 25:return"EQUALS";case 26:return"EQUALS";case 27:return 47;case 28:return"PUNCTUATION";case 29:return 46;case 30:return 45;case 31:return 42;case 32:return 8}},rules:[/^(?:%%[^\n]*)/,/^(?:\n+)/,/^(?:\s+)/,/^(?:classDiagram\b)/,/^(?:[\{])/,/^(?:\})/,/^(?:[\n])/,/^(?:[^\{\}\n]*)/,/^(?:class\b)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::[^#\n;]+)/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/], conditions:{string:{rules:[10,11],inclusive:!1},struct:{rules:[5,6,7],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,8,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!0}}};return t}();return w.lexer=A,t.prototype=w,w.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:87,fs:1,path:86}],93:[function(t,n,e){(function(n){var r=t("../../logger"),i=r.Log,a="",u=!1;e.setMessage=function(t){i.debug("Setting message to: "+t),a=t},e.getMessage=function(){return a},e.setInfo=function(t){u=t},e.getInfo=function(){return u},e.parseError=function(t,e){n.mermaidAPI.parseError(t,e)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":111}],94:[function(t,n,e){var r=t("./exampleDb"),i=t("./parser/example.js"),a=t("../../d3"),u=t("../../logger"),o=u.Log;e.draw=function(t,n,e){var u;u=i.parser,u.yy=r,o.debug("Renering example diagram"),u.parse(t);var s=a.select("#"+n),c=s.append("g");c.append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("mermaid "+e),s.attr("height",100),s.attr("width",400)}},{"../../d3":89,"../../logger":111,"./exampleDb":93,"./parser/example.js":95}],95:[function(t,n,e){(function(r){var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[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,n,e,r,i,a){var u=a.length-1;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0);break;case 7:r.setMessage(a[u]);break;case 8:this.$=a[u-1].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:[1,2]},{1:[3]},n(e,[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]},n(e,[2,3]),n(e,[2,4]),n(e,[2,5]),n(e,[2,6]),n(e,[2,7]),{13:[1,11]},n(e,[2,8])],defaultActions:{4:[2,1]},parseError:function(t,n){function e(t,n){this.message=t,this.hash=n}if(!n.recoverable)throw e.prototype=Error,new e(t,n);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,u="",o=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,A,k,E,M,S=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},D={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=S()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(A in a[b])this.terminals_[A]&&A>l&&M.push("'"+this.terminals_[A]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(o+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,u=d.yytext,o=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[x[1]][1],D.$=r[r.length-k],D._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(D._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(D,[u,s,o,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;k&&(e=e.slice(0,-1*k*2),r=r.slice(0,-1*k),i=i.slice(0,-1*k)),e.push(this.productions_[x[1]][0]),r.push(D.$),i.push(D._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||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 n=t.match(/(?:\r\n?|\n).*/g);return n?(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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.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:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;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,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;an[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,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,n,e,r){switch(e){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 e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:87,fs:1,path:86}],96:[function(t,n){var e,r=t("../../logger"),i=r.Log;if(t)try{e=t("dagre-d3")}catch(a){i.debug("Could not load dagre-d3")}e||(e=window.dagreD3),n.exports=e},{"../../logger":111,"dagre-d3":3}],97:[function(t,n,e){var r=t("./graphDb"),i=t("./parser/flow"),a=t("./parser/dot"),u=t("../../d3"),o=t("./dagre-d3"),s=t("../../logger"),c=s.Log,l={};n.exports.setConf=function(t){var n,e=Object.keys(t);for(n=0;n0&&(u=a.classes.join(" "));var o="";o=r(o,a.styles),i="undefined"==typeof a.text?a.id:a.text;var s="";if(l.htmlLabels)s="html",i=i.replace(/fa:fa[\w\-]+/g,function(t){return''});else{var c=document.createElementNS("http://www.w3.org/2000/svg","text"),h=i.split(/
/),f=0;for(f=0;f"):(a.labelType="text",a.style="stroke: #333; stroke-width: 1.5px;fill:none",a.label=i.text.replace(/
/g,"\n"))):a.label=i.text.replace(/
/g,"\n")),n.setEdge(i.start,i.end,a,r)})},e.getClasses=function(t,n){var e;r.clear(),e=n?a.parser:i.parser,e.yy=r,e.parse(t);var u=r.getClasses();return"undefined"==typeof u["default"]&&(u["default"]={id:"default"},u["default"].styles=[],u["default"].clusterStyles=["rx:4px","fill: rgb(255, 255, 222)","rx: 4px","stroke: rgb(170, 170, 51)","stroke-width: 1px"],u["default"].nodeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"],u["default"].edgeLabelStyles=["fill:#000","stroke:none","font-weight:300",'font-family:"Helvetica Neue",Helvetica,Arial,sans-serf',"font-size:14px"]),u},e.draw=function(t,n,s){c.debug("Drawing flowchart");var h;r.clear(),h=s?a.parser:i.parser,h.yy=r;try{h.parse(t)}catch(f){c.debug("Parsing failed")}var d;d=r.getDirection(),"undefined"==typeof d&&(d="TD");var p,g=new o.graphlib.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:d,marginx:20,marginy:20}).setDefaultEdgeLabel(function(){return{}}),y=r.getSubGraphs(),m=0;for(m=y.length-1;m>=0;m--)p=y[m],r.addVertex(p.id,p.title,"group",void 0);var v=r.getVertices(),_=r.getEdges();m=0;var b;for(m=y.length-1;m>=0;m--)for(p=y[m],u.selectAll("cluster").append("text"),b=0;b0?t.split(",").forEach(function(t){"undefined"!=typeof vertices[t]&&vertices[t].classes.push(n)}):"undefined"!=typeof vertices[t]&&vertices[t].classes.push(n)};var setTooltip=function(t,n){"undefined"!=typeof n&&(tooltips[t]=n)},setClickFun=function(id,functionName){"undefined"!=typeof functionName&&"undefined"!=typeof vertices[id]&&funs.push(function(element){var elem=d3.select(element).select("#"+id);null!==elem&&elem.on("click",function(){eval(functionName+"('"+id+"')")})})},setLink=function(t,n){"undefined"!=typeof n&&"undefined"!=typeof vertices[t]&&funs.push(function(e){var r=d3.select(e).select("#"+t);null!==r&&r.on("click",function(){window.open(n,"newTab")})})};exports.getTooltip=function(t){return tooltips[t]},exports.setClickEvent=function(t,n,e,r){t.indexOf(",")>0?t.split(",").forEach(function(t){setTooltip(t,r),setClickFun(t,n),setLink(t,e)}):(setTooltip(t,r),setClickFun(t,n),setLink(t,e))},exports.bindFunctions=function(t){funs.forEach(function(n){n(t)})},exports.getDirection=function(){return direction},exports.getVertices=function(){return vertices},exports.getEdges=function(){return edges},exports.getClasses=function(){return classes};var setupToolTips=function(t){var n=d3.select(".mermaidTooltip");null===n[0][0]&&(n=d3.select("body").append("div").attr("class","mermaidTooltip").style("opacity",0));var e=d3.select(t).select("svg"),r=e.selectAll("g.node");r.on("mouseover",function(){var t=d3.select(this),e=t.attr("title");if(null!==e){var r=this.getBoundingClientRect();n.transition().duration(200).style("opacity",".9"),n.html(t.attr("title")).style("left",r.left+(r.right-r.left)/2+"px").style("top",r.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}}).on("mouseout",function(){n.transition().duration(500).style("opacity",0);var t=d3.select(this);t.classed("hover",!1)})};funs.push(setupToolTips),exports.clear=function(){vertices={},classes={},edges=[],funs=[],funs.push(setupToolTips),subGraphs=[],subCount=0,tooltips=[]},exports.defaultStyle=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},exports.addSubGraph=function(t,n){function e(t){var n={"boolean":{},number:{},string:{}},e=[];return t.filter(function(t){var r=typeof t;return" "===t?!1:r in n?n[r].hasOwnProperty(t)?!1:n[r][t]=!0:e.indexOf(t)>=0?!1:e.push(t)})}var r=[];r=e(r.concat.apply(r,t));var i={id:"subGraph"+subCount,nodes:r,title:n};return subGraphs.push(i),subCount+=1,i.id};var getPosForId=function(t){var n;for(n=0;n2e3)){if(posCrossRef[secCount]=n,subGraphs[n].id===t)return{result:!0,count:0};for(var r=0,i=1;r=0){var u=indexNodes(t,a);if(u.result)return{result:!0,count:i+u.count};i+=u.count}r+=1}return{result:!1,count:i}}};exports.getDepthFirstPos=function(t){return posCrossRef[t]},exports.indexNodes=function(){secCount=-1,subGraphs.length>0&&indexNodes("none",subGraphs.length-1,0)},exports.getSubGraphs=function(){return subGraphs},exports.parseError=function(t,n){global.mermaidAPI.parseError(t,n)}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../d3":89,"../../logger":111,"../../utils":113}],99:[function(t,n,e){(function(r){var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[1,5],r=[1,6],i=[1,12],a=[1,13],u=[1,14],o=[1,15],s=[1,16],c=[1,17],l=[1,18],h=[1,19],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],_=[1,35],b=[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],M=[1,48],S=[1,49],D=[1,52],T=[2,65],C=[1,65],F=[1,66],O=[1,67],L=[1,68],I=[1,69],B=[1,70],N=[1,71],P=[1,72],R=[1,73],j=[8,16,17,18,19,20,21,22,23,24,25,26,47],Y=[10,28,37],$={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,n,e,r,i,a){var u=a.length-1;switch(i){case 1:this.$=a[u-1];break;case 2:this.$=a[u-4];break;case 3:this.$=a[u-5];break;case 4:this.$=a[u-3];break;case 8:case 10:case 11:this.$=a[u];break;case 9:this.$=a[u-1]+""+a[u];break;case 12:case 13:case 14:case 15:case 16:case 18:case 19:case 20:this.$=a[u];break;case 17:this.$="
";break;case 39:this.$="oy";break;case 40:r.addLink(a[u-1],a[u].id,a[u].op),this.$="oy";break;case 42:r.addLink(a[u-1],a[u].id,a[u].op),this.$={op:a[u-2],id:a[u-1]};break;case 44:this.$={op:a[u-1],id:a[u]};break;case 48:r.addVertex(a[u-1]),this.$=a[u-1];break;case 49:r.addVertex(a[u]),this.$=a[u];break;case 66:this.$="arrow";break;case 67:this.$="arrow_open"}},table:[{3:1,4:2,6:3,11:[1,4],12:e,13:r},{1:[3]},{5:[1,7]},{7:8,8:[1,9],14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{6:23,12:e,13:r},n(g,[2,5]),n(g,[2,6]),{1:[2,1]},{8:[1,24]},{7:30,8:y,9:25,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},n([8,10,28,32,37,39,40,45,57,58],[2,7],{15:38,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p}),n(x,[2,8]),n(x,[2,10]),n(x,[2,11]),n(x,[2,12]),n(x,[2,13]),n(x,[2,14]),n(x,[2,15]),n(x,[2,16]),n(x,[2,17]),n(x,[2,18]),n(x,[2,19]),n(x,[2,20]),{7:39,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:40,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,41]},{10:[2,21],28:[1,42]},n(w,[2,23]),n(w,[2,24]),n(w,[2,25]),n(A,k,{44:44,32:[1,43],45:E}),n(w,[2,27],{41:46,43:47,57:M,58:S}),n(w,[2,47],{43:47,34:50,41:51,37:D,57:M,58:S}),{34:53,37:D},{34:54,37:D},{34:55,37:D},{7:56,8:[1,57],14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{7:30,8:y,9:58,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},n(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:u,19:o,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:_,42:32,47:b},{7:62,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p},n(A,[2,48]),n(A,T,{14:10,15:11,7:63,46:64,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,48:C,49:F,50:O,51:L,52:I,53:B,54:N,55:P,56:R}),n(w,[2,41],{34:74,37:D}),{7:77,8:y,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,33:76,42:75,47:b},n(j,[2,66]),n(j,[2,67]),n(w,[2,46]),n(w,[2,40],{34:78,37:D}),{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:79,39:[1,80]},n(w,[2,28]),n(w,[2,29]),n(w,[2,30]),{8:[1,82]},{7:30,8:y,9:83,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,84]},{7:30,8:y,9:85,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{5:[2,2]},{10:[2,22]},n(w,[2,26]),n(A,[2,51],{45:[1,86]}),n(A,[2,52]),n(A,[2,56]),n(A,[2,57]),n(A,[2,58]),n(A,[2,59]),n(A,[2,60]),n(A,[2,61]),n(A,[2,62]),n(A,[2,63]),n(A,[2,64]),n(w,[2,38]),n(Y,[2,44],{43:47,41:87,57:M,58:S}),n(Y,[2,45],{43:47,41:88,57:M,58:S}),n(A,k,{44:44,45:E}),n(w,[2,39]),{39:[1,89]},n(w,[2,34],{34:90,37:D}),{32:[1,91]},{7:30,8:y,9:92,12:m,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,27:26,29:27,30:28,31:29,33:31,35:v,36:_,42:32,47:b},{10:[1,93]},n(A,[2,55]),{10:[1,94]},n(A,T,{46:95,48:C,49:F,50:O,51:L,52:I,53:B,54:N,55:P,56:R}),n(Y,[2,42]),n(Y,[2,43]),n(w,[2,33],{34:96,37:D}),n(w,[2,32]),{7:97,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p},{10:[1,98]},n(A,[2,54]),{5:[2,3]},n(A,[2,50]),n(w,[2,31]),{28:[1,99],39:[2,37],40:[1,100]},n(A,[2,53]),{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24:f,25:d,26:p,38:101},{7:81,14:10,15:11,16:i,17:a,18:u,19:o,20:s,21:c,22:l,23:h,24: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,n){function e(t,n){this.message=t,this.hash=n}if(!n.recoverable)throw e.prototype=Error,new e(t,n);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,u="",o=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,A,k,E,M,S=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},D={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=S()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(A in a[b])this.terminals_[A]&&A>l&&M.push("'"+this.terminals_[A]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(o+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,u=d.yytext,o=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[x[1]][1],D.$=r[r.length-k],D._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(D._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(D,[u,s,o,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;k&&(e=e.slice(0,-1*k*2),r=r.slice(0,-1*k),i=i.slice(0,-1*k)),e.push(this.productions_[x[1]][0]),r.push(D.$),i.push(D._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},U=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||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 n=t.match(/(?:\r\n?|\n).*/g);return n?(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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.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:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;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,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;an[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,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,n,e,r){switch(e){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 $.lexer=U,t.prototype=$,$.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:87,fs:1,path:86}],100:[function(t,n,e){(function(r){var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[1,4],r=[1,3],i=[1,5],a=[1,8,9,10,11,13,18,30,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],u=[2,2],o=[1,12],s=[1,13],c=[1,14],l=[1,15],h=[1,31],f=[1,33],d=[1,22],p=[1,34],g=[1,24],y=[1,25],m=[1,26],v=[1,27],_=[1,28],b=[1,38],x=[1,40],w=[1,35],A=[1,39],k=[1,45],E=[1,44],M=[1,36],S=[1,37],D=[1,41],T=[1,42],C=[1,43],F=[1,8,9,10,11,13,18,30,32,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],O=[1,53],L=[1,52],I=[1,54],B=[1,72],N=[1,80],P=[1,81],R=[1,66],j=[1,65],Y=[1,85],$=[1,84],U=[1,82],z=[1,83],W=[1,73],q=[1,68],G=[1,67],V=[1,63],H=[1,75],Z=[1,76],X=[1,77],K=[1,78],J=[1,79],Q=[1,70],tt=[1,69],nt=[8,9,11],et=[8,9,11,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64],rt=[1,115],it=[8,9,10,11,13,15,18,36,38,40,42,46,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,81,86,88,89,91,92,94,95,96,97,98],at=[8,9,10,11,12,13,15,16,17,18,30,32,36,37,38,39,40,41,42,43,46,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,71,72,73,74,75,78,81,84,86,88,89,91,92,94,95,96,97,98],ut=[1,117],ot=[1,118],st=[8,9,10,11,13,18,30,32,46,71,72,73,74,75,81,86,88,89,91,92,94,95,96,97,98],ct=[8,9,10,11,12,13,15,16,17,18,30,32,37,39,41,43,46,50,51,52,53,54,56,57,58,59,60,61,62,63,64,65,71,72,73,74,75,78,81,84,86,88,89,91,92,94,95,96,97,98],lt=[13,18,46,81,86,88,89,91,92,94,95,96,97,98],ht=[13,18,46,49,65,81,86,88,89,91,92,94,95,96,97,98],ft=[1,191],dt=[1,188],pt=[1,195],gt=[1,192],yt=[1,189],mt=[1,196],vt=[1,186],_t=[1,187],bt=[1,190],xt=[1,193],wt=[1,194],At=[1,213],kt=[8,9,11,86],Et=[8,9,10,11,46,71,80,81,84,86,88,89,90,91,92],Mt={trace:function(){},yy:{},symbols_:{error:2,mermaidDoc:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,DIR:13,FirstStmtSeperator:14,TAGEND:15,TAGSTART:16,UP:17,DOWN:18,ending:19,endToken:20,spaceList:21,spaceListNewline:22,verticeStatement:23,separator:24,styleStatement:25,linkStyleStatement:26,classDefStatement:27,classStatement:28,clickStatement:29,subgraph:30,text:31,end:32,vertex:33,link:34,alphaNum:35,SQS:36,SQE:37,PS:38,PE:39,"(-":40,"-)":41,DIAMOND_START:42,DIAMOND_STOP:43,alphaNumStatement:44,alphaNumToken:45,MINUS:46,linkStatement:47,arrowText:48,TESTSTR:49,"--":50,ARROW_POINT:51,ARROW_CIRCLE:52,ARROW_CROSS:53,ARROW_OPEN:54,"-.":55,DOTTED_ARROW_POINT:56,DOTTED_ARROW_CIRCLE:57,DOTTED_ARROW_CROSS:58,DOTTED_ARROW_OPEN:59,"==":60,THICK_ARROW_POINT:61,THICK_ARROW_CIRCLE:62,THICK_ARROW_CROSS:63,THICK_ARROW_OPEN:64,PIPE:65,textToken:66,STR:67,commentText:68,commentToken:69,keywords:70,STYLE:71,LINKSTYLE:72,CLASSDEF:73,CLASS:74,CLICK:75,textNoTags:76,textNoTagsToken:77,DEFAULT:78,stylesOpt:79,HEX:80,NUM:81,INTERPOLATE:82,commentStatement:83,PCT:84,style:85,COMMA:86,styleComponent:87,ALPHA:88,COLON:89,UNIT:90,BRKT:91,DOT:92,graphCodeTokens:93,PUNCTUATION:94,UNICODE_TEXT:95,PLUS:96,EQUALS:97,MULT:98,TAG_START:99,TAG_END:100,QUOTE:101,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"DIR",15:"TAGEND",16:"TAGSTART",17:"UP",18:"DOWN",30:"subgraph",32:"end",36:"SQS",37:"SQE",38:"PS",39:"PE",40:"(-",41:"-)",42:"DIAMOND_START",43:"DIAMOND_STOP",46:"MINUS",49:"TESTSTR",50:"--",51:"ARROW_POINT",52:"ARROW_CIRCLE",53:"ARROW_CROSS",54:"ARROW_OPEN",55:"-.",56:"DOTTED_ARROW_POINT",57:"DOTTED_ARROW_CIRCLE",58:"DOTTED_ARROW_CROSS",59:"DOTTED_ARROW_OPEN",60:"==",61:"THICK_ARROW_POINT",62:"THICK_ARROW_CIRCLE",63:"THICK_ARROW_CROSS",64:"THICK_ARROW_OPEN",65:"PIPE",67:"STR",71:"STYLE",72:"LINKSTYLE",73:"CLASSDEF",74:"CLASS",75:"CLICK",78:"DEFAULT",80:"HEX",81:"NUM",82:"INTERPOLATE",84:"PCT",86:"COMMA",88:"ALPHA",89:"COLON",90:"UNIT",91:"BRKT",92:"DOT",94:"PUNCTUATION",95:"UNICODE_TEXT",96:"PLUS",97:"EQUALS",98:"MULT",99:"TAG_START",100:"TAG_END",101:"QUOTE"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,4],[4,4],[4,4],[4,4],[4,4],[19,2],[19,1],[20,1],[20,1],[20,1],[14,1],[14,1],[14,2],[22,2],[22,2],[22,1],[22,1],[21,2],[21,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,5],[7,4],[24,1],[24,1],[24,1],[23,3],[23,1],[33,4],[33,5],[33,6],[33,7],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,4],[33,5],[33,1],[33,2],[35,1],[35,2],[44,1],[44,1],[44,1],[44,1],[34,2],[34,3],[34,3],[34,1],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[34,3],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[47,1],[48,3],[31,1],[31,2],[31,1],[68,1],[68,2],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[70,1],[76,1],[76,2],[27,5],[27,5],[28,5],[29,5],[29,7],[29,5],[29,7],[25,5],[25,5],[26,5],[26,5],[26,9],[26,9],[26,7],[26,7],[83,3],[79,1],[79,3],[85,1],[85,2],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[87,1],[69,1],[69,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[77,1],[77,1],[77,1],[77,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1],[93,1]],performAction:function(t,n,e,r,i,a){var u=a.length-1;switch(i){case 2:this.$=[];break;case 3:a[u]!==[]&&a[u-1].push(a[u]),this.$=a[u-1];break;case 4:case 57:case 59:case 60:case 92:case 94:case 95:case 108:this.$=a[u];break;case 11:r.setDirection(a[u-1]),this.$=a[u-1];break;case 12:r.setDirection("LR"),this.$=a[u-1];break;case 13:r.setDirection("RL"),this.$=a[u-1];break;case 14:r.setDirection("BT"),this.$=a[u-1];break;case 15:r.setDirection("TB"),this.$=a[u-1];break;case 30:this.$=a[u-1];break;case 31:case 32:case 33:case 34:case 35:this.$=[];break;case 36:this.$=r.addSubGraph(a[u-1],a[u-3]);break;case 37:this.$=r.addSubGraph(a[u-1],void 0);break;case 41:r.addLink(a[u-2],a[u],a[u-1]),this.$=[a[u-2],a[u]];break;case 42:this.$=[a[u]];break;case 43:this.$=a[u-3],r.addVertex(a[u-3],a[u-1],"square");break;case 44:this.$=a[u-4],r.addVertex(a[u-4],a[u-2],"square");break;case 45:this.$=a[u-5],r.addVertex(a[u-5],a[u-2],"circle");break;case 46:this.$=a[u-6],r.addVertex(a[u-6],a[u-3],"circle");break;case 47:this.$=a[u-3],r.addVertex(a[u-3],a[u-1],"ellipse");break;case 48:this.$=a[u-4],r.addVertex(a[u-4],a[u-2],"ellipse");break;case 49:this.$=a[u-3],r.addVertex(a[u-3],a[u-1],"round");break;case 50:this.$=a[u-4],r.addVertex(a[u-4],a[u-2],"round");break;case 51:this.$=a[u-3],r.addVertex(a[u-3],a[u-1],"diamond");break;case 52:this.$=a[u-4],r.addVertex(a[u-4],a[u-2],"diamond");break;case 53:this.$=a[u-3],r.addVertex(a[u-3],a[u-1],"odd");break;case 54:this.$=a[u-4],r.addVertex(a[u-4],a[u-2],"odd");break;case 55:this.$=a[u],r.addVertex(a[u]);break;case 56:this.$=a[u-1],r.addVertex(a[u-1]);break;case 58:case 93:case 96:case 109:this.$=a[u-1]+""+a[u];break;case 61:this.$="v";break;case 62:this.$="-";break;case 63:a[u-1].text=a[u],this.$=a[u-1];break;case 64:case 65:a[u-2].text=a[u-1],this.$=a[u-2];break;case 66:this.$=a[u];break;case 67:this.$={type:"arrow",stroke:"normal",text:a[u-1]};break;case 68:this.$={type:"arrow_circle",stroke:"normal",text:a[u-1]};break;case 69:this.$={type:"arrow_cross",stroke:"normal",text:a[u-1]};break;case 70:this.$={type:"arrow_open",stroke:"normal",text:a[u-1]};break;case 71:this.$={type:"arrow",stroke:"dotted",text:a[u-1]};break;case 72:this.$={type:"arrow_circle",stroke:"dotted",text:a[u-1]};break;case 73:this.$={type:"arrow_cross",stroke:"dotted",text:a[u-1]};break;case 74:this.$={type:"arrow_open",stroke:"dotted",text:a[u-1]};break;case 75:this.$={type:"arrow",stroke:"thick",text:a[u-1]};break;case 76:this.$={type:"arrow_circle",stroke:"thick",text:a[u-1]};break;case 77:this.$={type:"arrow_cross",stroke:"thick",text:a[u-1]};break;case 78:this.$={type:"arrow_open",stroke:"thick",text:a[u-1]};break;case 79:this.$={type:"arrow",stroke:"normal"};break;case 80:this.$={type:"arrow_circle",stroke:"normal"};break;case 81:this.$={type:"arrow_cross",stroke:"normal"};break;case 82:this.$={type:"arrow_open",stroke:"normal"};break;case 83:this.$={type:"arrow",stroke:"dotted"};break;case 84:this.$={type:"arrow_circle",stroke:"dotted"};break;case 85:this.$={type:"arrow_cross",stroke:"dotted"};break;case 86:this.$={type:"arrow_open",stroke:"dotted"};break;case 87:this.$={type:"arrow",stroke:"thick"};break;case 88:this.$={type:"arrow_circle",stroke:"thick"};break;case 89:this.$={type:"arrow_cross",stroke:"thick"};break;case 90:this.$={type:"arrow_open",stroke:"thick"};break;case 91:this.$=a[u-1];break;case 110:case 111:this.$=a[u-4],r.addClass(a[u-2],a[u]);break;case 112:this.$=a[u-4],r.setClass(a[u-2],a[u]);break;case 113:this.$=a[u-4],r.setClickEvent(a[u-2],a[u],void 0,void 0);break;case 114:this.$=a[u-6],r.setClickEvent(a[u-4],a[u-2],void 0,a[u]);break;case 115:this.$=a[u-4],r.setClickEvent(a[u-2],void 0,a[u],void 0);break;case 116:this.$=a[u-6],r.setClickEvent(a[u-4],void 0,a[u-2],a[u]);break;case 117:this.$=a[u-4],r.addVertex(a[u-2],void 0,void 0,a[u]);break;case 118:case 119:case 120:this.$=a[u-4],r.updateLink(a[u-2],a[u]);break;case 121:case 122:this.$=a[u-8],r.updateLinkInterpolate(a[u-6],a[u-2]),r.updateLink(a[u-6],a[u]);break;case 123:case 124:this.$=a[u-6],r.updateLinkInterpolate(a[u-4],a[u]);break;case 126:this.$=[a[u]];break;case 127:a[u-2].push(a[u]),this.$=a[u-2];break;case 129:this.$=a[u-1]+a[u]}},table:[{3:1,4:2,9:e,10:r,12:i},{1:[3]},n(a,u,{5:6}),{4:7,9:e,10:r,12:i},{4:8,9:e,10:r,12:i},{10:[1,9]},{1:[2,1],6:10,7:11,8:o,9:s,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,33:23,35:29,44:30,45:32,46:p,71:g,72:y,73:m,74:v,75:_,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(a,[2,9]),n(a,[2,10]),{13:[1,46],15:[1,47],16:[1,48],17:[1,49],18:[1,50]},n(F,[2,3]),n(F,[2,4]),n(F,[2,5]),n(F,[2,6]),n(F,[2,7]),n(F,[2,8]),{8:O,9:L,11:I,24:51},{8:O,9:L,11:I,24:55},{8:O,9:L,11:I,24:56},{8:O,9:L,11:I,24:57},{8:O,9:L,11:I,24:58},{8:O,9:L,11:I,24:59},{8:O,9:L,10:B,11:I,12:N,13:P,15:R,16:j,17:Y,18:$,24:61,30:U,31:60,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(nt,[2,42],{34:86,47:87,50:[1,88],51:[1,91],52:[1,92],53:[1,93],54:[1,94],55:[1,89],56:[1,95],57:[1,96],58:[1,97],59:[1,98],60:[1,90],61:[1,99],62:[1,100],63:[1,101],64:[1,102]}),{10:[1,103]},{10:[1,104]},{10:[1,105]},{10:[1,106]},{10:[1,107]},n(et,[2,55],{45:32,21:113,44:114,10:rt,13:h,15:[1,112],18:f,36:[1,108],38:[1,109],40:[1,110],42:[1,111],46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C}),n(it,[2,57]),n(it,[2,59]),n(it,[2,60]),n(it,[2,61]),n(it,[2,62]),n(at,[2,154]),n(at,[2,155]),n(at,[2,156]),n(at,[2,157]),n(at,[2,158]),n(at,[2,159]),n(at,[2,160]),n(at,[2,161]),n(at,[2,162]),n(at,[2,163]),n(at,[2,164]),{8:ut,9:ot,10:rt,14:116,21:119},{8:ut,9:ot,10:rt,14:120,21:119},{8:ut,9:ot,10:rt,14:121,21:119},{8:ut,9:ot,10:rt,14:122,21:119},{8:ut,9:ot,10:rt,14:123,21:119},n(F,[2,30]),n(F,[2,38]),n(F,[2,39]),n(F,[2,40]),n(F,[2,31]),n(F,[2,32]),n(F,[2,33]),n(F,[2,34]),n(F,[2,35]),{8:O,9:L,10:B,11:I,12:N,13:P,15:R,16:j,17:Y,18:$,24:124,30:U,32:z,45:71,46:W,50:q,60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(st,u,{5:126}),n(ct,[2,92]),n(ct,[2,94]),n(ct,[2,143]),n(ct,[2,144]),n(ct,[2,145]),n(ct,[2,146]),n(ct,[2,147]),n(ct,[2,148]),n(ct,[2,149]),n(ct,[2,150]),n(ct,[2,151]),n(ct,[2,152]),n(ct,[2,153]),n(ct,[2,97]),n(ct,[2,98]),n(ct,[2,99]),n(ct,[2,100]),n(ct,[2,101]),n(ct,[2,102]),n(ct,[2,103]),n(ct,[2,104]),n(ct,[2,105]),n(ct,[2,106]),n(ct,[2,107]),{13:h,18:f,33:127,35:29,44:30,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(lt,[2,66],{48:128,49:[1,129],65:[1,130]}),{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:131,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:132,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:133,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(ht,[2,79]),n(ht,[2,80]),n(ht,[2,81]),n(ht,[2,82]),n(ht,[2,83]),n(ht,[2,84]),n(ht,[2,85]),n(ht,[2,86]),n(ht,[2,87]),n(ht,[2,88]),n(ht,[2,89]),n(ht,[2,90]),{13:h,18:f,35:134,44:30,45:32,46:p,80:[1,135],81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{78:[1,136],81:[1,137]},{13:h,18:f,35:139,44:30,45:32,46:p,78:[1,138],81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{13:h,18:f,35:140,44:30,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{13:h,18:f,35:141,44:30,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:142,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:144,32:z,38:[1,143],45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:145,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:146,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:147,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(et,[2,56]),n(it,[2,58]),n(et,[2,29],{21:148,10:rt}),n(a,[2,11]),n(a,[2,21]),n(a,[2,22]),{9:[1,149]},n(a,[2,12]),n(a,[2,13]),n(a,[2,14]),n(a,[2,15]),n(st,u,{5:150}),n(ct,[2,93]),{6:10,7:11,8:o,9:s,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,151],33:23,35:29,44:30,45:32,46:p,71:g,72:y,73:m,74:v,75:_,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(nt,[2,41]),n(lt,[2,63],{10:[1,152]}),{10:[1,153]},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:154,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,45:71,46:W,50:q,51:[1,155],52:[1,156],53:[1,157],54:[1,158],60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,45:71,46:W,50:q,56:[1,159],57:[1,160],58:[1,161],59:[1,162],60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,45:71,46:W,50:q,60:G,61:[1,163],62:[1,164],63:[1,165],64:[1,166],66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:[1,167],13:h,18:f,44:114,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:[1,168]},{10:[1,169]},{10:[1,170]},{10:[1,171]},{10:[1,172],13:h,18:f,44:114,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:[1,173],13:h,18:f,44:114,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:[1,174],13:h,18:f,44:114,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,37:[1,175],45:71,46:W,50:q,60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,31:176,32:z,45:71,46:W,50:q,60:G,66:62,67:V,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,39:[1,177],45:71,46:W,50:q,60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,41:[1,178],45:71,46:W,50:q,60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,43:[1,179],45:71,46:W,50:q,60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,37:[1,180],45:71,46:W,50:q,60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(et,[2,28]),n(a,[2,23]),{6:10,7:11,8:o,9:s,10:c,11:l,13:h,18:f,23:16,25:17,26:18,27:19,28:20,29:21,30:d,32:[1,181],33:23,35:29,44:30,45:32,46:p,71:g,72:y,73:m,74:v,75:_,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(F,[2,37]),n(lt,[2,65]),n(lt,[2,64]),{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,45:71,46:W,50:q,60:G,65:[1,182],66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(lt,[2,67]),n(lt,[2,68]),n(lt,[2,69]),n(lt,[2,70]),n(lt,[2,71]),n(lt,[2,72]),n(lt,[2,73]),n(lt,[2,74]),n(lt,[2,75]),n(lt,[2,76]),n(lt,[2,77]),n(lt,[2,78]),{10:ft,46:dt,71:pt,79:183,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},{10:ft,46:dt,71:pt,79:197,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},{10:ft,46:dt,71:pt,79:198,80:gt,81:yt,82:[1,199],84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},{10:ft,46:dt,71:pt,79:200,80:gt,81:yt,82:[1,201],84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},{10:ft,46:dt,71:pt,79:202,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},{10:ft,46:dt,71:pt,79:203,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},{13:h,18:f,35:204,44:30,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{13:h,18:f,35:205,44:30,45:32,46:p,67:[1,206],81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(et,[2,43],{21:207,10:rt}),{10:B,12:N,13:P,15:R,16:j,17:Y,18:$,30:U,32:z,39:[1,208],45:71,46:W,50:q,60:G,66:125,70:74,71:H,72:Z,73:X,74:K,75:J,77:64,78:Q,81:b,84:tt,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},n(et,[2,49],{21:209,10:rt}),n(et,[2,47],{21:210,10:rt}),n(et,[2,51],{21:211,10:rt}),n(et,[2,53],{21:212,10:rt}),n(F,[2,36]),n([10,13,18,46,81,86,88,89,91,92,94,95,96,97,98],[2,91]),n(nt,[2,117],{86:At}),n(kt,[2,126],{87:214,10:ft,46:dt,71:pt,80:gt,81:yt,84:mt,88:vt,89:_t,90:bt,91:xt,92:wt}),n(Et,[2,128]),n(Et,[2,130]),n(Et,[2,131]),n(Et,[2,132]),n(Et,[2,133]),n(Et,[2,134]),n(Et,[2,135]),n(Et,[2,136]),n(Et,[2,137]),n(Et,[2,138]),n(Et,[2,139]),n(Et,[2,140]),n(nt,[2,118],{86:At}),n(nt,[2,119],{86:At}),{10:[1,215]},n(nt,[2,120],{86:At}),{10:[1,216]},n(nt,[2,110],{86:At}),n(nt,[2,111],{86:At}),n(nt,[2,112],{45:32,44:114,13:h,18:f,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C}),n(nt,[2,113],{45:32,44:114,10:[1,217],13:h,18:f,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C}),n(nt,[2,115],{10:[1,218]}),n(et,[2,44]),{39:[1,219]},n(et,[2,50]),n(et,[2,48]),n(et,[2,52]),n(et,[2,54]),{10:ft,46:dt,71:pt,80:gt,81:yt,84:mt,85:220,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},n(Et,[2,129]),{13:h,18:f,35:221,44:30,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{13:h,18:f,35:222,44:30,45:32,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C},{67:[1,223]},{67:[1,224]},n(et,[2,45],{21:225,10:rt}),n(kt,[2,127],{87:214,10:ft,46:dt,71:pt,80:gt,81:yt,84:mt,88:vt,89:_t,90:bt,91:xt,92:wt}),n(nt,[2,123],{45:32,44:114,10:[1,226],13:h,18:f,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C}),n(nt,[2,124],{45:32,44:114,10:[1,227],13:h,18:f,46:p,81:b,86:x,88:w,89:A,91:k,92:E,94:M,95:S,96:D,97:T,98:C}),n(nt,[2,114]),n(nt,[2,116]),n(et,[2,46]),{10:ft,46:dt,71:pt,79:228,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},{10:ft,46:dt,71:pt,79:229,80:gt,81:yt,84:mt,85:184,87:185,88:vt,89:_t,90:bt,91:xt,92:wt},n(nt,[2,121],{86:At}),n(nt,[2,122],{86:At})],defaultActions:{},parseError:function(t,n){function e(t,n){this.message=t,this.hash=n}if(!n.recoverable)throw e.prototype=Error,new e(t,n);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,u="",o=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,A,k,E,M,S=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},D={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=S()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(A in a[b])this.terminals_[A]&&A>l&&M.push("'"+this.terminals_[A]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(o+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,u=d.yytext,o=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[x[1]][1],D.$=r[r.length-k], D._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(D._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(D,[u,s,o,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;k&&(e=e.slice(0,-1*k*2),r=r.slice(0,-1*k),i=i.slice(0,-1*k)),e.push(this.productions_[x[1]][0]),r.push(D.$),i.push(D._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},St=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||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 n=t.match(/(?:\r\n?|\n).*/g);return n?(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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.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:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;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,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;an[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,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,n,e,r){switch(e){case 0:break;case 1:this.begin("string");break;case 2:this.popState();break;case 3:return"STR";case 4:return 71;case 5:return 78;case 6:return 72;case 7:return 82;case 8:return 73;case 9:return 74;case 10:return 75;case 11:return 12;case 12:return 30;case 13:return 32;case 14:return 13;case 15:return 13;case 16:return 13;case 17:return 13;case 18:return 13;case 19:return 13;case 20:return 81;case 21:return 91;case 22:return 89;case 23:return 8;case 24:return 86;case 25:return 98;case 26:return 16;case 27:return 15;case 28:return 17;case 29:return 18;case 30:return 53;case 31:return 51;case 32:return 52;case 33:return 54;case 34:return 58;case 35:return 56;case 36:return 57;case 37:return 59;case 38:return 58;case 39:return 56;case 40:return 57;case 41:return 59;case 42:return 63;case 43:return 61;case 44:return 62;case 45:return 64;case 46:return 50;case 47:return 55;case 48:return 60;case 49:return 40;case 50:return 41;case 51:return 46;case 52:return 92;case 53:return 96;case 54:return 84;case 55:return 97;case 56:return 97;case 57:return 88;case 58:return 94;case 59:return 95;case 60:return 65;case 61:return 38;case 62:return 39;case 63:return 36;case 64:return 37;case 65:return 42;case 66:return 43;case 67:return 101;case 68:return 9;case 69:return 10;case 70:return 11}},rules:[/^(?:%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:LR\b)/,/^(?:RL\b)/,/^(?:TB\b)/,/^(?:BT\b)/,/^(?:TD\b)/,/^(?:BR\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:v\b)/,/^(?:\s*--[x]\s*)/,/^(?:\s*-->\s*)/,/^(?:\s*--[o]\s*)/,/^(?:\s*---\s*)/,/^(?:\s*-\.-[x]\s*)/,/^(?:\s*-\.->\s*)/,/^(?:\s*-\.-[o]\s*)/,/^(?:\s*-\.-\s*)/,/^(?:\s*.-[x]\s*)/,/^(?:\s*\.->\s*)/,/^(?:\s*\.-[o]\s*)/,/^(?:\s*\.-\s*)/,/^(?:\s*==[x]\s*)/,/^(?:\s*==>\s*)/,/^(?:\s*==[o]\s*)/,/^(?:\s*==[\=]\s*)/,/^(?:\s*--\s*)/,/^(?:\s*-\.\s*)/,/^(?:\s*==\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:[A-Za-z]+)/,/^(?:[!"#$%&'*+,-.`?\\_\/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:\n+)/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[2,3],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70],inclusive:!0}}};return t}();return Mt.lexer=St,t.prototype=Mt,Mt.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:87,fs:1,path:86}],101:[function(t,n,e){(function(n){var r=t("moment"),i=t("../../logger"),a=i.Log,u="",o="",s=[],c=[],l="";e.clear=function(){s=[],c=[],l="",o="",g=0,h=void 0,f=void 0,_=[]},e.setDateFormat=function(t){u=t},e.getDateFormat=function(){return u},e.setTitle=function(t){o=t},e.getTitle=function(){return o},e.addSection=function(t){l=t,s.push(t)},e.getTasks=function(){for(var t=x(),n=10,e=0;!t&&n>e;)t=x(),e++;return c=_};var h,f,d=function(t,n,i){i=i.trim();var u=/^after\s+([\d\w\-]+)/,o=u.exec(i.trim());if(null!==o){var s=e.findTaskById(o[1]);if("undefined"==typeof s){var c=new Date;return c.setHours(0,0,0,0),c}return s.endTime}return r(i,n.trim(),!0).isValid()?r(i,n.trim(),!0).toDate():(a.debug("Invalid date:"+i),a.debug("With date format:"+n.trim()),new Date)},p=function(t,n,e){if(e=e.trim(),r(e,n.trim(),!0).isValid())return r(e,n.trim()).toDate();var i=r(t),a=/^([\d]+)([wdhms])/,u=a.exec(e.trim());if(null!==u){switch(u[2]){case"s":i.add(u[1],"seconds");break;case"m":i.add(u[1],"minutes");break;case"h":i.add(u[1],"hours");break;case"d":i.add(u[1],"days");break;case"w":i.add(u[1],"weeks")}return i.toDate()}return i.toDate()},g=0,y=function(t){return"undefined"==typeof t?(g+=1,"task"+g):t},m=function(t,n){var r;r=":"===n.substr(0,1)?n.substr(1,n.length):n;for(var i=r.split(","),a={},u=e.getDateFormat(),o=!0;o;)o=!1,i[0].match(/^\s*active\s*$/)&&(a.active=!0,i.shift(1),o=!0),i[0].match(/^\s*done\s*$/)&&(a.done=!0,i.shift(1),o=!0),i[0].match(/^\s*crit\s*$/)&&(a.crit=!0,i.shift(1),o=!0);var s;for(s=0;se-n?e+i+1.5*u.leftPadding>o?n+r-5:e+r+5:(e-n)/2+n+r}).attr("y",function(t,r){return r*n+u.barHeight/2+(u.fontSize/2-2)+e}).attr("text-height",i).attr("class",function(t){for(var n=w(t.startTime),e=w(t.endTime),r=this.getBBox().width,i=0,a=0;ae-n?e+r+1.5*u.leftPadding>o?"taskTextOutsideLeft taskTextOutside"+i+" "+s:"taskTextOutsideRight taskTextOutside"+i+" "+s:"taskText taskText"+i+" "+s})}function l(t,n,e,a){var o,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 u.axisFormatter&&(l=[],u.axisFormatter.forEach(function(t){var n=[];n[0]=t[0],n[1]=t[1],l.push(n)})),o=s.concat(l).concat(c);var h=i.svg.axis().scale(w).orient("bottom").tickSize(-a+n+u.gridLineStartPadding,0,0).tickFormat(i.time.format.multi(o));r>7&&230>r&&(h=h.ticks(i.time.monday.range)),_.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,n){for(var e=[],r=0,i=0;i0))return i[1]*t/2+n;for(var u=0;a>u;u++)return r+=e[a-1][1],i[1]*t/2+r*t+n}).attr("class",function(t){for(var n=0;nr;++r)n.hasOwnProperty(t[r])||(n[t[r]]=!0,e.push(t[r]));return e}function p(t){for(var n=t.length,e={};n;)e[t[--n]]=(e[t[n]]||0)+1;return e}function g(t,n){return p(n)[t]||0}e.yy.clear(),e.parse(t);var y=document.getElementById(n);o=y.parentElement.offsetWidth,"undefined"==typeof o&&(o=1200),"undefined"!=typeof u.useWidth&&(o=u.useWidth);var m=e.yy.getTasks(),v=m.length*(u.barHeight+u.barGap)+2*u.topPadding;y.setAttribute("height","100%"),y.setAttribute("viewBox","0 0 "+o+" "+v);var _=i.select("#"+n),b=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,o-u.leftPadding-u.rightPadding]),A=[];r=a.duration(x-b).asDays();for(var k=0;kl&&M.push("'"+this.terminals_[A]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(o+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,u=d.yytext,o=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[x[1]][1],D.$=r[r.length-k],D._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(D._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(D,[u,s,o,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;k&&(e=e.slice(0,-1*k*2),r=r.slice(0,-1*k),i=i.slice(0,-1*k)),e.push(this.productions_[x[1]][0]),r.push(D.$),i.push(D._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},s=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||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 n=t.match(/(?:\r\n?|\n).*/g);return n?(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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.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:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;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,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;an[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,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,n,e,r){switch(e){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 o.lexer=s,t.prototype=o,o.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:87,fs:1,path:86}],104:[function(t,n,e){function r(t,n){return Math.floor(Math.random()*(n-t))+t}function i(){for(var t="0123456789abcdef",n="",e=0;7>e;e++)n+=t[r(0,16)];return n}function a(t,n){for(l.debug("Entering isfastforwardable:",t.id,n.id);t.seq<=n.seq&&t!=n&&null!=n.parent;){if(Array.isArray(n.parent))return l.debug("In merge commit:",n.parent),a(t,f[n.parent[0]])||a(t,f[n.parent[1]]);n=f[n.parent]}return l.debug(t.id,n.id),t.id==n.id}function u(t,n){var e=t.seq,r=n.seq;return e>r?a(n,t):!1}function o(t,n,e){var r=h.find(t,n);if(r){var i=h.indexOf(t,h.find(t,n));t.splice(i,1,e)}else t.push(e)}function s(t){var n=h.maxBy(t,"seq"),e="";h.each(t,function(t){e+=t==n?" *":" |"});var r=[e,n.id,n.seq];if(h.each(p,function(t,e){t==n.id&&r.push(e)}),l.debug(r.join(" ")),Array.isArray(n.parent)){var i=f[n.parent[0]];o(t,n,i),t.push(f[n.parent[1]])}else{if(null==n.parent)return;var a=f[n.parent];o(t,n,a)}t=h.uniqBy(t,"id"),s(t)}var c=t("../../logger"),l=c.Log,h=t("lodash"),f={},d=null,p={master:d},g="master",y="LR",m=0;e.setDirection=function(t){ y=t};var v={};e.setOptions=function(t){l.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{v=JSON.parse(t)}catch(n){l.error("error while parsing gitGraph options",n.message)}},e.getOptions=function(){return v},e.commit=function(t){var n={id:i(),message:t,seq:m++,parent:null==d?null:d.id};d=n,f[n.id]=n,p[g]=n.id,l.debug("in pushCommit "+n.id)},e.branch=function(t){p[t]=null!=d?d.id:null,l.debug("in createBranch")},e.merge=function(t){var n=f[p[g]],e=f[p[t]];if(u(n,e))return void l.debug("Already merged");if(a(n,e))p[g]=p[t],d=f[p[g]];else{var r={id:i(),message:"merged branch "+t+" into "+g,seq:m++,parent:[null==d?null:d.id,p[t]]};d=r,f[r.id]=r,p[g]=r.id}l.debug(p),l.debug("in mergeBranch")},e.checkout=function(t){l.debug("in checkout"),g=t;var n=p[g];d=f[n]},e.reset=function(t){l.debug("in reset",t);var n=t.split(":")[0],e=parseInt(t.split(":")[1]),r="HEAD"==n?d:f[p[n]];for(l.debug(r,e);e>0;)if(r=f[r.parent],e--,!r){var i="Critical error - unique parent commit not found during reset";throw l.error(i),i}d=r,p[g]=r.id},e.prettyPrint=function(){l.debug(f);var t=e.getCommitsArray()[0];s([t])},e.clear=function(){f={},d=null,p={master:d},g="master",m=0},e.getBranchesAsObjArray=function(){var t=h.map(p,function(t,n){return{name:n,commit:f[t]}});return t},e.getBranches=function(){return p},e.getCommits=function(){return f},e.getCommitsArray=function(){var t=Object.keys(f).map(function(t){return f[t]});return h.each(t,function(t){l.debug(t.id)}),h.orderBy(t,["seq"],["desc"])},e.getCurrentBranch=function(){return g},e.getDirection=function(){return y},e.getHead=function(){return d}},{"../../logger":111,lodash:84}],105:[function(t,n,e){function r(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",v.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",v.nodeLabel.width).attr("height",v.nodeLabel.height).attr("x",v.nodeLabel.x).attr("y",v.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("xhtml:p").html("")}function i(t,n,e,r){r=r||"basis";var i=v.branchColors[e%v.branchColors.length],a=p.svg.line().x(function(t){return Math.round(t.x)}).y(function(t){return Math.round(t.y)}).interpolate(r);t.append("svg:path").attr("d",a(n)).style("stroke",i).style("stroke-width",v.lineStrokeWidth).style("fill","none")}function a(t,n){n=n||t.node().getBBox();var e=t.node().getCTM(),r=e.e+n.x*e.a,i=e.f+n.y*e.d;return{left:r,top:i,width:n.width,height:n.height}}function u(t,n,e,r,u){y.debug("svgDrawLineForCommits: ",n,e);var o=a(t.select("#node-"+n+" circle")),s=a(t.select("#node-"+e+" circle"));switch(r){case"LR":if(o.left-s.left>v.nodeSpacing){var c={x:o.left-v.nodeSpacing,y:s.top+s.height/2},l={x:s.left+s.width,y:s.top+s.height/2};i(t,[c,l],u,"linear"),i(t,[{x:o.left,y:o.top+o.height/2},{x:o.left-v.nodeSpacing/2,y:o.top+o.height/2},{x:o.left-v.nodeSpacing/2,y:c.y},c],u)}else i(t,[{x:o.left,y:o.top+o.height/2},{x:o.left-v.nodeSpacing/2,y:o.top+o.height/2},{x:o.left-v.nodeSpacing/2,y:s.top+s.height/2},{x:s.left+s.width,y:s.top+s.height/2}],u);break;case"BT":s.top-o.top>v.nodeSpacing?(c={x:s.left+s.width/2,y:o.top+o.height+v.nodeSpacing},l={x:s.left+s.width/2,y:s.top},i(t,[c,l],u,"linear"),i(t,[{x:o.left+o.width/2,y:o.top+o.height},{x:o.left+o.width/2,y:o.top+o.height+v.nodeSpacing/2},{x:s.left+s.width/2,y:c.y-v.nodeSpacing/2},c],u)):i(t,[{x:o.left+o.width/2,y:o.top+o.height},{x:o.left+o.width/2,y:o.top+v.nodeSpacing/2},{x:s.left+s.width/2,y:s.top-v.nodeSpacing/2},{x:s.left+s.width/2,y:s.top}],u)}}function o(t,n){return t.select(n).node().cloneNode(!0)}function s(t,n,e,r){var i,a=Object.keys(m).length;if(f.isString(n))do{if(i=m[n],y.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+n).size()>0)return;t.append(function(){return o(t,"#def-commit")}).attr("class","commit").attr("id",function(){return"node-"+i.id}).attr("transform",function(){switch(r){case"LR":return"translate("+(i.seq*v.nodeSpacing+v.leftMargin)+", "+l*v.branchOffset+")";case"BT":return"translate("+(l*v.branchOffset+v.leftMargin)+", "+(a-i.seq)*v.nodeSpacing+")"}}).attr("fill",v.nodeFillColor).attr("stroke",v.nodeStrokeColor).attr("stroke-width",v.nodeStrokeWidth);var u=f.find(e,["commit",i]);u&&(y.debug("found branch ",u.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(u.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),n=i.parent}while(n&&m[n]);f.isArray(n)&&(y.debug("found merge commmit",n),s(t,n[0],e,r),l++,s(t,n[1],e,r),l--)}function c(t,n,e,r){for(r=r||0;n.seq>0&&!n.lineDrawn;)f.isString(n.parent)?(u(t,n.id,n.parent,e,r),n.lineDrawn=!0,n=m[n.parent]):f.isArray(n.parent)&&(u(t,n.id,n.parent[0],e,r),u(t,n.id,n.parent[1],e,r+1),c(t,m[n.parent[1]],e,r+1),n.lineDrawn=!0,n=m[n.parent[0]])}var l,h=t("./gitGraphAst"),f=t("lodash"),d=t("./parser/gitGraph"),p=t("../../d3"),g=t("../../logger"),y=g.Log,m={},v={nodeSpacing:75,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:15,nodeLabel:{width:75,height:100,x:-25,y:15}},_={};e.setConf=function(t){_=t},e.draw=function(t,n,e){try{var i;i=d.parser,i.yy=h,y.debug("in gitgraph renderer",t,n,e),i.parse(t+"\n"),v=f.extend(v,_,h.getOptions()),y.debug("effective options",v);var a=h.getDirection();m=h.getCommits();var u=h.getBranchesAsObjArray();"BT"===a&&(v.nodeLabel.x=u.length*v.branchOffset,v.nodeLabel.width="100%",v.nodeLabel.y=-2*v.nodeRadius);var o=p.select("#"+n);r(o),l=1,f.each(u,function(t){s(o,t.commit.id,u,a),c(o,t.commit,a),l++}),o.attr("height",function(){return"BT"===a?Object.keys(m).length*v.nodeSpacing:(u.length+1)*v.branchOffset})}catch(g){y.error("Error while rendering gitgraph"),y.error(g.message)}}},{"../../d3":89,"../../logger":111,"./gitGraphAst":104,"./parser/gitGraph":106,lodash:84}],106:[function(t,n,e){(function(r){var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[2,3],r=[1,7],i=[7,12,15,17,19,20,21],a=[7,11,12,15,17,19,20,21],u=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,n,e,r,i,a){var u=a.length-1;switch(i){case 1:return a[u-1];case 2:return r.setDirection(a[u-3]),a[u-1];case 4:r.setOptions(a[u-1]),this.$=a[u];break;case 5:a[u-1]+=a[u],this.$=a[u-1];break;case 7:this.$=[];break;case 8:a[u-1].push(a[u]),this.$=a[u-1];break;case 9:this.$=a[u-1];break;case 11:r.commit(a[u]);break;case 12:r.branch(a[u]);break;case 13:r.checkout(a[u]);break;case 14:r.merge(a[u]);break;case 15:r.reset(a[u]);break;case 16:this.$="";break;case 17:this.$=a[u];break;case 18:this.$=a[u-1]+":"+a[u];break;case 19:this.$=a[u-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:r},{5:[1,8]},{7:[1,9]},n(i,[2,7],{10:10,11:[1,11]}),n(a,[2,6]),{6:12,7:e,9:6,12:r},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},n(a,[2,5]),{7:[1,21]},n(i,[2,8]),{12:[1,22]},n(i,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},n(i,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:u,25:31,26:o},{12:u,25:33,26:o},{12:[2,18]},{12:u,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,n){function e(t,n){this.message=t,this.hash=n}if(!n.recoverable)throw e.prototype=Error,new e(t,n);this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,u="",o=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,A,k,E,M,S=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},D={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=S()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(A in a[b])this.terminals_[A]&&A>l&&M.push("'"+this.terminals_[A]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(o+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,u=d.yytext,o=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[x[1]][1],D.$=r[r.length-k],D._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(D._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(D,[u,s,o,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;k&&(e=e.slice(0,-1*k*2),r=r.slice(0,-1*k),i=i.slice(0,-1*k)),e.push(this.productions_[x[1]][0]),r.push(D.$),i.push(D._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},c=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||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 n=t.match(/(?:\r\n?|\n).*/g);return n?(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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.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:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;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,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;an[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,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,n,e,r){switch(e){case 0:return 12;case 1:break;case 2:break;case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:return 8;case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][a-zA-Z0-9_]+)/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};return t}();return s.lexer=c,t.prototype=s,s.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:87,fs:1,path:86}],107:[function(t,n,e){(function(r){var i=function(){function t(){this.yy={}}var n=function(t,n,e,r){for(e=e||{},r=t.length;r--;e[t[r]]=n);return e},e=[1,2],r=[1,3],i=[1,4],a=[2,4],u=[1,9],o=[1,11],s=[1,12],c=[1,14],l=[1,15],h=[1,17],f=[1,18],d=[1,19],p=[1,20],g=[1,21],y=[1,23],m=[1,24],v=[1,4,5,10,15,16,18,20,21,22,23,24,25,27,28,39],_=[1,32],b=[4,5,10,15,16,18,20,21,22,23,25,28,39],x=[4,5,10,15,16,18,20,21,22,23,25,27,28,39],w=[37,38,39],A={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,SD:6,document:7,line:8,statement:9,participant:10,actor:11,AS:12,restOfLine:13,signal:14,activate:15,deactivate:16,note_statement:17,title:18,text2:19,loop:20,end:21,opt:22,alt:23,"else":24,par:25,par_sections:26,and:27,note:28,placement:29,over:30,actor_pair:31,spaceList:32,",":33,left_of:34,right_of:35,signaltype:36,"+":37,"-":38,ACTOR:39,SOLID_OPEN_ARROW:40,DOTTED_OPEN_ARROW:41,SOLID_ARROW:42,DOTTED_ARROW:43,SOLID_CROSS:44,DOTTED_CROSS:45,TXT:46,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",6:"SD",10:"participant",12:"AS",13:"restOfLine",15:"activate",16:"deactivate",18:"title",20:"loop",21:"end",22:"opt",23:"alt",24:"else",25:"par",27:"and",28:"note",30:"over",33:",",34:"left_of",35:"right_of",37:"+",38:"-",39:"ACTOR",40:"SOLID_OPEN_ARROW",41:"DOTTED_OPEN_ARROW",42:"SOLID_ARROW",43:"DOTTED_ARROW",44:"SOLID_CROSS",45:"DOTTED_CROSS",46:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[9,5],[9,3],[9,2],[9,3],[9,3],[9,2],[9,3],[9,4],[9,4],[9,7],[9,4],[26,1],[26,4],[17,4],[17,4],[32,2],[32,1],[31,3],[31,1],[29,1],[29,1],[14,5],[14,5],[14,4],[11,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,1],[19,1]],performAction:function(t,n,e,r,i,a){var u=a.length-1;switch(i){case 3:return r.apply(a[u]),a[u];case 4:this.$=[];break;case 5:a[u-1].push(a[u]),this.$=a[u-1];break;case 6:case 7:this.$=a[u];break;case 8:this.$=[];break;case 9:a[u-3].description=a[u-1],this.$=a[u-3];break;case 10:this.$=a[u-1];break;case 12:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[u-1]};break;case 13:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[u-1]};break;case 15:this.$=[{type:"setTitle",text:a[u-1]}];break;case 16:a[u-1].unshift({type:"loopStart",loopText:a[u-2],signalType:r.LINETYPE.LOOP_START}),a[u-1].push({type:"loopEnd",loopText:a[u-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[u-1];break;case 17:a[u-1].unshift({type:"optStart",optText:a[u-2],signalType:r.LINETYPE.OPT_START}),a[u-1].push({type:"optEnd",optText:a[u-2],signalType:r.LINETYPE.OPT_END}),this.$=a[u-1];break;case 18:a[u-4].unshift({type:"altStart",altText:a[u-5],signalType:r.LINETYPE.ALT_START}),a[u-4].push({type:"else",altText:a[u-2],signalType:r.LINETYPE.ALT_ELSE}),a[u-4]=a[u-4].concat(a[u-1]),a[u-4].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[u-4];break;case 19:a[u-1].unshift({type:"parStart",parText:a[u-2],signalType:r.LINETYPE.PAR_START}),a[u-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[u-1];break;case 21:this.$=a[u-3].concat([{type:"and",parText:a[u-1],signalType:r.LINETYPE.PAR_AND},a[u]]);break;case 22:this.$=[a[u-1],{type:"addNote",placement:a[u-2],actor:a[u-1].actor,text:a[u]}];break;case 23:a[u-2]=[].concat(a[u-1],a[u-1]).slice(0,2),a[u-2][0]=a[u-2][0].actor,a[u-2][1]=a[u-2][1].actor,this.$=[a[u-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[u-2].slice(0,2),text:a[u]}];break;case 26:this.$=[a[u-2],a[u]];break;case 27:this.$=a[u];break;case 28:this.$=r.PLACEMENT.LEFTOF;break;case 29:this.$=r.PLACEMENT.RIGHTOF;break;case 30:this.$=[a[u-4],a[u-1],{type:"addMessage",from:a[u-4].actor,to:a[u-1].actor,signalType:a[u-3],msg:a[u]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[u-1]}];break;case 31:this.$=[a[u-4],a[u-1],{type:"addMessage",from:a[u-4].actor,to:a[u-1].actor,signalType:a[u-3],msg:a[u]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[u-4]}];break;case 32:this.$=[a[u-3],a[u-1],{type:"addMessage",from:a[u-3].actor,to:a[u-1].actor,signalType:a[u-2],msg:a[u]}];break;case 33:this.$={type:"addActor",actor:a[u]};break;case 34:this.$=r.LINETYPE.SOLID_OPEN;break;case 35:this.$=r.LINETYPE.DOTTED_OPEN;break;case 36:this.$=r.LINETYPE.SOLID;break;case 37:this.$=r.LINETYPE.DOTTED;break;case 38:this.$=r.LINETYPE.SOLID_CROSS;break;case 39:this.$=r.LINETYPE.DOTTED_CROSS;break;case 40:this.$=a[u].substring(1).trim().replace(/\\n/gm,"\n")}},table:[{3:1,4:e,5:r,6:i},{1:[3]},{3:5,4:e,5:r,6:i},{3:6,4:e,5:r,6:i},n([1,4,5,10,15,16,18,20,22,23,25,28,39],a,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:u,5:o,8:8,9:10,10:s,11:22,14:13,15:c,16:l,17:16,18:h,20:f,22:d,23:p,25:g,28:y,39:m},n(v,[2,5]),{9:25,10:s,11:22,14:13,15:c,16:l,17:16,18:h,20:f,22:d,23:p,25:g,28:y,39:m},n(v,[2,7]),n(v,[2,8]),{11:26,39:m},{5:[1,27]},{11:28,39:m},{11:29,39:m},{5:[1,30]},{19:31,46:_},{13:[1,33]},{13:[1,34]},{13:[1,35]},{13:[1,36]},{36:37,40:[1,38],41:[1,39],42:[1,40],43:[1,41],44:[1,42],45:[1,43]},{29:44,30:[1,45],34:[1,46],35:[1,47]},n([5,12,33,40,41,42,43,44,45,46],[2,33]),n(v,[2,6]),{5:[1,49],12:[1,48]},n(v,[2,11]),{5:[1,50]},{5:[1,51]},n(v,[2,14]),{5:[1,52]},{5:[2,40]},n(b,a,{7:53}),n(b,a,{7:54}),n([4,5,10,15,16,18,20,22,23,24,25,28,39],a,{7:55}),n(x,a,{26:56,7:57}),{11:60,37:[1,58],38:[1,59],39:m},n(w,[2,34]),n(w,[2,35]),n(w,[2,36]),n(w,[2,37]),n(w,[2,38]),n(w,[2,39]),{11:61,39:m},{11:63,31:62,39:m},{39:[2,28]},{39:[2,29]},{13:[1,64]},n(v,[2,10]),n(v,[2,12]),n(v,[2,13]),n(v,[2,15]),{4:u,5:o,8:8,9:10,10:s,11:22,14:13,15:c,16:l,17:16,18:h,20:f,21:[1,65],22:d,23:p,25:g,28:y,39:m},{4:u,5:o,8:8,9:10,10:s,11:22,14:13,15:c,16:l,17:16,18:h,20:f,21:[1,66],22:d,23:p,25:g,28:y,39:m},{4:u,5:o,8:8,9:10,10:s,11:22,14:13,15:c,16:l,17:16,18:h,20:f,22:d,23:p,24:[1,67],25:g,28:y,39:m},{21:[1,68]},{4:u,5:o,8:8,9:10,10:s,11:22,14:13,15:c,16:l,17:16,18:h,20:f,21:[2,20],22:d,23:p,25:g,27:[1,69],28:y,39:m},{11:70,39:m},{11:71,39:m},{19:72,46:_},{19:73,46:_},{19:74,46:_},{33:[1,75],46:[2,27]},{5:[1,76]},n(v,[2,16]),n(v,[2,17]),{13:[1,77]},n(v,[2,19]),{13:[1,78]},{19:79,46:_},{19:80,46:_},{5:[2,32]},{5:[2,22]},{5:[2,23]},{11:81,39:m},n(v,[2,9]),n(b,a,{7:82}),n(x,a,{7:57,26:83}),{5:[2,30]},{5:[2,31]},{46:[2,26]},{4:u,5:o,8:8,9:10,10:s,11:22,14:13,15:c,16:l,17:16,18:h,20:f,21:[1,84],22:d,23:p,25:g,28:y,39:m},{21:[2,21]},n(v,[2,18])],defaultActions:{5:[2,1],6:[2,2],32:[2,40],46:[2,28],47:[2,29],72:[2,32],73:[2,22],74:[2,23],79:[2,30],80:[2,31],81:[2,26],83:[2,21]},parseError:function(t,n){if(!n.recoverable){var e=new Error(t);throw e.hash=n,e}this.trace(t)},parse:function(t){var n=this,e=[0],r=[null],i=[],a=this.table,u="",o=0,s=0,c=0,l=2,h=1,f=i.slice.call(arguments,1),d=Object.create(this.lexer),p={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(p.yy[g]=this.yy[g]);d.setInput(t,p.yy),p.yy.lexer=d,p.yy.parser=this,"undefined"==typeof d.yylloc&&(d.yylloc={});var y=d.yylloc;i.push(y);var m=d.options&&d.options.ranges;this.parseError="function"==typeof p.yy.parseError?p.yy.parseError:Object.getPrototypeOf(this).parseError;for(var v,_,b,x,w,A,k,E,M,S=function(){var t;return t=d.lex()||h,"number"!=typeof t&&(t=n.symbols_[t]||t),t},D={};;){if(b=e[e.length-1],this.defaultActions[b]?x=this.defaultActions[b]:((null===v||"undefined"==typeof v)&&(v=S()),x=a[b]&&a[b][v]),"undefined"==typeof x||!x.length||!x[0]){var T="";M=[];for(A in a[b])this.terminals_[A]&&A>l&&M.push("'"+this.terminals_[A]+"'");T=d.showPosition?"Parse error on line "+(o+1)+":\n"+d.showPosition()+"\nExpecting "+M.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(o+1)+": Unexpected "+(v==h?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[v]||v,line:d.yylineno,loc:y,expected:M})}if(x[0]instanceof Array&&x.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+v);switch(x[0]){case 1:e.push(v),r.push(d.yytext),i.push(d.yylloc),e.push(x[1]),v=null,_?(v=_,_=null):(s=d.yyleng,u=d.yytext,o=d.yylineno,y=d.yylloc,c>0&&c--);break;case 2:if(k=this.productions_[x[1]][1],D.$=r[r.length-k],D._$={first_line:i[i.length-(k||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(k||1)].first_column,last_column:i[i.length-1].last_column},m&&(D._$.range=[i[i.length-(k||1)].range[0],i[i.length-1].range[1]]),w=this.performAction.apply(D,[u,s,o,p.yy,x[1],r,i].concat(f)),"undefined"!=typeof w)return w;k&&(e=e.slice(0,-1*k*2),r=r.slice(0,-1*k),i=i.slice(0,-1*k)),e.push(this.productions_[x[1]][0]),r.push(D.$),i.push(D._$),E=a[e[e.length-2]][e[e.length-1]],e.push(E);break;case 3:return!0}}return!0}},k=function(){var t={EOF:1,parseError:function(t,n){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,n)},setInput:function(t,n){return this.yy=n||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 n=t.match(/(?:\r\n?|\n).*/g);return n?(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 n=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-n),this.offset-=n;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),e.length-1&&(this.yylineno-=e.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:e?(e.length===r.length?this.yylloc.first_column:0)+r[r.length-e.length].length-e[0].length:this.yylloc.first_column-n},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-n]),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(),n=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+n+"^"},test_match:function(t,n){var e,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],e=this.performAction.call(this,this.yy,this,n,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;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,n,e,r;this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;an[0].length)){if(n=e,r=a,this.options.backtrack_lexer){if(t=this.test_match(e,i[a]),t!==!1)return t;if(this._backtrack){n=!1;continue}return!1}if(!this.options.flex)break}return n?(t=this.test_match(n,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,n,e,r){switch(e){case 0:return 5;case 1:break;case 2:break;case 3:break;case 4:break;case 5:return this.begin("ID"),10;case 6:return this.begin("ALIAS"),39;case 7:return this.popState(),this.popState(),this.begin("LINE"),12;case 8:return this.popState(),this.popState(),5;case 9:return this.begin("LINE"),20;case 10:return this.begin("LINE"),22;case 11:return this.begin("LINE"),23;case 12:return this.begin("LINE"),24;case 13:return this.begin("LINE"),25;case 14:return this.begin("LINE"),27;case 15:return this.popState(),13;case 16:return 21;case 17:return 34;case 18:return 35;case 19:return 30;case 20:return 28;case 21:return this.begin("ID"),15;case 22:return this.begin("ID"),16;case 23:return 18;case 24:return 6;case 25:return 33;case 26:return 5;case 27:return n.yytext=n.yytext.trim(),39;case 28:return 42;case 29:return 43;case 30:return 40;case 31:return 41;case 32:return 44;case 33:return 45;case 34:return 46;case 35:return 37;case 36:return 38;case 37:return 5;case 38:return"INVALID"}},rules:[/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i], conditions:{LINE:{rules:[2,3,15],inclusive:!1},ALIAS:{rules:[2,3,7,8],inclusive:!1},ID:{rules:[2,3,6],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,9,10,11,12,13,14,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],inclusive:!0}}};return t}();return A.lexer=k,t.prototype=A,A.Parser=t,new t}();"undefined"!=typeof t&&"undefined"!=typeof e&&(e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(n){n[1]||(console.log("Usage: "+n[0]+" FILE"),r.exit(1));var i=t("fs").readFileSync(t("path").normalize(n[1]),"utf8");return e.parser.parse(i)},"undefined"!=typeof n&&t.main===n&&e.main(r.argv.slice(1)))}).call(this,t("_process"))},{_process:87,fs:1,path:86}],108:[function(t,n,e){(function(n){var r={},i=[],a=[],u="",o=t("../../logger"),s=o.Log;e.addActor=function(t,n,e){var i=r[t];i&&n===i.name&&null==e||(null==e&&(e=n),r[t]={name:n,description:e})},e.addMessage=function(t,n,e,r){i.push({from:t,to:n,message:e,answer:r})},e.addSignal=function(t,n,e,r){s.debug("Adding message from="+t+" to="+n+" message="+e+" type="+r),i.push({from:t,to:n,message:e,type:r})},e.getMessages=function(){return i},e.getActors=function(){return r},e.getActor=function(t){return r[t]},e.getActorKeys=function(){return Object.keys(r)},e.getTitle=function(){return u},e.clear=function(){r={},i=[]},e.LINETYPE={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21},e.ARROWTYPE={FILLED:0,OPEN:1},e.PLACEMENT={LEFTOF:0,RIGHTOF:1,OVER:2},e.addNote=function(t,n,r){var u={actor:t,placement:n,message:r},o=[].concat(t,t);a.push(u),i.push({from:o[0],to:o[1],message:r,type:e.LINETYPE.NOTE,placement:n})},e.setTitle=function(t){u=t},e.parseError=function(t,e){n.mermaidAPI.parseError(t,e)},e.apply=function(t){if(t instanceof Array)t.forEach(function(t){e.apply(t)});else switch(t.type){case"addActor":e.addActor(t.actor,t.actor,t.description);break;case"activeStart":e.addSignal(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":e.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":e.addNote(t.actor,t.placement,t.text);break;case"addMessage":e.addSignal(t.from,t.to,t.msg,t.signalType);break;case"loopStart":e.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":e.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":e.addSignal(void 0,void 0,t.altText,t.signalType);break;case"else":e.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":e.addSignal(void 0,void 0,void 0,t.signalType);break;case"setTitle":e.setTitle(t.text);break;case"parStart":e.addSignal(void 0,void 0,t.parText,t.signalType);break;case"and":e.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":e.addSignal(void 0,void 0,void 0,t.signalType)}}}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../../logger":111}],109:[function(t,n,e){var r=t("./parser/sequenceDiagram").parser;r.yy=t("./sequenceDb");var i=t("./svgDraw"),a=t("../../d3"),u=t("../../logger"),o=u.Log,s={diagramMarginX:50,diagramMarginY:30,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!1,bottomMarginAdj:1,activationWidth:10,textPlacement:"tspan"};e.bounds={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],init:function(){this.sequenceItems=[],this.activations=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,n,e,r){t[n]="undefined"==typeof t[n]?e:r(e,t[n])},updateBounds:function(t,n,r,i){function a(a){return function(c){o++;var l=u.sequenceItems.length-o+1;u.updateVal(c,"starty",n-l*s.boxMargin,Math.min),u.updateVal(c,"stopy",i+l*s.boxMargin,Math.max),u.updateVal(e.bounds.data,"startx",t-l*s.boxMargin,Math.min),u.updateVal(e.bounds.data,"stopx",r+l*s.boxMargin,Math.max),"activation"!=a&&(u.updateVal(c,"startx",t-l*s.boxMargin,Math.min),u.updateVal(c,"stopx",r+l*s.boxMargin,Math.max),u.updateVal(e.bounds.data,"starty",n-l*s.boxMargin,Math.min),u.updateVal(e.bounds.data,"stopy",i+l*s.boxMargin,Math.max))}}var u=this,o=0;this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,n,r,i){var a,u,o,s;a=Math.min(t,r),o=Math.max(t,r),u=Math.min(n,i),s=Math.max(n,i),this.updateVal(e.bounds.data,"startx",a,Math.min),this.updateVal(e.bounds.data,"starty",u,Math.min),this.updateVal(e.bounds.data,"stopx",o,Math.max),this.updateVal(e.bounds.data,"stopy",s,Math.max),this.updateBounds(a,u,o,s)},newActivation:function(t,n){var e=r.yy.getActors()[t.from.actor],a=h(t.from.actor).length,u=e.x+s.width/2+(a-1)*s.activationWidth/2;this.activations.push({startx:u,starty:this.verticalPos+2,stopx:u+s.activationWidth,stopy:void 0,actor:t.from.actor,anchored:i.anchorElement(n)})},endActivation:function(t){var n=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from.actor),e=this.activations.splice(n,1)[0];return e},newLoop:function(t){this.sequenceItems.push({startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t})},endLoop:function(){var t=this.sequenceItems.pop();return t},addSectionToLoop:function(t){var n=this.sequenceItems.pop();n.sections=n.sections||[],n.sectionTitles=n.sectionTitles||[],n.sections.push(e.bounds.getVerticalPos()),n.sectionTitles.push(t),this.sequenceItems.push(n)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}};var c=function(t,n,r,a,u){var o=i.getNoteRect();o.x=n,o.y=r,o.width=u||s.width,o["class"]="note";var c=t.append("g"),l=i.drawRect(c,o),h=i.getTextObj();h.x=n-4,h.y=r-13,h.textMargin=s.noteMargin,h.dy="1em",h.text=a.message,h["class"]="noteText";var f=i.drawText(c,h,o.width-s.noteMargin),d=f[0][0].getBBox().height;!u&&d>s.width?(f.remove(),c=t.append("g"),f=i.drawText(c,h,2*o.width-s.noteMargin),d=f[0][0].getBBox().height,l.attr("width",2*o.width),e.bounds.insert(n,r,n+2*o.width,r+2*s.noteMargin+d)):e.bounds.insert(n,r,n+o.width,r+2*s.noteMargin+d),l.attr("height",d+2*s.noteMargin),e.bounds.bumpVerticalPos(d+2*s.noteMargin)},l=function(t,n,i,a,u){var o,c=t.append("g"),l=n+(i-n)/2,h=c.append("text").attr("x",l).attr("y",a-7).style("text-anchor","middle").attr("class","messageText").text(u.message);o="undefined"!=typeof h[0][0].getBBox?h[0][0].getBBox().width:h[0][0].getBoundingClientRect();var f;if(n===i){f=c.append("path").attr("d","M "+n+","+a+" C "+(n+60)+","+(a-10)+" "+(n+60)+","+(a+30)+" "+n+","+(a+20)),e.bounds.bumpVerticalPos(30);var d=Math.max(o/2,100);e.bounds.insert(n-d,e.bounds.getVerticalPos()-10,i+d,e.bounds.getVerticalPos())}else f=c.append("line"),f.attr("x1",n),f.attr("y1",a),f.attr("x2",i),f.attr("y2",a),e.bounds.insert(n,e.bounds.getVerticalPos()-10,i,e.bounds.getVerticalPos());u.type===r.yy.LINETYPE.DOTTED||u.type===r.yy.LINETYPE.DOTTED_CROSS||u.type===r.yy.LINETYPE.DOTTED_OPEN?(f.style("stroke-dasharray","3, 3"),f.attr("class","messageLine1")):f.attr("class","messageLine0");var p="";s.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)")),f.attr("stroke-width",2),f.attr("stroke","black"),f.style("fill","none"),(u.type===r.yy.LINETYPE.SOLID||u.type===r.yy.LINETYPE.DOTTED)&&f.attr("marker-end","url("+p+"#arrowhead)"),(u.type===r.yy.LINETYPE.SOLID_CROSS||u.type===r.yy.LINETYPE.DOTTED_CROSS)&&f.attr("marker-end","url("+p+"#crosshead)")};n.exports.drawActors=function(t,n,r,a){var u;for(u=0;un&&(r.starty=n-6,n+=12),i.drawActivation(y,r,n,s),e.bounds.insert(r.startx,n-10,r.stopx,n)}r.yy.clear(),r.parse(t+"\n"),e.bounds.init();var d,p,g,y=a.select("#"+u),m=r.yy.getActors(),v=r.yy.getActorKeys(),_=r.yy.getMessages(),b=r.yy.getTitle();n.exports.drawActors(y,m,v,0),i.insertArrowHead(y),i.insertArrowCrossHead(y);var x;_.forEach(function(t){var n;switch(t.type){case r.yy.LINETYPE.NOTE:e.bounds.bumpVerticalPos(s.boxMargin),d=m[t.from].x,p=m[t.to].x,t.placement===r.yy.PLACEMENT.RIGHTOF?c(y,d+(s.width+s.actorMargin)/2,e.bounds.getVerticalPos(),t):t.placement===r.yy.PLACEMENT.LEFTOF?c(y,d-(s.width+s.actorMargin)/2,e.bounds.getVerticalPos(),t):t.to===t.from?c(y,d,e.bounds.getVerticalPos(),t):(g=Math.abs(d-p)+s.actorMargin,c(y,(d+p+s.width-g)/2,e.bounds.getVerticalPos(),t,g));break;case r.yy.LINETYPE.ACTIVE_START:e.bounds.newActivation(t,y);break;case r.yy.LINETYPE.ACTIVE_END:h(t,e.bounds.getVerticalPos());break;case r.yy.LINETYPE.LOOP_START:e.bounds.bumpVerticalPos(s.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(s.boxMargin+s.boxTextMargin);break;case r.yy.LINETYPE.LOOP_END:n=e.bounds.endLoop(),i.drawLoop(y,n,"loop",s),e.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.OPT_START:e.bounds.bumpVerticalPos(s.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(s.boxMargin+s.boxTextMargin);break;case r.yy.LINETYPE.OPT_END:n=e.bounds.endLoop(),i.drawLoop(y,n,"opt",s),e.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.ALT_START:e.bounds.bumpVerticalPos(s.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(s.boxMargin+s.boxTextMargin);break;case r.yy.LINETYPE.ALT_ELSE:e.bounds.bumpVerticalPos(s.boxMargin),n=e.bounds.addSectionToLoop(t.message),e.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.ALT_END:n=e.bounds.endLoop(),i.drawLoop(y,n,"alt",s),e.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.PAR_START:e.bounds.bumpVerticalPos(s.boxMargin),e.bounds.newLoop(t.message),e.bounds.bumpVerticalPos(s.boxMargin+s.boxTextMargin);break;case r.yy.LINETYPE.PAR_AND:e.bounds.bumpVerticalPos(s.boxMargin),n=e.bounds.addSectionToLoop(t.message),e.bounds.bumpVerticalPos(s.boxMargin);break;case r.yy.LINETYPE.PAR_END:n=e.bounds.endLoop(),i.drawLoop(y,n,"par",s),e.bounds.bumpVerticalPos(s.boxMargin);break;default:try{x=t,e.bounds.bumpVerticalPos(s.messageMargin);var a=f(t.from),u=f(t.to),o=a[0]<=u[0]?1:0,v=a[0]/gi," "),i=t.append("text");i.attr("x",n.x),i.attr("y",n.y),i.style("text-anchor",n.anchor),i.attr("fill",n.fill),"undefined"!=typeof n["class"]&&i.attr("class",n["class"]);var a=i.append("tspan");return a.attr("x",n.x+2*n.textMargin),a.attr("fill",n.fill),a.text(r),"undefined"!=typeof i.textwrap&&i.textwrap({x:n.x,y:n.y,width:e,height:1800},n.textMargin),i},e.drawLabel=function(t,n){function r(t,n,e,r,i){return t+","+n+" "+(t+e)+","+n+" "+(t+e)+","+(n+r-i)+" "+(t+e-1.2*i)+","+(n+r)+" "+t+","+(n+r)}var i=t.append("polygon");i.attr("points",r(n.x,n.y,50,20,7)),i.attr("style","fill:#526e52;stroke:none"),n.y=n.y+n.labelMargin,n.x=n.x+.5*n.labelMargin,n.fill="white",e.drawText(t,n)};var r=-1;e.drawActor=function(t,n,a,u,o){var s=n+o.width/2,c=t.append("g");0===a&&(r++,c.append("line").attr("id","actor"+r).attr("x1",s).attr("y1",5).attr("x2",s).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var l=e.getNoteRect();l.x=n,l.y=a,l.fill="#eaeaea",l.width=o.width,l.height=o.height,l["class"]="actor",l.rx=3,l.ry=3,e.drawRect(c,l),i(o)(u,c,l.x,l.y,l.width,l.height,{"class":"actor"})},e.anchorElement=function(t){return t.append("g")},e.drawActivation=function(t,n,r){var i=e.getNoteRect(),a=n.anchored;i.x=n.startx,i.y=n.starty,i.fill="#f4f4f4",i.width=n.stopx-n.startx,i.height=r-n.starty,e.drawRect(a,i)},e.drawLoop=function(t,n,r,i){var a=t.append("g"),u=function(t,n,e,r){return a.append("line").attr("x1",t).attr("y1",n).attr("x2",e).attr("y2",r).attr("stroke-width",2).attr("stroke","#526e52").attr("class","loopLine")};u(n.startx,n.starty,n.stopx,n.starty),u(n.stopx,n.starty,n.stopx,n.stopy),u(n.startx,n.stopy,n.stopx,n.stopy),u(n.startx,n.starty,n.startx,n.stopy),"undefined"!=typeof n.sections&&n.sections.forEach(function(t){u(n.startx,t,n.stopx,t).style("stroke-dasharray","3, 3")});var o=e.getTextObj();o.text=r,o.x=n.startx,o.y=n.starty,o.labelMargin=15,o["class"]="labelText",o.fill="white",e.drawLabel(a,o),o=e.getTextObj(),o.text="[ "+n.title+" ]",o.x=n.startx+(n.stopx-n.startx)/2,o.y=n.starty+1.5*i.boxMargin,o.anchor="middle",o["class"]="loopText",e.drawText(a,o),"undefined"!=typeof n.sectionTitles&&n.sectionTitles.forEach(function(t,r){""!==t&&(o.text="[ "+t+" ]",o.y=n.sections[r]+1.5*i.boxMargin,e.drawText(a,o))})},e.insertArrowHead=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},e.insertArrowCrossHead=function(t){var n=t.append("defs"),e=n.append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.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"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},e.getTextObj=function(){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},e.getNoteRect=function(){var t={x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0};return t};var i=function(){function t(t,n,e,i,a,u,o){var s=n.append("text").attr("x",e+a/2).attr("y",i+u/2+5).style("text-anchor","middle").text(t);r(s,o)}function n(t,n,e,i,a,u,o){var s=n.append("text").attr("x",e+a/2).attr("y",i).style("text-anchor","middle");if(s.append("tspan").attr("x",e+a/2).attr("dy","0").text(t),"undefined"!=typeof s.textwrap){s.textwrap({x:e+a/2,y:i,width:a,height:u},0);var c=s.selectAll("tspan");c.length>0&&c[0].length>0&&(c=c[0],s.attr("y",i+(u/2-s[0][0].getBBox().height*(1-1/c.length)/2)).attr("dominant-baseline","central").attr("alignment-baseline","central"))}r(s,o)}function e(t,e,i,a,u,o,s){var c=e.append("switch"),l=c.append("foreignObject").attr("x",i).attr("y",a).attr("width",u).attr("height",o),h=l.append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),n(t,c,i,a,u,o,s),r(h,s)}function r(t,n){for(var e in n)n.hasOwnProperty(e)&&t.attr(e,n[e])}return function(r){return"fo"===r.textPlacement?e:"old"===r.textPlacement?t:n}}()},{}],111:[function(t,n,e){function r(t){var n=t.getUTCHours(),e=t.getUTCMinutes(),r=t.getSeconds(),i=t.getMilliseconds();10>n&&(n="0"+n),10>e&&(e="0"+e),10>r&&(r="0"+r),100>i&&(i="0"+i),10>i&&(i="00"+i);var a=n+":"+e+":"+r+" ("+i+")";return a}function i(t){const n=r(new Date);return"%c "+n+" :%c"+t+": "}const a={debug:1,info:2,warn:3,error:4,fatal:5,"default":5};var u=(a.error,function(){}),o=function(){},s=function(){},c=function(){},l=function(){};e.setLogLevel=function(t){switch(t){case 1:e.Log.debug=window.console.debug.bind(window.console,i("DEBUG",name),"color:grey;","color: green;");case 2:e.Log.info=window.console.debug.bind(window.console,i("INFO",name),"color:grey;","color: info;");case 3:e.Log.warn=window.console.debug.bind(window.console,i("INFO",name),"color:grey;","color: orange;");case 4:e.Log.error=window.console.debug.bind(window.console,i("ERROR",name),"color:grey;","color: red;");case 5:e.Log.fatal=window.console.debug.bind(window.console,i("FATAL",name),"color:grey;","color: red;")}},e.Log={debug:u,info:o,warn:s,error:c,fatal:l}},{}],112:[function(t,n,e){(function(n){var r=t("./logger"),i=r.Log,a=t("./diagrams/flowchart/graphDb"),u=t("./utils"),o=t("./diagrams/flowchart/flowRenderer"),s=t("./diagrams/sequenceDiagram/sequenceRenderer"),c=t("./diagrams/example/exampleRenderer"),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"),_=t("./diagrams/classDiagram/parser/classDiagram"),b=t("./diagrams/classDiagram/classRenderer"),x=t("./diagrams/classDiagram/classDb"),w=t("./diagrams/gitGraph/parser/gitGraph"),A=t("./diagrams/gitGraph/gitGraphRenderer"),k=t("./diagrams/gitGraph/gitGraphAst"),E=t("./d3");SVGElement.prototype.getTransformToElement=SVGElement.prototype.getTransformToElement||function(t){return t.getScreenCTM().inverse().multiply(this.getScreenCTM())};var M={logLevel:5,cloneCssStyles:!0,startOnLoad:!0,arrowMarkerAbsolute:!1,flowchart:{htmlLabels:!0,useMaxWidth:!0},sequenceDiagram:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:3,axisFormatter:[["%I:%M",function(t){return t.getHours()}],["w. %U",function(t){return 1==t.getDay()}],["%a %d",function(t){return t.getDay()&&1!=t.getDate()}],["%b %d",function(t){return 1!=t.getDate()}],["%m-%y",function(t){return t.getMonth()}]]},classDiagram:{},gitGraph:{},info:{}};r.setLogLevel(M.logLevel);var S=function(t){var n,e=u.detectType(t);switch(e){case"gitGraph":n=w,n.parser.yy=k;break;case"graph":n=h,n.parser.yy=a;break;case"dotGraph":n=f,n.parser.yy=a;break;case"sequenceDiagram":n=d,n.parser.yy=p;break;case"info":n=l,n.parser.yy=g;break;case"gantt":n=m,n.parser.yy=v;break;case"classDiagram":n=_,n.parser.yy=x}try{return n.parse(t),!0}catch(r){return!1}};e.parse=S,e.version=function(){return t("../package.json").version},e.encodeEntities=function(t){var n=t;return n=n.replace(/style.*:\S*#.*;/g,function(t){var n=t.substring(0,t.length-1);return n}),n=n.replace(/classDef.*:\S*#.*;/g,function(t){var n=t.substring(0,t.length-1);return n}),n=n.replace(/#\w+\;/g,function(t){var n=t.substring(1,t.length-1),e=/^\+?\d+$/.test(n);return e?"fl°°"+n+"¶ß":"fl°"+n+"¶ß"})},e.decodeEntities=function(t){var n=t;return n=n.replace(/\fl\°\°/g,function(){return"&#"}),n=n.replace(/\fl\°/g,function(){return"&"}),n=n.replace(/¶ß/g,function(){return";"})};var D=function(t,n,r,l){if("undefined"!=typeof l)l.innerHTML="",E.select(l).append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var h=document.querySelector("#d"+t);h&&(h.innerHTML=""),E.select("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=n,n=e.encodeEntities(n);var h=E.select("#d"+t).node(),f=u.detectType(n),d={};switch(f){case"gitGraph":M.flowchart.arrowMarkerAbsolute=M.arrowMarkerAbsolute,A.setConf(M.gitGraph),A.draw(n,t,!1);break;case"graph":M.flowchart.arrowMarkerAbsolute=M.arrowMarkerAbsolute,o.setConf(M.flowchart),o.draw(n,t,!1),M.cloneCssStyles&&(d=o.getClasses(n,!1),u.cloneCssStyles(h.firstChild,d));break;case"dotGraph":M.flowchart.arrowMarkerAbsolute=M.arrowMarkerAbsolute,o.setConf(M.flowchart),o.draw(n,t,!0),M.cloneCssStyles&&(d=o.getClasses(n,!0),u.cloneCssStyles(h.firstChild,d));break;case"sequenceDiagram":M.sequenceDiagram.arrowMarkerAbsolute=M.arrowMarkerAbsolute,s.setConf(M.sequenceDiagram),s.draw(n,t),M.cloneCssStyles&&u.cloneCssStyles(h.firstChild,[]);break;case"gantt":M.gantt.arrowMarkerAbsolute=M.arrowMarkerAbsolute,y.setConf(M.gantt),y.draw(n,t),M.cloneCssStyles&&u.cloneCssStyles(h.firstChild,[]);break;case"classDiagram":M.classDiagram.arrowMarkerAbsolute=M.arrowMarkerAbsolute,b.setConf(M.classDiagram),b.draw(n,t),M.cloneCssStyles&&u.cloneCssStyles(h.firstChild,[]);break;case"info":M.info.arrowMarkerAbsolute=M.arrowMarkerAbsolute,c.draw(n,t,e.version()),M.cloneCssStyles&&u.cloneCssStyles(h.firstChild,[])}E.select("#d"+t).selectAll("foreignobject div").attr("xmlns","http://www.w3.org/1999/xhtml");var p="";M.arrowMarkerAbsolute&&(p=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,p=p.replace(/\(/g,"\\("),p=p.replace(/\)/g,"\\)"));var g=E.select("#d"+t).node().innerHTML.replace(/url\(#arrowhead/g,"url("+p+"#arrowhead","g");g=e.decodeEntities(g),"undefined"!=typeof r?r(g,a.bindFunctions):i.warn("CB = undefined!");var m=E.select("#d"+t).node();return null!==m&&"function"==typeof m.remove&&E.select("#d"+t).node().remove(),g};e.render=function(t,n,e,r){try{if(1===arguments.length&&(n=t,t="mermaidId0"),"undefined"!=typeof document)return D(t,n,e,r)}catch(a){i.warn(a)}};var T=function(t){var n,e=Object.keys(t);for(n=0;n0&&(r+=e.selectorText+" { "+e.style.cssText+"}\n")}}catch(l){"undefined"!=typeof e&&i.warn('Invalid CSS selector "'+e.selectorText+'"',l)}var h="",f="";for(var d in n)n.hasOwnProperty(d)&&"undefined"!=typeof d&&("default"===d?(n["default"].styles instanceof Array&&(h+="#"+t.id.trim()+" .node>rect { "+n[d].styles.join("; ")+"; }\n"),n["default"].nodeLabelStyles instanceof Array&&(h+="#"+t.id.trim()+" .node text { "+n[d].nodeLabelStyles.join("; ")+"; }\n"),n["default"].edgeLabelStyles instanceof Array&&(h+="#"+t.id.trim()+" .edgeLabel text { "+n[d].edgeLabelStyles.join("; ")+"; }\n"),n["default"].clusterStyles instanceof Array&&(h+="#"+t.id.trim()+" .cluster rect { "+n[d].clusterStyles.join("; ")+"; }\n")):n[d].styles instanceof Array&&(f+="#"+t.id.trim()+" ."+d+">rect, ."+d+">polygon, ."+d+">circle, ."+d+">ellipse { "+n[d].styles.join("; ")+"; }\n"));if(""!==r||""!==h||""!==f){var p=document.createElement("style");p.setAttribute("type","text/css"),p.setAttribute("title","mermaid-svg-internal-css"),p.innerHTML="/* */\n",t.insertBefore(p,t.firstChild)}};e.cloneCssStyles=u;var o=function(t,n){for(var e=0;e