UNPKG

234 kBJavaScriptView Raw
1// https://github.com/quantmind/giotto Version 0.1.3. Copyright 2016 quantmind.com.
2!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.giotto=t.giotto||{})}(this,function(t){"use strict";function n(t){return function(n,e){return fl(t(n),e)}}function e(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=Sl?i*=10:o>=kl?i*=5:o>=Al&&(i*=2),n<t?-i:i}function r(t){return t.length}function i(){}function o(t,n){var e=new i;if(t instanceof i)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,o=-1,a=t.length;if(null==n)for(;++o<a;)e.set(o,t[o]);else for(;++o<a;)e.set(n(r=t[o],o,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}function a(){return{}}function u(t,n,e){t[n]=e}function c(){return o()}function s(t,n,e){t.set(n,e)}function l(){}function f(t,n){var e=new l;if(t instanceof l)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}function h(t){return+t}function p(t){return t*t}function d(t){return t*(2-t)}function v(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function y(t){return t*t*t}function _(t){return--t*t*t+1}function g(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function m(t){return 1-Math.cos(t*hf)}function x(t){return Math.sin(t*hf)}function b(t){return(1-Math.cos(ff*t))/2}function w(t){return Math.pow(2,10*t-10)}function M(t){return 1-Math.pow(2,-10*t)}function E(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function N(t){return 1-Math.sqrt(1-t*t)}function T(t){return Math.sqrt(1- --t*t)}function S(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function k(t){return 1-A(1-t)}function A(t){return(t=+t)<pf?wf*t*t:t<vf?wf*(t-=df)*t+yf:t<gf?wf*(t-=_f)*t+mf:wf*(t-=xf)*t+bf}function C(t){return((t*=2)<=1?1-A(1-t):A(t-1)+1)/2}function P(t,n){return t[0]-n[0]||t[1]-n[1]}function L(t){for(var n=t.length,e=[0,1],r=2,i=2;i<n;++i){for(;r>1&&zf(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function O(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function R(){return new O}function z(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,c,s,l,f,h,p=t._root,d={data:r},v=t._x0,y=t._y0,_=t._x1,g=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=n>=(o=(v+_)/2))?v=o:_=o,(l=e>=(a=(y+g)/2))?y=a:g=a,i=p,!(p=p[f=l<<1|s]))return i[f]=d,t;if(u=+t._x.call(null,p.data),c=+t._y.call(null,p.data),n===u&&e===c)return d.next=p,i?i[f]=d:t._root=d,t;do i=i?i[f]=new Array(4):t._root=new Array(4),(s=n>=(o=(v+_)/2))?v=o:_=o,(l=e>=(a=(y+g)/2))?y=a:g=a;while((f=l<<1|s)===(h=(c>=a)<<1|u>=o));return i[h]=p,i[f]=d,t}function I(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),c=1/0,s=1/0,l=-(1/0),f=-(1/0);for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(a[e]=r,u[e]=i,r<c&&(c=r),r>l&&(l=r),i<s&&(s=i),i>f&&(f=i));for(l<c&&(c=this._x0,l=this._x1),f<s&&(s=this._y0,f=this._y1),this.cover(c,s).cover(l,f),e=0;e<o;++e)z(this,a[e],u[e],t[e]);return this}function D(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this}function U(t){return t[0]}function q(t){return t[1]}function j(t,n,e){var r=new F(null==n?U:n,null==e?q:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function F(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Y(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}function B(t){return t.innerRadius}function X(t){return t.outerRadius}function $(t){return t.startAngle}function H(t){return t.endAngle}function V(t){return t&&t.padAngle}function G(t){return t>=1?ah:t<=-1?-ah:Math.asin(t)}function W(t,n,e,r,i,o,a,u){var c=e-t,s=r-n,l=a-i,f=u-o,h=(l*(n-o)-f*(t-i))/(f*c-l*s);return[t+h*c,n+h*s]}function Z(t,n,e,r,i,o,a){var u=t-e,c=n-r,s=(a?o:-o)/Math.sqrt(u*u+c*c),l=s*c,f=-s*u,h=t+l,p=n+f,d=e+l,v=r+f,y=(h+d)/2,_=(p+v)/2,g=d-h,m=v-p,x=g*g+m*m,b=i-o,w=h*v-d*p,M=(m<0?-1:1)*Math.sqrt(Math.max(0,b*b*x-w*w)),E=(w*m-g*M)/x,N=(-w*g-m*M)/x,T=(w*m+g*M)/x,S=(-w*g+m*M)/x,k=E-y,A=N-_,C=T-y,P=S-_;return k*k+A*A>C*C+P*P&&(E=T,N=S),{cx:E,cy:N,x01:-l,y01:-f,x11:E*(i/b-1),y11:N*(i/b-1)}}function J(t){this._context=t}function Q(t){return t[0]}function K(t){return t[1]}function tt(t){this._curve=t}function nt(t){function n(n){return new tt(t(n))}return n._curve=t,n}function et(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(nt(t)):n()._curve},t}function rt(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function it(t){this._context=t}function ot(t){this._context=t}function at(t){this._context=t}function ut(t,n){this._basis=new it(t),this._beta=n}function ct(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function st(t,n){this._context=t,this._k=(1-n)/6}function lt(t,n){this._context=t,this._k=(1-n)/6}function ft(t,n){this._context=t,this._k=(1-n)/6}function ht(t,n,e){var r=t._x1,i=t._y1,o=t._x2,a=t._y2;if(t._l01_a>ih){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>ih){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/l,a=(a*s+t._y1*t._l23_2a-e*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,a,t._x2,t._y2)}function pt(t,n){this._context=t,this._alpha=n}function dt(t,n){this._context=t,this._alpha=n}function vt(t,n){this._context=t,this._alpha=n}function yt(t){this._context=t}function _t(t){return t<0?-1:1}function gt(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(e-t._y1)/(i||r<0&&-0),u=(o*i+a*r)/(r+i);return(_t(o)+_t(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(u))||0}function mt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function xt(t,n,e){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,u=(o-r)/3;t._context.bezierCurveTo(r+u,i+u*n,o-u,a-u*e,o,a)}function bt(t){this._context=t}function wt(t){this._context=new Mt(t)}function Mt(t){this._context=t}function Et(t){return new bt(t)}function Nt(t){return new wt(t)}function Tt(t){this._context=t}function St(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),a=new Array(r);for(i[0]=0,o[0]=2,a[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,o[n]=4,a[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,a[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/o[n-1],o[n]-=e,a[n]-=e*a[n-1];for(i[r-1]=a[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(a[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function kt(t,n){this._context=t,this._t=n}function At(t){return new kt(t,0)}function Ct(t){return new kt(t,1)}function Pt(t,n){return t[n]}function Lt(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}function Ot(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Rt(){}function zt(t){var n;return t=(t+"").trim().toLowerCase(),(n=vp.exec(t))?(n=parseInt(n[1],16),new jt(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=yp.exec(t))?It(parseInt(n[1],16)):(n=_p.exec(t))?new jt(n[1],n[2],n[3],1):(n=gp.exec(t))?new jt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=mp.exec(t))?Dt(n[1],n[2],n[3],n[4]):(n=xp.exec(t))?Dt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=bp.exec(t))?Ft(n[1],n[2]/100,n[3]/100,1):(n=wp.exec(t))?Ft(n[1],n[2]/100,n[3]/100,n[4]):Mp.hasOwnProperty(t)?It(Mp[t]):"transparent"===t?new jt(NaN,NaN,NaN,0):null}function It(t){return new jt(t>>16&255,t>>8&255,255&t,1)}function Dt(t,n,e,r){return r<=0&&(t=n=e=NaN),new jt(t,n,e,r)}function Ut(t){return t instanceof Rt||(t=zt(t)),t?(t=t.rgb(),new jt(t.r,t.g,t.b,t.opacity)):new jt}function qt(t,n,e,r){return 1===arguments.length?Ut(t):new jt(t,n,e,null==r?1:r)}function jt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Ft(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Xt(t,n,e,r)}function Yt(t){if(t instanceof Xt)return new Xt(t.h,t.s,t.l,t.opacity);if(t instanceof Rt||(t=zt(t)),!t)return new Xt;if(t instanceof Xt)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,c=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=c<.5?o+i:2-o-i,a*=60):u=c>0&&c<1?0:a,new Xt(a,u,c,t.opacity)}function Bt(t,n,e,r){return 1===arguments.length?Yt(t):new Xt(t,n,e,null==r?1:r)}function Xt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function $t(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Ht(t){if(t instanceof Gt)return new Gt(t.l,t.a,t.b,t.opacity);if(t instanceof nn){var n=t.h*Ep;return new Gt(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof jt||(t=Ut(t));var e=Qt(t.r),r=Qt(t.g),i=Qt(t.b),o=Wt((.4124564*e+.3575761*r+.1804375*i)/Sp),a=Wt((.2126729*e+.7151522*r+.072175*i)/kp),u=Wt((.0193339*e+.119192*r+.9503041*i)/Ap);return new Gt(116*a-16,500*(o-a),200*(a-u),t.opacity)}function Vt(t,n,e,r){return 1===arguments.length?Ht(t):new Gt(t,n,e,null==r?1:r)}function Gt(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Wt(t){return t>Op?Math.pow(t,1/3):t/Lp+Cp}function Zt(t){return t>Pp?t*t*t:Lp*(t-Cp)}function Jt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Qt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Kt(t){if(t instanceof nn)return new nn(t.h,t.c,t.l,t.opacity);t instanceof Gt||(t=Ht(t));var n=Math.atan2(t.b,t.a)*Np;return new nn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function tn(t,n,e,r){return 1===arguments.length?Kt(t):new nn(t,n,e,null==r?1:r)}function nn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function en(t){if(t instanceof on)return new on(t.h,t.s,t.l,t.opacity);t instanceof jt||(t=Ut(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Fp*r+qp*n-jp*e)/(Fp+qp-jp),o=r-i,a=(Up*(e-i)-Ip*o)/Dp,u=Math.sqrt(a*a+o*o)/(Up*i*(1-i)),c=u?Math.atan2(a,o)*Np-120:NaN;return new on(c<0?c+360:c,u,i,t.opacity)}function rn(t,n,e,r){return 1===arguments.length?en(t):new on(t,n,e,null==r?1:r)}function on(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function an(t,n,e,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*n+(4-6*o+3*a)*e+(1+3*t+3*o-3*a)*r+a*i)/6}function un(t,n){return function(e){return t+e*n}}function cn(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function sn(t,n){var e=n-t;return e?un(t,e>180||e<-180?e-360*Math.round(e/360):e):Gp(isNaN(t)?n:t)}function ln(t){return 1===(t=+t)?fn:function(n,e){return e-n?cn(n,e,t):Gp(isNaN(n)?e:n)}}function fn(t,n){var e=n-t;return e?un(t,e):Gp(isNaN(t)?n:t)}function hn(t){return function(n){var e,r,i=n.length,o=new Array(i),a=new Array(i),u=new Array(i);for(e=0;e<i;++e)r=qt(n[e]),o[e]=r.r||0,a[e]=r.g||0,u[e]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}function pn(t){return function(){return t}}function dn(t){return function(n){return t(n)+""}}function vn(t){return"none"===t?sd:(Yp||(Yp=document.createElement("DIV"),Bp=document.documentElement,Xp=document.defaultView),Yp.style.transform=t,t=Xp.getComputedStyle(Bp.appendChild(Yp),null).getPropertyValue("transform"),Bp.removeChild(Yp),t=t.slice(7,-1).split(","),ld(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function yn(t){return null==t?sd:($p||($p=document.createElementNS("http://www.w3.org/2000/svg","g")),$p.setAttribute("transform",t),(t=$p.transform.baseVal.consolidate())?(t=t.matrix,ld(t.a,t.b,t.c,t.d,t.e,t.f)):sd)}function _n(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function o(t,r,i,o,a,u){if(t!==i||r!==o){var c=a.push("translate(",null,n,null,e);u.push({i:c-4,x:td(t,i)},{i:c-2,x:td(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}function a(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:td(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function u(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:td(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function c(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:td(t,e)},{i:u-2,x:td(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,r,i),a(n.rotate,e.rotate,r,i),u(n.skewX,e.skewX,r,i),c(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,o=i.length;++e<o;)r[(n=i[e]).i]=n.x(t);return r.join("")}}}function gn(t){return((t=Math.exp(t))+1/t)/2}function mn(t){return((t=Math.exp(t))-1/t)/2}function xn(t){return((t=Math.exp(2*t))-1)/(t+1)}function bn(t){return function(n,e){var r=t((n=Bt(n)).h,(e=Bt(e)).h),i=fn(n.s,e.s),o=fn(n.l,e.l),a=fn(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=a(t),n+""}}}function wn(t,n){var e=fn((t=Vt(t)).l,(n=Vt(n)).l),r=fn(t.a,n.a),i=fn(t.b,n.b),o=fn(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}}function Mn(t){return function(n,e){var r=t((n=tn(n)).h,(e=tn(e)).h),i=fn(n.c,e.c),o=fn(n.l,e.l),a=fn(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=a(t),n+""}}}function En(t){return function n(e){function r(n,r){var i=t((n=rn(n)).h,(r=rn(r)).h),o=fn(n.s,r.s),a=fn(n.l,r.l),u=fn(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=a(Math.pow(t,e)),n.opacity=u(t),n+""}}return e=+e,r.gamma=n,r}(1)}function Nn(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new Tn(r)}function Tn(t){this._=t}function Sn(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function kn(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function An(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Nd,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}function Cn(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function Pn(t,n){var e=Cn(t);return function(r,i){return n(e(r),i,t)}}function Ln(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function On(){return Xd||(Vd(Rn),Xd=Hd.now()+$d)}function Rn(){Xd=0}function zn(){this._call=this._time=this._next=null}function In(t,n,e){var r=new zn;return r.restart(t,n,e),r}function Dn(){On(),++qd;for(var t,n=Td;n;)(t=Xd-n._time)>=0&&n._call.call(null,t),n=n._next;--qd}function Un(){Xd=(Bd=Hd.now())+$d,qd=jd=0;try{Dn()}finally{qd=0,jn(),Xd=0}}function qn(){var t=Hd.now(),n=t-Bd;n>Yd&&($d-=n,Bd=t)}function jn(){for(var t,n,e=Td,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Td=n);Sd=t,Fn(r)}function Fn(t){if(!qd){jd&&(jd=clearTimeout(jd));var n=t-Xd;n>24?(t<1/0&&(jd=setTimeout(Un,n)),Fd&&(Fd=clearInterval(Fd))):(Fd||(Fd=setInterval(qn,Yd)),qd=1,Vd(Un))}}function Yn(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return a;do a.push(new Date(+e));while(n(e,o),t(e),e<r);return a},i.filter=function(e){return Yn(function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)},function(t,r){if(t>=t)for(;--r>=0;)for(;n(t,1),!e(t););})},e&&(i.count=function(n,r){return Zd.setTime(+n),Jd.setTime(+r),t(Zd),t(Jd),Math.floor(e(Zd,Jd))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t===0}:function(n){return i.count(0,n)%t===0}):i:null}),i}function Bn(t){return Yn(function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+7*n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*nv)/iv})}function Xn(t){return Yn(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+7*n)},function(t,n){return(n-t)/iv})}function $n(t){if(!(n=sy.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",a=!!n[5],u=n[6]&&+n[6],c=!!n[7],s=n[8]&&+n[8].slice(1),l=n[9]||"";"n"===l?(c=!0,l="g"):cy[l]||(l=""),(a||"0"===e&&"="===r)&&(a=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=a,this.width=u,this.comma=c,this.precision=s,this.type=l}function Hn(t){return t}function Vn(n){return fy=py(n),t.format=fy.format,t.formatPrefix=fy.formatPrefix,fy}function Gn(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Wn(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Zn(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Jn(t){function n(t,n){return function(e){var r,i,o,a=[],u=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++u<s;)37===t.charCodeAt(u)&&(a.push(t.slice(c,u)),null!=(i=gy[r=t.charAt(++u)])?r=t.charAt(++u):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),a.push(r),c=u+1);return a.push(t.slice(c,u)),a.join("")}}function e(t,n){return function(e){var i=Zn(1900),o=r(i,t,e+="",0);if(o!=e.length)return null;if("p"in i&&(i.H=i.H%12+12*i.p),"W"in i||"U"in i){"w"in i||(i.w="W"in i?1:0);var a="Z"in i?Wn(Zn(i.y)).getUTCDay():n(Zn(i.y)).getDay();i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(a+5)%7:i.w+7*i.U-(a+6)%7}return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,Wn(i)):n(i)}}function r(t,n,e,r){for(var i,o,a=0,u=n.length,c=e.length;a<u;){if(r>=c)return-1;if(i=n.charCodeAt(a++),37===i){if(i=n.charAt(a++),o=Y[i in gy?n.charAt(a++):i],!o||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function i(t,n,e){var r=C.exec(n.slice(e));return r?(t.p=P[r[0].toLowerCase()],e+r[0].length):-1}function o(t,n,e){var r=R.exec(n.slice(e));return r?(t.w=z[r[0].toLowerCase()],e+r[0].length):-1}function a(t,n,e){var r=L.exec(n.slice(e));return r?(t.w=O[r[0].toLowerCase()],e+r[0].length):-1}function u(t,n,e){var r=U.exec(n.slice(e));return r?(t.m=q[r[0].toLowerCase()],e+r[0].length):-1}function c(t,n,e){var r=I.exec(n.slice(e));return r?(t.m=D[r[0].toLowerCase()],e+r[0].length):-1}function s(t,n,e){return r(t,w,n,e)}function l(t,n,e){return r(t,M,n,e)}function f(t,n,e){return r(t,E,n,e)}function h(t){return S[t.getDay()]}function p(t){return T[t.getDay()]}function d(t){return A[t.getMonth()]}function v(t){return k[t.getMonth()]}function y(t){return N[+(t.getHours()>=12)]}function _(t){return S[t.getUTCDay()]}function g(t){return T[t.getUTCDay()]}function m(t){return A[t.getUTCMonth()]}function x(t){return k[t.getUTCMonth()]}function b(t){return N[+(t.getUTCHours()>=12)]}var w=t.dateTime,M=t.date,E=t.time,N=t.periods,T=t.days,S=t.shortDays,k=t.months,A=t.shortMonths,C=te(N),P=ne(N),L=te(T),O=ne(T),R=te(S),z=ne(S),I=te(k),D=ne(k),U=te(A),q=ne(A),j={a:h,A:p,b:d,B:v,c:null,d:ye,e:ye,H:_e,I:ge,j:me,L:xe,m:be,M:we,p:y,S:Me,U:Ee,w:Ne,W:Te,x:null,X:null,y:Se,Y:ke,Z:Ae,"%":Xe},F={a:_,A:g,b:m,B:x,c:null,d:Ce,e:Ce,H:Pe,I:Le,j:Oe,L:Re,m:ze,M:Ie,p:b,S:De,U:Ue,w:qe,W:je,x:null,X:null,y:Fe,Y:Ye,Z:Be,"%":Xe},Y={a:o,A:a,b:u,B:c,c:s,d:se,e:se,H:fe,I:fe,j:le,L:de,m:ce,M:he,p:i,S:pe,U:re,w:ee,W:ie,x:l,X:f,y:ae,Y:oe,Z:ue,"%":ve};return j.x=n(M,j),j.X=n(E,j),j.c=n(w,j),F.x=n(M,F),F.X=n(E,F),F.c=n(w,F),{format:function(t){var e=n(t+="",j);return e.toString=function(){return t},e},parse:function(t){var n=e(t+="",Gn);return n.toString=function(){return t},n},utcFormat:function(t){var e=n(t+="",F);return e.toString=function(){return t},e},utcParse:function(t){var n=e(t,Wn);return n.toString=function(){return t},n}}}function Qn(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function Kn(t){return t.replace(by,"\\$&")}function te(t){return new RegExp("^(?:"+t.map(Kn).join("|")+")","i")}function ne(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function ee(t,n,e){var r=my.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function re(t,n,e){var r=my.exec(n.slice(e));return r?(t.U=+r[0],e+r[0].length):-1}function ie(t,n,e){var r=my.exec(n.slice(e));return r?(t.W=+r[0],e+r[0].length):-1}function oe(t,n,e){var r=my.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function ae(t,n,e){var r=my.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function ue(t,n,e){var r=/^(Z)|([+-]\d\d)(?:\:?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function ce(t,n,e){var r=my.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function se(t,n,e){var r=my.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function le(t,n,e){var r=my.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function fe(t,n,e){var r=my.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function he(t,n,e){var r=my.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function pe(t,n,e){var r=my.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function de(t,n,e){var r=my.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function ve(t,n,e){var r=xy.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ye(t,n){return Qn(t.getDate(),n,2)}function _e(t,n){return Qn(t.getHours(),n,2)}function ge(t,n){return Qn(t.getHours()%12||12,n,2)}function me(t,n){return Qn(1+fv.count(Av(t),t),n,3)}function xe(t,n){return Qn(t.getMilliseconds(),n,3)}function be(t,n){return Qn(t.getMonth()+1,n,2)}function we(t,n){return Qn(t.getMinutes(),n,2)}function Me(t,n){return Qn(t.getSeconds(),n,2)}function Ee(t,n){return Qn(pv.count(Av(t),t),n,2)}function Ne(t){return t.getDay()}function Te(t,n){return Qn(dv.count(Av(t),t),n,2)}function Se(t,n){return Qn(t.getFullYear()%100,n,2)}function ke(t,n){return Qn(t.getFullYear()%1e4,n,4)}function Ae(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Qn(n/60|0,"0",2)+Qn(n%60,"0",2)}function Ce(t,n){return Qn(t.getUTCDate(),n,2)}function Pe(t,n){return Qn(t.getUTCHours(),n,2)}function Le(t,n){return Qn(t.getUTCHours()%12||12,n,2)}function Oe(t,n){return Qn(1+zv.count(Kv(t),t),n,3)}function Re(t,n){return Qn(t.getUTCMilliseconds(),n,3)}function ze(t,n){return Qn(t.getUTCMonth()+1,n,2)}function Ie(t,n){return Qn(t.getUTCMinutes(),n,2)}function De(t,n){return Qn(t.getUTCSeconds(),n,2)}function Ue(t,n){return Qn(Dv.count(Kv(t),t),n,2)}function qe(t){return t.getUTCDay()}function je(t,n){return Qn(Uv.count(Kv(t),t),n,2)}function Fe(t,n){return Qn(t.getUTCFullYear()%100,n,2)}function Ye(t,n){return Qn(t.getUTCFullYear()%1e4,n,4)}function Be(){return"+0000"}function Xe(){return"%"}function $e(n){return dy=Jn(n),t.timeFormat=dy.format,t.timeParse=dy.parse,t.utcFormat=dy.utcFormat,t.utcParse=dy.utcParse,dy}function He(t){return t.toISOString()}function Ve(t){var n=new Date(t);return isNaN(n)?null:n}function Ge(t){function n(n){var o=n+"",a=e.get(o);if(!a){if(i!==ky)return i;e.set(o,a=r.push(n))}return t[(a-1)%t.length]}var e=o(),r=[],i=ky;return t=null==t?[]:Sy.call(t),n.domain=function(t){if(!arguments.length)return r.slice();r=[],e=o();for(var i,a,u=-1,c=t.length;++u<c;)e.has(a=(i=t[u])+"")||e.set(a,r.push(i));return n},n.range=function(e){return arguments.length?(t=Sy.call(e),n):t.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return Ge().domain(r).range(t).unknown(i)},n}function We(){function t(){var t=i().length,r=a[1]<a[0],f=a[r-0],h=a[1-r];n=(h-f)/Math.max(1,t-c+2*s),u&&(n=Math.floor(n)),f+=(h-f-n*(t-c))*l,e=n*(1-c),u&&(f=Math.round(f),e=Math.round(e));var p=Tl(t).map(function(t){return f+n*t});return o(r?p.reverse():p)}var n,e,r=Ge().unknown(void 0),i=r.domain,o=r.range,a=[0,1],u=!1,c=0,s=0,l=.5;return delete r.unknown,r.domain=function(n){return arguments.length?(i(n),t()):i()},r.range=function(n){return arguments.length?(a=[+n[0],+n[1]],t()):a.slice()},r.rangeRound=function(n){return a=[+n[0],+n[1]],u=!0,t()},r.bandwidth=function(){return e},r.step=function(){return n},r.round=function(n){return arguments.length?(u=!!n,t()):u},r.padding=function(n){return arguments.length?(c=s=Math.max(0,Math.min(1,n)),t()):c},r.paddingInner=function(n){return arguments.length?(c=Math.max(0,Math.min(1,n)),t()):c},r.paddingOuter=function(n){return arguments.length?(s=Math.max(0,Math.min(1,n)),t()):s},r.align=function(n){return arguments.length?(l=Math.max(0,Math.min(1,n)),t()):l},r.copy=function(){return We().domain(i()).range(a).round(u).paddingInner(c).paddingOuter(s).align(l)},t()}function Ze(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Ze(n())},t}function Je(){return Ze(We().paddingInner(1))}function Qe(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:Ay(n)}function Ke(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}function tr(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}function nr(t,n,e,r){var i=t[0],o=t[1],a=n[0],u=n[1];return o<i?(i=e(o,i),a=r(u,a)):(i=e(i,o),a=r(a,u)),function(t){return a(i(t))}}function er(t,n,e,r){var i=Math.min(t.length,n.length)-1,o=new Array(i),a=new Array(i),u=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++u<i;)o[u]=e(t[u],t[u+1]),a[u]=r(n[u],n[u+1]);return function(n){var e=dl(t,n,1,i)-1;return a[e](o[e](n))}}function rr(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function ir(t,n){function e(){return i=Math.min(u.length,c.length)>2?er:nr,o=a=null,r}function r(n){return(o||(o=i(u,c,l?Ke(t):t,s)))(+n)}var i,o,a,u=Py,c=Py,s=ad,l=!1;return r.invert=function(t){return(a||(a=i(c,u,Qe,l?tr(n):n)))(+t)},r.domain=function(t){return arguments.length?(u=Ty.call(t,Cy),e()):u.slice()},r.range=function(t){return arguments.length?(c=Sy.call(t),e()):c.slice()},r.rangeRound=function(t){return c=Sy.call(t),s=ud,e()},r.clamp=function(t){return arguments.length?(l=!!t,e()):l},r.interpolate=function(t){return arguments.length?(s=t,e()):s},e()}function or(t){var n=t.domain;return t.ticks=function(t){var e=n();return Cl(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Ly(n(),t,e)},t.nice=function(r){var i=n(),o=i.length-1,a=null==r?10:r,u=i[0],c=i[o],s=e(u,c,a);return s&&(s=e(Math.floor(u/s)*s,Math.ceil(c/s)*s,a),i[0]=Math.floor(u/s)*s,i[o]=Math.ceil(c/s)*s,n(i)),t},t}function ar(){var t=ir(Qe,td);return t.copy=function(){return rr(t,ar())},or(t)}function ur(){function t(t){return+t}var n=[0,1];return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=Ty.call(e,Cy),t):n.slice()},t.copy=function(){return ur().domain(n)},or(t)}function cr(t,n){return(n=Math.log(n/t))?function(e){return Math.log(e/t)/n}:Ay(n)}function sr(t,n){return t<0?function(e){return-Math.pow(-n,e)*Math.pow(-t,1-e)}:function(e){return Math.pow(n,e)*Math.pow(t,1-e)}}function lr(t){return isFinite(t)?+("1e"+t):t<0?0:t}function fr(t){return 10===t?lr:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}function hr(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}function pr(t){return function(n){return-t(-n)}}function dr(){function n(){return o=hr(i),a=fr(i),r()[0]<0&&(o=pr(o),a=pr(a)),e}var e=ir(cr,sr).domain([1,10]),r=e.domain,i=10,o=hr(10),a=fr(10);return e.base=function(t){return arguments.length?(i=+t,n()):i},e.domain=function(t){return arguments.length?(r(t),n()):r()},e.ticks=function(t){var n,e=r(),u=e[0],c=e[e.length-1];(n=c<u)&&(h=u,u=c,c=h);var s,l,f,h=o(u),p=o(c),d=null==t?10:+t,v=[];if(!(i%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,u>0){for(;h<p;++h)for(l=1,s=a(h);l<i;++l)if(f=s*l,!(f<u)){if(f>c)break;v.push(f)}}else for(;h<p;++h)for(l=i-1,s=a(h);l>=1;--l)if(f=s*l,!(f<u)){if(f>c)break;v.push(f)}}else v=Cl(h,p,Math.min(p-h,d)).map(a);return n?v.reverse():v},e.tickFormat=function(n,r){if(null==r&&(r=10===i?".0e":","),"function"!=typeof r&&(r=t.format(r)),n===1/0)return r;null==n&&(n=10);var u=Math.max(1,i*n/e.ticks().length);return function(t){var n=t/a(Math.round(o(t)));return n*i<i-.5&&(n*=i),n<=u?r(t):""}},e.nice=function(){return r(Oy(r(),{floor:function(t){return a(Math.floor(o(t)))},ceil:function(t){return a(Math.ceil(o(t)))}}))},e.copy=function(){return rr(e,dr().base(i))},e}function vr(t,n){return t<0?-Math.pow(-t,n):Math.pow(t,n)}function yr(){function t(t,n){return(n=vr(n,e)-(t=vr(t,e)))?function(r){return(vr(r,e)-t)/n}:Ay(n)}function n(t,n){return n=vr(n,e)-(t=vr(t,e)),function(r){return vr(t+n*r,1/e)}}var e=1,r=ir(t,n),i=r.domain;return r.exponent=function(t){return arguments.length?(e=+t,i(i())):e},r.copy=function(){return rr(r,yr().exponent(e))},or(r)}function _r(){return yr().exponent(.5)}function gr(){function t(){var t=0,o=Math.max(1,r.length);for(i=new Array(o-1);++t<o;)i[t-1]=Ol(e,t/o);return n}function n(t){if(!isNaN(t=+t))return r[dl(i,t)]}var e=[],r=[],i=[];return n.invertExtent=function(t){var n=r.indexOf(t);return n<0?[NaN,NaN]:[n>0?i[n-1]:e[0],n<i.length?i[n]:e[e.length-1]]},n.domain=function(n){if(!arguments.length)return e.slice();e=[];for(var r,i=0,o=n.length;i<o;++i)r=n[i],null==r||isNaN(r=+r)||e.push(r);return e.sort(fl),t()},n.range=function(n){return arguments.length?(r=Sy.call(n),t()):r.slice()},n.quantiles=function(){return i.slice()},n.copy=function(){return gr().domain(e).range(r)},n}function mr(){function t(t){if(t<=t)return a[dl(o,t,0,i)]}function n(){var n=-1;for(o=new Array(i);++n<i;)o[n]=((n+1)*r-(n-i)*e)/(i+1);return t}var e=0,r=1,i=1,o=[.5],a=[0,1];return t.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n()):[e,r]},t.range=function(t){return arguments.length?(i=(a=Sy.call(t)).length-1,n()):a.slice()},t.invertExtent=function(t){var n=a.indexOf(t);return n<0?[NaN,NaN]:n<1?[e,o[0]]:n>=i?[o[i-1],r]:[o[n-1],o[n]]},t.copy=function(){return mr().domain([e,r]).range(a)},or(t)}function xr(){function t(t){if(t<=t)return e[dl(n,t,0,r)]}var n=[.5],e=[0,1],r=1;return t.domain=function(i){return arguments.length?(n=Sy.call(i),r=Math.min(n.length,e.length-1),t):n.slice()},t.range=function(i){return arguments.length?(e=Sy.call(i),r=Math.min(n.length,e.length-1),t):e.slice()},t.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},t.copy=function(){return xr().domain(n).range(e)},t}function br(t){return new Date(t)}function wr(t){return t instanceof Date?+t:+new Date(+t)}function Mr(t,n,r,i,o,a,u,c,s){function l(e){return(u(e)<e?v:a(e)<e?y:o(e)<e?_:i(e)<e?g:n(e)<e?r(e)<e?m:x:t(e)<e?b:w)(e)}function f(n,r,i,o){if(null==n&&(n=10),"number"==typeof n){var a=Math.abs(i-r)/n,u=hl(function(t){return t[2]}).right(M,a);u===M.length?(o=e(r/jy,i/jy,n),n=t):u?(u=M[a/M[u-1][2]<M[u][2]/a?u-1:u],o=u[1],n=u[0]):(o=e(r,i,n),n=c)}return null==o?n:n.every(o)}var h=ir(Qe,td),p=h.invert,d=h.domain,v=s(".%L"),y=s(":%S"),_=s("%I:%M"),g=s("%I %p"),m=s("%a %d"),x=s("%b %d"),b=s("%B"),w=s("%Y"),M=[[u,1,Ry],[u,5,5*Ry],[u,15,15*Ry],[u,30,30*Ry],[a,1,zy],[a,5,5*zy],[a,15,15*zy],[a,30,30*zy],[o,1,Iy],[o,3,3*Iy],[o,6,6*Iy],[o,12,12*Iy],[i,1,Dy],[i,2,2*Dy],[r,1,Uy],[n,1,qy],[n,3,3*qy],[t,1,jy]];return h.invert=function(t){return new Date(p(t))},h.domain=function(t){return arguments.length?d(Ty.call(t,wr)):d().map(br)},h.ticks=function(t,n){var e,r=d(),i=r[0],o=r[r.length-1],a=o<i;return a&&(e=i,i=o,o=e),e=f(t,i,o,n),e=e?e.range(i,o+1):[],a?e.reverse():e},h.tickFormat=function(t,n){return null==n?l:s(n)},h.nice=function(t,n){var e=d();return(t=f(t,e[0],e[e.length-1],n))?d(Oy(e,t)):h;
3},h.copy=function(){return rr(h,Mr(t,n,r,i,o,a,u,c,s))},h}function Er(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}function Nr(t){function n(n){var o=(n-e)/(r-e);return t(i?Math.max(0,Math.min(1,o)):o)}var e=0,r=1,i=!1;return n.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],n):[e,r]},n.clamp=function(t){return arguments.length?(i=!!t,n):i},n.interpolator=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Nr(t).domain([e,r]).clamp(i)},or(n)}function Tr(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===r_&&n.documentElement.namespaceURI===r_?n.createElement(t):n.createElementNS(e,t)}}function Sr(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kr(){return new Ar}function Ar(){this._="@"+(++u_).toString(36)}function Cr(t,n,e){return t=Pr(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Pr(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function Lr(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function Or(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function Rr(t,n,e){var r=h_.hasOwnProperty(t.type)?Cr:Pr;return function(i,o,a){var u,c=this.__on,s=r(n,o,a);if(c)for(var l=0,f=c.length;l<f;++l)if((u=c[l]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=s,u.capture=e),void(u.value=n);this.addEventListener(t.type,s,e),u={type:t.type,name:t.name,value:n,listener:s,capture:e},c?c.push(u):this.__on=[u]}}function zr(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}}function Ir(){}function Dr(){return[]}function Ur(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function qr(t,n,e,r,i,o){for(var a,u=0,c=n.length,s=o.length;u<s;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new Ur(t,o[u]);for(;u<c;++u)(a=n[u])&&(i[u]=a)}function jr(t,n,e,r,i,o,a){var u,c,s,l={},f=n.length,h=o.length,p=new Array(f);for(u=0;u<f;++u)(c=n[u])&&(p[u]=s=T_+a.call(c,c.__data__,u,n),s in l?i[u]=c:l[s]=c);for(u=0;u<h;++u)s=T_+a.call(t,o[u],u,o),(c=l[s])?(r[u]=c,c.__data__=o[u],l[s]=null):e[u]=new Ur(t,o[u]);for(u=0;u<f;++u)(c=n[u])&&l[p[u]]===c&&(i[u]=c)}function Fr(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function Yr(t){return function(){this.removeAttribute(t)}}function Br(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Xr(t,n){return function(){this.setAttribute(t,n)}}function $r(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Hr(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function Vr(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function Gr(t){return function(){this.style.removeProperty(t)}}function Wr(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Zr(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function Jr(t){return function(){delete this[t]}}function Qr(t,n){return function(){this[t]=n}}function Kr(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function ti(t){return t.trim().split(/^|\s+/)}function ni(t){return t.classList||new ei(t)}function ei(t){this._node=t,this._names=ti(t.getAttribute("class")||"")}function ri(t,n){for(var e=ni(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function ii(t,n){for(var e=ni(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function oi(t){return function(){ri(this,t)}}function ai(t){return function(){ii(this,t)}}function ui(t,n){return function(){(n.apply(this,arguments)?ri:ii)(this,t)}}function ci(){this.textContent=""}function si(t){return function(){this.textContent=t}}function li(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function fi(){this.innerHTML=""}function hi(t){return function(){this.innerHTML=t}}function pi(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function di(){this.nextSibling&&this.parentNode.appendChild(this)}function vi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function yi(){return null}function _i(){var t=this.parentNode;t&&t.removeChild(this)}function gi(t,n,e){var r=q_(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function mi(t,n){return function(){return gi(this,t,n)}}function xi(t,n){return function(){return gi(this,t,n.apply(this,arguments))}}function bi(t,n){this._groups=t,this._parents=n}function wi(){return new bi([[document.documentElement]],Q_)}function Mi(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>og)throw new Error("too late");return e}function Ei(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>ug)throw new Error("too late");return e}function Ni(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function Ti(t,n,e){function r(t){e.state=ag,e.timer.restart(i,e.delay,e.time),e.delay<=t&&i(t-e.delay)}function i(r){var s,l,f,h;if(e.state!==ag)return a();for(s in c)if(h=c[s],h.name===e.name){if(h.state===cg)return Gd(i);h.state===sg?(h.state=fg,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete c[s]):+s<n&&(h.state=fg,h.timer.stop(),delete c[s])}if(Gd(function(){e.state===cg&&(e.state=sg,e.timer.restart(o,e.delay,e.time),o(r))}),e.state=ug,e.on.call("start",t,t.__data__,e.index,e.group),e.state===ug){for(e.state=cg,u=new Array(f=e.tween.length),s=0,l=-1;s<f;++s)(h=e.tween[s].value.call(t,t.__data__,e.index,e.group))&&(u[++l]=h);u.length=l+1}}function o(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=lg,1),i=-1,o=u.length;++i<o;)u[i].call(null,r);e.state===lg&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){e.state=fg,e.timer.stop(),delete c[n];for(var r in c)return;delete t.__transition}var u,c=t.__transition;c[n]=e,e.timer=In(r,0,e.time)}function Si(t,n){var e,r;return function(){var i=Ei(this,t),o=i.tween;if(o!==e){r=e=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===n){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function ki(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=Ei(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},c=0,s=i.length;c<s;++c)if(i[c].name===n){i[c]=u;break}c===s&&i.push(u)}o.tween=i}}function Ai(t,n,e){var r=t._id;return t.each(function(){var t=Ei(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return Ni(t,r).value[n]}}function Ci(t){return function(){this.removeAttribute(t)}}function Pi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Li(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function Oi(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}function Ri(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttribute(t):(a=this.getAttribute(t),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function zi(t,n,e){var r,i,o;return function(){var a,u=e(this);return null==u?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),a===u?null:a===r&&u===i?o:o=n(r=a,i=u))}}function Ii(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}function Di(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function Ui(t,n){return function(){Mi(this,t).delay=+n.apply(this,arguments)}}function qi(t,n){return n=+n,function(){Mi(this,t).delay=n}}function ji(t,n){return function(){Ei(this,t).duration=+n.apply(this,arguments)}}function Fi(t,n){return n=+n,function(){Ei(this,t).duration=n}}function Yi(t,n){if("function"!=typeof n)throw new Error;return function(){Ei(this,t).ease=n}}function Bi(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function Xi(t,n,e){var r,i,o=Bi(n)?Mi:Ei;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}function $i(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function Hi(t,n){var e,r,i;return function(){var o=q_(this).getComputedStyle(this,null),a=o.getPropertyValue(t),u=(this.style.removeProperty(t),o.getPropertyValue(t));return a===u?null:a===e&&u===r?i:i=n(e=a,r=u)}}function Vi(t){return function(){this.style.removeProperty(t)}}function Gi(t,n,e){var r,i;return function(){var o=q_(this).getComputedStyle(this,null).getPropertyValue(t);return o===e?null:o===r?i:i=n(r=o,e)}}function Wi(t,n,e){var r,i,o;return function(){var a=q_(this).getComputedStyle(this,null),u=a.getPropertyValue(t),c=e(this);return null==c&&(this.style.removeProperty(t),c=a.getPropertyValue(t)),u===c?null:u===r&&c===i?o:o=n(r=u,i=c)}}function Zi(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function Ji(t){return function(){this.textContent=t}}function Qi(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function Ki(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function to(t){return wi().transition(t)}function no(){return++Rg}function eo(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Ig.time=On(),Ig;return e}function ro(t,n,e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}function io(t,n,e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}function oo(t){var n=t.bandwidth()/2;return t.round()&&(n=Math.round(n)),function(e){return t(e)+n}}function ao(){return!this.__axis}function uo(t,n){function e(e){var s,l=null==i?n.ticks?n.ticks.apply(n,r):n.domain():i,f=null==o?n.tickFormat?n.tickFormat.apply(n,r):Fg:o,h=Math.max(a,0)+c,p=t===Yg||t===Xg?ro:io,d=n.range(),v=d[0]+.5,y=d[d.length-1]+.5,_=(n.bandwidth?oo:Fg)(n.copy()),g=e.selection?e.selection():e,m=g.selectAll(".domain").data([null]),x=g.selectAll(".tick").data(l,n).order(),b=x.exit(),w=x.enter().append("g").attr("class","tick"),M=x.select("line"),E=x.select("text"),N=t===Yg||t===$g?-1:1,T=t===$g||t===Bg?(s="x","y"):(s="y","x");m=m.merge(m.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),x=x.merge(w),M=M.merge(w.append("line").attr("stroke","#000").attr(s+"2",N*a).attr(T+"1",.5).attr(T+"2",.5)),E=E.merge(w.append("text").attr("fill","#000").attr(s,N*h).attr(T,.5).attr("dy",t===Yg?"0em":t===Xg?"0.71em":"0.32em")),e!==g&&(m=m.transition(e),x=x.transition(e),M=M.transition(e),E=E.transition(e),b=b.transition(e).attr("opacity",Hg).attr("transform",function(t){return p(_,this.parentNode.__axis||_,t)}),w.attr("opacity",Hg).attr("transform",function(t){return p(this.parentNode.__axis||_,_,t)})),b.remove(),m.attr("d",t===$g||t==Bg?"M"+N*u+","+v+"H0.5V"+y+"H"+N*u:"M"+v+","+N*u+"V0.5H"+y+"V"+N*u),x.attr("opacity",1).attr("transform",function(t){return p(_,_,t)}),M.attr(s+"2",N*a),E.attr(s,N*h).text(f),g.filter(ao).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Bg?"start":t===$g?"end":"middle"),g.each(function(){this.__axis=_})}var r=[],i=null,o=null,a=6,u=6,c=3;return e.scale=function(t){return arguments.length?(n=t,e):n},e.ticks=function(){return r=jg.call(arguments),e},e.tickArguments=function(t){return arguments.length?(r=null==t?[]:jg.call(t),e):r.slice()},e.tickValues=function(t){return arguments.length?(i=null==t?null:jg.call(t),e):i&&i.slice()},e.tickFormat=function(t){return arguments.length?(o=t,e):o},e.tickSize=function(t){return arguments.length?(a=u=+t,e):a},e.tickSizeInner=function(t){return arguments.length?(a=+t,e):a},e.tickSizeOuter=function(t){return arguments.length?(u=+t,e):u},e.tickPadding=function(t){return arguments.length?(c=+t,e):c},e}function co(t){return uo(Yg,t)}function so(t){return uo(Bg,t)}function lo(t){return uo(Xg,t)}function fo(t){return uo($g,t)}function ho(t,n){return t.parent===n.parent?1:2}function po(t){return t.reduce(vo,0)/t.length}function vo(t,n){return t+n.x}function yo(t){return 1+t.reduce(_o,0)}function _o(t,n){return Math.max(t,n.y)}function go(t){for(var n;n=t.children;)t=n[0];return t}function mo(t){for(var n;n=t.children;)t=n[n.length-1];return t}function xo(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}function bo(t,n){var e,r,i,o,a,u=new To(t),c=+t.value&&(u.value=t.value),s=[u];for(null==n&&(n=Mo);e=s.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)s.push(r=e.children[o]=new To(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(No)}function wo(){return bo(this).eachBefore(Eo)}function Mo(t){return t.children}function Eo(t){t.data=t.data.data}function No(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function To(t){this.data=t,this.depth=this.height=0,this.parent=null}function So(t){this._=t,this.next=null}function ko(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r-n.r;return i*i+1e-6>e*e+r*r}function Ao(t,n){var e,r,i,o=null,a=t.head;switch(n.length){case 1:e=Co(n[0]);break;case 2:e=Po(n[0],n[1]);break;case 3:e=Lo(n[0],n[1],n[2])}for(;a;)i=a._,r=a.next,e&&ko(e,i)?o=a:(o?(t.tail=o,o.next=null):t.head=t.tail=null,n.push(i),e=Ao(t,n),n.pop(),t.head?(a.next=t.head,t.head=a):(a.next=null,t.head=t.tail=a),o=t.tail,o.next=r),a=r;return t.tail=o,e}function Co(t){return{x:t.x,y:t.y,r:t.r}}function Po(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,a=n.y,u=n.r,c=o-e,s=a-r,l=u-i,f=Math.sqrt(c*c+s*s);return{x:(e+o+c/f*l)/2,y:(r+a+s/f*l)/2,r:(f+i+u)/2}}function Lo(t,n,e){var r=t.x,i=t.y,o=t.r,a=n.x,u=n.y,c=n.r,s=e.x,l=e.y,f=e.r,h=2*(r-a),p=2*(i-u),d=2*(c-o),v=r*r+i*i-o*o-a*a-u*u+c*c,y=2*(r-s),_=2*(i-l),g=2*(f-o),m=r*r+i*i-o*o-s*s-l*l+f*f,x=y*p-h*_,b=(p*m-_*v)/x-r,w=(_*d-p*g)/x,M=(y*v-h*m)/x-i,E=(h*g-y*d)/x,N=w*w+E*E-1,T=2*(b*w+M*E+o),S=b*b+M*M-o*o,k=(-T-Math.sqrt(T*T-4*N*S))/(2*N);return{x:b+w*k+r,y:M+E*k+i,r:k}}function Oo(t,n,e){var r=t.x,i=t.y,o=n.r+e.r,a=t.r+e.r,u=n.x-r,c=n.y-i,s=u*u+c*c;if(s){var l=.5+((a*=a)-(o*=o))/(2*s),f=Math.sqrt(Math.max(0,2*o*(a+s)-(a-=s)*a-o*o))/(2*s);e.x=r+l*u+f*c,e.y=i+l*c-f*u}else e.x=r+a,e.y=i}function Ro(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i>e*e+r*r}function zo(t,n,e){var r=t.x-n,i=t.y-e;return r*r+i*i}function Io(t){this._=t,this.next=null,this.previous=null}function Do(t){if(!(i=t.length))return 0;var n,e,r,i;if(n=t[0],n.x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Oo(e,n,r=t[2]);var o,a,u,c,s,l,f,h=n.r*n.r,p=e.r*e.r,d=r.r*r.r,v=h+p+d,y=h*n.x+p*e.x+d*r.x,_=h*n.y+p*e.y+d*r.y;n=new Io(n),e=new Io(e),r=new Io(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(u=3;u<i;++u){if(Oo(n._,e._,r=t[u]),r=new Io(r),(s=n.previous)===(c=e.next)){if(Ro(c._,r._)){n=e,e=c,--u;continue t}}else{l=c._.r,f=s._.r;do if(l<=f){if(Ro(c._,r._)){e=c,n.next=e,e.previous=n,--u;continue t}c=c.next,l+=c._.r}else{if(Ro(s._,r._)){n=s,n.next=e,e.previous=n,--u;continue t}s=s.previous,f+=s._.r}while(c!==s.next)}for(r.previous=n,r.next=e,n.next=e.previous=e=r,v+=d=r._.r*r._.r,y+=d*r._.x,_+=d*r._.y,h=zo(n._,o=y/v,a=_/v);(r=r.next)!==e;)(d=zo(r._,o,a))<h&&(n=r,h=d);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=om(n),u=0;u<i;++u)n=t[u],n.x-=r.x,n.y-=r.y;return r.r}function Uo(t){return null==t?null:qo(t)}function qo(t){if("function"!=typeof t)throw new Error;return t}function jo(){return 0}function Fo(t){return Math.sqrt(t.value)}function Yo(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function Bo(t,n){return function(e){if(r=e.children){var r,i,o,a=r.length,u=t(e)*n||0;if(u)for(i=0;i<a;++i)r[i].r+=u;if(o=Do(r),u)for(i=0;i<a;++i)r[i].r-=u;e.r=o+u}}}function Xo(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function $o(t){return t.id}function Ho(t){return t.parentId}function Vo(t,n){return t.parent===n.parent?1:2}function Go(t){var n=t.children;return n?n[0]:t.t}function Wo(t){var n=t.children;return n?n[n.length-1]:t.t}function Zo(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function Jo(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)n=i[o],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function Qo(t,n,e){return t.a.parent===n.parent?t.a:e}function Ko(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function ta(t){for(var n,e,r,i,o,a=new Ko(t,0),u=[a];n=u.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)u.push(e=n.children[i]=new Ko(r[i],i)),e.parent=n;return(a.parent=new Ko(null,0)).children=[a],a}function na(t,n,e,r,i,o){for(var a,u,c,s,l,f,h,p,d,v,y,_=[],g=n.children,m=0,x=0,b=g.length,w=n.value;m<b;){c=i-e,s=o-r;do l=g[x++].value;while(!l&&x<b);for(f=h=l,v=Math.max(s/c,c/s)/(w*t),y=l*l*v,d=Math.max(h/y,y/f);x<b;++x){if(l+=u=g[x].value,u<f&&(f=u),u>h&&(h=u),y=l*l*v,p=Math.max(h/y,y/f),p>d){l-=u;break}d=p}_.push(a={value:l,dice:c<s,children:g.slice(m,x)}),a.dice?lm(a,e,r,i,w?r+=s*l/w:o):_m(a,e,r,w?e+=c*l/w:i,o),w-=l,m=x}return _}function ea(){t.event.stopImmediatePropagation()}function ra(t,n){var e=t.document.documentElement,r=K_(t).on("dragstart.drag",null);n&&(r.on("click.drag",Em,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function ia(t,n,e,r,i,o,a,u,c,s){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=a,this.dx=u,this.dy=c,this._=s}function oa(){return!t.event.button}function aa(){return this.parentNode}function ua(n){return null==n?{x:t.event.x,y:t.event.y}:n}function ca(t){return t[0]}function sa(t){return t[1]}function la(){this._=null}function fa(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function ha(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function pa(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function da(t){for(;t.L;)t=t.L;return t}function va(t,n,e,r){var i=[null,null],o=Om.push(i)-1;return i.left=t,i.right=n,e&&_a(i,t,n,e),r&&_a(i,n,t,r),Pm[t.index].halfedges.push(o),Pm[n.index].halfedges.push(o),i}function ya(t,n,e){var r=[n,e];return r.left=t,r}function _a(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function ga(t,n,e,r,i){var o,a=t[0],u=t[1],c=a[0],s=a[1],l=u[0],f=u[1],h=0,p=1,d=l-c,v=f-s;if(o=n-c,d||!(o>0)){if(o/=d,d<0){if(o<h)return;o<p&&(p=o)}else if(d>0){if(o>p)return;o>h&&(h=o)}if(o=r-c,d||!(o<0)){if(o/=d,d<0){if(o>p)return;o>h&&(h=o)}else if(d>0){if(o<h)return;o<p&&(p=o)}if(o=e-s,v||!(o>0)){if(o/=v,v<0){if(o<h)return;o<p&&(p=o)}else if(v>0){if(o>p)return;o>h&&(h=o)}if(o=i-s,v||!(o<0)){if(o/=v,v<0){if(o>p)return;o>h&&(h=o)}else if(v>0){if(o<h)return;o<p&&(p=o)}return!(h>0||p<1)||(h>0&&(t[0]=[c+h*d,s+h*v]),p<1&&(t[1]=[c+p*d,s+p*v]),!0)}}}}}function ma(t,n,e,r,i){var o=t[1];if(o)return!0;var a,u,c=t[0],s=t.left,l=t.right,f=s[0],h=s[1],p=l[0],d=l[1],v=(f+p)/2,y=(h+d)/2;if(d===h){if(v<n||v>=r)return;if(f>p){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]<e)return}else c=[v,i];o=[v,e]}}else if(a=(f-p)/(d-h),u=y-a*v,a<-1||a>1)if(f>p){if(c){if(c[1]>=i)return}else c=[(e-u)/a,e];o=[(i-u)/a,i]}else{if(c){if(c[1]<e)return}else c=[(i-u)/a,i];o=[(e-u)/a,e]}else if(h<d){if(c){if(c[0]>=r)return}else c=[n,a*n+u];o=[r,a*r+u]}else{if(c){if(c[0]<n)return}else c=[r,a*r+u];o=[n,a*n+u]}return t[0]=c,t[1]=o,!0}function xa(t,n,e,r){for(var i,o=Om.length;o--;)ma(i=Om[o],t,n,e,r)&&ga(i,t,n,e,r)&&(Math.abs(i[0][0]-i[1][0])>Im||Math.abs(i[0][1]-i[1][1])>Im)||delete Om[o]}function ba(t){return Pm[t.index]={site:t,halfedges:[]}}function wa(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Ma(t,n){return n[+(n.left!==t.site)]}function Ea(t,n){return n[+(n.left===t.site)]}function Na(){for(var t,n,e,r,i=0,o=Pm.length;i<o;++i)if((t=Pm[i])&&(r=(n=t.halfedges).length)){var a=new Array(r),u=new Array(r);for(e=0;e<r;++e)a[e]=e,u[e]=wa(t,Om[n[e]]);for(a.sort(function(t,n){return u[n]-u[t]}),e=0;e<r;++e)u[e]=n[a[e]];for(e=0;e<r;++e)n[e]=u[e]}}function Ta(t,n,e,r){var i,o,a,u,c,s,l,f,h,p,d,v,y=Pm.length,_=!0;for(i=0;i<y;++i)if(o=Pm[i]){for(a=o.site,c=o.halfedges,u=c.length;u--;)Om[c[u]]||c.splice(u,1);for(u=0,s=c.length;u<s;)p=Ea(o,Om[c[u]]),d=p[0],v=p[1],l=Ma(o,Om[c[++u%s]]),f=l[0],h=l[1],(Math.abs(d-f)>Im||Math.abs(v-h)>Im)&&(c.splice(u,0,Om.push(ya(a,p,Math.abs(d-t)<Im&&r-v>Im?[t,Math.abs(f-t)<Im?h:r]:Math.abs(v-r)<Im&&e-d>Im?[Math.abs(h-r)<Im?f:e,r]:Math.abs(d-e)<Im&&v-n>Im?[e,Math.abs(f-e)<Im?h:n]:Math.abs(v-n)<Im&&d-t>Im?[Math.abs(h-n)<Im?f:t,n]:null))-1),++s);s&&(_=!1)}if(_){var g,m,x,b=1/0;for(i=0,_=null;i<y;++i)(o=Pm[i])&&(a=o.site,g=a[0]-t,m=a[1]-n,x=g*g+m*m,x<b&&(b=x,_=o));if(_){var w=[t,n],M=[t,r],E=[e,r],N=[e,n];_.halfedges.push(Om.push(ya(a=_.site,w,M))-1,Om.push(ya(a,M,E))-1,Om.push(ya(a,E,N))-1,Om.push(ya(a,N,w))-1)}}for(i=0;i<y;++i)(o=Pm[i])&&(o.halfedges.length||delete Pm[i])}function Sa(){fa(this),this.x=this.y=this.arc=this.site=this.cy=null}function ka(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var a=i[0],u=i[1],c=r[0]-a,s=r[1]-u,l=o[0]-a,f=o[1]-u,h=2*(c*f-s*l);if(!(h>=-Dm)){var p=c*c+s*s,d=l*l+f*f,v=(f*p-s*d)/h,y=(c*d-l*p)/h,_=Rm.pop()||new Sa;_.arc=t,_.site=i,_.x=v+a,_.y=(_.cy=y+u)+Math.sqrt(v*v+y*y),t.circle=_;for(var g=null,m=Lm._;m;)if(_.y<m.y||_.y===m.y&&_.x<=m.x){if(!m.L){g=m.P;break}m=m.L}else{if(!m.R){g=m;break}m=m.R}Lm.insert(g,_),g||(Am=_)}}}}function Aa(t){var n=t.circle;n&&(n.P||(Am=n.N),Lm.remove(n),Rm.push(n),fa(n),t.circle=null)}function Ca(){fa(this),this.edge=this.site=this.circle=null}function Pa(t){var n=zm.pop()||new Ca;return n.site=t,n}function La(t){Aa(t),Cm.remove(t),zm.push(t),fa(t)}function Oa(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],o=t.P,a=t.N,u=[t];La(t);for(var c=o;c.circle&&Math.abs(e-c.circle.x)<Im&&Math.abs(r-c.circle.cy)<Im;)o=c.P,u.unshift(c),La(c),c=o;u.unshift(c),Aa(c);for(var s=a;s.circle&&Math.abs(e-s.circle.x)<Im&&Math.abs(r-s.circle.cy)<Im;)a=s.N,u.push(s),La(s),s=a;u.push(s),Aa(s);var l,f=u.length;for(l=1;l<f;++l)s=u[l],c=u[l-1],_a(s.edge,c.site,s.site,i);c=u[0],s=u[f-1],s.edge=va(c.site,s.site,null,i),ka(c),ka(s)}function Ra(t){for(var n,e,r,i,o=t[0],a=t[1],u=Cm._;u;)if(r=za(u,a)-o,r>Im)u=u.L;else{if(i=o-Ia(u,a),!(i>Im)){r>-Im?(n=u.P,e=u):i>-Im?(n=u,e=u.N):n=e=u;break}if(!u.R){n=u;break}u=u.R}ba(t);var c=Pa(t);if(Cm.insert(n,c),n||e){if(n===e)return Aa(n),e=Pa(n.site),Cm.insert(c,e),c.edge=e.edge=va(n.site,c.site),ka(n),void ka(e);if(!e)return void(c.edge=va(n.site,c.site));Aa(n),Aa(e);var s=n.site,l=s[0],f=s[1],h=t[0]-l,p=t[1]-f,d=e.site,v=d[0]-l,y=d[1]-f,_=2*(h*y-p*v),g=h*h+p*p,m=v*v+y*y,x=[(y*g-p*m)/_+l,(h*m-v*g)/_+f];_a(e.edge,s,d,x),c.edge=va(s,t,null,x),e.edge=va(t,d,null,x),ka(n),ka(e)}}function za(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var a=t.P;if(!a)return-(1/0);e=a.site;var u=e[0],c=e[1],s=c-n;if(!s)return u;var l=u-r,f=1/o-1/s,h=l/s;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*s)-c+s/2+i-o/2)))/f+r:(r+u)/2}function Ia(t,n){var e=t.N;if(e)return za(e,n);var r=t.site;return r[1]===n?r[0]:1/0}function Da(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function Ua(t,n){return n[1]-t[1]||n[0]-t[0]}function qa(t,n){var e,r,i,o=t.sort(Ua).pop();for(Om=[],Pm=new Array(t.length),Cm=new la,Lm=new la;;)if(i=Am,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===e&&o[1]===r||(Ra(o),e=o[0],r=o[1]),o=t.pop();else{if(!i)break;Oa(i.arc)}if(Na(),n){var a=+n[0][0],u=+n[0][1],c=+n[1][0],s=+n[1][1];xa(a,u,c,s),Ta(a,u,c,s)}this.edges=Om,this.cells=Pm,Cm=Lm=Om=Pm=null}function ja(t,n,e){this.target=t,this.type=n,this.transform=e}function Fa(t,n,e){this.k=t,this.x=n,this.y=e}function Ya(t){return t.__zoom||jm}function Ba(){t.event.stopImmediatePropagation()}function Xa(){return!t.event.button}function $a(){var t,n,e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,t=e.width.baseVal.value,n=e.height.baseVal.value):(t=e.clientWidth,n=e.clientHeight),[[0,0],[t,n]]}function Ha(){return this.__zoom||jm}function Va(){t.event.stopImmediatePropagation()}function Ga(t){return{type:t}}function Wa(){return!t.event.button}function Za(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ja(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Qa(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ka(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function tu(){return eu(Zm)}function nu(){return eu(Jm)}function eu(n){function e(t){var e=t.property("__brush",u).selectAll(".overlay").data([Ga("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Km.overlay).merge(e).each(function(){var t=Ja(this).extent;K_(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),t.selectAll(".selection").data([Ga("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Km.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=t.selectAll(".handle").data(n.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return Km[t.type]}),t.each(r).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",a)}function r(){var t=K_(this),n=Ja(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?n[1][0]-h/2:n[0][0]-h/2}).attr("y",function(t){return"s"===t.type[0]?n[1][1]-h/2:n[0][1]-h/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+h:h}).attr("height",function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+h:h})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function i(t,n){return t.__brush.emitter||new o(t,n)}function o(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function a(){function e(){var t=__(E);!I||w||M||(Math.abs(t[0]-U[0])>Math.abs(t[1]-U[1])?M=!0:w=!0),U=t,b=!0,$m(),o()}function o(){var t;switch(m=U[0]-D[0],x=U[1]-D[1],T){case Vm:case Hm:S&&(m=Math.max(L-f,Math.min(R-v,m)),h=f+m,y=v+m),k&&(x=Math.max(O-p,Math.min(z-_,x)),d=p+x,g=_+x);break;case Gm:S<0?(m=Math.max(L-f,Math.min(R-f,m)),h=f+m,y=v):S>0&&(m=Math.max(L-v,Math.min(R-v,m)),h=f,y=v+m),k<0?(x=Math.max(O-p,Math.min(z-p,x)),d=p+x,g=_):k>0&&(x=Math.max(O-_,Math.min(z-_,x)),d=p,g=_+x);break;case Wm:S&&(h=Math.max(L,Math.min(R,f-m*S)),y=Math.max(L,Math.min(R,v+m*S))),k&&(d=Math.max(O,Math.min(z,p-x*k)),g=Math.max(O,Math.min(z,_+x*k)))}y<h&&(S*=-1,t=f,f=v,v=t,t=h,h=y,y=t,N in tx&&F.attr("cursor",Km[N=tx[N]])),g<d&&(k*=-1,t=p,p=_,_=t,t=d,d=g,g=t,N in nx&&F.attr("cursor",Km[N=nx[N]])),A.selection&&(P=A.selection),w&&(h=P[0][0],y=P[1][0]),M&&(d=P[0][1],g=P[1][1]),P[0][0]===h&&P[0][1]===d&&P[1][0]===y&&P[1][1]===g||(A.selection=[[h,d],[y,g]],r.call(E),q.brush())}function a(){if(Va(),t.event.touches){if(t.event.touches.length)return;c&&clearTimeout(c),c=setTimeout(function(){c=null},500),j.on("touchmove.brush touchend.brush touchcancel.brush",null)}else ra(t.event.view,b),Y.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);j.attr("pointer-events","all"),F.attr("cursor",Km.overlay),A.selection&&(P=A.selection),Qa(P)&&(A.selection=null,r.call(E)),q.end()}function u(){switch(t.event.keyCode){case 16:I=S&&k;break;case 18:T===Gm&&(S&&(v=y-m*S,f=h+m*S),k&&(_=g-x*k,p=d+x*k),T=Wm,o());break;case 32:T!==Gm&&T!==Wm||(S<0?v=y-m:S>0&&(f=h-m),k<0?_=g-x:k>0&&(p=d-x),T=Vm,F.attr("cursor",Km.selection),o());break;default:return}$m()}function s(){switch(t.event.keyCode){case 16:I&&(w=M=I=!1,o());break;case 18:T===Wm&&(S<0?v=y:S>0&&(f=h),k<0?_=g:k>0&&(p=d),T=Gm,o());break;case 32:T===Vm&&(t.event.altKey?(S&&(v=y-m*S,f=h+m*S),k&&(_=g-x*k,p=d+x*k),T=Wm):(S<0?v=y:S>0&&(f=h),k<0?_=g:k>0&&(p=d),T=Gm),F.attr("cursor",Km[N]),o());break;default:return}$m()}if(t.event.touches){if(t.event.changedTouches.length<t.event.touches.length)return $m()}else if(c)return;if(l.apply(this,arguments)){var f,h,p,d,v,y,_,g,m,x,b,w,M,E=this,N=t.event.target.__data__.type,T="selection"===(t.event.metaKey?N="overlay":N)?Hm:t.event.altKey?Wm:Gm,S=n===Jm?null:ex[N],k=n===Zm?null:rx[N],A=Ja(E),C=A.extent,P=A.selection,L=C[0][0],O=C[0][1],R=C[1][0],z=C[1][1],I=S&&k&&t.event.shiftKey,D=__(E),U=D,q=i(E,arguments).beforestart();"overlay"===N?A.selection=P=[[f=n===Jm?L:D[0],p=n===Zm?O:D[1]],[v=n===Jm?R:f,_=n===Zm?z:p]]:(f=P[0][0],p=P[0][1],v=P[1][0],_=P[1][1]),h=f,d=p,y=v,g=_;var j=K_(E).attr("pointer-events","none"),F=j.selectAll(".overlay").attr("cursor",Km[N]);if(t.event.touches)j.on("touchmove.brush",e,!0).on("touchend.brush touchcancel.brush",a,!0);else{var Y=K_(t.event.view).on("keydown.brush",u,!0).on("keyup.brush",s,!0).on("mousemove.brush",e,!0).on("mouseup.brush",a,!0);Nm(t.event.view)}Va(),pg(E),r.call(E),q.start()}}function u(){var t=this.__brush||{selection:null};return t.extent=s.apply(this,arguments),t.dim=n,t}var c,s=Za,l=Wa,f=Nn(e,"start","brush","end"),h=6;return e.move=function(t,e){t.selection?t.on("start.brush",function(){i(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){i(this,arguments).end()}).tween("brush",function(){function t(t){a.selection=1===t&&Qa(s)?null:l(t),r.call(o),u.brush()}var o=this,a=o.__brush,u=i(o,arguments),c=a.selection,s=n.input("function"==typeof e?e.apply(this,arguments):e,a.extent),l=ad(c,s);return c&&s?t:t(1)}):t.each(function(){var t=this,o=arguments,a=t.__brush,u=n.input("function"==typeof e?e.apply(t,o):e,a.extent),c=i(t,o).beforestart();pg(t),a.selection=null==u||Qa(u)?null:u,r.call(t),c.start().brush().end()})},o.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0===--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){zr(new Xm(e,t,n.output(this.state.selection)),f.apply,f,[t,this.that,this.args])}},e.extent=function(t){return arguments.length?(s="function"==typeof t?t:Bm([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),e):s},e.filter=function(t){return arguments.length?(l="function"==typeof t?t:Bm(!!t),e):l},e.handleSize=function(t){return arguments.length?(h=+t,e):h},e.on=function(){var t=f.on.apply(f,arguments);return t===f?e:t},e}function ru(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}function iu(t){return t.source}function ou(t){return t.target}function au(t){return t.radius}function uu(t){return t.startAngle}function cu(t){return t.endAngle}function su(){this.reset();
4}function lu(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}function fu(t){return t>1?0:t<-1?Zx:Math.acos(t)}function hu(t){return t>1?Jx:t<-1?-Jx:Math.asin(t)}function pu(t){return(t=lb(t/2))*t}function du(){}function vu(t,n){t&&vb.hasOwnProperty(t.type)&&vb[t.type](t,n)}function yu(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function _u(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)yu(t[e],n,1);n.polygonEnd()}function gu(){mb.point=xu}function mu(){bu(yx,_x)}function xu(t,n){mb.point=bu,yx=t,_x=n,t*=nb,n*=nb,gx=t,mx=ob(n=n/2+Qx),xx=lb(n)}function bu(t,n){t*=nb,n*=nb,n=n/2+Qx;var e=t-gx,r=e>=0?1:-1,i=r*e,o=ob(n),a=lb(n),u=xx*a,c=mx*o+u*ob(i),s=u*r*lb(i);_b.add(ib(s,c)),gx=t,mx=o,xx=a}function wu(t){return[ib(t[1],t[0]),hu(t[2])]}function Mu(t){var n=t[0],e=t[1],r=ob(e);return[r*ob(n),r*lb(n),lb(e)]}function Eu(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Nu(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 Tu(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Su(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function ku(t){var n=hb(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Au(t,n){Ax.push(Cx=[bx=t,Mx=t]),n<wx&&(wx=n),n>Ex&&(Ex=n)}function Cu(t,n){var e=Mu([t*nb,n*nb]);if(kx){var r=Nu(kx,e),i=[r[1],-r[0],0],o=Nu(i,r);ku(o),o=wu(o);var a,u=t-Nx,c=u>0?1:-1,s=o[0]*tb*c,l=eb(u)>180;l^(c*Nx<s&&s<c*t)?(a=o[1]*tb,a>Ex&&(Ex=a)):(s=(s+360)%360-180,l^(c*Nx<s&&s<c*t)?(a=-o[1]*tb,a<wx&&(wx=a)):(n<wx&&(wx=n),n>Ex&&(Ex=n))),l?t<Nx?Iu(bx,t)>Iu(bx,Mx)&&(Mx=t):Iu(t,Mx)>Iu(bx,Mx)&&(bx=t):Mx>=bx?(t<bx&&(bx=t),t>Mx&&(Mx=t)):t>Nx?Iu(bx,t)>Iu(bx,Mx)&&(Mx=t):Iu(t,Mx)>Iu(bx,Mx)&&(bx=t)}else Au(t,n);kx=e,Nx=t}function Pu(){wb.point=Cu}function Lu(){Cx[0]=bx,Cx[1]=Mx,wb.point=Au,kx=null}function Ou(t,n){if(kx){var e=t-Nx;bb.add(eb(e)>180?e+(e>0?360:-360):e)}else Tx=t,Sx=n;mb.point(t,n),Cu(t,n)}function Ru(){mb.lineStart()}function zu(){Ou(Tx,Sx),mb.lineEnd(),eb(bb)>Gx&&(bx=-(Mx=180)),Cx[0]=bx,Cx[1]=Mx,kx=null}function Iu(t,n){return(n-=t)<0?n+360:n}function Du(t,n){return t[0]-n[0]}function Uu(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}function qu(t,n){t*=nb,n*=nb;var e=ob(n);ju(e*ob(t),e*lb(t),lb(n))}function ju(t,n,e){++Px,Ox+=(t-Ox)/Px,Rx+=(n-Rx)/Px,zx+=(e-zx)/Px}function Fu(){Eb.point=Yu}function Yu(t,n){t*=nb,n*=nb;var e=ob(n);Xx=e*ob(t),$x=e*lb(t),Hx=lb(n),Eb.point=Bu,ju(Xx,$x,Hx)}function Bu(t,n){t*=nb,n*=nb;var e=ob(n),r=e*ob(t),i=e*lb(t),o=lb(n),a=ib(hb((a=$x*o-Hx*i)*a+(a=Hx*r-Xx*o)*a+(a=Xx*i-$x*r)*a),Xx*r+$x*i+Hx*o);Lx+=a,Ix+=a*(Xx+(Xx=r)),Dx+=a*($x+($x=i)),Ux+=a*(Hx+(Hx=o)),ju(Xx,$x,Hx)}function Xu(){Eb.point=qu}function $u(){Eb.point=Vu}function Hu(){Gu(Yx,Bx),Eb.point=qu}function Vu(t,n){Yx=t,Bx=n,t*=nb,n*=nb,Eb.point=Gu;var e=ob(n);Xx=e*ob(t),$x=e*lb(t),Hx=lb(n),ju(Xx,$x,Hx)}function Gu(t,n){t*=nb,n*=nb;var e=ob(n),r=e*ob(t),i=e*lb(t),o=lb(n),a=$x*o-Hx*i,u=Hx*r-Xx*o,c=Xx*i-$x*r,s=hb(a*a+u*u+c*c),l=Xx*r+$x*i+Hx*o,f=s&&-fu(l)/s,h=ib(s,l);qx+=f*a,jx+=f*u,Fx+=f*c,Lx+=h,Ix+=h*(Xx+(Xx=r)),Dx+=h*($x+($x=i)),Ux+=h*(Hx+(Hx=o)),ju(Xx,$x,Hx)}function Wu(t,n){return[t>Zx?t-Kx:t<-Zx?t+Kx:t,n]}function Zu(t,n,e){return(t%=Kx)?n||e?Sb(Qu(t),Ku(n,e)):Qu(t):n||e?Ku(n,e):Wu}function Ju(t){return function(n,e){return n+=t,[n>Zx?n-Kx:n<-Zx?n+Kx:n,e]}}function Qu(t){var n=Ju(t);return n.invert=Ju(-t),n}function Ku(t,n){function e(t,n){var e=ob(n),u=ob(t)*e,c=lb(t)*e,s=lb(n),l=s*r+u*i;return[ib(c*o-l*a,u*r-s*i),hu(l*o+c*a)]}var r=ob(t),i=lb(t),o=ob(n),a=lb(n);return e.invert=function(t,n){var e=ob(n),u=ob(t)*e,c=lb(t)*e,s=lb(n),l=s*o-c*a;return[ib(c*o+s*a,u*r+l*i),hu(l*r-u*i)]},e}function tc(t,n,e,r,i,o){if(e){var a=ob(n),u=lb(n),c=r*e;null==i?(i=n+r*Kx,o=n-c/2):(i=nc(a,i),o=nc(a,o),(r>0?i<o:i>o)&&(i+=r*Kx));for(var s,l=i;r>0?l>o:l<o;l-=c)s=wu([a,-u*ob(l),-u*lb(l)]),t.point(s[0],s[1])}}function nc(t,n){n=Mu(n),n[0]-=t,ku(n);var e=fu(-n[1]);return((-n[2]<0?-e:e)+Kx-Gx)%Kx}function ec(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function rc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}function ic(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,u,s){var l=0,f=0;if(null==i||(l=a(i,u))!==(f=a(o,u))||c(i,o)<0^u>0){do s.point(0===l||3===l?t:e,l>1?r:n);while((l=(l+u+4)%4)!==f)}else s.point(o[0],o[1])}function a(r,i){return eb(r[0]-t)<Gx?i>0?0:3:eb(r[0]-e)<Gx?i>0?2:1:eb(r[1]-n)<Gx?i>0?1:0:i>0?3:2}function u(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(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(a){function c(t,n){i(t,n)&&T.point(t,n)}function s(){for(var n=0,e=0,i=y.length;e<i;++e)for(var o,a,u=y[e],c=1,s=u.length,l=u[0],f=l[0],h=l[1];c<s;++c)o=f,a=h,l=u[c],f=l[0],h=l[1],a<=r?h>r&&(f-o)*(r-a)>(h-a)*(t-o)&&++n:h<=r&&(f-o)*(r-a)<(h-a)*(t-o)&&--n;return n}function l(){T=S,v=[],y=[],N=!0}function f(){var t=s(),n=N&&t,e=(v=ql(v)).length;(n||e)&&(a.polygonStart(),n&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),e&&Xb(v,u,t,o,a),a.polygonEnd()),T=a,v=y=_=null}function h(){k.point=d,y&&y.push(_=[]),E=!0,M=!1,b=w=NaN}function p(){v&&(d(g,m),x&&M&&S.rejoin(),v.push(S.result())),k.point=c,M&&T.lineEnd()}function d(o,a){var u=i(o,a);if(y&&_.push([o,a]),E)g=o,m=a,x=u,E=!1,u&&(T.lineStart(),T.point(o,a));else if(u&&M)T.point(o,a);else{var c=[b=Math.max(Hb,Math.min($b,b)),w=Math.max(Hb,Math.min($b,w))],s=[o=Math.max(Hb,Math.min($b,o)),a=Math.max(Hb,Math.min($b,a))];Yb(c,s,t,n,e,r)?(M||(T.lineStart(),T.point(c[0],c[1])),T.point(s[0],s[1]),u||T.lineEnd(),N=!1):u&&(T.lineStart(),T.point(o,a),N=!1)}b=o,w=a,M=u}var v,y,_,g,m,x,b,w,M,E,N,T=a,S=Fb(),k={point:c,lineStart:h,lineEnd:p,polygonStart:l,polygonEnd:f};return k}}function oc(){Wb.point=uc,Wb.lineEnd=ac}function ac(){Wb.point=Wb.lineEnd=du}function uc(t,n){t*=nb,n*=nb,kb=t,Ab=lb(n),Cb=ob(n),Wb.point=cc}function cc(t,n){t*=nb,n*=nb;var e=lb(n),r=ob(n),i=eb(t-kb),o=ob(i),a=lb(i),u=r*a,c=Cb*e-Ab*r*o,s=Ab*e+Cb*r*o;Gb.add(ib(hb(u*u+c*c),s)),kb=t,Ab=e,Cb=r}function sc(t,n,e){var r=Tl(t,n-Gx,e).concat(n);return function(t){return r.map(function(n){return[t,n]})}}function lc(t,n,e){var r=Tl(t,n-Gx,e).concat(n);return function(t){return r.map(function(n){return[n,t]})}}function fc(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return Tl(ab(o/y)*y,i,y).map(h).concat(Tl(ab(s/_)*_,c,_).map(p)).concat(Tl(ab(r/d)*d,e,d).filter(function(t){return eb(t%y)>Gx}).map(l)).concat(Tl(ab(u/v)*v,a,v).filter(function(t){return eb(t%_)>Gx}).map(f))}var e,r,i,o,a,u,c,s,l,f,h,p,d=10,v=d,y=90,_=360,g=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(c).slice(1),h(i).reverse().slice(1),p(s).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.extentMajor(n).extentMinor(n):t.extentMinor()},t.extentMajor=function(n){return arguments.length?(o=+n[0][0],i=+n[1][0],s=+n[0][1],c=+n[1][1],o>i&&(n=o,o=i,i=n),s>c&&(n=s,s=c,c=n),t.precision(g)):[[o,s],[i,c]]},t.extentMinor=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],u=+n[0][1],a=+n[1][1],r>e&&(n=r,r=e,e=n),u>a&&(n=u,u=a,a=n),t.precision(g)):[[r,u],[e,a]]},t.step=function(n){return arguments.length?t.stepMajor(n).stepMinor(n):t.stepMinor()},t.stepMajor=function(n){return arguments.length?(y=+n[0],_=+n[1],t):[y,_]},t.stepMinor=function(n){return arguments.length?(d=+n[0],v=+n[1],t):[d,v]},t.precision=function(n){return arguments.length?(g=+n,l=sc(u,a,90),f=lc(r,e,g),h=sc(s,c,90),p=lc(o,i,g),t):g},t.extentMajor([[-180,-90+Gx],[180,90-Gx]]).extentMinor([[-180,-80-Gx],[180,80+Gx]])}function hc(){return fc()()}function pc(){iw.point=dc}function dc(t,n){iw.point=vc,Pb=Ob=t,Lb=Rb=n}function vc(t,n){rw.add(Rb*t-Ob*n),Ob=t,Rb=n}function yc(){vc(Pb,Lb)}function _c(t,n){t<ow&&(ow=t),t>uw&&(uw=t),n<aw&&(aw=n),n>cw&&(cw=n)}function gc(t,n){lw+=t,fw+=n,++hw}function mc(){mw.point=xc}function xc(t,n){mw.point=bc,gc(Db=t,Ub=n)}function bc(t,n){var e=t-Db,r=n-Ub,i=hb(e*e+r*r);pw+=i*(Db+t)/2,dw+=i*(Ub+n)/2,vw+=i,gc(Db=t,Ub=n)}function wc(){mw.point=gc}function Mc(){mw.point=Nc}function Ec(){Tc(zb,Ib)}function Nc(t,n){mw.point=Tc,gc(zb=Db=t,Ib=Ub=n)}function Tc(t,n){var e=t-Db,r=n-Ub,i=hb(e*e+r*r);pw+=i*(Db+t)/2,dw+=i*(Ub+n)/2,vw+=i,i=Ub*t-Db*n,yw+=i*(Db+t),_w+=i*(Ub+n),gw+=3*i,gc(Db=t,Ub=n)}function Sc(t){this._context=t}function kc(){this._string=[]}function Ac(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function Cc(t){return t.length>1}function Pc(t,n){return((t=t.x)[0]<0?t[1]-Jx-Gx:Jx-t[1])-((n=n.x)[0]<0?n[1]-Jx-Gx:Jx-n[1])}function Lc(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,a){var u=o>0?Zx:-Zx,c=eb(o-e);eb(c-Zx)<Gx?(t.point(e,r=(r+a)/2>0?Jx:-Jx),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),t.point(o,r),n=0):i!==u&&c>=Zx&&(eb(e-i)<Gx&&(e-=i*Gx),eb(o-u)<Gx&&(o-=u*Gx),r=Oc(e,r,o,a),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(u,r),n=0),t.point(e=o,r=a),i=u},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}function Oc(t,n,e,r){var i,o,a=lb(t-e);return eb(a)>Gx?rb((lb(n)*(o=ob(r))*lb(e)-lb(r)*(i=ob(n))*lb(t))/(i*o*a)):(n+r)/2}function Rc(t,n,e,r){var i;if(null==t)i=e*Jx,r.point(-Zx,i),r.point(0,i),r.point(Zx,i),r.point(Zx,0),r.point(Zx,-i),r.point(0,-i),r.point(-Zx,-i),r.point(-Zx,0),r.point(-Zx,i);else if(eb(t[0]-n[0])>Gx){var o=t[0]<n[0]?Zx:-Zx;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}function zc(t){return function(n){var e=new Ic;for(var r in t)e[r]=t[r];return e.stream=n,e}}function Ic(){}function Dc(t,n,e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=t.clipExtent&&t.clipExtent();t.scale(150).translate([0,0]),null!=o&&t.clipExtent(null),yb(e,t.stream(sw));var a=sw.result(),u=Math.min(r/(a[1][0]-a[0][0]),i/(a[1][1]-a[0][1])),c=+n[0][0]+(r-u*(a[1][0]+a[0][0]))/2,s=+n[0][1]+(i-u*(a[1][1]+a[0][1]))/2;return null!=o&&t.clipExtent(o),t.scale(150*u).translate([c,s])}function Uc(t,n,e){return Dc(t,[[0,0],n],e)}function qc(t){return zc({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}function jc(t,n){function e(r,i,o,a,u,c,s,l,f,h,p,d,v,y){var _=s-r,g=l-i,m=_*_+g*g;if(m>4*n&&v--){var x=a+h,b=u+p,w=c+d,M=hb(x*x+b*b+w*w),E=hu(w/=M),N=eb(eb(w)-1)<Gx||eb(o-f)<Gx?(o+f)/2:ib(b,x),T=t(N,E),S=T[0],k=T[1],A=S-r,C=k-i,P=g*A-_*C;(P*P/m>n||eb((_*A+g*C)/m-.5)>.3||a*h+u*p+c*d<kw)&&(e(r,i,o,a,u,c,S,k,N,x/=M,b/=M,w,v,y),y.point(S,k),e(S,k,N,x,b,w,s,l,f,h,p,d,v,y))}}return function(n){function r(e,r){e=t(e,r),n.point(e[0],e[1])}function i(){_=NaN,w.point=o,n.lineStart()}function o(r,i){var o=Mu([r,i]),a=t(r,i);e(_,g,y,m,x,b,_=a[0],g=a[1],y=r,m=o[0],x=o[1],b=o[2],Sw,n),n.point(_,g)}function a(){w.point=r,n.lineEnd()}function u(){i(),w.point=c,w.lineEnd=s}function c(t,n){o(l=t,n),f=_,h=g,p=m,d=x,v=b,w.point=o}function s(){e(_,g,y,m,x,b,f,h,l,p,d,v,Sw,n),w.lineEnd=a,a()}var l,f,h,p,d,v,y,_,g,m,x,b,w={point:r,lineStart:i,lineEnd:a,polygonStart:function(){n.polygonStart(),w.lineStart=u},polygonEnd:function(){n.polygonEnd(),w.lineStart=i}};return w}}function Fc(t){return Yc(function(){return t})()}function Yc(t){function n(t){return t=l(t[0]*nb,t[1]*nb),[t[0]*y+u,c-t[1]*y]}function e(t){return t=l.invert((t[0]-u)/y,(c-t[1])/y),t&&[t[0]*tb,t[1]*tb]}function r(t,n){return t=a(t,n),[t[0]*y+u,c-t[1]*y]}function i(){l=Sb(s=Zu(b,w,M),a);var t=a(m,x);return u=_-t[0]*y,c=g+t[1]*y,o()}function o(){return d=v=null,n}var a,u,c,s,l,f,h,p,d,v,y=150,_=480,g=250,m=0,x=0,b=0,w=0,M=0,E=null,N=Ew,T=null,S=nw,k=.5,A=Aw(r,k);return n.stream=function(t){return d&&v===t?d:d=Cw(N(s,A(S(v=t))))},n.clipAngle=function(t){return arguments.length?(N=+t?Nw(E=t*nb,6*nb):(E=null,Ew),o()):E*tb},n.clipExtent=function(t){return arguments.length?(S=null==t?(T=f=h=p=null,nw):ic(T=+t[0][0],f=+t[0][1],h=+t[1][0],p=+t[1][1]),o()):null==T?null:[[T,f],[h,p]]},n.scale=function(t){return arguments.length?(y=+t,i()):y},n.translate=function(t){return arguments.length?(_=+t[0],g=+t[1],i()):[_,g]},n.center=function(t){return arguments.length?(m=t[0]%360*nb,x=t[1]%360*nb,i()):[m*tb,x*tb]},n.rotate=function(t){return arguments.length?(b=t[0]%360*nb,w=t[1]%360*nb,M=t.length>2?t[2]%360*nb:0,i()):[b*tb,w*tb,M*tb]},n.precision=function(t){return arguments.length?(A=Aw(r,k=t*t),o()):hb(k)},n.fitExtent=function(t,e){return Dc(n,t,e)},n.fitSize=function(t,e){return Uc(n,t,e)},function(){return a=t.apply(this,arguments),n.invert=a.invert&&e,i()}}function Bc(t){var n=0,e=Zx/3,r=Yc(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*nb,e=t[1]*nb):[n*tb,e*tb]},i}function Xc(t){function n(t,n){return[t*e,lb(n)/e]}var e=ob(t);return n.invert=function(t,n){return[t/e,hu(n*e)]},n}function $c(t,n){function e(t,n){var e=hb(o-2*i*lb(n))/i;return[e*lb(t*=i),a-e*ob(t)]}var r=lb(t),i=(r+lb(n))/2;if(eb(i)<Gx)return Xc(t);var o=1+r*(2*i-r),a=hb(o)/i;return e.invert=function(t,n){var e=a-n;return[ib(t,eb(e))/i*fb(e),hu((o-(t*t+e*e)*i*i)/(2*i))]},e}function Hc(t){var n=t.length;return{point:function(e,r){for(var i=-1;++i<n;)t[i].point(e,r)},sphere:function(){for(var e=-1;++e<n;)t[e].sphere()},lineStart:function(){for(var e=-1;++e<n;)t[e].lineStart()},lineEnd:function(){for(var e=-1;++e<n;)t[e].lineEnd()},polygonStart:function(){for(var e=-1;++e<n;)t[e].polygonStart()},polygonEnd:function(){for(var e=-1;++e<n;)t[e].polygonEnd()}}}function Vc(t){return function(n,e){var r=ob(n),i=ob(e),o=t(r*i);return[o*i*lb(n),o*lb(e)]}}function Gc(t){return function(n,e){var r=hb(n*n+e*e),i=t(r),o=lb(i),a=ob(i);return[ib(n*o,r*a),hu(r&&e*o/r)]}}function Wc(t,n){return[t,cb(pb((Jx+n)/2))]}function Zc(t){var n,e=Fc(t),r=e.scale,i=e.translate,o=e.clipExtent;return e.scale=function(t){return arguments.length?(r(t),n&&e.clipExtent(null),e):r()},e.translate=function(t){return arguments.length?(i(t),n&&e.clipExtent(null),e):i()},e.clipExtent=function(t){if(!arguments.length)return n?null:o();if(n=null==t){var a=Zx*r(),u=i();t=[[u[0]-a,u[1]-a],[u[0]+a,u[1]+a]]}return o(t),e},e.clipExtent(null)}function Jc(t){return pb((Jx+t)/2)}function Qc(t,n){function e(t,n){o>0?n<-Jx+Gx&&(n=-Jx+Gx):n>Jx-Gx&&(n=Jx-Gx);var e=o/sb(Jc(n),i);return[e*lb(i*t),o-e*ob(i*t)]}var r=ob(t),i=t===n?lb(t):cb(r/ob(n))/cb(Jc(n)/Jc(t)),o=r*sb(Jc(t),i)/i;return i?(e.invert=function(t,n){var e=o-n,r=fb(i)*hb(t*t+e*e);return[ib(t,eb(e))/i*fb(e),2*rb(sb(o/r,1/i))-Jx]},e):Wc}function Kc(t,n){return[t,n]}function ts(t,n){function e(t,n){var e=o-n,r=i*t;return[e*lb(r),o-e*ob(r)]}var r=ob(t),i=t===n?lb(t):(r-ob(n))/(n-t),o=r/i+t;return eb(i)<Gx?Kc:(e.invert=function(t,n){var e=o-n;return[ib(t,eb(e))/i*fb(e),o-fb(i)*hb(t*t+e*e)]},e)}function ns(t,n){var e=ob(n),r=ob(t)*e;return[e*lb(t)/r,lb(n)/r]}function es(t,n,e,r){return 1===t&&1===n&&0===e&&0===r?nw:zc({point:function(i,o){this.stream.point(i*t+e,o*n+r)}})}function rs(t,n){return[ob(n)*lb(t),lb(n)]}function is(t,n){var e=ob(n),r=1+ob(t)*e;return[e*lb(t)/r,lb(n)/r]}function os(t,n){return[cb(pb((Jx+n)/2)),-t]}function as(t){if(null===t||void 0===t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function us(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var n={},e=0;e<10;e++)n["_"+String.fromCharCode(e)]=e;var r=Object.getOwnPropertyNames(n).map(function(t){return n[t]});if("0123456789"!==r.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(t){i[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch(t){return!1}}function cs(){return us()?Object.assign:function(t){for(var n,e,r=as(t),i=1;i<arguments.length;i++){n=Object(arguments[i]);for(var o in n)Zw.call(n,o)&&(r[o]=n[o]);if(Object.getOwnPropertySymbols){e=Object.getOwnPropertySymbols(n);for(var a=0;a<e.length;a++)Jw.call(n,e[a])&&(r[e[a]]=n[e[a]])}}return r}}function ss(t){return"[object Object]"===Vw.call(t)}function ls(t){return"[object String]"===Vw.call(t)}function fs(t){return"[object Function]"===Vw.call(t)}function hs(t){return"[object Array]"===Vw.call(t)}function ps(t){return"[object Promise]"===Vw.call(t)}function ds(){this._array=[]}function vs(t,n){var e=new ds;if(t instanceof ds)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var a in t)e.set(a,t[a]);return e}function ys(t,n){switch(n.type){case nM.IDENTIFIER:return t[n.name];case nM.LITERAL:return n.value;case nM.ARRAY_EXP:return n.elements.map(function(n){return ys(t,n)});case nM.LOGICAL_EXP:case nM.BINARY_EXP:return xs(n.operator,ys(t,n.left),ys(t,n.right));case nM.CALL_EXP:return gs(t,n.callee,n.arguments);case nM.MEMBER_EXP:return ys(ys(t,n.object),n.property);case nM.CONDITIONAL_EXP:return ys(t,n.test)?ys(t,n.consequent):ys(t,n.alternate);case nM.UNARY_EXP:return ms(n.operator,ys(t,n.argument))}}function _s(t,n){switch(1===arguments.length&&(n=f()),t.type){case nM.IDENTIFIER:n.add(t.name);break;case nM.ARRAY_EXP:t.elements.forEach(function(t){_s(t,n)});break;case nM.BINARY_EXP:_s(t.left,n),_s(t.right,n);break;case nM.CALL_EXP:_s(t.arguments,n);break;case nM.MEMBER_EXP:_s(t.object,n);break;case nM.CONDITIONAL_EXP:_s(t.test,n),_s(t.consequent,n),ys(t.alternate,n)}return n}function gs(t,n,e){var r;return e=e.map(function(n){return ys(t,n)}),n.type!==nM.IDENTIFIER&&(t=ys(t,n.object),n=n.property),r=t[n.name],r.apply(t,e)}function ms(t,n){return kM[t]||(kM[t]=new Function("arg","return "+t+" arg")),kM[t](n)}function xs(t,n,e){return AM[t]||(AM[t]=new Function("a","b","return a "+t+" b")),AM[t](n,e)}function bs(){if(Gw)return window.fetch}function ws(t){this.codes=nM,this.expr=t,this.parsed=SM(t)}function Ms(t){return arguments.length?this.property("__model__",t):this.node().__model__}function Es(t,n){for(;!(n in t)&&t.$parent;)t=t.$parent;return t}function Ns(t,n,e){function r(n){a&&(n=a.get.call(t)),n!==e&&(c(e),e=n)}function i(){var i={get:function(){return e}};return fs(e)&&(e={get:e}),ss(e)&&fs(e.get)?(a=e,e=a.get.call(t),a.reactOn?a.reactOn.forEach(function(e){t.$on(e+"."+n,r)}):t.$on("."+n,r),fs(a.set)&&(i.set=a.set)):i.set=r,i}var o,a,u=t.$events;u.set(n,Nn("change")),Object.defineProperty(t,n,i());var c=YM(function(){o=arguments[0],u.get(n).call("change",t,e,o),a||u.get("").call("change",t,n)});c()}function Ts(t,n){var e=t.$events.get(n);return!e&&t.parent?Ts(t.parent,n):e}function Ss(t){function n(t){jM(this,t)}return n.prototype=t,n}function ks(t,n){return!this.$events.has(t)&&this.$parent?ks.call(this.$parent,t,n):void this.$set(t,n)}function As(t){jM(this,t)}function Cs(t){return new As(t)}function Ps(t){var n=this,e=Cs(t);return Object.defineProperty(e,"parent",{get:function(){return n}}),e}function Ls(t){return arguments.length?this.property("__directives__",t):this.node().__directives__}function Os(){this.attrs={},this._dirs={},this._all=[]}function Rs(t,n){var e=K_(n),r=e.directives();r||(r=WM(n,t.$vm?t.$vm.directives:null),t=VM(r,null,t));var i=r.pop("for");return i?(i.execute(t),!0):(e.model()||e.model(t),void zs(e,r))}function zs(t,n){var e=t.model(),r=e.$vm;t.selectAll(function(){return this.children}).each(function(){var t=r?r.components.get(this.tagName.toLowerCase()):null;if(t)t({parent:r}).mount(this);else{Rs(e,this);var n=K_(this);n.model()===e&&n.model(null)}}),n.size()?n.forEach(function(t){t.execute(e)}):t.directives(null)}function Is(t){function n(t){this.el=t}function e(t){var e=new n(t);return Object.defineProperty(e,"value",{get:function(){return K_(e.el).property("value")},set:function(t){K_(e.el).property("value",t)}}),e}return n.prototype=Qw({},tE,t),e.prototype=n.prototype,e}function Ds(t,n,e){return YM(function(){n.$set(e,t.value)})}function Us(t){var n=Gw?window.handlebars:require("handlebars");return n?n.compile(t):void LM("compile function requires handlebars")}function qs(t,n){if(ls(t)){if(!n)return t;var e=Us(t);if(!e)return t}return t(n)}function js(t,n){var e=K_(document.createElement("div"));e.html(qs(t,n));var r=e.node().children;return 1!==r.length&&LM("HtmlElement function should return one root element only, got "+r.length),r[0]}function Fs(t,n){function e(t){var n=Kw(t,"parent"),e=o(n?n.components:null),r=o(n?n.directives:pE),i=Nn("message");a.each(function(t,n){e.set(n,t)}),u.each(function(t,n){r.set(n,t)}),Ys(e,Kw(t,"components")),Bs(r,Kw(t,"directives")),Object.defineProperties(this,{components:{get:function(){return e}},directives:{get:function(){return r}},parent:{get:function(){return n}},root:{get:function(){return n?n.root:this}},props:{get:function(){return s}},uid:{get:function(){return this.model.uid}},events:{get:function(){return i}}}),this.model=Qw({},c,Kw(t,"model")),this.init(t)}function r(t){return new e(t)}n=n||vE,fs(t)&&(t={render:t});var i=Qw({},t),a=Ys(o(),Kw(i,"components")),u=Bs(o(),Kw(i,"directives")),c=Kw(i,"model"),s=Kw(i,"props");return e.prototype=Qw({},n,i),r.prototype=e.prototype,r}function Ys(t,n){return o(n).each(function(n,e){t.set(e,Fs(n,yE))}),t}function Bs(t,n){return o(n).each(function(n,e){t.set(e,qM(n))}),t}function Xs(t,n){var e=t.model;Object.defineProperty(DM(t),"el",{get:function(){return n}}),Object.defineProperty(e,"$vm",{get:function(){return t}}),K_(n).model(e),Rs(e,n),Gd(function(){t.mounted()})}function $s(t){if(!t)return LM("element not defined, pass an identifier or an HTMLElement object");var n=fs(t.node)?t:K_(t),e=n.node();return e?e:void LM("could not find "+t+" element")}function Hs(t){var n=t.isMounted;return n||Object.defineProperty(t,"isMounted",{get:function(){return!0}}),n}function Vs(t,n,e){return e?(e=fE(e),1!==e.size()&&LM("render function must return a single HTML node"),e=e.node(),n.parentNode.insertBefore(e,n),K_(n).remove(),void Xs(t,e)):LM("render function must return a single HTML node. It returned nothing!")}function Gs(){document.removeEventListener("DOMContentLoaded",Gs),window.removeEventListener("load",Gs),Ws()}function Ws(){for(var t=void 0;mE.length;)t=mE.shift(),Gd(t)}function Zs(t){var n=this;return new Promise(function(t){t()}).then(function(){return t.call(n)})}function Js(t){var n=t.type||"text";return EE[n]||n}function Qs(t){var n=this.data.children;if(n){if(!hs(n))return wE("children should be an array of fields, for "+("undefined"==typeof n?"undefined":nd(n))),t;t.selectAll(".d3form").data(n).enter().append(tl).classed("d3form",!0)}return t}function Ks(t){t||(t={}),this.data=t;var n=this.model;return ME.forEach(function(e){e in t&&n.$set(e,t[e])}),t}function tl(t){var n=Js(t);return n||(wE("Could not find form component "+t.type),n="input",t.type="hidden"),document.createElement("d3"+n)}function nl(t){var n=t.formTheme;return!n&&t.parent?nl(t.parent):n}function el(t){var n=t.attr("min"),e=t.attr("max");return n=null===n?-(1/0):+n,e=null===e?1/0:+e,[n,e]}function rl(t,n){return{set:function(n,e){var r=e[t]},validate:function(t,e){return n(t,e)}}}function il(){return hs(this.option)?this.option[0]:this.option}function ol(){return hs(this.option)?this.option[1]||this.option[0]:this.option}function al(t){var n=t.json();this.message(n)}function ul(){window.location.href=this.data.redirectTo||"/"}function cl(t){function n(t){r.setSubmitDone(),r.response(t)}function e(){r.setSubmitDone()}var r=this&&this.model?this.model.form:null;if(!r)return void wE("form not available, cannot submit");t&&(t.preventDefault(),t.stopPropagation());var i=xE.fetch,o=(r.data.enctype||"").split(";")[0],a=r.data.action,u=ss(a)?a.url:a,c=r.inputData(),s={};if(!i)return void wE("fetch provider not available, cannot submit");if(!u)return void wE("No url, cannot submit");if("application/json"===o)s.headers={"Content-Type":r.data.enctype},s.body=JSON.stringify(c);else{s.body=new FormData;for(var l in c)s.body.set(l,c[l])}r.setSubmit(),s.method=r.method||"post",i(u,s).then(n,e)}function sl(t){var n=t.label||t.name;return"<label for="+t.id+' class="control-label" d3-class="[required, labelSrOnly ? \'sr-only\' : null]">'+n+"</label>\n<slot></slot>"}function ll(t,n){return'<div class="input-group" :class="bootstrapStatus()">\n<span class="input-group-addon" id="'+t+'">'+n+"</span>\n<slot></slot>\n</div>"}var fl=function(t,n){return t<n?-1:t>n?1:t>=n?0:NaN},hl=function(t){return 1===t.length&&(t=n(t)),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}},pl=hl(fl),dl=pl.right,vl=pl.left,yl=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},_l=function(t){return null===t?NaN:+t},gl=function(t,n){var e,r,i=t.length,o=0,a=0,u=-1,c=0;if(null==n)for(;++u<i;)isNaN(e=_l(t[u]))||(r=e-o,o+=r/++c,a+=r*(e-o));else for(;++u<i;)isNaN(e=_l(n(t[u],u,t)))||(r=e-o,o+=r/++c,a+=r*(e-o));if(c>1)return a/(c-1)},ml=function(t,n){var e=gl(t,n);return e?Math.sqrt(e):e},xl=function(t,n){var e,r,i,o=-1,a=t.length;if(null==n){for(;++o<a;)if(null!=(r=t[o])&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=t[o])&&(e>r&&(e=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=n(t[o],o,t))&&r>=r){e=i=r;break}for(;++o<a;)null!=(r=n(t[o],o,t))&&(e>r&&(e=r),i<r&&(i=r))}return[e,i]},bl=Array.prototype,wl=bl.slice,Ml=bl.map,El=function(t){return function(){return t}},Nl=function(t){return t},Tl=function(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o},Sl=Math.sqrt(50),kl=Math.sqrt(10),Al=Math.sqrt(2),Cl=function(t,n,r){var i=e(t,n,r);return Tl(Math.ceil(t/i)*i,Math.floor(n/i)*i+i/2,i)},Pl=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},Ll=function(){function t(t){var i,o,a=t.length,u=new Array(a);for(i=0;i<a;++i)u[i]=n(t[i],i,t);var c=e(u),s=c[0],l=c[1],f=r(u,s,l);Array.isArray(f)||(f=Cl(s,l,f));for(var h=f.length;f[0]<=s;)f.shift(),--h;for(;f[h-1]>=l;)f.pop(),--h;var p,d=new Array(h+1);for(i=0;i<=h;++i)p=d[i]=[],p.x0=i>0?f[i-1]:s,p.x1=i<h?f[i]:l;for(i=0;i<a;++i)o=u[i],s<=o&&o<=l&&d[dl(f,o,0,h)].push(t[i]);return d}var n=Nl,e=xl,r=Pl;return t.value=function(e){return arguments.length?(n="function"==typeof e?e:El(e),t):n},t.domain=function(n){return arguments.length?(e="function"==typeof n?n:El([n[0],n[1]]),t):e},t.thresholds=function(n){return arguments.length?(r="function"==typeof n?n:El(Array.isArray(n)?wl.call(n):n),t):r},t},Ol=function(t,n,e){if(null==e&&(e=_l),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),a=+e(t[o],o,t),u=+e(t[o+1],o+1,t);return a+(u-a)*(i-o)}},Rl=function(t,n,e){return t=Ml.call(t,_l).sort(fl),Math.ceil((e-n)/(2*(Ol(t,.75)-Ol(t,.25))*Math.pow(t.length,-1/3)))},zl=function(t,n,e){return Math.ceil((e-n)/(3.5*ml(t)*Math.pow(t.length,-1/3)))},Il=function(t,n){var e,r,i=-1,o=t.length;if(null==n){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&r>e&&(e=r)}else{for(;++i<o;)if(null!=(r=n(t[i],i,t))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n(t[i],i,t))&&r>e&&(e=r)}return e},Dl=function(t,n){var e,r=0,i=t.length,o=-1,a=i;if(null==n)for(;++o<i;)isNaN(e=_l(t[o]))?--a:r+=e;else for(;++o<i;)isNaN(e=_l(n(t[o],o,t)))?--a:r+=e;if(a)return r/a},Ul=function(t,n){var e,r=[],i=t.length,o=-1;if(null==n)for(;++o<i;)isNaN(e=_l(t[o]))||r.push(e);else for(;++o<i;)isNaN(e=_l(n(t[o],o,t)))||r.push(e);return Ol(r.sort(fl),.5)},ql=function(t){for(var n,e,r,i=t.length,o=-1,a=0;++o<i;)a+=t[o].length;for(e=new Array(a);--i>=0;)for(r=t[i],n=r.length;--n>=0;)e[--a]=r[n];return e},jl=function(t,n){var e,r,i=-1,o=t.length;if(null==n){for(;++i<o;)if(null!=(r=t[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=t[i])&&e>r&&(e=r)}else{for(;++i<o;)if(null!=(r=n(t[i],i,t))&&r>=r){e=r;break}for(;++i<o;)null!=(r=n(t[i],i,t))&&e>r&&(e=r)}return e},Fl=function(t){for(var n=0,e=t.length-1,r=t[0],i=new Array(e<0?0:e);n<e;)i[n]=[r,r=t[++n]];return i},Yl=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},Bl=function(t,n){if(e=t.length){var e,r,i=0,o=0,a=t[o];for(n||(n=fl);++i<e;)(n(r=t[i],a)<0||0!==n(a,a))&&(a=r,o=i);return 0===n(a,a)?o:void 0}},Xl=function(t,n,e){for(var r,i,o=(null==e?t.length:e)-(n=null==n?0:+n);o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},$l=function(t,n){var e,r=0,i=t.length,o=-1;if(null==n)for(;++o<i;)(e=+t[o])&&(r+=e);else for(;++o<i;)(e=+n(t[o],o,t))&&(r+=e);return r},Hl=function(t){if(!(o=t.length))return[];for(var n=-1,e=jl(t,r),i=new Array(e);++n<e;)for(var o,a=-1,u=i[n]=new Array(o);++a<o;)u[a]=t[a][n];return i},Vl=function(){return Hl(arguments)},Gl="$";i.prototype=o.prototype={constructor:i,has:function(t){return Gl+t in this},get:function(t){return this[Gl+t]},set:function(t,n){return this[Gl+t]=n,this},remove:function(t){var n=Gl+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===Gl&&delete this[t]},keys:function t(){var t=[];for(var n in this)n[0]===Gl&&t.push(n.slice(1));return t},values:function t(){var t=[];for(var n in this)n[0]===Gl&&t.push(this[n]);return t},entries:function t(){var t=[];for(var n in this)n[0]===Gl&&t.push({key:n.slice(1),value:this[n]});return t},size:function t(){var t=0;for(var n in this)n[0]===Gl&&++t;return t},empty:function(){for(var t in this)if(t[0]===Gl)return!1;return!0},each:function(t){for(var n in this)n[0]===Gl&&t(this[n],n.slice(1),this)}};var Wl=function(){function t(n,i,a,u){if(i>=l.length)return null!=r?r(n):null!=e?n.sort(e):n;for(var c,s,f,h=-1,p=n.length,d=l[i++],v=o(),y=a();++h<p;)(f=v.get(c=d(s=n[h])+""))?f.push(s):v.set(c,[s]);return v.each(function(n,e){u(y,e,t(n,i,a,u))}),y}function n(t,e){if(++e>l.length)return t;var i,o=f[e-1];return null!=r&&e>=l.length?i=t.entries():(i=[],t.each(function(t,r){i.push({key:r,values:n(t,e)})})),null!=o?i.sort(function(t,n){return o(t.key,n.key)}):i}var e,r,i,l=[],f=[];return i={object:function(n){return t(n,0,a,u)},map:function(n){return t(n,0,c,s)},entries:function(e){return n(t(e,0,c,s),0)},key:function(t){return l.push(t),i},sortKeys:function(t){return f[l.length-1]=t,i},sortValues:function(t){return e=t,i},rollup:function(t){return r=t,i}}},Zl=o.prototype;l.prototype=f.prototype={constructor:l,has:Zl.has,add:function(t){return t+="",this[Gl+t]=t,this},remove:Zl.remove,clear:Zl.clear,values:Zl.keys,size:Zl.size,empty:Zl.empty,each:Zl.each};var Jl=function(t){var n=[];for(var e in t)n.push(e);return n},Ql=function(t){var n=[];for(var e in t)n.push(t[e]);return n},Kl=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},tf=function(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return Math.random()*n+t}},nf=function(t,n){var e,r;return t=null==t?0:+t,n=null==n?1:+n,function(){var i;if(null!=e)i=e,e=null;else do e=2*Math.random()-1,i=2*Math.random()-1,r=e*e+i*i;while(!r||r>1);return t+n*i*Math.sqrt(-2*Math.log(r)/r)}},ef=function(){var t=nf.apply(this,arguments);return function(){return Math.exp(t())}},rf=function(t){return function(){for(var n=0,e=0;e<t;++e)n+=Math.random();return n}},of=function(t){var n=rf(t);return function(){return n()/t}},af=function(t){return function(){return-Math.log(1-Math.random())/t}},uf=3,cf=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(uf),sf=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(uf),lf=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(uf),ff=Math.PI,hf=ff/2,pf=4/11,df=6/11,vf=8/11,yf=.75,_f=9/11,gf=10/11,mf=.9375,xf=21/22,bf=63/64,wf=1/pf/pf,Mf=1.70158,Ef=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(Mf),Nf=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(Mf),Tf=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(Mf),Sf=2*Math.PI,kf=1,Af=.3,Cf=function t(n,e){function r(t){return n*Math.pow(2,10*--t)*Math.sin((i-t)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Sf);
5return r.amplitude=function(n){return t(n,e*Sf)},r.period=function(e){return t(n,e)},r}(kf,Af),Pf=function t(n,e){function r(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Sf);return r.amplitude=function(n){return t(n,e*Sf)},r.period=function(e){return t(n,e)},r}(kf,Af),Lf=function t(n,e){function r(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((i-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((i+t)/e))/2}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Sf);return r.amplitude=function(n){return t(n,e*Sf)},r.period=function(e){return t(n,e)},r}(kf,Af),Of=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e<r;)n=i,i=t[e],o+=n[1]*i[0]-n[0]*i[1];return o/2},Rf=function(t){for(var n,e,r=-1,i=t.length,o=0,a=0,u=t[i-1],c=0;++r<i;)n=u,u=t[r],c+=e=n[0]*u[1]-u[0]*n[1],o+=(n[0]+u[0])*e,a+=(n[1]+u[1])*e;return c*=3,[o/c,a/c]},zf=function(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])},If=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(P),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var o=L(r),a=L(i),u=a[0]===o[0],c=a[a.length-1]===o[o.length-1],s=[];for(n=o.length-1;n>=0;--n)s.push(t[r[o[n]][2]]);for(n=+u;n<a.length-c;++n)s.push(t[r[a[n]][2]]);return s},Df=function(t,n){for(var e,r,i=t.length,o=t[i-1],a=n[0],u=n[1],c=o[0],s=o[1],l=!1,f=0;f<i;++f)o=t[f],e=o[0],r=o[1],r>u!=s>u&&a<(c-e)*(u-r)/(s-r)+e&&(l=!l),c=e,s=r;return l},Uf=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],a=o[0],u=o[1],c=0;++r<i;)n=a,e=u,o=t[r],a=o[0],u=o[1],n-=a,e-=u,c+=Math.sqrt(n*n+e*e);return c},qf=Math.PI,jf=2*qf,Ff=1e-6,Yf=jf-Ff;O.prototype=R.prototype={constructor:O,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,a=this._y1,u=e-t,c=r-n,s=o-t,l=a-n,f=s*s+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(f>Ff)if(Math.abs(l*u-c*s)>Ff&&i){var h=e-o,p=r-a,d=u*u+c*c,v=h*h+p*p,y=Math.sqrt(d),_=Math.sqrt(f),g=i*Math.tan((qf-Math.acos((d+f-v)/(2*y*_)))/2),m=g/_,x=g/y;Math.abs(m-1)>Ff&&(this._+="L"+(t+m*s)+","+(n+m*l)),this._+="A"+i+","+i+",0,0,"+ +(l*h>s*p)+","+(this._x1=t+x*u)+","+(this._y1=n+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n);else;},arc:function(t,n,e,r,i,o){t=+t,n=+n,e=+e;var a=e*Math.cos(r),u=e*Math.sin(r),c=t+a,s=n+u,l=1^o,f=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+s:(Math.abs(this._x1-c)>Ff||Math.abs(this._y1-s)>Ff)&&(this._+="L"+c+","+s),e&&(f>Yf?this._+="A"+e+","+e+",0,1,"+l+","+(t-a)+","+(n-u)+"A"+e+","+e+",0,1,"+l+","+(this._x1=c)+","+(this._y1=s):(f<0&&(f=f%jf+jf),this._+="A"+e+","+e+",0,"+ +(f>=qf)+","+l+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var Bf=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return z(this.cover(n,e),n,e,t)},Xf=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{if(!(e>t||t>i||r>n||n>o))return this;var a,u,c=i-e,s=this._root;switch(u=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do a=new Array(4),a[u]=s,s=a;while(c*=2,i=e+c,o=r+c,t>i||n>o);break;case 1:do a=new Array(4),a[u]=s,s=a;while(c*=2,e=i-c,o=r+c,e>t||n>o);break;case 2:do a=new Array(4),a[u]=s,s=a;while(c*=2,i=e+c,r=o-c,t>i||r>n);break;case 3:do a=new Array(4),a[u]=s,s=a;while(c*=2,e=i-c,r=o-c,e>t||r>n)}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},$f=function(){var t=[];return this.visit(function(n){if(!n.length)do t.push(n.data);while(n=n.next)}),t},Hf=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Vf=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i},Gf=function(t,n,e){var r,i,o,a,u,c,s,l=this._x0,f=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new Vf(v,l,f,h,p)),null==e?e=1/0:(l=t-e,f=n-e,h=t+e,p=n+e,e*=e);c=d.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(o=c.y0)>p||(a=c.x1)<l||(u=c.y1)<f))if(v.length){var y=(i+a)/2,_=(o+u)/2;d.push(new Vf(v[3],y,_,a,u),new Vf(v[2],i,_,y,u),new Vf(v[1],y,o,a,_),new Vf(v[0],i,o,y,_)),(s=(n>=_)<<1|t>=y)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=c)}else{var g=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=g*g+m*m;if(x<e){var b=Math.sqrt(e=x);l=t-b,f=n-b,h=t+b,p=n+b,r=v.data}}return r},Wf=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var n,e,r,i,o,a,u,c,s,l,f,h,p=this._root,d=this._x0,v=this._y0,y=this._x1,_=this._y1;if(!p)return this;if(p.length)for(;;){if((s=o>=(u=(d+y)/2))?d=u:y=u,(l=a>=(c=(v+_)/2))?v=c:_=c,n=p,!(p=p[f=l<<1|s]))return this;if(!p.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)},Zf=function(){return this._root},Jf=function(){var t=0;return this.visit(function(n){if(!n.length)do++t;while(n=n.next)}),t},Qf=function(t){var n,e,r,i,o,a,u=[],c=this._root;for(c&&u.push(new Vf(c,this._x0,this._y0,this._x1,this._y1));n=u.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,a=n.y1)&&c.length){var s=(r+o)/2,l=(i+a)/2;(e=c[3])&&u.push(new Vf(e,s,l,o,a)),(e=c[2])&&u.push(new Vf(e,r,l,s,a)),(e=c[1])&&u.push(new Vf(e,s,i,o,l)),(e=c[0])&&u.push(new Vf(e,r,i,s,l))}return this},Kf=function(t){var n,e=[],r=[];for(this._root&&e.push(new Vf(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,a=n.x0,u=n.y0,c=n.x1,s=n.y1,l=(a+c)/2,f=(u+s)/2;(o=i[0])&&e.push(new Vf(o,a,u,l,f)),(o=i[1])&&e.push(new Vf(o,l,u,c,f)),(o=i[2])&&e.push(new Vf(o,a,f,l,s)),(o=i[3])&&e.push(new Vf(o,l,f,c,s))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},th=function(t){return arguments.length?(this._x=t,this):this._x},nh=function(t){return arguments.length?(this._y=t,this):this._y},eh=j.prototype=F.prototype;eh.copy=function(){var t,n,e=new F(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Y(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Y(n));return e},eh.add=Bf,eh.addAll=I,eh.cover=Xf,eh.data=$f,eh.extent=Hf,eh.find=Gf,eh.remove=Wf,eh.removeAll=D,eh.root=Zf,eh.size=Jf,eh.visit=Qf,eh.visitAfter=Kf,eh.x=th,eh.y=nh;var rh=function(t){return function(){return t}},ih=1e-12,oh=Math.PI,ah=oh/2,uh=2*oh,ch=function(){function t(){var t,s,l=+n.apply(this,arguments),f=+e.apply(this,arguments),h=o.apply(this,arguments)-ah,p=a.apply(this,arguments)-ah,d=Math.abs(p-h),v=p>h;if(c||(c=t=R()),f<l&&(s=f,f=l,l=s),f>ih)if(d>uh-ih)c.moveTo(f*Math.cos(h),f*Math.sin(h)),c.arc(0,0,f,h,p,!v),l>ih&&(c.moveTo(l*Math.cos(p),l*Math.sin(p)),c.arc(0,0,l,p,h,v));else{var y,_,g=h,m=p,x=h,b=p,w=d,M=d,E=u.apply(this,arguments)/2,N=E>ih&&(i?+i.apply(this,arguments):Math.sqrt(l*l+f*f)),T=Math.min(Math.abs(f-l)/2,+r.apply(this,arguments)),S=T,k=T;if(N>ih){var A=G(N/l*Math.sin(E)),C=G(N/f*Math.sin(E));(w-=2*A)>ih?(A*=v?1:-1,x+=A,b-=A):(w=0,x=b=(h+p)/2),(M-=2*C)>ih?(C*=v?1:-1,g+=C,m-=C):(M=0,g=m=(h+p)/2)}var P=f*Math.cos(g),L=f*Math.sin(g),O=l*Math.cos(b),z=l*Math.sin(b);if(T>ih){var I=f*Math.cos(m),D=f*Math.sin(m),U=l*Math.cos(x),q=l*Math.sin(x);if(d<oh){var j=w>ih?W(P,L,U,q,I,D,O,z):[O,z],F=P-j[0],Y=L-j[1],B=I-j[0],X=D-j[1],$=1/Math.sin(Math.acos((F*B+Y*X)/(Math.sqrt(F*F+Y*Y)*Math.sqrt(B*B+X*X)))/2),H=Math.sqrt(j[0]*j[0]+j[1]*j[1]);S=Math.min(T,(l-H)/($-1)),k=Math.min(T,(f-H)/($+1))}}M>ih?k>ih?(y=Z(U,q,P,L,f,k,v),_=Z(I,D,O,z,f,k,v),c.moveTo(y.cx+y.x01,y.cy+y.y01),k<T?c.arc(y.cx,y.cy,k,Math.atan2(y.y01,y.x01),Math.atan2(_.y01,_.x01),!v):(c.arc(y.cx,y.cy,k,Math.atan2(y.y01,y.x01),Math.atan2(y.y11,y.x11),!v),c.arc(0,0,f,Math.atan2(y.cy+y.y11,y.cx+y.x11),Math.atan2(_.cy+_.y11,_.cx+_.x11),!v),c.arc(_.cx,_.cy,k,Math.atan2(_.y11,_.x11),Math.atan2(_.y01,_.x01),!v))):(c.moveTo(P,L),c.arc(0,0,f,g,m,!v)):c.moveTo(P,L),l>ih&&w>ih?S>ih?(y=Z(O,z,I,D,l,-S,v),_=Z(P,L,U,q,l,-S,v),c.lineTo(y.cx+y.x01,y.cy+y.y01),S<T?c.arc(y.cx,y.cy,S,Math.atan2(y.y01,y.x01),Math.atan2(_.y01,_.x01),!v):(c.arc(y.cx,y.cy,S,Math.atan2(y.y01,y.x01),Math.atan2(y.y11,y.x11),!v),c.arc(0,0,l,Math.atan2(y.cy+y.y11,y.cx+y.x11),Math.atan2(_.cy+_.y11,_.cx+_.x11),v),c.arc(_.cx,_.cy,S,Math.atan2(_.y11,_.x11),Math.atan2(_.y01,_.x01),!v))):c.arc(0,0,l,b,x,v):c.lineTo(O,z)}else c.moveTo(0,0);if(c.closePath(),t)return c=null,t+""||null}var n=B,e=X,r=rh(0),i=null,o=$,a=H,u=V,c=null;return t.centroid=function(){var t=(+n.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-oh/2;return[Math.cos(r)*t,Math.sin(r)*t]},t.innerRadius=function(e){return arguments.length?(n="function"==typeof e?e:rh(+e),t):n},t.outerRadius=function(n){return arguments.length?(e="function"==typeof n?n:rh(+n),t):e},t.cornerRadius=function(n){return arguments.length?(r="function"==typeof n?n:rh(+n),t):r},t.padRadius=function(n){return arguments.length?(i=null==n?null:"function"==typeof n?n:rh(+n),t):i},t.startAngle=function(n){return arguments.length?(o="function"==typeof n?n:rh(+n),t):o},t.endAngle=function(n){return arguments.length?(a="function"==typeof n?n:rh(+n),t):a},t.padAngle=function(n){return arguments.length?(u="function"==typeof n?n:rh(+n),t):u},t.context=function(n){return arguments.length?(c=null==n?null:n,t):c},t};J.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var sh=function(t){return new J(t)},lh=function(){function t(t){var u,c,s,l=t.length,f=!1;for(null==i&&(a=o(s=R())),u=0;u<=l;++u)!(u<l&&r(c=t[u],u,t))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+n(c,u,t),+e(c,u,t));if(s)return a=null,s+""||null}var n=Q,e=K,r=rh(!0),i=null,o=sh,a=null;return t.x=function(e){return arguments.length?(n="function"==typeof e?e:rh(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:rh(+n),t):e},t.defined=function(n){return arguments.length?(r="function"==typeof n?n:rh(!!n),t):r},t.curve=function(n){return arguments.length?(o=n,null!=i&&(a=o(i)),t):o},t.context=function(n){return arguments.length?(null==n?i=a=null:a=o(i=n),t):i},t},fh=function(){function t(t){var n,l,f,h,p,d=t.length,v=!1,y=new Array(d),_=new Array(d);for(null==u&&(s=c(p=R())),n=0;n<=d;++n){if(!(n<d&&a(h=t[n],n,t))===v)if(v=!v)l=n,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),f=n-1;f>=l;--f)s.point(y[f],_[f]);s.lineEnd(),s.areaEnd()}v&&(y[n]=+e(h,n,t),_[n]=+i(h,n,t),s.point(r?+r(h,n,t):y[n],o?+o(h,n,t):_[n]))}if(p)return s=null,p+""||null}function n(){return lh().defined(a).curve(c).context(u)}var e=Q,r=null,i=rh(0),o=K,a=rh(!0),u=null,c=sh,s=null;return t.x=function(n){return arguments.length?(e="function"==typeof n?n:rh(+n),r=null,t):e},t.x0=function(n){return arguments.length?(e="function"==typeof n?n:rh(+n),t):e},t.x1=function(n){return arguments.length?(r=null==n?null:"function"==typeof n?n:rh(+n),t):r},t.y=function(n){return arguments.length?(i="function"==typeof n?n:rh(+n),o=null,t):i},t.y0=function(n){return arguments.length?(i="function"==typeof n?n:rh(+n),t):i},t.y1=function(n){return arguments.length?(o=null==n?null:"function"==typeof n?n:rh(+n),t):o},t.lineX0=t.lineY0=function(){return n().x(e).y(i)},t.lineY1=function(){return n().x(e).y(o)},t.lineX1=function(){return n().x(r).y(i)},t.defined=function(n){return arguments.length?(a="function"==typeof n?n:rh(!!n),t):a},t.curve=function(n){return arguments.length?(c=n,null!=u&&(s=c(u)),t):c},t.context=function(n){return arguments.length?(null==n?u=s=null:s=c(u=n),t):u},t},hh=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},ph=function(t){return t},dh=function(){function t(t){var u,c,s,l,f,h=t.length,p=0,d=new Array(h),v=new Array(h),y=+i.apply(this,arguments),_=Math.min(uh,Math.max(-uh,o.apply(this,arguments)-y)),g=Math.min(Math.abs(_)/h,a.apply(this,arguments)),m=g*(_<0?-1:1);for(u=0;u<h;++u)(f=v[d[u]=u]=+n(t[u],u,t))>0&&(p+=f);for(null!=e?d.sort(function(t,n){return e(v[t],v[n])}):null!=r&&d.sort(function(n,e){return r(t[n],t[e])}),u=0,s=p?(_-h*m)/p:0;u<h;++u,y=l)c=d[u],f=v[c],l=y+(f>0?f*s:0)+m,v[c]={data:t[c],index:u,value:f,startAngle:y,endAngle:l,padAngle:g};return v}var n=ph,e=hh,r=null,i=rh(0),o=rh(uh),a=rh(0);return t.value=function(e){return arguments.length?(n="function"==typeof e?e:rh(+e),t):n},t.sortValues=function(n){return arguments.length?(e=n,r=null,t):e},t.sort=function(n){return arguments.length?(r=n,e=null,t):r},t.startAngle=function(n){return arguments.length?(i="function"==typeof n?n:rh(+n),t):i},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:rh(+n),t):o},t.padAngle=function(n){return arguments.length?(a="function"==typeof n?n:rh(+n),t):a},t},vh=nt(sh);tt.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var yh=function(){return et(lh().curve(vh))},_h=function(){var t=fh().curve(vh),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return et(e())},delete t.lineX0,t.lineEndAngle=function(){return et(r())},delete t.lineX1,t.lineInnerRadius=function(){return et(i())},delete t.lineY0,t.lineOuterRadius=function(){return et(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(nt(t)):n()._curve},t},gh={draw:function(t,n){var e=Math.sqrt(n/oh);t.moveTo(e,0),t.arc(0,0,e,0,uh)}},mh={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},xh=Math.sqrt(1/3),bh=2*xh,wh={draw:function(t,n){var e=Math.sqrt(n/bh),r=e*xh;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},Mh=.8908130915292852,Eh=Math.sin(oh/10)/Math.sin(7*oh/10),Nh=Math.sin(uh/10)*Eh,Th=-Math.cos(uh/10)*Eh,Sh={draw:function(t,n){var e=Math.sqrt(n*Mh),r=Nh*e,i=Th*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var a=uh*o/5,u=Math.cos(a),c=Math.sin(a);t.lineTo(c*e,-u*e),t.lineTo(u*r-c*i,c*r+u*i)}t.closePath()}},kh={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Ah=Math.sqrt(3),Ch={draw:function(t,n){var e=-Math.sqrt(n/(3*Ah));t.moveTo(0,2*e),t.lineTo(-Ah*e,-e),t.lineTo(Ah*e,-e),t.closePath()}},Ph=-.5,Lh=Math.sqrt(3)/2,Oh=1/Math.sqrt(12),Rh=3*(Oh/2+1),zh={draw:function(t,n){var e=Math.sqrt(n/Rh),r=e/2,i=e*Oh,o=r,a=e*Oh+e,u=-o,c=a;t.moveTo(r,i),t.lineTo(o,a),t.lineTo(u,c),t.lineTo(Ph*r-Lh*i,Lh*r+Ph*i),t.lineTo(Ph*o-Lh*a,Lh*o+Ph*a),t.lineTo(Ph*u-Lh*c,Lh*u+Ph*c),t.lineTo(Ph*r+Lh*i,Ph*i-Lh*r),t.lineTo(Ph*o+Lh*a,Ph*a-Lh*o),t.lineTo(Ph*u+Lh*c,Ph*c-Lh*u),t.closePath()}},Ih=[gh,mh,wh,kh,Sh,Ch,zh],Dh=function(){function t(){var t;if(r||(r=t=R()),n.apply(this,arguments).draw(r,+e.apply(this,arguments)),t)return r=null,t+""||null}var n=rh(gh),e=rh(64),r=null;return t.type=function(e){return arguments.length?(n="function"==typeof e?e:rh(e),t):n},t.size=function(n){return arguments.length?(e="function"==typeof n?n:rh(+n),t):e},t.context=function(n){return arguments.length?(r=null==n?null:n,t):r},t},Uh=function(){};it.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:rt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:rt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var qh=function(t){return new it(t)};ot.prototype={areaStart:Uh,areaEnd:Uh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:rt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var jh=function(t){return new ot(t)};at.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:rt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var Fh=function(t){return new at(t)};ut.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],a=t[e]-i,u=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*a),this._beta*n[c]+(1-this._beta)*(o+r*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Yh=function t(n){function e(t){return 1===n?new it(t):new ut(t,n)}return e.beta=function(n){return t(+n)},e}(.85);st.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ct(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Bh=function t(n){function e(t){return new st(t,n)}return e.tension=function(n){return t(+n)},e}(0);lt.prototype={areaStart:Uh,areaEnd:Uh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Xh=function t(n){function e(t){return new lt(t,n)}return e.tension=function(n){return t(+n)},e}(0);ft.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var $h=function t(n){function e(t){return new ft(t,n)}return e.tension=function(n){return t(+n)},e}(0);pt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:ht(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hh=function t(n){function e(t){return n?new pt(t,n):new st(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);dt.prototype={areaStart:Uh,areaEnd:Uh,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:ht(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Vh=function t(n){function e(t){return n?new dt(t,n):new lt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);vt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ht(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Gh=function t(n){function e(t){return n?new vt(t,n):new ft(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);yt.prototype={areaStart:Uh,areaEnd:Uh,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Wh=function(t){return new yt(t)};bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:xt(this,this._t0,mt(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(t=+t,n=+n,t!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,xt(this,mt(this,e=gt(this,t,n)),e);break;default:xt(this,this._t0,e=gt(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(wt.prototype=Object.create(bt.prototype)).point=function(t,n){bt.prototype.point.call(this,n,t)},Mt.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=St(t),i=St(n),o=0,a=1;a<e;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[a],n[a]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Zh=function(t){return new Tt(t)};kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Jh=function(t){return new kt(t,.5)},Qh=Array.prototype.slice,Kh=function(t,n){if((r=t.length)>1)for(var e,r,i=1,o=t[n[0]],a=o.length;i<r;++i){e=o,o=t[n[i]];for(var u=0;u<a;++u)o[u][1]+=o[u][0]=isNaN(e[u][1])?e[u][0]:e[u][1]}},tp=function(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e},np=function(){function t(t){var o,a,u=n.apply(this,arguments),c=t.length,s=u.length,l=new Array(s);for(o=0;o<s;++o){for(var f,h=u[o],p=l[o]=new Array(c),d=0;d<c;++d)p[d]=f=[0,+i(t[d],h,d,t)],f.data=t[d];p.key=h}for(o=0,a=e(l);o<s;++o)l[a[o]].index=o;return r(l,a),l}var n=rh([]),e=tp,r=Kh,i=Pt;return t.keys=function(e){return arguments.length?(n="function"==typeof e?e:rh(Qh.call(e)),t):n},t.value=function(n){return arguments.length?(i="function"==typeof n?n:rh(+n),t):i},t.order=function(n){return arguments.length?(e=null==n?tp:"function"==typeof n?n:rh(Qh.call(n)),t):e},t.offset=function(n){return arguments.length?(r=null==n?Kh:n,t):r},t},ep=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,a=t[0].length;o<a;++o){for(i=e=0;e<r;++e)i+=t[e][o][1]||0;if(i)for(e=0;e<r;++e)t[e][o][1]/=i}Kh(t,n)}},rp=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r<o;++r){for(var a=0,u=0;a<e;++a)u+=t[a][r][1]||0;i[r][1]+=i[r][0]=-u/2}Kh(t,n)}},ip=function(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,a=1;a<r;++a){for(var u=0,c=0,s=0;u<i;++u){for(var l=t[n[u]],f=l[a][1]||0,h=l[a-1][1]||0,p=(f-h)/2,d=0;d<u;++d){var v=t[n[d]],y=v[a][1]||0,_=v[a-1][1]||0;p+=y-_}c+=f,s+=p*f}e[a-1][1]+=e[a-1][0]=o,c&&(o-=s/c)}e[a-1][1]+=e[a-1][0]=o,Kh(t,n)}},op=function(t){var n=t.map(Lt);return tp(t).sort(function(t,e){return n[t]-n[e]})},ap=function(t){return op(t).reverse()},up=function(t){var n,e,r=t.length,i=t.map(Lt),o=tp(t).sort(function(t,n){return i[n]-i[t]}),a=0,u=0,c=[],s=[];for(n=0;n<r;++n)e=o[n],a<u?(a+=i[e],c.push(e)):(u+=i[e],s.push(e));return s.reverse().concat(c)},cp=function(t){return tp(t).reverse()},sp=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t},lp=.7,fp=1/lp,hp="\\s*([+-]?\\d+)\\s*",pp="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",dp="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",vp=/^#([0-9a-f]{3})$/,yp=/^#([0-9a-f]{6})$/,_p=new RegExp("^rgb\\("+[hp,hp,hp]+"\\)$"),gp=new RegExp("^rgb\\("+[dp,dp,dp]+"\\)$"),mp=new RegExp("^rgba\\("+[hp,hp,hp,pp]+"\\)$"),xp=new RegExp("^rgba\\("+[dp,dp,dp,pp]+"\\)$"),bp=new RegExp("^hsl\\("+[pp,dp,dp]+"\\)$"),wp=new RegExp("^hsla\\("+[pp,dp,dp,pp]+"\\)$"),Mp={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,
6lightgrey: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};sp(Rt,zt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),sp(jt,qt,Ot(Rt,{brighter:function(t){return t=null==t?fp:Math.pow(fp,t),new jt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?lp:Math.pow(lp,t),new jt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),sp(Xt,Bt,Ot(Rt,{brighter:function(t){return t=null==t?fp:Math.pow(fp,t),new Xt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?lp:Math.pow(lp,t),new Xt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new jt($t(t>=240?t-240:t+120,i,r),$t(t,i,r),$t(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Ep=Math.PI/180,Np=180/Math.PI,Tp=18,Sp=.95047,kp=1,Ap=1.08883,Cp=4/29,Pp=6/29,Lp=3*Pp*Pp,Op=Pp*Pp*Pp;sp(Gt,Vt,Ot(Rt,{brighter:function(t){return new Gt(this.l+Tp*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new Gt(this.l-Tp*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=kp*Zt(t),n=Sp*Zt(n),e=Ap*Zt(e),new jt(Jt(3.2404542*n-1.5371385*t-.4985314*e),Jt(-.969266*n+1.8760108*t+.041556*e),Jt(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),sp(nn,tn,Ot(Rt,{brighter:function(t){return new nn(this.h,this.c,this.l+Tp*(null==t?1:t),this.opacity)},darker:function(t){return new nn(this.h,this.c,this.l-Tp*(null==t?1:t),this.opacity)},rgb:function(){return Ht(this).rgb()}}));var Rp=-.14861,zp=1.78277,Ip=-.29227,Dp=-.90649,Up=1.97294,qp=Up*Dp,jp=Up*zp,Fp=zp*Ip-Dp*Rp;sp(on,rn,Ot(Rt,{brighter:function(t){return t=null==t?fp:Math.pow(fp,t),new on(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?lp:Math.pow(lp,t),new on(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Ep,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new jt(255*(n+e*(Rp*r+zp*i)),255*(n+e*(Ip*r+Dp*i)),255*(n+e*(Up*r)),this.opacity)}}));var Yp,Bp,Xp,$p,Hp=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<n-1?t[r+2]:2*o-i;return an((e-r/n)*n,a,i,o,u)}},Vp=function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],a=t[(r+1)%n],u=t[(r+2)%n];return an((e-r/n)*n,i,o,a,u)}},Gp=function(t){return function(){return t}},Wp=function t(n){function e(t,n){var e=r((t=qt(t)).r,(n=qt(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),a=r(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}var r=ln(n);return e.gamma=t,e}(1),Zp=hn(Hp),Jp=hn(Vp),Qp=function(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(r),a=new Array(r);for(e=0;e<i;++e)o[e]=ad(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}},Kp=function(t,n){var e=new Date;return t=+t,n-=t,function(r){return e.setTime(t+n*r),e}},td=function(t,n){return t=+t,n-=t,function(e){return t+n*e}},nd="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ed=function(t,n){var e,r={},i={};null!==t&&"object"===("undefined"==typeof t?"undefined":nd(t))||(t={}),null!==n&&"object"===("undefined"==typeof n?"undefined":nd(n))||(n={});for(e in n)e in t?r[e]=ad(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}},rd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,id=new RegExp(rd.source,"g"),od=function(t,n){var e,r,i,o=rd.lastIndex=id.lastIndex=0,a=-1,u=[],c=[];for(t+="",n+="";(e=rd.exec(t))&&(r=id.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,c.push({i:a,x:td(e,r)})),o=id.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?c[0]?dn(c[0].x):pn(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)u[(e=c[r]).i]=e.x(t);return u.join("")})},ad=function(t,n){var e,r="undefined"==typeof n?"undefined":nd(n);return null==n||"boolean"===r?Gp(n):("number"===r?td:"string"===r?(e=zt(n))?(n=e,Wp):od:n instanceof zt?Wp:n instanceof Date?Kp:Array.isArray(n)?Qp:isNaN(n)?ed:td)(t,n)},ud=function(t,n){return t=+t,n-=t,function(e){return Math.round(t+n*e)}},cd=180/Math.PI,sd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ld=function(t,n,e,r,i,o){var a,u,c;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,c/=u),t*r<n*e&&(t=-t,n=-n,c=-c,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*cd,skewX:Math.atan(c)*cd,scaleX:a,scaleY:u}},fd=_n(vn,"px, ","px)","deg)"),hd=_n(yn,", ",")",")"),pd=Math.SQRT2,dd=2,vd=4,yd=1e-12,_d=function(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],c=n[1],s=n[2],l=u-i,f=c-o,h=l*l+f*f;if(h<yd)r=Math.log(s/a)/pd,e=function(t){return[i+t*l,o+t*f,a*Math.exp(pd*t*r)]};else{var p=Math.sqrt(h),d=(s*s-a*a+vd*h)/(2*a*dd*p),v=(s*s-a*a-vd*h)/(2*s*dd*p),y=Math.log(Math.sqrt(d*d+1)-d),_=Math.log(Math.sqrt(v*v+1)-v);r=(_-y)/pd,e=function(t){var n=t*r,e=gn(y),u=a/(dd*p)*(e*xn(pd*n+y)-mn(y));return[i+u*l,o+u*f,a*e/gn(pd*n+y)]}}return e.duration=1e3*r,e},gd=bn(sn),md=bn(fn),xd=Mn(sn),bd=Mn(fn),wd=En(sn),Md=En(fn),Ed=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e},Nd={value:function(){}};Tn.prototype=Nn.prototype={constructor:Tn,on:function(t,n){var e,r=this._,i=Sn(t+"",r),o=-1,a=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=An(r[e],t.name,n);else if(null==n)for(e in r)r[e]=An(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=kn(r[e],t.name)))return e}},copy:function t(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new Tn(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],o=0,e=r.length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var Td,Sd,kd=function(t){function n(t,n){var r,i,o=e(t,function(t,e){return r?r(t,e-1):(i=t,void(r=n?Pn(t,n):Cn(t)))});return o.columns=i,o}function e(t,n){function e(){if(l>=s)return a;if(i)return i=!1,o;var n,e=l;if(34===t.charCodeAt(e)){for(var r=e;r++<s;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return l=r+2,n=t.charCodeAt(r+1),13===n?(i=!0,10===t.charCodeAt(r+2)&&++l):10===n&&(i=!0),t.slice(e+1,r).replace(/""/g,'"')}for(;l<s;){var u=1;if(n=t.charCodeAt(l++),10===n)i=!0;else if(13===n)i=!0,10===t.charCodeAt(l)&&(++l,++u);else if(n!==c)continue;return t.slice(e,l-u)}return t.slice(e)}for(var r,i,o={},a={},u=[],s=t.length,l=0,f=0;(r=e())!==a;){for(var h=[];r!==o&&r!==a;)h.push(r),r=e();n&&null==(h=n(h,f++))||u.push(h)}return u}function r(n,e){return null==e&&(e=Ln(n)),[e.map(a).join(t)].concat(n.map(function(n){return e.map(function(t){return a(n[t])}).join(t)})).join("\n")}function i(t){return t.map(o).join("\n")}function o(n){return n.map(a).join(t)}function a(t){return null==t?"":u.test(t+="")?'"'+t.replace(/\"/g,'""')+'"':t}var u=new RegExp('["'+t+"\n]"),c=t.charCodeAt(0);return{parse:n,parseRows:e,format:r,formatRows:i}},Ad=kd(","),Cd=Ad.parse,Pd=Ad.parseRows,Ld=Ad.format,Od=Ad.formatRows,Rd=kd("\t"),zd=Rd.parse,Id=Rd.parseRows,Dd=Rd.format,Ud=Rd.formatRows,qd=0,jd=0,Fd=0,Yd=1e3,Bd=0,Xd=0,$d=0,Hd="object"===("undefined"==typeof performance?"undefined":nd(performance))&&performance.now?performance:Date,Vd="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};zn.prototype=In.prototype={constructor:zn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?On():+e)+(null==n?0:+n),this._next||Sd===this||(Sd?Sd._next=this:Td=this,Sd=this),this._call=t,this._time=e,Fn()},stop:function(){this._call&&(this._call=null,this._time=1/0,Fn())}};var Gd=function(t,n,e){var r=new zn;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},Wd=function(t,n,e){var r=new zn,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?On():+e,r.restart(function o(a){a+=i,r.restart(o,i+=n,e),t(a)},n,e),r)},Zd=new Date,Jd=new Date,Qd=Yn(function(){},function(t,n){t.setTime(+t+n)},function(t,n){return n-t});Qd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Yn(function(n){n.setTime(Math.floor(n/t)*t)},function(n,e){n.setTime(+n+e*t)},function(n,e){return(e-n)/t}):Qd:null};var Kd=Qd.range,tv=1e3,nv=6e4,ev=36e5,rv=864e5,iv=6048e5,ov=Yn(function(t){t.setTime(Math.floor(t/tv)*tv)},function(t,n){t.setTime(+t+n*tv)},function(t,n){return(n-t)/tv},function(t){return t.getUTCSeconds()}),av=ov.range,uv=Yn(function(t){t.setTime(Math.floor(t/nv)*nv)},function(t,n){t.setTime(+t+n*nv)},function(t,n){return(n-t)/nv},function(t){return t.getMinutes()}),cv=uv.range,sv=Yn(function(t){var n=t.getTimezoneOffset()*nv%ev;n<0&&(n+=ev),t.setTime(Math.floor((+t-n)/ev)*ev+n)},function(t,n){t.setTime(+t+n*ev)},function(t,n){return(n-t)/ev},function(t){return t.getHours()}),lv=sv.range,fv=Yn(function(t){t.setHours(0,0,0,0)},function(t,n){t.setDate(t.getDate()+n)},function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*nv)/rv},function(t){return t.getDate()-1}),hv=fv.range,pv=Bn(0),dv=Bn(1),vv=Bn(2),yv=Bn(3),_v=Bn(4),gv=Bn(5),mv=Bn(6),xv=pv.range,bv=dv.range,wv=vv.range,Mv=yv.range,Ev=_v.range,Nv=gv.range,Tv=mv.range,Sv=Yn(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,n){t.setMonth(t.getMonth()+n)},function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())},function(t){return t.getMonth()}),kv=Sv.range,Av=Yn(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t,n){return n.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});Av.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Yn(function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)},function(n,e){n.setFullYear(n.getFullYear()+e*t)}):null};var Cv=Av.range,Pv=Yn(function(t){t.setUTCSeconds(0,0)},function(t,n){t.setTime(+t+n*nv)},function(t,n){return(n-t)/nv},function(t){return t.getUTCMinutes()}),Lv=Pv.range,Ov=Yn(function(t){t.setUTCMinutes(0,0,0)},function(t,n){t.setTime(+t+n*ev)},function(t,n){return(n-t)/ev},function(t){return t.getUTCHours()}),Rv=Ov.range,zv=Yn(function(t){t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCDate(t.getUTCDate()+n)},function(t,n){return(n-t)/rv},function(t){return t.getUTCDate()-1}),Iv=zv.range,Dv=Xn(0),Uv=Xn(1),qv=Xn(2),jv=Xn(3),Fv=Xn(4),Yv=Xn(5),Bv=Xn(6),Xv=Dv.range,$v=Uv.range,Hv=qv.range,Vv=jv.range,Gv=Fv.range,Wv=Yv.range,Zv=Bv.range,Jv=Yn(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCMonth(t.getUTCMonth()+n)},function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())},function(t){return t.getUTCMonth()}),Qv=Jv.range,Kv=Yn(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)},function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});Kv.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Yn(function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)},function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)}):null};var ty,ny=Kv.range,ey=function(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]},ry=function(t){return t=ey(Math.abs(t)),t?t[1]:NaN},iy=function(t,n){return function(e,r){for(var i=e.length,o=[],a=0,u=t[0],c=0;i>0&&u>0&&(c+u+1>r&&(u=Math.max(1,r-c)),o.push(e.substring(i-=u,i+u)),!((c+=u+1)>r));)u=t[a=(a+1)%t.length];return o.reverse().join(n)}},oy=function(t,n){t=t.toPrecision(n);t:for(var e,r=t.length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;case"e":break t;default:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},ay=function(t,n){var e=ey(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(ty=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ey(t,Math.max(0,n+o-1))[0]},uy=function(t,n){var e=ey(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},cy={"":oy,"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return uy(100*t,n)},r:uy,s:ay,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},sy=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i,ly=function(t){return new $n(t)};$n.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var fy,hy=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],py=function(t){function n(t){function n(t){var n,i,c,g=d,m=v;if("c"===p)m=y(t)+m,t="";else{t=+t;var x=(t<0||1/t<0)&&(t*=-1,!0);if(t=y(t,h),x)for(n=-1,i=t.length,x=!1;++n<i;)if(c=t.charCodeAt(n),48<c&&c<58||"x"===p&&96<c&&c<103||"X"===p&&64<c&&c<71){x=!0;break}if(g=(x?"("===u?u:"-":"-"===u||"("===u?"":u)+g,m=m+("s"===p?hy[8+ty/3]:"")+(x&&"("===u?")":""),_)for(n=-1,i=t.length;++n<i;)if(c=t.charCodeAt(n),48>c||c>57){m=(46===c?o+t.slice(n+1):t.slice(n))+m,t=t.slice(0,n);break}}f&&!s&&(t=r(t,1/0));var b=g.length+t.length+m.length,w=b<l?new Array(l-b+1).join(e):"";switch(f&&s&&(t=r(w+t,w.length?l-m.length:1/0),w=""),a){case"<":return g+t+m+w;case"=":return g+w+t+m;case"^":return w.slice(0,b=w.length>>1)+g+t+m+w.slice(b)}return w+g+t+m}t=ly(t);var e=t.fill,a=t.align,u=t.sign,c=t.symbol,s=t.zero,l=t.width,f=t.comma,h=t.precision,p=t.type,d="$"===c?i[0]:"#"===c&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",v="$"===c?i[1]:/[%p]/.test(p)?"%":"",y=cy[p],_=!p||/[defgprs%]/.test(p);return h=null==h?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,h)):Math.max(0,Math.min(20,h)),n.toString=function(){return t+""},n}function e(t,e){var r=n((t=ly(t),t.type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(ry(e)/3))),o=Math.pow(10,-i),a=hy[8+i/3];return function(t){return r(o*t)+a}}var r=t.grouping&&t.thousands?iy(t.grouping,t.thousands):Hn,i=t.currency,o=t.decimal;return{format:n,formatPrefix:e}};Vn({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var dy,vy=function(t){return Math.max(0,-ry(Math.abs(t)))},yy=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(ry(n)/3)))-ry(Math.abs(t)))},_y=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,ry(n)-ry(t))+1},gy={"-":"",_:" ",0:"0"},my=/^\s*\d+/,xy=/^%/,by=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;$e({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",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"]});var wy="%Y-%m-%dT%H:%M:%S.%LZ",My=Date.prototype.toISOString?He:t.utcFormat(wy),Ey=+new Date("2000-01-01T00:00:00.000Z")?Ve:t.utcParse(wy),Ny=Array.prototype,Ty=Ny.map,Sy=Ny.slice,ky={name:"implicit"},Ay=function(t){return function(){return t}},Cy=function(t){return+t},Py=[0,1],Ly=function(n,r,i){var o,a=n[0],u=n[n.length-1],c=e(a,u,null==r?10:r);switch(i=ly(null==i?",f":i),i.type){case"s":var s=Math.max(Math.abs(a),Math.abs(u));return null!=i.precision||isNaN(o=yy(c,s))||(i.precision=o),t.formatPrefix(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=_y(c,Math.max(Math.abs(a),Math.abs(u))))||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=vy(c))||(i.precision=o-2*("%"===i.type))}return t.format(i)},Oy=function(t,n){t=t.slice();var e,r=0,i=t.length-1,o=t[r],a=t[i];return a<o&&(e=r,r=i,i=e,e=o,o=a,a=e),t[r]=n.floor(o),t[i]=n.ceil(a),t},Ry=1e3,zy=60*Ry,Iy=60*zy,Dy=24*Iy,Uy=7*Dy,qy=30*Dy,jy=365*Dy,Fy=function(){return Mr(Av,Sv,pv,fv,sv,uv,ov,Qd,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},Yy=function(){return Mr(Kv,Jv,Dv,zv,Ov,Pv,ov,Qd,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])},By=function(t){return t.match(/.{6}/g).map(function(t){return"#"+t})},Xy=By("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),$y=By("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),Hy=By("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),Vy=By("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),Gy=Md(rn(300,.5,0),rn(-240,.5,1)),Wy=Md(rn(-100,.75,.35),rn(80,1.5,.8)),Zy=Md(rn(260,.75,.35),rn(80,1.5,.8)),Jy=rn(),Qy=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return Jy.h=360*t-100,Jy.s=1.5-1.5*n,Jy.l=.8-.9*n,Jy+""},Ky=Er(By("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),t_=Er(By("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),n_=Er(By("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),e_=Er(By("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),r_="http://www.w3.org/1999/xhtml",i_={svg:"http://www.w3.org/2000/svg",xhtml:r_,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},o_=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),i_.hasOwnProperty(n)?{space:i_[n],local:t}:t},a_=function(t){var n=o_(t);return(n.local?Sr:Tr)(n)},u_=0;Ar.prototype=kr.prototype={constructor:Ar,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};var c_=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var s_=document.documentElement;if(!s_.matches){var l_=s_.webkitMatchesSelector||s_.msMatchesSelector||s_.mozMatchesSelector||s_.oMatchesSelector;c_=function(t){return function(){return l_.call(this,t)}}}}var f_=c_,h_={};if(t.event=null,"undefined"!=typeof document){var p_=document.documentElement;"onmouseenter"in p_||(h_={mouseenter:"mouseover",mouseleave:"mouseout"})}var d_=function(t,n,e){var r,i,o=Lr(t+""),a=o.length;{if(!(arguments.length<2)){for(u=n?Rr:Or,null==e&&(e=!1),r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var c,s=0,l=u.length;s<l;++s)for(r=0,c=u[s];r<a;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value}},v_=function(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e},y_=function(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]},__=function(t){var n=v_();return n.changedTouches&&(n=n.changedTouches[0]),y_(t,n)},g_=function(t){return null==t?Ir:function(){return this.querySelector(t)}},m_=function(t){"function"!=typeof t&&(t=g_(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,u=n[i],c=u.length,s=r[i]=new Array(c),l=0;l<c;++l)(o=u[l])&&(a=t.call(o,o.__data__,l,u))&&("__data__"in o&&(a.__data__=o.__data__),s[l]=a);return new bi(r,this._parents)},x_=function(t){return null==t?Dr:function(){return this.querySelectorAll(t)}},b_=function(t){"function"!=typeof t&&(t=x_(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],c=u.length,s=0;s<c;++s)(a=u[s])&&(r.push(t.call(a,a.__data__,s,u)),i.push(a));return new bi(r,i)},w_=function(t){"function"!=typeof t&&(t=f_(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&c.push(o);return new bi(r,this._parents)},M_=function(t){return new Array(t.length)},E_=function(){return new bi(this._enter||this._groups.map(M_),this._parents)};Ur.prototype={constructor:Ur,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var N_=function(t){return function(){return t}},T_="$",S_=function(t,n){if(!t)return p=new Array(this.size()),s=-1,this.each(function(t){p[++s]=t}),p;var e=n?jr:qr,r=this._parents,i=this._groups;"function"!=typeof t&&(t=N_(t));for(var o=i.length,a=new Array(o),u=new Array(o),c=new Array(o),s=0;s<o;++s){var l=r[s],f=i[s],h=f.length,p=t.call(l,l&&l.__data__,s,r),d=p.length,v=u[s]=new Array(d),y=a[s]=new Array(d),_=c[s]=new Array(h);e(l,f,v,y,_,p,n);for(var g,m,x=0,b=0;x<d;++x)if(g=v[x]){for(x>=b&&(b=x+1);!(m=y[b])&&++b<d;);g._next=m||null}}return a=new bi(a,r),a._enter=u,a._exit=c,a},k_=function(){return new bi(this._exit||this._groups.map(M_),this._parents)},A_=function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c,s=n[u],l=e[u],f=s.length,h=a[u]=new Array(f),p=0;p<f;++p)(c=s[p]||l[p])&&(h[p]=c);for(;u<r;++u)a[u]=n[u];return new bi(a,this._parents)},C_=function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},P_=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Fr);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],c=u.length,s=i[o]=new Array(c),l=0;l<c;++l)(a=u[l])&&(s[l]=a);s.sort(n)}return new bi(i,this._parents).order()},L_=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},O_=function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},R_=function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},z_=function(){var t=0;return this.each(function(){++t}),t},I_=function(){return!this.node()},D_=function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},U_=function(t,n){var e=o_(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?Br:Yr:"function"==typeof n?e.local?Vr:Hr:e.local?$r:Xr)(e,n))},q_=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView},j_=function(t,n,e){var r;return arguments.length>1?this.each((null==n?Gr:"function"==typeof n?Zr:Wr)(t,n,null==e?"":e)):q_(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)},F_=function(t,n){return arguments.length>1?this.each((null==n?Jr:"function"==typeof n?Kr:Qr)(t,n)):this.node()[t]};ei.prototype={add:function(t){var n=this._names.indexOf(t);n<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);
7n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Y_=function(t,n){var e=ti(t+"");if(arguments.length<2){for(var r=ni(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?ui:n?oi:ai)(e,n))},B_=function(t){return arguments.length?this.each(null==t?ci:("function"==typeof t?li:si)(t)):this.node().textContent},X_=function(t){return arguments.length?this.each(null==t?fi:("function"==typeof t?pi:hi)(t)):this.node().innerHTML},$_=function(){return this.each(di)},H_=function(){return this.each(vi)},V_=function(t){var n="function"==typeof t?t:a_(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},G_=function(t,n){var e="function"==typeof t?t:a_(t),r=null==n?yi:"function"==typeof n?n:g_(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},W_=function(){return this.each(_i)},Z_=function(t){return arguments.length?this.property("__data__",t):this.node().__data__},J_=function(t,n){return this.each(("function"==typeof n?xi:mi)(t,n))},Q_=[null];bi.prototype=wi.prototype={constructor:bi,select:m_,selectAll:b_,filter:w_,data:S_,enter:E_,exit:k_,merge:A_,order:C_,sort:P_,call:L_,nodes:O_,node:R_,size:z_,empty:I_,each:D_,attr:U_,style:j_,property:F_,classed:Y_,text:B_,html:X_,raise:$_,lower:H_,append:V_,insert:G_,remove:W_,datum:Z_,on:d_,dispatch:J_};var K_=function(t){return"string"==typeof t?new bi([[document.querySelector(t)]],[document.documentElement]):new bi([[t]],Q_)},tg=function(t){return"string"==typeof t?new bi([document.querySelectorAll(t)],[document.documentElement]):new bi([null==t?[]:t],Q_)},ng=function(t,n,e){arguments.length<3&&(e=n,n=v_().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return y_(t,r);return null},eg=function(t,n){null==n&&(n=v_().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=y_(t,n[e]);return i},rg=Nn("start","end","interrupt"),ig=[],og=0,ag=1,ug=2,cg=3,sg=4,lg=5,fg=6,hg=function(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};Ti(t,e,{name:n,index:r,group:i,on:rg,tween:ig,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:og})},pg=function(t,n){var e,r,i,o=t.__transition,a=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state>ug&&e.state<lg,e.state=fg,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}},dg=function(t){return this.each(function(){pg(this,t)})},vg=function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Ni(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Si:ki)(e,t,n))},yg=function(t,n){var e;return("number"==typeof n?td:n instanceof zt?Wp:(e=zt(n))?(n=e,Wp):od)(t,n)},_g=function(t,n){var e=o_(t),r="transform"===e?hd:yg;return this.attrTween(t,"function"==typeof n?(e.local?zi:Ri)(e,r,Ai(this,"attr."+t,n)):null==n?(e.local?Pi:Ci)(e):(e.local?Oi:Li)(e,r,n))},gg=function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=o_(t);return this.tween(e,(r.local?Ii:Di)(r,n))},mg=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Ui:qi)(n,t)):Ni(this.node(),n).delay},xg=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?ji:Fi)(n,t)):Ni(this.node(),n).duration},bg=function(t){var n=this._id;return arguments.length?this.each(Yi(n,t)):Ni(this.node(),n).ease},wg=function(t){"function"!=typeof t&&(t=f_(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,c=r[i]=[],s=0;s<u;++s)(o=a[s])&&t.call(o,o.__data__,s,a)&&c.push(o);return new Ki(r,this._parents,this._name,this._id)},Mg=function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var c,s=n[u],l=e[u],f=s.length,h=a[u]=new Array(f),p=0;p<f;++p)(c=s[p]||l[p])&&(h[p]=c);for(;u<r;++u)a[u]=n[u];return new Ki(a,this._parents,this._name,this._id)},Eg=function(t,n){var e=this._id;return arguments.length<2?Ni(this.node(),e).on.on(t):this.each(Xi(e,t,n))},Ng=function(){return this.on("end.remove",$i(this._id))},Tg=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=g_(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var u,c,s=r[a],l=s.length,f=o[a]=new Array(l),h=0;h<l;++h)(u=s[h])&&(c=t.call(u,u.__data__,h,s))&&("__data__"in u&&(c.__data__=u.__data__),f[h]=c,hg(f[h],n,e,h,f,Ni(u,e)));return new Ki(o,this._parents,n,e)},Sg=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=x_(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var c,s=r[u],l=s.length,f=0;f<l;++f)if(c=s[f]){for(var h,p=t.call(c,c.__data__,f,s),d=Ni(c,e),v=0,y=p.length;v<y;++v)(h=p[v])&&hg(h,n,e,v,p,d);o.push(p),a.push(c)}return new Ki(o,a,n,e)},kg=wi.prototype.constructor,Ag=function(){return new kg(this._groups,this._parents)},Cg=function(t,n,e){var r="transform"==(t+="")?fd:yg;return null==n?this.styleTween(t,Hi(t,r)).on("end.style."+t,Vi(t)):this.styleTween(t,"function"==typeof n?Wi(t,r,Ai(this,"style."+t,n)):Gi(t,r,n),e)},Pg=function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,Zi(t,n,null==e?"":e))},Lg=function(t){return this.tween("text","function"==typeof t?Qi(Ai(this,"text",t)):Ji(null==t?"":t+""))},Og=function(){for(var t=this._name,n=this._id,e=no(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,s=0;s<c;++s)if(a=u[s]){var l=Ni(a,n);hg(a,t,e,s,u,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Ki(r,this._parents,t,e)},Rg=0,zg=wi.prototype;Ki.prototype=to.prototype={constructor:Ki,select:Tg,selectAll:Sg,filter:wg,merge:Mg,selection:Ag,transition:Og,call:zg.call,nodes:zg.nodes,node:zg.node,size:zg.size,empty:zg.empty,each:zg.each,on:Eg,attr:_g,attrTween:gg,style:Cg,styleTween:Pg,text:Lg,remove:Ng,tween:vg,delay:mg,duration:xg,ease:bg};var Ig={time:null,delay:0,duration:250,ease:g},Dg=function(t){var n,e;t instanceof Ki?(n=t._id,t=t._name):(n=no(),(e=Ig).time=On(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],c=u.length,s=0;s<c;++s)(a=u[s])&&hg(a,t,n,s,u,e||eo(a,n));return new Ki(r,this._parents,t,n)};wi.prototype.interrupt=dg,wi.prototype.transition=Dg;var Ug=[null],qg=function(t,n){var e,r,i=t.__transition;if(i){n=null==n?null:n+"";for(r in i)if((e=i[r]).state>ag&&e.name===n)return new Ki([[t]],Ug,n,+r)}return null},jg=Array.prototype.slice,Fg=function(t){return t},Yg=1,Bg=2,Xg=3,$g=4,Hg=1e-6,Vg=function(){function t(t){var o,a=0;t.eachAfter(function(t){var e=t.children;e?(t.x=po(e),t.y=yo(e)):(t.x=o?a+=n(t,o):0,t.y=0,o=t)});var u=go(t),c=mo(t),s=u.x-n(u,c)/2,l=c.x+n(c,u)/2;return t.eachAfter(i?function(n){n.x=(n.x-t.x)*e,n.y=(t.y-n.y)*r}:function(n){n.x=(n.x-s)/(l-s)*e,n.y=(1-(t.y?n.y/t.y:1))*r})}var n=ho,e=1,r=1,i=!1;return t.separation=function(e){return arguments.length?(n=e,t):n},t.size=function(n){return arguments.length?(i=!1,e=+n[0],r=+n[1],t):i?null:[e,r]},t.nodeSize=function(n){return arguments.length?(i=!0,e=+n[0],r=+n[1],t):i?[e,r]:null},t},Gg=function(t){var n,e,r,i,o=this,a=[o];do for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r]);while(a.length);return this},Wg=function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},Zg=function(t){for(var n,e,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=a.pop();)t(i);return this},Jg=function(t){return this.eachAfter(function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e})},Qg=function(t){return this.eachBefore(function(n){n.children&&n.children.sort(t)})},Kg=function(t){for(var n=this,e=xo(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},tm=function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},nm=function(){var t=[];return this.each(function(n){t.push(n)}),t},em=function(){var t=[];return this.eachBefore(function(n){n.children||t.push(n)}),t},rm=function(){var t=this,n=[];return t.each(function(e){e!==t&&n.push({source:e.parent,target:e})}),n};To.prototype=bo.prototype={constructor:To,each:Gg,eachAfter:Zg,eachBefore:Wg,sum:Jg,sort:Qg,path:Kg,ancestors:tm,descendants:nm,leaves:em,links:rm,copy:wo};var im=function(t){for(var n,e=(t=t.slice()).length,r=null,i=r;e;){var o=new So(t[e-1]);i=i?i.next=o:r=o,t[n]=t[--e]}return{head:r,tail:i}},om=function(t){return Ao(im(t),[])},am=function(t){return Do(t),t},um=function(t){return function(){return t}},cm=function(){function t(t){return t.x=e/2,t.y=r/2,n?t.eachBefore(Yo(n)).eachAfter(Bo(i,.5)).eachBefore(Xo(1)):t.eachBefore(Yo(Fo)).eachAfter(Bo(jo,1)).eachAfter(Bo(i,t.r/Math.min(e,r))).eachBefore(Xo(Math.min(e,r)/(2*t.r))),t}var n=null,e=1,r=1,i=jo;return t.radius=function(e){return arguments.length?(n=Uo(e),t):n},t.size=function(n){return arguments.length?(e=+n[0],r=+n[1],t):[e,r]},t.padding=function(n){return arguments.length?(i="function"==typeof n?n:um(+n),t):i},t},sm=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},lm=function(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,s=t.value&&(r-n)/t.value;++u<c;)o=a[u],o.y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*s},fm=function(){function t(t){var a=t.height+1;return t.x0=t.y0=i,t.x1=e,t.y1=r/a,t.eachBefore(n(r,a)),o&&t.eachBefore(sm),t}function n(t,n){return function(e){e.children&&lm(e,e.x0,t*(e.depth+1)/n,e.x1,t*(e.depth+2)/n);var r=e.x0,o=e.y0,a=e.x1-i,u=e.y1-i;a<r&&(r=a=(r+a)/2),u<o&&(o=u=(o+u)/2),e.x0=r,e.y0=o,e.x1=a,e.y1=u}}var e=1,r=1,i=0,o=!1;return t.round=function(n){return arguments.length?(o=!!n,t):o},t.size=function(n){return arguments.length?(e=+n[0],r=+n[1],t):[e,r]},t.padding=function(n){return arguments.length?(i=+n,t):i},t},hm="$",pm={depth:-1},dm={},vm=function(){function t(t){var r,i,o,a,u,c,s,l=t.length,f=new Array(l),h={};for(i=0;i<l;++i)r=t[i],u=f[i]=new To(r),null!=(c=n(r,i,t))&&(c+="")&&(s=hm+(u.id=c),h[s]=s in h?dm:u);for(i=0;i<l;++i)if(u=f[i],c=e(t[i],i,t),null!=c&&(c+="")){if(a=h[hm+c],!a)throw new Error("missing: "+c);if(a===dm)throw new Error("ambiguous: "+c);a.children?a.children.push(u):a.children=[u],u.parent=a}else{if(o)throw new Error("multiple roots");o=u}if(!o)throw new Error("no root");if(o.parent=pm,o.eachBefore(function(t){t.depth=t.parent.depth+1,--l}).eachBefore(No),o.parent=null,l>0)throw new Error("cycle");return o}var n=$o,e=Ho;return t.id=function(e){return arguments.length?(n=qo(e),t):n},t.parentId=function(n){return arguments.length?(e=qo(n),t):e},t};Ko.prototype=Object.create(To.prototype);var ym=function(){function t(t){var r=ta(t);if(r.eachAfter(n),r.parent.m=-r.z,r.eachBefore(e),c)t.eachBefore(i);else{var s=t,l=t,f=t;t.eachBefore(function(t){t.x<s.x&&(s=t),t.x>l.x&&(l=t),t.depth>f.depth&&(f=t)});var h=s===l?1:o(s,l)/2,p=h-s.x,d=a/(l.x+h+p),v=u/(f.depth||1);t.eachBefore(function(t){t.x=(t.x+p)*d,t.y=t.depth*v})}return t}function n(t){var n=t.children,e=t.parent.children,i=t.i?e[t.i-1]:null;if(n){Jo(t);var a=(n[0].z+n[n.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||e[0])}function e(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,n,e){if(n){for(var r,i=t,a=t,u=n,c=i.parent.children[0],s=i.m,l=a.m,f=u.m,h=c.m;u=Wo(u),i=Go(i),u&&i;)c=Go(c),a=Wo(a),a.a=t,r=u.z+f-i.z-s+o(u._,i._),r>0&&(Zo(Qo(u,t,e),t,r),s+=r,l+=r),f+=u.m,s+=i.m,h+=c.m,l+=a.m;u&&!Wo(a)&&(a.t=u,a.m+=f-l),i&&!Go(c)&&(c.t=i,c.m+=s-h,e=t)}return e}function i(t){t.x*=a,t.y=t.depth*u}var o=Vo,a=1,u=1,c=null;return t.separation=function(n){return arguments.length?(o=n,t):o},t.size=function(n){return arguments.length?(c=!1,a=+n[0],u=+n[1],t):c?null:[a,u]},t.nodeSize=function(n){return arguments.length?(c=!0,a=+n[0],u=+n[1],t):c?[a,u]:null},t},_m=function(t,n,e,r,i){for(var o,a=t.children,u=-1,c=a.length,s=t.value&&(i-e)/t.value;++u<c;)o=a[u],o.x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*s},gm=(1+Math.sqrt(5))/2,mm=function t(n){function e(t,e,r,i,o){na(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(gm),xm=function(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(n),a=[0],r&&t.eachBefore(sm),t}function n(t){var n=a[t.depth],r=t.x0+n,i=t.y0+n,o=t.x1-n,h=t.y1-n;o<r&&(r=o=(r+o)/2),h<i&&(i=h=(i+h)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=h,t.children&&(n=a[t.depth+1]=u(t)/2,r+=f(t)-n,i+=c(t)-n,o-=s(t)-n,h-=l(t)-n,o<r&&(r=o=(r+o)/2),h<i&&(i=h=(i+h)/2),e(t,r,i,o,h))}var e=mm,r=!1,i=1,o=1,a=[0],u=jo,c=jo,s=jo,l=jo,f=jo;return t.round=function(n){return arguments.length?(r=!!n,t):r},t.size=function(n){return arguments.length?(i=+n[0],o=+n[1],t):[i,o]},t.tile=function(n){return arguments.length?(e=qo(n),t):e},t.padding=function(n){return arguments.length?t.paddingInner(n).paddingOuter(n):t.paddingInner()},t.paddingInner=function(n){return arguments.length?(u="function"==typeof n?n:um(+n),t):u},t.paddingOuter=function(n){return arguments.length?t.paddingTop(n).paddingRight(n).paddingBottom(n).paddingLeft(n):t.paddingTop()},t.paddingTop=function(n){return arguments.length?(c="function"==typeof n?n:um(+n),t):c},t.paddingRight=function(n){return arguments.length?(s="function"==typeof n?n:um(+n),t):s},t.paddingBottom=function(n){return arguments.length?(l="function"==typeof n?n:um(+n),t):l},t.paddingLeft=function(n){return arguments.length?(f="function"==typeof n?n:um(+n),t):f},t},bm=function(t,n,e,r,i){function o(t,n,e,r,i,a,u){if(t>=n-1){var s=c[t];return s.x0=r,s.y0=i,s.x1=a,s.y1=u,void 0}for(var f=l[t],h=e/2+f,p=t+1,d=n-1;p<d;){var v=p+d>>>1;l[v]<h?p=v+1:d=v}var y=l[p]-f,_=e-y;if(u-i>a-r){var g=(i*_+u*y)/e;o(t,p,y,r,i,a,g),o(p,n,_,r,g,a,u)}else{var m=(r*_+a*y)/e;o(t,p,y,r,i,m,u),o(p,n,_,m,i,a,u)}}var a,u,c=t.children,s=c.length,l=new Array(s+1);for(l[0]=u=a=0;a<s;++a)l[a+1]=u+=c[a].value;o(0,s,t.value,n,e,r,i)},wm=function(t,n,e,r,i){(1&t.depth?_m:lm)(t,n,e,r,i)},Mm=function t(n){function e(t,e,r,i,o){if((a=t._squarify)&&a.ratio===n)for(var a,u,c,s,l,f=-1,h=a.length,p=t.value;++f<h;){for(u=a[f],c=u.children,s=u.value=0,l=c.length;s<l;++s)u.value+=c[s].value;u.dice?lm(u,e,r,i,r+=(o-r)*u.value/p):_m(u,e,r,e+=(i-e)*u.value/p,o),p-=u.value}else t._squarify=a=na(n,t,e,r,i,o),a.ratio=n}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(gm),Em=function(){t.event.preventDefault(),t.event.stopImmediatePropagation()},Nm=function(t){var n=t.document.documentElement,e=K_(t).on("dragstart.drag",Em,!0);"onselectstart"in n?e.on("selectstart.drag",Em,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")},Tm=function(t){return function(){return t}};ia.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Sm=function(){function n(t){t.on("mousedown.drag",e).on("touchstart.drag",o).on("touchmove.drag",a).on("touchend.drag touchcancel.drag",u).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function e(){if(!l&&f.apply(this,arguments)){var n=c("mouse",h.apply(this,arguments),__,this,arguments);n&&(K_(t.event.view).on("mousemove.drag",r,!0).on("mouseup.drag",i,!0),Nm(t.event.view),ea(),s=!1,n("start"))}}function r(){Em(),s=!0,d.mouse("drag")}function i(){K_(t.event.view).on("mousemove.drag mouseup.drag",null),ra(t.event.view,s),Em(),d.mouse("end")}function o(){if(f.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=h.apply(this,arguments),o=r.length;for(n=0;n<o;++n)(e=c(r[n].identifier,i,ng,this,arguments))&&(ea(),e("start"))}}function a(){var n,e,r=t.event.changedTouches,i=r.length;for(n=0;n<i;++n)(e=d[r[n].identifier])&&(Em(),e("drag"))}function u(){var n,e,r=t.event.changedTouches,i=r.length;for(l&&clearTimeout(l),l=setTimeout(function(){l=null},500),n=0;n<i;++n)(e=d[r[n].identifier])&&(ea(),e("end"))}function c(e,r,i,o,a){var u,c,s,l=i(r,e),f=v.copy();if(zr(new ia(n,"beforestart",u,e,y,l[0],l[1],0,0,f),function(){return null!=(t.event.subject=u=p.apply(o,a))&&(c=u.x-l[0]||0,s=u.y-l[1]||0,!0)}))return function t(h){var p,v=l;switch(h){case"start":d[e]=t,p=y++;break;case"end":delete d[e],--y;case"drag":l=i(r,e),p=y}zr(new ia(n,h,u,e,p,l[0]+c,l[1]+s,l[0]-v[0],l[1]-v[1],f),f.apply,f,[h,o,a])}}var s,l,f=oa,h=aa,p=ua,d={},v=Nn("start","drag","end"),y=0;return n.filter=function(t){return arguments.length?(f="function"==typeof t?t:Tm(!!t),n):f},n.container=function(t){return arguments.length?(h="function"==typeof t?t:Tm(t),n):h},n.subject=function(t){return arguments.length?(p="function"==typeof t?t:Tm(t),n):p},n.on=function(){var t=v.on.apply(v,arguments);return t===v?n:t},n},km=function(t){return function(){return t}};la.prototype={constructor:la,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=da(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(ha(this,e),t=e,e=t.U),e.C=!1,r.C=!0,pa(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(pa(this,e),t=e,e=t.U),e.C=!1,r.C=!0,ha(this,r))),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,a=t.R;if(e=o?a?da(a):o:a,i?i.L===t?i.L=e:i.R=e:this._=e,o&&a?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==a?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=a,a.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r){if(t&&t.C)return void(t.C=!1);do{if(t===this._)break;if(t===i.L){if(n=i.R,n.C&&(n.C=!1,i.C=!0,ha(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,pa(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,ha(this,i),t=this._;break}}else if(n=i.L,n.C&&(n.C=!1,i.C=!0,pa(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,ha(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,pa(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Am,Cm,Pm,Lm,Om,Rm=[],zm=[],Im=1e-6,Dm=1e-12;qa.prototype={constructor:qa,polygons:function(){var t=this.edges;return this.cells.map(function(n){var e=n.halfedges.map(function(e){return Ma(n,t[e])});return e.data=n.site.data,e})},triangles:function t(){var t=[],n=this.edges;return this.cells.forEach(function(e,r){for(var i,o=e.site,a=e.halfedges,u=-1,c=a.length,s=n[a[c-1]],l=s.left===o?s.right:s.left;++u<c;)i=l,s=n[a[u]],l=s.left===o?s.right:s.left,i&&l&&r<i.index&&r<l.index&&Da(o,i,l)<0&&t.push([o.data,i.data,l.data])}),t},links:function(){return this.edges.filter(function(t){return t.right}).map(function(t){return{source:t.left.data,target:t.right.data}})},find:function(t,n,e){var r,i=this,o=i._found||0,a=i.cells[o]||i.cells[o=0],u=t-a.site[0],c=n-a.site[1],s=u*u+c*c;do a=i.cells[r=o],o=null,a.halfedges.forEach(function(e){var r=i.edges[e],u=r.left;if(u!==a.site&&u||(u=r.right)){var c=t-u[0],l=n-u[1],f=c*c+l*l;f<s&&(s=f,o=u.index)}});while(null!==o);return i._found=r,null==e||s<=e*e?a.site:null}};var Um=function(){function t(t){return new qa(t.map(function(r,i){var o=[Math.round(n(r,i,t)/Im)*Im,Math.round(e(r,i,t)/Im)*Im];return o.index=i,o.data=r,o}),r)}var n=ca,e=sa,r=null;return t.polygons=function(n){return t(n).polygons()},t.links=function(n){return t(n).links()},t.triangles=function(n){return t(n).triangles()},t.x=function(e){return arguments.length?(n="function"==typeof e?e:km(+e),t):n},t.y=function(n){return arguments.length?(e="function"==typeof n?n:km(+n),t):e},t.extent=function(n){return arguments.length?(r=null==n?null:[[+n[0][0],+n[0][1]],[+n[1][0],+n[1][1]]],t):r&&[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},t.size=function(n){return arguments.length?(r=null==n?null:[[0,0],[+n[0],+n[1]]],t):r&&[r[1][0]-r[0][0],r[1][1]-r[0][1]]},t},qm=function(t){return function(){return t}};Fa.prototype={constructor:Fa,scale:function(t){return 1===t?this:new Fa(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new Fa(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var jm=new Fa(1,0,0);Ya.prototype=Fa.prototype;var Fm=function(){t.event.preventDefault(),t.event.stopImmediatePropagation()},Ym=function(){function n(t){t.on("wheel.zoom",s).on("mousedown.zoom",l).on("dblclick.zoom",f).on("touchstart.zoom",h).on("touchmove.zoom",p).on("touchend.zoom touchcancel.zoom",d).style("-webkit-tap-highlight-color","rgba(0,0,0,0)").property("__zoom",Ha)}function e(t,n){return n=Math.max(m,Math.min(x,n)),n===t.k?t:new Fa(n,t.x,t.y)}function r(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new Fa(t.k,r,i)}function i(t,n){var e=t.invertX(n[0][0])-b,r=t.invertX(n[1][0])-w,i=t.invertY(n[0][1])-M,o=t.invertY(n[1][1])-E;return t.translate(r>e?(e+r)/2:Math.min(0,e)||Math.max(0,r),o>i?(i+o)/2:Math.min(0,i)||Math.max(0,o))}function o(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function a(t,n,e){t.on("start.zoom",function(){u(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){u(this,arguments).end()}).tween("zoom",function(){var t=this,r=arguments,i=u(t,r),a=g.apply(t,r),c=e||o(a),s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=t.__zoom,f="function"==typeof n?n.apply(t,r):n,h=T(l.invert(c).concat(s/l.k),f.invert(c).concat(s/f.k));return function(t){if(1===t)t=f;else{var n=h(t),e=s/n[2];t=new Fa(e,c[0]-n[0]*e,c[1]-n[1]*e)}i.zoom(null,t)}})}function u(t,n){for(var e,r=0,i=S.length;r<i;++r)if((e=S[r]).that===t)return e;return new c(t,n)}function c(t,n){this.that=t,this.args=n,this.index=-1,this.active=0,this.extent=g.apply(t,n)}function s(){function n(){o.wheel=null,o.end()}if(_.apply(this,arguments)){var o=u(this,arguments),a=this.__zoom,c=Math.max(m,Math.min(x,a.k*Math.pow(2,-t.event.deltaY*(t.event.deltaMode?120:1)/500))),s=__(this);if(o.wheel)o.mouse[0][0]===s[0]&&o.mouse[0][1]===s[1]||(o.mouse[1]=a.invert(o.mouse[0]=s)),clearTimeout(o.wheel);else{if(a.k===c)return;o.mouse=[s,a.invert(s)],pg(this),o.start()}Fm(),o.wheel=setTimeout(n,C),o.zoom("mouse",i(r(e(a,c),o.mouse[0],o.mouse[1]),o.extent))}}function l(){function n(){Fm(),o.moved=!0,o.zoom("mouse",i(r(o.that.__zoom,o.mouse[0]=__(o.that),o.mouse[1]),o.extent))}function e(){a.on("mousemove.zoom mouseup.zoom",null),ra(t.event.view,o.moved),Fm(),o.end()}if(!y&&_.apply(this,arguments)){var o=u(this,arguments),a=K_(t.event.view).on("mousemove.zoom",n,!0).on("mouseup.zoom",e,!0),c=__(this);Nm(t.event.view),Ba(),o.mouse=[c,this.__zoom.invert(c)],pg(this),o.start()}}function f(){if(_.apply(this,arguments)){var o=this.__zoom,u=__(this),c=o.invert(u),s=o.k*(t.event.shiftKey?.5:2),l=i(r(e(o,s),u,c),g.apply(this,arguments));Fm(),N>0?K_(this).transition().duration(N).call(a,l,u):K_(this).call(n.transform,l)}}function h(){if(_.apply(this,arguments)){var n,e,r,i=u(this,arguments),o=t.event.changedTouches,a=o.length;for(Ba(),n=0;n<a;++n)e=o[n],r=ng(this,o,e.identifier),r=[r,this.__zoom.invert(r),e.identifier],i.touch0?i.touch1||(i.touch1=r):i.touch0=r;return v&&(v=clearTimeout(v),!i.touch1)?(i.end(),r=K_(this).on("dblclick.zoom"),void(r&&r.apply(this,arguments))):void(t.event.touches.length===a&&(v=setTimeout(function(){v=null},A),pg(this),i.start()))}}function p(){var n,o,a,c,s=u(this,arguments),l=t.event.changedTouches,f=l.length;for(Fm(),v&&(v=clearTimeout(v)),n=0;n<f;++n)o=l[n],a=ng(this,l,o.identifier),s.touch0&&s.touch0[2]===o.identifier?s.touch0[0]=a:s.touch1&&s.touch1[2]===o.identifier&&(s.touch1[0]=a);if(o=s.that.__zoom,s.touch1){var h=s.touch0[0],p=s.touch0[1],d=s.touch1[0],y=s.touch1[1],_=(_=d[0]-h[0])*_+(_=d[1]-h[1])*_,g=(g=y[0]-p[0])*g+(g=y[1]-p[1])*g;o=e(o,Math.sqrt(_/g)),a=[(h[0]+d[0])/2,(h[1]+d[1])/2],c=[(p[0]+y[0])/2,(p[1]+y[1])/2]}else{if(!s.touch0)return;a=s.touch0[0],c=s.touch0[1]}s.zoom("touch",i(r(o,a,c),s.extent))}function d(){var n,e,r=u(this,arguments),i=t.event.changedTouches,o=i.length;for(Ba(),y&&clearTimeout(y),y=setTimeout(function(){y=null},A),n=0;n<o;++n)e=i[n],r.touch0&&r.touch0[2]===e.identifier?delete r.touch0:r.touch1&&r.touch1[2]===e.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0||r.end()}var v,y,_=Xa,g=$a,m=0,x=1/0,b=-x,w=x,M=b,E=w,N=250,T=_d,S=[],k=Nn("start","zoom","end"),A=500,C=150;return n.transform=function(t,n){var e=t.selection?t.selection():t;e.property("__zoom",Ha),t!==e?a(t,n):e.interrupt().each(function(){u(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()})},n.scaleBy=function(t,e){n.scaleTo(t,function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n})},n.scaleTo=function(t,a){n.transform(t,function(){var t=g.apply(this,arguments),n=this.__zoom,u=o(t),c=n.invert(u),s="function"==typeof a?a.apply(this,arguments):a;return i(r(e(n,s),u,c),t)})},n.translateBy=function(t,e,r){n.transform(t,function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),g.apply(this,arguments))})},c.prototype={start:function(){return 1===++this.active&&(this.index=S.push(this)-1,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0===--this.active&&(S.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){zr(new ja(n,t,this.that.__zoom),k.apply,k,[t,this.that,this.args])}},n.filter=function(t){return arguments.length?(_="function"==typeof t?t:qm(!!t),n):_},n.extent=function(t){return arguments.length?(g="function"==typeof t?t:qm([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),n):g},n.scaleExtent=function(t){return arguments.length?(m=+t[0],x=+t[1],n):[m,x]},n.translateExtent=function(t){return arguments.length?(b=+t[0][0],w=+t[1][0],M=+t[0][1],E=+t[1][1],n):[[b,M],[w,E]]},n.duration=function(t){return arguments.length?(N=+t,n):N},n.interpolate=function(t){return arguments.length?(T=t,n):T},n.on=function(){var t=k.on.apply(k,arguments);return t===k?n:t},n},Bm=function(t){return function(){return t}},Xm=function(t,n,e){this.target=t,this.type=n,this.selection=e},$m=function(){t.event.preventDefault(),t.event.stopImmediatePropagation()},Hm={name:"drag"},Vm={name:"space"},Gm={name:"handle"},Wm={name:"center"},Zm={name:"x",handles:["e","w"].map(Ga),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Jm={name:"y",handles:["n","s"].map(Ga),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Qm={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Ga),input:function(t){return t},output:function(t){return t}},Km={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},tx={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},nx={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},ex={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},rx={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1},ix=function(){return eu(Qm)},ox=Math.cos,ax=Math.sin,ux=Math.PI,cx=ux/2,sx=2*ux,lx=Math.max,fx=function(){function t(t){var o,a,u,c,s,l,f=t.length,h=[],p=Tl(f),d=[],v=[],y=v.groups=new Array(f),_=new Array(f*f);for(o=0,s=-1;++s<f;){for(a=0,l=-1;++l<f;)a+=t[s][l];h.push(a),d.push(Tl(f)),o+=a}for(e&&p.sort(function(t,n){return e(h[t],h[n])}),r&&d.forEach(function(n,e){n.sort(function(n,i){return r(t[e][n],t[e][i])})}),o=lx(0,sx-n*f)/o,c=o?n:sx/f,a=0,s=-1;++s<f;){for(u=a,l=-1;++l<f;){var g=p[s],m=d[g][l],x=t[g][m],b=a,w=a+=x*o;_[m*f+g]={index:g,subindex:m,startAngle:b,endAngle:w,value:x}}y[g]={index:g,startAngle:u,endAngle:a,value:h[g]},a+=c}for(s=-1;++s<f;)for(l=s-1;++l<f;){var M=_[l*f+s],E=_[s*f+l];(M.value||E.value)&&v.push(M.value<E.value?{source:E,target:M}:{source:M,target:E})}return i?v.sort(i):v}var n=0,e=null,r=null,i=null;return t.padAngle=function(e){return arguments.length?(n=lx(0,e),t):n},t.sortGroups=function(n){return arguments.length?(e=n,t):e},t.sortSubgroups=function(n){return arguments.length?(r=n,t):r},t.sortChords=function(n){return arguments.length?(null==n?i=null:(i=ru(n))._=n,t):i&&i._},t},hx=Array.prototype.slice,px=function(t){return function(){return t}},dx=function(){function t(){var t,u=hx.call(arguments),c=n.apply(this,u),s=e.apply(this,u),l=+r.apply(this,(u[0]=c,u)),f=i.apply(this,u)-cx,h=o.apply(this,u)-cx,p=l*ox(f),d=l*ax(f),v=+r.apply(this,(u[0]=s,u)),y=i.apply(this,u)-cx,_=o.apply(this,u)-cx;if(a||(a=t=R()),a.moveTo(p,d),a.arc(0,0,l,f,h),f===y&&h===_||(a.quadraticCurveTo(0,0,v*ox(y),v*ax(y)),a.arc(0,0,v,y,_)),a.quadraticCurveTo(0,0,p,d),a.closePath(),t)return a=null,t+""||null}var n=iu,e=ou,r=au,i=uu,o=cu,a=null;return t.radius=function(n){return arguments.length?(r="function"==typeof n?n:px(+n),t):r},t.startAngle=function(n){return arguments.length?(i="function"==typeof n?n:px(+n),t):i},t.endAngle=function(n){return arguments.length?(o="function"==typeof n?n:px(+n),t):o},t.source=function(e){return arguments.length?(n=e,t):n},t.target=function(n){return arguments.length?(e=n,t):e},t.context=function(n){return arguments.length?(a=null==n?null:n,t):a},t},vx=function(){return new su};su.prototype={constructor:su,reset:function(){this.s=this.t=0},add:function(t){lu(Vx,t,this.t),lu(this,Vx.s,this.s),this.s?this.t+=Vx.t:this.s=Vx.t},valueOf:function(){return this.s}};var yx,_x,gx,mx,xx,bx,wx,Mx,Ex,Nx,Tx,Sx,kx,Ax,Cx,Px,Lx,Ox,Rx,zx,Ix,Dx,Ux,qx,jx,Fx,Yx,Bx,Xx,$x,Hx,Vx=new su,Gx=1e-6,Wx=1e-12,Zx=Math.PI,Jx=Zx/2,Qx=Zx/4,Kx=2*Zx,tb=180/Zx,nb=Zx/180,eb=Math.abs,rb=Math.atan,ib=Math.atan2,ob=Math.cos,ab=Math.ceil,ub=Math.exp,cb=Math.log,sb=Math.pow,lb=Math.sin,fb=Math.sign||function(t){return t>0?1:t<0?-1:0},hb=Math.sqrt,pb=Math.tan,db={Feature:function(t,n){vu(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)vu(e[r].geometry,n)}},vb={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){yu(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)yu(e[r],n,0)},Polygon:function(t,n){_u(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)_u(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)vu(e[r],n)}},yb=function(t,n){t&&db.hasOwnProperty(t.type)?db[t.type](t,n):vu(t,n)},_b=vx(),gb=vx(),mb={point:du,lineStart:du,lineEnd:du,polygonStart:function(){_b.reset(),mb.lineStart=gu,mb.lineEnd=mu},polygonEnd:function(){var t=+_b;gb.add(t<0?Kx+t:t),this.lineStart=this.lineEnd=this.point=du},sphere:function(){gb.add(Kx)}},xb=function(t){return gb.reset(),yb(t,mb),2*gb},bb=vx(),wb={point:Au,lineStart:Pu,lineEnd:Lu,polygonStart:function(){wb.point=Ou,wb.lineStart=Ru,wb.lineEnd=zu,bb.reset(),mb.polygonStart()},polygonEnd:function(){mb.polygonEnd(),wb.point=Au,wb.lineStart=Pu,wb.lineEnd=Lu,_b<0?(bx=-(Mx=180),
8wx=-(Ex=90)):bb>Gx?Ex=90:bb<-Gx&&(wx=-90),Cx[0]=bx,Cx[1]=Mx}},Mb=function(t){var n,e,r,i,o,a,u;if(Ex=Mx=-(bx=wx=1/0),Ax=[],yb(t,wb),e=Ax.length){for(Ax.sort(Du),n=1,r=Ax[0],o=[r];n<e;++n)i=Ax[n],Uu(r,i[0])||Uu(r,i[1])?(Iu(r[0],i[1])>Iu(r[0],r[1])&&(r[1]=i[1]),Iu(i[0],r[1])>Iu(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(a=-(1/0),e=o.length-1,n=0,r=o[e];n<=e;r=i,++n)i=o[n],(u=Iu(r[1],i[0]))>a&&(a=u,bx=i[0],Mx=r[1])}return Ax=Cx=null,bx===1/0||wx===1/0?[[NaN,NaN],[NaN,NaN]]:[[bx,wx],[Mx,Ex]]},Eb={sphere:du,point:qu,lineStart:Fu,lineEnd:Xu,polygonStart:function(){Eb.lineStart=$u,Eb.lineEnd=Hu},polygonEnd:function(){Eb.lineStart=Fu,Eb.lineEnd=Xu}},Nb=function(t){Px=Lx=Ox=Rx=zx=Ix=Dx=Ux=qx=jx=Fx=0,yb(t,Eb);var n=qx,e=jx,r=Fx,i=n*n+e*e+r*r;return i<Wx&&(n=Ix,e=Dx,r=Ux,Lx<Gx&&(n=Ox,e=Rx,r=zx),i=n*n+e*e+r*r,i<Wx)?[NaN,NaN]:[ib(e,n)*tb,hu(r/hb(i))*tb]},Tb=function(t){return function(){return t}},Sb=function(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return e=n.invert(e,r),e&&t.invert(e[0],e[1])}),e};Wu.invert=Wu;var kb,Ab,Cb,Pb,Lb,Ob,Rb,zb,Ib,Db,Ub,qb=function(t){function n(n){return n=t(n[0]*nb,n[1]*nb),n[0]*=tb,n[1]*=tb,n}return t=Zu(t[0]*nb,t[1]*nb,t.length>2?t[2]*nb:0),n.invert=function(n){return n=t.invert(n[0]*nb,n[1]*nb),n[0]*=tb,n[1]*=tb,n},n},jb=function(){function t(t,n){e.push(t=r(t,n)),t[0]*=tb,t[1]*=tb}function n(){var t=i.apply(this,arguments),n=o.apply(this,arguments)*nb,c=a.apply(this,arguments)*nb;return e=[],r=Zu(-t[0]*nb,-t[1]*nb,0).invert,tc(u,n,c,1),t={type:"Polygon",coordinates:[e]},e=r=null,t}var e,r,i=Tb([0,0]),o=Tb(90),a=Tb(6),u={point:t};return n.center=function(t){return arguments.length?(i="function"==typeof t?t:Tb([+t[0],+t[1]]),n):i},n.radius=function(t){return arguments.length?(o="function"==typeof t?t:Tb(+t),n):o},n.precision=function(t){return arguments.length?(a="function"==typeof t?t:Tb(+t),n):a},n},Fb=function(){var t,n=[];return{point:function(n,e){t.push([n,e])},lineStart:function(){n.push(t=[])},lineEnd:du,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function e(){var e=n;return n=[],t=null,e}}},Yb=function(t,n,e,r,i,o){var a,u=t[0],c=t[1],s=n[0],l=n[1],f=0,h=1,p=s-u,d=l-c;if(a=e-u,p||!(a>0)){if(a/=p,p<0){if(a<f)return;a<h&&(h=a)}else if(p>0){if(a>h)return;a>f&&(f=a)}if(a=i-u,p||!(a<0)){if(a/=p,p<0){if(a>h)return;a>f&&(f=a)}else if(p>0){if(a<f)return;a<h&&(h=a)}if(a=r-c,d||!(a>0)){if(a/=d,d<0){if(a<f)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>f&&(f=a)}if(a=o-c,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>f&&(f=a)}else if(d>0){if(a<f)return;a<h&&(h=a)}return f>0&&(t[0]=u+f*p,t[1]=c+f*d),h<1&&(n[0]=u+h*p,n[1]=c+h*d),!0}}}}},Bb=function(t,n){return eb(t[0]-n[0])<Gx&&eb(t[1]-n[1])<Gx},Xb=function(t,n,e,r,i){var o,a,u=[],c=[];if(t.forEach(function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],a=t[n];if(Bb(r,a)){for(i.lineStart(),o=0;o<n;++o)i.point((r=t[o])[0],r[1]);return void i.lineEnd()}u.push(e=new ec(r,t,null,!0)),c.push(e.o=new ec(r,null,e,!1)),u.push(e=new ec(a,t,null,!1)),c.push(e.o=new ec(a,null,e,!0))}}),u.length){for(c.sort(n),rc(u),rc(c),o=0,a=c.length;o<a;++o)c[o].e=e=!e;for(var s,l,f=u[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;s=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,a=s.length;o<a;++o)i.point((l=s[o])[0],l[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=h.p.z,o=s.length-1;o>=0;--o)i.point((l=s[o])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}h=h.o,s=h.z,p=!p}while(!h.v);i.lineEnd()}}},$b=1e9,Hb=-$b,Vb=function(){var t,n,e,r=0,i=0,o=960,a=500;return e={stream:function(e){return t&&n===e?t:t=ic(r,i,o,a)(n=e)},extent:function(u){return arguments.length?(r=+u[0][0],i=+u[0][1],o=+u[1][0],a=+u[1][1],t=n=null,e):[[r,i],[o,a]]}}},Gb=vx(),Wb={sphere:du,point:du,lineStart:oc,lineEnd:du,polygonStart:du,polygonEnd:du},Zb=function(t){return Gb.reset(),yb(t,Wb),+Gb},Jb=[null,null],Qb={type:"LineString",coordinates:Jb},Kb=function(t,n){return Jb[0]=t,Jb[1]=n,Zb(Qb)},tw=function(t,n){var e=t[0]*nb,r=t[1]*nb,i=n[0]*nb,o=n[1]*nb,a=ob(r),u=lb(r),c=ob(o),s=lb(o),l=a*ob(e),f=a*lb(e),h=c*ob(i),p=c*lb(i),d=2*hu(hb(pu(o-r)+a*c*pu(i-e))),v=lb(d),y=d?function(t){var n=lb(t*=d)/v,e=lb(d-t)/v,r=e*l+n*h,i=e*f+n*p,o=e*u+n*s;return[ib(i,r)*tb,ib(o,hb(r*r+i*i))*tb]}:function(){return[e*tb,r*tb]};return y.distance=d,y},nw=function(t){return t},ew=vx(),rw=vx(),iw={point:du,lineStart:du,lineEnd:du,polygonStart:function(){iw.lineStart=pc,iw.lineEnd=yc},polygonEnd:function(){iw.lineStart=iw.lineEnd=iw.point=du,ew.add(eb(rw)),rw.reset()},result:function(){var t=ew/2;return ew.reset(),t}},ow=1/0,aw=ow,uw=-ow,cw=uw,sw={point:_c,lineStart:du,lineEnd:du,polygonStart:du,polygonEnd:du,result:function(){var t=[[ow,aw],[uw,cw]];return uw=cw=-(aw=ow=1/0),t}},lw=0,fw=0,hw=0,pw=0,dw=0,vw=0,yw=0,_w=0,gw=0,mw={point:gc,lineStart:mc,lineEnd:wc,polygonStart:function(){mw.lineStart=Mc,mw.lineEnd=Ec},polygonEnd:function(){mw.point=gc,mw.lineStart=mc,mw.lineEnd=wc},result:function(){var t=gw?[yw/gw,_w/gw]:vw?[pw/vw,dw/vw]:hw?[lw/hw,fw/hw]:[NaN,NaN];return lw=fw=hw=pw=dw=vw=yw=_w=gw=0,t}};Sc.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,Kx)}},result:du},kc.prototype={_circle:Ac(4.5),pointRadius:function(t){return this._circle=Ac(t),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:this._string.push("M",t,",",n,this._circle)}},result:function t(){if(this._string.length){var t=this._string.join("");return this._string=[],t}}};var xw=function(t,n){function e(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),yb(t,r(i))),i.result()}var r,i,o=4.5;return e.area=function(t){return yb(t,r(iw)),iw.result()},e.bounds=function(t){return yb(t,r(sw)),sw.result()},e.centroid=function(t){return yb(t,r(mw)),mw.result()},e.projection=function(n){return arguments.length?(r=null==n?(t=null,nw):(t=n).stream,e):t},e.context=function(t){return arguments.length?(i=null==t?(n=null,new kc):new Sc(n=t),"function"!=typeof o&&i.pointRadius(o),e):n},e.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),e):o},e.projection(t).context(n)},bw=vx(),ww=function(t,n){var e=n[0],r=n[1],i=[lb(e),-ob(e),0],o=0,a=0;bw.reset();for(var u=0,c=t.length;u<c;++u)if(l=(s=t[u]).length)for(var s,l,f=s[l-1],h=f[0],p=f[1]/2+Qx,d=lb(p),v=ob(p),y=0;y<l;++y,h=g,d=x,v=b,f=_){var _=s[y],g=_[0],m=_[1]/2+Qx,x=lb(m),b=ob(m),w=g-h,M=w>=0?1:-1,E=M*w,N=E>Zx,T=d*x;if(bw.add(ib(T*M*lb(E),v*b+T*ob(E))),o+=N?w+M*Kx:w,N^h>=e^g>=e){var S=Nu(Mu(f),Mu(_));ku(S);var k=Nu(i,S);ku(k);var A=(N^w>=0?-1:1)*hu(k[2]);(r>A||r===A&&(S[0]||S[1]))&&(a+=N^w>=0?1:-1)}}return(o<-Gx||o<Gx&&bw<-Gx)^1&a},Mw=function(t,n,e,r){return function(i,o){function a(n,e){var r=i(n,e);t(n=r[0],e=r[1])&&o.point(n,e)}function u(t,n){var e=i(t,n);y.point(e[0],e[1])}function c(){b.point=u,y.lineStart()}function s(){b.point=a,y.lineEnd()}function l(t,n){v.push([t,n]);var e=i(t,n);m.point(e[0],e[1])}function f(){m.lineStart(),v=[]}function h(){l(v[0][0],v[0][1]),m.lineEnd();var t,n,e,r,i=m.clean(),a=g.result(),u=a.length;if(v.pop(),p.push(v),v=null,u)if(1&i){if(e=a[0],(n=e.length-1)>0){for(x||(o.polygonStart(),x=!0),o.lineStart(),t=0;t<n;++t)o.point((r=e[t])[0],r[1]);o.lineEnd()}}else u>1&&2&i&&a.push(a.pop().concat(a.shift())),d.push(a.filter(Cc))}var p,d,v,y=n(o),_=i.invert(r[0],r[1]),g=Fb(),m=n(g),x=!1,b={point:a,lineStart:c,lineEnd:s,polygonStart:function(){b.point=l,b.lineStart=f,b.lineEnd=h,d=[],p=[]},polygonEnd:function(){b.point=a,b.lineStart=c,b.lineEnd=s,d=ql(d);var t=ww(p,_);d.length?(x||(o.polygonStart(),x=!0),Xb(d,Pc,t,e,o)):t&&(x||(o.polygonStart(),x=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),x&&(o.polygonEnd(),x=!1),d=p=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}};return b}},Ew=Mw(function(){return!0},Lc,Rc,[-Zx,-Jx]),Nw=function(t,n){function e(e,r,i,o){tc(o,t,n,i,e,r)}function r(t,n){return ob(t)*ob(n)>u}function i(t){var n,e,i,u,l;return{lineStart:function(){u=i=!1,l=1},point:function(f,h){var p,d=[f,h],v=r(f,h),y=c?v?0:a(f,h):v?a(f+(f<0?Zx:-Zx),h):0;if(!n&&(u=i=v)&&t.lineStart(),v!==i&&(p=o(n,d),(Bb(n,p)||Bb(d,p))&&(d[0]+=Gx,d[1]+=Gx,v=r(d[0],d[1]))),v!==i)l=0,v?(t.lineStart(),p=o(d,n),t.point(p[0],p[1])):(p=o(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(s&&n&&c^v){var _;y&e||!(_=o(d,n,!0))||(l=0,c?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!v||n&&Bb(n,d)||t.point(d[0],d[1]),n=d,i=v,e=y},lineEnd:function(){i&&t.lineEnd(),n=null},clean:function(){return l|(u&&i)<<1}}}function o(t,n,e){var r=Mu(t),i=Mu(n),o=[1,0,0],a=Nu(r,i),c=Eu(a,a),s=a[0],l=c-s*s;if(!l)return!e&&t;var f=u*c/l,h=-u*s/l,p=Nu(o,a),d=Su(o,f),v=Su(a,h);Tu(d,v);var y=p,_=Eu(d,y),g=Eu(y,y),m=_*_-g*(Eu(d,d)-1);if(!(m<0)){var x=hb(m),b=Su(y,(-_-x)/g);if(Tu(b,d),b=wu(b),!e)return b;var w,M=t[0],E=n[0],N=t[1],T=n[1];E<M&&(w=M,M=E,E=w);var S=E-M,k=eb(S-Zx)<Gx,A=k||S<Gx;if(!k&&T<N&&(w=N,N=T,T=w),A?k?N+T>0^b[1]<(eb(b[0]-M)<Gx?N:T):N<=b[1]&&b[1]<=T:S>Zx^(M<=b[0]&&b[0]<=E)){var C=Su(y,(-_+x)/g);return Tu(C,d),[b,wu(C)]}}}function a(n,e){var r=c?t:Zx-t,i=0;return n<-r?i|=1:n>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var u=ob(t),c=u>0,s=eb(u)>Gx;return Mw(r,i,e,c?[0,-t]:[-Zx,t-Zx])},Tw=function(t){return{stream:zc(t)}};Ic.prototype={constructor:Ic,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()}};var Sw=16,kw=ob(30*nb),Aw=function(t,n){return+n?jc(t,n):qc(t)},Cw=zc({point:function(t,n){this.stream.point(t*nb,n*nb)}}),Pw=function(){return Bc($c).scale(155.424).center([0,33.6442])},Lw=function(){return Pw().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])},Ow=function(){function t(t){var n=t[0],e=t[1];return u=null,i.point(n,e),u||(o.point(n,e),u)||(a.point(n,e),u)}function n(){return e=r=null,t}var e,r,i,o,a,u,c=Lw(),s=Pw().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=Pw().rotate([157,0]).center([-3,19.9]).parallels([8,18]),f={point:function(t,n){u=[t,n]}};return t.invert=function(t){var n=c.scale(),e=c.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?l:c).invert(t)},t.stream=function(t){return e&&r===t?e:e=Hc([c.stream(r=t),s.stream(t),l.stream(t)])},t.precision=function(t){return arguments.length?(c.precision(t),s.precision(t),l.precision(t),n()):c.precision()},t.scale=function(n){return arguments.length?(c.scale(n),s.scale(.35*n),l.scale(n),t.translate(c.translate())):c.scale()},t.translate=function(t){if(!arguments.length)return c.translate();var e=c.scale(),r=+t[0],u=+t[1];return i=c.translate(t).clipExtent([[r-.455*e,u-.238*e],[r+.455*e,u+.238*e]]).stream(f),o=s.translate([r-.307*e,u+.201*e]).clipExtent([[r-.425*e+Gx,u+.12*e+Gx],[r-.214*e-Gx,u+.234*e-Gx]]).stream(f),a=l.translate([r-.205*e,u+.212*e]).clipExtent([[r-.214*e+Gx,u+.166*e+Gx],[r-.115*e-Gx,u+.234*e-Gx]]).stream(f),n()},t.fitExtent=function(n,e){return Dc(t,n,e)},t.fitSize=function(n,e){return Uc(t,n,e)},t.scale(1070)},Rw=Vc(function(t){return hb(2/(1+t))});Rw.invert=Gc(function(t){return 2*hu(t/2)});var zw=function(){return Fc(Rw).scale(124.75).clipAngle(179.999)},Iw=Vc(function(t){return(t=fu(t))&&t/lb(t)});Iw.invert=Gc(function(t){return t});var Dw=function(){return Fc(Iw).scale(79.4188).clipAngle(179.999)};Wc.invert=function(t,n){return[t,2*rb(ub(n))-Jx]};var Uw=function(){return Zc(Wc).scale(961/Kx)},qw=function(){return Bc(Qc).scale(109.5).parallels([30,30])};Kc.invert=Kc;var jw=function(){return Fc(Kc).scale(152.63)},Fw=function(){return Bc(ts).scale(131.154).center([0,13.9389])};ns.invert=Gc(rb);var Yw=function(){return Fc(ns).scale(144.049).clipAngle(60)},Bw=function(){function t(){return i=o=null,a}var n,e,r,i,o,a,u=1,c=0,s=0,l=1,f=1,h=nw,p=null,d=nw;return a={stream:function(t){return i&&o===t?i:i=h(d(o=t))},clipExtent:function(i){return arguments.length?(d=null==i?(p=n=e=r=null,nw):ic(p=+i[0][0],n=+i[0][1],e=+i[1][0],r=+i[1][1]),t()):null==p?null:[[p,n],[e,r]]},scale:function(n){return arguments.length?(h=es((u=+n)*l,u*f,c,s),t()):u},translate:function(n){return arguments.length?(h=es(u*l,u*f,c=+n[0],s=+n[1]),t()):[c,s]},reflectX:function(n){return arguments.length?(h=es(u*(l=n?-1:1),u*f,c,s),t()):l<0},reflectY:function(n){return arguments.length?(h=es(u*l,u*(f=n?-1:1),c,s),t()):f<0},fitExtent:function(t,n){return Dc(a,t,n)},fitSize:function(t,n){return Uc(a,t,n)}}};rs.invert=Gc(hu);var Xw=function(){return Fc(rs).scale(249.5).clipAngle(90+Gx)};is.invert=Gc(function(t){return 2*rb(t)});var $w=function(){return Fc(is).scale(250).clipAngle(142)};os.invert=function(t,n){return[-n,2*rb(ub(t))-Jx]};var Hw=function(){var t=Zc(os),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])},t.rotate=function(t){return arguments.length?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]).scale(159.155)},Vw=Object.prototype.toString,Gw="undefined"!=typeof window&&"[object Object]"!==Vw.call(window),Ww=Gw?window.console:require("console"),Zw=Object.prototype.hasOwnProperty,Jw=Object.prototype.propertyIsEnumerable,Qw=cs(),Kw=function(t,n){var e=void 0;if(ss(t))return e=t[n],delete t[n],e;if(hs(t)){var r=+n;return r===r?t.splice(r,1)[0]:(e=t[n],delete t[n],e)}},tM="$";ds.prototype=vs.prototype={constructor:ds,size:function(){return this._array.length},get:function(t){return this[tM+t]},set:function(t,n){return this.has(t)||this._array.push(t),this[tM+t]=n,this},has:function(t){return tM+t in this},clear:function(){var t=this;this.each(function(n,e){delete t[tM+e]}),this._array.splice(0)},keys:function(){var t=[];return this.each(function(n,e){t.push(e)}),t},values:function(){var t=[];return this.each(function(n){t.push(n)}),t},each:function(t){for(var n,e=this._array,r=0;r<e.length;++r)n=e[r],t(this.get(n),n,r)}};var nM={COMPOUND:"Compound",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",LOGICAL_EXP:"LogicalExpression",CONDITIONAL_EXP:"ConditionalExpression",ARRAY_EXP:"ArrayExpression"},eM=46,rM=44,iM=39,oM=34,aM=40,uM=41,cM=91,sM=93,lM=63,fM=59,hM=58,pM=function(t,n){var e=new Error(t+" at character "+n);throw e.index=n,e.description=t,e},dM=!0,vM={"-":dM,"!":dM,"~":dM,"+":dM},yM={"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},_M=function(t){var n,e=0;for(var r in t)(n=r.length)>e&&t.hasOwnProperty(r)&&(e=n);return e},gM=_M(vM),mM=_M(yM),xM={true:!0,false:!1,null:null},bM="this",wM=function(t){return yM[t]||0},MM=function(t,n,e){var r="||"===t||"&&"===t?nM.LOGICAL_EXP:nM.BINARY_EXP;return{type:r,operator:t,left:n,right:e}},EM=function(t){return t>=48&&t<=57},NM=function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=128&&!yM[String.fromCharCode(t)]},TM=function(t){return 36===t||95===t||t>=65&&t<=90||t>=97&&t<=122||t>=48&&t<=57||t>=128&&!yM[String.fromCharCode(t)]},SM=function(t){for(var n,e,r=0,i=t.charAt,o=t.charCodeAt,a=function(n){return i.call(t,n)},u=function(n){return o.call(t,n)},c=t.length,s=function(){for(var t=u(r);32===t||9===t;)t=u(++r)},l=function t(){var n,e,i=h();return s(),u(r)!==lM?i:(r++,n=t(),n||pM("Expected expression",r),s(),u(r)===hM?(r++,e=t(),e||pM("Expected expression",r),{type:nM.CONDITIONAL_EXP,test:i,consequent:n,alternate:e}):void pM("Expected :",r))},f=function(){s();for(var n=t.substr(r,mM),e=n.length;e>0;){if(yM.hasOwnProperty(n))return r+=e,n;n=n.substr(0,--e)}return!1},h=function(){var t,n,e,i,o,a,u,c;if(a=p(),n=f(),!n)return a;for(o={value:n,prec:wM(n)},u=p(),u||pM("Expected expression after "+n,r),i=[a,o,u];(n=f())&&(e=wM(n),0!==e);){for(o={value:n,prec:e};i.length>2&&e<=i[i.length-2].prec;)u=i.pop(),n=i.pop().value,a=i.pop(),t=MM(n,a,u),i.push(t);t=p(),t||pM("Expected expression after "+n,r),i.push(o,t)}for(c=i.length-1,t=i[c];c>1;)t=MM(i[c-1].value,i[c-2],t),c-=2;return t},p=function n(){var e,i,o;if(s(),e=u(r),EM(e)||e===eM)return d();if(e===iM||e===oM)return v();if(NM(e)||e===aM)return g();if(e===cM)return x();for(i=t.substr(r,gM),o=i.length;o>0;){if(vM.hasOwnProperty(i))return r+=o,{type:nM.UNARY_EXP,operator:i,argument:n(),prefix:!0};i=i.substr(0,--o)}return!1},d=function(){for(var t,n,e="";EM(u(r));)e+=a(r++);if(u(r)===eM)for(e+=a(r++);EM(u(r));)e+=a(r++);if(t=a(r),"e"===t||"E"===t){for(e+=a(r++),t=a(r),"+"!==t&&"-"!==t||(e+=a(r++));EM(u(r));)e+=a(r++);EM(u(r-1))||pM("Expected exponent ("+e+a(r)+")",r)}return n=u(r),NM(n)?pM("Variable names cannot start with a number ("+e+a(r)+")",r):n===eM&&pM("Unexpected period",r),{type:nM.LITERAL,value:parseFloat(e),raw:e}},v=function(){for(var t,n="",e=a(r++),i=!1;r<c;){if(t=a(r++),t===e){i=!0;break}if("\\"===t)switch(t=a(r++)){case"n":n+="\n";break;case"r":n+="\r";break;case"t":n+="\t";break;case"b":n+="\b";break;case"f":n+="\f";break;case"v":n+="\v";break;default:n+="\\"+t}else n+=t}return i||pM('Unclosed quote after "'+n+'"',r),{type:nM.LITERAL,value:n,raw:e+n+e}},y=function(){var n,e=u(r),i=r;for(NM(e)?r++:pM("Unexpected "+a(r),r);r<c&&(e=u(r),TM(e));)r++;return n=t.slice(i,r),xM.hasOwnProperty(n)?{type:nM.LITERAL,value:xM[n],raw:n}:n===bM?{type:nM.THIS_EXP}:{type:nM.IDENTIFIER,name:n}},_=function(t){for(var n,e,i=[],o=!1;r<c;){if(s(),n=u(r),n===t){o=!0,r++;break}n===rM?r++:(e=l(),e&&e.type!==nM.COMPOUND||pM("Expected comma",r),i.push(e))}return o||pM("Expected "+String.fromCharCode(t),r),i},g=function(){var t,n;for(t=u(r),n=t===aM?m():y(),s(),t=u(r);t===eM||t===cM||t===aM;)r++,t===eM?(s(),n={type:nM.MEMBER_EXP,computed:!1,object:n,property:y()}):t===cM?(n={type:nM.MEMBER_EXP,computed:!0,object:n,property:l()},s(),t=u(r),t!==sM&&pM("Unclosed [",r),r++):t===aM&&(n={type:nM.CALL_EXP,arguments:_(uM),callee:n}),s(),t=u(r);return n},m=function(){r++;var t=l();return s(),u(r)===uM?(r++,t):void pM("Unclosed (",r)},x=function(){return r++,{type:nM.ARRAY_EXP,elements:_(sM)}},b=[];r<c;)n=u(r),n===fM||n===rM?r++:(e=l())?b.push(e):r<c&&pM('Unexpected "'+a(r)+'"',r);return 1===b.length?b[0]:{type:nM.COMPOUND,body:b}};SM.addUnaryOp=function(t){return gM=Math.max(t.length,gM),vM[t]=dM,this},SM.addBinaryOp=function(t,n){return mM=Math.max(t.length,mM),yM[t]=n,this},SM.addLiteral=function(t,n){return xM[t]=n,this},SM.removeUnaryOp=function(t){return delete vM[t],t.length===gM&&(gM=_M(vM)),this},SM.removeBinaryOp=function(t){return delete yM[t],t.length===mM&&(mM=_M(yM)),this},SM.removeLiteral=function(t){return delete xM[t],this};var kM={},AM={},CM={logger:Ww,fetch:bs()},PM="[d3-view]",LM=function(t){CM.logger.warn(PM+" "+t)},OM={eval:function(t){return ys(t,this.parsed)},safeEval:function(t){try{return ys(t,this.parsed)}catch(t){LM("Could not evaluate <<"+this.expr+">> expression: "+t)}},identifiers:function(){return _s(this.parsed).values()}};ws.prototype=OM;var RM=function(t){try{return new ws(t)}catch(n){LM("Could not parse <<"+t+">> expression: "+n)}},zM=0,IM=function(t){var n=++zM;return Object.defineProperty(t,"uid",{get:function(){return n}}),t},DM=function(t){return Object.defineProperty(t,"sel",{get:function(){return K_(this.el)}}),t},UM={priority:1,create:function(t){return t},mount:function(t){return t},refresh:function(){},destroy:function(){},removeAttribute:function(){this.el.removeAttribute(this.name)},execute:function(t){var n=this;if(this.expression&&(this.removeAttribute(),t=this.mount(t))){var e=this,r=this.sel,i=function(){try{e.refresh(t,e.expression.eval(t))}catch(t){LM('Error while refreshing "'+e.name+'" directive: '+t)}};this.identifiers=this.expression.identifiers().map(function(n){var r=n+"."+e.uid;return t.$on(r,i),n}),r.on("remove."+e.uid,function(){n.identifiers.forEach(function(n){t.$off(n+"."+e.uid)}),e.destroy(t)}),i()}}},qM=function(t){function n(t,n,e){this.el=t,this.name=n.name,this.arg=e;var r=DM(IM(this)).create(n.value);r&&(this.expression=RM(r))}function e(t,e,r){return new n(t,e,r)}return n.prototype=Qw({},UM,t),e.prototype=n.prototype,e};wi.prototype.model=Ms;var jM=function(t,n){var e=o();e.set("",Nn("change")),Object.defineProperty(IM(t),"$events",{get:function(){return e}}),t._Child=null,t.$update(n)},FM=function(t){var n=t.split("."),e=n.splice(0,1),r=Es(this,e);if(e in r){for(var i=r[e];i&&n.length;)i=i[n.splice(0,1)];return i}},YM=function(t){var n=!1;return function(){if(!n){var e=Array.prototype.slice.call(arguments);n=!0,Gd(function(){n=!1,t.apply(void 0,e)})}}},BM=function(t,n){this.$events.get(t)?this[t]=n:Ns(this,t,n)},XM=function(t,n){1===arguments.length&&fs(t)&&(n=t,t="");var e=t.split("."),r=e[0],i=Ts(this,r);return i?(this.$events.get(t)||e.push(this.uid),e[0]="change",i.on(e.join("."),n)):LM('Cannot bind to "'+r+'" - no such reactive property')},$M=function(t){if(t)for(var n in t)"$"===n.substring(0,1)?this.constructor.prototype[n]?LM("Cannot set attribute method "+n+", it is protected"):this[n]=t[n]:this.$set(n,t[n]);return this},HM=function(t){this._Child||(this._Child=Ss(this));var n=this,e=new this._Child(t);return Object.defineProperty(e,"parent",{get:function(){return n}}),e};Cs.prototype=As.prototype,As.prototype.$on=XM,As.prototype.$update=$M,As.prototype.$get=FM,As.prototype.$set=BM,As.prototype.$child=HM,As.prototype.$new=Ps,As.prototype.$setbase=ks;var VM=function(t,n,e){var r=t.pop("model");if(t.get("for")&&!e&&(LM('Cannot have a "d3-for" directive in the root view element'),t.pop("for")),!e)return r&&LM("Cannot have a d3-model directive in the root element"),Cs(n);if(r){r.execute(e);var i=r.sel.model();return i&&i.$update(n),i}return n?e.$child(n):e},GM=["name","class","disabled","readonly","required"];wi.prototype.directives=Ls;var WM=function(t,n){var e=K_(t),r=e.directives();if(r)return r;if(r=new Os,e.directives(r),!n)return r;for(var i=0;i<t.attributes.length;++i){var o=t.attributes[i],a=o.name.split("-"),u=a[2],c="d3"===a[0]?a[1]:null;if(c){!u&&GM.indexOf(c)>-1&&(u=c,c="attr");var s=n.get(c);s?r.add(c,s(t,o,u)):LM(t.tagName+' cannot find directive "'+c+'". Did you forget to register it?')}r.attrs[o.name]=o.value}return r.sorted()};Os.prototype={size:function(){return this._all.length},get:function(t){return this._dirs[t]},pop:function(t){var n=this._dirs[t];if(n){delete this._dirs[t],n.removeAttribute();var e=this._all.indexOf(n);e>-1&&this._all.splice(e,1)}return n},add:function(t,n){this._dirs[t]=n,this._all.push(n)},sorted:function(){return this._all.sort(function(t){return-t.priority}),this},forEach:function(t){this._all.forEach(t)}};var ZM={mount:function(t){var n=this.expression;if(n.parsed.type!==n.codes.IDENTIFIER)return LM('d3-model expression support identifiers only, got "'+n.parsed.type+'": '+this.expression);var e=t.$child(n.eval(t));this.sel.model(e),t.$setbase(this.expression.expr,e)}},JM=["disabled","readonly","required"],QM={create:function(t){return this.arg?t:LM("Cannot bind to empty attribute. Specify :<attr-name>")},refresh:function(t,n){return"class"===this.arg?this.refreshClass(n):hs(n)?LM("Cannot apply array to attribute "+this.arg):void(JM.indexOf(this.arg)>-1?this.sel.property(this.arg,n||null):this.sel.attr(this.arg,n))},refreshClass:function(t){var n=this.sel;hs(t)||(t=[t]),this.oldValue&&this.oldValue.forEach(function(t){t&&n.classed(t,!1)}),this.oldValue=t.map(function(t){var e=!0;return hs(t)&&(e=t[1],t=t[0]),t&&n.classed(t,e),t})}},KM={refresh:function(t,n){ls(n)&&this.sel.html(n)}},tE={on:function(t,n){var e=Ds(this,t,n);K_(this.el).on("input",e).on("change",e)}},nE=Is(),eE=Is(),rE={input:nE,textarea:eE},iE={create:function(t){var n=this.sel.attr("type"),e=this.el.tagName.toLowerCase(),r=rE[n]||rE[e];return r?(this.tag=new r(this.el),t):LM("Cannot apply d3-value directive to "+e)},mount:function(t){var n=this.expression;if(n.parsed.type!==n.codes.IDENTIFIER)return LM('d3-value expression support identifiers only, got "'+n.parsed.type+'": '+this.expression);var e=this.expression.expr;return t.$set(e,this.tag.value),this.tag.on(t,e),t},refresh:function(t,n){this.tag.value=n},destroy:function(){this.tag.off()}},oE={mount:function(t){return this.block=this.sel.style("display")?"block":null,t},refresh:function(t,n){n?this.sel.style("display",this.block):this.sel.style("display","none")}},aE={mount:function(t){var n=this.arg||"click",e=this.expression;this.sel.on(n+"."+this.uid,function(){e.eval(t)})}},uE={refresh:function(t){to(t)}},cE={create:function(t){var n=[];return t.trim().split(" ").forEach(function(t){t?n.push(t):null}),3!==n.length||"in"!=n[1]?LM('d3-for directive requires "item in expression" template'):(this.itemName=n[0],this.itemClass="for"+this.uid,n[2])},mount:function(t){return this.creator=this.el,this.el=this.creator.parentNode,K_(this.creator).remove(),t},refresh:function(t,n){if(hs(n)){var e=this.creator,r=e.tagName+"."+this.itemClass,i=this.itemName,o=this.sel.selectAll(r).data(n);o.enter().append(function(){return e.cloneNode(!0)}).classed(this.itemClass,!0).each(function(n,e){var r={index:e};r[i]=n,Rs(t.$child(r),this)}),o.exit().remove()}}},sE={refresh:function(t,n){n?this.sel.style("display",null):this.sel.style("display","none")}},lE={model:ZM,attr:QM,html:KM,value:iE,show:oE,on:aE,transition:uE,for:cE,if:sE},fE=function(t){return t&&!fs(t.size)?K_(t):t},hE=function(t){if(ls(t))try{return JSON.parse(t)}catch(n){return t}return t},pE=Bs(o(),lE),dE={isd3:!0,providers:CM,htmlElement:js,viewElement:js,init:function(){},mounted:function(){},createElement:function(t){return K_(document.createElement(t))},responseError:function(t){var n=this;t.json().then(function(e){n.error(e,t)})},error:function(t){t.level="error",this.message(t)},message:function(t){var n=this;this.root.events.call("message",n,t)},fetch:function t(n,e){var t=CM.fetch;return 1==arguments.length?t(n):t(n,e)}},vE=Qw({},dE,{use:function(t){return ss(t)?t.install(this):t(this),this},addComponent:function(t,n){if(this.isMounted)return LM("already mounted, cannot add component");var e=Fs(n,yE);return this.components.set(t,e),e},addDirective:function(t,n){if(this.isMounted)return LM("already mounted, cannot add directive");var e=qM(n);return this.directives.set(t,e),e},mount:function(t){if(Hs(this))LM("already mounted");else if(t=$s(t)){var n=this.parent?this.parent.model:null;this.model=VM(WM(t,this.directives),this.model,n),Xs(this,t)}return this}}),yE=Qw({},dE,{render:function(){},mount:function(t){if(Hs(this))LM("already mounted");else{var n=this.parent?this.parent.model:null,e=WM(t,this.directives),r=VM(e,this.model,n);if(this.model=r,Rs(this.model,t))return;var i=K_(t).datum()||{};if(hs(this.props)){var o,a;this.props.forEach(function(t){o=e.attrs[t],a=r[o]?r[o]:hE(o),i[t]=a})}var u=this.render(i,e.attrs);if(ps(u)){var c=this;u.then(function(n){Vs(c,t,n)})}else Vs(this,t,u)}return this}}),_E=Fs(),gE=function(t){mE.push(t),"complete"!==document.readyState?(document.addEventListener("DOMContentLoaded",Gs),window.addEventListener("load",Gs)):Ws()},mE=[],xE={logger:Ww},bE="[d3-form]",wE=function(t){xE.logger.warn(bE+" "+t)},ME=["labelSrOnly","layout"],EE={text:"input",password:"input",number:"input"},NE={render:function(t){var n=this.createElement("fieldset");return Ks.call(this,t),Qs.call(this,n)}},TE={wrap:function t(n){var e=this,r=nl(e),i=r?r[n.attr("type")]||r[n.node().tagName.toLowerCase()]:null;if(!i||!r.wrappers)return n;var t,o=n;return i.forEach(function(i){t=r.wrappers[i],t?o=t.call(e,o,n):wE("Could not find form field wrapper "+i)}),o},wrapTemplate:function(t,n){var e=document.createElement("div"),r=K_(e).html(n),i=r.select("slot");if(!i.size())return wE("template does not provide a slot element"),t;var o=K_(i.node().parentNode);return t.nodes().forEach(function(t){o.insert(function(){return t},"slot")}),i.remove(),tg(e.children)}},SE=Qw({model:{error:"",isDirty:!1,showError:{reactOn:["error","isDirty","formSubmitted"],get:function(){return!!this.error&&(this.isDirty||this.formSubmitted)}}},mounted:function(){this.model.$on("value",function(){this.isDirty=!0})},inputData:function(t){return t=Ks.call(this,t),t.name||wE("Input field without a name"),t.placeholder=t.placeholder||t.label||t.name,t.id=t.id||"d3f"+this.uid,this.model.inputs[t.name]=this.model,t}},TE),kE={set:function(t,n){var e=n.required;ls(e)?t.attr("d3-required",e):t.property("required",e||null)},validate:function(t,n){if(t.property("required")){if(!n)return"required"}else if(""===n)return!0}},AE={set:function(t,n){var e=n.minlength;ls(e)?t.attr("d3-attr-minlength",e):void 0!==e&&t.attr("minlength",e)},validate:function(t,n){var e=+t.attr("minlength");if(e===e&&e>0&&n.length<e)return"too short - "+e+" characters or more expected"}},CE={set:function(t,n){var e=n.maxlength;ls(e)?t.attr("d3-attr-maxlength",e):void 0!==e&&t.attr("maxlength",e)},validate:function(t,n){var e=+t.attr("maxlength");if(e===e&&e>0&&n.length>e)return"too long - "+e+" characters or less expected"}},PE={set:function(t,n){var e=n.min;ls(e)?t.attr("d3-attr-min",e):void 0!==e&&t.attr("min",e)},validate:function(t,n){var e=el(t);if(e&&+n<e[0])return"must be greater or equal "+e[0]}},LE={set:function(t,n){var e=n.max;ls(e)?t.attr("d3-attr-max",e):void 0!==e&&t.attr("max",e)},validate:function(t,n){var e=el(t);if(e&&+n>e[1])return"must be less or equal "+e[1]}},OE={get:function(t,n){var e=this.all.slice(0);if(ss(n))for(var r in n)e.push(rl(r,n[r]));return e},set:function(t,n){t.model.validators.forEach(function(e){e.set(n,t.data)}),t.model.$on(this.validate)},validate:function(t){if("value"===t){for(var n,e,r=this.$vm,i=this.validators,o=r.sel.attr("id")===r.data.id?r.sel:r.sel.select("#"+r.data.id),a=this.value,u=0;u<i.length;++u)if(n=i[u],e=n.validate(o,a)){e===!0&&(e="");break}this.error=e||""}},all:[kE,AE,CE,PE,LE]},RE=Qw({render:function(t){t=this.inputData(t);var n=this.createElement("input").attr("id",t.id).attr("type",t.type||"text").attr("name",t.name).attr("d3-value","value").attr("placeholder",t.placeholder);return OE.set(this,n),this.wrap(n)}},SE),zE=Qw({render:function(t){t=this.inputData(t);var n=this.createElement("textarea").attr("id",t.id).attr("name",t.name).attr("placeholder",t.placeholder).attr("d3-value","value").attr("d3-validate","validators");return OE.set(this,n),this.wrap(n)}},SE),IE=Qw({},SE,{model:Qw({options:[],$optionLabel:ol,$optionValue:il},SE.model),render:function(t){t=this.inputData(t);var n=this.createElement("select").attr("id",t.id).attr("name",t.name).attr("d3-value","value").attr("placeholder",t.placeholder);return this.model.options=t.options,n.append("option").attr("d3-for","option in options").attr("d3-html","$optionLabel()").attr("d3-attr-value","$optionValue()"),OE.set(this,n),this.wrap(n)}}),DE=Qw({render:function(t){t=Ks.call(this,t),t.type=t.type||"submit",this.model.$set("error",!1),ls(t.disabled)||(this.model.$set("disabled",t.disabled||null),t.disabled="disabled"),t.click||(t.click="$vm.click()");var n=this.createElement("button").attr("type",t.type).attr("name",t.name).attr("d3-attr-disabled",t.disabled).attr("d3-on-click",t.click).html(t.label||"submit");return this.wrap(n)},click:function(){this.model.form.actions.submit.call(this,t.event);
9}},TE),UE={default:al,redirect:ul},qE={submit:cl},jE={props:["json"],model:{formSubmitted:!1,formPending:!1},components:{d3fieldset:NE,d3input:RE,d3textarea:zE,d3select:IE,d3submit:DE},render:function(t){function n(n){Ks.call(i,n),e.validators=OE.get(e,t.validators),i.actions={};for(var o in qE){var a=i.data[o];ls(a)&&(a=i.model.$get(a)),i.actions[o]=a||qE[o]}return Qs.call(i,r),r}var e=this.model,r=this.createElement("form").attr("novalidate",""),i=this;e.inputs={},e.form=this;var o=t.json;if(ls(o)){var a=xE.fetch;return a(o,{method:"GET"}).then(function(t){return 200===t.status?t.json().then(n):void wE("Could not load form from "+o+": status "+t.status)})}return n(o)},inputData:function(){var t,n=this.model.inputs,e={};for(var r in n)t=n[r].value,void 0!==t&&(e[r]=t);return e},setSubmit:function(){var t=this;return this.model.formSubmitted=!0,this.model.formPending=!0,Zs.call(this,function(){return t.isValid()})},setSubmitDone:function(){this.model.formPending=!1},isValid:function(){var t;for(var n in this.model.inputs)if(t=this.model.inputs[n],t.error)return!1;return!0},inputError:function(t){var n=this.model.inputs[t.name];n||(wE("Unknown input, cannot set input error"),this.error(t))},response:function(t){if(t){var n;if(t.status)t.status<300?this.data.resultHandler?(n=UE[this.data.resultHandler],n?n.call(this,t):wE("Could not find "+this.data.resultHandler+" result handler")):UE.default.call(this,t):this.responseError(t);else if(t.error)this.error(t.error);else if(hs(t.errors)){var e=this;t.errors.forEach(function(t){e.inputError(t)})}else this.data.resultHandler?(n=UE[this.data.resultHandler],n?n.call(this,t):wE("Could not find "+this.data.resultHandler+" result handler")):UE.default.call(this,t)}}},FE={install:function(t){t.addComponent("d3form",jE);for(var n in t.providers)xE[n]=t.providers[n]},actions:qE,responses:UE},YE=function(t){return this.wrapTemplate(t,sl(this.data))},BE='<div class="form-group" d3-class=\'showError ? "has-danger" : null\'>\n<slot></slot>\n<p d3-if="showError" class="text-danger error-block" d3-html="error"></p>\n</div>',XE=function(t,n){return n.classed("form-control",!0).attr("d3-class",'showError ? "form-control-danger" : null'),this.wrapTemplate(t,BE)},$E=function(t,n){var e=this.data.group;if(!e)return t;var r="g"+n.attr("id");return n.attr("aria-describedby",r),this.wrapTemplate(t,ll(r,e))},HE='<div class="form-group">\n<slot></slot>\n</div>',VE=function(t,n){var e=this.data.theme||"primary";return n.classed("btn",!0).classed("btn-"+e,!0),this.wrapTemplate(t,HE)},GE={input:["inputGroup","label","formGroup"],textarea:["label","formGroup"],select:["label","formGroup"],submit:["submit"],wrappers:{label:YE,formGroup:XE,inputGroup:$E,submit:VE}},WE={install:function(t){var n=t.components.get("d3form");n&&(n.prototype.formTheme=GE)}},ZE="0.1.9",JE="0.1.3";t.version=JE,t.bisect=dl,t.bisectRight=dl,t.bisectLeft=vl,t.ascending=fl,t.bisector=hl,t.descending=yl,t.deviation=ml,t.extent=xl,t.histogram=Ll,t.thresholdFreedmanDiaconis=Rl,t.thresholdScott=zl,t.thresholdSturges=Pl,t.max=Il,t.mean=Dl,t.median=Ul,t.merge=ql,t.min=jl,t.pairs=Fl,t.permute=Yl,t.quantile=Ol,t.range=Tl,t.scan=Bl,t.shuffle=Xl,t.sum=$l,t.ticks=Cl,t.tickStep=e,t.transpose=Hl,t.variance=gl,t.zip=Vl,t.nest=Wl,t.set=f,t.map=o,t.keys=Jl,t.values=Ql,t.entries=Kl,t.randomUniform=tf,t.randomNormal=nf,t.randomLogNormal=ef,t.randomBates=of,t.randomIrwinHall=rf,t.randomExponential=af,t.easeLinear=h,t.easeQuad=v,t.easeQuadIn=p,t.easeQuadOut=d,t.easeQuadInOut=v,t.easeCubic=g,t.easeCubicIn=y,t.easeCubicOut=_,t.easeCubicInOut=g,t.easePoly=lf,t.easePolyIn=cf,t.easePolyOut=sf,t.easePolyInOut=lf,t.easeSin=b,t.easeSinIn=m,t.easeSinOut=x,t.easeSinInOut=b,t.easeExp=E,t.easeExpIn=w,t.easeExpOut=M,t.easeExpInOut=E,t.easeCircle=S,t.easeCircleIn=N,t.easeCircleOut=T,t.easeCircleInOut=S,t.easeBounce=A,t.easeBounceIn=k,t.easeBounceOut=A,t.easeBounceInOut=C,t.easeBack=Tf,t.easeBackIn=Ef,t.easeBackOut=Nf,t.easeBackInOut=Tf,t.easeElastic=Pf,t.easeElasticIn=Cf,t.easeElasticOut=Pf,t.easeElasticInOut=Lf,t.polygonArea=Of,t.polygonCentroid=Rf,t.polygonHull=If,t.polygonContains=Df,t.polygonLength=Uf,t.path=R,t.quadtree=j,t.arc=ch,t.area=fh,t.line=lh,t.pie=dh,t.radialArea=_h,t.radialLine=yh,t.symbol=Dh,t.symbols=Ih,t.symbolCircle=gh,t.symbolCross=mh,t.symbolDiamond=wh,t.symbolSquare=kh,t.symbolStar=Sh,t.symbolTriangle=Ch,t.symbolWye=zh,t.curveBasisClosed=jh,t.curveBasisOpen=Fh,t.curveBasis=qh,t.curveBundle=Yh,t.curveCardinalClosed=Xh,t.curveCardinalOpen=$h,t.curveCardinal=Bh,t.curveCatmullRomClosed=Vh,t.curveCatmullRomOpen=Gh,t.curveCatmullRom=Hh,t.curveLinearClosed=Wh,t.curveLinear=sh,t.curveMonotoneX=Et,t.curveMonotoneY=Nt,t.curveNatural=Zh,t.curveStep=Jh,t.curveStepAfter=Ct,t.curveStepBefore=At,t.stack=np,t.stackOffsetExpand=ep,t.stackOffsetNone=Kh,t.stackOffsetSilhouette=rp,t.stackOffsetWiggle=ip,t.stackOrderAscending=op,t.stackOrderDescending=ap,t.stackOrderInsideOut=up,t.stackOrderNone=tp,t.stackOrderReverse=cp,t.color=zt,t.rgb=qt,t.hsl=Bt,t.lab=Vt,t.hcl=tn,t.cubehelix=rn,t.interpolate=ad,t.interpolateArray=Qp,t.interpolateBasis=Hp,t.interpolateBasisClosed=Vp,t.interpolateDate=Kp,t.interpolateNumber=td,t.interpolateObject=ed,t.interpolateRound=ud,t.interpolateString=od,t.interpolateTransformCss=fd,t.interpolateTransformSvg=hd,t.interpolateZoom=_d,t.interpolateRgb=Wp,t.interpolateRgbBasis=Zp,t.interpolateRgbBasisClosed=Jp,t.interpolateHsl=gd,t.interpolateHslLong=md,t.interpolateLab=wn,t.interpolateHcl=xd,t.interpolateHclLong=bd,t.interpolateCubehelix=wd,t.interpolateCubehelixLong=Md,t.quantize=Ed,t.dispatch=Nn,t.dsvFormat=kd,t.csvParse=Cd,t.csvParseRows=Pd,t.csvFormat=Ld,t.csvFormatRows=Od,t.tsvParse=zd,t.tsvParseRows=Id,t.tsvFormat=Dd,t.tsvFormatRows=Ud,t.now=On,t.timer=In,t.timerFlush=Dn,t.timeout=Gd,t.interval=Wd,t.timeInterval=Yn,t.timeMillisecond=Qd,t.timeMilliseconds=Kd,t.utcMillisecond=Qd,t.utcMilliseconds=Kd,t.timeSecond=ov,t.timeSeconds=av,t.utcSecond=ov,t.utcSeconds=av,t.timeMinute=uv,t.timeMinutes=cv,t.timeHour=sv,t.timeHours=lv,t.timeDay=fv,t.timeDays=hv,t.timeWeek=pv,t.timeWeeks=xv,t.timeSunday=pv,t.timeSundays=xv,t.timeMonday=dv,t.timeMondays=bv,t.timeTuesday=vv,t.timeTuesdays=wv,t.timeWednesday=yv,t.timeWednesdays=Mv,t.timeThursday=_v,t.timeThursdays=Ev;t.timeFriday=gv;t.timeFridays=Nv,t.timeSaturday=mv,t.timeSaturdays=Tv,t.timeMonth=Sv,t.timeMonths=kv,t.timeYear=Av,t.timeYears=Cv,t.utcMinute=Pv,t.utcMinutes=Lv,t.utcHour=Ov,t.utcHours=Rv,t.utcDay=zv,t.utcDays=Iv,t.utcWeek=Dv,t.utcWeeks=Xv,t.utcSunday=Dv,t.utcSundays=Xv,t.utcMonday=Uv,t.utcMondays=$v,t.utcTuesday=qv,t.utcTuesdays=Hv,t.utcWednesday=jv,t.utcWednesdays=Vv,t.utcThursday=Fv,t.utcThursdays=Gv,t.utcFriday=Yv,t.utcFridays=Wv,t.utcSaturday=Bv,t.utcSaturdays=Zv,t.utcMonth=Jv,t.utcMonths=Qv,t.utcYear=Kv,t.utcYears=ny,t.formatDefaultLocale=Vn,t.formatLocale=py,t.formatSpecifier=ly,t.precisionFixed=vy,t.precisionPrefix=yy,t.precisionRound=_y,t.timeFormatDefaultLocale=$e,t.timeFormatLocale=Jn,t.isoFormat=My,t.isoParse=Ey,t.scaleBand=We,t.scalePoint=Je,t.scaleIdentity=ur,t.scaleLinear=ar,t.scaleLog=dr,t.scaleOrdinal=Ge,t.scaleImplicit=ky,t.scalePow=yr,t.scaleSqrt=_r,t.scaleQuantile=gr,t.scaleQuantize=mr,t.scaleThreshold=xr,t.scaleTime=Fy,t.scaleUtc=Yy,t.schemeCategory10=Xy,t.schemeCategory20b=$y,t.schemeCategory20c=Hy,t.schemeCategory20=Vy,t.interpolateCubehelixDefault=Gy,t.interpolateRainbow=Qy,t.interpolateWarm=Wy,t.interpolateCool=Zy,t.interpolateViridis=Ky,t.interpolateMagma=t_,t.interpolateInferno=n_,t.interpolatePlasma=e_,t.scaleSequential=Nr,t.creator=a_,t.local=kr,t.matcher=f_,t.mouse=__,t.namespace=o_,t.namespaces=i_,t.select=K_,t.selectAll=tg,t.selection=wi,t.selector=g_,t.selectorAll=x_,t.touch=ng,t.touches=eg,t.window=q_,t.customEvent=zr,t.transition=to,t.active=qg,t.interrupt=pg,t.axisTop=co,t.axisRight=so,t.axisBottom=lo,t.axisLeft=fo,t.cluster=Vg,t.hierarchy=bo,t.pack=cm,t.packSiblings=am,t.packEnclose=om,t.partition=fm,t.stratify=vm,t.tree=ym,t.treemap=xm,t.treemapBinary=bm,t.treemapDice=lm,t.treemapSlice=_m,t.treemapSliceDice=wm,t.treemapSquarify=mm,t.treemapResquarify=Mm,t.drag=Sm,t.dragDisable=Nm,t.dragEnable=ra,t.voronoi=Um,t.zoom=Ym,t.zoomTransform=Ya,t.zoomIdentity=jm,t.brush=ix,t.brushX=tu,t.brushY=nu,t.brushSelection=Ka,t.chord=fx,t.ribbon=dx,t.geoArea=xb,t.geoBounds=Mb,t.geoCentroid=Nb,t.geoCircle=jb,t.geoClipExtent=Vb,t.geoDistance=Kb,t.geoGraticule=fc,t.geoGraticule10=hc,t.geoInterpolate=tw,t.geoLength=Zb,t.geoPath=xw,t.geoAlbers=Lw,t.geoAlbersUsa=Ow,t.geoAzimuthalEqualArea=zw,t.geoAzimuthalEqualAreaRaw=Rw,t.geoAzimuthalEquidistant=Dw,t.geoAzimuthalEquidistantRaw=Iw,t.geoConicConformal=qw,t.geoConicConformalRaw=Qc,t.geoConicEqualArea=Pw,t.geoConicEqualAreaRaw=$c,t.geoConicEquidistant=Fw,t.geoConicEquidistantRaw=ts,t.geoEquirectangular=jw,t.geoEquirectangularRaw=Kc,t.geoGnomonic=Yw,t.geoGnomonicRaw=ns,t.geoIdentity=Bw,t.geoProjection=Fc,t.geoProjectionMutator=Yc,t.geoMercator=Uw,t.geoMercatorRaw=Wc,t.geoOrthographic=Xw,t.geoOrthographicRaw=rs,t.geoStereographic=$w,t.geoStereographicRaw=is,t.geoTransverseMercator=Hw,t.geoTransverseMercatorRaw=os,t.geoRotation=qb,t.geoStream=yb,t.geoTransform=Tw,t.view=_E,t.viewModel=Cs,t.viewExpression=RM,t.viewReady=gE,t.viewProviders=CM,t.viewWarn=LM,t.viewForms=FE,t.viewBootstrapForms=WE,t.viewVersion=ZE,t.viewElement=js,t.viewTemplate=Us,t.viewHtml=qs,Object.defineProperty(t,"__esModule",{value:!0})});
\No newline at end of file