diff --git a/dist/sankey.js b/dist/sankey.js index 2b66762a..a5434238 100644 --- a/dist/sankey.js +++ b/dist/sankey.js @@ -1 +1 @@ -!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.sankey=n():t.sankey=n()}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=51)}({0:function(t,n,e){"use strict";var r=function(t,n){return tn?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}},u=i(r),o=u.right,a=u.left,c=o,f=function(t,n){null==n&&(n=s);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},g=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=k?5:u>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=k?5:u>=T?2:1)}function S(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=k?i*=5:u>=T&&(i*=2),nl;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:s,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},L=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},P=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},R=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},D=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},U=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},F=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u1e-6)if(Math.abs(l*c-f*s)>1e-6&&u){var d=e-o,p=i-a,v=c*c+f*f,g=d*d+p*p,y=Math.sqrt(v),_=Math.sqrt(h),m=u*Math.tan((r-Math.acos((v+h-g)/(2*y*_)))/2),x=m/_,b=m/y;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*s)+","+(n+x*l)),this._+="A"+u+","+u+",0,0,"+ +(l*d>s*p)+","+(this._x1=t+b*c)+","+(this._y1=n+b*f)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,o,a,c){t=+t,n=+n;var f=(e=+e)*Math.cos(o),s=e*Math.sin(o),l=t+f,h=n+s,d=1^c,p=c?o-a:a-o;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%i+i),p>u?this._+="A"+e+","+e+",0,1,"+d+","+(t-f)+","+(n-s)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},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 c=a;e.d(n,"a",(function(){return c}))},2:function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,u=-1,o=t.length;if(null==n)for(;++u=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var f,s,l,h=-1,d=e.length,p=r[i++],v=u(),g=a();++hr.length)return e;var o,a=i[u-1];return null!=n&&u>=r.length?o=e.entries():(o=[],e.each((function(n,e){o.push({key:e,values:t(n,u)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}(o(t,0,f,s),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}}};function a(){return{}}function c(t,n,e){t[n]=e}function f(){return u()}function s(t,n,e){t.set(n,e)}function l(){}var h=u.prototype;function d(t,n){var e=new l;if(t instanceof l)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,a=u.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),u=0;u=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),E.hasOwnProperty(n)?{space:E[n],local:t}:t},S=function(t){var n=N(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===T&&n.documentElement.namespaceURI===T?n.createElement(t):n.createElementNS(e,t)}})(n)};function A(){}var C=function(t){return null==t?A:function(){return this.querySelector(t)}};function z(){return[]}var L=function(t){return null==t?z:function(){return this.querySelectorAll(t)}},O=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var P=document.documentElement;if(!P.matches){var R=P.webkitMatchesSelector||P.msMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector;O=function(t){return function(){return R.call(this,t)}}}}var q=O,j=function(t){return new Array(t.length)};function D(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}D.prototype={constructor:D,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var U="$";function F(t,n,e,r,i,u){for(var o,a=0,c=n.length,f=u.length;an?1:t>=n?0:NaN}var B=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function H(t,n){return t.style.getPropertyValue(n)||B(t).getComputedStyle(t,null).getPropertyValue(n)}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new $(t)}function $(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function W(t,n){for(var e=V(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ut=null;function ot(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ut;ut=r;try{t.call(this,this.__data__,n,e)}finally{ut=i}}}function ct(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r=b&&(b=x+1);!(m=y[b])&&++b=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Y);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):H(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=X(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,u=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),o=u.length;if(!(arguments.length<2)){for(a=n?ft:ct,null==e&&(e=!1),r=0;rl}c.mouse("drag")}function v(){gt(ut.view).on("mousemove.drag mouseup.drag",null),Ct(ut.view,e),St(),c.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ut.changedTouches,r=u.apply(this,arguments),o=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Xt.exec(t))?tn(parseInt(n[1],16)):(n=Vt.exec(t))?new un(n[1],n[2],n[3],1):(n=$t.exec(t))?new un(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Wt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Gt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Zt.exec(t))?on(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?on(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new un(NaN,NaN,NaN,0):null}function tn(t){return new un(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new un(t,n,e,r)}function en(t){return t instanceof Ft||(t=Kt(t)),t?new un((t=t.rgb()).r,t.g,t.b,t.opacity):new un}function rn(t,n,e,r){return 1===arguments.length?en(t):new un(t,n,e,null==r?1:r)}function un(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function on(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new cn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof cn)return new cn(t.h,t.s,t.l,t.opacity);if(t instanceof Ft||(t=Kt(t)),!t)return new cn;if(t instanceof cn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=n===u?(e-r)/a+6*(e0&&c<1?0:o,new cn(o,a,c,t.opacity)}(t):new cn(t,n,e,null==r?1:r)}function cn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Dt(Ft,Kt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Dt(un,rn,Ut(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(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+")")}})),Dt(cn,an,Ut(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cn(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 un(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(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 sn=Math.PI/180,ln=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,gn=6/29,yn=3*gn*gn,_n=gn*gn*gn;function mn(t){if(t instanceof bn)return new bn(t.l,t.a,t.b,t.opacity);if(t instanceof Nn){var n=t.h*sn;return new bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof un||(t=en(t));var e=Tn(t.r),r=Tn(t.g),i=Tn(t.b),u=wn((.4124564*e+.3575761*r+.1804375*i)/hn),o=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new bn(116*o-16,500*(u-o),200*(o-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?mn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>_n?Math.pow(t,1/3):t/yn+vn}function Mn(t){return t>gn?t*t*t:yn*(t-vn)}function kn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Tn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function En(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Nn)return new Nn(t.h,t.c,t.l,t.opacity);t instanceof bn||(t=mn(t));var n=Math.atan2(t.b,t.a)*ln;return new Nn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Nn(t,n,e,null==r?1:r)}function Nn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Dt(bn,xn,Ut(Ft,{brighter:function(t){return new bn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new bn(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=dn*Mn(t),new un(kn(3.2404542*(n=hn*Mn(n))-1.5371385*t-.4985314*(e=pn*Mn(e))),kn(-.969266*n+1.8760108*t+.041556*e),kn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Dt(Nn,En,Ut(Ft,{brighter:function(t){return new Nn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Nn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return mn(this).rgb()}}));var Sn=-.29227,An=-.90649,Cn=1.97294,zn=Cn*An,Ln=1.78277*Cn,On=1.78277*Sn- -.14861*An;function Pn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Rn)return new Rn(t.h,t.s,t.l,t.opacity);t instanceof un||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(On*r+zn*n-Ln*e)/(On+zn-Ln),u=r-i,o=(Cn*(e-i)-Sn*u)/An,a=Math.sqrt(o*o+u*u)/(Cn*i*(1-i)),c=a?Math.atan2(o,u)*ln-120:NaN;return new Rn(c<0?c+360:c,a,i,t.opacity)}(t):new Rn(t,n,e,null==r?1:r)}function Rn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}Dt(Rn,Pn,Ut(Ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*sn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new un(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(Sn*r+An*i)),255*(n+e*(Cn*r)),this.opacity)}}));var jn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],u=t[r+1],o=r>0?t[r-1]:2*i-u,a=r180||e<-180?e-360*Math.round(e/360):e):Un(isNaN(t)?n:t)}function Yn(t,n){var e=n-t;return e?Fn(t,e):Un(isNaN(t)?n:t)}var Bn=function t(n){var e=function(t){return 1==(t=+t)?Yn: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):Un(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),u=e(t.b,n.b),o=Yn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=u(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;eu&&(i=n.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:Kn(e,r)})),u=ee.lastIndex;return u180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,a,c),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,a,c),function(t,n,e,r,u,o){if(t!==e||n!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:Kn(t,e)},{i:a-2,x:Kn(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Se}function Ye(){Oe=(Le=Re.now())+Pe,Se=Ae=0;try{Ie()}finally{Se=0,function(){for(var t,n,e=Me,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:Me=n);ke=t,He(r)}(),Oe=0}}function Be(){var t=Re.now(),n=t-Le;n>ze&&(Pe-=n,Le=t)}function He(t){Se||(Ae&&(Ae=clearTimeout(Ae)),t-Oe>24?(t<1/0&&(Ae=setTimeout(Ye,t-Re.now()-Pe)),Ce&&(Ce=clearInterval(Ce))):(Ce||(Le=Re.now(),Ce=setInterval(Be,ze)),Se=1,qe(Ye)))}Ue.prototype=Fe.prototype={constructor:Ue,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?je():+e)+(null==n?0:+n),this._next||ke===this||(ke?ke._next=this:Me=this,ke=this),this._call=t,this._time=e,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var Xe=function(t,n,e){var r=new Ue;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ve=function(t,n,e){var r=new Ue,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?je():+e,r.restart((function u(o){o+=i,r.restart(u,i+=n,e),t(o)}),n,e),r)},$e=k("start","end","interrupt"),We=[],Ge=0,Ze=1,Qe=2,Je=3,Ke=4,tr=5,nr=6,er=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var f,s,l,h;if(e.state!==Ze)return a();for(f in i)if((h=i[f]).name===e.name){if(h.state===Je)return Xe(u);h.state===Ke?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fGe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=ur(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function ur(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var or=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}(e,t,n))},attr:function(t,n){var e=N(t),r="transform"===e?le:cr;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttributeNS(t.space,t.local))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttribute(t))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttribute(t)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===e?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i;return function(){var u=this.getAttribute(t);return u===e?null:u===r?i:i=n(r=u,e)}})(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=N(t);return this.tween(e,(r.local?function(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(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})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?se:cr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=H(this,t),o=(this.style.removeProperty(t),H(this,t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}(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,u;return function(){var o=H(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=H(this,t)),o===a?null:o===r&&a===i?u:u=n(r=o,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var u=H(this,t);return u===e?null:u===r?i:i=n(r=u,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,function(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}(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}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ur(this.node(),e).tween,u=0,o=i.length;uZe&&e.name===n)return new lr([[t]],ii,n,+r);return null},oi=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ci(){ut.stopImmediatePropagation()}var fi=function(){ut.preventDefault(),ut.stopImmediatePropagation()},si={name:"drag"},li={name:"space"},hi={name:"handle"},di={name:"center"},pi={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]]}},vi={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]]}},gi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},yi={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"},_i={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mi={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},bi={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 Mi(){return!ut.button}function ki(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ti(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ei(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ni(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Si(){return zi(pi)}function Ai(){return zi(vi)}var Ci=function(){return zi(gi)};function zi(t){var n,e=ki,r=Mi,i=k(o,"start","brush","end"),u=6;function o(n){var e=n.property("__brush",l).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yi.overlay).merge(e).each((function(){var t=Ti(this).extent;gt(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])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.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 yi[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",s)}function a(){var t=gt(this),n=Ti(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 c(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 s(){if(ut.touches){if(ut.changedTouches.length0&&(e=i-d),w<0?l=h-p:w>0&&(u=o-p),x=li,R.attr("cursor",yi.selection),D());break;default:return}fi()}),!0).on("keyup.brush",(function(){switch(ut.keyCode){case 16:C&&(g=y=C=!1,D());break;case 18:x===di&&(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi,D());break;case 32:x===li&&(ut.altKey?(b&&(f=s-d*b,e=i+d*b),w&&(l=h-p*w,u=o+p*w),x=di):(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi),R.attr("cursor",yi[m]),D());break;default:return}fi()}),!0).on("mousemove.brush",j,!0).on("mouseup.brush",U,!0);At(ut.view)}ci(),or(_),a.call(_),O.start()}function j(){var t=Mt(_);!C||g||y||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?y=!0:g=!0),L=t,v=!0,fi(),D()}function D(){var t;switch(d=L[0]-z[0],p=L[1]-z[1],x){case li:case si:b&&(d=Math.max(E-e,Math.min(S-f,d)),i=e+d,s=f+d),w&&(p=Math.max(N-u,Math.min(A-l,p)),o=u+p,h=l+p);break;case hi:b<0?(d=Math.max(E-e,Math.min(S-e,d)),i=e+d,s=f):b>0&&(d=Math.max(E-f,Math.min(S-f,d)),i=e,s=f+d),w<0?(p=Math.max(N-u,Math.min(A-u,p)),o=u+p,h=l):w>0&&(p=Math.max(N-l,Math.min(A-l,p)),o=u,h=l+p);break;case di:b&&(i=Math.max(E,Math.min(S,e-d*b)),s=Math.max(E,Math.min(S,f+d*b))),w&&(o=Math.max(N,Math.min(A,u-p*w)),h=Math.max(N,Math.min(A,l+p*w)))}s=u?c=!0:(r=t.charCodeAt(o++))===Ji?f=!0:r===Ki&&(f=!0,t.charCodeAt(o)===Ji&&++o),t.slice(i+1,n-1).replace(/""/g,'"')}for(;o=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,t}var gu=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function yu(t){return t[0]}function _u(t){return t[1]}function mu(t,n,e){var r=new xu(null==n?yu:n,null==e?_u:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function xu(t,n,e,r,i,u){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function bu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var wu=mu.prototype=xu.prototype;function Mu(t){return t.x+t.vx}function ku(t){return t.y+t.vy}wu.copy=function(){var t,n,e=new xu(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=bu(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]=bu(n));return e},wu.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return vu(this.cover(n,e),n,e,t)},wu.addAll=function(t){var n,e,r,i,u=t.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));for(st||t>i||r>n||n>u))return this;var o,a,c=i-e,f=this._root;switch(a=(n<(r+u)/2)<<1|t<(e+i)/2){case 0:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),t>(i=e+c)||n>u);break;case 1:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),(e=i-c)>t||n>u);break;case 2:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),t>(i=e+c)||r>n);break;case 3:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),(e=i-c)>t||r>n)}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=u,this},wu.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},wu.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]]},wu.find=function(t,n,e){var r,i,u,o,a,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new gu(v,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(u=c.y0)>d||(o=c.x1)=y)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=_*_+m*m;if(x=(a=(p+g)/2))?p=a:g=a,(s=o>=(c=(v+y)/2))?v=c:y=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},wu.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||ua.index){var p=c-o.x-o.vx,v=f-o.y-o.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,u=n.length;for(e=new Array(u),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,u,o,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Ru=function(){var t,n,e,r,i=du(-30),u=1,o=1/0,a=.81;function c(r){var i,u=t.length,o=mu(t,Au,Cu).visitAfter(s);for(e=r,i=0;i=o)){(t.data!==n||t.next)&&(0===s&&(d+=(s=pu())*s),0===l&&(d+=(l=pu())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},Fu=function(t){return(t=Uu(Math.abs(t)))?t[1]:NaN},Iu=function(t,n){var e=Uu(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")},Yu={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,u=-1;i0&&(u=0)}return u>0?t.slice(0,u)+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 Iu(100*t,n)},r:Iu,s:function(t,n){var e=Uu(t,n);if(!e)return t+"";var r=e[0],i=e[1],u=i-(zu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+Uu(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Hu(t){return new Xu(t)}function Xu(t){if(!(n=Bu.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",u=n[4]||"",o=!!n[5],a=n[6]&&+n[6],c=!!n[7],f=n[8]&&+n[8].slice(1),s=n[9]||"";"n"===s?(c=!0,s="g"):Yu[s]||(s=""),(o||"0"===e&&"="===r)&&(o=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=u,this.zero=o,this.width=a,this.comma=c,this.precision=f,this.type=s}Hu.prototype=Xu.prototype,Xu.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 Vu,$u,Wu,Gu=function(t){return t},Zu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Qu=function(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}):Gu,i=t.currency,u=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Gu,a=t.percent||"%";function c(t){var n=(t=Hu(t)).fill,e=t.align,c=t.sign,f=t.symbol,s=t.zero,l=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===f?i[0]:"#"===f&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===f?i[1]:/[%p]/.test(p)?a:"",y=Yu[p],_=!p||/[defgprs%]/.test(p);function m(t){var i,a,f,m=v,x=g;if("c"===p)x=y(t)+x,t="";else{var b=(t=+t)<0;if(t=y(Math.abs(t),d),b&&0==+t&&(b=!1),m=(b?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===p?Zu[8+zu/3]:"")+x+(b&&"("===c?")":""),_)for(i=-1,a=t.length;++i(f=t.charCodeAt(i))||f>57){x=(46===f?u+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!s&&(t=r(t,1/0));var w=m.length+t.length+x.length,M=w>1)+m+t+x+M.slice(w);break;default:t=M+m+t+x}return o(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=Hu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Fu(n)/3))),i=Math.pow(10,-r),u=Zu[8+r/3];return function(t){return e(i*t)+u}}}};function Ju(t){return Vu=Qu(t),$u=Vu.format,Wu=Vu.formatPrefix,Vu}Ju({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ku=function(t){return Math.max(0,-Fu(Math.abs(t)))},to=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Fu(n)/3)))-Fu(Math.abs(t)))},no=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Fu(n)-Fu(t))+1},eo=function(){return new ro};function ro(){this.reset()}ro.prototype={constructor:ro,reset:function(){this.s=this.t=0},add:function(t){uo(io,t,this.t),uo(this,io.s,this.s),this.s?this.t+=io.t:this.s=io.t},valueOf:function(){return this.s}};var io=new ro;function uo(t,n,e){var r=t.s=n+e,i=r-n,u=r-i;t.t=n-u+(e-i)}var oo=1e-6,ao=Math.PI,co=ao/2,fo=ao/4,so=2*ao,lo=180/ao,ho=ao/180,po=Math.abs,vo=Math.atan,go=Math.atan2,yo=Math.cos,_o=Math.ceil,mo=Math.exp,xo=(Math.floor,Math.log),bo=Math.pow,wo=Math.sin,Mo=Math.sign||function(t){return t>0?1:t<0?-1:0},ko=Math.sqrt,To=Math.tan;function Eo(t){return t>1?0:t<-1?ao:Math.acos(t)}function No(t){return t>1?co:t<-1?-co:Math.asin(t)}function So(t){return(t=wo(t/2))*t}function Ao(){}function Co(t,n){t&&Lo.hasOwnProperty(t.type)&&Lo[t.type](t,n)}var zo={Feature:function(t,n){Co(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,u=yo(n=(n*=ho)/2+fo),o=wo(n),a=Uo*o,c=Do*u+a*yo(i),f=a*r*wo(i);Io.add(go(f,c)),jo=t,Do=u,Uo=o}var Wo=function(t){return Yo.reset(),Fo(t,Bo),2*Yo};function Go(t){return[go(t[1],t[0]),No(t[2])]}function Zo(t){var n=t[0],e=t[1],r=yo(e);return[r*yo(n),r*wo(n),wo(e)]}function Qo(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Jo(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 Ko(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=ko(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,ua,oa,aa,ca,fa,sa,la,ha=eo(),da={point:pa,lineStart:ga,lineEnd:ya,polygonStart:function(){da.point=_a,da.lineStart=ma,da.lineEnd=xa,ha.reset(),Bo.polygonStart()},polygonEnd:function(){Bo.polygonEnd(),da.point=pa,da.lineStart=ga,da.lineEnd=ya,Io<0?(ea=-(ia=180),ra=-(ua=90)):ha>oo?ua=90:ha<-oo&&(ra=-90),la[0]=ea,la[1]=ia}};function pa(t,n){sa.push(la=[ea=t,ia=t]),nua&&(ua=n)}function va(t,n){var e=Zo([t*ho,n*ho]);if(fa){var r=Jo(fa,e),i=Jo([r[1],-r[0],0],r);na(i),i=Go(i);var u,o=t-oa,a=o>0?1:-1,c=i[0]*lo*a,f=po(o)>180;f^(a*oaua&&(ua=u):f^(a*oa<(c=(c+360)%360-180)&&cua&&(ua=n)),f?tba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>oa?ba(ea,t)>ba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t)}else sa.push(la=[ea=t,ia=t]);nua&&(ua=n),fa=e,oa=t}function ga(){da.point=va}function ya(){la[0]=ea,la[1]=ia,da.point=pa,fa=null}function _a(t,n){if(fa){var e=t-oa;ha.add(po(e)>180?e+(e>0?360:-360):e)}else aa=t,ca=n;Bo.point(t,n),va(t,n)}function ma(){Bo.lineStart()}function xa(){_a(aa,ca),Bo.lineEnd(),po(ha)>oo&&(ea=-(ia=180)),la[0]=ea,la[1]=ia,fa=null}function ba(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ma(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nba(r[0],r[1])&&(r[1]=i[1]),ba(i[0],r[1])>ba(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,n=0,r=u[e=u.length-1];n<=e;r=i,++n)i=u[n],(a=ba(r[1],i[0]))>o&&(o=a,ea=i[0],ia=r[1])}return sa=la=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,ua]]},Ia={sphere:Ao,point:Ya,lineStart:Ha,lineEnd:$a,polygonStart:function(){Ia.lineStart=Wa,Ia.lineEnd=Ga},polygonEnd:function(){Ia.lineStart=Ha,Ia.lineEnd=$a}};function Ya(t,n){t*=ho;var e=yo(n*=ho);Ba(e*yo(t),e*wo(t),wo(n))}function Ba(t,n,e){Ea+=(t-Ea)/++ka,Na+=(n-Na)/ka,Sa+=(e-Sa)/ka}function Ha(){Ia.point=Xa}function Xa(t,n){t*=ho;var e=yo(n*=ho);ja=e*yo(t),Da=e*wo(t),Ua=wo(n),Ia.point=Va,Ba(ja,Da,Ua)}function Va(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=go(ko((o=Da*u-Ua*i)*o+(o=Ua*r-ja*u)*o+(o=ja*i-Da*r)*o),ja*r+Da*i+Ua*u);Ta+=o,Aa+=o*(ja+(ja=r)),Ca+=o*(Da+(Da=i)),za+=o*(Ua+(Ua=u)),Ba(ja,Da,Ua)}function $a(){Ia.point=Ya}function Wa(){Ia.point=Za}function Ga(){Qa(Ra,qa),Ia.point=Ya}function Za(t,n){Ra=t,qa=n,t*=ho,n*=ho,Ia.point=Qa;var e=yo(n);ja=e*yo(t),Da=e*wo(t),Ua=wo(n),Ba(ja,Da,Ua)}function Qa(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=Da*u-Ua*i,a=Ua*r-ja*u,c=ja*i-Da*r,f=ko(o*o+a*a+c*c),s=No(f),l=f&&-s/f;La+=l*o,Oa+=l*a,Pa+=l*c,Ta+=s,Aa+=s*(ja+(ja=r)),Ca+=s*(Da+(Da=i)),za+=s*(Ua+(Ua=u)),Ba(ja,Da,Ua)}var Ja=function(t){ka=Ta=Ea=Na=Sa=Aa=Ca=za=La=Oa=Pa=0,Fo(t,Ia);var n=La,e=Oa,r=Pa,i=n*n+e*e+r*r;return i<1e-12&&(n=Aa,e=Ca,r=za,Taao?t-so:t<-ao?t+so:t,n]}function ec(t,n,e){return(t%=so)?n||e?tc(ic(t),uc(n,e)):ic(t):n||e?uc(n,e):nc}function rc(t){return function(n,e){return[(n+=t)>ao?n-so:n<-ao?n+so:n,e]}}function ic(t){var n=rc(t);return n.invert=rc(-t),n}function uc(t,n){var e=yo(t),r=wo(t),i=yo(n),u=wo(n);function o(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*e+a*r;return[go(c*i-s*u,a*e-f*r),No(s*i+c*u)]}return o.invert=function(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*i-c*u;return[go(c*i+f*u,a*e+s*r),No(s*e-a*r)]},o}nc.invert=nc;var oc=function(t){function n(n){return(n=t(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n}return t=ec(t[0]*ho,t[1]*ho,t.length>2?t[2]*ho:0),n.invert=function(n){return(n=t.invert(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n},n};function ac(t,n,e,r,i,u){if(e){var o=yo(n),a=wo(n),c=r*e;null==i?(i=n+r*so,u=n-c/2):(i=cc(o,i),u=cc(o,u),(r>0?iu)&&(i+=r*so));for(var f,s=i;r>0?s>u:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},lc=function(t,n){return po(t[0]-n[0])=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function pc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,k=M*w,T=k>ao,E=p*x;if(vc.add(go(E*M*wo(k),v*b+E*yo(k))),u+=T?w+M*so:w,T^h>=e^_>=e){var N=Jo(Zo(l),Zo(y));na(N);var S=Jo(i,N);na(S);var A=(T^w>=0?-1:1)*No(S[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=T^w>=0?1:-1)}}return(u<-oo||u0){for(h||(u.polygonStart(),h=!0),u.lineStart(),t=0;t1&&2&i&&f.push(f.pop().concat(f.shift())),a.push(f.filter(_c))}return d}};function _c(t){return t.length>1}function mc(t,n){return((t=t.x)[0]<0?t[1]-co-oo:co-t[1])-((n=n.x)[0]<0?n[1]-co-oo:co-n[1])}var xc=yc((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(u,o){var a=u>0?ao:-ao,c=po(u-e);po(c-ao)0?co:-co),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(u,r),n=0):i!==a&&c>=ao&&(po(e-i)oo?vo((wo(n)*(u=yo(r))*wo(e)-wo(r)*(i=yo(n))*wo(t))/(i*u*o)):(n+r)/2}(e,r,u,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=u,r=o),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*co,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(po(t[0]-n[0])>oo){var u=t[0]0,i=po(n)>oo;function u(t,e){return yo(t)*yo(e)>n}function o(t,e,r){var i=[1,0,0],u=Jo(Zo(t),Zo(e)),o=Qo(u,u),a=u[0],c=o-a*a;if(!c)return!r&&t;var f=n*o/c,s=-n*a/c,l=Jo(i,u),h=ta(i,f);Ko(h,ta(u,s));var d=l,p=Qo(h,d),v=Qo(d,d),g=p*p-v*(Qo(h,h)-1);if(!(g<0)){var y=ko(g),_=ta(d,(-p-y)/v);if(Ko(_,h),_=Go(_),!r)return _;var m,x=t[0],b=e[0],w=t[1],M=e[1];b0^_[1]<(po(_[0]-x)ao^(x<=_[0]&&_[0]<=b)){var E=ta(d,(-p+y)/v);return Ko(E,h),[_,Go(E)]}}}function a(n,e){var i=r?t:ao-t,u=0;return n<-i?u|=1:n>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return yc(u,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=u(l,h),g=r?v?0:a(l,h):v?a(l+(l<0?ao:-ao),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=o(n,p))||lc(n,d)||lc(p,d))&&(p[0]+=oo,p[1]+=oo,v=u(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=o(p,n),t.point(d[0],d[1])):(d=o(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=o(p,n,!0))||(s=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&lc(n,p)||t.point(p[0],p[1]),n=p,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,u){ac(u,t,e,i,n,r)}),r?[0,-t]:[-ao,t-ao])},wc=function(t,n,e,r,i,u){var o,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}},Mc=1e9,kc=-Mc;function Tc(t,n,e,i){function u(r,u){return t<=r&&r<=e&&n<=u&&u<=i}function o(r,u,o,c){var s=0,l=0;if(null==r||(s=a(r,o))!==(l=a(u,o))||f(r,u)<0^o>0)do{c.point(0===s||3===s?t:e,s>1?i:n)}while((s=(s+o+4)%4)!==l);else c.point(u[0],u[1])}function a(r,i){return po(r[0]-t)0?0:3:po(r[0]-e)0?2:1:po(r[1]-n)0?1:0:i>0?3:2}function c(t,n){return f(t.x,n.x)}function f(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var f,s,l,h,d,p,v,g,y,_,m,x=a,b=sc(),w={point:M,lineStart:function(){w.point=k,s&&s.push(l=[]),_=!0,y=!1,v=g=NaN},lineEnd:function(){f&&(k(h,d),p&&y&&b.rejoin(),f.push(b.result())),w.point=M,y&&x.lineEnd()},polygonStart:function(){x=b,f=[],s=[],m=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(h-u)*(i-o)>(d-o)*(t-u)&&++n:d<=i&&(h-u)*(i-o)<(d-o)*(t-u)&&--n;return n}(),e=m&&n,u=(f=Object(r.n)(f)).length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),u&&dc(f,c,n,o,a),a.polygonEnd()),x=a,f=s=l=null}};function M(t,n){u(t,n)&&x.point(t,n)}function k(r,o){var a=u(r,o);if(s&&l.push([r,o]),_)h=r,d=o,p=a,_=!1,a&&(x.lineStart(),x.point(r,o));else if(a&&y)x.point(r,o);else{var c=[v=Math.max(kc,Math.min(Mc,v)),g=Math.max(kc,Math.min(Mc,g))],f=[r=Math.max(kc,Math.min(Mc,r)),o=Math.max(kc,Math.min(Mc,o))];wc(c,f,t,n,e,i)?(y||(x.lineStart(),x.point(c[0],c[1])),x.point(f[0],f[1]),a||x.lineEnd(),m=!1):a&&(x.lineStart(),x.point(r,o),m=!1)}v=r,g=o,y=a}return w}}var Ec,Nc,Sc,Ac=function(){var t,n,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return t&&n===e?t:t=Tc(r,i,u,o)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],t=n=null,e):[[r,i],[u,o]]}}},Cc=eo(),zc={sphere:Ao,point:Ao,lineStart:function(){zc.point=Oc,zc.lineEnd=Lc},lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao};function Lc(){zc.point=zc.lineEnd=Ao}function Oc(t,n){Ec=t*=ho,Nc=wo(n*=ho),Sc=yo(n),zc.point=Pc}function Pc(t,n){t*=ho;var e=wo(n*=ho),r=yo(n),i=po(t-Ec),u=yo(i),o=r*wo(i),a=Sc*e-Nc*r*u,c=Nc*e+Sc*r*u;Cc.add(go(ko(o*o+a*a),c)),Ec=t,Nc=e,Sc=r}var Rc=function(t){return Cc.reset(),Fo(t,zc),+Cc},qc=[null,null],jc={type:"LineString",coordinates:qc},Dc=function(t,n){return qc[0]=t,qc[1]=n,Rc(jc)},Uc={Feature:function(t,n){return Ic(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++roo})).map(f)).concat(Object(r.s)(_o(o/p)*p,u,p).filter((function(t){return po(t%g)>oo})).map(s))}return _.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[l(i).concat(h(a).slice(1),l(e).reverse().slice(1),h(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],c=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),c>a&&(t=c,c=a,a=t),_.precision(y)):[[i,c],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],u=+e[1][1],n>t&&(e=n,n=t,t=e),o>u&&(e=o,o=u,u=e),_.precision(y)):[[n,o],[t,u]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(v=+t[0],g=+t[1],_):[v,g]},_.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],_):[d,p]},_.precision=function(r){return arguments.length?(y=+r,f=Wc(o,u,90),s=Gc(n,t,y),l=Wc(c,a,90),h=Gc(i,e,y),_):y},_.extentMajor([[-180,-90+oo],[180,90-oo]]).extentMinor([[-180,-80-oo],[180,80+oo]])}function Qc(){return Zc()()}var Jc,Kc,tf,nf,ef=function(t,n){var e=t[0]*ho,r=t[1]*ho,i=n[0]*ho,u=n[1]*ho,o=yo(r),a=wo(r),c=yo(u),f=wo(u),s=o*yo(e),l=o*wo(e),h=c*yo(i),d=c*wo(i),p=2*No(ko(So(u-r)+o*c*So(i-e))),v=wo(p),g=p?function(t){var n=wo(t*=p)/v,e=wo(p-t)/v,r=e*s+n*h,i=e*l+n*d,u=e*a+n*f;return[go(i,r)*lo,go(u,ko(r*r+i*i))*lo]}:function(){return[e*lo,r*lo]};return g.distance=p,g},rf=function(t){return t},uf=eo(),of=eo(),af={point:Ao,lineStart:Ao,lineEnd:Ao,polygonStart:function(){af.lineStart=cf,af.lineEnd=lf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Ao,uf.add(po(of)),of.reset()},result:function(){var t=uf/2;return uf.reset(),t}};function cf(){af.point=ff}function ff(t,n){af.point=sf,Jc=tf=t,Kc=nf=n}function sf(t,n){of.add(nf*t-tf*n),tf=t,nf=n}function lf(){sf(Jc,Kc)}var hf,df,pf,vf,gf=af,yf=1/0,_f=yf,mf=-yf,xf=mf,bf={point:function(t,n){tmf&&(mf=t),n<_f&&(_f=n),n>xf&&(xf=n)},lineStart:Ao,lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao,result:function(){var t=[[yf,_f],[mf,xf]];return mf=xf=-(_f=yf=1/0),t}},wf=0,Mf=0,kf=0,Tf=0,Ef=0,Nf=0,Sf=0,Af=0,Cf=0,zf={point:Lf,lineStart:Of,lineEnd:qf,polygonStart:function(){zf.lineStart=jf,zf.lineEnd=Df},polygonEnd:function(){zf.point=Lf,zf.lineStart=Of,zf.lineEnd=qf},result:function(){var t=Cf?[Sf/Cf,Af/Cf]:Nf?[Tf/Nf,Ef/Nf]:kf?[wf/kf,Mf/kf]:[NaN,NaN];return wf=Mf=kf=Tf=Ef=Nf=Sf=Af=Cf=0,t}};function Lf(t,n){wf+=t,Mf+=n,++kf}function Of(){zf.point=Pf}function Pf(t,n){zf.point=Rf,Lf(pf=t,vf=n)}function Rf(t,n){var e=t-pf,r=n-vf,i=ko(e*e+r*r);Tf+=i*(pf+t)/2,Ef+=i*(vf+n)/2,Nf+=i,Lf(pf=t,vf=n)}function qf(){zf.point=Lf}function jf(){zf.point=Uf}function Df(){Ff(hf,df)}function Uf(t,n){zf.point=Ff,Lf(hf=pf=t,df=vf=n)}function Ff(t,n){var e=t-pf,r=n-vf,i=ko(e*e+r*r);Tf+=i*(pf+t)/2,Ef+=i*(vf+n)/2,Nf+=i,Sf+=(i=vf*t-pf*n)*(pf+t),Af+=i*(vf+n),Cf+=3*i,Lf(pf=t,vf=n)}var If=zf;function Yf(t){this._context=t}Yf.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,so)}},result:Ao};var Bf,Hf,Xf,Vf,$f,Wf=eo(),Gf={point:Ao,lineStart:function(){Gf.point=Zf},lineEnd:function(){Bf&&Qf(Hf,Xf),Gf.point=Ao},polygonStart:function(){Bf=!0},polygonEnd:function(){Bf=null},result:function(){var t=+Wf;return Wf.reset(),t}};function Zf(t,n){Gf.point=Qf,Hf=Vf=t,Xf=$f=n}function Qf(t,n){Vf-=t,$f-=n,Wf.add(ko(Vf*Vf+$f*$f)),Vf=t,$f=n}var Jf=Gf;function Kf(){this._string=[]}function ts(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Kf.prototype={_radius:4.5,_circle:ts(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=ts(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}};var ns=function(t,n){var e,r,i=4.5;function u(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Fo(t,e(r))),r.result()}return u.area=function(t){return Fo(t,e(gf)),gf.result()},u.measure=function(t){return Fo(t,e(Jf)),Jf.result()},u.bounds=function(t){return Fo(t,e(bf)),bf.result()},u.centroid=function(t){return Fo(t,e(If)),If.result()},u.projection=function(n){return arguments.length?(e=null==n?(t=null,rf):(t=n).stream,u):t},u.context=function(t){return arguments.length?(r=null==t?(n=null,new Kf):new Yf(n=t),"function"!=typeof i&&r.pointRadius(i),u):n},u.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),u):i},u.projection(t).context(n)},es=function(t){return{stream:rs(t)}};function rs(t){return function(n){var e=new is;for(var r in t)e[r]=t[r];return e.stream=n,e}}function is(){}function us(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Fo(e,t.stream(bf)),n(bf.result()),null!=r&&t.clipExtent(r),t}function os(t,n,e){return us(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+n[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-u*(e[1][1]+e[0][1]))/2;t.scale(150*u).translate([o,a])}),e)}function as(t,n,e){return os(t,[[0,0],n],e)}function cs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];t.scale(150*i).translate([u,o])}),e)}function fs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([u,o])}),e)}is.prototype={constructor:is,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 ss=16,ls=yo(30*ho),hs=function(t,n){return+n?function(t,n){function e(r,i,u,o,a,c,f,s,l,h,d,p,v,g){var y=f-r,_=s-i,m=y*y+_*_;if(m>4*n&&v--){var x=o+h,b=a+d,w=c+p,M=ko(x*x+b*b+w*w),k=No(w/=M),T=po(po(w)-1)n||po((y*A+_*C)/m-.5)>.3||o*h+a*d+c*p2?t[2]%360*ho:0,S()):[g*lo,y*lo,_*lo]},T.precision=function(t){return arguments.length?(k=hs(N,M=t*t),A()):ko(M)},T.fitExtent=function(t,n){return os(T,t,n)},T.fitSize=function(t,n){return as(T,t,n)},T.fitWidth=function(t,n){return cs(T,t,n)},T.fitHeight=function(t,n){return fs(T,t,n)},function(){return n=t.apply(this,arguments),T.invert=n.invert&&E,S()}}function gs(t){var n=0,e=ao/3,r=vs(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*ho,e=t[1]*ho):[n*lo,e*lo]},i}function ys(t,n){var e=wo(t),r=(e+wo(n))/2;if(po(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[o.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-co+oo&&(n=-co+oo):n>co-oo&&(n=co-oo);var e=i/bo(Cs(n),r);return[e*wo(r*t),i-e*yo(r*t)]}return u.invert=function(t,n){var e=i-n,u=Mo(r)*ko(t*t+e*e);return[go(t,po(e))/r*Mo(e),2*vo(bo(i/u,1/r))-co]},u}var Ls=function(){return gs(zs).scale(109.5).parallels([30,30])};function Os(t,n){return[t,n]}Os.invert=Os;var Ps=function(){return ps(Os).scale(152.63)};function Rs(t,n){var e=yo(t),r=t===n?wo(t):(e-yo(n))/(n-t),i=e/r+t;if(po(r)oo&&--i>0);return[t/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var Ys=function(){return ps(Is).scale(175.295)};function Bs(t,n){return[yo(n)*wo(t),wo(n)]}Bs.invert=ws(No);var Hs=function(){return ps(Bs).scale(249.5).clipAngle(90+oo)};function Xs(t,n){var e=yo(n),r=1+yo(t)*e;return[e*wo(t)/r,wo(n)/r]}Xs.invert=ws((function(t){return 2*vo(t)}));var Vs=function(){return ps(Xs).scale(250).clipAngle(142)};function $s(t,n){return[xo(To((co+n)/2)),-t]}$s.invert=function(t,n){return[-n,2*vo(mo(t))-co]};var Ws=function(){var t=As($s),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)};function Gs(t,n){return t.parent===n.parent?1:2}function Zs(t,n){return t+n.x}function Qs(t,n){return Math.max(t,n.y)}var Js=function(){var t=Gs,n=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Zs,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Qs,0)}(e)):(n.x=u?o+=t(n,u):0,n.y=0,u=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),f=a.x-t(a,c)/2,s=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-f)/(s-f)*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};function Ks(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 tl(t,n){var e,r,i,u,o,a=new il(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=nl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new il(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(rl)}function nl(t){return t.children}function el(t){t.data=t.data.data}function rl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function il(t){this.data=t,this.depth=this.height=0,this.parent=null}il.prototype=tl.prototype={constructor:il,count:function(){return this.eachAfter(Ks)},each:function(t){var n,e,r,i,u=this,o=[u];do{for(n=o.reverse(),o=[];u=n.pop();)if(t(u),e=u.children)for(r=0,i=e.length;r=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 tl(this).eachBefore(el)}};var ul=Array.prototype.slice,ol=function(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}(ul.call(t))).length,u=[];r0&&e*e>r*r+i*i}function sl(t,n){for(var e=0;ee*e+r*r}function gl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,u=(n.y*e.r+e.y*n.r)/r;return i*i+u*u}function yl(t){this._=t,this.next=null,this.previous=null}function _l(t){if(!(i=t.length))return 0;var n,e,r,i,u,o,a,c,f,s,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;pl(e,n,r=t[2]),n=new yl(n),e=new yl(e),r=new yl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return u}return e.id=function(n){return arguments.length?(t=xl(n),e):t},e.parentId=function(t){return arguments.length?(n=xl(t),e):n},e};function jl(t,n){return t.parent===n.parent?1:2}function Dl(t){var n=t.children;return n?n[0]:t.t}function Ul(t){var n=t.children;return n?n[n.length-1]:t.t}function Fl(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 Il(t,n,e){return t.a.parent===n.parent?t.a:e}function Yl(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}Yl.prototype=Object.create(il.prototype);var Bl=function(){var t=jl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,u,o=new Yl(t,0),a=[o];n=a.pop();)if(r=n._.children)for(n.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=n.children[i]=new Yl(r[i],i)),e.parent=n;return(o.parent=new Yl(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function u(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,u=i.length;--u>=0;)(n=i[u]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=Ul(a),u=Dl(u),a&&u;)c=Dl(c),(o=Ul(o)).a=n,(i=a.z+l-u.z-f+t(a._,u._))>0&&(Fl(Il(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!Ul(o)&&(o.t=a,o.m+=l-s),u&&!Dl(c)&&(c.t=u,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function o(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},Hl=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),g=s*s*v,(d=Math.max(h/g,g/l))>p){s-=a;break}p=d}y.push(o={value:s,dice:c1?n:1)},e}(Xl),Wl=function(){var t=$l,n=!1,e=1,r=1,i=[0],u=bl,o=bl,a=bl,c=bl,f=bl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Sl),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-u){var _=(i*y+o*g)/r;t(n,d,g,i,u,_,c),t(d,e,y,_,u,o,c)}else{var m=(u*y+c*g)/r;t(n,d,g,i,u,o,m),t(d,e,y,i,m,o,c)}}(0,c,t.value,n,e,r,i)},Zl=function(t,n,e,r,i){(1&t.depth?Hl:Al)(t,n,e,r,i)},Ql=function t(n){function e(t,e,r,i,u){if((o=t._squarify)&&o.ratio===n)for(var o,a,c,f,s,l=-1,h=o.length,d=t.value;++l1?n:1)},e}(Xl),Jl=function(t){for(var n,e=-1,r=t.length,i=t[r-1],u=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[u[n]][2]]);for(n=+a;na!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},uh=function(t){for(var n,e,r=-1,i=t.length,u=t[i-1],o=u[0],a=u[1],c=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new ch(t)}ch.prototype=dh.prototype={constructor:ch,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=oh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),fh(this),this},abort:function(){return null==this._error&&lh(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))},hh(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,hh(this),this}};var ph=function(){return Math.random()},vh=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}(ph),gh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var u;if(null!=r)u=r,r=null;else do{r=2*n()-1,u=2*n()-1,i=r*r+u*u}while(!i||i>1);return t+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(ph),yh=function t(n){function e(){var t=gh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),_h=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,c)}catch(t){return void o.call("error",e,t)}else n=c;o.call("load",e,n)}else o.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){o.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?(u=t,e):u},timeout:function(t){return arguments.length?(l=+t,e):l},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",e)},password:function(t){return arguments.length<1?s:(s=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,f,s),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!=u&&(c.responseType=u),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)})),o.call("beforesend",e,c),c.send(null==i?null:i),e},abort:function(){return c.abort(),e},on:function(){var t=o.on.apply(o,arguments);return t===o?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e},wh=function(t,n){return function(e,r){var i=bh(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Mh=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),kh=wh("application/json",(function(t){return JSON.parse(t.responseText)})),Th=wh("text/plain",(function(t){return t.responseText})),Eh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),Nh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var u=bh(e).mimeType(t);return u.row=function(t){return arguments.length?u.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},u.row(r),i?u.get(i):u}},Sh=Nh("text/csv",ru),Ah=Nh("text/tab-separated-values",cu),Ch=Array.prototype,zh=Ch.map,Lh=Ch.slice,Oh={name:"implicit"};function Ph(t){var n=Object(Wi.c)(),e=[],r=Oh;function i(i){var u=i+"",o=n.get(u);if(!o){if(r!==Oh)return r;n.set(u,o=e.push(i))}return t[(o-1)%t.length]}return t=null==t?[]:Lh.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Wi.c)();for(var r,u,o=-1,a=t.length;++o2?Yh:Ih,r=i=null,s}function s(n){return(r||(r=e(u,o,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 s.invert=function(t){return(i||(i=e(o,u,Fh,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)},s.domain=function(t){return arguments.length?(u=zh.call(t,Dh),f()):u.slice()},s.range=function(t){return arguments.length?(o=Lh.call(t),f()):o.slice()},s.rangeRound=function(t){return o=Lh.call(t),a=ue,f()},s.clamp=function(t){return arguments.length?(c=!!t,f()):c},s.interpolate=function(t){return arguments.length?(a=t,f()):a},f()}var Xh=function(t,n,e){var i,u=t[0],o=t[t.length-1],a=Object(r.A)(u,o,null==n?10:n);switch((e=Hu(null==e?",f":e)).type){case"s":var c=Math.max(Math.abs(u),Math.abs(o));return null!=e.precision||isNaN(i=to(a,c))||(e.precision=i),Wu(e,c);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=no(a,Math.max(Math.abs(u),Math.abs(o))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Ku(a))||(e.precision=i-2*("%"===e.type))}return $u(e)};function Vh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Xh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,u=n(),o=0,a=u.length-1,c=u[o],f=u[a];return f0?(c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i,i=Object(r.z)(c,f,e)):i<0&&(c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i,i=Object(r.z)(c,f,e)),i>0?(u[o]=Math.floor(c/i)*i,u[a]=Math.ceil(f/i)*i,n(u)):i<0&&(u[o]=Math.ceil(c*i)/i,u[a]=Math.floor(f*i)/i,n(u)),t},t}function $h(){var t=Hh(Fh,Kn);return t.copy=function(){return Bh(t,$h())},Vh(t)}function Wh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=zh.call(e,Dh),n):t.slice()},n.copy=function(){return Wh().domain(t)},Vh(n)}var Gh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,u=t[r],o=t[i];return o0){for(;df)break;g.push(h)}}else for(;d=1;--l)if(!((h=s*l)f)break;g.push(h)}}else g=Object(r.B)(d,p,Math.min(p-d,v)).map(u);return o?g.reverse():g},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=$u(r)),n===1/0)return r;null==n&&(n=10);var o=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/u(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[o-1],i[o]]},o.copy=function(){return ad().domain([t,n]).range(u)},Vh(o)}function cd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Lh.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Lh.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return cd().domain(t).range(n)},i}var fd=new Date,sd=new Date;function ld(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-n0))return a;do{a.push(o=new Date(+e)),n(e,u),t(e)}while(o=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 fd.setTime(+n),sd.setTime(+r),t(fd),t(sd),Math.floor(e(fd,sd))},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 hd=ld((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ld((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,gd=6048e5,yd=ld((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),_d=yd,md=yd.range,xd=ld((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),bd=xd,wd=xd.range,Md=ld((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),kd=Md,Td=Md.range,Ed=ld((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())*vd)/864e5}),(function(t){return t.getDate()-1})),Nd=Ed,Sd=Ed.range;function Ad(t){return ld((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())*vd)/gd}))}var Cd=Ad(0),zd=Ad(1),Ld=Ad(2),Od=Ad(3),Pd=Ad(4),Rd=Ad(5),qd=Ad(6),jd=Cd.range,Dd=zd.range,Ud=Ld.range,Fd=Od.range,Id=Pd.range,Yd=Rd.range,Bd=qd.range,Hd=ld((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()})),Xd=Hd,Vd=Hd.range,$d=ld((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()}));$d.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((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 Wd=$d,Gd=$d.range,Zd=ld((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Zd,Jd=Zd.range,Kd=ld((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Kd,np=Kd.range,ep=ld((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function up(t){return ld((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)/gd}))}var op=up(0),ap=up(1),cp=up(2),fp=up(3),sp=up(4),lp=up(5),hp=up(6),dp=op.range,pp=ap.range,vp=cp.range,gp=fp.range,yp=sp.range,_p=lp.range,mp=hp.range,xp=ld((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()})),bp=xp,wp=xp.range,Mp=ld((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()}));Mp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((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 kp=Mp,Tp=Mp.range;function Ep(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 Np(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 Sp(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Ap(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,f=Ip(i),s=Yp(i),l=Ip(u),h=Yp(u),d=Ip(o),p=Yp(o),v=Ip(a),g=Yp(a),y=Ip(c),_=Yp(c),m={a:function(t){return o[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:cv,e:cv,f:dv,H:fv,I:sv,j:lv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Bv,s:Hv,S:gv,u:yv,U:_v,V:mv,w:xv,W:bv,x:null,X:null,y:wv,Y:Mv,Z:kv,"%":Yv},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Tv,e:Tv,f:Cv,H:Ev,I:Nv,j:Sv,L:Av,m:zv,M:Lv,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bv,s:Hv,S:Ov,u:Pv,U:Rv,V:qv,w:jv,W:Dv,x:null,X:null,y:Uv,Y:Fv,Z:Iv,"%":Yv},b={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[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=y.exec(n.slice(e));return r?(t.m=_[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 k(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Kp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},Q:ov,s:av,S:ev,u:Hp,U:Xp,V:Vp,w:Bp,W:$p,x:function(t,n,r){return k(t,e,n,r)},X:function(t,n,e){return k(t,r,n,e)},y:Gp,Y:Wp,Z:Zp,"%":uv};function w(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(r=(i=(r=Np(Sp(u.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(r=(i=(r=n(Sp(u.y))).getDay())>4||0===i?zd.ceil(r):zd(r),r=Nd.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?Np(Sp(u.y)).getUTCDay():n(Sp(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Np(u)):n(u)}}function k(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=b[i in Rp?n.charAt(o++):i])||(r=u(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+="",Ep);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,Np);return n.toString=function(){return t},n}}}var Cp,zp,Lp,Op,Pp,Rp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,jp=/^%/,Dp=/[\\^$*+?|[\]().{}]/g;function Up(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function Zp(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 Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Kp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function uv(t,n,e){var r=jp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ov(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function cv(t,n){return Up(t.getDate(),n,2)}function fv(t,n){return Up(t.getHours(),n,2)}function sv(t,n){return Up(t.getHours()%12||12,n,2)}function lv(t,n){return Up(1+Nd.count(Wd(t),t),n,3)}function hv(t,n){return Up(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return Up(t.getMonth()+1,n,2)}function vv(t,n){return Up(t.getMinutes(),n,2)}function gv(t,n){return Up(t.getSeconds(),n,2)}function yv(t){var n=t.getDay();return 0===n?7:n}function _v(t,n){return Up(Cd.count(Wd(t),t),n,2)}function mv(t,n){var e=t.getDay();return t=e>=4||0===e?Pd(t):Pd.ceil(t),Up(Pd.count(Wd(t),t)+(4===Wd(t).getDay()),n,2)}function xv(t){return t.getDay()}function bv(t,n){return Up(zd.count(Wd(t),t),n,2)}function wv(t,n){return Up(t.getFullYear()%100,n,2)}function Mv(t,n){return Up(t.getFullYear()%1e4,n,4)}function kv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Up(n/60|0,"0",2)+Up(n%60,"0",2)}function Tv(t,n){return Up(t.getUTCDate(),n,2)}function Ev(t,n){return Up(t.getUTCHours(),n,2)}function Nv(t,n){return Up(t.getUTCHours()%12||12,n,2)}function Sv(t,n){return Up(1+rp.count(kp(t),t),n,3)}function Av(t,n){return Up(t.getUTCMilliseconds(),n,3)}function Cv(t,n){return Av(t,n)+"000"}function zv(t,n){return Up(t.getUTCMonth()+1,n,2)}function Lv(t,n){return Up(t.getUTCMinutes(),n,2)}function Ov(t,n){return Up(t.getUTCSeconds(),n,2)}function Pv(t){var n=t.getUTCDay();return 0===n?7:n}function Rv(t,n){return Up(op.count(kp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?sp(t):sp.ceil(t),Up(sp.count(kp(t),t)+(4===kp(t).getUTCDay()),n,2)}function jv(t){return t.getUTCDay()}function Dv(t,n){return Up(ap.count(kp(t),t),n,2)}function Uv(t,n){return Up(t.getUTCFullYear()%100,n,2)}function Fv(t,n){return Up(t.getUTCFullYear()%1e4,n,4)}function Iv(){return"+0000"}function Yv(){return"%"}function Bv(t){return+t}function Hv(t){return Math.floor(+t/1e3)}function Xv(t){return Cp=Ap(t),zp=Cp.format,Lp=Cp.parse,Op=Cp.utcFormat,Pp=Cp.utcParse,Cp}Xv({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 Vv=Date.prototype.toISOString?function(t){return t.toISOString()}:Op("%Y-%m-%dT%H:%M:%S.%LZ"),$v=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Pp("%Y-%m-%dT%H:%M:%S.%LZ"),Wv=1e3,Gv=60*Wv,Zv=60*Gv,Qv=24*Zv,Jv=7*Qv,Kv=30*Qv,tg=365*Qv;function ng(t){return new Date(t)}function eg(t){return t instanceof Date?+t:+new Date(+t)}function rg(t,n,e,i,u,o,a,c,f){var s=Hh(Fh,Kn),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),g=f("%I %p"),y=f("%a %d"),_=f("%b %d"),m=f("%B"),x=f("%Y"),b=[[a,1,Wv],[a,5,5*Wv],[a,15,15*Wv],[a,30,30*Wv],[o,1,Gv],[o,5,5*Gv],[o,15,15*Gv],[o,30,30*Gv],[u,1,Zv],[u,3,3*Zv],[u,6,6*Zv],[u,12,12*Zv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Kv],[n,3,3*Kv],[t,1,tg]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return pg.h=360*t-100,pg.s=1.5-1.5*n,pg.l=.8-.9*n,pg+""};function gg(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var yg=gg(og("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),_g=gg(og("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),mg=gg(og("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xg=gg(og("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function bg(t){var n=0,e=1,r=!1;function i(i){var u=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,u)):u)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return bg(t).domain([n,e]).clamp(r)},Vh(i)}var wg=e(5),Mg=function(t){return function(){return t}};function kg(t){return t[0]}function Tg(t){return t[1]}function Eg(){this._=null}function Ng(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Sg(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 Ag(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 Cg(t){for(;t.L;)t=t.L;return t}Eg.prototype={constructor:Eg,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=Cg(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&&(Sg(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ag(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ag(this,e),e=(t=e).U),e.C=!1,r.C=!0,Sg(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,u=t.L,o=t.R;if(e=u?o?Cg(o):u:o,i?i.L===t?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=t.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.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,Sg(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,Ag(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Sg(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ag(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,Sg(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ag(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var zg=Eg;function Lg(t,n,e,r){var i=[null,null],u=ty.push(i)-1;return i.left=t,i.right=n,e&&Pg(i,t,n,e),r&&Pg(i,n,t,r),Jg[t.index].halfedges.push(u),Jg[n.index].halfedges.push(u),i}function Og(t,n,e){var r=[n,e];return r.left=t,r}function Pg(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 Rg(t,n,e,r,i){var u,o=t[0],a=t[1],c=o[0],f=o[1],s=0,l=1,h=a[0]-c,d=a[1]-f;if(u=n-c,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u0)){if(u/=d,d<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function qg(t,n,e,r,i){var u=t[1];if(u)return!0;var o,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];u=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]=r)return}else c=[n,o*n+a];u=[r,o*r+a]}else{if(c){if(c[0]=-ey)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=Ig.pop()||new function(){Ng(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+o,y.y=(y.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,m=Kg._;m;)if(y.yny)a=a.L;else{if(!((i=u-Zg(a,o))>ny)){r>-ny?(n=a.P,e=a):i>-ny?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jg[t.index]={site:t,halfedges:[]}}(t);var c=Xg(t);if(Qg.insert(n,c),n||e){if(n===e)return Bg(n),e=Xg(n.site),Qg.insert(c,e),c.edge=e.edge=Lg(n.site,c.site),Yg(n),void Yg(e);if(e){Bg(n),Bg(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,m=v*v+g*g,x=[(g*_-d*m)/y+s,(h*m-v*_)/y+l];Pg(e.edge,f,p,x),c.edge=Lg(f,t,null,x),e.edge=Lg(t,p,null,x),Yg(n),Yg(e)}else c.edge=Lg(n.site,c.site)}}function Gg(t,n){var e=t.site,r=e[0],i=e[1],u=i-n;if(!u)return r;var o=t.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function Zg(t,n){var e=t.N;if(e)return Gg(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qg,Jg,Kg,ty,ny=1e-6,ey=1e-12;function ry(t,n){return n[1]-t[1]||n[0]-t[0]}function iy(t,n){var e,r,i,u=t.sort(ry).pop();for(ty=[],Jg=new Array(t.length),Qg=new zg,Kg=new zg;;)if(i=Fg,u&&(!i||u[1]ny||Math.abs(i[0][1]-i[1][1])>ny)||delete ty[u]}(o,a,c,f),function(t,n,e,r){var i,u,o,a,c,f,s,l,h,d,p,v,g=Jg.length,y=!0;for(i=0;iny||Math.abs(v-h)>ny)&&(c.splice(a,0,ty.push(Og(o,d,Math.abs(p-t)ny?[t,Math.abs(l-t)ny?[Math.abs(h-r)ny?[e,Math.abs(l-e)ny?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var _y=function(){var t,n,e=hy,r=dy,i=yy,u=vy,o=gy,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=pe,l=[],h=k("start","zoom","end"),d=500,p=150,v=0;function g(t){t.property("__zoom",py).on("wheel.zoom",M).on("mousedown.zoom",T).on("dblclick.zoom",E).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new ay(n,t.x,t.y)}function _(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 ay(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=arguments,i=b(this,t),u=r.apply(this,t),o=e||m(u),a=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,t):n,l=s(c.invert(o).concat(a/c.k),f.invert(o).concat(a/f.k));return function(t){if(1===t)t=f;else{var n=l(t),e=a/n[2];t=new ay(e,o[0]-n[0]*e,o[1]-n[1]*e)}i.zoom(null,t)}}))}function b(t,n){for(var e,r=0,i=l.length;rv}t.zoom("mouse",i(_(t.that.__zoom,t.mouse[0]=Mt(t.that),t.mouse[1]),t.extent,c))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Ct(ut.view,t.moved),ly(),t.end()}),!0),u=Mt(this),o=ut.clientX,a=ut.clientY;At(ut.view),sy(),t.mouse=[u,this.__zoom.invert(u)],or(this),t.start()}}function E(){if(e.apply(this,arguments)){var t=this.__zoom,n=Mt(this),u=t.invert(n),o=t.k*(ut.shiftKey?.5:2),a=i(_(y(t,o),n,u),r.apply(this,arguments),c);ly(),f>0?gt(this).transition().duration(f).call(x,a,n):gt(this).call(g.transform,a)}}function N(){if(e.apply(this,arguments)){var n,r,i,u,o=b(this,arguments),a=ut.changedTouches,c=a.length;for(sy(),r=0;r-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},u=function(t,n,e){var r=function(n,e,r,i,u){return!(!t.addError||!t.clearErrors||(ru?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===u?"exactly":"no more than")+" "+u+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,u=i.pivots,o=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",u.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",o.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},5:function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},u=Math.abs,o=Math.atan2,a=Math.cos,c=Math.max,f=Math.min,s=Math.sin,l=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function g(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function y(t){return t.innerRadius}function _(t){return t.outerRadius}function m(t){return t.startAngle}function x(t){return t.endAngle}function b(t){return t&&t.padAngle}function w(t,n,e,r,i,u,o){var a=t-e,f=n-r,s=(o?u:-u)/l(a*a+f*f),h=s*f,d=-s*a,p=t+h,v=n+d,g=e+h,y=r+d,_=(p+g)/2,m=(v+y)/2,x=g-p,b=y-v,w=x*x+b*b,M=i-u,k=p*y-g*v,T=(b<0?-1:1)*l(c(0,M*M*w-k*k)),E=(k*b-x*T)/w,N=(-k*x-b*T)/w,S=(k*b+x*T)/w,A=(-k*x+b*T)/w,C=E-_,z=N-m,L=S-_,O=A-m;return C*C+z*z>L*L+O*O&&(E=S,N=A),{cx:E,cy:N,x01:-h,y01:-d,x11:E*(i/M-1),y11:N*(i/M-1)}}var M=function(){var t=y,n=_,e=i(0),c=null,M=m,k=x,T=b,E=null;function N(){var i,y,_,m=+t.apply(this,arguments),x=+n.apply(this,arguments),b=M.apply(this,arguments)-p,N=k.apply(this,arguments)-p,S=u(N-b),A=N>b;if(E||(E=i=Object(r.a)()),xh)if(S>v-h)E.moveTo(x*a(b),x*s(b)),E.arc(0,0,x,b,N,!A),m>h&&(E.moveTo(m*a(N),m*s(N)),E.arc(0,0,m,N,b,A));else{var C,z,L=b,O=N,P=b,R=N,q=S,j=S,D=T.apply(this,arguments)/2,U=D>h&&(c?+c.apply(this,arguments):l(m*m+x*x)),F=f(u(x-m)/2,+e.apply(this,arguments)),I=F,Y=F;if(U>h){var B=g(U/m*s(D)),H=g(U/x*s(D));(q-=2*B)>h?(P+=B*=A?1:-1,R-=B):(q=0,P=R=(b+N)/2),(j-=2*H)>h?(L+=H*=A?1:-1,O-=H):(j=0,L=O=(b+N)/2)}var X=x*a(L),V=x*s(L),$=m*a(R),W=m*s(R);if(F>h){var G=x*a(O),Z=x*s(O),Q=m*a(P),J=m*s(P);if(Sh?function(t,n,e,r,i,u,o,a){var c=e-t,f=r-n,s=o-i,l=a-u,h=(s*(n-u)-l*(t-i))/(l*c-s*f);return[t+h*c,n+h*f]}(X,V,Q,J,G,Z,$,W):[$,W],tt=X-K[0],nt=V-K[1],et=G-K[0],rt=Z-K[1],it=1/s(((_=(tt*et+nt*rt)/(l(tt*tt+nt*nt)*l(et*et+rt*rt)))>1?0:_<-1?d:Math.acos(_))/2),ut=l(K[0]*K[0]+K[1]*K[1]);I=f(F,(m-ut)/(it-1)),Y=f(F,(x-ut)/(it+1))}}j>h?Y>h?(C=w(Q,J,X,V,x,Y,A),z=w(G,Z,$,W,x,Y,A),E.moveTo(C.cx+C.x01,C.cy+C.y01),Yh&&q>h?I>h?(C=w($,W,G,Z,m,-I,A),z=w(X,V,Q,J,m,-I,A),E.lineTo(C.cx+C.x01,C.cy+C.y01),I=l;--h)f.point(y[h],_[h]);f.lineEnd(),f.areaEnd()}g&&(y[s]=+t(d,s,i),_[s]=+e(d,s,i),f.point(n?+n(d,s,i):y[s],u?+u(d,s,i):_[s]))}if(p)return f=null,p+""||null}function l(){return S().defined(o).curve(c).context(a)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),u=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s):e},s.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:i(+t),s):u},s.lineX0=s.lineY0=function(){return l().x(t).y(e)},s.lineY1=function(){return l().x(t).y(u)},s.lineX1=function(){return l().x(n).y(e)},s.defined=function(t){return arguments.length?(o="function"==typeof t?t:i(!!t),s):o},s.curve=function(t){return arguments.length?(c=t,null!=a&&(f=c(a)),s):c},s.context=function(t){return arguments.length?(null==t?a=f=null:f=c(a=t),s):a},s},C=function(t,n){return nt?1:n>=t?0:NaN},z=function(t){return t},L=function(){var t=z,n=C,e=null,r=i(0),u=i(v),o=i(0);function a(i){var a,c,f,s,l,h=i.length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),_=Math.min(v,Math.max(-v,u.apply(this,arguments)-y)),m=Math.min(Math.abs(_)/h,o.apply(this,arguments)),x=m*(_<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,f=d?(_-h*x)/d:0;a0?l*f:0)+x,g[c]={data:i[c],index:a,value:l,startAngle:y,endAngle:s,padAngle:m};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a},O=R(T);function P(t){this._curve=t}function R(t){function n(n){return new P(t(n))}return n._curve=t,n}function q(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(R(t)):n()._curve},t}P.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 j=function(){return q(S().curve(O))},D=function(){var t=A().curve(O),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=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 q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(R(t)):n()._curve},t},U=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},F=Array.prototype.slice;function I(t){return t.source}function Y(t){return t.target}function B(t){var n=I,e=Y,u=E,o=N,a=null;function c(){var i,c=F.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(a||(a=i=Object(r.a)()),t(a,+u.apply(this,(c[0]=f,c)),+o.apply(this,c),+u.apply(this,(c[0]=s,c)),+o.apply(this,c)),i)return a=null,i+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),c):u},c.y=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c}function H(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function X(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function V(t,n,e,r,i){var u=U(n,e),o=U(n,e=(e+i)/2),a=U(r,e),c=U(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function $(){return B(H)}function W(){return B(X)}function G(){var t=B(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var Z={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={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()}},J=Math.sqrt(1/3),K=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/K),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=v*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ut={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ot=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ot));t.moveTo(0,2*e),t.lineTo(-ot*e,-e),t.lineTo(ot*e,-e),t.closePath()}},ct=Math.sqrt(3)/2,ft=1/Math.sqrt(12),st=3*(ft/2+1),lt={draw:function(t,n){var e=Math.sqrt(n/st),r=e/2,i=e*ft,u=r,o=e*ft+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-ct*i,ct*r+-.5*i),t.lineTo(-.5*u-ct*o,ct*u+-.5*o),t.lineTo(-.5*a-ct*c,ct*a+-.5*c),t.lineTo(-.5*r+ct*i,-.5*i-ct*r),t.lineTo(-.5*u+ct*o,-.5*o-ct*u),t.lineTo(-.5*a+ct*c,-.5*c-ct*a),t.closePath()}},ht=[Z,Q,tt,ut,it,at,lt],dt=function(){var t=i(Z),n=i(64),e=null;function u(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return u.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),u):t},u.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),u):n},u.context=function(t){return arguments.length?(e=null==t?null:t,u):e},u},pt=function(){};function vt(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 gt(t){this._context=t}gt.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:vt(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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var yt=function(t){return new gt(t)};function _t(t){this._context=t}_t.prototype={areaStart:pt,areaEnd:pt,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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var mt=function(t){return new _t(t)};function xt(t){this._context=t}xt.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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new xt(t)};function wt(t,n){this._basis=new gt(t),this._beta=n}wt.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],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Mt=function t(n){function e(t){return 1===n?new gt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function kt(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 Tt(t,n){this._context=t,this._k=(1-n)/6}Tt.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:kt(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:kt(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 Et=function t(n){function e(t){return new Tt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Nt(t,n){this._context=t,this._k=(1-n)/6}Nt.prototype={areaStart:pt,areaEnd:pt,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:kt(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 St=function t(n){function e(t){return new Nt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function At(t,n){this._context=t,this._k=(1-n)/6}At.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:kt(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 Ct=function t(n){function e(t){return new At(t,n)}return e.tension=function(n){return t(+n)},e}(0);function zt(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>h){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>h){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*f+t._x1*t._l23_2a-n*t._l12_2a)/s,o=(o*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function Lt(t,n){this._context=t,this._alpha=n}Lt.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:zt(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 Ot=function t(n){function e(t){return n?new Lt(t,n):new Tt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Pt(t,n){this._context=t,this._alpha=n}Pt.prototype={areaStart:pt,areaEnd:pt,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:zt(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 Rt=function t(n){function e(t){return n?new Pt(t,n):new Nt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.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:zt(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 jt=function t(n){function e(t){return n?new qt(t,n):new At(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Dt(t){this._context=t}Dt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Ut=function(t){return new Dt(t)};function Ft(t){return t<0?-1:1}function It(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(Ft(u)+Ft(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Yt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bt(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Ht(t){this._context=t}function Xt(t){this._context=new Vt(t)}function Vt(t){this._context=t}function $t(t){return new Ht(t)}function Wt(t){return new Xt(t)}function Gt(t){this._context=t}function Zt(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Kt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u=0;)e[n]=n;return e};function un(t,n){return t[n]}var on=function(){var t=i([]),n=rn,e=en,r=un;function u(i){var u,o,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u0){for(var e,r,i,u=0,o=t[0].length;u1)for(var e,r,i,u,o,a,c=0,f=t[n[0]].length;c=0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=u},fn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;oo)throw new Error("circular link");e.forEach((function(t){t.depth=u,t.sourceLinks.forEach((function(t){i.indexOf(t.target)<0&&i.push(t.target)}))}))}for(e=t.nodes,i=[],u=0;e.length;++u,e=i,i=[]){if(u>o)throw new Error("circular link");e.forEach((function(t){t.height=u,t.targetLinks.forEach((function(t){i.indexOf(t.source)<0&&i.push(t.source)}))}))}var a=(r-n-y)/(u-1);t.nodes.forEach((function(t){t.layer=Math.max(0,Math.min(u-1,Math.floor(x.call(null,t,u)))),t.x1=(t.x0=n+t.layer*a)+y}))}(a),function(n){var r,a=Object(u.d)().key((function(t){return t.x0})).sortKeys(i.a).entries(n.nodes).map((function(t){return t.values}));r=Object(i.o)(a,(function(t){return(o-e-(t.length-1)*_)/Object(i.v)(t,h)})),a.forEach((function(n){null!=t&&n.sort(t);let i=e;n.forEach((function(t){t.y0=i,t.y1=i+t.value*r,i=t.y1+_}))})),n.links.forEach((function(t){t.width=t.value*r}));for(var c=0,d=M;c0))return;let i=(e/r-n.y0)*t;n.y0+=i,n.y1+=i}))}))}function g(t){a.slice(0,-1).reverse().forEach((function(n){n.forEach((function(n){let e=0,r=0;for(const{target:t,value:i}of n.sourceLinks){let u=i*(t.layer-n.layer);e+=N(n,t)*u,r+=u}if(!(r>0))return;let i=(e/r-n.y0)*t;n.y0+=i,n.y1+=i}))}))}function y(n){a.forEach((function(r){var i,u,o,a=e,c=r.length;for(void 0===t&&r.sort(l),o=0;o1e-6&&(i.y0+=u,i.y1+=u),a=i.y1+_}))}function m(n){a.forEach((function(e){var r,i,u,a=o,c=e.length;for(void 0===t&&e.sort(l),u=c-1;u>=0;--u)(i=((r=e[u]).y1-a)*n)>1e-6&&(r.y0-=i,r.y1-=i),a=r.y0-_}))}}(a),T(a),a}function T(t){t.nodes.forEach((function(t){t.sourceLinks.sort(s),t.targetLinks.sort(f)})),t.nodes.forEach((function(t){var n=t.y0,e=n;t.sourceLinks.forEach((function(t){t.y0=n+t.width/2,n+=t.width})),t.targetLinks.forEach((function(t){t.y1=e+t.width/2,e+=t.width}))}))}function E(t,n){let e=t.y0-(t.sourceLinks.length-1)*_/2;for(const{target:r,width:i}of t.sourceLinks){if(r===n)break;e+=i+_}for(const{source:r,width:i}of n.targetLinks){if(r===t)break;e-=i}return e}function N(t,n){let e=n.y0-(n.targetLinks.length-1)*_/2;for(const{source:r,width:i}of n.targetLinks){if(r===t)break;e+=i+_}for(const{target:r,width:i}of t.sourceLinks){if(r===n)break;e-=i}return e}return k.update=function(t){return T(t),t},k.nodeId=function(t){return arguments.length?(m="function"==typeof t?t:c(t),k):m},k.nodeAlign=function(t){return arguments.length?(x="function"==typeof t?t:c(t),k):x},k.nodeSort=function(n){return arguments.length?(t=n,k):t},k.nodeWidth=function(t){return arguments.length?(y=+t,k):y},k.nodePadding=function(t){return arguments.length?(_=+t,k):_},k.nodes=function(t){return arguments.length?(b="function"==typeof t?t:c(t),k):b},k.links=function(t){return arguments.length?(w="function"==typeof t?t:c(t),k):w},k.size=function(t){return arguments.length?(n=e=0,r=+t[0],o=+t[1],k):[r-n,o-e]},k.extent=function(t){return arguments.length?(n=+t[0][0],r=+t[1][0],e=+t[0][1],o=+t[1][1],k):[[n,e],[r,o]]},k.iterations=function(t){return arguments.length?(M=+t,k):M},k}var _=e(5);function m(t){return[t.source.x1,t.y0]}function x(t){return[t.target.x0,t.y1]}var b=e(4),w={id:"sankey",label:"Sankey",options:{color_range:{type:"array",label:"Color Range",display:"colors",default:["#dd3333","#80ce5d","#f78131","#369dc1","#c572d3","#36c1b3","#b57052","#ed69af"]},label_type:{default:"name",display:"select",label:"Label Type",type:"string",values:[{Name:"name"},{"Name (value)":"name_value"}]},show_null_points:{type:"boolean",label:"Plot Null Values",default:!0}},create:function(t,n){t.innerHTML="\n \n ",this.svg=r.select(t).append("svg")},updateAsync:function(t,n,e,i,u,a){if(Object(b.b)(this,i,{min_pivots:0,max_pivots:0,min_dimensions:2,max_dimensions:void 0,min_measures:1,max_measures:1})){var c=n.clientWidth,f=n.clientHeight,s=this.svg.html("").attr("width","100%").attr("height","100%").append("g"),l=i.fields.dimension_like,h=i.fields.measure_like[0],d=r.scaleOrdinal().range(e.color_range||w.options.color_range.default),p=s.append("defs"),v=y().nodeAlign(o).nodeWidth(10).nodePadding(12).extent([[1,1],[c-1,f-6]]);v.nodeSort(null);var g=s.append("g").attr("class","links").attr("fill","none").attr("stroke","#fff").selectAll("path"),M=s.append("g").attr("class","nodes").attr("font-family","sans-serif").attr("font-size",10).selectAll("g"),k={nodes:[],links:[]},T=r.set();t.forEach((function(t){for(var n=[],r=0,i=l;rn?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)<0?r=u+1:i=u}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>1;t(n[u],e)>0?i=u:r=u+1}return r}}},u=i(r),o=u.right,a=u.left,c=o,f=function(t,n){null==n&&(n=s);for(var e=0,r=t.length-1,i=t[0],u=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,u=0,o=-1,a=0,c=0;if(null==n)for(;++o1)return c/(u-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},g=function(t,n){var e,r,i,u=t.length,o=-1;if(null==n){for(;++o=e)for(r=i=e;++oe&&(r=e),i=e)for(r=i=e;++oe&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/o),n=Math.floor(n/o),u=new Array(i=Math.ceil(n-t+1));++a=0?(u>=M?10:u>=k?5:u>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(u>=M?10:u>=k?5:u>=T?2:1)}function S(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),u=r/i;return u>=M?i*=10:u>=k?i*=5:u>=T&&(i*=2),nl;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:s,p.x1=i=1)return+e(t[r-1],r-1,t);var r,i=(r-1)*n,u=Math.floor(i),o=+e(t[u],u,t);return o+(+e(t[u+1],u+1,t)-o)*(i-u)}},L=function(t,n,e){return t=m.call(t,d).sort(r),Math.ceil((e-n)/(2*(z(t,.75)-z(t,.25))*Math.pow(t.length,-1/3)))},O=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},P=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ur&&(r=e)}else for(;++u=e)for(r=e;++ur&&(r=e);return r},R=function(t,n){var e,r=t.length,i=r,u=-1,o=0;if(null==n)for(;++u=0;)for(n=(r=t[i]).length;--n>=0;)e[--o]=r[n];return e},D=function(t,n){var e,r,i=t.length,u=-1;if(null==n){for(;++u=e)for(r=e;++ue&&(r=e)}else for(;++u=e)for(r=e;++ue&&(r=e);return r},U=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},I=function(t,n){if(e=t.length){var e,i,u=0,o=0,a=t[o];for(null==n&&(n=r);++u1e-6)if(Math.abs(l*c-f*s)>1e-6&&u){var d=e-o,p=i-a,v=c*c+f*f,g=d*d+p*p,y=Math.sqrt(v),_=Math.sqrt(h),m=u*Math.tan((r-Math.acos((v+h-g)/(2*y*_)))/2),x=m/_,b=m/y;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*s)+","+(n+x*l)),this._+="A"+u+","+u+",0,0,"+ +(l*d>s*p)+","+(this._x1=t+b*c)+","+(this._y1=n+b*f)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,o,a,c){t=+t,n=+n;var f=(e=+e)*Math.cos(o),s=e*Math.sin(o),l=t+f,h=n+s,d=1^c,p=c?o-a:a-o;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+l+","+h:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+l+","+h),e&&(p<0&&(p=p%i+i),p>u?this._+="A"+e+","+e+",0,1,"+d+","+(t-f)+","+(n-s)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},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 c=a;e.d(n,"a",(function(){return c}))},2:function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,u=-1,o=t.length;if(null==n)for(;++u=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var f,s,l,h=-1,d=e.length,p=r[i++],v=u(),g=a();++hr.length)return e;var o,a=i[u-1];return null!=n&&u>=r.length?o=e.entries():(o=[],e.each((function(n,e){o.push({key:e,values:t(n,u)})}))),null!=a?o.sort((function(t,n){return a(t.key,n.key)})):o}(o(t,0,f,s),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}}};function a(){return{}}function c(t,n,e){t[n]=e}function f(){return u()}function s(t,n,e){t.set(n,e)}function l(){}var h=u.prototype;function d(t,n){var e=new l;if(t instanceof l)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),o=-1,a=u.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o0)for(var e,r,i=new Array(e),u=0;u=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),E.hasOwnProperty(n)?{space:E[n],local:t}:t},S=function(t){var n=N(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===T&&n.documentElement.namespaceURI===T?n.createElement(t):n.createElementNS(e,t)}})(n)};function A(){}var C=function(t){return null==t?A:function(){return this.querySelector(t)}};function z(){return[]}var L=function(t){return null==t?z:function(){return this.querySelectorAll(t)}},O=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var P=document.documentElement;if(!P.matches){var R=P.webkitMatchesSelector||P.msMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector;O=function(t){return function(){return R.call(this,t)}}}}var q=O,j=function(t){return new Array(t.length)};function D(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}D.prototype={constructor:D,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var U="$";function I(t,n,e,r,i,u){for(var o,a=0,c=n.length,f=u.length;an?1:t>=n?0:NaN}var B=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function H(t,n){return t.style.getPropertyValue(n)||B(t).getComputedStyle(t,null).getPropertyValue(n)}function X(t){return t.trim().split(/^|\s+/)}function V(t){return t.classList||new $(t)}function $(t){this._node=t,this._names=X(t.getAttribute("class")||"")}function W(t,n){for(var e=V(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ut=null;function ot(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ut;ut=r;try{t.call(this,this.__data__,n,e)}finally{ut=i}}}function ct(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r=b&&(b=x+1);!(m=y[b])&&++b=0;)(r=i[u])&&(o&&o!==r.nextSibling&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=Y);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):H(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=X(t+"");if(arguments.length<2){for(var r=V(this.node()),i=-1,u=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),o=u.length;if(!(arguments.length<2)){for(a=n?ft:ct,null==e&&(e=!1),r=0;rl}c.mouse("drag")}function v(){gt(ut.view).on("mousemove.drag mouseup.drag",null),Ct(ut.view,e),St(),c.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ut.changedTouches,r=u.apply(this,arguments),o=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Xt.exec(t))?tn(parseInt(n[1],16)):(n=Vt.exec(t))?new un(n[1],n[2],n[3],1):(n=$t.exec(t))?new un(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Wt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Gt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Zt.exec(t))?on(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?on(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new un(NaN,NaN,NaN,0):null}function tn(t){return new un(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new un(t,n,e,r)}function en(t){return t instanceof It||(t=Kt(t)),t?new un((t=t.rgb()).r,t.g,t.b,t.opacity):new un}function rn(t,n,e,r){return 1===arguments.length?en(t):new un(t,n,e,null==r?1:r)}function un(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function on(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new cn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof cn)return new cn(t.h,t.s,t.l,t.opacity);if(t instanceof It||(t=Kt(t)),!t)return new cn;if(t instanceof cn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),u=Math.max(n,e,r),o=NaN,a=u-i,c=(u+i)/2;return a?(o=n===u?(e-r)/a+6*(e0&&c<1?0:o,new cn(o,a,c,t.opacity)}(t):new cn(t,n,e,null==r?1:r)}function cn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function fn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Dt(It,Kt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Dt(un,rn,Ut(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new un(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new un(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+")")}})),Dt(cn,an,Ut(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cn(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 un(fn(t>=240?t-240:t+120,i,r),fn(t,i,r),fn(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 sn=Math.PI/180,ln=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,gn=6/29,yn=3*gn*gn,_n=gn*gn*gn;function mn(t){if(t instanceof bn)return new bn(t.l,t.a,t.b,t.opacity);if(t instanceof Nn){var n=t.h*sn;return new bn(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof un||(t=en(t));var e=Tn(t.r),r=Tn(t.g),i=Tn(t.b),u=wn((.4124564*e+.3575761*r+.1804375*i)/hn),o=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new bn(116*o-16,500*(u-o),200*(o-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?mn(t):new bn(t,n,e,null==r?1:r)}function bn(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>_n?Math.pow(t,1/3):t/yn+vn}function Mn(t){return t>gn?t*t*t:yn*(t-vn)}function kn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Tn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function En(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Nn)return new Nn(t.h,t.c,t.l,t.opacity);t instanceof bn||(t=mn(t));var n=Math.atan2(t.b,t.a)*ln;return new Nn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new Nn(t,n,e,null==r?1:r)}function Nn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Dt(bn,xn,Ut(It,{brighter:function(t){return new bn(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new bn(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=dn*Mn(t),new un(kn(3.2404542*(n=hn*Mn(n))-1.5371385*t-.4985314*(e=pn*Mn(e))),kn(-.969266*n+1.8760108*t+.041556*e),kn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Dt(Nn,En,Ut(It,{brighter:function(t){return new Nn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Nn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return mn(this).rgb()}}));var Sn=-.29227,An=-.90649,Cn=1.97294,zn=Cn*An,Ln=1.78277*Cn,On=1.78277*Sn- -.14861*An;function Pn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Rn)return new Rn(t.h,t.s,t.l,t.opacity);t instanceof un||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(On*r+zn*n-Ln*e)/(On+zn-Ln),u=r-i,o=(Cn*(e-i)-Sn*u)/An,a=Math.sqrt(o*o+u*u)/(Cn*i*(1-i)),c=a?Math.atan2(o,u)*ln-120:NaN;return new Rn(c<0?c+360:c,a,i,t.opacity)}(t):new Rn(t,n,e,null==r?1:r)}function Rn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(t,n,e,r,i){var u=t*t,o=u*t;return((1-3*t+3*u-o)*n+(4-6*u+3*o)*e+(1+3*t+3*u-3*o)*r+o*i)/6}Dt(Rn,Pn,Ut(It,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*sn,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new un(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(Sn*r+An*i)),255*(n+e*(Cn*r)),this.opacity)}}));var jn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],u=t[r+1],o=r>0?t[r-1]:2*i-u,a=r180||e<-180?e-360*Math.round(e/360):e):Un(isNaN(t)?n:t)}function Yn(t,n){var e=n-t;return e?In(t,e):Un(isNaN(t)?n:t)}var Bn=function t(n){var e=function(t){return 1==(t=+t)?Yn: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):Un(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),u=e(t.b,n.b),o=Yn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=u(n),t.opacity=o(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,u=new Array(i),o=new Array(i),a=new Array(i);for(e=0;eu&&(i=n.slice(u,i),a[o]?a[o]+=i:a[++o]=i),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:Kn(e,r)})),u=ee.lastIndex;return u180?n+=360:n-t>180&&(t+=360),u.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(u.rotate,o.rotate,a,c),function(t,n,e,u){t!==n?u.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(u.skewX,o.skewX,a,c),function(t,n,e,r,u,o){if(t!==e||n!==r){var a=u.push(i(u)+"scale(",null,",",null,")");o.push({i:a-4,x:Kn(t,e)},{i:a-2,x:Kn(n,r)})}else 1===e&&1===r||u.push(i(u)+"scale("+e+","+r+")")}(u.scaleX,u.scaleY,o.scaleX,o.scaleY,a,c),u=o=null,function(t){for(var n,e=-1,r=c.length;++e=0&&n._call.call(null,t),n=n._next;--Se}function Ye(){Oe=(Le=Re.now())+Pe,Se=Ae=0;try{Fe()}finally{Se=0,function(){for(var t,n,e=Me,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:Me=n);ke=t,He(r)}(),Oe=0}}function Be(){var t=Re.now(),n=t-Le;n>ze&&(Pe-=n,Le=t)}function He(t){Se||(Ae&&(Ae=clearTimeout(Ae)),t-Oe>24?(t<1/0&&(Ae=setTimeout(Ye,t-Re.now()-Pe)),Ce&&(Ce=clearInterval(Ce))):(Ce||(Le=Re.now(),Ce=setInterval(Be,ze)),Se=1,qe(Ye)))}Ue.prototype=Ie.prototype={constructor:Ue,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?je():+e)+(null==n?0:+n),this._next||ke===this||(ke?ke._next=this:Me=this,ke=this),this._call=t,this._time=e,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var Xe=function(t,n,e){var r=new Ue;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ve=function(t,n,e){var r=new Ue,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?je():+e,r.restart((function u(o){o+=i,r.restart(u,i+=n,e),t(o)}),n,e),r)},$e=k("start","end","interrupt"),We=[],Ge=0,Ze=1,Qe=2,Je=3,Ke=4,tr=5,nr=6,er=function(t,n,e,r,i,u){var o=t.__transition;if(o){if(e in o)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function u(c){var f,s,l,h;if(e.state!==Ze)return a();for(f in i)if((h=i[f]).name===e.name){if(h.state===Je)return Xe(u);h.state===Ke?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[f]):+fGe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=ur(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function ur(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var or=function(t,n){var e,r,i,u=t.__transition,o=!0;if(u){for(i in n=null==n?null:n+"",u)(e=u[i]).name===n?(r=e.state>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var o=u(this,t),a=o.on;a!==r&&(i=(r=a).copy()).on(n,e),o.on=i}}(e,t,n))},attr:function(t,n){var e=N(t),r="transform"===e?le:cr;return this.attrTween(t,"function"==typeof n?(e.local?function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttributeNS(t.space,t.local))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttributeNS(t.space,t.local)}}:function(t,n,e){var r,i,u;return function(){var o,a=e(this);if(null!=a)return(o=this.getAttribute(t))===a?null:o===r&&a===i?u:u=n(r=o,i=a);this.removeAttribute(t)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(t,n,e){var r,i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===e?null:u===r?i:i=n(r=u,e)}}:function(t,n,e){var r,i;return function(){var u=this.getAttribute(t);return u===e?null:u===r?i:i=n(r=u,e)}})(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=N(t);return this.tween(e,(r.local?function(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(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})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?se:cr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var u=H(this,t),o=(this.style.removeProperty(t),H(this,t));return u===o?null:u===e&&o===r?i:i=n(e=u,r=o)}}(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,u;return function(){var o=H(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=H(this,t)),o===a?null:o===r&&a===i?u:u=n(r=o,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var u=H(this,t);return u===e?null:u===r?i:i=n(r=u,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,function(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}(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}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=ur(this.node(),e).tween,u=0,o=i.length;uZe&&e.name===n)return new lr([[t]],ii,n,+r);return null},oi=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function ci(){ut.stopImmediatePropagation()}var fi=function(){ut.preventDefault(),ut.stopImmediatePropagation()},si={name:"drag"},li={name:"space"},hi={name:"handle"},di={name:"center"},pi={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]]}},vi={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]]}},gi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},yi={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"},_i={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},mi={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},bi={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 Mi(){return!ut.button}function ki(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Ti(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ei(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Ni(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Si(){return zi(pi)}function Ai(){return zi(vi)}var Ci=function(){return zi(gi)};function zi(t){var n,e=ki,r=Mi,i=k(o,"start","brush","end"),u=6;function o(n){var e=n.property("__brush",l).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yi.overlay).merge(e).each((function(){var t=Ti(this).extent;gt(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])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.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 yi[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",s)}function a(){var t=gt(this),n=Ti(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 c(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 s(){if(ut.touches){if(ut.changedTouches.length0&&(e=i-d),w<0?l=h-p:w>0&&(u=o-p),x=li,R.attr("cursor",yi.selection),D());break;default:return}fi()}),!0).on("keyup.brush",(function(){switch(ut.keyCode){case 16:C&&(g=y=C=!1,D());break;case 18:x===di&&(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi,D());break;case 32:x===li&&(ut.altKey?(b&&(f=s-d*b,e=i+d*b),w&&(l=h-p*w,u=o+p*w),x=di):(b<0?f=s:b>0&&(e=i),w<0?l=h:w>0&&(u=o),x=hi),R.attr("cursor",yi[m]),D());break;default:return}fi()}),!0).on("mousemove.brush",j,!0).on("mouseup.brush",U,!0);At(ut.view)}ci(),or(_),a.call(_),O.start()}function j(){var t=Mt(_);!C||g||y||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?y=!0:g=!0),L=t,v=!0,fi(),D()}function D(){var t;switch(d=L[0]-z[0],p=L[1]-z[1],x){case li:case si:b&&(d=Math.max(E-e,Math.min(S-f,d)),i=e+d,s=f+d),w&&(p=Math.max(N-u,Math.min(A-l,p)),o=u+p,h=l+p);break;case hi:b<0?(d=Math.max(E-e,Math.min(S-e,d)),i=e+d,s=f):b>0&&(d=Math.max(E-f,Math.min(S-f,d)),i=e,s=f+d),w<0?(p=Math.max(N-u,Math.min(A-u,p)),o=u+p,h=l):w>0&&(p=Math.max(N-l,Math.min(A-l,p)),o=u,h=l+p);break;case di:b&&(i=Math.max(E,Math.min(S,e-d*b)),s=Math.max(E,Math.min(S,f+d*b))),w&&(o=Math.max(N,Math.min(A,u-p*w)),h=Math.max(N,Math.min(A,l+p*w)))}s=u?c=!0:(r=t.charCodeAt(o++))===Ji?f=!0:r===Ki&&(f=!0,t.charCodeAt(o)===Ji&&++o),t.slice(i+1,n-1).replace(/""/g,'"')}for(;o=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o,i=d,!(d=d[l=s<<1|f]))return i[l]=p,t;if(a=+t._x.call(null,d.data),c=+t._y.call(null,d.data),n===a&&e===c)return p.next=d,i?i[l]=p:t._root=p,t;do{i=i?i[l]=new Array(4):t._root=new Array(4),(f=n>=(u=(v+y)/2))?v=u:y=u,(s=e>=(o=(g+_)/2))?g=o:_=o}while((l=s<<1|f)==(h=(c>=o)<<1|a>=u));return i[h]=d,i[l]=p,t}var gu=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function yu(t){return t[0]}function _u(t){return t[1]}function mu(t,n,e){var r=new xu(null==n?yu:n,null==e?_u:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function xu(t,n,e,r,i,u){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=u,this._root=void 0}function bu(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var wu=mu.prototype=xu.prototype;function Mu(t){return t.x+t.vx}function ku(t){return t.y+t.vy}wu.copy=function(){var t,n,e=new xu(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=bu(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]=bu(n));return e},wu.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return vu(this.cover(n,e),n,e,t)},wu.addAll=function(t){var n,e,r,i,u=t.length,o=new Array(u),a=new Array(u),c=1/0,f=1/0,s=-1/0,l=-1/0;for(e=0;es&&(s=r),il&&(l=i));for(st||t>i||r>n||n>u))return this;var o,a,c=i-e,f=this._root;switch(a=(n<(r+u)/2)<<1|t<(e+i)/2){case 0:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),t>(i=e+c)||n>u);break;case 1:do{(o=new Array(4))[a]=f,f=o}while(u=r+(c*=2),(e=i-c)>t||n>u);break;case 2:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),t>(i=e+c)||r>n);break;case 3:do{(o=new Array(4))[a]=f,f=o}while(r=u-(c*=2),(e=i-c)>t||r>n)}this._root&&this._root.length&&(this._root=f)}return this._x0=e,this._y0=r,this._x1=i,this._y1=u,this},wu.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},wu.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]]},wu.find=function(t,n,e){var r,i,u,o,a,c,f,s=this._x0,l=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new gu(v,s,l,h,d)),null==e?e=1/0:(s=t-e,l=n-e,h=t+e,d=n+e,e*=e);c=p.pop();)if(!(!(v=c.node)||(i=c.x0)>h||(u=c.y0)>d||(o=c.x1)=y)<<1|t>=g)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-f],p[p.length-1-f]=c)}else{var _=t-+this._x.call(null,v.data),m=n-+this._y.call(null,v.data),x=_*_+m*m;if(x=(a=(p+g)/2))?p=a:g=a,(s=o>=(c=(v+y)/2))?v=c:y=c,n=d,!(d=d[l=s<<1|f]))return this;if(!d.length)break;(n[l+1&3]||n[l+2&3]||n[l+3&3])&&(e=n,h=l)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[l]=i:delete n[l],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},wu.removeAll=function(t){for(var n=0,e=t.length;nc+d||if+d||ua.index){var p=c-o.x-o.vx,v=f-o.y-o.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,u=n.length;for(e=new Array(u),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,u,o,a,c,f=0,s=t.length;for(null==r?r=1/0:r*=r,f=0;f1?(f.on(t,e),n):f.on(t)}}},Ru=function(){var t,n,e,r,i=du(-30),u=1,o=1/0,a=.81;function c(r){var i,u=t.length,o=mu(t,Au,Cu).visitAfter(s);for(e=r,i=0;i=o)){(t.data!==n||t.next)&&(0===s&&(d+=(s=pu())*s),0===l&&(d+=(l=pu())*l),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},Iu=function(t){return(t=Uu(Math.abs(t)))?t[1]:NaN},Fu=function(t,n){var e=Uu(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")},Yu={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,u=-1;i0&&(u=0)}return u>0?t.slice(0,u)+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=Uu(t,n);if(!e)return t+"";var r=e[0],i=e[1],u=i-(zu=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return u===o?r:u>o?r+new Array(u-o+1).join("0"):u>0?r.slice(0,u)+"."+r.slice(u):"0."+new Array(1-u).join("0")+Uu(t,Math.max(0,n+u-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Bu=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Hu(t){return new Xu(t)}function Xu(t){if(!(n=Bu.exec(t)))throw new Error("invalid format: "+t);var n,e=n[1]||" ",r=n[2]||">",i=n[3]||"-",u=n[4]||"",o=!!n[5],a=n[6]&&+n[6],c=!!n[7],f=n[8]&&+n[8].slice(1),s=n[9]||"";"n"===s?(c=!0,s="g"):Yu[s]||(s=""),(o||"0"===e&&"="===r)&&(o=!0,e="0",r="="),this.fill=e,this.align=r,this.sign=i,this.symbol=u,this.zero=o,this.width=a,this.comma=c,this.precision=f,this.type=s}Hu.prototype=Xu.prototype,Xu.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 Vu,$u,Wu,Gu=function(t){return t},Zu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Qu=function(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,u=[],o=0,a=n[0],c=0;i>0&&a>0&&(c+a+1>r&&(a=Math.max(1,r-c)),u.push(t.substring(i-=a,i+a)),!((c+=a+1)>r));)a=n[o=(o+1)%n.length];return u.reverse().join(e)}):Gu,i=t.currency,u=t.decimal,o=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):Gu,a=t.percent||"%";function c(t){var n=(t=Hu(t)).fill,e=t.align,c=t.sign,f=t.symbol,s=t.zero,l=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===f?i[0]:"#"===f&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===f?i[1]:/[%p]/.test(p)?a:"",y=Yu[p],_=!p||/[defgprs%]/.test(p);function m(t){var i,a,f,m=v,x=g;if("c"===p)x=y(t)+x,t="";else{var b=(t=+t)<0;if(t=y(Math.abs(t),d),b&&0==+t&&(b=!1),m=(b?"("===c?c:"-":"-"===c||"("===c?"":c)+m,x=("s"===p?Zu[8+zu/3]:"")+x+(b&&"("===c?")":""),_)for(i=-1,a=t.length;++i(f=t.charCodeAt(i))||f>57){x=(46===f?u+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!s&&(t=r(t,1/0));var w=m.length+t.length+x.length,M=w>1)+m+t+x+M.slice(w);break;default:t=M+m+t+x}return o(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),m.toString=function(){return t+""},m}return{format:c,formatPrefix:function(t,n){var e=c(((t=Hu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Iu(n)/3))),i=Math.pow(10,-r),u=Zu[8+r/3];return function(t){return e(i*t)+u}}}};function Ju(t){return Vu=Qu(t),$u=Vu.format,Wu=Vu.formatPrefix,Vu}Ju({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var Ku=function(t){return Math.max(0,-Iu(Math.abs(t)))},to=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(Iu(n)/3)))-Iu(Math.abs(t)))},no=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,Iu(n)-Iu(t))+1},eo=function(){return new ro};function ro(){this.reset()}ro.prototype={constructor:ro,reset:function(){this.s=this.t=0},add:function(t){uo(io,t,this.t),uo(this,io.s,this.s),this.s?this.t+=io.t:this.s=io.t},valueOf:function(){return this.s}};var io=new ro;function uo(t,n,e){var r=t.s=n+e,i=r-n,u=r-i;t.t=n-u+(e-i)}var oo=1e-6,ao=Math.PI,co=ao/2,fo=ao/4,so=2*ao,lo=180/ao,ho=ao/180,po=Math.abs,vo=Math.atan,go=Math.atan2,yo=Math.cos,_o=Math.ceil,mo=Math.exp,xo=(Math.floor,Math.log),bo=Math.pow,wo=Math.sin,Mo=Math.sign||function(t){return t>0?1:t<0?-1:0},ko=Math.sqrt,To=Math.tan;function Eo(t){return t>1?0:t<-1?ao:Math.acos(t)}function No(t){return t>1?co:t<-1?-co:Math.asin(t)}function So(t){return(t=wo(t/2))*t}function Ao(){}function Co(t,n){t&&Lo.hasOwnProperty(t.type)&&Lo[t.type](t,n)}var zo={Feature:function(t,n){Co(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,u=yo(n=(n*=ho)/2+fo),o=wo(n),a=Uo*o,c=Do*u+a*yo(i),f=a*r*wo(i);Fo.add(go(f,c)),jo=t,Do=u,Uo=o}var Wo=function(t){return Yo.reset(),Io(t,Bo),2*Yo};function Go(t){return[go(t[1],t[0]),No(t[2])]}function Zo(t){var n=t[0],e=t[1],r=yo(e);return[r*yo(n),r*wo(n),wo(e)]}function Qo(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Jo(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 Ko(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=ko(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,ua,oa,aa,ca,fa,sa,la,ha=eo(),da={point:pa,lineStart:ga,lineEnd:ya,polygonStart:function(){da.point=_a,da.lineStart=ma,da.lineEnd=xa,ha.reset(),Bo.polygonStart()},polygonEnd:function(){Bo.polygonEnd(),da.point=pa,da.lineStart=ga,da.lineEnd=ya,Fo<0?(ea=-(ia=180),ra=-(ua=90)):ha>oo?ua=90:ha<-oo&&(ra=-90),la[0]=ea,la[1]=ia}};function pa(t,n){sa.push(la=[ea=t,ia=t]),nua&&(ua=n)}function va(t,n){var e=Zo([t*ho,n*ho]);if(fa){var r=Jo(fa,e),i=Jo([r[1],-r[0],0],r);na(i),i=Go(i);var u,o=t-oa,a=o>0?1:-1,c=i[0]*lo*a,f=po(o)>180;f^(a*oaua&&(ua=u):f^(a*oa<(c=(c+360)%360-180)&&cua&&(ua=n)),f?tba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>oa?ba(ea,t)>ba(ea,ia)&&(ia=t):ba(t,ia)>ba(ea,ia)&&(ea=t)}else sa.push(la=[ea=t,ia=t]);nua&&(ua=n),fa=e,oa=t}function ga(){da.point=va}function ya(){la[0]=ea,la[1]=ia,da.point=pa,fa=null}function _a(t,n){if(fa){var e=t-oa;ha.add(po(e)>180?e+(e>0?360:-360):e)}else aa=t,ca=n;Bo.point(t,n),va(t,n)}function ma(){Bo.lineStart()}function xa(){_a(aa,ca),Bo.lineEnd(),po(ha)>oo&&(ea=-(ia=180)),la[0]=ea,la[1]=ia,fa=null}function ba(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ma(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:nba(r[0],r[1])&&(r[1]=i[1]),ba(i[0],r[1])>ba(r[0],r[1])&&(r[0]=i[0])):u.push(r=i);for(o=-1/0,n=0,r=u[e=u.length-1];n<=e;r=i,++n)i=u[n],(a=ba(r[1],i[0]))>o&&(o=a,ea=i[0],ia=r[1])}return sa=la=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,ua]]},Fa={sphere:Ao,point:Ya,lineStart:Ha,lineEnd:$a,polygonStart:function(){Fa.lineStart=Wa,Fa.lineEnd=Ga},polygonEnd:function(){Fa.lineStart=Ha,Fa.lineEnd=$a}};function Ya(t,n){t*=ho;var e=yo(n*=ho);Ba(e*yo(t),e*wo(t),wo(n))}function Ba(t,n,e){Ea+=(t-Ea)/++ka,Na+=(n-Na)/ka,Sa+=(e-Sa)/ka}function Ha(){Fa.point=Xa}function Xa(t,n){t*=ho;var e=yo(n*=ho);ja=e*yo(t),Da=e*wo(t),Ua=wo(n),Fa.point=Va,Ba(ja,Da,Ua)}function Va(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=go(ko((o=Da*u-Ua*i)*o+(o=Ua*r-ja*u)*o+(o=ja*i-Da*r)*o),ja*r+Da*i+Ua*u);Ta+=o,Aa+=o*(ja+(ja=r)),Ca+=o*(Da+(Da=i)),za+=o*(Ua+(Ua=u)),Ba(ja,Da,Ua)}function $a(){Fa.point=Ya}function Wa(){Fa.point=Za}function Ga(){Qa(Ra,qa),Fa.point=Ya}function Za(t,n){Ra=t,qa=n,t*=ho,n*=ho,Fa.point=Qa;var e=yo(n);ja=e*yo(t),Da=e*wo(t),Ua=wo(n),Ba(ja,Da,Ua)}function Qa(t,n){t*=ho;var e=yo(n*=ho),r=e*yo(t),i=e*wo(t),u=wo(n),o=Da*u-Ua*i,a=Ua*r-ja*u,c=ja*i-Da*r,f=ko(o*o+a*a+c*c),s=No(f),l=f&&-s/f;La+=l*o,Oa+=l*a,Pa+=l*c,Ta+=s,Aa+=s*(ja+(ja=r)),Ca+=s*(Da+(Da=i)),za+=s*(Ua+(Ua=u)),Ba(ja,Da,Ua)}var Ja=function(t){ka=Ta=Ea=Na=Sa=Aa=Ca=za=La=Oa=Pa=0,Io(t,Fa);var n=La,e=Oa,r=Pa,i=n*n+e*e+r*r;return i<1e-12&&(n=Aa,e=Ca,r=za,Taao?t-so:t<-ao?t+so:t,n]}function ec(t,n,e){return(t%=so)?n||e?tc(ic(t),uc(n,e)):ic(t):n||e?uc(n,e):nc}function rc(t){return function(n,e){return[(n+=t)>ao?n-so:n<-ao?n+so:n,e]}}function ic(t){var n=rc(t);return n.invert=rc(-t),n}function uc(t,n){var e=yo(t),r=wo(t),i=yo(n),u=wo(n);function o(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*e+a*r;return[go(c*i-s*u,a*e-f*r),No(s*i+c*u)]}return o.invert=function(t,n){var o=yo(n),a=yo(t)*o,c=wo(t)*o,f=wo(n),s=f*i-c*u;return[go(c*i+f*u,a*e+s*r),No(s*e-a*r)]},o}nc.invert=nc;var oc=function(t){function n(n){return(n=t(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n}return t=ec(t[0]*ho,t[1]*ho,t.length>2?t[2]*ho:0),n.invert=function(n){return(n=t.invert(n[0]*ho,n[1]*ho))[0]*=lo,n[1]*=lo,n},n};function ac(t,n,e,r,i,u){if(e){var o=yo(n),a=wo(n),c=r*e;null==i?(i=n+r*so,u=n-c/2):(i=cc(o,i),u=cc(o,u),(r>0?iu)&&(i+=r*so));for(var f,s=i;r>0?s>u:s1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},lc=function(t,n){return po(t[0]-n[0])=0;--u)i.point((s=f[u])[0],s[1]);else r(h.x,h.p.x,-1,i);h=h.p}f=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function pc(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,k=M*w,T=k>ao,E=p*x;if(vc.add(go(E*M*wo(k),v*b+E*yo(k))),u+=T?w+M*so:w,T^h>=e^_>=e){var N=Jo(Zo(l),Zo(y));na(N);var S=Jo(i,N);na(S);var A=(T^w>=0?-1:1)*No(S[2]);(r>A||r===A&&(N[0]||N[1]))&&(o+=T^w>=0?1:-1)}}return(u<-oo||u0){for(h||(u.polygonStart(),h=!0),u.lineStart(),t=0;t1&&2&i&&f.push(f.pop().concat(f.shift())),a.push(f.filter(_c))}return d}};function _c(t){return t.length>1}function mc(t,n){return((t=t.x)[0]<0?t[1]-co-oo:co-t[1])-((n=n.x)[0]<0?n[1]-co-oo:co-n[1])}var xc=yc((function(){return!0}),(function(t){var n,e=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(u,o){var a=u>0?ao:-ao,c=po(u-e);po(c-ao)0?co:-co),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(u,r),n=0):i!==a&&c>=ao&&(po(e-i)oo?vo((wo(n)*(u=yo(r))*wo(e)-wo(r)*(i=yo(n))*wo(t))/(i*u*o)):(n+r)/2}(e,r,u,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),n=0),t.point(e=u,r=o),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*co,r.point(-ao,i),r.point(0,i),r.point(ao,i),r.point(ao,0),r.point(ao,-i),r.point(0,-i),r.point(-ao,-i),r.point(-ao,0),r.point(-ao,i);else if(po(t[0]-n[0])>oo){var u=t[0]0,i=po(n)>oo;function u(t,e){return yo(t)*yo(e)>n}function o(t,e,r){var i=[1,0,0],u=Jo(Zo(t),Zo(e)),o=Qo(u,u),a=u[0],c=o-a*a;if(!c)return!r&&t;var f=n*o/c,s=-n*a/c,l=Jo(i,u),h=ta(i,f);Ko(h,ta(u,s));var d=l,p=Qo(h,d),v=Qo(d,d),g=p*p-v*(Qo(h,h)-1);if(!(g<0)){var y=ko(g),_=ta(d,(-p-y)/v);if(Ko(_,h),_=Go(_),!r)return _;var m,x=t[0],b=e[0],w=t[1],M=e[1];b0^_[1]<(po(_[0]-x)ao^(x<=_[0]&&_[0]<=b)){var E=ta(d,(-p+y)/v);return Ko(E,h),[_,Go(E)]}}}function a(n,e){var i=r?t:ao-t,u=0;return n<-i?u|=1:n>i&&(u|=2),e<-i?u|=4:e>i&&(u|=8),u}return yc(u,(function(t){var n,e,c,f,s;return{lineStart:function(){f=c=!1,s=1},point:function(l,h){var d,p=[l,h],v=u(l,h),g=r?v?0:a(l,h):v?a(l+(l<0?ao:-ao),h):0;if(!n&&(f=c=v)&&t.lineStart(),v!==c&&(!(d=o(n,p))||lc(n,d)||lc(p,d))&&(p[0]+=oo,p[1]+=oo,v=u(p[0],p[1])),v!==c)s=0,v?(t.lineStart(),d=o(p,n),t.point(d[0],d[1])):(d=o(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=o(p,n,!0))||(s=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&lc(n,p)||t.point(p[0],p[1]),n=p,c=v,e=g},lineEnd:function(){c&&t.lineEnd(),n=null},clean:function(){return s|(f&&c)<<1}}}),(function(n,r,i,u){ac(u,t,e,i,n,r)}),r?[0,-t]:[-ao,t-ao])},wc=function(t,n,e,r,i,u){var o,a=t[0],c=t[1],f=0,s=1,l=n[0]-a,h=n[1]-c;if(o=e-a,l||!(o>0)){if(o/=l,l<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=i-a,l||!(o<0)){if(o/=l,l<0){if(o>s)return;o>f&&(f=o)}else if(l>0){if(o0)){if(o/=h,h<0){if(o0){if(o>s)return;o>f&&(f=o)}if(o=u-c,h||!(o<0)){if(o/=h,h<0){if(o>s)return;o>f&&(f=o)}else if(h>0){if(o0&&(t[0]=a+f*l,t[1]=c+f*h),s<1&&(n[0]=a+s*l,n[1]=c+s*h),!0}}}}},Mc=1e9,kc=-Mc;function Tc(t,n,e,i){function u(r,u){return t<=r&&r<=e&&n<=u&&u<=i}function o(r,u,o,c){var s=0,l=0;if(null==r||(s=a(r,o))!==(l=a(u,o))||f(r,u)<0^o>0)do{c.point(0===s||3===s?t:e,s>1?i:n)}while((s=(s+o+4)%4)!==l);else c.point(u[0],u[1])}function a(r,i){return po(r[0]-t)0?0:3:po(r[0]-e)0?2:1:po(r[1]-n)0?1:0:i>0?3:2}function c(t,n){return f(t.x,n.x)}function f(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var f,s,l,h,d,p,v,g,y,_,m,x=a,b=sc(),w={point:M,lineStart:function(){w.point=k,s&&s.push(l=[]),_=!0,y=!1,v=g=NaN},lineEnd:function(){f&&(k(h,d),p&&y&&b.rejoin(),f.push(b.result())),w.point=M,y&&x.lineEnd()},polygonStart:function(){x=b,f=[],s=[],m=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=s.length;ei&&(h-u)*(i-o)>(d-o)*(t-u)&&++n:d<=i&&(h-u)*(i-o)<(d-o)*(t-u)&&--n;return n}(),e=m&&n,u=(f=Object(r.n)(f)).length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),u&&dc(f,c,n,o,a),a.polygonEnd()),x=a,f=s=l=null}};function M(t,n){u(t,n)&&x.point(t,n)}function k(r,o){var a=u(r,o);if(s&&l.push([r,o]),_)h=r,d=o,p=a,_=!1,a&&(x.lineStart(),x.point(r,o));else if(a&&y)x.point(r,o);else{var c=[v=Math.max(kc,Math.min(Mc,v)),g=Math.max(kc,Math.min(Mc,g))],f=[r=Math.max(kc,Math.min(Mc,r)),o=Math.max(kc,Math.min(Mc,o))];wc(c,f,t,n,e,i)?(y||(x.lineStart(),x.point(c[0],c[1])),x.point(f[0],f[1]),a||x.lineEnd(),m=!1):a&&(x.lineStart(),x.point(r,o),m=!1)}v=r,g=o,y=a}return w}}var Ec,Nc,Sc,Ac=function(){var t,n,e,r=0,i=0,u=960,o=500;return e={stream:function(e){return t&&n===e?t:t=Tc(r,i,u,o)(n=e)},extent:function(a){return arguments.length?(r=+a[0][0],i=+a[0][1],u=+a[1][0],o=+a[1][1],t=n=null,e):[[r,i],[u,o]]}}},Cc=eo(),zc={sphere:Ao,point:Ao,lineStart:function(){zc.point=Oc,zc.lineEnd=Lc},lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao};function Lc(){zc.point=zc.lineEnd=Ao}function Oc(t,n){Ec=t*=ho,Nc=wo(n*=ho),Sc=yo(n),zc.point=Pc}function Pc(t,n){t*=ho;var e=wo(n*=ho),r=yo(n),i=po(t-Ec),u=yo(i),o=r*wo(i),a=Sc*e-Nc*r*u,c=Nc*e+Sc*r*u;Cc.add(go(ko(o*o+a*a),c)),Ec=t,Nc=e,Sc=r}var Rc=function(t){return Cc.reset(),Io(t,zc),+Cc},qc=[null,null],jc={type:"LineString",coordinates:qc},Dc=function(t,n){return qc[0]=t,qc[1]=n,Rc(jc)},Uc={Feature:function(t,n){return Fc(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++roo})).map(f)).concat(Object(r.s)(_o(o/p)*p,u,p).filter((function(t){return po(t%g)>oo})).map(s))}return _.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},_.outline=function(){return{type:"Polygon",coordinates:[l(i).concat(h(a).slice(1),l(e).reverse().slice(1),h(c).reverse().slice(1))]}},_.extent=function(t){return arguments.length?_.extentMajor(t).extentMinor(t):_.extentMinor()},_.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],c=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),c>a&&(t=c,c=a,a=t),_.precision(y)):[[i,c],[e,a]]},_.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],o=+e[0][1],u=+e[1][1],n>t&&(e=n,n=t,t=e),o>u&&(e=o,o=u,u=e),_.precision(y)):[[n,o],[t,u]]},_.step=function(t){return arguments.length?_.stepMajor(t).stepMinor(t):_.stepMinor()},_.stepMajor=function(t){return arguments.length?(v=+t[0],g=+t[1],_):[v,g]},_.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],_):[d,p]},_.precision=function(r){return arguments.length?(y=+r,f=Wc(o,u,90),s=Gc(n,t,y),l=Wc(c,a,90),h=Gc(i,e,y),_):y},_.extentMajor([[-180,-90+oo],[180,90-oo]]).extentMinor([[-180,-80-oo],[180,80+oo]])}function Qc(){return Zc()()}var Jc,Kc,tf,nf,ef=function(t,n){var e=t[0]*ho,r=t[1]*ho,i=n[0]*ho,u=n[1]*ho,o=yo(r),a=wo(r),c=yo(u),f=wo(u),s=o*yo(e),l=o*wo(e),h=c*yo(i),d=c*wo(i),p=2*No(ko(So(u-r)+o*c*So(i-e))),v=wo(p),g=p?function(t){var n=wo(t*=p)/v,e=wo(p-t)/v,r=e*s+n*h,i=e*l+n*d,u=e*a+n*f;return[go(i,r)*lo,go(u,ko(r*r+i*i))*lo]}:function(){return[e*lo,r*lo]};return g.distance=p,g},rf=function(t){return t},uf=eo(),of=eo(),af={point:Ao,lineStart:Ao,lineEnd:Ao,polygonStart:function(){af.lineStart=cf,af.lineEnd=lf},polygonEnd:function(){af.lineStart=af.lineEnd=af.point=Ao,uf.add(po(of)),of.reset()},result:function(){var t=uf/2;return uf.reset(),t}};function cf(){af.point=ff}function ff(t,n){af.point=sf,Jc=tf=t,Kc=nf=n}function sf(t,n){of.add(nf*t-tf*n),tf=t,nf=n}function lf(){sf(Jc,Kc)}var hf,df,pf,vf,gf=af,yf=1/0,_f=yf,mf=-yf,xf=mf,bf={point:function(t,n){tmf&&(mf=t),n<_f&&(_f=n),n>xf&&(xf=n)},lineStart:Ao,lineEnd:Ao,polygonStart:Ao,polygonEnd:Ao,result:function(){var t=[[yf,_f],[mf,xf]];return mf=xf=-(_f=yf=1/0),t}},wf=0,Mf=0,kf=0,Tf=0,Ef=0,Nf=0,Sf=0,Af=0,Cf=0,zf={point:Lf,lineStart:Of,lineEnd:qf,polygonStart:function(){zf.lineStart=jf,zf.lineEnd=Df},polygonEnd:function(){zf.point=Lf,zf.lineStart=Of,zf.lineEnd=qf},result:function(){var t=Cf?[Sf/Cf,Af/Cf]:Nf?[Tf/Nf,Ef/Nf]:kf?[wf/kf,Mf/kf]:[NaN,NaN];return wf=Mf=kf=Tf=Ef=Nf=Sf=Af=Cf=0,t}};function Lf(t,n){wf+=t,Mf+=n,++kf}function Of(){zf.point=Pf}function Pf(t,n){zf.point=Rf,Lf(pf=t,vf=n)}function Rf(t,n){var e=t-pf,r=n-vf,i=ko(e*e+r*r);Tf+=i*(pf+t)/2,Ef+=i*(vf+n)/2,Nf+=i,Lf(pf=t,vf=n)}function qf(){zf.point=Lf}function jf(){zf.point=Uf}function Df(){If(hf,df)}function Uf(t,n){zf.point=If,Lf(hf=pf=t,df=vf=n)}function If(t,n){var e=t-pf,r=n-vf,i=ko(e*e+r*r);Tf+=i*(pf+t)/2,Ef+=i*(vf+n)/2,Nf+=i,Sf+=(i=vf*t-pf*n)*(pf+t),Af+=i*(vf+n),Cf+=3*i,Lf(pf=t,vf=n)}var Ff=zf;function Yf(t){this._context=t}Yf.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,so)}},result:Ao};var Bf,Hf,Xf,Vf,$f,Wf=eo(),Gf={point:Ao,lineStart:function(){Gf.point=Zf},lineEnd:function(){Bf&&Qf(Hf,Xf),Gf.point=Ao},polygonStart:function(){Bf=!0},polygonEnd:function(){Bf=null},result:function(){var t=+Wf;return Wf.reset(),t}};function Zf(t,n){Gf.point=Qf,Hf=Vf=t,Xf=$f=n}function Qf(t,n){Vf-=t,$f-=n,Wf.add(ko(Vf*Vf+$f*$f)),Vf=t,$f=n}var Jf=Gf;function Kf(){this._string=[]}function ts(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Kf.prototype={_radius:4.5,_circle:ts(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=ts(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}};var ns=function(t,n){var e,r,i=4.5;function u(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Io(t,e(r))),r.result()}return u.area=function(t){return Io(t,e(gf)),gf.result()},u.measure=function(t){return Io(t,e(Jf)),Jf.result()},u.bounds=function(t){return Io(t,e(bf)),bf.result()},u.centroid=function(t){return Io(t,e(Ff)),Ff.result()},u.projection=function(n){return arguments.length?(e=null==n?(t=null,rf):(t=n).stream,u):t},u.context=function(t){return arguments.length?(r=null==t?(n=null,new Kf):new Yf(n=t),"function"!=typeof i&&r.pointRadius(i),u):n},u.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),u):i},u.projection(t).context(n)},es=function(t){return{stream:rs(t)}};function rs(t){return function(n){var e=new is;for(var r in t)e[r]=t[r];return e.stream=n,e}}function is(){}function us(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Io(e,t.stream(bf)),n(bf.result()),null!=r&&t.clipExtent(r),t}function os(t,n,e){return us(t,(function(e){var r=n[1][0]-n[0][0],i=n[1][1]-n[0][1],u=Math.min(r/(e[1][0]-e[0][0]),i/(e[1][1]-e[0][1])),o=+n[0][0]+(r-u*(e[1][0]+e[0][0]))/2,a=+n[0][1]+(i-u*(e[1][1]+e[0][1]))/2;t.scale(150*u).translate([o,a])}),e)}function as(t,n,e){return os(t,[[0,0],n],e)}function cs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][0]-e[0][0]),u=(r-i*(e[1][0]+e[0][0]))/2,o=-i*e[0][1];t.scale(150*i).translate([u,o])}),e)}function fs(t,n,e){return us(t,(function(e){var r=+n,i=r/(e[1][1]-e[0][1]),u=-i*e[0][0],o=(r-i*(e[1][1]+e[0][1]))/2;t.scale(150*i).translate([u,o])}),e)}is.prototype={constructor:is,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 ss=16,ls=yo(30*ho),hs=function(t,n){return+n?function(t,n){function e(r,i,u,o,a,c,f,s,l,h,d,p,v,g){var y=f-r,_=s-i,m=y*y+_*_;if(m>4*n&&v--){var x=o+h,b=a+d,w=c+p,M=ko(x*x+b*b+w*w),k=No(w/=M),T=po(po(w)-1)n||po((y*A+_*C)/m-.5)>.3||o*h+a*d+c*p2?t[2]%360*ho:0,S()):[g*lo,y*lo,_*lo]},T.precision=function(t){return arguments.length?(k=hs(N,M=t*t),A()):ko(M)},T.fitExtent=function(t,n){return os(T,t,n)},T.fitSize=function(t,n){return as(T,t,n)},T.fitWidth=function(t,n){return cs(T,t,n)},T.fitHeight=function(t,n){return fs(T,t,n)},function(){return n=t.apply(this,arguments),T.invert=n.invert&&E,S()}}function gs(t){var n=0,e=ao/3,r=vs(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*ho,e=t[1]*ho):[n*lo,e*lo]},i}function ys(t,n){var e=wo(t),r=(e+wo(n))/2;if(po(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},s.stream=function(e){return t&&n===e?t:(r=[o.stream(n=e),a.stream(e),c.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-co+oo&&(n=-co+oo):n>co-oo&&(n=co-oo);var e=i/bo(Cs(n),r);return[e*wo(r*t),i-e*yo(r*t)]}return u.invert=function(t,n){var e=i-n,u=Mo(r)*ko(t*t+e*e);return[go(t,po(e))/r*Mo(e),2*vo(bo(i/u,1/r))-co]},u}var Ls=function(){return gs(zs).scale(109.5).parallels([30,30])};function Os(t,n){return[t,n]}Os.invert=Os;var Ps=function(){return ps(Os).scale(152.63)};function Rs(t,n){var e=yo(t),r=t===n?wo(t):(e-yo(n))/(n-t),i=e/r+t;if(po(r)oo&&--i>0);return[t/(.8707+(u=r*r)*(u*(u*u*u*(.003971-.001529*u)-.013791)-.131979)),r]};var Ys=function(){return ps(Fs).scale(175.295)};function Bs(t,n){return[yo(n)*wo(t),wo(n)]}Bs.invert=ws(No);var Hs=function(){return ps(Bs).scale(249.5).clipAngle(90+oo)};function Xs(t,n){var e=yo(n),r=1+yo(t)*e;return[e*wo(t)/r,wo(n)/r]}Xs.invert=ws((function(t){return 2*vo(t)}));var Vs=function(){return ps(Xs).scale(250).clipAngle(142)};function $s(t,n){return[xo(To((co+n)/2)),-t]}$s.invert=function(t,n){return[-n,2*vo(mo(t))-co]};var Ws=function(){var t=As($s),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)};function Gs(t,n){return t.parent===n.parent?1:2}function Zs(t,n){return t+n.x}function Qs(t,n){return Math.max(t,n.y)}var Js=function(){var t=Gs,n=1,e=1,r=!1;function i(i){var u,o=0;i.eachAfter((function(n){var e=n.children;e?(n.x=function(t){return t.reduce(Zs,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Qs,0)}(e)):(n.x=u?o+=t(n,u):0,n.y=0,u=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),f=a.x-t(a,c)/2,s=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-f)/(s-f)*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};function Ks(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 tl(t,n){var e,r,i,u,o,a=new il(t),c=+t.value&&(a.value=t.value),f=[a];for(null==n&&(n=nl);e=f.pop();)if(c&&(e.value=+e.data.value),(i=n(e.data))&&(o=i.length))for(e.children=new Array(o),u=o-1;u>=0;--u)f.push(r=e.children[u]=new il(i[u])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(rl)}function nl(t){return t.children}function el(t){t.data=t.data.data}function rl(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function il(t){this.data=t,this.depth=this.height=0,this.parent=null}il.prototype=tl.prototype={constructor:il,count:function(){return this.eachAfter(Ks)},each:function(t){var n,e,r,i,u=this,o=[u];do{for(n=o.reverse(),o=[];u=n.pop();)if(t(u),e=u.children)for(r=0,i=e.length;r=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 tl(this).eachBefore(el)}};var ul=Array.prototype.slice,ol=function(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}(ul.call(t))).length,u=[];r0&&e*e>r*r+i*i}function sl(t,n){for(var e=0;ee*e+r*r}function gl(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,u=(n.y*e.r+e.y*n.r)/r;return i*i+u*u}function yl(t){this._=t,this.next=null,this.previous=null}function _l(t){if(!(i=t.length))return 0;var n,e,r,i,u,o,a,c,f,s,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;pl(e,n,r=t[2]),n=new yl(n),e=new yl(e),r=new yl(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return u}return e.id=function(n){return arguments.length?(t=xl(n),e):t},e.parentId=function(t){return arguments.length?(n=xl(t),e):n},e};function jl(t,n){return t.parent===n.parent?1:2}function Dl(t){var n=t.children;return n?n[0]:t.t}function Ul(t){var n=t.children;return n?n[n.length-1]:t.t}function Il(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 Fl(t,n,e){return t.a.parent===n.parent?t.a:e}function Yl(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}Yl.prototype=Object.create(il.prototype);var Bl=function(){var t=jl,n=1,e=1,r=null;function i(i){var c=function(t){for(var n,e,r,i,u,o=new Yl(t,0),a=[o];n=a.pop();)if(r=n._.children)for(n.children=new Array(u=r.length),i=u-1;i>=0;--i)a.push(e=n.children[i]=new Yl(r[i],i)),e.parent=n;return(o.parent=new Yl(null,0)).children=[o],o}(i);if(c.eachAfter(u),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(a);else{var f=i,s=i,l=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>l.depth&&(l=t)}));var h=f===s?1:t(f,s)/2,d=h-f.x,p=n/(s.x+h+d),v=e/(l.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*v}))}return i}function u(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,u=i.length;--u>=0;)(n=i[u]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n);var u=(e[0].z+e[e.length-1].z)/2;i?(n.z=i.z+t(n._,i._),n.m=n.z-u):n.z=u}else i&&(n.z=i.z+t(n._,i._));n.parent.A=function(n,e,r){if(e){for(var i,u=n,o=n,a=e,c=u.parent.children[0],f=u.m,s=o.m,l=a.m,h=c.m;a=Ul(a),u=Dl(u),a&&u;)c=Dl(c),(o=Ul(o)).a=n,(i=a.z+l-u.z-f+t(a._,u._))>0&&(Il(Fl(a,n,r),n,i),f+=i,s+=i),l+=a.m,f+=u.m,h+=c.m,s+=o.m;a&&!Ul(o)&&(o.t=a,o.m+=l-s),u&&!Dl(c)&&(c.t=u,c.m+=f-h,r=n)}return r}(n,i,n.parent.A||r[0])}function o(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},Hl=function(t,n,e,r,i){for(var u,o=t.children,a=-1,c=o.length,f=t.value&&(i-e)/t.value;++ah&&(h=a),g=s*s*v,(d=Math.max(h/g,g/l))>p){s-=a;break}p=d}y.push(o={value:s,dice:c1?n:1)},e}(Xl),Wl=function(){var t=$l,n=!1,e=1,r=1,i=[0],u=bl,o=bl,a=bl,c=bl,f=bl;function s(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(l),i=[0],n&&t.eachBefore(Sl),t}function l(n){var e=i[n.depth],r=n.x0+e,s=n.y0+e,l=n.x1-e,h=n.y1-e;l=e-1){var s=a[n];return s.x0=i,s.y0=u,s.x1=o,void(s.y1=c)}for(var l=f[n],h=r/2+l,d=n+1,p=e-1;d>>1;f[v]c-u){var _=(i*y+o*g)/r;t(n,d,g,i,u,_,c),t(d,e,y,_,u,o,c)}else{var m=(u*y+c*g)/r;t(n,d,g,i,u,o,m),t(d,e,y,i,m,o,c)}}(0,c,t.value,n,e,r,i)},Zl=function(t,n,e,r,i){(1&t.depth?Hl:Al)(t,n,e,r,i)},Ql=function t(n){function e(t,e,r,i,u){if((o=t._squarify)&&o.ratio===n)for(var o,a,c,f,s,l=-1,h=o.length,d=t.value;++l1?n:1)},e}(Xl),Jl=function(t){for(var n,e=-1,r=t.length,i=t[r-1],u=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)f.push(t[r[u[n]][2]]);for(n=+a;na!=f>a&&o<(c-e)*(a-r)/(f-r)+e&&(s=!s),c=e,f=r;return s},uh=function(t){for(var n,e,r=-1,i=t.length,u=t[i-1],o=u[0],a=u[1],c=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new ch(t)}ch.prototype=dh.prototype={constructor:ch,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=oh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),fh(this),this},abort:function(){return null==this._error&&lh(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))},hh(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,hh(this),this}};var ph=function(){return Math.random()},vh=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}(ph),gh=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var u;if(null!=r)u=r,r=null;else do{r=2*n()-1,u=2*n()-1,i=r*r+u*u}while(!i||i>1);return t+e*u*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(ph),yh=function t(n){function e(){var t=gh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),_h=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,c)}catch(t){return void o.call("error",e,t)}else n=c;o.call("load",e,n)}else o.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){o.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?(u=t,e):u},timeout:function(t){return arguments.length?(l=+t,e):l},user:function(t){return arguments.length<1?f:(f=null==t?null:t+"",e)},password:function(t){return arguments.length<1?s:(s=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,f,s),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!=u&&(c.responseType=u),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)})),o.call("beforesend",e,c),c.send(null==i?null:i),e},abort:function(){return c.abort(),e},on:function(){var t=o.on.apply(o,arguments);return t===o?e:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return e.get(n)}return e},wh=function(t,n){return function(e,r){var i=bh(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Mh=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),kh=wh("application/json",(function(t){return JSON.parse(t.responseText)})),Th=wh("text/plain",(function(t){return t.responseText})),Eh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),Nh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var u=bh(e).mimeType(t);return u.row=function(t){return arguments.length?u.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},u.row(r),i?u.get(i):u}},Sh=Nh("text/csv",ru),Ah=Nh("text/tab-separated-values",cu),Ch=Array.prototype,zh=Ch.map,Lh=Ch.slice,Oh={name:"implicit"};function Ph(t){var n=Object(Wi.c)(),e=[],r=Oh;function i(i){var u=i+"",o=n.get(u);if(!o){if(r!==Oh)return r;n.set(u,o=e.push(i))}return t[(o-1)%t.length]}return t=null==t?[]:Lh.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Wi.c)();for(var r,u,o=-1,a=t.length;++o2?Yh:Fh,r=i=null,s}function s(n){return(r||(r=e(u,o,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 s.invert=function(t){return(i||(i=e(o,u,Ih,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)},s.domain=function(t){return arguments.length?(u=zh.call(t,Dh),f()):u.slice()},s.range=function(t){return arguments.length?(o=Lh.call(t),f()):o.slice()},s.rangeRound=function(t){return o=Lh.call(t),a=ue,f()},s.clamp=function(t){return arguments.length?(c=!!t,f()):c},s.interpolate=function(t){return arguments.length?(a=t,f()):a},f()}var Xh=function(t,n,e){var i,u=t[0],o=t[t.length-1],a=Object(r.A)(u,o,null==n?10:n);switch((e=Hu(null==e?",f":e)).type){case"s":var c=Math.max(Math.abs(u),Math.abs(o));return null!=e.precision||isNaN(i=to(a,c))||(e.precision=i),Wu(e,c);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=no(a,Math.max(Math.abs(u),Math.abs(o))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=Ku(a))||(e.precision=i-2*("%"===e.type))}return $u(e)};function Vh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Xh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,u=n(),o=0,a=u.length-1,c=u[o],f=u[a];return f0?(c=Math.floor(c/i)*i,f=Math.ceil(f/i)*i,i=Object(r.z)(c,f,e)):i<0&&(c=Math.ceil(c*i)/i,f=Math.floor(f*i)/i,i=Object(r.z)(c,f,e)),i>0?(u[o]=Math.floor(c/i)*i,u[a]=Math.ceil(f/i)*i,n(u)):i<0&&(u[o]=Math.ceil(c*i)/i,u[a]=Math.floor(f*i)/i,n(u)),t},t}function $h(){var t=Hh(Ih,Kn);return t.copy=function(){return Bh(t,$h())},Vh(t)}function Wh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=zh.call(e,Dh),n):t.slice()},n.copy=function(){return Wh().domain(t)},Vh(n)}var Gh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,u=t[r],o=t[i];return o0){for(;df)break;g.push(h)}}else for(;d=1;--l)if(!((h=s*l)f)break;g.push(h)}}else g=Object(r.B)(d,p,Math.min(p-d,v)).map(u);return o?g.reverse():g},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=$u(r)),n===1/0)return r;null==n&&(n=10);var o=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/u(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[o-1],i[o]]},o.copy=function(){return ad().domain([t,n]).range(u)},Vh(o)}function cd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Lh.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Lh.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return cd().domain(t).range(n)},i}var fd=new Date,sd=new Date;function ld(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-n0))return a;do{a.push(o=new Date(+e)),n(e,u),t(e)}while(o=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 fd.setTime(+n),sd.setTime(+r),t(fd),t(sd),Math.floor(e(fd,sd))},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 hd=ld((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ld((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,gd=6048e5,yd=ld((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),_d=yd,md=yd.range,xd=ld((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),bd=xd,wd=xd.range,Md=ld((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),kd=Md,Td=Md.range,Ed=ld((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())*vd)/864e5}),(function(t){return t.getDate()-1})),Nd=Ed,Sd=Ed.range;function Ad(t){return ld((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())*vd)/gd}))}var Cd=Ad(0),zd=Ad(1),Ld=Ad(2),Od=Ad(3),Pd=Ad(4),Rd=Ad(5),qd=Ad(6),jd=Cd.range,Dd=zd.range,Ud=Ld.range,Id=Od.range,Fd=Pd.range,Yd=Rd.range,Bd=qd.range,Hd=ld((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()})),Xd=Hd,Vd=Hd.range,$d=ld((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()}));$d.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((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 Wd=$d,Gd=$d.range,Zd=ld((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Zd,Jd=Zd.range,Kd=ld((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Kd,np=Kd.range,ep=ld((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function up(t){return ld((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)/gd}))}var op=up(0),ap=up(1),cp=up(2),fp=up(3),sp=up(4),lp=up(5),hp=up(6),dp=op.range,pp=ap.range,vp=cp.range,gp=fp.range,yp=sp.range,_p=lp.range,mp=hp.range,xp=ld((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()})),bp=xp,wp=xp.range,Mp=ld((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()}));Mp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ld((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 kp=Mp,Tp=Mp.range;function Ep(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 Np(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 Sp(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Ap(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,u=t.days,o=t.shortDays,a=t.months,c=t.shortMonths,f=Fp(i),s=Yp(i),l=Fp(u),h=Yp(u),d=Fp(o),p=Yp(o),v=Fp(a),g=Yp(a),y=Fp(c),_=Yp(c),m={a:function(t){return o[t.getDay()]},A:function(t){return u[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:cv,e:cv,f:dv,H:fv,I:sv,j:lv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Bv,s:Hv,S:gv,u:yv,U:_v,V:mv,w:xv,W:bv,x:null,X:null,y:wv,Y:Mv,Z:kv,"%":Yv},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return u[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Tv,e:Tv,f:Cv,H:Ev,I:Nv,j:Sv,L:Av,m:zv,M:Lv,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Bv,s:Hv,S:Ov,u:Pv,U:Rv,V:qv,w:jv,W:Dv,x:null,X:null,y:Uv,Y:Iv,Z:Fv,"%":Yv},b={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[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=y.exec(n.slice(e));return r?(t.m=_[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 k(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Kp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.p=s[r[0].toLowerCase()],e+r[0].length):-1},Q:ov,s:av,S:ev,u:Hp,U:Xp,V:Vp,w:Bp,W:$p,x:function(t,n,r){return k(t,e,n,r)},X:function(t,n,e){return k(t,r,n,e)},y:Gp,Y:Wp,Z:Zp,"%":uv};function w(t,n){return function(e){var r,i,u,o=[],a=-1,c=0,f=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in u||(u.w=1),"Z"in u?(r=(i=(r=Np(Sp(u.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(u.V-1)),u.y=r.getUTCFullYear(),u.m=r.getUTCMonth(),u.d=r.getUTCDate()+(u.w+6)%7):(r=(i=(r=n(Sp(u.y))).getDay())>4||0===i?zd.ceil(r):zd(r),r=Nd.offset(r,7*(u.V-1)),u.y=r.getFullYear(),u.m=r.getMonth(),u.d=r.getDate()+(u.w+6)%7)}else("W"in u||"U"in u)&&("w"in u||(u.w="u"in u?u.u%7:"W"in u?1:0),i="Z"in u?Np(Sp(u.y)).getUTCDay():n(Sp(u.y)).getDay(),u.m=0,u.d="W"in u?(u.w+6)%7+7*u.W-(i+5)%7:u.w+7*u.U-(i+6)%7);return"Z"in u?(u.H+=u.Z/100|0,u.M+=u.Z%100,Np(u)):n(u)}}function k(t,n,e,r){for(var i,u,o=0,a=n.length,c=e.length;o=c)return-1;if(37===(i=n.charCodeAt(o++))){if(i=n.charAt(o++),!(u=b[i in Rp?n.charAt(o++):i])||(r=u(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+="",Ep);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,Np);return n.toString=function(){return t},n}}}var Cp,zp,Lp,Op,Pp,Rp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,jp=/^%/,Dp=/[\\^$*+?|[\]().{}]/g;function Up(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",u=i.length;return r+(u68?1900:2e3),e+r[0].length):-1}function Zp(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 Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Kp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function uv(t,n,e){var r=jp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function ov(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function cv(t,n){return Up(t.getDate(),n,2)}function fv(t,n){return Up(t.getHours(),n,2)}function sv(t,n){return Up(t.getHours()%12||12,n,2)}function lv(t,n){return Up(1+Nd.count(Wd(t),t),n,3)}function hv(t,n){return Up(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return Up(t.getMonth()+1,n,2)}function vv(t,n){return Up(t.getMinutes(),n,2)}function gv(t,n){return Up(t.getSeconds(),n,2)}function yv(t){var n=t.getDay();return 0===n?7:n}function _v(t,n){return Up(Cd.count(Wd(t),t),n,2)}function mv(t,n){var e=t.getDay();return t=e>=4||0===e?Pd(t):Pd.ceil(t),Up(Pd.count(Wd(t),t)+(4===Wd(t).getDay()),n,2)}function xv(t){return t.getDay()}function bv(t,n){return Up(zd.count(Wd(t),t),n,2)}function wv(t,n){return Up(t.getFullYear()%100,n,2)}function Mv(t,n){return Up(t.getFullYear()%1e4,n,4)}function kv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Up(n/60|0,"0",2)+Up(n%60,"0",2)}function Tv(t,n){return Up(t.getUTCDate(),n,2)}function Ev(t,n){return Up(t.getUTCHours(),n,2)}function Nv(t,n){return Up(t.getUTCHours()%12||12,n,2)}function Sv(t,n){return Up(1+rp.count(kp(t),t),n,3)}function Av(t,n){return Up(t.getUTCMilliseconds(),n,3)}function Cv(t,n){return Av(t,n)+"000"}function zv(t,n){return Up(t.getUTCMonth()+1,n,2)}function Lv(t,n){return Up(t.getUTCMinutes(),n,2)}function Ov(t,n){return Up(t.getUTCSeconds(),n,2)}function Pv(t){var n=t.getUTCDay();return 0===n?7:n}function Rv(t,n){return Up(op.count(kp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?sp(t):sp.ceil(t),Up(sp.count(kp(t),t)+(4===kp(t).getUTCDay()),n,2)}function jv(t){return t.getUTCDay()}function Dv(t,n){return Up(ap.count(kp(t),t),n,2)}function Uv(t,n){return Up(t.getUTCFullYear()%100,n,2)}function Iv(t,n){return Up(t.getUTCFullYear()%1e4,n,4)}function Fv(){return"+0000"}function Yv(){return"%"}function Bv(t){return+t}function Hv(t){return Math.floor(+t/1e3)}function Xv(t){return Cp=Ap(t),zp=Cp.format,Lp=Cp.parse,Op=Cp.utcFormat,Pp=Cp.utcParse,Cp}Xv({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 Vv=Date.prototype.toISOString?function(t){return t.toISOString()}:Op("%Y-%m-%dT%H:%M:%S.%LZ"),$v=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:Pp("%Y-%m-%dT%H:%M:%S.%LZ"),Wv=1e3,Gv=60*Wv,Zv=60*Gv,Qv=24*Zv,Jv=7*Qv,Kv=30*Qv,tg=365*Qv;function ng(t){return new Date(t)}function eg(t){return t instanceof Date?+t:+new Date(+t)}function rg(t,n,e,i,u,o,a,c,f){var s=Hh(Ih,Kn),l=s.invert,h=s.domain,d=f(".%L"),p=f(":%S"),v=f("%I:%M"),g=f("%I %p"),y=f("%a %d"),_=f("%b %d"),m=f("%B"),x=f("%Y"),b=[[a,1,Wv],[a,5,5*Wv],[a,15,15*Wv],[a,30,30*Wv],[o,1,Gv],[o,5,5*Gv],[o,15,15*Gv],[o,30,30*Gv],[u,1,Zv],[u,3,3*Zv],[u,6,6*Zv],[u,12,12*Zv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Kv],[n,3,3*Kv],[t,1,tg]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return pg.h=360*t-100,pg.s=1.5-1.5*n,pg.l=.8-.9*n,pg+""};function gg(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var yg=gg(og("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),_g=gg(og("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),mg=gg(og("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xg=gg(og("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function bg(t){var n=0,e=1,r=!1;function i(i){var u=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,u)):u)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return bg(t).domain([n,e]).clamp(r)},Vh(i)}var wg=e(5),Mg=function(t){return function(){return t}};function kg(t){return t[0]}function Tg(t){return t[1]}function Eg(){this._=null}function Ng(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Sg(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 Ag(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 Cg(t){for(;t.L;)t=t.L;return t}Eg.prototype={constructor:Eg,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=Cg(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&&(Sg(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ag(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ag(this,e),e=(t=e).U),e.C=!1,r.C=!0,Sg(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,u=t.L,o=t.R;if(e=u?o?Cg(o):u:o,i?i.L===t?i.L=e:i.R=e:this._=e,u&&o?(r=e.C,e.C=t.C,e.L=u,u.U=e,e!==o?(i=e.U,e.U=t.U,t=e.R,i.L=t,e.R=o,o.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,Sg(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,Ag(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Sg(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ag(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,Sg(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ag(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var zg=Eg;function Lg(t,n,e,r){var i=[null,null],u=ty.push(i)-1;return i.left=t,i.right=n,e&&Pg(i,t,n,e),r&&Pg(i,n,t,r),Jg[t.index].halfedges.push(u),Jg[n.index].halfedges.push(u),i}function Og(t,n,e){var r=[n,e];return r.left=t,r}function Pg(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 Rg(t,n,e,r,i){var u,o=t[0],a=t[1],c=o[0],f=o[1],s=0,l=1,h=a[0]-c,d=a[1]-f;if(u=n-c,h||!(u>0)){if(u/=h,h<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=r-c,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>s&&(s=u)}else if(h>0){if(u0)){if(u/=d,d<0){if(u0){if(u>l)return;u>s&&(s=u)}if(u=i-f,d||!(u<0)){if(u/=d,d<0){if(u>l)return;u>s&&(s=u)}else if(d>0){if(u0||l<1)||(s>0&&(t[0]=[c+s*h,f+s*d]),l<1&&(t[1]=[c+l*h,f+l*d]),!0)}}}}}function qg(t,n,e,r,i){var u=t[1];if(u)return!0;var o,a,c=t[0],f=t.left,s=t.right,l=f[0],h=f[1],d=s[0],p=s[1],v=(l+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(l>d){if(c){if(c[1]>=i)return}else c=[v,e];u=[v,i]}else{if(c){if(c[1]1)if(l>d){if(c){if(c[1]>=i)return}else c=[(e-a)/o,e];u=[(i-a)/o,i]}else{if(c){if(c[1]=r)return}else c=[n,o*n+a];u=[r,o*r+a]}else{if(c){if(c[0]=-ey)){var d=c*c+f*f,p=s*s+l*l,v=(l*d-f*p)/h,g=(c*p-s*d)/h,y=Fg.pop()||new function(){Ng(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+o,y.y=(y.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=y;for(var _=null,m=Kg._;m;)if(y.yny)a=a.L;else{if(!((i=u-Zg(a,o))>ny)){r>-ny?(n=a.P,e=a):i>-ny?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jg[t.index]={site:t,halfedges:[]}}(t);var c=Xg(t);if(Qg.insert(n,c),n||e){if(n===e)return Bg(n),e=Xg(n.site),Qg.insert(c,e),c.edge=e.edge=Lg(n.site,c.site),Yg(n),void Yg(e);if(e){Bg(n),Bg(e);var f=n.site,s=f[0],l=f[1],h=t[0]-s,d=t[1]-l,p=e.site,v=p[0]-s,g=p[1]-l,y=2*(h*g-d*v),_=h*h+d*d,m=v*v+g*g,x=[(g*_-d*m)/y+s,(h*m-v*_)/y+l];Pg(e.edge,f,p,x),c.edge=Lg(f,t,null,x),e.edge=Lg(t,p,null,x),Yg(n),Yg(e)}else c.edge=Lg(n.site,c.site)}}function Gg(t,n){var e=t.site,r=e[0],i=e[1],u=i-n;if(!u)return r;var o=t.P;if(!o)return-1/0;var a=(e=o.site)[0],c=e[1],f=c-n;if(!f)return a;var s=a-r,l=1/u-1/f,h=s/f;return l?(-h+Math.sqrt(h*h-2*l*(s*s/(-2*f)-c+f/2+i-u/2)))/l+r:(r+a)/2}function Zg(t,n){var e=t.N;if(e)return Gg(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qg,Jg,Kg,ty,ny=1e-6,ey=1e-12;function ry(t,n){return n[1]-t[1]||n[0]-t[0]}function iy(t,n){var e,r,i,u=t.sort(ry).pop();for(ty=[],Jg=new Array(t.length),Qg=new zg,Kg=new zg;;)if(i=Ig,u&&(!i||u[1]ny||Math.abs(i[0][1]-i[1][1])>ny)||delete ty[u]}(o,a,c,f),function(t,n,e,r){var i,u,o,a,c,f,s,l,h,d,p,v,g=Jg.length,y=!0;for(i=0;iny||Math.abs(v-h)>ny)&&(c.splice(a,0,ty.push(Og(o,d,Math.abs(p-t)ny?[t,Math.abs(l-t)ny?[Math.abs(h-r)ny?[e,Math.abs(l-e)ny?[Math.abs(h-n)=a)return null;var c=t-i.site[0],f=n-i.site[1],s=c*c+f*f;do{i=u.cells[r=o],o=null,i.halfedges.forEach((function(e){var r=u.edges[e],a=r.left;if(a!==i.site&&a||(a=r.right)){var c=t-a[0],f=n-a[1],l=c*c+f*f;lr?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>u?(u+o)/2:Math.min(0,u)||Math.max(0,o))}var _y=function(){var t,n,e=hy,r=dy,i=yy,u=vy,o=gy,a=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],f=250,s=pe,l=[],h=k("start","zoom","end"),d=500,p=150,v=0;function g(t){t.property("__zoom",py).on("wheel.zoom",M).on("mousedown.zoom",T).on("dblclick.zoom",E).filter(o).on("touchstart.zoom",N).on("touchmove.zoom",S).on("touchend.zoom touchcancel.zoom",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new ay(n,t.x,t.y)}function _(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 ay(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=arguments,i=b(this,t),u=r.apply(this,t),o=e||m(u),a=Math.max(u[1][0]-u[0][0],u[1][1]-u[0][1]),c=this.__zoom,f="function"==typeof n?n.apply(this,t):n,l=s(c.invert(o).concat(a/c.k),f.invert(o).concat(a/f.k));return function(t){if(1===t)t=f;else{var n=l(t),e=a/n[2];t=new ay(e,o[0]-n[0]*e,o[1]-n[1]*e)}i.zoom(null,t)}}))}function b(t,n){for(var e,r=0,i=l.length;rv}t.zoom("mouse",i(_(t.that.__zoom,t.mouse[0]=Mt(t.that),t.mouse[1]),t.extent,c))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Ct(ut.view,t.moved),ly(),t.end()}),!0),u=Mt(this),o=ut.clientX,a=ut.clientY;At(ut.view),sy(),t.mouse=[u,this.__zoom.invert(u)],or(this),t.start()}}function E(){if(e.apply(this,arguments)){var t=this.__zoom,n=Mt(this),u=t.invert(n),o=t.k*(ut.shiftKey?.5:2),a=i(_(y(t,o),n,u),r.apply(this,arguments),c);ly(),f>0?gt(this).transition().duration(f).call(x,a,n):gt(this).call(g.transform,a)}}function N(){if(e.apply(this,arguments)){var n,r,i,u,o=b(this,arguments),a=ut.changedTouches,c=a.length;for(sy(),r=0;r-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},u=function(t,n,e){var r=function(n,e,r,i,u){return!(!t.addError||!t.clearErrors||(ru?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===u?"exactly":"no more than")+" "+u+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,u=i.pivots,o=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",u.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",o.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},5:function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},u=Math.abs,o=Math.atan2,a=Math.cos,c=Math.max,f=Math.min,s=Math.sin,l=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function g(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function y(t){return t.innerRadius}function _(t){return t.outerRadius}function m(t){return t.startAngle}function x(t){return t.endAngle}function b(t){return t&&t.padAngle}function w(t,n,e,r,i,u,o){var a=t-e,f=n-r,s=(o?u:-u)/l(a*a+f*f),h=s*f,d=-s*a,p=t+h,v=n+d,g=e+h,y=r+d,_=(p+g)/2,m=(v+y)/2,x=g-p,b=y-v,w=x*x+b*b,M=i-u,k=p*y-g*v,T=(b<0?-1:1)*l(c(0,M*M*w-k*k)),E=(k*b-x*T)/w,N=(-k*x-b*T)/w,S=(k*b+x*T)/w,A=(-k*x+b*T)/w,C=E-_,z=N-m,L=S-_,O=A-m;return C*C+z*z>L*L+O*O&&(E=S,N=A),{cx:E,cy:N,x01:-h,y01:-d,x11:E*(i/M-1),y11:N*(i/M-1)}}var M=function(){var t=y,n=_,e=i(0),c=null,M=m,k=x,T=b,E=null;function N(){var i,y,_,m=+t.apply(this,arguments),x=+n.apply(this,arguments),b=M.apply(this,arguments)-p,N=k.apply(this,arguments)-p,S=u(N-b),A=N>b;if(E||(E=i=Object(r.a)()),xh)if(S>v-h)E.moveTo(x*a(b),x*s(b)),E.arc(0,0,x,b,N,!A),m>h&&(E.moveTo(m*a(N),m*s(N)),E.arc(0,0,m,N,b,A));else{var C,z,L=b,O=N,P=b,R=N,q=S,j=S,D=T.apply(this,arguments)/2,U=D>h&&(c?+c.apply(this,arguments):l(m*m+x*x)),I=f(u(x-m)/2,+e.apply(this,arguments)),F=I,Y=I;if(U>h){var B=g(U/m*s(D)),H=g(U/x*s(D));(q-=2*B)>h?(P+=B*=A?1:-1,R-=B):(q=0,P=R=(b+N)/2),(j-=2*H)>h?(L+=H*=A?1:-1,O-=H):(j=0,L=O=(b+N)/2)}var X=x*a(L),V=x*s(L),$=m*a(R),W=m*s(R);if(I>h){var G=x*a(O),Z=x*s(O),Q=m*a(P),J=m*s(P);if(Sh?function(t,n,e,r,i,u,o,a){var c=e-t,f=r-n,s=o-i,l=a-u,h=(s*(n-u)-l*(t-i))/(l*c-s*f);return[t+h*c,n+h*f]}(X,V,Q,J,G,Z,$,W):[$,W],tt=X-K[0],nt=V-K[1],et=G-K[0],rt=Z-K[1],it=1/s(((_=(tt*et+nt*rt)/(l(tt*tt+nt*nt)*l(et*et+rt*rt)))>1?0:_<-1?d:Math.acos(_))/2),ut=l(K[0]*K[0]+K[1]*K[1]);F=f(I,(m-ut)/(it-1)),Y=f(I,(x-ut)/(it+1))}}j>h?Y>h?(C=w(Q,J,X,V,x,Y,A),z=w(G,Z,$,W,x,Y,A),E.moveTo(C.cx+C.x01,C.cy+C.y01),Yh&&q>h?F>h?(C=w($,W,G,Z,m,-F,A),z=w(X,V,Q,J,m,-F,A),E.lineTo(C.cx+C.x01,C.cy+C.y01),F=l;--h)f.point(y[h],_[h]);f.lineEnd(),f.areaEnd()}g&&(y[s]=+t(d,s,i),_[s]=+e(d,s,i),f.point(n?+n(d,s,i):y[s],u?+u(d,s,i):_[s]))}if(p)return f=null,p+""||null}function l(){return S().defined(o).curve(c).context(a)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,s):t},s.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),s):t},s.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),s):n},s.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),u=null,s):e},s.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),s):e},s.y1=function(t){return arguments.length?(u=null==t?null:"function"==typeof t?t:i(+t),s):u},s.lineX0=s.lineY0=function(){return l().x(t).y(e)},s.lineY1=function(){return l().x(t).y(u)},s.lineX1=function(){return l().x(n).y(e)},s.defined=function(t){return arguments.length?(o="function"==typeof t?t:i(!!t),s):o},s.curve=function(t){return arguments.length?(c=t,null!=a&&(f=c(a)),s):c},s.context=function(t){return arguments.length?(null==t?a=f=null:f=c(a=t),s):a},s},C=function(t,n){return nt?1:n>=t?0:NaN},z=function(t){return t},L=function(){var t=z,n=C,e=null,r=i(0),u=i(v),o=i(0);function a(i){var a,c,f,s,l,h=i.length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),_=Math.min(v,Math.max(-v,u.apply(this,arguments)-y)),m=Math.min(Math.abs(_)/h,o.apply(this,arguments)),x=m*(_<0?-1:1);for(a=0;a0&&(d+=l);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,f=d?(_-h*x)/d:0;a0?l*f:0)+x,g[c]={data:i[c],index:a,value:l,startAngle:y,endAngle:s,padAngle:m};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a},O=R(T);function P(t){this._curve=t}function R(t){function n(n){return new P(t(n))}return n._curve=t,n}function q(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(R(t)):n()._curve},t}P.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 j=function(){return q(S().curve(O))},D=function(){var t=A().curve(O),n=t.curve,e=t.lineX0,r=t.lineX1,i=t.lineY0,u=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 q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(u())},delete t.lineY1,t.curve=function(t){return arguments.length?n(R(t)):n()._curve},t},U=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},I=Array.prototype.slice;function F(t){return t.source}function Y(t){return t.target}function B(t){var n=F,e=Y,u=E,o=N,a=null;function c(){var i,c=I.call(arguments),f=n.apply(this,c),s=e.apply(this,c);if(a||(a=i=Object(r.a)()),t(a,+u.apply(this,(c[0]=f,c)),+o.apply(this,c),+u.apply(this,(c[0]=s,c)),+o.apply(this,c)),i)return a=null,i+""||null}return c.source=function(t){return arguments.length?(n=t,c):n},c.target=function(t){return arguments.length?(e=t,c):e},c.x=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),c):u},c.y=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),c):o},c.context=function(t){return arguments.length?(a=null==t?null:t,c):a},c}function H(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function X(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function V(t,n,e,r,i){var u=U(n,e),o=U(n,e=(e+i)/2),a=U(r,e),c=U(r,i);t.moveTo(u[0],u[1]),t.bezierCurveTo(o[0],o[1],a[0],a[1],c[0],c[1])}function $(){return B(H)}function W(){return B(X)}function G(){var t=B(V);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var Z={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={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()}},J=Math.sqrt(1/3),K=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/K),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var u=1;u<5;++u){var o=v*u/5,a=Math.cos(o),c=Math.sin(o);t.lineTo(c*e,-a*e),t.lineTo(a*r-c*i,c*r+a*i)}t.closePath()}},ut={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ot=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ot));t.moveTo(0,2*e),t.lineTo(-ot*e,-e),t.lineTo(ot*e,-e),t.closePath()}},ct=Math.sqrt(3)/2,ft=1/Math.sqrt(12),st=3*(ft/2+1),lt={draw:function(t,n){var e=Math.sqrt(n/st),r=e/2,i=e*ft,u=r,o=e*ft+e,a=-u,c=o;t.moveTo(r,i),t.lineTo(u,o),t.lineTo(a,c),t.lineTo(-.5*r-ct*i,ct*r+-.5*i),t.lineTo(-.5*u-ct*o,ct*u+-.5*o),t.lineTo(-.5*a-ct*c,ct*a+-.5*c),t.lineTo(-.5*r+ct*i,-.5*i-ct*r),t.lineTo(-.5*u+ct*o,-.5*o-ct*u),t.lineTo(-.5*a+ct*c,-.5*c-ct*a),t.closePath()}},ht=[Z,Q,tt,ut,it,at,lt],dt=function(){var t=i(Z),n=i(64),e=null;function u(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return u.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),u):t},u.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),u):n},u.context=function(t){return arguments.length?(e=null==t?null:t,u):e},u},pt=function(){};function vt(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 gt(t){this._context=t}gt.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:vt(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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var yt=function(t){return new gt(t)};function _t(t){this._context=t}_t.prototype={areaStart:pt,areaEnd:pt,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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var mt=function(t){return new _t(t)};function xt(t){this._context=t}xt.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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new xt(t)};function wt(t,n){this._basis=new gt(t),this._beta=n}wt.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],u=n[0],o=t[e]-i,a=n[e]-u,c=-1;++c<=e;)r=c/e,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*n[c]+(1-this._beta)*(u+r*a));this._x=this._y=null,this._basis.lineEnd()},point:function(t,n){this._x.push(+t),this._y.push(+n)}};var Mt=function t(n){function e(t){return 1===n?new gt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function kt(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 Tt(t,n){this._context=t,this._k=(1-n)/6}Tt.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:kt(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:kt(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 Et=function t(n){function e(t){return new Tt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Nt(t,n){this._context=t,this._k=(1-n)/6}Nt.prototype={areaStart:pt,areaEnd:pt,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:kt(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 St=function t(n){function e(t){return new Nt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function At(t,n){this._context=t,this._k=(1-n)/6}At.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:kt(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 Ct=function t(n){function e(t){return new At(t,n)}return e.tension=function(n){return t(+n)},e}(0);function zt(t,n,e){var r=t._x1,i=t._y1,u=t._x2,o=t._y2;if(t._l01_a>h){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>h){var f=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,s=3*t._l23_a*(t._l23_a+t._l12_a);u=(u*f+t._x1*t._l23_2a-n*t._l12_2a)/s,o=(o*f+t._y1*t._l23_2a-e*t._l12_2a)/s}t._context.bezierCurveTo(r,i,u,o,t._x2,t._y2)}function Lt(t,n){this._context=t,this._alpha=n}Lt.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:zt(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 Ot=function t(n){function e(t){return n?new Lt(t,n):new Tt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Pt(t,n){this._context=t,this._alpha=n}Pt.prototype={areaStart:pt,areaEnd:pt,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:zt(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 Rt=function t(n){function e(t){return n?new Pt(t,n):new Nt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.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:zt(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 jt=function t(n){function e(t){return n?new qt(t,n):new At(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Dt(t){this._context=t}Dt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Ut=function(t){return new Dt(t)};function It(t){return t<0?-1:1}function Ft(t,n,e){var r=t._x1-t._x0,i=n-t._x1,u=(t._y1-t._y0)/(r||i<0&&-0),o=(e-t._y1)/(i||r<0&&-0),a=(u*i+o*r)/(r+i);return(It(u)+It(o))*Math.min(Math.abs(u),Math.abs(o),.5*Math.abs(a))||0}function Yt(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Bt(t,n,e){var r=t._x0,i=t._y0,u=t._x1,o=t._y1,a=(u-r)/3;t._context.bezierCurveTo(r+a,i+a*n,u-a,o-a*e,u,o)}function Ht(t){this._context=t}function Xt(t){this._context=new Vt(t)}function Vt(t){this._context=t}function $t(t){return new Ht(t)}function Wt(t){return new Xt(t)}function Gt(t){this._context=t}function Zt(t){var n,e,r=t.length-1,i=new Array(r),u=new Array(r),o=new Array(r);for(i[0]=0,u[0]=2,o[0]=t[0]+2*t[1],n=1;n=0;--n)i[n]=(o[n]-i[n+1])/u[n];for(u[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Kt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,u=1,o=t[n[0]],a=o.length;u=0;)e[n]=n;return e};function un(t,n){return t[n]}var on=function(){var t=i([]),n=rn,e=en,r=un;function u(i){var u,o,a=t.apply(this,arguments),c=i.length,f=a.length,s=new Array(f);for(u=0;u0){for(var e,r,i,u=0,o=t[0].length;u1)for(var e,r,i,u,o,a,c=0,f=t[n[0]].length;c=0?(r[0]=u,r[1]=u+=i):i<0?(r[1]=o,r[0]=o+=i):r[0]=u},fn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],u=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,u=0,o=1;oo)throw new Error("circular link");e.forEach((function(t){t.depth=u,t.sourceLinks.forEach((function(t){i.indexOf(t.target)<0&&i.push(t.target)}))}))}for(e=t.nodes,i=[],u=0;e.length;++u,e=i,i=[]){if(u>o)throw new Error("circular link");e.forEach((function(t){t.height=u,t.targetLinks.forEach((function(t){i.indexOf(t.source)<0&&i.push(t.source)}))}))}var a=(r-n-y)/(u-1);t.nodes.forEach((function(t){t.layer=Math.max(0,Math.min(u-1,Math.floor(x.call(null,t,u)))),t.x1=(t.x0=n+t.layer*a)+y}))}(a),function(n){var r,a=Object(u.d)().key((function(t){return t.x0})).sortKeys(i.a).entries(n.nodes).map((function(t){return t.values}));r=Object(i.o)(a,(function(t){return(o-e-(t.length-1)*_)/Object(i.v)(t,h)})),a.forEach((function(n){null!=t&&n.sort(t);let i=e;n.forEach((function(t){t.y0=i,t.y1=i+t.value*r,i=t.y1+_}))})),n.links.forEach((function(t){t.width=t.value*r}));for(var c=0,d=M;c0))return;let i=(e/r-n.y0)*t;n.y0+=i,n.y1+=i}))}))}function g(t){a.slice(0,-1).reverse().forEach((function(n){n.forEach((function(n){let e=0,r=0;for(const{target:t,value:i}of n.sourceLinks){let u=i*(t.layer-n.layer);e+=N(n,t)*u,r+=u}if(!(r>0))return;let i=(e/r-n.y0)*t;n.y0+=i,n.y1+=i}))}))}function y(n){a.forEach((function(r){var i,u,o,a=e,c=r.length;for(void 0===t&&r.sort(l),o=0;o1e-6&&(i.y0+=u,i.y1+=u),a=i.y1+_}))}function m(n){a.forEach((function(e){var r,i,u,a=o,c=e.length;for(void 0===t&&e.sort(l),u=c-1;u>=0;--u)(i=((r=e[u]).y1-a)*n)>1e-6&&(r.y0-=i,r.y1-=i),a=r.y0-_}))}}(a),T(a),a}function T(t){t.nodes.forEach((function(t){t.sourceLinks.sort(s),t.targetLinks.sort(f)})),t.nodes.forEach((function(t){var n=t.y0,e=n;t.sourceLinks.forEach((function(t){t.y0=n+t.width/2,n+=t.width})),t.targetLinks.forEach((function(t){t.y1=e+t.width/2,e+=t.width}))}))}function E(t,n){let e=t.y0-(t.sourceLinks.length-1)*_/2;for(const{target:r,width:i}of t.sourceLinks){if(r===n)break;e+=i+_}for(const{source:r,width:i}of n.targetLinks){if(r===t)break;e-=i}return e}function N(t,n){let e=n.y0-(n.targetLinks.length-1)*_/2;for(const{source:r,width:i}of n.targetLinks){if(r===t)break;e+=i+_}for(const{target:r,width:i}of t.sourceLinks){if(r===n)break;e-=i}return e}return k.update=function(t){return T(t),t},k.nodeId=function(t){return arguments.length?(m="function"==typeof t?t:c(t),k):m},k.nodeAlign=function(t){return arguments.length?(x="function"==typeof t?t:c(t),k):x},k.nodeSort=function(n){return arguments.length?(t=n,k):t},k.nodeWidth=function(t){return arguments.length?(y=+t,k):y},k.nodePadding=function(t){return arguments.length?(_=+t,k):_},k.nodes=function(t){return arguments.length?(b="function"==typeof t?t:c(t),k):b},k.links=function(t){return arguments.length?(w="function"==typeof t?t:c(t),k):w},k.size=function(t){return arguments.length?(n=e=0,r=+t[0],o=+t[1],k):[r-n,o-e]},k.extent=function(t){return arguments.length?(n=+t[0][0],r=+t[1][0],e=+t[0][1],o=+t[1][1],k):[[n,e],[r,o]]},k.iterations=function(t){return arguments.length?(M=+t,k):M},k}var _=e(5);function m(t){return[t.source.x1,t.y0]}function x(t){return[t.target.x0,t.y1]}var b=e(4),w={id:"sankey",label:"Sankey",options:{color_range:{type:"array",label:"I AM DOING SOMETHING",display:"colors",default:["#dd3333","#80ce5d","#f78131","#369dc1","#c572d3","#36c1b3","#b57052","#ed69af"]},label_type:{default:"name",display:"select",label:"Label Type",type:"string",values:[{Name:"name"},{"Name (value)":"name_value"}]},show_null_points:{type:"boolean",label:"Plot Null Values",default:!0}},create:function(t,n){t.innerHTML="\n \n ",this.svg=r.select(t).append("svg")},updateAsync:function(t,n,e,i,u,a){if(Object(b.b)(this,i,{min_pivots:0,max_pivots:0,min_dimensions:2,max_dimensions:void 0,min_measures:1,max_measures:1})){var c=n.clientWidth,f=n.clientHeight,s=this.svg.html("").attr("width","100%").attr("height","100%").append("g"),l=i.fields.dimension_like,h=i.fields.measure_like[0],d=r.scaleOrdinal().range(e.color_range||w.options.color_range.default),p=s.append("defs"),v=y().nodeAlign(o).nodeWidth(10).nodePadding(12).extent([[1,1],[c-1,f-6]]);v.nodeSort(null);var g=s.append("g").attr("class","links").attr("fill","none").attr("stroke","#fff").selectAll("path"),M=s.append("g").attr("class","nodes").attr("font-family","sans-serif").attr("font-size",10).selectAll("g"),k={nodes:[],links:[]},T=r.set();t.forEach((function(t){for(var n=[],r=0,i=l;rn?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>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>>1;t(n[o],e)>0?i=o:r=o+1}return r}}},o=i(r),u=o.right,a=o.left,s=u,c=function(t,n){null==n&&(n=l);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,o=0,u=-1,a=0,s=0;if(null==n)for(;++u1)return s/(o-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},g=function(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u=e)for(r=i=e;++ue&&(r=e),i=e)for(r=i=e;++ue&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a=0?(o>=T?10:o>=C?5:o>=M?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T?10:o>=C?5:o>=M?2:1)}function A(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>=T?i*=10:o>=C?i*=5:o>=M&&(i*=2),nf;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:l,p.x1=i=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)}},O=function(t,n,e){return t=b.call(t,d).sort(r),Math.ceil((e-n)/(2*(D(t,.75)-D(t,.25))*Math.pow(t.length,-1/3)))},L=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},j=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r},R=function(t,n){var e,r=t.length,i=r,o=-1,u=0;if(null==n)for(;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--u]=r[n];return e},F=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r},z=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},H=function(t,n){if(e=t.length){var e,i,o=0,u=0,a=t[u];for(null==n&&(n=r);++o1e-6)if(Math.abs(f*s-c*l)>1e-6&&o){var d=e-u,p=i-a,v=s*s+c*c,g=d*d+p*p,y=Math.sqrt(v),m=Math.sqrt(h),b=o*Math.tan((r-Math.acos((v+h-g)/(2*y*m)))/2),x=b/m,_=b/y;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*l)+","+(n+x*f)),this._+="A"+o+","+o+",0,0,"+ +(f*d>l*p)+","+(this._x1=t+_*s)+","+(this._y1=n+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,u,a,s){t=+t,n=+n;var c=(e=+e)*Math.cos(u),l=e*Math.sin(u),f=t+c,h=n+l,d=1^s,p=s?u-a:a-u;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+f+","+h),e&&(p<0&&(p=p%i+i),p>o?this._+="A"+e+","+e+",0,1,"+d+","+(t-c)+","+(n-l)+"A"+e+","+e+",0,1,"+d+","+(this._x1=f)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},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 s=a;e.d(n,"a",(function(){return s}))},function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,o=-1,u=t.length;if(null==n)for(;++o=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,l,f,h=-1,d=e.length,p=r[i++],v=o(),g=a();++hr.length)return e;var u,a=i[o-1];return null!=n&&o>=r.length?u=e.entries():(u=[],e.each((function(n,e){u.push({key:e,values:t(n,o)})}))),null!=a?u.sort((function(t,n){return a(t.key,n.key)})):u}(u(t,0,c,l),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}}};function a(){return{}}function s(t,n,e){t[n]=e}function c(){return o()}function l(t,n,e){t.set(n,e)}function f(){}var h=o.prototype;function d(t,n){var e=new f;if(t instanceof f)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),u=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++u0)for(var e,r,i=new Array(e),o=0;o=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),S.hasOwnProperty(n)?{space:S[n],local:t}:t},A=function(t){var n=k(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===M&&n.documentElement.namespaceURI===M?n.createElement(t):n.createElementNS(e,t)}})(n)};function N(){}var E=function(t){return null==t?N:function(){return this.querySelector(t)}};function D(){return[]}var O=function(t){return null==t?D:function(){return this.querySelectorAll(t)}},L=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var j=document.documentElement;if(!j.matches){var R=j.webkitMatchesSelector||j.msMatchesSelector||j.mozMatchesSelector||j.oMatchesSelector;L=function(t){return function(){return R.call(this,t)}}}}var q=L,P=function(t){return new Array(t.length)};function F(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}F.prototype={constructor:F,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var z="$";function H(t,n,e,r,i,o){for(var u,a=0,s=n.length,c=o.length;an?1:t>=n?0:NaN}var U=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function B(t,n){return t.style.getPropertyValue(n)||U(t).getComputedStyle(t,null).getPropertyValue(n)}function W(t){return t.trim().split(/^|\s+/)}function Y(t){return t.classList||new V(t)}function V(t){this._node=t,this._names=W(t.getAttribute("class")||"")}function X(t,n){for(var e=Y(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ot=null;function ut(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ot;ot=r;try{t.call(this,this.__data__,n,e)}finally{ot=i}}}function st(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=_&&(_=x+1);!(b=y[_])&&++_=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=I);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):B(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=W(t+"");if(arguments.length<2){for(var r=Y(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ct:st,null==e&&(e=!1),r=0;rf}s.mouse("drag")}function v(){gt(ot.view).on("mousemove.drag mouseup.drag",null),Et(ot.view,e),At(),s.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ot.changedTouches,r=o.apply(this,arguments),u=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Wt.exec(t))?tn(parseInt(n[1],16)):(n=Yt.exec(t))?new on(n[1],n[2],n[3],1):(n=Vt.exec(t))?new on(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Xt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Kt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Gt.exec(t))?un(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?un(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new on(NaN,NaN,NaN,0):null}function tn(t){return new on(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new on(t,n,e,r)}function en(t){return t instanceof Ht||(t=Zt(t)),t?new on((t=t.rgb()).r,t.g,t.b,t.opacity):new on}function rn(t,n,e,r){return 1===arguments.length?en(t):new on(t,n,e,null==r?1:r)}function on(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function un(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new sn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof sn)return new sn(t.h,t.s,t.l,t.opacity);if(t instanceof Ht||(t=Zt(t)),!t)return new sn;if(t instanceof sn)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,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&s<1?0:u,new sn(u,a,s,t.opacity)}(t):new sn(t,n,e,null==r?1:r)}function sn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function cn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Ft(Ht,Zt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Ft(on,rn,zt(Ht,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(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+")")}})),Ft(sn,an,zt(Ht,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new sn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new sn(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 on(cn(t>=240?t-240:t+120,i,r),cn(t,i,r),cn(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 ln=Math.PI/180,fn=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,gn=6/29,yn=3*gn*gn,mn=gn*gn*gn;function bn(t){if(t instanceof _n)return new _n(t.l,t.a,t.b,t.opacity);if(t instanceof kn){var n=t.h*ln;return new _n(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof on||(t=en(t));var e=Mn(t.r),r=Mn(t.g),i=Mn(t.b),o=wn((.4124564*e+.3575761*r+.1804375*i)/hn),u=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new _n(116*u-16,500*(o-u),200*(u-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?bn(t):new _n(t,n,e,null==r?1:r)}function _n(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>mn?Math.pow(t,1/3):t/yn+vn}function Tn(t){return t>gn?t*t*t:yn*(t-vn)}function Cn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Mn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Sn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof kn)return new kn(t.h,t.c,t.l,t.opacity);t instanceof _n||(t=bn(t));var n=Math.atan2(t.b,t.a)*fn;return new kn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new kn(t,n,e,null==r?1:r)}function kn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Ft(_n,xn,zt(Ht,{brighter:function(t){return new _n(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new _n(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=dn*Tn(t),new on(Cn(3.2404542*(n=hn*Tn(n))-1.5371385*t-.4985314*(e=pn*Tn(e))),Cn(-.969266*n+1.8760108*t+.041556*e),Cn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Ft(kn,Sn,zt(Ht,{brighter:function(t){return new kn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new kn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return bn(this).rgb()}}));var An=-.29227,Nn=-.90649,En=1.97294,Dn=En*Nn,On=1.78277*En,Ln=1.78277*An- -.14861*Nn;function jn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Rn)return new Rn(t.h,t.s,t.l,t.opacity);t instanceof on||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Ln*r+Dn*n-On*e)/(Ln+Dn-On),o=r-i,u=(En*(e-i)-An*o)/Nn,a=Math.sqrt(u*u+o*o)/(En*i*(1-i)),s=a?Math.atan2(u,o)*fn-120:NaN;return new Rn(s<0?s+360:s,a,i,t.opacity)}(t):new Rn(t,n,e,null==r?1:r)}function Rn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(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}Ft(Rn,jn,zt(Ht,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ln,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new on(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(An*r+Nn*i)),255*(n+e*(En*r)),this.opacity)}}));var Pn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r180||e<-180?e-360*Math.round(e/360):e):zn(isNaN(t)?n:t)}function In(t,n){var e=n-t;return e?Hn(t,e):zn(isNaN(t)?n:t)}var Un=function t(n){var e=function(t){return 1==(t=+t)?In: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):zn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=In(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 Bn(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;eo&&(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,s.push({i:u,x:Zn(e,r)})),o=ee.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Zn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Zn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),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:Zn(t,e)},{i:a-2,x:Zn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e=0&&n._call.call(null,t),n=n._next;--Ae}function Ie(){Le=(Oe=Re.now())+je,Ae=Ne=0;try{$e()}finally{Ae=0,function(){for(var t,n,e=Te,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:Te=n);Ce=t,Be(r)}(),Le=0}}function Ue(){var t=Re.now(),n=t-Oe;n>De&&(je-=n,Oe=t)}function Be(t){Ae||(Ne&&(Ne=clearTimeout(Ne)),t-Le>24?(t<1/0&&(Ne=setTimeout(Ie,t-Re.now()-je)),Ee&&(Ee=clearInterval(Ee))):(Ee||(Oe=Re.now(),Ee=setInterval(Ue,De)),Ae=1,qe(Ie)))}ze.prototype=He.prototype={constructor:ze,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Pe():+e)+(null==n?0:+n),this._next||Ce===this||(Ce?Ce._next=this:Te=this,Ce=this),this._call=t,this._time=e,Be()},stop:function(){this._call&&(this._call=null,this._time=1/0,Be())}};var We=function(t,n,e){var r=new ze;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ye=function(t,n,e){var r=new ze,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?Pe():+e,r.restart((function o(u){u+=i,r.restart(o,i+=n,e),t(u)}),n,e),r)},Ve=C("start","end","interrupt"),Xe=[],Ke=0,Ge=1,Qe=2,Je=3,Ze=4,tr=5,nr=6,er=function(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(s){var c,l,f,h;if(e.state!==Ge)return a();for(c in i)if((h=i[c]).name===e.name){if(h.state===Je)return We(o);h.state===Ze?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+cKe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=or(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function or(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ur=function(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>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=k(t),r="transform"===e?fe:sr;return this.attrTween(t,"function"==typeof n?(e.local?function(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(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)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(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(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)}})(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=k(t);return this.tween(e,(r.local?function(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(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})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?le:sr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=B(this,t),u=(this.style.removeProperty(t),B(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=B(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=B(this,t)),u===a?null:u===r&&a===i?o:o=n(r=u,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var o=B(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,function(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}(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}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=or(this.node(),e).tween,o=0,u=i.length;oGe&&e.name===n)return new fr([[t]],ii,n,+r);return null},ui=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function si(){ot.stopImmediatePropagation()}var ci=function(){ot.preventDefault(),ot.stopImmediatePropagation()},li={name:"drag"},fi={name:"space"},hi={name:"handle"},di={name:"center"},pi={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]]}},vi={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]]}},gi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},yi={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"},mi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},bi={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},_i={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 Ti(){return!ot.button}function Ci(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Mi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Si(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ai(){return Di(pi)}function Ni(){return Di(vi)}var Ei=function(){return Di(gi)};function Di(t){var n,e=Ci,r=Ti,i=C(u,"start","brush","end"),o=6;function u(n){var e=n.property("__brush",f).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yi.overlay).merge(e).each((function(){var t=Mi(this).extent;gt(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])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.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 yi[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}function a(){var t=gt(this),n=Mi(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]-o/2:n[0][0]-o/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-o/2:n[0][1]-o/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+o:o})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+o:o}))):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 c(t,n)}function c(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function l(){if(ot.touches){if(ot.changedTouches.length0&&(e=i-d),w<0?f=h-p:w>0&&(o=u-p),x=fi,R.attr("cursor",yi.selection),F());break;default:return}ci()}),!0).on("keyup.brush",(function(){switch(ot.keyCode){case 16:E&&(g=y=E=!1,F());break;case 18:x===di&&(_<0?c=l:_>0&&(e=i),w<0?f=h:w>0&&(o=u),x=hi,F());break;case 32:x===fi&&(ot.altKey?(_&&(c=l-d*_,e=i+d*_),w&&(f=h-p*w,o=u+p*w),x=di):(_<0?c=l:_>0&&(e=i),w<0?f=h:w>0&&(o=u),x=hi),R.attr("cursor",yi[b]),F());break;default:return}ci()}),!0).on("mousemove.brush",P,!0).on("mouseup.brush",z,!0);Nt(ot.view)}si(),ur(m),a.call(m),L.start()}function P(){var t=Tt(m);!E||g||y||(Math.abs(t[0]-O[0])>Math.abs(t[1]-O[1])?y=!0:g=!0),O=t,v=!0,ci(),F()}function F(){var t;switch(d=O[0]-D[0],p=O[1]-D[1],x){case fi:case li:_&&(d=Math.max(S-e,Math.min(A-c,d)),i=e+d,l=c+d),w&&(p=Math.max(k-o,Math.min(N-f,p)),u=o+p,h=f+p);break;case hi:_<0?(d=Math.max(S-e,Math.min(A-e,d)),i=e+d,l=c):_>0&&(d=Math.max(S-c,Math.min(A-c,d)),i=e,l=c+d),w<0?(p=Math.max(k-o,Math.min(N-o,p)),u=o+p,h=f):w>0&&(p=Math.max(k-f,Math.min(N-f,p)),u=o,h=f+p);break;case di:_&&(i=Math.max(S,Math.min(A,e-d*_)),l=Math.max(S,Math.min(A,c+d*_))),w&&(u=Math.max(k,Math.min(N,o-p*w)),h=Math.max(k,Math.min(N,f+p*w)))}l=o?s=!0:(r=t.charCodeAt(u++))===Ji?c=!0:r===Zi&&(c=!0,t.charCodeAt(u)===Ji&&++u),t.slice(i+1,n-1).replace(/""/g,'"')}for(;u=(o=(v+y)/2))?v=o:y=o,(l=e>=(u=(g+m)/2))?g=u:m=u,i=d,!(d=d[f=l<<1|c]))return i[f]=p,t;if(a=+t._x.call(null,d.data),s=+t._y.call(null,d.data),n===a&&e===s)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=n>=(o=(v+y)/2))?v=o:y=o,(l=e>=(u=(g+m)/2))?g=u:m=u}while((f=l<<1|c)==(h=(s>=u)<<1|a>=o));return i[h]=d,i[f]=p,t}var yo=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function mo(t){return t[0]}function bo(t){return t[1]}function xo(t,n,e){var r=new _o(null==n?mo:n,null==e?bo:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function _o(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 wo(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var To=xo.prototype=_o.prototype;function Co(t){return t.x+t.vx}function Mo(t){return t.y+t.vy}To.copy=function(){var t,n,e=new _o(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=wo(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]=wo(n));return e},To.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return go(this.cover(n,e),n,e,t)},To.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),s=1/0,c=1/0,l=-1/0,f=-1/0;for(e=0;el&&(l=r),if&&(f=i));for(lt||t>i||r>n||n>o))return this;var u,a,s=i-e,c=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do{(u=new Array(4))[a]=c,c=u}while(o=r+(s*=2),t>(i=e+s)||n>o);break;case 1:do{(u=new Array(4))[a]=c,c=u}while(o=r+(s*=2),(e=i-s)>t||n>o);break;case 2:do{(u=new Array(4))[a]=c,c=u}while(r=o-(s*=2),t>(i=e+s)||r>n);break;case 3:do{(u=new Array(4))[a]=c,c=u}while(r=o-(s*=2),(e=i-s)>t||r>n)}this._root&&this._root.length&&(this._root=c)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},To.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},To.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]]},To.find=function(t,n,e){var r,i,o,u,a,s,c,l=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new yo(v,l,f,h,d)),null==e?e=1/0:(l=t-e,f=n-e,h=t+e,d=n+e,e*=e);s=p.pop();)if(!(!(v=s.node)||(i=s.x0)>h||(o=s.y0)>d||(u=s.x1)=y)<<1|t>=g)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=s)}else{var m=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),x=m*m+b*b;if(x=(a=(p+g)/2))?p=a:g=a,(l=u>=(s=(v+y)/2))?v=s:y=s,n=d,!(d=d[f=l<<1|c]))return this;if(!d.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},To.removeAll=function(t){for(var n=0,e=t.length;ns+d||ic+d||oa.index){var p=s-u.x-u.vx,v=c-u.y-u.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,o,u,a,s,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(t,e),n):c.on(t)}}},qo=function(){var t,n,e,r,i=po(-30),o=1,u=1/0,a=.81;function s(r){var i,o=t.length,u=xo(t,Eo,Do).visitAfter(l);for(e=r,i=0;i=u)){(t.data!==n||t.next)&&(0===l&&(d+=(l=vo())*l),0===f&&(d+=(f=vo())*f),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},$o=function(t){return(t=Ho(Math.abs(t)))?t[1]:NaN},Io=function(t,n){var e=Ho(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")},Uo={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,o=-1;i0&&(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 Io(100*t,n)},r:Io,s:function(t,n){var e=Ho(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Oo=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")+Ho(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)}},Bo=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Wo(t){return new Yo(t)}function Yo(t){if(!(n=Bo.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],s=!!n[7],c=n[8]&&+n[8].slice(1),l=n[9]||"";"n"===l?(s=!0,l="g"):Uo[l]||(l=""),(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=s,this.precision=c,this.type=l}Wo.prototype=Yo.prototype,Yo.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 Vo,Xo,Ko,Go=function(t){return t},Qo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Jo=function(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],s=0;i>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),o.push(t.substring(i-=a,i+a)),!((s+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}):Go,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):Go,a=t.percent||"%";function s(t){var n=(t=Wo(t)).fill,e=t.align,s=t.sign,c=t.symbol,l=t.zero,f=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===c?i[0]:"#"===c&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===c?i[1]:/[%p]/.test(p)?a:"",y=Uo[p],m=!p||/[defgprs%]/.test(p);function b(t){var i,a,c,b=v,x=g;if("c"===p)x=y(t)+x,t="";else{var _=(t=+t)<0;if(t=y(Math.abs(t),d),_&&0==+t&&(_=!1),b=(_?"("===s?s:"-":"-"===s||"("===s?"":s)+b,x=("s"===p?Qo[8+Oo/3]:"")+x+(_&&"("===s?")":""),m)for(i=-1,a=t.length;++i(c=t.charCodeAt(i))||c>57){x=(46===c?o+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!l&&(t=r(t,1/0));var w=b.length+t.length+x.length,T=w>1)+b+t+x+T.slice(w);break;default:t=T+b+t+x}return u(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),b.toString=function(){return t+""},b}return{format:s,formatPrefix:function(t,n){var e=s(((t=Wo(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($o(n)/3))),i=Math.pow(10,-r),o=Qo[8+r/3];return function(t){return e(i*t)+o}}}};function Zo(t){return Vo=Jo(t),Xo=Vo.format,Ko=Vo.formatPrefix,Vo}Zo({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var tu=function(t){return Math.max(0,-$o(Math.abs(t)))},nu=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($o(n)/3)))-$o(Math.abs(t)))},eu=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,$o(n)-$o(t))+1},ru=function(){return new iu};function iu(){this.reset()}iu.prototype={constructor:iu,reset:function(){this.s=this.t=0},add:function(t){uu(ou,t,this.t),uu(this,ou.s,this.s),this.s?this.t+=ou.t:this.s=ou.t},valueOf:function(){return this.s}};var ou=new iu;function uu(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var au=1e-6,su=Math.PI,cu=su/2,lu=su/4,fu=2*su,hu=180/su,du=su/180,pu=Math.abs,vu=Math.atan,gu=Math.atan2,yu=Math.cos,mu=Math.ceil,bu=Math.exp,xu=(Math.floor,Math.log),_u=Math.pow,wu=Math.sin,Tu=Math.sign||function(t){return t>0?1:t<0?-1:0},Cu=Math.sqrt,Mu=Math.tan;function Su(t){return t>1?0:t<-1?su:Math.acos(t)}function ku(t){return t>1?cu:t<-1?-cu:Math.asin(t)}function Au(t){return(t=wu(t/2))*t}function Nu(){}function Eu(t,n){t&&Ou.hasOwnProperty(t.type)&&Ou[t.type](t,n)}var Du={Feature:function(t,n){Eu(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=yu(n=(n*=du)/2+lu),u=wu(n),a=zu*u,s=Fu*o+a*yu(i),c=a*r*wu(i);$u.add(gu(c,s)),Pu=t,Fu=o,zu=u}var Xu=function(t){return Iu.reset(),Hu(t,Uu),2*Iu};function Ku(t){return[gu(t[1],t[0]),ku(t[2])]}function Gu(t){var n=t[0],e=t[1],r=yu(e);return[r*yu(n),r*wu(n),wu(e)]}function Qu(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Ju(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 Zu(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=Cu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,oa,ua,aa,sa,ca,la,fa,ha=ru(),da={point:pa,lineStart:ga,lineEnd:ya,polygonStart:function(){da.point=ma,da.lineStart=ba,da.lineEnd=xa,ha.reset(),Uu.polygonStart()},polygonEnd:function(){Uu.polygonEnd(),da.point=pa,da.lineStart=ga,da.lineEnd=ya,$u<0?(ea=-(ia=180),ra=-(oa=90)):ha>au?oa=90:ha<-au&&(ra=-90),fa[0]=ea,fa[1]=ia}};function pa(t,n){la.push(fa=[ea=t,ia=t]),noa&&(oa=n)}function va(t,n){var e=Gu([t*du,n*du]);if(ca){var r=Ju(ca,e),i=Ju([r[1],-r[0],0],r);na(i),i=Ku(i);var o,u=t-ua,a=u>0?1:-1,s=i[0]*hu*a,c=pu(u)>180;c^(a*uaoa&&(oa=o):c^(a*ua<(s=(s+360)%360-180)&&soa&&(oa=n)),c?t_a(ea,ia)&&(ia=t):_a(t,ia)>_a(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>ua?_a(ea,t)>_a(ea,ia)&&(ia=t):_a(t,ia)>_a(ea,ia)&&(ea=t)}else la.push(fa=[ea=t,ia=t]);noa&&(oa=n),ca=e,ua=t}function ga(){da.point=va}function ya(){fa[0]=ea,fa[1]=ia,da.point=pa,ca=null}function ma(t,n){if(ca){var e=t-ua;ha.add(pu(e)>180?e+(e>0?360:-360):e)}else aa=t,sa=n;Uu.point(t,n),va(t,n)}function ba(){Uu.lineStart()}function xa(){ma(aa,sa),Uu.lineEnd(),pu(ha)>au&&(ea=-(ia=180)),fa[0]=ea,fa[1]=ia,ca=null}function _a(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ta(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n_a(r[0],r[1])&&(r[1]=i[1]),_a(i[0],r[1])>_a(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=_a(r[1],i[0]))>u&&(u=a,ea=i[0],ia=r[1])}return la=fa=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,oa]]},$a={sphere:Nu,point:Ia,lineStart:Ba,lineEnd:Va,polygonStart:function(){$a.lineStart=Xa,$a.lineEnd=Ka},polygonEnd:function(){$a.lineStart=Ba,$a.lineEnd=Va}};function Ia(t,n){t*=du;var e=yu(n*=du);Ua(e*yu(t),e*wu(t),wu(n))}function Ua(t,n,e){Sa+=(t-Sa)/++Ca,ka+=(n-ka)/Ca,Aa+=(e-Aa)/Ca}function Ba(){$a.point=Wa}function Wa(t,n){t*=du;var e=yu(n*=du);Pa=e*yu(t),Fa=e*wu(t),za=wu(n),$a.point=Ya,Ua(Pa,Fa,za)}function Ya(t,n){t*=du;var e=yu(n*=du),r=e*yu(t),i=e*wu(t),o=wu(n),u=gu(Cu((u=Fa*o-za*i)*u+(u=za*r-Pa*o)*u+(u=Pa*i-Fa*r)*u),Pa*r+Fa*i+za*o);Ma+=u,Na+=u*(Pa+(Pa=r)),Ea+=u*(Fa+(Fa=i)),Da+=u*(za+(za=o)),Ua(Pa,Fa,za)}function Va(){$a.point=Ia}function Xa(){$a.point=Ga}function Ka(){Qa(Ra,qa),$a.point=Ia}function Ga(t,n){Ra=t,qa=n,t*=du,n*=du,$a.point=Qa;var e=yu(n);Pa=e*yu(t),Fa=e*wu(t),za=wu(n),Ua(Pa,Fa,za)}function Qa(t,n){t*=du;var e=yu(n*=du),r=e*yu(t),i=e*wu(t),o=wu(n),u=Fa*o-za*i,a=za*r-Pa*o,s=Pa*i-Fa*r,c=Cu(u*u+a*a+s*s),l=ku(c),f=c&&-l/c;Oa+=f*u,La+=f*a,ja+=f*s,Ma+=l,Na+=l*(Pa+(Pa=r)),Ea+=l*(Fa+(Fa=i)),Da+=l*(za+(za=o)),Ua(Pa,Fa,za)}var Ja=function(t){Ca=Ma=Sa=ka=Aa=Na=Ea=Da=Oa=La=ja=0,Hu(t,$a);var n=Oa,e=La,r=ja,i=n*n+e*e+r*r;return i<1e-12&&(n=Na,e=Ea,r=Da,Masu?t-fu:t<-su?t+fu:t,n]}function es(t,n,e){return(t%=fu)?n||e?ts(is(t),os(n,e)):is(t):n||e?os(n,e):ns}function rs(t){return function(n,e){return[(n+=t)>su?n-fu:n<-su?n+fu:n,e]}}function is(t){var n=rs(t);return n.invert=rs(-t),n}function os(t,n){var e=yu(t),r=wu(t),i=yu(n),o=wu(n);function u(t,n){var u=yu(n),a=yu(t)*u,s=wu(t)*u,c=wu(n),l=c*e+a*r;return[gu(s*i-l*o,a*e-c*r),ku(l*i+s*o)]}return u.invert=function(t,n){var u=yu(n),a=yu(t)*u,s=wu(t)*u,c=wu(n),l=c*i-s*o;return[gu(s*i+c*o,a*e+l*r),ku(l*e-a*r)]},u}ns.invert=ns;var us=function(t){function n(n){return(n=t(n[0]*du,n[1]*du))[0]*=hu,n[1]*=hu,n}return t=es(t[0]*du,t[1]*du,t.length>2?t[2]*du:0),n.invert=function(n){return(n=t.invert(n[0]*du,n[1]*du))[0]*=hu,n[1]*=hu,n},n};function as(t,n,e,r,i,o){if(e){var u=yu(n),a=wu(n),s=r*e;null==i?(i=n+r*fu,o=n-s/2):(i=ss(u,i),o=ss(u,o),(r>0?io)&&(i+=r*fu));for(var c,l=i;r>0?l>o:l1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},fs=function(t,n){return pu(t[0]-n[0])=0;--o)i.point((l=c[o])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function ps(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,C=T*w,M=C>su,S=p*x;if(vs.add(gu(S*T*wu(C),v*_+S*yu(C))),o+=M?w+T*fu:w,M^h>=e^m>=e){var k=Ju(Gu(f),Gu(y));na(k);var A=Ju(i,k);na(A);var N=(M^w>=0?-1:1)*ku(A[2]);(r>N||r===N&&(k[0]||k[1]))&&(u+=M^w>=0?1:-1)}}return(o<-au||o0){for(h||(o.polygonStart(),h=!0),o.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),a.push(c.filter(ms))}return d}};function ms(t){return t.length>1}function bs(t,n){return((t=t.x)[0]<0?t[1]-cu-au:cu-t[1])-((n=n.x)[0]<0?n[1]-cu-au:cu-n[1])}var xs=ys((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?su:-su,s=pu(o-e);pu(s-su)0?cu:-cu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&s>=su&&(pu(e-i)au?vu((wu(n)*(o=yu(r))*wu(e)-wu(r)*(i=yu(n))*wu(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*cu,r.point(-su,i),r.point(0,i),r.point(su,i),r.point(su,0),r.point(su,-i),r.point(0,-i),r.point(-su,-i),r.point(-su,0),r.point(-su,i);else if(pu(t[0]-n[0])>au){var o=t[0]0,i=pu(n)>au;function o(t,e){return yu(t)*yu(e)>n}function u(t,e,r){var i=[1,0,0],o=Ju(Gu(t),Gu(e)),u=Qu(o,o),a=o[0],s=u-a*a;if(!s)return!r&&t;var c=n*u/s,l=-n*a/s,f=Ju(i,o),h=ta(i,c);Zu(h,ta(o,l));var d=f,p=Qu(h,d),v=Qu(d,d),g=p*p-v*(Qu(h,h)-1);if(!(g<0)){var y=Cu(g),m=ta(d,(-p-y)/v);if(Zu(m,h),m=Ku(m),!r)return m;var b,x=t[0],_=e[0],w=t[1],T=e[1];_0^m[1]<(pu(m[0]-x)su^(x<=m[0]&&m[0]<=_)){var S=ta(d,(-p+y)/v);return Zu(S,h),[m,Ku(S)]}}}function a(n,e){var i=r?t:su-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return ys(o,(function(t){var n,e,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(f,h){var d,p=[f,h],v=o(f,h),g=r?v?0:a(f,h):v?a(f+(f<0?su:-su),h):0;if(!n&&(c=s=v)&&t.lineStart(),v!==s&&(!(d=u(n,p))||fs(n,d)||fs(p,d))&&(p[0]+=au,p[1]+=au,v=o(p[0],p[1])),v!==s)l=0,v?(t.lineStart(),d=u(p,n),t.point(d[0],d[1])):(d=u(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=u(p,n,!0))||(l=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&fs(n,p)||t.point(p[0],p[1]),n=p,s=v,e=g},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return l|(c&&s)<<1}}}),(function(n,r,i,o){as(o,t,e,i,n,r)}),r?[0,-t]:[-su,t-su])},ws=function(t,n,e,r,i,o){var u,a=t[0],s=t[1],c=0,l=1,f=n[0]-a,h=n[1]-s;if(u=e-a,f||!(u>0)){if(u/=f,f<0){if(u0){if(u>l)return;u>c&&(c=u)}if(u=i-a,f||!(u<0)){if(u/=f,f<0){if(u>l)return;u>c&&(c=u)}else if(f>0){if(u0)){if(u/=h,h<0){if(u0){if(u>l)return;u>c&&(c=u)}if(u=o-s,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>c&&(c=u)}else if(h>0){if(u0&&(t[0]=a+c*f,t[1]=s+c*h),l<1&&(n[0]=a+l*f,n[1]=s+l*h),!0}}}}},Ts=1e9,Cs=-Ts;function Ms(t,n,e,i){function o(r,o){return t<=r&&r<=e&&n<=o&&o<=i}function u(r,o,u,s){var l=0,f=0;if(null==r||(l=a(r,u))!==(f=a(o,u))||c(r,o)<0^u>0)do{s.point(0===l||3===l?t:e,l>1?i:n)}while((l=(l+u+4)%4)!==f);else s.point(o[0],o[1])}function a(r,i){return pu(r[0]-t)0?0:3:pu(r[0]-e)0?2:1:pu(r[1]-n)0?1:0:i>0?3:2}function s(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,l,f,h,d,p,v,g,y,m,b,x=a,_=ls(),w={point:T,lineStart:function(){w.point=C,l&&l.push(f=[]),m=!0,y=!1,v=g=NaN},lineEnd:function(){c&&(C(h,d),p&&y&&_.rejoin(),c.push(_.result())),w.point=T,y&&x.lineEnd()},polygonStart:function(){x=_,c=[],l=[],b=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=l.length;ei&&(h-o)*(i-u)>(d-u)*(t-o)&&++n:d<=i&&(h-o)*(i-u)<(d-u)*(t-o)&&--n;return n}(),e=b&&n,o=(c=Object(r.n)(c)).length;(e||o)&&(a.polygonStart(),e&&(a.lineStart(),u(null,null,1,a),a.lineEnd()),o&&ds(c,s,n,u,a),a.polygonEnd()),x=a,c=l=f=null}};function T(t,n){o(t,n)&&x.point(t,n)}function C(r,u){var a=o(r,u);if(l&&f.push([r,u]),m)h=r,d=u,p=a,m=!1,a&&(x.lineStart(),x.point(r,u));else if(a&&y)x.point(r,u);else{var s=[v=Math.max(Cs,Math.min(Ts,v)),g=Math.max(Cs,Math.min(Ts,g))],c=[r=Math.max(Cs,Math.min(Ts,r)),u=Math.max(Cs,Math.min(Ts,u))];ws(s,c,t,n,e,i)?(y||(x.lineStart(),x.point(s[0],s[1])),x.point(c[0],c[1]),a||x.lineEnd(),b=!1):a&&(x.lineStart(),x.point(r,u),b=!1)}v=r,g=u,y=a}return w}}var Ss,ks,As,Ns=function(){var t,n,e,r=0,i=0,o=960,u=500;return e={stream:function(e){return t&&n===e?t:t=Ms(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]]}}},Es=ru(),Ds={sphere:Nu,point:Nu,lineStart:function(){Ds.point=Ls,Ds.lineEnd=Os},lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu};function Os(){Ds.point=Ds.lineEnd=Nu}function Ls(t,n){Ss=t*=du,ks=wu(n*=du),As=yu(n),Ds.point=js}function js(t,n){t*=du;var e=wu(n*=du),r=yu(n),i=pu(t-Ss),o=yu(i),u=r*wu(i),a=As*e-ks*r*o,s=ks*e+As*r*o;Es.add(gu(Cu(u*u+a*a),s)),Ss=t,ks=e,As=r}var Rs=function(t){return Es.reset(),Hu(t,Ds),+Es},qs=[null,null],Ps={type:"LineString",coordinates:qs},Fs=function(t,n){return qs[0]=t,qs[1]=n,Rs(Ps)},zs={Feature:function(t,n){return $s(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++rau})).map(c)).concat(Object(r.s)(mu(u/p)*p,o,p).filter((function(t){return pu(t%g)>au})).map(l))}return m.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(h(a).slice(1),f(e).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],s=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),s>a&&(t=s,s=a,a=t),m.precision(y)):[[i,s],[e,a]]},m.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],u=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),u>o&&(e=u,u=o,o=e),m.precision(y)):[[n,u],[t,o]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(v=+t[0],g=+t[1],m):[v,g]},m.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],m):[d,p]},m.precision=function(r){return arguments.length?(y=+r,c=Xs(u,o,90),l=Ks(n,t,y),f=Xs(s,a,90),h=Ks(i,e,y),m):y},m.extentMajor([[-180,-90+au],[180,90-au]]).extentMinor([[-180,-80-au],[180,80+au]])}function Qs(){return Gs()()}var Js,Zs,tc,nc,ec=function(t,n){var e=t[0]*du,r=t[1]*du,i=n[0]*du,o=n[1]*du,u=yu(r),a=wu(r),s=yu(o),c=wu(o),l=u*yu(e),f=u*wu(e),h=s*yu(i),d=s*wu(i),p=2*ku(Cu(Au(o-r)+u*s*Au(i-e))),v=wu(p),g=p?function(t){var n=wu(t*=p)/v,e=wu(p-t)/v,r=e*l+n*h,i=e*f+n*d,o=e*a+n*c;return[gu(i,r)*hu,gu(o,Cu(r*r+i*i))*hu]}:function(){return[e*hu,r*hu]};return g.distance=p,g},rc=function(t){return t},ic=ru(),oc=ru(),uc={point:Nu,lineStart:Nu,lineEnd:Nu,polygonStart:function(){uc.lineStart=ac,uc.lineEnd=lc},polygonEnd:function(){uc.lineStart=uc.lineEnd=uc.point=Nu,ic.add(pu(oc)),oc.reset()},result:function(){var t=ic/2;return ic.reset(),t}};function ac(){uc.point=sc}function sc(t,n){uc.point=cc,Js=tc=t,Zs=nc=n}function cc(t,n){oc.add(nc*t-tc*n),tc=t,nc=n}function lc(){cc(Js,Zs)}var fc,hc,dc,pc,vc=uc,gc=1/0,yc=gc,mc=-gc,bc=mc,xc={point:function(t,n){tmc&&(mc=t),nbc&&(bc=n)},lineStart:Nu,lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu,result:function(){var t=[[gc,yc],[mc,bc]];return mc=bc=-(yc=gc=1/0),t}},_c=0,wc=0,Tc=0,Cc=0,Mc=0,Sc=0,kc=0,Ac=0,Nc=0,Ec={point:Dc,lineStart:Oc,lineEnd:Rc,polygonStart:function(){Ec.lineStart=qc,Ec.lineEnd=Pc},polygonEnd:function(){Ec.point=Dc,Ec.lineStart=Oc,Ec.lineEnd=Rc},result:function(){var t=Nc?[kc/Nc,Ac/Nc]:Sc?[Cc/Sc,Mc/Sc]:Tc?[_c/Tc,wc/Tc]:[NaN,NaN];return _c=wc=Tc=Cc=Mc=Sc=kc=Ac=Nc=0,t}};function Dc(t,n){_c+=t,wc+=n,++Tc}function Oc(){Ec.point=Lc}function Lc(t,n){Ec.point=jc,Dc(dc=t,pc=n)}function jc(t,n){var e=t-dc,r=n-pc,i=Cu(e*e+r*r);Cc+=i*(dc+t)/2,Mc+=i*(pc+n)/2,Sc+=i,Dc(dc=t,pc=n)}function Rc(){Ec.point=Dc}function qc(){Ec.point=Fc}function Pc(){zc(fc,hc)}function Fc(t,n){Ec.point=zc,Dc(fc=dc=t,hc=pc=n)}function zc(t,n){var e=t-dc,r=n-pc,i=Cu(e*e+r*r);Cc+=i*(dc+t)/2,Mc+=i*(pc+n)/2,Sc+=i,kc+=(i=pc*t-dc*n)*(dc+t),Ac+=i*(pc+n),Nc+=3*i,Dc(dc=t,pc=n)}var Hc=Ec;function $c(t){this._context=t}$c.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,fu)}},result:Nu};var Ic,Uc,Bc,Wc,Yc,Vc=ru(),Xc={point:Nu,lineStart:function(){Xc.point=Kc},lineEnd:function(){Ic&&Gc(Uc,Bc),Xc.point=Nu},polygonStart:function(){Ic=!0},polygonEnd:function(){Ic=null},result:function(){var t=+Vc;return Vc.reset(),t}};function Kc(t,n){Xc.point=Gc,Uc=Wc=t,Bc=Yc=n}function Gc(t,n){Wc-=t,Yc-=n,Vc.add(Cu(Wc*Wc+Yc*Yc)),Wc=t,Yc=n}var Qc=Xc;function Jc(){this._string=[]}function Zc(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jc.prototype={_radius:4.5,_circle:Zc(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=Zc(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}};var tl=function(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Hu(t,e(r))),r.result()}return o.area=function(t){return Hu(t,e(vc)),vc.result()},o.measure=function(t){return Hu(t,e(Qc)),Qc.result()},o.bounds=function(t){return Hu(t,e(xc)),xc.result()},o.centroid=function(t){return Hu(t,e(Hc)),Hc.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,rc):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new Jc):new $c(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)},nl=function(t){return{stream:el(t)}};function el(t){return function(n){var e=new rl;for(var r in t)e[r]=t[r];return e.stream=n,e}}function rl(){}function il(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Hu(e,t.stream(xc)),n(xc.result()),null!=r&&t.clipExtent(r),t}function ol(t,n,e){return il(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 ul(t,n,e){return ol(t,[[0,0],n],e)}function al(t,n,e){return il(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 sl(t,n,e){return il(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)}rl.prototype={constructor:rl,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 cl=16,ll=yu(30*du),fl=function(t,n){return+n?function(t,n){function e(r,i,o,u,a,s,c,l,f,h,d,p,v,g){var y=c-r,m=l-i,b=y*y+m*m;if(b>4*n&&v--){var x=u+h,_=a+d,w=s+p,T=Cu(x*x+_*_+w*w),C=ku(w/=T),M=pu(pu(w)-1)n||pu((y*N+m*E)/b-.5)>.3||u*h+a*d+s*p2?t[2]%360*du:0,A()):[g*hu,y*hu,m*hu]},M.precision=function(t){return arguments.length?(C=fl(k,T=t*t),N()):Cu(T)},M.fitExtent=function(t,n){return ol(M,t,n)},M.fitSize=function(t,n){return ul(M,t,n)},M.fitWidth=function(t,n){return al(M,t,n)},M.fitHeight=function(t,n){return sl(M,t,n)},function(){return n=t.apply(this,arguments),M.invert=n.invert&&S,A()}}function vl(t){var n=0,e=su/3,r=pl(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*du,e=t[1]*du):[n*hu,e*hu]},i}function gl(t,n){var e=wu(t),r=(e+wu(n))/2;if(pu(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:u).invert(t)},l.stream=function(e){return t&&n===e?t:(r=[u.stream(n=e),a.stream(e),s.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-cu+au&&(n=-cu+au):n>cu-au&&(n=cu-au);var e=i/_u(Nl(n),r);return[e*wu(r*t),i-e*yu(r*t)]}return o.invert=function(t,n){var e=i-n,o=Tu(r)*Cu(t*t+e*e);return[gu(t,pu(e))/r*Tu(e),2*vu(_u(i/o,1/r))-cu]},o}var Dl=function(){return vl(El).scale(109.5).parallels([30,30])};function Ol(t,n){return[t,n]}Ol.invert=Ol;var Ll=function(){return dl(Ol).scale(152.63)};function jl(t,n){var e=yu(t),r=t===n?wu(t):(e-yu(n))/(n-t),i=e/r+t;if(pu(r)au&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var $l=function(){return dl(Hl).scale(175.295)};function Il(t,n){return[yu(n)*wu(t),wu(n)]}Il.invert=_l(ku);var Ul=function(){return dl(Il).scale(249.5).clipAngle(90+au)};function Bl(t,n){var e=yu(n),r=1+yu(t)*e;return[e*wu(t)/r,wu(n)/r]}Bl.invert=_l((function(t){return 2*vu(t)}));var Wl=function(){return dl(Bl).scale(250).clipAngle(142)};function Yl(t,n){return[xu(Mu((cu+n)/2)),-t]}Yl.invert=function(t,n){return[-n,2*vu(bu(t))-cu]};var Vl=function(){var t=Al(Yl),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)};function Xl(t,n){return t.parent===n.parent?1:2}function Kl(t,n){return t+n.x}function Gl(t,n){return Math.max(t,n.y)}var Ql=function(){var t=Xl,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(Kl,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Gl,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),s=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),c=a.x-t(a,s)/2,l=s.x+t(s,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-c)/(l-c)*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};function Jl(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 Zl(t,n){var e,r,i,o,u,a=new rf(t),s=+t.value&&(a.value=t.value),c=[a];for(null==n&&(n=tf);e=c.pop();)if(s&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)c.push(r=e.children[o]=new rf(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(ef)}function tf(t){return t.children}function nf(t){t.data=t.data.data}function ef(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function rf(t){this.data=t,this.depth=this.height=0,this.parent=null}rf.prototype=Zl.prototype={constructor:rf,count:function(){return this.eachAfter(Jl)},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=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 Zl(this).eachBefore(nf)}};var of=Array.prototype.slice,uf=function(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}(of.call(t))).length,o=[];r0&&e*e>r*r+i*i}function lf(t,n){for(var e=0;ee*e+r*r}function gf(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 yf(t){this._=t,this.next=null,this.previous=null}function mf(t){if(!(i=t.length))return 0;var n,e,r,i,o,u,a,s,c,l,f;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;pf(e,n,r=t[2]),n=new yf(n),e=new yf(e),r=new yf(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=xf(n),e):t},e.parentId=function(t){return arguments.length?(n=xf(t),e):n},e};function Pf(t,n){return t.parent===n.parent?1:2}function Ff(t){var n=t.children;return n?n[0]:t.t}function zf(t){var n=t.children;return n?n[n.length-1]:t.t}function Hf(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 $f(t,n,e){return t.a.parent===n.parent?t.a:e}function If(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}If.prototype=Object.create(rf.prototype);var Uf=function(){var t=Pf,n=1,e=1,r=null;function i(i){var s=function(t){for(var n,e,r,i,o,u=new If(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 If(r[i],i)),e.parent=n;return(u.parent=new If(null,0)).children=[u],u}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(u),r)i.eachBefore(a);else{var c=i,l=i,f=i;i.eachBefore((function(t){t.xl.x&&(l=t),t.depth>f.depth&&(f=t)}));var h=c===l?1:t(c,l)/2,d=h-c.x,p=n/(l.x+h+d),v=e/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,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,s=o.parent.children[0],c=o.m,l=u.m,f=a.m,h=s.m;a=zf(a),o=Ff(o),a&&o;)s=Ff(s),(u=zf(u)).a=n,(i=a.z+f-o.z-c+t(a._,o._))>0&&(Hf($f(a,n,r),n,i),c+=i,l+=i),f+=a.m,c+=o.m,h+=s.m,l+=u.m;a&&!zf(u)&&(u.t=a,u.m+=f-l),o&&!Ff(s)&&(s.t=o,s.m+=c-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},Bf=function(t,n,e,r,i){for(var o,u=t.children,a=-1,s=u.length,c=t.value&&(i-e)/t.value;++ah&&(h=a),g=l*l*v,(d=Math.max(h/g,g/f))>p){l-=a;break}p=d}y.push(u={value:l,dice:s1?n:1)},e}(Wf),Xf=function(){var t=Vf,n=!1,e=1,r=1,i=[0],o=_f,u=_f,a=_f,s=_f,c=_f;function l(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(f),i=[0],n&&t.eachBefore(Af),t}function f(n){var e=i[n.depth],r=n.x0+e,l=n.y0+e,f=n.x1-e,h=n.y1-e;f=e-1){var l=a[n];return l.x0=i,l.y0=o,l.x1=u,void(l.y1=s)}for(var f=c[n],h=r/2+f,d=n+1,p=e-1;d>>1;c[v]s-o){var m=(i*y+u*g)/r;t(n,d,g,i,o,m,s),t(d,e,y,m,o,u,s)}else{var b=(o*y+s*g)/r;t(n,d,g,i,o,u,b),t(d,e,y,i,b,u,s)}}(0,s,t.value,n,e,r,i)},Gf=function(t,n,e,r,i){(1&t.depth?Bf:Nf)(t,n,e,r,i)},Qf=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,s,c,l,f=-1,h=u.length,d=t.value;++f1?n:1)},e}(Wf),Jf=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)c.push(t[r[o[n]][2]]);for(n=+a;na!=c>a&&u<(s-e)*(a-r)/(c-r)+e&&(l=!l),s=e,c=r;return l},oh=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],s=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new sh(t)}sh.prototype=dh.prototype={constructor:sh,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=uh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),ch(this),this},abort:function(){return null==this._error&&fh(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))},hh(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,hh(this),this}};var ph=function(){return Math.random()},vh=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}(ph),gh=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}(ph),yh=function t(n){function e(){var t=gh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),mh=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,s)}catch(t){return void u.call("error",e,t)}else n=s;u.call("load",e,n)}else u.call("error",e,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=s.ontimeout=h:s.onreadystatechange=function(t){s.readyState>3&&h(t)},s.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?(f=+t,e):f},user:function(t){return arguments.length<1?c:(c=null==t?null:t+"",e)},password:function(t){return arguments.length<1?l:(l=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 s.open(n,t,!0,c,l),null==r||a.has("accept")||a.set("accept",r+",*/*"),s.setRequestHeader&&a.each((function(t,n){s.setRequestHeader(n,t)})),null!=r&&s.overrideMimeType&&s.overrideMimeType(r),null!=o&&(s.responseType=o),f>0&&(s.timeout=f),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,s),s.send(null==i?null:i),e},abort:function(){return s.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},wh=function(t,n){return function(e,r){var i=_h(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Th=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),Ch=wh("application/json",(function(t){return JSON.parse(t.responseText)})),Mh=wh("text/plain",(function(t){return t.responseText})),Sh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),kh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=_h(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},o.row(r),i?o.get(i):o}},Ah=kh("text/csv",ro),Nh=kh("text/tab-separated-values",so),Eh=Array.prototype,Dh=Eh.map,Oh=Eh.slice,Lh={name:"implicit"};function jh(t){var n=Object(Xi.c)(),e=[],r=Lh;function i(i){var o=i+"",u=n.get(o);if(!u){if(r!==Lh)return r;n.set(o,u=e.push(i))}return t[(u-1)%t.length]}return t=null==t?[]:Oh.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Xi.c)();for(var r,o,u=-1,a=t.length;++u2?Ih:$h,r=i=null,l}function l(n){return(r||(r=e(o,u,s?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 l.invert=function(t){return(i||(i=e(u,o,Hh,s?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)},l.domain=function(t){return arguments.length?(o=Dh.call(t,Fh),c()):o.slice()},l.range=function(t){return arguments.length?(u=Oh.call(t),c()):u.slice()},l.rangeRound=function(t){return u=Oh.call(t),a=oe,c()},l.clamp=function(t){return arguments.length?(s=!!t,c()):s},l.interpolate=function(t){return arguments.length?(a=t,c()):a},c()}var Wh=function(t,n,e){var i,o=t[0],u=t[t.length-1],a=Object(r.A)(o,u,null==n?10:n);switch((e=Wo(null==e?",f":e)).type){case"s":var s=Math.max(Math.abs(o),Math.abs(u));return null!=e.precision||isNaN(i=nu(a,s))||(e.precision=i),Ko(e,s);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=eu(a,Math.max(Math.abs(o),Math.abs(u))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=tu(a))||(e.precision=i-2*("%"===e.type))}return Xo(e)};function Yh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Wh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,o=n(),u=0,a=o.length-1,s=o[u],c=o[a];return c0?(s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i,i=Object(r.z)(s,c,e)):i<0&&(s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i,i=Object(r.z)(s,c,e)),i>0?(o[u]=Math.floor(s/i)*i,o[a]=Math.ceil(c/i)*i,n(o)):i<0&&(o[u]=Math.ceil(s*i)/i,o[a]=Math.floor(c*i)/i,n(o)),t},t}function Vh(){var t=Bh(Hh,Zn);return t.copy=function(){return Uh(t,Vh())},Yh(t)}function Xh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Dh.call(e,Fh),n):t.slice()},n.copy=function(){return Xh().domain(t)},Yh(n)}var Kh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u0){for(;dc)break;g.push(h)}}else for(;d=1;--f)if(!((h=l*f)c)break;g.push(h)}}else g=Object(r.B)(d,p,Math.min(p-d,v)).map(o);return u?g.reverse():g},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=Xo(r)),n===1/0)return r;null==n&&(n=10);var u=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/o(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[u-1],i[u]]},u.copy=function(){return ad().domain([t,n]).range(o)},Yh(u)}function sd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Oh.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Oh.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return sd().domain(t).range(n)},i}var cd=new Date,ld=new Date;function fd(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-n0))return a;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u=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 cd.setTime(+n),ld.setTime(+r),t(cd),t(ld),Math.floor(e(cd,ld))},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 hd=fd((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?fd((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,gd=6048e5,yd=fd((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),md=yd,bd=yd.range,xd=fd((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),_d=xd,wd=xd.range,Td=fd((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),Cd=Td,Md=Td.range,Sd=fd((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())*vd)/864e5}),(function(t){return t.getDate()-1})),kd=Sd,Ad=Sd.range;function Nd(t){return fd((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())*vd)/gd}))}var Ed=Nd(0),Dd=Nd(1),Od=Nd(2),Ld=Nd(3),jd=Nd(4),Rd=Nd(5),qd=Nd(6),Pd=Ed.range,Fd=Dd.range,zd=Od.range,Hd=Ld.range,$d=jd.range,Id=Rd.range,Ud=qd.range,Bd=fd((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()})),Wd=Bd,Yd=Bd.range,Vd=fd((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()}));Vd.every=function(t){return isFinite(t=Math.floor(t))&&t>0?fd((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 Xd=Vd,Kd=Vd.range,Gd=fd((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Gd,Jd=Gd.range,Zd=fd((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Zd,np=Zd.range,ep=fd((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function op(t){return fd((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)/gd}))}var up=op(0),ap=op(1),sp=op(2),cp=op(3),lp=op(4),fp=op(5),hp=op(6),dp=up.range,pp=ap.range,vp=sp.range,gp=cp.range,yp=lp.range,mp=fp.range,bp=hp.range,xp=fd((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()})),_p=xp,wp=xp.range,Tp=fd((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()}));Tp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?fd((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 Cp=Tp,Mp=Tp.range;function Sp(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 kp(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 Ap(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Np(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,s=t.shortMonths,c=$p(i),l=Ip(i),f=$p(o),h=Ip(o),d=$p(u),p=Ip(u),v=$p(a),g=Ip(a),y=$p(s),m=Ip(s),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:sv,e:sv,f:dv,H:cv,I:lv,j:fv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Uv,s:Bv,S:gv,u:yv,U:mv,V:bv,w:xv,W:_v,x:null,X:null,y:wv,Y:Tv,Z:Cv,"%":Iv},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Mv,e:Mv,f:Ev,H:Sv,I:kv,j:Av,L:Nv,m:Dv,M:Ov,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Uv,s:Bv,S:Lv,u:jv,U:Rv,V:qv,w:Pv,W:Fv,x:null,X:null,y:zv,Y:Hv,Z:$v,"%":Iv},_={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=m[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 C(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Zp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=c.exec(n.slice(e));return r?(t.p=l[r[0].toLowerCase()],e+r[0].length):-1},Q:uv,s:av,S:ev,u:Bp,U:Wp,V:Yp,w:Up,W:Vp,x:function(t,n,r){return C(t,e,n,r)},X:function(t,n,e){return C(t,r,n,e)},y:Kp,Y:Xp,Z:Gp,"%":ov};function w(t,n){return function(e){var r,i,o,u=[],a=-1,s=0,c=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=(r=kp(Ap(o.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=(i=(r=n(Ap(o.y))).getDay())>4||0===i?Dd.ceil(r):Dd(r),r=kd.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?kp(Ap(o.y)).getUTCDay():n(Ap(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,kp(o)):n(o)}}function C(t,n,e,r){for(var i,o,u=0,a=n.length,s=e.length;u=s)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=_[i in Rp?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),x.x=w(e,x),x.X=w(r,x),x.c=w(n,x),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=T(t+="",Sp);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=T(t,kp);return n.toString=function(){return t},n}}}var Ep,Dp,Op,Lp,jp,Rp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,Pp=/^%/,Fp=/[\\^$*+?|[\]().{}]/g;function zp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function Gp(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 Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Zp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function ov(t,n,e){var r=Pp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function uv(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function sv(t,n){return zp(t.getDate(),n,2)}function cv(t,n){return zp(t.getHours(),n,2)}function lv(t,n){return zp(t.getHours()%12||12,n,2)}function fv(t,n){return zp(1+kd.count(Xd(t),t),n,3)}function hv(t,n){return zp(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return zp(t.getMonth()+1,n,2)}function vv(t,n){return zp(t.getMinutes(),n,2)}function gv(t,n){return zp(t.getSeconds(),n,2)}function yv(t){var n=t.getDay();return 0===n?7:n}function mv(t,n){return zp(Ed.count(Xd(t),t),n,2)}function bv(t,n){var e=t.getDay();return t=e>=4||0===e?jd(t):jd.ceil(t),zp(jd.count(Xd(t),t)+(4===Xd(t).getDay()),n,2)}function xv(t){return t.getDay()}function _v(t,n){return zp(Dd.count(Xd(t),t),n,2)}function wv(t,n){return zp(t.getFullYear()%100,n,2)}function Tv(t,n){return zp(t.getFullYear()%1e4,n,4)}function Cv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+zp(n/60|0,"0",2)+zp(n%60,"0",2)}function Mv(t,n){return zp(t.getUTCDate(),n,2)}function Sv(t,n){return zp(t.getUTCHours(),n,2)}function kv(t,n){return zp(t.getUTCHours()%12||12,n,2)}function Av(t,n){return zp(1+rp.count(Cp(t),t),n,3)}function Nv(t,n){return zp(t.getUTCMilliseconds(),n,3)}function Ev(t,n){return Nv(t,n)+"000"}function Dv(t,n){return zp(t.getUTCMonth()+1,n,2)}function Ov(t,n){return zp(t.getUTCMinutes(),n,2)}function Lv(t,n){return zp(t.getUTCSeconds(),n,2)}function jv(t){var n=t.getUTCDay();return 0===n?7:n}function Rv(t,n){return zp(up.count(Cp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?lp(t):lp.ceil(t),zp(lp.count(Cp(t),t)+(4===Cp(t).getUTCDay()),n,2)}function Pv(t){return t.getUTCDay()}function Fv(t,n){return zp(ap.count(Cp(t),t),n,2)}function zv(t,n){return zp(t.getUTCFullYear()%100,n,2)}function Hv(t,n){return zp(t.getUTCFullYear()%1e4,n,4)}function $v(){return"+0000"}function Iv(){return"%"}function Uv(t){return+t}function Bv(t){return Math.floor(+t/1e3)}function Wv(t){return Ep=Np(t),Dp=Ep.format,Op=Ep.parse,Lp=Ep.utcFormat,jp=Ep.utcParse,Ep}Wv({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 Yv=Date.prototype.toISOString?function(t){return t.toISOString()}:Lp("%Y-%m-%dT%H:%M:%S.%LZ"),Vv=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:jp("%Y-%m-%dT%H:%M:%S.%LZ"),Xv=1e3,Kv=60*Xv,Gv=60*Kv,Qv=24*Gv,Jv=7*Qv,Zv=30*Qv,tg=365*Qv;function ng(t){return new Date(t)}function eg(t){return t instanceof Date?+t:+new Date(+t)}function rg(t,n,e,i,o,u,a,s,c){var l=Bh(Hh,Zn),f=l.invert,h=l.domain,d=c(".%L"),p=c(":%S"),v=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),m=c("%b %d"),b=c("%B"),x=c("%Y"),_=[[a,1,Xv],[a,5,5*Xv],[a,15,15*Xv],[a,30,30*Xv],[u,1,Kv],[u,5,5*Kv],[u,15,15*Kv],[u,30,30*Kv],[o,1,Gv],[o,3,3*Gv],[o,6,6*Gv],[o,12,12*Gv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Zv],[n,3,3*Zv],[t,1,tg]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return pg.h=360*t-100,pg.s=1.5-1.5*n,pg.l=.8-.9*n,pg+""};function gg(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var yg=gg(ug("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),mg=gg(ug("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),bg=gg(ug("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xg=gg(ug("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function _g(t){var n=0,e=1,r=!1;function i(i){var o=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,o)):o)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return _g(t).domain([n,e]).clamp(r)},Yh(i)}var wg=e(5),Tg=function(t){return function(){return t}};function Cg(t){return t[0]}function Mg(t){return t[1]}function Sg(){this._=null}function kg(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ag(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 Ng(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 Eg(t){for(;t.L;)t=t.L;return t}Sg.prototype={constructor:Sg,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=Eg(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&&(Ag(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ng(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ng(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ag(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?Eg(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,Ag(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,Ng(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Ag(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ng(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,Ag(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ng(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Dg=Sg;function Og(t,n,e,r){var i=[null,null],o=ty.push(i)-1;return i.left=t,i.right=n,e&&jg(i,t,n,e),r&&jg(i,n,t,r),Jg[t.index].halfedges.push(o),Jg[n.index].halfedges.push(o),i}function Lg(t,n,e){var r=[n,e];return r.left=t,r}function jg(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 Rg(t,n,e,r,i){var o,u=t[0],a=t[1],s=u[0],c=u[1],l=0,f=1,h=a[0]-s,d=a[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>f)return;o>l&&(l=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>l&&(l=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>f)return;o>l&&(l=o)}if(o=i-c,d||!(o<0)){if(o/=d,d<0){if(o>f)return;o>l&&(l=o)}else if(d>0){if(o0||f<1)||(l>0&&(t[0]=[s+l*h,c+l*d]),f<1&&(t[1]=[s+f*h,c+f*d]),!0)}}}}}function qg(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,s=t[0],c=t.left,l=t.right,f=c[0],h=c[1],d=l[0],p=l[1],v=(f+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(f>d){if(s){if(s[1]>=i)return}else s=[v,e];o=[v,i]}else{if(s){if(s[1]1)if(f>d){if(s){if(s[1]>=i)return}else s=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(s){if(s[1]=r)return}else s=[n,u*n+a];o=[r,u*r+a]}else{if(s){if(s[0]=-ey)){var d=s*s+c*c,p=l*l+f*f,v=(f*d-c*p)/h,g=(s*p-l*d)/h,y=$g.pop()||new function(){kg(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+u,y.y=(y.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=y;for(var m=null,b=Zg._;b;)if(y.yny)a=a.L;else{if(!((i=o-Gg(a,u))>ny)){r>-ny?(n=a.P,e=a):i>-ny?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jg[t.index]={site:t,halfedges:[]}}(t);var s=Wg(t);if(Qg.insert(n,s),n||e){if(n===e)return Ug(n),e=Wg(n.site),Qg.insert(s,e),s.edge=e.edge=Og(n.site,s.site),Ig(n),void Ig(e);if(e){Ug(n),Ug(e);var c=n.site,l=c[0],f=c[1],h=t[0]-l,d=t[1]-f,p=e.site,v=p[0]-l,g=p[1]-f,y=2*(h*g-d*v),m=h*h+d*d,b=v*v+g*g,x=[(g*m-d*b)/y+l,(h*b-v*m)/y+f];jg(e.edge,c,p,x),s.edge=Og(c,t,null,x),e.edge=Og(t,p,null,x),Ig(n),Ig(e)}else s.edge=Og(n.site,s.site)}}function Kg(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],s=e[1],c=s-n;if(!c)return a;var l=a-r,f=1/o-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-s+c/2+i-o/2)))/f+r:(r+a)/2}function Gg(t,n){var e=t.N;if(e)return Kg(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qg,Jg,Zg,ty,ny=1e-6,ey=1e-12;function ry(t,n){return n[1]-t[1]||n[0]-t[0]}function iy(t,n){var e,r,i,o=t.sort(ry).pop();for(ty=[],Jg=new Array(t.length),Qg=new Dg,Zg=new Dg;;)if(i=Hg,o&&(!i||o[1]ny||Math.abs(i[0][1]-i[1][1])>ny)||delete ty[o]}(u,a,s,c),function(t,n,e,r){var i,o,u,a,s,c,l,f,h,d,p,v,g=Jg.length,y=!0;for(i=0;iny||Math.abs(v-h)>ny)&&(s.splice(a,0,ty.push(Lg(u,d,Math.abs(p-t)ny?[t,Math.abs(f-t)ny?[Math.abs(h-r)ny?[e,Math.abs(f-e)ny?[Math.abs(h-n)=a)return null;var s=t-i.site[0],c=n-i.site[1],l=s*s+c*c;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 s=t-a[0],c=n-a[1],f=s*s+c*c;fr?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}var my=function(){var t,n,e=hy,r=dy,i=yy,o=vy,u=gy,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=pe,f=[],h=C("start","zoom","end"),d=500,p=150,v=0;function g(t){t.property("__zoom",py).on("wheel.zoom",T).on("mousedown.zoom",M).on("dblclick.zoom",S).filter(u).on("touchstart.zoom",k).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new ay(n,t.x,t.y)}function m(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 ay(t.k,r,i)}function b(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(){_(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).end()})).tween("zoom",(function(){var t=arguments,i=_(this,t),o=r.apply(this,t),u=e||b(o),a=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),s=this.__zoom,c="function"==typeof n?n.apply(this,t):n,f=l(s.invert(u).concat(a/s.k),c.invert(u).concat(a/c.k));return function(t){if(1===t)t=c;else{var n=f(t),e=a/n[2];t=new ay(e,u[0]-n[0]*e,u[1]-n[1]*e)}i.zoom(null,t)}}))}function _(t,n){for(var e,r=0,i=f.length;rv}t.zoom("mouse",i(m(t.that.__zoom,t.mouse[0]=Tt(t.that),t.mouse[1]),t.extent,s))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Et(ot.view,t.moved),fy(),t.end()}),!0),o=Tt(this),u=ot.clientX,a=ot.clientY;Nt(ot.view),ly(),t.mouse=[o,this.__zoom.invert(o)],ur(this),t.start()}}function S(){if(e.apply(this,arguments)){var t=this.__zoom,n=Tt(this),o=t.invert(n),u=t.k*(ot.shiftKey?.5:2),a=i(m(y(t,u),n,o),r.apply(this,arguments),s);fy(),c>0?gt(this).transition().duration(c).call(x,a,n):gt(this).call(g.transform,a)}}function k(){if(e.apply(this,arguments)){var n,r,i,o,u=_(this,arguments),a=ot.changedTouches,s=a.length;for(ly(),r=0;r-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},o=function(t,n,e){var r=function(n,e,r,i,o){return!(!t.addError||!t.clearErrors||(ro?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===o?"exactly":"no more than")+" "+o+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,o=i.pivots,u=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",o.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",u.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},o=Math.abs,u=Math.atan2,a=Math.cos,s=Math.max,c=Math.min,l=Math.sin,f=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function g(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function y(t){return t.innerRadius}function m(t){return t.outerRadius}function b(t){return t.startAngle}function x(t){return t.endAngle}function _(t){return t&&t.padAngle}function w(t,n,e,r,i,o,u){var a=t-e,c=n-r,l=(u?o:-o)/f(a*a+c*c),h=l*c,d=-l*a,p=t+h,v=n+d,g=e+h,y=r+d,m=(p+g)/2,b=(v+y)/2,x=g-p,_=y-v,w=x*x+_*_,T=i-o,C=p*y-g*v,M=(_<0?-1:1)*f(s(0,T*T*w-C*C)),S=(C*_-x*M)/w,k=(-C*x-_*M)/w,A=(C*_+x*M)/w,N=(-C*x+_*M)/w,E=S-m,D=k-b,O=A-m,L=N-b;return E*E+D*D>O*O+L*L&&(S=A,k=N),{cx:S,cy:k,x01:-h,y01:-d,x11:S*(i/T-1),y11:k*(i/T-1)}}var T=function(){var t=y,n=m,e=i(0),s=null,T=b,C=x,M=_,S=null;function k(){var i,y,m,b=+t.apply(this,arguments),x=+n.apply(this,arguments),_=T.apply(this,arguments)-p,k=C.apply(this,arguments)-p,A=o(k-_),N=k>_;if(S||(S=i=Object(r.a)()),xh)if(A>v-h)S.moveTo(x*a(_),x*l(_)),S.arc(0,0,x,_,k,!N),b>h&&(S.moveTo(b*a(k),b*l(k)),S.arc(0,0,b,k,_,N));else{var E,D,O=_,L=k,j=_,R=k,q=A,P=A,F=M.apply(this,arguments)/2,z=F>h&&(s?+s.apply(this,arguments):f(b*b+x*x)),H=c(o(x-b)/2,+e.apply(this,arguments)),$=H,I=H;if(z>h){var U=g(z/b*l(F)),B=g(z/x*l(F));(q-=2*U)>h?(j+=U*=N?1:-1,R-=U):(q=0,j=R=(_+k)/2),(P-=2*B)>h?(O+=B*=N?1:-1,L-=B):(P=0,O=L=(_+k)/2)}var W=x*a(O),Y=x*l(O),V=b*a(R),X=b*l(R);if(H>h){var K=x*a(L),G=x*l(L),Q=b*a(j),J=b*l(j);if(Ah?function(t,n,e,r,i,o,u,a){var s=e-t,c=r-n,l=u-i,f=a-o,h=(l*(n-o)-f*(t-i))/(f*s-l*c);return[t+h*s,n+h*c]}(W,Y,Q,J,K,G,V,X):[V,X],tt=W-Z[0],nt=Y-Z[1],et=K-Z[0],rt=G-Z[1],it=1/l(((m=(tt*et+nt*rt)/(f(tt*tt+nt*nt)*f(et*et+rt*rt)))>1?0:m<-1?d:Math.acos(m))/2),ot=f(Z[0]*Z[0]+Z[1]*Z[1]);$=c(H,(b-ot)/(it-1)),I=c(H,(x-ot)/(it+1))}}P>h?I>h?(E=w(Q,J,W,Y,x,I,N),D=w(K,G,V,X,x,I,N),S.moveTo(E.cx+E.x01,E.cy+E.y01),Ih&&q>h?$>h?(E=w(V,X,K,G,b,-$,N),D=w(W,Y,Q,J,b,-$,N),S.lineTo(E.cx+E.x01,E.cy+E.y01),$=f;--h)c.point(y[h],m[h]);c.lineEnd(),c.areaEnd()}g&&(y[l]=+t(d,l,i),m[l]=+e(d,l,i),c.point(n?+n(d,l,i):y[l],o?+o(d,l,i):m[l]))}if(p)return c=null,p+""||null}function f(){return A().defined(u).curve(s).context(a)}return l.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,l):t},l.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),l):t},l.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),l):n},l.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),o=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),l):e},l.y1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:i(+t),l):o},l.lineX0=l.lineY0=function(){return f().x(t).y(e)},l.lineY1=function(){return f().x(t).y(o)},l.lineX1=function(){return f().x(n).y(e)},l.defined=function(t){return arguments.length?(u="function"==typeof t?t:i(!!t),l):u},l.curve=function(t){return arguments.length?(s=t,null!=a&&(c=s(a)),l):s},l.context=function(t){return arguments.length?(null==t?a=c=null:c=s(a=t),l):a},l},E=function(t,n){return nt?1:n>=t?0:NaN},D=function(t){return t},O=function(){var t=D,n=E,e=null,r=i(0),o=i(v),u=i(0);function a(i){var a,s,c,l,f,h=i.length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),m=Math.min(v,Math.max(-v,o.apply(this,arguments)-y)),b=Math.min(Math.abs(m)/h,u.apply(this,arguments)),x=b*(m<0?-1:1);for(a=0;a0&&(d+=f);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,c=d?(m-h*x)/d:0;a0?f*c:0)+x,g[s]={data:i[s],index:a,value:f,startAngle:y,endAngle:l,padAngle:b};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a},L=R(M);function j(t){this._curve=t}function R(t){function n(n){return new j(t(n))}return n._curve=t,n}function q(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(R(t)):n()._curve},t}j.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 P=function(){return q(A().curve(L))},F=function(){var t=N().curve(L),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 q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(R(t)):n()._curve},t},z=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},H=Array.prototype.slice;function $(t){return t.source}function I(t){return t.target}function U(t){var n=$,e=I,o=S,u=k,a=null;function s(){var i,s=H.call(arguments),c=n.apply(this,s),l=e.apply(this,s);if(a||(a=i=Object(r.a)()),t(a,+o.apply(this,(s[0]=c,s)),+u.apply(this,s),+o.apply(this,(s[0]=l,s)),+u.apply(this,s)),i)return a=null,i+""||null}return s.source=function(t){return arguments.length?(n=t,s):n},s.target=function(t){return arguments.length?(e=t,s):e},s.x=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),s):o},s.y=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}function B(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function W(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function Y(t,n,e,r,i){var o=z(n,e),u=z(n,e=(e+i)/2),a=z(r,e),s=z(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],s[0],s[1])}function V(){return U(B)}function X(){return U(W)}function K(){var t=U(Y);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var G={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={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()}},J=Math.sqrt(1/3),Z=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/Z),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=v*o/5,a=Math.cos(u),s=Math.sin(u);t.lineTo(s*e,-a*e),t.lineTo(a*r-s*i,s*r+a*i)}t.closePath()}},ot={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ut=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ut));t.moveTo(0,2*e),t.lineTo(-ut*e,-e),t.lineTo(ut*e,-e),t.closePath()}},st=Math.sqrt(3)/2,ct=1/Math.sqrt(12),lt=3*(ct/2+1),ft={draw:function(t,n){var e=Math.sqrt(n/lt),r=e/2,i=e*ct,o=r,u=e*ct+e,a=-o,s=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,s),t.lineTo(-.5*r-st*i,st*r+-.5*i),t.lineTo(-.5*o-st*u,st*o+-.5*u),t.lineTo(-.5*a-st*s,st*a+-.5*s),t.lineTo(-.5*r+st*i,-.5*i-st*r),t.lineTo(-.5*o+st*u,-.5*u-st*o),t.lineTo(-.5*a+st*s,-.5*s-st*a),t.closePath()}},ht=[G,Q,tt,ot,it,at,ft],dt=function(){var t=i(G),n=i(64),e=null;function o(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return o.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),o):t},o.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),o):n},o.context=function(t){return arguments.length?(e=null==t?null:t,o):e},o},pt=function(){};function vt(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 gt(t){this._context=t}gt.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:vt(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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var yt=function(t){return new gt(t)};function mt(t){this._context=t}mt.prototype={areaStart:pt,areaEnd:pt,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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new mt(t)};function xt(t){this._context=t}xt.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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var _t=function(t){return new xt(t)};function wt(t,n){this._basis=new gt(t),this._beta=n}wt.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,s=-1;++s<=e;)r=s/e,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*u),this._beta*n[s]+(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 Tt=function t(n){function e(t){return 1===n?new gt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Ct(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Mt(t,n){this._context=t,this._k=(1-n)/6}Mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ct(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var St=function t(n){function e(t){return new Mt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function kt(t,n){this._context=t,this._k=(1-n)/6}kt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var At=function t(n){function e(t){return new kt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Nt(t,n){this._context=t,this._k=(1-n)/6}Nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new Nt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Dt(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>h){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>h){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-n*t._l12_2a)/l,u=(u*c+t._y1*t._l23_2a-e*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Ot(t,n){this._context=t,this._alpha=n}Ot.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:Dt(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 Lt=function t(n){function e(t){return n?new Ot(t,n):new Mt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function jt(t,n){this._context=t,this._alpha=n}jt.prototype={areaStart:pt,areaEnd:pt,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:Dt(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 Rt=function t(n){function e(t){return n?new jt(t,n):new kt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.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:Dt(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 Pt=function t(n){function e(t){return n?new qt(t,n):new Nt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ft(t){this._context=t}Ft.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var zt=function(t){return new Ft(t)};function Ht(t){return t<0?-1:1}function $t(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(Ht(o)+Ht(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function It(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Ut(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 Bt(t){this._context=t}function Wt(t){this._context=new Yt(t)}function Yt(t){this._context=t}function Vt(t){return new Bt(t)}function Xt(t){return new Wt(t)}function Kt(t){this._context=t}function Gt(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=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Zt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o=0;)e[n]=n;return e};function on(t,n){return t[n]}var un=function(){var t=i([]),n=rn,e=en,r=on;function o(i){var o,u,a=t.apply(this,arguments),s=i.length,c=a.length,l=new Array(c);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o1)for(var e,r,i,o,u,a,s=0,c=t[n[0]].length;s=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):r[0]=o},cn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;un?1:t>=n?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r>>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>>1;t(n[o],e)>0?i=o:r=o+1}return r}}},o=i(r),u=o.right,a=o.left,s=u,c=function(t,n){null==n&&(n=l);for(var e=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);et?1:n>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,n){var e,r,i=t.length,o=0,u=-1,a=0,s=0;if(null==n)for(;++u1)return s/(o-1)},v=function(t,n){var e=p(t,n);return e?Math.sqrt(e):e},g=function(t,n){var e,r,i,o=t.length,u=-1;if(null==n){for(;++u=e)for(r=i=e;++ue&&(r=e),i=e)for(r=i=e;++ue&&(r=e),i0)return[t];if((r=n0)for(t=Math.ceil(t/u),n=Math.floor(n/u),o=new Array(i=Math.ceil(n-t+1));++a=0?(o>=T?10:o>=C?5:o>=M?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=T?10:o>=C?5:o>=M?2:1)}function A(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>=T?i*=10:o>=C?i*=5:o>=M&&(i*=2),nf;)h.pop(),--d;var p,v=new Array(d+1);for(i=0;i<=d;++i)(p=v[i]=[]).x0=i>0?h[i-1]:l,p.x1=i=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)}},O=function(t,n,e){return t=b.call(t,d).sort(r),Math.ceil((e-n)/(2*(D(t,.75)-D(t,.25))*Math.pow(t.length,-1/3)))},L=function(t,n,e){return Math.ceil((e-n)/(3.5*v(t)*Math.pow(t.length,-1/3)))},j=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++or&&(r=e)}else for(;++o=e)for(r=e;++or&&(r=e);return r},R=function(t,n){var e,r=t.length,i=r,o=-1,u=0;if(null==n)for(;++o=0;)for(n=(r=t[i]).length;--n>=0;)e[--u]=r[n];return e},H=function(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o=e)for(r=e;++oe&&(r=e)}else for(;++o=e)for(r=e;++oe&&(r=e);return r},F=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},z=function(t,n){if(e=t.length){var e,i,o=0,u=0,a=t[u];for(null==n&&(n=r);++o1e-6)if(Math.abs(f*s-c*l)>1e-6&&o){var d=e-u,p=i-a,v=s*s+c*c,g=d*d+p*p,y=Math.sqrt(v),m=Math.sqrt(h),b=o*Math.tan((r-Math.acos((v+h-g)/(2*y*m)))/2),x=b/m,_=b/y;Math.abs(x-1)>1e-6&&(this._+="L"+(t+x*l)+","+(n+x*f)),this._+="A"+o+","+o+",0,0,"+ +(f*d>l*p)+","+(this._x1=t+_*s)+","+(this._y1=n+_*c)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,n,e,u,a,s){t=+t,n=+n;var c=(e=+e)*Math.cos(u),l=e*Math.sin(u),f=t+c,h=n+l,d=1^s,p=s?u-a:a-u;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+f+","+h:(Math.abs(this._x1-f)>1e-6||Math.abs(this._y1-h)>1e-6)&&(this._+="L"+f+","+h),e&&(p<0&&(p=p%i+i),p>o?this._+="A"+e+","+e+",0,1,"+d+","+(t-c)+","+(n-l)+"A"+e+","+e+",0,1,"+d+","+(this._x1=f)+","+(this._y1=h):p>1e-6&&(this._+="A"+e+","+e+",0,"+ +(p>=r)+","+d+","+(this._x1=t+e*Math.cos(a))+","+(this._y1=n+e*Math.sin(a))))},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 s=a;e.d(n,"a",(function(){return s}))},function(t,n,e){"use strict";function r(){}function i(t,n){var e=new r;if(t instanceof r)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var i,o=-1,u=t.length;if(null==n)for(;++o=r.length)return null!=t&&e.sort(t),null!=n?n(e):e;for(var c,l,f,h=-1,d=e.length,p=r[i++],v=o(),g=a();++hr.length)return e;var u,a=i[o-1];return null!=n&&o>=r.length?u=e.entries():(u=[],e.each((function(n,e){u.push({key:e,values:t(n,o)})}))),null!=a?u.sort((function(t,n){return a(t.key,n.key)})):u}(u(t,0,c,l),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}}};function a(){return{}}function s(t,n,e){t[n]=e}function c(){return o()}function l(t,n,e){t.set(n,e)}function f(){}var h=o.prototype;function d(t,n){var e=new f;if(t instanceof f)t.each((function(t){e.add(t)}));else if(t){var r=-1,i=t.length;if(null==n)for(;++r=0&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),u=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++u0)for(var e,r,i=new Array(e),o=0;o=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),S.hasOwnProperty(n)?{space:S[n],local:t}:t},A=function(t){var n=k(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===M&&n.documentElement.namespaceURI===M?n.createElement(t):n.createElementNS(e,t)}})(n)};function N(){}var E=function(t){return null==t?N:function(){return this.querySelector(t)}};function D(){return[]}var O=function(t){return null==t?D:function(){return this.querySelectorAll(t)}},L=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var j=document.documentElement;if(!j.matches){var R=j.webkitMatchesSelector||j.msMatchesSelector||j.mozMatchesSelector||j.oMatchesSelector;L=function(t){return function(){return R.call(this,t)}}}}var q=L,P=function(t){return new Array(t.length)};function H(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}H.prototype={constructor:H,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var F="$";function z(t,n,e,r,i,o){for(var u,a=0,s=n.length,c=o.length;an?1:t>=n?0:NaN}var U=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function B(t,n){return t.style.getPropertyValue(n)||U(t).getComputedStyle(t,null).getPropertyValue(n)}function W(t){return t.trim().split(/^|\s+/)}function Y(t){return t.classList||new V(t)}function V(t){this._node=t,this._names=W(t.getAttribute("class")||"")}function X(t,n){for(var e=Y(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var it={},ot=null;function ut(t,n,e){return t=at(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function at(t,n,e){return function(r){var i=ot;ot=r;try{t.call(this,this.__data__,n,e)}finally{ot=i}}}function st(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=_&&(_=x+1);!(b=y[_])&&++_=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=I);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):B(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=W(t+"");if(arguments.length<2){for(var r=Y(this.node()),i=-1,o=e.length;++i=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ct:st,null==e&&(e=!1),r=0;rf}s.mouse("drag")}function v(){gt(ot.view).on("mousemove.drag mouseup.drag",null),Et(ot.view,e),At(),s.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ot.changedTouches,r=o.apply(this,arguments),u=e.length;for(t=0;t>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Wt.exec(t))?tn(parseInt(n[1],16)):(n=Yt.exec(t))?new on(n[1],n[2],n[3],1):(n=Vt.exec(t))?new on(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Xt.exec(t))?nn(n[1],n[2],n[3],n[4]):(n=Kt.exec(t))?nn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Gt.exec(t))?un(n[1],n[2]/100,n[3]/100,1):(n=Qt.exec(t))?un(n[1],n[2]/100,n[3]/100,n[4]):Jt.hasOwnProperty(t)?tn(Jt[t]):"transparent"===t?new on(NaN,NaN,NaN,0):null}function tn(t){return new on(t>>16&255,t>>8&255,255&t,1)}function nn(t,n,e,r){return r<=0&&(t=n=e=NaN),new on(t,n,e,r)}function en(t){return t instanceof zt||(t=Zt(t)),t?new on((t=t.rgb()).r,t.g,t.b,t.opacity):new on}function rn(t,n,e,r){return 1===arguments.length?en(t):new on(t,n,e,null==r?1:r)}function on(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function un(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new sn(t,n,e,r)}function an(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof sn)return new sn(t.h,t.s,t.l,t.opacity);if(t instanceof zt||(t=Zt(t)),!t)return new sn;if(t instanceof sn)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,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e0&&s<1?0:u,new sn(u,a,s,t.opacity)}(t):new sn(t,n,e,null==r?1:r)}function sn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function cn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}Ht(zt,Zt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),Ht(on,rn,Ft(zt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new on(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new on(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+")")}})),Ht(sn,an,Ft(zt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new sn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new sn(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 on(cn(t>=240?t-240:t+120,i,r),cn(t,i,r),cn(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 ln=Math.PI/180,fn=180/Math.PI,hn=.95047,dn=1,pn=1.08883,vn=4/29,gn=6/29,yn=3*gn*gn,mn=gn*gn*gn;function bn(t){if(t instanceof _n)return new _n(t.l,t.a,t.b,t.opacity);if(t instanceof kn){var n=t.h*ln;return new _n(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof on||(t=en(t));var e=Mn(t.r),r=Mn(t.g),i=Mn(t.b),o=wn((.4124564*e+.3575761*r+.1804375*i)/hn),u=wn((.2126729*e+.7151522*r+.072175*i)/dn);return new _n(116*u-16,500*(o-u),200*(u-wn((.0193339*e+.119192*r+.9503041*i)/pn)),t.opacity)}function xn(t,n,e,r){return 1===arguments.length?bn(t):new _n(t,n,e,null==r?1:r)}function _n(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function wn(t){return t>mn?Math.pow(t,1/3):t/yn+vn}function Tn(t){return t>gn?t*t*t:yn*(t-vn)}function Cn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Mn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Sn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof kn)return new kn(t.h,t.c,t.l,t.opacity);t instanceof _n||(t=bn(t));var n=Math.atan2(t.b,t.a)*fn;return new kn(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new kn(t,n,e,null==r?1:r)}function kn(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}Ht(_n,xn,Ft(zt,{brighter:function(t){return new _n(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new _n(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=dn*Tn(t),new on(Cn(3.2404542*(n=hn*Tn(n))-1.5371385*t-.4985314*(e=pn*Tn(e))),Cn(-.969266*n+1.8760108*t+.041556*e),Cn(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),Ht(kn,Sn,Ft(zt,{brighter:function(t){return new kn(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new kn(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return bn(this).rgb()}}));var An=-.29227,Nn=-.90649,En=1.97294,Dn=En*Nn,On=1.78277*En,Ln=1.78277*An- -.14861*Nn;function jn(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof Rn)return new Rn(t.h,t.s,t.l,t.opacity);t instanceof on||(t=en(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Ln*r+Dn*n-On*e)/(Ln+Dn-On),o=r-i,u=(En*(e-i)-An*o)/Nn,a=Math.sqrt(u*u+o*o)/(En*i*(1-i)),s=a?Math.atan2(u,o)*fn-120:NaN;return new Rn(s<0?s+360:s,a,i,t.opacity)}(t):new Rn(t,n,e,null==r?1:r)}function Rn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function qn(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}Ht(Rn,jn,Ft(zt,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*ln,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new on(255*(n+e*(-.14861*r+1.78277*i)),255*(n+e*(An*r+Nn*i)),255*(n+e*(En*r)),this.opacity)}}));var Pn=function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r180||e<-180?e-360*Math.round(e/360):e):Fn(isNaN(t)?n:t)}function In(t,n){var e=n-t;return e?zn(t,e):Fn(isNaN(t)?n:t)}var Un=function t(n){var e=function(t){return 1==(t=+t)?In: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):Fn(isNaN(n)?e:n)}}(n);function r(t,n){var r=e((t=rn(t)).r,(n=rn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=In(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 Bn(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;eo&&(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,s.push({i:u,x:Zn(e,r)})),o=ee.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Zn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Zn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),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:Zn(t,e)},{i:a-2,x:Zn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e=0&&n._call.call(null,t),n=n._next;--Ae}function Ie(){Le=(Oe=Re.now())+je,Ae=Ne=0;try{$e()}finally{Ae=0,function(){for(var t,n,e=Te,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:Te=n);Ce=t,Be(r)}(),Le=0}}function Ue(){var t=Re.now(),n=t-Oe;n>De&&(je-=n,Oe=t)}function Be(t){Ae||(Ne&&(Ne=clearTimeout(Ne)),t-Le>24?(t<1/0&&(Ne=setTimeout(Ie,t-Re.now()-je)),Ee&&(Ee=clearInterval(Ee))):(Ee||(Oe=Re.now(),Ee=setInterval(Ue,De)),Ae=1,qe(Ie)))}Fe.prototype=ze.prototype={constructor:Fe,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Pe():+e)+(null==n?0:+n),this._next||Ce===this||(Ce?Ce._next=this:Te=this,Ce=this),this._call=t,this._time=e,Be()},stop:function(){this._call&&(this._call=null,this._time=1/0,Be())}};var We=function(t,n,e){var r=new Fe;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Ye=function(t,n,e){var r=new Fe,i=n;return null==n?(r.restart(t,n,e),r):(n=+n,e=null==e?Pe():+e,r.restart((function o(u){u+=i,r.restart(o,i+=n,e),t(u)}),n,e),r)},Ve=C("start","end","interrupt"),Xe=[],Ke=0,Ge=1,Qe=2,Je=3,Ze=4,tr=5,nr=6,er=function(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(s){var c,l,f,h;if(e.state!==Ge)return a();for(c in i)if((h=i[c]).name===e.name){if(h.state===Je)return We(o);h.state===Ze?(h.state=nr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+cKe)throw new Error("too late; already scheduled");return e}function ir(t,n){var e=or(t,n);if(e.state>Qe)throw new Error("too late; already started");return e}function or(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var ur=function(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>Qe&&e.state=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?rr:ir;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}(e,t,n))},attr:function(t,n){var e=k(t),r="transform"===e?fe:sr;return this.attrTween(t,"function"==typeof n?(e.local?function(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(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)}})(e,r,ar(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(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(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)}})(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=k(t);return this.tween(e,(r.local?function(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(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})(r,n))},style:function(t,n,e){var r="transform"==(t+="")?le:sr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=B(this,t),u=(this.style.removeProperty(t),B(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=B(this,t),a=e(this);return null==a&&(this.style.removeProperty(t),a=B(this,t)),u===a?null:u===r&&a===i?o:o=n(r=u,i=a)}}(t,r,ar(this,"style."+t,n)):function(t,n,e){var r,i;return function(){var o=B(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,function(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}(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}}(ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=or(this.node(),e).tween,o=0,u=i.length;oGe&&e.name===n)return new fr([[t]],ii,n,+r);return null},ui=function(t){return function(){return t}},ai=function(t,n,e){this.target=t,this.type=n,this.selection=e};function si(){ot.stopImmediatePropagation()}var ci=function(){ot.preventDefault(),ot.stopImmediatePropagation()},li={name:"drag"},fi={name:"space"},hi={name:"handle"},di={name:"center"},pi={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]]}},vi={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]]}},gi={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(wi),input:function(t){return t},output:function(t){return t}},yi={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"},mi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},bi={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},_i={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 Ti(){return!ot.button}function Ci(){var t=this.ownerSVGElement||this;return[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Mi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Si(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var n=t.__brush;return n?n.dim.output(n.selection):null}function Ai(){return Di(pi)}function Ni(){return Di(vi)}var Ei=function(){return Di(gi)};function Di(t){var n,e=Ci,r=Ti,i=C(u,"start","brush","end"),o=6;function u(n){var e=n.property("__brush",f).selectAll(".overlay").data([wi("overlay")]);e.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",yi.overlay).merge(e).each((function(){var t=Mi(this).extent;gt(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])})),n.selectAll(".selection").data([wi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",yi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=n.selectAll(".handle").data(t.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 yi[t.type]})),n.each(a).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",l)}function a(){var t=gt(this),n=Mi(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]-o/2:n[0][0]-o/2})).attr("y",(function(t){return"s"===t.type[0]?n[1][1]-o/2:n[0][1]-o/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?n[1][0]-n[0][0]+o:o})).attr("height",(function(t){return"e"===t.type||"w"===t.type?n[1][1]-n[0][1]+o:o}))):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 c(t,n)}function c(t,n){this.that=t,this.args=n,this.state=t.__brush,this.active=0}function l(){if(ot.touches){if(ot.changedTouches.length0&&(e=i-d),w<0?f=h-p:w>0&&(o=u-p),x=fi,R.attr("cursor",yi.selection),H());break;default:return}ci()}),!0).on("keyup.brush",(function(){switch(ot.keyCode){case 16:E&&(g=y=E=!1,H());break;case 18:x===di&&(_<0?c=l:_>0&&(e=i),w<0?f=h:w>0&&(o=u),x=hi,H());break;case 32:x===fi&&(ot.altKey?(_&&(c=l-d*_,e=i+d*_),w&&(f=h-p*w,o=u+p*w),x=di):(_<0?c=l:_>0&&(e=i),w<0?f=h:w>0&&(o=u),x=hi),R.attr("cursor",yi[b]),H());break;default:return}ci()}),!0).on("mousemove.brush",P,!0).on("mouseup.brush",F,!0);Nt(ot.view)}si(),ur(m),a.call(m),L.start()}function P(){var t=Tt(m);!E||g||y||(Math.abs(t[0]-O[0])>Math.abs(t[1]-O[1])?y=!0:g=!0),O=t,v=!0,ci(),H()}function H(){var t;switch(d=O[0]-D[0],p=O[1]-D[1],x){case fi:case li:_&&(d=Math.max(S-e,Math.min(A-c,d)),i=e+d,l=c+d),w&&(p=Math.max(k-o,Math.min(N-f,p)),u=o+p,h=f+p);break;case hi:_<0?(d=Math.max(S-e,Math.min(A-e,d)),i=e+d,l=c):_>0&&(d=Math.max(S-c,Math.min(A-c,d)),i=e,l=c+d),w<0?(p=Math.max(k-o,Math.min(N-o,p)),u=o+p,h=f):w>0&&(p=Math.max(k-f,Math.min(N-f,p)),u=o,h=f+p);break;case di:_&&(i=Math.max(S,Math.min(A,e-d*_)),l=Math.max(S,Math.min(A,c+d*_))),w&&(u=Math.max(k,Math.min(N,o-p*w)),h=Math.max(k,Math.min(N,f+p*w)))}l=o?s=!0:(r=t.charCodeAt(u++))===Ji?c=!0:r===Zi&&(c=!0,t.charCodeAt(u)===Ji&&++u),t.slice(i+1,n-1).replace(/""/g,'"')}for(;u=(o=(v+y)/2))?v=o:y=o,(l=e>=(u=(g+m)/2))?g=u:m=u,i=d,!(d=d[f=l<<1|c]))return i[f]=p,t;if(a=+t._x.call(null,d.data),s=+t._y.call(null,d.data),n===a&&e===s)return p.next=d,i?i[f]=p:t._root=p,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=n>=(o=(v+y)/2))?v=o:y=o,(l=e>=(u=(g+m)/2))?g=u:m=u}while((f=l<<1|c)==(h=(s>=u)<<1|a>=o));return i[h]=d,i[f]=p,t}var yo=function(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i};function mo(t){return t[0]}function bo(t){return t[1]}function xo(t,n,e){var r=new _o(null==n?mo:n,null==e?bo:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function _o(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 wo(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var To=xo.prototype=_o.prototype;function Co(t){return t.x+t.vx}function Mo(t){return t.y+t.vy}To.copy=function(){var t,n,e=new _o(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=wo(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]=wo(n));return e},To.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return go(this.cover(n,e),n,e,t)},To.addAll=function(t){var n,e,r,i,o=t.length,u=new Array(o),a=new Array(o),s=1/0,c=1/0,l=-1/0,f=-1/0;for(e=0;el&&(l=r),if&&(f=i));for(lt||t>i||r>n||n>o))return this;var u,a,s=i-e,c=this._root;switch(a=(n<(r+o)/2)<<1|t<(e+i)/2){case 0:do{(u=new Array(4))[a]=c,c=u}while(o=r+(s*=2),t>(i=e+s)||n>o);break;case 1:do{(u=new Array(4))[a]=c,c=u}while(o=r+(s*=2),(e=i-s)>t||n>o);break;case 2:do{(u=new Array(4))[a]=c,c=u}while(r=o-(s*=2),t>(i=e+s)||r>n);break;case 3:do{(u=new Array(4))[a]=c,c=u}while(r=o-(s*=2),(e=i-s)>t||r>n)}this._root&&this._root.length&&(this._root=c)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},To.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},To.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]]},To.find=function(t,n,e){var r,i,o,u,a,s,c,l=this._x0,f=this._y0,h=this._x1,d=this._y1,p=[],v=this._root;for(v&&p.push(new yo(v,l,f,h,d)),null==e?e=1/0:(l=t-e,f=n-e,h=t+e,d=n+e,e*=e);s=p.pop();)if(!(!(v=s.node)||(i=s.x0)>h||(o=s.y0)>d||(u=s.x1)=y)<<1|t>=g)&&(s=p[p.length-1],p[p.length-1]=p[p.length-1-c],p[p.length-1-c]=s)}else{var m=t-+this._x.call(null,v.data),b=n-+this._y.call(null,v.data),x=m*m+b*b;if(x=(a=(p+g)/2))?p=a:g=a,(l=u>=(s=(v+y)/2))?v=s:y=s,n=d,!(d=d[f=l<<1|c]))return this;if(!d.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(d=n[0]||n[1]||n[2]||n[3])&&d===(n[3]||n[2]||n[1]||n[0])&&!d.length&&(e?e[h]=d:this._root=d),this):(this._root=i,this)},To.removeAll=function(t){for(var n=0,e=t.length;ns+d||ic+d||oa.index){var p=s-u.x-u.vx,v=c-u.y-u.vy,g=p*p+v*v;gt.r&&(t.r=t[n].r)}function a(){if(n){var r,i,o=n.length;for(e=new Array(o),r=0;r1?(null==e?a.remove(t):a.set(t,d(e)),n):a.get(t)},find:function(n,e,r){var i,o,u,a,s,c=0,l=t.length;for(null==r?r=1/0:r*=r,c=0;c1?(c.on(t,e),n):c.on(t)}}},qo=function(){var t,n,e,r,i=po(-30),o=1,u=1/0,a=.81;function s(r){var i,o=t.length,u=xo(t,Eo,Do).visitAfter(l);for(e=r,i=0;i=u)){(t.data!==n||t.next)&&(0===l&&(d+=(l=vo())*l),0===f&&(d+=(f=vo())*f),d1?r[0]+r.slice(2):r,+t.slice(e+1)]},$o=function(t){return(t=zo(Math.abs(t)))?t[1]:NaN},Io=function(t,n){var e=zo(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")},Uo={"":function(t,n){t:for(var e,r=(t=t.toPrecision(n)).length,i=1,o=-1;i0&&(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 Io(100*t,n)},r:Io,s:function(t,n){var e=zo(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Oo=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")+zo(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)}},Bo=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;function Wo(t){return new Yo(t)}function Yo(t){if(!(n=Bo.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],s=!!n[7],c=n[8]&&+n[8].slice(1),l=n[9]||"";"n"===l?(s=!0,l="g"):Uo[l]||(l=""),(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=s,this.precision=c,this.type=l}Wo.prototype=Yo.prototype,Yo.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 Vo,Xo,Ko,Go=function(t){return t},Qo=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],Jo=function(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],s=0;i>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),o.push(t.substring(i-=a,i+a)),!((s+=a+1)>r));)a=n[u=(u+1)%n.length];return o.reverse().join(e)}):Go,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):Go,a=t.percent||"%";function s(t){var n=(t=Wo(t)).fill,e=t.align,s=t.sign,c=t.symbol,l=t.zero,f=t.width,h=t.comma,d=t.precision,p=t.type,v="$"===c?i[0]:"#"===c&&/[boxX]/.test(p)?"0"+p.toLowerCase():"",g="$"===c?i[1]:/[%p]/.test(p)?a:"",y=Uo[p],m=!p||/[defgprs%]/.test(p);function b(t){var i,a,c,b=v,x=g;if("c"===p)x=y(t)+x,t="";else{var _=(t=+t)<0;if(t=y(Math.abs(t),d),_&&0==+t&&(_=!1),b=(_?"("===s?s:"-":"-"===s||"("===s?"":s)+b,x=("s"===p?Qo[8+Oo/3]:"")+x+(_&&"("===s?")":""),m)for(i=-1,a=t.length;++i(c=t.charCodeAt(i))||c>57){x=(46===c?o+t.slice(i+1):t.slice(i))+x,t=t.slice(0,i);break}}h&&!l&&(t=r(t,1/0));var w=b.length+t.length+x.length,T=w>1)+b+t+x+T.slice(w);break;default:t=T+b+t+x}return u(t)}return d=null==d?p?6:12:/[gprs]/.test(p)?Math.max(1,Math.min(21,d)):Math.max(0,Math.min(20,d)),b.toString=function(){return t+""},b}return{format:s,formatPrefix:function(t,n){var e=s(((t=Wo(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($o(n)/3))),i=Math.pow(10,-r),o=Qo[8+r/3];return function(t){return e(i*t)+o}}}};function Zo(t){return Vo=Jo(t),Xo=Vo.format,Ko=Vo.formatPrefix,Vo}Zo({decimal:".",thousands:",",grouping:[3],currency:["$",""]});var tu=function(t){return Math.max(0,-$o(Math.abs(t)))},nu=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($o(n)/3)))-$o(Math.abs(t)))},eu=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,$o(n)-$o(t))+1},ru=function(){return new iu};function iu(){this.reset()}iu.prototype={constructor:iu,reset:function(){this.s=this.t=0},add:function(t){uu(ou,t,this.t),uu(this,ou.s,this.s),this.s?this.t+=ou.t:this.s=ou.t},valueOf:function(){return this.s}};var ou=new iu;function uu(t,n,e){var r=t.s=n+e,i=r-n,o=r-i;t.t=n-o+(e-i)}var au=1e-6,su=Math.PI,cu=su/2,lu=su/4,fu=2*su,hu=180/su,du=su/180,pu=Math.abs,vu=Math.atan,gu=Math.atan2,yu=Math.cos,mu=Math.ceil,bu=Math.exp,xu=(Math.floor,Math.log),_u=Math.pow,wu=Math.sin,Tu=Math.sign||function(t){return t>0?1:t<0?-1:0},Cu=Math.sqrt,Mu=Math.tan;function Su(t){return t>1?0:t<-1?su:Math.acos(t)}function ku(t){return t>1?cu:t<-1?-cu:Math.asin(t)}function Au(t){return(t=wu(t/2))*t}function Nu(){}function Eu(t,n){t&&Ou.hasOwnProperty(t.type)&&Ou[t.type](t,n)}var Du={Feature:function(t,n){Eu(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++r=0?1:-1,i=r*e,o=yu(n=(n*=du)/2+lu),u=wu(n),a=Fu*u,s=Hu*o+a*yu(i),c=a*r*wu(i);$u.add(gu(c,s)),Pu=t,Hu=o,Fu=u}var Xu=function(t){return Iu.reset(),zu(t,Uu),2*Iu};function Ku(t){return[gu(t[1],t[0]),ku(t[2])]}function Gu(t){var n=t[0],e=t[1],r=yu(e);return[r*yu(n),r*wu(n),wu(e)]}function Qu(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Ju(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 Zu(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function ta(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function na(t){var n=Cu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}var ea,ra,ia,oa,ua,aa,sa,ca,la,fa,ha=ru(),da={point:pa,lineStart:ga,lineEnd:ya,polygonStart:function(){da.point=ma,da.lineStart=ba,da.lineEnd=xa,ha.reset(),Uu.polygonStart()},polygonEnd:function(){Uu.polygonEnd(),da.point=pa,da.lineStart=ga,da.lineEnd=ya,$u<0?(ea=-(ia=180),ra=-(oa=90)):ha>au?oa=90:ha<-au&&(ra=-90),fa[0]=ea,fa[1]=ia}};function pa(t,n){la.push(fa=[ea=t,ia=t]),noa&&(oa=n)}function va(t,n){var e=Gu([t*du,n*du]);if(ca){var r=Ju(ca,e),i=Ju([r[1],-r[0],0],r);na(i),i=Ku(i);var o,u=t-ua,a=u>0?1:-1,s=i[0]*hu*a,c=pu(u)>180;c^(a*uaoa&&(oa=o):c^(a*ua<(s=(s+360)%360-180)&&soa&&(oa=n)),c?t_a(ea,ia)&&(ia=t):_a(t,ia)>_a(ea,ia)&&(ea=t):ia>=ea?(tia&&(ia=t)):t>ua?_a(ea,t)>_a(ea,ia)&&(ia=t):_a(t,ia)>_a(ea,ia)&&(ea=t)}else la.push(fa=[ea=t,ia=t]);noa&&(oa=n),ca=e,ua=t}function ga(){da.point=va}function ya(){fa[0]=ea,fa[1]=ia,da.point=pa,ca=null}function ma(t,n){if(ca){var e=t-ua;ha.add(pu(e)>180?e+(e>0?360:-360):e)}else aa=t,sa=n;Uu.point(t,n),va(t,n)}function ba(){Uu.lineStart()}function xa(){ma(aa,sa),Uu.lineEnd(),pu(ha)>au&&(ea=-(ia=180)),fa[0]=ea,fa[1]=ia,ca=null}function _a(t,n){return(n-=t)<0?n+360:n}function wa(t,n){return t[0]-n[0]}function Ta(t,n){return t[0]<=t[1]?t[0]<=n&&n<=t[1]:n_a(r[0],r[1])&&(r[1]=i[1]),_a(i[0],r[1])>_a(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=_a(r[1],i[0]))>u&&(u=a,ea=i[0],ia=r[1])}return la=fa=null,ea===1/0||ra===1/0?[[NaN,NaN],[NaN,NaN]]:[[ea,ra],[ia,oa]]},$a={sphere:Nu,point:Ia,lineStart:Ba,lineEnd:Va,polygonStart:function(){$a.lineStart=Xa,$a.lineEnd=Ka},polygonEnd:function(){$a.lineStart=Ba,$a.lineEnd=Va}};function Ia(t,n){t*=du;var e=yu(n*=du);Ua(e*yu(t),e*wu(t),wu(n))}function Ua(t,n,e){Sa+=(t-Sa)/++Ca,ka+=(n-ka)/Ca,Aa+=(e-Aa)/Ca}function Ba(){$a.point=Wa}function Wa(t,n){t*=du;var e=yu(n*=du);Pa=e*yu(t),Ha=e*wu(t),Fa=wu(n),$a.point=Ya,Ua(Pa,Ha,Fa)}function Ya(t,n){t*=du;var e=yu(n*=du),r=e*yu(t),i=e*wu(t),o=wu(n),u=gu(Cu((u=Ha*o-Fa*i)*u+(u=Fa*r-Pa*o)*u+(u=Pa*i-Ha*r)*u),Pa*r+Ha*i+Fa*o);Ma+=u,Na+=u*(Pa+(Pa=r)),Ea+=u*(Ha+(Ha=i)),Da+=u*(Fa+(Fa=o)),Ua(Pa,Ha,Fa)}function Va(){$a.point=Ia}function Xa(){$a.point=Ga}function Ka(){Qa(Ra,qa),$a.point=Ia}function Ga(t,n){Ra=t,qa=n,t*=du,n*=du,$a.point=Qa;var e=yu(n);Pa=e*yu(t),Ha=e*wu(t),Fa=wu(n),Ua(Pa,Ha,Fa)}function Qa(t,n){t*=du;var e=yu(n*=du),r=e*yu(t),i=e*wu(t),o=wu(n),u=Ha*o-Fa*i,a=Fa*r-Pa*o,s=Pa*i-Ha*r,c=Cu(u*u+a*a+s*s),l=ku(c),f=c&&-l/c;Oa+=f*u,La+=f*a,ja+=f*s,Ma+=l,Na+=l*(Pa+(Pa=r)),Ea+=l*(Ha+(Ha=i)),Da+=l*(Fa+(Fa=o)),Ua(Pa,Ha,Fa)}var Ja=function(t){Ca=Ma=Sa=ka=Aa=Na=Ea=Da=Oa=La=ja=0,zu(t,$a);var n=Oa,e=La,r=ja,i=n*n+e*e+r*r;return i<1e-12&&(n=Na,e=Ea,r=Da,Masu?t-fu:t<-su?t+fu:t,n]}function es(t,n,e){return(t%=fu)?n||e?ts(is(t),os(n,e)):is(t):n||e?os(n,e):ns}function rs(t){return function(n,e){return[(n+=t)>su?n-fu:n<-su?n+fu:n,e]}}function is(t){var n=rs(t);return n.invert=rs(-t),n}function os(t,n){var e=yu(t),r=wu(t),i=yu(n),o=wu(n);function u(t,n){var u=yu(n),a=yu(t)*u,s=wu(t)*u,c=wu(n),l=c*e+a*r;return[gu(s*i-l*o,a*e-c*r),ku(l*i+s*o)]}return u.invert=function(t,n){var u=yu(n),a=yu(t)*u,s=wu(t)*u,c=wu(n),l=c*i-s*o;return[gu(s*i+c*o,a*e+l*r),ku(l*e-a*r)]},u}ns.invert=ns;var us=function(t){function n(n){return(n=t(n[0]*du,n[1]*du))[0]*=hu,n[1]*=hu,n}return t=es(t[0]*du,t[1]*du,t.length>2?t[2]*du:0),n.invert=function(n){return(n=t.invert(n[0]*du,n[1]*du))[0]*=hu,n[1]*=hu,n},n};function as(t,n,e,r,i,o){if(e){var u=yu(n),a=wu(n),s=r*e;null==i?(i=n+r*fu,o=n-s/2):(i=ss(u,i),o=ss(u,o),(r>0?io)&&(i+=r*fu));for(var c,l=i;r>0?l>o:l1&&n.push(n.pop().concat(n.shift()))},result:function(){var e=n;return n=[],t=null,e}}},fs=function(t,n){return pu(t[0]-n[0])=0;--o)i.point((l=c[o])[0],l[1]);else r(h.x,h.p.x,-1,i);h=h.p}c=(h=h.o).z,d=!d}while(!h.v);i.lineEnd()}}};function ps(t){if(n=t.length){for(var n,e,r=0,i=t[0];++r=0?1:-1,C=T*w,M=C>su,S=p*x;if(vs.add(gu(S*T*wu(C),v*_+S*yu(C))),o+=M?w+T*fu:w,M^h>=e^m>=e){var k=Ju(Gu(f),Gu(y));na(k);var A=Ju(i,k);na(A);var N=(M^w>=0?-1:1)*ku(A[2]);(r>N||r===N&&(k[0]||k[1]))&&(u+=M^w>=0?1:-1)}}return(o<-au||o0){for(h||(o.polygonStart(),h=!0),o.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),a.push(c.filter(ms))}return d}};function ms(t){return t.length>1}function bs(t,n){return((t=t.x)[0]<0?t[1]-cu-au:cu-t[1])-((n=n.x)[0]<0?n[1]-cu-au:cu-n[1])}var xs=ys((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?su:-su,s=pu(o-e);pu(s-su)0?cu:-cu),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(o,r),n=0):i!==a&&s>=su&&(pu(e-i)au?vu((wu(n)*(o=yu(r))*wu(e)-wu(r)*(i=yu(n))*wu(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*cu,r.point(-su,i),r.point(0,i),r.point(su,i),r.point(su,0),r.point(su,-i),r.point(0,-i),r.point(-su,-i),r.point(-su,0),r.point(-su,i);else if(pu(t[0]-n[0])>au){var o=t[0]0,i=pu(n)>au;function o(t,e){return yu(t)*yu(e)>n}function u(t,e,r){var i=[1,0,0],o=Ju(Gu(t),Gu(e)),u=Qu(o,o),a=o[0],s=u-a*a;if(!s)return!r&&t;var c=n*u/s,l=-n*a/s,f=Ju(i,o),h=ta(i,c);Zu(h,ta(o,l));var d=f,p=Qu(h,d),v=Qu(d,d),g=p*p-v*(Qu(h,h)-1);if(!(g<0)){var y=Cu(g),m=ta(d,(-p-y)/v);if(Zu(m,h),m=Ku(m),!r)return m;var b,x=t[0],_=e[0],w=t[1],T=e[1];_0^m[1]<(pu(m[0]-x)su^(x<=m[0]&&m[0]<=_)){var S=ta(d,(-p+y)/v);return Zu(S,h),[m,Ku(S)]}}}function a(n,e){var i=r?t:su-t,o=0;return n<-i?o|=1:n>i&&(o|=2),e<-i?o|=4:e>i&&(o|=8),o}return ys(o,(function(t){var n,e,s,c,l;return{lineStart:function(){c=s=!1,l=1},point:function(f,h){var d,p=[f,h],v=o(f,h),g=r?v?0:a(f,h):v?a(f+(f<0?su:-su),h):0;if(!n&&(c=s=v)&&t.lineStart(),v!==s&&(!(d=u(n,p))||fs(n,d)||fs(p,d))&&(p[0]+=au,p[1]+=au,v=o(p[0],p[1])),v!==s)l=0,v?(t.lineStart(),d=u(p,n),t.point(d[0],d[1])):(d=u(n,p),t.point(d[0],d[1]),t.lineEnd()),n=d;else if(i&&n&&r^v){var y;g&e||!(y=u(p,n,!0))||(l=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!v||n&&fs(n,p)||t.point(p[0],p[1]),n=p,s=v,e=g},lineEnd:function(){s&&t.lineEnd(),n=null},clean:function(){return l|(c&&s)<<1}}}),(function(n,r,i,o){as(o,t,e,i,n,r)}),r?[0,-t]:[-su,t-su])},ws=function(t,n,e,r,i,o){var u,a=t[0],s=t[1],c=0,l=1,f=n[0]-a,h=n[1]-s;if(u=e-a,f||!(u>0)){if(u/=f,f<0){if(u0){if(u>l)return;u>c&&(c=u)}if(u=i-a,f||!(u<0)){if(u/=f,f<0){if(u>l)return;u>c&&(c=u)}else if(f>0){if(u0)){if(u/=h,h<0){if(u0){if(u>l)return;u>c&&(c=u)}if(u=o-s,h||!(u<0)){if(u/=h,h<0){if(u>l)return;u>c&&(c=u)}else if(h>0){if(u0&&(t[0]=a+c*f,t[1]=s+c*h),l<1&&(n[0]=a+l*f,n[1]=s+l*h),!0}}}}},Ts=1e9,Cs=-Ts;function Ms(t,n,e,i){function o(r,o){return t<=r&&r<=e&&n<=o&&o<=i}function u(r,o,u,s){var l=0,f=0;if(null==r||(l=a(r,u))!==(f=a(o,u))||c(r,o)<0^u>0)do{s.point(0===l||3===l?t:e,l>1?i:n)}while((l=(l+u+4)%4)!==f);else s.point(o[0],o[1])}function a(r,i){return pu(r[0]-t)0?0:3:pu(r[0]-e)0?2:1:pu(r[1]-n)0?1:0:i>0?3:2}function s(t,n){return c(t.x,n.x)}function c(t,n){var e=a(t,1),r=a(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){var c,l,f,h,d,p,v,g,y,m,b,x=a,_=ls(),w={point:T,lineStart:function(){w.point=C,l&&l.push(f=[]),m=!0,y=!1,v=g=NaN},lineEnd:function(){c&&(C(h,d),p&&y&&_.rejoin(),c.push(_.result())),w.point=T,y&&x.lineEnd()},polygonStart:function(){x=_,c=[],l=[],b=!0},polygonEnd:function(){var n=function(){for(var n=0,e=0,r=l.length;ei&&(h-o)*(i-u)>(d-u)*(t-o)&&++n:d<=i&&(h-o)*(i-u)<(d-u)*(t-o)&&--n;return n}(),e=b&&n,o=(c=Object(r.n)(c)).length;(e||o)&&(a.polygonStart(),e&&(a.lineStart(),u(null,null,1,a),a.lineEnd()),o&&ds(c,s,n,u,a),a.polygonEnd()),x=a,c=l=f=null}};function T(t,n){o(t,n)&&x.point(t,n)}function C(r,u){var a=o(r,u);if(l&&f.push([r,u]),m)h=r,d=u,p=a,m=!1,a&&(x.lineStart(),x.point(r,u));else if(a&&y)x.point(r,u);else{var s=[v=Math.max(Cs,Math.min(Ts,v)),g=Math.max(Cs,Math.min(Ts,g))],c=[r=Math.max(Cs,Math.min(Ts,r)),u=Math.max(Cs,Math.min(Ts,u))];ws(s,c,t,n,e,i)?(y||(x.lineStart(),x.point(s[0],s[1])),x.point(c[0],c[1]),a||x.lineEnd(),b=!1):a&&(x.lineStart(),x.point(r,u),b=!1)}v=r,g=u,y=a}return w}}var Ss,ks,As,Ns=function(){var t,n,e,r=0,i=0,o=960,u=500;return e={stream:function(e){return t&&n===e?t:t=Ms(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]]}}},Es=ru(),Ds={sphere:Nu,point:Nu,lineStart:function(){Ds.point=Ls,Ds.lineEnd=Os},lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu};function Os(){Ds.point=Ds.lineEnd=Nu}function Ls(t,n){Ss=t*=du,ks=wu(n*=du),As=yu(n),Ds.point=js}function js(t,n){t*=du;var e=wu(n*=du),r=yu(n),i=pu(t-Ss),o=yu(i),u=r*wu(i),a=As*e-ks*r*o,s=ks*e+As*r*o;Es.add(gu(Cu(u*u+a*a),s)),Ss=t,ks=e,As=r}var Rs=function(t){return Es.reset(),zu(t,Ds),+Es},qs=[null,null],Ps={type:"LineString",coordinates:qs},Hs=function(t,n){return qs[0]=t,qs[1]=n,Rs(Ps)},Fs={Feature:function(t,n){return $s(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,i=e.length;++rau})).map(c)).concat(Object(r.s)(mu(u/p)*p,o,p).filter((function(t){return pu(t%g)>au})).map(l))}return m.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},m.outline=function(){return{type:"Polygon",coordinates:[f(i).concat(h(a).slice(1),f(e).reverse().slice(1),h(s).reverse().slice(1))]}},m.extent=function(t){return arguments.length?m.extentMajor(t).extentMinor(t):m.extentMinor()},m.extentMajor=function(t){return arguments.length?(i=+t[0][0],e=+t[1][0],s=+t[0][1],a=+t[1][1],i>e&&(t=i,i=e,e=t),s>a&&(t=s,s=a,a=t),m.precision(y)):[[i,s],[e,a]]},m.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],u=+e[0][1],o=+e[1][1],n>t&&(e=n,n=t,t=e),u>o&&(e=u,u=o,o=e),m.precision(y)):[[n,u],[t,o]]},m.step=function(t){return arguments.length?m.stepMajor(t).stepMinor(t):m.stepMinor()},m.stepMajor=function(t){return arguments.length?(v=+t[0],g=+t[1],m):[v,g]},m.stepMinor=function(t){return arguments.length?(d=+t[0],p=+t[1],m):[d,p]},m.precision=function(r){return arguments.length?(y=+r,c=Xs(u,o,90),l=Ks(n,t,y),f=Xs(s,a,90),h=Ks(i,e,y),m):y},m.extentMajor([[-180,-90+au],[180,90-au]]).extentMinor([[-180,-80-au],[180,80+au]])}function Qs(){return Gs()()}var Js,Zs,tc,nc,ec=function(t,n){var e=t[0]*du,r=t[1]*du,i=n[0]*du,o=n[1]*du,u=yu(r),a=wu(r),s=yu(o),c=wu(o),l=u*yu(e),f=u*wu(e),h=s*yu(i),d=s*wu(i),p=2*ku(Cu(Au(o-r)+u*s*Au(i-e))),v=wu(p),g=p?function(t){var n=wu(t*=p)/v,e=wu(p-t)/v,r=e*l+n*h,i=e*f+n*d,o=e*a+n*c;return[gu(i,r)*hu,gu(o,Cu(r*r+i*i))*hu]}:function(){return[e*hu,r*hu]};return g.distance=p,g},rc=function(t){return t},ic=ru(),oc=ru(),uc={point:Nu,lineStart:Nu,lineEnd:Nu,polygonStart:function(){uc.lineStart=ac,uc.lineEnd=lc},polygonEnd:function(){uc.lineStart=uc.lineEnd=uc.point=Nu,ic.add(pu(oc)),oc.reset()},result:function(){var t=ic/2;return ic.reset(),t}};function ac(){uc.point=sc}function sc(t,n){uc.point=cc,Js=tc=t,Zs=nc=n}function cc(t,n){oc.add(nc*t-tc*n),tc=t,nc=n}function lc(){cc(Js,Zs)}var fc,hc,dc,pc,vc=uc,gc=1/0,yc=gc,mc=-gc,bc=mc,xc={point:function(t,n){tmc&&(mc=t),nbc&&(bc=n)},lineStart:Nu,lineEnd:Nu,polygonStart:Nu,polygonEnd:Nu,result:function(){var t=[[gc,yc],[mc,bc]];return mc=bc=-(yc=gc=1/0),t}},_c=0,wc=0,Tc=0,Cc=0,Mc=0,Sc=0,kc=0,Ac=0,Nc=0,Ec={point:Dc,lineStart:Oc,lineEnd:Rc,polygonStart:function(){Ec.lineStart=qc,Ec.lineEnd=Pc},polygonEnd:function(){Ec.point=Dc,Ec.lineStart=Oc,Ec.lineEnd=Rc},result:function(){var t=Nc?[kc/Nc,Ac/Nc]:Sc?[Cc/Sc,Mc/Sc]:Tc?[_c/Tc,wc/Tc]:[NaN,NaN];return _c=wc=Tc=Cc=Mc=Sc=kc=Ac=Nc=0,t}};function Dc(t,n){_c+=t,wc+=n,++Tc}function Oc(){Ec.point=Lc}function Lc(t,n){Ec.point=jc,Dc(dc=t,pc=n)}function jc(t,n){var e=t-dc,r=n-pc,i=Cu(e*e+r*r);Cc+=i*(dc+t)/2,Mc+=i*(pc+n)/2,Sc+=i,Dc(dc=t,pc=n)}function Rc(){Ec.point=Dc}function qc(){Ec.point=Hc}function Pc(){Fc(fc,hc)}function Hc(t,n){Ec.point=Fc,Dc(fc=dc=t,hc=pc=n)}function Fc(t,n){var e=t-dc,r=n-pc,i=Cu(e*e+r*r);Cc+=i*(dc+t)/2,Mc+=i*(pc+n)/2,Sc+=i,kc+=(i=pc*t-dc*n)*(dc+t),Ac+=i*(pc+n),Nc+=3*i,Dc(dc=t,pc=n)}var zc=Ec;function $c(t){this._context=t}$c.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,fu)}},result:Nu};var Ic,Uc,Bc,Wc,Yc,Vc=ru(),Xc={point:Nu,lineStart:function(){Xc.point=Kc},lineEnd:function(){Ic&&Gc(Uc,Bc),Xc.point=Nu},polygonStart:function(){Ic=!0},polygonEnd:function(){Ic=null},result:function(){var t=+Vc;return Vc.reset(),t}};function Kc(t,n){Xc.point=Gc,Uc=Wc=t,Bc=Yc=n}function Gc(t,n){Wc-=t,Yc-=n,Vc.add(Cu(Wc*Wc+Yc*Yc)),Wc=t,Yc=n}var Qc=Xc;function Jc(){this._string=[]}function Zc(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Jc.prototype={_radius:4.5,_circle:Zc(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=Zc(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}};var tl=function(t,n){var e,r,i=4.5;function o(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),zu(t,e(r))),r.result()}return o.area=function(t){return zu(t,e(vc)),vc.result()},o.measure=function(t){return zu(t,e(Qc)),Qc.result()},o.bounds=function(t){return zu(t,e(xc)),xc.result()},o.centroid=function(t){return zu(t,e(zc)),zc.result()},o.projection=function(n){return arguments.length?(e=null==n?(t=null,rc):(t=n).stream,o):t},o.context=function(t){return arguments.length?(r=null==t?(n=null,new Jc):new $c(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)},nl=function(t){return{stream:el(t)}};function el(t){return function(n){var e=new rl;for(var r in t)e[r]=t[r];return e.stream=n,e}}function rl(){}function il(t,n,e){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),zu(e,t.stream(xc)),n(xc.result()),null!=r&&t.clipExtent(r),t}function ol(t,n,e){return il(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 ul(t,n,e){return ol(t,[[0,0],n],e)}function al(t,n,e){return il(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 sl(t,n,e){return il(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)}rl.prototype={constructor:rl,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 cl=16,ll=yu(30*du),fl=function(t,n){return+n?function(t,n){function e(r,i,o,u,a,s,c,l,f,h,d,p,v,g){var y=c-r,m=l-i,b=y*y+m*m;if(b>4*n&&v--){var x=u+h,_=a+d,w=s+p,T=Cu(x*x+_*_+w*w),C=ku(w/=T),M=pu(pu(w)-1)n||pu((y*N+m*E)/b-.5)>.3||u*h+a*d+s*p2?t[2]%360*du:0,A()):[g*hu,y*hu,m*hu]},M.precision=function(t){return arguments.length?(C=fl(k,T=t*t),N()):Cu(T)},M.fitExtent=function(t,n){return ol(M,t,n)},M.fitSize=function(t,n){return ul(M,t,n)},M.fitWidth=function(t,n){return al(M,t,n)},M.fitHeight=function(t,n){return sl(M,t,n)},function(){return n=t.apply(this,arguments),M.invert=n.invert&&S,A()}}function vl(t){var n=0,e=su/3,r=pl(t),i=r(n,e);return i.parallels=function(t){return arguments.length?r(n=t[0]*du,e=t[1]*du):[n*hu,e*hu]},i}function gl(t,n){var e=wu(t),r=(e+wu(n))/2;if(pu(r)=.12&&i<.234&&r>=-.425&&r<-.214?a:i>=.166&&i<.234&&r>=-.214&&r<-.115?s:u).invert(t)},l.stream=function(e){return t&&n===e?t:(r=[u.stream(n=e),a.stream(e),s.stream(e)],i=r.length,t={point:function(t,n){for(var e=-1;++e0?n<-cu+au&&(n=-cu+au):n>cu-au&&(n=cu-au);var e=i/_u(Nl(n),r);return[e*wu(r*t),i-e*yu(r*t)]}return o.invert=function(t,n){var e=i-n,o=Tu(r)*Cu(t*t+e*e);return[gu(t,pu(e))/r*Tu(e),2*vu(_u(i/o,1/r))-cu]},o}var Dl=function(){return vl(El).scale(109.5).parallels([30,30])};function Ol(t,n){return[t,n]}Ol.invert=Ol;var Ll=function(){return dl(Ol).scale(152.63)};function jl(t,n){var e=yu(t),r=t===n?wu(t):(e-yu(n))/(n-t),i=e/r+t;if(pu(r)au&&--i>0);return[t/(.8707+(o=r*r)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),r]};var $l=function(){return dl(zl).scale(175.295)};function Il(t,n){return[yu(n)*wu(t),wu(n)]}Il.invert=_l(ku);var Ul=function(){return dl(Il).scale(249.5).clipAngle(90+au)};function Bl(t,n){var e=yu(n),r=1+yu(t)*e;return[e*wu(t)/r,wu(n)/r]}Bl.invert=_l((function(t){return 2*vu(t)}));var Wl=function(){return dl(Bl).scale(250).clipAngle(142)};function Yl(t,n){return[xu(Mu((cu+n)/2)),-t]}Yl.invert=function(t,n){return[-n,2*vu(bu(t))-cu]};var Vl=function(){var t=Al(Yl),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)};function Xl(t,n){return t.parent===n.parent?1:2}function Kl(t,n){return t+n.x}function Gl(t,n){return Math.max(t,n.y)}var Ql=function(){var t=Xl,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(Kl,0)/t.length}(e),n.y=function(t){return 1+t.reduce(Gl,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),s=function(t){for(var n;n=t.children;)t=n[n.length-1];return t}(i),c=a.x-t(a,s)/2,l=s.x+t(s,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-c)/(l-c)*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};function Jl(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 Zl(t,n){var e,r,i,o,u,a=new rf(t),s=+t.value&&(a.value=t.value),c=[a];for(null==n&&(n=tf);e=c.pop();)if(s&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;o>=0;--o)c.push(r=e.children[o]=new rf(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(ef)}function tf(t){return t.children}function nf(t){t.data=t.data.data}function ef(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function rf(t){this.data=t,this.depth=this.height=0,this.parent=null}rf.prototype=Zl.prototype={constructor:rf,count:function(){return this.eachAfter(Jl)},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=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 Zl(this).eachBefore(nf)}};var of=Array.prototype.slice,uf=function(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}(of.call(t))).length,o=[];r0&&e*e>r*r+i*i}function lf(t,n){for(var e=0;ee*e+r*r}function gf(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 yf(t){this._=t,this.next=null,this.previous=null}function mf(t){if(!(i=t.length))return 0;var n,e,r,i,o,u,a,s,c,l,f;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;pf(e,n,r=t[2]),n=new yf(n),e=new yf(e),r=new yf(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(a=3;a0)throw new Error("cycle");return o}return e.id=function(n){return arguments.length?(t=xf(n),e):t},e.parentId=function(t){return arguments.length?(n=xf(t),e):n},e};function Pf(t,n){return t.parent===n.parent?1:2}function Hf(t){var n=t.children;return n?n[0]:t.t}function Ff(t){var n=t.children;return n?n[n.length-1]:t.t}function zf(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 $f(t,n,e){return t.a.parent===n.parent?t.a:e}function If(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}If.prototype=Object.create(rf.prototype);var Uf=function(){var t=Pf,n=1,e=1,r=null;function i(i){var s=function(t){for(var n,e,r,i,o,u=new If(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 If(r[i],i)),e.parent=n;return(u.parent=new If(null,0)).children=[u],u}(i);if(s.eachAfter(o),s.parent.m=-s.z,s.eachBefore(u),r)i.eachBefore(a);else{var c=i,l=i,f=i;i.eachBefore((function(t){t.xl.x&&(l=t),t.depth>f.depth&&(f=t)}));var h=c===l?1:t(c,l)/2,d=h-c.x,p=n/(l.x+h+d),v=e/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,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,s=o.parent.children[0],c=o.m,l=u.m,f=a.m,h=s.m;a=Ff(a),o=Hf(o),a&&o;)s=Hf(s),(u=Ff(u)).a=n,(i=a.z+f-o.z-c+t(a._,o._))>0&&(zf($f(a,n,r),n,i),c+=i,l+=i),f+=a.m,c+=o.m,h+=s.m,l+=u.m;a&&!Ff(u)&&(u.t=a,u.m+=f-l),o&&!Hf(s)&&(s.t=o,s.m+=c-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},Bf=function(t,n,e,r,i){for(var o,u=t.children,a=-1,s=u.length,c=t.value&&(i-e)/t.value;++ah&&(h=a),g=l*l*v,(d=Math.max(h/g,g/f))>p){l-=a;break}p=d}y.push(u={value:l,dice:s1?n:1)},e}(Wf),Xf=function(){var t=Vf,n=!1,e=1,r=1,i=[0],o=_f,u=_f,a=_f,s=_f,c=_f;function l(t){return t.x0=t.y0=0,t.x1=e,t.y1=r,t.eachBefore(f),i=[0],n&&t.eachBefore(Af),t}function f(n){var e=i[n.depth],r=n.x0+e,l=n.y0+e,f=n.x1-e,h=n.y1-e;f=e-1){var l=a[n];return l.x0=i,l.y0=o,l.x1=u,void(l.y1=s)}for(var f=c[n],h=r/2+f,d=n+1,p=e-1;d>>1;c[v]s-o){var m=(i*y+u*g)/r;t(n,d,g,i,o,m,s),t(d,e,y,m,o,u,s)}else{var b=(o*y+s*g)/r;t(n,d,g,i,o,u,b),t(d,e,y,i,b,u,s)}}(0,s,t.value,n,e,r,i)},Gf=function(t,n,e,r,i){(1&t.depth?Bf:Nf)(t,n,e,r,i)},Qf=function t(n){function e(t,e,r,i,o){if((u=t._squarify)&&u.ratio===n)for(var u,a,s,c,l,f=-1,h=u.length,d=t.value;++f1?n:1)},e}(Wf),Jf=function(t){for(var n,e=-1,r=t.length,i=t[r-1],o=0;++e1&&th(t[e[r-2]],t[e[r-1]],t[i])<=0;)--r;e[r++]=i}return e.slice(0,r)}var rh=function(t){if((e=t.length)<3)return null;var n,e,r=new Array(e),i=new Array(e);for(n=0;n=0;--n)c.push(t[r[o[n]][2]]);for(n=+a;na!=c>a&&u<(s-e)*(a-r)/(c-r)+e&&(l=!l),s=e,c=r;return l},oh=function(t){for(var n,e,r=-1,i=t.length,o=t[i-1],u=o[0],a=o[1],s=0;++r=0;)if((e=t._tasks[r])&&(t._tasks[r]=null,e.abort))try{e.abort()}catch(n){}t._active=NaN,hh(t)}function hh(t){if(!t._active&&t._call){var n=t._data;t._data=void 0,t._call(t._error,n)}}function dh(t){if(null==t)t=1/0;else if(!((t=+t)>=1))throw new Error("invalid concurrency");return new sh(t)}sh.prototype=dh.prototype={constructor:sh,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=uh.call(arguments,1);return n.push(t),++this._waiting,this._tasks.push(n),ch(this),this},abort:function(){return null==this._error&&fh(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))},hh(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,hh(this),this}};var ph=function(){return Math.random()},vh=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}(ph),gh=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}(ph),yh=function t(n){function e(){var t=gh.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(ph),mh=function t(n){function e(t){return function(){for(var e=0,r=0;r=200&&r<300||304===r){if(i)try{n=i.call(e,s)}catch(t){return void u.call("error",e,t)}else n=s;u.call("load",e,n)}else u.call("error",e,t)}if("undefined"==typeof XDomainRequest||"withCredentials"in s||!/^(http(s)?:)?\/\//.test(t)||(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=s.ontimeout=h:s.onreadystatechange=function(t){s.readyState>3&&h(t)},s.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?(f=+t,e):f},user:function(t){return arguments.length<1?c:(c=null==t?null:t+"",e)},password:function(t){return arguments.length<1?l:(l=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 s.open(n,t,!0,c,l),null==r||a.has("accept")||a.set("accept",r+",*/*"),s.setRequestHeader&&a.each((function(t,n){s.setRequestHeader(n,t)})),null!=r&&s.overrideMimeType&&s.overrideMimeType(r),null!=o&&(s.responseType=o),f>0&&(s.timeout=f),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,s),s.send(null==i?null:i),e},abort:function(){return s.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},wh=function(t,n){return function(e,r){var i=_h(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}},Th=wh("text/html",(function(t){return document.createRange().createContextualFragment(t.responseText)})),Ch=wh("application/json",(function(t){return JSON.parse(t.responseText)})),Mh=wh("text/plain",(function(t){return t.responseText})),Sh=wh("application/xml",(function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n})),kh=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=_h(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(function(t,n){return function(e){return t(e.responseText,n)}}(n,r=t)):r},o.row(r),i?o.get(i):o}},Ah=kh("text/csv",ro),Nh=kh("text/tab-separated-values",so),Eh=Array.prototype,Dh=Eh.map,Oh=Eh.slice,Lh={name:"implicit"};function jh(t){var n=Object(Xi.c)(),e=[],r=Lh;function i(i){var o=i+"",u=n.get(o);if(!u){if(r!==Lh)return r;n.set(o,u=e.push(i))}return t[(u-1)%t.length]}return t=null==t?[]:Oh.call(t),i.domain=function(t){if(!arguments.length)return e.slice();e=[],n=Object(Xi.c)();for(var r,o,u=-1,a=t.length;++u2?Ih:$h,r=i=null,l}function l(n){return(r||(r=e(o,u,s?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 l.invert=function(t){return(i||(i=e(u,o,zh,s?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)},l.domain=function(t){return arguments.length?(o=Dh.call(t,Hh),c()):o.slice()},l.range=function(t){return arguments.length?(u=Oh.call(t),c()):u.slice()},l.rangeRound=function(t){return u=Oh.call(t),a=oe,c()},l.clamp=function(t){return arguments.length?(s=!!t,c()):s},l.interpolate=function(t){return arguments.length?(a=t,c()):a},c()}var Wh=function(t,n,e){var i,o=t[0],u=t[t.length-1],a=Object(r.A)(o,u,null==n?10:n);switch((e=Wo(null==e?",f":e)).type){case"s":var s=Math.max(Math.abs(o),Math.abs(u));return null!=e.precision||isNaN(i=nu(a,s))||(e.precision=i),Ko(e,s);case"":case"e":case"g":case"p":case"r":null!=e.precision||isNaN(i=eu(a,Math.max(Math.abs(o),Math.abs(u))))||(e.precision=i-("e"===e.type));break;case"f":case"%":null!=e.precision||isNaN(i=tu(a))||(e.precision=i-2*("%"===e.type))}return Xo(e)};function Yh(t){var n=t.domain;return t.ticks=function(t){var e=n();return Object(r.B)(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){return Wh(n(),t,e)},t.nice=function(e){null==e&&(e=10);var i,o=n(),u=0,a=o.length-1,s=o[u],c=o[a];return c0?(s=Math.floor(s/i)*i,c=Math.ceil(c/i)*i,i=Object(r.z)(s,c,e)):i<0&&(s=Math.ceil(s*i)/i,c=Math.floor(c*i)/i,i=Object(r.z)(s,c,e)),i>0?(o[u]=Math.floor(s/i)*i,o[a]=Math.ceil(c/i)*i,n(o)):i<0&&(o[u]=Math.ceil(s*i)/i,o[a]=Math.floor(c*i)/i,n(o)),t},t}function Vh(){var t=Bh(zh,Zn);return t.copy=function(){return Uh(t,Vh())},Yh(t)}function Xh(){var t=[0,1];function n(t){return+t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Dh.call(e,Hh),n):t.slice()},n.copy=function(){return Xh().domain(t)},Yh(n)}var Kh=function(t,n){var e,r=0,i=(t=t.slice()).length-1,o=t[r],u=t[i];return u0){for(;dc)break;g.push(h)}}else for(;d=1;--f)if(!((h=l*f)c)break;g.push(h)}}else g=Object(r.B)(d,p,Math.min(p-d,v)).map(o);return u?g.reverse():g},t.tickFormat=function(n,r){if(null==r&&(r=10===e?".0e":","),"function"!=typeof r&&(r=Xo(r)),n===1/0)return r;null==n&&(n=10);var u=Math.max(1,e*n/t.ticks().length);return function(t){var n=t/o(Math.round(i(t)));return n*e0?e[i-1]:t[0],i=e?[i[e-1],n]:[i[u-1],i[u]]},u.copy=function(){return ad().domain([t,n]).range(o)},Yh(u)}function sd(){var t=[.5],n=[0,1],e=1;function i(i){if(i<=i)return n[Object(r.b)(t,i,0,e)]}return i.domain=function(r){return arguments.length?(t=Oh.call(r),e=Math.min(t.length,n.length-1),i):t.slice()},i.range=function(r){return arguments.length?(n=Oh.call(r),e=Math.min(t.length,n.length-1),i):n.slice()},i.invertExtent=function(e){var r=n.indexOf(e);return[t[r-1],t[r]]},i.copy=function(){return sd().domain(t).range(n)},i}var cd=new Date,ld=new Date;function fd(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-n0))return a;do{a.push(u=new Date(+e)),n(e,o),t(e)}while(u=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 cd.setTime(+n),ld.setTime(+r),t(cd),t(ld),Math.floor(e(cd,ld))},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 hd=fd((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t}));hd.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?fd((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):hd:null};var dd=hd,pd=hd.range,vd=6e4,gd=6048e5,yd=fd((function(t){t.setTime(1e3*Math.floor(t/1e3))}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()})),md=yd,bd=yd.range,xd=fd((function(t){t.setTime(Math.floor(t/vd)*vd)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getMinutes()})),_d=xd,wd=xd.range,Td=fd((function(t){var n=t.getTimezoneOffset()*vd%36e5;n<0&&(n+=36e5),t.setTime(36e5*Math.floor((+t-n)/36e5)+n)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()})),Cd=Td,Md=Td.range,Sd=fd((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())*vd)/864e5}),(function(t){return t.getDate()-1})),kd=Sd,Ad=Sd.range;function Nd(t){return fd((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())*vd)/gd}))}var Ed=Nd(0),Dd=Nd(1),Od=Nd(2),Ld=Nd(3),jd=Nd(4),Rd=Nd(5),qd=Nd(6),Pd=Ed.range,Hd=Dd.range,Fd=Od.range,zd=Ld.range,$d=jd.range,Id=Rd.range,Ud=qd.range,Bd=fd((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()})),Wd=Bd,Yd=Bd.range,Vd=fd((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()}));Vd.every=function(t){return isFinite(t=Math.floor(t))&&t>0?fd((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 Xd=Vd,Kd=Vd.range,Gd=fd((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+n*vd)}),(function(t,n){return(n-t)/vd}),(function(t){return t.getUTCMinutes()})),Qd=Gd,Jd=Gd.range,Zd=fd((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()})),tp=Zd,np=Zd.range,ep=fd((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1})),rp=ep,ip=ep.range;function op(t){return fd((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)/gd}))}var up=op(0),ap=op(1),sp=op(2),cp=op(3),lp=op(4),fp=op(5),hp=op(6),dp=up.range,pp=ap.range,vp=sp.range,gp=cp.range,yp=lp.range,mp=fp.range,bp=hp.range,xp=fd((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()})),_p=xp,wp=xp.range,Tp=fd((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()}));Tp.every=function(t){return isFinite(t=Math.floor(t))&&t>0?fd((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 Cp=Tp,Mp=Tp.range;function Sp(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 kp(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 Ap(t){return{y:t,m:0,d:1,H:0,M:0,S:0,L:0}}function Np(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,s=t.shortMonths,c=$p(i),l=Ip(i),f=$p(o),h=Ip(o),d=$p(u),p=Ip(u),v=$p(a),g=Ip(a),y=$p(s),m=Ip(s),b={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:sv,e:sv,f:dv,H:cv,I:lv,j:fv,L:hv,m:pv,M:vv,p:function(t){return i[+(t.getHours()>=12)]},Q:Uv,s:Bv,S:gv,u:yv,U:mv,V:bv,w:xv,W:_v,x:null,X:null,y:wv,Y:Tv,Z:Cv,"%":Iv},x={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Mv,e:Mv,f:Ev,H:Sv,I:kv,j:Av,L:Nv,m:Dv,M:Ov,p:function(t){return i[+(t.getUTCHours()>=12)]},Q:Uv,s:Bv,S:Lv,u:jv,U:Rv,V:qv,w:Pv,W:Hv,x:null,X:null,y:Fv,Y:zv,Z:$v,"%":Iv},_={a:function(t,n,e){var r=d.exec(n.slice(e));return r?(t.w=p[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=f.exec(n.slice(e));return r?(t.w=h[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=m[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 C(t,n,e,r)},d:Jp,e:Jp,f:iv,H:tv,I:tv,j:Zp,L:rv,m:Qp,M:nv,p:function(t,n,e){var r=c.exec(n.slice(e));return r?(t.p=l[r[0].toLowerCase()],e+r[0].length):-1},Q:uv,s:av,S:ev,u:Bp,U:Wp,V:Yp,w:Up,W:Vp,x:function(t,n,r){return C(t,e,n,r)},X:function(t,n,e){return C(t,r,n,e)},y:Kp,Y:Xp,Z:Gp,"%":ov};function w(t,n){return function(e){var r,i,o,u=[],a=-1,s=0,c=t.length;for(e instanceof Date||(e=new Date(+e));++a53)return null;"w"in o||(o.w=1),"Z"in o?(r=(i=(r=kp(Ap(o.y))).getUTCDay())>4||0===i?ap.ceil(r):ap(r),r=rp.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=(i=(r=n(Ap(o.y))).getDay())>4||0===i?Dd.ceil(r):Dd(r),r=kd.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?kp(Ap(o.y)).getUTCDay():n(Ap(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,kp(o)):n(o)}}function C(t,n,e,r){for(var i,o,u=0,a=n.length,s=e.length;u=s)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=_[i in Rp?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return b.x=w(e,b),b.X=w(r,b),b.c=w(n,b),x.x=w(e,x),x.X=w(r,x),x.c=w(n,x),{format:function(t){var n=w(t+="",b);return n.toString=function(){return t},n},parse:function(t){var n=T(t+="",Sp);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=T(t,kp);return n.toString=function(){return t},n}}}var Ep,Dp,Op,Lp,jp,Rp={"-":"",_:" ",0:"0"},qp=/^\s*\d+/,Pp=/^%/,Hp=/[\\^$*+?|[\]().{}]/g;function Fp(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o68?1900:2e3),e+r[0].length):-1}function Gp(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 Qp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function Jp(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function Zp(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function tv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function nv(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ev(t,n,e){var r=qp.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function rv(t,n,e){var r=qp.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function iv(t,n,e){var r=qp.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function ov(t,n,e){var r=Pp.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function uv(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function av(t,n,e){var r=qp.exec(n.slice(e));return r?(t.Q=1e3*+r[0],e+r[0].length):-1}function sv(t,n){return Fp(t.getDate(),n,2)}function cv(t,n){return Fp(t.getHours(),n,2)}function lv(t,n){return Fp(t.getHours()%12||12,n,2)}function fv(t,n){return Fp(1+kd.count(Xd(t),t),n,3)}function hv(t,n){return Fp(t.getMilliseconds(),n,3)}function dv(t,n){return hv(t,n)+"000"}function pv(t,n){return Fp(t.getMonth()+1,n,2)}function vv(t,n){return Fp(t.getMinutes(),n,2)}function gv(t,n){return Fp(t.getSeconds(),n,2)}function yv(t){var n=t.getDay();return 0===n?7:n}function mv(t,n){return Fp(Ed.count(Xd(t),t),n,2)}function bv(t,n){var e=t.getDay();return t=e>=4||0===e?jd(t):jd.ceil(t),Fp(jd.count(Xd(t),t)+(4===Xd(t).getDay()),n,2)}function xv(t){return t.getDay()}function _v(t,n){return Fp(Dd.count(Xd(t),t),n,2)}function wv(t,n){return Fp(t.getFullYear()%100,n,2)}function Tv(t,n){return Fp(t.getFullYear()%1e4,n,4)}function Cv(t){var n=t.getTimezoneOffset();return(n>0?"-":(n*=-1,"+"))+Fp(n/60|0,"0",2)+Fp(n%60,"0",2)}function Mv(t,n){return Fp(t.getUTCDate(),n,2)}function Sv(t,n){return Fp(t.getUTCHours(),n,2)}function kv(t,n){return Fp(t.getUTCHours()%12||12,n,2)}function Av(t,n){return Fp(1+rp.count(Cp(t),t),n,3)}function Nv(t,n){return Fp(t.getUTCMilliseconds(),n,3)}function Ev(t,n){return Nv(t,n)+"000"}function Dv(t,n){return Fp(t.getUTCMonth()+1,n,2)}function Ov(t,n){return Fp(t.getUTCMinutes(),n,2)}function Lv(t,n){return Fp(t.getUTCSeconds(),n,2)}function jv(t){var n=t.getUTCDay();return 0===n?7:n}function Rv(t,n){return Fp(up.count(Cp(t),t),n,2)}function qv(t,n){var e=t.getUTCDay();return t=e>=4||0===e?lp(t):lp.ceil(t),Fp(lp.count(Cp(t),t)+(4===Cp(t).getUTCDay()),n,2)}function Pv(t){return t.getUTCDay()}function Hv(t,n){return Fp(ap.count(Cp(t),t),n,2)}function Fv(t,n){return Fp(t.getUTCFullYear()%100,n,2)}function zv(t,n){return Fp(t.getUTCFullYear()%1e4,n,4)}function $v(){return"+0000"}function Iv(){return"%"}function Uv(t){return+t}function Bv(t){return Math.floor(+t/1e3)}function Wv(t){return Ep=Np(t),Dp=Ep.format,Op=Ep.parse,Lp=Ep.utcFormat,jp=Ep.utcParse,Ep}Wv({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 Yv=Date.prototype.toISOString?function(t){return t.toISOString()}:Lp("%Y-%m-%dT%H:%M:%S.%LZ"),Vv=+new Date("2000-01-01T00:00:00.000Z")?function(t){var n=new Date(t);return isNaN(n)?null:n}:jp("%Y-%m-%dT%H:%M:%S.%LZ"),Xv=1e3,Kv=60*Xv,Gv=60*Kv,Qv=24*Gv,Jv=7*Qv,Zv=30*Qv,tg=365*Qv;function ng(t){return new Date(t)}function eg(t){return t instanceof Date?+t:+new Date(+t)}function rg(t,n,e,i,o,u,a,s,c){var l=Bh(zh,Zn),f=l.invert,h=l.domain,d=c(".%L"),p=c(":%S"),v=c("%I:%M"),g=c("%I %p"),y=c("%a %d"),m=c("%b %d"),b=c("%B"),x=c("%Y"),_=[[a,1,Xv],[a,5,5*Xv],[a,15,15*Xv],[a,30,30*Xv],[u,1,Kv],[u,5,5*Kv],[u,15,15*Kv],[u,30,30*Kv],[o,1,Gv],[o,3,3*Gv],[o,6,6*Gv],[o,12,12*Gv],[i,1,Qv],[i,2,2*Qv],[e,1,Jv],[n,1,Zv],[n,3,3*Zv],[t,1,tg]];function w(r){return(a(r)1)&&(t-=Math.floor(t));var n=Math.abs(t-.5);return pg.h=360*t-100,pg.s=1.5-1.5*n,pg.l=.8-.9*n,pg+""};function gg(t){var n=t.length;return function(e){return t[Math.max(0,Math.min(n-1,Math.floor(e*n)))]}}var yg=gg(ug("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),mg=gg(ug("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),bg=gg(ug("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),xg=gg(ug("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function _g(t){var n=0,e=1,r=!1;function i(i){var o=(i-n)/(e-n);return t(r?Math.max(0,Math.min(1,o)):o)}return i.domain=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.clamp=function(t){return arguments.length?(r=!!t,i):r},i.interpolator=function(n){return arguments.length?(t=n,i):t},i.copy=function(){return _g(t).domain([n,e]).clamp(r)},Yh(i)}var wg=e(5),Tg=function(t){return function(){return t}};function Cg(t){return t[0]}function Mg(t){return t[1]}function Sg(){this._=null}function kg(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Ag(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 Ng(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 Eg(t){for(;t.L;)t=t.L;return t}Sg.prototype={constructor:Sg,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=Eg(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&&(Ag(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ng(this,r)):(i=r.L)&&i.C?(e.C=i.C=!1,r.C=!0,t=r):(t===e.L&&(Ng(this,e),e=(t=e).U),e.C=!1,r.C=!0,Ag(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?Eg(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,Ag(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,Ng(this,n),n=i.R),n.C=i.C,i.C=n.R.C=!1,Ag(this,i),t=this._;break}}else if((n=i.L).C&&(n.C=!1,i.C=!0,Ng(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,Ag(this,n),n=i.L),n.C=i.C,i.C=n.L.C=!1,Ng(this,i),t=this._;break}n.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Dg=Sg;function Og(t,n,e,r){var i=[null,null],o=ty.push(i)-1;return i.left=t,i.right=n,e&&jg(i,t,n,e),r&&jg(i,n,t,r),Jg[t.index].halfedges.push(o),Jg[n.index].halfedges.push(o),i}function Lg(t,n,e){var r=[n,e];return r.left=t,r}function jg(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 Rg(t,n,e,r,i){var o,u=t[0],a=t[1],s=u[0],c=u[1],l=0,f=1,h=a[0]-s,d=a[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>f)return;o>l&&(l=o)}if(o=r-s,h||!(o<0)){if(o/=h,h<0){if(o>f)return;o>l&&(l=o)}else if(h>0){if(o0)){if(o/=d,d<0){if(o0){if(o>f)return;o>l&&(l=o)}if(o=i-c,d||!(o<0)){if(o/=d,d<0){if(o>f)return;o>l&&(l=o)}else if(d>0){if(o0||f<1)||(l>0&&(t[0]=[s+l*h,c+l*d]),f<1&&(t[1]=[s+f*h,c+f*d]),!0)}}}}}function qg(t,n,e,r,i){var o=t[1];if(o)return!0;var u,a,s=t[0],c=t.left,l=t.right,f=c[0],h=c[1],d=l[0],p=l[1],v=(f+d)/2,g=(h+p)/2;if(p===h){if(v=r)return;if(f>d){if(s){if(s[1]>=i)return}else s=[v,e];o=[v,i]}else{if(s){if(s[1]1)if(f>d){if(s){if(s[1]>=i)return}else s=[(e-a)/u,e];o=[(i-a)/u,i]}else{if(s){if(s[1]=r)return}else s=[n,u*n+a];o=[r,u*r+a]}else{if(s){if(s[0]=-ey)){var d=s*s+c*c,p=l*l+f*f,v=(f*d-c*p)/h,g=(s*p-l*d)/h,y=$g.pop()||new function(){kg(this),this.x=this.y=this.arc=this.site=this.cy=null};y.arc=t,y.site=i,y.x=v+u,y.y=(y.cy=g+a)+Math.sqrt(v*v+g*g),t.circle=y;for(var m=null,b=Zg._;b;)if(y.yny)a=a.L;else{if(!((i=o-Gg(a,u))>ny)){r>-ny?(n=a.P,e=a):i>-ny?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}!function(t){Jg[t.index]={site:t,halfedges:[]}}(t);var s=Wg(t);if(Qg.insert(n,s),n||e){if(n===e)return Ug(n),e=Wg(n.site),Qg.insert(s,e),s.edge=e.edge=Og(n.site,s.site),Ig(n),void Ig(e);if(e){Ug(n),Ug(e);var c=n.site,l=c[0],f=c[1],h=t[0]-l,d=t[1]-f,p=e.site,v=p[0]-l,g=p[1]-f,y=2*(h*g-d*v),m=h*h+d*d,b=v*v+g*g,x=[(g*m-d*b)/y+l,(h*b-v*m)/y+f];jg(e.edge,c,p,x),s.edge=Og(c,t,null,x),e.edge=Og(t,p,null,x),Ig(n),Ig(e)}else s.edge=Og(n.site,s.site)}}function Kg(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],s=e[1],c=s-n;if(!c)return a;var l=a-r,f=1/o-1/c,h=l/c;return f?(-h+Math.sqrt(h*h-2*f*(l*l/(-2*c)-s+c/2+i-o/2)))/f+r:(r+a)/2}function Gg(t,n){var e=t.N;if(e)return Kg(e,n);var r=t.site;return r[1]===n?r[0]:1/0}var Qg,Jg,Zg,ty,ny=1e-6,ey=1e-12;function ry(t,n){return n[1]-t[1]||n[0]-t[0]}function iy(t,n){var e,r,i,o=t.sort(ry).pop();for(ty=[],Jg=new Array(t.length),Qg=new Dg,Zg=new Dg;;)if(i=zg,o&&(!i||o[1]ny||Math.abs(i[0][1]-i[1][1])>ny)||delete ty[o]}(u,a,s,c),function(t,n,e,r){var i,o,u,a,s,c,l,f,h,d,p,v,g=Jg.length,y=!0;for(i=0;iny||Math.abs(v-h)>ny)&&(s.splice(a,0,ty.push(Lg(u,d,Math.abs(p-t)ny?[t,Math.abs(f-t)ny?[Math.abs(h-r)ny?[e,Math.abs(f-e)ny?[Math.abs(h-n)=a)return null;var s=t-i.site[0],c=n-i.site[1],l=s*s+c*c;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 s=t-a[0],c=n-a[1],f=s*s+c*c;fr?(r+i)/2:Math.min(0,r)||Math.max(0,i),u>o?(o+u)/2:Math.min(0,o)||Math.max(0,u))}var my=function(){var t,n,e=hy,r=dy,i=yy,o=vy,u=gy,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=pe,f=[],h=C("start","zoom","end"),d=500,p=150,v=0;function g(t){t.property("__zoom",py).on("wheel.zoom",T).on("mousedown.zoom",M).on("dblclick.zoom",S).filter(u).on("touchstart.zoom",k).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",N).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function y(t,n){return(n=Math.max(a[0],Math.min(a[1],n)))===t.k?t:new ay(n,t.x,t.y)}function m(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 ay(t.k,r,i)}function b(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(){_(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){_(this,arguments).end()})).tween("zoom",(function(){var t=arguments,i=_(this,t),o=r.apply(this,t),u=e||b(o),a=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),s=this.__zoom,c="function"==typeof n?n.apply(this,t):n,f=l(s.invert(u).concat(a/s.k),c.invert(u).concat(a/c.k));return function(t){if(1===t)t=c;else{var n=f(t),e=a/n[2];t=new ay(e,u[0]-n[0]*e,u[1]-n[1]*e)}i.zoom(null,t)}}))}function _(t,n){for(var e,r=0,i=f.length;rv}t.zoom("mouse",i(m(t.that.__zoom,t.mouse[0]=Tt(t.that),t.mouse[1]),t.extent,s))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),Et(ot.view,t.moved),fy(),t.end()}),!0),o=Tt(this),u=ot.clientX,a=ot.clientY;Nt(ot.view),ly(),t.mouse=[o,this.__zoom.invert(o)],ur(this),t.start()}}function S(){if(e.apply(this,arguments)){var t=this.__zoom,n=Tt(this),o=t.invert(n),u=t.k*(ot.shiftKey?.5:2),a=i(m(y(t,u),n,o),r.apply(this,arguments),s);fy(),c>0?gt(this).transition().duration(c).call(x,a,n):gt(this).call(g.transform,a)}}function k(){if(e.apply(this,arguments)){var n,r,i,o,u=_(this,arguments),a=ot.changedTouches,s=a.length;for(ly(),r=0;r-1&&(n+=",");var e=t.split(".");switch(n+=".",n+=e.length>1?e[1].length:0,t.slice(-1)){case"%":n+="%";break;case"0":n+="f"}return r.format(n)}},o=function(t,n,e){var r=function(n,e,r,i,o){return!(!t.addError||!t.clearErrors||(ro?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===o?"exactly":"no more than")+" "+o+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))},i=n.fields,o=i.pivots,u=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",o.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",u.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)}},function(t,n,e){"use strict";var r=e(1),i=function(t){return function(){return t}},o=Math.abs,u=Math.atan2,a=Math.cos,s=Math.max,c=Math.min,l=Math.sin,f=Math.sqrt,h=1e-12,d=Math.PI,p=d/2,v=2*d;function g(t){return t>=1?p:t<=-1?-p:Math.asin(t)}function y(t){return t.innerRadius}function m(t){return t.outerRadius}function b(t){return t.startAngle}function x(t){return t.endAngle}function _(t){return t&&t.padAngle}function w(t,n,e,r,i,o,u){var a=t-e,c=n-r,l=(u?o:-o)/f(a*a+c*c),h=l*c,d=-l*a,p=t+h,v=n+d,g=e+h,y=r+d,m=(p+g)/2,b=(v+y)/2,x=g-p,_=y-v,w=x*x+_*_,T=i-o,C=p*y-g*v,M=(_<0?-1:1)*f(s(0,T*T*w-C*C)),S=(C*_-x*M)/w,k=(-C*x-_*M)/w,A=(C*_+x*M)/w,N=(-C*x+_*M)/w,E=S-m,D=k-b,O=A-m,L=N-b;return E*E+D*D>O*O+L*L&&(S=A,k=N),{cx:S,cy:k,x01:-h,y01:-d,x11:S*(i/T-1),y11:k*(i/T-1)}}var T=function(){var t=y,n=m,e=i(0),s=null,T=b,C=x,M=_,S=null;function k(){var i,y,m,b=+t.apply(this,arguments),x=+n.apply(this,arguments),_=T.apply(this,arguments)-p,k=C.apply(this,arguments)-p,A=o(k-_),N=k>_;if(S||(S=i=Object(r.a)()),xh)if(A>v-h)S.moveTo(x*a(_),x*l(_)),S.arc(0,0,x,_,k,!N),b>h&&(S.moveTo(b*a(k),b*l(k)),S.arc(0,0,b,k,_,N));else{var E,D,O=_,L=k,j=_,R=k,q=A,P=A,H=M.apply(this,arguments)/2,F=H>h&&(s?+s.apply(this,arguments):f(b*b+x*x)),z=c(o(x-b)/2,+e.apply(this,arguments)),$=z,I=z;if(F>h){var U=g(F/b*l(H)),B=g(F/x*l(H));(q-=2*U)>h?(j+=U*=N?1:-1,R-=U):(q=0,j=R=(_+k)/2),(P-=2*B)>h?(O+=B*=N?1:-1,L-=B):(P=0,O=L=(_+k)/2)}var W=x*a(O),Y=x*l(O),V=b*a(R),X=b*l(R);if(z>h){var K=x*a(L),G=x*l(L),Q=b*a(j),J=b*l(j);if(Ah?function(t,n,e,r,i,o,u,a){var s=e-t,c=r-n,l=u-i,f=a-o,h=(l*(n-o)-f*(t-i))/(f*s-l*c);return[t+h*s,n+h*c]}(W,Y,Q,J,K,G,V,X):[V,X],tt=W-Z[0],nt=Y-Z[1],et=K-Z[0],rt=G-Z[1],it=1/l(((m=(tt*et+nt*rt)/(f(tt*tt+nt*nt)*f(et*et+rt*rt)))>1?0:m<-1?d:Math.acos(m))/2),ot=f(Z[0]*Z[0]+Z[1]*Z[1]);$=c(z,(b-ot)/(it-1)),I=c(z,(x-ot)/(it+1))}}P>h?I>h?(E=w(Q,J,W,Y,x,I,N),D=w(K,G,V,X,x,I,N),S.moveTo(E.cx+E.x01,E.cy+E.y01),Ih&&q>h?$>h?(E=w(V,X,K,G,b,-$,N),D=w(W,Y,Q,J,b,-$,N),S.lineTo(E.cx+E.x01,E.cy+E.y01),$=f;--h)c.point(y[h],m[h]);c.lineEnd(),c.areaEnd()}g&&(y[l]=+t(d,l,i),m[l]=+e(d,l,i),c.point(n?+n(d,l,i):y[l],o?+o(d,l,i):m[l]))}if(p)return c=null,p+""||null}function f(){return A().defined(u).curve(s).context(a)}return l.x=function(e){return arguments.length?(t="function"==typeof e?e:i(+e),n=null,l):t},l.x0=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),l):t},l.x1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:i(+t),l):n},l.y=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),o=null,l):e},l.y0=function(t){return arguments.length?(e="function"==typeof t?t:i(+t),l):e},l.y1=function(t){return arguments.length?(o=null==t?null:"function"==typeof t?t:i(+t),l):o},l.lineX0=l.lineY0=function(){return f().x(t).y(e)},l.lineY1=function(){return f().x(t).y(o)},l.lineX1=function(){return f().x(n).y(e)},l.defined=function(t){return arguments.length?(u="function"==typeof t?t:i(!!t),l):u},l.curve=function(t){return arguments.length?(s=t,null!=a&&(c=s(a)),l):s},l.context=function(t){return arguments.length?(null==t?a=c=null:c=s(a=t),l):a},l},E=function(t,n){return nt?1:n>=t?0:NaN},D=function(t){return t},O=function(){var t=D,n=E,e=null,r=i(0),o=i(v),u=i(0);function a(i){var a,s,c,l,f,h=i.length,d=0,p=new Array(h),g=new Array(h),y=+r.apply(this,arguments),m=Math.min(v,Math.max(-v,o.apply(this,arguments)-y)),b=Math.min(Math.abs(m)/h,u.apply(this,arguments)),x=b*(m<0?-1:1);for(a=0;a0&&(d+=f);for(null!=n?p.sort((function(t,e){return n(g[t],g[e])})):null!=e&&p.sort((function(t,n){return e(i[t],i[n])})),a=0,c=d?(m-h*x)/d:0;a0?f*c:0)+x,g[s]={data:i[s],index:a,value:f,startAngle:y,endAngle:l,padAngle:b};return g}return a.value=function(n){return arguments.length?(t="function"==typeof n?n:i(+n),a):t},a.sortValues=function(t){return arguments.length?(n=t,e=null,a):n},a.sort=function(t){return arguments.length?(e=t,n=null,a):e},a.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:i(+t),a):r},a.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),a):o},a.padAngle=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),a):u},a},L=R(M);function j(t){this._curve=t}function R(t){function n(n){return new j(t(n))}return n._curve=t,n}function q(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(R(t)):n()._curve},t}j.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 P=function(){return q(A().curve(L))},H=function(){var t=N().curve(L),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 q(e())},delete t.lineX0,t.lineEndAngle=function(){return q(r())},delete t.lineX1,t.lineInnerRadius=function(){return q(i())},delete t.lineY0,t.lineOuterRadius=function(){return q(o())},delete t.lineY1,t.curve=function(t){return arguments.length?n(R(t)):n()._curve},t},F=function(t,n){return[(n=+n)*Math.cos(t-=Math.PI/2),n*Math.sin(t)]},z=Array.prototype.slice;function $(t){return t.source}function I(t){return t.target}function U(t){var n=$,e=I,o=S,u=k,a=null;function s(){var i,s=z.call(arguments),c=n.apply(this,s),l=e.apply(this,s);if(a||(a=i=Object(r.a)()),t(a,+o.apply(this,(s[0]=c,s)),+u.apply(this,s),+o.apply(this,(s[0]=l,s)),+u.apply(this,s)),i)return a=null,i+""||null}return s.source=function(t){return arguments.length?(n=t,s):n},s.target=function(t){return arguments.length?(e=t,s):e},s.x=function(t){return arguments.length?(o="function"==typeof t?t:i(+t),s):o},s.y=function(t){return arguments.length?(u="function"==typeof t?t:i(+t),s):u},s.context=function(t){return arguments.length?(a=null==t?null:t,s):a},s}function B(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n=(n+r)/2,e,n,i,r,i)}function W(t,n,e,r,i){t.moveTo(n,e),t.bezierCurveTo(n,e=(e+i)/2,r,e,r,i)}function Y(t,n,e,r,i){var o=F(n,e),u=F(n,e=(e+i)/2),a=F(r,e),s=F(r,i);t.moveTo(o[0],o[1]),t.bezierCurveTo(u[0],u[1],a[0],a[1],s[0],s[1])}function V(){return U(B)}function X(){return U(W)}function K(){var t=U(Y);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var G={draw:function(t,n){var e=Math.sqrt(n/d);t.moveTo(e,0),t.arc(0,0,e,0,v)}},Q={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()}},J=Math.sqrt(1/3),Z=2*J,tt={draw:function(t,n){var e=Math.sqrt(n/Z),r=e*J;t.moveTo(0,-e),t.lineTo(r,0),t.lineTo(0,e),t.lineTo(-r,0),t.closePath()}},nt=Math.sin(d/10)/Math.sin(7*d/10),et=Math.sin(v/10)*nt,rt=-Math.cos(v/10)*nt,it={draw:function(t,n){var e=Math.sqrt(.8908130915292852*n),r=et*e,i=rt*e;t.moveTo(0,-e),t.lineTo(r,i);for(var o=1;o<5;++o){var u=v*o/5,a=Math.cos(u),s=Math.sin(u);t.lineTo(s*e,-a*e),t.lineTo(a*r-s*i,s*r+a*i)}t.closePath()}},ot={draw:function(t,n){var e=Math.sqrt(n),r=-e/2;t.rect(r,r,e,e)}},ut=Math.sqrt(3),at={draw:function(t,n){var e=-Math.sqrt(n/(3*ut));t.moveTo(0,2*e),t.lineTo(-ut*e,-e),t.lineTo(ut*e,-e),t.closePath()}},st=Math.sqrt(3)/2,ct=1/Math.sqrt(12),lt=3*(ct/2+1),ft={draw:function(t,n){var e=Math.sqrt(n/lt),r=e/2,i=e*ct,o=r,u=e*ct+e,a=-o,s=u;t.moveTo(r,i),t.lineTo(o,u),t.lineTo(a,s),t.lineTo(-.5*r-st*i,st*r+-.5*i),t.lineTo(-.5*o-st*u,st*o+-.5*u),t.lineTo(-.5*a-st*s,st*a+-.5*s),t.lineTo(-.5*r+st*i,-.5*i-st*r),t.lineTo(-.5*o+st*u,-.5*u-st*o),t.lineTo(-.5*a+st*s,-.5*s-st*a),t.closePath()}},ht=[G,Q,tt,ot,it,at,ft],dt=function(){var t=i(G),n=i(64),e=null;function o(){var i;if(e||(e=i=Object(r.a)()),t.apply(this,arguments).draw(e,+n.apply(this,arguments)),i)return e=null,i+""||null}return o.type=function(n){return arguments.length?(t="function"==typeof n?n:i(n),o):t},o.size=function(t){return arguments.length?(n="function"==typeof t?t:i(+t),o):n},o.context=function(t){return arguments.length?(e=null==t?null:t,o):e},o},pt=function(){};function vt(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 gt(t){this._context=t}gt.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:vt(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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var yt=function(t){return new gt(t)};function mt(t){this._context=t}mt.prototype={areaStart:pt,areaEnd:pt,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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var bt=function(t){return new mt(t)};function xt(t){this._context=t}xt.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:vt(this,t,n)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=n}};var _t=function(t){return new xt(t)};function wt(t,n){this._basis=new gt(t),this._beta=n}wt.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,s=-1;++s<=e;)r=s/e,this._basis.point(this._beta*t[s]+(1-this._beta)*(i+r*u),this._beta*n[s]+(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 Tt=function t(n){function e(t){return 1===n?new gt(t):new wt(t,n)}return e.beta=function(n){return t(+n)},e}(.85);function Ct(t,n,e){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-n),t._y2+t._k*(t._y1-e),t._x2,t._y2)}function Mt(t,n){this._context=t,this._k=(1-n)/6}Mt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ct(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2,this._x1=t,this._y1=n;break;case 2:this._point=3;default:Ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var St=function t(n){function e(t){return new Mt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function kt(t,n){this._context=t,this._k=(1-n)/6}kt.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._x3=t,this._y3=n;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=n);break;case 2:this._point=3,this._x5=t,this._y5=n;break;default:Ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var At=function t(n){function e(t){return new kt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Nt(t,n){this._context=t,this._k=(1-n)/6}Nt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ct(this,t,n)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=n}};var Et=function t(n){function e(t){return new Nt(t,n)}return e.tension=function(n){return t(+n)},e}(0);function Dt(t,n,e){var r=t._x1,i=t._y1,o=t._x2,u=t._y2;if(t._l01_a>h){var a=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,s=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*a-t._x0*t._l12_2a+t._x2*t._l01_2a)/s,i=(i*a-t._y0*t._l12_2a+t._y2*t._l01_2a)/s}if(t._l23_a>h){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-n*t._l12_2a)/l,u=(u*c+t._y1*t._l23_2a-e*t._l12_2a)/l}t._context.bezierCurveTo(r,i,o,u,t._x2,t._y2)}function Ot(t,n){this._context=t,this._alpha=n}Ot.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:Dt(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 Lt=function t(n){function e(t){return n?new Ot(t,n):new Mt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function jt(t,n){this._context=t,this._alpha=n}jt.prototype={areaStart:pt,areaEnd:pt,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:Dt(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 Rt=function t(n){function e(t){return n?new jt(t,n):new kt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function qt(t,n){this._context=t,this._alpha=n}qt.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:Dt(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 Pt=function t(n){function e(t){return n?new qt(t,n):new Nt(t,0)}return e.alpha=function(n){return t(+n)},e}(.5);function Ht(t){this._context=t}Ht.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,n){t=+t,n=+n,this._point?this._context.lineTo(t,n):(this._point=1,this._context.moveTo(t,n))}};var Ft=function(t){return new Ht(t)};function zt(t){return t<0?-1:1}function $t(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(zt(o)+zt(u))*Math.min(Math.abs(o),Math.abs(u),.5*Math.abs(a))||0}function It(t,n){var e=t._x1-t._x0;return e?(3*(t._y1-t._y0)/e-n)/2:n}function Ut(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 Bt(t){this._context=t}function Wt(t){this._context=new Yt(t)}function Yt(t){this._context=t}function Vt(t){return new Bt(t)}function Xt(t){return new Wt(t)}function Kt(t){this._context=t}function Gt(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=0;--n)i[n]=(u[n]-i[n+1])/o[n];for(o[r-1]=(t[r]+i[r-1])/2,n=0;n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,n){switch(t=+t,n=+n,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,n),this._context.lineTo(t,n);else{var e=this._x*(1-this._t)+t*this._t;this._context.lineTo(e,this._y),this._context.lineTo(e,n)}}this._x=t,this._y=n}};var Zt=function(t){return new Jt(t,.5)};function tn(t){return new Jt(t,0)}function nn(t){return new Jt(t,1)}var en=function(t,n){if((i=t.length)>1)for(var e,r,i,o=1,u=t[n[0]],a=u.length;o=0;)e[n]=n;return e};function on(t,n){return t[n]}var un=function(){var t=i([]),n=rn,e=en,r=on;function o(i){var o,u,a=t.apply(this,arguments),s=i.length,c=a.length,l=new Array(c);for(o=0;o0){for(var e,r,i,o=0,u=t[0].length;o1)for(var e,r,i,o,u,a,s=0,c=t[n[0]].length;s=0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=u,r[0]=u+=i):r[0]=o},cn=function(t,n){if((e=t.length)>0){for(var e,r=0,i=t[n[0]],o=i.length;r0&&(r=(e=t[n[0]]).length)>0){for(var e,r,i,o=0,u=1;u+~]|"+q+")"+q+"*"),B=new RegExp("="+q+"*([^\\]'\"]*?)"+q+"*\\]","g"),W=new RegExp(z),Y=new RegExp("^"+P+"$"),V={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+z),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,G=/^[^{]+\{\s*\[native \w/,Q=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,J=/[+~]/,Z=new RegExp("\\\\([\\da-f]{1,6}"+q+"?|("+q+")|.)","ig"),tt=function(t,n,e){var r="0x"+n-65536;return r!=r||e?n:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},nt=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,et=function(t,n){return n?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},rt=function(){h()},it=mt((function(t){return!0===t.disabled&&("form"in t||"label"in t)}),{dir:"parentNode",next:"legend"});try{O.apply(N=L.call(_.childNodes),_.childNodes),N[_.childNodes.length].nodeType}catch(t){O={apply:N.length?function(t,n){D.apply(t,L.call(n))}:function(t,n){for(var e=t.length,r=0;t[e++]=n[r++];);t.length=e-1}}}function ot(t,n,r,i){var o,a,c,l,f,p,y,m=n&&n.ownerDocument,w=n?n.nodeType:9;if(r=r||[],"string"!=typeof t||!t||1!==w&&9!==w&&11!==w)return r;if(!i&&((n?n.ownerDocument||n:_)!==d&&h(n),n=n||d,v)){if(11!==w&&(f=Q.exec(t)))if(o=f[1]){if(9===w){if(!(c=n.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(m&&(c=m.getElementById(o))&&b(n,c)&&c.id===o)return r.push(c),r}else{if(f[2])return O.apply(r,n.getElementsByTagName(t)),r;if((o=f[3])&&e.getElementsByClassName&&n.getElementsByClassName)return O.apply(r,n.getElementsByClassName(o)),r}if(e.qsa&&!S[t+" "]&&(!g||!g.test(t))){if(1!==w)m=n,y=t;else if("object"!==n.nodeName.toLowerCase()){for((l=n.getAttribute("id"))?l=l.replace(nt,et):n.setAttribute("id",l=x),a=(p=u(t)).length;a--;)p[a]="#"+l+" "+yt(p[a]);y=p.join(","),m=J.test(t)&&vt(n.parentNode)||n}if(y)try{return O.apply(r,m.querySelectorAll(y)),r}catch(t){}finally{l===x&&n.removeAttribute("id")}}}return s(t.replace($,"$1"),n,r,i)}function ut(){var t=[];return function n(e,i){return t.push(e+" ")>r.cacheLength&&delete n[t.shift()],n[e+" "]=i}}function at(t){return t[x]=!0,t}function st(t){var n=d.createElement("fieldset");try{return!!t(n)}catch(t){return!1}finally{n.parentNode&&n.parentNode.removeChild(n),n=null}}function ct(t,n){for(var e=t.split("|"),i=e.length;i--;)r.attrHandle[e[i]]=n}function lt(t,n){var e=n&&t,r=e&&1===t.nodeType&&1===n.nodeType&&t.sourceIndex-n.sourceIndex;if(r)return r;if(e)for(;e=e.nextSibling;)if(e===n)return-1;return t?1:-1}function ft(t){return function(n){return"input"===n.nodeName.toLowerCase()&&n.type===t}}function ht(t){return function(n){var e=n.nodeName.toLowerCase();return("input"===e||"button"===e)&&n.type===t}}function dt(t){return function(n){return"form"in n?n.parentNode&&!1===n.disabled?"label"in n?"label"in n.parentNode?n.parentNode.disabled===t:n.disabled===t:n.isDisabled===t||n.isDisabled!==!t&&it(n)===t:n.disabled===t:"label"in n&&n.disabled===t}}function pt(t){return at((function(n){return n=+n,at((function(e,r){for(var i,o=t([],e.length,n),u=o.length;u--;)e[i=o[u]]&&(e[i]=!(r[i]=e[i]))}))}))}function vt(t){return t&&void 0!==t.getElementsByTagName&&t}for(n in e=ot.support={},o=ot.isXML=function(t){var n=t&&(t.ownerDocument||t).documentElement;return!!n&&"HTML"!==n.nodeName},h=ot.setDocument=function(t){var n,i,u=t?t.ownerDocument||t:_;return u!==d&&9===u.nodeType&&u.documentElement?(p=(d=u).documentElement,v=!o(d),_!==d&&(i=d.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",rt,!1):i.attachEvent&&i.attachEvent("onunload",rt)),e.attributes=st((function(t){return t.className="i",!t.getAttribute("className")})),e.getElementsByTagName=st((function(t){return t.appendChild(d.createComment("")),!t.getElementsByTagName("*").length})),e.getElementsByClassName=G.test(d.getElementsByClassName),e.getById=st((function(t){return p.appendChild(t).id=x,!d.getElementsByName||!d.getElementsByName(x).length})),e.getById?(r.filter.ID=function(t){var n=t.replace(Z,tt);return function(t){return t.getAttribute("id")===n}},r.find.ID=function(t,n){if(void 0!==n.getElementById&&v){var e=n.getElementById(t);return e?[e]:[]}}):(r.filter.ID=function(t){var n=t.replace(Z,tt);return function(t){var e=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return e&&e.value===n}},r.find.ID=function(t,n){if(void 0!==n.getElementById&&v){var e,r,i,o=n.getElementById(t);if(o){if((e=o.getAttributeNode("id"))&&e.value===t)return[o];for(i=n.getElementsByName(t),r=0;o=i[r++];)if((e=o.getAttributeNode("id"))&&e.value===t)return[o]}return[]}}),r.find.TAG=e.getElementsByTagName?function(t,n){return void 0!==n.getElementsByTagName?n.getElementsByTagName(t):e.qsa?n.querySelectorAll(t):void 0}:function(t,n){var e,r=[],i=0,o=n.getElementsByTagName(t);if("*"===t){for(;e=o[i++];)1===e.nodeType&&r.push(e);return r}return o},r.find.CLASS=e.getElementsByClassName&&function(t,n){if(void 0!==n.getElementsByClassName&&v)return n.getElementsByClassName(t)},y=[],g=[],(e.qsa=G.test(d.querySelectorAll))&&(st((function(t){p.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&g.push("[*^$]="+q+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||g.push("\\["+q+"*(?:value|"+R+")"),t.querySelectorAll("[id~="+x+"-]").length||g.push("~="),t.querySelectorAll(":checked").length||g.push(":checked"),t.querySelectorAll("a#"+x+"+*").length||g.push(".#.+[+~]")})),st((function(t){t.innerHTML="";var n=d.createElement("input");n.setAttribute("type","hidden"),t.appendChild(n).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&g.push("name"+q+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&g.push(":enabled",":disabled"),p.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&g.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),g.push(",.*:")}))),(e.matchesSelector=G.test(m=p.matches||p.webkitMatchesSelector||p.mozMatchesSelector||p.oMatchesSelector||p.msMatchesSelector))&&st((function(t){e.disconnectedMatch=m.call(t,"*"),m.call(t,"[s!='']:x"),y.push("!=",z)})),g=g.length&&new RegExp(g.join("|")),y=y.length&&new RegExp(y.join("|")),n=G.test(p.compareDocumentPosition),b=n||G.test(p.contains)?function(t,n){var e=9===t.nodeType?t.documentElement:t,r=n&&n.parentNode;return t===r||!(!r||1!==r.nodeType||!(e.contains?e.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,n){if(n)for(;n=n.parentNode;)if(n===t)return!0;return!1},k=n?function(t,n){if(t===n)return f=!0,0;var r=!t.compareDocumentPosition-!n.compareDocumentPosition;return r||(1&(r=(t.ownerDocument||t)===(n.ownerDocument||n)?t.compareDocumentPosition(n):1)||!e.sortDetached&&n.compareDocumentPosition(t)===r?t===d||t.ownerDocument===_&&b(_,t)?-1:n===d||n.ownerDocument===_&&b(_,n)?1:l?j(l,t)-j(l,n):0:4&r?-1:1)}:function(t,n){if(t===n)return f=!0,0;var e,r=0,i=t.parentNode,o=n.parentNode,u=[t],a=[n];if(!i||!o)return t===d?-1:n===d?1:i?-1:o?1:l?j(l,t)-j(l,n):0;if(i===o)return lt(t,n);for(e=t;e=e.parentNode;)u.unshift(e);for(e=n;e=e.parentNode;)a.unshift(e);for(;u[r]===a[r];)r++;return r?lt(u[r],a[r]):u[r]===_?-1:a[r]===_?1:0},d):d},ot.matches=function(t,n){return ot(t,null,null,n)},ot.matchesSelector=function(t,n){if((t.ownerDocument||t)!==d&&h(t),n=n.replace(B,"='$1']"),e.matchesSelector&&v&&!S[n+" "]&&(!y||!y.test(n))&&(!g||!g.test(n)))try{var r=m.call(t,n);if(r||e.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(t){}return ot(n,d,null,[t]).length>0},ot.contains=function(t,n){return(t.ownerDocument||t)!==d&&h(t),b(t,n)},ot.attr=function(t,n){(t.ownerDocument||t)!==d&&h(t);var i=r.attrHandle[n.toLowerCase()],o=i&&A.call(r.attrHandle,n.toLowerCase())?i(t,n,!v):void 0;return void 0!==o?o:e.attributes||!v?t.getAttribute(n):(o=t.getAttributeNode(n))&&o.specified?o.value:null},ot.escape=function(t){return(t+"").replace(nt,et)},ot.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},ot.uniqueSort=function(t){var n,r=[],i=0,o=0;if(f=!e.detectDuplicates,l=!e.sortStable&&t.slice(0),t.sort(k),f){for(;n=t[o++];)n===t[o]&&(i=r.push(o));for(;i--;)t.splice(r[i],1)}return l=null,t},i=ot.getText=function(t){var n,e="",r=0,o=t.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)e+=i(t)}else if(3===o||4===o)return t.nodeValue}else for(;n=t[r++];)e+=i(n);return e},(r=ot.selectors={cacheLength:50,createPseudo:at,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Z,tt),t[3]=(t[3]||t[4]||t[5]||"").replace(Z,tt),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||ot.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&ot.error(t[0]),t},PSEUDO:function(t){var n,e=!t[6]&&t[2];return V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":e&&W.test(e)&&(n=u(e,!0))&&(n=e.indexOf(")",e.length-n)-e.length)&&(t[0]=t[0].slice(0,n),t[2]=e.slice(0,n)),t.slice(0,3))}},filter:{TAG:function(t){var n=t.replace(Z,tt).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===n}},CLASS:function(t){var n=C[t+" "];return n||(n=new RegExp("(^|"+q+")"+t+"("+q+"|$)"))&&C(t,(function(t){return n.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,n,e){return function(r){var i=ot.attr(r,t);return null==i?"!="===n:!n||(i+="","="===n?i===e:"!="===n?i!==e:"^="===n?e&&0===i.indexOf(e):"*="===n?e&&i.indexOf(e)>-1:"$="===n?e&&i.slice(-e.length)===e:"~="===n?(" "+i.replace(H," ")+" ").indexOf(e)>-1:"|="===n&&(i===e||i.slice(0,e.length+1)===e+"-"))}},CHILD:function(t,n,e,r,i){var o="nth"!==t.slice(0,3),u="last"!==t.slice(-4),a="of-type"===n;return 1===r&&0===i?function(t){return!!t.parentNode}:function(n,e,s){var c,l,f,h,d,p,v=o!==u?"nextSibling":"previousSibling",g=n.parentNode,y=a&&n.nodeName.toLowerCase(),m=!s&&!a,b=!1;if(g){if(o){for(;v;){for(h=n;h=h[v];)if(a?h.nodeName.toLowerCase()===y:1===h.nodeType)return!1;p=v="only"===t&&!p&&"nextSibling"}return!0}if(p=[u?g.firstChild:g.lastChild],u&&m){for(b=(d=(c=(l=(f=(h=g)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===w&&c[1])&&c[2],h=d&&g.childNodes[d];h=++d&&h&&h[v]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===n){l[t]=[w,d,b];break}}else if(m&&(b=d=(c=(l=(f=(h=n)[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]||[])[0]===w&&c[1]),!1===b)for(;(h=++d&&h&&h[v]||(b=d=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==y:1!==h.nodeType)||!++b||(m&&((l=(f=h[x]||(h[x]={}))[h.uniqueID]||(f[h.uniqueID]={}))[t]=[w,b]),h!==n)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,n){var e,i=r.pseudos[t]||r.setFilters[t.toLowerCase()]||ot.error("unsupported pseudo: "+t);return i[x]?i(n):i.length>1?(e=[t,t,"",n],r.setFilters.hasOwnProperty(t.toLowerCase())?at((function(t,e){for(var r,o=i(t,n),u=o.length;u--;)t[r=j(t,o[u])]=!(e[r]=o[u])})):function(t){return i(t,0,e)}):i}},pseudos:{not:at((function(t){var n=[],e=[],r=a(t.replace($,"$1"));return r[x]?at((function(t,n,e,i){for(var o,u=r(t,null,i,[]),a=t.length;a--;)(o=u[a])&&(t[a]=!(n[a]=o))})):function(t,i,o){return n[0]=t,r(n,null,o,e),n[0]=null,!e.pop()}})),has:at((function(t){return function(n){return ot(t,n).length>0}})),contains:at((function(t){return t=t.replace(Z,tt),function(n){return(n.textContent||n.innerText||i(n)).indexOf(t)>-1}})),lang:at((function(t){return Y.test(t||"")||ot.error("unsupported lang: "+t),t=t.replace(Z,tt).toLowerCase(),function(n){var e;do{if(e=v?n.lang:n.getAttribute("xml:lang")||n.getAttribute("lang"))return(e=e.toLowerCase())===t||0===e.indexOf(t+"-")}while((n=n.parentNode)&&1===n.nodeType);return!1}})),target:function(n){var e=t.location&&t.location.hash;return e&&e.slice(1)===n.id},root:function(t){return t===p},focus:function(t){return t===d.activeElement&&(!d.hasFocus||d.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:dt(!1),disabled:dt(!0),checked:function(t){var n=t.nodeName.toLowerCase();return"input"===n&&!!t.checked||"option"===n&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!r.pseudos.empty(t)},header:function(t){return K.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){var n=t.nodeName.toLowerCase();return"input"===n&&"button"===t.type||"button"===n},text:function(t){var n;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(n=t.getAttribute("type"))||"text"===n.toLowerCase())},first:pt((function(){return[0]})),last:pt((function(t,n){return[n-1]})),eq:pt((function(t,n,e){return[e<0?e+n:e]})),even:pt((function(t,n){for(var e=0;e=0;)t.push(r);return t})),gt:pt((function(t,n,e){for(var r=e<0?e+n:e;++r1?function(n,e,r){for(var i=t.length;i--;)if(!t[i](n,e,r))return!1;return!0}:t[0]}function xt(t,n,e,r,i){for(var o,u=[],a=0,s=t.length,c=null!=n;a-1&&(o[c]=!(u[c]=f))}}else y=xt(y===u?y.splice(p,y.length):y),i?i(null,u,y,s):O.apply(u,y)}))}function wt(t){for(var n,e,i,o=t.length,u=r.relative[t[0].type],a=u||r.relative[" "],s=u?1:0,l=mt((function(t){return t===n}),a,!0),f=mt((function(t){return j(n,t)>-1}),a,!0),h=[function(t,e,r){var i=!u&&(r||e!==c)||((n=e).nodeType?l(t,e,r):f(t,e,r));return n=null,i}];s1&&bt(h),s>1&&yt(t.slice(0,s-1).concat({value:" "===t[s-2].type?"*":""})).replace($,"$1"),e,s0,i=t.length>0,o=function(o,u,a,s,l){var f,p,g,y=0,m="0",b=o&&[],x=[],_=c,T=o||i&&r.find.TAG("*",l),C=w+=null==_?1:Math.random()||.1,M=T.length;for(l&&(c=u===d||u||l);m!==M&&null!=(f=T[m]);m++){if(i&&f){for(p=0,u||f.ownerDocument===d||(h(f),a=!v);g=t[p++];)if(g(f,u||d,a)){s.push(f);break}l&&(w=C)}e&&((f=!g&&f)&&y--,o&&b.push(f))}if(y+=m,e&&m!==y){for(p=0;g=n[p++];)g(b,x,u,a);if(o){if(y>0)for(;m--;)b[m]||x[m]||(x[m]=E.call(s));x=xt(x)}O.apply(s,x),l&&!o&&x.length>0&&y+n.length>1&&ot.uniqueSort(s)}return l&&(w=C,c=_),b};return e?at(o):o}(o,i))).selector=t}return a},s=ot.select=function(t,n,e,i){var o,s,c,l,f,h="function"==typeof t&&t,d=!i&&u(t=h.selector||t);if(e=e||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(c=s[0]).type&&9===n.nodeType&&v&&r.relative[s[1].type]){if(!(n=(r.find.ID(c.matches[0].replace(Z,tt),n)||[])[0]))return e;h&&(n=n.parentNode),t=t.slice(s.shift().value.length)}for(o=V.needsContext.test(t)?0:s.length;o--&&(c=s[o],!r.relative[l=c.type]);)if((f=r.find[l])&&(i=f(c.matches[0].replace(Z,tt),J.test(s[0].type)&&vt(n.parentNode)||n))){if(s.splice(o,1),!(t=i.length&&yt(s)))return O.apply(e,i),e;break}}return(h||a(t,d))(i,n,!v,e,!n||J.test(t)&&vt(n.parentNode)||n),e},e.sortStable=x.split("").sort(k).join("")===x,e.detectDuplicates=!!f,h(),e.sortDetached=st((function(t){return 1&t.compareDocumentPosition(d.createElement("fieldset"))})),st((function(t){return t.innerHTML="","#"===t.firstChild.getAttribute("href")}))||ct("type|href|height|width",(function(t,n,e){if(!e)return t.getAttribute(n,"type"===n.toLowerCase()?1:2)})),e.attributes&&st((function(t){return t.innerHTML="",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}))||ct("value",(function(t,n,e){if(!e&&"input"===t.nodeName.toLowerCase())return t.defaultValue})),st((function(t){return null==t.getAttribute("disabled")}))||ct(R,(function(t,n,e){var r;if(!e)return!0===t[n]?n.toLowerCase():(r=t.getAttributeNode(n))&&r.specified?r.value:null})),ot}(e);T.find=S,T.expr=S.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=S.uniqueSort,T.text=S.getText,T.isXMLDoc=S.isXML,T.contains=S.contains,T.escapeSelector=S.escape;var k=function(t,n,e){for(var r=[],i=void 0!==e;(t=t[n])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&T(t).is(e))break;r.push(t)}return r},A=function(t,n){for(var e=[];t;t=t.nextSibling)1===t.nodeType&&t!==n&&e.push(t);return e},N=T.expr.match.needsContext;function E(t,n){return t.nodeName&&t.nodeName.toLowerCase()===n.toLowerCase()}var D=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function O(t,n,e){return m(n)?T.grep(t,(function(t,r){return!!n.call(t,r,t)!==e})):n.nodeType?T.grep(t,(function(t){return t===n!==e})):"string"!=typeof n?T.grep(t,(function(t){return f.call(n,t)>-1!==e})):T.filter(n,t,e)}T.filter=function(t,n,e){var r=n[0];return e&&(t=":not("+t+")"),1===n.length&&1===r.nodeType?T.find.matchesSelector(r,t)?[r]:[]:T.find.matches(t,T.grep(n,(function(t){return 1===t.nodeType})))},T.fn.extend({find:function(t){var n,e,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(T(t).filter((function(){for(n=0;n1?T.uniqueSort(e):e},filter:function(t){return this.pushStack(O(this,t||[],!1))},not:function(t){return this.pushStack(O(this,t||[],!0))},is:function(t){return!!O(this,"string"==typeof t&&N.test(t)?T(t):t||[],!1).length}});var L,j=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(t,n,e){var r,i;if(!t)return this;if(e=e||L,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:j.exec(t))||!r[1]&&n)return!n||n.jquery?(n||e).find(t):this.constructor(n).find(t);if(r[1]){if(n=n instanceof T?n[0]:n,T.merge(this,T.parseHTML(r[1],n&&n.nodeType?n.ownerDocument||n:u,!0)),D.test(r[1])&&T.isPlainObject(n))for(r in n)m(this[r])?this[r](n[r]):this.attr(r,n[r]);return this}return(i=u.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):m(t)?void 0!==e.ready?e.ready(t):t(T):T.makeArray(t,this)}).prototype=T.fn,L=T(u);var R=/^(?:parents|prev(?:Until|All))/,q={children:!0,contents:!0,next:!0,prev:!0};function P(t,n){for(;(t=t[n])&&1!==t.nodeType;);return t}T.fn.extend({has:function(t){var n=T(t,this),e=n.length;return this.filter((function(){for(var t=0;t-1:1===e.nodeType&&T.find.matchesSelector(e,t))){o.push(e);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?f.call(T(t),this[0]):f.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,n){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(t,n))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),T.each({parent:function(t){var n=t.parentNode;return n&&11!==n.nodeType?n:null},parents:function(t){return k(t,"parentNode")},parentsUntil:function(t,n,e){return k(t,"parentNode",e)},next:function(t){return P(t,"nextSibling")},prev:function(t){return P(t,"previousSibling")},nextAll:function(t){return k(t,"nextSibling")},prevAll:function(t){return k(t,"previousSibling")},nextUntil:function(t,n,e){return k(t,"nextSibling",e)},prevUntil:function(t,n,e){return k(t,"previousSibling",e)},siblings:function(t){return A((t.parentNode||{}).firstChild,t)},children:function(t){return A(t.firstChild)},contents:function(t){return E(t,"iframe")?t.contentDocument:(E(t,"template")&&(t=t.content||t),T.merge([],t.childNodes))}},(function(t,n){T.fn[t]=function(e,r){var i=T.map(this,n,e);return"Until"!==t.slice(-5)&&(r=e),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(q[t]||T.uniqueSort(i),R.test(t)&&i.reverse()),this.pushStack(i)}}));var F=/[^\x20\t\r\n\f]+/g;function z(t){return t}function H(t){throw t}function $(t,n,e,r){var i;try{t&&m(i=t.promise)?i.call(t).done(n).fail(e):t&&m(i=t.then)?i.call(t,n,e):n.apply(void 0,[t].slice(r))}catch(t){e.apply(void 0,[t])}}T.Callbacks=function(t){t="string"==typeof t?function(t){var n={};return T.each(t.match(F)||[],(function(t,e){n[e]=!0})),n}(t):T.extend({},t);var n,e,r,i,o=[],u=[],a=-1,s=function(){for(i=i||t.once,r=n=!0;u.length;a=-1)for(e=u.shift();++a-1;)o.splice(e,1),e<=a&&a--})),this},has:function(t){return t?T.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=u=[],o=e="",this},disabled:function(){return!o},lock:function(){return i=u=[],e||n||(o=e=""),this},locked:function(){return!!i},fireWith:function(t,e){return i||(e=[t,(e=e||[]).slice?e.slice():e],u.push(e),n||s()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},T.extend({Deferred:function(t){var n=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return T.Deferred((function(e){T.each(n,(function(n,r){var i=m(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&m(t.promise)?t.promise().progress(e.notify).done(e.resolve).fail(e.reject):e[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,r,i){var o=0;function u(t,n,r,i){return function(){var a=this,s=arguments,c=function(){var e,c;if(!(t=o&&(r!==H&&(a=void 0,s=[e]),n.rejectWith(a,s))}};t?l():(T.Deferred.getStackHook&&(l.stackTrace=T.Deferred.getStackHook()),e.setTimeout(l))}}return T.Deferred((function(e){n[0][3].add(u(0,e,m(i)?i:z,e.notifyWith)),n[1][3].add(u(0,e,m(t)?t:z)),n[2][3].add(u(0,e,m(r)?r:H))})).promise()},promise:function(t){return null!=t?T.extend(t,i):i}},o={};return T.each(n,(function(t,e){var u=e[2],a=e[5];i[e[1]]=u.add,a&&u.add((function(){r=a}),n[3-t][2].disable,n[3-t][3].disable,n[0][2].lock,n[0][3].lock),u.add(e[3].fire),o[e[0]]=function(){return o[e[0]+"With"](this===o?void 0:this,arguments),this},o[e[0]+"With"]=u.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var n=arguments.length,e=n,r=Array(e),i=s.call(arguments),o=T.Deferred(),u=function(t){return function(e){r[t]=this,i[t]=arguments.length>1?s.call(arguments):e,--n||o.resolveWith(r,i)}};if(n<=1&&($(t,o.done(u(e)).resolve,o.reject,!n),"pending"===o.state()||m(i[e]&&i[e].then)))return o.then();for(;e--;)$(i[e],u(e),o.reject);return o.promise()}});var I=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(t,n){e.console&&e.console.warn&&t&&I.test(t.name)&&e.console.warn("jQuery.Deferred exception: "+t.message,t.stack,n)},T.readyException=function(t){e.setTimeout((function(){throw t}))};var U=T.Deferred();function B(){u.removeEventListener("DOMContentLoaded",B),e.removeEventListener("load",B),T.ready()}T.fn.ready=function(t){return U.then(t).catch((function(t){T.readyException(t)})),this},T.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==t&&--T.readyWait>0||U.resolveWith(u,[T]))}}),T.ready.then=U.then,"complete"===u.readyState||"loading"!==u.readyState&&!u.documentElement.doScroll?e.setTimeout(T.ready):(u.addEventListener("DOMContentLoaded",B),e.addEventListener("load",B));var W=function(t,n,e,r,i,o,u){var a=0,s=t.length,c=null==e;if("object"===w(e))for(a in i=!0,e)W(t,n,a,e[a],!0,o,u);else if(void 0!==r&&(i=!0,m(r)||(u=!0),c&&(u?(n.call(t,r),n=null):(c=n,n=function(t,n,e){return c.call(T(t),e)})),n))for(;a1,null,!0)},removeData:function(t){return this.each((function(){Z.remove(this,t)}))}}),T.extend({queue:function(t,n,e){var r;if(t)return n=(n||"fx")+"queue",r=J.get(t,n),e&&(!r||Array.isArray(e)?r=J.access(t,n,T.makeArray(e)):r.push(e)),r||[]},dequeue:function(t,n){n=n||"fx";var e=T.queue(t,n),r=e.length,i=e.shift(),o=T._queueHooks(t,n);"inprogress"===i&&(i=e.shift(),r--),i&&("fx"===n&&e.unshift("inprogress"),delete o.stop,i.call(t,(function(){T.dequeue(t,n)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,n){var e=n+"queueHooks";return J.get(t,e)||J.access(t,e,{empty:T.Callbacks("once memory").add((function(){J.remove(t,[n+"queue",e])}))})}}),T.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length\x20\t\r\n\f]+)/i,pt=/^$|^module$|\/(?:java|ecma)script/i,vt={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function gt(t,n){var e;return e=void 0!==t.getElementsByTagName?t.getElementsByTagName(n||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(n||"*"):[],void 0===n||n&&E(t,n)?T.merge([t],e):e}function yt(t,n){for(var e=0,r=t.length;e-1)i&&i.push(o);else if(c=T.contains(o.ownerDocument,o),u=gt(f.appendChild(o),"script"),c&&yt(u),e)for(l=0;o=u[l++];)pt.test(o.type||"")&&e.push(o);return f}mt=u.createDocumentFragment().appendChild(u.createElement("div")),(bt=u.createElement("input")).setAttribute("type","radio"),bt.setAttribute("checked","checked"),bt.setAttribute("name","t"),mt.appendChild(bt),y.checkClone=mt.cloneNode(!0).cloneNode(!0).lastChild.checked,mt.innerHTML="",y.noCloneChecked=!!mt.cloneNode(!0).lastChild.defaultValue;var wt=u.documentElement,Tt=/^key/,Ct=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Mt=/^([^.]*)(?:\.(.+)|)/;function St(){return!0}function kt(){return!1}function At(){try{return u.activeElement}catch(t){}}function Nt(t,n,e,r,i,o){var u,a;if("object"==typeof n){for(a in"string"!=typeof e&&(r=r||e,e=void 0),n)Nt(t,a,e,r,n[a],o);return t}if(null==r&&null==i?(i=e,r=e=void 0):null==i&&("string"==typeof e?(i=r,r=void 0):(i=r,r=e,e=void 0)),!1===i)i=kt;else if(!i)return t;return 1===o&&(u=i,(i=function(t){return T().off(t),u.apply(this,arguments)}).guid=u.guid||(u.guid=T.guid++)),t.each((function(){T.event.add(this,n,i,r,e)}))}T.event={global:{},add:function(t,n,e,r,i){var o,u,a,s,c,l,f,h,d,p,v,g=J.get(t);if(g)for(e.handler&&(e=(o=e).handler,i=o.selector),i&&T.find.matchesSelector(wt,i),e.guid||(e.guid=T.guid++),(s=g.events)||(s=g.events={}),(u=g.handle)||(u=g.handle=function(n){return void 0!==T&&T.event.triggered!==n.type?T.event.dispatch.apply(t,arguments):void 0}),c=(n=(n||"").match(F)||[""]).length;c--;)d=v=(a=Mt.exec(n[c])||[])[1],p=(a[2]||"").split(".").sort(),d&&(f=T.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=T.event.special[d]||{},l=T.extend({type:d,origType:v,data:r,handler:e,guid:e.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:p.join(".")},o),(h=s[d])||((h=s[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,p,u)||t.addEventListener&&t.addEventListener(d,u)),f.add&&(f.add.call(t,l),l.handler.guid||(l.handler.guid=e.guid)),i?h.splice(h.delegateCount++,0,l):h.push(l),T.event.global[d]=!0)},remove:function(t,n,e,r,i){var o,u,a,s,c,l,f,h,d,p,v,g=J.hasData(t)&&J.get(t);if(g&&(s=g.events)){for(c=(n=(n||"").match(F)||[""]).length;c--;)if(d=v=(a=Mt.exec(n[c])||[])[1],p=(a[2]||"").split(".").sort(),d){for(f=T.event.special[d]||{},h=s[d=(r?f.delegateType:f.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=h.length;o--;)l=h[o],!i&&v!==l.origType||e&&e.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(t,l));u&&!h.length&&(f.teardown&&!1!==f.teardown.call(t,p,g.handle)||T.removeEvent(t,d,g.handle),delete s[d])}else for(d in s)T.event.remove(t,d+n[c],e,r,!0);T.isEmptyObject(s)&&J.remove(t,"handle events")}},dispatch:function(t){var n,e,r,i,o,u,a=T.event.fix(t),s=new Array(arguments.length),c=(J.get(this,"events")||{})[a.type]||[],l=T.event.special[a.type]||{};for(s[0]=a,n=1;n=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(o=[],u={},e=0;e-1:T.find(i,this,null,[c]).length),u[i]&&o.push(r);o.length&&a.push({elem:c,handlers:o})}return c=this,s\x20\t\r\n\f]*)[^>]*)\/>/gi,Dt=/\s*$/g;function jt(t,n){return E(t,"table")&&E(11!==n.nodeType?n:n.firstChild,"tr")&&T(t).children("tbody")[0]||t}function Rt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function qt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Pt(t,n){var e,r,i,o,u,a,s,c;if(1===n.nodeType){if(J.hasData(t)&&(o=J.access(t),u=J.set(n,o),c=o.events))for(i in delete u.handle,u.events={},c)for(e=0,r=c[i].length;e1&&"string"==typeof p&&!y.checkClone&&Ot.test(p))return t.each((function(i){var o=t.eq(i);v&&(n[0]=p.call(this,i,o.html())),Ft(o,n,e,r)}));if(h&&(o=(i=_t(n,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(u=T.map(gt(i,"script"),Rt)).length;f")},clone:function(t,n,e){var r,i,o,u,a,s,c,l=t.cloneNode(!0),f=T.contains(t.ownerDocument,t);if(!(y.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||T.isXMLDoc(t)))for(u=gt(l),r=0,i=(o=gt(t)).length;r0&&yt(u,!f&>(t,"script")),l},cleanData:function(t){for(var n,e,r,i=T.event.special,o=0;void 0!==(e=t[o]);o++)if(G(e)){if(n=e[J.expando]){if(n.events)for(r in n.events)i[r]?T.event.remove(e,r):T.removeEvent(e,r,n.handle);e[J.expando]=void 0}e[Z.expando]&&(e[Z.expando]=void 0)}}}),T.fn.extend({detach:function(t){return zt(this,t,!0)},remove:function(t){return zt(this,t)},text:function(t){return W(this,(function(t){return void 0===t?T.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ft(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||jt(this,t).appendChild(t)}))},prepend:function(){return Ft(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var n=jt(this,t);n.insertBefore(t,n.firstChild)}}))},before:function(){return Ft(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ft(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,n=0;null!=(t=this[n]);n++)1===t.nodeType&&(T.cleanData(gt(t,!1)),t.textContent="");return this},clone:function(t,n){return t=null!=t&&t,n=null==n?t:n,this.map((function(){return T.clone(this,t,n)}))},html:function(t){return W(this,(function(t){var n=this[0]||{},e=0,r=this.length;if(void 0===t&&1===n.nodeType)return n.innerHTML;if("string"==typeof t&&!Dt.test(t)&&!vt[(dt.exec(t)||["",""])[1].toLowerCase()]){t=T.htmlPrefilter(t);try{for(;e=0&&(s+=Math.max(0,Math.ceil(t["offset"+n[0].toUpperCase()+n.slice(1)]-o-s-a-.5))),s}function tn(t,n,e){var r=$t(t),i=Ut(t,n,r),o="border-box"===T.css(t,"boxSizing",!1,r),u=o;if(Ht.test(i)){if(!e)return i;i="auto"}return u=u&&(y.boxSizingReliable()||i===t.style[n]),("auto"===i||!parseFloat(i)&&"inline"===T.css(t,"display",!1,r))&&(i=t["offset"+n[0].toUpperCase()+n.slice(1)],u=!0),(i=parseFloat(i)||0)+Zt(t,n,e||(o?"border":"content"),u,r,i)+"px"}function nn(t,n,e,r,i){return new nn.prototype.init(t,n,e,r,i)}T.extend({cssHooks:{opacity:{get:function(t,n){if(n){var e=Ut(t,"opacity");return""===e?"1":e}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{},style:function(t,n,e,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,u,a=K(n),s=Yt.test(n),c=t.style;if(s||(n=Qt(a)),u=T.cssHooks[n]||T.cssHooks[a],void 0===e)return u&&"get"in u&&void 0!==(i=u.get(t,!1,r))?i:c[n];"string"==(o=typeof e)&&(i=it.exec(e))&&i[1]&&(e=st(t,n,i),o="number"),null!=e&&e==e&&("number"===o&&(e+=i&&i[3]||(T.cssNumber[a]?"":"px")),y.clearCloneStyle||""!==e||0!==n.indexOf("background")||(c[n]="inherit"),u&&"set"in u&&void 0===(e=u.set(t,e,r))||(s?c.setProperty(n,e):c[n]=e))}},css:function(t,n,e,r){var i,o,u,a=K(n);return Yt.test(n)||(n=Qt(a)),(u=T.cssHooks[n]||T.cssHooks[a])&&"get"in u&&(i=u.get(t,!0,e)),void 0===i&&(i=Ut(t,n,r)),"normal"===i&&n in Xt&&(i=Xt[n]),""===e||e?(o=parseFloat(i),!0===e||isFinite(o)?o||0:i):i}}),T.each(["height","width"],(function(t,n){T.cssHooks[n]={get:function(t,e,r){if(e)return!Wt.test(T.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?tn(t,n,r):at(t,Vt,(function(){return tn(t,n,r)}))},set:function(t,e,r){var i,o=$t(t),u="border-box"===T.css(t,"boxSizing",!1,o),a=r&&Zt(t,n,r,u,o);return u&&y.scrollboxSize()===o.position&&(a-=Math.ceil(t["offset"+n[0].toUpperCase()+n.slice(1)]-parseFloat(o[n])-Zt(t,n,"border",!1,o)-.5)),a&&(i=it.exec(e))&&"px"!==(i[3]||"px")&&(t.style[n]=e,e=T.css(t,n)),Jt(0,e,a)}}})),T.cssHooks.marginLeft=Bt(y.reliableMarginLeft,(function(t,n){if(n)return(parseFloat(Ut(t,"marginLeft"))||t.getBoundingClientRect().left-at(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),T.each({margin:"",padding:"",border:"Width"},(function(t,n){T.cssHooks[t+n]={expand:function(e){for(var r=0,i={},o="string"==typeof e?e.split(" "):[e];r<4;r++)i[t+ot[r]+n]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(T.cssHooks[t+n].set=Jt)})),T.fn.extend({css:function(t,n){return W(this,(function(t,n,e){var r,i,o={},u=0;if(Array.isArray(n)){for(r=$t(t),i=n.length;u1)}}),T.Tween=nn,nn.prototype={constructor:nn,init:function(t,n,e,r,i,o){this.elem=t,this.prop=e,this.easing=i||T.easing._default,this.options=n,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[e]?"":"px")},cur:function(){var t=nn.propHooks[this.prop];return t&&t.get?t.get(this):nn.propHooks._default.get(this)},run:function(t){var n,e=nn.propHooks[this.prop];return this.options.duration?this.pos=n=T.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=n=t,this.now=(this.end-this.start)*n+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),e&&e.set?e.set(this):nn.propHooks._default.set(this),this}},nn.prototype.init.prototype=nn.prototype,nn.propHooks={_default:{get:function(t){var n;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(n=T.css(t.elem,t.prop,""))&&"auto"!==n?n:0},set:function(t){T.fx.step[t.prop]?T.fx.step[t.prop](t):1!==t.elem.nodeType||null==t.elem.style[T.cssProps[t.prop]]&&!T.cssHooks[t.prop]?t.elem[t.prop]=t.now:T.style(t.elem,t.prop,t.now+t.unit)}}},nn.propHooks.scrollTop=nn.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},T.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},T.fx=nn.prototype.init,T.fx.step={};var en,rn,on=/^(?:toggle|show|hide)$/,un=/queueHooks$/;function an(){rn&&(!1===u.hidden&&e.requestAnimationFrame?e.requestAnimationFrame(an):e.setTimeout(an,T.fx.interval),T.fx.tick())}function sn(){return e.setTimeout((function(){en=void 0})),en=Date.now()}function cn(t,n){var e,r=0,i={height:t};for(n=n?1:0;r<4;r+=2-n)i["margin"+(e=ot[r])]=i["padding"+e]=t;return n&&(i.opacity=i.width=t),i}function ln(t,n,e){for(var r,i=(fn.tweeners[n]||[]).concat(fn.tweeners["*"]),o=0,u=i.length;o1)},removeAttr:function(t){return this.each((function(){T.removeAttr(this,t)}))}}),T.extend({attr:function(t,n,e){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?T.prop(t,n,e):(1===o&&T.isXMLDoc(t)||(i=T.attrHooks[n.toLowerCase()]||(T.expr.match.bool.test(n)?hn:void 0)),void 0!==e?null===e?void T.removeAttr(t,n):i&&"set"in i&&void 0!==(r=i.set(t,e,n))?r:(t.setAttribute(n,e+""),e):i&&"get"in i&&null!==(r=i.get(t,n))?r:null==(r=T.find.attr(t,n))?void 0:r)},attrHooks:{type:{set:function(t,n){if(!y.radioValue&&"radio"===n&&E(t,"input")){var e=t.value;return t.setAttribute("type",n),e&&(t.value=e),n}}}},removeAttr:function(t,n){var e,r=0,i=n&&n.match(F);if(i&&1===t.nodeType)for(;e=i[r++];)t.removeAttribute(e)}}),hn={set:function(t,n,e){return!1===n?T.removeAttr(t,e):t.setAttribute(e,e),e}},T.each(T.expr.match.bool.source.match(/\w+/g),(function(t,n){var e=dn[n]||T.find.attr;dn[n]=function(t,n,r){var i,o,u=n.toLowerCase();return r||(o=dn[u],dn[u]=i,i=null!=e(t,n,r)?u:null,dn[u]=o),i}}));var pn=/^(?:input|select|textarea|button)$/i,vn=/^(?:a|area)$/i;function gn(t){return(t.match(F)||[]).join(" ")}function yn(t){return t.getAttribute&&t.getAttribute("class")||""}function mn(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(F)||[]}T.fn.extend({prop:function(t,n){return W(this,T.prop,t,n,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[T.propFix[t]||t]}))}}),T.extend({prop:function(t,n,e){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(t)||(n=T.propFix[n]||n,i=T.propHooks[n]),void 0!==e?i&&"set"in i&&void 0!==(r=i.set(t,e,n))?r:t[n]=e:i&&"get"in i&&null!==(r=i.get(t,n))?r:t[n]},propHooks:{tabIndex:{get:function(t){var n=T.find.attr(t,"tabindex");return n?parseInt(n,10):pn.test(t.nodeName)||vn.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),y.optSelected||(T.propHooks.selected={get:function(t){var n=t.parentNode;return n&&n.parentNode&&n.parentNode.selectedIndex,null},set:function(t){var n=t.parentNode;n&&(n.selectedIndex,n.parentNode&&n.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){T.propFix[this.toLowerCase()]=this})),T.fn.extend({addClass:function(t){var n,e,r,i,o,u,a,s=0;if(m(t))return this.each((function(n){T(this).addClass(t.call(this,n,yn(this)))}));if((n=mn(t)).length)for(;e=this[s++];)if(i=yn(e),r=1===e.nodeType&&" "+gn(i)+" "){for(u=0;o=n[u++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=gn(r))&&e.setAttribute("class",a)}return this},removeClass:function(t){var n,e,r,i,o,u,a,s=0;if(m(t))return this.each((function(n){T(this).removeClass(t.call(this,n,yn(this)))}));if(!arguments.length)return this.attr("class","");if((n=mn(t)).length)for(;e=this[s++];)if(i=yn(e),r=1===e.nodeType&&" "+gn(i)+" "){for(u=0;o=n[u++];)for(;r.indexOf(" "+o+" ")>-1;)r=r.replace(" "+o+" "," ");i!==(a=gn(r))&&e.setAttribute("class",a)}return this},toggleClass:function(t,n){var e=typeof t,r="string"===e||Array.isArray(t);return"boolean"==typeof n&&r?n?this.addClass(t):this.removeClass(t):m(t)?this.each((function(e){T(this).toggleClass(t.call(this,e,yn(this),n),n)})):this.each((function(){var n,i,o,u;if(r)for(i=0,o=T(this),u=mn(t);n=u[i++];)o.hasClass(n)?o.removeClass(n):o.addClass(n);else void 0!==t&&"boolean"!==e||((n=yn(this))&&J.set(this,"__className__",n),this.setAttribute&&this.setAttribute("class",n||!1===t?"":J.get(this,"__className__")||""))}))},hasClass:function(t){var n,e,r=0;for(n=" "+t+" ";e=this[r++];)if(1===e.nodeType&&(" "+gn(yn(e))+" ").indexOf(n)>-1)return!0;return!1}});var bn=/\r/g;T.fn.extend({val:function(t){var n,e,r,i=this[0];return arguments.length?(r=m(t),this.each((function(e){var i;1===this.nodeType&&(null==(i=r?t.call(this,e,T(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,(function(t){return null==t?"":t+""}))),(n=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in n&&void 0!==n.set(this,i,"value")||(this.value=i))}))):i?(n=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in n&&void 0!==(e=n.get(i,"value"))?e:"string"==typeof(e=i.value)?e.replace(bn,""):null==e?"":e:void 0}}),T.extend({valHooks:{option:{get:function(t){var n=T.find.attr(t,"value");return null!=n?n:gn(T.text(t))}},select:{get:function(t){var n,e,r,i=t.options,o=t.selectedIndex,u="select-one"===t.type,a=u?null:[],s=u?o+1:i.length;for(r=o<0?s:u?o:0;r-1)&&(e=!0);return e||(t.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],(function(){T.valHooks[this]={set:function(t,n){if(Array.isArray(n))return t.checked=T.inArray(T(t).val(),n)>-1}},y.checkOn||(T.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})})),y.focusin="onfocusin"in e;var xn=/^(?:focusinfocus|focusoutblur)$/,_n=function(t){t.stopPropagation()};T.extend(T.event,{trigger:function(t,n,r,i){var o,a,s,c,l,f,h,d,v=[r||u],g=p.call(t,"type")?t.type:t,y=p.call(t,"namespace")?t.namespace.split("."):[];if(a=d=s=r=r||u,3!==r.nodeType&&8!==r.nodeType&&!xn.test(g+T.event.triggered)&&(g.indexOf(".")>-1&&(g=(y=g.split(".")).shift(),y.sort()),l=g.indexOf(":")<0&&"on"+g,(t=t[T.expando]?t:new T.Event(g,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=y.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+y.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),n=null==n?[t]:T.makeArray(n,[t]),h=T.event.special[g]||{},i||!h.trigger||!1!==h.trigger.apply(r,n))){if(!i&&!h.noBubble&&!b(r)){for(c=h.delegateType||g,xn.test(c+g)||(a=a.parentNode);a;a=a.parentNode)v.push(a),s=a;s===(r.ownerDocument||u)&&v.push(s.defaultView||s.parentWindow||e)}for(o=0;(a=v[o++])&&!t.isPropagationStopped();)d=a,t.type=o>1?c:h.bindType||g,(f=(J.get(a,"events")||{})[t.type]&&J.get(a,"handle"))&&f.apply(a,n),(f=l&&a[l])&&f.apply&&G(a)&&(t.result=f.apply(a,n),!1===t.result&&t.preventDefault());return t.type=g,i||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(v.pop(),n)||!G(r)||l&&m(r[g])&&!b(r)&&((s=r[l])&&(r[l]=null),T.event.triggered=g,t.isPropagationStopped()&&d.addEventListener(g,_n),r[g](),t.isPropagationStopped()&&d.removeEventListener(g,_n),T.event.triggered=void 0,s&&(r[l]=s)),t.result}},simulate:function(t,n,e){var r=T.extend(new T.Event,e,{type:t,isSimulated:!0});T.event.trigger(r,null,n)}}),T.fn.extend({trigger:function(t,n){return this.each((function(){T.event.trigger(t,n,this)}))},triggerHandler:function(t,n){var e=this[0];if(e)return T.event.trigger(t,n,e,!0)}}),y.focusin||T.each({focus:"focusin",blur:"focusout"},(function(t,n){var e=function(t){T.event.simulate(n,t.target,T.event.fix(t))};T.event.special[n]={setup:function(){var r=this.ownerDocument||this,i=J.access(r,n);i||r.addEventListener(t,e,!0),J.access(r,n,(i||0)+1)},teardown:function(){var r=this.ownerDocument||this,i=J.access(r,n)-1;i?J.access(r,n,i):(r.removeEventListener(t,e,!0),J.remove(r,n))}}}));var wn=e.location,Tn=Date.now(),Cn=/\?/;T.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(t){n=void 0}return n&&!n.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+t),n};var Mn=/\[\]$/,Sn=/\r?\n/g,kn=/^(?:submit|button|image|reset|file)$/i,An=/^(?:input|select|textarea|keygen)/i;function Nn(t,n,e,r){var i;if(Array.isArray(n))T.each(n,(function(n,i){e||Mn.test(t)?r(t,i):Nn(t+"["+("object"==typeof i&&null!=i?n:"")+"]",i,e,r)}));else if(e||"object"!==w(n))r(t,n);else for(i in n)Nn(t+"["+i+"]",n[i],e,r)}T.param=function(t,n){var e,r=[],i=function(t,n){var e=m(n)?n():n;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==e?"":e)};if(Array.isArray(t)||t.jquery&&!T.isPlainObject(t))T.each(t,(function(){i(this.name,this.value)}));else for(e in t)Nn(e,t[e],n,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=T.prop(this,"elements");return t?T.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!T(this).is(":disabled")&&An.test(this.nodeName)&&!kn.test(t)&&(this.checked||!ht.test(t))})).map((function(t,n){var e=T(this).val();return null==e?null:Array.isArray(e)?T.map(e,(function(t){return{name:n.name,value:t.replace(Sn,"\r\n")}})):{name:n.name,value:e.replace(Sn,"\r\n")}})).get()}});var En=/%20/g,Dn=/#.*$/,On=/([?&])_=[^&]*/,Ln=/^(.*?):[ \t]*([^\r\n]*)$/gm,jn=/^(?:GET|HEAD)$/,Rn=/^\/\//,qn={},Pn={},Fn="*/".concat("*"),zn=u.createElement("a");function Hn(t){return function(n,e){"string"!=typeof n&&(e=n,n="*");var r,i=0,o=n.toLowerCase().match(F)||[];if(m(e))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(e)):(t[r]=t[r]||[]).push(e)}}function $n(t,n,e,r){var i={},o=t===Pn;function u(a){var s;return i[a]=!0,T.each(t[a]||[],(function(t,a){var c=a(n,e,r);return"string"!=typeof c||o||i[c]?o?!(s=c):void 0:(n.dataTypes.unshift(c),u(c),!1)})),s}return u(n.dataTypes[0])||!i["*"]&&u("*")}function In(t,n){var e,r,i=T.ajaxSettings.flatOptions||{};for(e in n)void 0!==n[e]&&((i[e]?t:r||(r={}))[e]=n[e]);return r&&T.extend(!0,t,r),t}zn.href=wn.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:wn.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(wn.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Fn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,n){return n?In(In(t,T.ajaxSettings),n):In(T.ajaxSettings,t)},ajaxPrefilter:Hn(qn),ajaxTransport:Hn(Pn),ajax:function(t,n){"object"==typeof t&&(n=t,t=void 0),n=n||{};var r,i,o,a,s,c,l,f,h,d,p=T.ajaxSetup({},n),v=p.context||p,g=p.context&&(v.nodeType||v.jquery)?T(v):T.event,y=T.Deferred(),m=T.Callbacks("once memory"),b=p.statusCode||{},x={},_={},w="canceled",C={readyState:0,getResponseHeader:function(t){var n;if(l){if(!a)for(a={};n=Ln.exec(o);)a[n[1].toLowerCase()]=n[2];n=a[t.toLowerCase()]}return null==n?null:n},getAllResponseHeaders:function(){return l?o:null},setRequestHeader:function(t,n){return null==l&&(t=_[t.toLowerCase()]=_[t.toLowerCase()]||t,x[t]=n),this},overrideMimeType:function(t){return null==l&&(p.mimeType=t),this},statusCode:function(t){var n;if(t)if(l)C.always(t[C.status]);else for(n in t)b[n]=[b[n],t[n]];return this},abort:function(t){var n=t||w;return r&&r.abort(n),M(0,n),this}};if(y.promise(C),p.url=((t||p.url||wn.href)+"").replace(Rn,wn.protocol+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(F)||[""],null==p.crossDomain){c=u.createElement("a");try{c.href=p.url,c.href=c.href,p.crossDomain=zn.protocol+"//"+zn.host!=c.protocol+"//"+c.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=T.param(p.data,p.traditional)),$n(qn,p,n,C),l)return C;for(h in(f=T.event&&p.global)&&0==T.active++&&T.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!jn.test(p.type),i=p.url.replace(Dn,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(En,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Cn.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(On,"$1"),d=(Cn.test(i)?"&":"?")+"_="+Tn+++d),p.url=i+d),p.ifModified&&(T.lastModified[i]&&C.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&C.setRequestHeader("If-None-Match",T.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||n.contentType)&&C.setRequestHeader("Content-Type",p.contentType),C.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Fn+"; q=0.01":""):p.accepts["*"]),p.headers)C.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(v,C,p)||l))return C.abort();if(w="abort",m.add(p.complete),C.done(p.success),C.fail(p.error),r=$n(Pn,p,n,C)){if(C.readyState=1,f&&g.trigger("ajaxSend",[C,p]),l)return C;p.async&&p.timeout>0&&(s=e.setTimeout((function(){C.abort("timeout")}),p.timeout));try{l=!1,r.send(x,M)}catch(t){if(l)throw t;M(-1,t)}}else M(-1,"No Transport");function M(t,n,u,a){var c,h,d,x,_,w=n;l||(l=!0,s&&e.clearTimeout(s),r=void 0,o=a||"",C.readyState=t>0?4:0,c=t>=200&&t<300||304===t,u&&(x=function(t,n,e){for(var r,i,o,u,a=t.contents,s=t.dataTypes;"*"===s[0];)s.shift(),void 0===r&&(r=t.mimeType||n.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){s.unshift(i);break}if(s[0]in e)o=s[0];else{for(i in e){if(!s[0]||t.converters[i+" "+s[0]]){o=i;break}u||(u=i)}o=o||u}if(o)return o!==s[0]&&s.unshift(o),e[o]}(p,C,u)),x=function(t,n,e,r){var i,o,u,a,s,c={},l=t.dataTypes.slice();if(l[1])for(u in t.converters)c[u.toLowerCase()]=t.converters[u];for(o=l.shift();o;)if(t.responseFields[o]&&(e[t.responseFields[o]]=n),!s&&r&&t.dataFilter&&(n=t.dataFilter(n,t.dataType)),s=o,o=l.shift())if("*"===o)o=s;else if("*"!==s&&s!==o){if(!(u=c[s+" "+o]||c["* "+o]))for(i in c)if((a=i.split(" "))[1]===o&&(u=c[s+" "+a[0]]||c["* "+a[0]])){!0===u?u=c[i]:!0!==c[i]&&(o=a[0],l.unshift(a[1]));break}if(!0!==u)if(u&&t.throws)n=u(n);else try{n=u(n)}catch(t){return{state:"parsererror",error:u?t:"No conversion from "+s+" to "+o}}}return{state:"success",data:n}}(p,x,C,c),c?(p.ifModified&&((_=C.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=_),(_=C.getResponseHeader("etag"))&&(T.etag[i]=_)),204===t||"HEAD"===p.type?w="nocontent":304===t?w="notmodified":(w=x.state,h=x.data,c=!(d=x.error))):(d=w,!t&&w||(w="error",t<0&&(t=0))),C.status=t,C.statusText=(n||w)+"",c?y.resolveWith(v,[h,w,C]):y.rejectWith(v,[C,w,d]),C.statusCode(b),b=void 0,f&&g.trigger(c?"ajaxSuccess":"ajaxError",[C,p,c?h:d]),m.fireWith(v,[C,w]),f&&(g.trigger("ajaxComplete",[C,p]),--T.active||T.event.trigger("ajaxStop")))}return C},getJSON:function(t,n,e){return T.get(t,n,e,"json")},getScript:function(t,n){return T.get(t,void 0,n,"script")}}),T.each(["get","post"],(function(t,n){T[n]=function(t,e,r,i){return m(e)&&(i=i||r,r=e,e=void 0),T.ajax(T.extend({url:t,type:n,dataType:i,data:e,success:r},T.isPlainObject(t)&&t))}})),T._evalUrl=function(t){return T.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,throws:!0})},T.fn.extend({wrapAll:function(t){var n;return this[0]&&(m(t)&&(t=t.call(this[0])),n=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&n.insertBefore(this[0]),n.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return m(t)?this.each((function(n){T(this).wrapInner(t.call(this,n))})):this.each((function(){var n=T(this),e=n.contents();e.length?e.wrapAll(t):n.append(t)}))},wrap:function(t){var n=m(t);return this.each((function(e){T(this).wrapAll(n?t.call(this,e):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){T(this).replaceWith(this.childNodes)})),this}}),T.expr.pseudos.hidden=function(t){return!T.expr.pseudos.visible(t)},T.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Un={0:200,1223:204},Bn=T.ajaxSettings.xhr();y.cors=!!Bn&&"withCredentials"in Bn,y.ajax=Bn=!!Bn,T.ajaxTransport((function(t){var n,r;if(y.cors||Bn&&!t.crossDomain)return{send:function(i,o){var u,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(u in t.xhrFields)a[u]=t.xhrFields[u];for(u in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(u,i[u]);n=function(t){return function(){n&&(n=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Un[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),r=a.onerror=a.ontimeout=n("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout((function(){n&&r()}))},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(n)throw t}},abort:function(){n&&n()}}})),T.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return T.globalEval(t),t}}}),T.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),T.ajaxTransport("script",(function(t){var n,e;if(t.crossDomain)return{send:function(r,i){n=T("