-
Notifications
You must be signed in to change notification settings - Fork 17
/
dvl.js
2 lines (2 loc) · 194 KB
/
dvl.js
1
2
!function(n,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("dvl",[],t):"object"==typeof exports?exports.dvl=t():n.dvl=t()}(this,function(){return function(n){function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var e={};return t.m=n,t.c=e,t.i=function(n){return n},t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{configurable:!1,enumerable:!0,get:r})},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},t.p="",t(t.s=12)}([function(n,t,e){var r,i,o,u,a,l,c,s,f,h,p,v,g,d,y,m,w,x,M,b,_,k,S,E,C,N,A,q,L,z=[].slice,T=[].indexOf||function(n){for(var t=0,e=this.length;t<e;t++)if(t in this&&this[t]===n)return t;return-1};M=e(9),a=e(10),l=e(11),A=e(2),b=1,v=function(n){return new o(n)},v.version="1.5.0",v._variables=q=[],v._workers=L=[],s=null,p=function(n,t){return n===t},i=function(){function n(n){return this.v=null!=n?n:null,this.changed=!1,this}return n.prototype.toString=function(){return this.n?this.n+":":"","["+this.tag+this.v+"]"},n.prototype.value=function(n){return arguments.length?this:this.v},n.prototype.set=function(){return this},n.prototype.lazyValue=function(){return this},n.prototype.update=function(){return this},n.prototype.get=function(){return this.v},n.prototype.getPrev=function(){return this.v},n.prototype.hasChanged=function(){return this.changed},n.prototype.resetChanged=function(){return null},n.prototype.notify=function(){return null},n.prototype.discard=function(){return null},n.prototype.name=function(){var n;return 0===arguments.length?null!=(n=this.n)?n:"<anon_const>":(this.n=arguments[0],this)},n.prototype.compare=function(){return arguments.length?this:p},n.prototype.verify=function(){return arguments.length?this:null},n.prototype.apply=function(n){return v.apply(this,n)},n.prototype.applyValid=function(n){return v.applyValid(this,n)},n.prototype.applyAlways=function(n){return v.applyAlways(this,n)},n.prototype.pluck=function(n){return v.apply(this,function(t){return t[n]})},n.prototype.pluckEx=function(n){return v.apply(this,function(t){return t[n]()})},n.prototype.project=function(n){return v.const(null!=this.v&&(null!=n?n.down:void 0)?n.down.call(null,this.v):null)},n}(),o=function(){function n(n){return this.v=null!=n?n:null,this.id=b++,this.prev=null,this.changed=!1,this.vlen=-1,this.lazy=null,this.listeners=[],this.changers=[],this.compareFn=p,q.push(this),s&&s.addMemeber(this),this}return n.prototype.resolveLazy=function(){this.lazy&&(this.prev=this.v,this.v=this.lazy(),this.lazy=null)},n.prototype.toString=function(){return this.n?this.n+":":"","["+this.tag+this.val+"]"},n.prototype.hasChanged=function(){return this.proj?this.proj.parent.hasChanged():this.changed},n.prototype.resetChanged=function(){return this.changed=!1,this},n.prototype.value=function(n){var t,e,r,i;return arguments.length?null!==(n=null!=n?n:null)&&this.verifyFn&&!this.verifyFn.call(this,n)?this:this.compareFn&&this.compareFn.call(this,n,this.value())?this:(this.set(n),v.notify(this),this):(this.proj?(i=this.proj,e=i.parent,t=i.fnDown,r=e.value(),this.v=null!=r?t.call(this.v,r):null):this.resolveLazy(),this.v)},n.prototype.set=function(n){var t,e,r;return n=null!=n?n:null,this.proj?(r=this.proj,e=r.parent,t=r.fnUp,e.value(t.call(e.value(),n)),this):(this.changed||(this.prev=this.v),this.v=n,this.changed=!0,this.lazy=null,this)},n.prototype.lazyValue=function(n){return this.lazy=n,this.changed=!0,v.notify(this),this},n.prototype.update=function(n){return A.isEqual(n,this.v)||(this.set(n),v.notify(this)),this},n.prototype.get=function(){return this.value()},n.prototype.getPrev=function(){return this.resolveLazy(),this.prev&&this.changed?this.prev:this.v},n.prototype.notify=function(){return v.notify(this)},n.prototype.discard=function(){if(this.listeners.length>0)throw"Cannot remove variable "+this.id+" because it has listeners.";if(this.changers.length>0)throw"Cannot remove variable "+this.id+" because it has changers.";return q.splice(q.indexOf(this),1),null},n.prototype.name=function(){var n;return 0===arguments.length?null!=(n=this.n)?n:"<anon>":(this.n=arguments[0],this)},n.prototype.compare=function(){return arguments.length?(this.compareFn=arguments[0],this):this.compareFn},n.prototype.verify=function(){return arguments.length?(this.verifyFn=arguments[0],this):this.verifyFn},n.prototype.apply=function(n){return v.apply(this,n)},n.prototype.applyValid=function(n){return v.applyValid(this,n)},n.prototype.applyAlways=function(n){return v.applyAlways(this,n)},n.prototype.pluck=function(n){return v.apply(this,function(t){return t[n]})},n.prototype.pluckEx=function(n){return v.apply(this,function(t){return t[n]()})},n.prototype.project=function(n){var t,e;return n=v.wrap(n),e=v(),t=this,v.register({listen:n,change:t,fn:function(){var r;r=n.value(),r||(r={down:function(){return null},up:function(){}}),e.proj={parent:t,fnDown:r.down,fnUp:r.up},t.notify()}}),e},n}(),y=function(n){for(;n.proj;)n=n.proj.parent;return n},v.def=function(n){return new o(n)},v.const=function(n){return new i(n)},v.knows=function(n){return n instanceof o||n instanceof i},u=function(){function n(n,t,e,r,i){var o,u,a,c,f,h,p,v,g,d,y,m,w,x,M,_,k,E,C;for(this.name=n,this.ctx=t,this.fn=e,this.listen=r,this.change=i,this.id=b++,this.updates=new l,this.level=L.length,L.push(this),!1,M=this.listen,p=0,y=M.length;p<y;p++)for(h=M[p],h.listeners.push(this),_=h.changers,v=0,m=_.length;v<m;v++)f=_[v],f.updates.add(this),!0;for(k=this.change,g=0,w=k.length;g<w;g++)for(h=k[g],h.changers.push(this),E=h.listeners,d=0,x=E.length;d<x;d++)a=E[d],this.updates.add(a);if(this.updates.length()){u=1/0,C=this.updates.valueOf();for(c in C)a=C[c],(o=a.level)<u&&(u=o);S(u)}s&&s.addMemeber(this)}return n.prototype.addChange=function(){var n,t,e,r,i,o,u,a,l;if(e=N(arguments),e.length){for(t=!1,i=0,u=e.length;i<u;i++)for(r=e[i],this.change.push(r),r.changers.push(this),l=r.listeners,o=0,a=l.length;o<a;o++)n=l[o],this.updates.add(n),t=!0;t&&S()}return this},n.prototype.addListen=function(){var n,t,e,r,i,o,u,a,l,c,s,f,h,p,v;if(i=N(arguments),i.length){for(r=!1,u=0,s=i.length;u<s;u++)for(o=i[u],this.listen.push(o),o.listeners.push(this),v=o.changers,a=0,f=v.length;a<f;a++)e=v[a],e.updates.add(this),r=!0,!1;r&&S()}for(i=N(arguments,!0),E(this),n=[],l=0,h=i.length;l<h;l++)o=i[l],n.push(o.changed),o.changed=!0;for(this.fn.apply(this.ctx),t=c=0,p=i.length;c<p;t=++c)o=i[t],o.changed=n[t];return g(),this},n.prototype.discard=function(){var n,t,e,r,i,o,u,a,l,c,s,f,h,p;for(L.splice(L.indexOf(this),1),s=this.listen,e=0,u=s.length;e<u;e++)for(t=s[e],f=t.changers,r=0,a=f.length;r<a;r++)n=f[r],n.updates.remove(this);for(h=this.change,i=0,l=h.length;i<l;i++)t=h[i],t.changers.splice(t.changers.indexOf(this),1);for(p=this.listen,o=0,c=p.length;o<c;o++)t=p[o],t.listeners.splice(t.listeners.indexOf(this),1);S(),this.change=this.listen=this.updates=null},n}(),v.register=function(n){var t,e,r,o,a,l,c,s,f,p,v,d,m,w,x,M,b,_,k,S,C,q,L;if(o=n.ctx,a=n.fn,s=n.listen,e=n.change,p=n.name,v=n.noRun,h)throw new Error("cannot call register from within a notify");if("function"!=typeof a)throw new TypeError("fn must be a function");if("array"!==A.typeOf(s)&&(s=[s]),"array"!==A.typeOf(e)&&(e=[e]),f=[],s)for(w=0,_=s.length;w<_;w++)(d=s[w])instanceof i&&f.push(d);if(s=N(s).map(y),e=N(e).map(y),m=new u(p||"fn",o,a,s,e),!v){for(r=[],l=x=0,k=s.length;x<k;l=++x)c=s[l],r[l]=c.changed,c.changed=!0;for(M=0,S=f.length;M<S;M++)c=f[M],c.changed=!0;for(E(m),a.call(o),g(),l=b=0,C=r.length;b<C;l=++b)t=r[l],s[l].changed=t;for(L=0,q=f.length;L<q;L++)c=f[L],c.changed=!1}return m},r=function(){function n(n,t){var e;this.name=n,this.parent=t,this.owns={},null!=(e=this.parent)&&e.add(this)}return n.prototype.addMemeber=function(n){return this.owns[n.id]=n,this},n.prototype.removeMemeber=function(n){return delete this.owns[n.id],this},n.prototype.discard=function(){var n,t,e,r,i;for(null!=(r=this.parent)&&r.removeMemeber(this),i=this.owns,t=0,e=i.length;t<e;t++)n=i[t],n.discard()},n}(),v.blockFn=function(){var n,t;switch(arguments.length){case 1:n=arguments[0];break;case 2:t=arguments[0],n=arguments[1];break;default:throw"bad number of arguments"}return function(){var e,i,o;return e=1<=arguments.length?z.call(arguments,0):[],i=new r(t,s),o=n.apply(this,e),s=i.parent,o}},v.block=function(){var n,t,e;switch(arguments.length){case 1:t=arguments[0];break;case 2:e=arguments[0],t=arguments[1];break;default:throw"bad number of arguments"}return n=new r(e,s),t.call(this),s=n.parent,n},v.group=function(n){return function(){var t,e,r;return e=1<=arguments.length?z.call(arguments,0):[],v.notify===m?(t=[],v.notify=function(){var n;n=1<=arguments.length?z.call(arguments,0):[],Array.prototype.push.apply(t,n)},r=n.apply(this,e),v.notify=m,m.apply(v,t)):r=n.apply(this,e),r}},v.wrapConstIfNeeded=v.wrap=function(n,t){return void 0===n&&(n=null),v.knows(n)?n:v.const(n).name(t)},v.wrapVarIfNeeded=v.wrapVar=function(n,t){return void 0===n&&(n=null),v.knows(n)?n:v(n).name(t)},v.valueOf=function(n){return v.knows(n)?n.value():null!=n?n:null},_=0,v.namespace=function(n){return null==n&&(n="ns"),_++,n+_},N=function(n,t){var e,r,i,o,u;if(e=[],n)for(r={},o=0,u=n.length;o<u;o++)null!=(i=n[o])&&(t||i.listeners&&i.changers)&&!r[i.id]&&(r[i.id]=!0,e.push(i));return e},v.sortGraph=S=function(n){var t,e,r,i,o,u,l,c,s,f,h,p,v,g,d,y,m,w,x,M;for(null==n&&(n=0),i=new a("id"),t=function(n,t){var e,r,i,o,u,a,l,c,s,f;for(i={},e=0,s=n.listen,u=0,l=s.length;u<l;u++)for(o=s[u],f=o.changers,a=0,c=f.length;a<c;a++)r=f[a],t<=r.level&&!i[r.id]&&(i[r.id]=!0,++e);return e},o={},[],e=n,y=L.length;e<y;){for(v=L[e++],u=!0,l=0,g=v.listen,d=g.length;l<d&&u;)for(p=g[l++],x=p.changers,m=0,w=x.length;m<w;m++)if(h=x[m],n<=h.level){u=!1;break}u&&i.push(v)}for(c=n;i.length();){v=i.shift(),L[v.level=c++]=v,M=v.updates.valueOf();for(f in M)s=M[f],r=o[f]||t(s,n),r--,0===r?i.push(s):o[f]=r}if(c!==L.length)throw new Error("there is a cycle")},v.clearAll=function(){var n,t,e,r,i,o;for(e=0,i=L.length;e<i;e++)t=L[e],t.listen=t.change=t.updates=null;for(r=0,o=q.length;r<o;r++)n=q[r],n.listeners=n.changers=null;b=1,q=[],L=[]},x=new a("level"),h=null,f=null,C=null,E=function(n){C=[],f=n,v.notify=c},g=function(){f=null,v.notify=m,v.notify.apply(null,C),C=null},c=function(){var n,t,e;if(!f)throw new Error("bad stuff happened during a collect block");for(t=0,e=arguments.length;t<e;t++)if((n=arguments[t])instanceof o){if(n=y(n),T.call(f.change,n)<0)throw new Error("changed unregistered object "+n.id+" (collect)");C.push(n)}},v.notify=m=function(){var n,t,e,r,i,u,a,l,c,s,f;for(e=[],u=[],n=[],h=null,r=function(){var t,e,r,i,o,a;for(h=null,v.notify=m,r=0,o=n.length;r<o;r++)e=n[r],e.resetChanged();for(i=0,a=u.length;i<a;i++)t=u[i],t.visited=!1},a=0,c=arguments.length;a<c;a++)if((i=arguments[a])instanceof o)for(i=y(i),n.push(i),e.push(i.id),f=i.listeners,l=0,s=f.length;l<s;l++)t=f[l],x.push(t);for(v.notify=function(){var u,a,l,c,s,f,p;if(!h)throw new Error("bad stuff happened within a notify block");for(l=0,s=arguments.length;l<s;l++)if((i=arguments[l])instanceof o){if(i=y(i),T.call(h.change,i)<0)throw a=n.map(function(n){return n.id}).join(";"),u="changed unregistered object "+i.id+" within worker "+h.id+" [prev:"+a+"]",r(),new Error(u);for(n.push(i),e.push(i.id),p=i.listeners,c=0,f=p.length;c<f;c++)t=p[c],t.visited||x.push(t)}};x.length()>0;)h=x.shift(),h.visited||(h.visited=!0,u.push(h),e.push(h.id),h.fn.apply(h.ctx));r()},v.zero=v.const(0).name("zero"),v.null=v.const(null).name("null"),v.ident=function(n){return n},v.identity=v.const(v.ident).name("identity"),v.acc=function(n){var t,e;return n=v.wrap(n),t=v().name("acc"),e=function(){var e;return e=n.value(),null!=e?(e=String(e.valueOf()),t.value(function(n){return n[e]})):t.value(null)},v.register({fn:e,listen:[n],change:[t],name:"make_acc"}),t},v.debug=function(){var n,t,e;return e=function(){if("undefined"!=typeof console&&null!==console?console.log:void 0)return console.log.apply(console,arguments),arguments[0]},1===arguments.length?(t=v.wrap(arguments[0]),n=t.name()+":"):(t=v.wrap(arguments[1]),n=arguments[0]),v.register({listen:[t],fn:function(){return e(n,t.value())}}),t},v.apply=v.applyValid=function(){var n,t,e,r,i,o,u,a;switch(arguments.length){case 1:u=arguments[0],t=u.args,e=u.fn,r=u.invalid,n=u.allowNull,o=u.update,void 0!==t||arguments[0].hasOwnProperty("args")||(t=[]);break;case 2:t=arguments[0],e=arguments[1];break;case 3:t=arguments[0],a=arguments[1],r=a.invalid,n=a.allowNull,o=a.update,e=arguments[2];break;default:throw"incorect number of arguments"}return e=v.wrap(e||v.identity),Array.isArray(t)||(t=[t]),t=t.map(v.wrap),r=v.wrap(null!=r?r:null),i=v(r.value()).name("apply_valid_out"),v.register({name:"apply_fn",listen:t.concat([e,r]),change:i,fn:function(){var u,a,l,c,s,f,h,p;if(null!=(a=e.value())){for(s=[],l=!1,h=0,p=t.length;h<p;h++)u=t[h],f=u.value(),null==f&&(l=!0),s.push(f);if(!l||n){if(void 0===(c=a.apply(null,s)))return}else c=r.value();o?i.update(c):i.set(c).notify()}}}),i},v.applyAlways=function(){var n,t,e,r,i,o;switch(arguments.length){case 1:i=arguments[0],n=i.args,t=i.fn,r=i.update,void 0!==n||arguments[0].hasOwnProperty("args")||(n=[]);break;case 2:n=arguments[0],t=arguments[1];break;case 3:n=arguments[0],o=arguments[1],r=o.update,t=arguments[2];break;default:throw"incorect number of arguments"}return t=v.wrap(t||v.identity),Array.isArray(n)||(n=[n]),n=n.map(v.wrap),e=v().name("apply_valid_out"),v.register({name:"apply_fn",listen:n.concat([t]),change:e,fn:function(){var i,o,u,a,l,c;if(null!=(o=t.value())){for(a=[],l=0,c=n.length;l<c;l++)i=n[l],a.push(i.value());u=o.apply(null,a),void 0!==u&&(r?e.update(u):e.set(u).notify())}}}),e},v.chain=function(n,t){var e;return n=v.wrap(n),t=v.wrap(t),e=v().name("chain"),v.register({listen:[n,t],change:[e],fn:function(){var r,i;r=n.value(),i=t.value(),r&&i?e.value(function(n){return i(r(n))}):e.value(null)}}),e},v.op=function(n){var t;return t=M(n),function(){var n,e;return n=1<=arguments.length?z.call(arguments,0):[],n=n.map(v.wrap),e=v(),v.register({listen:n,change:[e],fn:function(){e.set(t.apply(null,n.map(function(n){return n.value()}))),v.notify(e)}}),e}},k={or:function(){var n,t,e,r;for(t=!1,e=0,r=arguments.length;e<r;e++)n=arguments[e],t||(t=n);return t},and:function(){var n,t,e,r;for(t=!0,e=0,r=arguments.length;e<r;e++)n=arguments[e],t&&(t=n);return t},add:function(){var n,t,e,r;for(t=0,e=0,r=arguments.length;e<r;e++){if(null==(n=arguments[e]))return null;t+=n}return t},sub:function(){var n,t,e,r,i;for(e=0,t=1,r=0,i=arguments.length;r<i;r++){if(null==(n=arguments[r]))return null;e+=n*t,t=-1}return e},list:function(){var n,t,e;for(n=1<=arguments.length?z.call(arguments,0):[],t=0,e=n.length;t<e;t++)if(null==n[t])return null;return n},concat:function(){var n,t,e;for(n=1<=arguments.length?z.call(arguments,0):[],t=0,e=n.length;t<e;t++)if(null==n[t])return null;return n.join("")},iff:function(n,t,e){return n?t:e},iffEq:function(n,t,e,r){return n===t?e:r},iffLt:function(n,t,e,r){return n<t?e:r},makeTranslate:function(n,t){return null!=n&&null!=t?"translate("+n+","+t+")":null}};for(w in k)d=k[w],v.op[w]=v.op(d);n.exports=v},function(n,t,e){var r,i,o,u,a,l;a=e(0),l=/(?=[#.:])/,u=a.const(function(n){return[n]}),o=a.op(function(n,t){return n+" "+(t||"")}),r=function(n){var t,e,r,i,c,s,f,h,p,v,g,d,y,m,w,x,M,b,_,k,S,E,C,N,A,q;if(d=n.parent,M=n.self,i=n.data,s=n.join,e=n.attr,_=n.style,w=n.property,S=n.text,c=n.html,t=n.on,E=n.transition,C=n.transitionExit,!d)throw"'parent' not defined";if("string"!=typeof M)throw"'self' not defined";for(m=M.split(l),p=m.shift(),null,b=[],A=0,q=m.length;A<q;A++)switch(y=m[A],y[0]){case"#":y.substring(1);break;case".":b.push(y.substring(1));break;default:throw"not currently supported in 'self' ("+y+")"}b=b.join(" "),d=a.wrap(d),i=a.wrap(i||u),s=a.wrap(s),S=S?a.wrap(S):null,c=c?a.wrap(c):null,E=a.wrap(E),C=a.wrap(C),h=[d,i,s,S,c,E,C],r={};for(f in e)N=e[f],N=a.wrap(N),"class"===f&&b&&(N=o(b,N)),h.push(N),r[f]=N;b&&!r.class&&(r.class=a.const(b)),k={};for(f in _)N=_[f],N=a.wrap(N),h.push(N),k[f]=N;x={};for(f in w)N=w[f],N=a.wrap(N),h.push(N),x[f]=N;v={};for(f in t)N=t[f],N=a.wrap(N),h.push(N),v[f]=N;return g=a().name("selection"),a.register({listen:h,change:[g],fn:function(){var n,t,e,o,u,a,l,h,y,m,w,b,_,A,q,L,z,T,j,O,D,P;if(D=d.value())if(h=d.hasChanged()||i.hasChanged()||s.hasChanged(),_=i.value(),q=s.value(),_){_=_.valueOf(),P=E.value(),C.value(),a=[],m=[],y=[],t=function(n,t){t.hasChanged()||h?(m.push({fn:n,a1:t.getPrev()}),y.push({fn:n,a1:t.value()})):a.push({fn:n,a1:t.value()})},e=function(n,t,e){e.hasChanged()||h?(a.push({fn:n,a1:t,a2:e.getPrev()}),m.push({fn:n,a1:t,a2:e.getPrev()}),y.push({fn:n,a1:t,a2:e.value()})):a.push({fn:n,a1:t,a2:e.value()})},o=function(n,t,e){e.hasChanged()||h?m.push({fn:n,a1:t,a2:e.value()}):a.push({fn:n,a1:t,a2:e.value()})},S&&t("text",S),c&&t("html",c);for(f in r)N=r[f],e("attr",f,N);for(f in k)N=k[f],e("style",f,N);for(f in x)N=x[f],e("property",f,N);for(f in v)N=v[f],o("on",f,N);for(w=D.selectAll(M).data(_,q),u=w.enter().append(p),A=0,T=a.length;A<T;A++)n=a[A],u[n.fn](n.a1,n.a2);for(L=0,j=m.length;L<j;L++)n=m[L],w[n.fn](n.a1,n.a2);for(P&&null!=P.duration?(b=w.transition(),b.duration(P.duration||1e3),P.delay&&b.delay(P.delay),P.ease&&b.ease(P.ease)):b=w,z=0,O=y.length;z<O;z++)n=y[z],b[n.fn](n.a1,n.a2);l=w.exit().remove(),u.empty()&&l.empty()&&!h||g.value(w)}else w=D.selectAll(M).remove(),g.value(w)}}),g},i=function(n){var t,e,r,i,u,c,s,f,h,p,v,g,d,y,m,w,x,M,b,_,k,S,E,C,N;if(v=n.parent,w=n.self,i=n.data,u=n.datum,e=n.attr,b=n.style,y=n.property,k=n.text,c=n.html,t=n.on,S=n.transition,i)throw new Error("bindSingle does not accept a parameter 'data'. Did you mean 'datum'?");if("string"==typeof w){if(!v)throw"'parent' not defined for string self";for(d=w.split(l),h=d.shift(),M=null,x=[],C=0,N=d.length;C<N;C++)switch(g=d[C],g[0]){case"#":M=g.substring(1);break;case".":x.push(g.substring(1));break;default:throw"not currently supported in 'self' ("+g+")"}x=x.join(" "),w=a.valueOf(v).append(h),w.attr("id",M),w.attr("class",x)}else x=w.attr("class");w=a.wrapVar(w),u=a.wrap(u),k=k?a.wrap(k):null,c=c?a.wrap(c):null,S=a.wrap(S),f=[u,k,c,S],r={};for(s in e)E=e[s],E=a.wrap(E),"class"===s&&x&&(E=o(x,E)),f.push(E),r[s]=E;_={};for(s in b)E=b[s],E=a.wrap(E),f.push(E),_[s]=E;m={};for(s in y)E=y[s],E=a.wrap(E),f.push(E),m[s]=E;p={};for(s in t)E=t[s],E=a.wrap(E),f.push(E),p[s]=E;return a.register({listen:f,change:[w],fn:function(){var n,t,e;t=w.value(),e=u.value(),(n=u.hasChanged())&&t.datum(e);for(s in r)E=r[s],(E.hasChanged()||n)&&t.attr(s,E.value());for(s in _)E=_[s],(E.hasChanged()||n)&&t.style(s,E.value());for(s in m)E=m[s],(E.hasChanged()||n)&&t.property(s,E.value());for(s in p)E=p[s],(E.hasChanged()||n)&&t.on(s,E.value());k&&(k.hasChanged()||n)&&t.text(k.value()),c&&(c.hasChanged()||n)&&t.html(c.value()),n&&w.notify()}}),w},n.exports={bind:r,bindSingle:i}},function(n,t){var e;e={typeOf:function(){var n;return n=Object.prototype.toString,function(t){var e;return e=n.call(t),e.substring(8,e.length-1).toLowerCase()}}(),strObj:function(n){var t,r,i,o,u,a;if("object"===(o=e.typeOf(n))||"array"===o){i=[],r=[];for(t in n)n.hasOwnProperty(t)&&r.push(t);for(r.sort(),u=0,a=r.length;u<a;u++)t=r[u],i.push(t,e.strObj(n[t]));return i.join("|")}return"function"===o?"&":String(n)},uniq:function(n){var t,e,r,i,o;for(e={},r=[],i=0,o=n.length;i<o;i++)t=n[i],e[t]||r.push(t),e[t]=1;return r},isEqual:function(n,t,r){var i,o,u,a,l,c,s,f;if(n===t)return!0;if(o=e.typeOf(n),a=e.typeOf(t),o!==a)return!1;if(!n&&t||n&&!t)return!1;if("date"===o)return n.getTime()===t.getTime();if(n!==n&&t!==t)return!1;if("regexp"===o)return n.source===t.source&&n.global===t.global&&n.ignoreCase===t.ignoreCase&&n.multiline===t.multiline;if("object"!==o&&"array"!==o)return!1;if(r)for(s=0,f=r.length;s<f;s++)if(l=r[s],l.a===n&&l.b===t||l.a===t&&l.b===n)return!0;if(null!=n.length&&n.length!==t.length)return!1;i=[];for(c in n)i.push(c);u=[];for(c in t)u.push(c);if(i.length!==u.length)return!1;r=r?r.slice():[],r.push({a:n,b:t});for(c in n)if(null==t[c]||!e.isEqual(n[c],t[c],r))return!1;return!0},clone:function(n){var t,r,i;switch(e.typeOf(n)){case"array":return n.slice();case"object":r={};for(t in n)i=n[t],r[t]=i;return r;case"date":return new Date(n.getTime());default:return n}},escapeHTML:function(n){return String(n).replace(/&/g,"&").replace(/>/g,">").replace(/</g,"<").replace(/"/g,""")}},n.exports=e},function(n,t){!function(){function t(n){return n&&(n.ownerDocument||n.document||n).documentElement}function e(n){return n&&(n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView)}function r(n,t){return n<t?-1:n>t?1:n>=t?0:NaN}function i(n){return null===n?NaN:+n}function o(n){return!isNaN(n)}function u(n){return{left:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;n(t[o],e)<0?r=o+1:i=o}return r},right:function(t,e,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;n(t[o],e)>0?i=o:r=o+1}return r}}}function a(n){return n.length}function l(n){for(var t=1;n*t%1;)t*=10;return t}function c(n,t){for(var e in t)Object.defineProperty(n.prototype,e,{value:t[e],enumerable:!1})}function s(){this._=Object.create(null)}function f(n){return(n+="")===xu||n[0]===Mu?Mu+n:n}function h(n){return(n+="")[0]===Mu?n.slice(1):n}function p(n){return f(n)in this._}function v(n){return(n=f(n))in this._&&delete this._[n]}function g(){var n=[];for(var t in this._)n.push(h(t));return n}function d(){var n=0;for(var t in this._)++n;return n}function y(){for(var n in this._)return!1;return!0}function m(){this._=Object.create(null)}function w(n){return n}function x(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function M(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=bu.length;e<r;++e){var i=bu[e]+t;if(i in n)return i}}function b(){}function _(){}function k(n){function t(){for(var t,r=e,i=-1,o=r.length;++i<o;)(t=r[i].on)&&t.apply(this,arguments);return n}var e=[],r=new s;return t.on=function(t,i){var o,u=r.get(t);return arguments.length<2?u&&u.on:(u&&(u.on=null,e=e.slice(0,o=e.indexOf(u)).concat(e.slice(o+1)),r.remove(t)),i&&e.push(r.set(t,{on:i})),n)},t}function S(){cu.event.preventDefault()}function E(){for(var n,t=cu.event;n=t.sourceEvent;)t=n;return t}function C(n){for(var t=new _,e=0,r=arguments.length;++e<r;)t[arguments[e]]=k(t);return t.of=function(e,r){return function(i){try{var o=i.sourceEvent=cu.event;i.target=n,cu.event=i,t[i.type].apply(e,r)}finally{cu.event=o}}},t}function N(n){return ku(n,Nu),n}function A(n){return"function"==typeof n?n:function(){return Su(n,this)}}function q(n){return"function"==typeof n?n:function(){return Eu(n,this)}}function L(n,t){function e(){this.removeAttribute(n)}function r(){this.removeAttributeNS(n.space,n.local)}function i(){this.setAttribute(n,t)}function o(){this.setAttributeNS(n.space,n.local,t)}function u(){var e=t.apply(this,arguments);null==e?this.removeAttribute(n):this.setAttribute(n,e)}function a(){var e=t.apply(this,arguments);null==e?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,e)}return n=cu.ns.qualify(n),null==t?n.local?r:e:"function"==typeof t?n.local?a:u:n.local?o:i}function z(n){return n.trim().replace(/\s+/g," ")}function T(n){return new RegExp("(?:^|\\s+)"+cu.requote(n)+"(?:\\s+|$)","g")}function j(n){return(n+"").trim().split(/^|\s+/)}function O(n,t){function e(){for(var e=-1;++e<i;)n[e](this,t)}function r(){for(var e=-1,r=t.apply(this,arguments);++e<i;)n[e](this,r)}n=j(n).map(D);var i=n.length;return"function"==typeof t?r:e}function D(n){var t=T(n);return function(e,r){if(i=e.classList)return r?i.add(n):i.remove(n);var i=e.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||e.setAttribute("class",z(i+" "+n))):e.setAttribute("class",z(i.replace(t," ")))}}function P(n,t,e){function r(){this.style.removeProperty(n)}function i(){this.style.setProperty(n,t,e)}function o(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(n):this.style.setProperty(n,r,e)}return null==t?r:"function"==typeof t?o:i}function R(n,t){function e(){delete this[n]}function r(){this[n]=t}function i(){var e=t.apply(this,arguments);null==e?delete this[n]:this[n]=e}return null==t?e:"function"==typeof t?i:r}function U(n){function t(){var t=this.ownerDocument,e=this.namespaceURI;return e?t.createElementNS(e,n):t.createElement(n)}function e(){return this.ownerDocument.createElementNS(n.space,n.local)}return"function"==typeof n?n:(n=cu.ns.qualify(n)).local?e:t}function F(){var n=this.parentNode;n&&n.removeChild(this)}function V(n){return{__data__:n}}function H(n){return function(){return Cu(this,n)}}function I(n){return arguments.length||(n=r),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function Y(n,t){for(var e=0,r=n.length;e<r;e++)for(var i,o=n[e],u=0,a=o.length;u<a;u++)(i=o[u])&&t(i,u,e);return n}function Z(n){return ku(n,qu),n}function $(n){var t,e;return function(r,i,o){var u,a=n[o].update,l=a.length;for(o!=e&&(e=o,t=0),i>=t&&(t=i+1);!(u=a[t])&&++t<l;);return u}}function B(n,t,e){function r(){var t=this[u];t&&(this.removeEventListener(n,t,t.$),delete this[u])}function i(){var i=l(t,fu(arguments));r.call(this),this.addEventListener(n,this[u]=i,i.$=e),i._=t}function o(){var t,e=new RegExp("^__on([^.]+)"+cu.requote(n)+"$");for(var r in this)if(t=r.match(e)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}var u="__on"+n,a=n.indexOf("."),l=X;a>0&&(n=n.slice(0,a));var c=Lu.get(n);return c&&(n=c,l=W),a?t?i:r:t?b:o}function X(n,t){return function(e){var r=cu.event;cu.event=e,t[0]=this.__data__;try{n.apply(this,t)}finally{cu.event=r}}}function W(n,t){var e=X(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function G(n){var r=".dragsuppress-"+ ++Tu,i="click"+r,o=cu.select(e(n)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==zu&&(zu=!("onselectstart"in n)&&M(n.style,"userSelect")),zu){var u=t(n).style,a=u[zu];u[zu]="none"}return function(n){if(o.on(r,null),zu&&(u[zu]=a),n){var t=function(){o.on(i,null)};o.on(i,function(){S(),t()},!0),setTimeout(t,0)}}}function J(n,t){t.changedTouches&&(t=t.changedTouches[0]);var r=n.ownerSVGElement||n;if(r.createSVGPoint){var i=r.createSVGPoint();if(ju<0){var o=e(n);if(o.scrollX||o.scrollY){r=cu.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var u=r[0][0].getScreenCTM();ju=!(u.f||u.e),r.remove()}}return ju?(i.x=t.pageX,i.y=t.pageY):(i.x=t.clientX,i.y=t.clientY),i=i.matrixTransform(n.getScreenCTM().inverse()),[i.x,i.y]}var a=n.getBoundingClientRect();return[t.clientX-a.left-n.clientLeft,t.clientY-a.top-n.clientTop]}function Q(){return cu.event.changedTouches[0].identifier}function K(n){return n>0?1:n<0?-1:0}function nn(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function tn(n){return n>1?0:n<-1?Pu:Math.acos(n)}function en(n){return n>1?Fu:n<-1?-Fu:Math.asin(n)}function rn(n){return((n=Math.exp(n))-1/n)/2}function on(n){return((n=Math.exp(n))+1/n)/2}function un(n){return((n=Math.exp(2*n))-1)/(n+1)}function an(n){return(n=Math.sin(n/2))*n}function ln(){}function cn(n,t,e){return this instanceof cn?(this.h=+n,this.s=+t,void(this.l=+e)):arguments.length<2?n instanceof cn?new cn(n.h,n.s,n.l):_n(""+n,kn,cn):new cn(n,t,e)}function sn(n,t,e){function r(n){return n>360?n-=360:n<0&&(n+=360),n<60?o+(u-o)*n/60:n<180?u:n<240?o+(u-o)*(240-n)/60:o}function i(n){return Math.round(255*r(n))}var o,u;return n=isNaN(n)?0:(n%=360)<0?n+360:n,t=isNaN(t)?0:t<0?0:t>1?1:t,e=e<0?0:e>1?1:e,u=e<=.5?e*(1+t):e+t-e*t,o=2*e-u,new wn(i(n+120),i(n),i(n-120))}function fn(n,t,e){return this instanceof fn?(this.h=+n,this.c=+t,void(this.l=+e)):arguments.length<2?n instanceof fn?new fn(n.h,n.c,n.l):n instanceof pn?gn(n.l,n.a,n.b):gn((n=Sn((n=cu.rgb(n)).r,n.g,n.b)).l,n.a,n.b):new fn(n,t,e)}function hn(n,t,e){return isNaN(n)&&(n=0),isNaN(t)&&(t=0),new pn(e,Math.cos(n*=Vu)*t,Math.sin(n)*t)}function pn(n,t,e){return this instanceof pn?(this.l=+n,this.a=+t,void(this.b=+e)):arguments.length<2?n instanceof pn?new pn(n.l,n.a,n.b):n instanceof fn?hn(n.h,n.c,n.l):Sn((n=wn(n)).r,n.g,n.b):new pn(n,t,e)}function vn(n,t,e){var r=(n+16)/116,i=r+t/500,o=r-e/200;return i=dn(i)*Qu,r=dn(r)*Ku,o=dn(o)*na,new wn(mn(3.2404542*i-1.5371385*r-.4985314*o),mn(-.969266*i+1.8760108*r+.041556*o),mn(.0556434*i-.2040259*r+1.0572252*o))}function gn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Hu,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function dn(n){return n>.206893034?n*n*n:(n-4/29)/7.787037}function yn(n){return n>.008856?Math.pow(n,1/3):7.787037*n+4/29}function mn(n){return Math.round(255*(n<=.00304?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function wn(n,t,e){return this instanceof wn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof wn?new wn(n.r,n.g,n.b):_n(""+n,wn,sn):new wn(n,t,e)}function xn(n){return new wn(n>>16,n>>8&255,255&n)}function Mn(n){return xn(n)+""}function bn(n){return n<16?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function _n(n,t,e){var r,i,o,u=0,a=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(n=n.toLowerCase()))switch(i=r[2].split(","),r[1]){case"hsl":return e(parseFloat(i[0]),parseFloat(i[1])/100,parseFloat(i[2])/100);case"rgb":return t(Cn(i[0]),Cn(i[1]),Cn(i[2]))}return(o=ra.get(n))?t(o.r,o.g,o.b):(null==n||"#"!==n.charAt(0)||isNaN(o=parseInt(n.slice(1),16))||(4===n.length?(u=(3840&o)>>4,u|=u>>4,a=240&o,a|=a>>4,l=15&o,l|=l<<4):7===n.length&&(u=(16711680&o)>>16,a=(65280&o)>>8,l=255&o)),t(u,a,l))}function kn(n,t,e){var r,i,o=Math.min(n/=255,t/=255,e/=255),u=Math.max(n,t,e),a=u-o,l=(u+o)/2;return a?(i=l<.5?a/(u+o):a/(2-u-o),r=n==u?(t-e)/a+(t<e?6:0):t==u?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new cn(r,i,l)}function Sn(n,t,e){n=En(n),t=En(t),e=En(e);var r=yn((.4124564*n+.3575761*t+.1804375*e)/Qu),i=yn((.2126729*n+.7151522*t+.072175*e)/Ku);return pn(116*i-16,500*(r-i),200*(i-yn((.0193339*n+.119192*t+.9503041*e)/na)))}function En(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function Cn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function Nn(n){return"function"==typeof n?n:function(){return n}}function An(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),qn(t,e,n,r)}}function qn(n,t,e,r){function i(){var n,t=l.status;if(!t&&zn(l)||t>=200&&t<300||304===t){try{n=e.call(o,l)}catch(n){return void u.error.call(o,n)}u.load.call(o,n)}else u.error.call(o,l)}var o={},u=cu.dispatch("beforesend","progress","load","error"),a={},l=new XMLHttpRequest,c=null;return!this.XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(n)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=i:l.onreadystatechange=function(){l.readyState>3&&i()},l.onprogress=function(n){var t=cu.event;cu.event=n;try{u.progress.call(o,l)}finally{cu.event=t}},o.header=function(n,t){return n=(n+"").toLowerCase(),arguments.length<2?a[n]:(null==t?delete a[n]:a[n]=t+"",o)},o.mimeType=function(n){return arguments.length?(t=null==n?null:n+"",o):t},o.responseType=function(n){return arguments.length?(c=n,o):c},o.response=function(n){return e=n,o},["get","post"].forEach(function(n){o[n]=function(){return o.send.apply(o,[n].concat(fu(arguments)))}}),o.send=function(e,r,i){if(2===arguments.length&&"function"==typeof r&&(i=r,r=null),l.open(e,n,!0),null==t||"accept"in a||(a.accept=t+",*/*"),l.setRequestHeader)for(var s in a)l.setRequestHeader(s,a[s]);return null!=t&&l.overrideMimeType&&l.overrideMimeType(t),null!=c&&(l.responseType=c),null!=i&&o.on("error",i).on("load",function(n){i(null,n)}),u.beforesend.call(o,l),l.send(null==r?null:r),o},o.abort=function(){return l.abort(),o},cu.rebind(o,u,"on"),null==r?o:o.get(Ln(r))}function Ln(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function zn(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Tn(n,t,e){var r=arguments.length;r<2&&(t=0),r<3&&(e=Date.now());var i=e+t,o={c:n,t:i,n:null};return oa?oa.n=o:ia=o,oa=o,ua||(aa=clearTimeout(aa),ua=1,la(jn)),o}function jn(){var n=On(),t=Dn()-n;t>24?(isFinite(t)&&(clearTimeout(aa),aa=setTimeout(jn,t)),ua=0):(ua=1,la(jn))}function On(){for(var n=Date.now(),t=ia;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Dn(){for(var n,t=ia,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:ia=t.n;return oa=n,e}function Pn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function Rn(n,t){var e=Math.pow(10,3*wu(8-t));return{scale:t>8?function(n){return n/e}:function(n){return n*e},symbol:n}}function Un(n){var t=n.decimal,e=n.thousands,r=n.grouping,i=n.currency,o=r&&e?function(n,t){for(var i=n.length,o=[],u=0,a=r[0],l=0;i>0&&a>0&&(l+a+1>t&&(a=Math.max(1,t-l)),o.push(n.substring(i-=a,i+a)),!((l+=a+1)>t));)a=r[u=(u+1)%r.length];return o.reverse().join(e)}:w;return function(n){var e=sa.exec(n),r=e[1]||" ",u=e[2]||">",a=e[3]||"-",l=e[4]||"",c=e[5],s=+e[6],f=e[7],h=e[8],p=e[9],v=1,g="",d="",y=!1,m=!0;switch(h&&(h=+h.substring(1)),(c||"0"===r&&"="===u)&&(c=r="0",u="="),p){case"n":f=!0,p="g";break;case"%":v=100,d="%",p="f";break;case"p":v=100,d="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(g="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":v=-1,p="r"}"$"===l&&(g=i[0],d=i[1]),"r"!=p||h||(p="g"),null!=h&&("g"==p?h=Math.max(1,Math.min(21,h)):"e"!=p&&"f"!=p||(h=Math.max(0,Math.min(20,h)))),p=fa.get(p)||Fn;var w=c&&f;return function(n){var e=d;if(y&&n%1)return"";var i=n<0||0===n&&1/n<0?(n=-n,"-"):"-"===a?"":a;if(v<0){var l=cu.formatPrefix(n,h);n=l.scale(n),e=l.symbol+d}else n*=v;n=p(n,h);var x,M,b=n.lastIndexOf(".");if(b<0){var _=m?n.lastIndexOf("e"):-1;_<0?(x=n,M=""):(x=n.substring(0,_),M=n.substring(_))}else x=n.substring(0,b),M=t+n.substring(b+1);!c&&f&&(x=o(x,1/0));var k=g.length+x.length+M.length+(w?0:i.length),S=k<s?new Array(k=s-k+1).join(r):"";return w&&(x=o(S+x,S.length?s-M.length:1/0)),i+=g,n=x+M,("<"===u?i+n+S:">"===u?S+i+n:"^"===u?S.substring(0,k>>=1)+i+n+S.substring(k):i+(w?n:S+n))+e}}}function Fn(n){return n+""}function Vn(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Hn(n,t,e){function r(t){var e=n(t),r=o(e,1);return t-e<r-t?e:r}function i(e){return t(e=n(new pa(e-1)),1),e}function o(n,e){return t(n=new pa(+n),e),n}function u(n,r,o){var u=i(n),a=[];if(o>1)for(;u<r;)e(u)%o||a.push(new Date(+u)),t(u,1);else for(;u<r;)a.push(new Date(+u)),t(u,1);return a}function a(n,t,e){try{pa=Vn;var r=new Vn;return r._=n,u(r,t,e)}finally{pa=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=o,n.range=u;var l=n.utc=In(n);return l.floor=l,l.round=In(r),l.ceil=In(i),l.offset=In(o),l.range=a,n}function In(n){return function(t,e){try{pa=Vn;var r=new Vn;return r._=t,n(r,e)._}finally{pa=Date}}}function Yn(n){function t(n){function t(t){for(var e,i,o,u=[],a=-1,l=0;++a<r;)37===n.charCodeAt(a)&&(u.push(n.slice(l,a)),null!=(i=ga[e=n.charAt(++a)])&&(e=n.charAt(++a)),(o=N[e])&&(e=o(t,null==i?"e"===e?" ":"0":i)),u.push(e),l=a+1);return u.push(n.slice(l,a)),u.join("")}var r=n.length;return t.parse=function(t){var r={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(e(r,n,t,0)!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var i=null!=r.Z&&pa!==Vn,o=new(i?Vn:pa);return"j"in r?o.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),o.setFullYear(r.y,0,1),o.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(o.getDay()+5)%7:r.w+7*r.U-(o.getDay()+6)%7)):o.setFullYear(r.y,r.m,r.d),o.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),i?o._:o},t.toString=function(){return n},t}function e(n,t,e,r){for(var i,o,u,a=0,l=t.length,c=e.length;a<l;){if(r>=c)return-1;if(37===(i=t.charCodeAt(a++))){if(u=t.charAt(a++),!(o=A[u in ga?t.charAt(a++):u])||(r=o(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){b.lastIndex=0;var r=b.exec(t.slice(e));return r?(n.w=_.get(r[0].toLowerCase()),e+r[0].length):-1}function i(n,t,e){x.lastIndex=0;var r=x.exec(t.slice(e));return r?(n.w=M.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){E.lastIndex=0;var r=E.exec(t.slice(e));return r?(n.m=C.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){k.lastIndex=0;var r=k.exec(t.slice(e));return r?(n.m=S.get(r[0].toLowerCase()),e+r[0].length):-1}function a(n,t,r){return e(n,N.c.toString(),t,r)}function l(n,t,r){return e(n,N.x.toString(),t,r)}function c(n,t,r){return e(n,N.X.toString(),t,r)}function s(n,t,e){var r=w.get(t.slice(e,e+=2).toLowerCase());return null==r?-1:(n.p=r,e)}var f=n.dateTime,h=n.date,p=n.time,v=n.periods,g=n.days,d=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{pa=Vn;var t=new pa;return t._=n,r(t)}finally{pa=Date}}var r=t(n);return e.parse=function(n){try{pa=Vn;var t=r.parse(n);return t&&t._}finally{pa=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=st;var w=cu.map(),x=$n(g),M=Bn(g),b=$n(d),_=Bn(d),k=$n(y),S=Bn(y),E=$n(m),C=Bn(m);v.forEach(function(n,t){w.set(n.toLowerCase(),t)});var N={a:function(n){return d[n.getDay()]},A:function(n){return g[n.getDay()]},b:function(n){return m[n.getMonth()]},B:function(n){return y[n.getMonth()]},c:t(f),d:function(n,t){return Zn(n.getDate(),t,2)},e:function(n,t){return Zn(n.getDate(),t,2)},H:function(n,t){return Zn(n.getHours(),t,2)},I:function(n,t){return Zn(n.getHours()%12||12,t,2)},j:function(n,t){return Zn(1+ha.dayOfYear(n),t,3)},L:function(n,t){return Zn(n.getMilliseconds(),t,3)},m:function(n,t){return Zn(n.getMonth()+1,t,2)},M:function(n,t){return Zn(n.getMinutes(),t,2)},p:function(n){return v[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(ha.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(ha.mondayOfYear(n),t,2)},x:t(h),X:t(p),y:function(n,t){return Zn(n.getFullYear()%100,t,2)},Y:function(n,t){return Zn(n.getFullYear()%1e4,t,4)},Z:lt,"%":function(){return"%"}},A={a:r,A:i,b:o,B:u,c:a,d:et,e:et,H:it,I:it,j:rt,L:at,m:tt,M:ot,p:s,S:ut,U:Wn,w:Xn,W:Gn,x:l,X:c,y:Qn,Y:Jn,Z:Kn,"%":ct};return t}function Zn(n,t,e){var r=n<0?"-":"",i=(r?-n:n)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(t)+i:i)}function $n(n){return new RegExp("^(?:"+n.map(cu.requote).join("|")+")","i")}function Bn(n){for(var t=new s,e=-1,r=n.length;++e<r;)t.set(n[e].toLowerCase(),e);return t}function Xn(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Wn(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Gn(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Qn(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+2));return r?(n.y=nt(+r[0]),e+r[0].length):-1}function Kn(n,t,e){return/^[+-]\d{4}$/.test(t=t.slice(e,e+5))?(n.Z=-t,e+5):-1}function nt(n){return n+(n>68?1900:2e3)}function tt(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function et(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function rt(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function it(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ot(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){da.lastIndex=0;var r=da.exec(t.slice(e,e+3));return r?(n.L=+r[0],e+r[0].length):-1}function lt(n){var t=n.getTimezoneOffset(),e=t>0?"-":"+",r=wu(t)/60|0,i=wu(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function ct(n,t,e){ya.lastIndex=0;var r=ya.exec(t.slice(e,e+1));return r?e+r[0].length:-1}function st(n){for(var t=n.length,e=-1;++e<t;)n[e][0]=this(n[e][0]);return function(t){for(var e=0,r=n[e];!r[1](t);)r=n[++e];return r[0](t)}}function ft(){}function ht(n,t,e){var r=e.s=n+t,i=r-n,o=r-i;e.t=n-o+(t-i)}function pt(n,t){n&&Ma.hasOwnProperty(n.type)&&Ma[n.type](n,t)}function vt(n,t,e){var r,i=-1,o=n.length-e;for(t.lineStart();++i<o;)r=n[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function gt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)vt(n[e],t,1);t.polygonEnd()}function dt(){function n(n,t){n*=Vu,t=t*Vu/2+Pu/4;var e=n-r,u=e>=0?1:-1,a=u*e,l=Math.cos(t),c=Math.sin(t),s=o*c,f=i*l+s*Math.cos(a),h=s*u*Math.sin(a);_a.add(Math.atan2(h,f)),r=n,i=l,o=c}var t,e,r,i,o;ka.point=function(u,a){ka.point=n,r=(t=u)*Vu,i=Math.cos(a=(e=a)*Vu/2+Pu/4),o=Math.sin(a)},ka.lineEnd=function(){n(t,e)}}function yt(n){var t=n[0],e=n[1],r=Math.cos(e);return[r*Math.cos(t),r*Math.sin(t),Math.sin(e)]}function mt(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function wt(n,t){return[n[1]*t[2]-n[2]*t[1],n[2]*t[0]-n[0]*t[2],n[0]*t[1]-n[1]*t[0]]}function xt(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function Mt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function bt(n){var t=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);n[0]/=t,n[1]/=t,n[2]/=t}function _t(n){return[Math.atan2(n[1],n[0]),en(n[2])]}function kt(n,t){return wu(n[0]-t[0])<Ou&&wu(n[1]-t[1])<Ou}function St(n,t){n*=Vu;var e=Math.cos(t*=Vu);Et(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Et(n,t,e){++Sa,Ca+=(n-Ca)/Sa,Na+=(t-Na)/Sa,Aa+=(e-Aa)/Sa}function Ct(){function n(n,i){n*=Vu;var o=Math.cos(i*=Vu),u=o*Math.cos(n),a=o*Math.sin(n),l=Math.sin(i),c=Math.atan2(Math.sqrt((c=e*l-r*a)*c+(c=r*u-t*l)*c+(c=t*a-e*u)*c),t*u+e*a+r*l);Ea+=c,qa+=c*(t+(t=u)),La+=c*(e+(e=a)),za+=c*(r+(r=l)),Et(t,e,r)}var t,e,r;Da.point=function(i,o){i*=Vu;var u=Math.cos(o*=Vu);t=u*Math.cos(i),e=u*Math.sin(i),r=Math.sin(o),Da.point=n,Et(t,e,r)}}function Nt(){Da.point=St}function At(){function n(n,t){n*=Vu;var e=Math.cos(t*=Vu),u=e*Math.cos(n),a=e*Math.sin(n),l=Math.sin(t),c=i*l-o*a,s=o*u-r*l,f=r*a-i*u,h=Math.sqrt(c*c+s*s+f*f),p=r*u+i*a+o*l,v=h&&-tn(p)/h,g=Math.atan2(h,p);Ta+=v*c,ja+=v*s,Oa+=v*f,Ea+=g,qa+=g*(r+(r=u)),La+=g*(i+(i=a)),za+=g*(o+(o=l)),Et(r,i,o)}var t,e,r,i,o;Da.point=function(u,a){t=u,e=a,Da.point=n,u*=Vu;var l=Math.cos(a*=Vu);r=l*Math.cos(u),i=l*Math.sin(u),o=Math.sin(a),Et(r,i,o)},Da.lineEnd=function(){n(t,e),Da.lineEnd=Nt,Da.point=St}}function qt(n,t){function e(e,r){return e=n(e,r),t(e[0],e[1])}return n.invert&&t.invert&&(e.invert=function(e,r){return(e=t.invert(e,r))&&n.invert(e[0],e[1])}),e}function Lt(){return!0}function zt(n,t,e,r,i){var o=[],u=[];if(n.forEach(function(n){if(!((t=n.length-1)<=0)){var t,e=n[0],r=n[t];if(kt(e,r)){i.lineStart();for(var a=0;a<t;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var l=new jt(e,n,null,!0),c=new jt(e,null,l,!1);l.o=c,o.push(l),u.push(c),l=new jt(r,n,null,!1),c=new jt(r,null,l,!0),l.o=c,o.push(l),u.push(c)}}),u.sort(t),Tt(o),Tt(u),o.length){for(var a=0,l=e,c=u.length;a<c;++a)u[a].e=l=!l;for(var s,f,h=o[0];;){for(var p=h,v=!0;p.v;)if((p=p.n)===h)return;s=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(v)for(var a=0,c=s.length;a<c;++a)i.point((f=s[a])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(v){s=p.p.z;for(var a=s.length-1;a>=0;--a)i.point((f=s[a])[0],f[1])}else r(p.x,p.p.x,-1,i);p=p.p}p=p.o,s=p.z,v=!v}while(!p.v);i.lineEnd()}}}function Tt(n){if(t=n.length){for(var t,e,r=0,i=n[0];++r<t;)i.n=e=n[r],e.p=i,i=e;i.n=e=n[0],e.p=i}}function jt(n,t,e,r){this.x=n,this.z=t,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Ot(n,t,e,r){return function(i,o){function u(t,e){var r=i(t,e);n(t=r[0],e=r[1])&&o.point(t,e)}function a(n,t){var e=i(n,t);d.point(e[0],e[1])}function l(){m.point=a,d.lineStart()}function c(){m.point=u,d.lineEnd()}function s(n,t){g.push([n,t]);var e=i(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),g=[]}function h(){s(g[0][0],g[0][1]),x.lineEnd();var n,t=x.clean(),e=w.buffer(),r=e.length;if(g.pop(),v.push(g),g=null,r)if(1&t){n=e[0];var i,r=n.length-1,u=-1;if(r>0){for(M||(o.polygonStart(),M=!0),o.lineStart();++u<r;)o.point((i=n[u])[0],i[1]);o.lineEnd()}}else r>1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(Dt))}var p,v,g,d=t(o),y=i.invert(r[0],r[1]),m={point:u,lineStart:l,lineEnd:c,polygonStart:function(){m.point=s,m.lineStart=f,m.lineEnd=h,p=[],v=[]},polygonEnd:function(){m.point=u,m.lineStart=l,m.lineEnd=c,p=cu.merge(p);var n=Ht(y,v);p.length?(M||(o.polygonStart(),M=!0),zt(p,Rt,n,e,o)):n&&(M||(o.polygonStart(),M=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),M&&(o.polygonEnd(),M=!1),p=v=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}},w=Pt(),x=t(w),M=!1;return m}}function Dt(n){return n.length>1}function Pt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:b,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Rt(n,t){return((n=n.x)[0]<0?n[1]-Fu-Ou:Fu-n[1])-((t=t.x)[0]<0?t[1]-Fu-Ou:Fu-t[1])}function Ut(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var a=o>0?Pu:-Pu,l=wu(o-e);wu(l-Pu)<Ou?(n.point(e,r=(r+u)/2>0?Fu:-Fu),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(o,r),t=0):i!==a&&l>=Pu&&(wu(e-i)<Ou&&(e-=i*Ou),wu(o-a)<Ou&&(o-=a*Ou),r=Ft(e,r,o,u),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),t=0),n.point(e=o,r=u),i=a},lineEnd:function(){n.lineEnd(),e=r=NaN},clean:function(){return 2-t}}}function Ft(n,t,e,r){var i,o,u=Math.sin(n-e);return wu(u)>Ou?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(e)-Math.sin(r)*(i=Math.cos(t))*Math.sin(n))/(i*o*u)):(t+r)/2}function Vt(n,t,e,r){var i;if(null==n)i=e*Fu,r.point(-Pu,i),r.point(0,i),r.point(Pu,i),r.point(Pu,0),r.point(Pu,-i),r.point(0,-i),r.point(-Pu,-i),r.point(-Pu,0),r.point(-Pu,i);else if(wu(n[0]-t[0])>Ou){var o=n[0]<t[0]?Pu:-Pu;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function Ht(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],o=0,u=0;_a.reset();for(var a=0,l=t.length;a<l;++a){var c=t[a],s=c.length;if(s)for(var f=c[0],h=f[0],p=f[1]/2+Pu/4,v=Math.sin(p),g=Math.cos(p),d=1;;){d===s&&(d=0),n=c[d];var y=n[0],m=n[1]/2+Pu/4,w=Math.sin(m),x=Math.cos(m),M=y-h,b=M>=0?1:-1,_=b*M,k=_>Pu,S=v*w;if(_a.add(Math.atan2(S*b*Math.sin(_),g*x+S*Math.cos(_))),o+=k?M+b*Ru:M,k^h>=e^y>=e){var E=wt(yt(f),yt(n));bt(E);var C=wt(i,E);bt(C);var N=(k^M>=0?-1:1)*en(C[2]);(r>N||r===N&&(E[0]||E[1]))&&(u+=k^M>=0?1:-1)}if(!d++)break;h=y,v=w,g=x,f=n}}return(o<-Ou||o<Ou&&_a<0)^1&u}function It(n){function t(n,t){return Math.cos(n)*Math.cos(t)>o}function e(n){var e,o,l,c,s;return{lineStart:function(){c=l=!1,s=1},point:function(f,h){var p,v=[f,h],g=t(f,h),d=u?g?0:i(f,h):g?i(f+(f<0?Pu:-Pu),h):0;if(!e&&(c=l=g)&&n.lineStart(),g!==l&&(p=r(e,v),(kt(e,p)||kt(v,p))&&(v[0]+=Ou,v[1]+=Ou,g=t(v[0],v[1]))),g!==l)s=0,g?(n.lineStart(),p=r(v,e),n.point(p[0],p[1])):(p=r(e,v),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&u^g){var y;d&o||!(y=r(v,e,!0))||(s=0,u?(n.lineStart(),n.point(y[0][0],y[0][1]),n.point(y[1][0],y[1][1]),n.lineEnd()):(n.point(y[1][0],y[1][1]),n.lineEnd(),n.lineStart(),n.point(y[0][0],y[0][1])))}!g||e&&kt(e,v)||n.point(v[0],v[1]),e=v,l=g,o=d},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=yt(n),i=yt(t),u=[1,0,0],a=wt(r,i),l=mt(a,a),c=a[0],s=l-c*c;if(!s)return!e&&n;var f=o*l/s,h=-o*c/s,p=wt(u,a),v=Mt(u,f);xt(v,Mt(a,h));var g=p,d=mt(v,g),y=mt(g,g),m=d*d-y*(mt(v,v)-1);if(!(m<0)){var w=Math.sqrt(m),x=Mt(g,(-d-w)/y);if(xt(x,v),x=_t(x),!e)return x;var M,b=n[0],_=t[0],k=n[1],S=t[1];_<b&&(M=b,b=_,_=M);var E=_-b,C=wu(E-Pu)<Ou,N=C||E<Ou;if(!C&&S<k&&(M=k,k=S,S=M),N?C?k+S>0^x[1]<(wu(x[0]-b)<Ou?k:S):k<=x[1]&&x[1]<=S:E>Pu^(b<=x[0]&&x[0]<=_)){var A=Mt(g,(-d+w)/y);return xt(A,v),[x,_t(A)]}}}function i(t,e){var r=u?n:Pu-n,i=0;return t<-r?i|=1:t>r&&(i|=2),e<-r?i|=4:e>r&&(i|=8),i}var o=Math.cos(n),u=o>0,a=wu(o)>Ou;return Ot(t,e,de(n,6*Vu),u?[0,-n]:[-Pu,n-Pu])}function Yt(n,t,e,r){return function(i){var o,u=i.a,a=i.b,l=u.x,c=u.y,s=a.x,f=a.y,h=0,p=1,v=s-l,g=f-c;if(o=n-l,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=e-l,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)}if(o=t-c,g||!(o>0)){if(o/=g,g<0){if(o<h)return;o<p&&(p=o)}else if(g>0){if(o>p)return;o>h&&(h=o)}if(o=r-c,g||!(o<0)){if(o/=g,g<0){if(o>p)return;o>h&&(h=o)}else if(g>0){if(o<h)return;o<p&&(p=o)}return h>0&&(i.a={x:l+h*v,y:c+h*g}),p<1&&(i.b={x:l+p*v,y:c+p*g}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return wu(r[0]-n)<Ou?i>0?0:3:wu(r[0]-e)<Ou?i>0?2:1:wu(r[1]-t)<Ou?i>0?1:0:i>0?3:2}function o(n,t){return u(n.x,t.x)}function u(n,t){var e=i(n,1),r=i(t,1);return e!==r?e-r:0===e?t[1]-n[1]:1===e?n[0]-t[0]:2===e?n[1]-t[1]:t[0]-n[0]}return function(a){function l(n){for(var t=0,e=d.length,r=n[1],i=0;i<e;++i)for(var o,u=1,a=d[i],l=a.length,c=a[0];u<l;++u)o=a[u],c[1]<=r?o[1]>r&&nn(c,o,n)>0&&++t:o[1]<=r&&nn(c,o,n)<0&&--t,c=o;return 0!==t}function c(o,a,l,c){var s=0,f=0;if(null==o||(s=i(o,l))!==(f=i(a,l))||u(o,a)<0^l>0)do{c.point(0===s||3===s?n:e,s>1?r:t)}while((s=(s+l+4)%4)!==f);else c.point(a[0],a[1])}function s(i,o){return n<=i&&i<=e&&t<=o&&o<=r}function f(n,t){s(n,t)&&a.point(n,t)}function h(){A.point=v,d&&d.push(y=[]),k=!0,_=!1,M=b=NaN}function p(){g&&(v(m,w),x&&_&&C.rejoin(),g.push(C.buffer())),A.point=f,_&&a.lineEnd()}function v(n,t){n=Math.max(-Ra,Math.min(Ra,n)),t=Math.max(-Ra,Math.min(Ra,t));var e=s(n,t);if(d&&y.push([n,t]),k)m=n,w=t,x=e,k=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&_)a.point(n,t);else{var r={a:{x:M,y:b},b:{x:n,y:t}};N(r)?(_||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),S=!1):e&&(a.lineStart(),a.point(n,t),S=!1)}M=n,b=t,_=e}var g,d,y,m,w,x,M,b,_,k,S,E=a,C=Pt(),N=Yt(n,t,e,r),A={point:f,lineStart:h,lineEnd:p,polygonStart:function(){a=C,g=[],d=[],S=!0},polygonEnd:function(){a=E,g=cu.merge(g);var t=l([n,r]),e=S&&t,i=g.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&zt(g,o,t,c,a),a.polygonEnd()),g=d=y=null}};return A}}function $t(n){var t=0,e=Pu/3,r=le(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Pu/180,e=n[1]*Pu/180):[t/Pu*180,e/Pu*180]},i}function Bt(n,t){function e(n,t){var e=Math.sqrt(o-2*i*Math.sin(t))/i;return[e*Math.sin(n*=i),u-e*Math.cos(n)]}var r=Math.sin(n),i=(r+Math.sin(t))/2,o=1+r*(2*i-r),u=Math.sqrt(o)/i;return e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/i,en((o-(n*n+e*e)*i*i)/(2*i))]},e}function Xt(){function n(n,t){Fa+=i*n-r*t,r=n,i=t}var t,e,r,i;Za.point=function(o,u){Za.point=n,t=r=o,e=i=u},Za.lineEnd=function(){n(t,e)}}function Wt(n,t){n<Va&&(Va=n),n>Ia&&(Ia=n),t<Ha&&(Ha=t),t>Ya&&(Ya=t)}function Gt(){function n(n,t){u.push("M",n,",",t,o)}function t(n,t){u.push("M",n,",",t),a.point=e}function e(n,t){u.push("L",n,",",t)}function r(){a.point=n}function i(){u.push("Z")}var o=Jt(4.5),u=[],a={point:n,lineStart:function(){a.point=t},lineEnd:r,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=r,a.point=n},pointRadius:function(n){return o=Jt(n),a},result:function(){if(u.length){var n=u.join("");return u=[],n}}};return a}function Jt(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function Qt(n,t){Ca+=n,Na+=t,++Aa}function Kt(){function n(n,r){var i=n-t,o=r-e,u=Math.sqrt(i*i+o*o);qa+=u*(t+n)/2,La+=u*(e+r)/2,za+=u,Qt(t=n,e=r)}var t,e;Ba.point=function(r,i){Ba.point=n,Qt(t=r,e=i)}}function ne(){Ba.point=Qt}function te(){function n(n,t){var e=n-r,o=t-i,u=Math.sqrt(e*e+o*o);qa+=u*(r+n)/2,La+=u*(i+t)/2,za+=u,u=i*n-r*t,Ta+=u*(r+n),ja+=u*(i+t),Oa+=3*u,Qt(r=n,i=t)}var t,e,r,i;Ba.point=function(o,u){Ba.point=n,Qt(t=r=o,e=i=u)},Ba.lineEnd=function(){n(t,e)}}function ee(n){function t(t,e){n.moveTo(t+u,e),n.arc(t,e,u,0,Ru)}function e(t,e){n.moveTo(t,e),a.point=r}function r(t,e){n.lineTo(t,e)}function i(){a.point=t}function o(){n.closePath()}var u=4.5,a={point:t,lineStart:function(){a.point=e},lineEnd:i,polygonStart:function(){a.lineEnd=o},polygonEnd:function(){a.lineEnd=i,a.point=t},pointRadius:function(n){return u=n,a},result:b};return a}function re(n){function t(n){return(a?r:e)(n)}function e(t){return ue(t,function(e,r){e=n(e,r),t.point(e[0],e[1])})}function r(t){function e(e,r){e=n(e,r),t.point(e[0],e[1])}function r(){w=NaN,k.point=o,t.lineStart()}function o(e,r){var o=yt([e,r]),u=n(e,r);i(w,x,m,M,b,_,w=u[0],x=u[1],m=e,M=o[0],b=o[1],_=o[2],a,t),t.point(w,x)}function u(){k.point=e,t.lineEnd()}function l(){r(),k.point=c,k.lineEnd=s}function c(n,t){o(f=n,h=t),p=w,v=x,g=M,d=b,y=_,k.point=o}function s(){i(w,x,m,M,b,_,p,v,f,g,d,y,a,t),k.lineEnd=u,u()}var f,h,p,v,g,d,y,m,w,x,M,b,_,k={point:e,lineStart:r,lineEnd:u,polygonStart:function(){t.polygonStart(),k.lineStart=l},polygonEnd:function(){t.polygonEnd(),k.lineStart=r}};return k}function i(t,e,r,a,l,c,s,f,h,p,v,g,d,y){var m=s-t,w=f-e,x=m*m+w*w;if(x>4*o&&d--){var M=a+p,b=l+v,_=c+g,k=Math.sqrt(M*M+b*b+_*_),S=Math.asin(_/=k),E=wu(wu(_)-1)<Ou||wu(r-h)<Ou?(r+h)/2:Math.atan2(b,M),C=n(E,S),N=C[0],A=C[1],q=N-t,L=A-e,z=w*q-m*L;(z*z/x>o||wu((m*q+w*L)/x-.5)>.3||a*p+l*v+c*g<u)&&(i(t,e,r,a,l,c,N,A,E,M/=k,b/=k,_,d,y),y.point(N,A),i(N,A,E,M,b,_,s,f,h,p,v,g,d,y))}}var o=.5,u=Math.cos(30*Vu),a=16;return t.precision=function(n){return arguments.length?(a=(o=n*n)>0&&16,t):Math.sqrt(o)},t}function ie(n){var t=re(function(t,e){return n([t*Hu,e*Hu])});return function(n){return ce(t(n))}}function oe(n){this.stream=n}function ue(n,t){return{point:t,sphere:function(){n.sphere()},lineStart:function(){n.lineStart()},lineEnd:function(){n.lineEnd()},polygonStart:function(){n.polygonStart()},polygonEnd:function(){n.polygonEnd()}}}function ae(n){return le(function(){return n})()}function le(n){function t(n){return n=a(n[0]*Vu,n[1]*Vu),[n[0]*h+l,c-n[1]*h]}function e(n){return(n=a.invert((n[0]-l)/h,(c-n[1])/h))&&[n[0]*Hu,n[1]*Hu]}function r(){a=qt(u=he(y,m,x),o);var n=o(g,d);return l=p-n[0]*h,c=v+n[1]*h,i()}function i(){return s&&(s.valid=!1,s=null),t}var o,u,a,l,c,s,f=re(function(n,t){return n=o(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,v=250,g=0,d=0,y=0,m=0,x=0,M=Pa,b=w,_=null,k=null;return t.stream=function(n){return s&&(s.valid=!1),s=ce(M(u,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(M=null==n?(_=n,Pa):It((_=+n)*Vu),i()):_},t.clipExtent=function(n){return arguments.length?(k=n,b=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):w,i()):k},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],v=+n[1],r()):[p,v]},t.center=function(n){return arguments.length?(g=n[0]%360*Vu,d=n[1]%360*Vu,r()):[g*Hu,d*Hu]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Vu,m=n[1]%360*Vu,x=n.length>2?n[2]%360*Vu:0,r()):[y*Hu,m*Hu,x*Hu]},cu.rebind(t,f,"precision"),function(){return o=n.apply(this,arguments),t.invert=o.invert&&e,r()}}function ce(n){return ue(n,function(t,e){n.point(t*Vu,e*Vu)})}function se(n,t){return[n,t]}function fe(n,t){return[n>Pu?n-Ru:n<-Pu?n+Ru:n,t]}function he(n,t,e){return n?t||e?qt(ve(n),ge(t,e)):ve(n):t||e?ge(t,e):fe}function pe(n){return function(t,e){return t+=n,[t>Pu?t-Ru:t<-Pu?t+Ru:t,e]}}function ve(n){var t=pe(n);return t.invert=pe(-n),t}function ge(n,t){function e(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*r+a*i;return[Math.atan2(l*o-s*u,a*r-c*i),en(s*o+l*u)]}var r=Math.cos(n),i=Math.sin(n),o=Math.cos(t),u=Math.sin(t);return e.invert=function(n,t){var e=Math.cos(t),a=Math.cos(n)*e,l=Math.sin(n)*e,c=Math.sin(t),s=c*o-l*u;return[Math.atan2(l*o+c*u,a*r+s*i),en(s*r-a*i)]},e}function de(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,o,u,a){var l=u*t;null!=i?(i=ye(e,i),o=ye(e,o),(u>0?i<o:i>o)&&(i+=u*Ru)):(i=n+u*Ru,o=n-.5*l);for(var c,s=i;u>0?s>o:s<o;s-=l)a.point((c=_t([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function ye(n,t){var e=yt(t);e[0]-=n,bt(e);var r=tn(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Ou)%(2*Math.PI)}function me(n,t,e){var r=cu.range(n,t-Ou,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function we(n,t,e){var r=cu.range(n,t-Ou,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function xe(n){return n.source}function Me(n){return n.target}function be(n,t,e,r){var i=Math.cos(t),o=Math.sin(t),u=Math.cos(r),a=Math.sin(r),l=i*Math.cos(n),c=i*Math.sin(n),s=u*Math.cos(e),f=u*Math.sin(e),h=2*Math.asin(Math.sqrt(an(r-t)+i*u*an(e-n))),p=1/Math.sin(h),v=h?function(n){var t=Math.sin(n*=h)*p,e=Math.sin(h-n)*p,r=e*l+t*s,i=e*c+t*f,u=e*o+t*a;return[Math.atan2(i,r)*Hu,Math.atan2(u,Math.sqrt(r*r+i*i))*Hu]}:function(){return[n*Hu,t*Hu]};return v.distance=h,v}function _e(){function n(n,i){var o=Math.sin(i*=Vu),u=Math.cos(i),a=wu((n*=Vu)-t),l=Math.cos(a);Xa+=Math.atan2(Math.sqrt((a=u*Math.sin(a))*a+(a=r*o-e*u*l)*a),e*o+r*u*l),t=n,e=o,r=u}var t,e,r;Wa.point=function(i,o){t=i*Vu,e=Math.sin(o*=Vu),r=Math.cos(o),Wa.point=n},Wa.lineEnd=function(){Wa.point=Wa.lineEnd=b}}function ke(n,t){function e(t,e){var r=Math.cos(t),i=Math.cos(e),o=n(r*i);return[o*i*Math.sin(t),o*Math.sin(e)]}return e.invert=function(n,e){var r=Math.sqrt(n*n+e*e),i=t(r),o=Math.sin(i),u=Math.cos(i);return[Math.atan2(n*o,r*u),Math.asin(r&&e*o/r)]},e}function Se(n,t){function e(n,t){u>0?t<-Fu+Ou&&(t=-Fu+Ou):t>Fu-Ou&&(t=Fu-Ou);var e=u/Math.pow(i(t),o);return[e*Math.sin(o*n),u-e*Math.cos(o*n)]}var r=Math.cos(n),i=function(n){return Math.tan(Pu/4+n/2)},o=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(i(t)/i(n)),u=r*Math.pow(i(n),o)/o;return o?(e.invert=function(n,t){var e=u-t,r=K(o)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/o,2*Math.atan(Math.pow(u/r,1/o))-Fu]},e):Ce}function Ee(n,t){function e(n,t){var e=o-t;return[e*Math.sin(i*n),o-e*Math.cos(i*n)]}var r=Math.cos(n),i=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),o=r/i+n;return wu(i)<Ou?se:(e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,o-K(i)*Math.sqrt(n*n+e*e)]},e)}function Ce(n,t){return[n,Math.log(Math.tan(Pu/4+t/2))]}function Ne(n){var t,e=ae(n),r=e.scale,i=e.translate,o=e.clipExtent;return e.scale=function(){var n=r.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.translate=function(){var n=i.apply(e,arguments);return n===e?t?e.clipExtent(null):e:n},e.clipExtent=function(n){var u=o.apply(e,arguments);if(u===e){if(t=null==n){var a=Pu*r(),l=i();o([[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]])}}else t&&(u=null);return u},e.clipExtent(null)}function Ae(n,t){return[Math.log(Math.tan(Pu/4+t/2)),-n]}function qe(n){return n[0]}function Le(n){return n[1]}function ze(n){for(var t=n.length,e=[0,1],r=2,i=2;i<t;i++){for(;r>1&&nn(n[e[r-2]],n[e[r-1]],n[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}function Te(n,t){return n[0]-t[0]||n[1]-t[1]}function je(n,t,e){return(e[0]-t[0])*(n[1]-t[1])<(e[1]-t[1])*(n[0]-t[0])}function Oe(n,t,e,r){var i=n[0],o=e[0],u=t[0]-i,a=r[0]-o,l=n[1],c=e[1],s=t[1]-l,f=r[1]-c,h=(a*(l-c)-f*(i-o))/(f*u-a*s);return[i+h*u,l+h*s]}function De(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function Pe(){ir(this),this.edge=this.site=this.circle=null}function Re(n){var t=al.pop()||new Pe;return t.site=n,t}function Ue(n){We(n),il.remove(n),al.push(n),ir(n)}function Fe(n){var t=n.circle,e=t.x,r=t.cy,i={x:e,y:r},o=n.P,u=n.N,a=[n];Ue(n);for(var l=o;l.circle&&wu(e-l.circle.x)<Ou&&wu(r-l.circle.cy)<Ou;)o=l.P,a.unshift(l),Ue(l),l=o;a.unshift(l),We(l);for(var c=u;c.circle&&wu(e-c.circle.x)<Ou&&wu(r-c.circle.cy)<Ou;)u=c.N,a.push(c),Ue(c),c=u;a.push(c),We(c);var s,f=a.length;for(s=1;s<f;++s)c=a[s],l=a[s-1],tr(c.edge,l.site,c.site,i);l=a[0],c=a[f-1],c.edge=Ke(l.site,c.site,null,i),Xe(l),Xe(c)}function Ve(n){for(var t,e,r,i,o=n.x,u=n.y,a=il._;a;)if((r=He(a,u)-o)>Ou)a=a.L;else{if(!((i=o-Ie(a,u))>Ou)){r>-Ou?(t=a.P,e=a):i>-Ou?(t=a,e=a.N):t=e=a;break}if(!a.R){t=a;break}a=a.R}var l=Re(n);if(il.insert(t,l),t||e){if(t===e)return We(t),e=Re(t.site),il.insert(l,e),l.edge=e.edge=Ke(t.site,l.site),Xe(t),void Xe(e);if(!e)return void(l.edge=Ke(t.site,l.site));We(t),We(e);var c=t.site,s=c.x,f=c.y,h=n.x-s,p=n.y-f,v=e.site,g=v.x-s,d=v.y-f,y=2*(h*d-p*g),m=h*h+p*p,w=g*g+d*d,x={x:(d*m-p*w)/y+s,y:(h*w-g*m)/y+f};tr(e.edge,c,v,x),l.edge=Ke(c,n,null,x),e.edge=Ke(n,v,null,x),Xe(t),Xe(e)}}function He(n,t){var e=n.site,r=e.x,i=e.y,o=i-t;if(!o)return r;var u=n.P;if(!u)return-1/0;e=u.site;var a=e.x,l=e.y,c=l-t;if(!c)return a;var s=a-r,f=1/o-1/c,h=s/c;return f?(-h+Math.sqrt(h*h-2*f*(s*s/(-2*c)-l+c/2+i-o/2)))/f+r:(r+a)/2}function Ie(n,t){var e=n.N;if(e)return He(e,t);var r=n.site;return r.y===t?r.x:1/0}function Ye(n){this.site=n,this.edges=[]}function Ze(n){for(var t,e,r,i,o,u,a,l,c,s,f=n[0][0],h=n[1][0],p=n[0][1],v=n[1][1],g=rl,d=g.length;d--;)if((o=g[d])&&o.prepare())for(a=o.edges,l=a.length,u=0;u<l;)s=a[u].end(),r=s.x,i=s.y,c=a[++u%l].start(),t=c.x,e=c.y,(wu(r-t)>Ou||wu(i-e)>Ou)&&(a.splice(u,0,new er(nr(o.site,s,wu(r-f)<Ou&&v-i>Ou?{x:f,y:wu(t-f)<Ou?e:v}:wu(i-v)<Ou&&h-r>Ou?{x:wu(e-v)<Ou?t:h,y:v}:wu(r-h)<Ou&&i-p>Ou?{x:h,y:wu(t-h)<Ou?e:p}:wu(i-p)<Ou&&r-f>Ou?{x:wu(e-p)<Ou?t:f,y:p}:null),o.site,null)),++l)}function $e(n,t){return t.angle-n.angle}function Be(){ir(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xe(n){var t=n.P,e=n.N;if(t&&e){var r=t.site,i=n.site,o=e.site;if(r!==o){var u=i.x,a=i.y,l=r.x-u,c=r.y-a,s=o.x-u,f=o.y-a,h=2*(l*f-c*s);if(!(h>=-Du)){var p=l*l+c*c,v=s*s+f*f,g=(f*p-c*v)/h,d=(l*v-s*p)/h,f=d+a,y=ll.pop()||new Be;y.arc=n,y.site=i,y.x=g+u,y.y=f+Math.sqrt(g*g+d*d),y.cy=f,n.circle=y;for(var m=null,w=ul._;w;)if(y.y<w.y||y.y===w.y&&y.x<=w.x){if(!w.L){m=w.P;break}w=w.L}else{if(!w.R){m=w;break}w=w.R}ul.insert(m,y),m||(ol=y)}}}}function We(n){var t=n.circle;t&&(t.P||(ol=t.N),ul.remove(t),ll.push(t),ir(t),n.circle=null)}function Ge(n){for(var t,e=el,r=Yt(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)t=e[i],(!Je(t,n)||!r(t)||wu(t.a.x-t.b.x)<Ou&&wu(t.a.y-t.b.y)<Ou)&&(t.a=t.b=null,e.splice(i,1))}function Je(n,t){var e=n.b;if(e)return!0;var r,i,o=n.a,u=t[0][0],a=t[1][0],l=t[0][1],c=t[1][1],s=n.l,f=n.r,h=s.x,p=s.y,v=f.x,g=f.y,d=(h+v)/2,y=(p+g)/2;if(g===p){if(d<u||d>=a)return;if(h>v){if(o){if(o.y>=c)return}else o={x:d,y:l};e={x:d,y:c}}else{if(o){if(o.y<l)return}else o={x:d,y:c};e={x:d,y:l}}}else if(r=(h-v)/(g-p),i=y-r*d,r<-1||r>1)if(h>v){if(o){if(o.y>=c)return}else o={x:(l-i)/r,y:l};e={x:(c-i)/r,y:c}}else{if(o){if(o.y<l)return}else o={x:(c-i)/r,y:c};e={x:(l-i)/r,y:l}}else if(p<g){if(o){if(o.x>=a)return}else o={x:u,y:r*u+i};e={x:a,y:r*a+i}}else{if(o){if(o.x<u)return}else o={x:a,y:r*a+i};e={x:u,y:r*u+i}}return n.a=o,n.b=e,!0}function Qe(n,t){this.l=n,this.r=t,this.a=this.b=null}function Ke(n,t,e,r){var i=new Qe(n,t);return el.push(i),e&&tr(i,n,t,e),r&&tr(i,t,n,r),rl[n.i].edges.push(new er(i,n,t)),rl[t.i].edges.push(new er(i,t,n)),i}function nr(n,t,e){var r=new Qe(n,null);return r.a=t,r.b=e,el.push(r),r}function tr(n,t,e,r){n.a||n.b?n.l===e?n.b=r:n.a=r:(n.a=r,n.l=t,n.r=e)}function er(n,t,e){var r=n.a,i=n.b;this.edge=n,this.site=t,this.angle=e?Math.atan2(e.y-t.y,e.x-t.x):n.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function rr(){this._=null}function ir(n){n.U=n.C=n.L=n.R=n.P=n.N=null}function or(n,t){var e=t,r=t.R,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function ur(n,t){var e=t,r=t.L,i=e.U;i?i.L===e?i.L=r:i.R=r:n._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function ar(n){for(;n.L;)n=n.L;return n}function lr(n,t){var e,r,i,o=n.sort(cr).pop();for(el=[],rl=new Array(n.length),il=new rr,ul=new rr;;)if(i=ol,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===e&&o.y===r||(rl[o.i]=new Ye(o),Ve(o),e=o.x,r=o.y),o=n.pop();else{if(!i)break;Fe(i.arc)}t&&(Ge(t),Ze(t));var u={cells:rl,edges:el};return il=ul=el=rl=null,u}function cr(n,t){return t.y-n.y||t.x-n.x}function sr(n,t,e){return(n.x-e.x)*(t.y-n.y)-(n.x-t.x)*(e.y-n.y)}function fr(n){return n.x}function hr(n){return n.y}function pr(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function vr(n,t,e,r,i,o){if(!n(t,e,r,i,o)){var u=.5*(e+i),a=.5*(r+o),l=t.nodes;l[0]&&vr(n,l[0],e,r,u,a),l[1]&&vr(n,l[1],u,r,i,a),l[2]&&vr(n,l[2],e,a,u,o),l[3]&&vr(n,l[3],u,a,i,o)}}function gr(n,t,e,r,i,o,u){var a,l=1/0;return function n(c,s,f,h,p){if(!(s>o||f>u||h<r||p<i)){if(v=c.point){var v,g=t-c.x,d=e-c.y,y=g*g+d*d;if(y<l){var m=Math.sqrt(l=y);r=t-m,i=e-m,o=t+m,u=e+m,a=v}}for(var w=c.nodes,x=.5*(s+h),M=.5*(f+p),b=t>=x,_=e>=M,k=_<<1|b,S=k+4;k<S;++k)if(c=w[3&k])switch(3&k){case 0:n(c,s,f,x,M);break;case 1:n(c,x,f,h,M);break;case 2:n(c,s,M,x,p);break;case 3:n(c,x,M,h,p)}}}(n,r,i,o,u),a}function dr(n,t){n=cu.rgb(n),t=cu.rgb(t);var e=n.r,r=n.g,i=n.b,o=t.r-e,u=t.g-r,a=t.b-i;return function(n){return"#"+bn(Math.round(e+o*n))+bn(Math.round(r+u*n))+bn(Math.round(i+a*n))}}function yr(n,t){var e,r={},i={};for(e in n)e in t?r[e]=xr(n[e],t[e]):i[e]=n[e];for(e in t)e in n||(i[e]=t[e]);return function(n){for(e in r)i[e]=r[e](n);return i}}function mr(n,t){return n=+n,t=+t,function(e){return n*(1-e)+t*e}}function wr(n,t){var e,r,i,o=sl.lastIndex=fl.lastIndex=0,u=-1,a=[],l=[];for(n+="",t+="";(e=sl.exec(n))&&(r=fl.exec(t));)(i=r.index)>o&&(i=t.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,l.push({i:u,x:mr(e,r)})),o=fl.lastIndex;return o<t.length&&(i=t.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?l[0]?(t=l[0].x,function(n){return t(n)+""}):function(){return t}:(t=l.length,function(n){for(var e,r=0;r<t;++r)a[(e=l[r]).i]=e.x(n);return a.join("")})}function xr(n,t){for(var e,r=cu.interpolators.length;--r>=0&&!(e=cu.interpolators[r](n,t)););return e}function Mr(n,t){var e,r=[],i=[],o=n.length,u=t.length,a=Math.min(n.length,t.length);for(e=0;e<a;++e)r.push(xr(n[e],t[e]));for(;e<o;++e)i[e]=n[e];for(;e<u;++e)i[e]=t[e];return function(n){for(e=0;e<a;++e)i[e]=r[e](n);return i}}function br(n){return function(t){return t<=0?0:t>=1?1:n(t)}}function _r(n){return function(t){return 1-n(1-t)}}function kr(n){return function(t){return.5*(t<.5?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function Er(n){return n*n*n}function Cr(n){if(n<=0)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(n<.5?e:3*(n-t)+e-.75)}function Nr(n){return function(t){return Math.pow(t,n)}}function Ar(n){return 1-Math.cos(n*Fu)}function qr(n){return Math.pow(2,10*(n-1))}function Lr(n){return 1-Math.sqrt(1-n*n)}function zr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Ru*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Ru/t)}}function Tr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function jr(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Or(n,t){n=cu.hcl(n),t=cu.hcl(t);var e=n.h,r=n.c,i=n.l,o=t.h-e,u=t.c-r,a=t.l-i;return isNaN(u)&&(u=0,r=isNaN(r)?t.c:r),isNaN(o)?(o=0,e=isNaN(e)?t.h:e):o>180?o-=360:o<-180&&(o+=360),function(n){return hn(e+o*n,r+u*n,i+a*n)+""}}function Dr(n,t){n=cu.hsl(n),t=cu.hsl(t);var e=n.h,r=n.s,i=n.l,o=t.h-e,u=t.s-r,a=t.l-i;return isNaN(u)&&(u=0,r=isNaN(r)?t.s:r),isNaN(o)?(o=0,e=isNaN(e)?t.h:e):o>180?o-=360:o<-180&&(o+=360),function(n){return sn(e+o*n,r+u*n,i+a*n)+""}}function Pr(n,t){n=cu.lab(n),t=cu.lab(t);var e=n.l,r=n.a,i=n.b,o=t.l-e,u=t.a-r,a=t.b-i;return function(n){return vn(e+o*n,r+u*n,i+a*n)+""}}function Rr(n,t){return t-=n,function(e){return Math.round(n+t*e)}}function Ur(n){var t=[n.a,n.b],e=[n.c,n.d],r=Vr(t),i=Fr(t,e),o=Vr(Hr(e,t,-i))||0;t[0]*e[1]<e[0]*t[1]&&(t[0]*=-1,t[1]*=-1,r*=-1,i*=-1),this.rotate=(r?Math.atan2(t[1],t[0]):Math.atan2(-e[0],e[1]))*Hu,this.translate=[n.e,n.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Hu:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Vr(n){var t=Math.sqrt(Fr(n,n));return t&&(n[0]/=t,n[1]/=t),t}function Hr(n,t,e){return n[0]+=e*t[0],n[1]+=e*t[1],n}function Ir(n){return n.length?n.pop()+",":""}function Yr(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push("translate(",null,",",null,")");r.push({i:i-4,x:mr(n[0],t[0])},{i:i-2,x:mr(n[1],t[1])})}else(t[0]||t[1])&&e.push("translate("+t+")")}function Zr(n,t,e,r){n!==t?(n-t>180?t+=360:t-n>180&&(n+=360),r.push({i:e.push(Ir(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Ir(e)+"rotate("+t+")")}function $r(n,t,e,r){n!==t?r.push({i:e.push(Ir(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Ir(e)+"skewX("+t+")")}function Br(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Ir(e)+"scale(",null,",",null,")");r.push({i:i-4,x:mr(n[0],t[0])},{i:i-2,x:mr(n[1],t[1])})}else 1===t[0]&&1===t[1]||e.push(Ir(e)+"scale("+t+")")}function Xr(n,t){var e=[],r=[];return n=cu.transform(n),t=cu.transform(t),Yr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),$r(n.skew,t.skew,e,r),Br(n.scale,t.scale,e,r),n=t=null,function(n){for(var t,i=-1,o=r.length;++i<o;)e[(t=r[i]).i]=t.x(n);return e.join("")}}function Wr(n,t){return t=(t-=n=+n)||1/t,function(e){return(e-n)/t}}function Gr(n,t){return t=(t-=n=+n)||1/t,function(e){return Math.max(0,Math.min(1,(e-n)/t))}}function Jr(n){for(var t=n.source,e=n.target,r=Kr(t,e),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;e!==r;)i.splice(o,0,e),e=e.parent;return i}function Qr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Kr(n,t){if(n===t)return n;for(var e=Qr(n),r=Qr(t),i=e.pop(),o=r.pop(),u=null;i===o;)u=i,i=e.pop(),o=r.pop();return u}function ni(n){n.fixed|=2}function ti(n){n.fixed&=-7}function ei(n){n.fixed|=4,n.px=n.x,n.py=n.y}function ri(n){n.fixed&=-5}function ii(n,t,e){var r=0,i=0;if(n.charge=0,!n.leaf)for(var o,u=n.nodes,a=u.length,l=-1;++l<a;)null!=(o=u[l])&&(ii(o,t,e),n.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(n.point){n.leaf||(n.point.x+=Math.random()-.5,n.point.y+=Math.random()-.5);var c=t*e[n.point.index];n.charge+=n.pointCharge=c,r+=c*n.point.x,i+=c*n.point.y}n.cx=r/n.charge,n.cy=i/n.charge}function oi(n,t){return cu.rebind(n,t,"sort","children","value"),n.nodes=n,n.links=fi,n}function ui(n,t){for(var e=[n];null!=(n=e.pop());)if(t(n),(i=n.children)&&(r=i.length))for(var r,i;--r>=0;)e.push(i[r])}function ai(n,t){for(var e=[n],r=[];null!=(n=e.pop());)if(r.push(n),(o=n.children)&&(i=o.length))for(var i,o,u=-1;++u<i;)e.push(o[u]);for(;null!=(n=r.pop());)t(n)}function li(n){return n.children}function ci(n){return n.value}function si(n,t){return t.value-n.value}function fi(n){return cu.merge(n.map(function(n){return(n.children||[]).map(function(t){return{source:n,target:t}})}))}function hi(n){return n.x}function pi(n){return n.y}function vi(n,t,e){n.y0=t,n.y=e}function gi(n){return cu.range(n.length)}function di(n){for(var t=-1,e=n[0].length,r=[];++t<e;)r[t]=0;return r}function yi(n){for(var t,e=1,r=0,i=n[0][1],o=n.length;e<o;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function mi(n){return n.reduce(wi,0)}function wi(n,t){return n+t[1]}function xi(n,t){return Mi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function Mi(n,t){for(var e=-1,r=+n[0],i=(n[1]-r)/t,o=[];++e<=t;)o[e]=i*e+r;return o}function bi(n){return[cu.min(n),cu.max(n)]}function _i(n,t){return n.value-t.value}function ki(n,t){var e=n._pack_next;n._pack_next=t,t._pack_prev=n,t._pack_next=e,e._pack_prev=t}function Si(n,t){n._pack_next=t,t._pack_prev=n}function Ei(n,t){var e=t.x-n.x,r=t.y-n.y,i=n.r+t.r;return.999*i*i>e*e+r*r}function Ci(n){function t(n){s=Math.min(n.x-n.r,s),f=Math.max(n.x+n.r,f),h=Math.min(n.y-n.r,h),p=Math.max(n.y+n.r,p)}if((e=n.children)&&(c=e.length)){var e,r,i,o,u,a,l,c,s=1/0,f=-1/0,h=1/0,p=-1/0;if(e.forEach(Ni),r=e[0],r.x=-r.r,r.y=0,t(r),c>1&&(i=e[1],i.x=i.r,i.y=0,t(i),c>2))for(o=e[2],Li(r,i,o),t(o),ki(r,o),r._pack_prev=o,ki(o,i),i=r._pack_next,u=3;u<c;u++){Li(r,i,o=e[u]);var v=0,g=1,d=1;for(a=i._pack_next;a!==i;a=a._pack_next,g++)if(Ei(a,o)){v=1;break}if(1==v)for(l=r._pack_prev;l!==a._pack_prev&&!Ei(l,o);l=l._pack_prev,d++);v?(g<d||g==d&&i.r<r.r?Si(r,i=a):Si(r=l,i),u--):(ki(r,o),i=o,t(o))}var y=(s+f)/2,m=(h+p)/2,w=0;for(u=0;u<c;u++)o=e[u],o.x-=y,o.y-=m,w=Math.max(w,o.r+Math.sqrt(o.x*o.x+o.y*o.y));n.r=w,e.forEach(Ai)}}function Ni(n){n._pack_next=n._pack_prev=n}function Ai(n){delete n._pack_next,delete n._pack_prev}function qi(n,t,e,r){var i=n.children;if(n.x=t+=r*n.x,n.y=e+=r*n.y,n.r*=r,i)for(var o=-1,u=i.length;++o<u;)qi(i[o],t,e,r)}function Li(n,t,e){var r=n.r+e.r,i=t.x-n.x,o=t.y-n.y;if(r&&(i||o)){var u=t.r+e.r,a=i*i+o*o;u*=u,r*=r;var l=.5+(r-u)/(2*a),c=Math.sqrt(Math.max(0,2*u*(r+a)-(r-=a)*r-u*u))/(2*a);e.x=n.x+l*i+c*o,e.y=n.y+l*o-c*i}else e.x=n.x+r,e.y=n.y}function zi(n,t){return n.parent==t.parent?1:2}function Ti(n){var t=n.children;return t.length?t[0]:n.t}function ji(n){var t,e=n.children;return(t=e.length)?e[t-1]:n.t}function Oi(n,t,e){var r=e/(t.i-n.i);t.c-=r,t.s+=e,n.c+=r,t.z+=e,t.m+=e}function Di(n){for(var t,e=0,r=0,i=n.children,o=i.length;--o>=0;)t=i[o],t.z+=e,t.m+=e,e+=t.s+(r+=t.c)}function Pi(n,t,e){return n.a.parent===t.parent?n.a:e}function Ri(n){return 1+cu.max(n,function(n){return n.y})}function Ui(n){return n.reduce(function(n,t){return n+t.x},0)/n.length}function Fi(n){var t=n.children;return t&&t.length?Fi(t[0]):n}function Vi(n){var t,e=n.children;return e&&(t=e.length)?Vi(e[t-1]):n}function Hi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Ii(n,t){var e=n.x+t[3],r=n.y+t[0],i=n.dx-t[1]-t[3],o=n.dy-t[0]-t[2];return i<0&&(e+=i/2,i=0),o<0&&(r+=o/2,o=0),{x:e,y:r,dx:i,dy:o}}function Yi(n){var t=n[0],e=n[n.length-1];return t<e?[t,e]:[e,t]}function Zi(n){return n.rangeExtent?n.rangeExtent():Yi(n.range())}function $i(n,t,e,r){var i=e(n[0],n[1]),o=r(t[0],t[1]);return function(n){return o(i(n))}}function Bi(n,t){var e,r=0,i=n.length-1,o=n[r],u=n[i];return u<o&&(e=r,r=i,i=e,e=o,o=u,u=e),n[r]=t.floor(o),n[i]=t.ceil(u),n}function Xi(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:bl}function Wi(n,t,e,r){var i=[],o=[],u=0,a=Math.min(n.length,t.length)-1;for(n[a]<n[0]&&(n=n.slice().reverse(),t=t.slice().reverse());++u<=a;)i.push(e(n[u-1],n[u])),o.push(r(t[u-1],t[u]));return function(t){var e=cu.bisect(n,t,1,a)-1;return o[e](i[e](t))}}function Gi(n,t,e,r){function i(){var i=Math.min(n.length,t.length)>2?Wi:$i,l=r?Gr:Wr;return u=i(n,t,l,e),a=i(t,n,l,xr),o}function o(n){return u(n)}var u,a;return o.invert=function(n){return a(n)},o.domain=function(t){return arguments.length?(n=t.map(Number),i()):n},o.range=function(n){return arguments.length?(t=n,i()):t},o.rangeRound=function(n){return o.range(n).interpolate(Rr)},o.clamp=function(n){return arguments.length?(r=n,i()):r},o.interpolate=function(n){return arguments.length?(e=n,i()):e},o.ticks=function(t){return no(n,t)},o.tickFormat=function(t,e){return to(n,t,e)},o.nice=function(t){return Qi(n,t),i()},o.copy=function(){return Gi(n,t,e,r)},i()}function Ji(n,t){return cu.rebind(n,t,"range","rangeRound","interpolate","clamp")}function Qi(n,t){return Bi(n,Xi(Ki(n,t)[2]))}function Ki(n,t){null==t&&(t=10);var e=Yi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return o<=.15?i*=10:o<=.35?i*=5:o<=.75&&(i*=2),e[0]=Math.ceil(e[0]/i)*i,e[1]=Math.floor(e[1]/i)*i+.5*i,e[2]=i,e}function no(n,t){return cu.range.apply(cu,Ki(n,t))}function to(n,t,e){var r=Ki(n,t);if(e){var i=sa.exec(e);if(i.shift(),"s"===i[8]){var o=cu.formatPrefix(Math.max(wu(r[0]),wu(r[1])));return i[7]||(i[7]="."+eo(o.scale(r[2]))),i[8]="f",e=cu.format(i.join("")),function(n){return e(o.scale(n))+o.symbol}}i[7]||(i[7]="."+ro(i[8],r)),e=i.join("")}else e=",."+eo(r[2])+"f";return cu.format(e)}function eo(n){return-Math.floor(Math.log(n)/Math.LN10+.01)}function ro(n,t){var e=eo(t[2]);return n in _l?Math.abs(e-eo(Math.max(wu(t[0]),wu(t[1]))))+ +("e"!==n):e-2*("%"===n)}function io(n,t,e,r){function i(n){return(e?Math.log(n<0?0:n):-Math.log(n>0?0:-n))/Math.log(t)}function o(n){return e?Math.pow(t,n):-Math.pow(t,-n)}function u(t){return n(i(t))}return u.invert=function(t){return o(n.invert(t))},u.domain=function(t){return arguments.length?(e=t[0]>=0,n.domain((r=t.map(Number)).map(i)),u):r},u.base=function(e){return arguments.length?(t=+e,n.domain(r.map(i)),u):t},u.nice=function(){var t=Bi(r.map(i),e?Math:Sl);return n.domain(t),r=t.map(o),u},u.ticks=function(){var n=Yi(r),u=[],a=n[0],l=n[1],c=Math.floor(i(a)),s=Math.ceil(i(l)),f=t%1?2:t;if(isFinite(s-c)){if(e){for(;c<s;c++)for(var h=1;h<f;h++)u.push(o(c)*h);u.push(o(c))}else for(u.push(o(c));c++<s;)for(var h=f-1;h>0;h--)u.push(o(c)*h);for(c=0;u[c]<a;c++);for(s=u.length;u[s-1]>l;s--);u=u.slice(c,s)}return u},u.tickFormat=function(n,t){if(!arguments.length)return kl;arguments.length<2?t=kl:"function"!=typeof t&&(t=cu.format(t));var r,a=Math.max(.1,n/u.ticks().length),l=e?(r=1e-12,Math.ceil):(r=-1e-12,Math.floor);return function(n){return n/o(l(i(n)+r))<=a?t(n):""}},u.copy=function(){return io(n.copy(),t,e,r)},Ji(u,n)}function oo(n,t,e){function r(t){return n(i(t))}var i=uo(t),o=uo(1/t);return r.invert=function(t){return o(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain((e=t.map(Number)).map(i)),r):e},r.ticks=function(n){return no(e,n)},r.tickFormat=function(n,t){return to(e,n,t)},r.nice=function(n){return r.domain(Qi(e,n))},r.exponent=function(u){return arguments.length?(i=uo(t=u),o=uo(1/t),n.domain(e.map(i)),r):t},r.copy=function(){return oo(n.copy(),t,e)},Ji(r,n)}function uo(n){return function(t){return t<0?-Math.pow(-t,n):Math.pow(t,n)}}function ao(n,t){function e(e){return o[((i.get(e)||("range"===t.t?i.set(e,n.push(e)):NaN))-1)%o.length]}function r(t,e){return cu.range(n.length).map(function(n){return t+e*n})}var i,o,u;return e.domain=function(r){if(!arguments.length)return n;n=[],i=new s;for(var o,u=-1,a=r.length;++u<a;)i.has(o=r[u])||i.set(o,n.push(o));return e[t.t].apply(e,t.a)},e.range=function(n){return arguments.length?(o=n,u=0,t={t:"range",a:arguments},e):o},e.rangePoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],s=n.length<2?(l=(l+c)/2,0):(c-l)/(n.length-1+a);return o=r(l+s*a/2,s),u=0,t={t:"rangePoints",a:arguments},e},e.rangeRoundPoints=function(i,a){arguments.length<2&&(a=0);var l=i[0],c=i[1],s=n.length<2?(l=c=Math.round((l+c)/2),0):(c-l)/(n.length-1+a)|0;return o=r(l+Math.round(s*a/2+(c-l-(n.length-1+a)*s)/2),s),u=0,t={t:"rangeRoundPoints",a:arguments},e},e.rangeBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],s=i[c-0],f=i[1-c],h=(f-s)/(n.length-a+2*l);return o=r(s+h*l,h),c&&o.reverse(),u=h*(1-a),t={t:"rangeBands",a:arguments},e},e.rangeRoundBands=function(i,a,l){arguments.length<2&&(a=0),arguments.length<3&&(l=a);var c=i[1]<i[0],s=i[c-0],f=i[1-c],h=Math.floor((f-s)/(n.length-a+2*l));return o=r(s+Math.round((f-s-(n.length-a)*h)/2),h),c&&o.reverse(),u=Math.round(h*(1-a)),t={t:"rangeRoundBands",a:arguments},e},e.rangeBand=function(){return u},e.rangeExtent=function(){return Yi(t.a[0])},e.copy=function(){return ao(n,t)},e.domain(n)}function lo(n,t){function e(){var e=0,r=t.length;for(a=[];++e<r;)a[e-1]=cu.quantile(n,e/r);return u}function u(n){if(!isNaN(n=+n))return t[cu.bisect(a,n)]}var a;return u.domain=function(t){return arguments.length?(n=t.map(i).filter(o).sort(r),e()):n},u.range=function(n){return arguments.length?(t=n,e()):t},u.quantiles=function(){return a},u.invertExtent=function(e){return e=t.indexOf(e),e<0?[NaN,NaN]:[e>0?a[e-1]:n[0],e<a.length?a[e]:n[n.length-1]]},u.copy=function(){return lo(n,t)},e()}function co(n,t,e){function r(t){return e[Math.max(0,Math.min(u,Math.floor(o*(t-n))))]}function i(){return o=e.length/(t-n),u=e.length-1,r}var o,u;return r.domain=function(e){return arguments.length?(n=+e[0],t=+e[e.length-1],i()):[n,t]},r.range=function(n){return arguments.length?(e=n,i()):e},r.invertExtent=function(t){return t=e.indexOf(t),t=t<0?NaN:t/o+n,[t,t+1/o]},r.copy=function(){return co(n,t,e)},i()}function so(n,t){function e(e){if(e<=e)return t[cu.bisect(n,e)]}return e.domain=function(t){return arguments.length?(n=t,e):n},e.range=function(n){return arguments.length?(t=n,e):t},e.invertExtent=function(e){return e=t.indexOf(e),[n[e-1],n[e]]},e.copy=function(){return so(n,t)},e}function fo(n){function t(n){return+n}return t.invert=t,t.domain=t.range=function(e){return arguments.length?(n=e.map(t),t):n},t.ticks=function(t){return no(n,t)},t.tickFormat=function(t,e){return to(n,t,e)},t.copy=function(){return fo(n)},t}function ho(){return 0}function po(n){return n.innerRadius}function vo(n){return n.outerRadius}function go(n){return n.startAngle}function yo(n){return n.endAngle}function mo(n){return n&&n.padAngle}function wo(n,t,e,r){return(n-e)*t-(t-r)*n>0?0:1}function xo(n,t,e,r,i){var o=n[0]-t[0],u=n[1]-t[1],a=(i?r:-r)/Math.sqrt(o*o+u*u),l=a*u,c=-a*o,s=n[0]+l,f=n[1]+c,h=t[0]+l,p=t[1]+c,v=(s+h)/2,g=(f+p)/2,d=h-s,y=p-f,m=d*d+y*y,w=e-r,x=s*p-h*f,M=(y<0?-1:1)*Math.sqrt(Math.max(0,w*w*m-x*x)),b=(x*y-d*M)/m,_=(-x*d-y*M)/m,k=(x*y+d*M)/m,S=(-x*d+y*M)/m,E=b-v,C=_-g,N=k-v,A=S-g;return E*E+C*C>N*N+A*A&&(b=k,_=S),[[b-l,_-c],[b*e/w,_*e/w]]}function Mo(n){function t(t){function u(){c.push("M",o(n(s),a))}for(var l,c=[],s=[],f=-1,h=t.length,p=Nn(e),v=Nn(r);++f<h;)i.call(this,l=t[f],f)?s.push([+p.call(this,l,f),+v.call(this,l,f)]):s.length&&(u(),s=[]);return s.length&&u(),c.length?c.join(""):null}var e=qe,r=Le,i=Lt,o=bo,u=o.key,a=.7;return t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t.defined=function(n){return arguments.length?(i=n,t):i},t.interpolate=function(n){return arguments.length?(u="function"==typeof n?o=n:(o=Ll.get(n)||bo).key,t):u},t.tension=function(n){return arguments.length?(a=n,t):a},t}function bo(n){return n.length>1?n.join("L"):n+"Z"}function _o(n){return n.join("L")+"Z"}function ko(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r[0]+(r=n[t])[0])/2,"V",r[1]);return e>1&&i.push("H",r[0]),i.join("")}function So(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("V",(r=n[t])[1],"H",r[0]);return i.join("")}function Eo(n){for(var t=0,e=n.length,r=n[0],i=[r[0],",",r[1]];++t<e;)i.push("H",(r=n[t])[0],"V",r[1]);return i.join("")}function Co(n,t){return n.length<4?bo(n):n[1]+qo(n.slice(1,-1),Lo(n,t))}function No(n,t){return n.length<3?_o(n):n[0]+qo((n.push(n[0]),n),Lo([n[n.length-2]].concat(n,[n[1]]),t))}function Ao(n,t){return n.length<3?bo(n):n[0]+qo(n,Lo(n,t))}function qo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return bo(n);var e=n.length!=t.length,r="",i=n[0],o=n[1],u=t[0],a=u,l=1;if(e&&(r+="Q"+(o[0]-2*u[0]/3)+","+(o[1]-2*u[1]/3)+","+o[0]+","+o[1],i=n[1],l=2),t.length>1){a=t[1],o=n[l],l++,r+="C"+(i[0]+u[0])+","+(i[1]+u[1])+","+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1];for(var c=2;c<t.length;c++,l++)o=n[l],a=t[c],r+="S"+(o[0]-a[0])+","+(o[1]-a[1])+","+o[0]+","+o[1]}if(e){var s=n[l];r+="Q"+(o[0]+2*a[0]/3)+","+(o[1]+2*a[1]/3)+","+s[0]+","+s[1]}return r}function Lo(n,t){for(var e,r=[],i=(1-t)/2,o=n[0],u=n[1],a=1,l=n.length;++a<l;)e=o,o=u,u=n[a],r.push([i*(u[0]-e[0]),i*(u[1]-e[1])]);return r}function zo(n){if(n.length<3)return bo(n);var t=1,e=n.length,r=n[0],i=r[0],o=r[1],u=[i,i,i,(r=n[1])[0]],a=[o,o,o,r[1]],l=[i,",",o,"L",Do(jl,u),",",Do(jl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],u.shift(),u.push(r[0]),a.shift(),a.push(r[1]),Po(l,u,a);return n.pop(),l.push("L",r),l.join("")}function To(n){if(n.length<4)return bo(n);for(var t,e=[],r=-1,i=n.length,o=[0],u=[0];++r<3;)t=n[r],o.push(t[0]),u.push(t[1]);for(e.push(Do(jl,o)+","+Do(jl,u)),--r;++r<i;)t=n[r],o.shift(),o.push(t[0]),u.shift(),u.push(t[1]),Po(e,o,u);return e.join("")}function jo(n){for(var t,e,r=-1,i=n.length,o=i+4,u=[],a=[];++r<4;)e=n[r%i],u.push(e[0]),a.push(e[1]);for(t=[Do(jl,u),",",Do(jl,a)],--r;++r<o;)e=n[r%i],u.shift(),u.push(e[0]),a.shift(),a.push(e[1]),Po(t,u,a);return t.join("")}function Oo(n,t){var e=n.length-1;if(e)for(var r,i,o=n[0][0],u=n[0][1],a=n[e][0]-o,l=n[e][1]-u,c=-1;++c<=e;)r=n[c],i=c/e,r[0]=t*r[0]+(1-t)*(o+i*a),r[1]=t*r[1]+(1-t)*(u+i*l);return zo(n)}function Do(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Po(n,t,e){n.push("C",Do(zl,t),",",Do(zl,e),",",Do(Tl,t),",",Do(Tl,e),",",Do(jl,t),",",Do(jl,e))}function Ro(n,t){return(t[1]-n[1])/(t[0]-n[0])}function Uo(n){for(var t=0,e=n.length-1,r=[],i=n[0],o=n[1],u=r[0]=Ro(i,o);++t<e;)r[t]=(u+(u=Ro(i=o,o=n[t+1])))/2;return r[t]=u,r}function Fo(n){for(var t,e,r,i,o=[],u=Uo(n),a=-1,l=n.length-1;++a<l;)t=Ro(n[a],n[a+1]),wu(t)<Ou?u[a]=u[a+1]=0:(e=u[a]/t,r=u[a+1]/t,(i=e*e+r*r)>9&&(i=3*t/Math.sqrt(i),u[a]=i*e,u[a+1]=i*r));for(a=-1;++a<=l;)i=(n[Math.min(l,a+1)][0]-n[Math.max(0,a-1)][0])/(6*(1+u[a]*u[a])),o.push([i||0,u[a]*i||0]);return o}function Vo(n){return n.length<3?bo(n):n[0]+qo(n,Fo(n))}function Ho(n){for(var t,e,r,i=-1,o=n.length;++i<o;)t=n[i],e=t[0],r=t[1]-Fu,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Io(n){function t(t){function l(){g.push("M",a(n(y),f),s,c(n(d.reverse()),f),"Z")}for(var h,p,v,g=[],d=[],y=[],m=-1,w=t.length,x=Nn(e),M=Nn(i),b=e===r?function(){return p}:Nn(r),_=i===o?function(){return v}:Nn(o);++m<w;)u.call(this,h=t[m],m)?(d.push([p=+x.call(this,h,m),v=+M.call(this,h,m)]),y.push([+b.call(this,h,m),+_.call(this,h,m)])):d.length&&(l(),d=[],y=[]);return d.length&&l(),g.length?g.join(""):null}var e=qe,r=qe,i=0,o=Le,u=Lt,a=bo,l=a.key,c=a,s="L",f=.7;return t.x=function(n){return arguments.length?(e=r=n,t):r},t.x0=function(n){return arguments.length?(e=n,t):e},t.x1=function(n){return arguments.length?(r=n,t):r},t.y=function(n){return arguments.length?(i=o=n,t):o},t.y0=function(n){return arguments.length?(i=n,t):i},t.y1=function(n){return arguments.length?(o=n,t):o},t.defined=function(n){return arguments.length?(u=n,t):u},t.interpolate=function(n){return arguments.length?(l="function"==typeof n?a=n:(a=Ll.get(n)||bo).key,c=a.reverse||a,s=a.closed?"M":"L",t):l},t.tension=function(n){return arguments.length?(f=n,t):f},t}function Yo(n){return n.radius}function Zo(n){return[n.x,n.y]}function $o(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Fu;return[e*Math.cos(r),e*Math.sin(r)]}}function Bo(){return 64}function Xo(){return"circle"}function Wo(n){var t=Math.sqrt(n/Pu);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}function Go(n){return function(){var t,e,r;(t=this[n])&&(r=t[e=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[e]:delete this[n],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Jo(n,t,e){return ku(n,Vl),n.namespace=t,n.id=e,n}function Qo(n,t,e,r){var i=n.id,o=n.namespace;return Y(n,"function"==typeof e?function(n,u,a){n[o][i].tween.set(t,r(e.call(n,n.__data__,u,a)))}:(e=r(e),function(n){n[o][i].tween.set(t,e)}))}function Ko(n){return null==n&&(n=""),function(){this.textContent=n}}function nu(n){return null==n?"__transition__":"__transition_"+n+"__"}function tu(n,t,e,r,i){function o(n){var t=g.delay;if(c.t=t+l,t<=n)return u(n-t);c.c=u}function u(e){var i=v.active,o=v[i];o&&(o.timer.c=null,o.timer.t=NaN,--v.count,delete v[i],o.event&&o.event.interrupt.call(n,n.__data__,o.index));for(var u in v)if(+u<r){var s=v[u];s.timer.c=null,s.timer.t=NaN,--v.count,delete v[u]}v.active=r,g.event&&g.event.start.call(n,n.__data__,t),p=[],g.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&p.push(r)}),h=g.ease,f=g.duration,c.c=a,Tn(function(){return c.c&&a(e||1)&&(c.c=null,c.t=NaN),1},0,l)}function a(i){for(var o=i/f,u=h(o),a=p.length;a>0;)p[--a].call(n,u);if(o>=1)return g.event&&g.event.end.call(n,n.__data__,t),--v.count?delete v[r]:delete n[e],1}var l,c,f,h,p,v=n[e]||(n[e]={active:0,count:0}),g=v[r];g||(l=i.time,c=Tn(o,0,l),g=v[r]={tween:new s,time:l,timer:c,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++v.count)}function eu(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate("+(isFinite(r)?r:e(n))+",0)"})}function ru(n,t,e){n.attr("transform",function(n){var r=t(n);return"translate(0,"+(isFinite(r)?r:e(n))+")"})}function iu(n){return n.toISOString()}function ou(n,t,e){function r(t){return n(t)}function i(n,e){var r=n[1]-n[0],i=r/e,o=cu.bisect(Gl,i);return o==Gl.length?[t.year,Ki(n.map(function(n){return n/31536e6}),e)[2]]:o?t[i/Gl[o-1]<Gl[o]/i?o-1:o]:[Kl,Ki(n,e)[2]]}return r.invert=function(t){return uu(n.invert(t))},r.domain=function(t){return arguments.length?(n.domain(t),r):n.domain().map(uu)},r.nice=function(n,t){function e(e){return!isNaN(e)&&!n.range(e,uu(+e+1),t).length}var o=r.domain(),u=Yi(o),a=null==n?i(u,10):"number"==typeof n&&i(u,n);return a&&(n=a[0],t=a[1]),r.domain(Bi(o,t>1?{floor:function(t){for(;e(t=n.floor(t));)t=uu(t-1);return t},ceil:function(t){for(;e(t=n.ceil(t));)t=uu(+t+1);return t}}:n))},r.ticks=function(n,t){var e=Yi(r.domain()),o=null==n?i(e,10):"number"==typeof n?i(e,n):!n.range&&[{range:n},t];return o&&(n=o[0],t=o[1]),n.range(e[0],uu(+e[1]+1),t<1?1:t)},r.tickFormat=function(){return e},r.copy=function(){return ou(n.copy(),t,e)},Ji(r,n)}function uu(n){return new Date(n)}function au(n){return JSON.parse(n.responseText)}function lu(n){var t=hu.createRange();return t.selectNode(hu.body),t.createContextualFragment(n.responseText)}var cu={version:"3.5.8"},su=[].slice,fu=function(n){return su.call(n)},hu=this.document;if(hu)try{fu(hu.documentElement.childNodes)[0].nodeType}catch(n){fu=function(n){for(var t=n.length,e=new Array(t);t--;)e[t]=n[t];return e}}if(Date.now||(Date.now=function(){return+new Date}),hu)try{hu.createElement("DIV").style.setProperty("opacity",0,"")}catch(n){var pu=this.Element.prototype,vu=pu.setAttribute,gu=pu.setAttributeNS,du=this.CSSStyleDeclaration.prototype,yu=du.setProperty;pu.setAttribute=function(n,t){vu.call(this,n,t+"")},pu.setAttributeNS=function(n,t,e){gu.call(this,n,t,e+"")},du.setProperty=function(n,t,e){yu.call(this,n,t+"",e)}}cu.ascending=r,cu.descending=function(n,t){return t<n?-1:t>n?1:t>=n?0:NaN},cu.min=function(n,t){var e,r,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=n[i])&&e>r&&(e=r)}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&e>r&&(e=r)}return e},cu.max=function(n,t){var e,r,i=-1,o=n.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=n[i])&&r>=r){e=r;break}for(;++i<o;)null!=(r=n[i])&&r>e&&(e=r)}else{for(;++i<o;)if(null!=(r=t.call(n,n[i],i))&&r>=r){e=r;break}for(;++i<o;)null!=(r=t.call(n,n[i],i))&&r>e&&(e=r)}return e},cu.extent=function(n,t){var e,r,i,o=-1,u=n.length;if(1===arguments.length){for(;++o<u;)if(null!=(r=n[o])&&r>=r){e=i=r;break}for(;++o<u;)null!=(r=n[o])&&(e>r&&(e=r),i<r&&(i=r))}else{for(;++o<u;)if(null!=(r=t.call(n,n[o],o))&&r>=r){e=i=r;break}for(;++o<u;)null!=(r=t.call(n,n[o],o))&&(e>r&&(e=r),i<r&&(i=r))}return[e,i]},cu.sum=function(n,t){var e,r=0,i=n.length,u=-1;if(1===arguments.length)for(;++u<i;)o(e=+n[u])&&(r+=e);else for(;++u<i;)o(e=+t.call(n,n[u],u))&&(r+=e);return r},cu.mean=function(n,t){var e,r=0,u=n.length,a=-1,l=u;if(1===arguments.length)for(;++a<u;)o(e=i(n[a]))?r+=e:--l;else for(;++a<u;)o(e=i(t.call(n,n[a],a)))?r+=e:--l;if(l)return r/l},cu.quantile=function(n,t){var e=(n.length-1)*t+1,r=Math.floor(e),i=+n[r-1],o=e-r;return o?i+o*(n[r]-i):i},cu.median=function(n,t){var e,u=[],a=n.length,l=-1;if(1===arguments.length)for(;++l<a;)o(e=i(n[l]))&&u.push(e);else for(;++l<a;)o(e=i(t.call(n,n[l],l)))&&u.push(e);if(u.length)return cu.quantile(u.sort(r),.5)},cu.variance=function(n,t){var e,r,u=n.length,a=0,l=0,c=-1,s=0;if(1===arguments.length)for(;++c<u;)o(e=i(n[c]))&&(r=e-a,a+=r/++s,l+=r*(e-a));else for(;++c<u;)o(e=i(t.call(n,n[c],c)))&&(r=e-a,a+=r/++s,l+=r*(e-a));if(s>1)return l/(s-1)},cu.deviation=function(){var n=cu.variance.apply(this,arguments);return n?Math.sqrt(n):n};var mu=u(r);cu.bisectLeft=mu.left,cu.bisect=cu.bisectRight=mu.right,cu.bisector=function(n){return u(1===n.length?function(t,e){return r(n(t),e)}:n)},cu.shuffle=function(n,t,e){(o=arguments.length)<3&&(e=n.length,o<2&&(t=0));for(var r,i,o=e-t;o;)i=Math.random()*o--|0,r=n[o+t],n[o+t]=n[i+t],n[i+t]=r;return n},cu.permute=function(n,t){for(var e=t.length,r=new Array(e);e--;)r[e]=n[t[e]];return r},cu.pairs=function(n){for(var t=0,e=n.length-1,r=n[0],i=new Array(e<0?0:e);t<e;)i[t]=[r,r=n[++t]];return i},cu.zip=function(){if(!(r=arguments.length))return[];for(var n=-1,t=cu.min(arguments,a),e=new Array(t);++n<t;)for(var r,i=-1,o=e[n]=new Array(r);++i<r;)o[i]=arguments[i][n];return e},cu.transpose=function(n){return cu.zip.apply(cu,n)},cu.keys=function(n){var t=[];for(var e in n)t.push(e);return t},cu.values=function(n){var t=[];for(var e in n)t.push(n[e]);return t},cu.entries=function(n){var t=[];for(var e in n)t.push({key:e,value:n[e]});return t},cu.merge=function(n){for(var t,e,r,i=n.length,o=-1,u=0;++o<i;)u+=n[o].length;for(e=new Array(u);--i>=0;)for(r=n[i],t=r.length;--t>=0;)e[--u]=r[t];return e};var wu=Math.abs;cu.range=function(n,t,e){if(arguments.length<3&&(e=1,arguments.length<2&&(t=n,n=0)),(t-n)/e==1/0)throw new Error("infinite range");var r,i=[],o=l(wu(e)),u=-1;if(n*=o,t*=o,e*=o,e<0)for(;(r=n+e*++u)>t;)i.push(r/o);else for(;(r=n+e*++u)<t;)i.push(r/o);return i},cu.map=function(n,t){var e=new s;if(n instanceof s)n.forEach(function(n,t){e.set(n,t)});else if(Array.isArray(n)){var r,i=-1,o=n.length;if(1===arguments.length)for(;++i<o;)e.set(i,n[i]);else for(;++i<o;)e.set(t.call(n,r=n[i],i),r)}else for(var u in n)e.set(u,n[u]);return e};var xu="__proto__",Mu="\0";c(s,{has:p,get:function(n){return this._[f(n)]},set:function(n,t){return this._[f(n)]=t},remove:v,keys:g,values:function(){var n=[];for(var t in this._)n.push(this._[t]);return n},entries:function(){var n=[];for(var t in this._)n.push({key:h(t),value:this._[t]});return n},size:d,empty:y,forEach:function(n){for(var t in this._)n.call(this,h(t),this._[t])}}),cu.nest=function(){function n(t,u,a){if(a>=o.length)return r?r.call(i,u):e?u.sort(e):u;for(var l,c,f,h,p=-1,v=u.length,g=o[a++],d=new s;++p<v;)(h=d.get(l=g(c=u[p])))?h.push(c):d.set(l,[c]);return t?(c=t(),f=function(e,r){c.set(e,n(t,r,a))}):(c={},f=function(e,r){c[e]=n(t,r,a)}),d.forEach(f),c}function t(n,e){if(e>=o.length)return n;var r=[],i=u[e++];return n.forEach(function(n,i){r.push({key:n,values:t(i,e)})}),i?r.sort(function(n,t){return i(n.key,t.key)}):r}var e,r,i={},o=[],u=[];return i.map=function(t,e){return n(e,t,0)},i.entries=function(e){return t(n(cu.map,e,0),0)},i.key=function(n){return o.push(n),i},i.sortKeys=function(n){return u[o.length-1]=n,i},i.sortValues=function(n){return e=n,i},i.rollup=function(n){return r=n,i},i},cu.set=function(n){var t=new m;if(n)for(var e=0,r=n.length;e<r;++e)t.add(n[e]);return t},c(m,{has:p,add:function(n){return this._[f(n+="")]=!0,n},remove:v,values:g,size:d,empty:y,forEach:function(n){for(var t in this._)n.call(this,h(t))}}),cu.behavior={},cu.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=x(n,t,t[e]);return n};var bu=["webkit","ms","moz","Moz","o","O"];cu.dispatch=function(){for(var n=new _,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=k(n);return n},_.prototype.on=function(n,t){var e=n.indexOf("."),r="";if(e>=0&&(r=n.slice(e+1),n=n.slice(0,e)),n)return arguments.length<2?this[n].on(r):this[n].on(r,t);if(2===arguments.length){if(null==t)for(n in this)this.hasOwnProperty(n)&&this[n].on(r,null);return this}},cu.event=null,cu.requote=function(n){return n.replace(_u,"\\$&")};var _u=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,ku={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},Su=function(n,t){return t.querySelector(n)},Eu=function(n,t){return t.querySelectorAll(n)},Cu=function(n,t){var e=n.matches||n[M(n,"matchesSelector")];return(Cu=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(Su=function(n,t){return Sizzle(n,t)[0]||null},Eu=Sizzle,Cu=Sizzle.matchesSelector),cu.selection=function(){return cu.select(hu.documentElement)};var Nu=cu.selection.prototype=[];Nu.select=function(n){var t,e,r,i,o=[];n=A(n);for(var u=-1,a=this.length;++u<a;){o.push(t=[]),t.parentNode=(r=this[u]).parentNode;for(var l=-1,c=r.length;++l<c;)(i=r[l])?(t.push(e=n.call(i,i.__data__,l,u)),e&&"__data__"in i&&(e.__data__=i.__data__)):t.push(null)}return N(o)},Nu.selectAll=function(n){var t,e,r=[];n=q(n);for(var i=-1,o=this.length;++i<o;)for(var u=this[i],a=-1,l=u.length;++a<l;)(e=u[a])&&(r.push(t=fu(n.call(e,e.__data__,a,i))),t.parentNode=e);return N(r)};var Au={svg:"http://www.w3.org/2000/svg",xhtml:"http://www.w3.org/1999/xhtml",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};cu.ns={prefix:Au,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Au.hasOwnProperty(e)?{space:Au[e],local:n}:n}},Nu.attr=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node();return n=cu.ns.qualify(n),n.local?e.getAttributeNS(n.space,n.local):e.getAttribute(n)}for(t in n)this.each(L(t,n[t]));return this}return this.each(L(n,t))},Nu.classed=function(n,t){if(arguments.length<2){if("string"==typeof n){var e=this.node(),r=(n=j(n)).length,i=-1;if(t=e.classList){for(;++i<r;)if(!t.contains(n[i]))return!1}else for(t=e.getAttribute("class");++i<r;)if(!T(n[i]).test(t))return!1;return!0}for(t in n)this.each(O(t,n[t]));return this}return this.each(O(n,t))},Nu.style=function(n,t,r){var i=arguments.length;if(i<3){if("string"!=typeof n){i<2&&(t="");for(r in n)this.each(P(r,n[r],t));return this}if(i<2){var o=this.node();return e(o).getComputedStyle(o,null).getPropertyValue(n)}r=""}return this.each(P(n,t,r))},Nu.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(R(t,n[t]));return this}return this.each(R(n,t))},Nu.text=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.textContent=null==t?"":t}:null==n?function(){this.textContent=""}:function(){this.textContent=n}):this.node().textContent},Nu.html=function(n){return arguments.length?this.each("function"==typeof n?function(){var t=n.apply(this,arguments);this.innerHTML=null==t?"":t}:null==n?function(){this.innerHTML=""}:function(){this.innerHTML=n}):this.node().innerHTML},Nu.append=function(n){return n=U(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},Nu.insert=function(n,t){return n=U(n),t=A(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},Nu.remove=function(){return this.each(F)},Nu.data=function(n,t){function e(n,e){var r,i,o,u=n.length,f=e.length,h=Math.min(u,f),p=new Array(f),v=new Array(f),g=new Array(u);if(t){var d,y=new s,m=new Array(u);for(r=-1;++r<u;)(i=n[r])&&(y.has(d=t.call(i,i.__data__,r))?g[r]=i:y.set(d,i),m[r]=d);for(r=-1;++r<f;)(i=y.get(d=t.call(e,o=e[r],r)))?!0!==i&&(p[r]=i,i.__data__=o):v[r]=V(o),y.set(d,!0);for(r=-1;++r<u;)r in m&&!0!==y.get(m[r])&&(g[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],o=e[r],i?(i.__data__=o,p[r]=i):v[r]=V(o);for(;r<f;++r)v[r]=V(e[r]);for(;r<u;++r)g[r]=n[r]}v.update=p,v.parentNode=p.parentNode=g.parentNode=n.parentNode,a.push(v),l.push(p),c.push(g)}var r,i,o=-1,u=this.length;if(!arguments.length){for(n=new Array(u=(r=this[0]).length);++o<u;)(i=r[o])&&(n[o]=i.__data__);return n}var a=Z([]),l=N([]),c=N([]);if("function"==typeof n)for(;++o<u;)e(r=this[o],n.call(r,r.parentNode.__data__,o));else for(;++o<u;)e(r=this[o],n);return l.enter=function(){return a},l.exit=function(){return c},l},Nu.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},Nu.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=H(n));for(var o=0,u=this.length;o<u;o++){i.push(t=[]),t.parentNode=(e=this[o]).parentNode;for(var a=0,l=e.length;a<l;a++)(r=e[a])&&n.call(r,r.__data__,a,o)&&t.push(r)}return N(i)},Nu.order=function(){for(var n=-1,t=this.length;++n<t;)for(var e,r=this[n],i=r.length-1,o=r[i];--i>=0;)(e=r[i])&&(o&&o!==e.nextSibling&&o.parentNode.insertBefore(e,o),o=e);return this},Nu.sort=function(n){n=I.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},Nu.each=function(n){return Y(this,function(t,e,r){n.call(t,t.__data__,e,r)})},Nu.call=function(n){var t=fu(arguments);return n.apply(t[0]=this,t),this},Nu.empty=function(){return!this.node()},Nu.node=function(){for(var n=0,t=this.length;n<t;n++)for(var e=this[n],r=0,i=e.length;r<i;r++){var o=e[r];if(o)return o}return null},Nu.size=function(){var n=0;return Y(this,function(){++n}),n};var qu=[];cu.selection.enter=Z,cu.selection.enter.prototype=qu,qu.append=Nu.append,qu.empty=Nu.empty,qu.node=Nu.node,qu.call=Nu.call,qu.size=Nu.size,qu.select=function(n){for(var t,e,r,i,o,u=[],a=-1,l=this.length;++a<l;){r=(i=this[a]).update,u.push(t=[]),t.parentNode=i.parentNode;for(var c=-1,s=i.length;++c<s;)(o=i[c])?(t.push(r[c]=e=n.call(i.parentNode,o.__data__,c,a)),e.__data__=o.__data__):t.push(null)}return N(u)},qu.insert=function(n,t){return arguments.length<2&&(t=$(this)),Nu.insert.call(this,n,t)},cu.select=function(n){var e;return"string"==typeof n?(e=[Su(n,hu)],e.parentNode=hu.documentElement):(e=[n],e.parentNode=t(n)),N([e])},cu.selectAll=function(n){var t;return"string"==typeof n?(t=fu(Eu(n,hu)),t.parentNode=hu.documentElement):(t=fu(n),t.parentNode=null),N([t])},Nu.on=function(n,t,e){var r=arguments.length;if(r<3){if("string"!=typeof n){r<2&&(t=!1);for(e in n)this.each(B(e,n[e],t));return this}if(r<2)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(B(n,t,e))};var Lu=cu.map({mouseenter:"mouseover",mouseleave:"mouseout"});hu&&Lu.forEach(function(n){"on"+n in hu&&Lu.remove(n)});var zu,Tu=0;cu.mouse=function(n){return J(n,E())};var ju=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;cu.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=E().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===e)return J(n,r)},cu.behavior.drag=function(){function n(){this.on("mousedown.drag",o).on("touchstart.drag",u)}function t(n,t,e,o,u){return function(){function a(){var n,e,r=t(h,g);r&&(n=r[0]-w[0],e=r[1]-w[1],v|=n|e,w=r,p({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,g)&&(y.on(o+d,null).on(u+d,null),m(v&&cu.event.target===f),p({type:"dragend"}))}var c,s=this,f=cu.event.target,h=s.parentNode,p=r.of(s,arguments),v=0,g=n(),d=".drag"+(null==g?"":"-"+g),y=cu.select(e(f)).on(o+d,a).on(u+d,l),m=G(f),w=t(h,g);i?(c=i.apply(s,arguments),c=[c.x-w[0],c.y-w[1]]):c=[0,0],p({type:"dragstart"})}}var r=C(n,"drag","dragstart","dragend"),i=null,o=t(b,cu.mouse,e,"mousemove","mouseup"),u=t(Q,cu.touch,w,"touchmove","touchend");return n.origin=function(t){return arguments.length?(i=t,n):i},cu.rebind(n,r,"on")},cu.touches=function(n,t){return arguments.length<2&&(t=E().touches),t?fu(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Ou=1e-6,Du=Ou*Ou,Pu=Math.PI,Ru=2*Pu,Uu=Ru-Ou,Fu=Pu/2,Vu=Pu/180,Hu=180/Pu,Iu=Math.SQRT2,Yu=2,Zu=4;cu.interpolateZoom=function(n,t){var e,r,i=n[0],o=n[1],u=n[2],a=t[0],l=t[1],c=t[2],s=a-i,f=l-o,h=s*s+f*f;if(h<Du)r=Math.log(c/u)/Iu,e=function(n){return[i+n*s,o+n*f,u*Math.exp(Iu*n*r)]};else{var p=Math.sqrt(h),v=(c*c-u*u+Zu*h)/(2*u*Yu*p),g=(c*c-u*u-Zu*h)/(2*c*Yu*p),d=Math.log(Math.sqrt(v*v+1)-v),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-d)/Iu,e=function(n){var t=n*r,e=on(d),a=u/(Yu*p)*(e*un(Iu*t+d)-rn(d));return[i+a*s,o+a*f,u*e/on(Iu*t+d)]}}return e.duration=1e3*r,e},cu.behavior.zoom=function(){function n(n){n.on(L,f).on(Bu+".zoom",p).on("dblclick.zoom",v).on(j,h)}function t(n){return[(n[0]-k.x)/k.k,(n[1]-k.y)/k.k]}function r(n){return[n[0]*k.k+k.x,n[1]*k.k+k.y]}function i(n){k.k=Math.max(N[0],Math.min(N[1],n))}function o(n,t){t=r(t),k.x+=n[0]-t[0],k.y+=n[1]-t[1]}function u(t,e,r,u){t.__chart__={x:k.x,y:k.y,k:k.k},i(Math.pow(2,u)),o(d=e,r),t=cu.select(t),A>0&&(t=t.transition().duration(A)),t.call(n.event)}function a(){M&&M.domain(x.range().map(function(n){return(n-k.x)/k.k}).map(x.invert)),_&&_.domain(b.range().map(function(n){return(n-k.y)/k.k}).map(b.invert))}function l(n){q++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function s(n){--q||(n({type:"zoomend"}),d=null)}function f(){function n(){f=1,o(cu.mouse(i),p),c(a)}function r(){h.on(z,null).on(T,null),v(f&&cu.event.target===u),s(a)}var i=this,u=cu.event.target,a=O.of(i,arguments),f=0,h=cu.select(e(i)).on(z,n).on(T,r),p=t(cu.mouse(i)),v=G(i);Fl.call(i),l(a)}function h(){function n(){var n=cu.touches(v);return p=k.k,n.forEach(function(n){n.identifier in d&&(d[n.identifier]=t(n))}),n}function e(){var t=cu.event.target;cu.select(t).on(x,r).on(M,a),b.push(t);for(var e=cu.event.changedTouches,i=0,o=e.length;i<o;++i)d[e[i].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(c-w<500){var s=l[0];u(v,s,d[s.identifier],Math.floor(Math.log(k.k)/Math.LN2)+1),S()}w=c}else if(l.length>1){var s=l[0],f=l[1],h=s[0]-f[0],p=s[1]-f[1];y=h*h+p*p}}function r(){var n,t,e,r,u=cu.touches(v);Fl.call(v);for(var a=0,l=u.length;a<l;++a,r=null)if(e=u[a],r=d[e.identifier]){if(t)break;n=e,t=r}if(r){var s=(s=e[0]-n[0])*s+(s=e[1]-n[1])*s,f=y&&Math.sqrt(s/y);n=[(n[0]+e[0])/2,(n[1]+e[1])/2],t=[(t[0]+r[0])/2,(t[1]+r[1])/2],i(f*p)}w=null,o(n,t),c(g)}function a(){if(cu.event.touches.length){for(var t=cu.event.changedTouches,e=0,r=t.length;e<r;++e)delete d[t[e].identifier];for(var i in d)return void n()}cu.selectAll(b).on(m,null),_.on(L,f).on(j,h),E(),s(g)}var p,v=this,g=O.of(v,arguments),d={},y=0,m=".zoom-"+cu.event.changedTouches[0].identifier,x="touchmove"+m,M="touchend"+m,b=[],_=cu.select(v),E=G(v);e(),l(g),_.on(L,null).on(j,e)}function p(){var n=O.of(this,arguments);m?clearTimeout(m):(Fl.call(this),g=t(d=y||cu.mouse(this)),l(n)),m=setTimeout(function(){m=null,s(n)},50),S(),i(Math.pow(2,.002*$u())*k.k),o(d,g),c(n)}function v(){var n=cu.mouse(this),e=Math.log(k.k)/Math.LN2;u(this,n,t(n),cu.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var g,d,y,m,w,x,M,b,_,k={x:0,y:0,k:1},E=[960,500],N=Xu,A=250,q=0,L="mousedown.zoom",z="mousemove.zoom",T="mouseup.zoom",j="touchstart.zoom",O=C(n,"zoomstart","zoom","zoomend");return Bu||(Bu="onwheel"in hu?($u=function(){return-cu.event.deltaY*(cu.event.deltaMode?120:1)},"wheel"):"onmousewheel"in hu?($u=function(){return cu.event.wheelDelta},"mousewheel"):($u=function(){return-cu.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=O.of(this,arguments),t=k;Rl?cu.select(this).transition().each("start.zoom",function(){k=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=E[0],r=E[1],i=d?d[0]:e/2,o=d?d[1]:r/2,u=cu.interpolateZoom([(i-k.x)/k.k,(o-k.y)/k.k,e/k.k],[(i-t.x)/t.k,(o-t.y)/t.k,e/t.k]);return function(t){var r=u(t),a=e/r[2];this.__chart__=k={x:i-r[0]*a,y:o-r[1]*a,k:a},c(n)}}).each("interrupt.zoom",function(){s(n)}).each("end.zoom",function(){s(n)}):(this.__chart__=k,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(k={x:+t[0],y:+t[1],k:k.k},a(),n):[k.x,k.y]},n.scale=function(t){return arguments.length?(k={x:k.x,y:k.y,k:null},i(+t),a(),n):k.k},n.scaleExtent=function(t){return arguments.length?(N=null==t?Xu:[+t[0],+t[1]],n):N},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(E=t&&[+t[0],+t[1]],n):E},n.duration=function(t){return arguments.length?(A=+t,n):A},n.x=function(t){return arguments.length?(M=t,x=t.copy(),k={x:0,y:0,k:1},n):M},n.y=function(t){return arguments.length?(_=t,b=t.copy(),k={x:0,y:0,k:1},n):_},cu.rebind(n,O,"on")};var $u,Bu,Xu=[0,1/0];cu.color=ln,ln.prototype.toString=function(){return this.rgb()+""},cu.hsl=cn;var Wu=cn.prototype=new ln;Wu.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,this.l/n)},Wu.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,n*this.l)},Wu.rgb=function(){return sn(this.h,this.s,this.l)},cu.hcl=fn;var Gu=fn.prototype=new ln;Gu.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+Ju*(arguments.length?n:1)))},Gu.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-Ju*(arguments.length?n:1)))},Gu.rgb=function(){return hn(this.h,this.c,this.l).rgb()},cu.lab=pn;var Ju=18,Qu=.95047,Ku=1,na=1.08883,ta=pn.prototype=new ln;ta.brighter=function(n){return new pn(Math.min(100,this.l+Ju*(arguments.length?n:1)),this.a,this.b)},ta.darker=function(n){return new pn(Math.max(0,this.l-Ju*(arguments.length?n:1)),this.a,this.b)},ta.rgb=function(){return vn(this.l,this.a,this.b)},cu.rgb=wn;var ea=wn.prototype=new ln;ea.brighter=function(n){n=Math.pow(.7,arguments.length?n:1);var t=this.r,e=this.g,r=this.b,i=30;return t||e||r?(t&&t<i&&(t=i),e&&e<i&&(e=i),r&&r<i&&(r=i),new wn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new wn(i,i,i)},ea.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new wn(n*this.r,n*this.g,n*this.b)},ea.hsl=function(){return kn(this.r,this.g,this.b)},ea.toString=function(){return"#"+bn(this.r)+bn(this.g)+bn(this.b)};var ra=cu.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ra.forEach(function(n,t){ra.set(n,xn(t))}),cu.functor=Nn,cu.xhr=An(w),cu.dsv=function(n,t){function e(n,e,o){arguments.length<3&&(o=e,e=null);var u=qn(n,t,null==e?r:i(e),o);return u.row=function(n){return arguments.length?u.response(null==(e=n)?r:i(n)):e},u}function r(n){return e.parse(n.responseText)}function i(n){return function(t){return e.parse(t.responseText,n)}}function o(t){return t.map(u).join(n)}function u(n){return a.test(n)?'"'+n.replace(/\"/g,'""')+'"':n}var a=new RegExp('["'+n+"\n]"),l=n.charCodeAt(0);return e.parse=function(n,t){var r;return e.parseRows(n,function(n,e){if(r)return r(n,e-1);var i=new Function("d","return {"+n.map(function(n,t){return JSON.stringify(n)+": d["+t+"]"}).join(",")+"}");r=t?function(n,e){return t(i(n),e)}:i})},e.parseRows=function(n,t){function e(){if(s>=c)return u;if(i)return i=!1,o;var t=s;if(34===n.charCodeAt(t)){for(var e=t;e++<c;)if(34===n.charCodeAt(e)){if(34!==n.charCodeAt(e+1))break;++e}s=e+2;var r=n.charCodeAt(e+1);return 13===r?(i=!0,10===n.charCodeAt(e+2)&&++s):10===r&&(i=!0),n.slice(t+1,e).replace(/""/g,'"')}for(;s<c;){var r=n.charCodeAt(s++),a=1;if(10===r)i=!0;else if(13===r)i=!0,10===n.charCodeAt(s)&&(++s,++a);else if(r!==l)continue;return n.slice(t,s-a)}return n.slice(t)}for(var r,i,o={},u={},a=[],c=n.length,s=0,f=0;(r=e())!==u;){for(var h=[];r!==o&&r!==u;)h.push(r),r=e();t&&null==(h=t(h,f++))||a.push(h)}return a},e.format=function(t){if(Array.isArray(t[0]))return e.formatRows(t);var r=new m,i=[];return t.forEach(function(n){for(var t in n)r.has(t)||i.push(r.add(t))}),[i.map(u).join(n)].concat(t.map(function(t){return i.map(function(n){return u(t[n])}).join(n)})).join("\n")},e.formatRows=function(n){return n.map(o).join("\n")},e},cu.csv=cu.dsv(",","text/csv"),cu.tsv=cu.dsv("\t","text/tab-separated-values");var ia,oa,ua,aa,la=this[M(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};cu.timer=function(){Tn.apply(this,arguments)},cu.timer.flush=function(){On(),Dn()},cu.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var ca=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Rn);cu.formatPrefix=function(n,t){var e=0;return(n=+n)&&(n<0&&(n*=-1),t&&(n=cu.round(n,Pn(n,t))),e=1+Math.floor(1e-12+Math.log(n)/Math.LN10),e=Math.max(-24,Math.min(24,3*Math.floor((e-1)/3)))),ca[8+e/3]};var sa=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,fa=cu.map({b:function(n){return n.toString(2)},c:function(n){return String.fromCharCode(n)},o:function(n){return n.toString(8)},x:function(n){return n.toString(16)},X:function(n){return n.toString(16).toUpperCase()},g:function(n,t){return n.toPrecision(t)},e:function(n,t){return n.toExponential(t)},f:function(n,t){return n.toFixed(t)},r:function(n,t){return(n=cu.round(n,Pn(n,t))).toFixed(Math.max(0,Math.min(20,Pn(n*(1+1e-15),t))))}}),ha=cu.time={},pa=Date;Vn.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){va.setUTCDate.apply(this._,arguments)},setDay:function(){va.setUTCDay.apply(this._,arguments)},setFullYear:function(){va.setUTCFullYear.apply(this._,arguments)},setHours:function(){va.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){va.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){va.setUTCMinutes.apply(this._,arguments)},setMonth:function(){va.setUTCMonth.apply(this._,arguments)},setSeconds:function(){va.setUTCSeconds.apply(this._,arguments)},setTime:function(){va.setTime.apply(this._,arguments)}};var va=Date.prototype;ha.year=Hn(function(n){return n=ha.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),ha.years=ha.year.range,ha.years.utc=ha.year.utc.range,ha.day=Hn(function(n){var t=new pa(2e3,0);return t.setFullYear(n.getFullYear(),n.getMonth(),n.getDate()),t},function(n,t){n.setDate(n.getDate()+t)},function(n){return n.getDate()-1}),ha.days=ha.day.range,ha.days.utc=ha.day.utc.range,ha.dayOfYear=function(n){var t=ha.year(n);return Math.floor((n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(n,t){t=7-t;var e=ha[n]=Hn(function(n){return(n=ha.day(n)).setDate(n.getDate()-(n.getDay()+t)%7),n},function(n,t){n.setDate(n.getDate()+7*Math.floor(t))},function(n){var e=ha.year(n).getDay();return Math.floor((ha.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});ha[n+"s"]=e.range,ha[n+"s"].utc=e.utc.range,ha[n+"OfYear"]=function(n){var e=ha.year(n).getDay();return Math.floor((ha.dayOfYear(n)+(e+t)%7)/7)}}),ha.week=ha.sunday,ha.weeks=ha.sunday.range,ha.weeks.utc=ha.sunday.utc.range,ha.weekOfYear=ha.sundayOfYear;var ga={"-":"",_:" ",0:"0"},da=/^\s*\d+/,ya=/^%/;cu.locale=function(n){return{numberFormat:Un(n),timeFormat:Yn(n)}};var ma=cu.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});cu.format=ma.numberFormat,cu.geo={},ft.prototype={s:0,t:0,add:function(n){ht(n,this.t,wa),ht(wa.s,this.s,this),this.s?this.t+=wa.t:this.s=wa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var wa=new ft;cu.geo.stream=function(n,t){n&&xa.hasOwnProperty(n.type)?xa[n.type](n,t):pt(n,t)};var xa={Feature:function(n,t){pt(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)pt(e[r].geometry,t)}},Ma={Sphere:function(n,t){t.sphere()},Point:function(n,t){n=n.coordinates,t.point(n[0],n[1],n[2])},MultiPoint:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)n=e[r],t.point(n[0],n[1],n[2])},LineString:function(n,t){vt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)vt(e[r],t,0)},Polygon:function(n,t){gt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)gt(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)pt(e[r],t)}};cu.geo.area=function(n){return ba=0,cu.geo.stream(n,ka),ba};var ba,_a=new ft,ka={sphere:function(){ba+=4*Pu},point:b,lineStart:b,lineEnd:b,polygonStart:function(){_a.reset(),ka.lineStart=dt},polygonEnd:function(){var n=2*_a;ba+=n<0?4*Pu+n:n,ka.lineStart=ka.lineEnd=ka.point=b}};cu.geo.bounds=function(){function n(n,t){w.push(x=[s=n,h=n]),t<f&&(f=t),t>p&&(p=t)}function t(t,e){var r=yt([t*Vu,e*Vu]);if(y){var i=wt(y,r),o=[i[1],-i[0],0],u=wt(o,i);bt(u),u=_t(u);var l=t-v,c=l>0?1:-1,g=u[0]*Hu*c,d=wu(l)>180;if(d^(c*v<g&&g<c*t)){var m=u[1]*Hu;m>p&&(p=m)}else if(g=(g+360)%360-180,d^(c*v<g&&g<c*t)){var m=-u[1]*Hu;m<f&&(f=m)}else e<f&&(f=e),e>p&&(p=e);d?t<v?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(t<s&&(s=t),t>h&&(h=t)):t>v?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);y=r,v=t}function e(){M.point=t}function r(){x[0]=s,x[1]=h,M.point=n,y=null}function i(n,e){if(y){var r=n-v;m+=wu(r)>180?r+(r>0?360:-360):r}else g=n,d=e;ka.point(n,e),t(n,e)}function o(){ka.lineStart()}function u(){i(g,d),ka.lineEnd(),wu(m)>Ou&&(s=-(h=180)),x[0]=s,x[1]=h,y=null}function a(n,t){return(t-=n)<0?t+360:t}function l(n,t){return n[0]-t[0]}function c(n,t){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var s,f,h,p,v,g,d,y,m,w,x,M={point:n,lineStart:e,lineEnd:r,polygonStart:function(){M.point=i,M.lineStart=o,M.lineEnd=u,m=0,ka.polygonStart()},polygonEnd:function(){ka.polygonEnd(),M.point=n,M.lineStart=e,M.lineEnd=r,_a<0?(s=-(h=180),f=-(p=90)):m>Ou?p=90:m<-Ou&&(f=-90),x[0]=s,x[1]=h}};return function(n){p=h=-(s=f=1/0),w=[],cu.geo.stream(n,M);var t=w.length;if(t){w.sort(l);for(var e,r=1,i=w[0],o=[i];r<t;++r)e=w[r],c(e[0],i)||c(e[1],i)?(a(i[0],e[1])>a(i[0],i[1])&&(i[1]=e[1]),a(e[0],i[1])>a(i[0],i[1])&&(i[0]=e[0])):o.push(i=e);for(var u,e,v=-1/0,t=o.length-1,r=0,i=o[t];r<=t;i=e,++r)e=o[r],(u=a(i[1],e[0]))>v&&(v=u,s=e[0],h=i[1])}return w=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,p]]}}(),cu.geo.centroid=function(n){Sa=Ea=Ca=Na=Aa=qa=La=za=Ta=ja=Oa=0,cu.geo.stream(n,Da);var t=Ta,e=ja,r=Oa,i=t*t+e*e+r*r;return i<Du&&(t=qa,e=La,r=za,Ea<Ou&&(t=Ca,e=Na,r=Aa),(i=t*t+e*e+r*r)<Du)?[NaN,NaN]:[Math.atan2(e,t)*Hu,en(r/Math.sqrt(i))*Hu]};var Sa,Ea,Ca,Na,Aa,qa,La,za,Ta,ja,Oa,Da={sphere:b,point:St,lineStart:Ct,lineEnd:Nt,polygonStart:function(){Da.lineStart=At},polygonEnd:function(){Da.lineStart=Ct}},Pa=Ot(Lt,Ut,Vt,[-Pu,-Pu/2]),Ra=1e9;cu.geo.clipExtent=function(){var n,t,e,r,i,o,u={stream:function(n){return i&&(i.valid=!1),i=o(n),i.valid=!0,i},extent:function(a){return arguments.length?(o=Zt(n=+a[0][0],t=+a[0][1],e=+a[1][0],r=+a[1][1]),i&&(i.valid=!1,i=null),u):[[n,t],[e,r]]}};return u.extent([[0,0],[960,500]])},(cu.geo.conicEqualArea=function(){return $t(Bt)}).raw=Bt,cu.geo.albers=function(){return cu.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},cu.geo.albersUsa=function(){function n(n){var o=n[0],u=n[1];return t=null,e(o,u),t||(r(o,u),t)||i(o,u),t}var t,e,r,i,o=cu.geo.albers(),u=cu.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=cu.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),l={point:function(n,e){t=[n,e]}};return n.invert=function(n){var t=o.scale(),e=o.translate(),r=(n[0]-e[0])/t,i=(n[1]-e[1])/t;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?u:i>=.166&&i<.234&&r>=-.214&&r<-.115?a:o).invert(n)},n.stream=function(n){var t=o.stream(n),e=u.stream(n),r=a.stream(n);return{point:function(n,i){t.point(n,i),e.point(n,i),r.point(n,i)},sphere:function(){t.sphere(),e.sphere(),r.sphere()},lineStart:function(){t.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},n.precision=function(t){return arguments.length?(o.precision(t),u.precision(t),a.precision(t),n):o.precision()},n.scale=function(t){return arguments.length?(o.scale(t),u.scale(.35*t),a.scale(t),n.translate(o.translate())):o.scale()},n.translate=function(t){if(!arguments.length)return o.translate();var c=o.scale(),s=+t[0],f=+t[1];return e=o.translate(t).clipExtent([[s-.455*c,f-.238*c],[s+.455*c,f+.238*c]]).stream(l).point,r=u.translate([s-.307*c,f+.201*c]).clipExtent([[s-.425*c+Ou,f+.12*c+Ou],[s-.214*c-Ou,f+.234*c-Ou]]).stream(l).point,i=a.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Ou,f+.166*c+Ou],[s-.115*c-Ou,f+.234*c-Ou]]).stream(l).point,n},n.scale(1070)};var Ua,Fa,Va,Ha,Ia,Ya,Za={point:b,lineStart:b,lineEnd:b,polygonStart:function(){Fa=0,Za.lineStart=Xt},polygonEnd:function(){Za.lineStart=Za.lineEnd=Za.point=b,Ua+=wu(Fa/2)}},$a={point:Wt,lineStart:b,lineEnd:b,polygonStart:b,polygonEnd:b},Ba={point:Qt,lineStart:Kt,lineEnd:ne,polygonStart:function(){Ba.lineStart=te},polygonEnd:function(){Ba.point=Qt,Ba.lineStart=Kt,Ba.lineEnd=ne}};cu.geo.path=function(){function n(n){return n&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),u&&u.valid||(u=i(o)),cu.geo.stream(n,u)),o.result()}function t(){return u=null,n}var e,r,i,o,u,a=4.5;return n.area=function(n){return Ua=0,cu.geo.stream(n,i(Za)),Ua},n.centroid=function(n){return Ca=Na=Aa=qa=La=za=Ta=ja=Oa=0,cu.geo.stream(n,i(Ba)),Oa?[Ta/Oa,ja/Oa]:za?[qa/za,La/za]:Aa?[Ca/Aa,Na/Aa]:[NaN,NaN]},n.bounds=function(n){return Ia=Ya=-(Va=Ha=1/0),cu.geo.stream(n,i($a)),[[Va,Ha],[Ia,Ya]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||ie(n):w,t()):e},n.context=function(n){return arguments.length?(o=null==(r=n)?new Gt:new ee(n),"function"!=typeof a&&o.pointRadius(a),t()):r},n.pointRadius=function(t){return arguments.length?(a="function"==typeof t?t:(o.pointRadius(+t),+t),n):a},n.projection(cu.geo.albersUsa()).context(null)},cu.geo.transform=function(n){return{stream:function(t){var e=new oe(t);for(var r in n)e[r]=n[r];return e}}},oe.prototype={point:function(n,t){this.stream.point(n,t)},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()}},cu.geo.projection=ae,cu.geo.projectionMutator=le,(cu.geo.equirectangular=function(){return ae(se)}).raw=se.invert=se,cu.geo.rotation=function(n){function t(t){return t=n(t[0]*Vu,t[1]*Vu),t[0]*=Hu,t[1]*=Hu,t}return n=he(n[0]%360*Vu,n[1]*Vu,n.length>2?n[2]*Vu:0),t.invert=function(t){return t=n.invert(t[0]*Vu,t[1]*Vu),t[0]*=Hu,t[1]*=Hu,t},t},fe.invert=se,cu.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=he(-n[0]*Vu,-n[1]*Vu,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=Hu,n[1]*=Hu}}),{type:"Polygon",coordinates:[i]}}var t,e,r=[0,0],i=6;return n.origin=function(t){return arguments.length?(r=t,n):r},n.angle=function(r){return arguments.length?(e=de((t=+r)*Vu,i*Vu),n):t},n.precision=function(r){return arguments.length?(e=de(t*Vu,(i=+r)*Vu),n):i},n.angle(90)},cu.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Vu,i=n[1]*Vu,o=t[1]*Vu,u=Math.sin(r),a=Math.cos(r),l=Math.sin(i),c=Math.cos(i),s=Math.sin(o),f=Math.cos(o);return Math.atan2(Math.sqrt((e=f*u)*e+(e=c*s-l*f*a)*e),l*s+c*f*a)},cu.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return cu.range(Math.ceil(o/d)*d,i,d).map(h).concat(cu.range(Math.ceil(c/y)*y,l,y).map(p)).concat(cu.range(Math.ceil(r/v)*v,e,v).filter(function(n){return wu(n%d)>Ou}).map(s)).concat(cu.range(Math.ceil(a/g)*g,u,g).filter(function(n){return wu(n%y)>Ou}).map(f))}var e,r,i,o,u,a,l,c,s,f,h,p,v=10,g=v,d=90,y=360,m=2.5;return n.lines=function(){return t().map(function(n){return{type:"LineString",coordinates:n}})},n.outline=function(){return{type:"Polygon",coordinates:[h(o).concat(p(l).slice(1),h(i).reverse().slice(1),p(c).reverse().slice(1))]}},n.extent=function(t){return arguments.length?n.majorExtent(t).minorExtent(t):n.minorExtent()},n.majorExtent=function(t){return arguments.length?(o=+t[0][0],i=+t[1][0],c=+t[0][1],l=+t[1][1],o>i&&(t=o,o=i,i=t),c>l&&(t=c,c=l,l=t),n.precision(m)):[[o,c],[i,l]]},n.minorExtent=function(t){return arguments.length?(r=+t[0][0],e=+t[1][0],a=+t[0][1],u=+t[1][1],r>e&&(t=r,r=e,e=t),a>u&&(t=a,a=u,u=t),n.precision(m)):[[r,a],[e,u]]},n.step=function(t){return arguments.length?n.majorStep(t).minorStep(t):n.minorStep()},n.majorStep=function(t){return arguments.length?(d=+t[0],y=+t[1],n):[d,y]},n.minorStep=function(t){return arguments.length?(v=+t[0],g=+t[1],n):[v,g]},n.precision=function(t){return arguments.length?(m=+t,s=me(a,u,90),f=we(r,e,m),h=me(c,l,90),p=we(o,i,m),n):m},n.majorExtent([[-180,-90+Ou],[180,90-Ou]]).minorExtent([[-180,-80-Ou],[180,80+Ou]])},cu.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=xe,i=Me;return n.distance=function(){return cu.geo.distance(t||r.apply(this,arguments),e||i.apply(this,arguments))},n.source=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,n):r},n.target=function(t){return arguments.length?(i=t,e="function"==typeof t?null:t,n):i},n.precision=function(){return arguments.length?n:0},n},cu.geo.interpolate=function(n,t){return be(n[0]*Vu,n[1]*Vu,t[0]*Vu,t[1]*Vu)},cu.geo.length=function(n){return Xa=0,cu.geo.stream(n,Wa),Xa};var Xa,Wa={sphere:b,point:b,lineStart:_e,lineEnd:b,polygonStart:b,polygonEnd:b},Ga=ke(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(cu.geo.azimuthalEqualArea=function(){return ae(Ga)}).raw=Ga;var Ja=ke(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},w);(cu.geo.azimuthalEquidistant=function(){return ae(Ja)}).raw=Ja,(cu.geo.conicConformal=function(){return $t(Se)}).raw=Se,(cu.geo.conicEquidistant=function(){return $t(Ee)}).raw=Ee;var Qa=ke(function(n){return 1/n},Math.atan);(cu.geo.gnomonic=function(){return ae(Qa)}).raw=Qa,Ce.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Fu]},(cu.geo.mercator=function(){return Ne(Ce)}).raw=Ce;var Ka=ke(function(){return 1},Math.asin);(cu.geo.orthographic=function(){return ae(Ka)}).raw=Ka;var nl=ke(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(cu.geo.stereographic=function(){return ae(nl)}).raw=nl,Ae.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Fu]},(cu.geo.transverseMercator=function(){var n=Ne(Ae),t=n.center,e=n.rotate;return n.center=function(n){return n?t([-n[1],n[0]]):(n=t(),[n[1],-n[0]])},n.rotate=function(n){return n?e([n[0],n[1],n.length>2?n[2]+90:90]):(n=e(),[n[0],n[1],n[2]-90])},e([0,0,90])}).raw=Ae,cu.geom={},cu.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=Nn(e),o=Nn(r),u=n.length,a=[],l=[];for(t=0;t<u;t++)a.push([+i.call(this,n[t],t),+o.call(this,n[t],t),t]);for(a.sort(Te),t=0;t<u;t++)l.push([a[t][0],-a[t][1]]);var c=ze(a),s=ze(l),f=s[0]===c[0],h=s[s.length-1]===c[c.length-1],p=[];for(t=c.length-1;t>=0;--t)p.push(n[a[c[t]][2]]);for(t=+f;t<s.length-h;++t)p.push(n[a[s[t]][2]]);return p}var e=qe,r=Le;return arguments.length?t(n):(t.x=function(n){return arguments.length?(e=n,t):e},t.y=function(n){return arguments.length?(r=n,t):r},t)},cu.geom.polygon=function(n){return ku(n,tl),n};var tl=cu.geom.polygon.prototype=[];tl.area=function(){for(var n,t=-1,e=this.length,r=this[e-1],i=0;++t<e;)n=r,r=this[t],i+=n[1]*r[0]-n[0]*r[1];return.5*i},tl.centroid=function(n){var t,e,r=-1,i=this.length,o=0,u=0,a=this[i-1];for(arguments.length||(n=-1/(6*this.area()));++r<i;)t=a,a=this[r],e=t[0]*a[1]-a[0]*t[1],o+=(t[0]+a[0])*e,u+=(t[1]+a[1])*e;return[o*n,u*n]},tl.clip=function(n){for(var t,e,r,i,o,u,a=De(n),l=-1,c=this.length-De(this),s=this[c-1];++l<c;){for(t=n.slice(),n.length=0,i=this[l],o=t[(r=t.length-a)-1],e=-1;++e<r;)u=t[e],je(u,s,i)?(je(o,s,i)||n.push(Oe(o,u,s,i)),n.push(u)):je(o,s,i)&&n.push(Oe(o,u,s,i)),o=u;a&&n.push(n[0]),s=i}return n};var el,rl,il,ol,ul,al=[],ll=[];Ye.prototype.prepare=function(){for(var n,t=this.edges,e=t.length;e--;)n=t[e].edge,n.b&&n.a||t.splice(e,1);return t.sort($e),t.length},er.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},rr.prototype={insert:function(n,t){var e,r,i;if(n){if(t.P=n,t.N=n.N,n.N&&(n.N.P=t),n.N=t,n.R){for(n=n.R;n.L;)n=n.L;n.L=t}else n.R=t;e=n}else this._?(n=ar(this._),t.P=null,t.N=n,n.P=n.L=t,e=n):(t.P=t.N=null,this._=t,e=null);for(t.L=t.R=null,t.U=e,t.C=!0,n=t;e&&e.C;)r=e.U,e===r.L?(i=r.R,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.R&&(or(this,e),n=e,e=n.U),e.C=!1,r.C=!0,ur(this,r))):(i=r.L,i&&i.C?(e.C=i.C=!1,r.C=!0,n=r):(n===e.L&&(ur(this,e),n=e,e=n.U),e.C=!1,r.C=!0,or(this,r))),e=n.U;this._.C=!1},remove:function(n){n.N&&(n.N.P=n.P),n.P&&(n.P.N=n.N),n.N=n.P=null;var t,e,r,i=n.U,o=n.L,u=n.R;if(e=o?u?ar(u):o:u,i?i.L===n?i.L=e:i.R=e:this._=e,o&&u?(r=e.C,e.C=n.C,e.L=o,o.U=e,e!==u?(i=e.U,e.U=n.U,n=e.R,i.L=n,e.R=u,u.U=e):(e.U=i,i=e,n=e.R)):(r=n.C,n=e),n&&(n.U=i),!r){if(n&&n.C)return void(n.C=!1);do{if(n===this._)break;if(n===i.L){if(t=i.R,t.C&&(t.C=!1,i.C=!0,or(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,ur(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,or(this,i),n=this._;break}}else if(t=i.L,t.C&&(t.C=!1,i.C=!0,ur(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,or(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,ur(this,i),n=this._;break}t.C=!0,n=i,i=i.U}while(!n.C);n&&(n.C=!1)}}},cu.geom.voronoi=function(n){function t(n){var t=new Array(n.length),r=a[0][0],i=a[0][1],o=a[1][0],u=a[1][1];return lr(e(n),a).cells.forEach(function(e,a){var l=e.edges,c=e.site;(t[a]=l.length?l.map(function(n){var t=n.start();return[t.x,t.y]}):c.x>=r&&c.x<=o&&c.y>=i&&c.y<=u?[[r,u],[o,u],[o,i],[r,i]]:[]).point=n[a]}),t}function e(n){return n.map(function(n,t){return{x:Math.round(o(n,t)/Ou)*Ou,y:Math.round(u(n,t)/Ou)*Ou,i:t}})}var r=qe,i=Le,o=r,u=i,a=cl;return n?t(n):(t.links=function(n){return lr(e(n)).edges.filter(function(n){return n.l&&n.r}).map(function(t){return{source:n[t.l.i],target:n[t.r.i]}})},t.triangles=function(n){var t=[];return lr(e(n)).cells.forEach(function(e,r){for(var i,o=e.site,u=e.edges.sort($e),a=-1,l=u.length,c=u[l-1].edge,s=c.l===o?c.r:c.l;++a<l;)c,i=s,c=u[a].edge,s=c.l===o?c.r:c.l,r<i.i&&r<s.i&&sr(o,i,s)<0&&t.push([n[r],n[i.i],n[s.i]])}),t},t.x=function(n){return arguments.length?(o=Nn(r=n),t):r},t.y=function(n){return arguments.length?(u=Nn(i=n),t):i},t.clipExtent=function(n){return arguments.length?(a=null==n?cl:n,t):a===cl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===cl?null:a&&a[1]},t)};var cl=[[-1e6,-1e6],[1e6,1e6]];cu.geom.delaunay=function(n){return cu.geom.voronoi().triangles(n)},cu.geom.quadtree=function(n,t,e,r,i){function o(n){function o(n,t,e,r,i,o,u,a){if(!isNaN(e)&&!isNaN(r))if(n.leaf){var l=n.x,s=n.y;if(null!=l)if(wu(l-e)+wu(s-r)<.01)c(n,t,e,r,i,o,u,a);else{var f=n.point;n.x=n.y=n.point=null,c(n,f,l,s,i,o,u,a),c(n,t,e,r,i,o,u,a)}else n.x=e,n.y=r,n.point=t}else c(n,t,e,r,i,o,u,a)}function c(n,t,e,r,i,u,a,l){var c=.5*(i+a),s=.5*(u+l),f=e>=c,h=r>=s,p=h<<1|f;n.leaf=!1,n=n.nodes[p]||(n.nodes[p]=pr()),f?i=c:a=c,h?u=s:l=s,o(n,t,e,r,i,u,a,l)}var s,f,h,p,v,g,d,y,m,w=Nn(a),x=Nn(l);if(null!=t)g=t,d=e,y=r,m=i;else if(y=m=-(g=d=1/0),f=[],h=[],v=n.length,u)for(p=0;p<v;++p)s=n[p],s.x<g&&(g=s.x),s.y<d&&(d=s.y),s.x>y&&(y=s.x),s.y>m&&(m=s.y),f.push(s.x),h.push(s.y);else for(p=0;p<v;++p){var M=+w(s=n[p],p),b=+x(s,p);M<g&&(g=M),b<d&&(d=b),M>y&&(y=M),b>m&&(m=b),f.push(M),h.push(b)}var _=y-g,k=m-d;_>k?m=d+_:y=g+k;var S=pr();if(S.add=function(n){o(S,n,+w(n,++p),+x(n,p),g,d,y,m)},S.visit=function(n){vr(n,S,g,d,y,m)},S.find=function(n){return gr(S,n[0],n[1],g,d,y,m)},p=-1,null==t){for(;++p<v;)o(S,n[p],f[p],h[p],g,d,y,m);--p}else n.forEach(S.add);return f=h=n=s=null,S}var u,a=qe,l=Le;return(u=arguments.length)?(a=fr,l=hr,3===u&&(i=e,r=t,e=t=0),o(n)):(o.x=function(n){return arguments.length?(a=n,o):a},o.y=function(n){return arguments.length?(l=n,o):l},o.extent=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=+n[0][0],e=+n[0][1],r=+n[1][0],i=+n[1][1]),o):null==t?null:[[t,e],[r,i]]},o.size=function(n){return arguments.length?(null==n?t=e=r=i=null:(t=e=0,r=+n[0],i=+n[1]),o):null==t?null:[r-t,i-e]},o)},cu.interpolateRgb=dr,cu.interpolateObject=yr,cu.interpolateNumber=mr,cu.interpolateString=wr;var sl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,fl=new RegExp(sl.source,"g");cu.interpolate=xr,cu.interpolators=[function(n,t){var e=typeof t;return("string"===e?ra.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?dr:wr:t instanceof ln?dr:Array.isArray(t)?Mr:"object"===e&&isNaN(t)?yr:mr)(n,t)}],cu.interpolateArray=Mr;var hl=function(){return w},pl=cu.map({linear:hl,poly:Nr,quad:function(){return Sr},cubic:function(){return Er},sin:function(){return Ar},exp:function(){return qr},circle:function(){return Lr},elastic:zr,back:Tr,bounce:function(){return jr}}),vl=cu.map({in:w,out:_r,"in-out":kr,"out-in":function(n){return kr(_r(n))}});cu.ease=function(n){var t=n.indexOf("-"),e=t>=0?n.slice(0,t):n,r=t>=0?n.slice(t+1):"in";return e=pl.get(e)||hl,r=vl.get(r)||w,br(r(e.apply(null,su.call(arguments,1))))},cu.interpolateHcl=Or,cu.interpolateHsl=Dr,cu.interpolateLab=Pr,cu.interpolateRound=Rr,cu.transform=function(n){var t=hu.createElementNS(cu.ns.prefix.svg,"g");return(cu.transform=function(n){if(null!=n){t.setAttribute("transform",n);var e=t.transform.baseVal.consolidate()}return new Ur(e?e.matrix:gl)})(n)},Ur.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var gl={a:1,b:0,c:0,d:1,e:0,f:0};cu.interpolateTransform=Xr,cu.layout={},cu.layout.bundle=function(){return function(n){for(var t=[],e=-1,r=n.length;++e<r;)t.push(Jr(n[e]));return t}},cu.layout.chord=function(){function n(){var n,c,f,h,p,v={},g=[],d=cu.range(o),y=[];for(e=[],r=[],n=0,h=-1;++h<o;){for(c=0,p=-1;++p<o;)c+=i[h][p];g.push(c),y.push(cu.range(o)),n+=c}for(u&&d.sort(function(n,t){return u(g[n],g[t])}),a&&y.forEach(function(n,t){n.sort(function(n,e){return a(i[t][n],i[t][e])})}),n=(Ru-s*o)/n,c=0,h=-1;++h<o;){for(f=c,p=-1;++p<o;){var m=d[h],w=y[m][p],x=i[m][w],M=c,b=c+=x*n;v[m+"-"+w]={index:m,subindex:w,startAngle:M,endAngle:b,value:x}}r[m]={index:m,startAngle:f,endAngle:c,value:(c-f)/n},c+=s}for(h=-1;++h<o;)for(p=h-1;++p<o;){var _=v[h+"-"+p],k=v[p+"-"+h];(_.value||k.value)&&e.push(_.value<k.value?{source:k,target:_}:{source:_,target:k})}l&&t()}function t(){e.sort(function(n,t){return l((n.source.value+n.target.value)/2,(t.source.value+t.target.value)/2)})}var e,r,i,o,u,a,l,c={},s=0;return c.matrix=function(n){return arguments.length?(o=(i=n)&&i.length,e=r=null,c):i},c.padding=function(n){return arguments.length?(s=n,e=r=null,c):s},c.sortGroups=function(n){return arguments.length?(u=n,e=r=null,c):u},c.sortSubgroups=function(n){return arguments.length?(a=n,e=null,c):a},c.sortChords=function(n){return arguments.length?(l=n,e&&t(),c):l},c.chords=function(){return e||n(),e},c.groups=function(){return r||n(),r},c},cu.layout.force=function(){function n(n){return function(t,e,r,i){if(t.point!==n){var o=t.cx-n.x,u=t.cy-n.y,a=i-e,l=o*o+u*u;if(a*a/y<l){if(l<g){var c=t.charge/l;n.px-=o*c,n.py-=u*c}return!0}if(t.point&&l&&l<g){var c=t.pointCharge/l;n.px-=o*c,n.py-=u*c}}return!t.charge}}function t(n){n.px=cu.event.x,n.py=cu.event.y,l.resume()}var e,r,i,o,u,a,l={},c=cu.dispatch("start","tick","end"),s=[1,1],f=.9,h=dl,p=yl,v=-30,g=ml,d=.1,y=.64,m=[],x=[];return l.tick=function(){if((i*=.99)<.005)return e=null,c.end({type:"end",alpha:i=0}),!0;var t,r,l,h,p,g,y,w,M,b=m.length,_=x.length;for(r=0;r<_;++r)l=x[r],h=l.source,p=l.target,w=p.x-h.x,M=p.y-h.y,(g=w*w+M*M)&&(g=i*u[r]*((g=Math.sqrt(g))-o[r])/g,w*=g,M*=g,p.x-=w*(y=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=M*y,h.x+=w*(y=1-y),h.y+=M*y);if((y=i*d)&&(w=s[0]/2,M=s[1]/2,r=-1,y))for(;++r<b;)l=m[r],l.x+=(w-l.x)*y,l.y+=(M-l.y)*y;if(v)for(ii(t=cu.geom.quadtree(m),i,a),r=-1;++r<b;)(l=m[r]).fixed||t.visit(n(l));for(r=-1;++r<b;)l=m[r],l.fixed?(l.x=l.px,l.y=l.py):(l.x-=(l.px-(l.px=l.x))*f,l.y-=(l.py-(l.py=l.y))*f);c.tick({type:"tick",alpha:i})},l.nodes=function(n){return arguments.length?(m=n,l):m},l.links=function(n){return arguments.length?(x=n,l):x},l.size=function(n){return arguments.length?(s=n,l):s},l.linkDistance=function(n){return arguments.length?(h="function"==typeof n?n:+n,l):h},l.distance=l.linkDistance,l.linkStrength=function(n){return arguments.length?(p="function"==typeof n?n:+n,l):p},l.friction=function(n){return arguments.length?(f=+n,l):f},l.charge=function(n){return arguments.length?(v="function"==typeof n?n:+n,l):v},l.chargeDistance=function(n){return arguments.length?(g=n*n,l):Math.sqrt(g)},l.gravity=function(n){return arguments.length?(d=+n,l):d},l.theta=function(n){return arguments.length?(y=n*n,l):Math.sqrt(y)},l.alpha=function(n){return arguments.length?(n=+n,i?n>0?i=n:(e.c=null,e.t=NaN,e=null,c.start({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=Tn(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;l<i;++l)e[l]=[];for(l=0;l<c;++l){var o=x[l];e[o.source.index].push(o.target),e[o.target.index].push(o.source)}}for(var u,a=e[t],l=-1,s=a.length;++l<s;)if(!isNaN(u=a[l][n]))return u;return Math.random()*r}var t,e,r,i=m.length,c=x.length,f=s[0],g=s[1];for(t=0;t<i;++t)(r=m[t]).index=t,r.weight=0;for(t=0;t<c;++t)r=x[t],"number"==typeof r.source&&(r.source=m[r.source]),"number"==typeof r.target&&(r.target=m[r.target]),++r.source.weight,++r.target.weight;for(t=0;t<i;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",g)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(t=0;t<c;++t)o[t]=+h.call(this,x[t],t);else for(t=0;t<c;++t)o[t]=h;if(u=[],"function"==typeof p)for(t=0;t<c;++t)u[t]=+p.call(this,x[t],t);else for(t=0;t<c;++t)u[t]=p;if(a=[],"function"==typeof v)for(t=0;t<i;++t)a[t]=+v.call(this,m[t],t);else for(t=0;t<i;++t)a[t]=v;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){if(r||(r=cu.behavior.drag().origin(w).on("dragstart.force",ni).on("drag.force",t).on("dragend.force",ti)),!arguments.length)return r;this.on("mouseover.force",ei).on("mouseout.force",ri).call(r)},cu.rebind(l,c,"on")};var dl=20,yl=1,ml=1/0;cu.layout.hierarchy=function(){function n(i){var o,u=[i],a=[];for(i.depth=0;null!=(o=u.pop());)if(a.push(o),(c=e.call(n,o,o.depth))&&(l=c.length)){for(var l,c,s;--l>=0;)u.push(s=c[l]),s.parent=o,s.depth=o.depth+1;r&&(o.value=0),o.children=c}else r&&(o.value=+r.call(n,o,o.depth)||0),delete o.children;return ai(i,function(n){var e,i;t&&(e=n.children)&&e.sort(t),r&&(i=n.parent)&&(i.value+=n.value)}),a}var t=si,e=li,r=ci;return n.sort=function(e){return arguments.length?(t=e,n):t},n.children=function(t){return arguments.length?(e=t,n):e},n.value=function(t){return arguments.length?(r=t,n):r},n.revalue=function(t){return r&&(ui(t,function(n){n.children&&(n.value=0)}),ai(t,function(t){var e;t.children||(t.value=+r.call(n,t,t.depth)||0),(e=t.parent)&&(e.value+=t.value)})),t},n},cu.layout.partition=function(){function n(t,e,r,i){var o=t.children;if(t.x=e,t.y=t.depth*i,t.dx=r,t.dy=i,o&&(u=o.length)){var u,a,l,c=-1;for(r=t.value?r/t.value:0;++c<u;)n(a=o[c],e,l=a.value*r,i),e+=l}}function t(n){var e=n.children,r=0;if(e&&(i=e.length))for(var i,o=-1;++o<i;)r=Math.max(r,t(e[o]));return 1+r}function e(e,o){var u=r.call(this,e,o);return n(u[0],0,i[0],i[1]/t(u[0])),u}var r=cu.layout.hierarchy(),i=[1,1];return e.size=function(n){return arguments.length?(i=n,e):i},oi(e,r)},cu.layout.pie=function(){function n(u){var a,l=u.length,c=u.map(function(e,r){return+t.call(n,e,r)}),s=+("function"==typeof r?r.apply(this,arguments):r),f=("function"==typeof i?i.apply(this,arguments):i)-s,h=Math.min(Math.abs(f)/l,+("function"==typeof o?o.apply(this,arguments):o)),p=h*(f<0?-1:1),v=cu.sum(c),g=v?(f-l*p)/v:0,d=cu.range(l),y=[];return null!=e&&d.sort(e===wl?function(n,t){return c[t]-c[n]}:function(n,t){return e(u[n],u[t])}),d.forEach(function(n){y[n]={data:u[n],value:a=c[n],startAngle:s,endAngle:s+=a*g+p,padAngle:h}}),y}var t=Number,e=wl,r=0,i=Ru,o=0;return n.value=function(e){return arguments.length?(t=e,n):t},n.sort=function(t){return arguments.length?(e=t,n):e},n.startAngle=function(t){return arguments.length?(r=t,n):r},n.endAngle=function(t){return arguments.length?(i=t,n):i},n.padAngle=function(t){return arguments.length?(o=t,n):o},n};var wl={};cu.layout.stack=function(){function n(a,l){if(!(h=a.length))return a;var c=a.map(function(e,r){return t.call(n,e,r)}),s=c.map(function(t){return t.map(function(t,e){return[o.call(n,t,e),u.call(n,t,e)]})}),f=e.call(n,s,l);c=cu.permute(c,f),s=cu.permute(s,f);var h,p,v,g,d=r.call(n,s,l),y=c[0].length;for(v=0;v<y;++v)for(i.call(n,c[0][v],g=d[v],s[0][v][1]),p=1;p<h;++p)i.call(n,c[p][v],g+=s[p-1][v][1],s[p][v][1]);return a}var t=w,e=gi,r=di,i=vi,o=hi,u=pi;return n.values=function(e){return arguments.length?(t=e,n):t},n.order=function(t){return arguments.length?(e="function"==typeof t?t:xl.get(t)||gi,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:Ml.get(t)||di,n):r},n.x=function(t){return arguments.length?(o=t,n):o},n.y=function(t){return arguments.length?(u=t,n):u},n.out=function(t){return arguments.length?(i=t,n):i},n};var xl=cu.map({"inside-out":function(n){var t,e,r=n.length,i=n.map(yi),o=n.map(mi),u=cu.range(r).sort(function(n,t){return i[n]-i[t]}),a=0,l=0,c=[],s=[];for(t=0;t<r;++t)e=u[t],a<l?(a+=o[e],c.push(e)):(l+=o[e],s.push(e));return s.reverse().concat(c)},reverse:function(n){return cu.range(n.length).reverse()},default:gi}),Ml=cu.map({silhouette:function(n){var t,e,r,i=n.length,o=n[0].length,u=[],a=0,l=[];for(e=0;e<o;++e){for(t=0,r=0;t<i;t++)r+=n[t][e][1];r>a&&(a=r),u.push(r)}for(e=0;e<o;++e)l[e]=(a-u[e])/2;return l},wiggle:function(n){var t,e,r,i,o,u,a,l,c,s=n.length,f=n[0],h=f.length,p=[];for(p[0]=l=c=0,e=1;e<h;++e){for(t=0,i=0;t<s;++t)i+=n[t][e][1];for(t=0,o=0,a=f[e][0]-f[e-1][0];t<s;++t){for(r=0,u=(n[t][e][1]-n[t][e-1][1])/(2*a);r<t;++r)u+=(n[r][e][1]-n[r][e-1][1])/a;o+=u*n[t][e][1]}p[e]=l-=i?o/i*a:0,l<c&&(c=l)}for(e=0;e<h;++e)p[e]-=c;return p},expand:function(n){var t,e,r,i=n.length,o=n[0].length,u=1/i,a=[];for(e=0;e<o;++e){for(t=0,r=0;t<i;t++)r+=n[t][e][1];if(r)for(t=0;t<i;t++)n[t][e][1]/=r;else for(t=0;t<i;t++)n[t][e][1]=u}for(e=0;e<o;++e)a[e]=0;return a},zero:di});cu.layout.histogram=function(){function n(n,o){for(var u,a,l=[],c=n.map(e,this),s=r.call(this,c,o),f=i.call(this,s,c,o),o=-1,h=c.length,p=f.length-1,v=t?1:1/h;++o<p;)u=l[o]=[],u.dx=f[o+1]-(u.x=f[o]),u.y=0;if(p>0)for(o=-1;++o<h;)(a=c[o])>=s[0]&&a<=s[1]&&(u=l[cu.bisect(f,a,1,p)-1],u.y+=v,u.push(n[o]));return l}var t=!0,e=Number,r=bi,i=xi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=Nn(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return Mi(n,t)}:Nn(t),n):i},n.frequency=function(e){return arguments.length?(t=!!e,n):t},n},cu.layout.pack=function(){function n(n,o){var u=e.call(this,n,o),a=u[0],l=i[0],c=i[1],s=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(a.x=a.y=0,ai(a,function(n){n.r=+s(n.value)}),ai(a,Ci),r){var f=r*(t?1:Math.max(2*a.r/l,2*a.r/c))/2;ai(a,function(n){n.r+=f}),ai(a,Ci),ai(a,function(n){n.r-=f})}return qi(a,l/2,c/2,t?1:1/Math.max(2*a.r/l,2*a.r/c)),u}var t,e=cu.layout.hierarchy().sort(_i),r=0,i=[1,1];return n.size=function(t){return arguments.length?(i=t,n):i},n.radius=function(e){return arguments.length?(t=null==e||"function"==typeof e?e:+e,n):t},n.padding=function(t){return arguments.length?(r=+t,n):r},oi(n,e)},cu.layout.tree=function(){function n(n,i){var s=u.call(this,n,i),f=s[0],h=t(f);if(ai(h,e),h.parent.m=-h.z,ui(h,r),c)ui(f,o);else{var p=f,v=f,g=f;ui(f,function(n){n.x<p.x&&(p=n),n.x>v.x&&(v=n),n.depth>g.depth&&(g=n)});var d=a(p,v)/2-p.x,y=l[0]/(v.x+a(v,p)/2+d),m=l[1]/(g.depth||1);ui(f,function(n){n.x=(n.x+d)*y,n.y=n.depth*m})}return s}function t(n){for(var t,e={A:null,children:[n]},r=[e];null!=(t=r.pop());)for(var i,o=t.children,u=0,a=o.length;u<a;++u)r.push((o[u]=i={_:o[u],parent:t,children:(i=o[u].children)&&i.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:u}).a=i);return e.children[0]}function e(n){var t=n.children,e=n.parent.children,r=n.i?e[n.i-1]:null;if(t.length){Di(n);var o=(t[0].z+t[t.length-1].z)/2;r?(n.z=r.z+a(n._,r._),n.m=n.z-o):n.z=o}else r&&(n.z=r.z+a(n._,r._));n.parent.A=i(n,r,n.parent.A||e[0])}function r(n){n._.x=n.z+n.parent.m,n.m+=n.parent.m}function i(n,t,e){if(t){for(var r,i=n,o=n,u=t,l=i.parent.children[0],c=i.m,s=o.m,f=u.m,h=l.m;u=ji(u),i=Ti(i),u&&i;)l=Ti(l),o=ji(o),o.a=n,r=u.z+f-i.z-c+a(u._,i._),r>0&&(Oi(Pi(u,n,e),n,r),c+=r,s+=r),f+=u.m,c+=i.m,h+=l.m,s+=o.m;u&&!ji(o)&&(o.t=u,o.m+=f-s),i&&!Ti(l)&&(l.t=i,l.m+=c-h,e=n)}return e}function o(n){n.x*=l[0],n.y=n.depth*l[1]}var u=cu.layout.hierarchy().sort(null).value(null),a=zi,l=[1,1],c=null;return n.separation=function(t){return arguments.length?(a=t,n):a},n.size=function(t){return arguments.length?(c=null==(l=t)?o:null,n):c?null:l},n.nodeSize=function(t){return arguments.length?(c=null==(l=t)?null:o,n):c?l:null},oi(n,u)},cu.layout.cluster=function(){function n(n,o){var u,a=t.call(this,n,o),l=a[0],c=0;ai(l,function(n){var t=n.children;t&&t.length?(n.x=Ui(t),n.y=Ri(t)):(n.x=u?c+=e(n,u):0,n.y=0,u=n)});var s=Fi(l),f=Vi(l),h=s.x-e(s,f)/2,p=f.x+e(f,s)/2;return ai(l,i?function(n){n.x=(n.x-l.x)*r[0],n.y=(l.y-n.y)*r[1]}:function(n){n.x=(n.x-h)/(p-h)*r[0],n.y=(1-(l.y?n.y/l.y:1))*r[1]}),a}var t=cu.layout.hierarchy().sort(null).value(null),e=zi,r=[1,1],i=!1;return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(t){return arguments.length?(i=null==(r=t),n):i?null:r},n.nodeSize=function(t){return arguments.length?(i=null!=(r=t),n):i?r:null},oi(n,t)},cu.layout.treemap=function(){function n(n,t){for(var e,r,i=-1,o=n.length;++i<o;)r=(e=n[i]).value*(t<0?0:t),e.area=isNaN(r)||r<=0?0:r}function t(e){var o=e.children;if(o&&o.length){var u,a,l,c=f(e),s=[],h=o.slice(),v=1/0,g="slice"===p?c.dx:"dice"===p?c.dy:"slice-dice"===p?1&e.depth?c.dy:c.dx:Math.min(c.dx,c.dy);for(n(h,c.dx*c.dy/e.value),s.area=0;(l=h.length)>0;)s.push(u=h[l-1]),s.area+=u.area,"squarify"!==p||(a=r(s,g))<=v?(h.pop(),v=a):(s.area-=s.pop().area,i(s,g,c,!1),g=Math.min(c.dx,c.dy),s.length=s.area=0,v=1/0);s.length&&(i(s,g,c,!0),s.length=s.area=0),o.forEach(t)}}function e(t){var r=t.children;if(r&&r.length){var o,u=f(t),a=r.slice(),l=[];for(n(a,u.dx*u.dy/t.value),l.area=0;o=a.pop();)l.push(o),l.area+=o.area,null!=o.z&&(i(l,o.z?u.dx:u.dy,u,!a.length),l.length=l.area=0);r.forEach(e)}}function r(n,t){for(var e,r=n.area,i=0,o=1/0,u=-1,a=n.length;++u<a;)(e=n[u].area)&&(e<o&&(o=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*v/r,r/(t*o*v)):1/0}function i(n,t,e,r){var i,o=-1,u=n.length,a=e.x,c=e.y,s=t?l(n.area/t):0;if(t==e.dx){for((r||s>e.dy)&&(s=e.dy);++o<u;)i=n[o],i.x=a,i.y=c,i.dy=s,a+=i.dx=Math.min(e.x+e.dx-a,s?l(i.area/s):0);i.z=!0,i.dx+=e.x+e.dx-a,e.y+=s,e.dy-=s}else{for((r||s>e.dx)&&(s=e.dx);++o<u;)i=n[o],i.x=a,i.y=c,i.dx=s,c+=i.dy=Math.min(e.y+e.dy-c,s?l(i.area/s):0);i.z=!1,i.dy+=e.y+e.dy-c,e.x+=s,e.dx-=s}}function o(r){var i=u||a(r),o=i[0];return o.x=o.y=0,o.value?(o.dx=c[0],o.dy=c[1]):o.dx=o.dy=0,u&&a.revalue(o),n([o],o.dx*o.dy/o.value),(u?e:t)(o),h&&(u=i),i}var u,a=cu.layout.hierarchy(),l=Math.round,c=[1,1],s=null,f=Hi,h=!1,p="squarify",v=.5*(1+Math.sqrt(5));return o.size=function(n){return arguments.length?(c=n,o):c},o.padding=function(n){function t(t){var e=n.call(o,t,t.depth);return null==e?Hi(t):Ii(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Ii(t,n)}if(!arguments.length)return s;var r;return f=null==(s=n)?Hi:"function"==(r=typeof n)?t:"number"===r?(n=[n,n,n,n],e):e,o},o.round=function(n){return arguments.length?(l=n?Math.round:Number,o):l!=Number},o.sticky=function(n){return arguments.length?(h=n,u=null,o):h},o.ratio=function(n){return arguments.length?(v=n,o):v},o.mode=function(n){return arguments.length?(p=n+"",o):p},oi(o,a)},cu.random={normal:function(n,t){var e=arguments.length;return e<2&&(t=1),e<1&&(n=0),function(){var e,r,i;do{e=2*Math.random()-1,r=2*Math.random()-1,i=e*e+r*r}while(!i||i>1);return n+t*e*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var n=cu.random.normal.apply(cu,arguments);return function(){return Math.exp(n())}},bates:function(n){var t=cu.random.irwinHall(n);return function(){return t()/n}},irwinHall:function(n){return function(){for(var t=0,e=0;e<n;e++)t+=Math.random();return t}}},cu.scale={};var bl={floor:w,ceil:w};cu.scale.linear=function(){return Gi([0,1],[0,1],xr,!1)};var _l={s:1,g:1,p:1,r:1,e:1};cu.scale.log=function(){return io(cu.scale.linear().domain([0,1]),10,!0,[1,10])};var kl=cu.format(".0e"),Sl={floor:function(n){return-Math.ceil(-n)},ceil:function(n){return-Math.floor(-n)}};cu.scale.pow=function(){return oo(cu.scale.linear(),1,[0,1])},cu.scale.sqrt=function(){return cu.scale.pow().exponent(.5)},cu.scale.ordinal=function(){return ao([],{t:"range",a:[[]]})},cu.scale.category10=function(){return cu.scale.ordinal().range(El)},cu.scale.category20=function(){return cu.scale.ordinal().range(Cl)},cu.scale.category20b=function(){return cu.scale.ordinal().range(Nl)},cu.scale.category20c=function(){return cu.scale.ordinal().range(Al)};var El=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(Mn),Cl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(Mn),Nl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(Mn),Al=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(Mn);cu.scale.quantile=function(){return lo([],[])},cu.scale.quantize=function(){return co(0,1,[0,1])},cu.scale.threshold=function(){return so([.5],[0,1])},cu.scale.identity=function(){return fo([0,1])},cu.svg={},cu.svg.arc=function(){function n(){var n=Math.max(0,+e.apply(this,arguments)),c=Math.max(0,+r.apply(this,arguments)),s=u.apply(this,arguments)-Fu,f=a.apply(this,arguments)-Fu,h=Math.abs(f-s),p=s>f?0:1;if(c<n&&(v=c,c=n,n=v),h>=Uu)return t(c,p)+(n?t(n,1-p):"")+"Z";var v,g,d,y,m,w,x,M,b,_,k,S,E=0,C=0,N=[];if((y=(+l.apply(this,arguments)||0)/2)&&(d=o===ql?Math.sqrt(n*n+c*c):+o.apply(this,arguments),p||(C*=-1),c&&(C=en(d/c*Math.sin(y))),n&&(E=en(d/n*Math.sin(y)))),c){m=c*Math.cos(s+C),w=c*Math.sin(s+C),x=c*Math.cos(f-C),M=c*Math.sin(f-C);var A=Math.abs(f-s-2*C)<=Pu?0:1;if(C&&wo(m,w,x,M)===p^A){var q=(s+f)/2;m=c*Math.cos(q),w=c*Math.sin(q),x=M=null}}else m=w=0;if(n){b=n*Math.cos(f-E),_=n*Math.sin(f-E),k=n*Math.cos(s+E),S=n*Math.sin(s+E);var L=Math.abs(s-f+2*E)<=Pu?0:1;if(E&&wo(b,_,k,S)===1-p^L){var z=(s+f)/2;b=n*Math.cos(z),_=n*Math.sin(z),k=S=null}}else b=_=0;if(h>Ou&&(v=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){g=n<c^p?0:1;var T=v,j=v;if(h<Pu){var O=null==k?[b,_]:null==x?[m,w]:Oe([m,w],[k,S],[x,M],[b,_]),D=m-O[0],P=w-O[1],R=x-O[0],U=M-O[1],F=1/Math.sin(Math.acos((D*R+P*U)/(Math.sqrt(D*D+P*P)*Math.sqrt(R*R+U*U)))/2),V=Math.sqrt(O[0]*O[0]+O[1]*O[1]);j=Math.min(v,(n-V)/(F-1)),T=Math.min(v,(c-V)/(F+1))}if(null!=x){var H=xo(null==k?[b,_]:[k,S],[m,w],c,T,p),I=xo([x,M],[b,_],c,T,p);v===T?N.push("M",H[0],"A",T,",",T," 0 0,",g," ",H[1],"A",c,",",c," 0 ",1-p^wo(H[1][0],H[1][1],I[1][0],I[1][1]),",",p," ",I[1],"A",T,",",T," 0 0,",g," ",I[0]):N.push("M",H[0],"A",T,",",T," 0 1,",g," ",I[0])}else N.push("M",m,",",w);if(null!=k){var Y=xo([m,w],[k,S],n,-j,p),Z=xo([b,_],null==x?[m,w]:[x,M],n,-j,p);v===j?N.push("L",Z[0],"A",j,",",j," 0 0,",g," ",Z[1],"A",n,",",n," 0 ",p^wo(Z[1][0],Z[1][1],Y[1][0],Y[1][1]),",",1-p," ",Y[1],"A",j,",",j," 0 0,",g," ",Y[0]):N.push("L",Z[0],"A",j,",",j," 0 0,",g," ",Y[0])}else N.push("L",b,",",_)}else N.push("M",m,",",w),null!=x&&N.push("A",c,",",c," 0 ",A,",",p," ",x,",",M),N.push("L",b,",",_),null!=k&&N.push("A",n,",",n," 0 ",L,",",1-p," ",k,",",S);return N.push("Z"),N.join("")}function t(n,t){return"M0,"+n+"A"+n+","+n+" 0 1,"+t+" 0,"+-n+"A"+n+","+n+" 0 1,"+t+" 0,"+n}var e=po,r=vo,i=ho,o=ql,u=go,a=yo,l=mo;return n.innerRadius=function(t){return arguments.length?(e=Nn(t),n):e},n.outerRadius=function(t){return arguments.length?(r=Nn(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=Nn(t),n):i},n.padRadius=function(t){return arguments.length?(o=t==ql?ql:Nn(t),n):o},n.startAngle=function(t){return arguments.length?(u=Nn(t),n):u},n.endAngle=function(t){return arguments.length?(a=Nn(t),n):a},n.padAngle=function(t){return arguments.length?(l=Nn(t),n):l},n.centroid=function(){var n=(+e.apply(this,arguments)+ +r.apply(this,arguments))/2,t=(+u.apply(this,arguments)+ +a.apply(this,arguments))/2-Fu;return[Math.cos(t)*n,Math.sin(t)*n]},n};var ql="auto";cu.svg.line=function(){return Mo(w)};var Ll=cu.map({linear:bo,"linear-closed":_o,step:ko,"step-before":So,"step-after":Eo,basis:zo,"basis-open":To,"basis-closed":jo,bundle:Oo,cardinal:Ao,"cardinal-open":Co,"cardinal-closed":No,monotone:Vo});Ll.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var zl=[0,2/3,1/3,0],Tl=[0,1/3,2/3,0],jl=[0,1/6,2/3,1/6];cu.svg.line.radial=function(){var n=Mo(Ho);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},So.reverse=Eo,Eo.reverse=So,cu.svg.area=function(){return Io(w)},cu.svg.area.radial=function(){var n=Io(Ho);return n.radius=n.x,delete n.x,n.innerRadius=n.x0,delete n.x0,n.outerRadius=n.x1,delete n.x1,n.angle=n.y,delete n.y,n.startAngle=n.y0,delete n.y0,n.endAngle=n.y1,delete n.y1,n},cu.svg.chord=function(){function n(n,a){var l=t(this,o,n,a),c=t(this,u,n,a);return"M"+l.p0+r(l.r,l.p1,l.a1-l.a0)+(e(l,c)?i(l.r,l.p1,l.r,l.p0):i(l.r,l.p1,c.r,c.p0)+r(c.r,c.p1,c.a1-c.a0)+i(c.r,c.p1,l.r,l.p0))+"Z"}function t(n,t,e,r){var i=t.call(n,e,r),o=a.call(n,i,r),u=l.call(n,i,r)-Fu,s=c.call(n,i,r)-Fu;return{r:o,a0:u,a1:s,p0:[o*Math.cos(u),o*Math.sin(u)],p1:[o*Math.cos(s),o*Math.sin(s)]}}function e(n,t){return n.a0==t.a0&&n.a1==t.a1}function r(n,t,e){return"A"+n+","+n+" 0 "+ +(e>Pu)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var o=xe,u=Me,a=Yo,l=go,c=yo;return n.radius=function(t){return arguments.length?(a=Nn(t),n):a},n.source=function(t){return arguments.length?(o=Nn(t),n):o},n.target=function(t){return arguments.length?(u=Nn(t),n):u},n.startAngle=function(t){return arguments.length?(l=Nn(t),n):l},n.endAngle=function(t){return arguments.length?(c=Nn(t),n):c},n},cu.svg.diagonal=function(){function n(n,i){var o=t.call(this,n,i),u=e.call(this,n,i),a=(o.y+u.y)/2,l=[o,{x:o.x,y:a},{x:u.x,y:a},u];return l=l.map(r),"M"+l[0]+"C"+l[1]+" "+l[2]+" "+l[3]}var t=xe,e=Me,r=Zo;return n.source=function(e){return arguments.length?(t=Nn(e),n):t},n.target=function(t){return arguments.length?(e=Nn(t),n):e},n.projection=function(t){return arguments.length?(r=t,n):r},n},cu.svg.diagonal.radial=function(){var n=cu.svg.diagonal(),t=Zo,e=n.projection;return n.projection=function(n){return arguments.length?e($o(t=n)):t},n},cu.svg.symbol=function(){function n(n,r){return(Ol.get(t.call(this,n,r))||Wo)(e.call(this,n,r))}var t=Xo,e=Bo;return n.type=function(e){return arguments.length?(t=Nn(e),n):t},n.size=function(t){return arguments.length?(e=Nn(t),n):e},n};var Ol=cu.map({circle:Wo,cross:function(n){var t=Math.sqrt(n/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(n){var t=Math.sqrt(n/(2*Pl)),e=t*Pl;return"M0,"+-t+"L"+e+",0 0,"+t+" "+-e+",0Z"},square:function(n){var t=Math.sqrt(n)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(n){var t=Math.sqrt(n/Dl),e=t*Dl/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Dl),e=t*Dl/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});cu.svg.symbolTypes=Ol.keys();var Dl=Math.sqrt(3),Pl=Math.tan(30*Vu);Nu.transition=function(n){for(var t,e,r=Rl||++Hl,i=nu(n),o=[],u=Ul||{time:Date.now(),ease:Cr,delay:0,duration:250},a=-1,l=this.length;++a<l;){o.push(t=[]);for(var c=this[a],s=-1,f=c.length;++s<f;)(e=c[s])&&tu(e,s,i,r,u),t.push(e)}return Jo(o,i,r)},Nu.interrupt=function(n){return this.each(null==n?Fl:Go(nu(n)))};var Rl,Ul,Fl=Go(nu()),Vl=[],Hl=0;Vl.call=Nu.call,Vl.empty=Nu.empty,Vl.node=Nu.node,Vl.size=Nu.size,cu.transition=function(n,t){return n&&n.transition?Rl?n.transition(t):n:cu.selection().transition(n)},cu.transition.prototype=Vl,Vl.select=function(n){var t,e,r,i=this.id,o=this.namespace,u=[];n=A(n);for(var a=-1,l=this.length;++a<l;){u.push(t=[]);for(var c=this[a],s=-1,f=c.length;++s<f;)(r=c[s])&&(e=n.call(r,r.__data__,s,a))?("__data__"in r&&(e.__data__=r.__data__),tu(e,s,o,i,r[o][i]),t.push(e)):t.push(null)}return Jo(u,o,i)},Vl.selectAll=function(n){var t,e,r,i,o,u=this.id,a=this.namespace,l=[];n=q(n);for(var c=-1,s=this.length;++c<s;)for(var f=this[c],h=-1,p=f.length;++h<p;)if(r=f[h]){o=r[a][u],e=n.call(r,r.__data__,h,c),l.push(t=[]);for(var v=-1,g=e.length;++v<g;)(i=e[v])&&tu(i,v,a,u,o),t.push(i)}return Jo(l,a,u)},Vl.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=H(n));for(var o=0,u=this.length;o<u;o++){i.push(t=[]);for(var e=this[o],a=0,l=e.length;a<l;a++)(r=e[a])&&n.call(r,r.__data__,a,o)&&t.push(r)}return Jo(i,this.namespace,this.id)},Vl.tween=function(n,t){var e=this.id,r=this.namespace;return arguments.length<2?this.node()[r][e].tween.get(n):Y(this,null==t?function(t){t[r][e].tween.remove(n)}:function(i){i[r][e].tween.set(n,t)})},Vl.attr=function(n,t){function e(){this.removeAttribute(a)}function r(){this.removeAttributeNS(a.space,a.local)}function i(n){return null==n?e:(n+="",function(){var t,e=this.getAttribute(a);return e!==n&&(t=u(e,n),function(n){this.setAttribute(a,t(n))})})}function o(n){return null==n?r:(n+="",function(){var t,e=this.getAttributeNS(a.space,a.local);return e!==n&&(t=u(e,n),function(n){this.setAttributeNS(a.space,a.local,t(n))})})}if(arguments.length<2){for(t in n)this.attr(t,n[t]);return this}var u="transform"==n?Xr:xr,a=cu.ns.qualify(n);return Qo(this,"attr."+n,t,a.local?o:i)},Vl.attrTween=function(n,t){function e(n,e){var r=t.call(this,n,e,this.getAttribute(i));return r&&function(n){this.setAttribute(i,r(n))}}function r(n,e){var r=t.call(this,n,e,this.getAttributeNS(i.space,i.local));return r&&function(n){this.setAttributeNS(i.space,i.local,r(n))}}var i=cu.ns.qualify(n);return this.tween("attr."+n,i.local?r:e)},Vl.style=function(n,t,r){function i(){this.style.removeProperty(n)}function o(t){return null==t?i:(t+="",function(){var i,o=e(this).getComputedStyle(this,null).getPropertyValue(n);return o!==t&&(i=xr(o,t),function(t){this.style.setProperty(n,i(t),r)})})}var u=arguments.length;if(u<3){if("string"!=typeof n){u<2&&(t="");for(r in n)this.style(r,n[r],t);return this}r=""}return Qo(this,"style."+n,t,o)},Vl.styleTween=function(n,t,r){function i(i,o){var u=t.call(this,i,o,e(this).getComputedStyle(this,null).getPropertyValue(n));return u&&function(t){this.style.setProperty(n,u(t),r)}}return arguments.length<3&&(r=""),this.tween("style."+n,i)},Vl.text=function(n){return Qo(this,"text",n,Ko)},Vl.remove=function(){var n=this.namespace;return this.each("end.transition",function(){var t;this[n].count<2&&(t=this.parentNode)&&t.removeChild(this)})},Vl.ease=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].ease:("function"!=typeof n&&(n=cu.ease.apply(cu,arguments)),Y(this,function(r){r[e][t].ease=n}))},Vl.delay=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].delay:Y(this,"function"==typeof n?function(r,i,o){r[e][t].delay=+n.call(r,r.__data__,i,o)}:(n=+n,function(r){r[e][t].delay=n}))},Vl.duration=function(n){var t=this.id,e=this.namespace;return arguments.length<1?this.node()[e][t].duration:Y(this,"function"==typeof n?function(r,i,o){r[e][t].duration=Math.max(1,n.call(r,r.__data__,i,o))}:(n=Math.max(1,n),function(r){r[e][t].duration=n}))},Vl.each=function(n,t){var e=this.id,r=this.namespace;if(arguments.length<2){var i=Ul,o=Rl;try{Rl=e,Y(this,function(t,i,o){Ul=t[r][e],n.call(t,t.__data__,i,o)})}finally{Ul=i,Rl=o}}else Y(this,function(i){var o=i[r][e];(o.event||(o.event=cu.dispatch("start","end","interrupt"))).on(n,t)});return this},Vl.transition=function(){for(var n,t,e,r,i=this.id,o=++Hl,u=this.namespace,a=[],l=0,c=this.length;l<c;l++){a.push(n=[]);for(var t=this[l],s=0,f=t.length;s<f;s++)(e=t[s])&&(r=e[u][i],tu(e,s,u,o,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration})),n.push(e)}return Jo(a,u,o)},cu.svg.axis=function(){function n(n){n.each(function(){var n,c=cu.select(this),s=this.__chart__||e,f=this.__chart__=e.copy(),h=null==l?f.ticks?f.ticks.apply(f,a):f.domain():l,p=null==t?f.tickFormat?f.tickFormat.apply(f,a):w:t,v=c.selectAll(".tick").data(h,f),g=v.enter().insert("g",".domain").attr("class","tick").style("opacity",Ou),d=cu.transition(v.exit()).style("opacity",Ou).remove(),y=cu.transition(v.order()).style("opacity",1),m=Math.max(i,0)+u,x=Zi(f),M=c.selectAll(".domain").data([0]),b=(M.enter().append("path").attr("class","domain"),cu.transition(M));g.append("line"),g.append("text");var _,k,S,E,C=g.select("line"),N=y.select("line"),A=v.select("text").text(p),q=g.select("text"),L=y.select("text"),z="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=eu,_="x",S="y",k="x2",E="y2",A.attr("dy",z<0?"0em":".71em").style("text-anchor","middle"),b.attr("d","M"+x[0]+","+z*o+"V0H"+x[1]+"V"+z*o)):(n=ru,_="y",S="x",k="y2",E="x2",A.attr("dy",".32em").style("text-anchor",z<0?"end":"start"),b.attr("d","M"+z*o+","+x[0]+"H0V"+x[1]+"H"+z*o)),C.attr(E,z*i),q.attr(S,z*m),N.attr(k,0).attr(E,z*i),L.attr(_,0).attr(S,z*m),f.rangeBand){var T=f,j=T.rangeBand()/2;s=f=function(n){return T(n)+j}}else s.rangeBand?s=f:d.call(n,f,s);g.call(n,s,f),y.call(n,f,f)})}var t,e=cu.scale.linear(),r=Il,i=6,o=6,u=3,a=[10],l=null;return n.scale=function(t){return arguments.length?(e=t,n):e},n.orient=function(t){return arguments.length?(r=t in Yl?t+"":Il,n):r},n.ticks=function(){return arguments.length?(a=fu(arguments),n):a},n.tickValues=function(t){return arguments.length?(l=t,n):l},n.tickFormat=function(e){return arguments.length?(t=e,n):t},n.tickSize=function(t){var e=arguments.length;return e?(i=+t,o=+arguments[e-1],n):i},n.innerTickSize=function(t){return arguments.length?(i=+t,n):i},n.outerTickSize=function(t){return arguments.length?(o=+t,n):o},n.tickPadding=function(t){return arguments.length?(u=+t,n):u},n.tickSubdivide=function(){return arguments.length&&n},n};var Il="bottom",Yl={top:1,right:1,bottom:1,left:1};cu.svg.brush=function(){function n(e){e.each(function(){var e=cu.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",o).on("touchstart.brush",o),u=e.selectAll(".background").data([0]);u.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var a=e.selectAll(".resize").data(g,w);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return Zl[n]}).append("rect").attr("x",function(n){return/[ew]$/.test(n)?-3:null}).attr("y",function(n){return/^[ns]/.test(n)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),a.style("display",n.empty()?"none":null);var l,f=cu.transition(e),h=cu.transition(u);c&&(l=Zi(c),h.attr("x",l[0]).attr("width",l[1]-l[0]),r(f)),s&&(l=Zi(s),h.attr("y",l[0]).attr("height",l[1]-l[0]),i(f)),t(f)})}function t(n){n.selectAll(".resize").attr("transform",function(n){return"translate("+f[+/e$/.test(n)]+","+h[+/^s/.test(n)]+")"})}function r(n){n.select(".extent").attr("x",f[0]),n.selectAll(".extent,.n>rect,.s>rect").attr("width",f[1]-f[0])}function i(n){n.select(".extent").attr("y",h[0]),n.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function o(){function o(){32==cu.event.keyCode&&(A||(w=null,L[0]-=f[1],L[1]-=h[1],A=2),S())}function g(){32==cu.event.keyCode&&2==A&&(L[0]+=f[1],L[1]+=h[1],A=0,S())}function d(){var n=cu.mouse(M),e=!1;x&&(n[0]+=x[0],n[1]+=x[1]),A||(cu.event.altKey?(w||(w=[(f[0]+f[1])/2,(h[0]+h[1])/2]),L[0]=f[+(n[0]<w[0])],L[1]=h[+(n[1]<w[1])]):w=null),C&&y(n,c,0)&&(r(k),e=!0),N&&y(n,s,1)&&(i(k),e=!0),e&&(t(k),_({type:"brush",mode:A?"move":"resize"}))}function y(n,t,e){var r,i,o=Zi(t),l=o[0],c=o[1],s=L[e],g=e?h:f,d=g[1]-g[0];if(A&&(l-=s,c-=d+s),r=(e?v:p)?Math.max(l,Math.min(c,n[e])):n[e],A?i=(r+=s)+d:(w&&(s=Math.max(l,Math.min(c,2*w[e]-r))),s<r?(i=r,r=s):i=s),g[0]!=r||g[1]!=i)return e?a=null:u=null,g[0]=r,g[1]=i,!0}function m(){d(),k.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),cu.select("body").style("cursor",null),z.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),q(),_({type:"brushend"})}var w,x,M=this,b=cu.select(cu.event.target),_=l.of(M,arguments),k=cu.select(M),E=b.datum(),C=!/^(n|s)$/.test(E)&&c,N=!/^(e|w)$/.test(E)&&s,A=b.classed("extent"),q=G(M),L=cu.mouse(M),z=cu.select(e(M)).on("keydown.brush",o).on("keyup.brush",g);if(cu.event.changedTouches?z.on("touchmove.brush",d).on("touchend.brush",m):z.on("mousemove.brush",d).on("mouseup.brush",m),k.interrupt().selectAll("*").interrupt(),A)L[0]=f[0]-L[0],L[1]=h[0]-L[1];else if(E){var T=+/w$/.test(E),j=+/^n/.test(E);x=[f[1-T]-L[0],h[1-j]-L[1]],L[0]=f[T],L[1]=h[j]}else cu.event.altKey&&(w=L.slice());k.style("pointer-events","none").selectAll(".resize").style("display",null),cu.select("body").style("cursor",b.style("cursor")),_({type:"brushstart"}),d()}var u,a,l=C(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],p=!0,v=!0,g=$l[0];return n.event=function(n){n.each(function(){var n=l.of(this,arguments),t={x:f,y:h,i:u,j:a},e=this.__chart__||t;this.__chart__=t,Rl?cu.select(this).transition().each("start.brush",function(){u=e.i,a=e.j,f=e.x,h=e.y,n({type:"brushstart"})}).tween("brush:brush",function(){var e=Mr(f,t.x),r=Mr(h,t.y);return u=a=null,function(i){f=t.x=e(i),h=t.y=r(i),n({type:"brush",mode:"resize"})}}).each("end.brush",function(){u=t.i,a=t.j,n({type:"brush",mode:"resize"}),n({type:"brushend"})}):(n({type:"brushstart"}),n({type:"brush",mode:"resize"}),n({type:"brushend"}))})},n.x=function(t){return arguments.length?(c=t,g=$l[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,g=$l[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(p=!!t[0],v=!!t[1]):c?p=!!t:s&&(v=!!t),n):c&&s?[p,v]:c?p:s?v:null},n.extent=function(t){var e,r,i,o,l;return arguments.length?(c&&(e=t[0],r=t[1],s&&(e=e[0],r=r[0]),u=[e,r],c.invert&&(e=c(e),r=c(r)),r<e&&(l=e,e=r,r=l),e==f[0]&&r==f[1]||(f=[e,r])),s&&(i=t[0],o=t[1],c&&(i=i[1],o=o[1]),a=[i,o],s.invert&&(i=s(i),o=s(o)),o<i&&(l=i,i=o,o=l),i==h[0]&&o==h[1]||(h=[i,o])),n):(c&&(u?(e=u[0],r=u[1]):(e=f[0],r=f[1],c.invert&&(e=c.invert(e),r=c.invert(r)),r<e&&(l=e,e=r,r=l))),s&&(a?(i=a[0],o=a[1]):(i=h[0],o=h[1],s.invert&&(i=s.invert(i),o=s.invert(o)),o<i&&(l=i,i=o,o=l))),c&&s?[[e,i],[r,o]]:c?[e,r]:s&&[i,o])},n.clear=function(){return n.empty()||(f=[0,0],h=[0,0],u=a=null),n},n.empty=function(){return!!c&&f[0]==f[1]||!!s&&h[0]==h[1]},cu.rebind(n,l,"on")};var Zl={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},$l=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Bl=ha.format=ma.timeFormat,Xl=Bl.utc,Wl=Xl("%Y-%m-%dT%H:%M:%S.%LZ");Bl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?iu:Wl,iu.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},iu.toString=Wl.toString,ha.second=Hn(function(n){return new pa(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),ha.seconds=ha.second.range,ha.seconds.utc=ha.second.utc.range,ha.minute=Hn(function(n){return new pa(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),ha.minutes=ha.minute.range,ha.minutes.utc=ha.minute.utc.range,ha.hour=Hn(function(n){var t=n.getTimezoneOffset()/60;return new pa(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),ha.hours=ha.hour.range,ha.hours.utc=ha.hour.utc.range,ha.month=Hn(function(n){return n=ha.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),ha.months=ha.month.range,ha.months.utc=ha.month.utc.range;var Gl=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],Jl=[[ha.second,1],[ha.second,5],[ha.second,15],[ha.second,30],[ha.minute,1],[ha.minute,5],[ha.minute,15],[ha.minute,30],[ha.hour,1],[ha.hour,3],[ha.hour,6],[ha.hour,12],[ha.day,1],[ha.day,2],[ha.week,1],[ha.month,1],[ha.month,3],[ha.year,1]],Ql=Bl.multi([[".%L",function(n){return n.getMilliseconds()}],[":%S",function(n){return n.getSeconds()}],["%I:%M",function(n){return n.getMinutes()}],["%I %p",function(n){return n.getHours()}],["%a %d",function(n){return n.getDay()&&1!=n.getDate()}],["%b %d",function(n){return 1!=n.getDate()}],["%B",function(n){return n.getMonth()}],["%Y",Lt]]),Kl={range:function(n,t,e){return cu.range(Math.ceil(n/e)*e,+t,e).map(uu)},floor:w,ceil:w};Jl.year=ha.year,ha.scale=function(){return ou(cu.scale.linear(),Jl,Ql)};var nc=Jl.map(function(n){return[n[0].utc,n[1]]}),tc=Xl.multi([[".%L",function(n){return n.getUTCMilliseconds()}],[":%S",function(n){return n.getUTCSeconds()}],["%I:%M",function(n){return n.getUTCMinutes()}],["%I %p",function(n){return n.getUTCHours()}],["%a %d",function(n){return n.getUTCDay()&&1!=n.getUTCDate()}],["%b %d",function(n){return 1!=n.getUTCDate()}],["%B",function(n){return n.getUTCMonth()}],["%Y",Lt]]);nc.year=ha.year.utc,ha.scale.utc=function(){return ou(cu.scale.linear(),nc,tc)},cu.text=An(function(n){return n.responseText}),cu.json=function(n,t){return qn(n,"application/json",au,t)},cu.html=function(n,t){return qn(n,"text/html",lu,t)},cu.xml=An(function(n){return n.responseXML}),"function"==typeof define&&define.amd?define(this.d3=cu):"object"==typeof n&&n.exports?n.exports=cu:this.d3=cu}()},function(n,t,e){var r,i,o,u,a,l,c,s,f=[].indexOf||function(n){for(var t=0,e=this.length;t<e;t++)if(t in this&&this[t]===n)return t;return-1};u=e(0),s=e(2),c=u(0).name("outstanding"),r=[],o={},a=function(){var n,t,e,r,i,a,l,c,s;return l=0,e=[],c=[],a=u.group(function(n){var t,e,r,i,o,u;for(e=0,i=n.length;e<i;e++)if(t=n[e],"ready"!==t.status)return;for(r=0,o=n.length;r<o;r++)t=n[r],t.res.value(null!=(u=t.resVal)?u:null),t.status="",t.requestBundle=null,delete t.resVal}),t=function(n,t,e,r){if(!n.requestBundle)throw new Error("getData called outside of a request");e?(n.resVal=null,n.onError&&n.onError(e)):n.resVal=t?r:null,n.status="ready",delete n.curAjax,delete n.processResponce,a(n.requestBundle)},i=function(n){var e,r,i,u,a,l;if(f.call(n.requestBundle,n)<0)throw new Error("invalid request");u=n.requestCount,l=n.query.value(),e=n.curAjax,r=n.processResponce,null!=l?(n.invalidOnLoad.value()&&n.res.value(null),a=!1,i=function(e,r){this===o&&(a=!0),a||(a=!0,u.value(u.value()-1),t(n,l,e,r))},u.value(u.value()+1),n.processResponce=i,n.curAjax=n.requester(l,i)):t(n,l,null,null),r&&(u.value(u.value()-1),r.call(o),null!=e&&"function"==typeof e.abort&&e.abort())},r=function(){var n,t,r,o,u,a,l;for(n=[],t=[],o=0,a=c.length;o<a;o++)r=c[o],r.query.hasChanged()&&("virgin"===r.status?r.query.value()?(e.push(r),r.status="requesting",r.requestBundle=e,n.push(r)):r.status="":(r.status="requesting",r.requestBundle?(delete r.resVal,n.push(r)):(t.push(r),r.requestBundle=t,n.push(r))));for(u=0,l=n.length;u<l;u++)r=n[u],i(r)},s=null,n=function(n,t,e){s?(s.addChange(t,e),s.addListen(n)):s=u.register({listen:[n],change:[t,e],fn:r})},function(t,e,r,i,o){var a,s;return l++,s=u(),a={id:l,query:t,res:s,status:"virgin",requester:i,onError:r,invalidOnLoad:e,requestBundle:null,curAjax:null,requestCount:o},c.push(a),n(t,s,o),s}},i=function(n){var t,e,o,l,s,f;if(l=n.query,e=n.invalidOnLoad,o=n.onError,t=n.groupId,f=n.requester,s=n.requestCount,!l)throw new Error("it does not make sense to not have a query");if(!f)throw new Error("it does not make sense to not have a requester");if("function"!=typeof f)throw new Error("requester must be a function");return l=u.wrap(l),e=u.wrap(e||!1),s||(s=c),s=u.wrapVar(s),null==t&&(t=i.getGroupId()),r[t]||(r[t]=a()),r[t](l,e,o,f,s)},i.outstanding=c,l=0,i.getGroupId=function(){var n;return n=l,l++,n},i.requester={ajax:function(n,t){var e,r,i;return i=n.dataFn?n.dataFn(n.data):n.data,r=jQuery.ajax({url:n.url,data:i,type:n.method||"GET",dataType:n.dataType||"json",contentType:null!=i?n.contentType||"application/json":void 0,processData:n.processData||!1,success:function(e){n.fn&&(e=n.fn(e,n)),r=null,t(null,e)},error:function(n,e){r=null,t(n.responseText||e,null)}}),e=function(){r&&(r.abort(),r=null)},{abort:e}},cacheWrap:function(n){var t,e,r,i,o,a,l,c;if(c=null!=n?n:{},o=c.requester,i=c.max,a=c.timeout,r=c.keyFn,!o)throw new Error("it does not make sense to not have a requester");if("function"!=typeof o)throw new Error("requester must be a function");return i=u.wrap(i||100),a=u.wrap(a||18e5),t={},e=0,r||(r=function(n){var t,e,r,i,o,u;return u=n.url,e=n.data,i=n.method,r=n.dataType,t=n.contentType,o=n.processData,[u,s.strObj(e),i,r,t,o].join("@@")}),l=function(){var n,r,o,u,l,c,s,f,h;if((f=a.value())>0){n=Date.now()-f,u={};for(s in t)r=t[s],n<r.time&&(u[s]=r);t=u}for(o=i.value(),h=[];o<e;){l=null,c=1/0;for(s in t)r=t[s],r.time<c&&(c=r.time,l=s);delete t[l],h.push(e--)}return h},u.register({listen:[i,a],fn:l}),{clear:function(){t={},e=0},requester:function(n,i){var u,a,c,s;return s=r(n),c=t[s],a=!1,c||(t[s]=c={time:Date.now(),waiting:[i]},a=!0,e++,l(),c.ajax=o(n,function(n,r){var i,o,u,a,l,f;if(n){if("abort"===n)return;for(c.ajax=null,delete t[s],e--,l=c.waiting,i=0,u=l.length;i<u;i++)(0,l[i])(n,null);return void delete c.waiting}for(c.ajax=null,c.resVal=r,f=c.waiting,o=0,a=f.length;o<a;o++)(0,f[o])(null,r);delete c.waiting})),c.resVal?(i(null,c.resVal),u=function(){}):(a||c.waiting.push(i),u=function(){c.waiting&&(c.waiting=c.waiting.filter(function(n){return n!==i}),i("abort",null),0===c.waiting.length&&c.ajax&&(c.ajax.abort(),c.ajax=null,delete t[s],e--))}),{abort:u}}}}},n.exports=i},function(n,t,e){var r,i,o,u,a,l,c=[].indexOf||function(n){for(var t=0,e=this.length;t<e;t++)if(t in this&&this[t]===n)return t;return-1};o=e(3),u=e(0),l=e(1),r=l.bind,i=l.bindSingle,a={},a.resizer=function(n){var t,e,r,i;return i=n.selector,r=n.out,t=n.dimension,r=u.wrapVar(r),t=u.wrap(t||"width"),e=function(){var n,e,o;return o=t.value(),"width"===o||"height"===o?(i?(n=jQuery(i),e=n[o]()):e=document.body["width"===o?"clientWidth":"clientHeight"],r.value(e)):r.value(null)},$(window).resize(e),u.register({listen:t,change:r,fn:e}),r},a.out=function(n){var t,e,r,i,a,l,c,s,f,h,p,v;if(s=n.selector,e=n.data,r=n.fn,i=n.format,l=n.invalid,a=n.hideInvalid,t=n.attr,f=n.style,h=n.text,!e)throw new Error("must have data");if(e=u.wrap(e),i=null!=i?i:r,!s)throw new Error("must have selector");s=u.wrap(s),i=u.wrap(i||u.identity),l=u.wrap(l||null),a=u.wrap(a||!1),t?(v=u.wrap(t),c=function(n,t){return o.select(n).attr(v.value(),t)}):f?(v=u.wrap(f),c=function(n,t){return o.select(n).style(v.value(),t)}):c=h?function(n,t){return o.select(n).text(t)}:function(n,t){return o.select(n).html(t)},p=function(){var n,t,r,u,f;u=s.value(),n=i.value(),t=e.value(),null!=u&&(null!=n&&null!=t?(f=c(u,n(t)),a.value()&&f.style("display",null)):(r=l.value(),c(u,r),a.value()&&o.select(u).style("display","none")))},u.register({listen:[e,s,i],fn:p})},a.list=function(n){var t,e,r,i,a,l,s,f,h,p,v,g,d,y,m,w,x,M,b,_;if(m=n.parent,e=n.data,l=n.label,s=n.link,f=n.class,w=n.selection,x=n.selections,y=n.onSelect,g=n.onEnter,d=n.onLeave,a=n.icons,n.extras,t=n.classStr,r=n.highlight,!m)throw new Error("must have parent");if(!e)throw new Error("must have data");for(w=u.wrapVar(w,"selection"),x=u.wrapVar(x||[],"selections"),r=u.wrapVar(r,"highlight"),e=u.wrap(e),l=u.wrap(l||u.identity),s=u.wrap(s),a||(a=[]),b=0,_=a.length;b<_;b++)i=a[b],i.position||(i.position="right");return f=null!=f?u.wrap(f):u.applyAlways([w,x,r],function(n,t,e){return function(r){var i;return i=[],n&&i.push(r===n?"is_selection":"isnt_selection"),t&&i.push(c.call(t,r)>=0?"is_selections":"isnt_selections"),e&&i.push(r===e?"is_highlight":"isnt_highlight"),i.length?i.join(" "):null}}),M=u.valueOf(m).append("ul").attr("class",t),v=u.group(function(n,t){var e,r,i;!1!==("function"==typeof y?y(n,t):void 0)&&(e="function"==typeof(r=s.value())?r(n):void 0,w.value(n),i=(x.value()||[]).slice(),t=i.indexOf(n),-1===t?i.push(n):i.splice(t,1),x.value(i),e&&(window.location.href=e))}),h=function(n){!1!==("function"==typeof g?g(n):void 0)&&r.value(n)},p=function(n){!1!==("function"==typeof d?d(n):void 0)&&r.value()===n&&r.value("")},u.register({name:"update_html_list",listen:[e,l,s],fn:function(){var n,r,i,u,c,g,d,y;g=e.value(),d=l.value(),y=s.value(),c=f.value(),g&&(g=g.valueOf(),r=function(n,e){a.forEach(function(r){r.position===e&&(t="icon_cont "+e,r.classStr&&(t+=" "+r.classStr),n.append("div").attr("class",t).attr("title",r.title).on("click",function(n,t){!1===("function"==typeof r.onSelect?r.onSelect(n,t):void 0)&&o.event.stopPropagation()}).on("mouseover",function(n,t){!1===("function"==typeof r.onEnter?r.onEnter(n,t):void 0)&&o.event.stopPropagation()}).on("mouseout",function(n,t){!1===("function"==typeof r.onLeave?r.onLeave(n,t):void 0)&&o.event.stopPropagation()}).append("div").attr("class","icon"))})},u=M.selectAll("li").data(g),n=u.enter().append("li").append("a"),r(n,"left"),n.append("span"),r(n,"right"),i=u.attr("class",c).on("click",v).on("mouseover",h).on("mouseout",p).select("a").attr("href",y),i.select("span").text(d),u.exit().remove())}}),u.register({name:"update_class_list",listen:[f],fn:function(){var n;n=f.value(),M.selectAll("li").attr("class",n)}}),{selection:w,selections:x,node:M.node()}},a.combobox=function(n){var t,e,r,l,s,f,h,p,v,g,d,y,m,w,x,M,b,_,k,S,E,C,N,A,q,L,z,T;if(C=n.parent,t=n.classStr,e=n.data,d=n.label,A=n.selectionLabel,y=n.link,m=n.class,v=n.id,N=n.selection,q=n.selections,E=n.onSelect,k=n.onEnter,S=n.onLeave,w=n.menuAnchor,L=n.title,p=n.icons,g=n.keepOnClick,r=n.disabled,n.highlight,h=n.focus,!C)throw new Error("must have parent");if(!e)throw new Error("must have data");return N=u.wrapVar(N,"selection"),q=u.wrapVar(q,"selections"),w=u.wrap(w||"left"),e=u.wrap(e),d=u.wrap(d||u.identity),A=u.wrap(A||d),y=u.wrap(y),r=u.wrap(null!=r&&r),h=u.wrapVar(h),s=u.wrapVar([]).compare(!1),f=u.def(),u.register({listen:e,fn:function(){var n,t;n=e.value(),t=N.value(),(!n||c.call(n,t)<0)&&setTimeout(function(){return N.value(null)},0)}}),u.register({listen:s,label:d,data:e,change:f,fn:function(){var n,t,r,i,o;if(n=e.value(),t=s.value(),o=d.value(),n&&t)return r=t.join(""),i=n.filter(function(n){var t;return(null!=(t=String(o(n)))?t.toLowerCase().indexOf(r):void 0)>-1}),f.value(i)}}),L&&(L=u.wrap(L)),p||(p=[]),M=u(!1),u.register({listen:M,change:s,fn:function(){return s.value([])}}),l=i({parent:C,self:"div",attr:{class:u.applyAlways({args:[t,M,r],fn:function(n,t,e){return[n||"",t?"open":"closed",e?"disabled":""].join(" ")}})},style:{position:"relative"}}).value(),T=i({parent:l,self:"input.title-cont",attr:{disabled:u.op.iff(r,"",null),tabIndex:0,id:v},on:{blur:function(){h.value(!1)}}}).value(),z=function(){var n,t,r,i,o,u;i=e.value(),u=N.value(),i&&-1!==(r=i.indexOf(u))&&(o=x.node(),0!==o.scrollHeight&&(n=x.selectAll("li")[0][r],(t=$(n).position())&&(o.scrollTop=0,o.scrollTop=t.top)))},T.on("keydown",function(){var n,t,r,i,u;if((r=e.value())&&d.value()){if(9===(n=o.event.which||o.event.keyCode))return void M.value(!1);if(38===n||40===n)if(o.event.stopPropagation(),o.event.preventDefault(),M.value()||M.value(!0),u=N.value(),-1===(t=r.indexOf(u))){if(null!==u)throw"selection was not found in data";r.length&&N.value(r[0])}else 38===n?t--:t++,t+=r.length,t%=r.length,N.value(r[t]),z();13!==n&&27!==n||(o.event.stopPropagation(),o.event.preventDefault(),M.value(!1)),8===n&&(i=s.value(),i.pop(),s.value(i))}},!0).on("keypress",function(){var n,t,r;(t=e.value())&&d.value()&&9!==(n=o.event.which||o.event.keyCode)&&38!==n&&40!==n&&13!==n&&27!==n&&(r=s.value(),r.push(String.fromCharCode(n).toLowerCase()),s.value(r))},!0),u.register({listen:[h],fn:function(){var n,t;null!=(n=h.value())&&(t=T.node(),n!==(t===document.activeElement)&&setTimeout(function(){n?t.focus():t.blur()},0))}}),b=function(n,t){return g||M.value(!1),"function"==typeof E?E(n,t):void 0},p.forEach(function(n){var t;t=n.onSelect,n.onSelect=function(n,e){return g||M.value(!1),"function"==typeof t?t(n,e):void 0}}),x=l.append("div").attr("class","menu-cont").style("position","absolute").style("z-index",1e3),u.register({listen:[M,w],fn:function(){var n,t;t=M.value(),t?(x.style("display",null).style("top","100%"),n=w.value(),"left"===n?x.style("left",0).style("right",null):x.style("left",null).style("right",0)):x.style("display","none")}}),a.list({parent:x,classStr:"list",data:f,label:d,link:y,class:m,selection:N,selections:q,onSelect:b,onEnter:k,onLeave:S,icons:p}),_=u.namespace("dropdown"),o.select(window).on("click."+_,function(){var n,t;n=o.event.target,r.value()||$(x.node()).find(n).length||(l.node()===n||$(l.node()).find(n).length?(!M.value()||T.node().id!==(null!=(t=document.activeElement)?t.id:void 0))&&M.value(!M.value()):M.value(!1))},!0).on("blur."+_,function(){M.value(!1)}),u.register({name:"selection_updater",listen:[M,N,A,L],fn:function(){var n,t,e;if(M.value())return void T.property("value","");L?e=L.value():(n=N.value(),t=A.value(),e=t?t(n):""),T.property("value",null!=e?e:"")}}),{node:l.node(),menuCont:x.node(),open:M,focus:h,selection:N,selections:q}},a.dropdown=function(n){var t,e,r,l,s,f,h,p,v,g,d,y,m,w,x,M,b,_,k,S,E,C,N,A,q,L;if(S=n.parent,t=n.classStr,e=n.data,v=n.label,C=n.selectionLabel,g=n.link,d=n.class,h=n.id,E=n.selection,N=n.selections,k=n.onSelect,b=n.onEnter,_=n.onLeave,y=n.menuAnchor,A=n.title,f=n.icons,p=n.keepOnClick,r=n.disabled,n.highlight,s=n.focus,!S)throw new Error("must have parent");if(!e)throw new Error("must have data");return E=u.wrapVar(E,"selection"),N=u.wrapVar(N,"selections"),y=u.wrap(y||"left"),e=u.wrap(e),v=u.wrap(v||u.identity),C=u.wrap(C||v),g=u.wrap(g),r=u.wrap(null!=r&&r),s=u.wrapVar(s),u.register({listen:e,fn:function(){var n,t;n=e.value(),t=E.value(),(!n||c.call(n,t)<0)&&setTimeout(function(){return E.value(null)},0)}}),A&&(A=u.wrap(A)),f||(f=[]),w=u(!1),l=i({parent:S,self:"div",attr:{class:u.applyAlways({args:[t,w,r],fn:function(n,t,e){return[n||"",t?"open":"closed",e?"disabled":""].join(" ")}})},style:{position:"relative"}}).value(),L=i({parent:l,self:"div.title-cont",attr:{disabled:u.op.iff(r,"",null),tabIndex:0,id:h},on:{blur:function(){s.value(!1)}},text:A||u.applyAlways(E,v)}).value(),q=function(){var n,t,r,i,o;r=e.value(),o=E.value(),r&&-1!==(t=r.indexOf(o))&&(i=m.node(),0!==i.scrollHeight&&(n=m.selectAll("li")[0][t],i.scrollTop=0,i.scrollTop=$(n).position().top))},L.on("keydown",function(){var n,t,r,i;if((r=e.value())&&v.value()){if(9===(n=o.event.which||o.event.keyCode))return void w.value(!1);if(38===n||40===n)if(o.event.stopPropagation(),o.event.preventDefault(),w.value()||w.value(!0),i=E.value(),-1===(t=r.indexOf(i))){if(null!==i)throw"selection was not found in data";r.length&&E.value(r[0])}else 38===n?t--:t++,t+=r.length,t%=r.length,E.value(r[t]),q();13!==n&&27!==n||(o.event.stopPropagation(),o.event.preventDefault(),w.value(!1))}},!0).on("keypress",function(){var n,t,r,i,u,a,l;if((i=e.value())&&(a=v.value())&&(t=o.event.which||o.event.keyCode,(r=String.fromCharCode(t).toLowerCase())&&9!==t&&38!==t&&40!==t&&13!==t&&27!==t))for(u=0,l=i.length;u<l;u++)if((n=i[u])&&a(n).charAt(0).toLowerCase()===r){E.value(n),q();break}},!0),u.register({listen:[s],fn:function(){var n,t;null!=(n=s.value())&&(t=L.node(),n!==(t===document.activeElement)&&setTimeout(function(){n?t.focus():t.blur()},0))}}),x=function(n,t){return p||w.value(!1),"function"==typeof k?k(n,t):void 0},f.forEach(function(n){var t;t=n.onSelect,n.onSelect=function(n,e){return p||w.value(!1),"function"==typeof t?t(n,e):void 0}}),m=l.append("div").attr("class","menu-cont").style("position","absolute").style("z-index",1e3),u.register({listen:[w,y],fn:function(){var n,t;t=w.value(),t?(m.style("display",null).style("top","100%"),n=y.value(),"left"===n?m.style("left",0).style("right",null):m.style("left",null).style("right",0)):m.style("display","none")}}),a.list({parent:m,classStr:"list",data:e,label:v,link:g,class:d,selection:E,selections:N,onSelect:x,onEnter:b,onLeave:_,icons:f}),M=u.namespace("dropdown"),o.select(window).on("click."+M,function(){var n;n=o.event.target,r.value()||$(m.node()).find(n).length||(l.node()===n||$(l.node()).find(n).length?w.value(!w.value()):w.value(!1))},!0).on("blur."+M,function(){w.value(!1)}),u.register({name:"selection_updater",listen:[E,C,A],fn:function(){var n,t,e;A?e=A.value():(n=E.value(),t=C.value(),e=t?t(n):""),L.property("value",null!=e?e:"")}}),{node:l.node(),menuCont:m.node(),open:w,focus:s,selection:E,selections:N}},a.select=function(n){var t,e,o,a,l,c,s,f,h,p,v,g;if(s=n.parent,e=n.data,t=n.classStr,v=n.value,l=n.label,p=n.selection,a=n.id,c=n.onChange,o=n.focus,g=n.visible,!s)throw new Error("must have parent");if(!e)throw new Error("must have data");return p=u.wrapVar(p,"selection"),o=u.wrapVar(null!=o&&o),g=u.wrap(null==g||g),e=u.wrap(e),v||(v=l),v=u.wrap(v||String),f=function(){var n,t,r,i;if(r=e.value()){if(r=r.valueOf(),i=h.value(),n=i.property("value"),t=r[n],!1===("function"==typeof c?c(t):void 0))return;p.value(t)}else p.value(null)},h=i({parent:s,self:"select",attr:{id:a,class:t},style:{display:u.op.iff(g,null,"none")},on:{change:f,focus:function(){o.value(!0)},blur:function(){o.value(!1)}}}),r({parent:h,self:"option",data:e,attr:{value:function(n,t){return t}},text:v}),u.register({listen:[e,p],fn:function(){var n,t,r,i;t=e.value(),i=p.value(),t&&(t=t.valueOf(),n=t.indexOf(i),r=h.value(),r.property("value")!==n&&r.property("value",n))}}),u.register({listen:[h,o],fn:function(){var n,t;if(t=h.value(),n=o.value(),t&&null!=n)return t=t.node(),n===(t===document.activeElement)}}),f(),{node:h.value(),selection:p,focus:o}},u.compare=function(n,t){return n=u.wrap(n||u.identity),t=u.wrap(t||!1),u.apply({args:[n,t],fn:function(n,t){var e;return e=t?o.descending:o.ascending,function(t,r){return e(n(t),n(r))}}})},function(){var n,t,e;t=["up","down"],e=/\d+(?:\.\d+)?/,n=function(n){return null==n?null:e.test(n)?n+"px":n},a.table=function(n){var e,r,o,l,c,s,f,h,p,v,g,d,y,m,w,x,M,b,_,k,S,E,C;for(m=n.parent,v=n.headParent,p=n.data,M=n.sort,o=n.classStr,w=n.rowClass,x=n.rowLimit,l=n.columns,y=n.on,k=i({parent:m,self:"table",attr:{class:o}}),g=v?i({parent:v,self:"table",attr:{class:(null!=o?o:"")+" head"}}):k,M||(M={}),_=u.wrapVar(M.on),b=u.wrapVar(M.dir),u.wrapVar(null!=(C=M.onIndicator)?C:_),d=[],e=[],h={},f=[_,b],S=0,E=l.length;S<E;S++)r=l[S],r.sortable&&(c=null!=r.compare?u.wrap(r.compare):r.ignoreCase?u.compare(u.chain(r.value,function(n){return n?n.toLowerCase():n})):u.compare(r.value),h[r.id]=c,f.push(c),r.compareModes||(r.compareModes=t)),d.push({id:r.id,title:r.title,class:(r.class||"")+(r.sortable?" sortable":""),visible:r.visible,tooltip:r.headerTooltip,width:r.width}),e.push({id:r.id,class:r.class,visible:r.visible,value:r.value,hover:r.hover,render:r.render,on:r.on,width:r.width});return d.forEach(function(n){n.indicator=u.applyAlways([_,b],function(t,e){return t===n.id?e||"none":"none"})}),s=u(null),u.register({listen:f,change:[s],fn:function(){var n,t,e,r,i;i=_.value(),r=b.value(),null!=i?(n=null!=(e=h[i])?e.value():void 0,n&&"down"===r&&(t=n,n=function(n,e){return t(e,n)}),s.value(n)):s.value(null)}}),a.table.header({parent:g,columns:d,onClick:function(n){var t,e,i,o;for(t=null,i=0,o=l.length;i<o;i++)if(r=l[i],r.id===n){t=r;break}t&&t.sortable&&(e=t.compareModes,n===_.value()?(b.set(e[(e.indexOf(b.value())+1)%e.length]),u.notify(b)):(_.set(n),b.set(e[0]),u.notify(_,b)))}}),a.table.body({parent:k,classStr:"data",data:p,rowClass:w,rowLimit:x,columns:e,compare:s,on:y}),{node:k}},a.table.header=function(t){var e,r,i,o,a,l,c,s,f,h,p,v,g,d,y;if(h=t.parent,r=t.columns,f=t.onClick,!h)throw new Error("there needs to be a parent");for(f=u.wrap(f),v=u.valueOf(h).append("thead"),a=v.append("tr"),l=[f],s=[],g=0,d=r.length;g<d;g++)e=r[g],s.push(c={id:e.id,title:u.wrap(e.title),class:u.wrap(e.class),visible:u.wrap(null==(y=e.visible)||y),tooltip:u.wrap(e.tooltip),indicator:e.indicator?u.wrap(e.indicator):void 0,width:u.wrap(e.width)}),l.push(c.title,c.class,c.visible,c.tooltip,c.indicator,c.width);return r=s,p=a.selectAll("th").data(r),o=p.enter().append("th"),i=o.append("div").attr("class","liner"),i.append("span"),i.append("div").attr("class","indicator").style("display","none"),p.exit().remove(),u.register({name:"header_render",listen:l,fn:function(){var t,i,o,u,l,c,s;for(t=c=0,s=r.length;c<s;t=++c)e=r[t],p=a.select("th:nth-child("+(t+1)+")"),o=e.visible.hasChanged(),e.visible.value()?(p.datum(e),(e.class.hasChanged()||o)&&p.attr("class",e.class.value()),(e.tooltip.hasChanged()||o)&&p.attr("title",e.tooltip.value()),(e.width.hasChanged()||o)&&(u=n(e.width.value()),p.style("min-width",u).style("width",u).style("max-width",u)),o&&p.style("display",null),(f.hasChanged()||o)&&p.on("click",function(n){var t;return"function"==typeof(t=f.value())?t(n.id):void 0}),(e.title.hasChanged()||o)&&p.select("span").text(e.title.value()),e.indicator&&(e.indicator.hasChanged()||o)&&(l=e.indicator.value(),i=p.select("div.indicator"),l?i.style("display",null).attr("class","indicator "+l):i.style("display","none"))):o&&p.style("display","none")}}),{node:v}},a.table.body=function(t){var e,r,i,o,l,c,s,f,h,p,v,g,d,y,m,w,x,M,b,_,k,S,E,C;if(d=t.parent,c=t.data,l=t.compare,m=t.rowClass,i=t.classStr,w=t.rowLimit,o=t.columns,v=t.on,!d)throw new Error("there needs to be a parent");if(!c)throw new Error("there needs to be data");x=u.valueOf(d).append("tbody").attr("class",i),l=u.wrap(l),null!=m&&(m=u.wrap(m)),w=u.wrap(w),f=[c,l,m,w],r=[],g={};for(s in v)M=v[s],M=u.wrap(M),f.push(M),g[s]=M;for(v=g,p=[],b=0,k=o.length;b<k;b++){e=o[b],p.push(h={id:e.id,class:u.wrap(e.class),visible:u.wrap(null==(E=e.visible)||E),hover:u.wrap(e.hover),value:u.wrap(e.value),width:u.wrap(e.width)}),f.push(h.class,h.visible,h.hover,h.width),h.render=e.render||"text",h.on={},C=e.on;for(s in C)M=C[s],M=u.wrap(M),f.push(M),h.on[s]=M;r.push(h.selection=u().name(e.id+"_selection"))}for(o=p,u.register({name:"body_render",listen:f,change:r,fn:function(){var t,r,i,u,a,f,h,p,g,d,y,b,_;r=(c.value()||[]).valueOf(),p=l.value(),p&&(r=r.slice().sort(p)),_=w.value(),null!=_&&(r=r.slice(0,_)),u=x.selectAll("tr").data(r),u.enter().append("tr"),u.exit().remove(),m&&(b=m.value(),u.attr("class",b));for(s in v)M=v[s],u.on(s,M.value());for(t=u.selectAll("td").data(o),t.enter().append("td"),t.exit().remove(),i=g=0,d=o.length;g<d;i=++g)if(e=o[i],a=x.selectAll("td:nth-child("+(i+1)+")").data(r),f=e.visible.hasChanged()||c.hasChanged(),e.visible.value()){(e.class.hasChanged()||f)&&a.attr("class",e.class.value()),(e.hover.hasChanged()||f)&&a.attr("title",e.hover.value()),(e.width.hasChanged()||f)&&(h=n(e.width.value()),a.style("min-width",h).style("width",h).style("max-width",h)),f&&a.style("display",null),y=e.on;for(s in y)M=y[s],(M.hasChanged()||f)&&a.on(s,M.value());e.selection.set(a).notify()}else f&&a.style("display","none")}}),_=0,S=o.length;_<S;_++)e=o[_],y="function"==typeof e.render?e.render:a.table.render[e.render],y.call(e,e.selection,e.value);return{node:x}},a.table.render={text:function(n,t){u.register({listen:[n,t],fn:function(){var e,r;return e=n.value(),r=t.value(),null!=e&&r&&e.text(r),n}})},html:function(n,t){u.register({listen:[n,t],fn:function(){var e,r;return e=n.value(),r=t.value(),null!=e&&r&&e.html(r),n}})},aLink:function(n){var t;return t=n.href,function(n,e){return r({parent:n,self:"a.link",attr:{href:t},text:e})}},img:function(n,t){return r({parent:n,self:"img",attr:{src:t}})},imgDiv:function(n,t){return r({parent:n,self:"div",attr:{class:t}})},button:function(n){var t,e;return t=n.classStr,e=n.on,function(n,i){return r({parent:n,self:"button",attr:{class:t},on:e,text:i})}},sparkline:function(n){var t,e,i,a,l;return i=n.width,t=n.height,a=n.x,l=n.y,e=n.padding,null==e&&(e=0),function(n,c){var s,f,h;return f=u.apply({args:[a,l,e],fn:function(n,e,r){return function(u){var a,l;return a=o.scale.linear().domain(o.extent(u,function(t){return t[n]})).range([r,i-r]),l=o.scale.linear().domain(o.extent(u,function(n){return n[e]})).range([t-r,r]),o.svg.line().x(function(t){return a(t[n])}).y(function(n){return l(n[e])})(u)}}}),s=u.apply({args:c,fn:function(n){return function(t,e){return[n(t,e)]}}}),h=r({parent:n,self:"svg.sparkline",data:s,attr:{width:i,height:t}}),r({parent:h,self:"path",data:function(n){return[n]},attr:{d:f}})}}}}(),n.exports=a},function(n,t,e){var r,i,o;r=e(3),i=e(0),o={},o.mouse=function(n,t){var e,o,u;return n=i.wrap(n),u=i.wrap(u),e=i.wrap(e),t=i.wrapVar(t,"mouse"),o=function(){var e,i;i=n.value(),e=i&&r.event?r.mouse(i.node()):null,t.value(e)},n.value().on("mousemove",o).on("mouseout",o),i.register({name:"mouse_recorder",listen:n,change:t,fn:o}),t},o.delay=function(n,t){var e,r,o;return null==t&&(t=1),n=i.wrap(n),t=i.wrap(t),o=null,e=i(),r=function(){e.value(n.value()),o=null},i.register({listen:[n,t],change:[e],name:"timeout",fn:function(){var n;o&&clearTimeout(o),o=null,null!=t.value()&&(n=Math.max(0,t.value()),o=setTimeout(r,n))}}),e},n.exports=o},function(n,t,e){var r;r=e(0),n.exports=function(n){var t,e,i,o,u,a,l;if(e=n.data,t=n.acc,l=n.value,u=n.trim,i=n.name,!e)throw new Error("No data given");return t=r.wrap(t||r.identity),l=r.wrap(l),u=r.wrap(u||!1),i||(i="snaped_data"),o=r(null).name(i),a=function(){var n,i,a,c,s,f,h,p,v,g,d;if(c=e.value(),n=t.value(),v=l.value(),c&&n&&v){if(c=c.valueOf(),u.value()&&0!==c.length&&(v<n(c[0])||n(c[c.length-1])<v))p=-1;else if(p=-1,h=1/0,c)for(s=g=0,d=c.length;g<d;s=++g)i=c[s],(a=Math.abs(n(i)-v))<h&&(h=a,p=s);f=p<0?null:c[p],o.value()!==f&&o.set(f)}else o.set(null);return r.notify(o)},r.register({fn:a,listen:[e,t,l,u],change:[o],name:i+"_maker"}),o}},function(n,t,e){var r,i,o,u,a;o=e(0),a=e(1),r=a.bind,a.bindSingle,i=0,u={},u.clipPath=function(n){var t,e,u,a,l,c,s;return a=n.parent,c=n.x,s=n.y,l=n.width,e=n.height,c=o.wrap(c||0),s=o.wrap(s||0),i++,u="cp"+i,t=o.valueOf(a).append("defs").append("clipPath").attr("id",u),r({parent:t,self:"rect",attr:{x:c,y:s,width:l,height:e}}),"url(#"+u+")"},n.exports=u},function(n,t,e){"use strict";function r(n){var n=arguments[0];if("function"!=typeof n)throw new TypeError;return function(){var t,e=Array.prototype.slice.call(arguments),r=e.length;for(t=0;t<r;t++)if("function"==typeof e[t])return function(){var t,i,o=Array.prototype.slice.call(arguments),u=[];for(t=0;t<r;t++)i=e[t],u.push("function"==typeof i?i.apply(this,o):i);return n.apply(null,u)};return n.apply(null,e)}}n.exports=r},function(n,t){var e;e=function(){function n(n){this.key=n,this.nodes_=[]}return n.prototype.length=function(){return this.nodes_.length},n.prototype.push=function(n){var t;return t=this.nodes_,t.push(n),this.moveUp_(t.length-1),this},n.prototype.shift=function(){var n,t,e;if(t=this.nodes_,n=t.length,e=t[0],!(n<=0))return 1===n?t.pop():(t[0]=t.pop(),this.moveDown_(0)),e},n.prototype.moveDown_=function(n){var t,e,r,i,o,u,a;for(o=this.nodes_,e=this.key,t=o.length,i=o[n];n<t>>1&&(r=2*n+1,u=r+1,a=u<t&&o[u][e]<o[r][e]?u:r,!(o[a][e]>i[e]));)o[n]=o[a],n=a;o[n]=i},n.prototype.moveUp_=function(n){var t,e,r,i;for(r=this.nodes_,t=this.key,e=r[n];n>0&&(i=n-1>>1,r[i][t]>e[t]);)r[n]=r[i],n=i;r[n]=e},n}(),n.exports=e},function(n,t){var e;e=function(){function n(){this.map={},this.len=0}return n.prototype.valueOf=function(){return this.map},n.prototype.length=function(){return this.len},n.prototype.add=function(n){return this.map.hasOwnProperty(n.id)||(this.map[n.id]=n,this.len++),this},n.prototype.remove=function(n){return this.map.hasOwnProperty(n.id)&&(delete this.map[n.id],this.len--),this},n}(),n.exports=e},function(n,t,e){var r,i,o,u;o=e(0),o.d3=e(3),o.async=e(4),u=e(1),r=u.bind,i=u.bindSingle,o.bind=r,o.bindSingle=i,o.html=e(5),o.svg=e(8),o.snap=e(7),o.misc=e(6),o.util=e(2),n.exports=o}])});
//# sourceMappingURL=dvl.js.map