-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathbundle.js
7 lines (7 loc) · 208 KB
/
bundle.js
1
2
3
4
5
6
7
!function n(t,e,r){function i(u,a){if(!e[u]){if(!t[u]){var l="function"==typeof require&&require;if(!a&&l)return l(u,!0);if(o)return o(u,!0);var c=new Error("Cannot find module '"+u+"'");throw c.code="MODULE_NOT_FOUND",c}var s=e[u]={exports:{}};t[u][0].call(s.exports,function(n){var e=t[u][1][n];return i(e?e:n)},s,s.exports,n,t,e,r)}return e[u].exports}for(var o="function"==typeof require&&require,u=0;u<r.length;u++)i(r[u]);return i}({1:[function(n,t,e){"use strict";function r(n){var t=n.getContext("2d"),e=window.devicePixelRatio||1;return 1!==e&&(n.style.width=n.width+"px",n.style.height=n.height+"px",n.width*=e,n.height*=e,t.scale(e,e)),t}function i(n){var t=n.split("/");return{axis:t[0],steps:Number(t[1]),zval:Number(t[2]),from:new c(t[3]),to:new c(t[4])}}function o(n){var t={sq:210,scale:2,handleSize:15,axis:"hlc",colorspace:{dimensions:[["h","hue",0,360,0],["c","chroma",0,5,1],["l","lightness",0,1.7,.6]],axis:[["hlc","hue-lightness"],["clh","chroma-lightness"],["hcl","hue-chroma"]]},x:"h",y:"l",z:"c",steps:6,zval:1,from:new c("16534C"),to:new c("E2E062")},e=location.hash.slice(2)?i(location.hash.slice(2)):{};this.init(l(t,n,e))}function u(n,t){var e=s.format("05d");s.json("example-data/unemployment.json",function(r){var i=s.scale.quantile().domain(s.values(r)).range(s.range(t.length));s.json("example-data/us-counties.json",function(o){n.selectAll("path").data(o.features).enter().append("svg:path").attr("style",function(n){return"fill:"+t[i(r[e(n.id)])]+";"}).attr("d",d).append("svg:title").text(function(n){return n.properties.name+": "+r[e(n.id)]+"%"}),s.select("#visualization").classed("loading",!1)})})}var a=n("clipboard"),l=n("xtend"),c=n("./src/chroma").Color,s=n("d3");s.geo=n("d3-geo").geo,o.prototype={init:function(n){function t(n){return document.getElementById(n).getContext("2d")}function e(n){return r(document.getElementById(n))}function i(t,e){var r=[];r[n.dx]=t,r[n.dy]=e,"string"==typeof n.zval?r[n.dz]=parseFloat(n.zval):r[n.dz]=n.zval;var i=new c(r,"hcl");return i}function o(){var t,e,r,o,u,a,l=n.xdim,c=n.ydim,s=n.sq,f=y,p=f.createImageData(s,s);for(t=0;s>t;t++)for(e=0;s>e;e++)a=4*(t+e*p.width),r=l[2]+t/s*(l[3]-l[2]),o=c[2]+e/s*(c[3]-c[2]),u=i(r,o).rgb,isNaN(u[0])?(p.data[a]=255,p.data[a+1]=0,p.data[a+2]=0,p.data[a+3]=0):(p.data[a]=u[0],p.data[a+1]=u[1],p.data[a+2]=u[2],p.data[a+3]=255);f.putImageData(p,0,0),h()}function u(t){n.x=t[0],n.y=t[1],n.z=t[2];for(var e=0;e<n.colorspace.dimensions.length;e++){var r=n.colorspace.dimensions[e];r[0]===n.x?(n.dx=e,n.xdim=r):r[0]===n.y?(n.dy=e,n.ydim=r):r[0]===n.z&&(n.dz=e,n.zdim=r)}s.select("#slider").attr("min",n.zdim[2]).attr("max",n.zdim[3]).attr("step",n.zdim[3]>99?1:.01).attr("value",n.zval),s.select(".js-slider-title").text(n.zdim[1]),s.select(".js-slider-value").text(n.zval)}function a(n){u(n),o(),h()}function l(t){var e=t.hcl();return[e[n.dx],e[n.dy]]}function f(){n.from[0]=n.xdim[2]+(n.xdim[3]-n.xdim[2])*(23/36),n.from[1]=n.ydim[2]+.1*(n.ydim[3]-n.ydim[2]),n.to[0]=n.xdim[2]+(n.xdim[3]-n.xdim[2])*(8/36),n.to[1]=n.ydim[2]+.8*(n.ydim[3]-n.ydim[2])}function h(){var t,e,r,o,u,a,l,c=[],f=function(t,e){return Math.round((t-e[2])/(e[3]-e[2])*n.sq*n.scale)-.5},h=n.handleSize,d=Math.floor(.65*n.handleSize),y=f(n.from[0],n.xdim)+10,m=f(n.to[0],n.xdim)+10,x=f(n.from[1],n.ydim)+10,b=f(n.to[1],n.ydim)+10,w=M;w.clearRect(0,0,600,600),v||(s.select(".drag.from").style({left:y-h+"px",top:x-h+"px"}),s.select(".drag.to").style({left:m-h+"px",top:b-h+"px"})),w.beginPath(),w.strokeStyle="rgba(255,255,255,0.25)",w.moveTo(y,x),w.lineTo(m,b),w.stroke(),w.beginPath(),w.strokeStyle="#fff",t=i(n.from[0],n.from[1]).hex(),w.fillStyle=t,w.arc(y,x,h,0,2*Math.PI),w.fill(),w.closePath(),w.stroke(),w.beginPath(),e=i(n.to[0],n.to[1]).hex(),w.fillStyle=e,w.arc(m,b,h,0,2*Math.PI),w.fill(),w.closePath(),w.stroke(),c.push(t);for(var E=1;E<n.steps-1;E++)o=n.from[0]+E/(n.steps-1)*(n.to[0]-n.from[0]),u=n.from[1]+E/(n.steps-1)*(n.to[1]-n.from[1]),a=f(o,n.xdim[2])+10,l=f(u,n.ydim[2])+10,w.beginPath(),w.strokeStyle="rgba(255,255,255,0.25)",r=i(o,u).hex(),c.push(r),w.fillStyle=r,w.arc(a,l,d,0,2*Math.PI),w.fill(),w.closePath(),w.stroke();c.push(e),p(c),location.href="#/"+g()}function p(t){["#visual-output","#legend-output"].forEach(function(n){var e=s.select(n).selectAll("div.swatch").data(t);e.exit().remove(),e.enter().append("div").attr("class","swatch"),e.style("background",String)}),n.callback&&n.callback(t);var e=s.select("#code-output").selectAll("span.value").data(t);e.exit().remove(),e.enter().append("span").attr("class","value"),e.text(String)}function g(){return n.x+n.y+n.z+"/"+n.steps+"/"+n.zval+"/"+i(n.from[0],n.from[1]).hex().substr(1)+"/"+i(n.to[0],n.to[1]).hex().substr(1)}function d(){var t=s.select(".axis-select").selectAll("a").data(n.colorspace.axis);t.exit().remove(),t.enter().append("button").attr("class",function(n){return"axis-option col12 block button uppercase unround keyline-bottom "+n[0]}).attr("data-tooltip",function(n){return n[1]}).classed("active",function(t){return t[0]==n.axis}).text(function(n){return n[0][0]+"–"+n[0][1]}).on("click",function(n){v=!1,u(n[0]),f(),o(),h(),s.selectAll(".axis-option").classed("active",function(t){return t[0]==n[0]})})}var v=!1;u(n.axis),n.from=l(n.from),n.to=l(n.to),s.select("#sl-val").select("span").html(n.zval);var y=t("colorspace"),m=s.select("#slider");m.on("mousemove",function(){s.select(".js-slider-value").text(this.value),n.zval=this.value,o()}),s.select(".js-add").on("click",function(){n.steps=n.steps+1,h()}),s.select(".js-subtract").on("click",function(){1!==n.steps&&(n.steps=n.steps-1,h())});var M=e("grad"),x=s.behavior.drag().origin(Object).on("drag",function(){v=!0;var t=parseInt(s.select(this).style("left").split("px")[0],10),e=parseInt(s.select(this).style("top").split("px")[0],10);t=Math.max(0,Math.min(410,t+s.event.dx)),e=Math.max(0,Math.min(410,e+s.event.dy)),s.select(this).style({left:t+"px",top:e+"px"});var r=s.select(this).classed("from"),i=t+n.handleSize-10,o=e+n.handleSize-10,u=i/(n.sq*n.scale)*(n.xdim[3]-n.xdim[2])+n.xdim[2],a=o/(n.sq*n.scale)*(n.ydim[3]-n.ydim[2])+n.ydim[2];u=Math.min(n.xdim[3],Math.max(n.xdim[2],u)),a=Math.min(n.ydim[3],Math.max(n.ydim[2],a)),r?n.from=[u,a]:n.to=[u,a],h()});s.select(".drag.to").call(x),s.select(".drag.from").call(x),a(n.axis),d(),h()}};var f=s.selectAll(".js-mode"),h=s.select("#visualization"),p=s.select("#picker"),g=s.select(".js-select"),d=s.geo.path().projection(s.geo.albersUsa().scale(960).translate([480,265])),v=h.append("svg:svg").attr("width",960).attr("height",500),y=v.append("svg:g").attr("id","counties"),m=[],M=s.select("#select");a=new a("#select"),a.on("success",function(){M.text("Copied!"),window.setTimeout(function(){M.text("Copy").append("span").attr("class","sprite icon clipboard")},1e3)}),new o({callback:function(n){m=n,g.attr("data-clipboard-text",n)}}),f.on("click",function(){var n=s.select(this);f.classed("active",!1),n.classed("active",!0),"picker"===n.attr("href").split("#")[1]?(h.classed("hidden",!0),p.classed("hidden",!1),y.selectAll("path").remove()):(p.classed("hidden",!0),h.classed("hidden",!1).classed("loading",!0),u(y,m))})},{"./src/chroma":14,clipboard:3,d3:6,"d3-geo":5,xtend:13}],2:[function(n,t,e){!function(r,i){if("function"==typeof define&&define.amd)define(["module","select"],i);else if("undefined"!=typeof e)i(t,n("select"));else{var o={exports:{}};i(o,r.select),r.clipboardAction=o.exports}}(this,function(n,t){"use strict";function e(n){return n&&n.__esModule?n:{"default":n}}function r(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}var i=e(t),o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol?"symbol":typeof n},u=function(){function n(n,t){for(var e=0;e<t.length;e++){var r=t[e];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(n,r.key,r)}}return function(t,e,r){return e&&n(t.prototype,e),r&&n(t,r),t}}(),a=function(){function n(t){r(this,n),this.resolveOptions(t),this.initSelection()}return n.prototype.resolveOptions=function(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action=n.action,this.emitter=n.emitter,this.target=n.target,this.text=n.text,this.trigger=n.trigger,this.selectedText=""},n.prototype.initSelection=function(){this.text?this.selectFake():this.target&&this.selectTarget()},n.prototype.selectFake=function(){var n=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandler=document.body.addEventListener("click",function(){return n.removeFake()}),this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="fixed",this.fakeElem.style[t?"right":"left"]="-9999px",this.fakeElem.style.top=(window.pageYOffset||document.documentElement.scrollTop)+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,i["default"])(this.fakeElem),this.copyText()},n.prototype.removeFake=function(){this.fakeHandler&&(document.body.removeEventListener("click"),this.fakeHandler=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)},n.prototype.selectTarget=function(){this.selectedText=(0,i["default"])(this.target),this.copyText()},n.prototype.copyText=function(){var n=void 0;try{n=document.execCommand(this.action)}catch(t){n=!1}this.handleResult(n)},n.prototype.handleResult=function(n){n?this.emitter.emit("success",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)}):this.emitter.emit("error",{action:this.action,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})},n.prototype.clearSelection=function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()},n.prototype.destroy=function(){this.removeFake()},u(n,[{key:"action",set:function(){var n=arguments.length<=0||void 0===arguments[0]?"copy":arguments[0];if(this._action=n,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(n){if(void 0!==n){if(!n||"object"!==("undefined"==typeof n?"undefined":o(n))||1!==n.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&n.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(n.hasAttribute("readonly")||n.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=n}},get:function(){return this._target}}]),n}();n.exports=a})},{select:11}],3:[function(n,t,e){!function(r,i){if("function"==typeof define&&define.amd)define(["module","./clipboard-action","tiny-emitter","good-listener"],i);else if("undefined"!=typeof e)i(t,n("./clipboard-action"),n("tiny-emitter"),n("good-listener"));else{var o={exports:{}};i(o,r.clipboardAction,r.tinyEmitter,r.goodListener),r.clipboard=o.exports}}(this,function(n,t,e,r){"use strict";function i(n){return n&&n.__esModule?n:{"default":n}}function o(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}function u(n,t){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?n:t}function a(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(n,t):n.__proto__=t)}function l(n,t){var e="data-clipboard-"+n;if(t.hasAttribute(e))return t.getAttribute(e)}var c=i(t),s=i(e),f=i(r),h=function(n){function t(e,r){o(this,t);var i=u(this,n.call(this));return i.resolveOptions(r),i.listenClick(e),i}return a(t,n),t.prototype.resolveOptions=function(){var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0];this.action="function"==typeof n.action?n.action:this.defaultAction,this.target="function"==typeof n.target?n.target:this.defaultTarget,this.text="function"==typeof n.text?n.text:this.defaultText},t.prototype.listenClick=function(n){var t=this;this.listener=(0,f["default"])(n,"click",function(n){return t.onClick(n)})},t.prototype.onClick=function(n){var t=n.delegateTarget||n.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new c["default"]({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:this})},t.prototype.defaultAction=function(n){return l("action",n)},t.prototype.defaultTarget=function(n){var t=l("target",n);return t?document.querySelector(t):void 0},t.prototype.defaultText=function(n){return l("text",n)},t.prototype.destroy=function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)},t}(s["default"]);n.exports=h})},{"./clipboard-action":2,"good-listener":9,"tiny-emitter":12}],4:[function(n,t,e){var r=n("matches-selector");t.exports=function(n,t,e){for(var i=e?n:n.parentNode;i&&i!==document;){if(r(i,t))return i;i=i.parentNode}}},{"matches-selector":10}],5:[function(n,t,e){!function(){!function(){function n(){}function e(){}function r(n,t,e){var r=e.s=n+t,i=r-n,o=r-i;e.t=n-o+(t-i)}function i(n){return n>0?1:0>n?-1:0}function o(n,t,e){return(t[0]-n[0])*(e[1]-n[1])-(t[1]-n[1])*(e[0]-n[0])}function u(n){return n>1?0:-1>n?Tn:Math.acos(n)}function a(n){return n>1?jn:-1>n?-jn:Math.asin(n)}function l(n){return(n=Math.sin(n/2))*n}function c(n,t){n&&Fn.hasOwnProperty(n.type)&&Fn[n.type](n,t)}function s(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 f(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)s(n[e],t,1);t.polygonEnd()}function h(){function n(n,t){n*=Dn,t=t*Dn/2+Tn/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);Hn.add(Math.atan2(h,f)),r=n,i=l,o=c}var t,e,r,i,o;Yn.point=function(u,a){Yn.point=n,r=(t=u)*Dn,i=Math.cos(a=(e=a)*Dn/2+Tn/4),o=Math.sin(a)},Yn.lineEnd=function(){n(t,e)}}function p(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 g(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]}function d(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 v(n,t){n[0]+=t[0],n[1]+=t[1],n[2]+=t[2]}function y(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function m(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 M(n){return[Math.atan2(n[1],n[0]),a(n[2])]}function x(n,t){return Vn(n[0]-t[0])<Pn&&Vn(n[1]-t[1])<Pn}function b(n,t){n*=Dn;var e=Math.cos(t*=Dn);w(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function w(n,t,e){++Zn,Bn+=(n-Bn)/Zn,$n+=(t-$n)/Zn,Wn+=(e-Wn)/Zn}function E(){function n(n,i){n*=Dn;var o=Math.cos(i*=Dn),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);Xn+=c,Gn+=c*(t+(t=u)),Jn+=c*(e+(e=a)),Kn+=c*(r+(r=l)),w(t,e,r)}var t,e,r;et.point=function(i,o){i*=Dn;var u=Math.cos(o*=Dn);t=u*Math.cos(i),e=u*Math.sin(i),r=Math.sin(o),et.point=n,w(t,e,r)}}function _(){et.point=b}function S(){function n(n,t){n*=Dn;var e=Math.cos(t*=Dn),a=e*Math.cos(n),l=e*Math.sin(n),c=Math.sin(t),s=i*c-o*l,f=o*a-r*c,h=r*l-i*a,p=Math.sqrt(s*s+f*f+h*h),g=r*a+i*l+o*c,d=p&&-u(g)/p,v=Math.atan2(p,g);Qn+=d*s,nt+=d*f,tt+=d*h,Xn+=v,Gn+=v*(r+(r=a)),Jn+=v*(i+(i=l)),Kn+=v*(o+(o=c)),w(r,i,o)}var t,e,r,i,o;et.point=function(u,a){t=u,e=a,et.point=n,u*=Dn;var l=Math.cos(a*=Dn);r=l*Math.cos(u),i=l*Math.sin(u),o=Math.sin(a),w(r,i,o)},et.lineEnd=function(){n(t,e),et.lineEnd=_,et.point=b}}function N(n){return n}function k(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function A(){return!0}function C(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(x(e,r)){i.lineStart();for(var a=0;t>a;++a)i.point((e=n[a])[0],e[1]);return void i.lineEnd()}var l=new q(e,n,null,!0),c=new q(e,null,l,!1);l.o=c,o.push(l),u.push(c),l=new q(r,n,null,!1),c=new q(r,null,l,!0),l.o=c,o.push(l),u.push(c)}}),u.sort(t),z(o),z(u),o.length){for(var a=0,l=e,c=u.length;c>a;++a)u[a].e=l=!l;for(var s,f,h=o[0];;){for(var p=h,g=!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(g)for(var a=0,c=s.length;c>a;++a)i.point((f=s[a])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){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,g=!g}while(!p.v);i.lineEnd()}}}function z(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 q(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 T(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);v.point(e[0],e[1])}function l(){m.point=a,v.lineStart()}function c(){m.point=u,v.lineEnd()}function s(n,t){d.push([n,t]);var e=i(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),d=[]}function h(){s(d[0][0],d[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(d.pop(),g.push(d),d=null,r){if(1&t){n=e[0];var i,r=n.length-1,u=-1;for(o.lineStart();++u<r;)o.point((i=n[u])[0],i[1]);return void o.lineEnd()}r>1&&2&t&&e.push(e.pop().concat(e.shift())),p.push(e.filter(L))}}var p,g,d,v=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=[],g=[],o.polygonStart()},polygonEnd:function(){m.point=u,m.lineStart=l,m.lineEnd=c,p=zn.merge(p);var n=R(y,g);p.length?C(p,P,n,e,o):n&&(o.lineStart(),e(null,null,1,o),o.lineEnd()),o.polygonEnd(),p=g=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}},M=j(),x=t(M);return m}}function L(n){return n.length>1}function j(){var t,e=[];return{lineStart:function(){e.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:n,buffer:function(){var n=e;return e=[],t=null,n},rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))}}}function P(n,t){return((n=n.x)[0]<0?n[1]-jn-Pn:jn-n[1])-((t=t.x)[0]<0?t[1]-jn-Pn:jn-t[1])}function R(n,t){var e=n[0],r=n[1],i=[Math.sin(e),-Math.cos(e),0],o=0,u=0;Hn.reset();for(var l=0,c=t.length;c>l;++l){var s=t[l],f=s.length;if(f)for(var h=s[0],g=h[0],v=h[1]/2+Tn/4,y=Math.sin(v),M=Math.cos(v),x=1;;){x===f&&(x=0),n=s[x];var b=n[0],w=n[1]/2+Tn/4,E=Math.sin(w),_=Math.cos(w),S=b-g,N=S>=0?1:-1,k=N*S,A=k>Tn,C=y*E;if(Hn.add(Math.atan2(C*N*Math.sin(k),M*_+C*Math.cos(k))),o+=A?S+N*Ln:S,A^g>=e^b>=e){var z=d(p(h),p(n));m(z);var q=d(i,z);m(q);var T=(A^S>=0?-1:1)*a(q[2]);(r>T||r===T&&(z[0]||z[1]))&&(u+=A^S>=0?1:-1)}if(!x++)break;g=b,y=E,M=_,h=n}}return(-Pn>o||Pn>o&&0>Hn)^1&u}function D(n){var t,e=NaN,r=NaN,i=NaN;return{lineStart:function(){n.lineStart(),t=1},point:function(o,u){var a=o>0?Tn:-Tn,l=Vn(o-e);Vn(l-Tn)<Pn?(n.point(e,r=(r+u)/2>0?jn:-jn),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(o,r),t=0):i!==a&&l>=Tn&&(Vn(e-i)<Pn&&(e-=i*Pn),Vn(o-a)<Pn&&(o-=a*Pn),r=O(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 O(n,t,e,r){var i,o,u=Math.sin(n-e);return Vn(u)>Pn?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 U(n,t,e,r){var i;if(null==n)i=e*jn,r.point(-Tn,i),r.point(0,i),r.point(Tn,i),r.point(Tn,0),r.point(Tn,-i),r.point(0,-i),r.point(-Tn,-i),r.point(-Tn,0),r.point(-Tn,i);else if(Vn(n[0]-t[0])>Pn){var o=n[0]<t[0]?Tn:-Tn;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}function F(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,g=[f,h],d=t(f,h),v=u?d?0:i(f,h):d?i(f+(0>f?Tn:-Tn),h):0;if(!e&&(c=l=d)&&n.lineStart(),d!==l&&(p=r(e,g),(x(e,p)||x(g,p))&&(g[0]+=Pn,g[1]+=Pn,d=t(g[0],g[1]))),d!==l)s=0,d?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&u^d){var y;v&o||!(y=r(g,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])))}!d||e&&x(e,g)||n.point(g[0],g[1]),e=g,l=d,o=v},lineEnd:function(){l&&n.lineEnd(),e=null},clean:function(){return s|(c&&l)<<1}}}function r(n,t,e){var r=p(n),i=p(t),u=[1,0,0],a=d(r,i),l=g(a,a),c=a[0],s=l-c*c;if(!s)return!e&&n;var f=o*l/s,h=-o*c/s,m=d(u,a),x=y(u,f),b=y(a,h);v(x,b);var w=m,E=g(x,w),_=g(w,w),S=E*E-_*(g(x,x)-1);if(!(0>S)){var N=Math.sqrt(S),k=y(w,(-E-N)/_);if(v(k,x),k=M(k),!e)return k;var A,C=n[0],z=t[0],q=n[1],T=t[1];C>z&&(A=C,C=z,z=A);var L=z-C,j=Vn(L-Tn)<Pn,P=j||Pn>L;if(!j&&q>T&&(A=q,q=T,T=A),P?j?q+T>0^k[1]<(Vn(k[0]-C)<Pn?q:T):q<=k[1]&&k[1]<=T:L>Tn^(C<=k[0]&&k[0]<=z)){var R=y(w,(-E+N)/_);return v(R,x),[k,M(R)]}}}function i(t,e){var r=u?n:Tn-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var o=Math.cos(n),u=o>0,a=Vn(o)>Pn,l=dn(n,6*Dn);return T(t,e,l,u?[0,-n]:[-Tn,n-Tn])}function I(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,g=s-l,d=f-c;if(o=n-l,g||!(o>0)){if(o/=g,0>g){if(h>o)return;p>o&&(p=o)}else if(g>0){if(o>p)return;o>h&&(h=o)}if(o=e-l,g||!(0>o)){if(o/=g,0>g){if(o>p)return;o>h&&(h=o)}else if(g>0){if(h>o)return;p>o&&(p=o)}if(o=t-c,d||!(o>0)){if(o/=d,0>d){if(h>o)return;p>o&&(p=o)}else if(d>0){if(o>p)return;o>h&&(h=o)}if(o=r-c,d||!(0>o)){if(o/=d,0>d){if(o>p)return;o>h&&(h=o)}else if(d>0){if(h>o)return;p>o&&(p=o)}return h>0&&(i.a={x:l+h*g,y:c+h*d}),1>p&&(i.b={x:l+p*g,y:c+p*d}),i}}}}}}function H(n,t,e,r){function i(r,i){return Vn(r[0]-n)<Pn?i>0?0:3:Vn(r[0]-e)<Pn?i>0?2:1:Vn(r[1]-t)<Pn?i>0?1:0:i>0?3:2}function u(n,t){return a(n.x,t.x)}function a(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(l){function c(n){for(var t=0,e=y.length,r=n[1],i=0;e>i;++i)for(var u,a=1,l=y[i],c=l.length,s=l[0];c>a;++a)u=l[a],s[1]<=r?u[1]>r&&o(s,u,n)>0&&++t:u[1]<=r&&o(s,u,n)<0&&--t,s=u;return 0!==t}function s(o,u,l,c){var s=0,f=0;if(null==o||(s=i(o,l))!==(f=i(u,l))||a(o,u)<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(u[0],u[1])}function f(i,o){return i>=n&&e>=i&&o>=t&&r>=o}function h(n,t){f(n,t)&&l.point(n,t)}function p(){q.point=d,y&&y.push(m=[]),S=!0,_=!1,w=E=NaN}function g(){v&&(d(M,x),b&&_&&A.rejoin(),v.push(A.buffer())),q.point=h,_&&l.lineEnd()}function d(n,t){n=Math.max(-it,Math.min(it,n)),t=Math.max(-it,Math.min(it,t));var e=f(n,t);if(y&&m.push([n,t]),S)M=n,x=t,b=e,S=!1,e&&(l.lineStart(),l.point(n,t));else if(e&&_)l.point(n,t);else{var r={a:{x:w,y:E},b:{x:n,y:t}};z(r)?(_||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),e||l.lineEnd(),N=!1):e&&(l.lineStart(),l.point(n,t),N=!1)}w=n,E=t,_=e}var v,y,m,M,x,b,w,E,_,S,N,k=l,A=j(),z=I(n,t,e,r),q={point:h,lineStart:p,lineEnd:g,polygonStart:function(){l=A,v=[],y=[],N=!0},polygonEnd:function(){l=k,v=zn.merge(v);var t=c([n,r]),e=N&&t,i=v.length;(e||i)&&(l.polygonStart(),e&&(l.lineStart(),s(null,null,1,l),l.lineEnd()),i&&C(v,u,t,s,l),l.polygonEnd()),v=y=m=null}};return q}}function Y(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),e&&n.invert(e[0],e[1])}),e}function V(n){var t=0,e=Tn/3,r=an(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Tn/180,e=n[1]*Tn/180):[t/Tn*180,e/Tn*180]},i}function Z(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,a((o-(n*n+e*e)*i*i)/(2*i))]},e}function X(){function n(n,t){ut+=i*n-r*t,r=n,i=t}var t,e,r,i;ft.point=function(o,u){ft.point=n,t=r=o,e=i=u},ft.lineEnd=function(){n(t,e)}}function B(n,t){at>n&&(at=n),n>ct&&(ct=n),lt>t&&(lt=t),t>st&&(st=t)}function $(){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=W(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=W(n),a},result:function(){if(u.length){var n=u.join("");return u=[],n}}};return a}function W(n){return"m0,"+n+"a"+n+","+n+" 0 1,1 0,"+-2*n+"a"+n+","+n+" 0 1,1 0,"+2*n+"z"}function G(n,t){Bn+=n,$n+=t,++Wn}function J(){function n(n,r){var i=n-t,o=r-e,u=Math.sqrt(i*i+o*o);Gn+=u*(t+n)/2,Jn+=u*(e+r)/2,Kn+=u,G(t=n,e=r)}var t,e;pt.point=function(r,i){pt.point=n,G(t=r,e=i)}}function K(){pt.point=G}function Q(){function n(n,t){var e=n-r,o=t-i,u=Math.sqrt(e*e+o*o);Gn+=u*(r+n)/2,Jn+=u*(i+t)/2,Kn+=u,u=i*n-r*t,Qn+=u*(r+n),nt+=u*(i+t),tt+=3*u,G(r=n,i=t)}var t,e,r,i;pt.point=function(o,u){pt.point=n,G(t=r=o,e=i=u)},pt.lineEnd=function(){n(t,e)}}function nn(t){function e(n,e){t.moveTo(n,e),t.arc(n,e,a,0,Ln)}function r(n,e){t.moveTo(n,e),l.point=i}function i(n,e){t.lineTo(n,e)}function o(){l.point=e}function u(){t.closePath()}var a=4.5,l={point:e,lineStart:function(){l.point=r},lineEnd:o,polygonStart:function(){l.lineEnd=u},polygonEnd:function(){l.lineEnd=o,l.point=e},pointRadius:function(n){return a=n,l},result:n};return l}function tn(n){function t(n){return(a?r:e)(n)}function e(t){return on(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(){x=NaN,S.point=o,t.lineStart()}function o(e,r){var o=p([e,r]),u=n(e,r);i(x,b,M,w,E,_,x=u[0],b=u[1],M=e,w=o[0],E=o[1],_=o[2],a,t),t.point(x,b)}function u(){S.point=e,t.lineEnd()}function l(){r(),S.point=c,S.lineEnd=s}function c(n,t){o(f=n,h=t),g=x,d=b,v=w,y=E,m=_,S.point=o}function s(){i(x,b,M,w,E,_,g,d,f,v,y,m,a,t),S.lineEnd=u,u()}var f,h,g,d,v,y,m,M,x,b,w,E,_,S={point:e,lineStart:r,lineEnd:u,polygonStart:function(){t.polygonStart(),S.lineStart=l},polygonEnd:function(){t.polygonEnd(),S.lineStart=r}};return S}function i(t,e,r,a,l,c,s,f,h,p,g,d,v,y){var m=s-t,M=f-e,x=m*m+M*M;if(x>4*o&&v--){var b=a+p,w=l+g,E=c+d,_=Math.sqrt(b*b+w*w+E*E),S=Math.asin(E/=_),N=Vn(Vn(E)-1)<Pn||Vn(r-h)<Pn?(r+h)/2:Math.atan2(w,b),k=n(N,S),A=k[0],C=k[1],z=A-t,q=C-e,T=M*z-m*q;(T*T/x>o||Vn((m*z+M*q)/x-.5)>.3||u>a*p+l*g+c*d)&&(i(t,e,r,a,l,c,A,C,N,b/=_,w/=_,E,v,y),y.point(A,C),i(A,C,N,b,w,E,s,f,h,p,g,d,v,y))}}var o=.5,u=Math.cos(30*Dn),a=16;return t.precision=function(n){return arguments.length?(a=(o=n*n)>0&&16,t):Math.sqrt(o)},t}function en(n){var t=tn(function(t,e){return n([t*On,e*On])});return function(n){return ln(t(n))}}function rn(n){this.stream=n}function on(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 un(n){return an(function(){return n})()}function an(n){function t(n){return n=a(n[0]*Dn,n[1]*Dn),[n[0]*h+l,c-n[1]*h]}function e(n){return n=a.invert((n[0]-l)/h,(c-n[1])/h),n&&[n[0]*On,n[1]*On]}function r(){a=Y(u=fn(y,m,M),o);var n=o(d,v);return l=p-n[0]*h,c=g+n[1]*h,i()}function i(){return s&&(s.valid=!1,s=null),t}var o,u,a,l,c,s,f=tn(function(n,t){return n=o(n,t),[n[0]*h+l,c-n[1]*h]}),h=150,p=480,g=250,d=0,v=0,y=0,m=0,M=0,x=rt,b=N,w=null,E=null;return t.stream=function(n){return s&&(s.valid=!1),s=ln(x(u,f(b(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(x=null==n?(w=n,rt):F((w=+n)*Dn),i()):w},t.clipExtent=function(n){return arguments.length?(E=n,b=n?H(n[0][0],n[0][1],n[1][0],n[1][1]):N,i()):E},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(d=n[0]%360*Dn,v=n[1]%360*Dn,r()):[d*On,v*On]},t.rotate=function(n){return arguments.length?(y=n[0]%360*Dn,m=n[1]%360*Dn,M=n.length>2?n[2]%360*Dn:0,r()):[y*On,m*On,M*On]},zn.rebind(t,f,"precision"),function(){return o=n.apply(this,arguments),t.invert=o.invert&&e,r()}}function ln(n){return on(n,function(t,e){n.point(t*Dn,e*Dn)})}function cn(n,t){return[n,t]}function sn(n,t){return[n>Tn?n-Ln:-Tn>n?n+Ln:n,t]}function fn(n,t,e){return n?t||e?Y(pn(n),gn(t,e)):pn(n):t||e?gn(t,e):sn}function hn(n){return function(t,e){return t+=n,[t>Tn?t-Ln:-Tn>t?t+Ln:t,e]}}function pn(n){var t=hn(n);return t.invert=hn(-n),t}function gn(n,t){function e(n,t){var e=Math.cos(t),l=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),f=s*r+l*i;return[Math.atan2(c*o-f*u,l*r-s*i),a(f*o+c*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),l=Math.cos(n)*e,c=Math.sin(n)*e,s=Math.sin(t),f=s*o-c*u;return[Math.atan2(c*o+s*u,l*r+f*i),a(f*r-l*i)]},e}function dn(n,t){var e=Math.cos(n),r=Math.sin(n);return function(i,o,u,a){var l=u*t;null!=i?(i=vn(e,i),o=vn(e,o),(u>0?o>i:i>o)&&(i+=u*Ln)):(i=n+u*Ln,o=n-.5*l);for(var c,s=i;u>0?s>o:o>s;s-=l)a.point((c=M([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function vn(n,t){var e=p(t);e[0]-=n,m(e);var r=u(-e[1]);return((-e[2]<0?-r:r)+2*Math.PI-Pn)%(2*Math.PI)}function yn(n){for(var t=1;n*t%1;)t*=10;return t}function mn(n,t,e){var r=zn.range(n,t-Pn,e).concat(t);return function(n){return r.map(function(t){return[n,t]})}}function Mn(n,t,e){var r=zn.range(n,t-Pn,e).concat(t);return function(n){return r.map(function(t){return[t,n]})}}function xn(n){return n.source}function bn(n){return n.target}function wn(n,t,e,r){var i=Math.cos(t),o=Math.sin(t),u=Math.cos(r),a=Math.sin(r),c=i*Math.cos(n),s=i*Math.sin(n),f=u*Math.cos(e),h=u*Math.sin(e),p=2*Math.asin(Math.sqrt(l(r-t)+i*u*l(e-n))),g=1/Math.sin(p),d=p?function(n){var t=Math.sin(n*=p)*g,e=Math.sin(p-n)*g,r=e*c+t*f,i=e*s+t*h,u=e*o+t*a;return[Math.atan2(i,r)*On,Math.atan2(u,Math.sqrt(r*r+i*i))*On]}:function(){return[n*On,t*On]};return d.distance=p,d}function En(){function t(n,t){var o=Math.sin(t*=Dn),u=Math.cos(t),a=Vn((n*=Dn)-e),l=Math.cos(a);gt+=Math.atan2(Math.sqrt((a=u*Math.sin(a))*a+(a=i*o-r*u*l)*a),r*o+i*u*l),e=n,r=o,i=u}var e,r,i;dt.point=function(n,o){e=n*Dn,r=Math.sin(o*=Dn),i=Math.cos(o),dt.point=t},dt.lineEnd=function(){dt.point=dt.lineEnd=n}}function _n(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 Sn(n,t){function e(n,t){a>0?-jn+Pn>t&&(t=-jn+Pn):t>jn-Pn&&(t=jn-Pn);var e=a/Math.pow(o(t),u);return[e*Math.sin(u*n),a-e*Math.cos(u*n)]}var r=Math.cos(n),o=function(n){return Math.tan(Tn/4+n/2)},u=n===t?Math.sin(n):Math.log(r/Math.cos(t))/Math.log(o(t)/o(n)),a=r*Math.pow(o(n),u)/u;return u?(e.invert=function(n,t){var e=a-t,r=i(u)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/u,2*Math.atan(Math.pow(a/r,1/u))-jn]},e):kn}function Nn(n,t){function e(n,t){var e=u-t;return[e*Math.sin(o*n),u-e*Math.cos(o*n)]}var r=Math.cos(n),o=n===t?Math.sin(n):(r-Math.cos(t))/(t-n),u=r/o+n;return Vn(o)<Pn?cn:(e.invert=function(n,t){var e=u-t;return[Math.atan2(n,e)/o,u-i(o)*Math.sqrt(n*n+e*e)]},e)}function kn(n,t){return[n,Math.log(Math.tan(Tn/4+t/2))]}function An(n){var t,e=un(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=Tn*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 Cn(n,t){return[Math.log(Math.tan(Tn/4+t/2)),-n]}var zn={version:"3.4.4"};zn.geo={},e.prototype={s:0,t:0,add:function(n){r(n,this.t,qn),r(qn.s,this.s,this),this.s?this.t+=qn.t:this.s=qn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var qn=new e,Tn=Math.PI,Ln=2*Tn,jn=Tn/2,Pn=1e-6,Rn=Pn*Pn,Dn=Tn/180,On=180/Tn;zn.geo.stream=function(n,t){n&&Un.hasOwnProperty(n.type)?Un[n.type](n,t):c(n,t)};var Un={Feature:function(n,t){c(n.geometry,t)},FeatureCollection:function(n,t){for(var e=n.features,r=-1,i=e.length;++r<i;)c(e[r].geometry,t)}},Fn={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){s(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)s(e[r],t,0)},Polygon:function(n,t){f(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)f(e[r],t)},GeometryCollection:function(n,t){for(var e=n.geometries,r=-1,i=e.length;++r<i;)c(e[r],t)}};zn.geo.area=function(n){return In=0,zn.geo.stream(n,Yn),In};var In,Hn=new e,Yn={sphere:function(){In+=4*Tn},point:n,lineStart:n,lineEnd:n,polygonStart:function(){Hn.reset(),Yn.lineStart=h},polygonEnd:function(){var t=2*Hn;In+=0>t?4*Tn+t:t,Yn.lineStart=Yn.lineEnd=Yn.point=n}},Vn=Math.abs;zn.geo.bounds=function(){function n(n,t){E.push(_=[s=n,h=n]),f>t&&(f=t),t>g&&(g=t)}function t(t,e){var r=p([t*Dn,e*Dn]);if(b){var i=d(b,r),o=[i[1],-i[0],0],u=d(o,i);m(u),u=M(u);var l=t-v,c=l>0?1:-1,y=u[0]*On*c,x=Vn(l)>180;if(x^(y>c*v&&c*t>y)){var w=u[1]*On;w>g&&(g=w)}else if(y=(y+360)%360-180,x^(y>c*v&&c*t>y)){var w=-u[1]*On;f>w&&(f=w)}else f>e&&(f=e),e>g&&(g=e);x?v>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(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);b=r,v=t}function e(){S.point=t}function r(){_[0]=s,_[1]=h,S.point=n,b=null}function i(n,e){if(b){var r=n-v;w+=Vn(r)>180?r+(r>0?360:-360):r}else y=n,x=e;Yn.point(n,e),t(n,e)}function o(){Yn.lineStart()}function u(){i(y,x),Yn.lineEnd(),Vn(w)>Pn&&(s=-(h=180)),_[0]=s,_[1]=h,b=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,g,v,y,x,b,w,E,_,S={point:n,lineStart:e,lineEnd:r,polygonStart:function(){S.point=i,S.lineStart=o,S.lineEnd=u,w=0,Yn.polygonStart()},polygonEnd:function(){Yn.polygonEnd(),S.point=n,S.lineStart=e,S.lineEnd=r,0>Hn?(s=-(h=180),f=-(g=90)):w>Pn?g=90:-Pn>w&&(f=-90),_[0]=s,_[1]=h}};return function(n){g=h=-(s=f=1/0),E=[],zn.geo.stream(n,S);var t=E.length;if(t){E.sort(l);for(var e,r=1,i=E[0],o=[i];t>r;++r)e=E[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,p=-(1/0),t=o.length-1,r=0,i=o[t];t>=r;i=e,++r)e=o[r],(u=a(i[1],e[0]))>p&&(p=u,s=e[0],h=i[1])}return E=_=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,g]]}}(),zn.geo.centroid=function(n){Zn=Xn=Bn=$n=Wn=Gn=Jn=Kn=Qn=nt=tt=0,zn.geo.stream(n,et);var t=Qn,e=nt,r=tt,i=t*t+e*e+r*r;return Rn>i&&(t=Gn,e=Jn,r=Kn,Pn>Xn&&(t=Bn,e=$n,r=Wn),i=t*t+e*e+r*r,Rn>i)?[NaN,NaN]:[Math.atan2(e,t)*On,a(r/Math.sqrt(i))*On]};var Zn,Xn,Bn,$n,Wn,Gn,Jn,Kn,Qn,nt,tt,et={sphere:n,point:b,lineStart:E,lineEnd:_,polygonStart:function(){et.lineStart=S},polygonEnd:function(){et.lineStart=E}};zn.rebind=function(n,t){for(var e,r=1,i=arguments.length;++r<i;)n[e=arguments[r]]=k(n,t,t[e]);return n},zn.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 rt=T(A,D,U,[-Tn,-Tn/2]),it=1e9;zn.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=H(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]])},(zn.geo.conicEqualArea=function(){return V(Z)}).raw=Z,zn.geo.albers=function(){return zn.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},zn.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=zn.geo.albers(),u=zn.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a=zn.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&&.234>i&&r>=-.425&&-.214>r?u:i>=.166&&.234>i&&r>=-.214&&-.115>r?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+Pn,f+.12*c+Pn],[s-.214*c-Pn,f+.234*c-Pn]]).stream(l).point,i=a.translate([s-.205*c,f+.212*c]).clipExtent([[s-.214*c+Pn,f+.166*c+Pn],[s-.115*c-Pn,f+.234*c-Pn]]).stream(l).point,n},n.scale(1070)};var ot,ut,at,lt,ct,st,ft={point:n,lineStart:n,lineEnd:n,polygonStart:function(){ut=0,ft.lineStart=X},polygonEnd:function(){ft.lineStart=ft.lineEnd=ft.point=n,ot+=Vn(ut/2)}},ht={point:B,lineStart:n,lineEnd:n,polygonStart:n,polygonEnd:n},pt={point:G,lineStart:J,lineEnd:K,polygonStart:function(){pt.lineStart=Q},polygonEnd:function(){pt.point=G,pt.lineStart=J,pt.lineEnd=K}};zn.geo.path=function(){function n(n){return n&&("function"==typeof a&&o.pointRadius(+a.apply(this,arguments)),u&&u.valid||(u=i(o)),zn.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 ot=0,zn.geo.stream(n,i(ft)),ot},n.centroid=function(n){return Bn=$n=Wn=Gn=Jn=Kn=Qn=nt=tt=0,zn.geo.stream(n,i(pt)),tt?[Qn/tt,nt/tt]:Kn?[Gn/Kn,Jn/Kn]:Wn?[Bn/Wn,$n/Wn]:[NaN,NaN]},n.bounds=function(n){return ct=st=-(at=lt=1/0),zn.geo.stream(n,i(ht)),[[at,lt],[ct,st]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||en(n):N,t()):e},n.context=function(n){return arguments.length?(o=null==(r=n)?new $:new nn(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(zn.geo.albersUsa()).context(null)};[].slice;zn.geo.transform=function(n){return{stream:function(t){var e=new rn(t);for(var r in n)e[r]=n[r];return e}}},rn.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()}},zn.geo.projection=un,zn.geo.projectionMutator=an,(zn.geo.equirectangular=function(){return un(cn)}).raw=cn.invert=cn,zn.geo.rotation=function(n){function t(t){return t=n(t[0]*Dn,t[1]*Dn),t[0]*=On,t[1]*=On,t}return n=fn(n[0]%360*Dn,n[1]*Dn,n.length>2?n[2]*Dn:0),t.invert=function(t){return t=n.invert(t[0]*Dn,t[1]*Dn),t[0]*=On,t[1]*=On,t},t},sn.invert=cn,zn.geo.circle=function(){function n(){var n="function"==typeof r?r.apply(this,arguments):r,t=fn(-n[0]*Dn,-n[1]*Dn,0).invert,i=[];return e(null,null,1,{point:function(n,e){i.push(n=t(n,e)),n[0]*=On,n[1]*=On}}),{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=dn((t=+r)*Dn,i*Dn),n):t},n.precision=function(r){return arguments.length?(e=dn(t*Dn,(i=+r)*Dn),n):i},n.angle(90)},zn.geo.distance=function(n,t){var e,r=(t[0]-n[0])*Dn,i=n[1]*Dn,o=t[1]*Dn,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)},zn.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=yn(Vn(e)),u=-1;if(n*=o,t*=o,e*=o,0>e)for(;(r=n+e*++u)>t;)i.push(r/o);else for(;(r=n+e*++u)<t;)i.push(r/o);return i},zn.geo.graticule=function(){function n(){return{type:"MultiLineString",coordinates:t()}}function t(){return zn.range(Math.ceil(o/v)*v,i,v).map(h).concat(zn.range(Math.ceil(c/y)*y,l,y).map(p)).concat(zn.range(Math.ceil(r/g)*g,e,g).filter(function(n){return Vn(n%v)>Pn}).map(s)).concat(zn.range(Math.ceil(a/d)*d,u,d).filter(function(n){return Vn(n%y)>Pn}).map(f))}var e,r,i,o,u,a,l,c,s,f,h,p,g=10,d=g,v=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?(v=+t[0],y=+t[1],n):[v,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],d=+t[1],n):[g,d]},n.precision=function(t){return arguments.length?(m=+t,s=mn(a,u,90),f=Mn(r,e,m),h=mn(c,l,90),p=Mn(o,i,m),n):m},n.majorExtent([[-180,-90+Pn],[180,90-Pn]]).minorExtent([[-180,-80-Pn],[180,80+Pn]])},zn.geo.greatArc=function(){function n(){return{type:"LineString",coordinates:[t||r.apply(this,arguments),e||i.apply(this,arguments)]}}var t,e,r=xn,i=bn;return n.distance=function(){return zn.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},zn.geo.interpolate=function(n,t){return wn(n[0]*Dn,n[1]*Dn,t[0]*Dn,t[1]*Dn)},zn.geo.length=function(n){return gt=0,zn.geo.stream(n,dt),gt};var gt,dt={sphere:n,point:n,lineStart:En,lineEnd:n,polygonStart:n,polygonEnd:n},vt=_n(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(zn.geo.azimuthalEqualArea=function(){return un(vt)}).raw=vt;var yt=_n(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},N);(zn.geo.azimuthalEquidistant=function(){return un(yt)}).raw=yt,(zn.geo.conicConformal=function(){return V(Sn)}).raw=Sn,(zn.geo.conicEquidistant=function(){return V(Nn)}).raw=Nn;var mt=_n(function(n){return 1/n},Math.atan);(zn.geo.gnomonic=function(){return un(mt)}).raw=mt,kn.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-jn]},(zn.geo.mercator=function(){return An(kn)}).raw=kn;var Mt=_n(function(){return 1},Math.asin);(zn.geo.orthographic=function(){return un(Mt)}).raw=Mt;var xt=_n(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(zn.geo.stereographic=function(){return un(xt)}).raw=xt,Cn.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-jn]},(zn.geo.transverseMercator=function(){var n=An(Cn),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])},n.rotate([0,0])}).raw=Cn,"function"==typeof define&&define.amd?define(zn):"object"==typeof t&&t.exports?t.exports=zn:this.d3=zn}()}()},{}],6:[function(n,t,e){!function(){function n(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 t>n?-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);i>r;){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);i>r;){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+="")===wu||n[0]===Eu?Eu+n:n}function h(n){return(n+="")[0]===Eu?n.slice(1):n}function p(n){return f(n)in this._}function g(n){return(n=f(n))in this._&&delete this._[n]}function d(){var n=[];for(var t in this._)n.push(h(t));return n}function v(){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 M(n){return n}function x(n,t,e){return function(){var r=e.apply(t,arguments);return r===t?n:r}}function b(n,t){if(t in n)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var e=0,r=_u.length;r>e;++e){var i=_u[e]+t;if(i in n)return i}}function w(){}function E(){}function _(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 N(){for(var n,t=cu.event;n=t.sourceEvent;)t=n;return t}function k(n){for(var t=new E,e=0,r=arguments.length;++e<r;)t[arguments[e]]=_(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 A(n){return Nu(n,zu),n}function C(n){return"function"==typeof n?n:function(){return ku(n,this)}}function z(n){return"function"==typeof n?n:function(){return Au(n,this)}}function q(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 T(n){return n.trim().replace(/\s+/g," ")}function L(n){return new RegExp("(?:^|\\s+)"+cu.requote(n)+"(?:\\s+|$)","g")}function j(n){return(n+"").trim().split(/^|\s+/)}function P(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(R);var i=n.length;return"function"==typeof t?r:e}function R(n){var t=L(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",T(i+" "+n))):e.setAttribute("class",T(i.replace(t," ")))}}function D(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 O(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===qu&&t.documentElement.namespaceURI===qu?t.createElement(n):t.createElementNS(e,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 I(n){return{__data__:n}}function H(n){return function(){return Cu(this,n)}}function Y(n){return arguments.length||(n=r),function(t,e){return t&&e?n(t.__data__,e.__data__):!t-!e}}function V(n,t){for(var e=0,r=n.length;r>e;e++)for(var i,o=n[e],u=0,a=o.length;a>u;u++)(i=o[u])&&t(i,u,e);return n}function Z(n){return Nu(n,Lu),n}function X(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=$;a>0&&(n=n.slice(0,a));var c=ju.get(n);return c&&(n=c,l=W),a?t?i:r:t?w:o}function $(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=$(n,t);return function(n){var t=this,r=n.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||e.call(t,n)}}function G(t){var r=".dragsuppress-"+ ++Ru,i="click"+r,o=cu.select(e(t)).on("touchmove"+r,S).on("dragstart"+r,S).on("selectstart"+r,S);if(null==Pu&&(Pu="onselectstart"in t?!1:b(t.style,"userSelect")),Pu){var u=n(t).style,a=u[Pu];u[Pu]="none"}return function(n){if(o.on(r,null),Pu&&(u[Pu]=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(0>Du){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();Du=!(u.f||u.e),r.remove()}}return Du?(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 K(){return cu.event.changedTouches[0].identifier}function Q(n){return n>0?1:0>n?-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:-1>n?Fu:Math.acos(n)}function en(n){return n>1?Yu:-1>n?-Yu: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):En(""+n,_n,cn):new cn(n,t,e)}function sn(n,t,e){function r(n){return n>360?n-=360:0>n&&(n+=360),60>n?o+(u-o)*n/60:180>n?u:240>n?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:0>t?0:t>1?1:t,e=0>e?0:e>1?1:e,u=.5>=e?e*(1+t):e+t-e*t,o=2*e-u,new Mn(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?dn(n.l,n.a,n.b):dn((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=Mn(n)).r,n.g,n.b):new pn(n,t,e)}function gn(n,t,e){var r=(n+16)/116,i=r+t/500,o=r-e/200;return i=vn(i)*ta,r=vn(r)*ea,o=vn(o)*ra,new Mn(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 dn(n,t,e){return n>0?new fn(Math.atan2(e,t)*Zu,Math.sqrt(t*t+e*e),n):new fn(NaN,NaN,n)}function vn(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*(.00304>=n?12.92*n:1.055*Math.pow(n,1/2.4)-.055))}function Mn(n,t,e){return this instanceof Mn?(this.r=~~n,this.g=~~t,void(this.b=~~e)):arguments.length<2?n instanceof Mn?new Mn(n.r,n.g,n.b):En(""+n,Mn,sn):new Mn(n,t,e)}function xn(n){return new Mn(n>>16,n>>8&255,255&n)}function bn(n){return xn(n)+""}function wn(n){return 16>n?"0"+Math.max(0,n).toString(16):Math.min(255,n).toString(16)}function En(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(kn(i[0]),kn(i[1]),kn(i[2]))}return(o=ua.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|u,a=240&o,a=a>>4|a,l=15&o,l=l<<4|l):7===n.length&&(u=(16711680&o)>>16,a=(65280&o)>>8,l=255&o)),t(u,a,l))}function _n(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=.5>l?a/(u+o):a/(2-u-o),r=n==u?(t-e)/a+(e>t?6:0):t==u?(e-n)/a+2:(n-t)/a+4,r*=60):(r=NaN,i=l>0&&1>l?0:r),new cn(r,i,l)}function Sn(n,t,e){n=Nn(n),t=Nn(t),e=Nn(e);var r=yn((.4124564*n+.3575761*t+.1804375*e)/ta),i=yn((.2126729*n+.7151522*t+.072175*e)/ea),o=yn((.0193339*n+.119192*t+.9503041*e)/ra);return pn(116*i-16,500*(r-i),200*(i-o))}function Nn(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function kn(n){var t=parseFloat(n);return"%"===n.charAt(n.length-1)?Math.round(2.55*t):t}function An(n){return"function"==typeof n?n:function(){return n}}function Cn(n){return function(t,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),zn(t,e,n,r)}}function zn(n,t,e,r){function i(){var n,t=l.status;if(!t&&Tn(l)||t>=200&&300>t||304===t){try{n=e.call(o,l)}catch(r){return void u.error.call(o,r)}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(qn(r))}function qn(n){return 1===n.length?function(t,e){n(null==t?e:null)}:n}function Tn(n){var t=n.responseType;return t&&"text"!==t?n.response:n.responseText}function Ln(n,t,e){var r=arguments.length;2>r&&(t=0),3>r&&(e=Date.now());var i=e+t,o={c:n,t:i,n:null};return la?la.n=o:aa=o,la=o,ca||(sa=clearTimeout(sa),ca=1,fa(jn)),o}function jn(){var n=Pn(),t=Rn()-n;t>24?(isFinite(t)&&(clearTimeout(sa),sa=setTimeout(jn,t)),ca=0):(ca=1,fa(jn))}function Pn(){for(var n=Date.now(),t=aa;t;)n>=t.t&&t.c(n-t.t)&&(t.c=null),t=t.n;return n}function Rn(){for(var n,t=aa,e=1/0;t;)t.c?(t.t<e&&(e=t.t),t=(n=t).n):t=n?n.n=t.n:aa=t.n;return la=n,e}function Dn(n,t){return t-(n?Math.ceil(Math.log(n)/Math.LN10):1)}function On(n,t){var e=Math.pow(10,3*bu(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)}:M;return function(n){var e=pa.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],g=1,d="",v="",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"%":g=100,v="%",p="f";break;case"p":g=100,v="%",p="r";break;case"b":case"o":case"x":case"X":"#"===l&&(d="0"+p.toLowerCase());case"c":m=!1;case"d":y=!0,h=0;break;case"s":g=-1,p="r"}"$"===l&&(d=i[0],v=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=ga.get(p)||Fn;var M=c&&f;return function(n){var e=v;if(y&&n%1)return"";var i=0>n||0===n&&0>1/n?(n=-n,"-"):"-"===a?"":a;if(0>g){var l=cu.formatPrefix(n,h);n=l.scale(n),e=l.symbol+v}else n*=g;n=p(n,h);var x,b,w=n.lastIndexOf(".");if(0>w){var E=m?n.lastIndexOf("e"):-1;0>E?(x=n,b=""):(x=n.substring(0,E),b=n.substring(E))}else x=n.substring(0,w),b=t+n.substring(w+1);!c&&f&&(x=o(x,1/0));var _=d.length+x.length+b.length+(M?0:i.length),S=s>_?new Array(_=s-_+1).join(r):"";return M&&(x=o(S+x,S.length?s-b.length:1/0)),i+=d,n=x+b,("<"===u?i+n+S:">"===u?S+i+n:"^"===u?S.substring(0,_>>=1)+i+n+S.substring(_):i+(M?n:S+n))+e}}}function Fn(n){return n+""}function In(){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 r-t>t-e?e:r}function i(e){return t(e=n(new va(e-1)),1),e}function o(n,e){return t(n=new va(+n),e),n}function u(n,r,o){var u=i(n),a=[];if(o>1)for(;r>u;)e(u)%o||a.push(new Date(+u)),t(u,1);else for(;r>u;)a.push(new Date(+u)),t(u,1);return a}function a(n,t,e){try{va=In;var r=new In;return r._=n,u(r,t,e)}finally{va=Date}}n.floor=n,n.round=r,n.ceil=i,n.offset=o,n.range=u;var l=n.utc=Yn(n);return l.floor=l,l.round=Yn(r),l.ceil=Yn(i),l.offset=Yn(o),l.range=a,n}function Yn(n){return function(t,e){try{va=In;var r=new In;return r._=t,n(r,e)._}finally{va=Date}}}function Vn(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=ma[e=n.charAt(++a)])&&(e=n.charAt(++a)),(o=A[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},i=e(r,n,t,0);if(i!=t.length)return null;"p"in r&&(r.H=r.H%12+12*r.p);var o=null!=r.Z&&va!==In,u=new(o?In:va);return"j"in r?u.setFullYear(r.y,0,r.j):"W"in r||"U"in r?("w"in r||(r.w="W"in r?1:0),u.setFullYear(r.y,0,1),u.setFullYear(r.y,0,"W"in r?(r.w+6)%7+7*r.W-(u.getDay()+5)%7:r.w+7*r.U-(u.getDay()+6)%7)):u.setFullYear(r.y,r.m,r.d),u.setHours(r.H+(r.Z/100|0),r.M+r.Z%100,r.S,r.L),o?u._:u},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;l>a;){if(r>=c)return-1;if(i=t.charCodeAt(a++),37===i){if(u=t.charAt(a++),o=C[u in ma?t.charAt(a++):u],!o||(r=o(n,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}function r(n,t,e){w.lastIndex=0;var r=w.exec(t.slice(e));return r?(n.w=E.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=b.get(r[0].toLowerCase()),e+r[0].length):-1}function o(n,t,e){N.lastIndex=0;var r=N.exec(t.slice(e));return r?(n.m=k.get(r[0].toLowerCase()),e+r[0].length):-1}function u(n,t,e){_.lastIndex=0;var r=_.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,A.c.toString(),t,r)}function l(n,t,r){return e(n,A.x.toString(),t,r)}function c(n,t,r){return e(n,A.X.toString(),t,r)}function s(n,t,e){var r=M.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,g=n.periods,d=n.days,v=n.shortDays,y=n.months,m=n.shortMonths;t.utc=function(n){function e(n){try{va=In;var t=new va;return t._=n,r(t)}finally{va=Date}}var r=t(n);return e.parse=function(n){try{va=In;var t=r.parse(n);return t&&t._}finally{va=Date}},e.toString=r.toString,e},t.multi=t.utc.multi=st;var M=cu.map(),x=Xn(d),b=Bn(d),w=Xn(v),E=Bn(v),_=Xn(y),S=Bn(y),N=Xn(m),k=Bn(m);g.forEach(function(n,t){M.set(n.toLowerCase(),t)});var A={a:function(n){return v[n.getDay()]},A:function(n){return d[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+da.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 g[+(n.getHours()>=12)]},S:function(n,t){return Zn(n.getSeconds(),t,2)},U:function(n,t){return Zn(da.sundayOfYear(n),t,2)},w:function(n){return n.getDay()},W:function(n,t){return Zn(da.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"%"}},C={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:$n,W:Gn,x:l,X:c,y:Kn,Y:Jn,Z:Qn,"%":ct};return t}function Zn(n,t,e){var r=0>n?"-":"",i=(r?-n:n)+"",o=i.length;return r+(e>o?new Array(e-o+1).join(t)+i:i)}function Xn(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 $n(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+1));return r?(n.w=+r[0],e+r[0].length):-1}function Wn(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e));return r?(n.U=+r[0],e+r[0].length):-1}function Gn(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e));return r?(n.W=+r[0],e+r[0].length):-1}function Jn(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+4));return r?(n.y=+r[0],e+r[0].length):-1}function Kn(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+2));return r?(n.y=nt(+r[0]),e+r[0].length):-1}function Qn(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){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+2));return r?(n.m=r[0]-1,e+r[0].length):-1}function et(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+2));return r?(n.d=+r[0],e+r[0].length):-1}function rt(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+3));return r?(n.j=+r[0],e+r[0].length):-1}function it(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+2));return r?(n.H=+r[0],e+r[0].length):-1}function ot(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+2));return r?(n.M=+r[0],e+r[0].length):-1}function ut(n,t,e){Ma.lastIndex=0;var r=Ma.exec(t.slice(e,e+2));return r?(n.S=+r[0],e+r[0].length):-1}function at(n,t,e){Ma.lastIndex=0;var r=Ma.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=bu(t)/60|0,i=bu(t)%60;return e+Zn(r,"0",2)+Zn(i,"0",2)}function ct(n,t,e){xa.lastIndex=0;var r=xa.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&&_a.hasOwnProperty(n.type)&&_a[n.type](n,t);
}function gt(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 dt(n,t){var e=-1,r=n.length;for(t.polygonStart();++e<r;)gt(n[e],t,1);t.polygonEnd()}function vt(){function n(n,t){n*=Vu,t=t*Vu/2+Fu/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);Na.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+Fu/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 Mt(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 bt(n,t){return[n[0]*t,n[1]*t,n[2]*t]}function wt(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 Et(n){return[Math.atan2(n[1],n[0]),en(n[2])]}function _t(n,t){return bu(n[0]-t[0])<Ou&&bu(n[1]-t[1])<Ou}function St(n,t){n*=Vu;var e=Math.cos(t*=Vu);Nt(e*Math.cos(n),e*Math.sin(n),Math.sin(t))}function Nt(n,t,e){++Aa,za+=(n-za)/Aa,qa+=(t-qa)/Aa,Ta+=(e-Ta)/Aa}function kt(){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);Ca+=c,La+=c*(t+(t=u)),ja+=c*(e+(e=a)),Pa+=c*(r+(r=l)),Nt(t,e,r)}var t,e,r;Ua.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),Ua.point=n,Nt(t,e,r)}}function At(){Ua.point=St}function Ct(){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,g=h&&-tn(p)/h,d=Math.atan2(h,p);Ra+=g*c,Da+=g*s,Oa+=g*f,Ca+=d,La+=d*(r+(r=u)),ja+=d*(i+(i=a)),Pa+=d*(o+(o=l)),Nt(r,i,o)}var t,e,r,i,o;Ua.point=function(u,a){t=u,e=a,Ua.point=n,u*=Vu;var l=Math.cos(a*=Vu);r=l*Math.cos(u),i=l*Math.sin(u),o=Math.sin(a),Nt(r,i,o)},Ua.lineEnd=function(){n(t,e),Ua.lineEnd=At,Ua.point=St}}function zt(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),e&&n.invert(e[0],e[1])}),e}function qt(){return!0}function Tt(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(_t(e,r)){i.lineStart();for(var a=0;t>a;++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),Lt(o),Lt(u),o.length){for(var a=0,l=e,c=u.length;c>a;++a)u[a].e=l=!l;for(var s,f,h=o[0];;){for(var p=h,g=!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(g)for(var a=0,c=s.length;c>a;++a)i.point((f=s[a])[0],f[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(g){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,g=!g}while(!p.v);i.lineEnd()}}}function Lt(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 Pt(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);v.point(e[0],e[1])}function l(){m.point=a,v.lineStart()}function c(){m.point=u,v.lineEnd()}function s(n,t){d.push([n,t]);var e=i(n,t);x.point(e[0],e[1])}function f(){x.lineStart(),d=[]}function h(){s(d[0][0],d[0][1]),x.lineEnd();var n,t=x.clean(),e=M.buffer(),r=e.length;if(d.pop(),g.push(d),d=null,r)if(1&t){n=e[0];var i,r=n.length-1,u=-1;if(r>0){for(b||(o.polygonStart(),b=!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(Rt))}var p,g,d,v=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=[],g=[]},polygonEnd:function(){m.point=u,m.lineStart=l,m.lineEnd=c,p=cu.merge(p);var n=Ht(y,g);p.length?(b||(o.polygonStart(),b=!0),Tt(p,Ot,n,e,o)):n&&(b||(o.polygonStart(),b=!0),o.lineStart(),e(null,null,1,o),o.lineEnd()),b&&(o.polygonEnd(),b=!1),p=g=null},sphere:function(){o.polygonStart(),o.lineStart(),e(null,null,1,o),o.lineEnd(),o.polygonEnd()}},M=Dt(),x=t(M),b=!1;return m}}function Rt(n){return n.length>1}function Dt(){var n,t=[];return{lineStart:function(){t.push(n=[])},point:function(t,e){n.push([t,e])},lineEnd:w,buffer:function(){var e=t;return t=[],n=null,e},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function Ot(n,t){return((n=n.x)[0]<0?n[1]-Yu-Ou:Yu-n[1])-((t=t.x)[0]<0?t[1]-Yu-Ou:Yu-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?Fu:-Fu,l=bu(o-e);bu(l-Fu)<Ou?(n.point(e,r=(r+u)/2>0?Yu:-Yu),n.point(i,r),n.lineEnd(),n.lineStart(),n.point(a,r),n.point(o,r),t=0):i!==a&&l>=Fu&&(bu(e-i)<Ou&&(e-=i*Ou),bu(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 bu(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 It(n,t,e,r){var i;if(null==n)i=e*Yu,r.point(-Fu,i),r.point(0,i),r.point(Fu,i),r.point(Fu,0),r.point(Fu,-i),r.point(0,-i),r.point(-Fu,-i),r.point(-Fu,0),r.point(-Fu,i);else if(bu(n[0]-t[0])>Ou){var o=n[0]<t[0]?Fu:-Fu;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;Na.reset();for(var a=0,l=t.length;l>a;++a){var c=t[a],s=c.length;if(s)for(var f=c[0],h=f[0],p=f[1]/2+Fu/4,g=Math.sin(p),d=Math.cos(p),v=1;;){v===s&&(v=0),n=c[v];var y=n[0],m=n[1]/2+Fu/4,M=Math.sin(m),x=Math.cos(m),b=y-h,w=b>=0?1:-1,E=w*b,_=E>Fu,S=g*M;if(Na.add(Math.atan2(S*w*Math.sin(E),d*x+S*Math.cos(E))),o+=_?b+w*Iu:b,_^h>=e^y>=e){var N=Mt(yt(f),yt(n));wt(N);var k=Mt(i,N);wt(k);var A=(_^b>=0?-1:1)*en(k[2]);(r>A||r===A&&(N[0]||N[1]))&&(u+=_^b>=0?1:-1)}if(!v++)break;h=y,g=M,d=x,f=n}}return(-Ou>o||Ou>o&&0>Na)^1&u}function Yt(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,g=[f,h],d=t(f,h),v=u?d?0:i(f,h):d?i(f+(0>f?Fu:-Fu),h):0;if(!e&&(c=l=d)&&n.lineStart(),d!==l&&(p=r(e,g),(_t(e,p)||_t(g,p))&&(g[0]+=Ou,g[1]+=Ou,d=t(g[0],g[1]))),d!==l)s=0,d?(n.lineStart(),p=r(g,e),n.point(p[0],p[1])):(p=r(e,g),n.point(p[0],p[1]),n.lineEnd()),e=p;else if(a&&e&&u^d){var y;v&o||!(y=r(g,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])))}!d||e&&_t(e,g)||n.point(g[0],g[1]),e=g,l=d,o=v},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=Mt(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=Mt(u,a),g=bt(u,f),d=bt(a,h);xt(g,d);var v=p,y=mt(g,v),m=mt(v,v),M=y*y-m*(mt(g,g)-1);if(!(0>M)){var x=Math.sqrt(M),b=bt(v,(-y-x)/m);if(xt(b,g),b=Et(b),!e)return b;var w,E=n[0],_=t[0],S=n[1],N=t[1];E>_&&(w=E,E=_,_=w);var k=_-E,A=bu(k-Fu)<Ou,C=A||Ou>k;if(!A&&S>N&&(w=S,S=N,N=w),C?A?S+N>0^b[1]<(bu(b[0]-E)<Ou?S:N):S<=b[1]&&b[1]<=N:k>Fu^(E<=b[0]&&b[0]<=_)){var z=bt(v,(-y+x)/m);return xt(z,g),[b,Et(z)]}}}function i(t,e){var r=u?n:Fu-n,i=0;return-r>t?i|=1:t>r&&(i|=2),-r>e?i|=4:e>r&&(i|=8),i}var o=Math.cos(n),u=o>0,a=bu(o)>Ou,l=ve(n,6*Vu);return Pt(t,e,l,u?[0,-n]:[-Fu,n-Fu])}function Vt(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,g=s-l,d=f-c;if(o=n-l,g||!(o>0)){if(o/=g,0>g){if(h>o)return;p>o&&(p=o)}else if(g>0){if(o>p)return;o>h&&(h=o)}if(o=e-l,g||!(0>o)){if(o/=g,0>g){if(o>p)return;o>h&&(h=o)}else if(g>0){if(h>o)return;p>o&&(p=o)}if(o=t-c,d||!(o>0)){if(o/=d,0>d){if(h>o)return;p>o&&(p=o)}else if(d>0){if(o>p)return;o>h&&(h=o)}if(o=r-c,d||!(0>o)){if(o/=d,0>d){if(o>p)return;o>h&&(h=o)}else if(d>0){if(h>o)return;p>o&&(p=o)}return h>0&&(i.a={x:l+h*g,y:c+h*d}),1>p&&(i.b={x:l+p*g,y:c+p*d}),i}}}}}}function Zt(n,t,e,r){function i(r,i){return bu(r[0]-n)<Ou?i>0?0:3:bu(r[0]-e)<Ou?i>0?2:1:bu(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=v.length,r=n[1],i=0;e>i;++i)for(var o,u=1,a=v[i],l=a.length,c=a[0];l>u;++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 i>=n&&e>=i&&o>=t&&r>=o}function f(n,t){s(n,t)&&a.point(n,t)}function h(){C.point=g,v&&v.push(y=[]),_=!0,E=!1,b=w=NaN}function p(){d&&(g(m,M),x&&E&&k.rejoin(),d.push(k.buffer())),C.point=f,E&&a.lineEnd()}function g(n,t){n=Math.max(-Ia,Math.min(Ia,n)),t=Math.max(-Ia,Math.min(Ia,t));var e=s(n,t);if(v&&y.push([n,t]),_)m=n,M=t,x=e,_=!1,e&&(a.lineStart(),a.point(n,t));else if(e&&E)a.point(n,t);else{var r={a:{x:b,y:w},b:{x:n,y:t}};A(r)?(E||(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)}b=n,w=t,E=e}var d,v,y,m,M,x,b,w,E,_,S,N=a,k=Dt(),A=Vt(n,t,e,r),C={point:f,lineStart:h,lineEnd:p,polygonStart:function(){a=k,d=[],v=[],S=!0},polygonEnd:function(){a=N,d=cu.merge(d);var t=l([n,r]),e=S&&t,i=d.length;(e||i)&&(a.polygonStart(),e&&(a.lineStart(),c(null,null,1,a),a.lineEnd()),i&&Tt(d,o,t,c,a),a.polygonEnd()),d=v=y=null}};return C}}function Xt(n){var t=0,e=Fu/3,r=le(n),i=r(t,e);return i.parallels=function(n){return arguments.length?r(t=n[0]*Fu/180,e=n[1]*Fu/180):[t/Fu*180,e/Fu*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 $t(){function n(n,t){Ya+=i*n-r*t,r=n,i=t}var t,e,r,i;$a.point=function(o,u){$a.point=n,t=r=o,e=i=u},$a.lineEnd=function(){n(t,e)}}function Wt(n,t){Va>n&&(Va=n),n>Xa&&(Xa=n),Za>t&&(Za=t),t>Ba&&(Ba=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 Kt(n,t){za+=n,qa+=t,++Ta}function Qt(){function n(n,r){var i=n-t,o=r-e,u=Math.sqrt(i*i+o*o);La+=u*(t+n)/2,ja+=u*(e+r)/2,Pa+=u,Kt(t=n,e=r)}var t,e;Ga.point=function(r,i){Ga.point=n,Kt(t=r,e=i)}}function ne(){Ga.point=Kt}function te(){function n(n,t){var e=n-r,o=t-i,u=Math.sqrt(e*e+o*o);La+=u*(r+n)/2,ja+=u*(i+t)/2,Pa+=u,u=i*n-r*t,Ra+=u*(r+n),Da+=u*(i+t),Oa+=3*u,Kt(r=n,i=t)}var t,e,r,i;Ga.point=function(o,u){Ga.point=n,Kt(t=r=o,e=i=u)},Ga.lineEnd=function(){n(t,e)}}function ee(n){function t(t,e){n.moveTo(t+u,e),n.arc(t,e,u,0,Iu)}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:w};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(){M=NaN,_.point=o,t.lineStart()}function o(e,r){var o=yt([e,r]),u=n(e,r);i(M,x,m,b,w,E,M=u[0],x=u[1],m=e,b=o[0],w=o[1],E=o[2],a,t),t.point(M,x)}function u(){_.point=e,t.lineEnd()}function l(){r(),_.point=c,_.lineEnd=s}function c(n,t){o(f=n,h=t),p=M,g=x,d=b,v=w,y=E,_.point=o}function s(){i(M,x,m,b,w,E,p,g,f,d,v,y,a,t),_.lineEnd=u,u()}var f,h,p,g,d,v,y,m,M,x,b,w,E,_={point:e,lineStart:r,lineEnd:u,polygonStart:function(){t.polygonStart(),_.lineStart=l},polygonEnd:function(){t.polygonEnd(),_.lineStart=r}};return _}function i(t,e,r,a,l,c,s,f,h,p,g,d,v,y){var m=s-t,M=f-e,x=m*m+M*M;if(x>4*o&&v--){var b=a+p,w=l+g,E=c+d,_=Math.sqrt(b*b+w*w+E*E),S=Math.asin(E/=_),N=bu(bu(E)-1)<Ou||bu(r-h)<Ou?(r+h)/2:Math.atan2(w,b),k=n(N,S),A=k[0],C=k[1],z=A-t,q=C-e,T=M*z-m*q;(T*T/x>o||bu((m*z+M*q)/x-.5)>.3||u>a*p+l*g+c*d)&&(i(t,e,r,a,l,c,A,C,N,b/=_,w/=_,E,v,y),y.point(A,C),i(A,C,N,b,w,E,s,f,h,p,g,d,v,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*Zu,e*Zu])});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&&[n[0]*Zu,n[1]*Zu]}function r(){a=zt(u=he(y,m,x),o);var n=o(d,v);return l=p-n[0]*h,c=g+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,g=250,d=0,v=0,y=0,m=0,x=0,b=Fa,w=M,E=null,_=null;return t.stream=function(n){return s&&(s.valid=!1),s=ce(b(u,f(w(n)))),s.valid=!0,s},t.clipAngle=function(n){return arguments.length?(b=null==n?(E=n,Fa):Yt((E=+n)*Vu),i()):E},t.clipExtent=function(n){return arguments.length?(_=n,w=n?Zt(n[0][0],n[0][1],n[1][0],n[1][1]):M,i()):_},t.scale=function(n){return arguments.length?(h=+n,r()):h},t.translate=function(n){return arguments.length?(p=+n[0],g=+n[1],r()):[p,g]},t.center=function(n){return arguments.length?(d=n[0]%360*Vu,v=n[1]%360*Vu,r()):[d*Zu,v*Zu]},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*Zu,m*Zu,x*Zu]},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>Fu?n-Iu:-Fu>n?n+Iu:n,t]}function he(n,t,e){return n?t||e?zt(ge(n),de(t,e)):ge(n):t||e?de(t,e):fe}function pe(n){return function(t,e){return t+=n,[t>Fu?t-Iu:-Fu>t?t+Iu:t,e]}}function ge(n){var t=pe(n);return t.invert=pe(-n),t}function de(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 ve(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?o>i:i>o)&&(i+=u*Iu)):(i=n+u*Iu,o=n-.5*l);for(var c,s=i;u>0?s>o:o>s;s-=l)a.point((c=Et([e,-r*Math.cos(s),-r*Math.sin(s)]))[0],c[1])}}function ye(n,t){var e=yt(t);e[0]-=n,wt(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 Me(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 be(n){return n.target}function we(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),g=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)*Zu,Math.atan2(u,Math.sqrt(r*r+i*i))*Zu]}:function(){return[n*Zu,t*Zu]};return g.distance=h,g}function Ee(){function n(n,i){var o=Math.sin(i*=Vu),u=Math.cos(i),a=bu((n*=Vu)-t),l=Math.cos(a);Ja+=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;Ka.point=function(i,o){t=i*Vu,e=Math.sin(o*=Vu),r=Math.cos(o),Ka.point=n},Ka.lineEnd=function(){Ka.point=Ka.lineEnd=w}}function _e(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?-Yu+Ou>t&&(t=-Yu+Ou):t>Yu-Ou&&(t=Yu-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(Fu/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=Q(o)*Math.sqrt(n*n+e*e);return[Math.atan2(n,e)/o,2*Math.atan(Math.pow(u/r,1/o))-Yu]},e):ke}function Ne(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 bu(i)<Ou?se:(e.invert=function(n,t){var e=o-t;return[Math.atan2(n,e)/i,o-Q(i)*Math.sqrt(n*n+e*e)]},e)}function ke(n,t){return[n,Math.log(Math.tan(Fu/4+t/2))]}function Ae(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=Fu*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 Ce(n,t){return[Math.log(Math.tan(Fu/4+t/2)),-n]}function ze(n){return n[0]}function qe(n){return n[1]}function Te(n){for(var t=n.length,e=[0,1],r=2,i=2;t>i;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 Le(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 Pe(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 Re(n){var t=n[0],e=n[n.length-1];return!(t[0]-e[0]||t[1]-e[1])}function De(){ir(this),this.edge=this.site=this.circle=null}function Oe(n){var t=sl.pop()||new De;return t.site=n,t}function Ue(n){We(n),al.remove(n),sl.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&&bu(e-l.circle.x)<Ou&&bu(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&&bu(e-c.circle.x)<Ou&&bu(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;f>s;++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=Qe(l.site,c.site,null,i),$e(l),$e(c)}function Ie(n){for(var t,e,r,i,o=n.x,u=n.y,a=al._;a;)if(r=He(a,u)-o,r>Ou)a=a.L;else{if(i=o-Ye(a,u),!(i>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=Oe(n);if(al.insert(t,l),t||e){if(t===e)return We(t),e=Oe(t.site),al.insert(l,e),l.edge=e.edge=Qe(t.site,l.site),$e(t),void $e(e);if(!e)return void(l.edge=Qe(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,g=e.site,d=g.x-s,v=g.y-f,y=2*(h*v-p*d),m=h*h+p*p,M=d*d+v*v,x={x:(v*m-p*M)/y+s,y:(h*M-d*m)/y+f};tr(e.edge,c,g,x),l.edge=Qe(c,n,null,x),e.edge=Qe(n,g,null,x),$e(t),$e(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 Ye(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 Ve(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],g=n[1][1],d=ul,v=d.length;v--;)if(o=d[v],o&&o.prepare())for(a=o.edges,l=a.length,u=0;l>u;)s=a[u].end(),r=s.x,i=s.y,c=a[++u%l].start(),t=c.x,e=c.y,(bu(r-t)>Ou||bu(i-e)>Ou)&&(a.splice(u,0,new er(nr(o.site,s,bu(r-f)<Ou&&g-i>Ou?{x:f,y:bu(t-f)<Ou?e:g}:bu(i-g)<Ou&&h-r>Ou?{x:bu(e-g)<Ou?t:h,y:g}:bu(r-h)<Ou&&i-p>Ou?{x:h,y:bu(t-h)<Ou?e:p}:bu(i-p)<Ou&&r-f>Ou?{x:bu(e-p)<Ou?t:f,y:p}:null),o.site,null)),++l)}function Xe(n,t){return t.angle-n.angle}function Be(){ir(this),this.x=this.y=this.arc=this.site=this.cy=null}function $e(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>=-Uu)){var p=l*l+c*c,g=s*s+f*f,d=(f*p-c*g)/h,v=(l*g-s*p)/h,f=v+a,y=fl.pop()||new Be;y.arc=n,y.site=i,y.x=d+u,y.y=f+Math.sqrt(d*d+v*v),y.cy=f,n.circle=y;for(var m=null,M=cl._;M;)if(y.y<M.y||y.y===M.y&&y.x<=M.x){if(!M.L){m=M.P;break}M=M.L}else{if(!M.R){m=M;break}M=M.R}cl.insert(m,y),m||(ll=y)}}}}function We(n){var t=n.circle;t&&(t.P||(ll=t.N),cl.remove(t),fl.push(t),ir(t),n.circle=null)}function Ge(n){for(var t,e=ol,r=Vt(n[0][0],n[0][1],n[1][0],n[1][1]),i=e.length;i--;)t=e[i],(!Je(t,n)||!r(t)||bu(t.a.x-t.b.x)<Ou&&bu(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,g=f.x,d=f.y,v=(h+g)/2,y=(p+d)/2;if(d===p){if(u>v||v>=a)return;if(h>g){if(o){if(o.y>=c)return}else o={x:v,y:l};e={x:v,y:c}}else{if(o){if(o.y<l)return}else o={x:v,y:c};e={x:v,y:l}}}else if(r=(h-g)/(d-p),i=y-r*v,-1>r||r>1)if(h>g){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(d>p){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 Ke(n,t){this.l=n,this.r=t,this.a=this.b=null}function Qe(n,t,e,r){var i=new Ke(n,t);return ol.push(i),e&&tr(i,n,t,e),r&&tr(i,t,n,r),ul[n.i].edges.push(new er(i,n,t)),ul[t.i].edges.push(new er(i,t,n)),i}function nr(n,t,e){var r=new Ke(n,null);return r.a=t,r.b=e,ol.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(ol=[],ul=new Array(n.length),al=new rr,cl=new rr;;)if(i=ll,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===e&&o.y===r||(ul[o.i]=new Ve(o),Ie(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:ul,edges:ol};return al=cl=ol=ul=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 gr(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]&&gr(n,l[0],e,r,u,a),l[1]&&gr(n,l[1],u,r,i,a),l[2]&&gr(n,l[2],e,a,u,o),l[3]&&gr(n,l[3],u,a,i,o)}}function dr(n,t,e,r,i,o,u){var a,l=1/0;return function c(n,s,f,h,p){if(!(s>o||f>u||r>h||i>p)){if(g=n.point){var g,d=t-n.x,v=e-n.y,y=d*d+v*v;if(l>y){var m=Math.sqrt(l=y);r=t-m,i=e-m,o=t+m,u=e+m,a=g}}for(var M=n.nodes,x=.5*(s+h),b=.5*(f+p),w=t>=x,E=e>=b,_=E<<1|w,S=_+4;S>_;++_)if(n=M[3&_])switch(3&_){case 0:c(n,s,f,x,b);break;case 1:c(n,x,f,h,b);break;case 2:c(n,s,b,x,p);break;case 3:c(n,x,b,h,p)}}}(n,r,i,o,u),a}function vr(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"#"+wn(Math.round(e+o*n))+wn(Math.round(r+u*n))+wn(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 Mr(n,t){var e,r,i,o=pl.lastIndex=gl.lastIndex=0,u=-1,a=[],l=[];for(n+="",t+="";(e=pl.exec(n))&&(r=gl.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=gl.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;t>r;++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 br(n,t){var e,r=[],i=[],o=n.length,u=t.length,a=Math.min(n.length,t.length);for(e=0;a>e;++e)r.push(xr(n[e],t[e]));for(;o>e;++e)i[e]=n[e];for(;u>e;++e)i[e]=t[e];return function(n){for(e=0;a>e;++e)i[e]=r[e](n);return i}}function wr(n){return function(t){return 0>=t?0:t>=1?1:n(t)}}function Er(n){return function(t){return 1-n(1-t)}}function _r(n){return function(t){return.5*(.5>t?n(2*t):2-n(2-2*t))}}function Sr(n){return n*n}function Nr(n){return n*n*n}function kr(n){if(0>=n)return 0;if(n>=1)return 1;var t=n*n,e=t*n;return 4*(.5>n?e:3*(n-t)+e-.75)}function Ar(n){return function(t){return Math.pow(t,n)}}function Cr(n){return 1-Math.cos(n*Yu)}function zr(n){return Math.pow(2,10*(n-1))}function qr(n){return 1-Math.sqrt(1-n*n)}function Tr(n,t){var e;return arguments.length<2&&(t=.45),arguments.length?e=t/Iu*Math.asin(1/n):(n=1,e=t/4),function(r){return 1+n*Math.pow(2,-10*r)*Math.sin((r-e)*Iu/t)}}function Lr(n){return n||(n=1.70158),function(t){return t*t*((n+1)*t-n)}}function jr(n){return 1/2.75>n?7.5625*n*n:2/2.75>n?7.5625*(n-=1.5/2.75)*n+.75:2.5/2.75>n?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375}function Pr(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:-180>o&&(o+=360),function(n){return hn(e+o*n,r+u*n,i+a*n)+""}}function Rr(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:-180>o&&(o+=360),function(n){return sn(e+o*n,r+u*n,i+a*n)+""}}function Dr(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 gn(e+o*n,r+u*n,i+a*n)+""}}function Or(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=Ir(t),i=Fr(t,e),o=Ir(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]))*Zu,this.translate=[n.e,n.f],this.scale=[r,o],this.skew=o?Math.atan2(i,o)*Zu:0}function Fr(n,t){return n[0]*t[0]+n[1]*t[1]}function Ir(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 Yr(n){return n.length?n.pop()+",":""}function Vr(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(Yr(e)+"rotate(",null,")")-2,x:mr(n,t)})):t&&e.push(Yr(e)+"rotate("+t+")")}function Xr(n,t,e,r){n!==t?r.push({i:e.push(Yr(e)+"skewX(",null,")")-2,x:mr(n,t)}):t&&e.push(Yr(e)+"skewX("+t+")")}function Br(n,t,e,r){if(n[0]!==t[0]||n[1]!==t[1]){var i=e.push(Yr(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(Yr(e)+"scale("+t+")")}function $r(n,t){var e=[],r=[];return n=cu.transform(n),t=cu.transform(t),Vr(n.translate,t.translate,e,r),Zr(n.rotate,t.rotate,e,r),Xr(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=Qr(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 Kr(n){for(var t=[],e=n.parent;null!=e;)t.push(n),n=e,e=e.parent;return t.push(n),t}function Qr(n,t){if(n===t)return n;for(var e=Kr(n),r=Kr(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;)o=u[l],null!=o&&(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 gi(n,t,e){n.y0=t,n.y=e}function di(n){return cu.range(n.length)}function vi(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;o>e;++e)(t=n[e][1])>i&&(r=e,i=t);return r}function mi(n){return n.reduce(Mi,0)}function Mi(n,t){return n+t[1]}function xi(n,t){return bi(n,Math.ceil(Math.log(t.length)/Math.LN2+1))}function bi(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 wi(n){return[cu.min(n),cu.max(n)]}function Ei(n,t){return n.value-t.value}function _i(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 Ni(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 ki(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(Ai),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],qi(r,i,o),t(o),_i(r,o),r._pack_prev=o,_i(o,i),i=r._pack_next,u=3;c>u;u++){qi(r,i,o=e[u]);var g=0,d=1,v=1;for(a=i._pack_next;a!==i;a=a._pack_next,d++)if(Ni(a,o)){g=1;break}if(1==g)for(l=r._pack_prev;l!==a._pack_prev&&!Ni(l,o);l=l._pack_prev,v++);g?(v>d||d==v&&i.r<r.r?Si(r,i=a):Si(r=l,i),u--):(_i(r,o),i=o,t(o))}var y=(s+f)/2,m=(h+p)/2,M=0;for(u=0;c>u;u++)o=e[u],o.x-=y,o.y-=m,M=Math.max(M,o.r+Math.sqrt(o.x*o.x+o.y*o.y));n.r=M,e.forEach(Ci)}}function Ai(n){n._pack_next=n._pack_prev=n}function Ci(n){delete n._pack_next,delete n._pack_prev}function zi(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;)zi(i[o],t,e,r)}function qi(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 Ti(n,t){
return n.parent==t.parent?1:2}function Li(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 Pi(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 Ri(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 Di(n,t,e){return n.a.parent===t.parent?n.a:e}function Oi(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 Ii(n){var t,e=n.children;return e&&(t=e.length)?Ii(e[t-1]):n}function Hi(n){return{x:n.x,y:n.y,dx:n.dx,dy:n.dy}}function Yi(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 0>i&&(e+=i/2,i=0),0>o&&(r+=o/2,o=0),{x:e,y:r,dx:i,dy:o}}function Vi(n){var t=n[0],e=n[n.length-1];return e>t?[t,e]:[e,t]}function Zi(n){return n.rangeExtent?n.rangeExtent():Vi(n.range())}function Xi(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 o>u&&(e=r,r=i,i=e,e=o,o=u,u=e),n[r]=t.floor(o),n[i]=t.ceil(u),n}function $i(n){return n?{floor:function(t){return Math.floor(t/n)*n},ceil:function(t){return Math.ceil(t/n)*n}}:Sl}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:Xi,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(Or)},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 Ki(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 Ki(n,t){return Bi(n,$i(Qi(n,t)[2])),Bi(n,$i(Qi(n,t)[2])),n}function Qi(n,t){null==t&&(t=10);var e=Vi(n),r=e[1]-e[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/r*i;return.15>=o?i*=10:.35>=o?i*=5:.75>=o&&(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,Qi(n,t))}function to(n,t,e){var r=Qi(n,t);if(e){var i=pa.exec(e);if(i.shift(),"s"===i[8]){var o=cu.formatPrefix(Math.max(bu(r[0]),bu(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 Nl?Math.abs(e-eo(Math.max(bu(t[0]),bu(t[1]))))+ +("e"!==n):e-2*("%"===n)}function io(n,t,e,r){function i(n){return(e?Math.log(0>n?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:Al);return n.domain(t),r=t.map(o),u},u.ticks=function(){var n=Vi(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(;s>c;c++)for(var h=1;f>h;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,e){if(!arguments.length)return kl;arguments.length<2?e=kl:"function"!=typeof e&&(e=cu.format(e));var r=Math.max(1,t*n/u.ticks().length);return function(n){var u=n/o(Math.round(i(n)));return t-.5>u*t&&(u*=t),r>=u?e(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(Ki(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 0>t?-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 Vi(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){return isNaN(n=+n)?void 0: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),0>e?[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=0>t?NaN:t/o+n,[t,t+1/o]},r.copy=function(){return co(n,t,e)},i()}function so(n,t){function e(e){return e>=e?t[cu.bisect(n,e)]:void 0}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 go(n){return n.outerRadius}function vo(n){return n.startAngle}function yo(n){return n.endAngle}function mo(n){return n&&n.padAngle}function Mo(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,g=(s+h)/2,d=(f+p)/2,v=h-s,y=p-f,m=v*v+y*y,M=e-r,x=s*p-h*f,b=(0>y?-1:1)*Math.sqrt(Math.max(0,M*M*m-x*x)),w=(x*y-v*b)/m,E=(-x*v-y*b)/m,_=(x*y+v*b)/m,S=(-x*v+y*b)/m,N=w-g,k=E-d,A=_-g,C=S-d;return N*N+k*k>A*A+C*C&&(w=_,E=S),[[w-l,E-c],[w*e/M,E*e/M]]}function bo(n){function t(t){function u(){c.push("M",o(n(s),a))}for(var l,c=[],s=[],f=-1,h=t.length,p=An(e),g=An(r);++f<h;)i.call(this,l=t[f],f)?s.push([+p.call(this,l,f),+g.call(this,l,f)]):s.length&&(u(),s=[]);return s.length&&u(),c.length?c.join(""):null}var e=ze,r=qe,i=qt,o=wo,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=jl.get(n)||wo).key,t):u},t.tension=function(n){return arguments.length?(a=n,t):a},t}function wo(n){return n.length>1?n.join("L"):n+"Z"}function Eo(n){return n.join("L")+"Z"}function _o(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 No(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 ko(n,t){return n.length<4?wo(n):n[1]+zo(n.slice(1,-1),qo(n,t))}function Ao(n,t){return n.length<3?Eo(n):n[0]+zo((n.push(n[0]),n),qo([n[n.length-2]].concat(n,[n[1]]),t))}function Co(n,t){return n.length<3?wo(n):n[0]+zo(n,qo(n,t))}function zo(n,t){if(t.length<1||n.length!=t.length&&n.length!=t.length+2)return wo(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 qo(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 To(n){if(n.length<3)return wo(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",Ro(Dl,u),",",Ro(Dl,a)];for(n.push(n[e-1]);++t<=e;)r=n[t],u.shift(),u.push(r[0]),a.shift(),a.push(r[1]),Do(l,u,a);return n.pop(),l.push("L",r),l.join("")}function Lo(n){if(n.length<4)return wo(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(Ro(Dl,o)+","+Ro(Dl,u)),--r;++r<i;)t=n[r],o.shift(),o.push(t[0]),u.shift(),u.push(t[1]),Do(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=[Ro(Dl,u),",",Ro(Dl,a)],--r;++r<o;)e=n[r%i],u.shift(),u.push(e[0]),a.shift(),a.push(e[1]),Do(t,u,a);return t.join("")}function Po(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 To(n)}function Ro(n,t){return n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]*t[3]}function Do(n,t,e){n.push("C",Ro(Pl,t),",",Ro(Pl,e),",",Ro(Rl,t),",",Ro(Rl,e),",",Ro(Dl,t),",",Ro(Dl,e))}function Oo(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]=Oo(i,o);++t<e;)r[t]=(u+(u=Oo(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=Oo(n[a],n[a+1]),bu(t)<Ou?u[a]=u[a+1]=0:(e=u[a]/t,r=u[a+1]/t,i=e*e+r*r,i>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 Io(n){return n.length<3?wo(n):n[0]+zo(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]-Yu,t[0]=e*Math.cos(r),t[1]=e*Math.sin(r);return n}function Yo(n){function t(t){function l(){d.push("M",a(n(y),f),s,c(n(v.reverse()),f),"Z")}for(var h,p,g,d=[],v=[],y=[],m=-1,M=t.length,x=An(e),b=An(i),w=e===r?function(){return p}:An(r),E=i===o?function(){return g}:An(o);++m<M;)u.call(this,h=t[m],m)?(v.push([p=+x.call(this,h,m),g=+b.call(this,h,m)]),y.push([+w.call(this,h,m),+E.call(this,h,m)])):v.length&&(l(),v=[],y=[]);return v.length&&l(),d.length?d.join(""):null}var e=ze,r=ze,i=0,o=qe,u=qt,a=wo,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=jl.get(n)||wo).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 Vo(n){return n.radius}function Zo(n){return[n.x,n.y]}function Xo(n){return function(){var t=n.apply(this,arguments),e=t[0],r=t[1]-Yu;return[e*Math.cos(r),e*Math.sin(r)]}}function Bo(){return 64}function $o(){return"circle"}function Wo(n){var t=Math.sqrt(n/Fu);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 Nu(n,Vl),n.namespace=t,n.id=e,n}function Ko(n,t,e,r){var i=n.id,o=n.namespace;return V(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 Qo(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=d.delay;return c.t=t+l,n>=t?u(n-t):void(c.c=u)}function u(e){var i=g.active,o=g[i];o&&(o.timer.c=null,o.timer.t=NaN,--g.count,delete g[i],o.event&&o.event.interrupt.call(n,n.__data__,o.index));for(var u in g)if(r>+u){var s=g[u];s.timer.c=null,s.timer.t=NaN,--g.count,delete g[u]}c.c=a,Ln(function(){return c.c&&a(e||1)&&(c.c=null,c.t=NaN),1},0,l),g.active=r,d.event&&d.event.start.call(n,n.__data__,t),p=[],d.tween.forEach(function(e,r){(r=r.call(n,n.__data__,t))&&p.push(r)}),h=d.ease,f=d.duration}function a(i){for(var o=i/f,u=h(o),a=p.length;a>0;)p[--a].call(n,u);return o>=1?(d.event&&d.event.end.call(n,n.__data__,t),--g.count?delete g[r]:delete n[e],1):void 0}var l,c,f,h,p,g=n[e]||(n[e]={active:0,count:0}),d=g[r];d||(l=i.time,c=Ln(o,0,l),d=g[r]={tween:new s,time:l,timer:c,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++g.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(Ql,i);return o==Ql.length?[t.year,Qi(n.map(function(n){return n/31536e6}),e)[2]]:o?t[i/Ql[o-1]<Ql[o]/i?o-1:o]:[ec,Qi(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=Vi(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=Vi(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),1>t?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.16"},su=[].slice,fu=function(n){return su.call(n)},hu=this.document;if(hu)try{fu(hu.documentElement.childNodes)[0].nodeType}catch(pu){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(gu){var du=this.Element.prototype,vu=du.setAttribute,yu=du.setAttributeNS,mu=this.CSSStyleDeclaration.prototype,Mu=mu.setProperty;du.setAttribute=function(n,t){vu.call(this,n,t+"")},du.setAttributeNS=function(n,t,e){yu.call(this,n,t,e+"")},mu.setProperty=function(n,t,e){Mu.call(this,n,t+"",e)}}cu.ascending=r,cu.descending=function(n,t){return n>t?-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),r>i&&(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),r>i&&(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;return l?r/l:void 0},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);return u.length?cu.quantile(u.sort(r),.5):void 0},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));return s>1?l/(s-1):void 0},cu.deviation=function(){var n=cu.variance.apply(this,arguments);return n?Math.sqrt(n):n};var xu=u(r);cu.bisectLeft=xu.left,cu.bisect=cu.bisectRight=xu.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,2>o&&(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,e=0,r=n.length-1,i=n[0],o=new Array(0>r?0:r);r>e;)o[e]=[t=i,i=n[++e]];return o},cu.transpose=function(n){if(!(i=n.length))return[];for(var t=-1,e=cu.min(n,a),r=new Array(e);++t<e;)for(var i,o=-1,u=r[t]=new Array(i);++o<i;)u[o]=n[o][t];return r},cu.zip=function(){return cu.transpose(arguments)},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 bu=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(bu(e)),u=-1;if(n*=o,t*=o,e*=o,0>e)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 wu="__proto__",Eu="\x00";c(s,{has:p,get:function(n){return this._[f(n)]},set:function(n,t){return this._[f(n)]=t},remove:g,keys:d,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:v,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,g=u.length,d=o[a++],v=new s;++p<g;)(h=v.get(l=d(c=u[p])))?h.push(c):v.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)}),v.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;r>e;++e)t.add(n[e]);return t},c(m,{has:p,add:function(n){return this._[f(n+="")]=!0,n},remove:g,values:d,size:v,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 _u=["webkit","ms","moz","Moz","o","O"];cu.dispatch=function(){for(var n=new E,t=-1,e=arguments.length;++t<e;)n[arguments[t]]=_(n);return n},E.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(Su,"\\$&")};var Su=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,Nu={}.__proto__?function(n,t){n.__proto__=t}:function(n,t){for(var e in t)n[e]=t[e]},ku=function(n,t){return t.querySelector(n)},Au=function(n,t){return t.querySelectorAll(n)},Cu=function(n,t){var e=n.matches||n[b(n,"matchesSelector")];return(Cu=function(n,t){return e.call(n,t)})(n,t)};"function"==typeof Sizzle&&(ku=function(n,t){return Sizzle(n,t)[0]||null},Au=Sizzle,Cu=Sizzle.matchesSelector),cu.selection=function(){return cu.select(hu.documentElement)};var zu=cu.selection.prototype=[];zu.select=function(n){var t,e,r,i,o=[];n=C(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 A(o)},zu.selectAll=function(n){var t,e,r=[];n=z(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 A(r)};var qu="http://www.w3.org/1999/xhtml",Tu={svg:"http://www.w3.org/2000/svg",xhtml:qu,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:Tu,qualify:function(n){var t=n.indexOf(":"),e=n;return t>=0&&"xmlns"!==(e=n.slice(0,t))&&(n=n.slice(t+1)),Tu.hasOwnProperty(e)?{space:Tu[e],local:n}:n}},zu.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(q(t,n[t]));return this}return this.each(q(n,t))},zu.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(!L(n[i]).test(t))return!1;return!0}for(t in n)this.each(P(t,n[t]));return this}return this.each(P(n,t))},zu.style=function(n,t,r){var i=arguments.length;if(3>i){if("string"!=typeof n){2>i&&(t="");for(r in n)this.each(D(r,n[r],t));return this}if(2>i){var o=this.node();return e(o).getComputedStyle(o,null).getPropertyValue(n)}r=""}return this.each(D(n,t,r))},zu.property=function(n,t){if(arguments.length<2){if("string"==typeof n)return this.node()[n];for(t in n)this.each(O(t,n[t]));return this}return this.each(O(n,t))},zu.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},zu.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},zu.append=function(n){return n=U(n),this.select(function(){return this.appendChild(n.apply(this,arguments))})},zu.insert=function(n,t){return n=U(n),t=C(t),this.select(function(){return this.insertBefore(n.apply(this,arguments),t.apply(this,arguments)||null)})},zu.remove=function(){return this.each(F)},zu.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),g=new Array(f),d=new Array(u);if(t){var v,y=new s,m=new Array(u);for(r=-1;++r<u;)(i=n[r])&&(y.has(v=t.call(i,i.__data__,r))?d[r]=i:y.set(v,i),m[r]=v);for(r=-1;++r<f;)(i=y.get(v=t.call(e,o=e[r],r)))?i!==!0&&(p[r]=i,i.__data__=o):g[r]=I(o),y.set(v,!0);for(r=-1;++r<u;)r in m&&y.get(m[r])!==!0&&(d[r]=n[r])}else{for(r=-1;++r<h;)i=n[r],o=e[r],i?(i.__data__=o,p[r]=i):g[r]=I(o);for(;f>r;++r)g[r]=I(e[r]);for(;u>r;++r)d[r]=n[r]}g.update=p,g.parentNode=p.parentNode=d.parentNode=n.parentNode,a.push(g),l.push(p),c.push(d)}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=A([]),c=A([]);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},zu.datum=function(n){return arguments.length?this.property("__data__",n):this.property("__data__")},zu.filter=function(n){var t,e,r,i=[];"function"!=typeof n&&(n=H(n));for(var o=0,u=this.length;u>o;o++){i.push(t=[]),t.parentNode=(e=this[o]).parentNode;for(var a=0,l=e.length;l>a;a++)(r=e[a])&&n.call(r,r.__data__,a,o)&&t.push(r)}return A(i)},zu.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},zu.sort=function(n){n=Y.apply(this,arguments);for(var t=-1,e=this.length;++t<e;)this[t].sort(n);return this.order()},zu.each=function(n){return V(this,function(t,e,r){n.call(t,t.__data__,e,r)})},zu.call=function(n){var t=fu(arguments);return n.apply(t[0]=this,t),this},zu.empty=function(){return!this.node()},zu.node=function(){for(var n=0,t=this.length;t>n;n++)for(var e=this[n],r=0,i=e.length;i>r;r++){var o=e[r];if(o)return o}return null},zu.size=function(){var n=0;return V(this,function(){++n}),n};var Lu=[];cu.selection.enter=Z,cu.selection.enter.prototype=Lu,Lu.append=zu.append,Lu.empty=zu.empty,Lu.node=zu.node,Lu.call=zu.call,Lu.size=zu.size,Lu.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 A(u)},Lu.insert=function(n,t){return arguments.length<2&&(t=X(this)),zu.insert.call(this,n,t)},cu.select=function(t){var e;return"string"==typeof t?(e=[ku(t,hu)],e.parentNode=hu.documentElement):(e=[t],e.parentNode=n(t)),A([e])},cu.selectAll=function(n){var t;return"string"==typeof n?(t=fu(Au(n,hu)),t.parentNode=hu.documentElement):(t=fu(n),t.parentNode=null),A([t])},zu.on=function(n,t,e){var r=arguments.length;if(3>r){if("string"!=typeof n){2>r&&(t=!1);for(e in n)this.each(B(e,n[e],t));return this}if(2>r)return(r=this.node()["__on"+n])&&r._;e=!1}return this.each(B(n,t,e))};var ju=cu.map({mouseenter:"mouseover",mouseleave:"mouseout"});hu&&ju.forEach(function(n){"on"+n in hu&&ju.remove(n)});var Pu,Ru=0;cu.mouse=function(n){return J(n,N())};var Du=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;cu.touch=function(n,t,e){if(arguments.length<3&&(e=t,t=N().changedTouches),t)for(var r,i=0,o=t.length;o>i;++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,d);r&&(n=r[0]-M[0],e=r[1]-M[1],g|=n|e,M=r,p({type:"drag",x:r[0]+c[0],y:r[1]+c[1],dx:n,dy:e}))}function l(){t(h,d)&&(y.on(o+v,null).on(u+v,null),m(g),p({type:"dragend"}))}var c,s=this,f=cu.event.target.correspondingElement||cu.event.target,h=s.parentNode,p=r.of(s,arguments),g=0,d=n(),v=".drag"+(null==d?"":"-"+d),y=cu.select(e(f)).on(o+v,a).on(u+v,l),m=G(f),M=t(h,d);i?(c=i.apply(s,arguments),c=[c.x-M[0],c.y-M[1]]):c=[0,0],p({type:"dragstart"})}}var r=k(n,"drag","dragstart","dragend"),i=null,o=t(w,cu.mouse,e,"mousemove","mouseup"),u=t(K,cu.touch,M,"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=N().touches),t?fu(t).map(function(t){var e=J(n,t);return e.identifier=t.identifier,e}):[]};var Ou=1e-6,Uu=Ou*Ou,Fu=Math.PI,Iu=2*Fu,Hu=Iu-Ou,Yu=Fu/2,Vu=Fu/180,Zu=180/Fu,Xu=Math.SQRT2,Bu=2,$u=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(Uu>h)r=Math.log(c/u)/Xu,e=function(n){return[i+n*s,o+n*f,u*Math.exp(Xu*n*r)]};else{var p=Math.sqrt(h),g=(c*c-u*u+$u*h)/(2*u*Bu*p),d=(c*c-u*u-$u*h)/(2*c*Bu*p),v=Math.log(Math.sqrt(g*g+1)-g),y=Math.log(Math.sqrt(d*d+1)-d);r=(y-v)/Xu,e=function(n){var t=n*r,e=on(v),a=u/(Bu*p)*(e*un(Xu*t+v)-rn(v));return[i+a*s,o+a*f,u*e/on(Xu*t+v)]}}return e.duration=1e3*r,e},cu.behavior.zoom=function(){function n(n){n.on(q,f).on(Gu+".zoom",p).on("dblclick.zoom",g).on(j,h)}function t(n){return[(n[0]-_.x)/_.k,(n[1]-_.y)/_.k]}function r(n){return[n[0]*_.k+_.x,n[1]*_.k+_.y]}function i(n){_.k=Math.max(A[0],Math.min(A[1],n))}function o(n,t){t=r(t),_.x+=n[0]-t[0],_.y+=n[1]-t[1]}function u(t,e,r,u){t.__chart__={x:_.x,y:_.y,k:_.k},i(Math.pow(2,u)),o(v=e,r),t=cu.select(t),C>0&&(t=t.transition().duration(C)),t.call(n.event)}function a(){b&&b.domain(x.range().map(function(n){return(n-_.x)/_.k}).map(x.invert)),E&&E.domain(w.range().map(function(n){return(n-_.y)/_.k}).map(w.invert))}function l(n){z++||n({type:"zoomstart"})}function c(n){a(),n({type:"zoom",scale:_.k,translate:[_.x,_.y]})}function s(n){--z||(n({type:"zoomend"}),v=null)}function f(){function n(){a=1,o(cu.mouse(i),h),c(u)}function r(){f.on(T,null).on(L,null),p(a),s(u)}var i=this,u=P.of(i,arguments),a=0,f=cu.select(e(i)).on(T,n).on(L,r),h=t(cu.mouse(i)),p=G(i);Yl.call(i),l(u)}function h(){function n(){var n=cu.touches(g);return p=_.k,n.forEach(function(n){n.identifier in v&&(v[n.identifier]=t(n))}),n}function e(){var t=cu.event.target;cu.select(t).on(x,r).on(b,a),w.push(t);for(var e=cu.event.changedTouches,i=0,o=e.length;o>i;++i)v[e[i].identifier]=null;var l=n(),c=Date.now();if(1===l.length){if(500>c-M){var s=l[0];u(g,s,v[s.identifier],Math.floor(Math.log(_.k)/Math.LN2)+1),
S()}M=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(g);Yl.call(g);for(var a=0,l=u.length;l>a;++a,r=null)if(e=u[a],r=v[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)}M=null,o(n,t),c(d)}function a(){if(cu.event.touches.length){for(var t=cu.event.changedTouches,e=0,r=t.length;r>e;++e)delete v[t[e].identifier];for(var i in v)return void n()}cu.selectAll(w).on(m,null),E.on(q,f).on(j,h),N(),s(d)}var p,g=this,d=P.of(g,arguments),v={},y=0,m=".zoom-"+cu.event.changedTouches[0].identifier,x="touchmove"+m,b="touchend"+m,w=[],E=cu.select(g),N=G(g);e(),l(d),E.on(q,null).on(j,e)}function p(){var n=P.of(this,arguments);m?clearTimeout(m):(Yl.call(this),d=t(v=y||cu.mouse(this)),l(n)),m=setTimeout(function(){m=null,s(n)},50),S(),i(Math.pow(2,.002*Wu())*_.k),o(v,d),c(n)}function g(){var n=cu.mouse(this),e=Math.log(_.k)/Math.LN2;u(this,n,t(n),cu.event.shiftKey?Math.ceil(e)-1:Math.floor(e)+1)}var d,v,y,m,M,x,b,w,E,_={x:0,y:0,k:1},N=[960,500],A=Ju,C=250,z=0,q="mousedown.zoom",T="mousemove.zoom",L="mouseup.zoom",j="touchstart.zoom",P=k(n,"zoomstart","zoom","zoomend");return Gu||(Gu="onwheel"in hu?(Wu=function(){return-cu.event.deltaY*(cu.event.deltaMode?120:1)},"wheel"):"onmousewheel"in hu?(Wu=function(){return cu.event.wheelDelta},"mousewheel"):(Wu=function(){return-cu.event.detail},"MozMousePixelScroll")),n.event=function(n){n.each(function(){var n=P.of(this,arguments),t=_;Il?cu.select(this).transition().each("start.zoom",function(){_=this.__chart__||{x:0,y:0,k:1},l(n)}).tween("zoom:zoom",function(){var e=N[0],r=N[1],i=v?v[0]:e/2,o=v?v[1]:r/2,u=cu.interpolateZoom([(i-_.x)/_.k,(o-_.y)/_.k,e/_.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__=_={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__=_,l(n),c(n),s(n))})},n.translate=function(t){return arguments.length?(_={x:+t[0],y:+t[1],k:_.k},a(),n):[_.x,_.y]},n.scale=function(t){return arguments.length?(_={x:_.x,y:_.y,k:null},i(+t),a(),n):_.k},n.scaleExtent=function(t){return arguments.length?(A=null==t?Ju:[+t[0],+t[1]],n):A},n.center=function(t){return arguments.length?(y=t&&[+t[0],+t[1]],n):y},n.size=function(t){return arguments.length?(N=t&&[+t[0],+t[1]],n):N},n.duration=function(t){return arguments.length?(C=+t,n):C},n.x=function(t){return arguments.length?(b=t,x=t.copy(),_={x:0,y:0,k:1},n):b},n.y=function(t){return arguments.length?(E=t,w=t.copy(),_={x:0,y:0,k:1},n):E},cu.rebind(n,P,"on")};var Wu,Gu,Ju=[0,1/0];cu.color=ln,ln.prototype.toString=function(){return this.rgb()+""},cu.hsl=cn;var Ku=cn.prototype=new ln;Ku.brighter=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,this.l/n)},Ku.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new cn(this.h,this.s,n*this.l)},Ku.rgb=function(){return sn(this.h,this.s,this.l)},cu.hcl=fn;var Qu=fn.prototype=new ln;Qu.brighter=function(n){return new fn(this.h,this.c,Math.min(100,this.l+na*(arguments.length?n:1)))},Qu.darker=function(n){return new fn(this.h,this.c,Math.max(0,this.l-na*(arguments.length?n:1)))},Qu.rgb=function(){return hn(this.h,this.c,this.l).rgb()},cu.lab=pn;var na=18,ta=.95047,ea=1,ra=1.08883,ia=pn.prototype=new ln;ia.brighter=function(n){return new pn(Math.min(100,this.l+na*(arguments.length?n:1)),this.a,this.b)},ia.darker=function(n){return new pn(Math.max(0,this.l-na*(arguments.length?n:1)),this.a,this.b)},ia.rgb=function(){return gn(this.l,this.a,this.b)},cu.rgb=Mn;var oa=Mn.prototype=new ln;oa.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&&i>t&&(t=i),e&&i>e&&(e=i),r&&i>r&&(r=i),new Mn(Math.min(255,t/n),Math.min(255,e/n),Math.min(255,r/n))):new Mn(i,i,i)},oa.darker=function(n){return n=Math.pow(.7,arguments.length?n:1),new Mn(n*this.r,n*this.g,n*this.b)},oa.hsl=function(){return _n(this.r,this.g,this.b)},oa.toString=function(){return"#"+wn(this.r)+wn(this.g)+wn(this.b)};var ua=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});ua.forEach(function(n,t){ua.set(n,xn(t))}),cu.functor=An,cu.xhr=Cn(M),cu.dsv=function(n,t){function e(n,e,o){arguments.length<3&&(o=e,e=null);var u=zn(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(;c>s;){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(" ","text/tab-separated-values");var aa,la,ca,sa,fa=this[b(this,"requestAnimationFrame")]||function(n){setTimeout(n,17)};cu.timer=function(){Ln.apply(this,arguments)},cu.timer.flush=function(){Pn(),Rn()},cu.round=function(n,t){return t?Math.round(n*(t=Math.pow(10,t)))/t:Math.round(n)};var ha=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(On);cu.formatPrefix=function(n,t){var e=0;return(n=+n)&&(0>n&&(n*=-1),t&&(n=cu.round(n,Dn(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)))),ha[8+e/3]};var pa=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,ga=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,Dn(n,t))).toFixed(Math.max(0,Math.min(20,Dn(n*(1+1e-15),t))))}}),da=cu.time={},va=Date;In.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(){ya.setUTCDate.apply(this._,arguments)},setDay:function(){ya.setUTCDay.apply(this._,arguments)},setFullYear:function(){ya.setUTCFullYear.apply(this._,arguments)},setHours:function(){ya.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ya.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ya.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ya.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ya.setUTCSeconds.apply(this._,arguments)},setTime:function(){ya.setTime.apply(this._,arguments)}};var ya=Date.prototype;da.year=Hn(function(n){return n=da.day(n),n.setMonth(0,1),n},function(n,t){n.setFullYear(n.getFullYear()+t)},function(n){return n.getFullYear()}),da.years=da.year.range,da.years.utc=da.year.utc.range,da.day=Hn(function(n){var t=new va(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}),da.days=da.day.range,da.days.utc=da.day.utc.range,da.dayOfYear=function(n){var t=da.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=da[n]=Hn(function(n){return(n=da.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=da.year(n).getDay();return Math.floor((da.dayOfYear(n)+(e+t)%7)/7)-(e!==t)});da[n+"s"]=e.range,da[n+"s"].utc=e.utc.range,da[n+"OfYear"]=function(n){var e=da.year(n).getDay();return Math.floor((da.dayOfYear(n)+(e+t)%7)/7)}}),da.week=da.sunday,da.weeks=da.sunday.range,da.weeks.utc=da.sunday.utc.range,da.weekOfYear=da.sundayOfYear;var ma={"-":"",_:" ",0:"0"},Ma=/^\s*\d+/,xa=/^%/;cu.locale=function(n){return{numberFormat:Un(n),timeFormat:Vn(n)}};var ba=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=ba.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&&Ea.hasOwnProperty(n.type)?Ea[n.type](n,t):pt(n,t)};var Ea={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)}},_a={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){gt(n.coordinates,t,0)},MultiLineString:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)gt(e[r],t,0)},Polygon:function(n,t){dt(n.coordinates,t)},MultiPolygon:function(n,t){for(var e=n.coordinates,r=-1,i=e.length;++r<i;)dt(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 Sa=0,cu.geo.stream(n,ka),Sa};var Sa,Na=new ft,ka={sphere:function(){Sa+=4*Fu},point:w,lineStart:w,lineEnd:w,polygonStart:function(){Na.reset(),ka.lineStart=vt},polygonEnd:function(){var n=2*Na;Sa+=0>n?4*Fu+n:n,ka.lineStart=ka.lineEnd=ka.point=w}};cu.geo.bounds=function(){function n(n,t){M.push(x=[s=n,h=n]),f>t&&(f=t),t>p&&(p=t)}function t(t,e){var r=yt([t*Vu,e*Vu]);if(y){var i=Mt(y,r),o=[i[1],-i[0],0],u=Mt(o,i);wt(u),u=Et(u);var l=t-g,c=l>0?1:-1,d=u[0]*Zu*c,v=bu(l)>180;if(v^(d>c*g&&c*t>d)){var m=u[1]*Zu;m>p&&(p=m)}else if(d=(d+360)%360-180,v^(d>c*g&&c*t>d)){var m=-u[1]*Zu;f>m&&(f=m)}else f>e&&(f=e),e>p&&(p=e);v?g>t?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t):h>=s?(s>t&&(s=t),t>h&&(h=t)):t>g?a(s,t)>a(s,h)&&(h=t):a(t,h)>a(s,h)&&(s=t)}else n(t,e);y=r,g=t}function e(){b.point=t}function r(){x[0]=s,x[1]=h,b.point=n,y=null}function i(n,e){if(y){var r=n-g;m+=bu(r)>180?r+(r>0?360:-360):r}else d=n,v=e;ka.point(n,e),t(n,e)}function o(){ka.lineStart()}function u(){i(d,v),ka.lineEnd(),bu(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,g,d,v,y,m,M,x,b={point:n,lineStart:e,lineEnd:r,polygonStart:function(){b.point=i,b.lineStart=o,b.lineEnd=u,m=0,ka.polygonStart()},polygonEnd:function(){ka.polygonEnd(),b.point=n,b.lineStart=e,b.lineEnd=r,0>Na?(s=-(h=180),f=-(p=90)):m>Ou?p=90:-Ou>m&&(f=-90),x[0]=s,x[1]=h}};return function(n){p=h=-(s=f=1/0),M=[],cu.geo.stream(n,b);var t=M.length;if(t){M.sort(l);for(var e,r=1,i=M[0],o=[i];t>r;++r)e=M[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,g=-(1/0),t=o.length-1,r=0,i=o[t];t>=r;i=e,++r)e=o[r],(u=a(i[1],e[0]))>g&&(g=u,s=e[0],h=i[1])}return M=x=null,s===1/0||f===1/0?[[NaN,NaN],[NaN,NaN]]:[[s,f],[h,p]]}}(),cu.geo.centroid=function(n){Aa=Ca=za=qa=Ta=La=ja=Pa=Ra=Da=Oa=0,cu.geo.stream(n,Ua);var t=Ra,e=Da,r=Oa,i=t*t+e*e+r*r;return Uu>i&&(t=La,e=ja,r=Pa,Ou>Ca&&(t=za,e=qa,r=Ta),i=t*t+e*e+r*r,Uu>i)?[NaN,NaN]:[Math.atan2(e,t)*Zu,en(r/Math.sqrt(i))*Zu]};var Aa,Ca,za,qa,Ta,La,ja,Pa,Ra,Da,Oa,Ua={sphere:w,point:St,lineStart:kt,lineEnd:At,polygonStart:function(){Ua.lineStart=Ct},polygonEnd:function(){Ua.lineStart=kt}},Fa=Pt(qt,Ut,It,[-Fu,-Fu/2]),Ia=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 Xt(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&&.234>i&&r>=-.425&&-.214>r?u:i>=.166&&.234>i&&r>=-.214&&-.115>r?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 Ha,Ya,Va,Za,Xa,Ba,$a={point:w,lineStart:w,lineEnd:w,polygonStart:function(){Ya=0,$a.lineStart=$t},polygonEnd:function(){$a.lineStart=$a.lineEnd=$a.point=w,Ha+=bu(Ya/2)}},Wa={point:Wt,lineStart:w,lineEnd:w,polygonStart:w,polygonEnd:w},Ga={point:Kt,lineStart:Qt,lineEnd:ne,polygonStart:function(){Ga.lineStart=te},polygonEnd:function(){Ga.point=Kt,Ga.lineStart=Qt,Ga.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 Ha=0,cu.geo.stream(n,i($a)),Ha},n.centroid=function(n){return za=qa=Ta=La=ja=Pa=Ra=Da=Oa=0,cu.geo.stream(n,i(Ga)),Oa?[Ra/Oa,Da/Oa]:Pa?[La/Pa,ja/Pa]:Ta?[za/Ta,qa/Ta]:[NaN,NaN]},n.bounds=function(n){return Xa=Ba=-(Va=Za=1/0),cu.geo.stream(n,i(Wa)),[[Va,Za],[Xa,Ba]]},n.projection=function(n){return arguments.length?(i=(e=n)?n.stream||ie(n):M,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]*=Zu,t[1]*=Zu,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]*=Zu,t[1]*=Zu,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]*=Zu,n[1]*=Zu}}),{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=ve((t=+r)*Vu,i*Vu),n):t},n.precision=function(r){return arguments.length?(e=ve(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/v)*v,i,v).map(h).concat(cu.range(Math.ceil(c/y)*y,l,y).map(p)).concat(cu.range(Math.ceil(r/g)*g,e,g).filter(function(n){return bu(n%v)>Ou}).map(s)).concat(cu.range(Math.ceil(a/d)*d,u,d).filter(function(n){return bu(n%y)>Ou}).map(f))}var e,r,i,o,u,a,l,c,s,f,h,p,g=10,d=g,v=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?(v=+t[0],y=+t[1],n):[v,y]},n.minorStep=function(t){return arguments.length?(g=+t[0],d=+t[1],n):[g,d]},n.precision=function(t){return arguments.length?(m=+t,s=me(a,u,90),f=Me(r,e,m),h=me(c,l,90),p=Me(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=be;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 we(n[0]*Vu,n[1]*Vu,t[0]*Vu,t[1]*Vu)},cu.geo.length=function(n){return Ja=0,cu.geo.stream(n,Ka),Ja};var Ja,Ka={sphere:w,point:w,lineStart:Ee,lineEnd:w,polygonStart:w,polygonEnd:w},Qa=_e(function(n){return Math.sqrt(2/(1+n))},function(n){return 2*Math.asin(n/2)});(cu.geo.azimuthalEqualArea=function(){return ae(Qa)}).raw=Qa;var nl=_e(function(n){var t=Math.acos(n);return t&&t/Math.sin(t)},M);(cu.geo.azimuthalEquidistant=function(){return ae(nl)}).raw=nl,(cu.geo.conicConformal=function(){return Xt(Se)}).raw=Se,(cu.geo.conicEquidistant=function(){return Xt(Ne)}).raw=Ne;var tl=_e(function(n){return 1/n},Math.atan);(cu.geo.gnomonic=function(){return ae(tl)}).raw=tl,ke.invert=function(n,t){return[n,2*Math.atan(Math.exp(t))-Yu]},(cu.geo.mercator=function(){return Ae(ke)}).raw=ke;var el=_e(function(){return 1},Math.asin);(cu.geo.orthographic=function(){return ae(el)}).raw=el;var rl=_e(function(n){return 1/(1+n)},function(n){return 2*Math.atan(n)});(cu.geo.stereographic=function(){return ae(rl)}).raw=rl,Ce.invert=function(n,t){return[-t,2*Math.atan(Math.exp(n))-Yu]},(cu.geo.transverseMercator=function(){var n=Ae(Ce),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=Ce,cu.geom={},cu.geom.hull=function(n){function t(n){if(n.length<3)return[];var t,i=An(e),o=An(r),u=n.length,a=[],l=[];for(t=0;u>t;t++)a.push([+i.call(this,n[t],t),+o.call(this,n[t],t),t]);for(a.sort(Le),t=0;u>t;t++)l.push([a[t][0],-a[t][1]]);var c=Te(a),s=Te(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=ze,r=qe;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 Nu(n,il),n};var il=cu.geom.polygon.prototype=[];il.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},il.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]},il.clip=function(n){for(var t,e,r,i,o,u,a=Re(n),l=-1,c=this.length-Re(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(Pe(o,u,s,i)),n.push(u)):je(o,s,i)&&n.push(Pe(o,u,s,i)),o=u;a&&n.push(n[0]),s=i}return n};var ol,ul,al,ll,cl,sl=[],fl=[];Ve.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(Xe),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,s=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]]:[];s.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=ze,i=qe,o=r,u=i,a=hl;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,u=e.site,a=e.edges.sort(Xe),l=-1,c=a.length,s=a[c-1].edge,f=s.l===u?s.r:s.l;++l<c;)i=s,o=f,s=a[l].edge,f=s.l===u?s.r:s.l,r<o.i&&r<f.i&&sr(u,o,f)<0&&t.push([n[r],n[o.i],n[f.i]])}),t},t.x=function(n){return arguments.length?(o=An(r=n),t):r},t.y=function(n){return arguments.length?(u=An(i=n),t):i},t.clipExtent=function(n){return arguments.length?(a=null==n?hl:n,t):a===hl?null:a},t.size=function(n){return arguments.length?t.clipExtent(n&&[[0,0],n]):a===hl?null:a&&a[1]},t)};var hl=[[-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(bu(l-e)+bu(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,g,d,v,y,m,M=An(a),x=An(l);if(null!=t)d=t,v=e,y=r,m=i;else if(y=m=-(d=v=1/0),f=[],h=[],g=n.length,u)for(p=0;g>p;++p)s=n[p],s.x<d&&(d=s.x),s.y<v&&(v=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;g>p;++p){var b=+M(s=n[p],p),w=+x(s,p);d>b&&(d=b),v>w&&(v=w),b>y&&(y=b),w>m&&(m=w),f.push(b),h.push(w)}var E=y-d,_=m-v;E>_?m=v+E:y=d+_;var S=pr();if(S.add=function(n){o(S,n,+M(n,++p),+x(n,p),d,v,y,m)},S.visit=function(n){gr(n,S,d,v,y,m)},S.find=function(n){return dr(S,n[0],n[1],d,v,y,m)},p=-1,null==t){for(;++p<g;)o(S,n[p],f[p],h[p],d,v,y,m);--p}else n.forEach(S.add);return f=h=n=s=null,S}var u,a=ze,l=qe;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=vr,cu.interpolateObject=yr,cu.interpolateNumber=mr,cu.interpolateString=Mr;var pl=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gl=new RegExp(pl.source,"g");cu.interpolate=xr,cu.interpolators=[function(n,t){var e=typeof t;return("string"===e?ua.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?vr:Mr:t instanceof ln?vr:Array.isArray(t)?br:"object"===e&&isNaN(t)?yr:mr)(n,t)}],cu.interpolateArray=br;var dl=function(){return M},vl=cu.map({linear:dl,poly:Ar,quad:function(){return Sr},cubic:function(){return Nr},sin:function(){return Cr},exp:function(){return zr},circle:function(){return qr},elastic:Tr,back:Lr,bounce:function(){return jr}}),yl=cu.map({"in":M,out:Er,"in-out":_r,"out-in":function(n){return _r(Er(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=vl.get(e)||dl,r=yl.get(r)||M,wr(r(e.apply(null,su.call(arguments,1))))},cu.interpolateHcl=Pr,cu.interpolateHsl=Rr,cu.interpolateLab=Dr,cu.interpolateRound=Or,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:ml)})(n)},Ur.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var ml={a:1,b:0,c:0,d:1,e:0,f:0};cu.interpolateTransform=$r,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,g={},d=[],v=cu.range(o),y=[];for(e=[],r=[],n=0,h=-1;++h<o;){for(c=0,p=-1;++p<o;)c+=i[h][p];d.push(c),y.push(cu.range(o)),n+=c}for(u&&v.sort(function(n,t){return u(d[n],d[t])}),a&&y.forEach(function(n,t){n.sort(function(n,e){return a(i[t][n],i[t][e])})}),n=(Iu-s*o)/n,c=0,h=-1;++h<o;){for(f=c,p=-1;++p<o;){var m=v[h],M=y[m][p],x=i[m][M],b=c,w=c+=x*n;g[m+"-"+M]={index:m,subindex:M,startAngle:b,endAngle:w,value:x}}r[m]={index:m,startAngle:f,endAngle:c,value:d[m]},c+=s}for(h=-1;++h<o;)for(p=h-1;++p<o;){var E=g[h+"-"+p],_=g[p+"-"+h];(E.value||_.value)&&e.push(E.value<_.value?{source:_,target:E}:{source:E,target:_})}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(l>a*a/y){if(d>l){var c=t.charge/l;n.px-=o*c,n.py-=u*c}return!0}if(t.point&&l&&d>l){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=Ml,p=xl,g=-30,d=bl,v=.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,d,y,M,b,w=m.length,E=x.length;for(r=0;E>r;++r)l=x[r],h=l.source,p=l.target,M=p.x-h.x,b=p.y-h.y,(d=M*M+b*b)&&(d=i*u[r]*((d=Math.sqrt(d))-o[r])/d,M*=d,b*=d,p.x-=M*(y=h.weight+p.weight?h.weight/(h.weight+p.weight):.5),p.y-=b*y,h.x+=M*(y=1-y),h.y+=b*y);if((y=i*v)&&(M=s[0]/2,b=s[1]/2,r=-1,y))for(;++r<w;)l=m[r],l.x+=(M-l.x)*y,l.y+=(b-l.y)*y;if(g)for(ii(t=cu.geom.quadtree(m),i,a),r=-1;++r<w;)(l=m[r]).fixed||t.visit(n(l));for(r=-1;++r<w;)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?(g="function"==typeof n?n:+n,l):g},l.chargeDistance=function(n){return arguments.length?(d=n*n,l):Math.sqrt(d)},l.gravity=function(n){return arguments.length?(v=+n,l):v},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.end({type:"end",alpha:i=0})):n>0&&(c.start({type:"start",alpha:i=n}),e=Ln(l.tick)),l):i},l.start=function(){function n(n,r){if(!e){for(e=new Array(i),l=0;i>l;++l)e[l]=[];for(l=0;c>l;++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],d=s[1];for(t=0;i>t;++t)(r=m[t]).index=t,r.weight=0;for(t=0;c>t;++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;i>t;++t)r=m[t],isNaN(r.x)&&(r.x=n("x",f)),isNaN(r.y)&&(r.y=n("y",d)),isNaN(r.px)&&(r.px=r.x),isNaN(r.py)&&(r.py=r.y);if(o=[],"function"==typeof h)for(t=0;c>t;++t)o[t]=+h.call(this,x[t],t);else for(t=0;c>t;++t)o[t]=h;if(u=[],"function"==typeof p)for(t=0;c>t;++t)u[t]=+p.call(this,x[t],t);else for(t=0;c>t;++t)u[t]=p;if(a=[],"function"==typeof g)for(t=0;i>t;++t)a[t]=+g.call(this,m[t],t);else for(t=0;i>t;++t)a[t]=g;return l.resume()},l.resume=function(){return l.alpha(.1)},l.stop=function(){return l.alpha(0)},l.drag=function(){return r||(r=cu.behavior.drag().origin(M).on("dragstart.force",ni).on("drag.force",t).on("dragend.force",ti)),arguments.length?void this.on("mouseover.force",ei).on("mouseout.force",ri).call(r):r},cu.rebind(l,c,"on")};var Ml=20,xl=1,bl=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*(0>f?-1:1),g=cu.sum(c),d=g?(f-l*p)/g:0,v=cu.range(l),y=[];return null!=e&&v.sort(e===wl?function(n,t){return c[t]-c[n]}:function(n,t){return e(u[n],u[t])}),v.forEach(function(n){y[n]={data:u[n],value:a=c[n],startAngle:s,endAngle:s+=a*d+p,padAngle:h}}),y}var t=Number,e=wl,r=0,i=Iu,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,g,d,v=r.call(n,s,l),y=c[0].length;for(g=0;y>g;++g)for(i.call(n,c[0][g],d=v[g],s[0][g][1]),p=1;h>p;++p)i.call(n,c[p][g],d+=s[p-1][g][1],s[p][g][1]);return a}var t=M,e=di,r=vi,i=gi,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:El.get(t)||di,n):e},n.offset=function(t){return arguments.length?(r="function"==typeof t?t:_l.get(t)||vi,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 El=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;r>t;++t)e=u[t],l>a?(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":di}),_l=cu.map({silhouette:function(n){var t,e,r,i=n.length,o=n[0].length,u=[],a=0,l=[];for(e=0;o>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];r>a&&(a=r),u.push(r)}for(e=0;o>e;++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;h>e;++e){for(t=0,i=0;s>t;++t)i+=n[t][e][1];for(t=0,o=0,a=f[e][0]-f[e-1][0];s>t;++t){for(r=0,u=(n[t][e][1]-n[t][e-1][1])/(2*a);t>r;++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,c>l&&(c=l)}for(e=0;h>e;++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;o>e;++e){for(t=0,r=0;i>t;t++)r+=n[t][e][1];if(r)for(t=0;i>t;t++)n[t][e][1]/=r;else for(t=0;i>t;t++)n[t][e][1]=u}for(e=0;o>e;++e)a[e]=0;return a},zero:vi});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,g=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],a>=s[0]&&a<=s[1]&&(u=l[cu.bisect(f,a,1,p)-1],u.y+=g,u.push(n[o]));return l}var t=!0,e=Number,r=wi,i=xi;return n.value=function(t){return arguments.length?(e=t,n):e},n.range=function(t){return arguments.length?(r=An(t),n):r},n.bins=function(t){return arguments.length?(i="number"==typeof t?function(n){return bi(n,t)}:An(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,ki),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,ki),ai(a,function(n){n.r-=f})}return zi(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(Ei),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,g=f,d=f;ui(f,function(n){n.x<p.x&&(p=n),n.x>g.x&&(g=n),n.depth>d.depth&&(d=n)});var v=a(p,g)/2-p.x,y=l[0]/(g.x+a(g,p)/2+v),m=l[1]/(d.depth||1);ui(f,function(n){n.x=(n.x+v)*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;a>u;++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){Ri(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=Li(i),u&&i;)l=Li(l),o=ji(o),o.a=n,r=u.z+f-i.z-c+a(u._,i._),r>0&&(Pi(Di(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&&!Li(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=Ti,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=Oi(t)):(n.x=u?c+=e(n,u):0,n.y=0,u=n)});var s=Fi(l),f=Ii(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=Ti,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*(0>t?0:t),e.area=isNaN(r)||0>=r?0:r}function t(e){var o=e.children;if(o&&o.length){var u,a,l,c=f(e),s=[],h=o.slice(),g=1/0,d="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,d))<=g?(h.pop(),g=a):(s.area-=s.pop().area,i(s,d,c,!1),d=Math.min(c.dx,c.dy),s.length=s.area=0,g=1/0);s.length&&(i(s,d,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)&&(o>e&&(o=e),e>i&&(i=e));return r*=r,t*=t,r?Math.max(t*i*g/r,r/(t*o*g)):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",g=.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):Yi(t,"number"==typeof e?[e,e,e,e]:e)}function e(t){return Yi(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?(g=n,o):g},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 2>e&&(t=1),1>e&&(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;n>e;e++)t+=Math.random();return t}}},cu.scale={};var Sl={floor:M,ceil:M};cu.scale.linear=function(){return Gi([0,1],[0,1],xr,!1)};var Nl={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"),Al={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(Cl)},cu.scale.category20=function(){return cu.scale.ordinal().range(zl)},cu.scale.category20b=function(){return cu.scale.ordinal().range(ql)},cu.scale.category20c=function(){return cu.scale.ordinal().range(Tl)};var Cl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(bn),zl=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(bn),ql=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(bn),Tl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(bn);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)-Yu,f=a.apply(this,arguments)-Yu,h=Math.abs(f-s),p=s>f?0:1;if(n>c&&(g=c,c=n,n=g),h>=Hu)return t(c,p)+(n?t(n,1-p):"")+"Z";var g,d,v,y,m,M,x,b,w,E,_,S,N=0,k=0,A=[];if((y=(+l.apply(this,arguments)||0)/2)&&(v=o===Ll?Math.sqrt(n*n+c*c):+o.apply(this,arguments),p||(k*=-1),c&&(k=en(v/c*Math.sin(y))),n&&(N=en(v/n*Math.sin(y)))),c){m=c*Math.cos(s+k),M=c*Math.sin(s+k),x=c*Math.cos(f-k),b=c*Math.sin(f-k);var C=Math.abs(f-s-2*k)<=Fu?0:1;if(k&&Mo(m,M,x,b)===p^C){var z=(s+f)/2;m=c*Math.cos(z),M=c*Math.sin(z),x=b=null}}else m=M=0;if(n){w=n*Math.cos(f-N),E=n*Math.sin(f-N),_=n*Math.cos(s+N),S=n*Math.sin(s+N);var q=Math.abs(s-f+2*N)<=Fu?0:1;if(N&&Mo(w,E,_,S)===1-p^q){var T=(s+f)/2;w=n*Math.cos(T),E=n*Math.sin(T),_=S=null}}else w=E=0;if(h>Ou&&(g=Math.min(Math.abs(c-n)/2,+i.apply(this,arguments)))>.001){d=c>n^p?0:1;var L=g,j=g;if(Fu>h){var P=null==_?[w,E]:null==x?[m,M]:Pe([m,M],[_,S],[x,b],[w,E]),R=m-P[0],D=M-P[1],O=x-P[0],U=b-P[1],F=1/Math.sin(Math.acos((R*O+D*U)/(Math.sqrt(R*R+D*D)*Math.sqrt(O*O+U*U)))/2),I=Math.sqrt(P[0]*P[0]+P[1]*P[1]);j=Math.min(g,(n-I)/(F-1)),L=Math.min(g,(c-I)/(F+1))}if(null!=x){var H=xo(null==_?[w,E]:[_,S],[m,M],c,L,p),Y=xo([x,b],[w,E],c,L,p);g===L?A.push("M",H[0],"A",L,",",L," 0 0,",d," ",H[1],"A",c,",",c," 0 ",1-p^Mo(H[1][0],H[1][1],Y[1][0],Y[1][1]),",",p," ",Y[1],"A",L,",",L," 0 0,",d," ",Y[0]):A.push("M",H[0],"A",L,",",L," 0 1,",d," ",Y[0])}else A.push("M",m,",",M);if(null!=_){var V=xo([m,M],[_,S],n,-j,p),Z=xo([w,E],null==x?[m,M]:[x,b],n,-j,p);g===j?A.push("L",Z[0],"A",j,",",j," 0 0,",d," ",Z[1],"A",n,",",n," 0 ",p^Mo(Z[1][0],Z[1][1],V[1][0],V[1][1]),",",1-p," ",V[1],"A",j,",",j," 0 0,",d," ",V[0]):A.push("L",Z[0],"A",j,",",j," 0 0,",d," ",V[0])}else A.push("L",w,",",E)}else A.push("M",m,",",M),null!=x&&A.push("A",c,",",c," 0 ",C,",",p," ",x,",",b),A.push("L",w,",",E),null!=_&&A.push("A",n,",",n," 0 ",q,",",1-p," ",_,",",S);return A.push("Z"),A.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=go,i=ho,o=Ll,u=vo,a=yo,l=mo;return n.innerRadius=function(t){return arguments.length?(e=An(t),n):e},n.outerRadius=function(t){return arguments.length?(r=An(t),n):r},n.cornerRadius=function(t){return arguments.length?(i=An(t),n):i},n.padRadius=function(t){return arguments.length?(o=t==Ll?Ll:An(t),n):o},n.startAngle=function(t){return arguments.length?(u=An(t),n):u},n.endAngle=function(t){return arguments.length?(a=An(t),n):a},n.padAngle=function(t){return arguments.length?(l=An(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-Yu;return[Math.cos(t)*n,Math.sin(t)*n]},n};var Ll="auto";cu.svg.line=function(){return bo(M)};var jl=cu.map({linear:wo,"linear-closed":Eo,step:_o,"step-before":So,"step-after":No,basis:To,"basis-open":Lo,"basis-closed":jo,bundle:Po,cardinal:Co,"cardinal-open":ko,"cardinal-closed":Ao,monotone:Io});jl.forEach(function(n,t){t.key=n,t.closed=/-closed$/.test(n)});var Pl=[0,2/3,1/3,0],Rl=[0,1/3,2/3,0],Dl=[0,1/6,2/3,1/6];cu.svg.line.radial=function(){var n=bo(Ho);return n.radius=n.x,delete n.x,n.angle=n.y,delete n.y,n},So.reverse=No,No.reverse=So,cu.svg.area=function(){return Yo(M)},cu.svg.area.radial=function(){var n=Yo(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)-Yu,s=c.call(n,i,r)-Yu;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>Fu)+",1 "+t}function i(n,t,e,r){return"Q 0,0 "+r}var o=xe,u=be,a=Vo,l=vo,c=yo;return n.radius=function(t){return arguments.length?(a=An(t),n):a},n.source=function(t){return arguments.length?(o=An(t),n):o},n.target=function(t){return arguments.length?(u=An(t),n):u},n.startAngle=function(t){return arguments.length?(l=An(t),n):l},n.endAngle=function(t){return arguments.length?(c=An(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=be,r=Zo;return n.source=function(e){return arguments.length?(t=An(e),n):t},n.target=function(t){return arguments.length?(e=An(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(Xo(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=$o,e=Bo;return n.type=function(e){return arguments.length?(t=An(e),n):t},n.size=function(t){return arguments.length?(e=An(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*Fl)),e=t*Fl;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/Ul),e=t*Ul/2;return"M0,"+e+"L"+t+","+-e+" "+-t+","+-e+"Z"},"triangle-up":function(n){var t=Math.sqrt(n/Ul),e=t*Ul/2;return"M0,"+-e+"L"+t+","+e+" "+-t+","+e+"Z"}});cu.svg.symbolTypes=Ol.keys();var Ul=Math.sqrt(3),Fl=Math.tan(30*Vu);zu.transition=function(n){for(var t,e,r=Il||++Zl,i=nu(n),o=[],u=Hl||{time:Date.now(),ease:kr,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)},zu.interrupt=function(n){return this.each(null==n?Yl:Go(nu(n)))};var Il,Hl,Yl=Go(nu()),Vl=[],Zl=0;Vl.call=zu.call,Vl.empty=zu.empty,Vl.node=zu.node,Vl.size=zu.size,cu.transition=function(n,t){return n&&n.transition?Il?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=C(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=z(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 g=-1,d=e.length;++g<d;)(i=e[g])&&tu(i,g,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;u>o;o++){i.push(t=[]);for(var e=this[o],a=0,l=e.length;l>a;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):V(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?$r:xr,a=cu.ns.qualify(n);return Ko(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(3>u){if("string"!=typeof n){2>u&&(t="");for(r in n)this.style(r,n[r],t);return this}r=""}return Ko(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 Ko(this,"text",n,Qo)},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)),V(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:V(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:V(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=Hl,o=Il;try{Il=e,V(this,function(t,i,o){Hl=t[r][e],n.call(t,t.__data__,i,o)})}finally{Hl=i,Il=o}}else V(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=++Zl,u=this.namespace,a=[],l=0,c=this.length;c>l;l++){a.push(n=[]);for(var t=this[l],s=0,f=t.length;f>s;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):M:t,g=c.selectAll(".tick").data(h,f),d=g.enter().insert("g",".domain").attr("class","tick").style("opacity",Ou),v=cu.transition(g.exit()).style("opacity",Ou).remove(),y=cu.transition(g.order()).style("opacity",1),m=Math.max(i,0)+u,x=Zi(f),b=c.selectAll(".domain").data([0]),w=(b.enter().append("path").attr("class","domain"),cu.transition(b));d.append("line"),d.append("text");var E,_,S,N,k=d.select("line"),A=y.select("line"),C=g.select("text").text(p),z=d.select("text"),q=y.select("text"),T="top"===r||"left"===r?-1:1;if("bottom"===r||"top"===r?(n=eu,E="x",S="y",_="x2",N="y2",C.attr("dy",0>T?"0em":".71em").style("text-anchor","middle"),w.attr("d","M"+x[0]+","+T*o+"V0H"+x[1]+"V"+T*o)):(n=ru,E="y",S="x",_="y2",N="x2",C.attr("dy",".32em").style("text-anchor",0>T?"end":"start"),w.attr("d","M"+T*o+","+x[0]+"H0V"+x[1]+"H"+T*o)),k.attr(N,T*i),z.attr(S,T*m),A.attr(_,0).attr(N,T*i),q.attr(E,0).attr(S,T*m),f.rangeBand){var L=f,j=L.rangeBand()/2;s=f=function(n){return L(n)+j}}else s.rangeBand?s=f:v.call(n,f,s);d.call(n,s,f),y.call(n,f,f)})}var t,e=cu.scale.linear(),r=Xl,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 Bl?t+"":Xl,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 Xl="bottom",Bl={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(d,M);a.exit().remove(),a.enter().append("g").attr("class",function(n){return"resize "+n}).style("cursor",function(n){return $l[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&&(C||(M=null,q[0]-=f[1],q[1]-=h[1],C=2),S())}function d(){32==cu.event.keyCode&&2==C&&(q[0]+=f[1],q[1]+=h[1],C=0,S())}function v(){var n=cu.mouse(b),e=!1;x&&(n[0]+=x[0],n[1]+=x[1]),C||(cu.event.altKey?(M||(M=[(f[0]+f[1])/2,(h[0]+h[1])/2]),q[0]=f[+(n[0]<M[0])],q[1]=h[+(n[1]<M[1])]):M=null),k&&y(n,c,0)&&(r(_),e=!0),A&&y(n,s,1)&&(i(_),e=!0),e&&(t(_),E({type:"brush",mode:C?"move":"resize"}))}function y(n,t,e){var r,i,o=Zi(t),l=o[0],c=o[1],s=q[e],d=e?h:f,v=d[1]-d[0];return C&&(l-=s,c-=v+s),r=(e?g:p)?Math.max(l,Math.min(c,n[e])):n[e],C?i=(r+=s)+v:(M&&(s=Math.max(l,Math.min(c,2*M[e]-r))),r>s?(i=r,r=s):i=s),d[0]!=r||d[1]!=i?(e?a=null:u=null,d[0]=r,d[1]=i,!0):void 0}function m(){v(),_.style("pointer-events","all").selectAll(".resize").style("display",n.empty()?"none":null),cu.select("body").style("cursor",null),T.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),z(),E({type:"brushend"})}var M,x,b=this,w=cu.select(cu.event.target),E=l.of(b,arguments),_=cu.select(b),N=w.datum(),k=!/^(n|s)$/.test(N)&&c,A=!/^(e|w)$/.test(N)&&s,C=w.classed("extent"),z=G(b),q=cu.mouse(b),T=cu.select(e(b)).on("keydown.brush",o).on("keyup.brush",d);if(cu.event.changedTouches?T.on("touchmove.brush",v).on("touchend.brush",m):T.on("mousemove.brush",v).on("mouseup.brush",m),_.interrupt().selectAll("*").interrupt(),C)q[0]=f[0]-q[0],q[1]=h[0]-q[1];else if(N){var L=+/w$/.test(N),j=+/^n/.test(N);x=[f[1-L]-q[0],h[1-j]-q[1]],q[0]=f[L],q[1]=h[j]}else cu.event.altKey&&(M=q.slice());_.style("pointer-events","none").selectAll(".resize").style("display",null),cu.select("body").style("cursor",w.style("cursor")),E({type:"brushstart"}),v()}var u,a,l=k(n,"brushstart","brush","brushend"),c=null,s=null,f=[0,0],h=[0,0],p=!0,g=!0,d=Wl[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,Il?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=br(f,t.x),r=br(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,d=Wl[!c<<1|!s],n):c},n.y=function(t){return arguments.length?(s=t,d=Wl[!c<<1|!s],n):s},n.clamp=function(t){return arguments.length?(c&&s?(p=!!t[0],g=!!t[1]):c?p=!!t:s&&(g=!!t),n):c&&s?[p,g]:c?p:s?g: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)),e>r&&(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)),i>o&&(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)),e>r&&(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)),i>o&&(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 $l={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Wl=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],Gl=da.format=ba.timeFormat,Jl=Gl.utc,Kl=Jl("%Y-%m-%dT%H:%M:%S.%LZ");Gl.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?iu:Kl,iu.parse=function(n){var t=new Date(n);return isNaN(t)?null:t},iu.toString=Kl.toString,da.second=Hn(function(n){return new va(1e3*Math.floor(n/1e3))},function(n,t){n.setTime(n.getTime()+1e3*Math.floor(t))},function(n){return n.getSeconds()}),da.seconds=da.second.range,da.seconds.utc=da.second.utc.range,da.minute=Hn(function(n){return new va(6e4*Math.floor(n/6e4))},function(n,t){n.setTime(n.getTime()+6e4*Math.floor(t))},function(n){return n.getMinutes()}),da.minutes=da.minute.range,da.minutes.utc=da.minute.utc.range,da.hour=Hn(function(n){var t=n.getTimezoneOffset()/60;return new va(36e5*(Math.floor(n/36e5-t)+t))},function(n,t){n.setTime(n.getTime()+36e5*Math.floor(t))},function(n){return n.getHours()}),da.hours=da.hour.range,da.hours.utc=da.hour.utc.range,da.month=Hn(function(n){return n=da.day(n),n.setDate(1),n},function(n,t){n.setMonth(n.getMonth()+t)},function(n){return n.getMonth()}),da.months=da.month.range,da.months.utc=da.month.utc.range;var Ql=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],nc=[[da.second,1],[da.second,5],[da.second,15],[da.second,30],[da.minute,1],[da.minute,5],[da.minute,15],[da.minute,30],[da.hour,1],[da.hour,3],[da.hour,6],[da.hour,12],[da.day,1],[da.day,2],[da.week,1],[da.month,1],[da.month,3],[da.year,1]],tc=Gl.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",qt]]),ec={range:function(n,t,e){return cu.range(Math.ceil(n/e)*e,+t,e).map(uu)},floor:M,ceil:M};nc.year=da.year,da.scale=function(){return ou(cu.scale.linear(),nc,tc)};var rc=nc.map(function(n){return[n[0].utc,n[1]]}),ic=Jl.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",qt]]);rc.year=da.year.utc,da.scale.utc=function(){return ou(cu.scale.linear(),rc,ic)},cu.text=Cn(function(n){return n.responseText}),cu.json=function(n,t){return zn(n,"application/json",au,t)},cu.html=function(n,t){return zn(n,"text/html",lu,t)},cu.xml=Cn(function(n){return n.responseXML}),"function"==typeof define&&define.amd?(this.d3=cu,define(cu)):"object"==typeof t&&t.exports?t.exports=cu:this.d3=cu}()},{}],7:[function(n,t,e){function r(n,t,e,r,o){var u=i.apply(this,arguments);return n.addEventListener(e,u,o),{destroy:function(){n.removeEventListener(e,u,o)}}}function i(n,t,e,r){return function(e){e.delegateTarget=o(e.target,t,!0),e.delegateTarget&&r.call(n,e)}}var o=n("closest");t.exports=r},{closest:4}],8:[function(n,t,e){e.node=function(n){return void 0!==n&&n instanceof HTMLElement&&1===n.nodeType},e.nodeList=function(n){var t=Object.prototype.toString.call(n);return void 0!==n&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in n&&(0===n.length||e.node(n[0]))},e.string=function(n){return"string"==typeof n||n instanceof String},e.fn=function(n){var t=Object.prototype.toString.call(n);return"[object Function]"===t}},{}],9:[function(n,t,e){function r(n,t,e){if(!n&&!t&&!e)throw new Error("Missing required arguments");if(!a.string(t))throw new TypeError("Second argument must be a String");if(!a.fn(e))throw new TypeError("Third argument must be a Function");if(a.node(n))return i(n,t,e);if(a.nodeList(n))return o(n,t,e);if(a.string(n))return u(n,t,e);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function i(n,t,e){return n.addEventListener(t,e),{destroy:function(){n.removeEventListener(t,e)}}}function o(n,t,e){return Array.prototype.forEach.call(n,function(n){n.addEventListener(t,e)}),{destroy:function(){Array.prototype.forEach.call(n,function(n){n.removeEventListener(t,e)})}}}function u(n,t,e){return l(document.body,n,t,e)}var a=n("./is"),l=n("delegate");t.exports=r},{"./is":8,delegate:7}],10:[function(n,t,e){function r(n,t){if(o)return o.call(n,t);for(var e=n.parentNode.querySelectorAll(t),r=0;r<e.length;++r)if(e[r]==n)return!0;return!1}var i=Element.prototype,o=i.matchesSelector||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector||i.oMatchesSelector;t.exports=r},{}],11:[function(n,t,e){function r(n){var t;if("INPUT"===n.nodeName||"TEXTAREA"===n.nodeName)n.focus(),n.setSelectionRange(0,n.value.length),t=n.value;else{n.hasAttribute("contenteditable")&&n.focus();var e=window.getSelection(),r=document.createRange();r.selectNodeContents(n),e.removeAllRanges(),e.addRange(r),t=e.toString()}return t}t.exports=r},{}],12:[function(n,t,e){function r(){}r.prototype={on:function(n,t,e){var r=this.e||(this.e={});return(r[n]||(r[n]=[])).push({fn:t,ctx:e}),this},once:function(n,t,e){function r(){i.off(n,r),t.apply(e,arguments)}var i=this;return r._=t,this.on(n,r,e)},emit:function(n){var t=[].slice.call(arguments,1),e=((this.e||(this.e={}))[n]||[]).slice(),r=0,i=e.length;for(r;i>r;r++)e[r].fn.apply(e[r].ctx,t);return this},off:function(n,t){var e=this.e||(this.e={}),r=e[n],i=[];if(r&&t)for(var o=0,u=r.length;u>o;o++)r[o].fn!==t&&r[o].fn._!==t&&i.push(r[o]);return i.length?e[n]=i:delete e[n],this}},t.exports=r},{}],13:[function(n,t,e){function r(){for(var n={},t=0;t<arguments.length;t++){var e=arguments[t];for(var r in e)i.call(e,r)&&(n[r]=e[r])}return n}t.exports=r;var i=Object.prototype.hasOwnProperty},{}],14:[function(n,t,e){(function(){var n,r,i,o,u,a,l,c,s,f,h,p,g=Object.prototype.hasOwnProperty,d=function(n,t){function e(){this.constructor=n}for(var r in t)g.call(t,r)&&(n[r]=t[r]);return e.prototype=t.prototype,n.prototype=new e,n.__super__=t.prototype,n};c="undefined"!=typeof e&&null!==e?e:this,l=null!=(f=c.chroma)?f:c.chroma={},"undefined"!=typeof t&&null!==t&&(t.exports=l),l.version="0.3.1",i=function(){function n(t,e,r,i){var o,u;o=this,null==t&&null==e&&null==r&&null==i&&(t=[255,0,255]),"array"===s(t)&&3===t.length&&(null==i&&(i=e),u=t,t=u[0],e=u[1],r=u[2]),"string"===s(t)?i="hex":null==i&&(i="rgb"),"rgb"===i?o.rgb=[t,e,r]:"hsl"===i?o.rgb=n.hsl2rgb(t,e,r):"hsv"===i?o.rgb=n.hsv2rgb(t,e,r):"hex"===i?o.rgb=n.hex2rgb(t):"lab"===i?o.rgb=n.lab2rgb(t,e,r):"hcl"===i?o.rgb=n.hcl2rgb(t,e,r):"hsi"===i&&(o.rgb=n.hsi2rgb(t,e,r))}return n.prototype.hex=function(){return n.rgb2hex(this.rgb)},n.prototype.toString=function(){return this.hex()},n.prototype.hsl=function(){return n.rgb2hsl(this.rgb)},n.prototype.hsv=function(){return n.rgb2hsv(this.rgb)},n.prototype.lab=function(){return n.rgb2lab(this.rgb)},n.prototype.hcl=function(){return n.rgb2hcl(this.rgb)},n.prototype.hsi=function(){return n.rgb2hsi(this.rgb)},n.prototype.interpolate=function(t,e,r){var i,o,u,a,l,c,f,h,p,g,d,v,y;if(h=this,null==r&&(r="rgb"),"string"===s(e)&&(e=new n(e)),"hsl"===r||"hsv"===r||"hcl"===r||"hsi"===r)return"hsl"===r?(v=h.hsl(),y=e.hsl()):"hsv"===r?(v=h.hsv(),y=e.hsv()):"hcl"===r?(v=h.hcl(),y=e.hcl()):"hsi"===r&&(v=h.hsi(),y=e.hsi()),u=v[0],g=v[1],c=v[2],a=y[0],d=y[1],f=y[2],isNaN(u)||isNaN(a)?isNaN(u)?isNaN(a)?o=void 0:(o=a,1!==c&&0!==c||(p=d)):(o=u,1!==f&&0!==f||(p=g)):(i=a>u&&a-u>180?a-(u+360):u>a&&u-a>180?a+360-u:a-u,o=u+t*i),null==p&&(p=g+t*(d-g)),l=c+t*(f-c),new n(o,p,l,r);if("rgb"===r)return v=h.rgb,y=e.rgb,new n(v[0]+t*(y[0]-v[0]),v[1]+t*(y[1]-v[1]),v[2]+t*(y[2]-v[2]),r);if("lab"===r)return v=h.lab(),y=e.lab(),new n(v[0]+t*(y[0]-v[0]),v[1]+t*(y[1]-v[1]),v[2]+t*(y[2]-v[2]),r);throw"color mode "+r+" is not supported"},n}(),i.hex2rgb=function(n){var t,e,r,i;if(!n.match(/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/)){if(null==l.colors||!l.colors[n])throw"unknown color format: "+n;n=l.colors[n]}return 4!==n.length&&7!==n.length||(n=n.substr(1)),3===n.length&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),i=parseInt(n,16),r=i>>16,e=i>>8&255,t=255&i,[r,e,t]},i.rgb2hex=function(n,t,e){var r,i,o;return void 0!==n&&3===n.length&&(o=n,n=o[0],t=o[1],e=o[2]),i=n<<16|t<<8|e,r="000000"+i.toString(16).toUpperCase(),"#"+r.substr(r.length-6)},i.hsv2rgb=function(n,t,e){var r,i,o,u,a,l,c,f,h,p,g,d,v,y,m,M;if("array"===s(n)&&3===n.length&&(p=n,n=p[0],t=p[1],a=p[2]),e*=255,0===t&&isNaN(n))f=o=r=e;else switch(360===n&&(n=0),n>360&&(n-=360),0>n&&(n+=360),n/=60,u=Math.floor(n),i=n-u,l=e*(1-t),c=e*(1-t*i),h=e*(1-t*(1-i)),u){case 0:g=[e,h,l],f=g[0],o=g[1],r=g[2];break;case 1:d=[c,e,l],f=d[0],o=d[1],r=d[2];break;case 2:v=[l,e,h],f=v[0],o=v[1],r=v[2];break;case 3:y=[l,c,e],f=y[0],o=y[1],r=y[2];break;case 4:m=[h,l,e],f=m[0],o=m[1],r=m[2];break;case 5:M=[e,l,c],f=M[0],o=M[1],r=M[2]}return f=Math.round(f),o=Math.round(o),r=Math.round(r),[f,o,r]},i.rgb2hsv=function(n,t,e){var r,i,o,u,a,l,c;return void 0!==n&&3===n.length&&(c=n,n=c[0],t=c[1],e=c[2]),u=Math.min(n,t,e),o=Math.max(n,t,e),r=o-u,l=o/255,a=r/o,0===a?(i=void 0,a=0):(n===o&&(i=(t-e)/r),t===o&&(i=2+(e-n)/r),e===o&&(i=4+(n-t)/r),i*=60,0>i&&(i+=360)),[i,a,l]},i.hsl2rgb=function(n,t,e){var r,i,o,u,a,l,c,s,f,h;if(void 0!==n&&3===n.length&&(f=n,n=f[0],t=f[1],e=f[2]),0===t)a=o=r=255*e;else{for(s=[0,0,0],i=[0,0,0],c=.5>e?e*(1+t):e+t-e*t,l=2*e-c,n/=360,s[0]=n+1/3,s[1]=n,s[2]=n-1/3,u=0;2>=u;u++)s[u]<0&&(s[u]+=1),s[u]>1&&(s[u]-=1),6*s[u]<1?i[u]=l+6*(c-l)*s[u]:2*s[u]<1?i[u]=c:3*s[u]<2?i[u]=l+(c-l)*(2/3-s[u])*6:i[u]=l;h=[Math.round(255*i[0]),Math.round(255*i[1]),Math.round(255*i[2])],a=h[0],o=h[1],r=h[2]}return[a,o,r]},i.rgb2hsl=function(n,t,e){var r,i,o,u,a,l;return void 0!==n&&3===n.length&&(l=n,n=l[0],t=l[1],e=l[2]),n/=255,t/=255,e/=255,u=Math.min(n,t,e),o=Math.max(n,t,e),i=(o+u)/2,o===u?(a=0,r=void 0):a=.5>i?(o-u)/(o+u):(o-u)/(2-o-u),n===o?r=(t-e)/(o-u):t===o?r=2+(e-n)/(o-u):e===o&&(r=4+(n-t)/(o-u)),r*=60,0>r&&(r+=360),[r,a,i]},i.lab2xyz=function(n,t,e){var r,i,o,u,a,l,c;return"array"===s(n)&&3===n.length&&(c=n,n=c[0],t=c[1],e=c[2]),r=function(n){return n>6/29?n*n*n:3*(6/29)*(6/29)*(n-4/29)},o=(n+.16)/1.16,i=[.96421,1,.82519],a=i[1]*r(o),u=i[0]*r(o+t/5),l=i[2]*r(o-e/2),[u,a,l]},i.xyz2rgb=function(n,t,e){var r,i,o,u,a,l,c,f,h,p;return"array"===s(n)&&3===n.length&&(h=n,n=h[0],t=h[1],e=h[2]),f=3.2406*n-1.5372*t-.4986*e,l=-.9689*n+1.8758*t+.0415*e,i=.0557*n-.204*t+1.057*e,o=Math.min(f,l,i)<-.001||Math.max(f,l,i)>1.001,o&&(f=0>f?0:f>1?1:f,l=0>l?0:l>1?1:l,i=0>i?0:i>1?1:i),o&&(p=[void 0,void 0,void 0],f=p[0],l=p[1],i=p[2]),u=function(n){var t;return t=.055,.0031308>=n?12.92*n:(1+t)*Math.pow(n,1/2.4)-t},c=Math.round(255*u(f)),a=Math.round(255*u(l)),r=Math.round(255*u(i)),[c,a,r]},i.lab2rgb=function(n,t,e){var r,o,u,a,l,c;return void 0!==n&&3===n.length&&(a=n,n=a[0],t=a[1],e=a[2]),void 0!==n&&3===n.length&&(l=n,n=l[0],t=l[1],e=l[2]),c=i.lab2xyz(n,t,e),r=c[0],o=c[1],u=c[2],i.xyz2rgb(r,o,u)},i.hcl2lab=function(n,t,e){var r,i,o,u,a,l,c;return"array"===s(n)&&3===n.length&&(c=n,n=c[0],t=c[1],e=c[2]),n/=360,i=6.283185307179586,r=.61*e+.09,u=i/6-n*i,l=(.311*e+.125)*t,o=Math.sin(u)*l,a=Math.cos(u)*l,[r,o,a]},i.hcl2rgb=function(n,t,e){var r,o,u,a;return a=i.hcl2lab(n,t,e),r=a[0],o=a[1],u=a[2],i.lab2rgb(r,o,u)},i.rgb2xyz=function(n,t,e){var r,i,o,u,a,l,c,s;return void 0!==n&&3===n.length&&(s=n,n=s[0],t=s[1],e=s[2]),i=function(n){var t;return t=.055,.04045>=n?n/12.92:Math.pow((n+t)/(1+t),2.4)},u=i(n/255),o=i(t/255),r=i(e/255),a=.4124*u+.3576*o+.1805*r,l=.2126*u+.7152*o+.0722*r,c=.0193*u+.1192*o+.9505*r,[a,l,c]},i.xyz2lab=function(n,t,e){var r,i,o,u,a,l;return void 0!==n&&3===n.length&&(l=n,n=l[0],t=l[1],e=l[2]),u=[.96421,1,.82519],o=function(n){return n>Math.pow(6/29,3)?Math.pow(n,1/3):7.787037037037035*n+4/29},a=1.16*o(t/u[1])-.16,r=5*(o(n/u[0])-o(t/u[1])),i=2*(o(t/u[1])-o(e/u[2])),[a,r,i]},i.rgb2lab=function(n,t,e){var r,o,u,a,l;return void 0!==n&&3===n.length&&(a=n,n=a[0],t=a[1],e=a[2]),l=i.rgb2xyz(n,t,e),r=l[0],o=l[1],u=l[2],i.xyz2lab(r,o,u)},i.lab2hcl=function(n,t,e){var r,i,o,u,a,l,c;return"array"===s(n)&&3===n.length&&(c=n,n=c[0],t=c[1],e=c[2]),r=n,n=(n-.09)/.61,a=Math.sqrt(t*t+e*e),l=a/(.311*n+.125),i=6.283185307179586,o=Math.atan2(t,e),u=(i/6-o)/i,u*=360,0>u&&(u+=360),[u,l,n]},i.rgb2hcl=function(n,t,e){var r,o,u,a;return"array"===s(n)&&3===n.length&&(u=n,n=u[0],t=u[1],e=u[2]),a=i.rgb2lab(n,t,e),o=a[0],r=a[1],e=a[2],i.lab2hcl(o,r,e)},i.rgb2hsi=function(n,t,e){var r,i,o,u,a,l;return"array"===s(n)&&3===n.length&&(l=n,n=l[0],t=l[1],e=l[2]),r=2*Math.PI,n/=255,t/=255,e/=255,u=Math.min(n,t,e),o=(n+t+e)/3,a=1-u/o,0===a?i=0:(i=(n-t+(n-e))/2,i/=Math.sqrt((n-t)*(n-t)+(n-e)*(t-e)),i=Math.acos(i),e>t&&(i=r-i),i/=r),[360*i,a,o]},i.hsi2rgb=function(n,t,e){var r,i,o,u,a,l,c;return"array"===s(n)&&3===n.length&&(c=n,n=c[0],t=c[1],e=c[2]),i=2*Math.PI,r=Math.PI/3,u=Math.cos,0>n&&(n+=360),n>360&&(n-=360),n/=360,1/3>n?(o=(1-t)/3,l=(1+t*u(i*n)/u(r-i*n))/3,a=1-(o+l)):2/3>n?(n-=1/3,l=(1-t)/3,a=(1+t*u(i*n)/u(r-i*n))/3,o=1-(l+a)):(n-=2/3,a=(1-t)/3,o=(1+t*u(i*n)/u(r-i*n))/3,l=1-(a+o)),l=e*l*3,a=e*a*3,o=e*o*3,[255*l,255*a,255*o]},l.Color=i,l.hsl=function(n,t,e){return new i(n,t,e,"hsl")},l.hsv=function(n,t,e){return new i(n,t,e,"hsv")},l.rgb=function(n,t,e){return new i(n,t,e,"rgb")},l.hex=function(n){return new i(n)},l.lab=function(n,t,e){return new i(n,t,e,"lab")},l.hcl=function(n,t,e){return new i(n,t,e,"hcl")},l.hsi=function(n,t,e){return new i(n,t,e,"hsi")},l.interpolate=function(n,t,e,r){return null==n||null==t?"#000":("string"===s(n)&&(n=new i(n)),"string"===s(t)&&(t=new i(t)),n.interpolate(e,t,r))},o=function(){function n(n){var t,e,r,o,u,a,l,c,f,h;for(o=this,o.colors=r=null!=(u=n.colors)?u:["#ddd","#222"],t=0,a=r.length-1;a>=0?a>=t:t>=a;a>=0?t++:t--)e=r[t],"string"===s(e)&&(r[t]=new i(e));if(null!=n.positions)o.pos=n.positions;else for(o.pos=[],t=0,l=r.length-1;l>=0?l>=t:t>=l;l>=0?t++:t--)o.pos.push(t/(r.length-1));o.mode=null!=(c=n.mode)?c:"hsv",o.nacol=null!=(f=n.nacol)?f:"#ccc",o.setClasses(null!=(h=n.limits)?h:[0,1])}return n.prototype.getColor=function(n){var t,e,r,i;return i=this,isNaN(n)?i.nacol:(i.classLimits.length>2?(t=i.getClass(n),e=t/(i.numClasses-1)):(e=r=(n-i.min)/(i.max-i.min),e=Math.min(1,Math.max(0,e))),i.fColor(e))},n.prototype.fColor=function(n){var t,e,r,i,o,u;for(i=this,e=i.colors,r=0,u=i.pos.length-1;u>=0?u>=r:r>=u;u>=0?r++:r--){if(o=i.pos[r],o>=n){t=e[r];break}if(n>=o&&r===i.pos.length-1){t=e[r];break}if(n>o&&n<i.pos[r+1]){n=(n-o)/(i.pos[r+1]-o),t=l.interpolate(e[r],e[r+1],n,i.mode);break}}return t},n.prototype.classifyValue=function(n){var t,e,r,i,o,u;return u=this,e=u.classLimits,e.length>2&&(o=e.length-1,t=u.getClass(n),n=e[t]+.5*(e[t+1]-e[t]),i=e[0],r=e[o-1],n=u.min+(n-i)/(r-i)*(u.max-u.min)),n},n.prototype.setClasses=function(n){var t;return null==n&&(n=[]),t=this,t.classLimits=t.limits=n,t.min=n[0],t.max=n[n.length-1],2===n.length?t.numClasses=0:t.numClasses=n.length-1},n.prototype.getClass=function(n){var t,e,r,i;if(i=this,e=i.classLimits,null!=e){for(r=e.length-1,t=0;r>t&&n>=e[t];)t++;return t-1}},n.prototype.validValue=function(n){return!isNaN(n)},n}(),l.ColorScale=o,a=function(){function n(t,e,r){null==t&&(t="#fe0000"),null==e&&(e="#feeeee"),null==r&&(r="hsl"),n.__super__.constructor.call(this,[t,e],[0,1],r)}return d(n,o),n}(),l.Ramp=a,u=function(){function n(t,e,r,i,o){var u;null==t&&(t="#d73027"),null==e&&(e="#ffffbf"),null==r&&(r="#1E6189"),null==i&&(i="mean"),null==o&&(o="hsl"),u=this,u.mode=o,u.center=i,n.__super__.constructor.call(this,[t,e,r],[0,.5,1],o)}return d(n,o),n.prototype.parseData=function(t,e){var r,i;return n.__super__.parseData.call(this,t,e),i=this,r=i.center,"median"===r?r=i.median:"mean"===r&&(r=i.mean),i.pos[1]=(r-i.min)/(i.max-i.min)},n}(),l.Diverging=u,r=function(){function n(n){var t;t=this,t.colors=n}return d(n,o),n.prototype.parseData=function(n,t){},n.prototype.getColor=function(n){var t;return t=this,t.colors.hasOwnProperty(n)?t.colors[n]:"#cccccc"},n.prototype.validValue=function(n){return this.colors.hasOwnProperty(n)},n}(),l.Categories=r,n=function(){function n(n){var t;t=this,t.name=n,t.setClasses(7)}return d(n,o),n.prototype.getColor=function(n){var t,e;return e=this,t=e.getClass(n),e.name+" l"+e.numClasses+" c"+t},n}(),l.CSSColors=n,null==(h=l.scales)&&(l.scales={}),l.scales.cool=function(){return new a(l.hsl(180,1,.9),l.hsl(250,.7,.4))},l.scales.hot=function(){return new o({colors:["#000000","#ff0000","#ffff00","#ffffff"],positions:[0,.25,.75,1],mode:"rgb"})},l.scales.BlWhOr=function(){return new u(l.hsl(30,1,.55),"#ffffff",new i(220,1,.55))},l.scales.GrWhPu=function(){return new u(l.hsl(120,.8,.4),"#ffffff",new i(280,.8,.4))},l.limits=function(n,t,e,r){var i,o,u,a,l,c,f,h,p,g,d,v,y,m,M,x,b,w,E,_,S,N,k,A,C,z,q,T,L,j,P,R,D,O,U,F,I,H,Y,V,Z,X,B,$,W,G,J;if(null==t&&(t="equal"),null==e&&(e=7),null==r&&(r=null),y=Number.MAX_VALUE,v=-1*Number.MAX_VALUE,k=0,q=[],"array"===s(n))if("object"!==s(n[0])&&"array"!==s(n[0]))for(T=0,P=n.length;P>T;T++)C=n[T],isNaN(C)||q.push(Number(C));else for(L=0,R=n.length;R>L;L++)N=n[L],q.push(Number(N[r]));else if("object"===s(n))for(p in n)C=n[p],"object"===s(C)&&"string"===s(r)?isNaN(C[r])||q.push(Number(C[r])):"array"===s(C)&&"number"===s(r)?isNaN(C[r])||q.push(Number(C[r])):"number"===s(C)&&(isNaN(C)||q.push(Number(C)));for(j=0,D=q.length;D>j;j++)C=q[j],isNaN(C)||(y>C&&(y=C),C>v&&(v=C),k+=C);if(q=q.sort(function(n,t){return n-t}),d=[],"c"===t.substr(0,1)&&(d.push(y),d.push(v)),"e"===t.substr(0,1)){for(d.push(y),f=1,Z=e-1;Z>=1?Z>=f:f>=Z;Z>=1?f++:f--)d.push(y+f/e*(v-y));d.push(v)}else if("q"===t.substr(0,1)){for(d.push(y),f=1,X=e-1;X>=1?X>=f:f>=X;X>=1?f++:f--)w=q.length*f/e,E=Math.floor(w),E===w?d.push(q[E]):(_=w-E,d.push(q[E]*_+q[E+1]*(1-_)));d.push(v)}else if("k"===t.substr(0,1)){for(M=q.length,i=new Array(M),l=new Array(e),S=!0,x=0,u=null,u=[],u.push(y),f=1,B=e-1;B>=1?B>=f:f>=B;B>=1?f++:f--)u.push(y+f/e*(v-y));for(u.push(v);S;){for(h=0,$=e-1;$>=0?$>=h:h>=$;$>=0?h++:h--)l[h]=0;for(f=0,W=M-1;W>=0?W>=f:f>=W;W>=0?f++:f--){for(z=q[f],m=Number.MAX_VALUE,h=0,G=e-1;G>=0?G>=h:h>=G;G>=0?h++:h--)c=Math.abs(u[h]-z),m>c&&(m=c,o=h);l[o]++,i[f]=o}for(b=new Array(e),h=0,J=e-1;J>=0?J>=h:h>=J;J>=0?h++:h--)b[h]=null;for(f=0,O=M-1;O>=0?O>=f:f>=O;O>=0?f++:f--)a=i[f],null===b[a]?b[a]=q[f]:b[a]+=q[f];for(h=0,U=e-1;U>=0?U>=h:h>=U;U>=0?h++:h--)b[h]*=1/l[h];for(S=!1,h=0,F=e-1;F>=0?F>=h:h>=F;F>=0?h++:h--)if(b[h]!==u[f]){S=!0;break}u=b,x++,x>200&&(S=!1)}for(g={},h=0,I=e-1;I>=0?I>=h:h>=I;I>=0?h++:h--)g[h]=[];for(f=0,H=M-1;H>=0?H>=f:f>=H;H>=0?f++:f--)a=i[f],g[a].push(q[f]);for(A=[],h=0,Y=e-1;Y>=0?Y>=h:h>=Y;Y>=0?h++:h--)A.push(g[h][0]),A.push(g[h][g[h].length-1]);for(A=A.sort(function(n,t){return n-t}),d.push(A[0]),f=1,V=A.length-1;V>=f;f+=2)isNaN(A[f])||d.push(A[f])}return d},c="undefined"!=typeof e&&null!==e?e:this,s=function(){var n,t,e,r,i;for(n={},i="Boolean Number String Function Array Date RegExp Undefined Null".split(" "),e=0,r=i.length;r>e;e++)t=i[e],n["[object "+t+"]"]=t.toLowerCase();return function(t){var e;return e=Object.prototype.toString.call(t),n[e]||"object"}}(),null==(p=c.type)&&(c.type=s),Array.max=function(n){return Math.max.apply(Math,n)},Array.min=function(n){return Math.min.apply(Math,n)},"undefined"!=typeof t&&(t.exports=l)}).call(this)},{}]},{},[1]);