@hpcc-js/tree
Advanced tools
Comparing version 0.0.41 to 0.0.42
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api"],e):e(t["@hpcc-js/tree"]={},t["@hpcc-js/common"],t["@hpcc-js/api"])}(this,function(t,e,n){"use strict";function r(t,e){if("undefined"==typeof document)return e;t=t||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");return r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t)),e}function i(t,e){return t.parent===e.parent?1:2}function o(t){return t.reduce(a,0)/t.length}function a(t,e){return t+e.x}function s(t){return 1+t.reduce(u,0)}function u(t,e){return Math.max(t,e.y)}function l(t){for(var e;e=t.children;)t=e[0];return t}function c(t){for(var e;e=t.children;)t=e[e.length-1];return t}function h(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function p(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function f(t,e){var n,r,i,o,a,s=new g(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=d);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new g(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(_)}function d(t){return t.children}function y(t){t.data=t.data.data}function _(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function g(t){this.data=t,this.depth=this.height=0,this.parent=null}function m(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}function v(t,e){var n,r;if(b(e,t))return[e];for(n=0;n<t.length;++n)if(x(e,t[n])&&b(T(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(x(T(t[n],t[r]),e)&&x(T(t[n],e),t[r])&&x(T(t[r],e),t[n])&&b(S(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function x(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function w(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function b(t,e){for(var n=0;n<e.length;++n)if(!w(t,e[n]))return!1;return!0}function M(t){switch(t.length){case 1:return k(t[0]);case 2:return T(t[0],t[1]);case 3:return S(t[0],t[1],t[2])}}function k(t){return{x:t.x,y:t.y,r:t.r}}function T(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function S(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,p=r-a,f=r-l,d=i-s,y=i-c,_=u-o,g=h-o,m=r*r+i*i-o*o,v=m-a*a-s*s+u*u,x=m-l*l-c*c+h*h,w=f*d-p*y,b=(d*x-y*v)/(2*w)-r,M=(y*_-d*g)/w,k=(f*v-p*x)/(2*w)-i,T=(p*g-f*_)/w,S=M*M+T*T-1,A=2*(o+b*M+k*T),z=b*b+k*k-o*o,N=-(S?(A+Math.sqrt(A*A-4*S*z))/(2*S):z/A);return{x:r+b+M*N,y:i+k+T*N,r:N}}function A(t,e,n){var r=t.x,i=t.y,o=e.r+n.r,a=t.r+n.r,s=e.x-r,u=e.y-i,l=s*s+u*u;if(l){var c=.5+((a*=a)-(o*=o))/(2*l),h=Math.sqrt(Math.max(0,2*o*(a+l)-(a-=l)*a-o*o))/(2*l);n.x=r+c*s+h*u,n.y=i+c*u-h*s}else n.x=r+a,n.y=i}function z(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return i*i-1e-6>n*n+r*r}function N(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function I(t){this._=t,this.next=null,this.previous=null}function C(t){if(!(i=t.length))return 0;var e,n,r,i,o,a,s,u,l,c,h;if(e=t[0],e.x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;A(n,e,r=t[2]),e=new I(e),n=new I(n),r=new I(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){A(e._,n._,r=t[s]),r=new I(r),u=n.next,l=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(z(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}c+=u._.r,u=u.next}else{if(z(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(u!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=N(e);(r=r.next)!==n;)(a=N(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Ne(e),s=0;s<i;++s)e=t[s],e.x-=r.x,e.y-=r.y;return r.r}function D(t){return null==t?null:E(t)}function E(t){if("function"!=typeof t)throw new Error;return t}function P(){return 0}function R(t){return Math.sqrt(t.value)}function B(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function q(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=C(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function L(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function O(t,e){return t.parent===e.parent?1:2}function j(t){var e=t.children;return e?e[0]:t.t}function V(t){var e=t.children;return e?e[e.length-1]:t.t}function F(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function H(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}function W(t,e,n){return t.a.parent===e.parent?t.a:n}function $(t,e){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=e}function U(t){for(var e,n,r,i,o,a=new $(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new $(r[i],i)),n.parent=e;return(a.parent=new $(null,0)).children=[a],a}function G(t,e,n,r,i,o){for(var a,s,u,l,c,h,p,f,d,y,_,g=[],m=e.children,v=0,x=0,w=m.length,b=e.value;v<w;){u=i-n,l=o-r;do{c=m[x++].value}while(!c&&x<w);for(h=p=c,_=c*c*(y=Math.max(l/u,u/l)/(b*t)),d=Math.max(p/_,_/h);x<w;++x){if(c+=s=m[x].value,s<h&&(h=s),s>p&&(p=s),_=c*c*y,(f=Math.max(p/_,_/h))>d){c-=s;break}d=f}g.push(a={value:c,dice:u<l,children:m.slice(v,x)}),a.dice?Ee(a,n,r,i,b?r+=l*c/b:o):Be(a,n,r,b?n+=u*c/b:i,o),b-=c,v=x}return g}function Z(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new K(r)}function K(t){this._=t}function Q(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function J(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function X(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Oe,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function Y(){return Ge||(Qe(tt),Ge=Ke.now()+Ze)}function tt(){Ge=0}function et(){this._call=this._time=this._next=null}function nt(t,e,n){var r=new et;return r.restart(t,e,n),r}function rt(){Y(),++Fe;for(var t,e=je;e;)(t=Ge-e._time)>=0&&e._call.call(null,t),e=e._next;--Fe}function it(){Ge=(Ue=Ke.now())+Ze,Fe=He=0;try{rt()}finally{Fe=0,at(),Ge=0}}function ot(){var t=Ke.now(),e=t-Ue;e>$e&&(Ze-=e,Ue=t)}function at(){for(var t,e,n=je,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:je=e);Ve=t,st(r)}function st(t){Fe||(He&&(He=clearTimeout(He)),t-Ge>24?(t<1/0&&(He=setTimeout(it,t-Ke.now()-Ze)),We&&(We=clearInterval(We))):(We||(Ue=Ke.now(),We=setInterval(ot,$e)),Fe=1,Qe(it)))}function ut(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>tn)throw new Error("too late");return n}function lt(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>nn)throw new Error("too late");return n}function ct(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("too late");return n}function ht(t,e,n){function r(u){var l,c,h,p;if(n.state!==en)return o();for(l in s)if((p=s[l]).name===n.name){if(p.state===rn)return Je(r);p.state===on?(p.state=sn,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete s[l]):+l<e&&(p.state=sn,p.timer.stop(),delete s[l])}if(Je(function(){n.state===rn&&(n.state=on,n.timer.restart(i,n.delay,n.time),i(u))}),n.state=nn,n.on.call("start",t,t.__data__,n.index,n.group),n.state===nn){for(n.state=rn,a=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(p=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(a[++c]=p);a.length=c+1}}function i(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(o),n.state=an,1),i=-1,s=a.length;++i<s;)a[i].call(null,r);n.state===an&&(n.on.call("end",t,t.__data__,n.index,n.group),o())}function o(){n.state=sn,n.timer.stop(),delete s[e];for(var r in s)return;delete t.__transition}var a,s=t.__transition;s[e]=n,n.timer=nt(function(t){n.state=en,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)},0,n.time)}function pt(t,e){var n,r;return function(){var i=lt(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function ft(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=lt(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function dt(t,e,n){var r=t._id;return t.each(function(){var t=lt(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return ct(t,r).value[e]}}function yt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function _t(){}function gt(t){var e;return t=(t+"").trim().toLowerCase(),(e=dn.exec(t))?(e=parseInt(e[1],16),new wt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=yn.exec(t))?mt(parseInt(e[1],16)):(e=_n.exec(t))?new wt(e[1],e[2],e[3],1):(e=gn.exec(t))?new wt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=mn.exec(t))?vt(e[1],e[2],e[3],e[4]):(e=vn.exec(t))?vt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=xn.exec(t))?bt(e[1],e[2]/100,e[3]/100,1):(e=wn.exec(t))?bt(e[1],e[2]/100,e[3]/100,e[4]):bn.hasOwnProperty(t)?mt(bn[t]):"transparent"===t?new wt(NaN,NaN,NaN,0):null}function mt(t){return new wt(t>>16&255,t>>8&255,255&t,1)}function vt(t,e,n,r){return r<=0&&(t=e=n=NaN),new wt(t,e,n,r)}function xt(t){return t instanceof _t||(t=gt(t)),t?(t=t.rgb(),new wt(t.r,t.g,t.b,t.opacity)):new wt}function wt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function bt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new kt(t,e,n,r)}function Mt(t){if(t instanceof kt)return new kt(t.h,t.s,t.l,t.opacity);if(t instanceof _t||(t=gt(t)),!t)return new kt;if(t instanceof kt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new kt(a,s,u,t.opacity)}function kt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Tt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function St(t){if(t instanceof At)return new At(t.l,t.a,t.b,t.opacity);if(t instanceof Et){var e=t.h*Mn;return new At(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof wt||(t=xt(t));var n=Ct(t.r),r=Ct(t.g),i=Ct(t.b),o=zt((.4124564*n+.3575761*r+.1804375*i)/Tn),a=zt((.2126729*n+.7151522*r+.072175*i)/Sn);return new At(116*a-16,500*(o-a),200*(a-zt((.0193339*n+.119192*r+.9503041*i)/An)),t.opacity)}function At(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function zt(t){return t>Cn?Math.pow(t,1/3):t/In+zn}function Nt(t){return t>Nn?t*t*t:In*(t-zn)}function It(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Ct(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Dt(t){if(t instanceof Et)return new Et(t.h,t.c,t.l,t.opacity);t instanceof At||(t=St(t));var e=Math.atan2(t.b,t.a)*kn;return new Et(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Et(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Pt(t){if(t instanceof Rt)return new Rt(t.h,t.s,t.l,t.opacity);t instanceof wt||(t=xt(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(On*r+qn*e-Ln*n)/(On+qn-Ln),o=r-i,a=(Bn*(n-i)-Pn*o)/Rn,s=Math.sqrt(a*a+o*o)/(Bn*i*(1-i)),u=s?Math.atan2(a,o)*kn-120:NaN;return new Rt(u<0?u+360:u,s,i,t.opacity)}function Rt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Bt(t){return function(){this.removeAttribute(t)}}function qt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Lt(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}}function Ot(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}function jt(t,e,n){var r,i,o;return function(){var a,s=n(this);{if(null!=s)return(a=this.getAttribute(t))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttribute(t)}}}function Vt(t,e,n){var r,i,o;return function(){var a,s=n(this);{if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===s?null:a===r&&s===i?o:o=e(r=a,i=s);this.removeAttributeNS(t.space,t.local)}}}function Ft(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}function Ht(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n}function Wt(t,e){return function(){ut(this,t).delay=+e.apply(this,arguments)}}function $t(t,e){return e=+e,function(){ut(this,t).delay=e}}function Ut(t,e){return function(){lt(this,t).duration=+e.apply(this,arguments)}}function Gt(t,e){return e=+e,function(){lt(this,t).duration=e}}function Zt(t,e){if("function"!=typeof e)throw new Error;return function(){lt(this,t).ease=e}}function Kt(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}function Qt(t,e,n){var r,i,o=Kt(e)?ut:lt;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function Jt(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Xt(t,n){var r,i,o;return function(){var a=e.style(this,t),s=(this.style.removeProperty(t),e.style(this,t));return a===s?null:a===r&&s===i?o:o=n(r=a,i=s)}}function Yt(t){return function(){this.style.removeProperty(t)}}function te(t,n,r){var i,o;return function(){var a=e.style(this,t);return a===r?null:a===i?o:o=n(i=a,r)}}function ee(t,n,r){var i,o,a;return function(){var s=e.style(this,t),u=r(this);return null==u&&(this.style.removeProperty(t),u=e.style(this,t)),s===u?null:s===i&&u===o?a:a=n(i=s,o=u)}}function ne(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}function re(t){return function(){this.textContent=t}}function ie(t){return function(){var e=t(this);this.textContent=null==e?"":e}}function oe(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ae(){return++Fn}function se(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return $n.time=Y(),$n;return n}function ue(t,e){void 0===e&&(e="");var n={id:e,label:"",attributes:{},children:[]};if(n.label=t.nodeName,1===t.nodeType){if(t.attributes.length>0)for(var r=0;r<t.attributes.length;r++){var i=t.attributes.item(r);n.attributes[i.nodeName]=i.nodeValue}}else 3===t.nodeType&&(n.label=t.nodeValue);if(t.hasChildNodes())for(var o=0;o<t.childNodes.length;o++){var a=ue(t.childNodes.item(o),e+"["+n.children.length+"]");n.children.push(a)}return n}function le(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ce(){return new le}function he(t){return t>1?0:t<-1?lr:Math.acos(t)}function pe(t){return t>=1?cr:t<=-1?-cr:Math.asin(t)}function fe(t){return t.innerRadius}function de(t){return t.outerRadius}function ye(t){return t.startAngle}function _e(t){return t.endAngle}function ge(t){return t&&t.padAngle}function me(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,p=(c*(e-o)-h*(t-i))/(h*u-c*l);return[t+p*u,e+p*l]}function ve(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/sr(s*s+u*u),c=l*u,h=-l*s,p=t+c,f=e+h,d=n+c,y=r+h,_=(p+d)/2,g=(f+y)/2,m=d-p,v=y-f,x=m*m+v*v,w=i-o,b=p*y-d*f,M=(v<0?-1:1)*sr(ir(0,w*w*x-b*b)),k=(b*v-m*M)/x,T=(-b*m-v*M)/x,S=(b*v+m*M)/x,A=(-b*m+v*M)/x,z=k-_,N=T-g,I=S-_,C=A-g;return z*z+N*N>I*I+C*C&&(k=S,T=A),{cx:k,cy:T,x01:-c,y01:-h,x11:k*(i/w-1),y11:T*(i/w-1)}}function xe(t){this._context=t}function we(t){return t<0?-1:1}function be(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(we(o)+we(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Me(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function ke(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,s=(o-r)/3;t._context.bezierCurveTo(r+s,i+s*e,o-s,a-s*n,o,a)}function Te(t){this._context=t}function Se(t){this._context=t}var Ae=function(){function t(t){var i,u=0;t.eachAfter(function(t){var n=t.children;n?(t.x=o(n),t.y=s(n)):(t.x=i?u+=e(t,i):0,t.y=0,i=t)});var h=l(t),p=c(t),f=h.x-e(h,p)/2,d=p.x+e(p,h)/2;return t.eachAfter(a?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*r}:function(e){e.x=(e.x-f)/(d-f)*n,e.y=(1-(t.y?e.y/t.y:1))*r})}var e=i,n=1,r=1,a=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(e){return arguments.length?(a=!1,n=+e[0],r=+e[1],t):a?null:[n,r]},t.nodeSize=function(e){return arguments.length?(a=!0,n=+e[0],r=+e[1],t):a?[n,r]:null},t};g.prototype=f.prototype={constructor:g,count:function(){return this.eachAfter(h)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=p(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return f(this).eachBefore(y)}};var ze=Array.prototype.slice,Ne=function(t){for(var e,n,r=0,i=(t=m(ze.call(t))).length,o=[];r<i;)e=t[r],n&&w(n,e)?++r:(n=M(o=v(o,e)),r=0);return n},Ie=function(t){return function(){return t}},Ce=function(){function t(t){return t.x=n/2,t.y=r/2,e?t.eachBefore(B(e)).eachAfter(q(i,.5)).eachBefore(L(1)):t.eachBefore(B(R)).eachAfter(q(P,1)).eachAfter(q(i,t.r/Math.min(n,r))).eachBefore(L(Math.min(n,r)/(2*t.r))),t}var e=null,n=1,r=1,i=P;return t.radius=function(n){return arguments.length?(e=D(n),t):e},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i="function"==typeof e?e:Ie(+e),t):i},t},De=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Ee=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(r-e)/t.value;++s<u;)(o=a[s]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*l},Pe=function(){function t(t){var a=t.height+1;return t.x0=t.y0=i,t.x1=n,t.y1=r/a,t.eachBefore(e(r,a)),o&&t.eachBefore(De),t}function e(t,e){return function(n){n.children&&Ee(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var r=n.x0,o=n.y0,a=n.x1-i,s=n.y1-i;a<r&&(r=a=(r+a)/2),s<o&&(o=s=(o+s)/2),n.x0=r,n.y0=o,n.x1=a,n.y1=s}}var n=1,r=1,i=0,o=!1;return t.round=function(e){return arguments.length?(o=!!e,t):o},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i=+e,t):i},t};$.prototype=Object.create(g.prototype);var Re=function(){function t(t){var r=U(t);if(r.eachAfter(e),r.parent.m=-r.z,r.eachBefore(n),u)t.eachBefore(i);else{var l=t,c=t,h=t;t.eachBefore(function(t){t.x<l.x&&(l=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)});var p=l===c?1:o(l,c)/2,f=p-l.x,d=a/(c.x+p+f),y=s/(h.depth||1);t.eachBefore(function(t){t.x=(t.x+f)*d,t.y=t.depth*y})}return t}function e(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e){H(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,e,n){if(e){for(var r,i=t,a=t,s=e,u=i.parent.children[0],l=i.m,c=a.m,h=s.m,p=u.m;s=V(s),i=j(i),s&&i;)u=j(u),(a=V(a)).a=t,(r=s.z+h-i.z-l+o(s._,i._))>0&&(F(W(s,t,n),t,r),l+=r,c+=r),h+=s.m,l+=i.m,p+=u.m,c+=a.m;s&&!V(a)&&(a.t=s,a.m+=h-c),i&&!j(u)&&(u.t=i,u.m+=l-p,n=t)}return n}function i(t){t.x*=a,t.y=t.depth*s}var o=O,a=1,s=1,u=null;return t.separation=function(e){return arguments.length?(o=e,t):o},t.size=function(e){return arguments.length?(u=!1,a=+e[0],s=+e[1],t):u?null:[a,s]},t.nodeSize=function(e){return arguments.length?(u=!0,a=+e[0],s=+e[1],t):u?[a,s]:null},t},Be=function(t,e,n,r,i){for(var o,a=t.children,s=-1,u=a.length,l=t.value&&(i-n)/t.value;++s<u;)(o=a[s]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*l},qe=function t(e){function n(t,n,r,i,o){G(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),Le=function(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(e),a=[0],r&&t.eachBefore(De),t}function e(t){var e=a[t.depth],r=t.x0+e,i=t.y0+e,o=t.x1-e,p=t.y1-e;o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=p,t.children&&(e=a[t.depth+1]=s(t)/2,r+=h(t)-e,i+=u(t)-e,o-=l(t)-e,p-=c(t)-e,o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),n(t,r,i,o,p))}var n=qe,r=!1,i=1,o=1,a=[0],s=P,u=P,l=P,c=P,h=P;return t.round=function(e){return arguments.length?(r=!!e,t):r},t.size=function(e){return arguments.length?(i=+e[0],o=+e[1],t):[i,o]},t.tile=function(e){return arguments.length?(n=E(e),t):n},t.padding=function(e){return arguments.length?t.paddingInner(e).paddingOuter(e):t.paddingInner()},t.paddingInner=function(e){return arguments.length?(s="function"==typeof e?e:Ie(+e),t):s},t.paddingOuter=function(e){return arguments.length?t.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):t.paddingTop()},t.paddingTop=function(e){return arguments.length?(u="function"==typeof e?e:Ie(+e),t):u},t.paddingRight=function(e){return arguments.length?(l="function"==typeof e?e:Ie(+e),t):l},t.paddingBottom=function(e){return arguments.length?(c="function"==typeof e?e:Ie(+e),t):c},t.paddingLeft=function(e){return arguments.length?(h="function"==typeof e?e:Ie(+e),t):h},t},Oe={value:function(){}};K.prototype=Z.prototype={constructor:K,on:function(t,e){var n,r=this._,i=Q(t+"",r),o=-1,a=i.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=X(r[n],t.name,e);else if(null==e)for(n in r)r[n]=X(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=J(r[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new K(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){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(e,n)}};var je,Ve,Fe=0,He=0,We=0,$e=1e3,Ue=0,Ge=0,Ze=0,Ke="object"==typeof performance&&performance.now?performance:Date,Qe="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};et.prototype=nt.prototype={constructor:et,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Y():+n)+(null==e?0:+e),this._next||Ve===this||(Ve?Ve._next=this:je=this,Ve=this),this._call=t,this._time=n,st()},stop:function(){this._call&&(this._call=null,this._time=1/0,st())}};var Je=function(t,e,n){var r=new et;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},Xe=Z("start","end","interrupt"),Ye=[],tn=0,en=1,nn=2,rn=3,on=4,an=5,sn=6,un=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};ht(t,n,{name:e,index:r,group:i,on:Xe,tween:Ye,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:tn})},ln=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){e=null==e?null:e+"";for(i in o)(n=o[i]).name===e?(r=n.state>nn&&n.state<an,n.state=sn,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},cn=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},hn="\\s*([+-]?\\d+)\\s*",pn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",fn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",dn=/^#([0-9a-f]{3})$/,yn=/^#([0-9a-f]{6})$/,_n=new RegExp("^rgb\\("+[hn,hn,hn]+"\\)$"),gn=new RegExp("^rgb\\("+[fn,fn,fn]+"\\)$"),mn=new RegExp("^rgba\\("+[hn,hn,hn,pn]+"\\)$"),vn=new RegExp("^rgba\\("+[fn,fn,fn,pn]+"\\)$"),xn=new RegExp("^hsl\\("+[pn,fn,fn]+"\\)$"),wn=new RegExp("^hsla\\("+[pn,fn,fn,pn]+"\\)$"),bn={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};cn(_t,gt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),cn(wt,function(t,e,n,r){return 1===arguments.length?xt(t):new wt(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wt(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+")")}})),cn(kt,function(t,e,n,r){return 1===arguments.length?Mt(t):new kt(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new kt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new kt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new wt(Tt(t>=240?t-240:t+120,i,r),Tt(t,i,r),Tt(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 Mn=Math.PI/180,kn=180/Math.PI,Tn=.95047,Sn=1,An=1.08883,zn=4/29,Nn=6/29,In=3*Nn*Nn,Cn=Nn*Nn*Nn;cn(At,function(t,e,n,r){return 1===arguments.length?St(t):new At(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return new At(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new At(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=Sn*Nt(t),e=Tn*Nt(e),n=An*Nt(n),new wt(It(3.2404542*e-1.5371385*t-.4985314*n),It(-.969266*e+1.8760108*t+.041556*n),It(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),cn(Et,function(t,e,n,r){return 1===arguments.length?Dt(t):new Et(t,e,n,null==r?1:r)},yt(_t,{brighter:function(t){return new Et(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new Et(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return St(this).rgb()}}));var Dn=-.14861,En=1.78277,Pn=-.29227,Rn=-.90649,Bn=1.97294,qn=Bn*Rn,Ln=Bn*En,On=En*Pn-Rn*Dn;cn(Rt,function(t,e,n,r){return 1===arguments.length?Pt(t):new Rt(t,e,n,null==r?1:r)},yt(_t,{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=isNaN(this.h)?0:(this.h+120)*Mn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new wt(255*(e+n*(Dn*r+En*i)),255*(e+n*(Pn*r+Rn*i)),255*(e+n*(Bn*r)),this.opacity)}}));var jn=function(t,n){var r;return("number"==typeof n?e.interpolateNumber:n instanceof gt?e.interpolateRgb:(r=gt(n))?(n=r,e.interpolateRgb):e.interpolateString)(t,n)},Vn=e.selection.prototype.constructor,Fn=0,Hn=e.selection.prototype;oe.prototype=function(t){return e.selection().transition(t)}.prototype={constructor:oe,select:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),s=0;s<o;++s)for(var u,l,c=i[s],h=c.length,p=a[s]=new Array(h),f=0;f<h;++f)(u=c[f])&&(l=t.call(u,u.__data__,f,c))&&("__data__"in u&&(l.__data__=u.__data__),p[f]=l,un(p[f],n,r,f,p,ct(u,r)));return new oe(a,this._parents,n,r)},selectAll:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selectorAll(t));for(var i=this._groups,o=i.length,a=[],s=[],u=0;u<o;++u)for(var l,c=i[u],h=c.length,p=0;p<h;++p)if(l=c[p]){for(var f,d=t.call(l,l.__data__,p,c),y=ct(l,r),_=0,g=d.length;_<g;++_)(f=d[_])&&un(f,n,r,_,d,y);a.push(d),s.push(l)}return new oe(a,s,n,r)},filter:function(t){"function"!=typeof t&&(t=e.matcher(t));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a,s=n[o],u=s.length,l=i[o]=[],c=0;c<u;++c)(a=s[c])&&t.call(a,a.__data__,c,s)&&l.push(a);return new oe(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,p=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(p[f]=u);for(;s<r;++s)a[s]=e[s];return new oe(a,this._parents,this._name,this._id)},selection:function(){return new Vn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ae(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=ct(a,e);un(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new oe(r,this._parents,t,n)},call:Hn.call,nodes:Hn.nodes,node:Hn.node,size:Hn.size,empty:Hn.empty,each:Hn.each,on:function(t,e){var n=this._id;return arguments.length<2?ct(this.node(),n).on.on(t):this.each(Qt(n,t,e))},attr:function(t,n){var r=e.namespace(t),i="transform"===r?e.interpolateTransformSvg:jn;return this.attrTween(t,"function"==typeof n?(r.local?Vt:jt)(r,i,dt(this,"attr."+t,n)):null==n?(r.local?qt:Bt)(r):(r.local?Ot:Lt)(r,i,n+""))},attrTween:function(t,n){var r="attr."+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;var i=e.namespace(t);return this.tween(r,(i.local?Ft:Ht)(i,n))},style:function(t,n,r){var i="transform"==(t+="")?e.interpolateTransformCss:jn;return null==n?this.styleTween(t,Xt(t,i)).on("end.style."+t,Yt(t)):this.styleTween(t,"function"==typeof n?ee(t,i,dt(this,"style."+t,n)):te(t,i,n+""),r)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,ne(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?ie(dt(this,"text",t)):re(null==t?"":t+""))},remove:function(){return this.on("end.remove",Jt(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ct(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?pt:ft)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Wt:$t)(e,t)):ct(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ut:Gt)(e,t)):ct(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Zt(e,t)):ct(this.node(),e).ease}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var Wn=2*Math.PI,$n=(function t(e,n){function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Wn);return r.amplitude=function(e){return t(e,n*Wn)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Wn);return r.amplitude=function(e){return t(e,n*Wn)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Wn);return r.amplitude=function(e){return t(e,n*Wn)},r.period=function(n){return t(e,n)},r}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});e.selection.prototype.interrupt=function(t){return this.each(function(){ln(this,t)})},e.selection.prototype.transition=function(t){var e,n;t instanceof oe?(e=t._id,t=t._name):(e=ae(),(n=$n).time=Y(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&un(a,t,e,l,s,n||se(a,e));return new oe(r,this._parents,t,e)},r(".tree_CirclePacking circle {\r\n fill: rgb(31, 119, 180);\r\n fill-opacity: .25;\r\n stroke: rgb(31, 119, 180);\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_CirclePacking .leaf circle {\r\n fill: #ff7f0e;\r\n fill-opacity: 1;\r\n}\r\n\r\n.tree_CirclePacking .label {\r\n fill:white;\r\n text-anchor: middle;\r\n}\r\n",void 0);var Un=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.enter=function(t,e){this.diameter=Math.min(this.width(),this.height()),this.pack=Ce().size([this.diameter-4,this.diameter-4]).padding(1.5),this.svg=e.append("g").attr("transform","rotate(30)")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.svg.selectAll("circle").remove(),this.svg.selectAll("text").remove();var i=f(this.data()).sum(function(){return 1}).sort(function(t,e){return t[1]<e[1]?-1:t[1]>e[1]?1:0});this._focus=i,this.pack(i),this.circle=this.svg.selectAll("circle").data(i.descendants()).enter().append("circle").attr("class",function(t){return t.parent?t.children?"node":"node leaf":"node root"}).style("fill",function(t){return r._palette(t.data.label)}).on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){this._focus!==t&&r.zoom(t),e.event.stopPropagation()}),this.circle.append("title").text(function(t){return t.data.label}),this.svg.selectAll("text").data(i.descendants()).enter().append("text").attr("class","label").style("fill-opacity",function(t){return t.parent===i?1:0}).style("display",function(t){return t.parent===i?null:"none"}).text(function(t){return t.data.label}),this._node=this.svg.selectAll("circle,text"),this.zoomTo([i.x,i.y,2*i.r])},r.prototype.zoom=function(t){function n(t){return t===r._focus&&!t.children||t.parent===r._focus}this._focus=t;var r=this;this.svg.transition().duration(e.event.altKey?7500:750).tween("zoom",function(){var t=e.interpolateZoom(r.view,[r._focus.x,r._focus.y,2*r._focus.r]);return function(e){r.zoomTo(t(e))}}).selectAll("text").filter(function(t){return n(t)||"inline"===this.style.display}).style("fill-opacity",function(t){return n(t)?1:0}).on("start",function(t){n(t)&&(this.style.display="inline")}).on("end",function(t){n(t)||(this.style.display="none")})},r.prototype.zoomTo=function(t){var e=this.diameter/t[2];this.view=t,this._node.attr("transform",function(n){return"translate("+(n.x-t[0])*e+","+(n.y-t[1])*e+")"}),this.circle.attr("r",function(t){return t.r*e})},r}(e.SVGWidget);Un.prototype._class+=" tree_CirclePacking",Un.prototype.implements(n.ITree.prototype),Un.prototype.publish("paletteID","default","set","Palette ID",Un.prototype._palette.switch(),{tags:["Basic","Shared"]}),Un.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Dendrogram .node {\r\n}\r\n\r\n.tree_Dendrogram .node circle {\r\n fill: #dcf1ff;\r\n stroke: #1f77b4;\r\n stroke-width: 1.0px;\r\n}\r\n\r\n.tree_Dendrogram .node.selected circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over circle {\r\n stroke: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.selected text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over text {\r\n fill: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node text {\r\n font-size: 14px;\r\n}\r\n\r\n.tree_Dendrogram .link {\r\n fill: none;\r\n stroke: #656565;\r\n stroke-width: 1.0px;\r\n}\r\n",void 0);var Gn=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Gn.prototype._class+=" tree_Dendrogram.DendrogramColumn",Gn.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var Zn=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3LayoutCluster=Ae(),r._d3LayoutTree=Re(),r}return e.__extends(r,t),r.prototype.dendrogramData=function(){function t(e){return{label:e.key,children:e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._renderElement.attr("opacity",0).transition().duration(500).attr("opacity",1),this._selection.widgetElement(this._renderElement)},r.prototype.update=function(n,r){function i(t){return"M"+t.parent.x+","+t.parent.y+"C"+t.parent.x+","+(t.parent.y+t.y)/2+" "+t.x+","+(t.parent.y+t.y)/2+" "+t.x+","+t.y}function o(t){return"M"+t.y+","+t.x+"C"+(t.y+t.parent.y)/2+","+t.x+" "+(t.y+t.parent.y)/2+","+t.parent.x+" "+t.parent.y+","+t.parent.x}function a(t){return h?i(t):o(t)}function s(t,e){var n=(t-90)/180*Math.PI,r=e;return[r*Math.cos(n),r*Math.sin(n)]}function u(t){return"M"+s(t.x,t.y)+"C"+s(t.x,(t.y+t.parent.y)/2)+" "+s(t.parent.x,(t.y+t.parent.y)/2)+" "+s(t.parent.x,t.parent.y)}function l(t){return c.radial()?"rotate("+(t.x-90)+")translate("+t.y+")":"horizontal"===c.orientation()?"translate("+t.y+","+t.x+")":"translate("+t.x+","+t.y+")"}t.prototype.update.call(this,n,r);var c=this,h="vertical"===this.orientation();this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._d3Layout=this.dendrogram()?this._d3LayoutCluster:this._d3LayoutTree,this.radial()?(this._d3Layout.size([360,2*this.separation()]),this._d3Layout.separation(function(t,e){return(t.parent===e.parent?1:2)/t.depth})):(this._d3Layout.nodeSize([14,this.separation()]),this._d3Layout.separation(function(t,e){return t.parent===e.parent?1:2}));var p=f(this.dendrogramData());this._d3Layout(p);var d=p.descendants(),y=p.descendants().slice(1),_=this._renderCount?500:0,g=this._renderElement.selectAll(".link").data(y);g.enter().append("path").attr("class","link").attr("d",this.radial()?u:a),g.transition().duration(_).attr("d",this.radial()?u:a),g.exit().remove();var m=this.circleRadius()+2,v=this._renderElement.selectAll(".node").data(d);v.transition().duration(_).attr("transform",l);var x=v.enter().append("g").attr("class","node").attr("transform",l).call(this._selection.enter.bind(this._selection)).on("click",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.click(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).on("dblclick",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.dblclick(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).each(function(){var t=e.select(this);t.append("circle"),t.append("text")});x.merge(v).select("circle").attr("r",this.circleRadius()).style("fill",function(t){return c._palette(t.data.label)}).append("title").text(function(t){return t.data.label}),x.merge(v).select("text").attr("dx",function(t){return c.radial()?t.children?t.x<180?-m:m:t.x<180?m:-m:h?t.children?m:-m:t.children?-m:m}).attr("dy","0.25em").style("text-anchor",function(t){return c.radial()?t.children?t.x<180?"end":"start":t.x<180?"start":"end":h?t.children?"start":"end":t.children?"end":"start"}).attr("transform",function(t){return c.radial()?t.x<180?null:"rotate(180)":h?"rotate(-66)":null}).text(function(t){return t.data.label}),v.exit().remove(),this._renderCount||c.zoomToFit()},r}(e.SVGZoomWidget);Zn.prototype._class+=" tree_Dendrogram",Zn.prototype.implements(n.ITree.prototype),Zn.prototype.mixin(e.Utility.SimpleSelectionMixin),Zn.prototype.Column=Gn,Zn.prototype.publish("paletteID","default","set","Palette ID",Zn.prototype._palette.switch(),{tags:["Basic","Shared"]}),Zn.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),Zn.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Gn}),Zn.prototype.publish("circleRadius",4.5,"number","Text offset from circle"),Zn.prototype.publish("separation",240,"number","Leaf Separation"),Zn.prototype.publish("dendrogram",!0,"boolean","Dendrogram"),Zn.prototype.publish("radial",!1,"boolean","Radial"),Zn.prototype.publish("orientation","horizontal","set","Orientation",["horizontal","vertical"],{tags:["Private"],disable:function(t){return t.radial()}}),r(".tree_Indented .node rect {\r\n cursor: pointer;\r\n fill: #fff;\r\n stroke: #3182bd;\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_Indented .node text {\r\n font: 10px sans-serif;\r\n pointer-events: none;\r\n}\r\n\r\n.tree_Indented path.link {\r\n fill: none;\r\n stroke: #9ecae1;\r\n stroke-width: 1.5px;\r\n}",void 0);var Kn=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Kn.prototype._class+=" tree_Dendrogram.IndentedColumn",Kn.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var Qn=function(t){function r(){var r=t.call(this)||this;return r._collapsed={},n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3Tree=Re(),r}return e.__extends(r,t),r.prototype.xmlToData=function(t,e){return void 0===e&&(e=""),DOMParser?ue((new DOMParser).parseFromString(t,"text/xml"),e).children[0]:[]},r.prototype.xml=function(t){return arguments.length?(this._xml=t,this.data(this.xmlToData(this._xml)),this):this._xml},r.prototype.IndentedData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}if(this.xmlColumn_exists()){var e=this.columns().indexOf(this.xmlColumn()),n={label:this.xmlColumn(),children:this.data().map(function(t,n){return this.xmlToData(t[e],"["+n+"]")},this)};return 1===n.children.length?n.children[0]:n}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._svgLinks=this._renderElement.append("g"),this._svgNodes=this._renderElement.append("g"),this._selection.widgetElement(this._svgNodes)},r.prototype.update=function(n,r){function i(t){return(t.parent?i(t.parent)+".":"")+t.data.label}function o(t){return"M"+t.parent.y+","+t.parent.x+"V"+t.x+", H"+t.y}var a=this;t.prototype.update.call(this,n,r);var s=this;this._d3Tree.nodeSize([0,this.barHeight()]);var u=this._db.dataChecksum();this._prevDataChecksum!==u&&(this._treeData=this.IndentedData(),this._prevDataChecksum=u);var l=f(this.data()).sum(function(t){return t.size||50}).each(function(t){a._collapsed[i(t)]&&delete t.children}),c=this._d3Tree(l).descendants(),h=this._d3Tree(l).descendants().slice(1),p=0;l.eachBefore(function(t){t.x=p*s.barHeight(),++p});var d=this.barHeight()-4,y=this._renderCount?500:0,_=this._svgLinks.selectAll(".link").data(h,function(t){return i(t)});_.enter().append("path").attr("class","link").attr("d",o),_.transition().duration(y).attr("d",o),_.exit().remove();var g=this._svgNodes.selectAll(".node").data(c,function(t){return i(t)});g.transition().duration(y).attr("transform",function(t){return"translate("+t.y+","+t.x+")"});var m=g.enter().append("g").attr("class","node").attr("transform",function(t){return"translate("+t.y+","+t.x+")"}).call(this._selection.enter.bind(this._selection)).each(function(){var t=e.select(this);t.append("rect").attr("height",d).attr("width",d).on("click",function(t){s._collapsed[i(t)]?delete s._collapsed[i(t)]:t.children&&(s._collapsed[i(t)]=!0),s.lazyRender()}),t.append("text")}).style("opacity",0);m.transition().style("opacity",1),m.merge(g).select("rect").attr("x",-d/2).attr("y",-d/2).style("fill",function(t){return s._collapsed[i(t)]?"#3182bd":t.children?"#c6dbef":"#fd8d3c"}),m.merge(g).select("text").attr("dx",d/2+4+"px").attr("dy","0.33em").text(function(t){return t.data.label}),g.exit().transition().style("opacity",0).remove(),this._renderCount||s.zoomToFit()},r}(e.SVGZoomWidget);Qn.prototype._class+=" tree_Indented",Qn.prototype.implements(n.ITree.prototype),Qn.prototype.mixin(e.Utility.SimpleSelectionMixin),Qn.prototype.Column=Kn,Qn.prototype.publish("xmlColumn",null,"set","Field",function(){return this.columns()},{optional:!0}),Qn.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Kn,disable:function(t){return t.xmlColumn_exists()}}),Qn.prototype.publish("barHeight",16,"number","Bar height");var Jn=Math.PI,Xn=2*Jn,Yn=Xn-1e-6;le.prototype=ce.prototype={constructor:le,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,s=n-t,u=r-e,l=o-t,c=a-e,h=l*l+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*s-u*l)>1e-6&&i){var p=n-o,f=r-a,d=s*s+u*u,y=p*p+f*f,_=Math.sqrt(d),g=Math.sqrt(h),m=i*Math.tan((Jn-Math.acos((d+h-y)/(2*_*g)))/2),v=m/g,x=m/_;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*l)+","+(e+v*c)),this._+="A"+i+","+i+",0,0,"+ +(c*p>l*f)+","+(this._x1=t+x*s)+","+(this._y1=e+x*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%Xn+Xn),h>Yn?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+c+","+(this._x1=u)+","+(this._y1=l):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Jn)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var tr=function(t){return function(){return t}},er=Math.abs,nr=Math.atan2,rr=Math.cos,ir=Math.max,or=Math.min,ar=Math.sin,sr=Math.sqrt,ur=1e-12,lr=Math.PI,cr=lr/2,hr=2*lr,pr=function(){function t(){var t,l,c=+e.apply(this,arguments),h=+n.apply(this,arguments),p=o.apply(this,arguments)-cr,f=a.apply(this,arguments)-cr,d=er(f-p),y=f>p;if(u||(u=t=ce()),h<c&&(l=h,h=c,c=l),h>ur)if(d>hr-ur)u.moveTo(h*rr(p),h*ar(p)),u.arc(0,0,h,p,f,!y),c>ur&&(u.moveTo(c*rr(f),c*ar(f)),u.arc(0,0,c,f,p,y));else{var _,g,m=p,v=f,x=p,w=f,b=d,M=d,k=s.apply(this,arguments)/2,T=k>ur&&(i?+i.apply(this,arguments):sr(c*c+h*h)),S=or(er(h-c)/2,+r.apply(this,arguments)),A=S,z=S;if(T>ur){var N=pe(T/c*ar(k)),I=pe(T/h*ar(k));(b-=2*N)>ur?(N*=y?1:-1,x+=N,w-=N):(b=0,x=w=(p+f)/2),(M-=2*I)>ur?(I*=y?1:-1,m+=I,v-=I):(M=0,m=v=(p+f)/2)}var C=h*rr(m),D=h*ar(m),E=c*rr(w),P=c*ar(w);if(S>ur){var R=h*rr(v),B=h*ar(v),q=c*rr(x),L=c*ar(x);if(d<lr){var O=b>ur?me(C,D,q,L,R,B,E,P):[E,P],j=C-O[0],V=D-O[1],F=R-O[0],H=B-O[1],W=1/ar(he((j*F+V*H)/(sr(j*j+V*V)*sr(F*F+H*H)))/2),$=sr(O[0]*O[0]+O[1]*O[1]);A=or(S,(c-$)/(W-1)),z=or(S,(h-$)/(W+1))}}M>ur?z>ur?(_=ve(q,L,C,D,h,z,y),g=ve(R,B,E,P,h,z,y),u.moveTo(_.cx+_.x01,_.cy+_.y01),z<S?u.arc(_.cx,_.cy,z,nr(_.y01,_.x01),nr(g.y01,g.x01),!y):(u.arc(_.cx,_.cy,z,nr(_.y01,_.x01),nr(_.y11,_.x11),!y),u.arc(0,0,h,nr(_.cy+_.y11,_.cx+_.x11),nr(g.cy+g.y11,g.cx+g.x11),!y),u.arc(g.cx,g.cy,z,nr(g.y11,g.x11),nr(g.y01,g.x01),!y))):(u.moveTo(C,D),u.arc(0,0,h,m,v,!y)):u.moveTo(C,D),c>ur&&b>ur?A>ur?(_=ve(E,P,R,B,c,-A,y),g=ve(C,D,q,L,c,-A,y),u.lineTo(_.cx+_.x01,_.cy+_.y01),A<S?u.arc(_.cx,_.cy,A,nr(_.y01,_.x01),nr(g.y01,g.x01),!y):(u.arc(_.cx,_.cy,A,nr(_.y01,_.x01),nr(_.y11,_.x11),!y),u.arc(0,0,c,nr(_.cy+_.y11,_.cx+_.x11),nr(g.cy+g.y11,g.cx+g.x11),y),u.arc(g.cx,g.cy,A,nr(g.y11,g.x11),nr(g.y01,g.x01),!y))):u.arc(0,0,c,w,x,y):u.lineTo(E,P)}else u.moveTo(0,0);if(u.closePath(),t)return u=null,t+""||null}var e=fe,n=de,r=tr(0),i=null,o=ye,a=_e,s=ge,u=null;return t.centroid=function(){var t=(+e.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-lr/2;return[rr(r)*t,ar(r)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:tr(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:tr(+e),t):n},t.cornerRadius=function(e){return arguments.length?(r="function"==typeof e?e:tr(+e),t):r},t.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:tr(+e),t):i},t.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:tr(+e),t):o},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:tr(+e),t):a},t.padAngle=function(e){return arguments.length?(s="function"==typeof e?e:tr(+e),t):s},t.context=function(e){return arguments.length?(u=null==e?null:e,t):u},t};xe.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};Te.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ke(this,this._t0,Me(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,t!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ke(this,Me(this,n=be(this,t,e)),n);break;default:ke(this,this._t0,n=be(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(function(t){this._context=new Se(t)}.prototype=Object.create(Te.prototype)).point=function(t,e){Te.prototype.point.call(this,e,t)},Se.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},r(".tree_Sunburst path {\r\n stroke: #fff;\r\n stroke-width:0.5px;\r\n fill-rule: evenodd;\r\n}\r\n",void 0);var fr=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.data=function(t){var n=e.SVGWidget.prototype.data.apply(this,arguments);return arguments.length&&(this._resetRoot=!0),n},r.prototype.enter=function(t,n){var r=this;this.radius=Math.min(this.width(),this.height())/2,this._xScale=e.scaleLinear().range([0,2*Math.PI]),this._yScale=e.scaleSqrt().range([0,this.radius]),this.partition=Pe(),this.arc=pr().startAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x0)))}).endAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x1)))}).innerRadius(function(t){return Math.max(0,r._yScale(t.y0))}).outerRadius(function(t){return Math.max(0,r._yScale(t.y1))}),this.svg=n.append("g")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.radius=Math.min(this.width(),this.height())/2,this._yScale.range([0,this.radius]);var i=f(this.data()).sum(function(t){return void 0!==t.size?t.size:1}),o=this.svg.selectAll("path").data(this.partition(i).descendants(),function(t,e){return void 0!==t.data.label?t.data.label:e});o.enter().append("path").on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){e.event&&e.event.stopPropagation(),r.zoomTo(t)}).each(function(){e.select(this).append("title")}).merge(o).attr("d",this.arc).style("fill",function(t){return t.data.__viz_fill?t.data.__viz_fill:r._palette(t.data.label)}).style("stroke",function(t){return t.value>16?"white":"none"}).select("title").text(function(t){return t.data.label}),o.exit().remove(),this._resetRoot&&(this._resetRoot=!1,this.zoomTo(i))},r.prototype.zoomTo=function(t){var n=this;this.svg.transition().duration(750).tween("scale",function(){var r=e.interpolate(n._xScale.domain(),[t.x0,t.x1]),i=e.interpolate(n._yScale.domain(),[t.y0,1]),o=e.interpolate(n._yScale.range(),[t.y0?20:0,n.radius]);return function(t){n._xScale.domain(r(t)),n._yScale.domain(i(t)).range(o(t))}}).selectAll("path").attrTween("d",function(t){return function(){return n.arc(t)}})},r}(e.SVGWidget);fr.prototype._class+=" tree_SunburstPartition",fr.prototype.implements(n.ITree.prototype),fr.prototype.publish("paletteID","default","set","Palette ID",fr.prototype._palette.switch(),{tags:["Basic","Shared"]}),fr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Treemap .node {\r\n border: solid 1px white;\r\n overflow: hidden;\r\n text-overflow:ellipsis;\r\n position: absolute;\r\n text-indent: 2px;\r\n}\r\n\r\n.tree_Treemap .node.selected {\r\n border-color: red;\r\n}\r\n\r\n.tree_Treemap .node.over {\r\n border-color: orange;\r\n}\r\n\r\n.tree_Treemap .node.selected.over {\r\n border-color: red;\r\n}\r\n",void 0);var dr=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);dr.prototype._class+=" tree_Dendrogram.TreemapColumn",dr.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var yr=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r}return e.__extends(r,t),r.prototype.treemapData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.aggregateView(this.mappings().map(function(t){return t.column()}),this.aggrType(),this.aggrColumn()).entries()}):this.data()},r.prototype.enter=function(t,n){e.HTMLWidget.prototype.enter.apply(this,arguments),this._d3Treemap=Le(),this._elementDIV=n.append("div"),this._selection.widgetElement(this._elementDIV)},r.prototype.update=function(t,n){e.HTMLWidget.prototype.update.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var r=f(this.treemapData()).sum(function(t){return t.size||50});this._d3Treemap.size([this.width(),this.height()]),this._d3Treemap(r),this._elementDIV.style("font-size",this.fontSize_exists()?this.fontSize()+"px":null).style("line-height",this.fontSize_exists()?this.fontSize()+2+"px":null);var i=this,o=this._elementDIV.selectAll(".node").data(r.descendants());o.enter().append("div").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",function(t){if(t&&t.origRows){var e="";i.mappings().forEach(function(t){t.column()&&(e=t.column())}),i.click(i.rowToObj(t.origRows[0]),e,i._selection.selected(this))}}).on("dblclick",function(t){if(t&&t.origRows){var e="";i.mappings().forEach(function(t){t.column()&&(e=t.column())}),i.dblclick(i.rowToObj(t.origRows[0]),e,i._selection.selected(this))}}).style("left",function(t){return t.x0+Math.max(0,t.x1-t.x0)/2+"px"}).style("top",function(t){return t.y0+Math.max(0,t.y1-t.y0)/2+"px"}).style("width",function(){return"0px"}).style("height",function(){return"0px"}).merge(o).attr("title",function(t){if(t.children)return null;for(var e=t.data.label+" ("+t.value+")";t.parent&&t.parent.parent;)e=t.parent.data.label+" -> "+e,t=t.parent;return e}).text(function(t){return t.children?null:t.data.label}).style("background",function(t){return t.children?i._palette(t.data.label):null}).transition().duration(this.transitionDuration()).style("opacity",function(t){return t.children?1:null}).style("left",function(t){return t.x0+"px"}).style("top",function(t){return t.y0+"px"}).style("width",function(t){return Math.max(0,t.x1-t.x0)+"px"}).style("height",function(t){return Math.max(0,t.y1-t.y0)+"px"}),o.exit().transition().duration(this.transitionDuration()).style("opacity",0).remove()},r.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},r}(e.HTMLWidget);yr.prototype._class+=" tree_Treemap",yr.prototype.implements(n.ITree.prototype),yr.prototype.mixin(e.Utility.SimpleSelectionMixin),yr.prototype.Column=dr,yr.prototype.publish("paletteID","default","set","Palette ID",yr.prototype._palette.switch(),{tags:["Basic","Shared"]}),yr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),yr.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:dr}),yr.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0}),yr.prototype.publish("aggrColumn",null,"set","Aggregation Field",function(){return this.columns()},{optional:!0,disable:function(t){return!t.aggrType()}}),yr.prototype.publish("fontSize",null,"number","Font Size",null,{optional:!0}),yr.prototype.publish("transitionDuration",250,"number","Transition Duration"),t.CirclePacking=Un,t.DendrogramColumn=Gn,t.Dendrogram=Zn,t.IndentedColumn=Kn,t.Indented=Qn,t.SunburstPartition=fr,t.TreemapColumn=dr,t.Treemap=yr,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/api")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/api"],e):e(t["@hpcc-js/tree"]={},t["@hpcc-js/common"],t["@hpcc-js/api"])}(this,function(t,e,n){"use strict";function r(t,e){if("undefined"==typeof document)return e;t=t||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");return r.type="text/css",n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t)),e}function i(t,e){return t.parent===e.parent?1:2}function o(t){return t.reduce(a,0)/t.length}function a(t,e){return t+e.x}function l(t){return 1+t.reduce(s,0)}function s(t,e){return Math.max(t,e.y)}function u(t){for(var e;e=t.children;)t=e[0];return t}function c(t){for(var e;e=t.children;)t=e[e.length-1];return t}function h(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function p(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;for(t=n.pop(),e=r.pop();t===e;)i=t,t=n.pop(),e=r.pop();return i}function f(t,e){var n,r,i,o,a,l=new m(t),s=+t.value&&(l.value=t.value),u=[l];for(null==e&&(e=d);n=u.pop();)if(s&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)u.push(r=n.children[o]=new m(i[o])),r.parent=n,r.depth=n.depth+1;return l.eachBefore(_)}function d(t){return t.children}function y(t){t.data=t.data.data}function _(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function m(t){this.data=t,this.depth=this.height=0,this.parent=null}function g(t){this._=t,this.next=null}function v(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r-e.r;return i*i+1e-6>n*n+r*r}function x(t,e){var n,r,i,o=null,a=t.head;switch(e.length){case 1:n=w(e[0]);break;case 2:n=b(e[0],e[1]);break;case 3:n=M(e[0],e[1],e[2])}for(;a;)i=a._,r=a.next,n&&v(n,i)?o=a:(o?(t.tail=o,o.next=null):t.head=t.tail=null,e.push(i),n=x(t,e),e.pop(),t.head?(a.next=t.head,t.head=a):(a.next=null,t.head=t.tail=a),(o=t.tail).next=r),a=r;return t.tail=o,n}function w(t){return{x:t.x,y:t.y,r:t.r}}function b(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,l=e.r,s=o-n,u=a-r,c=l-i,h=Math.sqrt(s*s+u*u);return{x:(n+o+s/h*c)/2,y:(r+a+u/h*c)/2,r:(h+i+l)/2}}function M(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,l=e.y,s=e.r,u=n.x,c=n.y,h=n.r,p=2*(r-a),f=2*(i-l),d=2*(s-o),y=r*r+i*i-o*o-a*a-l*l+s*s,_=2*(r-u),m=2*(i-c),g=2*(h-o),v=r*r+i*i-o*o-u*u-c*c+h*h,x=_*f-p*m,w=(f*v-m*y)/x-r,b=(m*d-f*g)/x,M=(_*y-p*v)/x-i,k=(p*g-_*d)/x,T=b*b+k*k-1,S=2*(w*b+M*k+o),A=w*w+M*M-o*o,z=(-S-Math.sqrt(S*S-4*T*A))/(2*T);return{x:w+b*z+r,y:M+k*z+i,r:z}}function k(t,e,n){var r=t.x,i=t.y,o=e.r+n.r,a=t.r+n.r,l=e.x-r,s=e.y-i,u=l*l+s*s;if(u){var c=.5+((a*=a)-(o*=o))/(2*u),h=Math.sqrt(Math.max(0,2*o*(a+u)-(a-=u)*a-o*o))/(2*u);n.x=r+c*l+h*s,n.y=i+c*s-h*l}else n.x=r+a,n.y=i}function T(t,e){var n=e.x-t.x,r=e.y-t.y,i=t.r+e.r;return i*i-1e-6>n*n+r*r}function S(t,e,n){var r=t._,i=t.next._,o=r.r+i.r,a=(r.x*i.r+i.x*r.r)/o-e,l=(r.y*i.r+i.y*r.r)/o-n;return a*a+l*l}function A(t){this._=t,this.next=null,this.previous=null}function z(t){if(!(i=t.length))return 0;var e,n,r,i;if(e=t[0],e.x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;k(n,e,r=t[2]);var o,a,l,s,u,c,h,p=e.r*e.r,f=n.r*n.r,d=r.r*r.r,y=p+f+d,_=p*e.x+f*n.x+d*r.x,m=p*e.y+f*n.y+d*r.y;e=new A(e),n=new A(n),r=new A(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(l=3;l<i;++l){k(e._,n._,r=t[l]),r=new A(r),s=n.next,u=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(T(s._,r._)){n=s,e.next=n,n.previous=e,--l;continue t}c+=s._.r,s=s.next}else{if(T(u._,r._)){(e=u).next=n,n.previous=e,--l;continue t}h+=u._.r,u=u.previous}}while(s!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,y+=d=r._.r*r._.r,p=S(e,o=(_+=d*r._.x)/y,a=(m+=d*r._.y)/y);(r=r.next)!==n;)(d=S(r,o,a))<p&&(e=r,p=d);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Se(e),l=0;l<i;++l)e=t[l],e.x-=r.x,e.y-=r.y;return r.r}function N(t){return null==t?null:I(t)}function I(t){if("function"!=typeof t)throw new Error;return t}function C(){return 0}function D(t){return Math.sqrt(t.value)}function E(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function P(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,l=t(n)*e||0;if(l)for(i=0;i<a;++i)r[i].r+=l;if(o=z(r),l)for(i=0;i<a;++i)r[i].r-=l;n.r=o+l}}}function R(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function B(t,e){return t.parent===e.parent?1:2}function q(t){var e=t.children;return e?e[0]:t.t}function L(t){var e=t.children;return e?e[e.length-1]:t.t}function O(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function j(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}function V(t,e,n){return t.a.parent===e.parent?t.a:n}function F(t,e){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=e}function H(t){for(var e,n,r,i,o,a=new F(t,0),l=[a];e=l.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)l.push(n=e.children[i]=new F(r[i],i)),n.parent=e;return(a.parent=new F(null,0)).children=[a],a}function W(t,e,n,r,i,o){for(var a,l,s,u,c,h,p,f,d,y,_,m=[],g=e.children,v=0,x=0,w=g.length,b=e.value;v<w;){s=i-n,u=o-r;do{c=g[x++].value}while(!c&&x<w);for(h=p=c,_=c*c*(y=Math.max(u/s,s/u)/(b*t)),d=Math.max(p/_,_/h);x<w;++x){if(c+=l=g[x].value,l<h&&(h=l),l>p&&(p=l),_=c*c*y,(f=Math.max(p/_,_/h))>d){c-=l;break}d=f}m.push(a={value:c,dice:s<u,children:g.slice(v,x)}),a.dice?Ie(a,n,r,i,b?r+=u*c/b:o):Ee(a,n,r,b?n+=s*c/b:i,o),b-=c,v=x}return m}function $(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new U(r)}function U(t){this._=t}function G(t,e){return t.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}function Z(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function K(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Be,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function Q(){return We||(Ge(J),We=Ue.now()+$e)}function J(){We=0}function X(){this._call=this._time=this._next=null}function Y(t,e,n){var r=new X;return r.restart(t,e,n),r}function tt(){Q(),++Oe;for(var t,e=qe;e;)(t=We-e._time)>=0&&e._call.call(null,t),e=e._next;--Oe}function et(){We=(He=Ue.now())+$e,Oe=je=0;try{tt()}finally{Oe=0,rt(),We=0}}function nt(){var t=Ue.now(),e=t-He;e>Fe&&($e-=e,He=t)}function rt(){for(var t,e,n=qe,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:qe=e);Le=t,it(r)}function it(t){Oe||(je&&(je=clearTimeout(je)),t-We>24?(t<1/0&&(je=setTimeout(et,t-Ue.now()-$e)),Ve&&(Ve=clearInterval(Ve))):(Ve||(He=Ue.now(),Ve=setInterval(nt,Fe)),Oe=1,Ge(et)))}function ot(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>Je)throw new Error("too late");return n}function at(t,e){var n=t.__transition;if(!n||!(n=n[e])||n.state>Ye)throw new Error("too late");return n}function lt(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("too late");return n}function st(t,e,n){function r(s){var u,c,h,p;if(n.state!==Xe)return o();for(u in l)if((p=l[u]).name===n.name){if(p.state===tn)return Ze(r);p.state===en?(p.state=rn,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete l[u]):+u<e&&(p.state=rn,p.timer.stop(),delete l[u])}if(Ze(function(){n.state===tn&&(n.state=en,n.timer.restart(i,n.delay,n.time),i(s))}),n.state=Ye,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ye){for(n.state=tn,a=new Array(h=n.tween.length),u=0,c=-1;u<h;++u)(p=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(a[++c]=p);a.length=c+1}}function i(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(o),n.state=nn,1),i=-1,l=a.length;++i<l;)a[i].call(null,r);n.state===nn&&(n.on.call("end",t,t.__data__,n.index,n.group),o())}function o(){n.state=rn,n.timer.stop(),delete l[e];for(var r in l)return;delete t.__transition}var a,l=t.__transition;l[e]=n,n.timer=Y(function(t){n.state=Xe,n.timer.restart(r,n.delay,n.time),n.delay<=t&&r(t-n.delay)},0,n.time)}function ut(t,e){var n,r;return function(){var i=at(this,t),o=i.tween;if(o!==n)for(var a=0,l=(r=n=o).length;a<l;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function ct(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=at(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var l={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=l;break}s===u&&i.push(l)}o.tween=i}}function ht(t,e,n){var r=t._id;return t.each(function(){var t=at(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return lt(t,r).value[e]}}function pt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ft(){}function dt(t){var e;return t=(t+"").trim().toLowerCase(),(e=hn.exec(t))?(e=parseInt(e[1],16),new gt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1)):(e=pn.exec(t))?yt(parseInt(e[1],16)):(e=fn.exec(t))?new gt(e[1],e[2],e[3],1):(e=dn.exec(t))?new gt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=yn.exec(t))?_t(e[1],e[2],e[3],e[4]):(e=_n.exec(t))?_t(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=mn.exec(t))?vt(e[1],e[2]/100,e[3]/100,1):(e=gn.exec(t))?vt(e[1],e[2]/100,e[3]/100,e[4]):vn.hasOwnProperty(t)?yt(vn[t]):"transparent"===t?new gt(NaN,NaN,NaN,0):null}function yt(t){return new gt(t>>16&255,t>>8&255,255&t,1)}function _t(t,e,n,r){return r<=0&&(t=e=n=NaN),new gt(t,e,n,r)}function mt(t){return t instanceof ft||(t=dt(t)),t?(t=t.rgb(),new gt(t.r,t.g,t.b,t.opacity)):new gt}function gt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function vt(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new wt(t,e,n,r)}function xt(t){if(t instanceof wt)return new wt(t.h,t.s,t.l,t.opacity);if(t instanceof ft||(t=dt(t)),!t)return new wt;if(t instanceof wt)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,l=o-i,s=(o+i)/2;return l?(a=e===o?(n-r)/l+6*(n<r):n===o?(r-e)/l+2:(e-n)/l+4,l/=s<.5?o+i:2-o-i,a*=60):l=s>0&&s<1?0:a,new wt(a,l,s,t.opacity)}function wt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function bt(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function Mt(t){if(t instanceof kt)return new kt(t.l,t.a,t.b,t.opacity);if(t instanceof It){var e=t.h*xn;return new kt(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof gt||(t=mt(t));var n=zt(t.r),r=zt(t.g),i=zt(t.b),o=Tt((.4124564*n+.3575761*r+.1804375*i)/bn),a=Tt((.2126729*n+.7151522*r+.072175*i)/Mn);return new kt(116*a-16,500*(o-a),200*(a-Tt((.0193339*n+.119192*r+.9503041*i)/kn)),t.opacity)}function kt(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function Tt(t){return t>zn?Math.pow(t,1/3):t/An+Tn}function St(t){return t>Sn?t*t*t:An*(t-Tn)}function At(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 Nt(t){if(t instanceof It)return new It(t.h,t.c,t.l,t.opacity);t instanceof kt||(t=Mt(t));var e=Math.atan2(t.b,t.a)*wn;return new It(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function It(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ct(t){if(t instanceof Dt)return new Dt(t.h,t.s,t.l,t.opacity);t instanceof gt||(t=mt(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Bn*r+Pn*e-Rn*n)/(Bn+Pn-Rn),o=r-i,a=(En*(n-i)-Cn*o)/Dn,l=Math.sqrt(a*a+o*o)/(En*i*(1-i)),s=l?Math.atan2(a,o)*wn-120:NaN;return new Dt(s<0?s+360:s,l,i,t.opacity)}function Dt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Et(t){return function(){this.removeAttribute(t)}}function Pt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Rt(t,e,n){var r,i;return function(){var o=this.getAttribute(t);return o===n?null:o===r?i:i=e(r=o,n)}}function Bt(t,e,n){var r,i;return function(){var o=this.getAttributeNS(t.space,t.local);return o===n?null:o===r?i:i=e(r=o,n)}}function qt(t,e,n){var r,i,o;return function(){var a,l=n(this);{if(null!=l)return(a=this.getAttribute(t))===l?null:a===r&&l===i?o:o=e(r=a,i=l);this.removeAttribute(t)}}}function Lt(t,e,n){var r,i,o;return function(){var a,l=n(this);{if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===l?null:a===r&&l===i?o:o=e(r=a,i=l);this.removeAttributeNS(t.space,t.local)}}}function Ot(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttributeNS(t.space,t.local,r(e))}}return n._value=e,n}function jt(t,e){function n(){var n=this,r=e.apply(n,arguments);return r&&function(e){n.setAttribute(t,r(e))}}return n._value=e,n}function Vt(t,e){return function(){ot(this,t).delay=+e.apply(this,arguments)}}function Ft(t,e){return e=+e,function(){ot(this,t).delay=e}}function Ht(t,e){return function(){at(this,t).duration=+e.apply(this,arguments)}}function Wt(t,e){return e=+e,function(){at(this,t).duration=e}}function $t(t,e){if("function"!=typeof e)throw new Error;return function(){at(this,t).ease=e}}function Ut(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}function Gt(t,e,n){var r,i,o=Ut(e)?ot:at;return function(){var a=o(this,t),l=a.on;l!==r&&(i=(r=l).copy()).on(e,n),a.on=i}}function Zt(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Kt(t,n){var r,i,o;return function(){var a=e.style(this,t),l=(this.style.removeProperty(t),e.style(this,t));return a===l?null:a===r&&l===i?o:o=n(r=a,i=l)}}function Qt(t){return function(){this.style.removeProperty(t)}}function Jt(t,n,r){var i,o;return function(){var a=e.style(this,t);return a===r?null:a===i?o:o=n(i=a,r)}}function Xt(t,n,r){var i,o,a;return function(){var l=e.style(this,t),s=r(this);return null==s&&(this.style.removeProperty(t),s=e.style(this,t)),l===s?null:l===i&&s===o?a:a=n(i=l,o=s)}}function Yt(t,e,n){function r(){var r=this,i=e.apply(r,arguments);return i&&function(e){r.style.setProperty(t,i(e),n)}}return r._value=e,r}function te(t){return function(){this.textContent=t}}function ee(t){return function(){var e=t(this);this.textContent=null==e?"":e}}function ne(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function re(){return++On}function ie(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Fn.time=Q(),Fn;return n}function oe(t,e){void 0===e&&(e="");var n={id:e,label:"",attributes:{},children:[]};if(n.label=t.nodeName,1===t.nodeType){if(t.attributes.length>0)for(var r=0;r<t.attributes.length;r++){var i=t.attributes.item(r);n.attributes[i.nodeName]=i.nodeValue}}else 3===t.nodeType&&(n.label=t.nodeValue);if(t.hasChildNodes())for(var o=0;o<t.childNodes.length;o++){var a=oe(t.childNodes.item(o),e+"["+n.children.length+"]");n.children.push(a)}return n}function ae(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function le(){return new ae}function se(t){return t>1?0:t<-1?ar:Math.acos(t)}function ue(t){return t>=1?lr:t<=-1?-lr:Math.asin(t)}function ce(t){return t.innerRadius}function he(t){return t.outerRadius}function pe(t){return t.startAngle}function fe(t){return t.endAngle}function de(t){return t&&t.padAngle}function ye(t,e,n,r,i,o,a,l){var s=n-t,u=r-e,c=a-i,h=l-o,p=(c*(e-o)-h*(t-i))/(h*s-c*u);return[t+p*s,e+p*u]}function _e(t,e,n,r,i,o,a){var l=t-n,s=e-r,u=(a?o:-o)/ir(l*l+s*s),c=u*s,h=-u*l,p=t+c,f=e+h,d=n+c,y=r+h,_=(p+d)/2,m=(f+y)/2,g=d-p,v=y-f,x=g*g+v*v,w=i-o,b=p*y-d*f,M=(v<0?-1:1)*ir(er(0,w*w*x-b*b)),k=(b*v-g*M)/x,T=(-b*g-v*M)/x,S=(b*v+g*M)/x,A=(-b*g+v*M)/x,z=k-_,N=T-m,I=S-_,C=A-m;return z*z+N*N>I*I+C*C&&(k=S,T=A),{cx:k,cy:T,x01:-c,y01:-h,x11:k*(i/w-1),y11:T*(i/w-1)}}function me(t){this._context=t}function ge(t){return t<0?-1:1}function ve(t,e,n){var r=t._x1-t._x0,i=e-t._x1,o=(t._y1-t._y0)/(r||i<0&&-0),a=(n-t._y1)/(i||r<0&&-0),l=(o*i+a*r)/(r+i);return(ge(o)+ge(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(l))||0}function xe(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function we(t,e,n){var r=t._x0,i=t._y0,o=t._x1,a=t._y1,l=(o-r)/3;t._context.bezierCurveTo(r+l,i+l*e,o-l,a-l*n,o,a)}function be(t){this._context=t}function Me(t){this._context=t}var ke=function(){function t(t){var i,s=0;t.eachAfter(function(t){var n=t.children;n?(t.x=o(n),t.y=l(n)):(t.x=i?s+=e(t,i):0,t.y=0,i=t)});var h=u(t),p=c(t),f=h.x-e(h,p)/2,d=p.x+e(p,h)/2;return t.eachAfter(a?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*r}:function(e){e.x=(e.x-f)/(d-f)*n,e.y=(1-(t.y?e.y/t.y:1))*r})}var e=i,n=1,r=1,a=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(e){return arguments.length?(a=!1,n=+e[0],r=+e[1],t):a?null:[n,r]},t.nodeSize=function(e){return arguments.length?(a=!0,n=+e[0],r=+e[1],t):a?[n,r]:null},t};m.prototype=f.prototype={constructor:m,count:function(){return this.eachAfter(h)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=p(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each(function(e){t.push(e)}),t},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return f(this).eachBefore(y)}};var Te=function(t){for(var e=(t=t.slice()).length,n=null,r=n;e;){var i=new g(t[e-1]);r=r?r.next=i:n=i,t[void 0]=t[--e]}return{head:n,tail:r}},Se=function(t){return x(Te(t),[])},Ae=function(t){return function(){return t}},ze=function(){function t(t){return t.x=n/2,t.y=r/2,e?t.eachBefore(E(e)).eachAfter(P(i,.5)).eachBefore(R(1)):t.eachBefore(E(D)).eachAfter(P(C,1)).eachAfter(P(i,t.r/Math.min(n,r))).eachBefore(R(Math.min(n,r)/(2*t.r))),t}var e=null,n=1,r=1,i=C;return t.radius=function(n){return arguments.length?(e=N(n),t):e},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i="function"==typeof e?e:Ae(+e),t):i},t},Ne=function(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)},Ie=function(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(r-e)/t.value;++l<s;)(o=a[l]).y0=n,o.y1=i,o.x0=e,o.x1=e+=o.value*u},Ce=function(){function t(t){var a=t.height+1;return t.x0=t.y0=i,t.x1=n,t.y1=r/a,t.eachBefore(e(r,a)),o&&t.eachBefore(Ne),t}function e(t,e){return function(n){n.children&&Ie(n,n.x0,t*(n.depth+1)/e,n.x1,t*(n.depth+2)/e);var r=n.x0,o=n.y0,a=n.x1-i,l=n.y1-i;a<r&&(r=a=(r+a)/2),l<o&&(o=l=(o+l)/2),n.x0=r,n.y0=o,n.x1=a,n.y1=l}}var n=1,r=1,i=0,o=!1;return t.round=function(e){return arguments.length?(o=!!e,t):o},t.size=function(e){return arguments.length?(n=+e[0],r=+e[1],t):[n,r]},t.padding=function(e){return arguments.length?(i=+e,t):i},t};F.prototype=Object.create(m.prototype);var De=function(){function t(t){var r=H(t);if(r.eachAfter(e),r.parent.m=-r.z,r.eachBefore(n),s)t.eachBefore(i);else{var u=t,c=t,h=t;t.eachBefore(function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)});var p=u===c?1:o(u,c)/2,f=p-u.x,d=a/(c.x+p+f),y=l/(h.depth||1);t.eachBefore(function(t){t.x=(t.x+f)*d,t.y=t.depth*y})}return t}function e(t){var e=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(e){j(t);var a=(e[0].z+e[e.length-1].z)/2;i?(t.z=i.z+o(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+o(t._,i._));t.parent.A=r(t,i,t.parent.A||n[0])}function n(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function r(t,e,n){if(e){for(var r,i=t,a=t,l=e,s=i.parent.children[0],u=i.m,c=a.m,h=l.m,p=s.m;l=L(l),i=q(i),l&&i;)s=q(s),(a=L(a)).a=t,(r=l.z+h-i.z-u+o(l._,i._))>0&&(O(V(l,t,n),t,r),u+=r,c+=r),h+=l.m,u+=i.m,p+=s.m,c+=a.m;l&&!L(a)&&(a.t=l,a.m+=h-c),i&&!q(s)&&(s.t=i,s.m+=u-p,n=t)}return n}function i(t){t.x*=a,t.y=t.depth*l}var o=B,a=1,l=1,s=null;return t.separation=function(e){return arguments.length?(o=e,t):o},t.size=function(e){return arguments.length?(s=!1,a=+e[0],l=+e[1],t):s?null:[a,l]},t.nodeSize=function(e){return arguments.length?(s=!0,a=+e[0],l=+e[1],t):s?[a,l]:null},t},Ee=function(t,e,n,r,i){for(var o,a=t.children,l=-1,s=a.length,u=t.value&&(i-n)/t.value;++l<s;)(o=a[l]).x0=e,o.x1=r,o.y0=n,o.y1=n+=o.value*u},Pe=function t(e){function n(t,n,r,i,o){W(e,t,n,r,i,o)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2),Re=function(){function t(t){return t.x0=t.y0=0,t.x1=i,t.y1=o,t.eachBefore(e),a=[0],r&&t.eachBefore(Ne),t}function e(t){var e=a[t.depth],r=t.x0+e,i=t.y0+e,o=t.x1-e,p=t.y1-e;o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),t.x0=r,t.y0=i,t.x1=o,t.y1=p,t.children&&(e=a[t.depth+1]=l(t)/2,r+=h(t)-e,i+=s(t)-e,o-=u(t)-e,p-=c(t)-e,o<r&&(r=o=(r+o)/2),p<i&&(i=p=(i+p)/2),n(t,r,i,o,p))}var n=Pe,r=!1,i=1,o=1,a=[0],l=C,s=C,u=C,c=C,h=C;return t.round=function(e){return arguments.length?(r=!!e,t):r},t.size=function(e){return arguments.length?(i=+e[0],o=+e[1],t):[i,o]},t.tile=function(e){return arguments.length?(n=I(e),t):n},t.padding=function(e){return arguments.length?t.paddingInner(e).paddingOuter(e):t.paddingInner()},t.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:Ae(+e),t):l},t.paddingOuter=function(e){return arguments.length?t.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):t.paddingTop()},t.paddingTop=function(e){return arguments.length?(s="function"==typeof e?e:Ae(+e),t):s},t.paddingRight=function(e){return arguments.length?(u="function"==typeof e?e:Ae(+e),t):u},t.paddingBottom=function(e){return arguments.length?(c="function"==typeof e?e:Ae(+e),t):c},t.paddingLeft=function(e){return arguments.length?(h="function"==typeof e?e:Ae(+e),t):h},t},Be={value:function(){}};U.prototype=$.prototype={constructor:U,on:function(t,e){var n,r=this._,i=G(t+"",r),o=-1,a=i.length;{if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=K(r[n],t.name,e);else if(null==e)for(n in r)r[n]=K(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Z(r[n],t.name)))return n}},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new U(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){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(e,n)}};var qe,Le,Oe=0,je=0,Ve=0,Fe=1e3,He=0,We=0,$e=0,Ue="object"==typeof performance&&performance.now?performance:Date,Ge="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};X.prototype=Y.prototype={constructor:X,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Q():+n)+(null==e?0:+e),this._next||Le===this||(Le?Le._next=this:qe=this,Le=this),this._call=t,this._time=n,it()},stop:function(){this._call&&(this._call=null,this._time=1/0,it())}};var Ze=function(t,e,n){var r=new X;return e=null==e?0:+e,r.restart(function(n){r.stop(),t(n+e)},e,n),r},Ke=$("start","end","interrupt"),Qe=[],Je=0,Xe=1,Ye=2,tn=3,en=4,nn=5,rn=6,on=function(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};st(t,n,{name:e,index:r,group:i,on:Ke,tween:Qe,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:Je})},an=function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){e=null==e?null:e+"";for(i in o)(n=o[i]).name===e?(r=n.state>Ye&&n.state<nn,n.state=rn,n.timer.stop(),r&&n.on.call("interrupt",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}},ln=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t},sn="\\s*([+-]?\\d+)\\s*",un="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hn=/^#([0-9a-f]{3})$/,pn=/^#([0-9a-f]{6})$/,fn=new RegExp("^rgb\\("+[sn,sn,sn]+"\\)$"),dn=new RegExp("^rgb\\("+[cn,cn,cn]+"\\)$"),yn=new RegExp("^rgba\\("+[sn,sn,sn,un]+"\\)$"),_n=new RegExp("^rgba\\("+[cn,cn,cn,un]+"\\)$"),mn=new RegExp("^hsl\\("+[un,cn,cn]+"\\)$"),gn=new RegExp("^hsla\\("+[un,cn,cn,un]+"\\)$"),vn={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};ln(ft,dt,{displayable:function(){return this.rgb().displayable()},toString:function(){return this.rgb()+""}}),ln(gt,function(t,e,n,r){return 1===arguments.length?mt(t):new gt(t,e,n,null==r?1:r)},pt(ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new gt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new gt(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+")")}})),ln(wt,function(t,e,n,r){return 1===arguments.length?xt(t):new wt(t,e,n,null==r?1:r)},pt(ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new wt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new wt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new gt(bt(t>=240?t-240:t+120,i,r),bt(t,i,r),bt(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 xn=Math.PI/180,wn=180/Math.PI,bn=.95047,Mn=1,kn=1.08883,Tn=4/29,Sn=6/29,An=3*Sn*Sn,zn=Sn*Sn*Sn;ln(kt,function(t,e,n,r){return 1===arguments.length?Mt(t):new kt(t,e,n,null==r?1:r)},pt(ft,{brighter:function(t){return new kt(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new kt(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return t=Mn*St(t),e=bn*St(e),n=kn*St(n),new gt(At(3.2404542*e-1.5371385*t-.4985314*n),At(-.969266*e+1.8760108*t+.041556*n),At(.0556434*e-.2040259*t+1.0572252*n),this.opacity)}})),ln(It,function(t,e,n,r){return 1===arguments.length?Nt(t):new It(t,e,n,null==r?1:r)},pt(ft,{brighter:function(t){return new It(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new It(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Mt(this).rgb()}}));var Nn=-.14861,In=1.78277,Cn=-.29227,Dn=-.90649,En=1.97294,Pn=En*Dn,Rn=En*In,Bn=In*Cn-Dn*Nn;ln(Dt,function(t,e,n,r){return 1===arguments.length?Ct(t):new Dt(t,e,n,null==r?1:r)},pt(ft,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Dt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Dt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*xn,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new gt(255*(e+n*(Nn*r+In*i)),255*(e+n*(Cn*r+Dn*i)),255*(e+n*(En*r)),this.opacity)}}));var qn=function(t,n){var r;return("number"==typeof n?e.interpolateNumber:n instanceof dt?e.interpolateRgb:(r=dt(n))?(n=r,e.interpolateRgb):e.interpolateString)(t,n)},Ln=e.selection.prototype.constructor,On=0,jn=e.selection.prototype;ne.prototype=function(t){return e.selection().transition(t)}.prototype={constructor:ne,select:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selector(t));for(var i=this._groups,o=i.length,a=new Array(o),l=0;l<o;++l)for(var s,u,c=i[l],h=c.length,p=a[l]=new Array(h),f=0;f<h;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),p[f]=u,on(p[f],n,r,f,p,lt(s,r)));return new ne(a,this._parents,n,r)},selectAll:function(t){var n=this._name,r=this._id;"function"!=typeof t&&(t=e.selectorAll(t));for(var i=this._groups,o=i.length,a=[],l=[],s=0;s<o;++s)for(var u,c=i[s],h=c.length,p=0;p<h;++p)if(u=c[p]){for(var f,d=t.call(u,u.__data__,p,c),y=lt(u,r),_=0,m=d.length;_<m;++_)(f=d[_])&&on(f,n,r,_,d,y);a.push(d),l.push(u)}return new ne(a,l,n,r)},filter:function(t){"function"!=typeof t&&(t=e.matcher(t));for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o)for(var a,l=n[o],s=l.length,u=i[o]=[],c=0;c<s;++c)(a=l[c])&&t.call(a,a.__data__,c,l)&&u.push(a);return new ne(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),l=0;l<o;++l)for(var s,u=e[l],c=n[l],h=u.length,p=a[l]=new Array(h),f=0;f<h;++f)(s=u[f]||c[f])&&(p[f]=s);for(;l<r;++l)a[l]=e[l];return new ne(a,this._parents,this._name,this._id)},selection:function(){return new Ln(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=re(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,l=r[o],s=l.length,u=0;u<s;++u)if(a=l[u]){var c=lt(a,e);on(a,t,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new ne(r,this._parents,t,n)},call:jn.call,nodes:jn.nodes,node:jn.node,size:jn.size,empty:jn.empty,each:jn.each,on:function(t,e){var n=this._id;return arguments.length<2?lt(this.node(),n).on.on(t):this.each(Gt(n,t,e))},attr:function(t,n){var r=e.namespace(t),i="transform"===r?e.interpolateTransformSvg:qn;return this.attrTween(t,"function"==typeof n?(r.local?Lt:qt)(r,i,ht(this,"attr."+t,n)):null==n?(r.local?Pt:Et)(r):(r.local?Bt:Rt)(r,i,n+""))},attrTween:function(t,n){var r="attr."+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;var i=e.namespace(t);return this.tween(r,(i.local?Ot:jt)(i,n))},style:function(t,n,r){var i="transform"==(t+="")?e.interpolateTransformCss:qn;return null==n?this.styleTween(t,Kt(t,i)).on("end.style."+t,Qt(t)):this.styleTween(t,"function"==typeof n?Xt(t,i,ht(this,"style."+t,n)):Jt(t,i,n+""),r)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Yt(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?ee(ht(this,"text",t)):te(null==t?"":t+""))},remove:function(){return this.on("end.remove",Zt(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=lt(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?ut:ct)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Vt:Ft)(e,t)):lt(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ht:Wt)(e,t)):lt(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each($t(e,t)):lt(this.node(),e).ease}};(function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n})(3),function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158);var Vn=2*Math.PI,Fn=(function t(e,n){function r(t){return e*Math.pow(2,10*--t)*Math.sin((i-t)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Vn);return r.amplitude=function(e){return t(e,n*Vn)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+i)/n)}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Vn);return r.amplitude=function(e){return t(e,n*Vn)},r.period=function(n){return t(e,n)},r}(1,.3),function t(e,n){function r(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((i-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((i+t)/n))/2}var i=Math.asin(1/(e=Math.max(1,e)))*(n/=Vn);return r.amplitude=function(e){return t(e,n*Vn)},r.period=function(n){return t(e,n)},r}(1,.3),{time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}});e.selection.prototype.interrupt=function(t){return this.each(function(){an(this,t)})},e.selection.prototype.transition=function(t){var e,n;t instanceof ne?(e=t._id,t=t._name):(e=re(),(n=Fn).time=Q(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,l=r[o],s=l.length,u=0;u<s;++u)(a=l[u])&&on(a,t,e,u,l,n||ie(a,e));return new ne(r,this._parents,t,e)},r(".tree_CirclePacking circle {\r\n fill: rgb(31, 119, 180);\r\n fill-opacity: .25;\r\n stroke: rgb(31, 119, 180);\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_CirclePacking .leaf circle {\r\n fill: #ff7f0e;\r\n fill-opacity: 1;\r\n}\r\n\r\n.tree_CirclePacking .label {\r\n fill:white;\r\n text-anchor: middle;\r\n}\r\n",void 0);var Hn=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.enter=function(t,e){this.diameter=Math.min(this.width(),this.height()),this.pack=ze().size([this.diameter-4,this.diameter-4]).padding(1.5),this.svg=e.append("g").attr("transform","rotate(30)")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.svg.selectAll("circle").remove(),this.svg.selectAll("text").remove();var i=f(this.data()).sum(function(){return 1}).sort(function(t,e){return t[1]<e[1]?-1:t[1]>e[1]?1:0});this._focus=i,this.pack(i),this.circle=this.svg.selectAll("circle").data(i.descendants()).enter().append("circle").attr("class",function(t){return t.parent?t.children?"node":"node leaf":"node root"}).style("fill",function(t){return r._palette(t.data.label)}).on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){this._focus!==t&&r.zoom(t),e.event.stopPropagation()}),this.circle.append("title").text(function(t){return t.data.label}),this.svg.selectAll("text").data(i.descendants()).enter().append("text").attr("class","label").style("fill-opacity",function(t){return t.parent===i?1:0}).style("display",function(t){return t.parent===i?null:"none"}).text(function(t){return t.data.label}),this._node=this.svg.selectAll("circle,text"),this.zoomTo([i.x,i.y,2*i.r])},r.prototype.zoom=function(t){function n(t){return t===r._focus&&!t.children||t.parent===r._focus}this._focus=t;var r=this;this.svg.transition().duration(e.event.altKey?7500:750).tween("zoom",function(){var t=e.interpolateZoom(r.view,[r._focus.x,r._focus.y,2*r._focus.r]);return function(e){r.zoomTo(t(e))}}).selectAll("text").filter(function(t){return n(t)||"inline"===this.style.display}).style("fill-opacity",function(t){return n(t)?1:0}).on("start",function(t){n(t)&&(this.style.display="inline")}).on("end",function(t){n(t)||(this.style.display="none")})},r.prototype.zoomTo=function(t){var e=this.diameter/t[2];this.view=t,this._node.attr("transform",function(n){return"translate("+(n.x-t[0])*e+","+(n.y-t[1])*e+")"}),this.circle.attr("r",function(t){return t.r*e})},r}(e.SVGWidget);Hn.prototype._class+=" tree_CirclePacking",Hn.prototype.implements(n.ITree.prototype),Hn.prototype.publish("paletteID","default","set","Palette ID",Hn.prototype._palette.switch(),{tags:["Basic","Shared"]}),Hn.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Dendrogram .node {\r\n}\r\n\r\n.tree_Dendrogram .node circle {\r\n fill: #dcf1ff;\r\n stroke: #1f77b4;\r\n stroke-width: 1.0px;\r\n}\r\n\r\n.tree_Dendrogram .node.selected circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over circle {\r\n stroke: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over circle {\r\n stroke: red;\r\n}\r\n\r\n.tree_Dendrogram .node.selected text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node.over text {\r\n fill: orange;\r\n}\r\n\r\n.tree_Dendrogram .node.selected.over text {\r\n fill: red;\r\n}\r\n\r\n.tree_Dendrogram .node text {\r\n font-size: 14px;\r\n}\r\n\r\n.tree_Dendrogram .link {\r\n fill: none;\r\n stroke: #656565;\r\n stroke-width: 1.0px;\r\n}\r\n",void 0);var Wn=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Wn.prototype._class+=" tree_Dendrogram.DendrogramColumn",Wn.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var $n=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3LayoutCluster=ke(),r._d3LayoutTree=De(),r}return e.__extends(r,t),r.prototype.dendrogramData=function(){function t(e){return{label:e.key,children:e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._renderElement.attr("opacity",0).transition().duration(500).attr("opacity",1),this._selection.widgetElement(this._renderElement)},r.prototype.update=function(n,r){function i(t){return"M"+t.parent.x+","+t.parent.y+"C"+t.parent.x+","+(t.parent.y+t.y)/2+" "+t.x+","+(t.parent.y+t.y)/2+" "+t.x+","+t.y}function o(t){return"M"+t.y+","+t.x+"C"+(t.y+t.parent.y)/2+","+t.x+" "+(t.y+t.parent.y)/2+","+t.parent.x+" "+t.parent.y+","+t.parent.x}function a(t){return h?i(t):o(t)}function l(t,e){var n=(t-90)/180*Math.PI,r=e;return[r*Math.cos(n),r*Math.sin(n)]}function s(t){return"M"+l(t.x,t.y)+"C"+l(t.x,(t.y+t.parent.y)/2)+" "+l(t.parent.x,(t.y+t.parent.y)/2)+" "+l(t.parent.x,t.parent.y)}function u(t){return c.radial()?"rotate("+(t.x-90)+")translate("+t.y+")":"horizontal"===c.orientation()?"translate("+t.y+","+t.x+")":"translate("+t.x+","+t.y+")"}t.prototype.update.call(this,n,r);var c=this,h="vertical"===this.orientation();this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this._d3Layout=this.dendrogram()?this._d3LayoutCluster:this._d3LayoutTree,this.radial()?(this._d3Layout.size([360,2*this.separation()]),this._d3Layout.separation(function(t,e){return(t.parent===e.parent?1:2)/t.depth})):(this._d3Layout.nodeSize([14,this.separation()]),this._d3Layout.separation(function(t,e){return t.parent===e.parent?1:2}));var p=f(this.dendrogramData());this._d3Layout(p);var d=p.descendants(),y=p.descendants().slice(1),_=this._renderCount?500:0,m=this._renderElement.selectAll(".link").data(y);m.enter().append("path").attr("class","link").attr("d",this.radial()?s:a),m.transition().duration(_).attr("d",this.radial()?s:a),m.exit().remove();var g=this.circleRadius()+2,v=this._renderElement.selectAll(".node").data(d);v.transition().duration(_).attr("transform",u);var x=v.enter().append("g").attr("class","node").attr("transform",u).call(this._selection.enter.bind(this._selection)).on("click",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.click(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).on("dblclick",function(t){for(var e=t;e.children;)e=e.children[0];t.depth>0&&c.dblclick(c.rowToObj(e.origRows[0]),c.mappings()[t.depth-1].column(),!0)}).each(function(){var t=e.select(this);t.append("circle"),t.append("text")});x.merge(v).select("circle").attr("r",this.circleRadius()).style("fill",function(t){return c._palette(t.data.label)}).append("title").text(function(t){return t.data.label}),x.merge(v).select("text").attr("dx",function(t){return c.radial()?t.children?t.x<180?-g:g:t.x<180?g:-g:h?t.children?g:-g:t.children?-g:g}).attr("dy","0.25em").style("text-anchor",function(t){return c.radial()?t.children?t.x<180?"end":"start":t.x<180?"start":"end":h?t.children?"start":"end":t.children?"end":"start"}).attr("transform",function(t){return c.radial()?t.x<180?null:"rotate(180)":h?"rotate(-66)":null}).text(function(t){return t.data.label}),v.exit().remove(),this._renderCount||c.zoomToFit()},r}(e.SVGZoomWidget);$n.prototype._class+=" tree_Dendrogram",$n.prototype.implements(n.ITree.prototype),$n.prototype.mixin(e.Utility.SimpleSelectionMixin),$n.prototype.Column=Wn,$n.prototype.publish("paletteID","default","set","Palette ID",$n.prototype._palette.switch(),{tags:["Basic","Shared"]}),$n.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),$n.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Wn}),$n.prototype.publish("circleRadius",4.5,"number","Text offset from circle"),$n.prototype.publish("separation",240,"number","Leaf Separation"),$n.prototype.publish("dendrogram",!0,"boolean","Dendrogram"),$n.prototype.publish("radial",!1,"boolean","Radial"),$n.prototype.publish("orientation","horizontal","set","Orientation",["horizontal","vertical"],{tags:["Private"],disable:function(t){return t.radial()}}),r(".tree_Indented .node rect {\r\n cursor: pointer;\r\n fill: #fff;\r\n stroke: #3182bd;\r\n stroke-width: 1px;\r\n}\r\n\r\n.tree_Indented .node text {\r\n font: 10px sans-serif;\r\n pointer-events: none;\r\n}\r\n\r\n.tree_Indented path.link {\r\n fill: none;\r\n stroke: #9ecae1;\r\n stroke-width: 1.5px;\r\n}",void 0);var Un=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);Un.prototype._class+=" tree_Dendrogram.IndentedColumn",Un.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var Gn=function(t){function r(){var r=t.call(this)||this;return r._collapsed={},n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r._drawStartPos="origin",r._d3Tree=De(),r}return e.__extends(r,t),r.prototype.xmlToData=function(t,e){return void 0===e&&(e=""),DOMParser?oe((new DOMParser).parseFromString(t,"text/xml"),e).children[0]:[]},r.prototype.xml=function(t){return arguments.length?(this._xml=t,this.data(this.xmlToData(this._xml)),this):this._xml},r.prototype.IndentedData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}if(this.xmlColumn_exists()){var e=this.columns().indexOf(this.xmlColumn()),n={label:this.xmlColumn(),children:this.data().map(function(t,n){return this.xmlToData(t[e],"["+n+"]")},this)};return 1===n.children.length?n.children[0]:n}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.rollupView(this.mappings().map(function(t){return t.column()})).entries()}):this.data()},r.prototype.enter=function(e,n){t.prototype.enter.call(this,e,n),this._svgLinks=this._renderElement.append("g"),this._svgNodes=this._renderElement.append("g"),this._selection.widgetElement(this._svgNodes)},r.prototype.update=function(n,r){function i(t){return(t.parent?i(t.parent)+".":"")+t.data.label}function o(t){return"M"+t.parent.y+","+t.parent.x+"V"+t.x+", H"+t.y}var a=this;t.prototype.update.call(this,n,r);var l=this;this._d3Tree.nodeSize([0,this.barHeight()]);var s=this._db.dataChecksum();this._prevDataChecksum!==s&&(this._treeData=this.IndentedData(),this._prevDataChecksum=s);var u=f(this.data()).sum(function(t){return t.size||50}).each(function(t){a._collapsed[i(t)]&&delete t.children}),c=this._d3Tree(u).descendants(),h=this._d3Tree(u).descendants().slice(1),p=0;u.eachBefore(function(t){t.x=p*l.barHeight(),++p});var d=this.barHeight()-4,y=this._renderCount?500:0,_=this._svgLinks.selectAll(".link").data(h,function(t){return i(t)});_.enter().append("path").attr("class","link").attr("d",o),_.transition().duration(y).attr("d",o),_.exit().remove();var m=this._svgNodes.selectAll(".node").data(c,function(t){return i(t)});m.transition().duration(y).attr("transform",function(t){return"translate("+t.y+","+t.x+")"});var g=m.enter().append("g").attr("class","node").attr("transform",function(t){return"translate("+t.y+","+t.x+")"}).call(this._selection.enter.bind(this._selection)).each(function(){var t=e.select(this);t.append("rect").attr("height",d).attr("width",d).on("click",function(t){l._collapsed[i(t)]?delete l._collapsed[i(t)]:t.children&&(l._collapsed[i(t)]=!0),l.lazyRender()}),t.append("text")}).style("opacity",0);g.transition().style("opacity",1),g.merge(m).select("rect").attr("x",-d/2).attr("y",-d/2).style("fill",function(t){return l._collapsed[i(t)]?"#3182bd":t.children?"#c6dbef":"#fd8d3c"}),g.merge(m).select("text").attr("dx",d/2+4+"px").attr("dy","0.33em").text(function(t){return t.data.label}),m.exit().transition().style("opacity",0).remove(),this._renderCount||l.zoomToFit()},r}(e.SVGZoomWidget);Gn.prototype._class+=" tree_Indented",Gn.prototype.implements(n.ITree.prototype),Gn.prototype.mixin(e.Utility.SimpleSelectionMixin),Gn.prototype.Column=Un,Gn.prototype.publish("xmlColumn",null,"set","Field",function(){return this.columns()},{optional:!0}),Gn.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:Un,disable:function(t){return t.xmlColumn_exists()}}),Gn.prototype.publish("barHeight",16,"number","Bar height");var Zn=Math.PI,Kn=2*Zn,Qn=Kn-1e-6;ae.prototype=le.prototype={constructor:ae,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var o=this._x1,a=this._y1,l=n-t,s=r-e,u=o-t,c=a-e,h=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(c*l-s*u)>1e-6&&i){var p=n-o,f=r-a,d=l*l+s*s,y=p*p+f*f,_=Math.sqrt(d),m=Math.sqrt(h),g=i*Math.tan((Zn-Math.acos((d+h-y)/(2*_*m)))/2),v=g/m,x=g/_;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*u)+","+(e+v*c)),this._+="A"+i+","+i+",0,0,"+ +(c*p>u*f)+","+(this._x1=t+x*l)+","+(this._y1=e+x*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e;var a=(n=+n)*Math.cos(r),l=n*Math.sin(r),s=t+a,u=e+l,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+u:(Math.abs(this._x1-s)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+s+","+u),n&&(h<0&&(h=h%Kn+Kn),h>Qn?this._+="A"+n+","+n+",0,1,"+c+","+(t-a)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Zn)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Jn=function(t){return function(){return t}},Xn=Math.abs,Yn=Math.atan2,tr=Math.cos,er=Math.max,nr=Math.min,rr=Math.sin,ir=Math.sqrt,or=1e-12,ar=Math.PI,lr=ar/2,sr=2*ar,ur=function(){function t(){var t,u,c=+e.apply(this,arguments),h=+n.apply(this,arguments),p=o.apply(this,arguments)-lr,f=a.apply(this,arguments)-lr,d=Xn(f-p),y=f>p;if(s||(s=t=le()),h<c&&(u=h,h=c,c=u),h>or)if(d>sr-or)s.moveTo(h*tr(p),h*rr(p)),s.arc(0,0,h,p,f,!y),c>or&&(s.moveTo(c*tr(f),c*rr(f)),s.arc(0,0,c,f,p,y));else{var _,m,g=p,v=f,x=p,w=f,b=d,M=d,k=l.apply(this,arguments)/2,T=k>or&&(i?+i.apply(this,arguments):ir(c*c+h*h)),S=nr(Xn(h-c)/2,+r.apply(this,arguments)),A=S,z=S;if(T>or){var N=ue(T/c*rr(k)),I=ue(T/h*rr(k));(b-=2*N)>or?(N*=y?1:-1,x+=N,w-=N):(b=0,x=w=(p+f)/2),(M-=2*I)>or?(I*=y?1:-1,g+=I,v-=I):(M=0,g=v=(p+f)/2)}var C=h*tr(g),D=h*rr(g),E=c*tr(w),P=c*rr(w);if(S>or){var R=h*tr(v),B=h*rr(v),q=c*tr(x),L=c*rr(x);if(d<ar){var O=b>or?ye(C,D,q,L,R,B,E,P):[E,P],j=C-O[0],V=D-O[1],F=R-O[0],H=B-O[1],W=1/rr(se((j*F+V*H)/(ir(j*j+V*V)*ir(F*F+H*H)))/2),$=ir(O[0]*O[0]+O[1]*O[1]);A=nr(S,(c-$)/(W-1)),z=nr(S,(h-$)/(W+1))}}M>or?z>or?(_=_e(q,L,C,D,h,z,y),m=_e(R,B,E,P,h,z,y),s.moveTo(_.cx+_.x01,_.cy+_.y01),z<S?s.arc(_.cx,_.cy,z,Yn(_.y01,_.x01),Yn(m.y01,m.x01),!y):(s.arc(_.cx,_.cy,z,Yn(_.y01,_.x01),Yn(_.y11,_.x11),!y),s.arc(0,0,h,Yn(_.cy+_.y11,_.cx+_.x11),Yn(m.cy+m.y11,m.cx+m.x11),!y),s.arc(m.cx,m.cy,z,Yn(m.y11,m.x11),Yn(m.y01,m.x01),!y))):(s.moveTo(C,D),s.arc(0,0,h,g,v,!y)):s.moveTo(C,D),c>or&&b>or?A>or?(_=_e(E,P,R,B,c,-A,y),m=_e(C,D,q,L,c,-A,y),s.lineTo(_.cx+_.x01,_.cy+_.y01),A<S?s.arc(_.cx,_.cy,A,Yn(_.y01,_.x01),Yn(m.y01,m.x01),!y):(s.arc(_.cx,_.cy,A,Yn(_.y01,_.x01),Yn(_.y11,_.x11),!y),s.arc(0,0,c,Yn(_.cy+_.y11,_.cx+_.x11),Yn(m.cy+m.y11,m.cx+m.x11),y),s.arc(m.cx,m.cy,A,Yn(m.y11,m.x11),Yn(m.y01,m.x01),!y))):s.arc(0,0,c,w,x,y):s.lineTo(E,P)}else s.moveTo(0,0);if(s.closePath(),t)return s=null,t+""||null}var e=ce,n=he,r=Jn(0),i=null,o=pe,a=fe,l=de,s=null;return t.centroid=function(){var t=(+e.apply(this,arguments)+ +n.apply(this,arguments))/2,r=(+o.apply(this,arguments)+ +a.apply(this,arguments))/2-ar/2;return[tr(r)*t,rr(r)*t]},t.innerRadius=function(n){return arguments.length?(e="function"==typeof n?n:Jn(+n),t):e},t.outerRadius=function(e){return arguments.length?(n="function"==typeof e?e:Jn(+e),t):n},t.cornerRadius=function(e){return arguments.length?(r="function"==typeof e?e:Jn(+e),t):r},t.padRadius=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:Jn(+e),t):i},t.startAngle=function(e){return arguments.length?(o="function"==typeof e?e:Jn(+e),t):o},t.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:Jn(+e),t):a},t.padAngle=function(e){return arguments.length?(l="function"==typeof e?e:Jn(+e),t):l},t.context=function(e){return arguments.length?(s=null==e?null:e,t):s},t};me.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};be.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:we(this,this._t0,xe(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(t=+t,e=+e,t!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,we(this,xe(this,n=ve(this,t,e)),n);break;default:we(this,this._t0,n=ve(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(function(t){this._context=new Me(t)}.prototype=Object.create(be.prototype)).point=function(t,e){be.prototype.point.call(this,e,t)},Me.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,r,i,o){this._context.bezierCurveTo(e,t,r,n,o,i)}},r(".tree_Sunburst path {\r\n stroke: #fff;\r\n stroke-width:0.5px;\r\n fill-rule: evenodd;\r\n}\r\n",void 0);var cr=function(t){function r(){var e=t.call(this)||this;return n.ITree.call(e),e}return e.__extends(r,t),r.prototype.data=function(t){var n=e.SVGWidget.prototype.data.apply(this,arguments);return arguments.length&&(this._resetRoot=!0),n},r.prototype.enter=function(t,n){var r=this;this.radius=Math.min(this.width(),this.height())/2,this._xScale=e.scaleLinear().range([0,2*Math.PI]),this._yScale=e.scaleSqrt().range([0,this.radius]),this.partition=Ce(),this.arc=ur().startAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x0)))}).endAngle(function(t){return Math.max(0,Math.min(2*Math.PI,r._xScale(t.x1)))}).innerRadius(function(t){return Math.max(0,r._yScale(t.y0))}).outerRadius(function(t){return Math.max(0,r._yScale(t.y1))}),this.svg=n.append("g")},r.prototype.update=function(t,n){var r=this;this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id())),this.radius=Math.min(this.width(),this.height())/2,this._yScale.range([0,this.radius]);var i=f(this.data()).sum(function(t){return void 0!==t.size?t.size:1}),o=this.svg.selectAll("path").data(this.partition(i).descendants(),function(t,e){return void 0!==t.data.label?t.data.label:e});o.enter().append("path").on("click",function(t){r.click(t.data,null,null)}).on("dblclick",function(t){e.event&&e.event.stopPropagation(),r.zoomTo(t)}).each(function(){e.select(this).append("title")}).merge(o).attr("d",this.arc).style("fill",function(t){return t.data.__viz_fill?t.data.__viz_fill:r._palette(t.data.label)}).style("stroke",function(t){return t.value>16?"white":"none"}).select("title").text(function(t){return t.data.label}),o.exit().remove(),this._resetRoot&&(this._resetRoot=!1,this.zoomTo(i))},r.prototype.zoomTo=function(t){var n=this;this.svg.transition().duration(750).tween("scale",function(){var r=e.interpolate(n._xScale.domain(),[t.x0,t.x1]),i=e.interpolate(n._yScale.domain(),[t.y0,1]),o=e.interpolate(n._yScale.range(),[t.y0?20:0,n.radius]);return function(t){n._xScale.domain(r(t)),n._yScale.domain(i(t)).range(o(t))}}).selectAll("path").attrTween("d",function(t){return function(){return n.arc(t)}})},r}(e.SVGWidget);cr.prototype._class+=" tree_SunburstPartition",cr.prototype.implements(n.ITree.prototype),cr.prototype.publish("paletteID","default","set","Palette ID",cr.prototype._palette.switch(),{tags:["Basic","Shared"]}),cr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),r(".tree_Treemap .node {\r\n border: solid 1px white;\r\n overflow: hidden;\r\n text-overflow:ellipsis;\r\n position: absolute;\r\n text-indent: 2px;\r\n}\r\n\r\n.tree_Treemap .node.selected {\r\n border-color: red;\r\n}\r\n\r\n.tree_Treemap .node.over {\r\n border-color: orange;\r\n}\r\n\r\n.tree_Treemap .node.selected.over {\r\n border-color: red;\r\n}\r\n",void 0);var hr=function(t){function n(e){var n=t.call(this)||this;return n._owner=e,n}return e.__extends(n,t),n}(e.PropertyExt);hr.prototype._class+=" tree_Dendrogram.TreemapColumn",hr.prototype.publish("column",null,"set","Field",function(){return this._owner?this._owner.columns():[]},{optional:!0});var pr=function(t){function r(){var r=t.call(this)||this;return n.ITree.call(r),e.Utility.SimpleSelectionMixin.call(r),r}return e.__extends(r,t),r.prototype.treemapData=function(){function t(e){if(e.values instanceof Array){var n=e.values.filter(function(t){return!(t instanceof Array)}).map(function(e){return t(e)}),r={label:e.key};return n.length?r.children=n:r.size=22,r}return{label:e.key,size:e.values.aggregate,origRows:e.values}}return this.mappings().filter(function(t){return t.column()}).length?t({key:"root",values:this._db.aggregateView(this.mappings().map(function(t){return t.column()}),this.aggrType(),this.aggrColumn()).entries()}):this.data()},r.prototype.enter=function(t,n){e.HTMLWidget.prototype.enter.apply(this,arguments),this._d3Treemap=Re(),this._elementDIV=n.append("div"),this._selection.widgetElement(this._elementDIV)},r.prototype.update=function(t,n){e.HTMLWidget.prototype.update.apply(this,arguments),this._palette=this._palette.switch(this.paletteID()),this.useClonedPalette()&&(this._palette=this._palette.cloneNotExists(this.paletteID()+"_"+this.id()));var r=f(this.treemapData()).sum(function(t){return t.size||50});this._d3Treemap.size([this.width(),this.height()]),this._d3Treemap(r),this._elementDIV.style("font-size",this.fontSize_exists()?this.fontSize()+"px":null).style("line-height",this.fontSize_exists()?this.fontSize()+2+"px":null);var i=this,o=this._elementDIV.selectAll(".node").data(r.descendants());o.enter().append("div").attr("class","node").call(this._selection.enter.bind(this._selection)).on("click",function(t){if(t&&t.origRows){var e="";i.mappings().forEach(function(t){t.column()&&(e=t.column())}),i.click(i.rowToObj(t.origRows[0]),e,i._selection.selected(this))}}).on("dblclick",function(t){if(t&&t.origRows){var e="";i.mappings().forEach(function(t){t.column()&&(e=t.column())}),i.dblclick(i.rowToObj(t.origRows[0]),e,i._selection.selected(this))}}).style("left",function(t){return t.x0+Math.max(0,t.x1-t.x0)/2+"px"}).style("top",function(t){return t.y0+Math.max(0,t.y1-t.y0)/2+"px"}).style("width",function(){return"0px"}).style("height",function(){return"0px"}).merge(o).attr("title",function(t){if(t.children)return null;for(var e=t.data.label+" ("+t.value+")";t.parent&&t.parent.parent;)e=t.parent.data.label+" -> "+e,t=t.parent;return e}).text(function(t){return t.children?null:t.data.label}).style("background",function(t){return t.children?i._palette(t.data.label):null}).transition().duration(this.transitionDuration()).style("opacity",function(t){return t.children?1:null}).style("left",function(t){return t.x0+"px"}).style("top",function(t){return t.y0+"px"}).style("width",function(t){return Math.max(0,t.x1-t.x0)+"px"}).style("height",function(t){return Math.max(0,t.y1-t.y0)+"px"}),o.exit().transition().duration(this.transitionDuration()).style("opacity",0).remove()},r.prototype.exit=function(e,n){t.prototype.exit.call(this,e,n)},r}(e.HTMLWidget);pr.prototype._class+=" tree_Treemap",pr.prototype.implements(n.ITree.prototype),pr.prototype.mixin(e.Utility.SimpleSelectionMixin),pr.prototype.Column=hr,pr.prototype.publish("paletteID","default","set","Palette ID",pr.prototype._palette.switch(),{tags:["Basic","Shared"]}),pr.prototype.publish("useClonedPalette",!1,"boolean","Enable or disable using a cloned palette",null,{tags:["Intermediate","Shared"]}),pr.prototype.publish("mappings",[],"propertyArray","Source Columns",null,{autoExpand:hr}),pr.prototype.publish("aggrType",null,"set","Aggregation Type",[null,"mean","median","sum","min","max"],{optional:!0}),pr.prototype.publish("aggrColumn",null,"set","Aggregation Field",function(){return this.columns()},{optional:!0,disable:function(t){return!t.aggrType()}}),pr.prototype.publish("fontSize",null,"number","Font Size",null,{optional:!0}),pr.prototype.publish("transitionDuration",250,"number","Transition Duration"),t.CirclePacking=Hn,t.DendrogramColumn=Wn,t.Dendrogram=$n,t.IndentedColumn=Un,t.Indented=Gn,t.SunburstPartition=cr,t.TreemapColumn=hr,t.Treemap=pr,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=tree.min.js.map |
{ | ||
"name": "@hpcc-js/tree", | ||
"version": "0.0.41", | ||
"version": "0.0.42", | ||
"description": "hpcc-js - Viz Tree", | ||
@@ -22,16 +22,16 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@hpcc-js/api": "^0.0.41", | ||
"@hpcc-js/common": "^0.0.41", | ||
"d3-hierarchy": "^1.1.4", | ||
"d3-interpolate": "^1.1.5", | ||
"d3-scale": "^1.0.6", | ||
"d3-selection": "^1.1.0", | ||
"d3-shape": "^1.2.0", | ||
"tslib": "^1.7.1" | ||
"@hpcc-js/api": "^0.0.42", | ||
"@hpcc-js/common": "^0.0.42", | ||
"d3-hierarchy": "1.1.4", | ||
"d3-interpolate": "1.1.5", | ||
"d3-scale": "1.0.6", | ||
"d3-selection": "1.1.0", | ||
"d3-shape": "1.2.0", | ||
"tslib": "1.7.1" | ||
}, | ||
"devDependencies": { | ||
"@hpcc-js/bundle": "^0.0.12", | ||
"rimraf": "^2.6.1", | ||
"typedoc": "^0.7.1", | ||
"typescript": "^2.5.2" | ||
"@hpcc-js/bundle": "^0.0.13", | ||
"rimraf": "2.6.1", | ||
"typedoc": "0.7.1", | ||
"typescript": "2.5.2" | ||
}, | ||
@@ -38,0 +38,0 @@ "repository": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6024
896847
+ Added@hpcc-js/api@0.0.42(transitive)
+ Added@hpcc-js/common@0.0.42(transitive)
+ Addedcolorbrewer@1.0.0(transitive)
+ Addedd3-array@1.2.0(transitive)
+ Addedd3-brush@1.0.4(transitive)
+ Addedd3-collection@1.0.4(transitive)
+ Addedd3-dispatch@1.0.3(transitive)
+ Addedd3-drag@1.1.0(transitive)
+ Addedd3-dsv@1.0.5(transitive)
+ Addedd3-format@1.2.0(transitive)
+ Addedd3-hierarchy@1.1.4(transitive)
+ Addedd3-interpolate@1.1.5(transitive)
+ Addedd3-scale@1.0.6(transitive)
+ Addedd3-selection@1.1.0(transitive)
+ Addedd3-shape@1.2.0(transitive)
+ Addedd3-zoom@1.3.0(transitive)
+ Addedes6-promise@4.1.1(transitive)
+ Addedtslib@1.7.1(transitive)
- Removed@hpcc-js/api@0.0.41(transitive)
- Removed@hpcc-js/common@0.0.41(transitive)
- Removedcolorbrewer@1.5.9(transitive)
- Removedd3-array@1.2.4(transitive)
- Removedd3-brush@1.1.6(transitive)
- Removedd3-collection@1.0.7(transitive)
- Removedd3-dispatch@1.0.6(transitive)
- Removedd3-drag@1.2.5(transitive)
- Removedd3-dsv@1.2.0(transitive)
- Removedd3-format@1.4.5(transitive)
- Removedd3-hierarchy@1.1.9(transitive)
- Removedd3-interpolate@1.4.0(transitive)
- Removedd3-scale@1.0.7(transitive)
- Removedd3-selection@1.4.2(transitive)
- Removedd3-shape@1.3.7(transitive)
- Removedd3-zoom@1.8.3(transitive)
- Removedes6-promise@4.2.8(transitive)
- Removedtslib@1.14.1(transitive)
Updated@hpcc-js/api@^0.0.42
Updated@hpcc-js/common@^0.0.42
Updatedd3-hierarchy@1.1.4
Updatedd3-interpolate@1.1.5
Updatedd3-scale@1.0.6
Updatedd3-selection@1.1.0
Updatedd3-shape@1.2.0
Updatedtslib@1.7.1