!function(){function U(n,t){return n>>1;o(n[i],t)<0?e=1+i:r=i}return e},right:function(n,t,e,r){for(arguments.length<3&&(e=0),arguments.length<4&&(r=n.length);e>>1;0>16,255&n>>8,255&n)}function Fn(n){return Hn(n)+""}function On(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function Yn(n,t,e){var r,i,o=0,u=0,a=0;if(i=/([a-z]+)\((.*)\)/i.exec(n))switch(r=i[2].split(","),i[1]){case"hsl":return e(parseFloat(r[0]),parseFloat(r[1])/100,parseFloat(r[2])/100);case"rgb":return t(Xn(r[0]),Xn(r[1]),Xn(r[2]))}return(i=Uo.get(n))?t(i.r,i.g,i.b):(null==n||"#"!==n.charAt(0)||isNaN(i=parseInt(n.substring(1),16))||(4===n.length?(o=(3840&i)>>4,o|=o>>4,u=240&i,u|=u>>4,a=15&i,a|=a<<4):7===n.length&&(o=(16711680&i)>>16,u=(65280&i)>>8,a=255&i)),t(o,u,a))}function In(n,t,e){var r,i,o=Math.min(n/=255,t/=255,e/=255),u=Math.max(n,t,e),a=u-o,c=(u+o)/2;return a?(i=c<.5?a/(u+o):a/(2-u-o),r=n==u?(t-e)/a+(t=Yo.t&&(Yo.f=Yo.c(n-Yo.t)),Yo=Yo.n;return n}function Gn(){for(var n,t=jo,e=1/0;t;)t=t.f?n?n.n=t.n:jo=t.n:(t.td}function h(n,t,e){var r,i,o,u,a,c,l,f=[1,0,0],s=zt(At(n),At(t)),h=Ct(s,s),p=s[0],g=h-p*p;return g?(r=zt(f,s),Lt(f=Tt(f,d*h/g),Tt(s,-d*p/g)),(g=(s=Ct(f,h=r))*s-(p=Ct(h,h))*(Ct(f,f)-1))<0?void 0:(Lt(g=Tt(h,(-s-(r=Math.sqrt(g)))/p),f),g=Rt(g),e?(i=n[0],o=t[0],u=n[1],t=t[1],oR;return Vt(s,function(o){var u,a,c,l,f;return{lineStart:function(){l=c=!1,f=1},point:function(n,t){var e,r=[n,t],i=s(n,t),n=g?i?0:p(n,t):i?p(n+(n<0?k:-k),t):0;!u&&(l=c=i)&&o.lineStart(),i!==c&&(e=h(u,r),Dt(u,e)||Dt(r,e))&&(r[0]+=R,r[1]+=R,i=s(r[0],r[1])),i!==c?(f=0,i?(o.lineStart(),e=h(r,u),o.point(e[0],e[1])):(e=h(u,r),o.point(e[0],e[1]),o.lineEnd()),u=e):v&&u&&g^i&&(n&a||!(t=h(r,u,!0))||(f=0,g?(o.lineStart(),o.point(t[0][0],t[0][1]),o.point(t[1][0],t[1][1]),o.lineEnd()):(o.point(t[1][0],t[1][1]),o.lineEnd(),o.lineStart(),o.point(t[0][0],t[0][1])))),!i||u&&Dt(u,r)||o.point(r[0],r[1]),u=r,c=i,a=n},lineEnd:function(){c&&o.lineEnd(),u=null},clean:function(){return f|(l&&c)<<1}}},_e(i,6*D),g?[0,-i]:[-k,i-k])}function Jt(c,l,f,s){return function(n){var t=n.a,e=n.b,r=t.x,t=t.y,i=0,o=1,u=e.x-r,e=e.y-t,a=c-r;if(u||!(0r&&0R||q(r-c)>R)&&(u.splice(o,0,new tr(function(n,t,e){n=new Ke(n,null);return n.a=t,n.b=e,Bu.push(n),n}(i.site,l,q(e-f)=t)return}else r={x:s,y:u};e={x:s,y:t}}else{if(r){if(r.y=t)return}else r={x:(u-s)/h,y:u};e={x:(t-s)/h,y:t}}else{if(r){if(r.y=o)return}else r={x:i,y:h*i+s};e={x:o,y:h*o+s}}else{if(r){if(r.xo&&(i=r.substring(o,i),a[u]?a[u]+=i:a[++u]=i),(t=t[0])===(e=e[0])?a[u]?a[u]+=e:a[++u]=e:(a[++u]=null,c.push({i:u,x:gr(t,e)})),o=ra.lastIndex;return oi&&(r=e,i=t);return r}function Kr(n){return n.reduce(Qr,0)}function Qr(n,t){return n+t[1]}function ni(n,t){return ti(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function ti(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,o=[];++e<=t;)o[e]=i*e+r;return o}function ei(n){return[L.min(n),L.max(n)]}function ri(n,t){return n.value-t.value}function ii(n,t){var e=n._pack_next;(n._pack_next=t)._pack_prev=n,(t._pack_next=e)._pack_prev=t}function oi(n,t){(n._pack_next=t)._pack_prev=n}function ui(n,t){var e=t.x-n.x,r=t.y-n.y,n=n.r+t.r;return e*e+r*r<.999*n*n}function ai(n){function t(n){c=Math.min(n.x-n.r,c),l=Math.max(n.x+n.r,l),f=Math.min(n.y-n.r,f),s=Math.max(n.y+n.r,s)}if((e=n.children)&&(a=e.length)){var e,r,i,o,u,a,c=1/0,l=-1/0,f=1/0,s=-1/0;if(e.forEach(ci),(r=e[0]).x=-r.r,r.y=0,t(r),1h?r():(g.active=h,d.event&&d.event.start.call(f,i,s),d.tween.forEach(function(n,t){(t=t.call(f,i,s))&&l.push(t)}),void L.timer(function(){return c.c=e(n||1)?Ot:e,1},0,p))}function e(n){if(g.active!==h)return r();for(var n=n/a,t=o(n),e=l.length;0t;)i.push(r/o);else for(;(r=n+e*++u)=d.length)return p?p.call(g,n):h?n.sort(h):n;for(var t,i,o,u,a=-1,c=n.length,l=d[r++],f=new x;++a=d.length?n:(i=[],o=t[r++],n.forEach(function(n,t){i.push({key:n,values:e(t,r)})}),o?i.sort(function(n,t){return o(n.key,t.key)}):i)}(s(L.map,n,0),0)},g.key=function(n){return d.push(n),g},g.sortKeys=function(n){return t[d.length-1]=n,g},g.sortValues=function(n){return h=n,g},g.rollup=function(n){return p=n,g},g},L.set=function(n){var t=new V;if(n)for(var e=0,r=n.length;e=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i),Xo=L.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=L.round(n,Kn(n,t))).toFixed(Math.max(0,Math.min(20,Kn(n*(1+1e-15),t))))}}),w=L.time={},C=Date,$o=(nt.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(){$o.setUTCDate.apply(this._,arguments)},setDay:function(){$o.setUTCDay.apply(this._,arguments)},setFullYear:function(){$o.setUTCFullYear.apply(this._,arguments)},setHours:function(){$o.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){$o.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){$o.setUTCMinutes.apply(this._,arguments)},setMonth:function(){$o.setUTCMonth.apply(this._,arguments)},setSeconds:function(){$o.setUTCSeconds.apply(this._,arguments)},setTime:function(){$o.setTime.apply(this._,arguments)}},Date.prototype),Bo=(w.year=tt(function(n){return(n=w.day(n)).setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),w.years=w.year.range,w.years.utc=w.year.utc.range,w.day=tt(function(n){var t=new C(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),w.days=w.day.range,w.days.utc=w.day.utc.range,w.dayOfYear=function(n){var t=w.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,e){e=7-e;var t=w[n]=tt(function(n){return(n=w.day(n)).setDate(n.getDate()-(n.getDay()+e)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var t=w.year(n).getDay();return Math.floor((w.dayOfYear(n)+(t+e)%7)/7)-(t!==e)});w[n+"s"]=t.range,w[n+"s"].utc=t.utc.range,w[n+"OfYear"]=function(n){var t=w.year(n).getDay();return Math.floor((w.dayOfYear(n)+(t+e)%7)/7)}}),w.week=w.sunday,w.weeks=w.sunday.range,w.weeks.utc=w.sunday.utc.range,w.weekOfYear=w.sundayOfYear,{"-":"",_:" ",0:"0"}),a=/^\s*\d+/,Wo=/^%/,e=(L.locale=function(n){return{numberFormat:(M=n.decimal,o=n.thousands,u=n.grouping,e=n.currency,_=u?function(n){for(var t=n.length,e=[],r=0,i=u[0];0",l=n[3]||"",t=n[4]||"",f=n[5],s=+n[6],h=n[7],p=n[8],g=n[9],d=1,v="",y="",m=!1,p=p&&+p.substring(1);switch((f||"0"===a&&"="===c)&&(f=a="0",c="=",h)&&(s-=Math.floor((s-1)/4)),g){case"n":h=!0,g="g";break;case"%":d=100,y="%",g="f";break;case"p":d=100,y="%",g="r";break;case"b":case"o":case"x":case"X":"#"===t&&(v="0"+g.toLowerCase());case"c":case"d":m=!0,p=0;break;case"s":d=-1,g="r"}"$"===t&&(v=e[0],y=e[1]),"r"!=g||p||(g="g"),null!=p&&("g"==g?p=Math.max(1,Math.min(21,p)):"e"!=g&&"f"!=g||(p=Math.max(0,Math.min(20,p))));var g=Xo.get(g)||Qn,x=f&&h;return function(n){var t,e,r,i,o,u=y;return m&&n%1?"":(t=n<0||0===n&&1/n<0?(n=-n,"-"):l,d<0?(n=(r=L.formatPrefix(n,p)).scale(n),u=r.symbol+y):n*=d,e=(r=(n=g(n,p)).lastIndexOf("."))<0?n:n.substring(0,r),r=r<0?"":M+n.substring(r+1),!f&&h&&(e=_(e)),o=(i=v.length+e.length+r.length+(x?0:t.length))"===c?o+t+n:"^"===c?o.substring(0,i>>=1)+t+n+o.substring(i):t+(x?n:o+n))+u)}}),timeFormat:rt(n)};var M,o,u,e,_},L.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"]})),Jo=(L.format=e.numberFormat,L.geo={},bt.prototype={s:0,t:0,add:function(n){wt(n,this.t,Jo),wt(Jo.s,this.s,this),this.s?this.t+=Jo.t:this.s=Jo.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}},new bt),Go=(L.geo.stream=function(n,t){n&&Go.hasOwnProperty(n.type)?Go[n.type](n,t):St(n,t)},{Feature:function(n,t){St(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rm(s,p)&&(p=n):m(n,p)>m(s,p)&&(s=n):s<=p?(nm(s,p)&&(p=n):m(n,p)>m(s,p)&&(s=n)):lu(n,t),ru=a,nu=n}function su(){au.point=fu}function hu(){uu[0]=s,uu[1]=p,au.point=lu,ru=null}function pu(n,t){var e;ru?iu+=180R&&(s=-(p=180)),uu[0]=s,uu[1]=p,ru=null}function m(n,t){return(t-=n)<0?t+360:t}function vu(n,t){return n[0]-t[0]}function yu(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nm(a[0],a[1])&&(a[1]=i[1]),m(i[0],a[1])>m(a[0],a[1])&&(a[0]=i[0])):e.push(a=i);for(var r,i,o,u=-1/0,t=0,a=e[o=e.length-1];t<=o;a=i,++t)(r=m(a[1],(i=e[t])[0]))>u&&(u=r,s=i[0],p=a[1])}return ou=uu=null,1/0===s||1/0===h?[[NaN,NaN],[NaN,NaN]]:[[s,h],[p,d]]}),L.geo.centroid=function(n){mu=xu=Mu=_u=bu=wu=Su=ku=Nu=Eu=Au=0,L.geo.stream(n,M);var n=Nu,t=Eu,e=Au,r=n*n+t*t+e*e;return rR?Math.atan((Math.sin(e)*(o=Math.cos(i))*Math.sin(r)-Math.sin(i)*(r=Math.cos(e))*Math.sin(c))/(r*o*u)):(e+i)/2,l.point(p,h),l.lineEnd(),l.lineStart(),l.point(a,h),f=0),l.point(s=n,h=t),p=a},lineEnd:function(){l.lineEnd(),s=h=NaN},clean:function(){return 2-f}}},function(n,t,e,r){var i;null==n?(r.point(-k,i=e*g),r.point(0,i),r.point(k,i),r.point(k,0),r.point(k,-i),r.point(0,-i),r.point(-k,-i),r.point(-k,0),r.point(-k,i)):q(n[0]-t[0])>R?(n=n[0]R}).map(f)).concat(L.range(Math.ceil(a/d)*d,u,d).filter(function(n){return q(n%y)>R}).map(s))}var e,r,i,o,u,a,c,l,f,s,h,p,g=10,d=g,v=90,y=360,m=2.5;return t.lines=function(){return n().map(function(n){return{type:"LineString",coordinates:n}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(c).slice(1),h(i).reverse().slice(1),p(l).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.majorExtent(n).minorExtent(n):t.minorExtent()},t.majorExtent=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],l=+n[0][1],c=+n[1][1],i=o&&n.x<=a&&n.y>=u&&n.y<=c?[[o,c],[a,c],[a,u],[o,u]]:[]).point=r[t]}),i}function e(n){return n.map(function(n,t){return{x:Math.round(o(n,t)/R)*R,y:Math.round(u(n,t)/R)*R,i:t}})}var r=qe,i=Re,o=r,u=i,l=ta;return n?t(n):(t.links=function(t){return ar(e(t)).edges.filter(function(n){return n.l&&n.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},t.triangles=function(f){var s=[];return ar(e(f)).cells.forEach(function(n,t){for(var e,r,i=n.site,o=n.edges.sort($e),u=-1,a=o.length,c=o[a-1].edge,l=c.l===i?c.r:c.l;++uc&&(c=t.x),t.y>l&&(l=t.y),e.push(t.x),r.push(t.y);else for(i=0;i=u[0]&&r<=u[1]&&((e=i[L.bisect(a,r,1,l)-1]).y+=f,e.push(n[t]));return i}var s=!0,h=Number,p=ei,g=ni;return e.value=function(n){return arguments.length?(h=n,e):h},e.range=function(n){return arguments.length?(p=N(n),e):p},e.bins=function(t){return arguments.length?(g="number"==typeof t?function(n){return ti(n,t)}:N(t),e):g},e.frequency=function(n){return arguments.length?(s=!!n,e):s},e},L.layout.pack=function(){function t(n,t){var e,n=a.call(this,n,t),t=n[0],r=l[0],i=l[1],o=null==u?Math.sqrt:"function"==typeof u?u:function(){return u};return t.x=t.y=0,v(t,function(n){n.r=+o(n.value)}),v(t,ai),c&&(e=c*(u?1:Math.max(2*t.r/r,2*t.r/i))/2,v(t,function(n){n.r+=e}),v(t,ai),v(t,function(n){n.r-=e})),function n(t,e,r,i){var o=t.children;if(t.x=e+=i*t.x,t.y=r+=i*t.y,t.r*=i,o)for(var u=-1,a=o.length;++ur.x&&(r=n),n.depth>i.depth&&(i=n)}),o=p(e,r)/2-e.x,u=g[0]/(r.x+p(r,e)/2+o),a=g[1]/(i.depth||1),Or(t,function(n){n.x=(n.x+o)*u,n.y=n.depth*a})),n}function l(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){for(var i,o=0,u=0,a=n.children,c=a.length;0<=--c;)(i=a[c]).z+=o,i.m+=o,o+=i.s+(u+=i.c);t=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+p(n._,r._),n.m=n.z-t):n.z=t}else r&&(n.z=r.z+p(n._,r._));n.parent.A=function(n,t,e){if(t){for(var r,i=n,o=n,u=t,a=i.parent.children[0],c=i.m,l=o.m,f=u.m,s=a.m;u=pi(u),i=hi(i),u&&i;)a=hi(a),(o=pi(o)).a=n,0<(r=u.z+f-i.z-c+p(u._,i._))&&(function(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}(function(n,t,e){return n.a.parent===t.parent?n.a:e}(u,n,e),n,r),c+=r,l+=r),f+=u.m,c+=i.m,s+=a.m,l+=o.m;u&&!pi(o)&&(o.t=u,o.m+=f-l),i&&!hi(a)&&(a.t=i,a.m+=c-s,e=n)}return e}(n,r,n.parent.A||e[0])}function f(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function s(n){n.x*=g[0],n.y=n.depth*g[1]}var h=L.layout.hierarchy().sort(null).value(null),p=si,g=[1,1],d=null;return t.separation=function(n){return arguments.length?(p=n,t):p},t.size=function(n){return arguments.length?(d=null==(g=n)?s:null,t):d?null:g},t.nodeSize=function(n){return arguments.length?(d=null==(g=n)?null:s,t):d?g:null},Fr(t,h)},L.layout.cluster=function(){function t(n,t){var r,n=c.call(this,n,t),e=n[0],i=0,t=(v(e,function(n){var t,e=n.children;e&&e.length?(n.x=(t=e).reduce(function(n,t){return n+t.x},0)/t.length,n.y=1+L.max(e,function(n){return n.y})):(n.x=r?i+=l(n,r):0,n.y=0,r=n)}),function n(t){var e=t.children;return e&&e.length?n(e[0]):t}(e)),o=function n(t){var e,r=t.children;return r&&(e=r.length)?n(r[e-1]):t}(e),u=t.x-l(t,o)/2,a=o.x+l(o,t)/2;return v(e,s?function(n){n.x=(n.x-e.x)*f[0],n.y=(e.y-n.y)*f[1]}:function(n){n.x=(n.x-u)/(a-u)*f[0],n.y=(1-(e.y?n.y/e.y:1))*f[1]}),n}var c=L.layout.hierarchy().sort(null).value(null),l=si,f=[1,1],s=!1;return t.separation=function(n){return arguments.length?(l=n,t):l},t.size=function(n){return arguments.length?(s=null==(f=n),t):s?null:f},t.nodeSize=function(n){return arguments.length?(s=null!=(f=n),t):s?f:null},Fr(t,c)},L.layout.treemap=function(){function l(n,t){for(var e,r,i=-1,o=n.length;++ie.dy)&&(l=e.dy);++oe.dx)&&(l=e.dx);++or;o--);t=t.slice(i,o)}return t},o.tickFormat=function(n,t){if(!arguments.length)return da;arguments.length<2?t=da:"function"!=typeof t&&(t=L.format(t));var e,r=Math.max(.1,n/o.ticks().length),i=l?(e=1e-12,Math.ceil):(e=-1e-12,Math.floor);return function(n){return n/h(i(s(n)+e))<=r?t(n):""}},o.copy=function(){return n(t.copy(),c,l,f)},_i(o,t)}(L.scale.linear().domain([0,1]),10,!0,[1,10])},L.format(".0e")),va={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}},ya=(L.scale.pow=function(){return function n(t,e,r){function i(n){return t(o(n))}var o=Ei(e),u=Ei(1/e);return i.invert=function(n){return u(t.invert(n))},i.domain=function(n){return arguments.length?(t.domain((r=n.map(Number)).map(o)),i):r},i.ticks=function(n){return Si(r,n)},i.tickFormat=function(n,t){return ki(r,n,t)},i.nice=function(n){return i.domain(bi(r,n))},i.exponent=function(n){return arguments.length?(o=Ei(e=n),u=Ei(1/e),t.domain(r.map(o)),i):e},i.copy=function(){return n(t.copy(),e,r)},_i(i,t)}(L.scale.linear(),1,[0,1])},L.scale.sqrt=function(){return L.scale.pow().exponent(.5)},L.scale.ordinal=function(){return function n(a,c){function l(n){return s[((i.get(n)||("range"===c.t?i.set(n,a.push(n)):NaN))-1)%s.length]}function f(t,e){return L.range(a.length).map(function(n){return t+e*n})}var i,s,h;return l.domain=function(n){if(!arguments.length)return a;a=[],i=new x;for(var t,e=-1,r=n.length;++erect,.s>rect").attr("width",N[1]-N[0])}function M(n){n.select(".extent").attr("y",E[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",E[1]-E[0])}function i(){function n(){var n=L.mouse(o),t=!1;i&&(n[0]+=i[0],n[1]+=i[1]),p||(L.event.altKey?(c=c||[(N[0]+N[1])/2,(E[0]+E[1])/2],d[0]=N[+(n[0]