!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,(function(t){"use strict";function n(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function e(t){var e;return 1===t.length&&(e=t,t=function(t,r){return n(e(t),r)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=o+1:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)>0?i=o:r=o+1}return r}}}var r=e(n),i=r.right,o=r.left;function u(t,n){return[t,n]}function a(t){return null===t?NaN:+t}function c(t,n){var e,r,i=t.length,o=0,u=-1,c=0,s=0;if(null==n)for(;++u<i;)isNaN(e=a(t[u]))||(s+=(r=e-c)*(e-(c+=r/++o)));else for(;++u<i;)isNaN(e=a(n(t[u],u,t)))||(s+=(r=e-c)*(e-(c+=r/++o)));if(o>1)return s/(o-1)}function s(t,n){var e=c(t,n);return e?Math.sqrt(e):e}function f(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u<o;)if(null!=(e=t[u])&&e>=e)for(r=i=e;++u<o;)null!=(e=t[u])&&(r>e&&(r=e),i<e&&(i=e))}else for(;++u<o;)if(null!=(e=n(t[u],u,t))&&e>=e)for(r=i=e;++u<o;)null!=(e=n(t[u],u,t))&&(r>e&&(r=e),i<e&&(i=e));return[r,i]}var l=Array.prototype,h=l.slice,p=l.map;function d(t){return function(){return t}}function v(t){return t}function g(t,n,e){t=+t,n=+n,e=(i=arguments.length)<2?(n=t,t=0,1):i<3?1:+e;for(var r=-1,i=0|Math.max(0,Math.ceil((n-t)/e)),o=new Array(i);++r<i;)o[r]=t+r*e;return o}var _=Math.sqrt(50),y=Math.sqrt(10),m=Math.sqrt(2);function x(t,n,e){var r,i,o,u,a=-1;if(e=+e,(t=+t)==(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(u=b(t,n,e))||!isFinite(u))return[];if(u>0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a<i;)o[a]=(t+a)*u;else for(t=Math.floor(t*u),n=Math.ceil(n*u),o=new Array(i=Math.ceil(t-n+1));++a<i;)o[a]=(t-a)/u;return r&&o.reverse(),o}function b(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=_?10:o>=y?5:o>=m?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=_?10:o>=y?5:o>=m?2:1)}function w(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=_?i*=10:o>=y?i*=5:o>=m&&(i*=2),n<t?-i:i}function M(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1}function T(t,n,e){if(null==e&&(e=a),r=t.length){if((n=+n)<=0||r<2)return+e(t[0],0,t);if(n>=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,o=Math.floor(i),u=+e(t[o],o,t);return u+(+e(t[o+1],o+1,t)-u)*(i-o)}}function N(t){for(var n,e,r,i=t.length,o=-1,u=0;++o<i;)u+=t[o].length;for(e=new Array(u);--i>=0;)for(n=(r=t[i]).length;--n>=0;)e[--u]=r[n];return e}function k(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&r>e&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&r>e&&(r=e);return r}function S(t){if(!(i=t.length))return[];for(var n=-1,e=k(t,E),r=new Array(e);++n<e;)for(var i,o=-1,u=r[n]=new Array(i);++o<i;)u[o]=t[o][n];return r}function E(t){return t.length}var A=Array.prototype.slice;function C(t){return t}var z=1e-6;function P(t){return"translate("+(t+.5)+",0)"}function R(t){return"translate(0,"+(t+.5)+")"}function L(t){return function(n){return+t(n)}}function q(t){var n=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(n=Math.round(n)),function(e){return+t(e)+n}}function D(){return!this.__axis}function U(t,n){var e=[],r=null,i=null,o=6,u=6,a=3,c=1===t||4===t?-1:1,s=4===t||2===t?"x":"y",f=1===t||3===t?P:R;function l(l){var h=null==r?n.ticks?n.ticks.apply(n,e):n.domain():r,p=null==i?n.tickFormat?n.tickFormat.apply(n,e):C:i,d=Math.max(o,0)+a,v=n.range(),g=+v[0]+.5,_=+v[v.length-1]+.5,y=(n.bandwidth?q:L)(n.copy()),m=l.selection?l.selection():l,x=m.selectAll(".domain").data([null]),b=m.selectAll(".tick").data(h,n).order(),w=b.exit(),M=b.enter().append("g").attr("class","tick"),T=b.select("line"),N=b.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","#000")),b=b.merge(M),T=T.merge(M.append("line").attr("stroke","#000").attr(s+"2",c*o)),N=N.merge(M.append("text").attr("fill","#000").attr(s,c*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),l!==m&&(x=x.transition(l),b=b.transition(l),T=T.transition(l),N=N.transition(l),w=w.transition(l).attr("opacity",z).attr("transform",(function(t){return isFinite(t=y(t))?f(t):this.getAttribute("transform")})),M.attr("opacity",z).attr("transform",(function(t){var n=this.parentNode.__axis;return f(n&&isFinite(n=n(t))?n:y(t))}))),w.remove(),x.attr("d",4===t||2==t?"M"+c*u+","+g+"H0.5V"+_+"H"+c*u:"M"+g+","+c*u+"V0.5H"+_+"V"+c*u),b.attr("opacity",1).attr("transform",(function(t){return f(y(t))})),T.attr(s+"2",c*o),N.attr(s,c*d).text(p),m.filter(D).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=y}))}return l.scale=function(t){return arguments.length?(n=t,l):n},l.ticks=function(){return e=A.call(arguments),l},l.tickArguments=function(t){return arguments.length?(e=null==t?[]:A.call(t),l):e.slice()},l.tickValues=function(t){return arguments.length?(r=null==t?null:A.call(t),l):r&&r.slice()},l.tickFormat=function(t){return arguments.length?(i=t,l):i},l.tickSize=function(t){return arguments.length?(o=u=+t,l):o},l.tickSizeInner=function(t){return arguments.length?(o=+t,l):o},l.tickSizeOuter=function(t){return arguments.length?(u=+t,l):u},l.tickPadding=function(t){return arguments.length?(a=+t,l):a},l}var O={value:function(){}};function F(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new I(r)}function I(t){this._=t}function Y(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function B(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function H(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=O,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}I.prototype=F.prototype={constructor:I,on:function(t,n){var e,r=this._,i=Y(t+"",r),o=-1,u=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=H(r[e],t.name,n);else if(null==n)for(e in r)r[e]=H(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=B(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new I(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var j="http://www.w3.org/1999/xhtml",X={svg:"http://www.w3.org/2000/svg",xhtml:j,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function V(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),X.hasOwnProperty(n)?{space:X[n],local:t}:t}function W(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===j&&n.documentElement.namespaceURI===j?n.createElement(t):n.createElementNS(e,t)}}function $(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Z(t){var n=V(t);return(n.local?$:W)(n)}function G(){}function Q(t){return null==t?G:function(){return this.querySelector(t)}}function J(){return[]}function K(t){return null==t?J:function(){return this.querySelectorAll(t)}}var tt=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var nt=document.documentElement;if(!nt.matches){var et=nt.webkitMatchesSelector||nt.msMatchesSelector||nt.mozMatchesSelector||nt.oMatchesSelector;tt=function(t){return function(){return et.call(this,t)}}}}var rt=tt;function it(t){return new Array(t.length)}function ot(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function ut(t,n,e,r,i,o){for(var u,a=0,c=n.length,s=o.length;a<s;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new ot(t,o[a]);for(;a<c;++a)(u=n[a])&&(i[a]=u)}function at(t,n,e,r,i,o,u){var a,c,s,f={},l=n.length,h=o.length,p=new Array(l);for(a=0;a<l;++a)(c=n[a])&&(p[a]=s="$"+u.call(c,c.__data__,a,n),s in f?i[a]=c:f[s]=c);for(a=0;a<h;++a)(c=f[s="$"+u.call(t,o[a],a,o)])?(r[a]=c,c.__data__=o[a],f[s]=null):e[a]=new ot(t,o[a]);for(a=0;a<l;++a)(c=n[a])&&f[p[a]]===c&&(i[a]=c)}function ct(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function st(t){return function(){this.removeAttribute(t)}}function ft(t){return function(){this.removeAttributeNS(t.space,t.local)}}function lt(t,n){return function(){this.setAttribute(t,n)}}function ht(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function pt(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function dt(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function vt(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function gt(t){return function(){this.style.removeProperty(t)}}function _t(t,n,e){return function(){this.style.setProperty(t,n,e)}}function yt(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function mt(t,n){return t.style.getPropertyValue(n)||vt(t).getComputedStyle(t,null).getPropertyValue(n)}function xt(t){return function(){delete this[t]}}function bt(t,n){return function(){this[t]=n}}function wt(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function Mt(t){return t.trim().split(/^|\s+/)}function Tt(t){return t.classList||new Nt(t)}function Nt(t){this._node=t,this._names=Mt(t.getAttribute("class")||"")}function kt(t,n){for(var e=Tt(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function St(t,n){for(var e=Tt(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Et(t){return function(){kt(this,t)}}function At(t){return function(){St(this,t)}}function Ct(t,n){return function(){(n.apply(this,arguments)?kt:St)(this,t)}}function zt(){this.textContent=""}function Pt(t){return function(){this.textContent=t}}function Rt(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Lt(){this.innerHTML=""}function qt(t){return function(){this.innerHTML=t}}function Dt(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function Ut(){this.nextSibling&&this.parentNode.appendChild(this)}function Ot(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Ft(){return null}function It(){var t=this.parentNode;t&&t.removeChild(this)}function Yt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function Bt(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}ot.prototype={constructor:ot,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},Nt.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Ht={};function jt(t,n,e){return t=Xt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function Xt(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function Vt(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function Wt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function $t(t,n,e){var r=Ht.hasOwnProperty(t.type)?jt:Xt;return function(i,o,u){var a,c=this.__on,s=r(n,o,u);if(c)for(var f=0,l=c.length;f<l;++f)if((a=c[f]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=s,a.capture=e),void(a.value=n);this.addEventListener(t.type,s,e),a={type:t.type,name:t.name,value:n,listener:s,capture:e},c?c.push(a):this.__on=[a]}}function Zt(n,e,r,i){var o=t.event;n.sourceEvent=t.event,t.event=n;try{return e.apply(r,i)}finally{t.event=o}}function Gt(t,n,e){var r=vt(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function Qt(t,n){return function(){return Gt(this,t,n)}}function Jt(t,n){return function(){return Gt(this,t,n.apply(this,arguments))}}t.event=null,"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ht={mouseenter:"mouseover",mouseleave:"mouseout"}));var Kt=[null];function tn(t,n){this._groups=t,this._parents=n}function nn(){return new tn([[document.documentElement]],Kt)}function en(t){return"string"==typeof t?new tn([[document.querySelector(t)]],[document.documentElement]):new tn([[t]],Kt)}tn.prototype=nn.prototype={constructor:tn,select:function(t){"function"!=typeof t&&(t=Q(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],c=a.length,s=r[i]=new Array(c),f=0;f<c;++f)(o=a[f])&&(u=t.call(o,o.__data__,f,a))&&("__data__"in o&&(u.__data__=o.__data__),s[f]=u);return new tn(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=K(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],c=a.length,s=0;s<c;++s)(u=a[s])&&(r.push(t.call(u,u.__data__,s,a)),i.push(u));return new tn(r,i)},filter:function(t){"function"!=typeof t&&(t=rt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,c=r[i]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&c.push(o);return new tn(r,this._parents)},data:function(t,n){if(!t)return p=new Array(this.size()),s=-1,this.each((function(t){p[++s]=t})),p;var e=n?at:ut,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,u=new Array(o),a=new Array(o),c=new Array(o),s=0;s<o;++s){var f=r[s],l=i[s],h=l.length,p=t.call(f,f&&f.__data__,s,r),d=p.length,v=a[s]=new Array(d),g=u[s]=new Array(d);e(f,l,v,g,c[s]=new Array(h),p,n);for(var _,y,m=0,x=0;m<d;++m)if(_=v[m]){for(m>=x&&(x=m+1);!(y=g[x])&&++x<d;);_._next=y||null}}return(u=new tn(u,r))._enter=a,u._exit=c,u},enter:function(){return new tn(this._enter||this._groups.map(it),this._parents)},exit:function(){return new tn(this._exit||this._groups.map(it),this._parents)},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var c,s=n[a],f=e[a],l=s.length,h=u[a]=new Array(l),p=0;p<l;++p)(c=s[p]||f[p])&&(h[p]=c);for(;a<r;++a)u[a]=n[a];return new tn(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=ct);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],c=a.length,s=i[o]=new Array(c),f=0;f<c;++f)(u=a[f])&&(s[f]=u);s.sort(n)}return new tn(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=V(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?ft:st:"function"==typeof n?e.local?dt:pt:e.local?ht:lt)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?gt:"function"==typeof n?yt:_t)(t,n,null==e?"":e)):mt(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?xt:"function"==typeof n?wt:bt)(t,n)):this.node()[t]},classed:function(t,n){var e=Mt(t+"");if(arguments.length<2){for(var r=Tt(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?Ct:n?Et:At)(e,n))},text:function(t){return arguments.length?this.each(null==t?zt:("function"==typeof t?Rt:Pt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Lt:("function"==typeof t?Dt:qt)(t)):this.node().innerHTML},raise:function(){return this.each(Ut)},lower:function(){return this.each(Ot)},append:function(t){var n="function"==typeof t?t:Z(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:Z(t),r=null==n?Ft:"function"==typeof n?n:Q(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(It)},clone:function(t){return this.select(t?Bt:Yt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=Vt(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?$t:Wt,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var c,s=0,f=a.length;s<f;++s)for(r=0,c=a[s];r<u;++r)if((i=o[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,n){return this.each(("function"==typeof n?Jt:Qt)(t,n))}};var rn=0;function on(){return new un}function un(){this._="@"+(++rn).toString(36)}function an(){for(var n,e=t.event;n=e.sourceEvent;)e=n;return e}function cn(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function sn(t){var n=an();return n.changedTouches&&(n=n.changedTouches[0]),cn(t,n)}function fn(t,n,e){arguments.length<3&&(e=n,n=an().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return cn(t,r);return null}function ln(){t.event.stopImmediatePropagation()}function hn(){t.event.preventDefault(),t.event.stopImmediatePropagation()}function pn(t){var n=t.document.documentElement,e=en(t).on("dragstart.drag",hn,!0);"onselectstart"in n?e.on("selectstart.drag",hn,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}function dn(t,n){var e=t.document.documentElement,r=en(t).on("dragstart.drag",null);n&&(r.on("click.drag",hn,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}function vn(t){return function(){return t}}function gn(t,n,e,r,i,o,u,a,c,s){this.target=t,this.type=n,this.subject=e,this.identifier=r,this.active=i,this.x=o,this.y=u,this.dx=a,this.dy=c,this._=s}function _n(){return!t.event.button}function yn(){return this.parentNode}function mn(n){return null==n?{x:t.event.x,y:t.event.y}:n}function xn(){return"ontouchstart"in this}function bn(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function wn(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function Mn(){}un.prototype=on.prototype={constructor:un,get:function(t){for(var n=this._;!(n in t);)if(!(t=t.parentNode))return;return t[n]},set:function(t,n){return t[this._]=n},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}},gn.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Tn=.7,Nn=1/Tn,kn="\\s*([+-]?\\d+)\\s*",Sn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",En="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",An=/^#([0-9a-f]{3})$/,Cn=/^#([0-9a-f]{6})$/,zn=new RegExp("^rgb\\("+[kn,kn,kn]+"\\)$"),Pn=new RegExp("^rgb\\("+[En,En,En]+"\\)$"),Rn=new RegExp("^rgba\\("+[kn,kn,kn,Sn]+"\\)$"),Ln=new RegExp("^rgba\\("+[En,En,En,Sn]+"\\)$"),qn=new RegExp("^hsl\\("+[Sn,En,En]+"\\)$"),Dn=new RegExp("^hsla\\("+[Sn,En,En,Sn]+"\\)$"),Un={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};function On(t){var n;return t=(t+"").trim().toLowerCase(),(n=An.exec(t))?new Hn((n=parseInt(n[1],16))>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Cn.exec(t))?Fn(parseInt(n[1],16)):(n=zn.exec(t))?new Hn(n[1],n[2],n[3],1):(n=Pn.exec(t))?new Hn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Rn.exec(t))?In(n[1],n[2],n[3],n[4]):(n=Ln.exec(t))?In(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=qn.exec(t))?jn(n[1],n[2]/100,n[3]/100,1):(n=Dn.exec(t))?jn(n[1],n[2]/100,n[3]/100,n[4]):Un.hasOwnProperty(t)?Fn(Un[t]):"transparent"===t?new Hn(NaN,NaN,NaN,0):null}function Fn(t){return new Hn(t>>16&255,t>>8&255,255&t,1)}function In(t,n,e,r){return r<=0&&(t=n=e=NaN),new Hn(t,n,e,r)}function Yn(t){return t instanceof Mn||(t=On(t)),t?new Hn((t=t.rgb()).r,t.g,t.b,t.opacity):new Hn}function Bn(t,n,e,r){return 1===arguments.length?Yn(t):new Hn(t,n,e,null==r?1:r)}function Hn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function jn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Wn(t,n,e,r)}function Xn(t){if(t instanceof Wn)return new Wn(t.h,t.s,t.l,t.opacity);if(t instanceof Mn||(t=On(t)),!t)return new Wn;if(t instanceof Wn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,c=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=c<.5?o+i:2-o-i,u*=60):a=c>0&&c<1?0:u,new Wn(u,a,c,t.opacity)}function Vn(t,n,e,r){return 1===arguments.length?Xn(t):new Wn(t,n,e,null==r?1:r)}function Wn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function $n(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}bn(Mn,On,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),bn(Hn,Bn,wn(Mn,{brighter:function(t){return t=null==t?Nn:Math.pow(Nn,t),new Hn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Tn:Math.pow(Tn,t),new Hn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),bn(Wn,Vn,wn(Mn,{brighter:function(t){return t=null==t?Nn:Math.pow(Nn,t),new Wn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Tn:Math.pow(Tn,t),new Wn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Hn($n(t>=240?t-240:t+120,i,r),$n(t,i,r),$n(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var Zn=Math.PI/180,Gn=180/Math.PI,Qn=.95047,Jn=1.08883,Kn=4/29,te=6/29,ne=3*te*te;function ee(t){if(t instanceof ie)return new ie(t.l,t.a,t.b,t.opacity);if(t instanceof le){var n=t.h*Zn;return new ie(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Hn||(t=Yn(t));var e=ce(t.r),r=ce(t.g),i=ce(t.b),o=oe((.4124564*e+.3575761*r+.1804375*i)/Qn),u=oe((.2126729*e+.7151522*r+.072175*i)/1);return new ie(116*u-16,500*(o-u),200*(u-oe((.0193339*e+.119192*r+.9503041*i)/Jn)),t.opacity)}function re(t,n,e,r){return 1===arguments.length?ee(t):new ie(t,n,e,null==r?1:r)}function ie(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function oe(t){return t>.008856451679035631?Math.pow(t,1/3):t/ne+Kn}function ue(t){return t>te?t*t*t:ne*(t-Kn)}function ae(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ce(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function se(t){if(t instanceof le)return new le(t.h,t.c,t.l,t.opacity);t instanceof ie||(t=ee(t));var n=Math.atan2(t.b,t.a)*Gn;return new le(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function fe(t,n,e,r){return 1===arguments.length?se(t):new le(t,n,e,null==r?1:r)}function le(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}bn(ie,re,wn(Mn,{brighter:function(t){return new ie(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ie(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return t=1*ue(t),new Hn(ae(3.2404542*(n=Qn*ue(n))-1.5371385*t-.4985314*(e=Jn*ue(e))),ae(-.969266*n+1.8760108*t+.041556*e),ae(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),bn(le,fe,wn(Mn,{brighter:function(t){return new le(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new le(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return ee(this).rgb()}}));var he=-.14861,pe=1.78277,de=-.29227,ve=-.90649,ge=1.97294,_e=ge*ve,ye=ge*pe,me=pe*de-ve*he;function xe(t){if(t instanceof we)return new we(t.h,t.s,t.l,t.opacity);t instanceof Hn||(t=Yn(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(me*r+_e*n-ye*e)/(me+_e-ye),o=r-i,u=(ge*(e-i)-de*o)/ve,a=Math.sqrt(u*u+o*o)/(ge*i*(1-i)),c=a?Math.atan2(u,o)*Gn-120:NaN;return new we(c<0?c+360:c,a,i,t.opacity)}function be(t,n,e,r){return 1===arguments.length?xe(t):new we(t,n,e,null==r?1:r)}function we(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Me(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}function Te(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return Me((e-r/n)*n,u,i,o,a)}}function Ne(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],u=t[(r+1)%n],a=t[(r+2)%n];return Me((e-r/n)*n,i,o,u,a)}}function ke(t){return function(){return t}}function Se(t,n){return function(e){return t+e*n}}function Ee(t,n){var e=n-t;return e?Se(t,e>180||e<-180?e-360*Math.round(e/360):e):ke(isNaN(t)?n:t)}function Ae(t,n){var e=n-t;return e?Se(t,e):ke(isNaN(t)?n:t)}bn(we,be,wn(Mn,{brighter:function(t){return t=null==t?Nn:Math.pow(Nn,t),new we(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Tn:Math.pow(Tn,t),new we(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Zn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Hn(255*(n+e*(he*r+pe*i)),255*(n+e*(de*r+ve*i)),255*(n+e*(ge*r)),this.opacity)}}));var Ce=function t(n){var e=function(t){return 1==(t=+t)?Ae:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):ke(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=Bn(t)).r,(n=Bn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Ae(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function ze(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;e<i;++e)r=Bn(n[e]),o[e]=r.r||0,u[e]=r.g||0,a[e]=r.b||0;return o=t(o),u=t(u),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=u(t),r.b=a(t),r+""}}}var Pe=ze(Te),Re=ze(Ne);function Le(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),u=new Array(r);for(e=0;e<i;++e)o[e]=Ye(t[e],n[e]);for(;e<r;++e)u[e]=n[e];return function(t){for(e=0;e<i;++e)u[e]=o[e](t);return u}}function qe(t,n){var e=new Date;return n-=t=+t,function(r){return e.setTime(t+n*r),e}}function De(t,n){return n-=t=+t,function(e){return t+n*e}}function Ue(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Ye(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var Oe=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Fe=new RegExp(Oe.source,"g");function Ie(t,n){var e,r,i,o=Oe.lastIndex=Fe.lastIndex=0,u=-1,a=[],c=[];for(t+="",n+="";(e=Oe.exec(t))&&(r=Fe.exec(n));)(i=r.index)>o&&(i=n.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,c.push({i:u,x:De(e,r)})),o=Fe.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?c[0]?function(t){return function(n){return t(n)+""}}(c[0].x):function(t){return function(){return t}}(n):(n=c.length,function(t){for(var e,r=0;r<n;++r)a[(e=c[r]).i]=e.x(t);return a.join("")})}function Ye(t,n){var e,r=typeof n;return null==n||"boolean"===r?ke(n):("number"===r?De:"string"===r?(e=On(n))?(n=e,Ce):Ie:n instanceof On?Ce:n instanceof Date?qe:Array.isArray(n)?Le:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?Ue:De)(t,n)}function Be(t,n){return n-=t=+t,function(e){return Math.round(t+n*e)}}var He,je,Xe,Ve,We=180/Math.PI,$e={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ze(t,n,e,r,i,o){var u,a,c;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(c=t*e+n*r)&&(e-=t*c,r-=n*c),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,c/=a),t*r<n*e&&(t=-t,n=-n,c=-c,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*We,skewX:Math.atan(c)*We,scaleX:u,scaleY:a}}function Ge(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],c=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var c=u.push("translate(",null,n,null,e);a.push({i:c-4,x:De(t,i)},{i:c-2,x:De(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,c),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:De(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,c),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:De(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,c),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:De(t,e)},{i:a-2,x:De(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,c),o=u=null,function(t){for(var n,e=-1,r=c.length;++e<r;)a[(n=c[e]).i]=n.x(t);return a.join("")}}}var Qe=Ge((function(t){return"none"===t?$e:(He||(He=document.createElement("DIV"),je=document.documentElement,Xe=document.defaultView),He.style.transform=t,t=Xe.getComputedStyle(je.appendChild(He),null).getPropertyValue("transform"),je.removeChild(He),Ze(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Je=Ge((function(t){return null==t?$e:(Ve||(Ve=document.createElementNS("http://www.w3.org/2000/svg","g")),Ve.setAttribute("transform",t),(t=Ve.transform.baseVal.consolidate())?Ze((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):$e)}),", ",")",")"),Ke=Math.SQRT2;function tr(t){return((t=Math.exp(t))+1/t)/2}function nr(t,n){var e,r,i=t[0],o=t[1],u=t[2],a=n[0],c=n[1],s=n[2],f=a-i,l=c-o,h=f*f+l*l;if(h<1e-12)r=Math.log(s/u)/Ke,e=function(t){return[i+t*f,o+t*l,u*Math.exp(Ke*t*r)]};else{var p=Math.sqrt(h),d=(s*s-u*u+4*h)/(2*u*2*p),v=(s*s-u*u-4*h)/(2*s*2*p),g=Math.log(Math.sqrt(d*d+1)-d),_=Math.log(Math.sqrt(v*v+1)-v);r=(_-g)/Ke,e=function(t){var n=t*r,e=tr(g),a=u/(2*p)*(e*function(t){return((t=Math.exp(2*t))-1)/(t+1)}(Ke*n+g)-function(t){return((t=Math.exp(t))-1/t)/2}(g));return[i+a*f,o+a*l,u*e/tr(Ke*n+g)]}}return e.duration=1e3*r,e}function er(t){return function(n,e){var r=t((n=Vn(n)).h,(e=Vn(e)).h),i=Ae(n.s,e.s),o=Ae(n.l,e.l),u=Ae(n.opacity,e.opacity);return function(t){return n.h=r(t),n.s=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var rr=er(Ee),ir=er(Ae);function or(t){return function(n,e){var r=t((n=fe(n)).h,(e=fe(e)).h),i=Ae(n.c,e.c),o=Ae(n.l,e.l),u=Ae(n.opacity,e.opacity);return function(t){return n.h=r(t),n.c=i(t),n.l=o(t),n.opacity=u(t),n+""}}}var ur=or(Ee),ar=or(Ae);function cr(t){return function n(e){function r(n,r){var i=t((n=be(n)).h,(r=be(r)).h),o=Ae(n.s,r.s),u=Ae(n.l,r.l),a=Ae(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}var sr,fr,lr=cr(Ee),hr=cr(Ae),pr=0,dr=0,vr=0,gr=0,_r=0,yr=0,mr="object"==typeof performance&&performance.now?performance:Date,xr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function br(){return _r||(xr(wr),_r=mr.now()+yr)}function wr(){_r=0}function Mr(){this._call=this._time=this._next=null}function Tr(t,n,e){var r=new Mr;return r.restart(t,n,e),r}function Nr(){br(),++pr;for(var t,n=sr;n;)(t=_r-n._time)>=0&&n._call.call(null,t),n=n._next;--pr}function kr(){_r=(gr=mr.now())+yr,pr=dr=0;try{Nr()}finally{pr=0,function(){for(var t,n,e=sr,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:sr=n);fr=t,Er(r)}(),_r=0}}function Sr(){var t=mr.now(),n=t-gr;n>1e3&&(yr-=n,gr=t)}function Er(t){pr||(dr&&(dr=clearTimeout(dr)),t-_r>24?(t<1/0&&(dr=setTimeout(kr,t-mr.now()-yr)),vr&&(vr=clearInterval(vr))):(vr||(gr=mr.now(),vr=setInterval(Sr,1e3)),pr=1,xr(kr)))}function Ar(t,n,e){var r=new Mr;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}Mr.prototype=Tr.prototype={constructor:Mr,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?br():+e)+(null==n?0:+n),this._next||fr===this||(fr?fr._next=this:sr=this,fr=this),this._call=t,this._time=e,Er()},stop:function(){this._call&&(this._call=null,this._time=1/0,Er())}};var Cr=F("start","end","interrupt"),zr=[];function Pr(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(c){var s,f,l,h;if(1!==e.state)return a();for(s in i)if((h=i[s]).name===e.name){if(3===h.state)return Ar(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[s]):+s<n&&(h.state=6,h.timer.stop(),delete i[s])}if(Ar((function(){3===e.state&&(e.state=4,e.timer.restart(u,e.delay,e.time),u(c))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(l=e.tween.length),s=0,f=-1;s<l;++s)(h=e.tween[s].value.call(t,t.__data__,e.index,e.group))&&(r[++f]=h);r.length=f+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=5,1),o=-1,u=r.length;++o<u;)r[o].call(null,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Tr((function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:Cr,tween:zr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Rr(t,n){var e=qr(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function Lr(t,n){var e=qr(t,n);if(e.state>2)throw new Error("too late; already started");return e}function qr(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Dr(t,n){var e,r,i,o=t.__transition,u=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}}function Ur(t,n){var e,r;return function(){var i=Lr(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}function Or(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=Lr(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},c=0,s=i.length;c<s;++c)if(i[c].name===n){i[c]=a;break}c===s&&i.push(a)}o.tween=i}}function Fr(t,n,e){var r=t._id;return t.each((function(){var t=Lr(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return qr(t,r).value[n]}}function Ir(t,n){var e;return("number"==typeof n?De:n instanceof On?Ce:(e=On(n))?(n=e,Ce):Ie)(t,n)}function Yr(t){return function(){this.removeAttribute(t)}}function Br(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hr(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function jr(t,n,e){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===e?null:o===r?i:i=n(r=o,e)}}function Xr(t,n,e){var r,i,o;return function(){var u,a=e(this);if(null!=a)return(u=this.getAttribute(t))===a?null:u===r&&a===i?o:o=n(r=u,i=a);this.removeAttribute(t)}}function Vr(t,n,e){var r,i,o;return function(){var u,a=e(this);if(null!=a)return(u=this.getAttributeNS(t.space,t.local))===a?null:u===r&&a===i?o:o=n(r=u,i=a);this.removeAttributeNS(t.space,t.local)}}function Wr(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttributeNS(t.space,t.local,r(n))}}return e._value=n,e}function $r(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function Zr(t,n){return function(){Rr(this,t).delay=+n.apply(this,arguments)}}function Gr(t,n){return n=+n,function(){Rr(this,t).delay=n}}function Qr(t,n){return function(){Lr(this,t).duration=+n.apply(this,arguments)}}function Jr(t,n){return n=+n,function(){Lr(this,t).duration=n}}function Kr(t,n){if("function"!=typeof n)throw new Error;return function(){Lr(this,t).ease=n}}function ti(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Rr:Lr;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var ni=nn.prototype.constructor;function ei(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}var ri=0;function ii(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function oi(t){return nn().transition(t)}function ui(){return++ri}var ai=nn.prototype;function ci(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function si(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}ii.prototype=oi.prototype={constructor:ii,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Q(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,c,s=r[u],f=s.length,l=o[u]=new Array(f),h=0;h<f;++h)(a=s[h])&&(c=t.call(a,a.__data__,h,s))&&("__data__"in a&&(c.__data__=a.__data__),l[h]=c,Pr(l[h],n,e,h,l,qr(a,e)));return new ii(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=K(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var c,s=r[a],f=s.length,l=0;l<f;++l)if(c=s[l]){for(var h,p=t.call(c,c.__data__,l,s),d=qr(c,e),v=0,g=p.length;v<g;++v)(h=p[v])&&Pr(h,n,e,v,p,d);o.push(p),u.push(c)}return new ii(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=rt(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,c=r[i]=[],s=0;s<a;++s)(o=u[s])&&t.call(o,o.__data__,s,u)&&c.push(o);return new ii(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var c,s=n[a],f=e[a],l=s.length,h=u[a]=new Array(l),p=0;p<l;++p)(c=s[p]||f[p])&&(h[p]=c);for(;a<r;++a)u[a]=n[a];return new ii(u,this._parents,this._name,this._id)},selection:function(){return new ni(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=ui(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],c=a.length,s=0;s<c;++s)if(u=a[s]){var f=qr(u,n);Pr(u,t,e,s,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new ii(r,this._parents,t,e)},call:ai.call,nodes:ai.nodes,node:ai.node,size:ai.size,empty:ai.empty,each:ai.each,on:function(t,n){var e=this._id;return arguments.length<2?qr(this.node(),e).on.on(t):this.each(ti(e,t,n))},attr:function(t,n){var e=V(t),r="transform"===e?Je:Ir;return this.attrTween(t,"function"==typeof n?(e.local?Vr:Xr)(e,r,Fr(this,"attr."+t,n)):null==n?(e.local?Br:Yr)(e):(e.local?jr:Hr)(e,r,n+""))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=V(t);return this.tween(e,(r.local?Wr:$r)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Qe:Ir;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=mt(this,t),u=(this.style.removeProperty(t),mt(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,function(t){return function(){this.style.removeProperty(t)}}(t)):this.styleTween(t,"function"==typeof n?function(t,n,e){var r,i,o;return function(){var u=mt(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=mt(this,t)),u===a?null:u===r&&a===i?o:o=n(r=u,i=a)}}(t,r,Fr(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var o=mt(this,t);return o===e?null:o===r?i:i=n(r=o,e)}}(t,r,n+""),e)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,ei(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Fr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=qr(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Ur:Or)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Zr:Gr)(n,t)):qr(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Qr:Jr)(n,t)):qr(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(Kr(n,t)):qr(this.node(),n).ease}};var fi=function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),li=function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),hi=function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),pi=Math.PI,di=pi/2;function vi(t){return(1-Math.cos(pi*t))/2}function gi(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function _i(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var yi=7.5625;function mi(t){return(t=+t)<.36363636363636365?yi*t*t:t<.7272727272727273?yi*(t-=.5454545454545454)*t+.75:t<.9090909090909091?yi*(t-=.8181818181818182)*t+.9375:yi*(t-=.9545454545454546)*t+.984375}var xi=1.70158,bi=function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(xi),wi=function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(xi),Mi=function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(xi),Ti=2*Math.PI,Ni=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Ti);function i(t){return n*Math.pow(2,10*--t)*Math.sin((r-t)/e)}return i.amplitude=function(n){return t(n,e*Ti)},i.period=function(e){return t(n,e)},i}(1,.3),ki=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Ti);function i(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/e)}return i.amplitude=function(n){return t(n,e*Ti)},i.period=function(e){return t(n,e)},i}(1,.3),Si=function t(n,e){var r=Math.asin(1/(n=Math.max(1,n)))*(e/=Ti);function i(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((r-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((r+t)/e))/2}return i.amplitude=function(n){return t(n,e*Ti)},i.period=function(e){return t(n,e)},i}(1,.3),Ei={time:null,delay:0,duration:250,ease:si};function Ai(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Ei.time=br(),Ei;return e}nn.prototype.interrupt=function(t){return this.each((function(){Dr(this,t)}))},nn.prototype.transition=function(t){var n,e;t instanceof ii?(n=t._id,t=t._name):(n=ui(),(e=Ei).time=br(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],c=a.length,s=0;s<c;++s)(u=a[s])&&Pr(u,t,n,s,a,e||Ai(u,n));return new ii(r,this._parents,t,n)};var Ci=[null];function zi(t){return function(){return t}}function Pi(t,n,e){this.target=t,this.type=n,this.selection=e}function Ri(){t.event.stopImmediatePropagation()}function Li(){t.event.preventDefault(),t.event.stopImmediatePropagation()}var qi={name:"drag"},Di={name:"space"},Ui={name:"handle"},Oi={name:"center"},Fi={name:"x",handles:["e","w"].map(Wi),input:function(t,n){return t&&[[t[0],n[0][1]],[t[1],n[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},Ii={name:"y",handles:["n","s"].map(Wi),input:function(t,n){return t&&[[n[0][0],t[0]],[n[1][0],t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Yi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(Wi),input:function(t){return t},output:function(t){return t}},Bi={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Hi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},ji={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Xi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Vi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Wi(t){return{type:t}}function $i(){return!t.event.button}function Zi(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Gi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Qi(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ji(n){var e,r=Zi,i=$i,o=F(a,"start","brush","end"),u=6;function a(t){var e=t.property("__brush",h).selectAll(".overlay").data([Wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Bi.overlay).merge(e).each((function(){var t=Gi(this).extent;en(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),t.selectAll(".selection").data([Wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Bi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=t.selectAll(".handle").data(n.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return Bi[t.type]})),t.each(c).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}function c(){var t=en(this),n=Gi(this).selection;n?(t.selectAll(".selection").style("display",null).attr("x",n[0][0]).attr("y",n[0][1]).attr("width",n[1][0]-n[0][0]).attr("height",n[1][1]-n[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?n[1][0]-u/2:n[0][0]-u/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-u/2:n[0][1]-u/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+u:u})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+u:u}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function s(t,n){return t.__brush.emitter||new f(t,n)}function f(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function l(){if(t.event.touches){if(t.event.changedTouches.length<t.event.touches.length)return Li()}else if(e)return;if(i.apply(this,arguments)){var r,o,u,a,f,l,h,p,d,v,g,_,y,m=this,x=t.event.target.__data__.type,b="selection"===(t.event.metaKey?x="overlay":x)?qi:t.event.altKey?Oi:Ui,w=n===Ii?null:Xi[x],M=n===Fi?null:Vi[x],T=Gi(m),N=T.extent,k=T.selection,S=N[0][0],E=N[0][1],A=N[1][0],C=N[1][1],z=w&&M&&t.event.shiftKey,P=sn(m),R=P,L=s(m,arguments).beforestart();"overlay"===x?T.selection=k=[[r=n===Ii?S:P[0],u=n===Fi?E:P[1]],[f=n===Ii?A:r,h=n===Fi?C:u]]:(r=k[0][0],u=k[0][1],f=k[1][0],h=k[1][1]),o=r,a=u,l=f,p=h;var q=en(m).attr("pointer-events","none"),D=q.selectAll(".overlay").attr("cursor",Bi[x]);if(t.event.touches)q.on("touchmove.brush",O,!0).on("touchend.brush touchcancel.brush",I,!0);else{var U=en(t.event.view).on("keydown.brush",Y,!0).on("keyup.brush",B,!0).on("mousemove.brush",O,!0).on("mouseup.brush",I,!0);pn(t.event.view)}Ri(),Dr(m),c.call(m),L.start()}function O(){var t=sn(m);!z||_||y||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?y=!0:_=!0),R=t,g=!0,Li(),F()}function F(){var t;switch(d=R[0]-P[0],v=R[1]-P[1],b){case Di:case qi:w&&(d=Math.max(S-r,Math.min(A-f,d)),o=r+d,l=f+d),M&&(v=Math.max(E-u,Math.min(C-h,v)),a=u+v,p=h+v);break;case Ui:w<0?(d=Math.max(S-r,Math.min(A-r,d)),o=r+d,l=f):w>0&&(d=Math.max(S-f,Math.min(A-f,d)),o=r,l=f+d),M<0?(v=Math.max(E-u,Math.min(C-u,v)),a=u+v,p=h):M>0&&(v=Math.max(E-h,Math.min(C-h,v)),a=u,p=h+v);break;case Oi:w&&(o=Math.max(S,Math.min(A,r-d*w)),l=Math.max(S,Math.min(A,f+d*w))),M&&(a=Math.max(E,Math.min(C,u-v*M)),p=Math.max(E,Math.min(C,h+v*M)))}l<o&&(w*=-1,t=r,r=f,f=t,t=o,o=l,l=t,x in Hi&&D.attr("cursor",Bi[x=Hi[x]])),p<a&&(M*=-1,t=u,u=h,h=t,t=a,a=p,p=t,x in ji&&D.attr("cursor",Bi[x=ji[x]])),T.selection&&(k=T.selection),_&&(o=k[0][0],l=k[1][0]),y&&(a=k[0][1],p=k[1][1]),k[0][0]===o&&k[0][1]===a&&k[1][0]===l&&k[1][1]===p||(T.selection=[[o,a],[l,p]],c.call(m),L.brush())}function I(){if(Ri(),t.event.touches){if(t.event.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),q.on("touchmove.brush touchend.brush touchcancel.brush",null)}else dn(t.event.view,g),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);q.attr("pointer-events","all"),D.attr("cursor",Bi.overlay),T.selection&&(k=T.selection),Qi(k)&&(T.selection=null,c.call(m)),L.end()}function Y(){switch(t.event.keyCode){case 16:z=w&&M;break;case 18:b===Ui&&(w&&(f=l-d*w,r=o+d*w),M&&(h=p-v*M,u=a+v*M),b=Oi,F());break;case 32:b!==Ui&&b!==Oi||(w<0?f=l-d:w>0&&(r=o-d),M<0?h=p-v:M>0&&(u=a-v),b=Di,D.attr("cursor",Bi.selection),F());break;default:return}Li()}function B(){switch(t.event.keyCode){case 16:z&&(_=y=z=!1,F());break;case 18:b===Oi&&(w<0?f=l:w>0&&(r=o),M<0?h=p:M>0&&(u=a),b=Ui,F());break;case 32:b===Di&&(t.event.altKey?(w&&(f=l-d*w,r=o+d*w),M&&(h=p-v*M,u=a+v*M),b=Oi):(w<0?f=l:w>0&&(r=o),M<0?h=p:M>0&&(u=a),b=Ui),D.attr("cursor",Bi[x]),F());break;default:return}Li()}}function h(){var t=this.__brush||{selection:null};return t.extent=r.apply(this,arguments),t.dim=n,t}return a.move=function(t,e){t.selection?t.on("start.brush",(function(){s(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){s(this,arguments).end()})).tween("brush",(function(){var t=this,r=t.__brush,i=s(t,arguments),o=r.selection,u=n.input("function"==typeof e?e.apply(this,arguments):e,r.extent),a=Ye(o,u);function f(n){r.selection=1===n&&Qi(u)?null:a(n),c.call(t),i.brush()}return o&&u?f:f(1)})):t.each((function(){var t=this,r=arguments,i=t.__brush,o=n.input("function"==typeof e?e.apply(t,r):e,i.extent),u=s(t,r).beforestart();Dr(t),i.selection=null==o||Qi(o)?null:o,c.call(t),u.start().brush().end()}))},f.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(t){Zt(new Pi(a,t,n.output(this.state.selection)),o.apply,o,[t,this.that,this.args])}},a.extent=function(t){return arguments.length?(r="function"==typeof t?t:zi([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),a):r},a.filter=function(t){return arguments.length?(i="function"==typeof t?t:zi(!!t),a):i},a.handleSize=function(t){return arguments.length?(u=+t,a):u},a.on=function(){var t=o.on.apply(o,arguments);return t===o?a:t},a}var Ki=Math.cos,to=Math.sin,no=Math.PI,eo=no/2,ro=2*no,io=Math.max;function oo(t){return function(n,e){return t(n.source.value+n.target.value,e.source.value+e.target.value)}}var uo=Array.prototype.slice;function ao(t){return function(){return t}}var co=Math.PI,so=2*co,fo=1e-6,lo=so-fo;function ho(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function po(){return new ho}function vo(t){return t.source}function go(t){return t.target}function _o(t){return t.radius}function yo(t){return t.startAngle}function mo(t){return t.endAngle}ho.prototype=po.prototype={constructor:ho,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o=this._x1,u=this._y1,a=e-t,c=r-n,s=o-t,f=u-n,l=s*s+f*f;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=n);else if(l>fo)if(Math.abs(f*a-c*s)>fo&&i){var h=e-o,p=r-u,d=a*a+c*c,v=h*h+p*p,g=Math.sqrt(d),_=Math.sqrt(l),y=i*Math.tan((co-Math.acos((d+l-v)/(2*g*_)))/2),m=y/_,x=y/g;Math.abs(m-1)>fo&&(this._+="L"+(t+m*s)+","+(n+m*f)),this._+="A"+i+","+i+",0,0,"+ +(f*h>s*p)+","+(this._x1=t+x*a)+","+(this._y1=n+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,r,i,o){t=+t,n=+n;var u=(e=+e)*Math.cos(r),a=e*Math.sin(r),c=t+u,s=n+a,f=1^o,l=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+c+","+s:(Math.abs(this._x1-c)>fo||Math.abs(this._y1-s)>fo)&&(this._+="L"+c+","+s),e&&(l<0&&(l=l%so+so),l>lo?this._+="A"+e+","+e+",0,1,"+f+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+f+","+(this._x1=c)+","+(this._y1=s):l>fo&&(this._+="A"+e+","+e+",0,"+ +(l>=co)+","+f+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var xo="$";function bo(){}function wo(t,n){var e=new bo;if(t instanceof bo)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}function Mo(){return{}}function To(t,n,e){t[n]=e}function No(){return wo()}function ko(t,n,e){t.set(n,e)}function So(){}bo.prototype=wo.prototype={constructor:bo,has:function(t){return xo+t in this},get:function(t){return this[xo+t]},set:function(t,n){return this[xo+t]=n,this},remove:function(t){var n=xo+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===xo&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===xo&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===xo&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===xo&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===xo&&++t;return t},empty:function(){for(var t in this)if(t[0]===xo)return!1;return!0},each:function(t){for(var n in this)n[0]===xo&&t(this[n],n.slice(1),this)}};var Eo=wo.prototype;function Ao(t,n){var e=new So;if(t instanceof So)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}So.prototype=Ao.prototype={constructor:So,has:Eo.has,add:function(t){return this[xo+(t+="")]=t,this},remove:Eo.remove,clear:Eo.clear,values:Eo.keys,size:Eo.size,empty:Eo.empty,each:Eo.each};var Co={},zo={};function Po(t){return new Function("d","return {"+t.map((function(t,n){return JSON.stringify(t)+": d["+n+"]"})).join(",")+"}")}function Ro(t){var n=new RegExp('["'+t+"\n\r]"),e=t.charCodeAt(0);function r(t,n){var r,i=[],o=t.length,u=0,a=0,c=o<=0,s=!1;function f(){if(c)return zo;if(s)return s=!1,Co;var n,r,i=u;if(34===t.charCodeAt(i)){for(;u++<o&&34!==t.charCodeAt(u)||34===t.charCodeAt(++u););return(n=u)>=o?c=!0:10===(r=t.charCodeAt(u++))?s=!0:13===r&&(s=!0,10===t.charCodeAt(u)&&++u),t.slice(i+1,n-1).replace(/""/g,'"')}for(;u<o;){if(10===(r=t.charCodeAt(n=u++)))s=!0;else if(13===r)s=!0,10===t.charCodeAt(u)&&++u;else if(r!==e)continue;return t.slice(i,n)}return c=!0,t.slice(i,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(r=f())!==zo;){for(var l=[];r!==Co&&r!==zo;)l.push(r),r=f();n&&null==(l=n(l,a++))||i.push(l)}return i}function i(n){return n.map(o).join(t)}function o(t){return null==t?"":n.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,n){var e,i,o=r(t,(function(t,r){if(e)return e(t,r-1);i=t,e=n?function(t,n){var e=Po(t);return function(r,i){return n(e(r),i,t)}}(t,n):Po(t)}));return o.columns=i||[],o},parseRows:r,format:function(n,e){return null==e&&(e=function(t){var n=Object.create(null),e=[];return t.forEach((function(t){for(var r in t)r in n||e.push(n[r]=r)})),e}(n)),[e.map(o).join(t)].concat(n.map((function(n){return e.map((function(t){return o(n[t])})).join(t)}))).join("\n")},formatRows:function(t){return t.map(i).join("\n")}}}var Lo=Ro(","),qo=Lo.parse,Do=Lo.parseRows,Uo=Lo.format,Oo=Lo.formatRows,Fo=Ro("\t"),Io=Fo.parse,Yo=Fo.parseRows,Bo=Fo.format,Ho=Fo.formatRows;function jo(t){return function(){return t}}function Xo(){return 1e-6*(Math.random()-.5)}function Vo(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,c,s,f,l,h,p=t._root,d={data:r},v=t._x0,g=t._y0,_=t._x1,y=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((s=n>=(o=(v+_)/2))?v=o:_=o,(f=e>=(u=(g+y)/2))?g=u:y=u,i=p,!(p=p[l=f<<1|s]))return i[l]=d,t;if(a=+t._x.call(null,p.data),c=+t._y.call(null,p.data),n===a&&e===c)return d.next=p,i?i[l]=d:t._root=d,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(s=n>=(o=(v+_)/2))?v=o:_=o,(f=e>=(u=(g+y)/2))?g=u:y=u}while((l=f<<1|s)==(h=(c>=u)<<1|a>=o));return i[h]=p,i[l]=d,t}function Wo(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function $o(t){return t[0]}function Zo(t){return t[1]}function Go(t,n,e){var r=new Qo(null==n?$o:n,null==e?Zo:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Qo(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function Jo(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Ko=Go.prototype=Qo.prototype;function tu(t){return t.x+t.vx}function nu(t){return t.y+t.vy}function eu(t){return t.index}function ru(t,n){var e=t.get(n);if(!e)throw new Error("missing: "+n);return e}function iu(t){return t.x}function ou(t){return t.y}Ko.copy=function(){var t,n,e=new Qo(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=Jo(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=Jo(n));return e},Ko.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Vo(this.cover(n,e),n,e,t)},Ko.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),c=1/0,s=1/0,f=-1/0,l=-1/0;for(e=0;e<o;++e)isNaN(r=+this._x.call(null,n=t[e]))||isNaN(i=+this._y.call(null,n))||(u[e]=r,a[e]=i,r<c&&(c=r),r>f&&(f=r),i<s&&(s=i),i>l&&(l=i));for(f<c&&(c=this._x0,f=this._x1),l<s&&(s=this._y0,l=this._y1),this.cover(c,s).cover(f,l),e=0;e<o;++e)Vo(this,u[e],a[e],t[e]);return this},Ko.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{if(!(e>t||t>i||r>n||n>o))return this;var u,a,c=i-e,s=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do{(u=new Array(4))[a]=s,s=u}while(o=r+(c*=2),t>(i=e+c)||n>o);break;case 1:do{(u=new Array(4))[a]=s,s=u}while(o=r+(c*=2),(e=i-c)>t||n>o);break;case 2:do{(u=new Array(4))[a]=s,s=u}while(r=o-(c*=2),t>(i=e+c)||r>n);break;case 3:do{(u=new Array(4))[a]=s,s=u}while(r=o-(c*=2),(e=i-c)>t||r>n)}this._root&&this._root.length&&(this._root=s)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},Ko.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},Ko.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},Ko.find=function(t,n,e){var r,i,o,u,a,c,s,f=this._x0,l=this._y0,h=this._x1,p=this._y1,d=[],v=this._root;for(v&&d.push(new Wo(v,f,l,h,p)),null==e?e=1/0:(f=t-e,l=n-e,h=t+e,p=n+e,e*=e);c=d.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(o=c.y0)>p||(u=c.x1)<f||(a=c.y1)<l))if(v.length){var g=(i+u)/2,_=(o+a)/2;d.push(new Wo(v[3],g,_,u,a),new Wo(v[2],i,_,g,a),new Wo(v[1],g,o,u,_),new Wo(v[0],i,o,g,_)),(s=(n>=_)<<1|t>=g)&&(c=d[d.length-1],d[d.length-1]=d[d.length-1-s],d[d.length-1-s]=c)}else{var y=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=y*y+m*m;if(x<e){var b=Math.sqrt(e=x);f=t-b,l=n-b,h=t+b,p=n+b,r=v.data}}return r},Ko.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,r,i,o,u,a,c,s,f,l,h,p=this._root,d=this._x0,v=this._y0,g=this._x1,_=this._y1;if(!p)return this;if(p.length)for(;;){if((s=o>=(a=(d+g)/2))?d=a:g=a,(f=u>=(c=(v+_)/2))?v=c:_=c,n=p,!(p=p[l=f<<1|s]))return this;if(!p.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)},Ko.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},Ko.root=function(){return this._root},Ko.size=function(){var t=0;return this.visit((function(n){if(!n.length)do{++t}while(n=n.next)})),t},Ko.visit=function(t){var n,e,r,i,o,u,a=[],c=this._root;for(c&&a.push(new Wo(c,this._x0,this._y0,this._x1,this._y1));n=a.pop();)if(!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,u=n.y1)&&c.length){var s=(r+o)/2,f=(i+u)/2;(e=c[3])&&a.push(new Wo(e,s,f,o,u)),(e=c[2])&&a.push(new Wo(e,r,f,s,u)),(e=c[1])&&a.push(new Wo(e,s,i,o,f)),(e=c[0])&&a.push(new Wo(e,r,i,s,f))}return this},Ko.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new Wo(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var o,u=n.x0,a=n.y0,c=n.x1,s=n.y1,f=(u+c)/2,l=(a+s)/2;(o=i[0])&&e.push(new Wo(o,u,a,f,l)),(o=i[1])&&e.push(new Wo(o,f,a,c,l)),(o=i[2])&&e.push(new Wo(o,u,l,f,s)),(o=i[3])&&e.push(new Wo(o,f,l,c,s))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},Ko.x=function(t){return arguments.length?(this._x=t,this):this._x},Ko.y=function(t){return arguments.length?(this._y=t,this):this._y};var uu,au=Math.PI*(3-Math.sqrt(5));function cu(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function su(t){return(t=cu(Math.abs(t)))?t[1]:NaN}function fu(t,n){var e=cu(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}var lu={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,o=-1;i<r;++i)switch(t[i]){case".":o=e=i;break;case"0":0===o&&(o=i),e=i;break;case"e":break t;default:o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t},"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return fu(100*t,n)},r:fu,s:function(t,n){var e=cu(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(uu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:o>u?r+new Array(o-u+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+cu(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},hu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function pu(t){return new du(t)}function du(t){if(!(n=hu.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",o=n[4]||"",u=!!n[5],a=n[6]&&+n[6],c=!!n[7],s=n[8]&&+n[8].slice(1),f=n[9]||"";"n"===f?(c=!0,f="g"):lu[f]||(f=""),(u||"0"===e&&"="===r)&&(u=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=o,this.zero=u,this.width=a,this.comma=c,this.precision=s,this.type=f}function vu(t){return t}pu.prototype=du.prototype,du.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+this.type};var gu,_u=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function yu(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,o=[],u=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),o.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}):vu,i=t.currency,o=t.decimal,u=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):vu,a=t.percent||"%";function c(t){var n=(t=pu(t)).fill,e=t.align,c=t.sign,s=t.symbol,f=t.zero,l=t.width,h=t.comma,p=t.precision,d=t.type,v="$"===s?i[0]:"#"===s&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",g="$"===s?i[1]:/[%p]/.test(d)?a:"",_=lu[d],y=!d||/[defgprs%]/.test(d);function m(t){var i,a,s,m=v,x=g;if("c"===d)x=_(t)+x,t="";else{var b=(t=+t)<0;if(t=_(Math.abs(t),p),b&&0==+t&&(b=!1),m=(b?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===d?_u[8+uu/3]:"")+x+(b&&"("===c?")":""),y)for(i=-1,a=t.length;++i<a;)if(48>(s=t.charCodeAt(i))||s>57){x=(46===s?o+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!f&&(t=r(t,1/0));var w=m.length+t.length+x.length,M=w<l?new Array(l-w+1).join(n):"";switch(h&&f&&(t=r(M+t,M.length?l-x.length:1/0),M=""),e){case"<":t=m+t+x+M;break;case"=":t=m+M+t+x;break;case"^":t=M.slice(0,w=M.length>>1)+m+t+x+M.slice(w);break;default:t=M+m+t+x}return u(t)}return p=null==p?d?6:12:/[gprs]/.test(d)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=pu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(su(n)/3))),i=Math.pow(10,-r),o=_u[8+r/3];return function(t){return e(i*t)+o}}}}function mu(n){return gu=yu(n),t.format=gu.format,t.formatPrefix=gu.formatPrefix,gu}function xu(t){return Math.max(0,-su(Math.abs(t)))}function bu(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(su(n)/3)))-su(Math.abs(t)))}function wu(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,su(n)-su(t))+1}function Mu(){return new Tu}function Tu(){this.reset()}mu({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),Tu.prototype={constructor:Tu,reset:function(){this.s=this.t=0},add:function(t){ku(Nu,t,this.t),ku(this,Nu.s,this.s),this.s?this.t+=Nu.t:this.s=Nu.t},valueOf:function(){return this.s}};var Nu=new Tu;function ku(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var Su=1e-6,Eu=Math.PI,Au=Eu/2,Cu=Eu/4,zu=2*Eu,Pu=180/Eu,Ru=Eu/180,Lu=Math.abs,qu=Math.atan,Du=Math.atan2,Uu=Math.cos,Ou=Math.ceil,Fu=Math.exp,Iu=Math.log,Yu=Math.pow,Bu=Math.sin,Hu=Math.sign||function(t){return t>0?1:t<0?-1:0},ju=Math.sqrt,Xu=Math.tan;function Vu(t){return t>1?0:t<-1?Eu:Math.acos(t)}function Wu(t){return t>1?Au:t<-1?-Au:Math.asin(t)}function $u(t){return(t=Bu(t/2))*t}function Zu(){}function Gu(t,n){t&&Ju.hasOwnProperty(t.type)&&Ju[t.type](t,n)}var Qu={Feature:function(t,n){Gu(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)Gu(e[r].geometry,n)}},Ju={Sphere:function(t,n){n.sphere()},Point:function(t,n){t=t.coordinates,n.point(t[0],t[1],t[2])},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)t=e[r],n.point(t[0],t[1],t[2])},LineString:function(t,n){Ku(t.coordinates,n,0)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)Ku(e[r],n,0)},Polygon:function(t,n){ta(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)ta(e[r],n)},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)Gu(e[r],n)}};function Ku(t,n,e){var r,i=-1,o=t.length-e;for(n.lineStart();++i<o;)r=t[i],n.point(r[0],r[1],r[2]);n.lineEnd()}function ta(t,n){var e=-1,r=t.length;for(n.polygonStart();++e<r;)Ku(t[e],n,1);n.polygonEnd()}function na(t,n){t&&Qu.hasOwnProperty(t.type)?Qu[t.type](t,n):Gu(t,n)}var ea,ra,ia,oa,ua,aa,ca,sa,fa,la,ha,pa,da,va=Mu(),ga=Mu(),_a={point:Zu,lineStart:Zu,lineEnd:Zu,polygonStart:function(){va.reset(),_a.lineStart=ya,_a.lineEnd=ma},polygonEnd:function(){var t=+va;ga.add(t<0?zu+t:t),this.lineStart=this.lineEnd=this.point=Zu},sphere:function(){ga.add(zu)}};function ya(){_a.point=xa}function ma(){ba(ea,ra)}function xa(t,n){_a.point=ba,ea=t,ra=n,ia=t*=Ru,oa=Uu(n=(n*=Ru)/2+Cu),ua=Bu(n)}function ba(t,n){var e=(t*=Ru)-ia,r=e>=0?1:-1,i=r*e,o=Uu(n=(n*=Ru)/2+Cu),u=Bu(n),a=ua*u,c=oa*o+a*Uu(i),s=a*r*Bu(i);va.add(Du(s,c)),ia=t,oa=o,ua=u}function wa(t){return[Du(t[1],t[0]),Wu(t[2])]}function Ma(t){var n=t[0],e=t[1],r=Uu(e);return[r*Uu(n),r*Bu(n),Bu(e)]}function Ta(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Na(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function ka(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function Sa(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Ea(t){var n=ju(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var Aa,Ca,za,Pa,Ra,La,qa,Da,Ua,Oa,Fa,Ia,Ya,Ba,Ha,ja,Xa,Va,Wa=Mu(),$a={point:Za,lineStart:Qa,lineEnd:Ja,polygonStart:function(){$a.point=Ka,$a.lineStart=tc,$a.lineEnd=nc,Wa.reset(),_a.polygonStart()},polygonEnd:function(){_a.polygonEnd(),$a.point=Za,$a.lineStart=Qa,$a.lineEnd=Ja,va<0?(aa=-(sa=180),ca=-(fa=90)):Wa>Su?fa=90:Wa<-1e-6&&(ca=-90),Ca[0]=aa,Ca[1]=sa}};function Za(t,n){Aa.push(Ca=[aa=t,sa=t]),n<ca&&(ca=n),n>fa&&(fa=n)}function Ga(t,n){var e=Ma([t*Ru,n*Ru]);if(da){var r=Na(da,e),i=Na([r[1],-r[0],0],r);Ea(i),i=wa(i);var o,u=t-la,a=u>0?1:-1,c=i[0]*Pu*a,s=Lu(u)>180;s^(a*la<c&&c<a*t)?(o=i[1]*Pu)>fa&&(fa=o):s^(a*la<(c=(c+360)%360-180)&&c<a*t)?(o=-i[1]*Pu)<ca&&(ca=o):(n<ca&&(ca=n),n>fa&&(fa=n)),s?t<la?ec(aa,t)>ec(aa,sa)&&(sa=t):ec(t,sa)>ec(aa,sa)&&(aa=t):sa>=aa?(t<aa&&(aa=t),t>sa&&(sa=t)):t>la?ec(aa,t)>ec(aa,sa)&&(sa=t):ec(t,sa)>ec(aa,sa)&&(aa=t)}else Aa.push(Ca=[aa=t,sa=t]);n<ca&&(ca=n),n>fa&&(fa=n),da=e,la=t}function Qa(){$a.point=Ga}function Ja(){Ca[0]=aa,Ca[1]=sa,$a.point=Za,da=null}function Ka(t,n){if(da){var e=t-la;Wa.add(Lu(e)>180?e+(e>0?360:-360):e)}else ha=t,pa=n;_a.point(t,n),Ga(t,n)}function tc(){_a.lineStart()}function nc(){Ka(ha,pa),_a.lineEnd(),Lu(Wa)>Su&&(aa=-(sa=180)),Ca[0]=aa,Ca[1]=sa,da=null}function ec(t,n){return(n-=t)<0?n+360:n}function rc(t,n){return t[0]-n[0]}function ic(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n<t[0]||t[1]<n}var oc={sphere:Zu,point:uc,lineStart:cc,lineEnd:lc,polygonStart:function(){oc.lineStart=hc,oc.lineEnd=pc},polygonEnd:function(){oc.lineStart=cc,oc.lineEnd=lc}};function uc(t,n){t*=Ru;var e=Uu(n*=Ru);ac(e*Uu(t),e*Bu(t),Bu(n))}function ac(t,n,e){++za,Ra+=(t-Ra)/za,La+=(n-La)/za,qa+=(e-qa)/za}function cc(){oc.point=sc}function sc(t,n){t*=Ru;var e=Uu(n*=Ru);ja=e*Uu(t),Xa=e*Bu(t),Va=Bu(n),oc.point=fc,ac(ja,Xa,Va)}function fc(t,n){t*=Ru;var e=Uu(n*=Ru),r=e*Uu(t),i=e*Bu(t),o=Bu(n),u=Du(ju((u=Xa*o-Va*i)*u+(u=Va*r-ja*o)*u+(u=ja*i-Xa*r)*u),ja*r+Xa*i+Va*o);Pa+=u,Da+=u*(ja+(ja=r)),Ua+=u*(Xa+(Xa=i)),Oa+=u*(Va+(Va=o)),ac(ja,Xa,Va)}function lc(){oc.point=uc}function hc(){oc.point=dc}function pc(){vc(Ba,Ha),oc.point=uc}function dc(t,n){Ba=t,Ha=n,t*=Ru,n*=Ru,oc.point=vc;var e=Uu(n);ja=e*Uu(t),Xa=e*Bu(t),Va=Bu(n),ac(ja,Xa,Va)}function vc(t,n){t*=Ru;var e=Uu(n*=Ru),r=e*Uu(t),i=e*Bu(t),o=Bu(n),u=Xa*o-Va*i,a=Va*r-ja*o,c=ja*i-Xa*r,s=ju(u*u+a*a+c*c),f=Wu(s),l=s&&-f/s;Fa+=l*u,Ia+=l*a,Ya+=l*c,Pa+=f,Da+=f*(ja+(ja=r)),Ua+=f*(Xa+(Xa=i)),Oa+=f*(Va+(Va=o)),ac(ja,Xa,Va)}function gc(t){return function(){return t}}function _c(t,n){function e(e,r){return e=t(e,r),n(e[0],e[1])}return t.invert&&n.invert&&(e.invert=function(e,r){return(e=n.invert(e,r))&&t.invert(e[0],e[1])}),e}function yc(t,n){return[t>Eu?t-zu:t<-Eu?t+zu:t,n]}function mc(t,n,e){return(t%=zu)?n||e?_c(bc(t),wc(n,e)):bc(t):n||e?wc(n,e):yc}function xc(t){return function(n,e){return[(n+=t)>Eu?n-zu:n<-Eu?n+zu:n,e]}}function bc(t){var n=xc(t);return n.invert=xc(-t),n}function wc(t,n){var e=Uu(t),r=Bu(t),i=Uu(n),o=Bu(n);function u(t,n){var u=Uu(n),a=Uu(t)*u,c=Bu(t)*u,s=Bu(n),f=s*e+a*r;return[Du(c*i-f*o,a*e-s*r),Wu(f*i+c*o)]}return u.invert=function(t,n){var u=Uu(n),a=Uu(t)*u,c=Bu(t)*u,s=Bu(n),f=s*i-c*o;return[Du(c*i+s*o,a*e+f*r),Wu(f*e-a*r)]},u}function Mc(t){function n(n){return(n=t(n[0]*Ru,n[1]*Ru))[0]*=Pu,n[1]*=Pu,n}return t=mc(t[0]*Ru,t[1]*Ru,t.length>2?t[2]*Ru:0),n.invert=function(n){return(n=t.invert(n[0]*Ru,n[1]*Ru))[0]*=Pu,n[1]*=Pu,n},n}function Tc(t,n,e,r,i,o){if(e){var u=Uu(n),a=Bu(n),c=r*e;null==i?(i=n+r*zu,o=n-c/2):(i=Nc(u,i),o=Nc(u,o),(r>0?i<o:i>o)&&(i+=r*zu));for(var s,f=i;r>0?f>o:f<o;f-=c)s=wa([u,-a*Uu(f),-a*Bu(f)]),t.point(s[0],s[1])}}function Nc(t,n){(n=Ma(n))[0]-=t,Ea(n);var e=Vu(-n[1]);return((-n[2]<0?-e:e)+zu-Su)%zu}function kc(){var t,n=[];return{point:function(n,e){t.push([n,e])},lineStart:function(){n.push(t=[])},lineEnd:Zu,rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}}function Sc(t,n){return Lu(t[0]-n[0])<Su&&Lu(t[1]-n[1])<Su}function Ec(t,n,e,r){this.x=t,this.z=n,this.o=e,this.e=r,this.v=!1,this.n=this.p=null}function Ac(t,n,e,r,i){var o,u,a=[],c=[];if(t.forEach((function(t){if(!((n=t.length-1)<=0)){var n,e,r=t[0],u=t[n];if(Sc(r,u)){for(i.lineStart(),o=0;o<n;++o)i.point((r=t[o])[0],r[1]);i.lineEnd()}else a.push(e=new Ec(r,t,null,!0)),c.push(e.o=new Ec(r,null,e,!1)),a.push(e=new Ec(u,t,null,!1)),c.push(e.o=new Ec(u,null,e,!0))}})),a.length){for(c.sort(n),Cc(a),Cc(c),o=0,u=c.length;o<u;++o)c[o].e=e=!e;for(var s,f,l=a[0];;){for(var h=l,p=!0;h.v;)if((h=h.n)===l)return;s=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(o=0,u=s.length;o<u;++o)i.point((f=s[o])[0],f[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(s=h.p.z,o=s.length-1;o>=0;--o)i.point((f=s[o])[0],f[1]);else r(h.x,h.p.x,-1,i);h=h.p}s=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function Cc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r<n;)i.n=e=t[r],e.p=i,i=e;i.n=e=t[0],e.p=i}}yc.invert=yc;var zc=Mu();function Pc(t,n){var e=n[0],r=n[1],i=[Bu(e),-Uu(e),0],o=0,u=0;zc.reset();for(var a=0,c=t.length;a<c;++a)if(f=(s=t[a]).length)for(var s,f,l=s[f-1],h=l[0],p=l[1]/2+Cu,d=Bu(p),v=Uu(p),g=0;g<f;++g,h=y,d=x,v=b,l=_){var _=s[g],y=_[0],m=_[1]/2+Cu,x=Bu(m),b=Uu(m),w=y-h,M=w>=0?1:-1,T=M*w,N=T>Eu,k=d*x;if(zc.add(Du(k*M*Bu(T),v*b+k*Uu(T))),o+=N?w+M*zu:w,N^h>=e^y>=e){var S=Na(Ma(l),Ma(_));Ea(S);var E=Na(i,S);Ea(E);var A=(N^w>=0?-1:1)*Wu(E[2]);(r>A||r===A&&(S[0]||S[1]))&&(u+=N^w>=0?1:-1)}}return(o<-1e-6||o<Su&&zc<-1e-6)^1&u}function Rc(t,n,e,r){return function(i){var o,u,a,c=n(i),s=kc(),f=n(s),l=!1,h={point:p,lineStart:v,lineEnd:g,polygonStart:function(){h.point=_,h.lineStart=y,h.lineEnd=m,u=[],o=[]},polygonEnd:function(){h.point=p,h.lineStart=v,h.lineEnd=g,u=N(u);var t=Pc(o,r);u.length?(l||(i.polygonStart(),l=!0),Ac(u,qc,t,e,i)):t&&(l||(i.polygonStart(),l=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),u=o=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(n,e){t(n,e)&&i.point(n,e)}function d(t,n){c.point(t,n)}function v(){h.point=d,c.lineStart()}function g(){h.point=p,c.lineEnd()}function _(t,n){a.push([t,n]),f.point(t,n)}function y(){f.lineStart(),a=[]}function m(){_(a[0][0],a[0][1]),f.lineEnd();var t,n,e,r,c=f.clean(),h=s.result(),p=h.length;if(a.pop(),o.push(a),a=null,p)if(1&c){if((n=(e=h[0]).length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),t=0;t<n;++t)i.point((r=e[t])[0],r[1]);i.lineEnd()}}else p>1&&2&c&&h.push(h.pop().concat(h.shift())),u.push(h.filter(Lc))}return h}}function Lc(t){return t.length>1}function qc(t,n){return((t=t.x)[0]<0?t[1]-Au-Su:Au-t[1])-((n=n.x)[0]<0?n[1]-Au-Su:Au-n[1])}var Dc=Rc((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(o,u){var a=o>0?Eu:-Eu,c=Lu(o-e);Lu(c-Eu)<Su?(t.point(e,r=(r+u)/2>0?Au:-Au),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&c>=Eu&&(Lu(e-i)<Su&&(e-=i*Su),Lu(o-a)<Su&&(o-=a*Su),r=function(t,n,e,r){var i,o,u=Bu(t-e);return Lu(u)>Su?qu((Bu(n)*(o=Uu(r))*Bu(e)-Bu(r)*(i=Uu(n))*Bu(t))/(i*o*u)):(n+r)/2}(e,r,o,u),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=o,r=u),i=a},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-n}}}),(function(t,n,e,r){var i;if(null==t)i=e*Au,r.point(-Eu,i),r.point(0,i),r.point(Eu,i),r.point(Eu,0),r.point(Eu,-i),r.point(0,-i),r.point(-Eu,-i),r.point(-Eu,0),r.point(-Eu,i);else if(Lu(t[0]-n[0])>Su){var o=t[0]<n[0]?Eu:-Eu;i=e*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(n[0],n[1])}),[-Eu,-Au]);function Uc(t){var n=Uu(t),e=6*Ru,r=n>0,i=Lu(n)>Su;function o(t,e){return Uu(t)*Uu(e)>n}function u(t,e,r){var i=[1,0,0],o=Na(Ma(t),Ma(e)),u=Ta(o,o),a=o[0],c=u-a*a;if(!c)return!r&&t;var s=n*u/c,f=-n*a/c,l=Na(i,o),h=Sa(i,s);ka(h,Sa(o,f));var p=l,d=Ta(h,p),v=Ta(p,p),g=d*d-v*(Ta(h,h)-1);if(!(g<0)){var _=ju(g),y=Sa(p,(-d-_)/v);if(ka(y,h),y=wa(y),!r)return y;var m,x=t[0],b=e[0],w=t[1],M=e[1];b<x&&(m=x,x=b,b=m);var T=b-x,N=Lu(T-Eu)<Su;if(!N&&M<w&&(m=w,w=M,M=m),N||T<Su?N?w+M>0^y[1]<(Lu(y[0]-x)<Su?w:M):w<=y[1]&&y[1]<=M:T>Eu^(x<=y[0]&&y[0]<=b)){var k=Sa(p,(-d+_)/v);return ka(k,h),[y,wa(k)]}}}function a(n,e){var i=r?t:Eu-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return Rc(o,(function(t){var n,e,c,s,f;return{lineStart:function(){s=c=!1,f=1},point:function(l,h){var p,d=[l,h],v=o(l,h),g=r?v?0:a(l,h):v?a(l+(l<0?Eu:-Eu),h):0;if(!n&&(s=c=v)&&t.lineStart(),v!==c&&(!(p=u(n,d))||Sc(n,p)||Sc(d,p))&&(d[0]+=Su,d[1]+=Su,v=o(d[0],d[1])),v!==c)f=0,v?(t.lineStart(),p=u(d,n),t.point(p[0],p[1])):(p=u(n,d),t.point(p[0],p[1]),t.lineEnd()),n=p;else if(i&&n&&r^v){var _;g&e||!(_=u(d,n,!0))||(f=0,r?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1])))}!v||n&&Sc(n,d)||t.point(d[0],d[1]),n=d,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return f|(s&&c)<<1}}}),(function(n,r,i,o){Tc(o,t,e,i,n,r)}),r?[0,-t]:[-Eu,t-Eu])}var Oc=1e9,Fc=-Oc;function Ic(t,n,e,r){function i(i,o){return t<=i&&i<=e&&n<=o&&o<=r}function o(i,o,a,s){var f=0,l=0;if(null==i||(f=u(i,a))!==(l=u(o,a))||c(i,o)<0^a>0)do{s.point(0===f||3===f?t:e,f>1?r:n)}while((f=(f+a+4)%4)!==l);else s.point(o[0],o[1])}function u(r,i){return Lu(r[0]-t)<Su?i>0?0:3:Lu(r[0]-e)<Su?i>0?2:1:Lu(r[1]-n)<Su?i>0?1:0:i>0?3:2}function a(t,n){return c(t.x,n.x)}function c(t,n){var e=u(t,1),r=u(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(u){var c,s,f,l,h,p,d,v,g,_,y,m=u,x=kc(),b={point:w,lineStart:function(){b.point=M,s&&s.push(f=[]),_=!0,g=!1,d=v=NaN},lineEnd:function(){c&&(M(l,h),p&&g&&x.rejoin(),c.push(x.result())),b.point=w,g&&m.lineEnd()},polygonStart:function(){m=x,c=[],s=[],y=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,i=s.length;e<i;++e)for(var o,u,a=s[e],c=1,f=a.length,l=a[0],h=l[0],p=l[1];c<f;++c)o=h,u=p,h=(l=a[c])[0],p=l[1],u<=r?p>r&&(h-o)*(r-u)>(p-u)*(t-o)&&++n:p<=r&&(h-o)*(r-u)<(p-u)*(t-o)&&--n;return n}(),e=y&&n,i=(c=N(c)).length;(e||i)&&(u.polygonStart(),e&&(u.lineStart(),o(null,null,1,u),u.lineEnd()),i&&Ac(c,a,n,o,u),u.polygonEnd()),m=u,c=s=f=null}};function w(t,n){i(t,n)&&m.point(t,n)}function M(o,u){var a=i(o,u);if(s&&f.push([o,u]),_)l=o,h=u,p=a,_=!1,a&&(m.lineStart(),m.point(o,u));else if(a&&g)m.point(o,u);else{var c=[d=Math.max(Fc,Math.min(Oc,d)),v=Math.max(Fc,Math.min(Oc,v))],x=[o=Math.max(Fc,Math.min(Oc,o)),u=Math.max(Fc,Math.min(Oc,u))];!function(t,n,e,r,i,o){var u,a=t[0],c=t[1],s=0,f=1,l=n[0]-a,h=n[1]-c;if(u=e-a,l||!(u>0)){if(u/=l,l<0){if(u<s)return;u<f&&(f=u)}else if(l>0){if(u>f)return;u>s&&(s=u)}if(u=i-a,l||!(u<0)){if(u/=l,l<0){if(u>f)return;u>s&&(s=u)}else if(l>0){if(u<s)return;u<f&&(f=u)}if(u=r-c,h||!(u>0)){if(u/=h,h<0){if(u<s)return;u<f&&(f=u)}else if(h>0){if(u>f)return;u>s&&(s=u)}if(u=o-c,h||!(u<0)){if(u/=h,h<0){if(u>f)return;u>s&&(s=u)}else if(h>0){if(u<s)return;u<f&&(f=u)}return s>0&&(t[0]=a+s*l,t[1]=c+s*h),f<1&&(n[0]=a+f*l,n[1]=c+f*h),!0}}}}}(c,x,t,n,e,r)?a&&(m.lineStart(),m.point(o,u),y=!1):(g||(m.lineStart(),m.point(c[0],c[1])),m.point(x[0],x[1]),a||m.lineEnd(),y=!1)}d=o,v=u,g=a}return b}}var Yc,Bc,Hc,jc=Mu(),Xc={sphere:Zu,point:Zu,lineStart:function(){Xc.point=Wc,Xc.lineEnd=Vc},lineEnd:Zu,polygonStart:Zu,polygonEnd:Zu};function Vc(){Xc.point=Xc.lineEnd=Zu}function Wc(t,n){Yc=t*=Ru,Bc=Bu(n*=Ru),Hc=Uu(n),Xc.point=$c}function $c(t,n){t*=Ru;var e=Bu(n*=Ru),r=Uu(n),i=Lu(t-Yc),o=Uu(i),u=r*Bu(i),a=Hc*e-Bc*r*o,c=Bc*e+Hc*r*o;jc.add(Du(ju(u*u+a*a),c)),Yc=t,Bc=e,Hc=r}function Zc(t){return jc.reset(),na(t,Xc),+jc}var Gc=[null,null],Qc={type:"LineString",coordinates:Gc};function Jc(t,n){return Gc[0]=t,Gc[1]=n,Zc(Qc)}var Kc={Feature:function(t,n){return ns(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r<i;)if(ns(e[r].geometry,n))return!0;return!1}},ts={Sphere:function(){return!0},Point:function(t,n){return es(t.coordinates,n)},MultiPoint:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(es(e[r],n))return!0;return!1},LineString:function(t,n){return rs(t.coordinates,n)},MultiLineString:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(rs(e[r],n))return!0;return!1},Polygon:function(t,n){return is(t.coordinates,n)},MultiPolygon:function(t,n){for(var e=t.coordinates,r=-1,i=e.length;++r<i;)if(is(e[r],n))return!0;return!1},GeometryCollection:function(t,n){for(var e=t.geometries,r=-1,i=e.length;++r<i;)if(ns(e[r],n))return!0;return!1}};function ns(t,n){return!(!t||!ts.hasOwnProperty(t.type))&&ts[t.type](t,n)}function es(t,n){return 0===Jc(t,n)}function rs(t,n){var e=Jc(t[0],t[1]);return Jc(t[0],n)+Jc(n,t[1])<=e+Su}function is(t,n){return!!Pc(t.map(os),us(n))}function os(t){return(t=t.map(us)).pop(),t}function us(t){return[t[0]*Ru,t[1]*Ru]}function as(t,n,e){var r=g(t,n-Su,e).concat(n);return function(t){return r.map((function(n){return[t,n]}))}}function cs(t,n,e){var r=g(t,n-Su,e).concat(n);return function(t){return r.map((function(n){return[n,t]}))}}function ss(){var t,n,e,r,i,o,u,a,c,s,f,l,h=10,p=h,d=90,v=360,_=2.5;function y(){return{type:"MultiLineString",coordinates:m()}}function m(){return g(Ou(r/d)*d,e,d).map(f).concat(g(Ou(a/v)*v,u,v).map(l)).concat(g(Ou(n/h)*h,t,h).filter((function(t){return Lu(t%d)>Su})).map(c)).concat(g(Ou(o/p)*p,i,p).filter((function(t){return Lu(t%v)>Su})).map(s))}return y.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[f(r).concat(l(u).slice(1),f(e).reverse().slice(1),l(a).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=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),y.precision(_)):[[r,a],[e,u]]},y.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],i=+e[1][1],n>t&&(e=n,n=t,t=e),o>i&&(e=o,o=i,i=e),y.precision(_)):[[n,o],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(d=+t[0],v=+t[1],y):[d,v]},y.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(h){return arguments.length?(_=+h,c=as(o,i,90),s=cs(n,t,_),f=as(a,u,90),l=cs(r,e,_),y):_},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function fs(t){return t}var ls,hs,ps,ds,vs=Mu(),gs=Mu(),_s={point:Zu,lineStart:Zu,lineEnd:Zu,polygonStart:function(){_s.lineStart=ys,_s.lineEnd=bs},polygonEnd:function(){_s.lineStart=_s.lineEnd=_s.point=Zu,vs.add(Lu(gs)),gs.reset()},result:function(){var t=vs/2;return vs.reset(),t}};function ys(){_s.point=ms}function ms(t,n){_s.point=xs,ls=ps=t,hs=ds=n}function xs(t,n){gs.add(ds*t-ps*n),ps=t,ds=n}function bs(){xs(ls,hs)}var ws,Ms,Ts,Ns,ks=1/0,Ss=ks,Es=-ks,As=Es,Cs={point:function(t,n){t<ks&&(ks=t),t>Es&&(Es=t),n<Ss&&(Ss=n),n>As&&(As=n)},lineStart:Zu,lineEnd:Zu,polygonStart:Zu,polygonEnd:Zu,result:function(){var t=[[ks,Ss],[Es,As]];return Es=As=-(Ss=ks=1/0),t}},zs=0,Ps=0,Rs=0,Ls=0,qs=0,Ds=0,Us=0,Os=0,Fs=0,Is={point:Ys,lineStart:Bs,lineEnd:Xs,polygonStart:function(){Is.lineStart=Vs,Is.lineEnd=Ws},polygonEnd:function(){Is.point=Ys,Is.lineStart=Bs,Is.lineEnd=Xs},result:function(){var t=Fs?[Us/Fs,Os/Fs]:Ds?[Ls/Ds,qs/Ds]:Rs?[zs/Rs,Ps/Rs]:[NaN,NaN];return zs=Ps=Rs=Ls=qs=Ds=Us=Os=Fs=0,t}};function Ys(t,n){zs+=t,Ps+=n,++Rs}function Bs(){Is.point=Hs}function Hs(t,n){Is.point=js,Ys(Ts=t,Ns=n)}function js(t,n){var e=t-Ts,r=n-Ns,i=ju(e*e+r*r);Ls+=i*(Ts+t)/2,qs+=i*(Ns+n)/2,Ds+=i,Ys(Ts=t,Ns=n)}function Xs(){Is.point=Ys}function Vs(){Is.point=$s}function Ws(){Zs(ws,Ms)}function $s(t,n){Is.point=Zs,Ys(ws=Ts=t,Ms=Ns=n)}function Zs(t,n){var e=t-Ts,r=n-Ns,i=ju(e*e+r*r);Ls+=i*(Ts+t)/2,qs+=i*(Ns+n)/2,Ds+=i,Us+=(i=Ns*t-Ts*n)*(Ts+t),Os+=i*(Ns+n),Fs+=3*i,Ys(Ts=t,Ns=n)}function Gs(t){this._context=t}Gs.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._context.moveTo(t,n),this._point=1;break;case 1:this._context.lineTo(t,n);break;default:this._context.moveTo(t+this._radius,n),this._context.arc(t,n,this._radius,0,zu)}},result:Zu};var Qs,Js,Ks,tf,nf,ef=Mu(),rf={point:Zu,lineStart:function(){rf.point=of},lineEnd:function(){Qs&&uf(Js,Ks),rf.point=Zu},polygonStart:function(){Qs=!0},polygonEnd:function(){Qs=null},result:function(){var t=+ef;return ef.reset(),t}};function of(t,n){rf.point=uf,Js=tf=t,Ks=nf=n}function uf(t,n){tf-=t,nf-=n,ef.add(ju(tf*tf+nf*nf)),tf=t,nf=n}function af(){this._string=[]}function cf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function sf(t){return function(n){var e=new ff;for(var r in t)e[r]=t[r];return e.stream=n,e}}function ff(){}function lf(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),na(e,t.stream(Cs)),n(Cs.result()),null!=r&&t.clipExtent(r),t}function hf(t,n,e){return lf(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],o=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),u=+n[0][0]+(r-o*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-o*(e[1][1]+e[0][1]))/2;t.scale(150*o).translate([u,a])}),e)}function pf(t,n,e){return hf(t,[[0,0],n],e)}function df(t,n,e){return lf(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),o=(r-i*(e[1][0]+e[0][0]))/2,u=-i*e[0][1];t.scale(150*i).translate([o,u])}),e)}function vf(t,n,e){return lf(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),o=-i*e[0][0],u=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([o,u])}),e)}af.prototype={_radius:4.5,_circle:cf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,n){switch(this._point){case 0:this._string.push("M",t,",",n),this._point=1;break;case 1:this._string.push("L",t,",",n);break;default:null==this._circle&&(this._circle=cf(this._radius)),this._string.push("M",t,",",n,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},ff.prototype={constructor:ff,point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var gf=Uu(30*Ru);function _f(t,n){return+n?function(t,n){function e(r,i,o,u,a,c,s,f,l,h,p,d,v,g){var _=s-r,y=f-i,m=_*_+y*y;if(m>4*n&&v--){var x=u+h,b=a+p,w=c+d,M=ju(x*x+b*b+w*w),T=Wu(w/=M),N=Lu(Lu(w)-1)<Su||Lu(o-l)<Su?(o+l)/2:Du(b,x),k=t(N,T),S=k[0],E=k[1],A=S-r,C=E-i,z=y*A-_*C;(z*z/m>n||Lu((_*A+y*C)/m-.5)>.3||u*h+a*p+c*d<gf)&&(e(r,i,o,u,a,c,S,E,N,x/=M,b/=M,w,v,g),g.point(S,E),e(S,E,N,x,b,w,s,f,l,h,p,d,v,g))}}return function(n){var r,i,o,u,a,c,s,f,l,h,p,d,v={point:g,lineStart:_,lineEnd:m,polygonStart:function(){n.polygonStart(),v.lineStart=x},polygonEnd:function(){n.polygonEnd(),v.lineStart=_}};function g(e,r){e=t(e,r),n.point(e[0],e[1])}function _(){f=NaN,v.point=y,n.lineStart()}function y(r,i){var o=Ma([r,i]),u=t(r,i);e(f,l,s,h,p,d,f=u[0],l=u[1],s=r,h=o[0],p=o[1],d=o[2],16,n),n.point(f,l)}function m(){v.point=g,n.lineEnd()}function x(){_(),v.point=b,v.lineEnd=w}function b(t,n){y(r=t,n),i=f,o=l,u=h,a=p,c=d,v.point=y}function w(){e(f,l,s,h,p,d,i,o,r,u,a,c,16,n),v.lineEnd=m,m()}return v}}(t,n):function(t){return sf({point:function(n,e){n=t(n,e),this.stream.point(n[0],n[1])}})}(t)}var yf=sf({point:function(t,n){this.stream.point(t*Ru,n*Ru)}});function mf(t){return xf((function(){return t}))()}function xf(t){var n,e,r,i,o,u,a,c,s,f,l=150,h=480,p=250,d=0,v=0,g=0,_=0,y=0,m=null,x=Dc,b=null,w=fs,M=.5,T=_f(S,M);function N(t){return[(t=o(t[0]*Ru,t[1]*Ru))[0]*l+e,r-t[1]*l]}function k(t){return(t=o.invert((t[0]-e)/l,(r-t[1])/l))&&[t[0]*Pu,t[1]*Pu]}function S(t,i){return[(t=n(t,i))[0]*l+e,r-t[1]*l]}function E(){o=_c(i=mc(g,_,y),n);var t=n(d,v);return e=h-t[0]*l,r=p+t[1]*l,A()}function A(){return s=f=null,N}return N.stream=function(t){return s&&f===t?s:s=yf(function(t){return sf({point:function(n,e){var r=t(n,e);return this.stream.point(r[0],r[1])}})}(i)(x(T(w(f=t)))))},N.preclip=function(t){return arguments.length?(x=t,m=void 0,A()):x},N.postclip=function(t){return arguments.length?(w=t,b=u=a=c=null,A()):w},N.clipAngle=function(t){return arguments.length?(x=+t?Uc(m=t*Ru):(m=null,Dc),A()):m*Pu},N.clipExtent=function(t){return arguments.length?(w=null==t?(b=u=a=c=null,fs):Ic(b=+t[0][0],u=+t[0][1],a=+t[1][0],c=+t[1][1]),A()):null==b?null:[[b,u],[a,c]]},N.scale=function(t){return arguments.length?(l=+t,E()):l},N.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],E()):[h,p]},N.center=function(t){return arguments.length?(d=t[0]%360*Ru,v=t[1]%360*Ru,E()):[d*Pu,v*Pu]},N.rotate=function(t){return arguments.length?(g=t[0]%360*Ru,_=t[1]%360*Ru,y=t.length>2?t[2]%360*Ru:0,E()):[g*Pu,_*Pu,y*Pu]},N.precision=function(t){return arguments.length?(T=_f(S,M=t*t),A()):ju(M)},N.fitExtent=function(t,n){return hf(N,t,n)},N.fitSize=function(t,n){return pf(N,t,n)},N.fitWidth=function(t,n){return df(N,t,n)},N.fitHeight=function(t,n){return vf(N,t,n)},function(){return n=t.apply(this,arguments),N.invert=n.invert&&k,E()}}function bf(t){var n=0,e=Eu/3,r=xf(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*Ru,e=t[1]*Ru):[n*Pu,e*Pu]},i}function wf(t,n){var e=Bu(t),r=(e+Bu(n))/2;if(Lu(r)<Su)return function(t){var n=Uu(t);function e(t,e){return[t*n,Bu(e)/n]}return e.invert=function(t,e){return[t/n,Wu(e*n)]},e}(t);var i=1+e*(2*r-e),o=ju(i)/r;function u(t,n){var e=ju(i-2*r*Bu(n))/r;return[e*Bu(t*=r),o-e*Uu(t)]}return u.invert=function(t,n){var e=o-n;return[Du(t,Lu(e))/r*Hu(e),Wu((i-(t*t+e*e)*r*r)/(2*r))]},u}function Mf(){return bf(wf).scale(155.424).center([0,33.6442])}function Tf(){return Mf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Nf(t){return function(n,e){var r=Uu(n),i=Uu(e),o=t(r*i);return[o*i*Bu(n),o*Bu(e)]}}function kf(t){return function(n,e){var r=ju(n*n+e*e),i=t(r),o=Bu(i),u=Uu(i);return[Du(n*o,r*u),Wu(r&&e*o/r)]}}var Sf=Nf((function(t){return ju(2/(1+t))}));Sf.invert=kf((function(t){return 2*Wu(t/2)}));var Ef=Nf((function(t){return(t=Vu(t))&&t/Bu(t)}));function Af(t,n){return[t,Iu(Xu((Au+n)/2))]}function Cf(t){var n,e,r,i=mf(t),o=i.center,u=i.scale,a=i.translate,c=i.clipExtent,s=null;function f(){var o=Eu*u(),a=i(Mc(i.rotate()).invert([0,0]));return c(null==s?[[a[0]-o,a[1]-o],[a[0]+o,a[1]+o]]:t===Af?[[Math.max(a[0]-o,s),n],[Math.min(a[0]+o,e),r]]:[[s,Math.max(a[1]-o,n)],[e,Math.min(a[1]+o,r)]])}return i.scale=function(t){return arguments.length?(u(t),f()):u()},i.translate=function(t){return arguments.length?(a(t),f()):a()},i.center=function(t){return arguments.length?(o(t),f()):o()},i.clipExtent=function(t){return arguments.length?(null==t?s=n=e=r=null:(s=+t[0][0],n=+t[0][1],e=+t[1][0],r=+t[1][1]),f()):null==s?null:[[s,n],[e,r]]},f()}function zf(t){return Xu((Au+t)/2)}function Pf(t,n){var e=Uu(t),r=t===n?Bu(t):Iu(e/Uu(n))/Iu(zf(n)/zf(t)),i=e*Yu(zf(t),r)/r;if(!r)return Af;function o(t,n){i>0?n<-Au+Su&&(n=-Au+Su):n>Au-Su&&(n=Au-Su);var e=i/Yu(zf(n),r);return[e*Bu(r*t),i-e*Uu(r*t)]}return o.invert=function(t,n){var e=i-n,o=Hu(r)*ju(t*t+e*e);return[Du(t,Lu(e))/r*Hu(e),2*qu(Yu(i/o,1/r))-Au]},o}function Rf(t,n){return[t,n]}function Lf(t,n){var e=Uu(t),r=t===n?Bu(t):(e-Uu(n))/(n-t),i=e/r+t;if(Lu(r)<Su)return Rf;function o(t,n){var e=i-n,o=r*t;return[e*Bu(o),i-e*Uu(o)]}return o.invert=function(t,n){var e=i-n;return[Du(t,Lu(e))/r*Hu(e),i-Hu(r)*ju(t*t+e*e)]},o}function qf(t,n){var e=Uu(n),r=Uu(t)*e;return[e*Bu(t)/r,Bu(n)/r]}function Df(t,n,e,r){return 1===t&&1===n&&0===e&&0===r?fs:sf({point:function(i,o){this.stream.point(i*t+e,o*n+r)}})}function Uf(t,n){var e=n*n,r=e*e;return[t*(.8707-.131979*e+r*(r*(.003971*e-.001529*r)-.013791)),n*(1.007226+e*(.015085+r*(.028874*e-.044475-.005916*r)))]}function Of(t,n){return[Uu(n)*Bu(t),Bu(n)]}function Ff(t,n){var e=Uu(n),r=1+Uu(t)*e;return[e*Bu(t)/r,Bu(n)/r]}function If(t,n){return[Iu(Xu((Au+n)/2)),-t]}function Yf(t,n){return t.parent===n.parent?1:2}function Bf(t,n){return t+n.x}function Hf(t,n){return Math.max(t,n.y)}function jf(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function Xf(t,n){var e,r,i,o,u,a=new Zf(t),c=+t.value&&(a.value=t.value),s=[a];for(null==n&&(n=Vf);e=s.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)s.push(r=e.children[o]=new Zf(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore($f)}function Vf(t){return t.children}function Wf(t){t.data=t.data.data}function $f(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function Zf(t){this.data=t,this.depth=this.height=0,this.parent=null}Ef.invert=kf((function(t){return t})),Af.invert=function(t,n){return[t,2*qu(Fu(n))-Au]},Rf.invert=Rf,qf.invert=kf(qu),Uf.invert=function(t,n){var e,r=n,i=25;do{var o=r*r,u=o*o;r-=e=(r*(1.007226+o*(.015085+u*(.028874*o-.044475-.005916*u)))-n)/(1.007226+o*(.045255+u*(.259866*o-.311325-.005916*11*u)))}while(Lu(e)>Su&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]},Of.invert=kf(Wu),Ff.invert=kf((function(t){return 2*qu(t)})),If.invert=function(t,n){return[-n,2*qu(Fu(t))-Au]},Zf.prototype=Xf.prototype={constructor:Zf,count:function(){return this.eachAfter(jf)},each:function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)u.push(e[r])}while(u.length);return this},eachAfter:function(t){for(var n,e,r,i=this,o=[i],u=[];i=o.pop();)if(u.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=u.pop();)t(i);return this},eachBefore:function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return Xf(this).eachBefore(Wf)}};var Gf=Array.prototype.slice;function Qf(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(Gf.call(t))).length,o=[];r<i;)n=t[r],e&&tl(e,n)?++r:(e=el(o=Jf(o,n)),r=0);return e}function Jf(t,n){var e,r;if(nl(n,t))return[n];for(e=0;e<t.length;++e)if(Kf(n,t[e])&&nl(rl(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(Kf(rl(t[e],t[r]),n)&&Kf(rl(t[e],n),t[r])&&Kf(rl(t[r],n),t[e])&&nl(il(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function Kf(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function tl(t,n){var e=t.r-n.r+1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function nl(t,n){for(var e=0;e<n.length;++e)if(!tl(t,n[e]))return!1;return!0}function el(t){switch(t.length){case 1:return function(t){return{x:t.x,y:t.y,r:t.r}}(t[0]);case 2:return rl(t[0],t[1]);case 3:return il(t[0],t[1],t[2])}}function rl(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,u=n.y,a=n.r,c=o-e,s=u-r,f=a-i,l=Math.sqrt(c*c+s*s);return{x:(e+o+c/l*f)/2,y:(r+u+s/l*f)/2,r:(l+i+a)/2}}function il(t,n,e){var r=t.x,i=t.y,o=t.r,u=n.x,a=n.y,c=n.r,s=e.x,f=e.y,l=e.r,h=r-u,p=r-s,d=i-a,v=i-f,g=c-o,_=l-o,y=r*r+i*i-o*o,m=y-u*u-a*a+c*c,x=y-s*s-f*f+l*l,b=p*d-h*v,w=(d*x-v*m)/(2*b)-r,M=(v*g-d*_)/b,T=(p*m-h*x)/(2*b)-i,N=(h*_-p*g)/b,k=M*M+N*N-1,S=2*(o+w*M+T*N),E=w*w+T*T-o*o,A=-(k?(S+Math.sqrt(S*S-4*k*E))/(2*k):E/S);return{x:r+w+M*A,y:i+T+N*A,r:A}}function ol(t,n,e){var r=t.x,i=t.y,o=n.r+e.r,u=t.r+e.r,a=n.x-r,c=n.y-i,s=a*a+c*c;if(s){var f=.5+((u*=u)-(o*=o))/(2*s),l=Math.sqrt(Math.max(0,2*o*(u+s)-(u-=s)*u-o*o))/(2*s);e.x=r+f*a+l*c,e.y=i+f*c-l*a}else e.x=r+u,e.y=i}function ul(t,n){var e=n.x-t.x,r=n.y-t.y,i=t.r+n.r;return i*i-1e-6>e*e+r*r}function al(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function cl(t){this._=t,this.next=null,this.previous=null}function sl(t){if(!(i=t.length))return 0;var n,e,r,i,o,u,a,c,s,f,l;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;ol(e,n,r=t[2]),n=new cl(n),e=new cl(e),r=new cl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a<i;++a){ol(n._,e._,r=t[a]),r=new cl(r),c=e.next,s=n.previous,f=e._.r,l=n._.r;do{if(f<=l){if(ul(c._,r._)){e=c,n.next=e,e.previous=n,--a;continue t}f+=c._.r,c=c.next}else{if(ul(s._,r._)){(n=s).next=e,e.previous=n,--a;continue t}l+=s._.r,s=s.previous}}while(c!==s.next);for(r.previous=n,r.next=e,n.next=e.previous=e=r,o=al(n);(r=r.next)!==e;)(u=al(r))<o&&(n=r,o=u);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=Qf(n),a=0;a<i;++a)(n=t[a]).x-=r.x,n.y-=r.y;return r.r}function fl(t){return null==t?null:ll(t)}function ll(t){if("function"!=typeof t)throw new Error;return t}function hl(){return 0}function pl(t){return function(){return t}}function dl(t){return Math.sqrt(t.value)}function vl(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function gl(t,n){return function(e){if(r=e.children){var r,i,o,u=r.length,a=t(e)*n||0;if(a)for(i=0;i<u;++i)r[i].r+=a;if(o=sl(r),a)for(i=0;i<u;++i)r[i].r-=a;e.r=o+a}}}function _l(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}function yl(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function ml(t,n,e,r,i){for(var o,u=t.children,a=-1,c=u.length,s=t.value&&(r-n)/t.value;++a<c;)(o=u[a]).y0=e,o.y1=i,o.x0=n,o.x1=n+=o.value*s}var xl={depth:-1},bl={};function wl(t){return t.id}function Ml(t){return t.parentId}function Tl(t,n){return t.parent===n.parent?1:2}function Nl(t){var n=t.children;return n?n[0]:t.t}function kl(t){var n=t.children;return n?n[n.length-1]:t.t}function Sl(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}function El(t,n,e){return t.a.parent===n.parent?t.a:e}function Al(t,n){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function Cl(t,n,e,r,i){for(var o,u=t.children,a=-1,c=u.length,s=t.value&&(i-e)/t.value;++a<c;)(o=u[a]).x0=n,o.x1=r,o.y0=e,o.y1=e+=o.value*s}Al.prototype=Object.create(Zf.prototype);var zl=(1+Math.sqrt(5))/2;function Pl(t,n,e,r,i,o){for(var u,a,c,s,f,l,h,p,d,v,g,_=[],y=n.children,m=0,x=0,b=y.length,w=n.value;m<b;){c=i-e,s=o-r;do{f=y[x++].value}while(!f&&x<b);for(l=h=f,g=f*f*(v=Math.max(s/c,c/s)/(w*t)),d=Math.max(h/g,g/l);x<b;++x){if(f+=a=y[x].value,a<l&&(l=a),a>h&&(h=a),g=f*f*v,(p=Math.max(h/g,g/l))>d){f-=a;break}d=p}_.push(u={value:f,dice:c<s,children:y.slice(m,x)}),u.dice?ml(u,e,r,i,w?r+=s*f/w:o):Cl(u,e,r,w?e+=c*f/w:i,o),w-=f,m=x}return _}var Rl=function t(n){function e(t,e,r,i,o){Pl(n,t,e,r,i,o)}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(zl),Ll=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,c,s,f,l=-1,h=u.length,p=t.value;++l<h;){for(c=(a=u[l]).children,s=a.value=0,f=c.length;s<f;++s)a.value+=c[s].value;a.dice?ml(a,e,r,i,r+=(o-r)*a.value/p):Cl(a,e,r,e+=(i-e)*a.value/p,o),p-=a.value}else t._squarify=u=Pl(n,t,e,r,i,o),u.ratio=n}return e.ratio=function(n){return t((n=+n)>1?n:1)},e}(zl);function ql(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function Dl(t,n){return t[0]-n[0]||t[1]-n[1]}function Ul(t){for(var n=t.length,e=[0,1],r=2,i=2;i<n;++i){for(;r>1&&ql(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var Ol=[].slice,Fl={};function Il(t){this._size=t,this._call=this._error=null,this._tasks=[],this._data=[],this._waiting=this._active=this._ended=this._start=0}function Yl(t){if(!t._start)try{!function(t){for(;t._start=t._waiting&&t._active<t._size;){var n=t._ended+t._active,e=t._tasks[n],r=e.length-1,i=e[r];e[r]=Bl(t,n),--t._waiting,++t._active,e=i.apply(null,e),t._tasks[n]&&(t._tasks[n]=e||Fl)}}(t)}catch(n){if(t._tasks[t._ended+t._active-1])Hl(t,n);else if(!t._data)throw n}}function Bl(t,n){return function(e,r){t._tasks[n]&&(--t._active,++t._ended,t._tasks[n]=null,null==t._error&&(null!=e?Hl(t,e):(t._data[n]=r,t._waiting?Yl(t):jl(t))))}}function Hl(t,n){var e,r=t._tasks.length;for(t._error=n,t._data=void 0,t._waiting=NaN;--r>=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,jl(t)}function jl(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function Xl(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new Il(t)}function Vl(){return Math.random()}Il.prototype=Xl.prototype={constructor:Il,defer:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("defer after await");if(null!=this._error)return this;var n=Ol.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),Yl(this),this},abort:function(){return null==this._error&&Hl(this,new Error("abort")),this},await:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=function(n,e){t.apply(null,[n].concat(e))},jl(this),this},awaitAll:function(t){if("function"!=typeof t)throw new Error("invalid callback");if(this._call)throw new Error("multiple await");return this._call=t,jl(this),this}};var Wl=function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(Vl),$l=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else do{r=2*n()-1,o=2*n()-1,i=r*r+o*o}while(!i||i>1);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(Vl),Zl=function t(n){function e(){var t=$l.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(Vl),Gl=function t(n){function e(t){return function(){for(var e=0,r=0;r<t;++r)e+=n();return e}}return e.source=t,e}(Vl),Ql=function t(n){function e(t){var e=Gl.source(n)(t);return function(){return e()/t}}return e.source=t,e}(Vl),Jl=function t(n){function e(t){return function(){return-Math.log(1-n())/t}}return e.source=t,e}(Vl);function Kl(t,n){var e,r,i,o,u=F("beforesend","progress","load","error"),a=wo(),c=new XMLHttpRequest,s=null,f=null,l=0;function h(t){var n,r=c.status;if(!r&&function(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}(c)||r>=200&&r<300||304===r){if(i)try{n=i.call(e,c)}catch(t){return void u.call("error",e,t)}else n=c;u.call("load",e,n)}else u.call("error",e,t)}if("undefined"!=typeof XDomainRequest&&!("withCredentials"in c)&&/^(http(s)?:)?\/\//.test(t)&&(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=c.ontimeout=h:c.onreadystatechange=function(t){c.readyState>3&&h(t)},c.onprogress=function(t){u.call("progress",e,t)},e={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?a.get(t):(null==n?a.remove(t):a.set(t,n+""),e)},mimeType:function(t){return arguments.length?(r=null==t?null:t+"",e):r},responseType:function(t){return arguments.length?(o=t,e):o},timeout:function(t){return arguments.length?(l=+t,e):l},user:function(t){return arguments.length<1?s:(s=null==t?null:t+"",e)},password:function(t){return arguments.length<1?f:(f=null==t?null:t+"",e)},response:function(t){return i=t,e},get:function(t,n){return e.send("GET",t,n)},post:function(t,n){return e.send("POST",t,n)},send:function(n,i,h){return c.open(n,t,!0,s,f),null==r||a.has("accept")||a.set("accept",r+",*/*"),c.setRequestHeader&&a.each((function(t,n){c.setRequestHeader(n,t)})),null!=r&&c.overrideMimeType&&c.overrideMimeType(r),null!=o&&(c.responseType=o),l>0&&(c.timeout=l),null==h&&"function"==typeof i&&(h=i,i=null),null!=h&&1===h.length&&(h=function(t){return function(n,e){t(null==n?e:null)}}(h)),null!=h&&e.on("error",h).on("load",(function(t){h(null,t)})),u.call("beforesend",e,c),c.send(null==i?null:i),e},abort:function(){return c.abort(),e},on:function(){var t=u.on.apply(u,arguments);return t===u?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e}function th(t,n){return function(e,r){var i=Kl(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}}var nh=th("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),eh=th("application/json",(function(t){return JSON.parse(t.responseText)})),rh=th("text/plain",(function(t){return t.responseText})),ih=th("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n}));function oh(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=Kl(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(uh(n,r=t)):r},o.row(r),i?o.get(i):o}}function uh(t,n){return function(e){return t(e.responseText,n)}}var ah=oh("text/csv",qo),ch=oh("text/tab-separated-values",Io),sh=Array.prototype,fh=sh.map,lh=sh.slice,hh={name:"implicit"};function ph(t){var n=wo(),e=[],r=hh;function i(i){var o=i+"",u=n.get(o);if(!u){if(r!==hh)return r;n.set(o,u=e.push(i))}return t[(u-1)%t.length]}return t=null==t?[]:lh.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=wo();for(var r,o,u=-1,a=t.length;++u<a;)n.has(o=(r=t[u])+"")||n.set(o,e.push(r));return i},i.range=function(n){return arguments.length?(t=lh.call(n),i):t.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return ph().domain(e).range(t).unknown(r)},i}function dh(){var t,n,e=ph().unknown(void 0),r=e.domain,i=e.range,o=[0,1],u=!1,a=0,c=0,s=.5;function f(){var e=r().length,f=o[1]<o[0],l=o[f-0],h=o[1-f];t=(h-l)/Math.max(1,e-a+2*c),u&&(t=Math.floor(t)),l+=(h-l-t*(e-a))*s,n=t*(1-a),u&&(l=Math.round(l),n=Math.round(n));var p=g(e).map((function(n){return l+t*n}));return i(f?p.reverse():p)}return delete e.unknown,e.domain=function(t){return arguments.length?(r(t),f()):r()},e.range=function(t){return arguments.length?(o=[+t[0],+t[1]],f()):o.slice()},e.rangeRound=function(t){return o=[+t[0],+t[1]],u=!0,f()},e.bandwidth=function(){return n},e.step=function(){return t},e.round=function(t){return arguments.length?(u=!!t,f()):u},e.padding=function(t){return arguments.length?(a=c=Math.max(0,Math.min(1,t)),f()):a},e.paddingInner=function(t){return arguments.length?(a=Math.max(0,Math.min(1,t)),f()):a},e.paddingOuter=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),f()):c},e.align=function(t){return arguments.length?(s=Math.max(0,Math.min(1,t)),f()):s},e.copy=function(){return dh().domain(r()).range(o).round(u).paddingInner(a).paddingOuter(c).align(s)},f()}function vh(t){var n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return vh(n())},t}function gh(t){return function(){return t}}function _h(t){return+t}var yh=[0,1];function mh(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:gh(n)}function xh(t,n,e,r){var i=t[0],o=t[1],u=n[0],a=n[1];return o<i?(i=e(o,i),u=r(a,u)):(i=e(i,o),u=r(u,a)),function(t){return u(i(t))}}function bh(t,n,e,r){var o=Math.min(t.length,n.length)-1,u=new Array(o),a=new Array(o),c=-1;for(t[o]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++c<o;)u[c]=e(t[c],t[c+1]),a[c]=r(n[c],n[c+1]);return function(n){var e=i(t,n,1,o)-1;return a[e](u[e](n))}}function wh(t,n){return n.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp())}function Mh(t,n){var e,r,i,o=yh,u=yh,a=Ye,c=!1;function s(){return e=Math.min(o.length,u.length)>2?bh:xh,r=i=null,f}function f(n){return(r||(r=e(o,u,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=n?0:t>=e?1:r(t)}}}(t):t,a)))(+n)}return f.invert=function(t){return(i||(i=e(u,o,mh,c?function(t){return function(n,e){var r=t(n=+n,e=+e);return function(t){return t<=0?n:t>=1?e:r(t)}}}(n):n)))(+t)},f.domain=function(t){return arguments.length?(o=fh.call(t,_h),s()):o.slice()},f.range=function(t){return arguments.length?(u=lh.call(t),s()):u.slice()},f.rangeRound=function(t){return u=lh.call(t),a=Be,s()},f.clamp=function(t){return arguments.length?(c=!!t,s()):c},f.interpolate=function(t){return arguments.length?(a=t,s()):a},s()}function Th(n){var e=n.domain;return n.ticks=function(t){var n=e();return x(n[0],n[n.length-1],null==t?10:t)},n.tickFormat=function(n,r){return function(n,e,r){var i,o=n[0],u=n[n.length-1],a=w(o,u,null==e?10:e);switch((r=pu(null==r?",f":r)).type){case"s":var c=Math.max(Math.abs(o),Math.abs(u));return null!=r.precision||isNaN(i=bu(a,c))||(r.precision=i),t.formatPrefix(r,c);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=wu(a,Math.max(Math.abs(o),Math.abs(u))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=xu(a))||(r.precision=i-2*("%"===r.type))}return t.format(r)}(e(),n,r)},n.nice=function(t){null==t&&(t=10);var r,i=e(),o=0,u=i.length-1,a=i[o],c=i[u];return c<a&&(r=a,a=c,c=r,r=o,o=u,u=r),(r=b(a,c,t))>0?r=b(a=Math.floor(a/r)*r,c=Math.ceil(c/r)*r,t):r<0&&(r=b(a=Math.ceil(a*r)/r,c=Math.floor(c*r)/r,t)),r>0?(i[o]=Math.floor(a/r)*r,i[u]=Math.ceil(c/r)*r,e(i)):r<0&&(i[o]=Math.ceil(a*r)/r,i[u]=Math.floor(c*r)/r,e(i)),n},n}function Nh(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u<o&&(e=r,r=i,i=e,e=o,o=u,u=e),t[r]=n.floor(o),t[i]=n.ceil(u),t}function kh(t,n){return(n=Math.log(n/t))?function(e){return Math.log(e/t)/n}:gh(n)}function Sh(t,n){return t<0?function(e){return-Math.pow(-n,e)*Math.pow(-t,1-e)}:function(e){return Math.pow(n,e)*Math.pow(t,1-e)}}function Eh(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ah(t){return 10===t?Eh:t===Math.E?Math.exp:function(n){return Math.pow(t,n)}}function Ch(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(n){return Math.log(n)/t})}function zh(t){return function(n){return-t(-n)}}function Ph(t,n){return t<0?-Math.pow(-t,n):Math.pow(t,n)}function Rh(){var t=1,n=Mh((function(n,e){return(e=Ph(e,t)-(n=Ph(n,t)))?function(r){return(Ph(r,t)-n)/e}:gh(e)}),(function(n,e){return e=Ph(e,t)-(n=Ph(n,t)),function(r){return Ph(n+e*r,1/t)}})),e=n.domain;return n.exponent=function(n){return arguments.length?(t=+n,e(e())):t},n.copy=function(){return wh(n,Rh().exponent(t))},Th(n)}var Lh=new Date,qh=new Date;function Dh(t,n,e,r){function i(n){return t(n=new Date(+n)),n}return i.floor=i,i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var u,a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&o>0))return a;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u<e&&e<r);return a},i.filter=function(e){return Dh((function(n){if(n>=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;--r>=0;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return Lh.setTime(+n),qh.setTime(+r),t(Lh),t(qh),Math.floor(e(Lh,qh))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var Uh=Dh((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));Uh.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Dh((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):Uh:null};var Oh=Uh.range,Fh=1e3,Ih=6e4,Yh=36e5,Bh=864e5,Hh=6048e5,jh=Dh((function(t){t.setTime(Math.floor(t/Fh)*Fh)}),(function(t,n){t.setTime(+t+n*Fh)}),(function(t,n){return(n-t)/Fh}),(function(t){return t.getUTCSeconds()})),Xh=jh.range,Vh=Dh((function(t){t.setTime(Math.floor(t/Ih)*Ih)}),(function(t,n){t.setTime(+t+n*Ih)}),(function(t,n){return(n-t)/Ih}),(function(t){return t.getMinutes()})),Wh=Vh.range,$h=Dh((function(t){var n=t.getTimezoneOffset()*Ih%Yh;n<0&&(n+=Yh),t.setTime(Math.floor((+t-n)/Yh)*Yh+n)}),(function(t,n){t.setTime(+t+n*Yh)}),(function(t,n){return(n-t)/Yh}),(function(t){return t.getHours()})),Zh=$h.range,Gh=Dh((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ih)/Bh}),(function(t){return t.getDate()-1})),Qh=Gh.range;function Jh(t){return Dh((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Ih)/Hh}))}var Kh=Jh(0),tp=Jh(1),np=Jh(2),ep=Jh(3),rp=Jh(4),ip=Jh(5),op=Jh(6),up=Kh.range,ap=tp.range,cp=np.range,sp=ep.range,fp=rp.range,lp=ip.range,hp=op.range,pp=Dh((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),dp=pp.range,vp=Dh((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));vp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dh((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var gp=vp.range,_p=Dh((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*Ih)}),(function(t,n){return(n-t)/Ih}),(function(t){return t.getUTCMinutes()})),yp=_p.range,mp=Dh((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+n*Yh)}),(function(t,n){return(n-t)/Yh}),(function(t){return t.getUTCHours()})),xp=mp.range,bp=Dh((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/Bh}),(function(t){return t.getUTCDate()-1})),wp=bp.range;function Mp(t){return Dh((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/Hh}))}var Tp=Mp(0),Np=Mp(1),kp=Mp(2),Sp=Mp(3),Ep=Mp(4),Ap=Mp(5),Cp=Mp(6),zp=Tp.range,Pp=Np.range,Rp=kp.range,Lp=Sp.range,qp=Ep.range,Dp=Ap.range,Up=Cp.range,Op=Dh((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),Fp=Op.range,Ip=Dh((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Ip.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Dh((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var Yp=Ip.range;function Bp(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Hp(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function jp(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Xp(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,c=t.shortMonths,s=Kp(i),f=td(i),l=Kp(o),h=td(o),p=Kp(u),d=td(u),v=Kp(a),g=td(a),_=Kp(c),y=td(c),m={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:xd,e:xd,f:Nd,H:bd,I:wd,j:Md,L:Td,m:kd,M:Sd,p:function(t){return i[+(t.getHours()>=12)]},Q:nv,s:ev,S:Ed,u:Ad,U:Cd,V:zd,w:Pd,W:Rd,x:null,X:null,y:Ld,Y:qd,Z:Dd,"%":tv},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Ud,e:Ud,f:Bd,H:Od,I:Fd,j:Id,L:Yd,m:Hd,M:jd,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:nv,s:ev,S:Xd,u:Vd,U:Wd,V:$d,w:Zd,W:Gd,x:null,X:null,y:Qd,Y:Jd,Z:Kd,"%":tv},b={a:function(t,n,e){var r=p.exec(n.slice(e));return r?(t.w=d[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=_.exec(n.slice(e));return r?(t.m=y[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=v.exec(n.slice(e));return r?(t.m=g[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:fd,e:fd,f:gd,H:hd,I:hd,j:ld,L:vd,m:sd,M:pd,p:function(t,n,e){var r=s.exec(n.slice(e));return r?(t.p=f[r[0].toLowerCase()],e+r[0].length):-1},Q:yd,s:md,S:dd,u:ed,U:rd,V:id,w:nd,W:od,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:ad,Y:ud,Z:cd,"%":_d};function w(t,n){return function(e){var r,i,o,u=[],a=-1,c=0,s=t.length;for(e instanceof Date||(e=new Date(+e));++a<s;)37===t.charCodeAt(a)&&(u.push(t.slice(c,a)),null!=(i=Wp[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),u.push(r),c=a+1);return u.push(t.slice(c,a)),u.join("")}}function M(t,n){return function(e){var r,i,o=jp(1900);if(T(o,t,e+="",0)!=e.length)return null;if("Q"in o)return new Date(o.Q);if("p"in o&&(o.H=o.H%12+12*o.p),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=Hp(jp(o.y))).getUTCDay(),r=i>4||0===i?Np.ceil(r):Np(r),r=bp.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=n(jp(o.y))).getDay(),r=i>4||0===i?tp.ceil(r):tp(r),r=Gh.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Hp(jp(o.y)).getUTCDay():n(jp(o.y)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Hp(o)):n(o)}}function T(t,n,e,r){for(var i,o,u=0,a=n.length,c=e.length;u<a;){if(r>=c)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=b[i in Wp?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return m.x=w(e,m),m.X=w(r,m),m.c=w(n,m),x.x=w(e,x),x.X=w(r,x),x.c=w(n,x),{format:function(t){var n=w(t+="",m);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",Bp);return n.toString=function(){return t},n},utcFormat:function(t){var n=w(t+="",x);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t,Hp);return n.toString=function(){return t},n}}}var Vp,Wp={"-":"",_:" ",0:"0"},$p=/^\s*\d+/,Zp=/^%/,Gp=/[\\^$*+?|[\]().{}]/g;function Qp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function Jp(t){return t.replace(Gp,"\\$&")}function Kp(t){return new RegExp("^(?:"+t.map(Jp).join("|")+")","i")}function td(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function nd(t,n,e){var r=$p.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function ed(t,n,e){var r=$p.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function rd(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function id(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function od(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function ud(t,n,e){var r=$p.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function ad(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),e+r[0].length):-1}function cd(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function sd(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function fd(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function ld(t,n,e){var r=$p.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function hd(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function pd(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function dd(t,n,e){var r=$p.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function vd(t,n,e){var r=$p.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function gd(t,n,e){var r=$p.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function _d(t,n,e){var r=Zp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function yd(t,n,e){var r=$p.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function md(t,n,e){var r=$p.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function xd(t,n){return Qp(t.getDate(),n,2)}function bd(t,n){return Qp(t.getHours(),n,2)}function wd(t,n){return Qp(t.getHours()%12||12,n,2)}function Md(t,n){return Qp(1+Gh.count(vp(t),t),n,3)}function Td(t,n){return Qp(t.getMilliseconds(),n,3)}function Nd(t,n){return Td(t,n)+"000"}function kd(t,n){return Qp(t.getMonth()+1,n,2)}function Sd(t,n){return Qp(t.getMinutes(),n,2)}function Ed(t,n){return Qp(t.getSeconds(),n,2)}function Ad(t){var n=t.getDay();return 0===n?7:n}function Cd(t,n){return Qp(Kh.count(vp(t),t),n,2)}function zd(t,n){var e=t.getDay();return t=e>=4||0===e?rp(t):rp.ceil(t),Qp(rp.count(vp(t),t)+(4===vp(t).getDay()),n,2)}function Pd(t){return t.getDay()}function Rd(t,n){return Qp(tp.count(vp(t),t),n,2)}function Ld(t,n){return Qp(t.getFullYear()%100,n,2)}function qd(t,n){return Qp(t.getFullYear()%1e4,n,4)}function Dd(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Qp(n/60|0,"0",2)+Qp(n%60,"0",2)}function Ud(t,n){return Qp(t.getUTCDate(),n,2)}function Od(t,n){return Qp(t.getUTCHours(),n,2)}function Fd(t,n){return Qp(t.getUTCHours()%12||12,n,2)}function Id(t,n){return Qp(1+bp.count(Ip(t),t),n,3)}function Yd(t,n){return Qp(t.getUTCMilliseconds(),n,3)}function Bd(t,n){return Yd(t,n)+"000"}function Hd(t,n){return Qp(t.getUTCMonth()+1,n,2)}function jd(t,n){return Qp(t.getUTCMinutes(),n,2)}function Xd(t,n){return Qp(t.getUTCSeconds(),n,2)}function Vd(t){var n=t.getUTCDay();return 0===n?7:n}function Wd(t,n){return Qp(Tp.count(Ip(t),t),n,2)}function $d(t,n){var e=t.getUTCDay();return t=e>=4||0===e?Ep(t):Ep.ceil(t),Qp(Ep.count(Ip(t),t)+(4===Ip(t).getUTCDay()),n,2)}function Zd(t){return t.getUTCDay()}function Gd(t,n){return Qp(Np.count(Ip(t),t),n,2)}function Qd(t,n){return Qp(t.getUTCFullYear()%100,n,2)}function Jd(t,n){return Qp(t.getUTCFullYear()%1e4,n,4)}function Kd(){return"+0000"}function tv(){return"%"}function nv(t){return+t}function ev(t){return Math.floor(+t/1e3)}function rv(n){return Vp=Xp(n),t.timeFormat=Vp.format,t.timeParse=Vp.parse,t.utcFormat=Vp.utcFormat,t.utcParse=Vp.utcParse,Vp}rv({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var iv="%Y-%m-%dT%H:%M:%S.%LZ",ov=Date.prototype.toISOString?function(t){return t.toISOString()}:t.utcFormat(iv),uv=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:t.utcParse(iv),av=31536e6;function cv(t){return new Date(t)}function sv(t){return t instanceof Date?+t:+new Date(+t)}function fv(t,n,r,i,o,u,a,c,s){var f=Mh(mh,De),l=f.invert,h=f.domain,p=s(".%L"),d=s(":%S"),v=s("%I:%M"),g=s("%I %p"),_=s("%a %d"),y=s("%b %d"),m=s("%B"),x=s("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[u,1,6e4],[u,5,3e5],[u,15,9e5],[u,30,18e5],[o,1,36e5],[o,3,108e5],[o,6,216e5],[o,12,432e5],[i,1,864e5],[i,2,1728e5],[r,1,6048e5],[n,1,2592e6],[n,3,7776e6],[t,1,av]];function M(e){return(a(e)<e?p:u(e)<e?d:o(e)<e?v:i(e)<e?g:n(e)<e?r(e)<e?_:y:t(e)<e?m:x)(e)}function T(n,r,i,o){if(null==n&&(n=10),"number"==typeof n){var u=Math.abs(i-r)/n,a=e((function(t){return t[2]})).right(b,u);a===b.length?(o=w(r/av,i/av,n),n=t):a?(o=(a=b[u/b[a-1][2]<b[a][2]/u?a-1:a])[1],n=a[0]):(o=Math.max(w(r,i,n),1),n=c)}return null==o?n:n.every(o)}return f.invert=function(t){return new Date(l(t))},f.domain=function(t){return arguments.length?h(fh.call(t,sv)):h().map(cv)},f.ticks=function(t,n){var e,r=h(),i=r[0],o=r[r.length-1],u=o<i;return u&&(e=i,i=o,o=e),e=(e=T(t,i,o,n))?e.range(i,o+1):[],u?e.reverse():e},f.tickFormat=function(t,n){return null==n?M:s(n)},f.nice=function(t,n){var e=h();return(t=T(t,e[0],e[e.length-1],n))?h(Nh(e,t)):f},f.copy=function(){return wh(f,fv(t,n,r,i,o,u,a,c,s))},f}function lv(t){return t.match(/.{6}/g).map((function(t){return"#"+t}))}var hv=lv("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),pv=lv("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6"),dv=lv("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9"),vv=lv("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5"),gv=hr(be(300,.5,0),be(-240,.5,1)),_v=hr(be(-100,.75,.35),be(80,1.5,.8)),yv=hr(be(260,.75,.35),be(80,1.5,.8)),mv=be();function xv(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var bv=xv(lv("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),wv=xv(lv("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Mv=xv(lv("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Tv=xv(lv("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function Nv(t){return function(){return t}}var kv=Math.abs,Sv=Math.atan2,Ev=Math.cos,Av=Math.max,Cv=Math.min,zv=Math.sin,Pv=Math.sqrt,Rv=1e-12,Lv=Math.PI,qv=Lv/2,Dv=2*Lv;function Uv(t){return t>1?0:t<-1?Lv:Math.acos(t)}function Ov(t){return t>=1?qv:t<=-1?-qv:Math.asin(t)}function Fv(t){return t.innerRadius}function Iv(t){return t.outerRadius}function Yv(t){return t.startAngle}function Bv(t){return t.endAngle}function Hv(t){return t&&t.padAngle}function jv(t,n,e,r,i,o,u,a){var c=e-t,s=r-n,f=u-i,l=a-o,h=(f*(n-o)-l*(t-i))/(l*c-f*s);return[t+h*c,n+h*s]}function Xv(t,n,e,r,i,o,u){var a=t-e,c=n-r,s=(u?o:-o)/Pv(a*a+c*c),f=s*c,l=-s*a,h=t+f,p=n+l,d=e+f,v=r+l,g=(h+d)/2,_=(p+v)/2,y=d-h,m=v-p,x=y*y+m*m,b=i-o,w=h*v-d*p,M=(m<0?-1:1)*Pv(Av(0,b*b*x-w*w)),T=(w*m-y*M)/x,N=(-w*y-m*M)/x,k=(w*m+y*M)/x,S=(-w*y+m*M)/x,E=T-g,A=N-_,C=k-g,z=S-_;return E*E+A*A>C*C+z*z&&(T=k,N=S),{cx:T,cy:N,x01:-f,y01:-l,x11:T*(i/b-1),y11:N*(i/b-1)}}function Vv(t){this._context=t}function Wv(t){return new Vv(t)}function $v(t){return t[0]}function Zv(t){return t[1]}function Gv(){var t=$v,n=Zv,e=Nv(!0),r=null,i=Wv,o=null;function u(u){var a,c,s,f=u.length,l=!1;for(null==r&&(o=i(s=po())),a=0;a<=f;++a)!(a<f&&e(c=u[a],a,u))===l&&((l=!l)?o.lineStart():o.lineEnd()),l&&o.point(+t(c,a,u),+n(c,a,u));if(s)return o=null,s+""||null}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:Nv(+n),u):t},u.y=function(t){return arguments.length?(n="function"==typeof t?t:Nv(+t),u):n},u.defined=function(t){return arguments.length?(e="function"==typeof t?t:Nv(!!t),u):e},u.curve=function(t){return arguments.length?(i=t,null!=r&&(o=i(r)),u):i},u.context=function(t){return arguments.length?(null==t?r=o=null:o=i(r=t),u):r},u}function Qv(){var t=$v,n=null,e=Nv(0),r=Zv,i=Nv(!0),o=null,u=Wv,a=null;function c(c){var s,f,l,h,p,d=c.length,v=!1,g=new Array(d),_=new Array(d);for(null==o&&(a=u(p=po())),s=0;s<=d;++s){if(!(s<d&&i(h=c[s],s,c))===v)if(v=!v)f=s,a.areaStart(),a.lineStart();else{for(a.lineEnd(),a.lineStart(),l=s-1;l>=f;--l)a.point(g[l],_[l]);a.lineEnd(),a.areaEnd()}v&&(g[s]=+t(h,s,c),_[s]=+e(h,s,c),a.point(n?+n(h,s,c):g[s],r?+r(h,s,c):_[s]))}if(p)return a=null,p+""||null}function s(){return Gv().defined(i).curve(u).context(o)}return c.x=function(e){return arguments.length?(t="function"==typeof e?e:Nv(+e),n=null,c):t},c.x0=function(n){return arguments.length?(t="function"==typeof n?n:Nv(+n),c):t},c.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Nv(+t),c):n},c.y=function(t){return arguments.length?(e="function"==typeof t?t:Nv(+t),r=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:Nv(+t),c):e},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Nv(+t),c):r},c.lineX0=c.lineY0=function(){return s().x(t).y(e)},c.lineY1=function(){return s().x(t).y(r)},c.lineX1=function(){return s().x(n).y(e)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:Nv(!!t),c):i},c.curve=function(t){return arguments.length?(u=t,null!=o&&(a=u(o)),c):u},c.context=function(t){return arguments.length?(null==t?o=a=null:a=u(o=t),c):o},c}function Jv(t,n){return n<t?-1:n>t?1:n>=t?0:NaN}function Kv(t){return t}Vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:this._context.lineTo(t,n)}}};var tg=eg(Wv);function ng(t){this._curve=t}function eg(t){function n(n){return new ng(t(n))}return n._curve=t,n}function rg(t){var n=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?n(eg(t)):n()._curve},t}function ig(){return rg(Gv().curve(tg))}function og(){var t=Qv().curve(tg),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return rg(e())},delete t.lineX0,t.lineEndAngle=function(){return rg(r())},delete t.lineX1,t.lineInnerRadius=function(){return rg(i())},delete t.lineY0,t.lineOuterRadius=function(){return rg(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(eg(t)):n()._curve},t}function ug(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]}ng.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,n){this._curve.point(n*Math.sin(t),n*-Math.cos(t))}};var ag=Array.prototype.slice;function cg(t){return t.source}function sg(t){return t.target}function fg(t){var n=cg,e=sg,r=$v,i=Zv,o=null;function u(){var u,a=ag.call(arguments),c=n.apply(this,a),s=e.apply(this,a);if(o||(o=u=po()),t(o,+r.apply(this,(a[0]=c,a)),+i.apply(this,a),+r.apply(this,(a[0]=s,a)),+i.apply(this,a)),u)return o=null,u+""||null}return u.source=function(t){return arguments.length?(n=t,u):n},u.target=function(t){return arguments.length?(e=t,u):e},u.x=function(t){return arguments.length?(r="function"==typeof t?t:Nv(+t),u):r},u.y=function(t){return arguments.length?(i="function"==typeof t?t:Nv(+t),u):i},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u}function lg(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function hg(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function pg(t,n,e,r,i){var o=ug(n,e),u=ug(n,e=(e+i)/2),a=ug(r,e),c=ug(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],c[0],c[1])}var dg={draw:function(t,n){var e=Math.sqrt(n/Lv);t.moveTo(e,0),t.arc(0,0,e,0,Dv)}},vg={draw:function(t,n){var e=Math.sqrt(n/5)/2;t.moveTo(-3*e,-e),t.lineTo(-e,-e),t.lineTo(-e,-3*e),t.lineTo(e,-3*e),t.lineTo(e,-e),t.lineTo(3*e,-e),t.lineTo(3*e,e),t.lineTo(e,e),t.lineTo(e,3*e),t.lineTo(-e,3*e),t.lineTo(-e,e),t.lineTo(-3*e,e),t.closePath()}},gg=Math.sqrt(1/3),_g=2*gg,yg={draw:function(t,n){var e=Math.sqrt(n/_g),r=e*gg;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},mg=Math.sin(Lv/10)/Math.sin(7*Lv/10),xg=Math.sin(Dv/10)*mg,bg=-Math.cos(Dv/10)*mg,wg={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=xg*e,i=bg*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=Dv*o/5,a=Math.cos(u),c=Math.sin(u);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},Mg={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},Tg=Math.sqrt(3),Ng={draw:function(t,n){var e=-Math.sqrt(n/(3*Tg));t.moveTo(0,2*e),t.lineTo(-Tg*e,-e),t.lineTo(Tg*e,-e),t.closePath()}},kg=-.5,Sg=Math.sqrt(3)/2,Eg=1/Math.sqrt(12),Ag=3*(Eg/2+1),Cg={draw:function(t,n){var e=Math.sqrt(n/Ag),r=e/2,i=e*Eg,o=r,u=e*Eg+e,a=-o,c=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,c),t.lineTo(kg*r-Sg*i,Sg*r+kg*i),t.lineTo(kg*o-Sg*u,Sg*o+kg*u),t.lineTo(kg*a-Sg*c,Sg*a+kg*c),t.lineTo(kg*r+Sg*i,kg*i-Sg*r),t.lineTo(kg*o+Sg*u,kg*u-Sg*o),t.lineTo(kg*a+Sg*c,kg*c-Sg*a),t.closePath()}},zg=[dg,vg,yg,Mg,wg,Ng,Cg];function Pg(){}function Rg(t,n,e){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+n)/6,(t._y0+4*t._y1+e)/6)}function Lg(t){this._context=t}function qg(t){this._context=t}function Dg(t){this._context=t}function Ug(t,n){this._basis=new Lg(t),this._beta=n}Lg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Rg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Rg(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},qg.prototype={areaStart:Pg,areaEnd:Pg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x2=t,this._y2=n;break;case 1:this._point=2,this._x3=t,this._y3=n;break;case 2:this._point=3,this._x4=t,this._y4=n,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+n)/6);break;default:Rg(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Dg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var e=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+n)/6;this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break;case 3:this._point=4;default:Rg(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}},Ug.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,n=this._y,e=t.length-1;if(e>0)for(var r,i=t[0],o=n[0],u=t[e]-i,a=n[e]-o,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*u),this._beta*n[c]+(1-this._beta)*(o+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Og=function t(n){function e(t){return 1===n?new Lg(t):new Ug(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Fg(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Ig(t,n){this._context=t,this._k=(1-n)/6}Ig.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Fg(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Fg(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Yg=function t(n){function e(t){return new Ig(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Bg(t,n){this._context=t,this._k=(1-n)/6}Bg.prototype={areaStart:Pg,areaEnd:Pg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Fg(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Hg=function t(n){function e(t){return new Bg(t,n)}return e.tension=function(n){return t(+n)},e}(0);function jg(t,n){this._context=t,this._k=(1-n)/6}jg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Fg(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Xg=function t(n){function e(t){return new jg(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Vg(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>Rv){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>Rv){var s=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*s+t._x1*t._l23_2a-n*t._l12_2a)/f,u=(u*s+t._y1*t._l23_2a-e*t._l12_2a)/f}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Wg(t,n){this._context=t,this._alpha=n}Wg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3;default:Vg(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var $g=function t(n){function e(t){return n?new Wg(t,n):new Ig(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Zg(t,n){this._context=t,this._alpha=n}Zg.prototype={areaStart:Pg,areaEnd:Pg,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Vg(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Gg=function t(n){function e(t){return n?new Zg(t,n):new Bg(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Qg(t,n){this._context=t,this._alpha=n}Qg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){if(t=+t,n=+n,this._point){var e=this._x2-t,r=this._y2-n;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(e*e+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Vg(this,t,n)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Jg=function t(n){function e(t){return n?new Qg(t,n):new jg(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Kg(t){this._context=t}function t_(t){return t<0?-1:1}function n_(t,n,e){var r=t._x1-t._x0,i=n-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),u=(e-t._y1)/(i||r<0&&-0),a=(o*i+u*r)/(r+i);return(t_(o)+t_(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function e_(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function r_(t,n,e){var r=t._x0,i=t._y0,o=t._x1,u=t._y1,a=(o-r)/3;t._context.bezierCurveTo(r+a,i+a*n,o-a,u-a*e,o,u)}function i_(t){this._context=t}function o_(t){this._context=new u_(t)}function u_(t){this._context=t}function a_(t){this._context=t}function c_(t){var n,e,r=t.length-1,i=new Array(r),o=new Array(r),u=new Array(r);for(i[0]=0,o[0]=2,u[0]=t[0]+2*t[1],n=1;n<r-1;++n)i[n]=1,o[n]=4,u[n]=4*t[n]+2*t[n+1];for(i[r-1]=2,o[r-1]=7,u[r-1]=8*t[r-1]+t[r],n=1;n<r;++n)e=i[n]/o[n-1],o[n]-=e,u[n]-=e*u[n-1];for(i[r-1]=u[r-1]/o[r-1],n=r-2;n>=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n<r-1;++n)o[n]=2*t[n+1]-i[n+1];return[i,o]}function s_(t,n){this._context=t,this._t=n}function f_(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o<i;++o)for(r=u,u=t[n[o]],e=0;e<a;++e)u[e][1]+=u[e][0]=isNaN(r[e][1])?r[e][0]:r[e][1]}function l_(t){for(var n=t.length,e=new Array(n);--n>=0;)e[n]=n;return e}function h_(t,n){return t[n]}function p_(t){var n=t.map(d_);return l_(t).sort((function(t,e){return n[t]-n[e]}))}function d_(t){for(var n,e=0,r=-1,i=t.length;++r<i;)(n=+t[r][1])&&(e+=n);return e}function v_(t){return function(){return t}}function g_(t){return t[0]}function __(t){return t[1]}function y_(){this._=null}function m_(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function x_(t,n){var e=n,r=n.R,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.R=r.L,e.R&&(e.R.U=e),r.L=e}function b_(t,n){var e=n,r=n.L,i=e.U;i?i.L===e?i.L=r:i.R=r:t._=r,r.U=i,e.U=r,e.L=r.R,e.L&&(e.L.U=e),r.R=e}function w_(t){for(;t.L;)t=t.L;return t}function M_(t,n,e,r){var i=[null,null],o=W_.push(i)-1;return i.left=t,i.right=n,e&&N_(i,t,n,e),r&&N_(i,n,t,r),X_[t.index].halfedges.push(o),X_[n.index].halfedges.push(o),i}function T_(t,n,e){var r=[n,e];return r.left=t,r}function N_(t,n,e,r){t[0]||t[1]?t.left===e?t[1]=r:t[0]=r:(t[0]=r,t.left=n,t.right=e)}function k_(t,n,e,r,i){var o,u=t[0],a=t[1],c=u[0],s=u[1],f=0,l=1,h=a[0]-c,p=a[1]-s;if(o=n-c,h||!(o>0)){if(o/=h,h<0){if(o<f)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>f&&(f=o)}if(o=r-c,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>f&&(f=o)}else if(h>0){if(o<f)return;o<l&&(l=o)}if(o=e-s,p||!(o>0)){if(o/=p,p<0){if(o<f)return;o<l&&(l=o)}else if(p>0){if(o>l)return;o>f&&(f=o)}if(o=i-s,p||!(o<0)){if(o/=p,p<0){if(o>l)return;o>f&&(f=o)}else if(p>0){if(o<f)return;o<l&&(l=o)}return!(f>0||l<1)||(f>0&&(t[0]=[c+f*h,s+f*p]),l<1&&(t[1]=[c+l*h,s+l*p]),!0)}}}}}function S_(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,c=t[0],s=t.left,f=t.right,l=s[0],h=s[1],p=f[0],d=f[1],v=(l+p)/2,g=(h+d)/2;if(d===h){if(v<n||v>=r)return;if(l>p){if(c){if(c[1]>=i)return}else c=[v,e];o=[v,i]}else{if(c){if(c[1]<e)return}else c=[v,i];o=[v,e]}}else if(a=g-(u=(l-p)/(d-h))*v,u<-1||u>1)if(l>p){if(c){if(c[1]>=i)return}else c=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(c){if(c[1]<e)return}else c=[(i-a)/u,i];o=[(e-a)/u,e]}else if(h<d){if(c){if(c[0]>=r)return}else c=[n,u*n+a];o=[r,u*r+a]}else{if(c){if(c[0]<n)return}else c=[r,u*r+a];o=[n,u*n+a]}return t[0]=c,t[1]=o,!0}function E_(t,n){var e=t.site,r=n.left,i=n.right;return e===i&&(i=r,r=e),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(e===r?(r=n[1],i=n[0]):(r=n[0],i=n[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function A_(t,n){return n[+(n.left!==t.site)]}function C_(t,n){return n[+(n.left===t.site)]}Kg.prototype={areaStart:Pg,areaEnd:Pg,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}},i_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:r_(this,this._t0,e_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){var e=NaN;if(n=+n,(t=+t)!==this._x1||n!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;break;case 2:this._point=3,r_(this,e_(this,e=n_(this,t,n)),e);break;default:r_(this,this._t0,e=n_(this,t,n))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n,this._t0=e}}},(o_.prototype=Object.create(i_.prototype)).point=function(t,n){i_.prototype.point.call(this,n,t)},u_.prototype={moveTo:function(t,n){this._context.moveTo(n,t)},closePath:function(){this._context.closePath()},lineTo:function(t,n){this._context.lineTo(n,t)},bezierCurveTo:function(t,n,e,r,i,o){this._context.bezierCurveTo(n,t,r,e,o,i)}},a_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,n=this._y,e=t.length;if(e)if(this._line?this._context.lineTo(t[0],n[0]):this._context.moveTo(t[0],n[0]),2===e)this._context.lineTo(t[1],n[1]);else for(var r=c_(t),i=c_(n),o=0,u=1;u<e;++o,++u)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],t[u],n[u]);(this._line||0!==this._line&&1===e)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,n){this._x.push(+t),this._y.push(+n)}},s_.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}},y_.prototype={constructor:y_,insert:function(t,n){var e,r,i;if(t){if(n.P=t,n.N=t.N,t.N&&(t.N.P=n),t.N=n,t.R){for(t=t.R;t.L;)t=t.L;t.L=n}else t.R=n;e=t}else this._?(t=w_(this._),n.P=null,n.N=t,t.P=t.L=n,e=t):(n.P=n.N=null,this._=n,e=null);for(n.L=n.R=null,n.U=e,n.C=!0,t=n;e&&e.C;)e===(r=e.U).L?(i=r.R)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.R&&(x_(this,e),e=(t=e).U),e.C=!1,r.C=!0,b_(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(b_(this,e),e=(t=e).U),e.C=!1,r.C=!0,x_(this,r)),e=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var n,e,r,i=t.U,o=t.L,u=t.R;if(e=o?u?w_(u):o:u,i?i.L===t?i.L=e:i.R=e:this._=e,o&&u?(r=e.C,e.C=t.C,e.L=o,o.U=e,e!==u?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=u,u.U=e):(e.U=i,i=e,t=e.R)):(r=t.C,t=e),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((n=i.R).C&&(n.C=!1,i.C=!0,x_(this,i),n=i.R),n.L&&n.L.C||n.R&&n.R.C){n.R&&n.R.C||(n.L.C=!1,n.C=!0,b_(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,x_(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,b_(this,i),n=i.L),n.L&&n.L.C||n.R&&n.R.C){n.L&&n.L.C||(n.R.C=!1,n.C=!0,x_(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,b_(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var z_,P_=[];function R_(){m_(this),this.x=this.y=this.arc=this.site=this.cy=null}function L_(t){var n=t.P,e=t.N;if(n&&e){var r=n.site,i=t.site,o=e.site;if(r!==o){var u=i[0],a=i[1],c=r[0]-u,s=r[1]-a,f=o[0]-u,l=o[1]-a,h=2*(c*l-s*f);if(!(h>=-Z_)){var p=c*c+s*s,d=f*f+l*l,v=(l*p-s*d)/h,g=(c*d-f*p)/h,_=P_.pop()||new R_;_.arc=t,_.site=i,_.x=v+u,_.y=(_.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=_;for(var y=null,m=V_._;m;)if(_.y<m.y||_.y===m.y&&_.x<=m.x){if(!m.L){y=m.P;break}m=m.L}else{if(!m.R){y=m;break}m=m.R}V_.insert(y,_),y||(z_=_)}}}}function q_(t){var n=t.circle;n&&(n.P||(z_=n.N),V_.remove(n),P_.push(n),m_(n),t.circle=null)}var D_=[];function U_(){m_(this),this.edge=this.site=this.circle=null}function O_(t){var n=D_.pop()||new U_;return n.site=t,n}function F_(t){q_(t),j_.remove(t),D_.push(t),m_(t)}function I_(t){var n=t.circle,e=n.x,r=n.cy,i=[e,r],o=t.P,u=t.N,a=[t];F_(t);for(var c=o;c.circle&&Math.abs(e-c.circle.x)<$_&&Math.abs(r-c.circle.cy)<$_;)o=c.P,a.unshift(c),F_(c),c=o;a.unshift(c),q_(c);for(var s=u;s.circle&&Math.abs(e-s.circle.x)<$_&&Math.abs(r-s.circle.cy)<$_;)u=s.N,a.push(s),F_(s),s=u;a.push(s),q_(s);var f,l=a.length;for(f=1;f<l;++f)s=a[f],c=a[f-1],N_(s.edge,c.site,s.site,i);c=a[0],(s=a[l-1]).edge=M_(c.site,s.site,null,i),L_(c),L_(s)}function Y_(t){for(var n,e,r,i,o=t[0],u=t[1],a=j_._;a;)if((r=B_(a,u)-o)>$_)a=a.L;else{if(!((i=o-H_(a,u))>$_)){r>-$_?(n=a.P,e=a):i>-$_?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){X_[t.index]={site:t,halfedges:[]}}(t);var c=O_(t);if(j_.insert(n,c),n||e){if(n===e)return q_(n),e=O_(n.site),j_.insert(c,e),c.edge=e.edge=M_(n.site,c.site),L_(n),void L_(e);if(e){q_(n),q_(e);var s=n.site,f=s[0],l=s[1],h=t[0]-f,p=t[1]-l,d=e.site,v=d[0]-f,g=d[1]-l,_=2*(h*g-p*v),y=h*h+p*p,m=v*v+g*g,x=[(g*y-p*m)/_+f,(h*m-v*y)/_+l];N_(e.edge,s,d,x),c.edge=M_(s,t,null,x),e.edge=M_(t,d,null,x),L_(n),L_(e)}else c.edge=M_(n.site,c.site)}}function B_(t,n){var e=t.site,r=e[0],i=e[1],o=i-n;if(!o)return r;var u=t.P;if(!u)return-1/0;var a=(e=u.site)[0],c=e[1],s=c-n;if(!s)return a;var f=a-r,l=1/o-1/s,h=f/s;return l?(-h+Math.sqrt(h*h-2*l*(f*f/(-2*s)-c+s/2+i-o/2)))/l+r:(r+a)/2}function H_(t,n){var e=t.N;if(e)return B_(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var j_,X_,V_,W_,$_=1e-6,Z_=1e-12;function G_(t,n,e){return(t[0]-e[0])*(n[1]-t[1])-(t[0]-n[0])*(e[1]-t[1])}function Q_(t,n){return n[1]-t[1]||n[0]-t[0]}function J_(t,n){var e,r,i,o=t.sort(Q_).pop();for(W_=[],X_=new Array(t.length),j_=new y_,V_=new y_;;)if(i=z_,o&&(!i||o[1]<i.y||o[1]===i.y&&o[0]<i.x))o[0]===e&&o[1]===r||(Y_(o),e=o[0],r=o[1]),o=t.pop();else{if(!i)break;I_(i.arc)}if(function(){for(var t,n,e,r,i=0,o=X_.length;i<o;++i)if((t=X_[i])&&(r=(n=t.halfedges).length)){var u=new Array(r),a=new Array(r);for(e=0;e<r;++e)u[e]=e,a[e]=E_(t,W_[n[e]]);for(u.sort((function(t,n){return a[n]-a[t]})),e=0;e<r;++e)a[e]=n[u[e]];for(e=0;e<r;++e)n[e]=a[e]}}(),n){var u=+n[0][0],a=+n[0][1],c=+n[1][0],s=+n[1][1];!function(t,n,e,r){for(var i,o=W_.length;o--;)S_(i=W_[o],t,n,e,r)&&k_(i,t,n,e,r)&&(Math.abs(i[0][0]-i[1][0])>$_||Math.abs(i[0][1]-i[1][1])>$_)||delete W_[o]}(u,a,c,s),function(t,n,e,r){var i,o,u,a,c,s,f,l,h,p,d,v,g=X_.length,_=!0;for(i=0;i<g;++i)if(o=X_[i]){for(u=o.site,a=(c=o.halfedges).length;a--;)W_[c[a]]||c.splice(a,1);for(a=0,s=c.length;a<s;)d=(p=C_(o,W_[c[a]]))[0],v=p[1],l=(f=A_(o,W_[c[++a%s]]))[0],h=f[1],(Math.abs(d-l)>$_||Math.abs(v-h)>$_)&&(c.splice(a,0,W_.push(T_(u,p,Math.abs(d-t)<$_&&r-v>$_?[t,Math.abs(l-t)<$_?h:r]:Math.abs(v-r)<$_&&e-d>$_?[Math.abs(h-r)<$_?l:e,r]:Math.abs(d-e)<$_&&v-n>$_?[e,Math.abs(l-e)<$_?h:n]:Math.abs(v-n)<$_&&d-t>$_?[Math.abs(h-n)<$_?l:t,n]:null))-1),++s);s&&(_=!1)}if(_){var y,m,x,b=1/0;for(i=0,_=null;i<g;++i)(o=X_[i])&&(x=(y=(u=o.site)[0]-t)*y+(m=u[1]-n)*m)<b&&(b=x,_=o);if(_){var w=[t,n],M=[t,r],T=[e,r],N=[e,n];_.halfedges.push(W_.push(T_(u=_.site,w,M))-1,W_.push(T_(u,M,T))-1,W_.push(T_(u,T,N))-1,W_.push(T_(u,N,w))-1)}}for(i=0;i<g;++i)(o=X_[i])&&(o.halfedges.length||delete X_[i])}(u,a,c,s)}this.edges=W_,this.cells=X_,j_=V_=W_=X_=null}function K_(t){return function(){return t}}function ty(t,n,e){this.target=t,this.type=n,this.transform=e}function ny(t,n,e){this.k=t,this.x=n,this.y=e}J_.prototype={constructor:J_,polygons:function(){var t=this.edges;return this.cells.map((function(n){var e=n.halfedges.map((function(e){return A_(n,t[e])}));return e.data=n.site.data,e}))},triangles:function(){var t=[],n=this.edges;return this.cells.forEach((function(e,r){if(o=(i=e.halfedges).length)for(var i,o,u,a=e.site,c=-1,s=n[i[o-1]],f=s.left===a?s.right:s.left;++c<o;)u=f,f=(s=n[i[c]]).left===a?s.right:s.left,u&&f&&r<u.index&&r<f.index&&G_(a,u,f)<0&&t.push([a.data,u.data,f.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,n,e){for(var r,i,o=this,u=o._found||0,a=o.cells.length;!(i=o.cells[u]);)if(++u>=a)return null;var c=t-i.site[0],s=n-i.site[1],f=c*c+s*s;do{i=o.cells[r=u],u=null,i.halfedges.forEach((function(e){var r=o.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],s=n-a[1],l=c*c+s*s;l<f&&(f=l,u=a.index)}}))}while(null!==u);return o._found=r,null==e||f<=e*e?i.site:null}},ny.prototype={constructor:ny,scale:function(t){return 1===t?this:new ny(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ny(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ey=new ny(1,0,0);function ry(t){return t.__zoom||ey}function iy(){t.event.stopImmediatePropagation()}function oy(){t.event.preventDefault(),t.event.stopImmediatePropagation()}function uy(){return!t.event.button}function ay(){var t,n,e=this;return e instanceof SVGElement?(t=(e=e.ownerSVGElement||e).width.baseVal.value,n=e.height.baseVal.value):(t=e.clientWidth,n=e.clientHeight),[[0,0],[t,n]]}function cy(){return this.__zoom||ey}function sy(){return-t.event.deltaY*(t.event.deltaMode?120:1)/500}function fy(){return"ontouchstart"in this}function ly(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],u=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}ry.prototype=ny.prototype,t.version="4.13.0",t.bisect=i,t.bisectRight=i,t.bisectLeft=o,t.ascending=n,t.bisector=e,t.cross=function(t,n,e){var r,i,o,a,c=t.length,s=n.length,f=new Array(c*s);for(null==e&&(e=u),r=o=0;r<c;++r)for(a=t[r],i=0;i<s;++i,++o)f[o]=e(a,n[i]);return f},t.descending=function(t,n){return n<t?-1:n>t?1:n>=t?0:NaN},t.deviation=s,t.extent=f,t.histogram=function(){var t=v,n=f,e=M;function r(r){var o,u,a=r.length,c=new Array(a);for(o=0;o<a;++o)c[o]=t(r[o],o,r);var s=n(c),f=s[0],l=s[1],h=e(c,f,l);Array.isArray(h)||(h=w(f,l,h),h=g(Math.ceil(f/h)*h,Math.floor(l/h)*h,h));for(var p=h.length;h[0]<=f;)h.shift(),--p;for(;h[p-1]>l;)h.pop(),--p;var d,v=new Array(p+1);for(o=0;o<=p;++o)(d=v[o]=[]).x0=o>0?h[o-1]:f,d.x1=o<p?h[o]:l;for(o=0;o<a;++o)f<=(u=c[o])&&u<=l&&v[i(h,u,0,p)].push(r[o]);return v}return r.value=function(n){return arguments.length?(t="function"==typeof n?n:d(n),r):t},r.domain=function(t){return arguments.length?(n="function"==typeof t?t:d([t[0],t[1]]),r):n},r.thresholds=function(t){return arguments.length?(e="function"==typeof t?t:Array.isArray(t)?d(h.call(t)):d(t),r):e},r},t.thresholdFreedmanDiaconis=function(t,e,r){return t=p.call(t,a).sort(n),Math.ceil((r-e)/(2*(T(t,.75)-T(t,.25))*Math.pow(t.length,-1/3)))},t.thresholdScott=function(t,n,e){return Math.ceil((e-n)/(3.5*s(t)*Math.pow(t.length,-1/3)))},t.thresholdSturges=M,t.max=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&e>r&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&e>r&&(r=e);return r},t.mean=function(t,n){var e,r=t.length,i=r,o=-1,u=0;if(null==n)for(;++o<r;)isNaN(e=a(t[o]))?--i:u+=e;else for(;++o<r;)isNaN(e=a(n(t[o],o,t)))?--i:u+=e;if(i)return u/i},t.median=function(t,e){var r,i=t.length,o=-1,u=[];if(null==e)for(;++o<i;)isNaN(r=a(t[o]))||u.push(r);else for(;++o<i;)isNaN(r=a(e(t[o],o,t)))||u.push(r);return T(u.sort(n),.5)},t.merge=N,t.min=k,t.pairs=function(t,n){null==n&&(n=u);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);e<r;)o[e]=n(i,i=t[++e]);return o},t.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},t.quantile=T,t.range=g,t.scan=function(t,e){if(r=t.length){var r,i,o=0,u=0,a=t[u];for(null==e&&(e=n);++o<r;)(e(i=t[o],a)<0||0!==e(a,a))&&(a=i,u=o);return 0===e(a,a)?u:void 0}},t.shuffle=function(t,n,e){for(var r,i,o=(null==e?t.length:e)-(n=null==n?0:+n);o;)i=Math.random()*o--|0,r=t[o+n],t[o+n]=t[i+n],t[i+n]=r;return t},t.sum=function(t,n){var e,r=t.length,i=-1,o=0;if(null==n)for(;++i<r;)(e=+t[i])&&(o+=e);else for(;++i<r;)(e=+n(t[i],i,t))&&(o+=e);return o},t.ticks=x,t.tickIncrement=b,t.tickStep=w,t.transpose=S,t.variance=c,t.zip=function(){return S(arguments)},t.axisTop=function(t){return U(1,t)},t.axisRight=function(t){return U(2,t)},t.axisBottom=function(t){return U(3,t)},t.axisLeft=function(t){return U(4,t)},t.brush=function(){return Ji(Yi)},t.brushX=function(){return Ji(Fi)},t.brushY=function(){return Ji(Ii)},t.brushSelection=function(t){var n=t.__brush;return n?n.dim.output(n.selection):null},t.chord=function(){var t=0,n=null,e=null,r=null;function i(i){var o,u,a,c,s,f,l=i.length,h=[],p=g(l),d=[],v=[],_=v.groups=new Array(l),y=new Array(l*l);for(o=0,s=-1;++s<l;){for(u=0,f=-1;++f<l;)u+=i[s][f];h.push(u),d.push(g(l)),o+=u}for(n&&p.sort((function(t,e){return n(h[t],h[e])})),e&&d.forEach((function(t,n){t.sort((function(t,r){return e(i[n][t],i[n][r])}))})),c=(o=io(0,ro-t*l)/o)?t:ro/l,u=0,s=-1;++s<l;){for(a=u,f=-1;++f<l;){var m=p[s],x=d[m][f],b=i[m][x],w=u,M=u+=b*o;y[x*l+m]={index:m,subindex:x,startAngle:w,endAngle:M,value:b}}_[m]={index:m,startAngle:a,endAngle:u,value:h[m]},u+=c}for(s=-1;++s<l;)for(f=s-1;++f<l;){var T=y[f*l+s],N=y[s*l+f];(T.value||N.value)&&v.push(T.value<N.value?{source:N,target:T}:{source:T,target:N})}return r?v.sort(r):v}return i.padAngle=function(n){return arguments.length?(t=io(0,n),i):t},i.sortGroups=function(t){return arguments.length?(n=t,i):n},i.sortSubgroups=function(t){return arguments.length?(e=t,i):e},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=oo(t))._=t,i):r&&r._},i},t.ribbon=function(){var t=vo,n=go,e=_o,r=yo,i=mo,o=null;function u(){var u,a=uo.call(arguments),c=t.apply(this,a),s=n.apply(this,a),f=+e.apply(this,(a[0]=c,a)),l=r.apply(this,a)-eo,h=i.apply(this,a)-eo,p=f*Ki(l),d=f*to(l),v=+e.apply(this,(a[0]=s,a)),g=r.apply(this,a)-eo,_=i.apply(this,a)-eo;if(o||(o=u=po()),o.moveTo(p,d),o.arc(0,0,f,l,h),l===g&&h===_||(o.quadraticCurveTo(0,0,v*Ki(g),v*to(g)),o.arc(0,0,v,g,_)),o.quadraticCurveTo(0,0,p,d),o.closePath(),u)return o=null,u+""||null}return u.radius=function(t){return arguments.length?(e="function"==typeof t?t:ao(+t),u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:ao(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:ao(+t),u):i},u.source=function(n){return arguments.length?(t=n,u):t},u.target=function(t){return arguments.length?(n=t,u):n},u.context=function(t){return arguments.length?(o=null==t?null:t,u):o},u},t.nest=function(){var t,n,e,r=[],i=[];function o(e,i,u,a){if(i>=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,s,f,l=-1,h=e.length,p=r[i++],d=wo(),v=u();++l<h;)(f=d.get(c=p(s=e[l])+""))?f.push(s):d.set(c,[s]);return d.each((function(t,n){a(v,n,o(t,i,u,a))})),v}function u(t,e){if(++e>r.length)return t;var o,a=i[e-1];return null!=n&&e>=r.length?o=t.entries():(o=[],t.each((function(t,n){o.push({key:n,values:u(t,e)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}return e={object:function(t){return o(t,0,Mo,To)},map:function(t){return o(t,0,No,ko)},entries:function(t){return u(o(t,0,No,ko),0)},key:function(t){return r.push(t),e},sortKeys:function(t){return i[r.length-1]=t,e},sortValues:function(n){return t=n,e},rollup:function(t){return n=t,e}}},t.set=Ao,t.map=wo,t.keys=function(t){var n=[];for(var e in t)n.push(e);return n},t.values=function(t){var n=[];for(var e in t)n.push(t[e]);return n},t.entries=function(t){var n=[];for(var e in t)n.push({key:e,value:t[e]});return n},t.color=On,t.rgb=Bn,t.hsl=Vn,t.lab=re,t.hcl=fe,t.cubehelix=be,t.dispatch=F,t.drag=function(){var n,e,r,i,o=_n,u=yn,a=mn,c=xn,s={},f=F("start","drag","end"),l=0,h=0;function p(t){t.on("mousedown.drag",d).filter(c).on("touchstart.drag",_).on("touchmove.drag",y).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!i&&o.apply(this,arguments)){var a=x("mouse",u.apply(this,arguments),sn,this,arguments);a&&(en(t.event.view).on("mousemove.drag",v,!0).on("mouseup.drag",g,!0),pn(t.event.view),ln(),r=!1,n=t.event.clientX,e=t.event.clientY,a("start"))}}function v(){if(hn(),!r){var i=t.event.clientX-n,o=t.event.clientY-e;r=i*i+o*o>h}s.mouse("drag")}function g(){en(t.event.view).on("mousemove.drag mouseup.drag",null),dn(t.event.view,r),hn(),s.mouse("end")}function _(){if(o.apply(this,arguments)){var n,e,r=t.event.changedTouches,i=u.apply(this,arguments),a=r.length;for(n=0;n<a;++n)(e=x(r[n].identifier,i,fn,this,arguments))&&(ln(),e("start"))}}function y(){var n,e,r=t.event.changedTouches,i=r.length;for(n=0;n<i;++n)(e=s[r[n].identifier])&&(hn(),e("drag"))}function m(){var n,e,r=t.event.changedTouches,o=r.length;for(i&&clearTimeout(i),i=setTimeout((function(){i=null}),500),n=0;n<o;++n)(e=s[r[n].identifier])&&(ln(),e("end"))}function x(n,e,r,i,o){var u,c,h,d=r(e,n),v=f.copy();if(Zt(new gn(p,"beforestart",u,n,l,d[0],d[1],0,0,v),(function(){return null!=(t.event.subject=u=a.apply(i,o))&&(c=u.x-d[0]||0,h=u.y-d[1]||0,!0)})))return function t(a){var f,g=d;switch(a){case"start":s[n]=t,f=l++;break;case"end":delete s[n],--l;case"drag":d=r(e,n),f=l}Zt(new gn(p,a,u,n,f,d[0]+c,d[1]+h,d[0]-g[0],d[1]-g[1],v),v.apply,v,[a,i,o])}}return p.filter=function(t){return arguments.length?(o="function"==typeof t?t:vn(!!t),p):o},p.container=function(t){return arguments.length?(u="function"==typeof t?t:vn(t),p):u},p.subject=function(t){return arguments.length?(a="function"==typeof t?t:vn(t),p):a},p.touchable=function(t){return arguments.length?(c="function"==typeof t?t:vn(!!t),p):c},p.on=function(){var t=f.on.apply(f,arguments);return t===f?p:t},p.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,p):Math.sqrt(h)},p},t.dragDisable=pn,t.dragEnable=dn,t.dsvFormat=Ro,t.csvParse=qo,t.csvParseRows=Do,t.csvFormat=Uo,t.csvFormatRows=Oo,t.tsvParse=Io,t.tsvParseRows=Yo,t.tsvFormat=Bo,t.tsvFormatRows=Ho,t.easeLinear=function(t){return+t},t.easeQuad=ci,t.easeQuadIn=function(t){return t*t},t.easeQuadOut=function(t){return t*(2-t)},t.easeQuadInOut=ci,t.easeCubic=si,t.easeCubicIn=function(t){return t*t*t},t.easeCubicOut=function(t){return--t*t*t+1},t.easeCubicInOut=si,t.easePoly=hi,t.easePolyIn=fi,t.easePolyOut=li,t.easePolyInOut=hi,t.easeSin=vi,t.easeSinIn=function(t){return 1-Math.cos(t*di)},t.easeSinOut=function(t){return Math.sin(t*di)},t.easeSinInOut=vi,t.easeExp=gi,t.easeExpIn=function(t){return Math.pow(2,10*t-10)},t.easeExpOut=function(t){return 1-Math.pow(2,-10*t)},t.easeExpInOut=gi,t.easeCircle=_i,t.easeCircleIn=function(t){return 1-Math.sqrt(1-t*t)},t.easeCircleOut=function(t){return Math.sqrt(1- --t*t)},t.easeCircleInOut=_i,t.easeBounce=mi,t.easeBounceIn=function(t){return 1-mi(1-t)},t.easeBounceOut=mi,t.easeBounceInOut=function(t){return((t*=2)<=1?1-mi(1-t):mi(t-1)+1)/2},t.easeBack=Mi,t.easeBackIn=bi,t.easeBackOut=wi,t.easeBackInOut=Mi,t.easeElastic=ki,t.easeElasticIn=Ni,t.easeElasticOut=ki,t.easeElasticInOut=Si,t.forceCenter=function(t,n){var e;function r(){var r,i,o=e.length,u=0,a=0;for(r=0;r<o;++r)u+=(i=e[r]).x,a+=i.y;for(u=u/o-t,a=a/o-n,r=0;r<o;++r)(i=e[r]).x-=u,i.y-=a}return null==t&&(t=0),null==n&&(n=0),r.initialize=function(t){e=t},r.x=function(n){return arguments.length?(t=+n,r):t},r.y=function(t){return arguments.length?(n=+t,r):n},r},t.forceCollide=function(t){var n,e,r=1,i=1;function o(){for(var t,o,a,c,s,f,l,h=n.length,p=0;p<i;++p)for(o=Go(n,tu,nu).visitAfter(u),t=0;t<h;++t)a=n[t],f=e[a.index],l=f*f,c=a.x+a.vx,s=a.y+a.vy,o.visit(d);function d(t,n,e,i,o){var u=t.data,h=t.r,p=f+h;if(!u)return n>c+p||i<c-p||e>s+p||o<s-p;if(u.index>a.index){var d=c-u.x-u.vx,v=s-u.y-u.vy,g=d*d+v*v;g<p*p&&(0===d&&(g+=(d=Xo())*d),0===v&&(g+=(v=Xo())*v),g=(p-(g=Math.sqrt(g)))/g*r,a.vx+=(d*=g)*(p=(h*=h)/(l+h)),a.vy+=(v*=g)*p,u.vx-=d*(p=1-p),u.vy-=v*p)}}}function u(t){if(t.data)return t.r=e[t.data.index];for(var n=t.r=0;n<4;++n)t[n]&&t[n].r>t.r&&(t.r=t[n].r)}function a(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r<o;++r)i=n[r],e[i.index]=+t(i,r,n)}}return"function"!=typeof t&&(t=jo(null==t?1:+t)),o.initialize=function(t){n=t,a()},o.iterations=function(t){return arguments.length?(i=+t,o):i},o.strength=function(t){return arguments.length?(r=+t,o):r},o.radius=function(n){return arguments.length?(t="function"==typeof n?n:jo(+n),a(),o):t},o},t.forceLink=function(t){var n,e,r,i,o,u=eu,a=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=jo(30),s=1;function f(r){for(var i=0,u=t.length;i<s;++i)for(var a,c,f,l,h,p,d,v=0;v<u;++v)c=(a=t[v]).source,l=(f=a.target).x+f.vx-c.x-c.vx||Xo(),h=f.y+f.vy-c.y-c.vy||Xo(),l*=p=((p=Math.sqrt(l*l+h*h))-e[v])/p*r*n[v],h*=p,f.vx-=l*(d=o[v]),f.vy-=h*d,c.vx+=l*(d=1-d),c.vy+=h*d}function l(){if(r){var a,c,s=r.length,f=t.length,l=wo(r,u);for(a=0,i=new Array(s);a<f;++a)(c=t[a]).index=a,"object"!=typeof c.source&&(c.source=ru(l,c.source)),"object"!=typeof c.target&&(c.target=ru(l,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(a=0,o=new Array(f);a<f;++a)c=t[a],o[a]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);n=new Array(f),h(),e=new Array(f),p()}}function h(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+a(t[e],e,t)}function p(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+c(t[n],n,t)}return null==t&&(t=[]),f.initialize=function(t){r=t,l()},f.links=function(n){return arguments.length?(t=n,l(),f):t},f.id=function(t){return arguments.length?(u=t,f):u},f.iterations=function(t){return arguments.length?(s=+t,f):s},f.strength=function(t){return arguments.length?(a="function"==typeof t?t:jo(+t),h(),f):a},f.distance=function(t){return arguments.length?(c="function"==typeof t?t:jo(+t),p(),f):c},f},t.forceManyBody=function(){var t,n,e,r,i=jo(-30),o=1,u=1/0,a=.81;function c(r){var i,o=t.length,u=Go(t,iu,ou).visitAfter(f);for(e=r,i=0;i<o;++i)n=t[i],u.visit(l)}function s(){if(t){var n,e,o=t.length;for(r=new Array(o),n=0;n<o;++n)e=t[n],r[e.index]=+i(e,n,t)}}function f(t){var n,e,i,o,u,a=0,c=0;if(t.length){for(i=o=u=0;u<4;++u)(n=t[u])&&(e=Math.abs(n.value))&&(a+=n.value,c+=e,i+=e*n.x,o+=e*n.y);t.x=i/c,t.y=o/c}else{(n=t).x=n.data.x,n.y=n.data.y;do{a+=r[n.data.index]}while(n=n.next)}t.value=a}function l(t,i,c,s){if(!t.value)return!0;var f=t.x-n.x,l=t.y-n.y,h=s-i,p=f*f+l*l;if(h*h/a<p)return p<u&&(0===f&&(p+=(f=Xo())*f),0===l&&(p+=(l=Xo())*l),p<o&&(p=Math.sqrt(o*p)),n.vx+=f*t.value*e/p,n.vy+=l*t.value*e/p),!0;if(!(t.length||p>=u)){(t.data!==n||t.next)&&(0===f&&(p+=(f=Xo())*f),0===l&&(p+=(l=Xo())*l),p<o&&(p=Math.sqrt(o*p)));do{t.data!==n&&(h=r[t.data.index]*e/p,n.vx+=f*h,n.vy+=l*h)}while(t=t.next)}}return c.initialize=function(n){t=n,s()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:jo(+t),s(),c):i},c.distanceMin=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.distanceMax=function(t){return arguments.length?(u=t*t,c):Math.sqrt(u)},c.theta=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c},t.forceRadial=function(t,n,e){var r,i,o,u=jo(.1);function a(t){for(var u=0,a=r.length;u<a;++u){var c=r[u],s=c.x-n||1e-6,f=c.y-e||1e-6,l=Math.sqrt(s*s+f*f),h=(o[u]-l)*i[u]*t/l;c.vx+=s*h,c.vy+=f*h}}function c(){if(r){var n,e=r.length;for(i=new Array(e),o=new Array(e),n=0;n<e;++n)o[n]=+t(r[n],n,r),i[n]=isNaN(o[n])?0:+u(r[n],n,r)}}return"function"!=typeof t&&(t=jo(+t)),null==n&&(n=0),null==e&&(e=0),a.initialize=function(t){r=t,c()},a.strength=function(t){return arguments.length?(u="function"==typeof t?t:jo(+t),c(),a):u},a.radius=function(n){return arguments.length?(t="function"==typeof n?n:jo(+n),c(),a):t},a.x=function(t){return arguments.length?(n=+t,a):n},a.y=function(t){return arguments.length?(e=+t,a):e},a},t.forceSimulation=function(t){var n,e=1,r=.001,i=1-Math.pow(r,1/300),o=0,u=.6,a=wo(),c=Tr(f),s=F("tick","end");function f(){l(),s.call("tick",n),e<r&&(c.stop(),s.call("end",n))}function l(){var n,r,c=t.length;for(e+=(o-e)*i,a.each((function(t){t(e)})),n=0;n<c;++n)null==(r=t[n]).fx?r.x+=r.vx*=u:(r.x=r.fx,r.vx=0),null==r.fy?r.y+=r.vy*=u:(r.y=r.fy,r.vy=0)}function h(){for(var n,e=0,r=t.length;e<r;++e){if((n=t[e]).index=e,isNaN(n.x)||isNaN(n.y)){var i=10*Math.sqrt(e),o=e*au;n.x=i*Math.cos(o),n.y=i*Math.sin(o)}(isNaN(n.vx)||isNaN(n.vy))&&(n.vx=n.vy=0)}}function p(n){return n.initialize&&n.initialize(t),n}return null==t&&(t=[]),h(),n={tick:l,restart:function(){return c.restart(f),n},stop:function(){return c.stop(),n},nodes:function(e){return arguments.length?(t=e,h(),a.each(p),n):t},alpha:function(t){return arguments.length?(e=+t,n):e},alphaMin:function(t){return arguments.length?(r=+t,n):r},alphaDecay:function(t){return arguments.length?(i=+t,n):+i},alphaTarget:function(t){return arguments.length?(o=+t,n):o},velocityDecay:function(t){return arguments.length?(u=1-t,n):1-u},force:function(t,e){return arguments.length>1?(null==e?a.remove(t):a.set(t,p(e)),n):a.get(t)},find:function(n,e,r){var i,o,u,a,c,s=0,f=t.length;for(null==r?r=1/0:r*=r,s=0;s<f;++s)(u=(i=n-(a=t[s]).x)*i+(o=e-a.y)*o)<r&&(c=a,r=u);return c},on:function(t,e){return arguments.length>1?(s.on(t,e),n):s.on(t)}}},t.forceX=function(t){var n,e,r,i=jo(.1);function o(t){for(var i,o=0,u=n.length;o<u;++o)(i=n[o]).vx+=(r[o]-i.x)*e[o]*t}function u(){if(n){var o,u=n.length;for(e=new Array(u),r=new Array(u),o=0;o<u;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return"function"!=typeof t&&(t=jo(null==t?0:+t)),o.initialize=function(t){n=t,u()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:jo(+t),u(),o):i},o.x=function(n){return arguments.length?(t="function"==typeof n?n:jo(+n),u(),o):t},o},t.forceY=function(t){var n,e,r,i=jo(.1);function o(t){for(var i,o=0,u=n.length;o<u;++o)(i=n[o]).vy+=(r[o]-i.y)*e[o]*t}function u(){if(n){var o,u=n.length;for(e=new Array(u),r=new Array(u),o=0;o<u;++o)e[o]=isNaN(r[o]=+t(n[o],o,n))?0:+i(n[o],o,n)}}return"function"!=typeof t&&(t=jo(null==t?0:+t)),o.initialize=function(t){n=t,u()},o.strength=function(t){return arguments.length?(i="function"==typeof t?t:jo(+t),u(),o):i},o.y=function(n){return arguments.length?(t="function"==typeof n?n:jo(+n),u(),o):t},o},t.formatDefaultLocale=mu,t.formatLocale=yu,t.formatSpecifier=pu,t.precisionFixed=xu,t.precisionPrefix=bu,t.precisionRound=wu,t.geoArea=function(t){return ga.reset(),na(t,_a),2*ga},t.geoBounds=function(t){var n,e,r,i,o,u,a;if(fa=sa=-(aa=ca=1/0),Aa=[],na(t,$a),e=Aa.length){for(Aa.sort(rc),n=1,o=[r=Aa[0]];n<e;++n)ic(r,(i=Aa[n])[0])||ic(r,i[1])?(ec(r[0],i[1])>ec(r[0],r[1])&&(r[1]=i[1]),ec(i[0],r[1])>ec(r[0],r[1])&&(r[0]=i[0])):o.push(r=i);for(u=-1/0,n=0,r=o[e=o.length-1];n<=e;r=i,++n)i=o[n],(a=ec(r[1],i[0]))>u&&(u=a,aa=i[0],sa=r[1])}return Aa=Ca=null,aa===1/0||ca===1/0?[[NaN,NaN],[NaN,NaN]]:[[aa,ca],[sa,fa]]},t.geoCentroid=function(t){za=Pa=Ra=La=qa=Da=Ua=Oa=Fa=Ia=Ya=0,na(t,oc);var n=Fa,e=Ia,r=Ya,i=n*n+e*e+r*r;return i<1e-12&&(n=Da,e=Ua,r=Oa,Pa<Su&&(n=Ra,e=La,r=qa),(i=n*n+e*e+r*r)<1e-12)?[NaN,NaN]:[Du(e,n)*Pu,Wu(r/ju(i))*Pu]},t.geoCircle=function(){var t,n,e=gc([0,0]),r=gc(90),i=gc(6),o={point:function(e,r){t.push(e=n(e,r)),e[0]*=Pu,e[1]*=Pu}};function u(){var u=e.apply(this,arguments),a=r.apply(this,arguments)*Ru,c=i.apply(this,arguments)*Ru;return t=[],n=mc(-u[0]*Ru,-u[1]*Ru,0).invert,Tc(o,a,c,1),u={type:"Polygon",coordinates:[t]},t=n=null,u}return u.center=function(t){return arguments.length?(e="function"==typeof t?t:gc([+t[0],+t[1]]),u):e},u.radius=function(t){return arguments.length?(r="function"==typeof t?t:gc(+t),u):r},u.precision=function(t){return arguments.length?(i="function"==typeof t?t:gc(+t),u):i},u},t.geoClipAntimeridian=Dc,t.geoClipCircle=Uc,t.geoClipExtent=function(){var t,n,e,r=0,i=0,o=960,u=500;return e={stream:function(e){return t&&n===e?t:t=Ic(r,i,o,u)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],o=+a[1][0],u=+a[1][1],t=n=null,e):[[r,i],[o,u]]}}},t.geoClipRectangle=Ic,t.geoContains=function(t,n){return(t&&Kc.hasOwnProperty(t.type)?Kc[t.type]:ns)(t,n)},t.geoDistance=Jc,t.geoGraticule=ss,t.geoGraticule10=function(){return ss()()},t.geoInterpolate=function(t,n){var e=t[0]*Ru,r=t[1]*Ru,i=n[0]*Ru,o=n[1]*Ru,u=Uu(r),a=Bu(r),c=Uu(o),s=Bu(o),f=u*Uu(e),l=u*Bu(e),h=c*Uu(i),p=c*Bu(i),d=2*Wu(ju($u(o-r)+u*c*$u(i-e))),v=Bu(d),g=d?function(t){var n=Bu(t*=d)/v,e=Bu(d-t)/v,r=e*f+n*h,i=e*l+n*p,o=e*a+n*s;return[Du(i,r)*Pu,Du(o,ju(r*r+i*i))*Pu]}:function(){return[e*Pu,r*Pu]};return g.distance=d,g},t.geoLength=Zc,t.geoPath=function(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),na(t,e(r))),r.result()}return o.area=function(t){return na(t,e(_s)),_s.result()},o.measure=function(t){return na(t,e(rf)),rf.result()},o.bounds=function(t){return na(t,e(Cs)),Cs.result()},o.centroid=function(t){return na(t,e(Is)),Is.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,fs):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new af):new Gs(n=t),"function"!=typeof i&&r.pointRadius(i),o):n},o.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),o):i},o.projection(t).context(n)},t.geoAlbers=Tf,t.geoAlbersUsa=function(){var t,n,e,r,i,o,u=Tf(),a=Mf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=Mf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),s={point:function(t,n){o=[t,n]}};function f(t){var n=t[0],u=t[1];return o=null,e.point(n,u),o||(r.point(n,u),o)||(i.point(n,u),o)}function l(){return t=n=null,f}return f.invert=function(t){var n=u.scale(),e=u.translate(),r=(t[0]-e[0])/n,i=(t[1]-e[1])/n;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:u).invert(t)},f.stream=function(e){return t&&n===e?t:(r=[u.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e<i;)r[e].point(t,n)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},f.precision=function(t){return arguments.length?(u.precision(t),a.precision(t),c.precision(t),l()):u.precision()},f.scale=function(t){return arguments.length?(u.scale(t),a.scale(.35*t),c.scale(t),f.translate(u.translate())):u.scale()},f.translate=function(t){if(!arguments.length)return u.translate();var n=u.scale(),o=+t[0],f=+t[1];return e=u.translate(t).clipExtent([[o-.455*n,f-.238*n],[o+.455*n,f+.238*n]]).stream(s),r=a.translate([o-.307*n,f+.201*n]).clipExtent([[o-.425*n+Su,f+.12*n+Su],[o-.214*n-Su,f+.234*n-Su]]).stream(s),i=c.translate([o-.205*n,f+.212*n]).clipExtent([[o-.214*n+Su,f+.166*n+Su],[o-.115*n-Su,f+.234*n-Su]]).stream(s),l()},f.fitExtent=function(t,n){return hf(f,t,n)},f.fitSize=function(t,n){return pf(f,t,n)},f.fitWidth=function(t,n){return df(f,t,n)},f.fitHeight=function(t,n){return vf(f,t,n)},f.scale(1070)},t.geoAzimuthalEqualArea=function(){return mf(Sf).scale(124.75).clipAngle(179.999)},t.geoAzimuthalEqualAreaRaw=Sf,t.geoAzimuthalEquidistant=function(){return mf(Ef).scale(79.4188).clipAngle(179.999)},t.geoAzimuthalEquidistantRaw=Ef,t.geoConicConformal=function(){return bf(Pf).scale(109.5).parallels([30,30])},t.geoConicConformalRaw=Pf,t.geoConicEqualArea=Mf,t.geoConicEqualAreaRaw=wf,t.geoConicEquidistant=function(){return bf(Lf).scale(131.154).center([0,13.9389])},t.geoConicEquidistantRaw=Lf,t.geoEquirectangular=function(){return mf(Rf).scale(152.63)},t.geoEquirectangularRaw=Rf,t.geoGnomonic=function(){return mf(qf).scale(144.049).clipAngle(60)},t.geoGnomonicRaw=qf,t.geoIdentity=function(){var t,n,e,r,i,o,u=1,a=0,c=0,s=1,f=1,l=fs,h=null,p=fs;function d(){return r=i=null,o}return o={stream:function(t){return r&&i===t?r:r=l(p(i=t))},postclip:function(r){return arguments.length?(p=r,h=t=n=e=null,d()):p},clipExtent:function(r){return arguments.length?(p=null==r?(h=t=n=e=null,fs):Ic(h=+r[0][0],t=+r[0][1],n=+r[1][0],e=+r[1][1]),d()):null==h?null:[[h,t],[n,e]]},scale:function(t){return arguments.length?(l=Df((u=+t)*s,u*f,a,c),d()):u},translate:function(t){return arguments.length?(l=Df(u*s,u*f,a=+t[0],c=+t[1]),d()):[a,c]},reflectX:function(t){return arguments.length?(l=Df(u*(s=t?-1:1),u*f,a,c),d()):s<0},reflectY:function(t){return arguments.length?(l=Df(u*s,u*(f=t?-1:1),a,c),d()):f<0},fitExtent:function(t,n){return hf(o,t,n)},fitSize:function(t,n){return pf(o,t,n)},fitWidth:function(t,n){return df(o,t,n)},fitHeight:function(t,n){return vf(o,t,n)}}},t.geoProjection=mf,t.geoProjectionMutator=xf,t.geoMercator=function(){return Cf(Af).scale(961/zu)},t.geoMercatorRaw=Af,t.geoNaturalEarth1=function(){return mf(Uf).scale(175.295)},t.geoNaturalEarth1Raw=Uf,t.geoOrthographic=function(){return mf(Of).scale(249.5).clipAngle(90.000001)},t.geoOrthographicRaw=Of,t.geoStereographic=function(){return mf(Ff).scale(250).clipAngle(142)},t.geoStereographicRaw=Ff,t.geoTransverseMercator=function(){var t=Cf(If),n=t.center,e=t.rotate;return t.center=function(t){return arguments.length?n([-t[1],t[0]]):[(t=n())[1],-t[0]]},t.rotate=function(t){return arguments.length?e([t[0],t[1],t.length>2?t[2]+90:90]):[(t=e())[0],t[1],t[2]-90]},e([0,0,90]).scale(159.155)},t.geoTransverseMercatorRaw=If,t.geoRotation=Mc,t.geoStream=na,t.geoTransform=function(t){return{stream:sf(t)}},t.cluster=function(){var t=Yf,n=1,e=1,r=!1;function i(i){var o,u=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Bf,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Hf,0)}(e)):(n.x=o?u+=t(n,o):0,n.y=0,o=n)}));var a=function(t){for(var n;n=t.children;)t=n[0];return t}(i),c=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),s=a.x-t(a,c)/2,f=c.x+t(c,a)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*n,t.y=(i.y-t.y)*e}:function(t){t.x=(t.x-s)/(f-s)*n,t.y=(1-(i.y?t.y/i.y:1))*e})}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.hierarchy=Xf,t.pack=function(){var t=null,n=1,e=1,r=hl;function i(i){return i.x=n/2,i.y=e/2,t?i.eachBefore(vl(t)).eachAfter(gl(r,.5)).eachBefore(_l(1)):i.eachBefore(vl(dl)).eachAfter(gl(hl,1)).eachAfter(gl(r,i.r/Math.min(n,e))).eachBefore(_l(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=fl(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:pl(+t),i):r},i},t.packSiblings=function(t){return sl(t),t},t.packEnclose=Qf,t.partition=function(){var t=1,n=1,e=0,r=!1;function i(i){var o=i.height+1;return i.x0=i.y0=e,i.x1=t,i.y1=n/o,i.eachBefore(function(t,n){return function(r){r.children&&ml(r,r.x0,t*(r.depth+1)/n,r.x1,t*(r.depth+2)/n);var i=r.x0,o=r.y0,u=r.x1-e,a=r.y1-e;u<i&&(i=u=(i+u)/2),a<o&&(o=a=(o+a)/2),r.x0=i,r.y0=o,r.x1=u,r.y1=a}}(n,o)),r&&i.eachBefore(yl),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(e){return arguments.length?(t=+e[0],n=+e[1],i):[t,n]},i.padding=function(t){return arguments.length?(e=+t,i):e},i},t.stratify=function(){var t=wl,n=Ml;function e(e){var r,i,o,u,a,c,s,f=e.length,l=new Array(f),h={};for(i=0;i<f;++i)r=e[i],a=l[i]=new Zf(r),null!=(c=t(r,i,e))&&(c+="")&&(h[s="$"+(a.id=c)]=s in h?bl:a);for(i=0;i<f;++i)if(a=l[i],null!=(c=n(e[i],i,e))&&(c+="")){if(!(u=h["$"+c]))throw new Error("missing: "+c);if(u===bl)throw new Error("ambiguous: "+c);u.children?u.children.push(a):u.children=[a],a.parent=u}else{if(o)throw new Error("multiple roots");o=a}if(!o)throw new Error("no root");if(o.parent=xl,o.eachBefore((function(t){t.depth=t.parent.depth+1,--f})).eachBefore($f),o.parent=null,f>0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=ll(n),e):t},e.parentId=function(t){return arguments.length?(n=ll(t),e):n},e},t.tree=function(){var t=Tl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,o,u=new Al(t,0),a=[u];n=a.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;i>=0;--i)a.push(e=n.children[i]=new Al(r[i],i)),e.parent=n;return(u.parent=new Al(null,0)).children=[u],u}(i);if(c.eachAfter(o),c.parent.m=-c.z,c.eachBefore(u),r)i.eachBefore(a);else{var s=i,f=i,l=i;i.eachBefore((function(t){t.x<s.x&&(s=t),t.x>f.x&&(f=t),t.depth>l.depth&&(l=t)}));var h=s===f?1:t(s,f)/2,p=h-s.x,d=n/(f.x+h+p),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+p)*d,t.y=t.depth*v}))}return i}function o(n){var e=n.children,r=n.parent.children,i=n.i?r[n.i-1]:null;if(e){!function(t){for(var n,e=0,r=0,i=t.children,o=i.length;--o>=0;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var o=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-o):n.z=o}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,o=n,u=n,a=e,c=o.parent.children[0],s=o.m,f=u.m,l=a.m,h=c.m;a=kl(a),o=Nl(o),a&&o;)c=Nl(c),(u=kl(u)).a=n,(i=a.z+l-o.z-s+t(a._,o._))>0&&(Sl(El(a,n,r),n,i),s+=i,f+=i),l+=a.m,s+=o.m,h+=c.m,f+=u.m;a&&!kl(u)&&(u.t=a,u.m+=l-f),o&&!Nl(c)&&(c.t=o,c.m+=s-h,r=n)}return r}(n,i,n.parent.A||r[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i},t.treemap=function(){var t=Rl,n=!1,e=1,r=1,i=[0],o=hl,u=hl,a=hl,c=hl,s=hl;function f(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(yl),t}function l(n){var e=i[n.depth],r=n.x0+e,f=n.y0+e,l=n.x1-e,h=n.y1-e;l<r&&(r=l=(r+l)/2),h<f&&(f=h=(f+h)/2),n.x0=r,n.y0=f,n.x1=l,n.y1=h,n.children&&(e=i[n.depth+1]=o(n)/2,r+=s(n)-e,f+=u(n)-e,(l-=a(n)-e)<r&&(r=l=(r+l)/2),(h-=c(n)-e)<f&&(f=h=(f+h)/2),t(n,r,f,l,h))}return f.round=function(t){return arguments.length?(n=!!t,f):n},f.size=function(t){return arguments.length?(e=+t[0],r=+t[1],f):[e,r]},f.tile=function(n){return arguments.length?(t=ll(n),f):t},f.padding=function(t){return arguments.length?f.paddingInner(t).paddingOuter(t):f.paddingInner()},f.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:pl(+t),f):o},f.paddingOuter=function(t){return arguments.length?f.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):f.paddingTop()},f.paddingTop=function(t){return arguments.length?(u="function"==typeof t?t:pl(+t),f):u},f.paddingRight=function(t){return arguments.length?(a="function"==typeof t?t:pl(+t),f):a},f.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:pl(+t),f):c},f.paddingLeft=function(t){return arguments.length?(s="function"==typeof t?t:pl(+t),f):s},f},t.treemapBinary=function(t,n,e,r,i){var o,u,a=t.children,c=a.length,s=new Array(c+1);for(s[0]=u=o=0;o<c;++o)s[o+1]=u+=a[o].value;!function t(n,e,r,i,o,u,c){if(n>=e-1){var f=a[n];return f.x0=i,f.y0=o,f.x1=u,void(f.y1=c)}for(var l=s[n],h=r/2+l,p=n+1,d=e-1;p<d;){var v=p+d>>>1;s[v]<h?p=v+1:d=v}h-s[p-1]<s[p]-h&&n+1<p&&--p;var g=s[p]-l,_=r-g;if(u-i>c-o){var y=(i*_+u*g)/r;t(n,p,g,i,o,y,c),t(p,e,_,y,o,u,c)}else{var m=(o*_+c*g)/r;t(n,p,g,i,o,u,m),t(p,e,_,i,m,u,c)}}(0,c,t.value,n,e,r,i)},t.treemapDice=ml,t.treemapSlice=Cl,t.treemapSliceDice=function(t,n,e,r,i){(1&t.depth?Cl:ml)(t,n,e,r,i)},t.treemapSquarify=Rl,t.treemapResquarify=Ll,t.interpolate=Ye,t.interpolateArray=Le,t.interpolateBasis=Te,t.interpolateBasisClosed=Ne,t.interpolateDate=qe,t.interpolateNumber=De,t.interpolateObject=Ue,t.interpolateRound=Be,t.interpolateString=Ie,t.interpolateTransformCss=Qe,t.interpolateTransformSvg=Je,t.interpolateZoom=nr,t.interpolateRgb=Ce,t.interpolateRgbBasis=Pe,t.interpolateRgbBasisClosed=Re,t.interpolateHsl=rr,t.interpolateHslLong=ir,t.interpolateLab=function(t,n){var e=Ae((t=re(t)).l,(n=re(n)).l),r=Ae(t.a,n.a),i=Ae(t.b,n.b),o=Ae(t.opacity,n.opacity);return function(n){return t.l=e(n),t.a=r(n),t.b=i(n),t.opacity=o(n),t+""}},t.interpolateHcl=ur,t.interpolateHclLong=ar,t.interpolateCubehelix=lr,t.interpolateCubehelixLong=hr,t.quantize=function(t,n){for(var e=new Array(n),r=0;r<n;++r)e[r]=t(r/(n-1));return e},t.path=po,t.polygonArea=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e<r;)n=i,i=t[e],o+=n[1]*i[0]-n[0]*i[1];return o/2},t.polygonCentroid=function(t){for(var n,e,r=-1,i=t.length,o=0,u=0,a=t[i-1],c=0;++r<i;)n=a,a=t[r],c+=e=n[0]*a[1]-a[0]*n[1],o+=(n[0]+a[0])*e,u+=(n[1]+a[1])*e;return[o/(c*=3),u/c]},t.polygonHull=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n<e;++n)r[n]=[+t[n][0],+t[n][1],n];for(r.sort(Dl),n=0;n<e;++n)i[n]=[r[n][0],-r[n][1]];var o=Ul(r),u=Ul(i),a=u[0]===o[0],c=u[u.length-1]===o[o.length-1],s=[];for(n=o.length-1;n>=0;--n)s.push(t[r[o[n]][2]]);for(n=+a;n<u.length-c;++n)s.push(t[r[u[n]][2]]);return s},t.polygonContains=function(t,n){for(var e,r,i=t.length,o=t[i-1],u=n[0],a=n[1],c=o[0],s=o[1],f=!1,l=0;l<i;++l)e=(o=t[l])[0],(r=o[1])>a!=s>a&&u<(c-e)*(a-r)/(s-r)+e&&(f=!f),c=e,s=r;return f},t.polygonLength=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],c=0;++r<i;)n=u,e=a,n-=u=(o=t[r])[0],e-=a=o[1],c+=Math.sqrt(n*n+e*e);return c},t.quadtree=Go,t.queue=Xl,t.randomUniform=Wl,t.randomNormal=$l,t.randomLogNormal=Zl,t.randomBates=Ql,t.randomIrwinHall=Gl,t.randomExponential=Jl,t.request=Kl,t.html=nh,t.json=eh,t.text=rh,t.xml=ih,t.csv=ah,t.tsv=ch,t.scaleBand=dh,t.scalePoint=function(){return vh(dh().paddingInner(1))},t.scaleIdentity=function t(){var n=[0,1];function e(t){return+t}return e.invert=e,e.domain=e.range=function(t){return arguments.length?(n=fh.call(t,_h),e):n.slice()},e.copy=function(){return t().domain(n)},Th(e)},t.scaleLinear=function t(){var n=Mh(mh,De);return n.copy=function(){return wh(n,t())},Th(n)},t.scaleLog=function n(){var e=Mh(kh,Sh).domain([1,10]),r=e.domain,i=10,o=Ch(10),u=Ah(10);function a(){return o=Ch(i),u=Ah(i),r()[0]<0&&(o=zh(o),u=zh(u)),e}return e.base=function(t){return arguments.length?(i=+t,a()):i},e.domain=function(t){return arguments.length?(r(t),a()):r()},e.ticks=function(t){var n,e=r(),a=e[0],c=e[e.length-1];(n=c<a)&&(h=a,a=c,c=h);var s,f,l,h=o(a),p=o(c),d=null==t?10:+t,v=[];if(!(i%1)&&p-h<d){if(h=Math.round(h)-1,p=Math.round(p)+1,a>0){for(;h<p;++h)for(f=1,s=u(h);f<i;++f)if(!((l=s*f)<a)){if(l>c)break;v.push(l)}}else for(;h<p;++h)for(f=i-1,s=u(h);f>=1;--f)if(!((l=s*f)<a)){if(l>c)break;v.push(l)}}else v=x(h,p,Math.min(p-h,d)).map(u);return n?v.reverse():v},e.tickFormat=function(n,r){if(null==r&&(r=10===i?".0e":","),"function"!=typeof r&&(r=t.format(r)),n===1/0)return r;null==n&&(n=10);var a=Math.max(1,i*n/e.ticks().length);return function(t){var n=t/u(Math.round(o(t)));return n*i<i-.5&&(n*=i),n<=a?r(t):""}},e.nice=function(){return r(Nh(r(),{floor:function(t){return u(Math.floor(o(t)))},ceil:function(t){return u(Math.ceil(o(t)))}}))},e.copy=function(){return wh(e,n().base(i))},e},t.scaleOrdinal=ph,t.scaleImplicit=hh,t.scalePow=Rh,t.scaleSqrt=function(){return Rh().exponent(.5)},t.scaleQuantile=function t(){var e=[],r=[],o=[];function u(){var t=0,n=Math.max(1,r.length);for(o=new Array(n-1);++t<n;)o[t-1]=T(e,t/n);return a}function a(t){if(!isNaN(t=+t))return r[i(o,t)]}return a.invertExtent=function(t){var n=r.indexOf(t);return n<0?[NaN,NaN]:[n>0?o[n-1]:e[0],n<o.length?o[n]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var r,i=0,o=t.length;i<o;++i)null==(r=t[i])||isNaN(r=+r)||e.push(r);return e.sort(n),u()},a.range=function(t){return arguments.length?(r=lh.call(t),u()):r.slice()},a.quantiles=function(){return o.slice()},a.copy=function(){return t().domain(e).range(r)},a},t.scaleQuantize=function t(){var n=0,e=1,r=1,o=[.5],u=[0,1];function a(t){if(t<=t)return u[i(o,t,0,r)]}function c(){var t=-1;for(o=new Array(r);++t<r;)o[t]=((t+1)*e-(t-r)*n)/(r+1);return a}return a.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],c()):[n,e]},a.range=function(t){return arguments.length?(r=(u=lh.call(t)).length-1,c()):u.slice()},a.invertExtent=function(t){var i=u.indexOf(t);return i<0?[NaN,NaN]:i<1?[n,o[0]]:i>=r?[o[r-1],e]:[o[i-1],o[i]]},a.copy=function(){return t().domain([n,e]).range(u)},Th(a)},t.scaleThreshold=function t(){var n=[.5],e=[0,1],r=1;function o(t){if(t<=t)return e[i(n,t,0,r)]}return o.domain=function(t){return arguments.length?(n=lh.call(t),r=Math.min(n.length,e.length-1),o):n.slice()},o.range=function(t){return arguments.length?(e=lh.call(t),r=Math.min(n.length,e.length-1),o):e.slice()},o.invertExtent=function(t){var r=e.indexOf(t);return[n[r-1],n[r]]},o.copy=function(){return t().domain(n).range(e)},o},t.scaleTime=function(){return fv(vp,pp,Kh,Gh,$h,Vh,jh,Uh,t.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)])},t.scaleUtc=function(){return fv(Ip,Op,Tp,bp,mp,_p,jh,Uh,t.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)])},t.schemeCategory10=hv,t.schemeCategory20b=pv,t.schemeCategory20c=dv,t.schemeCategory20=vv,t.interpolateCubehelixDefault=gv,t.interpolateRainbow=function(t){(t<0||t>1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return mv.h=360*t-100,mv.s=1.5-1.5*n,mv.l=.8-.9*n,mv+""},t.interpolateWarm=_v,t.interpolateCool=yv,t.interpolateViridis=bv,t.interpolateMagma=wv,t.interpolateInferno=Mv,t.interpolatePlasma=Tv,t.scaleSequential=function t(n){var e=0,r=1,i=!1;function o(t){var o=(t-e)/(r-e);return n(i?Math.max(0,Math.min(1,o)):o)}return o.domain=function(t){return arguments.length?(e=+t[0],r=+t[1],o):[e,r]},o.clamp=function(t){return arguments.length?(i=!!t,o):i},o.interpolator=function(t){return arguments.length?(n=t,o):n},o.copy=function(){return t(n).domain([e,r]).clamp(i)},Th(o)},t.create=function(t){return en(Z(t).call(document.documentElement))},t.creator=Z,t.local=on,t.matcher=rt,t.mouse=sn,t.namespace=V,t.namespaces=X,t.clientPoint=cn,t.select=en,t.selectAll=function(t){return"string"==typeof t?new tn([document.querySelectorAll(t)],[document.documentElement]):new tn([null==t?[]:t],Kt)},t.selection=nn,t.selector=Q,t.selectorAll=K,t.style=mt,t.touch=fn,t.touches=function(t,n){null==n&&(n=an().touches);for(var e=0,r=n?n.length:0,i=new Array(r);e<r;++e)i[e]=cn(t,n[e]);return i},t.window=vt,t.customEvent=Zt,t.arc=function(){var t=Fv,n=Iv,e=Nv(0),r=null,i=Yv,o=Bv,u=Hv,a=null;function c(){var c,s,f=+t.apply(this,arguments),l=+n.apply(this,arguments),h=i.apply(this,arguments)-qv,p=o.apply(this,arguments)-qv,d=kv(p-h),v=p>h;if(a||(a=c=po()),l<f&&(s=l,l=f,f=s),l>Rv)if(d>Dv-Rv)a.moveTo(l*Ev(h),l*zv(h)),a.arc(0,0,l,h,p,!v),f>Rv&&(a.moveTo(f*Ev(p),f*zv(p)),a.arc(0,0,f,p,h,v));else{var g,_,y=h,m=p,x=h,b=p,w=d,M=d,T=u.apply(this,arguments)/2,N=T>Rv&&(r?+r.apply(this,arguments):Pv(f*f+l*l)),k=Cv(kv(l-f)/2,+e.apply(this,arguments)),S=k,E=k;if(N>Rv){var A=Ov(N/f*zv(T)),C=Ov(N/l*zv(T));(w-=2*A)>Rv?(x+=A*=v?1:-1,b-=A):(w=0,x=b=(h+p)/2),(M-=2*C)>Rv?(y+=C*=v?1:-1,m-=C):(M=0,y=m=(h+p)/2)}var z=l*Ev(y),P=l*zv(y),R=f*Ev(b),L=f*zv(b);if(k>Rv){var q=l*Ev(m),D=l*zv(m),U=f*Ev(x),O=f*zv(x);if(d<Lv){var F=w>Rv?jv(z,P,U,O,q,D,R,L):[R,L],I=z-F[0],Y=P-F[1],B=q-F[0],H=D-F[1],j=1/zv(Uv((I*B+Y*H)/(Pv(I*I+Y*Y)*Pv(B*B+H*H)))/2),X=Pv(F[0]*F[0]+F[1]*F[1]);S=Cv(k,(f-X)/(j-1)),E=Cv(k,(l-X)/(j+1))}}M>Rv?E>Rv?(g=Xv(U,O,z,P,l,E,v),_=Xv(q,D,R,L,l,E,v),a.moveTo(g.cx+g.x01,g.cy+g.y01),E<k?a.arc(g.cx,g.cy,E,Sv(g.y01,g.x01),Sv(_.y01,_.x01),!v):(a.arc(g.cx,g.cy,E,Sv(g.y01,g.x01),Sv(g.y11,g.x11),!v),a.arc(0,0,l,Sv(g.cy+g.y11,g.cx+g.x11),Sv(_.cy+_.y11,_.cx+_.x11),!v),a.arc(_.cx,_.cy,E,Sv(_.y11,_.x11),Sv(_.y01,_.x01),!v))):(a.moveTo(z,P),a.arc(0,0,l,y,m,!v)):a.moveTo(z,P),f>Rv&&w>Rv?S>Rv?(g=Xv(R,L,q,D,f,-S,v),_=Xv(z,P,U,O,f,-S,v),a.lineTo(g.cx+g.x01,g.cy+g.y01),S<k?a.arc(g.cx,g.cy,S,Sv(g.y01,g.x01),Sv(_.y01,_.x01),!v):(a.arc(g.cx,g.cy,S,Sv(g.y01,g.x01),Sv(g.y11,g.x11),!v),a.arc(0,0,f,Sv(g.cy+g.y11,g.cx+g.x11),Sv(_.cy+_.y11,_.cx+_.x11),v),a.arc(_.cx,_.cy,S,Sv(_.y11,_.x11),Sv(_.y01,_.x01),!v))):a.arc(0,0,f,b,x,v):a.lineTo(R,L)}else a.moveTo(0,0);if(a.closePath(),c)return a=null,c+""||null}return c.centroid=function(){var e=(+t.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Lv/2;return[Ev(r)*e,zv(r)*e]},c.innerRadius=function(n){return arguments.length?(t="function"==typeof n?n:Nv(+n),c):t},c.outerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Nv(+t),c):n},c.cornerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Nv(+t),c):e},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Nv(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Nv(+t),c):i},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Nv(+t),c):o},c.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:Nv(+t),c):u},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c},t.area=Qv,t.line=Gv,t.pie=function(){var t=Kv,n=Jv,e=null,r=Nv(0),i=Nv(Dv),o=Nv(0);function u(u){var a,c,s,f,l,h=u.length,p=0,d=new Array(h),v=new Array(h),g=+r.apply(this,arguments),_=Math.min(Dv,Math.max(-Dv,i.apply(this,arguments)-g)),y=Math.min(Math.abs(_)/h,o.apply(this,arguments)),m=y*(_<0?-1:1);for(a=0;a<h;++a)(l=v[d[a]=a]=+t(u[a],a,u))>0&&(p+=l);for(null!=n?d.sort((function(t,e){return n(v[t],v[e])})):null!=e&&d.sort((function(t,n){return e(u[t],u[n])})),a=0,s=p?(_-h*m)/p:0;a<h;++a,g=f)c=d[a],f=g+((l=v[c])>0?l*s:0)+m,v[c]={data:u[c],index:a,value:l,startAngle:g,endAngle:f,padAngle:y};return v}return u.value=function(n){return arguments.length?(t="function"==typeof n?n:Nv(+n),u):t},u.sortValues=function(t){return arguments.length?(n=t,e=null,u):n},u.sort=function(t){return arguments.length?(e=t,n=null,u):e},u.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Nv(+t),u):r},u.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Nv(+t),u):i},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Nv(+t),u):o},u},t.areaRadial=og,t.radialArea=og,t.lineRadial=ig,t.radialLine=ig,t.pointRadial=ug,t.linkHorizontal=function(){return fg(lg)},t.linkVertical=function(){return fg(hg)},t.linkRadial=function(){var t=fg(pg);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t},t.symbol=function(){var t=Nv(dg),n=Nv(64),e=null;function r(){var r;if(e||(e=r=po()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),r)return e=null,r+""||null}return r.type=function(n){return arguments.length?(t="function"==typeof n?n:Nv(n),r):t},r.size=function(t){return arguments.length?(n="function"==typeof t?t:Nv(+t),r):n},r.context=function(t){return arguments.length?(e=null==t?null:t,r):e},r},t.symbols=zg,t.symbolCircle=dg,t.symbolCross=vg,t.symbolDiamond=yg,t.symbolSquare=Mg,t.symbolStar=wg,t.symbolTriangle=Ng,t.symbolWye=Cg,t.curveBasisClosed=function(t){return new qg(t)},t.curveBasisOpen=function(t){return new Dg(t)},t.curveBasis=function(t){return new Lg(t)},t.curveBundle=Og,t.curveCardinalClosed=Hg,t.curveCardinalOpen=Xg,t.curveCardinal=Yg,t.curveCatmullRomClosed=Gg,t.curveCatmullRomOpen=Jg,t.curveCatmullRom=$g,t.curveLinearClosed=function(t){return new Kg(t)},t.curveLinear=Wv,t.curveMonotoneX=function(t){return new i_(t)},t.curveMonotoneY=function(t){return new o_(t)},t.curveNatural=function(t){return new a_(t)},t.curveStep=function(t){return new s_(t,.5)},t.curveStepAfter=function(t){return new s_(t,1)},t.curveStepBefore=function(t){return new s_(t,0)},t.stack=function(){var t=Nv([]),n=l_,e=f_,r=h_;function i(i){var o,u,a=t.apply(this,arguments),c=i.length,s=a.length,f=new Array(s);for(o=0;o<s;++o){for(var l,h=a[o],p=f[o]=new Array(c),d=0;d<c;++d)p[d]=l=[0,+r(i[d],h,d,i)],l.data=i[d];p.key=h}for(o=0,u=n(f);o<s;++o)f[u[o]].index=o;return e(f,u),f}return i.keys=function(n){return arguments.length?(t="function"==typeof n?n:Nv(ag.call(n)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Nv(+t),i):r},i.order=function(t){return arguments.length?(n=null==t?l_:"function"==typeof t?t:Nv(ag.call(t)),i):n},i.offset=function(t){return arguments.length?(e=null==t?f_:t,i):e},i},t.stackOffsetExpand=function(t,n){if((r=t.length)>0){for(var e,r,i,o=0,u=t[0].length;o<u;++o){for(i=e=0;e<r;++e)i+=t[e][o][1]||0;if(i)for(e=0;e<r;++e)t[e][o][1]/=i}f_(t,n)}},t.stackOffsetDiverging=function(t,n){if((a=t.length)>1)for(var e,r,i,o,u,a,c=0,s=t[n[0]].length;c<s;++c)for(o=u=0,e=0;e<a;++e)(i=(r=t[n[e]][c])[1]-r[0])>=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):r[0]=o},t.stackOffsetNone=f_,t.stackOffsetSilhouette=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r<o;++r){for(var u=0,a=0;u<e;++u)a+=t[u][r][1]||0;i[r][1]+=i[r][0]=-a/2}f_(t,n)}},t.stackOffsetWiggle=function(t,n){if((i=t.length)>0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;u<r;++u){for(var a=0,c=0,s=0;a<i;++a){for(var f=t[n[a]],l=f[u][1]||0,h=(l-(f[u-1][1]||0))/2,p=0;p<a;++p){var d=t[n[p]];h+=(d[u][1]||0)-(d[u-1][1]||0)}c+=l,s+=h*l}e[u-1][1]+=e[u-1][0]=o,c&&(o-=s/c)}e[u-1][1]+=e[u-1][0]=o,f_(t,n)}},t.stackOrderAscending=p_,t.stackOrderDescending=function(t){return p_(t).reverse()},t.stackOrderInsideOut=function(t){var n,e,r=t.length,i=t.map(d_),o=l_(t).sort((function(t,n){return i[n]-i[t]})),u=0,a=0,c=[],s=[];for(n=0;n<r;++n)e=o[n],u<a?(u+=i[e],c.push(e)):(a+=i[e],s.push(e));return s.reverse().concat(c)},t.stackOrderNone=l_,t.stackOrderReverse=function(t){return l_(t).reverse()},t.timeInterval=Dh,t.timeMillisecond=Uh,t.timeMilliseconds=Oh,t.utcMillisecond=Uh,t.utcMilliseconds=Oh,t.timeSecond=jh,t.timeSeconds=Xh,t.utcSecond=jh,t.utcSeconds=Xh,t.timeMinute=Vh,t.timeMinutes=Wh,t.timeHour=$h,t.timeHours=Zh,t.timeDay=Gh,t.timeDays=Qh,t.timeWeek=Kh,t.timeWeeks=up,t.timeSunday=Kh,t.timeSundays=up,t.timeMonday=tp,t.timeMondays=ap,t.timeTuesday=np,t.timeTuesdays=cp,t.timeWednesday=ep,t.timeWednesdays=sp,t.timeThursday=rp,t.timeThursdays=fp,t.timeFriday=ip,t.timeFridays=lp,t.timeSaturday=op,t.timeSaturdays=hp,t.timeMonth=pp,t.timeMonths=dp,t.timeYear=vp,t.timeYears=gp,t.utcMinute=_p,t.utcMinutes=yp,t.utcHour=mp,t.utcHours=xp,t.utcDay=bp,t.utcDays=wp,t.utcWeek=Tp,t.utcWeeks=zp,t.utcSunday=Tp,t.utcSundays=zp,t.utcMonday=Np,t.utcMondays=Pp,t.utcTuesday=kp,t.utcTuesdays=Rp,t.utcWednesday=Sp,t.utcWednesdays=Lp,t.utcThursday=Ep,t.utcThursdays=qp,t.utcFriday=Ap,t.utcFridays=Dp,t.utcSaturday=Cp,t.utcSaturdays=Up,t.utcMonth=Op,t.utcMonths=Fp,t.utcYear=Ip,t.utcYears=Yp,t.timeFormatDefaultLocale=rv,t.timeFormatLocale=Xp,t.isoFormat=ov,t.isoParse=uv,t.now=br,t.timer=Tr,t.timerFlush=Nr,t.timeout=Ar,t.interval=function(t,n,e){var r=new Mr,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?br():+e,r.restart((function o(u){u+=i,r.restart(o,i+=n,e),t(u)}),n,e),r)},t.transition=oi,t.active=function(t,n){var e,r,i=t.__transition;if(i)for(r in n=null==n?null:n+"",i)if((e=i[r]).state>1&&e.name===n)return new ii([[t]],Ci,n,+r);return null},t.interrupt=Dr,t.voronoi=function(){var t=g_,n=__,e=null;function r(r){return new J_(r.map((function(e,i){var o=[Math.round(t(e,i,r)/$_)*$_,Math.round(n(e,i,r)/$_)*$_];return o.index=i,o.data=e,o})),e)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(n){return arguments.length?(t="function"==typeof n?n:v_(+n),r):t},r.y=function(t){return arguments.length?(n="function"==typeof t?t:v_(+t),r):n},r.extent=function(t){return arguments.length?(e=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):e&&[[e[0][0],e[0][1]],[e[1][0],e[1][1]]]},r.size=function(t){return arguments.length?(e=null==t?null:[[0,0],[+t[0],+t[1]]],r):e&&[e[1][0]-e[0][0],e[1][1]-e[0][1]]},r},t.zoom=function(){var n,e,r=uy,i=ay,o=ly,u=sy,a=fy,c=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],f=250,l=nr,h=[],p=F("start","zoom","end"),d=500,v=0;function g(t){t.property("__zoom",cy).on("wheel.zoom",M).on("mousedown.zoom",T).on("dblclick.zoom",N).filter(a).on("touchstart.zoom",k).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function _(t,n){return(n=Math.max(c[0],Math.min(c[1],n)))===t.k?t:new ny(n,t.x,t.y)}function y(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ny(t.k,r,i)}function m(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,n,e){t.on("start.zoom",(function(){b(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){b(this,arguments).end()})).tween("zoom",(function(){var t=this,r=arguments,o=b(t,r),u=i.apply(t,r),a=e||m(u),c=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),s=t.__zoom,f="function"==typeof n?n.apply(t,r):n,h=l(s.invert(a).concat(c/s.k),f.invert(a).concat(c/f.k));return function(t){if(1===t)t=f;else{var n=h(t),e=c/n[2];t=new ny(e,a[0]-n[0]*e,a[1]-n[1]*e)}o.zoom(null,t)}}))}function b(t,n){for(var e,r=0,i=h.length;r<i;++r)if((e=h[r]).that===t)return e;return new w(t,n)}function w(t,n){this.that=t,this.args=n,this.index=-1,this.active=0,this.extent=i.apply(t,n)}function M(){if(r.apply(this,arguments)){var t=b(this,arguments),n=this.__zoom,e=Math.max(c[0],Math.min(c[1],n.k*Math.pow(2,u.apply(this,arguments)))),i=sn(this);if(t.wheel)t.mouse[0][0]===i[0]&&t.mouse[0][1]===i[1]||(t.mouse[1]=n.invert(t.mouse[0]=i)),clearTimeout(t.wheel);else{if(n.k===e)return;t.mouse=[i,n.invert(i)],Dr(this),t.start()}oy(),t.wheel=setTimeout(a,150),t.zoom("mouse",o(y(_(n,e),t.mouse[0],t.mouse[1]),t.extent,s))}function a(){t.wheel=null,t.end()}}function T(){if(!e&&r.apply(this,arguments)){var n=b(this,arguments),i=en(t.event.view).on("mousemove.zoom",f,!0).on("mouseup.zoom",l,!0),u=sn(this),a=t.event.clientX,c=t.event.clientY;pn(t.event.view),iy(),n.mouse=[u,this.__zoom.invert(u)],Dr(this),n.start()}function f(){if(oy(),!n.moved){var e=t.event.clientX-a,r=t.event.clientY-c;n.moved=e*e+r*r>v}n.zoom("mouse",o(y(n.that.__zoom,n.mouse[0]=sn(n.that),n.mouse[1]),n.extent,s))}function l(){i.on("mousemove.zoom mouseup.zoom",null),dn(t.event.view,n.moved),oy(),n.end()}}function N(){if(r.apply(this,arguments)){var n=this.__zoom,e=sn(this),u=n.invert(e),a=n.k*(t.event.shiftKey?.5:2),c=o(y(_(n,a),e,u),i.apply(this,arguments),s);oy(),f>0?en(this).transition().duration(f).call(x,c,e):en(this).call(g.transform,c)}}function k(){if(r.apply(this,arguments)){var e,i,o,u,a=b(this,arguments),c=t.event.changedTouches,s=c.length;for(iy(),i=0;i<s;++i)u=[u=fn(this,c,(o=c[i]).identifier),this.__zoom.invert(u),o.identifier],a.touch0?a.touch1||(a.touch1=u):(a.touch0=u,e=!0);if(n&&(n=clearTimeout(n),!a.touch1))return a.end(),void((u=en(this).on("dblclick.zoom"))&&u.apply(this,arguments));e&&(n=setTimeout((function(){n=null}),d),Dr(this),a.start())}}function S(){var e,r,i,u,a=b(this,arguments),c=t.event.changedTouches,f=c.length;for(oy(),n&&(n=clearTimeout(n)),e=0;e<f;++e)i=fn(this,c,(r=c[e]).identifier),a.touch0&&a.touch0[2]===r.identifier?a.touch0[0]=i:a.touch1&&a.touch1[2]===r.identifier&&(a.touch1[0]=i);if(r=a.that.__zoom,a.touch1){var l=a.touch0[0],h=a.touch0[1],p=a.touch1[0],d=a.touch1[1],v=(v=p[0]-l[0])*v+(v=p[1]-l[1])*v,g=(g=d[0]-h[0])*g+(g=d[1]-h[1])*g;r=_(r,Math.sqrt(v/g)),i=[(l[0]+p[0])/2,(l[1]+p[1])/2],u=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!a.touch0)return;i=a.touch0[0],u=a.touch0[1]}a.zoom("touch",o(y(r,i,u),a.extent,s))}function E(){var n,r,i=b(this,arguments),o=t.event.changedTouches,u=o.length;for(iy(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),d),n=0;n<u;++n)r=o[n],i.touch0&&i.touch0[2]===r.identifier?delete i.touch0:i.touch1&&i.touch1[2]===r.identifier&&delete i.touch1;i.touch1&&!i.touch0&&(i.touch0=i.touch1,delete i.touch1),i.touch0?i.touch0[1]=this.__zoom.invert(i.touch0[0]):i.end()}return g.transform=function(t,n){var e=t.selection?t.selection():t;e.property("__zoom",cy),t!==e?x(t,n):e.interrupt().each((function(){b(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()}))},g.scaleBy=function(t,n){g.scaleTo(t,(function(){var t=this.__zoom.k,e="function"==typeof n?n.apply(this,arguments):n;return t*e}))},g.scaleTo=function(t,n){g.transform(t,(function(){var t=i.apply(this,arguments),e=this.__zoom,r=m(t),u=e.invert(r),a="function"==typeof n?n.apply(this,arguments):n;return o(y(_(e,a),r,u),t,s)}))},g.translateBy=function(t,n,e){g.transform(t,(function(){return o(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),i.apply(this,arguments),s)}))},g.translateTo=function(t,n,e){g.transform(t,(function(){var t=i.apply(this,arguments),r=this.__zoom,u=m(t);return o(ey.translate(u[0],u[1]).scale(r.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof e?-e.apply(this,arguments):-e),t,s)}))},w.prototype={start:function(){return 1==++this.active&&(this.index=h.push(this)-1,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(h.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){Zt(new ty(g,t,this.that.__zoom),p.apply,p,[t,this.that,this.args])}},g.wheelDelta=function(t){return arguments.length?(u="function"==typeof t?t:K_(+t),g):u},g.filter=function(t){return arguments.length?(r="function"==typeof t?t:K_(!!t),g):r},g.touchable=function(t){return arguments.length?(a="function"==typeof t?t:K_(!!t),g):a},g.extent=function(t){return arguments.length?(i="function"==typeof t?t:K_([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):i},g.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],g):[c[0],c[1]]},g.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],g):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},g.constrain=function(t){return arguments.length?(o=t,g):o},g.duration=function(t){return arguments.length?(f=+t,g):f},g.interpolate=function(t){return arguments.length?(l=t,g):l},g.on=function(){var t=p.on.apply(p,arguments);return t===p?g:t},g.clickDistance=function(t){return arguments.length?(v=(t=+t)*t,g):Math.sqrt(v)},g},t.zoomTransform=ry,t.zoomIdentity=ey,Object.defineProperty(t,"__esModule",{value:!0})}));