StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5 lines
88 KiB
5 lines
88 KiB
// Version 1.3.0 circlepack-chart - https://github.com/vasturiano/circlepack-chart
|
|
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).CirclePack=n()}(this,(function(){"use strict";!function(t,n){void 0===n&&(n={});var e=n.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===e&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}(".circlepack-viz {\n cursor: move;\n}\n\n.circlepack-viz circle {\n cursor: pointer;\n stroke: lightgrey;\n stroke-opacity: .4;\n opacity: .85;\n transition-property: stroke-opacity, opacity;\n transition-duration: .4s;\n}\n\n.circlepack-viz circle:hover {\n stroke-opacity: 1;\n opacity: 1;\n transition-duration: .05s;\n}\n\n.circlepack-viz text {\n font-size: 12px;\n font-family: sans-serif;\n pointer-events: none;\n dominant-baseline: middle;\n text-anchor: middle;\n fill: #404041;\n}\n\n.circlepack-viz text.light {\n fill: #F7F7F7;\n}\n\n.circlepack-tooltip {\n display: none;\n position: absolute;\n max-width: 320px;\n white-space: nowrap;\n padding: 5px;\n border-radius: 3px;\n font: 12px sans-serif;\n color: #eee;\n background: rgba(0,0,0,0.65);\n pointer-events: none;\n}\n\n.circlepack-tooltip .tooltip-title {\n font-weight: bold;\n text-align: center;\n margin-bottom: 5px;\n}");var t="http://www.w3.org/1999/xhtml",n={svg:"http://www.w3.org/2000/svg",xhtml:t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function e(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function r(n){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===t&&e.documentElement.namespaceURI===t?e.createElement(n):e.createElementNS(r,n)}}function i(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function o(t){var n=e(t);return(n.local?i:r)(n)}function a(){}function u(t){return null==t?a:function(){return this.querySelector(t)}}function s(){return[]}function c(t){return null==t?s:function(){return this.querySelectorAll(t)}}function l(t){return function(){return this.matches(t)}}function f(t){return new Array(t.length)}function h(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}h.prototype={constructor:h,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var p="$";function d(t,n,e,r,i,o){for(var a,u=0,s=n.length,c=o.length;u<c;++u)(a=n[u])?(a.__data__=o[u],r[u]=a):e[u]=new h(t,o[u]);for(;u<s;++u)(a=n[u])&&(i[u]=a)}function g(t,n,e,r,i,o,a){var u,s,c,l={},f=n.length,d=o.length,g=new Array(f);for(u=0;u<f;++u)(s=n[u])&&(g[u]=c=p+a.call(s,s.__data__,u,n),c in l?i[u]=s:l[c]=s);for(u=0;u<d;++u)(s=l[c=p+a.call(t,o[u],u,o)])?(r[u]=s,s.__data__=o[u],l[c]=null):e[u]=new h(t,o[u]);for(u=0;u<f;++u)(s=n[u])&&l[g[u]]===s&&(i[u]=s)}function v(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function m(t){return function(){this.removeAttribute(t)}}function y(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(t,n){return function(){this.setAttribute(t,n)}}function b(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function w(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function x(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function k(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function M(t){return function(){this.style.removeProperty(t)}}function A(t,n,e){return function(){this.style.setProperty(t,n,e)}}function z(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function N(t,n){return t.style.getPropertyValue(n)||k(t).getComputedStyle(t,null).getPropertyValue(n)}function E(t){return function(){delete this[t]}}function S(t,n){return function(){this[t]=n}}function C(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function T(t){return t.trim().split(/^|\s+/)}function R(t){return t.classList||new P(t)}function P(t){this._node=t,this._names=T(t.getAttribute("class")||"")}function q(t,n){for(var e=R(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function O(t,n){for(var e=R(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function j(t){return function(){q(this,t)}}function H(t){return function(){O(this,t)}}function X(t,n){return function(){(n.apply(this,arguments)?q:O)(this,t)}}function F(){this.textContent=""}function D(t){return function(){this.textContent=t}}function I(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function L(){this.innerHTML=""}function B(t){return function(){this.innerHTML=t}}function Y(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function U(){this.nextSibling&&this.parentNode.appendChild(this)}function $(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function V(){return null}function G(){var t=this.parentNode;t&&t.removeChild(this)}function K(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function W(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}P.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Q={},Z=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Q={mouseenter:"mouseover",mouseleave:"mouseout"}));function J(t,n,e){return t=tt(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function tt(t,n,e){return function(r){var i=Z;Z=r;try{t.call(this,this.__data__,n,e)}finally{Z=i}}}function nt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function et(t,n,e){var r=Q.hasOwnProperty(t.type)?J:tt;return function(i,o,a){var u,s=this.__on,c=r(n,o,a);if(s)for(var l=0,f=s.length;l<f;++l)if((u=s[l]).type===t.type&&u.name===t.name)return this.removeEventListener(u.type,u.listener,u.capture),this.addEventListener(u.type,u.listener=c,u.capture=e),void(u.value=n);this.addEventListener(t.type,c,e),u={type:t.type,name:t.name,value:n,listener:c,capture:e},s?s.push(u):this.__on=[u]}}function rt(t,n,e){var r=k(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function it(t,n){return function(){return rt(this,t,n)}}function ot(t,n){return function(){return rt(this,t,n.apply(this,arguments))}}var at=[null];function ut(t,n){this._groups=t,this._parents=n}function st(){return new ut([[document.documentElement]],at)}function ct(t){return"string"==typeof t?new ut([[document.querySelector(t)]],[document.documentElement]):new ut([[t]],at)}function lt(){for(var t,n=Z;t=n.sourceEvent;)n=t;return n}function ft(t,n){var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();return r.x=n.clientX,r.y=n.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[n.clientX-i.left-t.clientLeft,n.clientY-i.top-t.clientTop]}function ht(t){var n=lt();return n.changedTouches&&(n=n.changedTouches[0]),ft(t,n)}function pt(t,n,e){arguments.length<3&&(e=n,n=lt().changedTouches);for(var r,i=0,o=n?n.length:0;i<o;++i)if((r=n[i]).identifier===e)return ft(t,r);return null}function dt(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}ut.prototype=st.prototype={constructor:ut,select:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a,s=n[i],c=s.length,l=r[i]=new Array(c),f=0;f<c;++f)(o=s[f])&&(a=t.call(o,o.__data__,f,s))&&("__data__"in o&&(a.__data__=o.__data__),l[f]=a);return new ut(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=c(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,u=n[o],s=u.length,l=0;l<s;++l)(a=u[l])&&(r.push(t.call(a,a.__data__,l,u)),i.push(a));return new ut(r,i)},filter:function(t){"function"!=typeof t&&(t=l(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new ut(r,this._parents)},data:function(t,n){if(!t)return v=new Array(this.size()),l=-1,this.each((function(t){v[++l]=t})),v;var e,r=n?g:d,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var a=o.length,u=new Array(a),s=new Array(a),c=new Array(a),l=0;l<a;++l){var f=i[l],h=o[l],p=h.length,v=t.call(f,f&&f.__data__,l,i),m=v.length,y=s[l]=new Array(m),_=u[l]=new Array(m);r(f,h,y,_,c[l]=new Array(p),v,n);for(var b,w,x=0,k=0;x<m;++x)if(b=y[x]){for(x>=k&&(k=x+1);!(w=_[k])&&++k<m;);b._next=w||null}}return(u=new ut(u,i))._enter=s,u._exit=c,u},enter:function(){return new ut(this._enter||this._groups.map(f),this._parents)},exit:function(){return new ut(this._exit||this._groups.map(f),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=n[u],l=e[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(s=c[p]||l[p])&&(h[p]=s);for(;u<r;++u)a[u]=n[u];return new ut(a,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=v);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var a,u=e[o],s=u.length,c=i[o]=new Array(s),l=0;l<s;++l)(a=u[l])&&(c[l]=a);c.sort(n)}return new ut(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,n){var r=e(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==n?r.local?y:m:"function"==typeof n?r.local?x:w:r.local?b:_)(r,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?M:"function"==typeof n?z:A)(t,n,null==e?"":e)):N(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?E:"function"==typeof n?C:S)(t,n)):this.node()[t]},classed:function(t,n){var e=T(t+"");if(arguments.length<2){for(var r=R(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?X:n?j:H)(e,n))},text:function(t){return arguments.length?this.each(null==t?F:("function"==typeof t?I:D)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?L:("function"==typeof t?Y:B)(t)):this.node().innerHTML},raise:function(){return this.each(U)},lower:function(){return this.each($)},append:function(t){var n="function"==typeof t?t:o(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:o(t),r=null==n?V:"function"==typeof n?n:u(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(G)},clone:function(t){return this.select(t?W:K)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=function(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}(t+""),a=o.length;if(!(arguments.length<2)){for(u=n?et:nt,null==e&&(e=!1),r=0;r<a;++r)this.each(u(o[r],n,e));return this}var u=this.node().__on;if(u)for(var s,c=0,l=u.length;c<l;++c)for(r=0,s=u[c];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?ot:it)(t,n))}};var gt,vt,mt=(1===(gt=dt).length&&(vt=gt,gt=function(t,n){return dt(vt(t),n)}),{left:function(t,n,e,r){for(null==e&&(e=0),null==r&&(r=t.length);e<r;){var i=e+r>>>1;gt(t[i],n)<0?e=i+1:r=i}return e},right:function(t,n,e,r){for(null==e&&(e=0),null==r&&(r=t.length);e<r;){var i=e+r>>>1;gt(t[i],n)>0?r=i:e=i+1}return e}}).right,yt=Math.sqrt(50),_t=Math.sqrt(10),bt=Math.sqrt(2);function wt(t,n,e){var r=(n-t)/Math.max(0,e),i=Math.floor(Math.log(r)/Math.LN10),o=r/Math.pow(10,i);return i>=0?(o>=yt?10:o>=_t?5:o>=bt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=yt?10:o>=_t?5:o>=bt?2:1)}function xt(t,n){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(n).domain(t)}return this}function kt(t,n,e){t.prototype=n.prototype=e,e.constructor=t}function Mt(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function At(){}var zt="\\s*([+-]?\\d+)\\s*",Nt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Et="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",St=/^#([0-9a-f]{3})$/,Ct=/^#([0-9a-f]{6})$/,Tt=new RegExp("^rgb\\("+[zt,zt,zt]+"\\)$"),Rt=new RegExp("^rgb\\("+[Et,Et,Et]+"\\)$"),Pt=new RegExp("^rgba\\("+[zt,zt,zt,Nt]+"\\)$"),qt=new RegExp("^rgba\\("+[Et,Et,Et,Nt]+"\\)$"),Ot=new RegExp("^hsl\\("+[Nt,Et,Et]+"\\)$"),jt=new RegExp("^hsla\\("+[Nt,Et,Et,Nt]+"\\)$"),Ht={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Xt(t){var n;return t=(t+"").trim().toLowerCase(),(n=St.exec(t))?new Bt((n=parseInt(n[1],16))>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):(n=Ct.exec(t))?Ft(parseInt(n[1],16)):(n=Tt.exec(t))?new Bt(n[1],n[2],n[3],1):(n=Rt.exec(t))?new Bt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Pt.exec(t))?Dt(n[1],n[2],n[3],n[4]):(n=qt.exec(t))?Dt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=Ot.exec(t))?Ut(n[1],n[2]/100,n[3]/100,1):(n=jt.exec(t))?Ut(n[1],n[2]/100,n[3]/100,n[4]):Ht.hasOwnProperty(t)?Ft(Ht[t]):"transparent"===t?new Bt(NaN,NaN,NaN,0):null}function Ft(t){return new Bt(t>>16&255,t>>8&255,255&t,1)}function Dt(t,n,e,r){return r<=0&&(t=n=e=NaN),new Bt(t,n,e,r)}function It(t){return t instanceof At||(t=Xt(t)),t?new Bt((t=t.rgb()).r,t.g,t.b,t.opacity):new Bt}function Lt(t,n,e,r){return 1===arguments.length?It(t):new Bt(t,n,e,null==r?1:r)}function Bt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Yt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Ut(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new $t(t,n,e,r)}function $t(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Vt(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}kt(At,Xt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),kt(Bt,Lt,Mt(At,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Bt(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},hex:function(){return"#"+Yt(this.r)+Yt(this.g)+Yt(this.b)},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+")")}})),kt($t,(function(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof $t)return new $t(t.h,t.s,t.l,t.opacity);if(t instanceof At||(t=Xt(t)),!t)return new $t;if(t instanceof $t)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e<r):e===o?(r-n)/u+2:(n-e)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new $t(a,u,s,t.opacity)}(t):new $t(t,n,e,null==r?1:r)}),Mt(At,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new $t(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new $t(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new Bt(Vt(t>=240?t-240:t+120,i,r),Vt(t,i,r),Vt(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 Gt=Math.PI/180,Kt=180/Math.PI,Wt=.96422,Qt=1,Zt=.82521,Jt=4/29,tn=6/29,nn=3*tn*tn,en=tn*tn*tn;function rn(t){if(t instanceof on)return new on(t.l,t.a,t.b,t.opacity);if(t instanceof ln){if(isNaN(t.h))return new on(t.l,0,0,t.opacity);var n=t.h*Gt;return new on(t.l,Math.cos(n)*t.c,Math.sin(n)*t.c,t.opacity)}t instanceof Bt||(t=It(t));var e,r,i=cn(t.r),o=cn(t.g),a=cn(t.b),u=an((.2225045*i+.7168786*o+.0606169*a)/Qt);return i===o&&o===a?e=r=u:(e=an((.4360747*i+.3850649*o+.1430804*a)/Wt),r=an((.0139322*i+.0971045*o+.7141733*a)/Zt)),new on(116*u-16,500*(e-u),200*(u-r),t.opacity)}function on(t,n,e,r){this.l=+t,this.a=+n,this.b=+e,this.opacity=+r}function an(t){return t>en?Math.pow(t,1/3):t/nn+Jt}function un(t){return t>tn?t*t*t:nn*(t-Jt)}function sn(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function cn(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ln(t,n,e,r){this.h=+t,this.c=+n,this.l=+e,this.opacity=+r}kt(on,(function(t,n,e,r){return 1===arguments.length?rn(t):new on(t,n,e,null==r?1:r)}),Mt(At,{brighter:function(t){return new on(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new on(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,n=isNaN(this.a)?t:t+this.a/500,e=isNaN(this.b)?t:t-this.b/200;return new Bt(sn(3.1338561*(n=Wt*un(n))-1.6168667*(t=Qt*un(t))-.4906146*(e=Zt*un(e))),sn(-.9787684*n+1.9161415*t+.033454*e),sn(.0719453*n-.2289914*t+1.4052427*e),this.opacity)}})),kt(ln,(function(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof ln)return new ln(t.h,t.c,t.l,t.opacity);if(t instanceof on||(t=rn(t)),0===t.a&&0===t.b)return new ln(NaN,0,t.l,t.opacity);var n=Math.atan2(t.b,t.a)*Kt;return new ln(n<0?n+360:n,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new ln(t,n,e,null==r?1:r)}),Mt(At,{brighter:function(t){return new ln(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new ln(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return rn(this).rgb()}}));var fn=-.14861,hn=1.78277,pn=-.29227,dn=-.90649,gn=1.97294,vn=gn*dn,mn=gn*hn,yn=hn*pn-dn*fn;function _n(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function bn(t){return function(){return t}}function wn(t){return 1==(t=+t)?xn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):bn(isNaN(n)?e:n)}}function xn(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):bn(isNaN(t)?n:t)}kt(_n,(function(t,n,e,r){return 1===arguments.length?function(t){if(t instanceof _n)return new _n(t.h,t.s,t.l,t.opacity);t instanceof Bt||(t=It(t));var n=t.r/255,e=t.g/255,r=t.b/255,i=(yn*r+vn*n-mn*e)/(yn+vn-mn),o=r-i,a=(gn*(e-i)-pn*o)/dn,u=Math.sqrt(a*a+o*o)/(gn*i*(1-i)),s=u?Math.atan2(a,o)*Kt-120:NaN;return new _n(s<0?s+360:s,u,i,t.opacity)}(t):new _n(t,n,e,null==r?1:r)}),Mt(At,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new _n(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new _n(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*Gt,n=+this.l,e=isNaN(this.s)?0:this.s*n*(1-n),r=Math.cos(t),i=Math.sin(t);return new Bt(255*(n+e*(fn*r+hn*i)),255*(n+e*(pn*r+dn*i)),255*(n+e*(gn*r)),this.opacity)}}));var kn=function t(n){var e=wn(n);function r(t,n){var r=e((t=Lt(t)).r,(n=Lt(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=xn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function Mn(t,n){var e,r=n?n.length:0,i=t?Math.min(r,t.length):0,o=new Array(i),a=new Array(r);for(e=0;e<i;++e)o[e]=Tn(t[e],n[e]);for(;e<r;++e)a[e]=n[e];return function(t){for(e=0;e<i;++e)a[e]=o[e](t);return a}}function An(t,n){var e=new Date;return n-=t=+t,function(r){return e.setTime(t+n*r),e}}function zn(t,n){return n-=t=+t,function(e){return t+n*e}}function Nn(t,n){var e,r={},i={};for(e in null!==t&&"object"==typeof t||(t={}),null!==n&&"object"==typeof n||(n={}),n)e in t?r[e]=Tn(t[e],n[e]):i[e]=n[e];return function(t){for(e in r)i[e]=r[e](t);return i}}var En=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Sn=new RegExp(En.source,"g");function Cn(t,n){var e,r,i,o=En.lastIndex=Sn.lastIndex=0,a=-1,u=[],s=[];for(t+="",n+="";(e=En.exec(t))&&(r=Sn.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:zn(e,r)})),o=Sn.lastIndex;return o<n.length&&(i=n.slice(o),u[a]?u[a]+=i:u[++a]=i),u.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)u[(e=s[r]).i]=e.x(t);return u.join("")})}function Tn(t,n){var e,r=typeof n;return null==n||"boolean"===r?bn(n):("number"===r?zn:"string"===r?(e=Xt(n))?(n=e,kn):Cn:n instanceof Xt?kn:n instanceof Date?An:Array.isArray(n)?Mn:"function"!=typeof n.valueOf&&"function"!=typeof n.toString||isNaN(n)?Nn:zn)(t,n)}function Rn(t,n){return n-=t=+t,function(e){return Math.round(t+n*e)}}var Pn,qn,On,jn,Hn=180/Math.PI,Xn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fn(t,n,e,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+n*n))&&(t/=a,n/=a),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(u=Math.sqrt(e*e+r*r))&&(e/=u,r/=u,s/=u),t*r<n*e&&(t=-t,n=-n,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Hn,skewX:Math.atan(s)*Hn,scaleX:a,scaleY:u}}function Dn(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u=[],s=[];return o=t(o),a=t(a),function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push("translate(",null,n,null,e);u.push({i:s-4,x:zn(t,i)},{i:s-2,x:zn(r,o)})}else(i||o)&&a.push("translate("+i+n+o+e)}(o.translateX,o.translateY,a.translateX,a.translateY,u,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:zn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:zn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,s),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:zn(t,e)},{i:u-2,x:zn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(t){for(var n,e=-1,r=s.length;++e<r;)u[(n=s[e]).i]=n.x(t);return u.join("")}}}var In=Dn((function(t){return"none"===t?Xn:(Pn||(Pn=document.createElement("DIV"),qn=document.documentElement,On=document.defaultView),Pn.style.transform=t,t=On.getComputedStyle(qn.appendChild(Pn),null).getPropertyValue("transform"),qn.removeChild(Pn),Fn(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ln=Dn((function(t){return null==t?Xn:(jn||(jn=document.createElementNS("http://www.w3.org/2000/svg","g")),jn.setAttribute("transform",t),(t=jn.transform.baseVal.consolidate())?Fn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Xn)}),", ",")",")"),Bn=Math.SQRT2,Yn=2,Un=4,$n=1e-12;function Vn(t){return((t=Math.exp(t))+1/t)/2}function Gn(t,n){var e,r,i=t[0],o=t[1],a=t[2],u=n[0],s=n[1],c=n[2],l=u-i,f=s-o,h=l*l+f*f;if(h<$n)r=Math.log(c/a)/Bn,e=function(t){return[i+t*l,o+t*f,a*Math.exp(Bn*t*r)]};else{var p=Math.sqrt(h),d=(c*c-a*a+Un*h)/(2*a*Yn*p),g=(c*c-a*a-Un*h)/(2*c*Yn*p),v=Math.log(Math.sqrt(d*d+1)-d),m=Math.log(Math.sqrt(g*g+1)-g);r=(m-v)/Bn,e=function(t){var n,e=t*r,u=Vn(v),s=a/(Yn*p)*(u*(n=Bn*e+v,((n=Math.exp(2*n))-1)/(n+1))-function(t){return((t=Math.exp(t))-1/t)/2}(v));return[i+s*l,o+s*f,a*u/Vn(Bn*e+v)]}}return e.duration=1e3*r,e}function Kn(t){return+t}var Wn=[0,1];function Qn(t){return t}function Zn(t,n){return(n-=t=+t)?function(e){return(e-t)/n}:(e=isNaN(n)?NaN:.5,function(){return e});var e}function Jn(t,n,e){var r=t[0],i=t[1],o=n[0],a=n[1];return i<r?(r=Zn(i,r),o=e(a,o)):(r=Zn(r,i),o=e(o,a)),function(t){return o(r(t))}}function te(t,n,e){var r=Math.min(t.length,n.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),n=n.slice().reverse());++a<r;)i[a]=Zn(t[a],t[a+1]),o[a]=e(n[a],n[a+1]);return function(n){var e=mt(t,n,1,r)-1;return o[e](i[e](n))}}function ne(){var t,n,e,r,i,o,a=Wn,u=Wn,s=Tn,c=Qn;function l(){var t,n,e,s=Math.min(a.length,u.length);return c!==Qn&&(t=a[0],n=a[s-1],t>n&&(e=t,t=n,n=e),c=function(e){return Math.max(t,Math.min(n,e))}),r=s>2?te:Jn,i=o=null,f}function f(n){return isNaN(n=+n)?e:(i||(i=r(a.map(t),u,s)))(t(c(n)))}return f.invert=function(e){return c(n((o||(o=r(u,a.map(t),zn)))(e)))},f.domain=function(t){return arguments.length?(a=Array.from(t,Kn),l()):a.slice()},f.range=function(t){return arguments.length?(u=Array.from(t),l()):u.slice()},f.rangeRound=function(t){return u=Array.from(t),s=Rn,l()},f.clamp=function(t){return arguments.length?(c=!!t||Qn,l()):c!==Qn},f.interpolate=function(t){return arguments.length?(s=t,l()):s},f.unknown=function(t){return arguments.length?(e=t,f):e},function(e,r){return t=e,n=r,l()}}function ee(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[r.length>1?r[0]+r.slice(2):r,+t.slice(e+1)]}function re(t){return(t=ee(Math.abs(t)))?t[1]:NaN}var ie,oe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ae(t){return new ue(t)}function ue(t){if(!(n=oe.exec(t)))throw new Error("invalid format: "+t);var n;this.fill=n[1]||" ",this.align=n[2]||">",this.sign=n[3]||"-",this.symbol=n[4]||"",this.zero=!!n[5],this.width=n[6]&&+n[6],this.comma=!!n[7],this.precision=n[8]&&+n[8].slice(1),this.trim=!!n[9],this.type=n[10]||""}function se(t,n){var e=ee(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}ae.prototype=ue.prototype,ue.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ce={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return se(100*t,n)},r:se,s:function(t,n){var e=ee(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(ie=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+ee(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function le(t){return t}var fe,he,pe,de=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ge(t){var n,e,r=t.grouping&&t.thousands?(n=t.grouping,e=t.thousands,function(t,r){for(var i=t.length,o=[],a=0,u=n[0],s=0;i>0&&u>0&&(s+u+1>r&&(u=Math.max(1,r-s)),o.push(t.substring(i-=u,i+u)),!((s+=u+1)>r));)u=n[a=(a+1)%n.length];return o.reverse().join(e)}):le,i=t.currency,o=t.decimal,a=t.numerals?function(t){return function(n){return n.replace(/[0-9]/g,(function(n){return t[+n]}))}}(t.numerals):le,u=t.percent||"%";function s(t){var n=(t=ae(t)).fill,e=t.align,s=t.sign,c=t.symbol,l=t.zero,f=t.width,h=t.comma,p=t.precision,d=t.trim,g=t.type;"n"===g?(h=!0,g="g"):ce[g]||(null==p&&(p=12),d=!0,g="g"),(l||"0"===n&&"="===e)&&(l=!0,n="0",e="=");var v="$"===c?i[0]:"#"===c&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",m="$"===c?i[1]:/[%p]/.test(g)?u:"",y=ce[g],_=/[defgprs%]/.test(g);function b(t){var i,u,c,b=v,w=m;if("c"===g)w=y(t)+w,t="";else{var x=(t=+t)<0;if(t=y(Math.abs(t),p),d&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(i>0){if(!+t[r])break t;i=0}}return i>0?t.slice(0,i)+t.slice(n+1):t}(t)),x&&0==+t&&(x=!1),b=(x?"("===s?s:"-":"-"===s||"("===s?"":s)+b,w=("s"===g?de[8+ie/3]:"")+w+(x&&"("===s?")":""),_)for(i=-1,u=t.length;++i<u;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}h&&!l&&(t=r(t,1/0));var k=b.length+t.length+w.length,M=k<f?new Array(f-k+1).join(n):"";switch(h&&l&&(t=r(M+t,M.length?f-w.length:1/0),M=""),e){case"<":t=b+t+w+M;break;case"=":t=b+M+t+w;break;case"^":t=M.slice(0,k=M.length>>1)+b+t+w+M.slice(k);break;default:t=M+b+t+w}return a(t)}return p=null==p?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,p)):Math.max(0,Math.min(20,p)),b.toString=function(){return t+""},b}return{format:s,formatPrefix:function(t,n){var e=s(((t=ae(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(re(n)/3))),i=Math.pow(10,-r),o=de[8+r/3];return function(t){return e(i*t)+o}}}}function ve(t,n,e,r){var i,o=function(t,n,e){var r=Math.abs(n-t)/Math.max(0,e),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),o=r/i;return o>=yt?i*=10:o>=_t?i*=5:o>=bt&&(i*=2),n<t?-i:i}(t,n,e);switch((r=ae(null==r?",f":r)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(n));return null!=r.precision||isNaN(i=function(t,n){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(re(n)/3)))-re(Math.abs(t)))}(o,a))||(r.precision=i),pe(r,a);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,n){return t=Math.abs(t),n=Math.abs(n)-t,Math.max(0,re(n)-re(t))+1}(o,Math.max(Math.abs(t),Math.abs(n))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-re(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return he(r)}function me(t){var n=t.domain;return t.ticks=function(t){var e=n();return function(t,n,e){var r,i,o,a,u=-1;if(e=+e,(t=+t)===(n=+n)&&e>0)return[t];if((r=n<t)&&(i=t,t=n,n=i),0===(a=wt(t,n,e))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),n=Math.floor(n/a),o=new Array(i=Math.ceil(n-t+1));++u<i;)o[u]=(t+u)*a;else for(t=Math.floor(t*a),n=Math.ceil(n*a),o=new Array(i=Math.ceil(t-n+1));++u<i;)o[u]=(t-u)/a;return r&&o.reverse(),o}(e[0],e[e.length-1],null==t?10:t)},t.tickFormat=function(t,e){var r=n();return ve(r[0],r[r.length-1],null==t?10:t,e)},t.nice=function(e){null==e&&(e=10);var r,i=n(),o=0,a=i.length-1,u=i[o],s=i[a];return s<u&&(r=u,u=s,s=r,r=o,o=a,a=r),(r=wt(u,s,e))>0?r=wt(u=Math.floor(u/r)*r,s=Math.ceil(s/r)*r,e):r<0&&(r=wt(u=Math.ceil(u*r)/r,s=Math.floor(s*r)/r,e)),r>0?(i[o]=Math.floor(u/r)*r,i[a]=Math.ceil(s/r)*r,n(i)):r<0&&(i[o]=Math.ceil(u*r)/r,i[a]=Math.floor(s*r)/r,n(i)),t},t}function ye(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;--r>=0;)n+=e[r].value;else n=1;t.value=n}function _e(t,n){var e,r,i,o,a,u=new ke(t),s=+t.value&&(u.value=t.value),c=[u];for(null==n&&(n=be);e=c.pop();)if(s&&(e.value=+e.data.value),(i=n(e.data))&&(a=i.length))for(e.children=new Array(a),o=a-1;o>=0;--o)c.push(r=e.children[o]=new ke(i[o])),r.parent=e,r.depth=e.depth+1;return u.eachBefore(xe)}function be(t){return t.children}function we(t){t.data=t.data.data}function xe(t){var n=0;do{t.height=n}while((t=t.parent)&&t.height<++n)}function ke(t){this.data=t,this.depth=this.height=0,this.parent=null}fe=ge({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),he=fe.format,pe=fe.formatPrefix,ke.prototype=_e.prototype={constructor:ke,count:function(){return this.eachAfter(ye)},each:function(t){var n,e,r,i,o=this,a=[o];do{for(n=a.reverse(),a=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)a.push(e[r])}while(a.length);return this},eachAfter:function(t){for(var n,e,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;e>=0;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;--i>=0;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;t=e.pop(),n=r.pop();for(;t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return _e(this).eachBefore(we)}};var Me=Array.prototype.slice;function Ae(t){for(var n,e,r=0,i=(t=function(t){for(var n,e,r=t.length;r;)e=Math.random()*r--|0,n=t[r],t[r]=t[e],t[e]=n;return t}(Me.call(t))).length,o=[];r<i;)n=t[r],e&&Ee(e,n)?++r:(e=Ce(o=ze(o,n)),r=0);return e}function ze(t,n){var e,r;if(Se(n,t))return[n];for(e=0;e<t.length;++e)if(Ne(n,t[e])&&Se(Te(t[e],n),t))return[t[e],n];for(e=0;e<t.length-1;++e)for(r=e+1;r<t.length;++r)if(Ne(Te(t[e],t[r]),n)&&Ne(Te(t[e],n),t[r])&&Ne(Te(t[r],n),t[e])&&Se(Re(t[e],t[r],n),t))return[t[e],t[r],n];throw new Error}function Ne(t,n){var e=t.r-n.r,r=n.x-t.x,i=n.y-t.y;return e<0||e*e<r*r+i*i}function Ee(t,n){var e=t.r-n.r+1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Se(t,n){for(var e=0;e<n.length;++e)if(!Ee(t,n[e]))return!1;return!0}function Ce(t){switch(t.length){case 1:return{x:(n=t[0]).x,y:n.y,r:n.r};case 2:return Te(t[0],t[1]);case 3:return Re(t[0],t[1],t[2])}var n}function Te(t,n){var e=t.x,r=t.y,i=t.r,o=n.x,a=n.y,u=n.r,s=o-e,c=a-r,l=u-i,f=Math.sqrt(s*s+c*c);return{x:(e+o+s/f*l)/2,y:(r+a+c/f*l)/2,r:(f+i+u)/2}}function Re(t,n,e){var r=t.x,i=t.y,o=t.r,a=n.x,u=n.y,s=n.r,c=e.x,l=e.y,f=e.r,h=r-a,p=r-c,d=i-u,g=i-l,v=s-o,m=f-o,y=r*r+i*i-o*o,_=y-a*a-u*u+s*s,b=y-c*c-l*l+f*f,w=p*d-h*g,x=(d*b-g*_)/(2*w)-r,k=(g*v-d*m)/w,M=(p*_-h*b)/(2*w)-i,A=(h*m-p*v)/w,z=k*k+A*A-1,N=2*(o+x*k+M*A),E=x*x+M*M-o*o,S=-(z?(N+Math.sqrt(N*N-4*z*E))/(2*z):E/N);return{x:r+x+k*S,y:i+M+A*S,r:S}}function Pe(t,n,e){var r,i,o,a,u=t.x-n.x,s=t.y-n.y,c=u*u+s*s;c?(i=n.r+e.r,i*=i,a=t.r+e.r,i>(a*=a)?(r=(c+a-i)/(2*c),o=Math.sqrt(Math.max(0,a/c-r*r)),e.x=t.x-r*u-o*s,e.y=t.y-r*s+o*u):(r=(c+i-a)/(2*c),o=Math.sqrt(Math.max(0,i/c-r*r)),e.x=n.x+r*u-o*s,e.y=n.y+r*s+o*u)):(e.x=n.x+e.r,e.y=n.y)}function qe(t,n){var e=t.r+n.r-1e-6,r=n.x-t.x,i=n.y-t.y;return e>0&&e*e>r*r+i*i}function Oe(t){var n=t._,e=t.next._,r=n.r+e.r,i=(n.x*e.r+e.x*n.r)/r,o=(n.y*e.r+e.y*n.r)/r;return i*i+o*o}function je(t){this._=t,this.next=null,this.previous=null}function He(t){return null==t?null:function(t){if("function"!=typeof t)throw new Error;return t}(t)}function Xe(){return 0}function Fe(t){return function(){return t}}function De(t){return Math.sqrt(t.value)}function Ie(t){return function(n){n.children||(n.r=Math.max(0,+t(n)||0))}}function Le(t,n){return function(e){if(r=e.children){var r,i,o,a=r.length,u=t(e)*n||0;if(u)for(i=0;i<a;++i)r[i].r+=u;if(o=function(t){if(!(i=t.length))return 0;var n,e,r,i,o,a,u,s,c,l,f;if((n=t[0]).x=0,n.y=0,!(i>1))return n.r;if(e=t[1],n.x=-e.r,e.x=n.r,e.y=0,!(i>2))return n.r+e.r;Pe(e,n,r=t[2]),n=new je(n),e=new je(e),r=new je(r),n.next=r.previous=e,e.next=n.previous=r,r.next=e.previous=n;t:for(u=3;u<i;++u){Pe(n._,e._,r=t[u]),r=new je(r),s=e.next,c=n.previous,l=e._.r,f=n._.r;do{if(l<=f){if(qe(s._,r._)){e=s,n.next=e,e.previous=n,--u;continue t}l+=s._.r,s=s.next}else{if(qe(c._,r._)){(n=c).next=e,e.previous=n,--u;continue t}f+=c._.r,c=c.previous}}while(s!==c.next);for(r.previous=n,r.next=e,n.next=e.previous=e=r,o=Oe(n);(r=r.next)!==e;)(a=Oe(r))<o&&(n=r,o=a);e=n.next}for(n=[e._],r=e;(r=r.next)!==e;)n.push(r._);for(r=Ae(n),u=0;u<i;++u)(n=t[u]).x-=r.x,n.y-=r.y;return r.r}(r),u)for(i=0;i<a;++i)r[i].r-=u;e.r=o+u}}}function Be(t){return function(n){var e=n.parent;n.r*=t,e&&(n.x=e.x+t*n.x,n.y=e.y+t*n.y)}}var Ye={value:function(){}};function Ue(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new $e(r)}function $e(t){this._=t}function Ve(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function Ge(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function Ke(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=Ye,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}$e.prototype=Ue.prototype={constructor:$e,on:function(t,n){var e,r=this._,i=Ve(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=Ke(r[e],t.name,n);else if(null==n)for(e in r)r[e]=Ke(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=Ge(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new $e(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var We,Qe,Ze=0,Je=0,tr=0,nr=1e3,er=0,rr=0,ir=0,or="object"==typeof performance&&performance.now?performance:Date,ar="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function ur(){return rr||(ar(sr),rr=or.now()+ir)}function sr(){rr=0}function cr(){this._call=this._time=this._next=null}function lr(t,n,e){var r=new cr;return r.restart(t,n,e),r}function fr(){rr=(er=or.now())+ir,Ze=Je=0;try{!function(){ur(),++Ze;for(var t,n=We;n;)(t=rr-n._time)>=0&&n._call.call(null,t),n=n._next;--Ze}()}finally{Ze=0,function(){var t,n,e=We,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:We=n);Qe=t,pr(r)}(),rr=0}}function hr(){var t=or.now(),n=t-er;n>nr&&(ir-=n,er=t)}function pr(t){Ze||(Je&&(Je=clearTimeout(Je)),t-rr>24?(t<1/0&&(Je=setTimeout(fr,t-or.now()-ir)),tr&&(tr=clearInterval(tr))):(tr||(er=or.now(),tr=setInterval(hr,nr)),Ze=1,ar(fr)))}function dr(t,n,e){var r=new cr;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}cr.prototype=lr.prototype={constructor:cr,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?ur():+e)+(null==n?0:+n),this._next||Qe===this||(Qe?Qe._next=this:We=this,Qe=this),this._call=t,this._time=e,pr()},stop:function(){this._call&&(this._call=null,this._time=1/0,pr())}};var gr=Ue("start","end","cancel","interrupt"),vr=[],mr=0,yr=1,_r=2,br=3,wr=4,xr=5,kr=6;function Mr(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var c,l,f,h;if(e.state!==yr)return u();for(c in i)if((h=i[c]).name===e.name){if(h.state===br)return dr(o);h.state===wr?(h.state=kr,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c<n&&(h.state=kr,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[c])}if(dr((function(){e.state===br&&(e.state=wr,e.timer.restart(a,e.delay,e.time),a(s))})),e.state=_r,e.on.call("start",t,t.__data__,e.index,e.group),e.state===_r){for(e.state=br,r=new Array(f=e.tween.length),c=0,l=-1;c<f;++c)(h=e.tween[c].value.call(t,t.__data__,e.index,e.group))&&(r[++l]=h);r.length=l+1}}function a(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(u),e.state=xr,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);e.state===xr&&(e.on.call("end",t,t.__data__,e.index,e.group),u())}function u(){for(var r in e.state=kr,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=lr((function(t){e.state=yr,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:gr,tween:vr,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:mr})}function Ar(t,n){var e=Nr(t,n);if(e.state>mr)throw new Error("too late; already scheduled");return e}function zr(t,n){var e=Nr(t,n);if(e.state>br)throw new Error("too late; already running");return e}function Nr(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function Er(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>_r&&e.state<xr,e.state=kr,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function Sr(t,n){var e,r;return function(){var i=zr(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a<u;++a)if(r[a].name===n){(r=r.slice()).splice(a,1);break}i.tween=r}}function Cr(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=zr(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:n,value:e},s=0,c=i.length;s<c;++s)if(i[s].name===n){i[s]=u;break}s===c&&i.push(u)}o.tween=i}}function Tr(t,n,e){var r=t._id;return t.each((function(){var t=zr(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Nr(t,r).value[n]}}function Rr(t,n){var e;return("number"==typeof n?zn:n instanceof Xt?kn:(e=Xt(n))?(n=e,kn):Cn)(t,n)}function Pr(t){return function(){this.removeAttribute(t)}}function qr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Or(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=n(r=a,e)}}function jr(t,n,e){var r,i,o=e+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=n(r=a,e)}}function Hr(t,n,e){var r,i,o;return function(){var a,u,s=e(this);if(null!=s)return(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s));this.removeAttribute(t)}}function Xr(t,n,e){var r,i,o;return function(){var a,u,s=e(this);if(null!=s)return(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=n(r=a,s));this.removeAttributeNS(t.space,t.local)}}function Fr(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttributeNS(t.space,t.local,n(e))}}(t,i)),e}return i._value=n,i}function Dr(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t,n){return function(e){this.setAttribute(t,n(e))}}(t,i)),e}return i._value=n,i}function Ir(t,n){return function(){Ar(this,t).delay=+n.apply(this,arguments)}}function Lr(t,n){return n=+n,function(){Ar(this,t).delay=n}}function Br(t,n){return function(){zr(this,t).duration=+n.apply(this,arguments)}}function Yr(t,n){return n=+n,function(){zr(this,t).duration=n}}var Ur=st.prototype.constructor;function $r(t){return function(){this.style.removeProperty(t)}}var Vr=0;function Gr(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Kr(t){return st().transition(t)}function Wr(){return++Vr}var Qr=st.prototype;Gr.prototype=Kr.prototype={constructor:Gr,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,c,l=r[a],f=l.length,h=o[a]=new Array(f),p=0;p<f;++p)(s=l[p])&&(c=t.call(s,s.__data__,p,l))&&("__data__"in s&&(c.__data__=s.__data__),h[p]=c,Mr(h[p],n,e,p,h,Nr(s,e)));return new Gr(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=c(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,l=r[u],f=l.length,h=0;h<f;++h)if(s=l[h]){for(var p,d=t.call(s,s.__data__,h,l),g=Nr(s,e),v=0,m=d.length;v<m;++v)(p=d[v])&&Mr(p,n,e,v,d,g);o.push(d),a.push(s)}return new Gr(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=l(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,a=n[i],u=a.length,s=r[i]=[],c=0;c<u;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&s.push(o);return new Gr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),a=new Array(r),u=0;u<o;++u)for(var s,c=n[u],l=e[u],f=c.length,h=a[u]=new Array(f),p=0;p<f;++p)(s=c[p]||l[p])&&(h[p]=s);for(;u<r;++u)a[u]=n[u];return new Gr(a,this._parents,this._name,this._id)},selection:function(){return new Ur(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Wr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,c=0;c<s;++c)if(a=u[c]){var l=Nr(a,n);Mr(a,t,e,c,u,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Gr(r,this._parents,t,e)},call:Qr.call,nodes:Qr.nodes,node:Qr.node,size:Qr.size,empty:Qr.empty,each:Qr.each,on:function(t,n){var e=this._id;return arguments.length<2?Nr(this.node(),e).on.on(t):this.each(function(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Ar:zr;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}(e,t,n))},attr:function(t,n){var r=e(t),i="transform"===r?Ln:Rr;return this.attrTween(t,"function"==typeof n?(r.local?Xr:Hr)(r,i,Tr(this,"attr."+t,n)):null==n?(r.local?qr:Pr)(r):(r.local?jr:Or)(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(t);return this.tween(r,(i.local?Fr:Dr)(i,n))},style:function(t,n,e){var r="transform"==(t+="")?In:Rr;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=N(this,t),a=(this.style.removeProperty(t),N(this,t));return o===a?null:o===e&&a===r?i:i=n(e=o,r=a)}}(t,r)).on("end.style."+t,$r(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var a=N(this,t),u=e(this),s=u+"";return null==u&&(this.style.removeProperty(t),s=u=N(this,t)),a===s?null:a===r&&s===i?o:(i=s,o=n(r=a,u))}}(t,r,Tr(this,"style."+t,n))).each(function(t,n){var e,r,i,o,a="style."+n,u="end."+a;return function(){var s=zr(this,t),c=s.on,l=null==s.value[a]?o||(o=$r(n)):void 0;c===e&&i===l||(r=(e=c).copy()).on(u,i=l),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var a=N(this,t);return a===o?null:a===r?i:i=n(r=a,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,function(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&function(t,n,e){return function(r){this.style.setProperty(t,n(r),e)}}(t,o,e)),r}return o._value=n,o}(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(Tr(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Nr(this.node(),e).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?Sr:Cr)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Ir:Lr)(n,t)):Nr(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?Br:Yr)(n,t)):Nr(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){zr(this,t).ease=n}}(n,t)):Nr(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,a){var u={value:a},s={value:function(){0==--i&&o()}};e.each((function(){var e=zr(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(u),n._.interrupt.push(u),n._.end.push(s)),e.on=n}))}))}};var Zr={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Jr(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Zr.time=ur(),Zr;return e}function ti(){Z.preventDefault(),Z.stopImmediatePropagation()}function ni(t){return function(){return t}}function ei(t,n,e){this.target=t,this.type=n,this.transform=e}function ri(t,n,e){this.k=t,this.x=n,this.y=e}st.prototype.interrupt=function(t){return this.each((function(){Er(this,t)}))},st.prototype.transition=function(t){var n,e;t instanceof Gr?(n=t._id,t=t._name):(n=Wr(),(e=Zr).time=ur(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,u=r[o],s=u.length,c=0;c<s;++c)(a=u[c])&&Mr(a,t,n,c,u,e||Jr(a,n));return new Gr(r,this._parents,t,n)},ri.prototype={constructor:ri,scale:function(t){return 1===t?this:new ri(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ri(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var ii=new ri(1,0,0);function oi(){Z.stopImmediatePropagation()}function ai(){Z.preventDefault(),Z.stopImmediatePropagation()}function ui(){return!Z.button}function si(){var t,n,e=this;return e instanceof SVGElement?(t=(e=e.ownerSVGElement||e).width.baseVal.value,n=e.height.baseVal.value):(t=e.clientWidth,n=e.clientHeight),[[0,0],[t,n]]}function ci(){return this.__zoom||ii}function li(){return-Z.deltaY*(Z.deltaMode?120:1)/500}function fi(){return"ontouchstart"in this}function hi(t,n,e){var r=t.invertX(n[0][0])-e[0][0],i=t.invertX(n[1][0])-e[1][0],o=t.invertY(n[0][1])-e[0][1],a=t.invertY(n[1][1])-e[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function pi(){var t,n,e=ui,r=si,i=hi,o=li,a=fi,u=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],c=250,l=Gn,f=[],h=Ue("start","zoom","end"),p=500,d=150,g=0;function v(t){t.property("__zoom",ci).on("wheel.zoom",k).on("mousedown.zoom",M).on("dblclick.zoom",A).filter(a).on("touchstart.zoom",z).on("touchmove.zoom",N).on("touchend.zoom touchcancel.zoom",E).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,n){return(n=Math.max(u[0],Math.min(u[1],n)))===t.k?t:new ri(n,t.x,t.y)}function y(t,n,e){var r=n[0]-e[0]*t.k,i=n[1]-e[1]*t.k;return r===t.x&&i===t.y?t:new ri(t.k,r,i)}function _(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function b(t,n,e){t.on("start.zoom",(function(){w(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,o=w(t,i),a=r.apply(t,i),u=e||_(a),s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),c=t.__zoom,f="function"==typeof n?n.apply(t,i):n,h=l(c.invert(u).concat(s/c.k),f.invert(u).concat(s/f.k));return function(t){if(1===t)t=f;else{var n=h(t),e=s/n[2];t=new ri(e,u[0]-n[0]*e,u[1]-n[1]*e)}o.zoom(null,t)}}))}function w(t,n){for(var e,r=0,i=f.length;r<i;++r)if((e=f[r]).that===t)return e;return new x(t,n)}function x(t,n){this.that=t,this.args=n,this.index=-1,this.active=0,this.extent=r.apply(t,n)}function k(){if(e.apply(this,arguments)){var t=w(this,arguments),n=this.__zoom,r=Math.max(u[0],Math.min(u[1],n.k*Math.pow(2,o.apply(this,arguments)))),a=ht(this);if(t.wheel)t.mouse[0][0]===a[0]&&t.mouse[0][1]===a[1]||(t.mouse[1]=n.invert(t.mouse[0]=a)),clearTimeout(t.wheel);else{if(n.k===r)return;t.mouse=[a,n.invert(a)],Er(this),t.start()}ai(),t.wheel=setTimeout((function(){t.wheel=null,t.end()}),d),t.zoom("mouse",i(y(m(n,r),t.mouse[0],t.mouse[1]),t.extent,s))}}function M(){if(!n&&e.apply(this,arguments)){var t=w(this,arguments),r=ct(Z.view).on("mousemove.zoom",(function(){if(ai(),!t.moved){var n=Z.clientX-a,e=Z.clientY-u;t.moved=n*n+e*e>g}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=ht(t.that),t.mouse[1]),t.extent,s))}),!0).on("mouseup.zoom",(function(){r.on("mousemove.zoom mouseup.zoom",null),function(t,n){var e=t.document.documentElement,r=ct(t).on("dragstart.drag",null);n&&(r.on("click.drag",ti,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in e?r.on("selectstart.drag",null):(e.style.MozUserSelect=e.__noselect,delete e.__noselect)}(Z.view,t.moved),ai(),t.end()}),!0),o=ht(this),a=Z.clientX,u=Z.clientY;!function(t){var n=t.document.documentElement,e=ct(t).on("dragstart.drag",ti,!0);"onselectstart"in n?e.on("selectstart.drag",ti,!0):(n.__noselect=n.style.MozUserSelect,n.style.MozUserSelect="none")}(Z.view),oi(),t.mouse=[o,this.__zoom.invert(o)],Er(this),t.start()}}function A(){if(e.apply(this,arguments)){var t=this.__zoom,n=ht(this),o=t.invert(n),a=t.k*(Z.shiftKey?.5:2),u=i(y(m(t,a),n,o),r.apply(this,arguments),s);ai(),c>0?ct(this).transition().duration(c).call(b,u,n):ct(this).call(v.transform,u)}}function z(){if(e.apply(this,arguments)){var n,r,i,o,a=w(this,arguments),u=Z.changedTouches,s=u.length;for(oi(),r=0;r<s;++r)o=[o=pt(this,u,(i=u[r]).identifier),this.__zoom.invert(o),i.identifier],a.touch0?a.touch1||(a.touch1=o):(a.touch0=o,n=!0);if(t&&(t=clearTimeout(t),!a.touch1))return a.end(),void((o=ct(this).on("dblclick.zoom"))&&o.apply(this,arguments));n&&(t=setTimeout((function(){t=null}),p),Er(this),a.start())}}function N(){var n,e,r,o,a=w(this,arguments),u=Z.changedTouches,c=u.length;for(ai(),t&&(t=clearTimeout(t)),n=0;n<c;++n)r=pt(this,u,(e=u[n]).identifier),a.touch0&&a.touch0[2]===e.identifier?a.touch0[0]=r:a.touch1&&a.touch1[2]===e.identifier&&(a.touch1[0]=r);if(e=a.that.__zoom,a.touch1){var l=a.touch0[0],f=a.touch0[1],h=a.touch1[0],p=a.touch1[1],d=(d=h[0]-l[0])*d+(d=h[1]-l[1])*d,g=(g=p[0]-f[0])*g+(g=p[1]-f[1])*g;e=m(e,Math.sqrt(d/g)),r=[(l[0]+h[0])/2,(l[1]+h[1])/2],o=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!a.touch0)return;r=a.touch0[0],o=a.touch0[1]}a.zoom("touch",i(y(e,r,o),a.extent,s))}function E(){var t,e,r=w(this,arguments),i=Z.changedTouches,o=i.length;for(oi(),n&&clearTimeout(n),n=setTimeout((function(){n=null}),p),t=0;t<o;++t)e=i[t],r.touch0&&r.touch0[2]===e.identifier?delete r.touch0:r.touch1&&r.touch1[2]===e.identifier&&delete r.touch1;r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0?r.touch0[1]=this.__zoom.invert(r.touch0[0]):r.end()}return v.transform=function(t,n){var e=t.selection?t.selection():t;e.property("__zoom",ci),t!==e?b(t,n):e.interrupt().each((function(){w(this,arguments).start().zoom(null,"function"==typeof n?n.apply(this,arguments):n).end()}))},v.scaleBy=function(t,n){v.scaleTo(t,(function(){var t=this.__zoom.k,e="function"==typeof n?n.apply(this,arguments):n;return t*e}))},v.scaleTo=function(t,n){v.transform(t,(function(){var t=r.apply(this,arguments),e=this.__zoom,o=_(t),a=e.invert(o),u="function"==typeof n?n.apply(this,arguments):n;return i(y(m(e,u),o,a),t,s)}))},v.translateBy=function(t,n,e){v.transform(t,(function(){return i(this.__zoom.translate("function"==typeof n?n.apply(this,arguments):n,"function"==typeof e?e.apply(this,arguments):e),r.apply(this,arguments),s)}))},v.translateTo=function(t,n,e){v.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,a=_(t);return i(ii.translate(a[0],a[1]).scale(o.k).translate("function"==typeof n?-n.apply(this,arguments):-n,"function"==typeof e?-e.apply(this,arguments):-e),t,s)}))},x.prototype={start:function(){return 1==++this.active&&(this.index=f.push(this)-1,this.emit("start")),this},zoom:function(t,n){return this.mouse&&"mouse"!==t&&(this.mouse[1]=n.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=n.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=n.invert(this.touch1[0])),this.that.__zoom=n,this.emit("zoom"),this},end:function(){return 0==--this.active&&(f.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(t){!function(t,n,e,r){var i=Z;t.sourceEvent=Z,Z=t;try{n.apply(e,r)}finally{Z=i}}(new ei(v,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},v.wheelDelta=function(t){return arguments.length?(o="function"==typeof t?t:ni(+t),v):o},v.filter=function(t){return arguments.length?(e="function"==typeof t?t:ni(!!t),v):e},v.touchable=function(t){return arguments.length?(a="function"==typeof t?t:ni(!!t),v):a},v.extent=function(t){return arguments.length?(r="function"==typeof t?t:ni([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),v):r},v.scaleExtent=function(t){return arguments.length?(u[0]=+t[0],u[1]=+t[1],v):[u[0],u[1]]},v.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(t){return arguments.length?(i=t,v):i},v.duration=function(t){return arguments.length?(c=+t,v):c},v.interpolate=function(t){return arguments.length?(l=t,v):l},v.on=function(){var t=h.on.apply(h,arguments);return t===h?v:t},v.clickDistance=function(t){return arguments.length?(g=(t=+t)*t,v):Math.sqrt(g)},v}function di(t,n,e){var r,i,o,a,u;function s(){var c=Date.now()-a;c<n&&c>=0?r=setTimeout(s,n-c):(r=null,e||(u=t.apply(o,i),o=i=null))}null==n&&(n=100);var c=function(){o=this,i=arguments,a=Date.now();var c=e&&!r;return r||(r=setTimeout(s,n)),c&&(u=t.apply(o,i),o=i=null),u};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(u=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}di.debounce=di;var gi=di;function vi(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var mi=function t(n,e){var r=e.default,i=void 0===r?null:r,o=e.triggerUpdate,a=void 0===o||o,u=e.onChange,s=void 0===u?function(t,n){}:u;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=s};function yi(t){var n=t.stateInit,e=void 0===n?function(){return{}}:n,r=t.props,i=void 0===r?{}:r,o=t.methods,a=void 0===o?{}:o,u=t.aliases,s=void 0===u?{}:u,c=t.init,l=void 0===c?function(){}:c,f=t.update,h=void 0===f?function(){}:f,p=Object.keys(i).map((function(t){return new mi(t,i[t])}));return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign({},e instanceof Function?e(t):e,{initialised:!1});function r(n){return i(n,t),o(),r}var i=function(t,e){l.call(r,t,n,e),n.initialised=!0},o=gi((function(){n.initialised&&h.call(r,n)}),1);return p.forEach((function(t){r[t.name]=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(t,n){};return function(a){var u=n[t];return arguments.length?(n[t]=a,i.call(r,a,n,u),e&&o(),r):u}}(t.name,t.triggerUpdate,t.onChange)})),Object.keys(a).forEach((function(t){r[t]=function(){for(var e,i=arguments.length,o=new Array(i),u=0;u<i;u++)o[u]=arguments[u];return(e=a[t]).call.apply(e,[r,n].concat(o))}})),Object.entries(s).forEach((function(t){var n=vi(t,2),e=n[0],i=n[1];return r[e]=r[i]})),r.resetProps=function(){return p.forEach((function(t){r[t.name](t.defaultVal)})),r},r.resetProps(),n._rerender=o,r}}function _i(t){return(_i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function bi(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}function wi(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{},r=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(e).filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))),r.forEach((function(n){bi(t,n,e[n])}))}return t}var xi=yi({props:{htmlEl:{onChange:function(t,n){n.htmlEls=(t?t instanceof Array?t:[t]:[]).map((function(t){return"object"===_i(t)&&t.node&&"function"==typeof t.node?t:ct(t)}))},triggerUpdate:!1},svgEl:{onChange:function(t,n){n.svgEls=(t?t instanceof Array?t:[t]:[]).map((function(t){return"object"===_i(t)&&t.node&&"function"==typeof t.node?t:ct(t)}))},triggerUpdate:!1},canvasEl:{onChange:function(t,n){n.canvasCtxs=(t?t instanceof Array?t:[t]:[]).map((function(t){return"object"===_i(t)&&t.node&&"function"==typeof t.node?t.node().getContext("2d"):t.getContext("2d")}))},triggerUpdate:!1},enableX:{default:!0,triggerUpdate:!1},enableY:{default:!0,triggerUpdate:!1},scaleExtent:{default:[1,1/0],onChange:function(t,n){t&&n.zoom.scaleExtent(t)},triggerUpdate:!1},translateExtent:{onChange:function(t,n){t&&n.zoom.translateExtent(t)},triggerUpdate:!1},onChange:{triggerUpdate:!1}},methods:{current:function(t){return wi({},t.zoomTransform)},zoomBy:function(t,n){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t.initialised&&(t.transitionDuration=e,t.el.call(t.zoom.scaleBy,n)),this},zoomReset:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t.initialised&&(t.transitionDuration=n,t.el.call(t.zoom.transform,ii)),this},zoomTo:function(t,n){var e=n.x,r=void 0===e?0:e,i=n.y,o=void 0===i?0:i,a=n.k,u=void 0===a?1:a,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return t.initialised&&(t.transitionDuration=s,t.el.call(t.zoom.transform,ii.scale(u).translate(r,o))),this}},stateInit:function(){return{zoom:pi().filter((function(){return!Z.button&&!Z.dblclick})),zoomTransform:{x:0,y:0,k:1}}},init:function(t,n){var e=!!t&&"object"===_i(t)&&!!t.node&&"function"==typeof t.node;n.el=ct(e?t.node():t),n.el.call(n.zoom.on("zoom",(function(){var t=wi({},Z.transform);!n.enableX&&(t.x=0),!n.enableY&&(t.y=0);var e=n.zoomTransform;n.zoomTransform=t;var r=n.transitionDuration||0;n.transitionDuration=0;var i=n.enableX?t.k:1,o=n.enableY?t.k:1;n.htmlEls.forEach((function(n){(r?n.transition().duration(r):n).style("transform","translate(".concat(t.x,"px, ").concat(t.y,"px) scale(").concat(i,", ").concat(o,")"))})),n.svgEls.forEach((function(n){(r?n.transition().duration(r):n).attr("transform","translate(".concat(t.x,", ").concat(t.y,") scale(").concat(i,", ").concat(o,")"))})),n.canvasCtxs.forEach((function(a,u){var s=function(t){var n=t.x,e=t.y,r=t.scX,i=t.scY;a.setTransform(r,0,0,i,n,e)};r?Kr().duration(r).tween("animate-ctx-".concat(u),(function(){var r=zn(e.x,t.x),i=zn(e.y,t.y),o=n.enableX?zn(e.k,t.k):function(){return 1},a=n.enableY?zn(e.k,t.k):function(){return 1};return function(t){return s({x:r(t),y:i(t),scX:o(t),scY:a(t)})}})):s(wi({scX:i,scY:o},t))})),n.onChange&&n.onChange(t,e,r)}))),n.el.on("dblclick.zoom",null)}});"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;function ki(t,n){return t(n={exports:{}},n.exports),n.exports}var Mi,Ai=ki((function(t){!function(n){var e=/^\s+/,r=/\s+$/,i=0,o=n.round,a=n.min,u=n.max,s=n.random;function c(t,s){if(s=s||{},(t=t||"")instanceof c)return t;if(!(this instanceof c))return new c(t,s);var l=function(t){var i={r:0,g:0,b:0},o=1,s=null,c=null,l=null,f=!1,h=!1;"string"==typeof t&&(t=function(t){t=t.replace(e,"").replace(r,"").toLowerCase();var n,i=!1;if(N[t])t=N[t],i=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};if(n=D.rgb.exec(t))return{r:n[1],g:n[2],b:n[3]};if(n=D.rgba.exec(t))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=D.hsl.exec(t))return{h:n[1],s:n[2],l:n[3]};if(n=D.hsla.exec(t))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=D.hsv.exec(t))return{h:n[1],s:n[2],v:n[3]};if(n=D.hsva.exec(t))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=D.hex8.exec(t))return{r:R(n[1]),g:R(n[2]),b:R(n[3]),a:j(n[4]),format:i?"name":"hex8"};if(n=D.hex6.exec(t))return{r:R(n[1]),g:R(n[2]),b:R(n[3]),format:i?"name":"hex"};if(n=D.hex4.exec(t))return{r:R(n[1]+""+n[1]),g:R(n[2]+""+n[2]),b:R(n[3]+""+n[3]),a:j(n[4]+""+n[4]),format:i?"name":"hex8"};if(n=D.hex3.exec(t))return{r:R(n[1]+""+n[1]),g:R(n[2]+""+n[2]),b:R(n[3]+""+n[3]),format:i?"name":"hex"};return!1}(t));"object"==typeof t&&(I(t.r)&&I(t.g)&&I(t.b)?(p=t.r,d=t.g,g=t.b,i={r:255*C(p,255),g:255*C(d,255),b:255*C(g,255)},f=!0,h="%"===String(t.r).substr(-1)?"prgb":"rgb"):I(t.h)&&I(t.s)&&I(t.v)?(s=q(t.s),c=q(t.v),i=function(t,e,r){t=6*C(t,360),e=C(e,100),r=C(r,100);var i=n.floor(t),o=t-i,a=r*(1-e),u=r*(1-o*e),s=r*(1-(1-o)*e),c=i%6;return{r:255*[r,u,a,a,s,r][c],g:255*[s,r,r,u,a,a][c],b:255*[a,a,s,r,r,u][c]}}(t.h,s,c),f=!0,h="hsv"):I(t.h)&&I(t.s)&&I(t.l)&&(s=q(t.s),l=q(t.l),i=function(t,n,e){var r,i,o;function a(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(t=C(t,360),n=C(n,100),e=C(e,100),0===n)r=i=o=e;else{var u=e<.5?e*(1+n):e+n-e*n,s=2*e-u;r=a(s,u,t+1/3),i=a(s,u,t),o=a(s,u,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,s,l),f=!0,h="hsl"),t.hasOwnProperty("a")&&(o=t.a));var p,d,g;return o=S(o),{ok:f,format:t.format||h,r:a(255,u(i.r,0)),g:a(255,u(i.g,0)),b:a(255,u(i.b,0)),a:o}}(t);this._originalInput=t,this._r=l.r,this._g=l.g,this._b=l.b,this._a=l.a,this._roundA=o(100*this._a)/100,this._format=s.format||l.format,this._gradientType=s.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=l.ok,this._tc_id=i++}function l(t,n,e){t=C(t,255),n=C(n,255),e=C(e,255);var r,i,o=u(t,n,e),s=a(t,n,e),c=(o+s)/2;if(o==s)r=i=0;else{var l=o-s;switch(i=c>.5?l/(2-o-s):l/(o+s),o){case t:r=(n-e)/l+(n<e?6:0);break;case n:r=(e-t)/l+2;break;case e:r=(t-n)/l+4}r/=6}return{h:r,s:i,l:c}}function f(t,n,e){t=C(t,255),n=C(n,255),e=C(e,255);var r,i,o=u(t,n,e),s=a(t,n,e),c=o,l=o-s;if(i=0===o?0:l/o,o==s)r=0;else{switch(o){case t:r=(n-e)/l+(n<e?6:0);break;case n:r=(e-t)/l+2;break;case e:r=(t-n)/l+4}r/=6}return{h:r,s:i,v:c}}function h(t,n,e,r){var i=[P(o(t).toString(16)),P(o(n).toString(16)),P(o(e).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function p(t,n,e,r){return[P(O(r)),P(o(t).toString(16)),P(o(n).toString(16)),P(o(e).toString(16))].join("")}function d(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.s-=n/100,e.s=T(e.s),c(e)}function g(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.s+=n/100,e.s=T(e.s),c(e)}function v(t){return c(t).desaturate(100)}function m(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.l+=n/100,e.l=T(e.l),c(e)}function y(t,n){n=0===n?0:n||10;var e=c(t).toRgb();return e.r=u(0,a(255,e.r-o(-n/100*255))),e.g=u(0,a(255,e.g-o(-n/100*255))),e.b=u(0,a(255,e.b-o(-n/100*255))),c(e)}function _(t,n){n=0===n?0:n||10;var e=c(t).toHsl();return e.l-=n/100,e.l=T(e.l),c(e)}function b(t,n){var e=c(t).toHsl(),r=(e.h+n)%360;return e.h=r<0?360+r:r,c(e)}function w(t){var n=c(t).toHsl();return n.h=(n.h+180)%360,c(n)}function x(t){var n=c(t).toHsl(),e=n.h;return[c(t),c({h:(e+120)%360,s:n.s,l:n.l}),c({h:(e+240)%360,s:n.s,l:n.l})]}function k(t){var n=c(t).toHsl(),e=n.h;return[c(t),c({h:(e+90)%360,s:n.s,l:n.l}),c({h:(e+180)%360,s:n.s,l:n.l}),c({h:(e+270)%360,s:n.s,l:n.l})]}function M(t){var n=c(t).toHsl(),e=n.h;return[c(t),c({h:(e+72)%360,s:n.s,l:n.l}),c({h:(e+216)%360,s:n.s,l:n.l})]}function A(t,n,e){n=n||6,e=e||30;var r=c(t).toHsl(),i=360/e,o=[c(t)];for(r.h=(r.h-(i*n>>1)+720)%360;--n;)r.h=(r.h+i)%360,o.push(c(r));return o}function z(t,n){n=n||6;for(var e=c(t).toHsv(),r=e.h,i=e.s,o=e.v,a=[],u=1/n;n--;)a.push(c({h:r,s:i,v:o})),o=(o+u)%1;return a}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,i=this.toRgb();return t=i.r/255,e=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=S(t),this._roundA=o(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),n=o(360*t.h),e=o(100*t.s),r=o(100*t.v);return 1==this._a?"hsv("+n+", "+e+"%, "+r+"%)":"hsva("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=l(this._r,this._g,this._b),n=o(360*t.h),e=o(100*t.s),r=o(100*t.l);return 1==this._a?"hsl("+n+", "+e+"%, "+r+"%)":"hsla("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,n,e,r,i){var a=[P(o(t).toString(16)),P(o(n).toString(16)),P(o(e).toString(16)),P(O(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*C(this._r,255))+"%",g:o(100*C(this._g,255))+"%",b:o(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*C(this._r,255))+"%, "+o(100*C(this._g,255))+"%, "+o(100*C(this._b,255))+"%)":"rgba("+o(100*C(this._r,255))+"%, "+o(100*C(this._g,255))+"%, "+o(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(E[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var n="#"+p(this._r,this._g,this._b,this._a),e=n,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);e="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+e+")"},toString:function(t){var n=!!t;t=t||this._format;var e=!1,r=this._a<1&&this._a>=0;return n||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,n){var e=t.apply(null,[this].concat([].slice.call(n)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(m,arguments)},brighten:function(){return this._applyModification(y,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(g,arguments)},greyscale:function(){return this._applyModification(v,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(w,arguments)},monochromatic:function(){return this._applyCombination(z,arguments)},splitcomplement:function(){return this._applyCombination(M,arguments)},triad:function(){return this._applyCombination(x,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,n){if("object"==typeof t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]="a"===r?t[r]:q(t[r]));t=e}return c(t,n)},c.equals=function(t,n){return!(!t||!n)&&c(t).toRgbString()==c(n).toRgbString()},c.random=function(){return c.fromRatio({r:s(),g:s(),b:s()})},c.mix=function(t,n,e){e=0===e?0:e||50;var r=c(t).toRgb(),i=c(n).toRgb(),o=e/100;return c({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},
|
|
// <http://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef (WCAG Version 2)
|
|
// Analyze the 2 colors and returns the color contrast defined by (WCAG Version 2)
|
|
c.readability=function(t,e){var r=c(t),i=c(e);return(n.max(r.getLuminance(),i.getLuminance())+.05)/(n.min(r.getLuminance(),i.getLuminance())+.05)},c.isReadable=function(t,n,e){var r,i,o=c.readability(t,n);switch(i=!1,(r=function(t){var n,e;n=((t=t||{level:"AA",size:"small"}).level||"AA").toUpperCase(),e=(t.size||"small").toLowerCase(),"AA"!==n&&"AAA"!==n&&(n="AA");"small"!==e&&"large"!==e&&(e="small");return{level:n,size:e}}(e)).level+r.size){case"AAsmall":case"AAAlarge":i=o>=4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},c.mostReadable=function(t,n,e){var r,i,o,a,u=null,s=0;i=(e=e||{}).includeFallbackColors,o=e.level,a=e.size;for(var l=0;l<n.length;l++)(r=c.readability(t,n[l]))>s&&(s=r,u=c(n[l]));return c.isReadable(t,u,{level:o,size:a})||!i?u:(e.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],e))};var N=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},E=c.hexNames=function(t){var n={};for(var e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}(N);function S(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=a(e,u(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function T(t){return a(1,u(0,t))}function R(t){return parseInt(t,16)}function P(t){return 1==t.length?"0"+t:""+t}function q(t){return t<=1&&(t=100*t+"%"),t}function O(t){return n.round(255*parseFloat(t)).toString(16)}function j(t){return R(t)/255}var H,X,F,D=(X="[\\s|\\(]+("+(H="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",F="[\\s|\\(]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")[,|\\s]+("+H+")\\s*\\)?",{CSS_UNIT:new RegExp(H),rgb:new RegExp("rgb"+X),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+X),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+X),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function I(t){return!!D.CSS_UNIT.exec(t)}t.exports?t.exports=c:window.tinycolor=c}(Math)})),zi=ki((function(t,n){t.exports=function(t){function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=0)}([function(t,n,e){var r,i,o;i=[t,n],void 0!==(o="function"==typeof(r=function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=function(t){return t instanceof Function?t:"string"==typeof t?function(n){return n[t]}:function(n){return t}},t.exports=n.default})?r.apply(n,i):r)&&(t.exports=o)}])})),Ni=(Mi=zi)&&Mi.__esModule&&Object.prototype.hasOwnProperty.call(Mi,"default")?Mi.default:Mi,Ei=(zi.accessorFn,function t(){var n=ne()(Qn,Qn);return n.copy=function(){return e=n,t().domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown());var e},xt.apply(n,arguments),me(n)}().domain([4,8]).clamp(!0));return yi({props:{width:{default:window.innerWidth,onChange:function(t,n){n.needsReparse=!0}},height:{default:window.innerHeight,onChange:function(t,n){n.needsReparse=!0}},data:{onChange:function(t,n){n.needsReparse=!0}},children:{default:"children",onChange:function(t,n){n.needsReparse=!0}},sort:{onChange:function(t,n){n.needsReparse=!0}},label:{default:function(t){return t.name}},size:{default:"value",onChange:function(t,n){this.zoomReset(),n.needsReparse=!0}},padding:{default:4,onChange:function(t,n){n.needsReparse=!0}},color:{default:function(t){return"lightgrey"}},minCircleRadius:{default:3},excludeRoot:{default:!1,onChange:function(t,n){n.needsReparse=!0}},showLabels:{default:!0},showTooltip:{default:function(t){return!0},triggerUpdate:!1},tooltipTitle:{default:null,triggerUpdate:!1},tooltipContent:{default:function(t){return""},triggerUpdate:!1},onClick:{triggerUpdate:!1},onHover:{triggerUpdate:!1}},methods:{zoomBy:function(t,n){return t.zoom.zoomBy(n,800),this},zoomReset:function(t){return t.zoom.zoomReset(800),this},zoomToNode:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},e=n.__dataNode;if(e){var r=.12,i=Math.max(1,Math.min(t.width,t.height)/(2*e.r)*(1-r)),o={k:i,x:-Math.max(0,Math.min(t.width*(1-1/i),e.x-t.width/i/2)),y:-Math.max(0,Math.min(t.height*(1-1/i),e.y-t.height/i/2))};t.zoom.zoomTo(o,800)}return this},_parseData:function(t){if(t.data){var n=_e(t.data,Ni(t.children)).sum(Ni(t.size));t.sort&&n.sort(t.sort),function(){var t=null,n=1,e=1,r=Xe;function i(i){return i.x=n/2,i.y=e/2,t?i.eachBefore(Ie(t)).eachAfter(Le(r,.5)).eachBefore(Be(1)):i.eachBefore(Ie(De)).eachAfter(Le(Xe,1)).eachAfter(Le(r,i.r/Math.min(n,e))).eachBefore(Be(Math.min(n,e)/(2*i.r))),i}return i.radius=function(n){return arguments.length?(t=He(n),i):t},i.size=function(t){return arguments.length?(n=+t[0],e=+t[1],i):[n,e]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Fe(+t),i):r},i}().padding(t.padding).size([t.width,t.height])(n),n.descendants().forEach((function(t,n){t.id=n,t.data.__dataNode=t})),t.layoutData=n.descendants().filter(t.excludeRoot?function(t){return t.depth>0}:function(){return!0})}}},stateInit:function(){return{zoom:xi()}},init:function(t,n){var e=this,r=ct(t).append("div").attr("class","circlepack-viz");n.svg=r.append("svg"),n.canvas=n.svg.append("g"),n.tooltip=ct("body").append("div").attr("class","chart-tooltip circlepack-tooltip"),t.addEventListener("DOMNodeRemoved",(function(t){t.target===this&&n.tooltip.remove()})),n.canvas.on("mousemove",(function(){n.tooltip.style("left",Z.pageX+"px").style("top",Z.pageY+"px").style("transform","translate(-".concat(Z.offsetX/n.width*100,"%, 21px)"))})),n.zoom(n.svg).svgEl(n.canvas).onChange((function(t,e,r){n.showLabels&&!r&&n.canvas.selectAll("text").attr("transform","scale(".concat(1/t.k,")")),n.skipTransitionsOnce=!r,n._rerender()})),n.svg.on("click",(function(){return(n.onClick||e.zoomReset)(null)})).on("mouseover",(function(){return n.onHover&&n.onHover(null)}))},update:function(t){var n=this;if(t.needsReparse&&(this._parseData(),t.needsReparse=!1),t.svg.style("width",t.width+"px").style("height",t.height+"px"),t.zoom.translateExtent([[0,0],[t.width,t.height]]),t.layoutData){var e=t.zoom.current(),r=t.canvas.selectAll(".node").data(t.layoutData.filter((function(n){return n.x+n.r>-e.x/e.k&&n.x-n.r<(t.width-e.x)/e.k&&n.y+n.r>-e.y/e.k&&n.y-n.r<(t.height-e.y)/e.k&&n.r>=t.minCircleRadius/e.k})),(function(t){return t.id})),i=Ni(t.label),o=Ni(t.color),a=!t.skipTransitionsOnce;t.skipTransitionsOnce=!1;var u=Kr().duration(a?800:0);r.exit().transition(u).remove();var s=r.enter().append("g").attr("class","node").attr("transform",(function(t){return"translate(".concat(t.x,",").concat(t.y,")")}));s.append("circle").attr("id",(function(t){return"circle-".concat(t.id)})).attr("r",0).style("stroke-width",1).on("click",(function(e){Z.stopPropagation(),(t.onClick||n.zoomToNode)(e.data)})).on("mouseover",(function(n){Z.stopPropagation(),t.onHover&&t.onHover(n.data),t.tooltip.style("display",t.showTooltip(n.data,n)?"inline":"none"),t.tooltip.html('\n <div class="tooltip-title">\n '.concat(t.tooltipTitle?t.tooltipTitle(n.data,n):function(t){var n=[],e=t;for(;e;)n.unshift(e),e=e.parent;return n}(n).slice(t.excludeRoot?1:0).map((function(t){return i(t.data)})).join(" → "),"\n </div>\n ").concat(t.tooltipContent(n.data,n),"\n "))})).on("mouseout",(function(){t.tooltip.style("display","none")})),s.append("clipPath").attr("id",(function(t){return"clip-".concat(t.id)})).append("use").attr("xlink:href",(function(t){return"#circle-".concat(t.id)}));s.append("g").attr("clip-path",(function(t){return"url(#clip-".concat(t.id,")")})).append("g").attr("class","label-container").append("text").attr("class","path-label");var c=r.merge(s);if(c.transition(u).attr("transform",(function(t){return"translate(".concat(t.x,",").concat(t.y,")")})),c.select("circle").transition(u).attr("r",(function(t){return t.r})).style("fill",(function(t){return o(t.data,t.parent)})).style("stroke-width",1/e.k),c.select("g.label-container").style("display",t.showLabels?null:"none"),t.showLabels){var l=t.prevK||1;t.prevK=e.k,c.select("text.path-label").classed("light",(function(t){return!Ai(o(t.data,t.parent)).isLight()})).text((function(t){return i(t.data)})).transition(u).style("opacity",(function(t){return Ei(2*t.r*e.k/i(t.data).length)})).attrTween("transform",(function(){var t=Tn(l,e.k);return function(n){return"scale(".concat(1/t(n),")")}}))}}}})})); |