|
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.d3=t.d3||{})}(this,function(t){"use strict";function n(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===In&&n.documentElement.namespaceURI===In?n.createElement(t):n.createElementNS(e,t)}}function e(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function r(t,n,e){return t=i(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function i(n,e,r){return function(i){var o=t.event;t.event=i;try{n.call(this,this.__data__,e,r)}finally{t.event=o}}}function o(t){return t.trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})}function u(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function a(t,n,e){var o=Fn.hasOwnProperty(t.type)?r:i;return function(r,i,u){var a,s=this.__on,l=o(n,i,u);if(s)for(var c=0,f=s.length;c<f;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(a):this.__on=[a]}}function s(){}function l(){return[]}function c(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function f(t,n,e,r,i,o){for(var u,a=0,s=n.length,l=o.length;a<l;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new c(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function h(t,n,e,r,i,o,u){var a,s,l,f={},h=n.length,p=o.length,d=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(d[a]=l=ee+u.call(s,s.__data__,a,n),l in f?i[a]=s:f[l]=s);for(a=0;a<p;++a)l=ee+u.call(t,o[a],a,o),(s=f[l])?(r[a]=s,s.__data__=o[a],f[l]=null):e[a]=new c(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&f[d[a]]===s&&(i[a]=s)}function p(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function d(t){return function(){this.removeAttribute(t)}}function v(t){return function(){this.removeAttributeNS(t.space,t.local)}}function y(t,n){return function(){this.setAttribute(t,n)}}function g(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function m(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function w(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function _(t){return function(){this.style.removeProperty(t)}}function b(t,n,e){return function(){this.style.setProperty(t,n,e)}}function x(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function M(t){return function(){delete this[t]}}function A(t,n){return function(){this[t]=n}}function N(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function k(t){return t.trim().split(/^|\s+/)}function E(t){return t.classList||new S(t)}function S(t){this._node=t,this._names=k(t.getAttribute("class")||"")}function C(t,n){for(var e=E(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function T(t,n){for(var e=E(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function q(t){return function(){C(this,t)}}function P(t){return function(){T(this,t)}}function $(t,n){return function(){(n.apply(this,arguments)?C:T)(this,t)}}function R(){this.textContent=""}function O(t){return function(){this.textContent=t}}function X(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function j(){this.innerHTML=""}function I(t){return function(){this.innerHTML=t}}function L(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function V(){this.nextSibling&&this.parentNode.appendChild(this)}function D(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function z(){return null}function Y(){var t=this.parentNode;t&&t.removeChild(this)}function H(t,n,e){var r=ve(t),i=r.CustomEvent;i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function B(t,n){return function(){return H(this,t,n)}}function F(t,n){return function(){return H(this,t,n.apply(this,arguments))}}function U(t,n){this._groups=t,this._parents=n}function J(){return new U([[document.documentElement]],Se)}function G(){}function K(t,n){var e=new G;if(t instanceof G)t.each(function(t,n){e.set(n,t)});else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}function Q(){}function W(t,n){var e=new Q;if(t instanceof Q)t.each(function(t){e.add(t)});else if(t){var r=-1,i=t.length;if(null==n)for(;++r<i;)e.add(t[r]);else for(;++r<i;)e.add(n(t[r],r,t))}return e}function Z(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new tt(r)}function tt(t){this._=t}function nt(t,n){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})}function et(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function rt(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Pe,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}function it(t){return function(n,e){t(null==n?e:null)}}function ot(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function ut(t){return new Function("d","return {"+t.map(function(t,n){return JSON.stringify(t)+": d["+n+"]"}).join(",")+"}")}function at(t,n){var e=ut(t);return function(r,i){return n(e(r),i,t)}}function st(t){var n=Object.create(null),e=[];return t.forEach(function(t){for(var r in t)r in n||e.push(n[r]=r)}),e}function lt(t,n){return function(e){return t(e.responseText,n)}}function ct(){return Ge||(We(ft),Ge=Qe.now()+Ke)}function ft(){Ge=0}function ht(){this._call=this._time=this._next=null}function pt(t,n,e){var r=new ht;return r.restart(t,n,e),r}function dt(){ct(),++He;for(var t,n=ze;n;)(t=Ge-n._time)>=0&&n._call.call(null,t),n=n._next;--He}function vt(){Ge=(Je=Qe.now())+Ke,He=Be=0;try{dt()}finally{He=0,gt(),Ge=0}}function yt(){var t=Qe.now(),n=t-Je;n>Ue&&(Ke-=n,Je=t)}function gt(){for(var t,n,e=ze,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:ze=n);Ye=t,mt(r)}function mt(t){if(!He){Be&&(Be=clearTimeout(Be));var n=t-Ge;n>24?(t<1/0&&(Be=setTimeout(vt,n)),Fe&&(Fe=clearInterval(Fe))):(Fe||(Je=Ge,Fe=setInterval(yt,Ue)),He=1,We(vt))}}function wt(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>er)throw new Error("too late");return e}function _t(t,n){var e=t.__transition;if(!e||!(e=e[n])||e.state>ir)throw new Error("too late");return e}function bt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("too late");return e}function xt(t,n,e){function r(t){e.state=rr,e.timer.restart(i,e.delay,e.time),e.delay<=t&&i(t-e.delay)}function i(r){var l,c,f,h;if(e.state!==rr)return u();for(l in s)if(h=s[l],h.name===e.name){if(h.state===or)return Ze(i);h.state===ur?(h.state=sr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete s[l]):+l<n&&(h.state=sr,h.timer.stop(),delete s[l])}if(Ze(function(){e.state===or&&(e.state=ur,e.timer.restart(o,e.delay,e.time),o(r))}),e.state=ir,e.on.call("start",t,t.__data__,e.index,e.group),e.state===ir){for(e.state=or,a=new Array(f=e.tween.length),l=0,c=-1;l<f;++l)(h=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(a[++c]=h);a.length=c+1}}function o(n){for(var r=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=ar,1),i=-1,o=a.length;++i<o;)a[i].call(null,r);e.state===ar&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){e.state=sr,e.timer.stop(),delete s[n];for(var r in s)return;delete t.__transition}var a,s=t.__transition;s[n]=e,e.timer=pt(r,0,e.time)}function Mt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function At(){}function Nt(t){var n;return t=(t+"").trim().toLowerCase(),(n=yr.exec(t))?(n=parseInt(n[1],16),new Tt(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1)):(n=gr.exec(t))?kt(parseInt(n[1],16)):(n=mr.exec(t))?new Tt(n[1],n[2],n[3],1):(n=wr.exec(t))?new Tt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=_r.exec(t))?Et(n[1],n[2],n[3],n[4]):(n=br.exec(t))?Et(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=xr.exec(t))?qt(n[1],n[2]/100,n[3]/100,1):(n=Mr.exec(t))?qt(n[1],n[2]/100,n[3]/100,n[4]):Ar.hasOwnProperty(t)?kt(Ar[t]):"transparent"===t?new Tt(NaN,NaN,NaN,0):null}function kt(t){return new Tt(t>>16&255,t>>8&255,255&t,1)}function Et(t,n,e,r){return r<=0&&(t=n=e=NaN),new Tt(t,n,e,r)}function St(t){return t instanceof At||(t=Nt(t)),t?(t=t.rgb(),new Tt(t.r,t.g,t.b,t.opacity)):new Tt}function Ct(t,n,e,r){return 1===arguments.length?St(t):new Tt(t,n,e,null==r?1:r)}function Tt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function qt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new Rt(t,n,e,r)}function Pt(t){if(t instanceof Rt)return new Rt(t.h,t.s,t.l,t.opacity);if(t instanceof At||(t=Nt(t)),!t)return new Rt;if(t instanceof Rt)return t;t=t.rgb();var n=t.r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new Rt(u,a,s,t.opacity)}function $t(t,n,e,r){return 1===arguments.length?Pt(t):new Rt(t,n,e,null==r?1:r)}function Rt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Ot(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function Xt(t){if(t instanceof It)return new It(t.l,t.a,t.b,t.opacity);if(t instanceof Bt){var n=t.h*Nr;return new It(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Tt||(t=St(t));var e=zt(t.r),r=zt(t.g),i=zt(t.b),o=Lt((.4124564*e+.3575761*r+.1804375*i)/Er),u=Lt((.2126729*e+.7151522*r+.072175*i)/Sr);return new It(116*u-16,500*(o-u),200*(u-Lt((.0193339*e+.119192*r+.9503041*i)/Cr)),t.opacity)}function jt(t,n,e,r){return 1===arguments.length?Xt(t):new It(t,n,e,null==r?1:r)}function It(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function Lt(t){return t>$r?Math.pow(t,1/3):t/Pr+Tr}function Vt(t){return t>qr?t*t*t:Pr*(t-Tr)}function Dt(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function zt(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Yt(t){if(t instanceof Bt)return new Bt(t.h,t.c,t.l,t.opacity);t instanceof It||(t=Xt(t));var n=Math.atan2(t.b,t.a)*kr;return new Bt(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ht(t,n,e,r){return 1===arguments.length?Yt(t):new Bt(t,n,e,null==r?1:r)}function Bt(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}function Ft(t){if(t instanceof Jt)return new Jt(t.h,t.s,t.l,t.opacity);t instanceof Tt||(t=St(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(Dr*r+Lr*n-Vr*e)/(Dr+Lr-Vr),o=r-i,u=(Ir*(e-i)-Xr*o)/jr,a=Math.sqrt(u*u+o*o)/(Ir*i*(1-i)),s=a?Math.atan2(u,o)*kr-120:NaN;return new Jt(s<0?s+360:s,a,i,t.opacity)}function Ut(t,n,e,r){return 1===arguments.length?Ft(t):new Jt(t,n,e,null==r?1:r)}function Jt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Gt(t,n){return function(e){return t+e*n}}function Kt(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}function Qt(t,n){var e=n-t;return e?Gt(t,e>180||e<-180?e-360*Math.round(e/360):e):Fr(isNaN(t)?n:t)}function Wt(t){return 1==(t=+t)?Zt:function(n,e){return e-n?Kt(n,e,t):Fr(isNaN(n)?e:n)}}function Zt(t,n){var e=n-t;return e?Gt(t,e):Fr(isNaN(t)?n:t)}function tn(t){return function(){return t}}function nn(t){return function(n){return t(n)+""}}function en(t){return"none"===t?Zr:(zr||(zr=document.createElement("DIV"),Yr=document.documentElement,Hr=document.defaultView),zr.style.transform=t,t=Hr.getComputedStyle(Yr.appendChild(zr),null).getPropertyValue("transform"),Yr.removeChild(zr),t=t.slice(7,-1).split(","),ti(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}function rn(t){return null==t?Zr:(Br||(Br=document.createElementNS("http://www.w3.org/2000/svg","g")),Br.setAttribute("transform",t),(t=Br.transform.baseVal.consolidate())?(t=t.matrix,ti(t.a,t.b,t.c,t.d,t.e,t.f)):Zr)}function on(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}function o(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:Jr(t,i)},{i:s-2,x:Jr(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}function u(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Jr(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}function a(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Jr(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}function s(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:Jr(t,e)},{i:a-2,x:Jr(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}return function(n,e){var r=[],i=[];return n=t(n),e=t(e),o(n.translateX,n.translateY,e.translateX,e.translateY,r,i),u(n.rotate,e.rotate,r,i),a(n.skewX,e.skewX,r,i),s(n.scaleX,n.scaleY,e.scaleX,e.scaleY,r,i),n=e=null,function(t){for(var n,e=-1,o=i.length;++e<o;)r[(n=i[e]).i]=n.x(t);return r.join("")}}}function un(t){return function n(e){function r(n,r){var i=t((n=Ut(n)).h,(r=Ut(r)).h),o=Zt(n.s,r.s),u=Zt(n.l,r.l),a=Zt(n.opacity,r.opacity);return function(t){return n.h=i(t),n.s=o(t),n.l=u(Math.pow(t,e)),n.opacity=a(t),n+""}}return e=+e,r.gamma=n,r}(1)}function an(t,n){var e,r;return function(){var i=_t(this,t),o=i.tween;if(o!==e){r=e=o;for(var u=0,a=r.length;u<a;++u)if(r[u].name===n){r=r.slice(),r.splice(u,1);break}}i.tween=r}}function sn(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=_t(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function ln(t,n,e){var r=t._id;return t.each(function(){var t=_t(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)}),function(t){return bt(t,r).value[n]}}function cn(t){return function(){this.removeAttribute(t)}}function fn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hn(t,n,e){var r,i;return function(){var o=this.getAttribute(t);return o===e?null:o===r?i:i=n(r=o,e)}}function pn(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 dn(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttribute(t):(u=this.getAttribute(t),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function vn(t,n,e){var r,i,o;return function(){var u,a=e(this);return null==a?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),u===a?null:u===r&&a===i?o:o=n(r=u,i=a))}}function yn(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 gn(t,n){function e(){var e=this,r=n.apply(e,arguments);return r&&function(n){e.setAttribute(t,r(n))}}return e._value=n,e}function mn(t,n){return function(){wt(this,t).delay=+n.apply(this,arguments)}}function wn(t,n){return n=+n,function(){wt(this,t).delay=n}}function _n(t,n){return function(){_t(this,t).duration=+n.apply(this,arguments)}}function bn(t,n){return n=+n,function(){_t(this,t).duration=n}}function xn(t,n){if("function"!=typeof n)throw new Error;return function(){_t(this,t).ease=n}}function Mn(t){return(t+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t})}function An(t,n,e){var r,i,o=Mn(n)?wt:_t;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}function Nn(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}function kn(t,n){var e,r,i;return function(){var o=ve(this).getComputedStyle(this,null),u=o.getPropertyValue(t),a=(this.style.removeProperty(t),o.getPropertyValue(t));return u===a?null:u===e&&a===r?i:i=n(e=u,r=a)}}function En(t){return function(){this.style.removeProperty(t)}}function Sn(t,n,e){var r,i;return function(){var o=ve(this).getComputedStyle(this,null).getPropertyValue(t);return o===e?null:o===r?i:i=n(r=o,e)}}function Cn(t,n,e){var r,i,o;return function(){var u=ve(this).getComputedStyle(this,null),a=u.getPropertyValue(t),s=e(this);return null==s&&(this.style.removeProperty(t),s=u.getPropertyValue(t)),a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function Tn(t,n,e){function r(){var r=this,i=n.apply(r,arguments);return i&&function(n){r.style.setProperty(t,i(n),e)}}return r._value=n,r}function qn(t){return function(){this.textContent=t}}function Pn(t){return function(){var n=t(this);this.textContent=null==n?"":n}}function $n(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Rn(t){return J().transition(t)}function On(){return++xi}function Xn(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}function jn(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Ni.time=ct(),Ni;return e}var In="http://www.w3.org/1999/xhtml",Ln={svg:"http://www.w3.org/2000/svg",xhtml:In,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Vn=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),Ln.hasOwnProperty(n)?{space:Ln[n],local:t}:t},Dn=function(t){var r=Vn(t);return(r.local?e:n)(r)},zn=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var Yn=document.documentElement;if(!Yn.matches){var Hn=Yn.webkitMatchesSelector||Yn.msMatchesSelector||Yn.mozMatchesSelector||Yn.oMatchesSelector;zn=function(t){return function(){return Hn.call(this,t)}}}}var Bn=zn,Fn={};if(t.event=null,"undefined"!=typeof document){"onmouseenter"in document.documentElement||(Fn={mouseenter:"mouseover",mouseleave:"mouseout"})}var Un=function(t,n,e){var r,i,s=o(t+""),l=s.length;{if(!(arguments.length<2)){for(c=n?a:u,null==e&&(e=!1),r=0;r<l;++r)this.each(c(s[r],n,e));return this}var c=this.node().__on;if(c)for(var f,h=0,p=c.length;h<p;++h)for(r=0,f=c[h];r<l;++r)if((i=s[r]).type===f.type&&i.name===f.name)return f.value}},Jn=function(t){return null==t?s:function(){return this.querySelector(t)}},Gn=function(t){"function"!=typeof t&&(t=Jn(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],s=a.length,l=r[i]=new Array(s),c=0;c<s;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),l[c]=u);return new U(r,this._parents)},Kn=function(t){return null==t?l:function(){return this.querySelectorAll(t)}},Qn=function(t){"function"!=typeof t&&(t=Kn(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new U(r,i)},Wn=function(t){"function"!=typeof t&&(t=Bn(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new U(r,this._parents)},Zn=function(t){return new Array(t.length)},te=function(){return new U(this._enter||this._groups.map(Zn),this._parents)};c.prototype={constructor:c,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 ne=function(t){return function(){return t}},ee="$",re=function(t,n){if(!t)return v=new Array(this.size()),l=-1,this.each(function(t){v[++l]=t}),v;var e=n?h:f,r=this._parents,i=this._groups;"function"!=typeof t&&(t=ne(t));for(var o=i.length,u=new Array(o),a=new Array(o),s=new Array(o),l=0;l<o;++l){var c=r[l],p=i[l],d=p.length,v=t.call(c,c&&c.__data__,l,r),y=v.length,g=a[l]=new Array(y),m=u[l]=new Array(y);e(c,p,g,m,s[l]=new Array(d),v,n);for(var w,_,b=0,x=0;b<y;++b)if(w=g[b]){for(b>=x&&(x=b+1);!(_=m[x])&&++x<y;);w._next=_||null}}return u=new U(u,r),u._enter=a,u._exit=s,u},ie=function(){return new U(this._exit||this._groups.map(Zn),this._parents)},oe=function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new U(u,this._parents)},ue=function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&u!==r.nextSibling&&u.parentNode.insertBefore(r,u),u=r);return this},ae=function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=p);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new U(i,this._parents).order()},se=function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},le=function(){var t=new Array(this.size()),n=-1;return this.each(function(){t[++n]=this}),t},ce=function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},fe=function(){var t=0;return this.each(function(){++t}),t},he=function(){return!this.node()},pe=function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},de=function(t,n){var e=Vn(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?v:d:"function"==typeof n?e.local?w:m:e.local?g:y)(e,n))},ve=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView},ye=function(t,n,e){var r;return arguments.length>1?this.each((null==n?_:"function"==typeof n?x:b)(t,n,null==e?"":e)):ve(r=this.node()).getComputedStyle(r,null).getPropertyValue(t)},ge=function(t,n){return arguments.length>1?this.each((null==n?M:"function"==typeof n?N:A)(t,n)):this.node()[t]};S.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var me=function(t,n){var e=k(t+"");if(arguments.length<2){for(var r=E(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?$:n?q:P)(e,n))},we=function(t){return arguments.length?this.each(null==t?R:("function"==typeof t?X:O)(t)):this.node().textContent},_e=function(t){return arguments.length?this.each(null==t?j:("function"==typeof t?L:I)(t)):this.node().innerHTML},be=function(){return this.each(V)},xe=function(){return this.each(D)},Me=function(t){var n="function"==typeof t?t:Dn(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},Ae=function(t,n){var e="function"==typeof t?t:Dn(t),r=null==n?z:"function"==typeof n?n:Jn(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},Ne=function(){return this.each(Y)},ke=function(t){return arguments.length?this.property("__data__",t):this.node().__data__},Ee=function(t,n){return this.each(("function"==typeof n?F:B)(t,n))},Se=[null];U.prototype=J.prototype={constructor:U,select:Gn,selectAll:Qn,filter:Wn,data:re,enter:te,exit:ie,merge:oe,order:ue,sort:ae,call:se,nodes:le,node:ce,size:fe,empty:he,each:pe,attr:de,style:ye,property:ge,classed:me,text:we,html:_e,raise:be,lower:xe,append:Me,insert:Ae,remove:Ne,datum:ke,on:Un,dispatch:Ee};var Ce=function(t){return"string"==typeof t?new U([[document.querySelector(t)]],[document.documentElement]):new U([[t]],Se)},Te=function(t){return"string"==typeof t?new U([document.querySelectorAll(t)],[document.documentElement]):new U([null==t?[]:t],Se)};G.prototype=K.prototype={constructor:G,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,n){return this["$"+t]=n,this},remove:function(t){var n="$"+t;return n in this&&delete this[n]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)"$"===n[0]&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)"$"===n[0]&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)"$"===n[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var n in this)"$"===n[0]&&t(this[n],n.slice(1),this)}};var qe=K.prototype;Q.prototype=W.prototype={constructor:Q,has:qe.has,add:function(t){return t+="",this["$"+t]=t,this},remove:qe.remove,clear:qe.clear,values:qe.keys,size:qe.size,empty:qe.empty,each:qe.each};var Pe={value:function(){}};tt.prototype=Z.prototype={constructor:tt,on:function(t,n){var e,r=this._,i=nt(t+"",r),o=-1,u=i.length;{if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=rt(r[e],t.name,n);else if(null==n)for(e in r)r[e]=rt(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=et(r[e],t.name)))return e}},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new tt(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(r=this._[t],o=0,e=r.length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var $e=function(t,n){function e(t){var n,e=l.status;if(!e&&ot(l)||e>=200&&e<300||304===e){if(o)try{n=o.call(r,l)}catch(t){return void a.call("error",r,t)}else n=l;a.call("load",r,n)}else a.call("error",r,t)}var r,i,o,u,a=Z("beforesend","progress","load","error"),s=K(),l=new XMLHttpRequest,c=null,f=null,h=0;if("undefined"==typeof XDomainRequest||"withCredentials"in l||!/^(http(s)?:)?\/\//.test(t)||(l=new XDomainRequest),"onload"in l?l.onload=l.onerror=l.ontimeout=e:l.onreadystatechange=function(t){l.readyState>3&&e(t)},l.onprogress=function(t){a.call("progress",r,t)},r={header:function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?s.get(t):(null==n?s.remove(t):s.set(t,n+""),r)},mimeType:function(t){return arguments.length?(i=null==t?null:t+"",r):i},responseType:function(t){return arguments.length?(u=t,r):u},timeout:function(t){return arguments.length?(h=+t,r):h},user:function(t){return arguments.length<1?c:(c=null==t?null:t+"",r)},password:function(t){return arguments.length<1?f:(f=null==t?null:t+"",r)},response:function(t){return o=t,r},get:function(t,n){return r.send("GET",t,n)},post:function(t,n){return r.send("POST",t,n)},send:function(n,e,o){return l.open(n,t,!0,c,f),null==i||s.has("accept")||s.set("accept",i+",*/*"),l.setRequestHeader&&s.each(function(t,n){l.setRequestHeader(n,t)}),null!=i&&l.overrideMimeType&&l.overrideMimeType(i),null!=u&&(l.responseType=u),h>0&&(l.timeout=h),null==o&&"function"==typeof e&&(o=e,e=null),null!=o&&1===o.length&&(o=it(o)),null!=o&&r.on("error",o).on("load",function(t){o(null,t)}),a.call("beforesend",r,l),l.send(null==e?null:e),r},abort:function(){return l.abort(),r},on:function(){var t=a.on.apply(a,arguments);return t===a?r:t}},null!=n){if("function"!=typeof n)throw new Error("invalid callback: "+n);return r.get(n)}return r},Re=function(t,n){return function(e,r){var i=$e(e).mimeType(t).response(n);if(null!=r){if("function"!=typeof r)throw new Error("invalid callback: "+r);return i.get(r)}return i}};Re("text/html",function(t){return document.createRange().createContextualFragment(t.responseText)});var Oe=Re("application/json",function(t){return JSON.parse(t.responseText)});Re("text/plain",function(t){return t.responseText}),Re("application/xml",function(t){var n=t.responseXML;if(!n)throw new Error("parse error");return n});var Xe=function(t){function n(t,n){var r,i,o=e(t,function(t,e){if(r)return r(t,e-1);i=t,r=n?at(t,n):ut(t)});return o.columns=i,o}function e(t,n){function e(){if(c>=l)return u;if(i)return i=!1,o;var n,e=c;if(34===t.charCodeAt(e)){for(var r=e;r++<l;)if(34===t.charCodeAt(r)){if(34!==t.charCodeAt(r+1))break;++r}return c=r+2,n=t.charCodeAt(r+1),13===n?(i=!0,10===t.charCodeAt(r+2)&&++c):10===n&&(i=!0),t.slice(e+1,r).replace(/""/g,'"')}for(;c<l;){var a=1;if(10===(n=t.charCodeAt(c++)))i=!0;else if(13===n)i=!0,10===t.charCodeAt(c)&&(++c,++a);else if(n!==s)continue;return t.slice(e,c-a)}return t.slice(e)}for(var r,i,o={},u={},a=[],l=t.length,c=0,f=0;(r=e())!==u;){for(var h=[];r!==o&&r!==u;)h.push(r),r=e();n&&null==(h=n(h,f++))||a.push(h)}return a}function r(n,e){return null==e&&(e=st(n)),[e.map(u).join(t)].concat(n.map(function(n){return e.map(function(t){return u(n[t])}).join(t)})).join("\n")}function i(t){return t.map(o).join("\n")}function o(n){return n.map(u).join(t)}function u(t){return null==t?"":a.test(t+="")?'"'+t.replace(/\"/g,'""')+'"':t}var a=new RegExp('["'+t+"\n\r]"),s=t.charCodeAt(0);return{parse:n,parseRows:e,format:r,formatRows:i}},je=Xe(","),Ie=je.parse,Le=Xe("\t"),Ve=Le.parse,De=function(t,n){return function(e,r,i){arguments.length<3&&(i=r,r=null);var o=$e(e).mimeType(t);return o.row=function(t){return arguments.length?o.response(lt(n,r=t)):r},o.row(r),i?o.get(i):o}};De("text/csv",Ie),De("text/tab-separated-values",Ve);var ze,Ye,He=0,Be=0,Fe=0,Ue=1e3,Je=0,Ge=0,Ke=0,Qe="object"==typeof performance&&performance.now?performance:Date,We="function"==typeof requestAnimationFrame?requestAnimationFrame:function(t){setTimeout(t,17)};ht.prototype=pt.prototype={constructor:ht,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?ct():+e)+(null==n?0:+n),this._next||Ye===this||(Ye?Ye._next=this:ze=this,Ye=this),this._call=t,this._time=e,mt()},stop:function(){this._call&&(this._call=null,this._time=1/0,mt())}};var Ze=function(t,n,e){var r=new ht;return n=null==n?0:+n,r.restart(function(e){r.stop(),t(e+n)},n,e),r},tr=Z("start","end","interrupt"),nr=[],er=0,rr=1,ir=2,or=3,ur=4,ar=5,sr=6,lr=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};xt(t,e,{name:n,index:r,group:i,on:tr,tween:nr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:er})},cr=function(t,n){var e,r,i,o=t.__transition,u=!0;if(o){n=null==n?null:n+"";for(i in o)(e=o[i]).name===n?(r=e.state>ir&&e.state<ar,e.state=sr,e.timer.stop(),r&&e.on.call("interrupt",t,t.__data__,e.index,e.group),delete o[i]):u=!1;u&&delete t.__transition}},fr=function(t){return this.each(function(){cr(this,t)})},hr=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t},pr="\\s*([+-]?\\d+)\\s*",dr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",vr="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",yr=/^#([0-9a-f]{3})$/,gr=/^#([0-9a-f]{6})$/,mr=new RegExp("^rgb\\("+[pr,pr,pr]+"\\)$"),wr=new RegExp("^rgb\\("+[vr,vr,vr]+"\\)$"),_r=new RegExp("^rgba\\("+[pr,pr,pr,dr]+"\\)$"),br=new RegExp("^rgba\\("+[vr,vr,vr,dr]+"\\)$"),xr=new RegExp("^hsl\\("+[dr,vr,vr]+"\\)$"),Mr=new RegExp("^hsla\\("+[dr,vr,vr,dr]+"\\)$"),Ar={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255, |
|
blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};hr(At,Nt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),hr(Tt,Ct,Mt(At,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Tt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},toString:function(){var t=this.opacity;return t=isNaN(t)?1:Math.max(0,Math.min(1,t)),(1===t?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),hr(Rt,$t,Mt(At,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Rt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Rt(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 Tt(Ot(t>=240?t-240:t+120,i,r),Ot(t,i,r),Ot(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 Nr=Math.PI/180,kr=180/Math.PI,Er=.95047,Sr=1,Cr=1.08883,Tr=4/29,qr=6/29,Pr=3*qr*qr,$r=qr*qr*qr;hr(It,jt,Mt(At,{brighter:function(t){return new It(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new It(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=Sr*Vt(t),n=Er*Vt(n),e=Cr*Vt(e),new Tt(Dt(3.2404542*n-1.5371385*t-.4985314*e),Dt(-.969266*n+1.8760108*t+.041556*e),Dt(.0556434*n-.2040259*t+1.0572252*e),this.opacity)}})),hr(Bt,Ht,Mt(At,{brighter:function(t){return new Bt(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Bt(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Xt(this).rgb()}}));var Rr=-.14861,Or=1.78277,Xr=-.29227,jr=-.90649,Ir=1.97294,Lr=Ir*jr,Vr=Ir*Or,Dr=Or*Xr-jr*Rr;hr(Jt,Ut,Mt(At,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Jt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Jt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Nr,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Tt(255*(n+e*(Rr*r+Or*i)),255*(n+e*(Xr*r+jr*i)),255*(n+e*(Ir*r)),this.opacity)}}));var zr,Yr,Hr,Br,Fr=function(t){return function(){return t}},Ur=function t(n){function e(t,n){var e=r((t=Ct(t)).r,(n=Ct(n)).r),i=r(t.g,n.g),o=r(t.b,n.b),u=Zt(t.opacity,n.opacity);return function(n){return t.r=e(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}var r=Wt(n);return e.gamma=t,e}(1),Jr=function(t,n){return t=+t,n-=t,function(e){return t+n*e}},Gr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Kr=new RegExp(Gr.source,"g"),Qr=function(t,n){var e,r,i,o=Gr.lastIndex=Kr.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=Gr.exec(t))&&(r=Kr.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:Jr(e,r)})),o=Kr.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?nn(s[0].x):tn(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})},Wr=180/Math.PI,Zr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ti=function(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Wr,skewX:Math.atan(s)*Wr,scaleX:u,scaleY:a}},ni=on(en,"px, ","px)","deg)"),ei=on(rn,", ",")",")");un(Qt);var ri=(un(Zt),function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=bt(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?an:sn)(e,t,n))}),ii=function(t,n){var e;return("number"==typeof n?Jr:n instanceof Nt?Ur:(e=Nt(n))?(n=e,Ur):Qr)(t,n)},oi=function(t,n){var e=Vn(t),r="transform"===e?ei:ii;return this.attrTween(t,"function"==typeof n?(e.local?vn:dn)(e,r,ln(this,"attr."+t,n)):null==n?(e.local?fn:cn)(e):(e.local?pn:hn)(e,r,n+""))},ui=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=Vn(t);return this.tween(e,(r.local?yn:gn)(r,n))},ai=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?mn:wn)(n,t)):bt(this.node(),n).delay},si=function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?_n:bn)(n,t)):bt(this.node(),n).duration},li=function(t){var n=this._id;return arguments.length?this.each(xn(n,t)):bt(this.node(),n).ease},ci=function(t){"function"!=typeof t&&(t=Bn(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new $n(r,this._parents,this._name,this._id)},fi=function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new $n(u,this._parents,this._name,this._id)},hi=function(t,n){var e=this._id;return arguments.length<2?bt(this.node(),e).on.on(t):this.each(An(e,t,n))},pi=function(){return this.on("end.remove",Nn(this._id))},di=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Jn(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,s,l=r[u],c=l.length,f=o[u]=new Array(c),h=0;h<c;++h)(a=l[h])&&(s=t.call(a,a.__data__,h,l))&&("__data__"in a&&(s.__data__=a.__data__),f[h]=s,lr(f[h],n,e,h,f,bt(a,e)));return new $n(o,this._parents,n,e)},vi=function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=Kn(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s,l=r[a],c=l.length,f=0;f<c;++f)if(s=l[f]){for(var h,p=t.call(s,s.__data__,f,l),d=bt(s,e),v=0,y=p.length;v<y;++v)(h=p[v])&&lr(h,n,e,v,p,d);o.push(p),u.push(s)}return new $n(o,u,n,e)},yi=J.prototype.constructor,gi=function(){return new yi(this._groups,this._parents)},mi=function(t,n,e){var r="transform"==(t+="")?ni:ii;return null==n?this.styleTween(t,kn(t,r)).on("end.style."+t,En(t)):this.styleTween(t,"function"==typeof n?Cn(t,r,ln(this,"style."+t,n)):Sn(t,r,n+""),e)},wi=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,Tn(t,n,null==e?"":e))},_i=function(t){return this.tween("text","function"==typeof t?Pn(ln(this,"text",t)):qn(null==t?"":t+""))},bi=function(){for(var t=this._name,n=this._id,e=On(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=bt(u,n);lr(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new $n(r,this._parents,t,e)},xi=0,Mi=J.prototype;$n.prototype=Rn.prototype={constructor:$n,select:di,selectAll:vi,filter:ci,merge:fi,selection:gi,transition:bi,call:Mi.call,nodes:Mi.nodes,node:Mi.node,size:Mi.size,empty:Mi.empty,each:Mi.each,on:hi,attr:oi,attrTween:ui,style:mi,styleTween:wi,text:_i,remove:pi,tween:ri,delay:ai,duration:si,ease:li};var Ai=(function t(n){function e(t){return Math.pow(t,n)}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return 1-Math.pow(1-t,n)}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return((t*=2)<=1?Math.pow(t,n):2-Math.pow(2-t,n))/2}return n=+n,e.exponent=t,e}(3),function t(n){function e(t){return t*t*((n+1)*t-n)}return n=+n,e.overshoot=t,e}(1.70158),function t(n){function e(t){return--t*t*((n+1)*t+n)+1}return n=+n,e.overshoot=t,e}(1.70158),function t(n){function e(t){return((t*=2)<1?t*t*((n+1)*t-n):(t-=2)*t*((n+1)*t+n)+2)/2}return n=+n,e.overshoot=t,e}(1.70158),2*Math.PI),Ni=(function t(n,e){function r(t){return n*Math.pow(2,10*--t)*Math.sin((i-t)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Ai);return r.amplitude=function(n){return t(n,e*Ai)},r.period=function(e){return t(n,e)},r}(1,.3),function t(n,e){function r(t){return 1-n*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/e)}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Ai);return r.amplitude=function(n){return t(n,e*Ai)},r.period=function(e){return t(n,e)},r}(1,.3),function t(n,e){function r(t){return((t=2*t-1)<0?n*Math.pow(2,10*t)*Math.sin((i-t)/e):2-n*Math.pow(2,-10*t)*Math.sin((i+t)/e))/2}var i=Math.asin(1/(n=Math.max(1,n)))*(e/=Ai);return r.amplitude=function(n){return t(n,e*Ai)},r.period=function(e){return t(n,e)},r}(1,.3),{time:null,delay:0,duration:250,ease:Xn}),ki=function(t){var n,e;t instanceof $n?(n=t._id,t=t._name):(n=On(),(e=Ni).time=ct(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)(u=a[l])&&lr(u,t,n,l,a,e||jn(u,n));return new $n(r,this._parents,t,n)};J.prototype.interrupt=fr,J.prototype.transition=ki,t.selection=J,t.select=Ce,t.selectAll=Te,t.json=Oe,Object.defineProperty(t,"__esModule",{value:!0})}); |