!function(){function a(n){return n&&(n.ownerDocument||n.document||n).documentElement}function T(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function o(n,t){return n>>1;u(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,n>>8&255,255&n)}function gn(n){return pn(n)+""}function dn(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function vn(n,t,e){var r,i,u,o=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))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 t(xn(i[0]),xn(i[1]),xn(i[2]))}return(u=Ou.get(n))?t(u.r,u.g,u.b):(null==n||"#"!==n.charAt(0)||isNaN(u=parseInt(n.slice(1),16))||(4===n.length?(o=(3840&u)>>4,o|=o>>4,a=240&u,a|=a>>4,l=15&u,l|=l<<4):7===n.length&&(o=(16711680&u)>>16,a=(65280&u)>>8,l=255&u)),t(o,a,l))}function yn(n,t,e){var r,i,u=Math.min(n/=255,t/=255,e/=255),o=Math.max(n,t,e),a=o-u,l=(o+u)/2;return a?(i=l<.5?a/(o+u):a/(2-o-u),r=n==o?(t-e)/a+(t=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function En(){for(var n,t=Iu,e=1/0;t;)t=t.c?(t.tN}function g(n,t,e){var r=[1,0,0],i=at(ut(n),ut(t)),u=ot(i,i),o=i[0],a=u-o*o;if(!a)return!e&&n;var l=N*u/a,c=-N*o/a,f=at(r,i),s=ct(r,l);lt(s,ct(i,c));var h=f,p=ot(s,h),g=ot(h,h),d=p*p-g*(ot(s,s)-1);if(!(d<0)){var v=Math.sqrt(d),y=ct(h,(-p-v)/g);if(lt(y,s),y=st(y),!e)return y;var m,M=n[0],x=t[0],b=n[1],_=t[1];xbu;return wt(p,function(a){var l,c,f,s,h;return{lineStart:function(){s=f=!1,h=1},point:function(n,t){var e,r,i=[n,t],u=p(n,t),o=v?u?0:d(n,t):u?d(n+(n<0?wu:-wu),t):0;!l&&(s=f=u)&&a.lineStart(),u!==f&&(e=g(l,i),(ht(l,e)||ht(i,e))&&(i[0]+=bu,i[1]+=bu,u=p(i[0],i[1]))),u!==f?(h=0,u?(a.lineStart(),e=g(i,l),a.point(e[0],e[1])):(e=g(l,i),a.point(e[0],e[1]),a.lineEnd()),l=e):y&&l&&v^u&&(o&c||!(r=g(i,l,!0))||(h=0,v?(a.lineStart(),a.point(r[0][0],r[0][1]),a.point(r[1][0],r[1][1]),a.lineEnd()):(a.point(r[1][0],r[1][1]),a.lineEnd(),a.lineStart(),a.point(r[0][0],r[0][1])))),!u||l&&ht(l,i)||a.point(i[0],i[1]),l=i,f=u,c=o},lineEnd:function(){f&&a.lineEnd(),l=null},clean:function(){return h|(s&&f)<<1}}},Kt(i,6*Eu),v?[0,-i]:[-wu,i-wu])}function At(f,s,h,p){return function(n){var t=n.a,e=n.b,r=t.x,i=t.y,u=0,o=1,a=e.x-r,l=e.y-i,c=f-r;if(a||!(0r&&0bu||iu(i-e)>bu)&&(a.splice(o,0,new qe((s=u.site,h=f,p=iu(r-d)=c)return}else u={x:v,y:l};e={x:v,y:c}}else{if(u){if(u.y=c)return}else u={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(u){if(u.y=a)return}else u={x:o,y:r*o+i};e={x:a,y:r*a+i}}else{if(u){if(u.xu&&(i=r.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(t=t[0])===(e=e[0])?a[o]?a[o]+=e:a[++o]=e:(a[++o]=null,l.push({i:o,x:Ve(t,e)})),u=ma.lastIndex;return ui&&(r=e,i=t);return r}function Lr(n){return n.reduce(qr,0)}function qr(n,t){return n+t[1]}function Tr(n,t){return Rr(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Rr(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,u=[];++e<=t;)u[e]=i*e+r;return u}function Dr(n){return[Bi.min(n),Bi.max(n)]}function Pr(n,t){return n.value-t.value}function Ur(n,t){var e=n._pack_next;(n._pack_next=t)._pack_prev=n,(t._pack_next=e)._pack_prev=t}function jr(n,t){(n._pack_next=t)._pack_prev=n}function Fr(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return e*e+r*r<.999*i*i}function Hr(n){function t(n){l=Math.min(n.x-n.r,l),c=Math.max(n.x+n.r,c),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,u,o,a,l=1/0,c=-1/0,f=1/0,s=-1/0;if(e.forEach(Or),(r=e[0]).x=-r.r,r.y=0,t(r),1t;)i.push(r/u);else for(;(r=n+e*++o)=d.length)return p?p.call(g,n):h?n.sort(h):n;for(var t,i,u,o,a=-1,l=n.length,c=d[r++],f=new m;++a=d.length)return n;var i=[],u=t[r++];return n.forEach(function(n,t){i.push({key:n,values:e(t,r)})}),u?i.sort(function(n,t){return u(n.key,t.key)}):i}(s(Bi.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},Bi.set=function(n){var t=new g;if(n)for(var e=0,r=n.length;e=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Wu=Bi.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=Bi.round(n,An(n,t))).toFixed(Math.max(0,Math.min(20,An(n*(1+1e-15),t))))}}),Ju=Bi.time={},Gu=Date;zn.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(){Ku.setUTCDate.apply(this._,arguments)},setDay:function(){Ku.setUTCDay.apply(this._,arguments)},setFullYear:function(){Ku.setUTCFullYear.apply(this._,arguments)},setHours:function(){Ku.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Ku.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Ku.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Ku.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Ku.setUTCSeconds.apply(this._,arguments)},setTime:function(){Ku.setTime.apply(this._,arguments)}};var Ku=Date.prototype;Ju.year=Ln(function(n){return(n=Ju.day(n)).setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),Ju.years=Ju.year.range,Ju.years.utc=Ju.year.utc.range,Ju.day=Ln(function(n){var t=new Gu(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}),Ju.days=Ju.day.range,Ju.days.utc=Ju.day.utc.range,Ju.dayOfYear=function(n){var t=Ju.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=Ju[n]=Ln(function(n){return(n=Ju.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=Ju.year(n).getDay();return Math.floor((Ju.dayOfYear(n)+(t+e)%7)/7)-(t!==e)});Ju[n+"s"]=t.range,Ju[n+"s"].utc=t.utc.range,Ju[n+"OfYear"]=function(n){var t=Ju.year(n).getDay();return Math.floor((Ju.dayOfYear(n)+(t+e)%7)/7)}}),Ju.week=Ju.sunday,Ju.weeks=Ju.sunday.range,Ju.weeks.utc=Ju.sunday.utc.range,Ju.weekOfYear=Ju.sundayOfYear;var Qu={"-":"",_:" ",0:"0"},no=/^\s*\d+/,to=/^%/;Bi.locale=function(n){return{numberFormat:(S=(t=n).decimal,a=t.thousands,l=t.grouping,r=t.currency,k=l&&a?function(n,t){for(var e=n.length,r=[],i=0,u=l[0],o=0;0t));)u=l[i=(i+1)%l.length];return r.reverse().join(a)}:R,function(n){var t=Bu.exec(n),f=t[1]||" ",s=t[2]||">",h=t[3]||"-",e=t[4]||"",p=t[5],g=+t[6],d=t[7],v=t[8],y=t[9],m=1,M="",x="",b=!1,_=!0,v=v&&+v.substring(1);switch((p||"0"===f&&"="===s)&&(p=f="0",s="="),y){case"n":d=!0,y="g";break;case"%":m=100,x="%",y="f";break;case"p":m=100,x="%",y="r";break;case"b":case"o":case"x":case"X":"#"===e&&(M="0"+y.toLowerCase());case"c":_=!1;case"d":b=!0,v=0;break;case"s":m=-1,y="r"}"$"===e&&(M=r[0],x=r[1]),"r"!=y||v||(y="g"),null!=v&&("g"==y?v=Math.max(1,Math.min(21,v)):"e"!=y&&"f"!=y||(v=Math.max(0,Math.min(20,v)))),y=Wu.get(y)||Cn;var w=p&&d;return function(n){var t=x;if(b&&n%1)return"";var e,r=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===h?"":h;m<0?(n=(e=Bi.formatPrefix(n,v)).scale(n),t=e.symbol+x):n*=m;var i,u,o,a=(n=y(n,v)).lastIndexOf(".");o=a<0?(u=_?n.lastIndexOf("e"):-1)<0?(i=n,""):(i=n.substring(0,u),n.substring(u)):(i=n.substring(0,a),S+n.substring(a+1)),!p&&d&&(i=k(i,1/0));var l=M.length+i.length+o.length+(w?0:r.length),c=l"===s?c+r+n:"^"===s?c.substring(0,l>>=1)+r+n+c.substring(l):r+(w?n:c+n))+t}}),timeFormat:Tn(n)};var t,S,a,l,r,k};var eo=Bi.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"]});Bi.format=eo.numberFormat,Bi.geo={},Qn.prototype={s:0,t:0,add:function(n){nt(n,this.t,ro),nt(ro.s,this.s,this),this.s?this.t+=ro.t:this.s=ro.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var ro=new Qn;Bi.geo.stream=function(n,t){n&&io.hasOwnProperty(n.type)?io[n.type](n,t):tt(n,t)};var io={Feature:function(n,t){tt(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++rCo(ao,co)&&(co=n):Co(n,co)>Co(ao,co)&&(ao=n):ao<=co?(nCo(ao,co)&&(co=n):Co(n,co)>Co(ao,co)&&(ao=n)):_o(n,t),go=c,so=n}function So(){Mo.point=wo}function ko(){mo[0]=ao,mo[1]=co,Mo.point=_o,go=null}function No(n,t){var e;go?vo+=180bu&&(ao=-(co=180)),mo[0]=ao,mo[1]=co,go=null}function Co(n,t){return(t-=n)<0?t+360:t}function zo(n,t){return n[0]-t[0]}function Lo(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nCo(a[0],a[1])&&(a[1]=i[1]),Co(i[0],a[1])>Co(a[0],a[1])&&(a[0]=i[0])):e.push(a=i);for(var r,i,u,o=-1/0,t=0,a=e[u=e.length-1];t<=u;a=i,++t)i=e[t],(r=Co(a[1],i[0]))>o&&(o=r,ao=i[0],co=a[1])}return yo=mo=null,ao===1/0||lo===1/0?[[NaN,NaN],[NaN,NaN]]:[[ao,lo],[co,fo]]}),Bi.geo.centroid=function(n){qo=To=Ro=Do=Po=Uo=jo=Fo=Ho=Oo=Io=0,Bi.geo.stream(n,Yo);var t=Ho,e=Oo,r=Io,i=t*t+e*e+r*r;return i<_u&&(t=Uo,e=jo,r=Fo,Tobu?Math.atan((Math.sin(r)*(a=Math.cos(u))*Math.sin(i)-Math.sin(u)*(o=Math.cos(r))*Math.sin(e))/(o*a*l)):(r+u)/2,s.point(d,g),s.lineEnd(),s.lineStart(),s.point(c,g),h=0),s.point(p=n,g=t),d=c},lineEnd:function(){s.lineEnd(),p=g=NaN},clean:function(){return 2-h}}},function(n,t,e,r){var i,u;null==n?(u=e*Nu,r.point(-wu,u),r.point(0,u),r.point(wu,u),r.point(wu,0),r.point(wu,-u),r.point(0,-u),r.point(-wu,-u),r.point(-wu,0),r.point(-wu,u)):iu(n[0]-t[0])>bu?(u=e*(i=n[0]bu}).map(f)).concat(Bi.range(Math.ceil(a/d)*d,o,d).filter(function(n){return iu(n%y)>bu}).map(s))}var e,r,i,u,o,a,l,c,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(u).concat(p(l).slice(1),h(i).reverse().slice(1),p(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?(u=+n[0][0],i=+n[1][0],c=+n[0][1],l=+n[1][1],i=o&&r.x<=l&&r.y>=a&&r.y<=c?[[o,c],[l,c],[l,a],[o,a]]:[]).point=i[t]}),u}function e(n){return n.map(function(n,t){return{x:Math.round(u(n,t)/bu)*bu,y:Math.round(o(n,t)/bu)*bu,i:t}})}var r=fe,i=se,u=r,o=i,f=va;return n?t(n):(t.links=function(t){return je(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(h){var p=[];return je(e(h)).cells.forEach(function(n,t){for(var e,r,i,u,o=n.site,a=n.edges.sort(Se),l=-1,c=a.length,f=a[c-1].edge,s=f.l===o?f.r:f.l;++ll&&(l=t.x),t.y>c&&(c=t.y),e.push(t.x),r.push(t.y);else for(i=0;i=o[0]&&r<=o[1]&&((e=i[Bi.bisect(a,r,1,c)-1]).y+=f,e.push(n[t]));return i}var s=!0,h=Number,p=Dr,g=Tr;return e.value=function(n){return arguments.length?(h=n,e):h},e.range=function(n){return arguments.length?(p=bn(n),e):p},e.bins=function(t){return arguments.length?(g="number"==typeof t?function(n){return Rr(n,t)}:bn(t),e):g},e.frequency=function(n){return arguments.length?(s=!!n,e):s},e},Bi.layout.pack=function(){function t(n,t){var e,r=c.call(this,n,t),i=r[0],u=s[0],o=s[1],a=null==l?Math.sqrt:"function"==typeof l?l:function(){return l};return i.x=i.y=0,xr(i,function(n){n.r=+a(n.value)}),xr(i,Hr),f&&(e=f*(l?1:Math.max(2*i.r/u,2*i.r/o))/2,xr(i,function(n){n.r+=e}),xr(i,Hr),xr(i,function(n){n.r-=e})),function n(t,e,r,i){var u=t.children;if(t.x=e+=i*t.x,t.y=r+=i*t.y,t.r*=i,u)for(var o=-1,a=u.length;++or.x&&(r=n),n.depth>i.depth&&(i=n)}),u=d(e,r)/2-e.x,o=v[0]/(r.x+d(r,e)/2+u),a=v[1]/(i.depth||1),Mr(c,function(n){n.x=(n.x+u)*o,n.y=n.depth*a})),l}function s(n){var t,e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;e.length?(function(n){for(var t,e=0,r=0,i=n.children,u=i.length;0<=--u;)(t=i[u]).z+=e,t.m+=e,e+=t.s+(r+=t.c)}(n),t=(e[0].z+e[e.length-1].z)/2,i?(n.z=i.z+d(n._,i._),n.m=n.z-t):n.z=t):i&&(n.z=i.z+d(n._,i._)),n.parent.A=function(n,t,e){if(t){for(var r,i=n,u=n,o=t,a=i.parent.children[0],l=i.m,c=u.m,f=o.m,s=a.m;o=Xr(o),i=Vr(i),o&&i;)a=Vr(a),(u=Xr(u)).a=n,0<(r=o.z+f-i.z-l+d(o._,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}(o,n,e),n,r),l+=r,c+=r),f+=o.m,l+=i.m,s+=a.m,c+=u.m;o&&!Xr(u)&&(u.t=o,u.m+=f-c),i&&!Vr(a)&&(a.t=i,a.m+=l-s,e=n)}return e}(n,i,n.parent.A||r[0])}function h(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function p(n){n.x*=v[0],n.y=n.depth*v[1]}var g=Bi.layout.hierarchy().sort(null).value(null),d=Zr,v=[1,1],y=null;return t.separation=function(n){return arguments.length?(d=n,t):d},t.size=function(n){return arguments.length?(y=null==(v=n)?p:null,t):y?null:v},t.nodeSize=function(n){return arguments.length?(y=null==(v=n)?null:p,t):y?v:null},mr(t,g)},Bi.layout.cluster=function(){function t(n,t){var i,e=f.call(this,n,t),r=e[0],u=0;xr(r,function(n){var t,e,r=n.children;r&&r.length?(n.x=(e=r).reduce(function(n,t){return n+t.x},0)/e.length,n.y=(t=r,1+Bi.max(t,function(n){return n.y}))):(n.x=i?u+=s(n,i):0,n.y=0,i=n)});var o=function n(t){var e=t.children;return e&&e.length?n(e[0]):t}(r),a=function n(t){var e,r=t.children;return r&&(e=r.length)?n(r[e-1]):t}(r),l=o.x-s(o,a)/2,c=a.x+s(a,o)/2;return xr(r,p?function(n){n.x=(n.x-r.x)*h[0],n.y=(r.y-n.y)*h[1]}:function(n){n.x=(n.x-l)/(c-l)*h[0],n.y=(1-(r.y?n.y/r.y:1))*h[1]}),e}var f=Bi.layout.hierarchy().sort(null).value(null),s=Zr,h=[1,1],p=!1;return t.separation=function(n){return arguments.length?(s=n,t):s},t.size=function(n){return arguments.length?(p=null==(h=n),t):p?null:h},t.nodeSize=function(n){return arguments.length?(p=null!=(h=n),t):p?h:null},mr(t,f)},Bi.layout.treemap=function(){function f(n,t){for(var e,r,i=-1,u=n.length;++ie.dy)&&(c=e.dy);++ue.dx)&&(c=e.dx);++ur;u--);t=t.slice(i,u)}return t},i.tickFormat=function(n,e){if(!arguments.length)return La;arguments.length<2?e=La:"function"!=typeof e&&(e=Bi.format(e));var r=Math.max(1,l*n/i.ticks().length);return function(n){var t=n/h(Math.round(s(n)));return t*lrect,.s>rect").attr("width",E[1]-E[0])}function b(n){n.select(".extent").attr("y",A[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",A[1]-A[0])}function o(){function n(){var n=Bi.mouse(o),t=!1;u&&(n[0]+=u[0],n[1]+=u[1]),g||(Bi.event.altKey?(s=s||[(E[0]+E[1])/2,(A[0]+A[1])/2],v[0]=E[+(n[0]