diff --git a/dist/assets/index-BASoXudL.css b/dist/assets/index-BASoXudL.css new file mode 100644 index 0000000000000000000000000000000000000000..084dbfb823cd7d094f6beb03282222516936e854 --- /dev/null +++ b/dist/assets/index-BASoXudL.css @@ -0,0 +1 @@ +:root{--primary: #987070;--secondary: #C39898;--tertiary: #DBB5B5;--quaternary: #F1E5D1;--text: #333;--box-shadow: 0px 2px 15px 2px rgb(51 51 51 / 5%)}body{font-family:Segoe UI,sans-serif;background-color:var(--quaternary);color:var(--text)}h1{text-align:center;margin-bottom:2rem}.axis path,.axis line{fill:none;stroke:#333;shape-rendering:crispEdges}.axis text{font-family:sans-serif;font-size:11px}.tooltip{position:absolute;display:none;background:#fff;padding:8px 14px;border-radius:8px;border:1px solid #ccc;color:#333;box-shadow:0 0 10px #0000001a;-webkit-user-select:none;user-select:none;z-index:10}.tooltip h4{margin:0 0 .5rem}.groupLabel{font-size:1rem;font-weight:700;text-align:center;padding:.25rem;background:#ffffff80;box-shadow:0 0 10px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#app{display:flex;gap:1rem}#app .left,#app .right{position:relative;flex:1;text-align:center}#app .left{flex:2}#app .left #bubble-chart-wrapper{position:relative;margin:1rem auto;width:fit-content;padding:1rem}#app .left .bubble-chart-settings{align-items:flex-end;justify-content:flex-end;gap:1rem}#app .left .bubble-chart-settings>div{align-items:center;justify-content:flex-end;gap:1rem}#app .left .bubble-chart-settings input,#app .left .bubble-chart-settings select{min-width:250px;margin-left:1rem}#app .right{flex:1}#app .right .comparison{display:flex;gap:1rem;padding:1rem;border-radius:.5rem;color:#fff}#app .right #radar-chart-wrapper{position:relative;margin:0 4rem 4rem}#app .right #player-cards{display:flex;flex-wrap:wrap;gap:1rem;justify-content:center}#app .right #player-cards .player-card{position:relative;display:flex;flex-direction:column;gap:.5rem;padding:1rem;border-radius:.5rem;color:#fff;min-width:300px;height:fit-content;background:#ffffff80;box-shadow:0 0 10px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#app .right #player-cards .player-card h3,#app .right #player-cards .player-card p{margin:0;text-shadow:0 0 10px rgba(0,0,0,.5)}#app .chart-settings{position:absolute;top:100%;right:0;display:flex;padding:2rem;border-radius:.5rem;flex-direction:column;background:#ffffff80;box-shadow:0 0 10px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#app .chart-settings:empty{display:none}button{padding:.5rem;border:none;cursor:pointer;transition:transform .2s;background:linear-gradient(145deg,var(--primary),var(--secondary));color:#fff;border-radius:.5rem;min-width:3rem}button:hover{transform:scale(1.05)}select,input[type=text]{border-radius:.5rem;box-shadow:0 0 10px #0000001a;padding:.5rem;border:1px solid var(--text)}.search-wrapper{margin-bottom:1rem}@media (max-width: 1536px){#app{flex-direction:column}#app .left .bubble-chart-settings{position:static;width:fit-content;margin:0 0 0 auto}}@keyframes shimmer{0%{filter:blur(70px);transform:scale(1)}50%{filter:blur(100px);transform:scale(1.3)}to{filter:blur(70px);transform:scale(1)}} diff --git a/dist/assets/index-jafTSk0V.js b/dist/assets/index-Cnt_SO0i.js similarity index 88% rename from dist/assets/index-jafTSk0V.js rename to dist/assets/index-Cnt_SO0i.js index 6a1a5d3c147dbf540132b93e285b81e62360b45a..af3b29f1ceb6c3e6a57b2b28e18c58fea4f7344e 100644 --- a/dist/assets/index-jafTSk0V.js +++ b/dist/assets/index-Cnt_SO0i.js @@ -1,8 +1,8 @@ -var ri=Object.defineProperty;var ii=(t,e,n)=>e in t?ri(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var I=(t,e,n)=>(ii(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var hn={},xe={},ve=34,Tt=10,we=13;function or(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function oi(t,e){var n=or(t);return function(r,i){return e(n(r),i,t)}}function dn(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function B(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ai(t){return t<0?"-"+B(-t,6):t>9999?"+"+B(t,6):B(t,4)}function si(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":ai(t.getUTCFullYear())+"-"+B(t.getUTCMonth()+1,2)+"-"+B(t.getUTCDate(),2)+(i?"T"+B(e,2)+":"+B(n,2)+":"+B(r,2)+"."+B(i,3)+"Z":r?"T"+B(e,2)+":"+B(n,2)+":"+B(r,2)+"Z":n||e?"T"+B(e,2)+":"+B(n,2)+"Z":"")}function ui(t){var e=new RegExp('["'+t+` -\r]`),n=t.charCodeAt(0);function r(l,h){var p,y,_=i(l,function(v,g){if(p)return p(v,g-1);y=v,p=h?oi(v,h):or(v)});return _.columns=y||[],_}function i(l,h){var p=[],y=l.length,_=0,v=0,g,A=y<=0,b=!1;l.charCodeAt(y-1)===Tt&&--y,l.charCodeAt(y-1)===we&&--y;function T(){if(A)return xe;if(b)return b=!1,hn;var P,C=_,R;if(l.charCodeAt(C)===ve){for(;_++<y&&l.charCodeAt(_)!==ve||l.charCodeAt(++_)===ve;);return(P=_)>=y?A=!0:(R=l.charCodeAt(_++))===Tt?b=!0:R===we&&(b=!0,l.charCodeAt(_)===Tt&&++_),l.slice(C+1,P-1).replace(/""/g,'"')}for(;_<y;){if((R=l.charCodeAt(P=_++))===Tt)b=!0;else if(R===we)b=!0,l.charCodeAt(_)===Tt&&++_;else if(R!==n)continue;return l.slice(C,P)}return A=!0,l.slice(C,y)}for(;(g=T())!==xe;){for(var E=[];g!==hn&&g!==xe;)E.push(g),g=T();h&&(E=h(E,v++))==null||p.push(E)}return p}function o(l,h){return l.map(function(p){return h.map(function(y){return f(p[y])}).join(t)})}function a(l,h){return h==null&&(h=dn(l)),[h.map(f).join(t)].concat(o(l,h)).join(` +var ri=Object.defineProperty;var ii=(t,e,n)=>e in t?ri(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var I=(t,e,n)=>(ii(t,typeof e!="symbol"?e+"":e,n),n);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();var hn={},xe={},ve=34,Ct=10,we=13;function or(t){return new Function("d","return {"+t.map(function(e,n){return JSON.stringify(e)+": d["+n+'] || ""'}).join(",")+"}")}function oi(t,e){var n=or(t);return function(r,i){return e(n(r),i,t)}}function dn(t){var e=Object.create(null),n=[];return t.forEach(function(r){for(var i in r)i in e||n.push(e[i]=i)}),n}function B(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ai(t){return t<0?"-"+B(-t,6):t>9999?"+"+B(t,6):B(t,4)}function si(t){var e=t.getUTCHours(),n=t.getUTCMinutes(),r=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":ai(t.getUTCFullYear())+"-"+B(t.getUTCMonth()+1,2)+"-"+B(t.getUTCDate(),2)+(i?"T"+B(e,2)+":"+B(n,2)+":"+B(r,2)+"."+B(i,3)+"Z":r?"T"+B(e,2)+":"+B(n,2)+":"+B(r,2)+"Z":n||e?"T"+B(e,2)+":"+B(n,2)+"Z":"")}function ui(t){var e=new RegExp('["'+t+` +\r]`),n=t.charCodeAt(0);function r(l,h){var p,y,_=i(l,function(v,g){if(p)return p(v,g-1);y=v,p=h?oi(v,h):or(v)});return _.columns=y||[],_}function i(l,h){var p=[],y=l.length,_=0,v=0,g,A=y<=0,b=!1;l.charCodeAt(y-1)===Ct&&--y,l.charCodeAt(y-1)===we&&--y;function T(){if(A)return xe;if(b)return b=!1,hn;var C,P=_,R;if(l.charCodeAt(P)===ve){for(;_++<y&&l.charCodeAt(_)!==ve||l.charCodeAt(++_)===ve;);return(C=_)>=y?A=!0:(R=l.charCodeAt(_++))===Ct?b=!0:R===we&&(b=!0,l.charCodeAt(_)===Ct&&++_),l.slice(P+1,C-1).replace(/""/g,'"')}for(;_<y;){if((R=l.charCodeAt(C=_++))===Ct)b=!0;else if(R===we)b=!0,l.charCodeAt(_)===Ct&&++_;else if(R!==n)continue;return l.slice(P,C)}return A=!0,l.slice(P,y)}for(;(g=T())!==xe;){for(var E=[];g!==hn&&g!==xe;)E.push(g),g=T();h&&(E=h(E,v++))==null||p.push(E)}return p}function o(l,h){return l.map(function(p){return h.map(function(y){return f(p[y])}).join(t)})}function a(l,h){return h==null&&(h=dn(l)),[h.map(f).join(t)].concat(o(l,h)).join(` `)}function s(l,h){return h==null&&(h=dn(l)),o(l,h).join(` `)}function u(l){return l.map(c).join(` -`)}function c(l){return l.map(f).join(t)}function f(l){return l==null?"":l instanceof Date?si(l):e.test(l+="")?'"'+l.replace(/"/g,'""')+'"':l}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:f}}function ci(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function li(t,e){return fetch(t,e).then(ci)}function fi(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=ui(t);return li(e,n).then(function(o){return i.parse(o,r)})}function xt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ar(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sr(t){let e,n,r;t.length!==2?(e=xt,n=(s,u)=>xt(t(s),u),r=(s,u)=>t(s)-u):(e=t===xt||t===ar?t:hi,n=t,r=t);function i(s,u,c=0,f=s.length){if(c<f){if(e(u,u)!==0)return f;do{const l=c+f>>>1;n(s[l],u)<0?c=l+1:f=l}while(c<f)}return c}function o(s,u,c=0,f=s.length){if(c<f){if(e(u,u)!==0)return f;do{const l=c+f>>>1;n(s[l],u)<=0?c=l+1:f=l}while(c<f)}return c}function a(s,u,c=0,f=s.length){const l=i(s,u,c,f-1);return l>c&&r(s[l-1],u)>-r(s[l],u)?l-1:l}return{left:i,center:a,right:o}}function hi(){return 0}function di(t){return t===null?NaN:+t}function*pi(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const mi=sr(xt),gi=mi.right;sr(di).center;function pn(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Te extends Map{constructor(e,n=xi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(mn(this,e))}has(e){return super.has(mn(this,e))}set(e,n){return super.set(yi(this,e),n)}delete(e){return super.delete(_i(this,e))}}function mn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function yi({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function _i({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function xi(t){return t!==null&&typeof t=="object"?t.valueOf():t}function gn(t){return t}function vi(t,...e){return wi(t,gn,gn,e)}function wi(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Te,u=r[a++];let c=-1;for(const f of o){const l=u(f,++c,o),h=s.get(l);h?h.push(f):s.set(l,[f])}for(const[f,l]of s)s.set(f,i(l,a));return e(s)}(t,0)}function bi(t=xt){if(t===xt)return ur;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function ur(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const Ai=Math.sqrt(50),Mi=Math.sqrt(10),Si=Math.sqrt(2);function jt(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Ai?10:o>=Mi?5:o>=Si?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?jt(t,e,n*2):[s,u,c]}function ki(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?jt(e,t,n):jt(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Pe(t,e,n){return e=+e,t=+t,n=+n,jt(t,e,n)[2]}function Ei(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Pe(e,t,n):Pe(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Ce(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function yn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function cr(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?ur:bi(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,f=Math.log(u),l=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*l*(u-l)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*l/u+h)),y=Math.min(r,Math.floor(e+(u-c)*l/u+h));cr(t,e,p,y,i)}const o=t[e];let a=n,s=r;for(Pt(t,n,e),i(t[r],o)>0&&Pt(t,n,r);a<s;){for(Pt(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Pt(t,n,s):(++s,Pt(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Pt(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ni(t,e,n){if(t=Float64Array.from(pi(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return yn(t);if(e>=1)return Ce(t);var r,i=(r-1)*e,o=Math.floor(i),a=Ce(cr(t,o).subarray(0,o+1)),s=yn(t.subarray(o+1));return a+(s-a)*(i-o)}}function $e(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Ti(t){return t}var be=1,Ae=2,ze=3,Vt=4,_n=1e-6;function Pi(t){return"translate("+t+",0)"}function Ci(t){return"translate(0,"+t+")"}function $i(t){return e=>+t(e)}function zi(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Ri(){return!this.__axis}function Gi(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===be||t===Vt?-1:1,f=t===Vt||t===Ae?"x":"y",l=t===be||t===ze?Pi:Ci;function h(p){var y=r??(e.ticks?e.ticks.apply(e,n):e.domain()),_=i??(e.tickFormat?e.tickFormat.apply(e,n):Ti),v=Math.max(o,0)+s,g=e.range(),A=+g[0]+u,b=+g[g.length-1]+u,T=(e.bandwidth?zi:$i)(e.copy(),u),E=p.selection?p.selection():p,P=E.selectAll(".domain").data([null]),C=E.selectAll(".tick").data(y,e).order(),R=C.exit(),F=C.enter().append("g").attr("class","tick"),O=C.select("line"),S=C.select("text");P=P.merge(P.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),C=C.merge(F),O=O.merge(F.append("line").attr("stroke","currentColor").attr(f+"2",c*o)),S=S.merge(F.append("text").attr("fill","currentColor").attr(f,c*v).attr("dy",t===be?"0em":t===ze?"0.71em":"0.32em")),p!==E&&(P=P.transition(p),C=C.transition(p),O=O.transition(p),S=S.transition(p),R=R.transition(p).attr("opacity",_n).attr("transform",function(G){return isFinite(G=T(G))?l(G+u):this.getAttribute("transform")}),F.attr("opacity",_n).attr("transform",function(G){var z=this.parentNode.__axis;return l((z&&isFinite(z=z(G))?z:T(G))+u)})),R.remove(),P.attr("d",t===Vt||t===Ae?a?"M"+c*a+","+A+"H"+u+"V"+b+"H"+c*a:"M"+u+","+A+"V"+b:a?"M"+A+","+c*a+"V"+u+"H"+b+"V"+c*a:"M"+A+","+u+"H"+b),C.attr("opacity",1).attr("transform",function(G){return l(T(G)+u)}),O.attr(f+"2",c*o),S.attr(f,c*v).text(_),E.filter(Ri).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Ae?"start":t===Vt?"end":"middle"),E.each(function(){this.__axis=T})}return h.scale=function(p){return arguments.length?(e=p,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(o=a=+p,h):o},h.tickSizeInner=function(p){return arguments.length?(o=+p,h):o},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(s=+p,h):s},h.offset=function(p){return arguments.length?(u=+p,h):u},h}function Li(t){return Gi(ze,t)}var Ii={value:()=>{}};function Xe(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Yt(n)}function Yt(t){this._=t}function Di(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Yt.prototype=Xe.prototype={constructor:Yt,on:function(t,e){var n=this._,r=Di(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=qi(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=xn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=xn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Yt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},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)}};function qi(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function xn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ii,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Re="http://www.w3.org/1999/xhtml";const vn={svg:"http://www.w3.org/2000/svg",xhtml:Re,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function le(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),vn.hasOwnProperty(e)?{space:vn[e],local:t}:t}function Oi(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Re&&e.documentElement.namespaceURI===Re?e.createElement(t):e.createElementNS(n,t)}}function Vi(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ye(t){var e=le(t);return(e.local?Vi:Oi)(e)}function Fi(){}function Ze(t){return t==null?Fi:function(){return this.querySelector(t)}}function Hi(t){typeof t!="function"&&(t=Ze(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,f=0;f<a;++f)(u=o[f])&&(c=t.call(u,u.__data__,f,o))&&("__data__"in u&&(c.__data__=u.__data__),s[f]=c);return new K(r,this._parents)}function lr(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ki(){return[]}function fr(t){return t==null?Ki:function(){return this.querySelectorAll(t)}}function Bi(t){return function(){return lr(t.apply(this,arguments))}}function Ui(t){typeof t=="function"?t=Bi(t):t=fr(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new K(r,i)}function hr(t){return function(){return this.matches(t)}}function dr(t){return function(e){return e.matches(t)}}var Wi=Array.prototype.find;function Xi(t){return function(){return Wi.call(this.children,t)}}function Yi(){return this.firstElementChild}function Zi(t){return this.select(t==null?Yi:Xi(typeof t=="function"?t:dr(t)))}var Ji=Array.prototype.filter;function Qi(){return Array.from(this.children)}function ji(t){return function(){return Ji.call(this.children,t)}}function to(t){return this.selectAll(t==null?Qi:ji(typeof t=="function"?t:dr(t)))}function eo(t){typeof t!="function"&&(t=hr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new K(r,this._parents)}function pr(t){return new Array(t.length)}function no(){return new K(this._enter||this._groups.map(pr),this._parents)}function te(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}te.prototype={constructor:te,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ro(t){return function(){return t}}function io(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new te(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function oo(t,e,n,r,i,o,a){var s,u,c=new Map,f=e.length,l=o.length,h=new Array(f),p;for(s=0;s<f;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<l;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new te(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&c.get(h[s])===u&&(i[s]=u)}function ao(t){return t.__data__}function so(t,e){if(!arguments.length)return Array.from(this,ao);var n=e?oo:io,r=this._parents,i=this._groups;typeof t!="function"&&(t=ro(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var f=r[c],l=i[c],h=l.length,p=uo(t.call(f,f&&f.__data__,c,r)),y=p.length,_=s[c]=new Array(y),v=a[c]=new Array(y),g=u[c]=new Array(h);n(f,l,_,v,g,p,e);for(var A=0,b=0,T,E;A<y;++A)if(T=_[A]){for(A>=b&&(b=A+1);!(E=v[b])&&++b<y;);T._next=E||null}}return a=new K(a,r),a._enter=s,a._exit=u,a}function uo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function co(){return new K(this._exit||this._groups.map(pr),this._parents)}function lo(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function fo(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],f=r[u],l=c.length,h=s[u]=new Array(l),p,y=0;y<l;++y)(p=c[y]||f[y])&&(h[y]=p);for(;u<i;++u)s[u]=n[u];return new K(s,this._parents)}function ho(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function po(t){t||(t=mo);function e(l,h){return l&&h?t(l.__data__,h.__data__):!l-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,f=0;f<s;++f)(c=a[f])&&(u[f]=c);u.sort(e)}return new K(i,this._parents).order()}function mo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function go(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function yo(){return Array.from(this)}function _o(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function xo(){let t=0;for(const e of this)++t;return t}function vo(){return!this.node()}function wo(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function bo(t){return function(){this.removeAttribute(t)}}function Ao(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mo(t,e){return function(){this.setAttribute(t,e)}}function So(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ko(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Eo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function No(t,e){var n=le(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Ao:bo:typeof e=="function"?n.local?Eo:ko:n.local?So:Mo)(n,e))}function mr(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function To(t){return function(){this.style.removeProperty(t)}}function Po(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Co(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function $o(t,e,n){return arguments.length>1?this.each((e==null?To:typeof e=="function"?Co:Po)(t,e,n??"")):bt(this.node(),t)}function bt(t,e){return t.style.getPropertyValue(e)||mr(t).getComputedStyle(t,null).getPropertyValue(e)}function zo(t){return function(){delete this[t]}}function Ro(t,e){return function(){this[t]=e}}function Go(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Lo(t,e){return arguments.length>1?this.each((e==null?zo:typeof e=="function"?Go:Ro)(t,e)):this.node()[t]}function gr(t){return t.trim().split(/^|\s+/)}function Je(t){return t.classList||new yr(t)}function yr(t){this._node=t,this._names=gr(t.getAttribute("class")||"")}yr.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function _r(t,e){for(var n=Je(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function xr(t,e){for(var n=Je(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Io(t){return function(){_r(this,t)}}function Do(t){return function(){xr(this,t)}}function qo(t,e){return function(){(e.apply(this,arguments)?_r:xr)(this,t)}}function Oo(t,e){var n=gr(t+"");if(arguments.length<2){for(var r=Je(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?qo:e?Io:Do)(n,e))}function Vo(){this.textContent=""}function Fo(t){return function(){this.textContent=t}}function Ho(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ko(t){return arguments.length?this.each(t==null?Vo:(typeof t=="function"?Ho:Fo)(t)):this.node().textContent}function Bo(){this.innerHTML=""}function Uo(t){return function(){this.innerHTML=t}}function Wo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Xo(t){return arguments.length?this.each(t==null?Bo:(typeof t=="function"?Wo:Uo)(t)):this.node().innerHTML}function Yo(){this.nextSibling&&this.parentNode.appendChild(this)}function Zo(){return this.each(Yo)}function Jo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qo(){return this.each(Jo)}function jo(t){var e=typeof t=="function"?t:Ye(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function ta(){return null}function ea(t,e){var n=typeof t=="function"?t:Ye(t),r=e==null?ta:typeof e=="function"?e:Ze(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function na(){var t=this.parentNode;t&&t.removeChild(this)}function ra(){return this.each(na)}function ia(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oa(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function aa(t){return this.select(t?oa:ia)}function sa(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ua(t){return function(e){t.call(this,e,this.__data__)}}function ca(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function la(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function fa(t,e,n){return function(){var r=this.__on,i,o=ua(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function ha(t,e,n){var r=ca(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,f;u<c;++u)for(i=0,f=s[u];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?fa:la,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function vr(t,e,n){var r=mr(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function da(t,e){return function(){return vr(this,t,e)}}function pa(t,e){return function(){return vr(this,t,e.apply(this,arguments))}}function ma(t,e){return this.each((typeof e=="function"?pa:da)(t,e))}function*ga(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Qe=[null];function K(t,e){this._groups=t,this._parents=e}function Ot(){return new K([[document.documentElement]],Qe)}function ya(){return this}K.prototype=Ot.prototype={constructor:K,select:Hi,selectAll:Ui,selectChild:Zi,selectChildren:to,filter:eo,data:so,enter:no,exit:co,join:lo,merge:fo,selection:ya,order:ho,sort:po,call:go,nodes:yo,node:_o,size:xo,empty:vo,each:wo,attr:No,style:$o,property:Lo,classed:Oo,text:Ko,html:Xo,raise:Zo,lower:Qo,append:jo,insert:ea,remove:ra,clone:aa,datum:sa,on:ha,dispatch:ma,[Symbol.iterator]:ga};function q(t){return typeof t=="string"?new K([[document.querySelector(t)]],[document.documentElement]):new K([[t]],Qe)}function _a(t){return q(Ye(t).call(document.documentElement))}function xa(t){let e;for(;e=t.sourceEvent;)t=e;return t}function lt(t,e){if(t=xa(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function va(t){return typeof t=="string"?new K([document.querySelectorAll(t)],[document.documentElement]):new K([lr(t)],Qe)}const Ge={capture:!0,passive:!1};function Le(t){t.preventDefault(),t.stopImmediatePropagation()}function wa(t){var e=t.document.documentElement,n=q(t).on("dragstart.drag",Le,Ge);"onselectstart"in e?n.on("selectstart.drag",Le,Ge):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ba(t,e){var n=t.document.documentElement,r=q(t).on("dragstart.drag",null);e&&(r.on("click.drag",Le,Ge),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function fe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function je(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Nt(){}var gt=.7,At=1/gt,vt="\\s*([+-]?\\d+)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Aa=/^#([0-9a-f]{3,8})$/,Ma=new RegExp(`^rgb\\(${vt},${vt},${vt}\\)$`),Sa=new RegExp(`^rgb\\(${tt},${tt},${tt}\\)$`),ka=new RegExp(`^rgba\\(${vt},${vt},${vt},${It}\\)$`),Ea=new RegExp(`^rgba\\(${tt},${tt},${tt},${It}\\)$`),Na=new RegExp(`^hsl\\(${It},${tt},${tt}\\)$`),Ta=new RegExp(`^hsla\\(${It},${tt},${tt},${It}\\)$`),wn={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};fe(Nt,ut,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:bn,formatHex:bn,formatHex8:Pa,formatHsl:Ca,formatRgb:An,toString:An});function bn(){return this.rgb().formatHex()}function Pa(){return this.rgb().formatHex8()}function Ca(){return br(this).formatHsl()}function An(){return this.rgb().formatRgb()}function ut(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Aa.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Mn(e):n===3?new H(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ft(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ft(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ma.exec(t))?new H(e[1],e[2],e[3],1):(e=Sa.exec(t))?new H(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=ka.exec(t))?Ft(e[1],e[2],e[3],e[4]):(e=Ea.exec(t))?Ft(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Na.exec(t))?En(e[1],e[2]/100,e[3]/100,1):(e=Ta.exec(t))?En(e[1],e[2]/100,e[3]/100,e[4]):wn.hasOwnProperty(t)?Mn(wn[t]):t==="transparent"?new H(NaN,NaN,NaN,0):null}function Mn(t){return new H(t>>16&255,t>>8&255,t&255,1)}function Ft(t,e,n,r){return r<=0&&(t=e=n=NaN),new H(t,e,n,r)}function wr(t){return t instanceof Nt||(t=ut(t)),t?(t=t.rgb(),new H(t.r,t.g,t.b,t.opacity)):new H}function Ie(t,e,n,r){return arguments.length===1?wr(t):new H(t,e,n,r??1)}function H(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}fe(H,Ie,je(Nt,{brighter(t){return t=t==null?At:Math.pow(At,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gt:Math.pow(gt,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new H(pt(this.r),pt(this.g),pt(this.b),ee(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sn,formatHex:Sn,formatHex8:$a,formatRgb:kn,toString:kn}));function Sn(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}`}function $a(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}${dt((isNaN(this.opacity)?1:this.opacity)*255)}`}function kn(){const t=ee(this.opacity);return`${t===1?"rgb(":"rgba("}${pt(this.r)}, ${pt(this.g)}, ${pt(this.b)}${t===1?")":`, ${t})`}`}function ee(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function dt(t){return t=pt(t),(t<16?"0":"")+t.toString(16)}function En(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Z(t,e,n,r)}function br(t){if(t instanceof Z)return new Z(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=ut(t)),!t)return new Z;if(t instanceof Z)return t;t=t.rgb();var e=t.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?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new Z(a,s,u,t.opacity)}function za(t,e,n,r){return arguments.length===1?br(t):new Z(t,e,n,r??1)}function Z(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fe(Z,za,je(Nt,{brighter(t){return t=t==null?At:Math.pow(At,t),new Z(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gt:Math.pow(gt,t),new Z(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,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 H(Me(t>=240?t-240:t+120,i,r),Me(t,i,r),Me(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new Z(Nn(this.h),Ht(this.s),Ht(this.l),ee(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ee(this.opacity);return`${t===1?"hsl(":"hsla("}${Nn(this.h)}, ${Ht(this.s)*100}%, ${Ht(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Nn(t){return t=(t||0)%360,t<0?t+360:t}function Ht(t){return Math.max(0,Math.min(1,t||0))}function Me(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ra=Math.PI/180,Ga=180/Math.PI;var Ar=-.14861,tn=1.78277,en=-.29227,he=-.90649,Dt=1.97294,Tn=Dt*he,Pn=Dt*tn,Cn=tn*en-he*Ar;function La(t){if(t instanceof mt)return new mt(t.h,t.s,t.l,t.opacity);t instanceof H||(t=wr(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Cn*r+Tn*e-Pn*n)/(Cn+Tn-Pn),o=r-i,a=(Dt*(n-i)-en*o)/he,s=Math.sqrt(a*a+o*o)/(Dt*i*(1-i)),u=s?Math.atan2(a,o)*Ga-120:NaN;return new mt(u<0?u+360:u,s,i,t.opacity)}function ct(t,e,n,r){return arguments.length===1?La(t):new mt(t,e,n,r??1)}function mt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fe(mt,ct,je(Nt,{brighter(t){return t=t==null?At:Math.pow(At,t),new mt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gt:Math.pow(gt,t),new mt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Ra,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new H(255*(e+n*(Ar*r+tn*i)),255*(e+n*(en*r+he*i)),255*(e+n*(Dt*r)),this.opacity)}}));const de=t=>()=>t;function Mr(t,e){return function(n){return t+n*e}}function Ia(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Da(t,e){var n=e-t;return n?Mr(t,n>180||n<-180?n-360*Math.round(n/360):n):de(isNaN(t)?e:t)}function qa(t){return(t=+t)==1?wt:function(e,n){return n-e?Ia(e,n,t):de(isNaN(e)?n:e)}}function wt(t,e){var n=e-t;return n?Mr(t,n):de(isNaN(t)?e:t)}const ne=function t(e){var n=qa(e);function r(i,o){var a=n((i=Ie(i)).r,(o=Ie(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=wt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=u(f),i.opacity=c(f),i+""}}return r.gamma=t,r}(1);function Oa(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Va(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Fa(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=Mt(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Ha(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Y(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ka(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=Mt(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var De=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Se=new RegExp(De.source,"g");function Ba(t){return function(){return t}}function Ua(t){return function(e){return t(e)+""}}function Sr(t,e){var n=De.lastIndex=Se.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=De.exec(t))&&(i=Se.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Y(r,i)})),n=Se.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?Ua(u[0].x):Ba(e):(e=u.length,function(c){for(var f=0,l;f<e;++f)s[(l=u[f]).i]=l.x(c);return s.join("")})}function Mt(t,e){var n=typeof e,r;return e==null||n==="boolean"?de(e):(n==="number"?Y:n==="string"?(r=ut(e))?(e=r,ne):Sr:e instanceof ut?ne:e instanceof Date?Ha:Va(e)?Oa:Array.isArray(e)?Fa:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ka:Y)(t,e)}function nn(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var $n=180/Math.PI,qe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kr(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*$n,skewX:Math.atan(u)*$n,scaleX:a,scaleY:s}}var Kt;function Wa(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?qe:kr(e.a,e.b,e.c,e.d,e.e,e.f)}function Xa(t){return t==null||(Kt||(Kt=document.createElementNS("http://www.w3.org/2000/svg","g")),Kt.setAttribute("transform",t),!(t=Kt.transform.baseVal.consolidate()))?qe:(t=t.matrix,kr(t.a,t.b,t.c,t.d,t.e,t.f))}function Er(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,f,l,h,p,y){if(c!==l||f!==h){var _=p.push("translate(",null,e,null,n);y.push({i:_-4,x:Y(c,l)},{i:_-2,x:Y(f,h)})}else(l||h)&&p.push("translate("+l+e+h+n)}function a(c,f,l,h){c!==f?(c-f>180?f+=360:f-c>180&&(c+=360),h.push({i:l.push(i(l)+"rotate(",null,r)-2,x:Y(c,f)})):f&&l.push(i(l)+"rotate("+f+r)}function s(c,f,l,h){c!==f?h.push({i:l.push(i(l)+"skewX(",null,r)-2,x:Y(c,f)}):f&&l.push(i(l)+"skewX("+f+r)}function u(c,f,l,h,p,y){if(c!==l||f!==h){var _=p.push(i(p)+"scale(",null,",",null,")");y.push({i:_-4,x:Y(c,l)},{i:_-2,x:Y(f,h)})}else(l!==1||h!==1)&&p.push(i(p)+"scale("+l+","+h+")")}return function(c,f){var l=[],h=[];return c=t(c),f=t(f),o(c.translateX,c.translateY,f.translateX,f.translateY,l,h),a(c.rotate,f.rotate,l,h),s(c.skewX,f.skewX,l,h),u(c.scaleX,c.scaleY,f.scaleX,f.scaleY,l,h),c=f=null,function(p){for(var y=-1,_=h.length,v;++y<_;)l[(v=h[y]).i]=v.x(p);return l.join("")}}}var Ya=Er(Wa,"px, ","px)","deg)"),Za=Er(Xa,", ",")",")"),Ja=1e-12;function zn(t){return((t=Math.exp(t))+1/t)/2}function Qa(t){return((t=Math.exp(t))-1/t)/2}function ja(t){return((t=Math.exp(2*t))-1)/(t+1)}const ts=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],f=a[0],l=a[1],h=a[2],p=f-s,y=l-u,_=p*p+y*y,v,g;if(_<Ja)g=Math.log(h/c)/e,v=function(C){return[s+C*p,u+C*y,c*Math.exp(e*C*g)]};else{var A=Math.sqrt(_),b=(h*h-c*c+r*_)/(2*c*n*A),T=(h*h-c*c-r*_)/(2*h*n*A),E=Math.log(Math.sqrt(b*b+1)-b),P=Math.log(Math.sqrt(T*T+1)-T);g=(P-E)/e,v=function(C){var R=C*g,F=zn(E),O=c/(n*A)*(F*ja(e*R+E)-Qa(E));return[s+O*p,u+O*y,c*F/zn(e*R+E)]}}return v.duration=g*1e3*e/Math.SQRT2,v}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function Nr(t){return function e(n){n=+n;function r(i,o){var a=t((i=ct(i)).h,(o=ct(o)).h),s=wt(i.s,o.s),u=wt(i.l,o.l),c=wt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=s(f),i.l=u(Math.pow(f,n)),i.opacity=c(f),i+""}}return r.gamma=e,r}(1)}Nr(Da);var Tr=Nr(wt);function Rn(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var St=0,Rt=0,Ct=0,Pr=1e3,re,Gt,ie=0,yt=0,pe=0,qt=typeof performance=="object"&&performance.now?performance:Date,Cr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rn(){return yt||(Cr(es),yt=qt.now()+pe)}function es(){yt=0}function oe(){this._call=this._time=this._next=null}oe.prototype=$r.prototype={constructor:oe,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rn():+n)+(e==null?0:+e),!this._next&&Gt!==this&&(Gt?Gt._next=this:re=this,Gt=this),this._call=t,this._time=n,Oe()},stop:function(){this._call&&(this._call=null,this._time=1/0,Oe())}};function $r(t,e,n){var r=new oe;return r.restart(t,e,n),r}function ns(){rn(),++St;for(var t=re,e;t;)(e=yt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--St}function Gn(){yt=(ie=qt.now())+pe,St=Rt=0;try{ns()}finally{St=0,is(),yt=0}}function rs(){var t=qt.now(),e=t-ie;e>Pr&&(pe-=e,ie=t)}function is(){for(var t,e=re,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:re=n);Gt=t,Oe(r)}function Oe(t){if(!St){Rt&&(Rt=clearTimeout(Rt));var e=t-yt;e>24?(t<1/0&&(Rt=setTimeout(Gn,t-qt.now()-pe)),Ct&&(Ct=clearInterval(Ct))):(Ct||(ie=qt.now(),Ct=setInterval(rs,Pr)),St=1,Cr(Gn))}}function Ln(t,e,n){var r=new oe;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var os=Xe("start","end","cancel","interrupt"),as=[],zr=0,In=1,Ve=2,Zt=3,Dn=4,Fe=5,Jt=6;function me(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;ss(t,n,{name:e,index:r,group:i,on:os,tween:as,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:zr})}function on(t,e){var n=J(t,e);if(n.state>zr)throw new Error("too late; already scheduled");return n}function et(t,e){var n=J(t,e);if(n.state>Zt)throw new Error("too late; already running");return n}function J(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ss(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=$r(o,0,n.time);function o(c){n.state=In,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var f,l,h,p;if(n.state!==In)return u();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Zt)return Ln(a);p.state===Dn?(p.state=Jt,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=Jt,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Ln(function(){n.state===Zt&&(n.state=Dn,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=Ve,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ve){for(n.state=Zt,i=new Array(h=n.tween.length),f=0,l=-1;f<h;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++l]=p);i.length=l+1}}function s(c){for(var f=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Fe,1),l=-1,h=i.length;++l<h;)i[l].call(t,f);n.state===Fe&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Jt,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Qt(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Ve&&r.state<Fe,r.state=Jt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function us(t){return this.each(function(){Qt(this,t)})}function cs(t,e){var n,r;return function(){var i=et(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function ls(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=et(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function fs(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=J(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?cs:ls)(n,t,e))}function an(t,e,n){var r=t._id;return t.each(function(){var i=et(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return J(i,r).value[e]}}function Rr(t,e){var n;return(typeof e=="number"?Y:e instanceof ut?ne:(n=ut(e))?(e=n,ne):Sr)(t,e)}function hs(t){return function(){this.removeAttribute(t)}}function ds(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ps(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function ms(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function gs(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function ys(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function _s(t,e){var n=le(t),r=n==="transform"?Za:Rr;return this.attrTween(t,typeof e=="function"?(n.local?ys:gs)(n,r,an(this,"attr."+t,e)):e==null?(n.local?ds:hs)(n):(n.local?ms:ps)(n,r,e))}function xs(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function vs(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ws(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&vs(t,o)),n}return i._value=e,i}function bs(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&xs(t,o)),n}return i._value=e,i}function As(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=le(t);return this.tween(n,(r.local?ws:bs)(r,e))}function Ms(t,e){return function(){on(this,t).delay=+e.apply(this,arguments)}}function Ss(t,e){return e=+e,function(){on(this,t).delay=e}}function ks(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ms:Ss)(e,t)):J(this.node(),e).delay}function Es(t,e){return function(){et(this,t).duration=+e.apply(this,arguments)}}function Ns(t,e){return e=+e,function(){et(this,t).duration=e}}function Ts(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Es:Ns)(e,t)):J(this.node(),e).duration}function Ps(t,e){if(typeof e!="function")throw new Error;return function(){et(this,t).ease=e}}function Cs(t){var e=this._id;return arguments.length?this.each(Ps(e,t)):J(this.node(),e).ease}function $s(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;et(this,t).ease=n}}function zs(t){if(typeof t!="function")throw new Error;return this.each($s(this._id,t))}function Rs(t){typeof t!="function"&&(t=hr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new at(r,this._parents,this._name,this._id)}function Gs(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=e[s],c=n[s],f=u.length,l=a[s]=new Array(f),h,p=0;p<f;++p)(h=u[p]||c[p])&&(l[p]=h);for(;s<r;++s)a[s]=e[s];return new at(a,this._parents,this._name,this._id)}function Ls(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Is(t,e,n){var r,i,o=Ls(e)?on:et;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function Ds(t,e){var n=this._id;return arguments.length<2?J(this.node(),n).on.on(t):this.each(Is(n,t,e))}function qs(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Os(){return this.on("end.remove",qs(this._id))}function Vs(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ze(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),f,l,h=0;h<u;++h)(f=s[h])&&(l=t.call(f,f.__data__,h,s))&&("__data__"in f&&(l.__data__=f.__data__),c[h]=l,me(c[h],e,n,h,c,J(f,n)));return new at(o,this._parents,e,n)}function Fs(t){var e=this._name,n=this._id;typeof t!="function"&&(t=fr(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,f,l=0;l<c;++l)if(f=u[l]){for(var h=t.call(f,f.__data__,l,u),p,y=J(f,n),_=0,v=h.length;_<v;++_)(p=h[_])&&me(p,e,n,_,h,y);o.push(h),a.push(f)}return new at(o,a,e,n)}var Hs=Ot.prototype.constructor;function Ks(){return new Hs(this._groups,this._parents)}function Bs(t,e){var n,r,i;return function(){var o=bt(this,t),a=(this.style.removeProperty(t),bt(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Gr(t){return function(){this.style.removeProperty(t)}}function Us(t,e,n){var r,i=n+"",o;return function(){var a=bt(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function Ws(t,e,n){var r,i,o;return function(){var a=bt(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),bt(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function Xs(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=et(this,t),c=u.on,f=u.value[o]==null?s||(s=Gr(e)):void 0;(c!==n||i!==f)&&(r=(n=c).copy()).on(a,i=f),u.on=r}}function Ys(t,e,n){var r=(t+="")=="transform"?Ya:Rr;return e==null?this.styleTween(t,Bs(t,r)).on("end.style."+t,Gr(t)):typeof e=="function"?this.styleTween(t,Ws(t,r,an(this,"style."+t,e))).each(Xs(this._id,t)):this.styleTween(t,Us(t,r,e),n).on("end.style."+t,null)}function Zs(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Js(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Zs(t,a,n)),r}return o._value=e,o}function Qs(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Js(t,e,n??""))}function js(t){return function(){this.textContent=t}}function tu(t){return function(){var e=t(this);this.textContent=e??""}}function eu(t){return this.tween("text",typeof t=="function"?tu(an(this,"text",t)):js(t==null?"":t+""))}function nu(t){return function(e){this.textContent=t.call(this,e)}}function ru(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&nu(i)),e}return r._value=t,r}function iu(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,ru(t))}function ou(){for(var t=this._name,e=this._id,n=Lr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var f=J(u,e);me(u,t,n,c,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new at(r,this._parents,t,n)}function au(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=et(this,r),f=c.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var su=0;function at(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Lr(){return++su}var it=Ot.prototype;at.prototype={constructor:at,select:Vs,selectAll:Fs,selectChild:it.selectChild,selectChildren:it.selectChildren,filter:Rs,merge:Gs,selection:Ks,transition:ou,call:it.call,nodes:it.nodes,node:it.node,size:it.size,empty:it.empty,each:it.each,on:Ds,attr:_s,attrTween:As,style:Ys,styleTween:Qs,text:eu,textTween:iu,remove:Os,tween:fs,delay:ks,duration:Ts,ease:Cs,easeVarying:zs,end:au,[Symbol.iterator]:it[Symbol.iterator]};function uu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var cu={time:null,delay:0,duration:250,ease:uu};function lu(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function fu(t){var e,n;t instanceof at?(e=t._id,t=t._name):(e=Lr(),(n=cu).time=rn(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&me(u,t,e,c,a,n||lu(u,e));return new at(r,this._parents,t,e)}Ot.prototype.interrupt=us;Ot.prototype.transition=fu;const He=Math.PI,Ke=2*He,ht=1e-6,hu=Ke-ht;function Ir(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function du(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ir;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class pu{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Ir:du(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,f=a-e,l=s-n,h=f*f+l*l;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>ht)if(!(Math.abs(l*u-c*f)>ht)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,y=i-s,_=u*u+c*c,v=p*p+y*y,g=Math.sqrt(_),A=Math.sqrt(h),b=o*Math.tan((He-Math.acos((_+h-v)/(2*g*A)))/2),T=b/A,E=b/g;Math.abs(T-1)>ht&&this._append`L${e+T*f},${n+T*l}`,this._append`A${o},${o},0,0,${+(l*p>f*y)},${this._x1=e+E*u},${this._y1=n+E*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,f=n+u,l=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>ht||Math.abs(this._y1-f)>ht)&&this._append`L${c},${f}`,r&&(h<0&&(h=h%Ke+Ke),h>hu?this._append`A${r},${r},0,1,${l},${e-s},${n-u}A${r},${r},0,1,${l},${this._x1=c},${this._y1=f}`:h>ht&&this._append`A${r},${r},0,${+(h>=He)},${l},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function mu(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ae(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function kt(t){return t=ae(Math.abs(t)),t?t[1]:NaN}function gu(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function yu(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var _u=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function se(t){if(!(e=_u.exec(t)))throw new Error("invalid format: "+t);var e;return new sn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}se.prototype=sn.prototype;function sn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}sn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function xu(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Dr;function vu(t,e){var n=ae(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Dr=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+ae(t,Math.max(0,e+o-1))[0]}function qn(t,e){var n=ae(t,e);if(!n)return t+"";var r=n[0],i=n[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")}const On={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:mu,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>qn(t*100,e),r:qn,s:vu,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Vn(t){return t}var Fn=Array.prototype.map,Hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wu(t){var e=t.grouping===void 0||t.thousands===void 0?Vn:gu(Fn.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Vn:yu(Fn.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(l){l=se(l);var h=l.fill,p=l.align,y=l.sign,_=l.symbol,v=l.zero,g=l.width,A=l.comma,b=l.precision,T=l.trim,E=l.type;E==="n"?(A=!0,E="g"):On[E]||(b===void 0&&(b=12),T=!0,E="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var P=_==="$"?n:_==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",C=_==="$"?r:/[%p]/.test(E)?a:"",R=On[E],F=/[defgprs%]/.test(E);b=b===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function O(S){var G=P,z=C,d,x,m;if(E==="c")z=R(S)+z,S="";else{S=+S;var w=S<0||1/S<0;if(S=isNaN(S)?u:R(Math.abs(S),b),T&&(S=xu(S)),w&&+S==0&&y!=="+"&&(w=!1),G=(w?y==="("?y:s:y==="-"||y==="("?"":y)+G,z=(E==="s"?Hn[8+Dr/3]:"")+z+(w&&y==="("?")":""),F){for(d=-1,x=S.length;++d<x;)if(m=S.charCodeAt(d),48>m||m>57){z=(m===46?i+S.slice(d+1):S.slice(d))+z,S=S.slice(0,d);break}}}A&&!v&&(S=e(S,1/0));var k=G.length+S.length+z.length,M=k<g?new Array(g-k+1).join(h):"";switch(A&&v&&(S=e(M+S,M.length?g-z.length:1/0),M=""),p){case"<":S=G+S+z+M;break;case"=":S=G+M+S+z;break;case"^":S=M.slice(0,k=M.length>>1)+G+S+z+M.slice(k);break;default:S=M+G+S+z;break}return o(S)}return O.toString=function(){return l+""},O}function f(l,h){var p=c((l=se(l),l.type="f",l)),y=Math.max(-8,Math.min(8,Math.floor(kt(h)/3)))*3,_=Math.pow(10,-y),v=Hn[8+y/3];return function(g){return p(_*g)+v}}return{format:c,formatPrefix:f}}var Bt,ue,qr;bu({thousands:",",grouping:[3],currency:["$",""]});function bu(t){return Bt=wu(t),ue=Bt.format,qr=Bt.formatPrefix,Bt}function Au(t){return Math.max(0,-kt(Math.abs(t)))}function Mu(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(kt(e)/3)))*3-kt(Math.abs(t)))}function Su(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,kt(e)-kt(t))+1}function ku(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function Eu(){return this.eachAfter(ku)}function Nu(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function Tu(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function Pu(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function Cu(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function $u(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})}function zu(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function Ru(t){for(var e=this,n=Gu(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}function Gu(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 Lu(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function Iu(){return Array.from(this)}function Du(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function qu(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*Ou(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function un(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=Hu)):e===void 0&&(e=Fu);for(var n=new ce(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new ce(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(Bu)}function Vu(){return un(this).eachBefore(Ku)}function Fu(t){return t.children}function Hu(t){return Array.isArray(t)?t[1]:null}function Ku(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Bu(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ce(t){this.data=t,this.depth=this.height=0,this.parent=null}ce.prototype=un.prototype={constructor:ce,count:Eu,each:Nu,eachAfter:Pu,eachBefore:Tu,find:Cu,sum:$u,sort:zu,path:Ru,ancestors:Lu,descendants:Iu,leaves:Du,links:qu,copy:Vu,[Symbol.iterator]:Ou};function Uu(t){return t==null?null:Wu(t)}function Wu(t){if(typeof t!="function")throw new Error;return t}function Kn(){return 0}function Xu(t){return function(){return t}}const Yu=1664525,Zu=1013904223,Bn=4294967296;function Ju(){let t=1;return()=>(t=(Yu*t+Zu)%Bn)/Bn}function Qu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ju(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function tc(t,e){for(var n=0,r=(t=ju(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&Or(a,o)?++n:(a=nc(i=ec(i,o)),n=0);return a}function ec(t,e){var n,r;if(ke(e,t))return[e];for(n=0;n<t.length;++n)if(Ut(e,t[n])&&ke(Lt(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(Ut(Lt(t[n],t[r]),e)&&Ut(Lt(t[n],e),t[r])&&Ut(Lt(t[r],e),t[n])&&ke(Vr(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Ut(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 Or(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function ke(t,e){for(var n=0;n<e.length;++n)if(!Or(t,e[n]))return!1;return!0}function nc(t){switch(t.length){case 1:return rc(t[0]);case 2:return Lt(t[0],t[1]);case 3:return Vr(t[0],t[1],t[2])}}function rc(t){return{x:t.x,y:t.y,r:t.r}}function Lt(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,f=s-i,l=Math.sqrt(u*u+c*c);return{x:(n+o+u/l*f)/2,y:(r+a+c/l*f)/2,r:(l+i+s)/2}}function Vr(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,f=n.y,l=n.r,h=r-a,p=r-c,y=i-s,_=i-f,v=u-o,g=l-o,A=r*r+i*i-o*o,b=A-a*a-s*s+u*u,T=A-c*c-f*f+l*l,E=p*y-h*_,P=(y*T-_*b)/(E*2)-r,C=(_*v-y*g)/E,R=(p*b-h*T)/(E*2)-i,F=(h*g-p*v)/E,O=C*C+F*F-1,S=2*(o+P*C+R*F),G=P*P+R*R-o*o,z=-(Math.abs(O)>1e-6?(S+Math.sqrt(S*S-4*O*G))/(2*O):G/S);return{x:r+P+C*z,y:i+R+F*z,r:z}}function Un(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function Wn(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 Xn(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 Wt(t){this._=t,this.next=null,this.previous=null}function ic(t,e){if(!(o=(t=Qu(t)).length))return 0;var n,r,i,o,a,s,u,c,f,l,h;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Un(r,n,i=t[2]),n=new Wt(n),r=new Wt(r),i=new Wt(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){Un(n._,r._,i=t[u]),i=new Wt(i),c=r.next,f=n.previous,l=r._.r,h=n._.r;do if(l<=h){if(Wn(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}l+=c._.r,c=c.next}else{if(Wn(f._,i._)){n=f,n.next=r,r.previous=n,--u;continue t}h+=f._.r,f=f.previous}while(c!==f.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=Xn(n);(i=i.next)!==r;)(s=Xn(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=tc(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function oc(t){return Math.sqrt(t.value)}function ac(){var t=null,e=1,n=1,r=Kn;function i(o){const a=Ju();return o.x=e/2,o.y=n/2,t?o.eachBefore(Yn(t)).eachAfter(Ee(r,.5,a)).eachBefore(Zn(1)):o.eachBefore(Yn(oc)).eachAfter(Ee(Kn,1,a)).eachAfter(Ee(r,o.r/Math.min(e,n),a)).eachBefore(Zn(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Uu(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Xu(+o),i):r},i}function Yn(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Ee(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=ic(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function Zn(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 cn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function sc(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Jn=Symbol("implicit");function ln(){var t=new Te,e=[],n=[],r=Jn;function i(o){let a=t.get(o);if(a===void 0){if(r!==Jn)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Te;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ln(e,n).unknown(r)},cn.apply(i,arguments),i}function Fr(){var t=ln().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,f=.5;delete t.unknown;function l(){var h=e().length,p=i<r,y=p?i:r,_=p?r:i;o=(_-y)/Math.max(1,h-u+c*2),s&&(o=Math.floor(o)),y+=(_-y-o*(h-u))*f,a=o*(1-u),s&&(y=Math.round(y),a=Math.round(a));var v=$e(h).map(function(g){return y+o*g});return n(p?v.reverse():v)}return t.domain=function(h){return arguments.length?(e(h),l()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,l()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,l()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,l()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,c=+h),l()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),l()):u},t.paddingOuter=function(h){return arguments.length?(c=+h,l()):c},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),l()):f},t.copy=function(){return Fr(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(f)},cn.apply(l(),arguments)}function uc(t){return function(){return t}}function cc(t){return+t}var Qn=[0,1];function st(t){return t}function Be(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:uc(isNaN(e)?NaN:.5)}function lc(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function fc(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Be(i,r),o=n(a,o)):(r=Be(r,i),o=n(o,a)),function(s){return o(r(s))}}function hc(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Be(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=gi(t,s,1,r)-1;return o[u](i[u](s))}}function dc(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function pc(){var t=Qn,e=Qn,n=Mt,r,i,o,a=st,s,u,c;function f(){var h=Math.min(t.length,e.length);return a!==st&&(a=lc(t[0],t[h-1])),s=h>2?hc:fc,u=c=null,l}function l(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return l.invert=function(h){return a(i((c||(c=s(e,t.map(r),Y)))(h)))},l.domain=function(h){return arguments.length?(t=Array.from(h,cc),f()):t.slice()},l.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},l.rangeRound=function(h){return e=Array.from(h),n=nn,f()},l.clamp=function(h){return arguments.length?(a=h?!0:st,f()):a!==st},l.interpolate=function(h){return arguments.length?(n=h,f()):n},l.unknown=function(h){return arguments.length?(o=h,l):o},function(h,p){return r=h,i=p,f()}}function mc(){return pc()(st,st)}function gc(t,e,n,r){var i=Ei(t,e,n),o;switch(r=se(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Mu(i,a))&&(r.precision=o),qr(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Su(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Au(i))&&(r.precision=o-(r.type==="%")*2);break}}return ue(r)}function Hr(t){var e=t.domain;return t.ticks=function(n){var r=e();return ki(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return gc(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,f=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);f-- >0;){if(c=Pe(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function ge(){var t=mc();return t.copy=function(){return dc(t,ge())},cn.apply(t,arguments),Hr(t)}function yc(){var t=0,e=1,n,r,i,o,a=st,s=!1,u;function c(l){return l==null||isNaN(l=+l)?u:a(i===0?.5:(l=(o(l)-n)*i,s?Math.max(0,Math.min(1,l)):l))}c.domain=function(l){return arguments.length?([t,e]=l,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(l){return arguments.length?(s=!!l,c):s},c.interpolator=function(l){return arguments.length?(a=l,c):a};function f(l){return function(h){var p,y;return arguments.length?([p,y]=h,a=l(p,y),c):[a(0),a(1)]}}return c.range=f(Mt),c.rangeRound=f(nn),c.unknown=function(l){return arguments.length?(u=l,c):u},function(l){return o=l,n=l(t),r=l(e),i=n===r?0:1/(r-n),c}}function _c(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Kr(){var t=Hr(yc()(st));return t.copy=function(){return _c(t,Kr())},sc.apply(t,arguments)}function Br(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const xc=Br("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),jn=Br("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");Tr(ct(-100,.75,.35),ct(80,1.5,.8));var tr=Tr(ct(260,.75,.35),ct(80,1.5,.8));ct();function _t(t){return function(){return t}}function vc(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new pu(e)}function wc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ur(t){this._context=t}Ur.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Wr(t){return new Ur(t)}function bc(t){return t[0]}function Ac(t){return t[1]}function Mc(t,e){var n=_t(!0),r=null,i=Wr,o=null,a=vc(s);t=typeof t=="function"?t:t===void 0?bc:_t(t),e=typeof e=="function"?e:e===void 0?Ac:_t(e);function s(u){var c,f=(u=wc(u)).length,l,h=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=f;++c)!(c<f&&n(l=u[c],c,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(l,c,u),+e(l,c,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:_t(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:_t(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:_t(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}var Sc=Yr(Wr);function Xr(t){this._curve=t}Xr.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function Yr(t){function e(n){return new Xr(t(n))}return e._curve=t,e}function kc(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(Yr(n)):e()._curve},t}function er(){return kc(Mc().curve(Sc))}function nr(){}function Ue(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Zr(t,e){this._context=t,this._k=(1-e)/6}Zr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ue(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ue(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(r){return new Zr(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Jr(t,e){this._context=t,this._k=(1-e)/6}Jr.prototype={areaStart:nr,areaEnd:nr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ue(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ec=function t(e){function n(r){return new Jr(r,e)}return n.tension=function(r){return t(+r)},n}(0),Xt=t=>()=>t;function Nc(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ot(t,e,n){this.k=t,this.x=e,this.y=n}ot.prototype={constructor:ot,scale:function(t){return t===1?this:new ot(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ot(this.k,this.x+this.k*t,this.y+this.k*e)},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 ye=new ot(1,0,0);Qr.prototype=ot.prototype;function Qr(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ye;return t.__zoom}function Ne(t){t.stopImmediatePropagation()}function $t(t){t.preventDefault(),t.stopImmediatePropagation()}function Tc(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Pc(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function rr(){return this.__zoom||ye}function Cc(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $c(){return navigator.maxTouchPoints||"ontouchstart"in this}function zc(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[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 Rc(){var t=Tc,e=Pc,n=zc,r=Cc,i=$c,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=ts,c=Xe("start","zoom","end"),f,l,h,p=500,y=150,_=0,v=10;function g(d){d.property("__zoom",rr).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",O).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(d,x,m,w){var k=d.selection?d.selection():d;k.property("__zoom",rr),d!==k?E(d,x,m,w):k.interrupt().each(function(){P(this,arguments).event(w).start().zoom(null,typeof x=="function"?x.apply(this,arguments):x).end()})},g.scaleBy=function(d,x,m,w){g.scaleTo(d,function(){var k=this.__zoom.k,M=typeof x=="function"?x.apply(this,arguments):x;return k*M},m,w)},g.scaleTo=function(d,x,m,w){g.transform(d,function(){var k=e.apply(this,arguments),M=this.__zoom,N=m==null?T(k):typeof m=="function"?m.apply(this,arguments):m,$=M.invert(N),L=typeof x=="function"?x.apply(this,arguments):x;return n(b(A(M,L),N,$),k,a)},m,w)},g.translateBy=function(d,x,m,w){g.transform(d,function(){return n(this.__zoom.translate(typeof x=="function"?x.apply(this,arguments):x,typeof m=="function"?m.apply(this,arguments):m),e.apply(this,arguments),a)},null,w)},g.translateTo=function(d,x,m,w,k){g.transform(d,function(){var M=e.apply(this,arguments),N=this.__zoom,$=w==null?T(M):typeof w=="function"?w.apply(this,arguments):w;return n(ye.translate($[0],$[1]).scale(N.k).translate(typeof x=="function"?-x.apply(this,arguments):-x,typeof m=="function"?-m.apply(this,arguments):-m),M,a)},w,k)};function A(d,x){return x=Math.max(o[0],Math.min(o[1],x)),x===d.k?d:new ot(x,d.x,d.y)}function b(d,x,m){var w=x[0]-m[0]*d.k,k=x[1]-m[1]*d.k;return w===d.x&&k===d.y?d:new ot(d.k,w,k)}function T(d){return[(+d[0][0]+ +d[1][0])/2,(+d[0][1]+ +d[1][1])/2]}function E(d,x,m,w){d.on("start.zoom",function(){P(this,arguments).event(w).start()}).on("interrupt.zoom end.zoom",function(){P(this,arguments).event(w).end()}).tween("zoom",function(){var k=this,M=arguments,N=P(k,M).event(w),$=e.apply(k,M),L=m==null?T($):typeof m=="function"?m.apply(k,M):m,Q=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),V=k.__zoom,W=typeof x=="function"?x.apply(k,M):x,nt=u(V.invert(L).concat(Q/V.k),W.invert(L).concat(Q/W.k));return function(X){if(X===1)X=W;else{var rt=nt(X),_e=Q/rt[2];X=new ot(_e,L[0]-rt[0]*_e,L[1]-rt[1]*_e)}N.zoom(null,X)}})}function P(d,x,m){return!m&&d.__zooming||new C(d,x)}function C(d,x){this.that=d,this.args=x,this.active=0,this.sourceEvent=null,this.extent=e.apply(d,x),this.taps=0}C.prototype={event:function(d){return d&&(this.sourceEvent=d),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(d,x){return this.mouse&&d!=="mouse"&&(this.mouse[1]=x.invert(this.mouse[0])),this.touch0&&d!=="touch"&&(this.touch0[1]=x.invert(this.touch0[0])),this.touch1&&d!=="touch"&&(this.touch1[1]=x.invert(this.touch1[0])),this.that.__zoom=x,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(d){var x=q(this.that).datum();c.call(d,this.that,new Nc(d,{sourceEvent:this.sourceEvent,target:g,type:d,transform:this.that.__zoom,dispatch:c}),x)}};function R(d,...x){if(!t.apply(this,arguments))return;var m=P(this,x).event(d),w=this.__zoom,k=Math.max(o[0],Math.min(o[1],w.k*Math.pow(2,r.apply(this,arguments)))),M=lt(d);if(m.wheel)(m.mouse[0][0]!==M[0]||m.mouse[0][1]!==M[1])&&(m.mouse[1]=w.invert(m.mouse[0]=M)),clearTimeout(m.wheel);else{if(w.k===k)return;m.mouse=[M,w.invert(M)],Qt(this),m.start()}$t(d),m.wheel=setTimeout(N,y),m.zoom("mouse",n(b(A(w,k),m.mouse[0],m.mouse[1]),m.extent,a));function N(){m.wheel=null,m.end()}}function F(d,...x){if(h||!t.apply(this,arguments))return;var m=d.currentTarget,w=P(this,x,!0).event(d),k=q(d.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",Q,!0),M=lt(d,m),N=d.clientX,$=d.clientY;wa(d.view),Ne(d),w.mouse=[M,this.__zoom.invert(M)],Qt(this),w.start();function L(V){if($t(V),!w.moved){var W=V.clientX-N,nt=V.clientY-$;w.moved=W*W+nt*nt>_}w.event(V).zoom("mouse",n(b(w.that.__zoom,w.mouse[0]=lt(V,m),w.mouse[1]),w.extent,a))}function Q(V){k.on("mousemove.zoom mouseup.zoom",null),ba(V.view,w.moved),$t(V),w.event(V).end()}}function O(d,...x){if(t.apply(this,arguments)){var m=this.__zoom,w=lt(d.changedTouches?d.changedTouches[0]:d,this),k=m.invert(w),M=m.k*(d.shiftKey?.5:2),N=n(b(A(m,M),w,k),e.apply(this,x),a);$t(d),s>0?q(this).transition().duration(s).call(E,N,w,d):q(this).call(g.transform,N,w,d)}}function S(d,...x){if(t.apply(this,arguments)){var m=d.touches,w=m.length,k=P(this,x,d.changedTouches.length===w).event(d),M,N,$,L;for(Ne(d),N=0;N<w;++N)$=m[N],L=lt($,this),L=[L,this.__zoom.invert(L),$.identifier],k.touch0?!k.touch1&&k.touch0[2]!==L[2]&&(k.touch1=L,k.taps=0):(k.touch0=L,M=!0,k.taps=1+!!f);f&&(f=clearTimeout(f)),M&&(k.taps<2&&(l=L[0],f=setTimeout(function(){f=null},p)),Qt(this),k.start())}}function G(d,...x){if(this.__zooming){var m=P(this,x).event(d),w=d.changedTouches,k=w.length,M,N,$,L;for($t(d),M=0;M<k;++M)N=w[M],$=lt(N,this),m.touch0&&m.touch0[2]===N.identifier?m.touch0[0]=$:m.touch1&&m.touch1[2]===N.identifier&&(m.touch1[0]=$);if(N=m.that.__zoom,m.touch1){var Q=m.touch0[0],V=m.touch0[1],W=m.touch1[0],nt=m.touch1[1],X=(X=W[0]-Q[0])*X+(X=W[1]-Q[1])*X,rt=(rt=nt[0]-V[0])*rt+(rt=nt[1]-V[1])*rt;N=A(N,Math.sqrt(X/rt)),$=[(Q[0]+W[0])/2,(Q[1]+W[1])/2],L=[(V[0]+nt[0])/2,(V[1]+nt[1])/2]}else if(m.touch0)$=m.touch0[0],L=m.touch0[1];else return;m.zoom("touch",n(b(N,$,L),m.extent,a))}}function z(d,...x){if(this.__zooming){var m=P(this,x).event(d),w=d.changedTouches,k=w.length,M,N;for(Ne(d),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),M=0;M<k;++M)N=w[M],m.touch0&&m.touch0[2]===N.identifier?delete m.touch0:m.touch1&&m.touch1[2]===N.identifier&&delete m.touch1;if(m.touch1&&!m.touch0&&(m.touch0=m.touch1,delete m.touch1),m.touch0)m.touch0[1]=this.__zoom.invert(m.touch0[0]);else if(m.end(),m.taps===2&&(N=lt(N,this),Math.hypot(l[0]-N[0],l[1]-N[1])<v)){var $=q(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return g.wheelDelta=function(d){return arguments.length?(r=typeof d=="function"?d:Xt(+d),g):r},g.filter=function(d){return arguments.length?(t=typeof d=="function"?d:Xt(!!d),g):t},g.touchable=function(d){return arguments.length?(i=typeof d=="function"?d:Xt(!!d),g):i},g.extent=function(d){return arguments.length?(e=typeof d=="function"?d:Xt([[+d[0][0],+d[0][1]],[+d[1][0],+d[1][1]]]),g):e},g.scaleExtent=function(d){return arguments.length?(o[0]=+d[0],o[1]=+d[1],g):[o[0],o[1]]},g.translateExtent=function(d){return arguments.length?(a[0][0]=+d[0][0],a[1][0]=+d[1][0],a[0][1]=+d[0][1],a[1][1]=+d[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(d){return arguments.length?(n=d,g):n},g.duration=function(d){return arguments.length?(s=+d,g):s},g.interpolate=function(d){return arguments.length?(u=d,g):u},g.on=function(){var d=c.on.apply(c,arguments);return d===c?g:d},g.clickDistance=function(d){return arguments.length?(_=(d=+d)*d,g):Math.sqrt(_)},g.tapDistance=function(d){return arguments.length?(v=+d,g):v},g}class jr{constructor(e,n){I(this,"config");I(this,"data");this.data=e,this.config={...n,parentElement:typeof n.parentElement=="string"?document.querySelector(n.parentElement):n.parentElement,containerWidth:n.containerWidth||500,containerHeight:n.containerHeight||140,margin:n.margin||{top:10,bottom:30,right:10,left:30},tooltipPadding:n.tooltipPadding||15}}height(){return this.config.containerHeight-this.config.margin.top-this.config.margin.bottom}width(){return this.config.containerWidth-this.config.margin.left-this.config.margin.right}}class Gc extends jr{constructor(e,n){super(e,n)}}function Lc(t,e=300){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function Ic(t,{title:e,tickSize:n=6,width:r=320,height:i=44+n,marginTop:o=18,marginRight:a=0,marginBottom:s=16+n,marginLeft:u=0,ticks:c=r/64,tickFormat:f,tickValues:l}={}){function h(v,g=256){const A=document.createElement("canvas");A.width=g,A.height=1;const b=A.getContext("2d");for(let T=0;T<g;++T)b.fillStyle=v(T/(g-1)),b.fillRect(T,0,1,1);return A}const p=_a("svg").attr("width",r).attr("height",i).attr("viewBox",[0,0,r,i]).style("overflow","visible").style("display","block");let y=v=>v.selectAll(".tick line").attr("y1",o+s-i),_;if(t.interpolate){const v=Math.min(t.domain().length,t.range().length);_=t.copy().rangeRound(Rn(Mt(u,r-a),v)),p.append("image").attr("x",u).attr("y",o).attr("width",r-u-a).attr("height",i-o-s).attr("preserveAspectRatio","none").attr("xlink:href",h(t.copy().domain(Rn(Mt(0,1),v))).toDataURL())}else if(t.interpolator){if(_=Object.assign(t.copy().interpolator(nn(u,r-a)),{range(){return[u,r-a]}}),p.append("image").attr("x",u).attr("y",o).attr("width",r-u-a).attr("height",i-o-s).attr("preserveAspectRatio","none").attr("xlink:href",h(t.interpolator()).toDataURL()),!_.ticks){if(l===void 0){const v=Math.round(c+1);l=$e(v).map(g=>Ni(t.domain(),g/(v-1)))}typeof f!="function"&&(f=ue(f===void 0?",f":f))}}else if(t.invertExtent){const v=t.thresholds?t.thresholds():t.quantiles?t.quantiles():t.domain(),g=f===void 0?A=>A:typeof f=="string"?ue(f):f;_=ge().domain([-1,t.range().length-1]).rangeRound([u,r-a]),p.append("g").selectAll("rect").data(t.range()).join("rect").attr("x",(A,b)=>_(b-1)).attr("y",o).attr("width",(A,b)=>_(b)-_(b-1)).attr("height",i-o-s).attr("fill",A=>A),l=$e(v.length),f=A=>g(v[A],A)}else _=Fr().domain(t.domain()).rangeRound([u,r-a]),p.append("g").selectAll("rect").data(t.domain()).join("rect").attr("x",_).attr("y",o).attr("width",Math.max(0,_.bandwidth()-1)).attr("height",i-o-s).attr("fill",t),y=()=>{};return p.append("g").attr("transform",`translate(0,${i-s})`).call(Li(_).ticks(c,typeof f=="string"?f:void 0).tickFormat(typeof f=="function"?f:void 0).tickSize(n).tickValues(l)).call(y).call(v=>v.select(".domain").remove()).call(v=>v.append("text").attr("x",u).attr("y",o+s-i-6).attr("fill","currentColor").attr("text-anchor","start").attr("font-weight","bold").attr("class","title").text(e)),p.node()}class Dc extends Gc{constructor(n,r){super(n,r);I(this,"chartId","bubbleChart");I(this,"chart");I(this,"zoom");I(this,"config");I(this,"packRoot",null);I(this,"highlightedNode",null);I(this,"colorScale",null);I(this,"sizeScale",null);I(this,"groupLabels",null);I(this,"groupsWithLabels",[]);I(this,"defaultSizeAccessor",n=>5);I(this,"updateGroupsWithLabels",Lc(()=>{if(!this.packRoot){this.groupsWithLabels=[];return}const n=this.packRoot.descendants().filter(r=>r.children&&r.value&&r.value>=50/this.zoomLevel&&r.value<300/(this.zoomLevel*2.5)&&r.children.length>5);this.groupsWithLabels=n.length>1?n:[],this.renderGroupLabels()},300));this.config=this.createConfig(r),this.initVis()}setConfig(n){this.config=this.createConfig(n)}createConfig(n){return{...n,parentElement:typeof n.parentElement=="string"?document.querySelector(n.parentElement):n.parentElement,containerWidth:n.containerWidth||500,containerHeight:n.containerHeight||140,margin:n.margin||{top:10,bottom:30,right:10,left:30},tooltipPadding:n.tooltipPadding||30,groupAccessor:n.groupAccessor||(()=>null),sizeAccessor:n.sizeAccessor||this.defaultSizeAccessor,colorAccessor:n.colorAccessor||(()=>null),idAccessor:n.idAccessor||(()=>null),zoomExtent:n.zoomExtent||[.5,20],renderTooltip:n.renderTooltip||(()=>null),onClick:n.onClick||(()=>null)}}initVis(){let n=this;n.config.parentElement.innerHTML+=` +`)}function c(l){return l.map(f).join(t)}function f(l){return l==null?"":l instanceof Date?si(l):e.test(l+="")?'"'+l.replace(/"/g,'""')+'"':l}return{parse:r,parseRows:i,format:a,formatBody:s,formatRows:u,formatRow:c,formatValue:f}}function ci(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function li(t,e){return fetch(t,e).then(ci)}function fi(t,e,n,r){arguments.length===3&&typeof n=="function"&&(r=n,n=void 0);var i=ui(t);return li(e,n).then(function(o){return i.parse(o,r)})}function vt(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function ar(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sr(t){let e,n,r;t.length!==2?(e=vt,n=(s,u)=>vt(t(s),u),r=(s,u)=>t(s)-u):(e=t===vt||t===ar?t:hi,n=t,r=t);function i(s,u,c=0,f=s.length){if(c<f){if(e(u,u)!==0)return f;do{const l=c+f>>>1;n(s[l],u)<0?c=l+1:f=l}while(c<f)}return c}function o(s,u,c=0,f=s.length){if(c<f){if(e(u,u)!==0)return f;do{const l=c+f>>>1;n(s[l],u)<=0?c=l+1:f=l}while(c<f)}return c}function a(s,u,c=0,f=s.length){const l=i(s,u,c,f-1);return l>c&&r(s[l-1],u)>-r(s[l],u)?l-1:l}return{left:i,center:a,right:o}}function hi(){return 0}function di(t){return t===null?NaN:+t}function*pi(t,e){if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&(yield n);else{let n=-1;for(let r of t)(r=e(r,++n,t))!=null&&(r=+r)>=r&&(yield r)}}const mi=sr(vt),gi=mi.right;sr(di).center;function pn(t,e){let n,r;if(e===void 0)for(const i of t)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let o of t)(o=e(o,++i,t))!=null&&(n===void 0?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Te extends Map{constructor(e,n=xi){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),e!=null)for(const[r,i]of e)this.set(r,i)}get(e){return super.get(mn(this,e))}has(e){return super.has(mn(this,e))}set(e,n){return super.set(yi(this,e),n)}delete(e){return super.delete(_i(this,e))}}function mn({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function yi({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}function _i({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}function xi(t){return t!==null&&typeof t=="object"?t.valueOf():t}function gn(t){return t}function vi(t,...e){return wi(t,gn,gn,e)}function wi(t,e,n,r){return function i(o,a){if(a>=r.length)return n(o);const s=new Te,u=r[a++];let c=-1;for(const f of o){const l=u(f,++c,o),h=s.get(l);h?h.push(f):s.set(l,[f])}for(const[f,l]of s)s.set(f,i(l,a));return e(s)}(t,0)}function bi(t=vt){if(t===vt)return ur;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,n)=>{const r=t(e,n);return r||r===0?r:(t(n,n)===0)-(t(e,e)===0)}}function ur(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}const Ai=Math.sqrt(50),Mi=Math.sqrt(10),Si=Math.sqrt(2);function jt(t,e,n){const r=(e-t)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=Ai?10:o>=Mi?5:o>=Si?2:1;let s,u,c;return i<0?(c=Math.pow(10,-i)/a,s=Math.round(t*c),u=Math.round(e*c),s/c<t&&++s,u/c>e&&--u,c=-c):(c=Math.pow(10,i)*a,s=Math.round(t/c),u=Math.round(e/c),s*c<t&&++s,u*c>e&&--u),u<s&&.5<=n&&n<2?jt(t,e,n*2):[s,u,c]}function ki(t,e,n){if(e=+e,t=+t,n=+n,!(n>0))return[];if(t===e)return[t];const r=e<t,[i,o,a]=r?jt(e,t,n):jt(t,e,n);if(!(o>=i))return[];const s=o-i+1,u=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)u[c]=(o-c)/-a;else for(let c=0;c<s;++c)u[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)u[c]=(i+c)/-a;else for(let c=0;c<s;++c)u[c]=(i+c)*a;return u}function Ce(t,e,n){return e=+e,t=+t,n=+n,jt(t,e,n)[2]}function Ei(t,e,n){e=+e,t=+t,n=+n;const r=e<t,i=r?Ce(e,t,n):Ce(t,e,n);return(r?-1:1)*(i<0?1/-i:i)}function Pe(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n<i||n===void 0&&i>=i)&&(n=i)}return n}function yn(t,e){let n;if(e===void 0)for(const r of t)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);else{let r=-1;for(let i of t)(i=e(i,++r,t))!=null&&(n>i||n===void 0&&i>=i)&&(n=i)}return n}function cr(t,e,n=0,r=1/0,i){if(e=Math.floor(e),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(t.length-1,r)),!(n<=e&&e<=r))return t;for(i=i===void 0?ur:bi(i);r>n;){if(r-n>600){const u=r-n+1,c=e-n+1,f=Math.log(u),l=.5*Math.exp(2*f/3),h=.5*Math.sqrt(f*l*(u-l)/u)*(c-u/2<0?-1:1),p=Math.max(n,Math.floor(e-c*l/u+h)),y=Math.min(r,Math.floor(e+(u-c)*l/u+h));cr(t,e,p,y,i)}const o=t[e];let a=n,s=r;for(Pt(t,n,e),i(t[r],o)>0&&Pt(t,n,r);a<s;){for(Pt(t,a,s),++a,--s;i(t[a],o)<0;)++a;for(;i(t[s],o)>0;)--s}i(t[n],o)===0?Pt(t,n,s):(++s,Pt(t,s,r)),s<=e&&(n=s+1),e<=s&&(r=s-1)}return t}function Pt(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ni(t,e,n){if(t=Float64Array.from(pi(t,n)),!(!(r=t.length)||isNaN(e=+e))){if(e<=0||r<2)return yn(t);if(e>=1)return Pe(t);var r,i=(r-1)*e,o=Math.floor(i),a=Pe(cr(t,o).subarray(0,o+1)),s=yn(t.subarray(o+1));return a+(s-a)*(i-o)}}function $e(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((e-t)/n))|0,o=new Array(i);++r<i;)o[r]=t+r*n;return o}function Ti(t){return t}var be=1,Ae=2,ze=3,Vt=4,_n=1e-6;function Ci(t){return"translate("+t+",0)"}function Pi(t){return"translate(0,"+t+")"}function $i(t){return e=>+t(e)}function zi(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Ri(){return!this.__axis}function Gi(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=typeof window<"u"&&window.devicePixelRatio>1?0:.5,c=t===be||t===Vt?-1:1,f=t===Vt||t===Ae?"x":"y",l=t===be||t===ze?Ci:Pi;function h(p){var y=r??(e.ticks?e.ticks.apply(e,n):e.domain()),_=i??(e.tickFormat?e.tickFormat.apply(e,n):Ti),v=Math.max(o,0)+s,g=e.range(),A=+g[0]+u,b=+g[g.length-1]+u,T=(e.bandwidth?zi:$i)(e.copy(),u),E=p.selection?p.selection():p,C=E.selectAll(".domain").data([null]),P=E.selectAll(".tick").data(y,e).order(),R=P.exit(),F=P.enter().append("g").attr("class","tick"),O=P.select("line"),S=P.select("text");C=C.merge(C.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),P=P.merge(F),O=O.merge(F.append("line").attr("stroke","currentColor").attr(f+"2",c*o)),S=S.merge(F.append("text").attr("fill","currentColor").attr(f,c*v).attr("dy",t===be?"0em":t===ze?"0.71em":"0.32em")),p!==E&&(C=C.transition(p),P=P.transition(p),O=O.transition(p),S=S.transition(p),R=R.transition(p).attr("opacity",_n).attr("transform",function(G){return isFinite(G=T(G))?l(G+u):this.getAttribute("transform")}),F.attr("opacity",_n).attr("transform",function(G){var z=this.parentNode.__axis;return l((z&&isFinite(z=z(G))?z:T(G))+u)})),R.remove(),C.attr("d",t===Vt||t===Ae?a?"M"+c*a+","+A+"H"+u+"V"+b+"H"+c*a:"M"+u+","+A+"V"+b:a?"M"+A+","+c*a+"V"+u+"H"+b+"V"+c*a:"M"+A+","+u+"H"+b),P.attr("opacity",1).attr("transform",function(G){return l(T(G)+u)}),O.attr(f+"2",c*o),S.attr(f,c*v).text(_),E.filter(Ri).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Ae?"start":t===Vt?"end":"middle"),E.each(function(){this.__axis=T})}return h.scale=function(p){return arguments.length?(e=p,h):e},h.ticks=function(){return n=Array.from(arguments),h},h.tickArguments=function(p){return arguments.length?(n=p==null?[]:Array.from(p),h):n.slice()},h.tickValues=function(p){return arguments.length?(r=p==null?null:Array.from(p),h):r&&r.slice()},h.tickFormat=function(p){return arguments.length?(i=p,h):i},h.tickSize=function(p){return arguments.length?(o=a=+p,h):o},h.tickSizeInner=function(p){return arguments.length?(o=+p,h):o},h.tickSizeOuter=function(p){return arguments.length?(a=+p,h):a},h.tickPadding=function(p){return arguments.length?(s=+p,h):s},h.offset=function(p){return arguments.length?(u=+p,h):u},h}function Li(t){return Gi(ze,t)}var Ii={value:()=>{}};function Xe(){for(var t=0,e=arguments.length,n={},r;t<e;++t){if(!(r=arguments[t]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new Yt(n)}function Yt(t){this._=t}function Di(t,e){return t.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}Yt.prototype=Xe.prototype={constructor:Yt,on:function(t,e){var n=this._,r=Di(t+"",n),i,o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((i=(t=r[o]).type)&&(i=qi(n[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++o<a;)if(i=(t=r[o]).type)n[i]=xn(n[i],t.name,e);else if(e==null)for(i in n)n[i]=xn(n[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Yt(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,o;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=this._[t],r=0,i=o.length;r<i;++r)o[r].value.apply(e,n)},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)}};function qi(t,e){for(var n=0,r=t.length,i;n<r;++n)if((i=t[n]).name===e)return i.value}function xn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Ii,t=t.slice(0,r).concat(t.slice(r+1));break}return n!=null&&t.push({name:e,value:n}),t}var Re="http://www.w3.org/1999/xhtml";const vn={svg:"http://www.w3.org/2000/svg",xhtml:Re,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function le(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),vn.hasOwnProperty(e)?{space:vn[e],local:t}:t}function Oi(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Re&&e.documentElement.namespaceURI===Re?e.createElement(t):e.createElementNS(n,t)}}function Vi(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ye(t){var e=le(t);return(e.local?Vi:Oi)(e)}function Fi(){}function Ze(t){return t==null?Fi:function(){return this.querySelector(t)}}function Hi(t){typeof t!="function"&&(t=Ze(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=new Array(a),u,c,f=0;f<a;++f)(u=o[f])&&(c=t.call(u,u.__data__,f,o))&&("__data__"in u&&(c.__data__=u.__data__),s[f]=c);return new K(r,this._parents)}function lr(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Ki(){return[]}function fr(t){return t==null?Ki:function(){return this.querySelectorAll(t)}}function Bi(t){return function(){return lr(t.apply(this,arguments))}}function Ui(t){typeof t=="function"?t=Bi(t):t=fr(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a=e[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&(r.push(t.call(u,u.__data__,c,a)),i.push(u));return new K(r,i)}function hr(t){return function(){return this.matches(t)}}function dr(t){return function(e){return e.matches(t)}}var Wi=Array.prototype.find;function Xi(t){return function(){return Wi.call(this.children,t)}}function Yi(){return this.firstElementChild}function Zi(t){return this.select(t==null?Yi:Xi(typeof t=="function"?t:dr(t)))}var Ji=Array.prototype.filter;function Qi(){return Array.from(this.children)}function ji(t){return function(){return Ji.call(this.children,t)}}function to(t){return this.selectAll(t==null?Qi:ji(typeof t=="function"?t:dr(t)))}function eo(t){typeof t!="function"&&(t=hr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new K(r,this._parents)}function pr(t){return new Array(t.length)}function no(){return new K(this._enter||this._groups.map(pr),this._parents)}function te(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}te.prototype={constructor:te,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function ro(t){return function(){return t}}function io(t,e,n,r,i,o){for(var a=0,s,u=e.length,c=o.length;a<c;++a)(s=e[a])?(s.__data__=o[a],r[a]=s):n[a]=new te(t,o[a]);for(;a<u;++a)(s=e[a])&&(i[a]=s)}function oo(t,e,n,r,i,o,a){var s,u,c=new Map,f=e.length,l=o.length,h=new Array(f),p;for(s=0;s<f;++s)(u=e[s])&&(h[s]=p=a.call(u,u.__data__,s,e)+"",c.has(p)?i[s]=u:c.set(p,u));for(s=0;s<l;++s)p=a.call(t,o[s],s,o)+"",(u=c.get(p))?(r[s]=u,u.__data__=o[s],c.delete(p)):n[s]=new te(t,o[s]);for(s=0;s<f;++s)(u=e[s])&&c.get(h[s])===u&&(i[s]=u)}function ao(t){return t.__data__}function so(t,e){if(!arguments.length)return Array.from(this,ao);var n=e?oo:io,r=this._parents,i=this._groups;typeof t!="function"&&(t=ro(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var f=r[c],l=i[c],h=l.length,p=uo(t.call(f,f&&f.__data__,c,r)),y=p.length,_=s[c]=new Array(y),v=a[c]=new Array(y),g=u[c]=new Array(h);n(f,l,_,v,g,p,e);for(var A=0,b=0,T,E;A<y;++A)if(T=_[A]){for(A>=b&&(b=A+1);!(E=v[b])&&++b<y;);T._next=E||null}}return a=new K(a,r),a._enter=s,a._exit=u,a}function uo(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function co(){return new K(this._exit||this._groups.map(pr),this._parents)}function lo(t,e,n){var r=this.enter(),i=this,o=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),n==null?o.remove():n(o),r&&i?r.merge(i).order():i}function fo(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var c=n[u],f=r[u],l=c.length,h=s[u]=new Array(l),p,y=0;y<l;++y)(p=c[y]||f[y])&&(h[y]=p);for(;u<i;++u)s[u]=n[u];return new K(s,this._parents)}function ho(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r=t[e],i=r.length-1,o=r[i],a;--i>=0;)(a=r[i])&&(o&&a.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(a,o),o=a);return this}function po(t){t||(t=mo);function e(l,h){return l&&h?t(l.__data__,h.__data__):!l-!h}for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a=n[o],s=a.length,u=i[o]=new Array(s),c,f=0;f<s;++f)(c=a[f])&&(u[f]=c);u.sort(e)}return new K(i,this._parents).order()}function mo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function go(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function yo(){return Array.from(this)}function _o(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null}function xo(){let t=0;for(const e of this)++t;return t}function vo(){return!this.node()}function wo(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i=e[n],o=0,a=i.length,s;o<a;++o)(s=i[o])&&t.call(s,s.__data__,o,i);return this}function bo(t){return function(){this.removeAttribute(t)}}function Ao(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Mo(t,e){return function(){this.setAttribute(t,e)}}function So(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function ko(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function Eo(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function No(t,e){var n=le(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((e==null?n.local?Ao:bo:typeof e=="function"?n.local?Eo:ko:n.local?So:Mo)(n,e))}function mr(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function To(t){return function(){this.style.removeProperty(t)}}function Co(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Po(t,e,n){return function(){var r=e.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function $o(t,e,n){return arguments.length>1?this.each((e==null?To:typeof e=="function"?Po:Co)(t,e,n??"")):At(this.node(),t)}function At(t,e){return t.style.getPropertyValue(e)||mr(t).getComputedStyle(t,null).getPropertyValue(e)}function zo(t){return function(){delete this[t]}}function Ro(t,e){return function(){this[t]=e}}function Go(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function Lo(t,e){return arguments.length>1?this.each((e==null?zo:typeof e=="function"?Go:Ro)(t,e)):this.node()[t]}function gr(t){return t.trim().split(/^|\s+/)}function Je(t){return t.classList||new yr(t)}function yr(t){this._node=t,this._names=gr(t.getAttribute("class")||"")}yr.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function _r(t,e){for(var n=Je(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function xr(t,e){for(var n=Je(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Io(t){return function(){_r(this,t)}}function Do(t){return function(){xr(this,t)}}function qo(t,e){return function(){(e.apply(this,arguments)?_r:xr)(this,t)}}function Oo(t,e){var n=gr(t+"");if(arguments.length<2){for(var r=Je(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof e=="function"?qo:e?Io:Do)(n,e))}function Vo(){this.textContent=""}function Fo(t){return function(){this.textContent=t}}function Ho(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function Ko(t){return arguments.length?this.each(t==null?Vo:(typeof t=="function"?Ho:Fo)(t)):this.node().textContent}function Bo(){this.innerHTML=""}function Uo(t){return function(){this.innerHTML=t}}function Wo(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function Xo(t){return arguments.length?this.each(t==null?Bo:(typeof t=="function"?Wo:Uo)(t)):this.node().innerHTML}function Yo(){this.nextSibling&&this.parentNode.appendChild(this)}function Zo(){return this.each(Yo)}function Jo(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qo(){return this.each(Jo)}function jo(t){var e=typeof t=="function"?t:Ye(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function ta(){return null}function ea(t,e){var n=typeof t=="function"?t:Ye(t),r=e==null?ta:typeof e=="function"?e:Ze(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function na(){var t=this.parentNode;t&&t.removeChild(this)}function ra(){return this.each(na)}function ia(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oa(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function aa(t){return this.select(t?oa:ia)}function sa(t){return arguments.length?this.property("__data__",t):this.node().__data__}function ua(t){return function(e){t.call(this,e,this.__data__)}}function ca(t){return t.trim().split(/^|\s+/).map(function(e){var n="",r=e.indexOf(".");return r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),{type:e,name:n}})}function la(t){return function(){var e=this.__on;if(e){for(var n=0,r=-1,i=e.length,o;n<i;++n)o=e[n],(!t.type||o.type===t.type)&&o.name===t.name?this.removeEventListener(o.type,o.listener,o.options):e[++r]=o;++r?e.length=r:delete this.__on}}}function fa(t,e,n){return function(){var r=this.__on,i,o=ua(e);if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function ha(t,e,n){var r=ca(t+""),i,o=r.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,c=s.length,f;u<c;++u)for(i=0,f=s[u];i<o;++i)if((a=r[i]).type===f.type&&a.name===f.name)return f.value}return}for(s=e?fa:la,i=0;i<o;++i)this.each(s(r[i],e,n));return this}function vr(t,e,n){var r=mr(t),i=r.CustomEvent;typeof i=="function"?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function da(t,e){return function(){return vr(this,t,e)}}function pa(t,e){return function(){return vr(this,t,e.apply(this,arguments))}}function ma(t,e){return this.each((typeof e=="function"?pa:da)(t,e))}function*ga(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length,a;i<o;++i)(a=r[i])&&(yield a)}var Qe=[null];function K(t,e){this._groups=t,this._parents=e}function Ot(){return new K([[document.documentElement]],Qe)}function ya(){return this}K.prototype=Ot.prototype={constructor:K,select:Hi,selectAll:Ui,selectChild:Zi,selectChildren:to,filter:eo,data:so,enter:no,exit:co,join:lo,merge:fo,selection:ya,order:ho,sort:po,call:go,nodes:yo,node:_o,size:xo,empty:vo,each:wo,attr:No,style:$o,property:Lo,classed:Oo,text:Ko,html:Xo,raise:Zo,lower:Qo,append:jo,insert:ea,remove:ra,clone:aa,datum:sa,on:ha,dispatch:ma,[Symbol.iterator]:ga};function q(t){return typeof t=="string"?new K([[document.querySelector(t)]],[document.documentElement]):new K([[t]],Qe)}function _a(t){return q(Ye(t).call(document.documentElement))}function xa(t){let e;for(;e=t.sourceEvent;)t=e;return t}function lt(t,e){if(t=xa(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(e.getScreenCTM().inverse()),[r.x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function va(t){return typeof t=="string"?new K([document.querySelectorAll(t)],[document.documentElement]):new K([lr(t)],Qe)}const Ge={capture:!0,passive:!1};function Le(t){t.preventDefault(),t.stopImmediatePropagation()}function wa(t){var e=t.document.documentElement,n=q(t).on("dragstart.drag",Le,Ge);"onselectstart"in e?n.on("selectstart.drag",Le,Ge):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ba(t,e){var n=t.document.documentElement,r=q(t).on("dragstart.drag",null);e&&(r.on("click.drag",Le,Ge),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function fe(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function je(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Tt(){}var gt=.7,Mt=1/gt,wt="\\s*([+-]?\\d+)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Aa=/^#([0-9a-f]{3,8})$/,Ma=new RegExp(`^rgb\\(${wt},${wt},${wt}\\)$`),Sa=new RegExp(`^rgb\\(${tt},${tt},${tt}\\)$`),ka=new RegExp(`^rgba\\(${wt},${wt},${wt},${It}\\)$`),Ea=new RegExp(`^rgba\\(${tt},${tt},${tt},${It}\\)$`),Na=new RegExp(`^hsl\\(${It},${tt},${tt}\\)$`),Ta=new RegExp(`^hsla\\(${It},${tt},${tt},${It}\\)$`),wn={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};fe(Tt,at,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:bn,formatHex:bn,formatHex8:Ca,formatHsl:Pa,formatRgb:An,toString:An});function bn(){return this.rgb().formatHex()}function Ca(){return this.rgb().formatHex8()}function Pa(){return br(this).formatHsl()}function An(){return this.rgb().formatRgb()}function at(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Aa.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?Mn(e):n===3?new H(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Ft(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Ft(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=Ma.exec(t))?new H(e[1],e[2],e[3],1):(e=Sa.exec(t))?new H(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=ka.exec(t))?Ft(e[1],e[2],e[3],e[4]):(e=Ea.exec(t))?Ft(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Na.exec(t))?En(e[1],e[2]/100,e[3]/100,1):(e=Ta.exec(t))?En(e[1],e[2]/100,e[3]/100,e[4]):wn.hasOwnProperty(t)?Mn(wn[t]):t==="transparent"?new H(NaN,NaN,NaN,0):null}function Mn(t){return new H(t>>16&255,t>>8&255,t&255,1)}function Ft(t,e,n,r){return r<=0&&(t=e=n=NaN),new H(t,e,n,r)}function wr(t){return t instanceof Tt||(t=at(t)),t?(t=t.rgb(),new H(t.r,t.g,t.b,t.opacity)):new H}function Ie(t,e,n,r){return arguments.length===1?wr(t):new H(t,e,n,r??1)}function H(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}fe(H,Ie,je(Tt,{brighter(t){return t=t==null?Mt:Math.pow(Mt,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gt:Math.pow(gt,t),new H(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new H(pt(this.r),pt(this.g),pt(this.b),ee(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sn,formatHex:Sn,formatHex8:$a,formatRgb:kn,toString:kn}));function Sn(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}`}function $a(){return`#${dt(this.r)}${dt(this.g)}${dt(this.b)}${dt((isNaN(this.opacity)?1:this.opacity)*255)}`}function kn(){const t=ee(this.opacity);return`${t===1?"rgb(":"rgba("}${pt(this.r)}, ${pt(this.g)}, ${pt(this.b)}${t===1?")":`, ${t})`}`}function ee(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function pt(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function dt(t){return t=pt(t),(t<16?"0":"")+t.toString(16)}function En(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new J(t,e,n,r)}function br(t){if(t instanceof J)return new J(t.h,t.s,t.l,t.opacity);if(t instanceof Tt||(t=at(t)),!t)return new J;if(t instanceof J)return t;t=t.rgb();var e=t.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?(e===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-e)/s+2:a=(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new J(a,s,u,t.opacity)}function za(t,e,n,r){return arguments.length===1?br(t):new J(t,e,n,r??1)}function J(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fe(J,za,je(Tt,{brighter(t){return t=t==null?Mt:Math.pow(Mt,t),new J(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gt:Math.pow(gt,t),new J(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,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 H(Me(t>=240?t-240:t+120,i,r),Me(t,i,r),Me(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new J(Nn(this.h),Ht(this.s),Ht(this.l),ee(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ee(this.opacity);return`${t===1?"hsl(":"hsla("}${Nn(this.h)}, ${Ht(this.s)*100}%, ${Ht(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Nn(t){return t=(t||0)%360,t<0?t+360:t}function Ht(t){return Math.max(0,Math.min(1,t||0))}function Me(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Ra=Math.PI/180,Ga=180/Math.PI;var Ar=-.14861,tn=1.78277,en=-.29227,he=-.90649,Dt=1.97294,Tn=Dt*he,Cn=Dt*tn,Pn=tn*en-he*Ar;function La(t){if(t instanceof mt)return new mt(t.h,t.s,t.l,t.opacity);t instanceof H||(t=wr(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Pn*r+Tn*e-Cn*n)/(Pn+Tn-Cn),o=r-i,a=(Dt*(n-i)-en*o)/he,s=Math.sqrt(a*a+o*o)/(Dt*i*(1-i)),u=s?Math.atan2(a,o)*Ga-120:NaN;return new mt(u<0?u+360:u,s,i,t.opacity)}function ct(t,e,n,r){return arguments.length===1?La(t):new mt(t,e,n,r??1)}function mt(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}fe(mt,ct,je(Tt,{brighter(t){return t=t==null?Mt:Math.pow(Mt,t),new mt(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gt:Math.pow(gt,t),new mt(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Ra,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new H(255*(e+n*(Ar*r+tn*i)),255*(e+n*(en*r+he*i)),255*(e+n*(Dt*r)),this.opacity)}}));const de=t=>()=>t;function Mr(t,e){return function(n){return t+n*e}}function Ia(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}function Da(t,e){var n=e-t;return n?Mr(t,n>180||n<-180?n-360*Math.round(n/360):n):de(isNaN(t)?e:t)}function qa(t){return(t=+t)==1?bt:function(e,n){return n-e?Ia(e,n,t):de(isNaN(e)?n:e)}}function bt(t,e){var n=e-t;return n?Mr(t,n):de(isNaN(t)?e:t)}const ne=function t(e){var n=qa(e);function r(i,o){var a=n((i=Ie(i)).r,(o=Ie(o)).r),s=n(i.g,o.g),u=n(i.b,o.b),c=bt(i.opacity,o.opacity);return function(f){return i.r=a(f),i.g=s(f),i.b=u(f),i.opacity=c(f),i+""}}return r.gamma=t,r}(1);function Oa(t,e){e||(e=[]);var n=t?Math.min(e.length,t.length):0,r=e.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=t[i]*(1-o)+e[i]*o;return r}}function Va(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Fa(t,e){var n=e?e.length:0,r=t?Math.min(n,t.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=St(t[a],e[a]);for(;a<n;++a)o[a]=e[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function Ha(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Z(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ka(t,e){var n={},r={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?n[i]=St(t[i],e[i]):r[i]=e[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var De=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Se=new RegExp(De.source,"g");function Ba(t){return function(){return t}}function Ua(t){return function(e){return t(e)+""}}function Sr(t,e){var n=De.lastIndex=Se.lastIndex=0,r,i,o,a=-1,s=[],u=[];for(t=t+"",e=e+"";(r=De.exec(t))&&(i=Se.exec(e));)(o=i.index)>n&&(o=e.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,u.push({i:a,x:Z(r,i)})),n=Se.lastIndex;return n<e.length&&(o=e.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?u[0]?Ua(u[0].x):Ba(e):(e=u.length,function(c){for(var f=0,l;f<e;++f)s[(l=u[f]).i]=l.x(c);return s.join("")})}function St(t,e){var n=typeof e,r;return e==null||n==="boolean"?de(e):(n==="number"?Z:n==="string"?(r=at(e))?(e=r,ne):Sr:e instanceof at?ne:e instanceof Date?Ha:Va(e)?Oa:Array.isArray(e)?Fa:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?Ka:Z)(t,e)}function nn(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var $n=180/Math.PI,qe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function kr(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*$n,skewX:Math.atan(u)*$n,scaleX:a,scaleY:s}}var Kt;function Wa(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?qe:kr(e.a,e.b,e.c,e.d,e.e,e.f)}function Xa(t){return t==null||(Kt||(Kt=document.createElementNS("http://www.w3.org/2000/svg","g")),Kt.setAttribute("transform",t),!(t=Kt.transform.baseVal.consolidate()))?qe:(t=t.matrix,kr(t.a,t.b,t.c,t.d,t.e,t.f))}function Er(t,e,n,r){function i(c){return c.length?c.pop()+" ":""}function o(c,f,l,h,p,y){if(c!==l||f!==h){var _=p.push("translate(",null,e,null,n);y.push({i:_-4,x:Z(c,l)},{i:_-2,x:Z(f,h)})}else(l||h)&&p.push("translate("+l+e+h+n)}function a(c,f,l,h){c!==f?(c-f>180?f+=360:f-c>180&&(c+=360),h.push({i:l.push(i(l)+"rotate(",null,r)-2,x:Z(c,f)})):f&&l.push(i(l)+"rotate("+f+r)}function s(c,f,l,h){c!==f?h.push({i:l.push(i(l)+"skewX(",null,r)-2,x:Z(c,f)}):f&&l.push(i(l)+"skewX("+f+r)}function u(c,f,l,h,p,y){if(c!==l||f!==h){var _=p.push(i(p)+"scale(",null,",",null,")");y.push({i:_-4,x:Z(c,l)},{i:_-2,x:Z(f,h)})}else(l!==1||h!==1)&&p.push(i(p)+"scale("+l+","+h+")")}return function(c,f){var l=[],h=[];return c=t(c),f=t(f),o(c.translateX,c.translateY,f.translateX,f.translateY,l,h),a(c.rotate,f.rotate,l,h),s(c.skewX,f.skewX,l,h),u(c.scaleX,c.scaleY,f.scaleX,f.scaleY,l,h),c=f=null,function(p){for(var y=-1,_=h.length,v;++y<_;)l[(v=h[y]).i]=v.x(p);return l.join("")}}}var Ya=Er(Wa,"px, ","px)","deg)"),Za=Er(Xa,", ",")",")"),Ja=1e-12;function zn(t){return((t=Math.exp(t))+1/t)/2}function Qa(t){return((t=Math.exp(t))-1/t)/2}function ja(t){return((t=Math.exp(2*t))-1)/(t+1)}const ts=function t(e,n,r){function i(o,a){var s=o[0],u=o[1],c=o[2],f=a[0],l=a[1],h=a[2],p=f-s,y=l-u,_=p*p+y*y,v,g;if(_<Ja)g=Math.log(h/c)/e,v=function(P){return[s+P*p,u+P*y,c*Math.exp(e*P*g)]};else{var A=Math.sqrt(_),b=(h*h-c*c+r*_)/(2*c*n*A),T=(h*h-c*c-r*_)/(2*h*n*A),E=Math.log(Math.sqrt(b*b+1)-b),C=Math.log(Math.sqrt(T*T+1)-T);g=(C-E)/e,v=function(P){var R=P*g,F=zn(E),O=c/(n*A)*(F*ja(e*R+E)-Qa(E));return[s+O*p,u+O*y,c*F/zn(e*R+E)]}}return v.duration=g*1e3*e/Math.SQRT2,v}return i.rho=function(o){var a=Math.max(.001,+o),s=a*a,u=s*s;return t(a,s,u)},i}(Math.SQRT2,2,4);function Nr(t){return function e(n){n=+n;function r(i,o){var a=t((i=ct(i)).h,(o=ct(o)).h),s=bt(i.s,o.s),u=bt(i.l,o.l),c=bt(i.opacity,o.opacity);return function(f){return i.h=a(f),i.s=s(f),i.l=u(Math.pow(f,n)),i.opacity=c(f),i+""}}return r.gamma=e,r}(1)}Nr(Da);var Tr=Nr(bt);function Rn(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n}var kt=0,Rt=0,$t=0,Cr=1e3,re,Gt,ie=0,yt=0,pe=0,qt=typeof performance=="object"&&performance.now?performance:Date,Pr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function rn(){return yt||(Pr(es),yt=qt.now()+pe)}function es(){yt=0}function oe(){this._call=this._time=this._next=null}oe.prototype=$r.prototype={constructor:oe,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?rn():+n)+(e==null?0:+e),!this._next&&Gt!==this&&(Gt?Gt._next=this:re=this,Gt=this),this._call=t,this._time=n,Oe()},stop:function(){this._call&&(this._call=null,this._time=1/0,Oe())}};function $r(t,e,n){var r=new oe;return r.restart(t,e,n),r}function ns(){rn(),++kt;for(var t=re,e;t;)(e=yt-t._time)>=0&&t._call.call(void 0,e),t=t._next;--kt}function Gn(){yt=(ie=qt.now())+pe,kt=Rt=0;try{ns()}finally{kt=0,is(),yt=0}}function rs(){var t=qt.now(),e=t-ie;e>Cr&&(pe-=e,ie=t)}function is(){for(var t,e=re,n,r=1/0;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:re=n);Gt=t,Oe(r)}function Oe(t){if(!kt){Rt&&(Rt=clearTimeout(Rt));var e=t-yt;e>24?(t<1/0&&(Rt=setTimeout(Gn,t-qt.now()-pe)),$t&&($t=clearInterval($t))):($t||(ie=qt.now(),$t=setInterval(rs,Cr)),kt=1,Pr(Gn))}}function Ln(t,e,n){var r=new oe;return e=e==null?0:+e,r.restart(i=>{r.stop(),t(i+e)},e,n),r}var os=Xe("start","end","cancel","interrupt"),as=[],zr=0,In=1,Ve=2,Zt=3,Dn=4,Fe=5,Jt=6;function me(t,e,n,r,i,o){var a=t.__transition;if(!a)t.__transition={};else if(n in a)return;ss(t,n,{name:e,index:r,group:i,on:os,tween:as,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:zr})}function on(t,e){var n=Q(t,e);if(n.state>zr)throw new Error("too late; already scheduled");return n}function et(t,e){var n=Q(t,e);if(n.state>Zt)throw new Error("too late; already running");return n}function Q(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function ss(t,e,n){var r=t.__transition,i;r[e]=n,n.timer=$r(o,0,n.time);function o(c){n.state=In,n.timer.restart(a,n.delay,n.time),n.delay<=c&&a(c-n.delay)}function a(c){var f,l,h,p;if(n.state!==In)return u();for(f in r)if(p=r[f],p.name===n.name){if(p.state===Zt)return Ln(a);p.state===Dn?(p.state=Jt,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete r[f]):+f<e&&(p.state=Jt,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete r[f])}if(Ln(function(){n.state===Zt&&(n.state=Dn,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=Ve,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Ve){for(n.state=Zt,i=new Array(h=n.tween.length),f=0,l=-1;f<h;++f)(p=n.tween[f].value.call(t,t.__data__,n.index,n.group))&&(i[++l]=p);i.length=l+1}}function s(c){for(var f=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(u),n.state=Fe,1),l=-1,h=i.length;++l<h;)i[l].call(t,f);n.state===Fe&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){n.state=Jt,n.timer.stop(),delete r[e];for(var c in r)return;delete t.__transition}}function Qt(t,e){var n=t.__transition,r,i,o=!0,a;if(n){e=e==null?null:e+"";for(a in n){if((r=n[a]).name!==e){o=!1;continue}i=r.state>Ve&&r.state<Fe,r.state=Jt,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete n[a]}o&&delete t.__transition}}function us(t){return this.each(function(){Qt(this,t)})}function cs(t,e){var n,r;return function(){var i=et(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,s=r.length;a<s;++a)if(r[a].name===e){r=r.slice(),r.splice(a,1);break}}i.tween=r}}function ls(t,e,n){var r,i;if(typeof n!="function")throw new Error;return function(){var o=et(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}o.tween=i}}function fs(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r=Q(this.node(),n).tween,i=0,o=r.length,a;i<o;++i)if((a=r[i]).name===t)return a.value;return null}return this.each((e==null?cs:ls)(n,t,e))}function an(t,e,n){var r=t._id;return t.each(function(){var i=et(this,r);(i.value||(i.value={}))[e]=n.apply(this,arguments)}),function(i){return Q(i,r).value[e]}}function Rr(t,e){var n;return(typeof e=="number"?Z:e instanceof at?ne:(n=at(e))?(e=n,ne):Sr)(t,e)}function hs(t){return function(){this.removeAttribute(t)}}function ds(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ps(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function ms(t,e,n){var r,i=n+"",o;return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function gs(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttribute(t):(a=this.getAttribute(t),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function ys(t,e,n){var r,i,o;return function(){var a,s=n(this),u;return s==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),u=s+"",a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s)))}}function _s(t,e){var n=le(t),r=n==="transform"?Za:Rr;return this.attrTween(t,typeof e=="function"?(n.local?ys:gs)(n,r,an(this,"attr."+t,e)):e==null?(n.local?ds:hs)(n):(n.local?ms:ps)(n,r,e))}function xs(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function vs(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ws(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&vs(t,o)),n}return i._value=e,i}function bs(t,e){var n,r;function i(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&xs(t,o)),n}return i._value=e,i}function As(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var r=le(t);return this.tween(n,(r.local?ws:bs)(r,e))}function Ms(t,e){return function(){on(this,t).delay=+e.apply(this,arguments)}}function Ss(t,e){return e=+e,function(){on(this,t).delay=e}}function ks(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Ms:Ss)(e,t)):Q(this.node(),e).delay}function Es(t,e){return function(){et(this,t).duration=+e.apply(this,arguments)}}function Ns(t,e){return e=+e,function(){et(this,t).duration=e}}function Ts(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?Es:Ns)(e,t)):Q(this.node(),e).duration}function Cs(t,e){if(typeof e!="function")throw new Error;return function(){et(this,t).ease=e}}function Ps(t){var e=this._id;return arguments.length?this.each(Cs(e,t)):Q(this.node(),e).ease}function $s(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;et(this,t).ease=n}}function zs(t){if(typeof t!="function")throw new Error;return this.each($s(this._id,t))}function Rs(t){typeof t!="function"&&(t=hr(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o=e[i],a=o.length,s=r[i]=[],u,c=0;c<a;++c)(u=o[c])&&t.call(u,u.__data__,c,o)&&s.push(u);return new st(r,this._parents,this._name,this._id)}function Gs(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=e[s],c=n[s],f=u.length,l=a[s]=new Array(f),h,p=0;p<f;++p)(h=u[p]||c[p])&&(l[p]=h);for(;s<r;++s)a[s]=e[s];return new st(a,this._parents,this._name,this._id)}function Ls(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function Is(t,e,n){var r,i,o=Ls(e)?on:et;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}function Ds(t,e){var n=this._id;return arguments.length<2?Q(this.node(),n).on.on(t):this.each(Is(n,t,e))}function qs(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Os(){return this.on("end.remove",qs(this._id))}function Vs(t){var e=this._name,n=this._id;typeof t!="function"&&(t=Ze(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s=r[a],u=s.length,c=o[a]=new Array(u),f,l,h=0;h<u;++h)(f=s[h])&&(l=t.call(f,f.__data__,h,s))&&("__data__"in f&&(l.__data__=f.__data__),c[h]=l,me(c[h],e,n,h,c,Q(f,n)));return new st(o,this._parents,e,n)}function Fs(t){var e=this._name,n=this._id;typeof t!="function"&&(t=fr(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u=r[s],c=u.length,f,l=0;l<c;++l)if(f=u[l]){for(var h=t.call(f,f.__data__,l,u),p,y=Q(f,n),_=0,v=h.length;_<v;++_)(p=h[_])&&me(p,e,n,_,h,y);o.push(h),a.push(f)}return new st(o,a,e,n)}var Hs=Ot.prototype.constructor;function Ks(){return new Hs(this._groups,this._parents)}function Bs(t,e){var n,r,i;return function(){var o=At(this,t),a=(this.style.removeProperty(t),At(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}function Gr(t){return function(){this.style.removeProperty(t)}}function Us(t,e,n){var r,i=n+"",o;return function(){var a=At(this,t);return a===i?null:a===r?o:o=e(r=a,n)}}function Ws(t,e,n){var r,i,o;return function(){var a=At(this,t),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(t),At(this,t))),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}function Xs(t,e){var n,r,i,o="style."+e,a="end."+o,s;return function(){var u=et(this,t),c=u.on,f=u.value[o]==null?s||(s=Gr(e)):void 0;(c!==n||i!==f)&&(r=(n=c).copy()).on(a,i=f),u.on=r}}function Ys(t,e,n){var r=(t+="")=="transform"?Ya:Rr;return e==null?this.styleTween(t,Bs(t,r)).on("end.style."+t,Gr(t)):typeof e=="function"?this.styleTween(t,Ws(t,r,an(this,"style."+t,e))).each(Xs(this._id,t)):this.styleTween(t,Us(t,r,e),n).on("end.style."+t,null)}function Zs(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Js(t,e,n){var r,i;function o(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Zs(t,a,n)),r}return o._value=e,o}function Qs(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;return this.tween(r,Js(t,e,n??""))}function js(t){return function(){this.textContent=t}}function tu(t){return function(){var e=t(this);this.textContent=e??""}}function eu(t){return this.tween("text",typeof t=="function"?tu(an(this,"text",t)):js(t==null?"":t+""))}function nu(t){return function(e){this.textContent=t.call(this,e)}}function ru(t){var e,n;function r(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&nu(i)),e}return r._value=t,r}function iu(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,ru(t))}function ou(){for(var t=this._name,e=this._id,n=Lr(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)if(u=a[c]){var f=Q(u,e);me(u,t,n,c,a,{time:f.time+f.delay+f.duration,delay:0,duration:f.duration,ease:f.ease})}return new st(r,this._parents,t,n)}function au(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var s={value:a},u={value:function(){--i===0&&o()}};n.each(function(){var c=et(this,r),f=c.on;f!==t&&(e=(t=f).copy(),e._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),c.on=e}),i===0&&o()})}var su=0;function st(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Lr(){return++su}var it=Ot.prototype;st.prototype={constructor:st,select:Vs,selectAll:Fs,selectChild:it.selectChild,selectChildren:it.selectChildren,filter:Rs,merge:Gs,selection:Ks,transition:ou,call:it.call,nodes:it.nodes,node:it.node,size:it.size,empty:it.empty,each:it.each,on:Ds,attr:_s,attrTween:As,style:Ys,styleTween:Qs,text:eu,textTween:iu,remove:Os,tween:fs,delay:ks,duration:Ts,ease:Ps,easeVarying:zs,end:au,[Symbol.iterator]:it[Symbol.iterator]};function uu(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var cu={time:null,delay:0,duration:250,ease:uu};function lu(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function fu(t){var e,n;t instanceof st?(e=t._id,t=t._name):(e=Lr(),(n=cu).time=rn(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a=r[o],s=a.length,u,c=0;c<s;++c)(u=a[c])&&me(u,t,e,c,a,n||lu(u,e));return new st(r,this._parents,t,e)}Ot.prototype.interrupt=us;Ot.prototype.transition=fu;const He=Math.PI,Ke=2*He,ht=1e-6,hu=Ke-ht;function Ir(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}function du(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Ir;const n=10**e;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class pu{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?Ir:du(e)}moveTo(e,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,n){this._append`L${this._x1=+e},${this._y1=+n}`}quadraticCurveTo(e,n,r,i){this._append`Q${+e},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(e,n,r,i,o,a){this._append`C${+e},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(e,n,r,i,o){if(e=+e,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,u=r-e,c=i-n,f=a-e,l=s-n,h=f*f+l*l;if(this._x1===null)this._append`M${this._x1=e},${this._y1=n}`;else if(h>ht)if(!(Math.abs(l*u-c*f)>ht)||!o)this._append`L${this._x1=e},${this._y1=n}`;else{let p=r-a,y=i-s,_=u*u+c*c,v=p*p+y*y,g=Math.sqrt(_),A=Math.sqrt(h),b=o*Math.tan((He-Math.acos((_+h-v)/(2*g*A)))/2),T=b/A,E=b/g;Math.abs(T-1)>ht&&this._append`L${e+T*f},${n+T*l}`,this._append`A${o},${o},0,0,${+(l*p>f*y)},${this._x1=e+E*u},${this._y1=n+E*c}`}}arc(e,n,r,i,o,a){if(e=+e,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),u=r*Math.sin(i),c=e+s,f=n+u,l=1^a,h=a?i-o:o-i;this._x1===null?this._append`M${c},${f}`:(Math.abs(this._x1-c)>ht||Math.abs(this._y1-f)>ht)&&this._append`L${c},${f}`,r&&(h<0&&(h=h%Ke+Ke),h>hu?this._append`A${r},${r},0,1,${l},${e-s},${n-u}A${r},${r},0,1,${l},${this._x1=c},${this._y1=f}`:h>ht&&this._append`A${r},${r},0,${+(h>=He)},${l},${this._x1=e+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(e,n,r,i){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function mu(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function ae(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function Et(t){return t=ae(Math.abs(t)),t?t[1]:NaN}function gu(t,e){return function(n,r){for(var i=n.length,o=[],a=0,s=t[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),o.push(n.substring(i-=s,i+s)),!((u+=s+1)>r));)s=t[a=(a+1)%t.length];return o.reverse().join(e)}}function yu(t){return function(e){return e.replace(/[0-9]/g,function(n){return t[+n]})}}var _u=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function se(t){if(!(e=_u.exec(t)))throw new Error("invalid format: "+t);var e;return new sn({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}se.prototype=sn.prototype;function sn(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}sn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function xu(t){t:for(var e=t.length,n=1,r=-1,i;n<e;++n)switch(t[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+t[n])break t;r>0&&(r=0);break}return r>0?t.slice(0,r)+t.slice(i+1):t}var Dr;function vu(t,e){var n=ae(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Dr=Math.max(-8,Math.min(8,Math.floor(i/3)))*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")+ae(t,Math.max(0,e+o-1))[0]}function qn(t,e){var n=ae(t,e);if(!n)return t+"";var r=n[0],i=n[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")}const On={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:mu,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>qn(t*100,e),r:qn,s:vu,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Vn(t){return t}var Fn=Array.prototype.map,Hn=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function wu(t){var e=t.grouping===void 0||t.thousands===void 0?Vn:gu(Fn.call(t.grouping,Number),t.thousands+""),n=t.currency===void 0?"":t.currency[0]+"",r=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",o=t.numerals===void 0?Vn:yu(Fn.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",s=t.minus===void 0?"−":t.minus+"",u=t.nan===void 0?"NaN":t.nan+"";function c(l){l=se(l);var h=l.fill,p=l.align,y=l.sign,_=l.symbol,v=l.zero,g=l.width,A=l.comma,b=l.precision,T=l.trim,E=l.type;E==="n"?(A=!0,E="g"):On[E]||(b===void 0&&(b=12),T=!0,E="g"),(v||h==="0"&&p==="=")&&(v=!0,h="0",p="=");var C=_==="$"?n:_==="#"&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",P=_==="$"?r:/[%p]/.test(E)?a:"",R=On[E],F=/[defgprs%]/.test(E);b=b===void 0?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function O(S){var G=C,z=P,d,x,m;if(E==="c")z=R(S)+z,S="";else{S=+S;var w=S<0||1/S<0;if(S=isNaN(S)?u:R(Math.abs(S),b),T&&(S=xu(S)),w&&+S==0&&y!=="+"&&(w=!1),G=(w?y==="("?y:s:y==="-"||y==="("?"":y)+G,z=(E==="s"?Hn[8+Dr/3]:"")+z+(w&&y==="("?")":""),F){for(d=-1,x=S.length;++d<x;)if(m=S.charCodeAt(d),48>m||m>57){z=(m===46?i+S.slice(d+1):S.slice(d))+z,S=S.slice(0,d);break}}}A&&!v&&(S=e(S,1/0));var k=G.length+S.length+z.length,M=k<g?new Array(g-k+1).join(h):"";switch(A&&v&&(S=e(M+S,M.length?g-z.length:1/0),M=""),p){case"<":S=G+S+z+M;break;case"=":S=G+M+S+z;break;case"^":S=M.slice(0,k=M.length>>1)+G+S+z+M.slice(k);break;default:S=M+G+S+z;break}return o(S)}return O.toString=function(){return l+""},O}function f(l,h){var p=c((l=se(l),l.type="f",l)),y=Math.max(-8,Math.min(8,Math.floor(Et(h)/3)))*3,_=Math.pow(10,-y),v=Hn[8+y/3];return function(g){return p(_*g)+v}}return{format:c,formatPrefix:f}}var Bt,ue,qr;bu({thousands:",",grouping:[3],currency:["$",""]});function bu(t){return Bt=wu(t),ue=Bt.format,qr=Bt.formatPrefix,Bt}function Au(t){return Math.max(0,-Et(Math.abs(t)))}function Mu(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Et(e)/3)))*3-Et(Math.abs(t)))}function Su(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Et(e)-Et(t))+1}function ku(t){var e=0,n=t.children,r=n&&n.length;if(!r)e=1;else for(;--r>=0;)e+=n[r].value;t.value=e}function Eu(){return this.eachAfter(ku)}function Nu(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this}function Tu(t,e){for(var n=this,r=[n],i,o,a=-1;n=r.pop();)if(t.call(e,n,++a,this),i=n.children)for(o=i.length-1;o>=0;--o)r.push(i[o]);return this}function Cu(t,e){for(var n=this,r=[n],i=[],o,a,s,u=-1;n=r.pop();)if(i.push(n),o=n.children)for(a=0,s=o.length;a<s;++a)r.push(o[a]);for(;n=i.pop();)t.call(e,n,++u,this);return this}function Pu(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r}function $u(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})}function zu(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function Ru(t){for(var e=this,n=Gu(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}function Gu(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 Lu(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function Iu(){return Array.from(this)}function Du(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function qu(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e}function*Ou(){var t=this,e,n=[t],r,i,o;do for(e=n.reverse(),n=[];t=e.pop();)if(yield t,r=t.children)for(i=0,o=r.length;i<o;++i)n.push(r[i]);while(n.length)}function un(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=Hu)):e===void 0&&(e=Fu);for(var n=new ce(t),r,i=[n],o,a,s,u;r=i.pop();)if((a=e(r.data))&&(u=(a=Array.from(a)).length))for(r.children=a,s=u-1;s>=0;--s)i.push(o=a[s]=new ce(a[s])),o.parent=r,o.depth=r.depth+1;return n.eachBefore(Bu)}function Vu(){return un(this).eachBefore(Ku)}function Fu(t){return t.children}function Hu(t){return Array.isArray(t)?t[1]:null}function Ku(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Bu(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function ce(t){this.data=t,this.depth=this.height=0,this.parent=null}ce.prototype=un.prototype={constructor:ce,count:Eu,each:Nu,eachAfter:Cu,eachBefore:Tu,find:Pu,sum:$u,sort:zu,path:Ru,ancestors:Lu,descendants:Iu,leaves:Du,links:qu,copy:Vu,[Symbol.iterator]:Ou};function Uu(t){return t==null?null:Wu(t)}function Wu(t){if(typeof t!="function")throw new Error;return t}function Kn(){return 0}function Xu(t){return function(){return t}}const Yu=1664525,Zu=1013904223,Bn=4294967296;function Ju(){let t=1;return()=>(t=(Yu*t+Zu)%Bn)/Bn}function Qu(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function ju(t,e){let n=t.length,r,i;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}function tc(t,e){for(var n=0,r=(t=ju(Array.from(t),e)).length,i=[],o,a;n<r;)o=t[n],a&&Or(a,o)?++n:(a=nc(i=ec(i,o)),n=0);return a}function ec(t,e){var n,r;if(ke(e,t))return[e];for(n=0;n<t.length;++n)if(Ut(e,t[n])&&ke(Lt(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(Ut(Lt(t[n],t[r]),e)&&Ut(Lt(t[n],e),t[r])&&Ut(Lt(t[r],e),t[n])&&ke(Vr(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Ut(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 Or(t,e){var n=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function ke(t,e){for(var n=0;n<e.length;++n)if(!Or(t,e[n]))return!1;return!0}function nc(t){switch(t.length){case 1:return rc(t[0]);case 2:return Lt(t[0],t[1]);case 3:return Vr(t[0],t[1],t[2])}}function rc(t){return{x:t.x,y:t.y,r:t.r}}function Lt(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,c=a-r,f=s-i,l=Math.sqrt(u*u+c*c);return{x:(n+o+u/l*f)/2,y:(r+a+c/l*f)/2,r:(l+i+s)/2}}function Vr(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,c=n.x,f=n.y,l=n.r,h=r-a,p=r-c,y=i-s,_=i-f,v=u-o,g=l-o,A=r*r+i*i-o*o,b=A-a*a-s*s+u*u,T=A-c*c-f*f+l*l,E=p*y-h*_,C=(y*T-_*b)/(E*2)-r,P=(_*v-y*g)/E,R=(p*b-h*T)/(E*2)-i,F=(h*g-p*v)/E,O=P*P+F*F-1,S=2*(o+C*P+R*F),G=C*C+R*R-o*o,z=-(Math.abs(O)>1e-6?(S+Math.sqrt(S*S-4*O*G))/(2*O):G/S);return{x:r+C+P*z,y:i+R+F*z,r:z}}function Un(t,e,n){var r=t.x-e.x,i,o,a=t.y-e.y,s,u,c=r*r+a*a;c?(o=e.r+n.r,o*=o,u=t.r+n.r,u*=u,o>u?(i=(c+u-o)/(2*c),s=Math.sqrt(Math.max(0,u/c-i*i)),n.x=t.x-i*r-s*a,n.y=t.y-i*a+s*r):(i=(c+o-u)/(2*c),s=Math.sqrt(Math.max(0,o/c-i*i)),n.x=e.x+i*r-s*a,n.y=e.y+i*a+s*r)):(n.x=e.x+n.r,n.y=e.y)}function Wn(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 Xn(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 Wt(t){this._=t,this.next=null,this.previous=null}function ic(t,e){if(!(o=(t=Qu(t)).length))return 0;var n,r,i,o,a,s,u,c,f,l,h;if(n=t[0],n.x=0,n.y=0,!(o>1))return n.r;if(r=t[1],n.x=-r.r,r.x=n.r,r.y=0,!(o>2))return n.r+r.r;Un(r,n,i=t[2]),n=new Wt(n),r=new Wt(r),i=new Wt(i),n.next=i.previous=r,r.next=n.previous=i,i.next=r.previous=n;t:for(u=3;u<o;++u){Un(n._,r._,i=t[u]),i=new Wt(i),c=r.next,f=n.previous,l=r._.r,h=n._.r;do if(l<=h){if(Wn(c._,i._)){r=c,n.next=r,r.previous=n,--u;continue t}l+=c._.r,c=c.next}else{if(Wn(f._,i._)){n=f,n.next=r,r.previous=n,--u;continue t}h+=f._.r,f=f.previous}while(c!==f.next);for(i.previous=n,i.next=r,n.next=r.previous=r=i,a=Xn(n);(i=i.next)!==r;)(s=Xn(i))<a&&(n=i,a=s);r=n.next}for(n=[r._],i=r;(i=i.next)!==r;)n.push(i._);for(i=tc(n,e),u=0;u<o;++u)n=t[u],n.x-=i.x,n.y-=i.y;return i.r}function oc(t){return Math.sqrt(t.value)}function ac(){var t=null,e=1,n=1,r=Kn;function i(o){const a=Ju();return o.x=e/2,o.y=n/2,t?o.eachBefore(Yn(t)).eachAfter(Ee(r,.5,a)).eachBefore(Zn(1)):o.eachBefore(Yn(oc)).eachAfter(Ee(Kn,1,a)).eachAfter(Ee(r,o.r/Math.min(e,n),a)).eachBefore(Zn(Math.min(e,n)/(2*o.r))),o}return i.radius=function(o){return arguments.length?(t=Uu(o),i):t},i.size=function(o){return arguments.length?(e=+o[0],n=+o[1],i):[e,n]},i.padding=function(o){return arguments.length?(r=typeof o=="function"?o:Xu(+o),i):r},i}function Yn(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Ee(t,e,n){return function(r){if(i=r.children){var i,o,a=i.length,s=t(r)*e||0,u;if(s)for(o=0;o<a;++o)i[o].r+=s;if(u=ic(i,n),s)for(o=0;o<a;++o)i[o].r-=s;r.r=u+s}}}function Zn(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 cn(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function sc(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const Jn=Symbol("implicit");function ln(){var t=new Te,e=[],n=[],r=Jn;function i(o){let a=t.get(o);if(a===void 0){if(r!==Jn)return r;t.set(o,a=e.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return e.slice();e=[],t=new Te;for(const a of o)t.has(a)||t.set(a,e.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return ln(e,n).unknown(r)},cn.apply(i,arguments),i}function Fr(){var t=ln().unknown(void 0),e=t.domain,n=t.range,r=0,i=1,o,a,s=!1,u=0,c=0,f=.5;delete t.unknown;function l(){var h=e().length,p=i<r,y=p?i:r,_=p?r:i;o=(_-y)/Math.max(1,h-u+c*2),s&&(o=Math.floor(o)),y+=(_-y-o*(h-u))*f,a=o*(1-u),s&&(y=Math.round(y),a=Math.round(a));var v=$e(h).map(function(g){return y+o*g});return n(p?v.reverse():v)}return t.domain=function(h){return arguments.length?(e(h),l()):e()},t.range=function(h){return arguments.length?([r,i]=h,r=+r,i=+i,l()):[r,i]},t.rangeRound=function(h){return[r,i]=h,r=+r,i=+i,s=!0,l()},t.bandwidth=function(){return a},t.step=function(){return o},t.round=function(h){return arguments.length?(s=!!h,l()):s},t.padding=function(h){return arguments.length?(u=Math.min(1,c=+h),l()):u},t.paddingInner=function(h){return arguments.length?(u=Math.min(1,h),l()):u},t.paddingOuter=function(h){return arguments.length?(c=+h,l()):c},t.align=function(h){return arguments.length?(f=Math.max(0,Math.min(1,h)),l()):f},t.copy=function(){return Fr(e(),[r,i]).round(s).paddingInner(u).paddingOuter(c).align(f)},cn.apply(l(),arguments)}function uc(t){return function(){return t}}function cc(t){return+t}var Qn=[0,1];function ut(t){return t}function Be(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:uc(isNaN(e)?NaN:.5)}function lc(t,e){var n;return t>e&&(n=t,t=e,e=n),function(r){return Math.max(t,Math.min(e,r))}}function fc(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Be(i,r),o=n(a,o)):(r=Be(r,i),o=n(o,a)),function(s){return o(r(s))}}function hc(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),o=new Array(r),a=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<r;)i[a]=Be(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(s){var u=gi(t,s,1,r)-1;return o[u](i[u](s))}}function dc(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function pc(){var t=Qn,e=Qn,n=St,r,i,o,a=ut,s,u,c;function f(){var h=Math.min(t.length,e.length);return a!==ut&&(a=lc(t[0],t[h-1])),s=h>2?hc:fc,u=c=null,l}function l(h){return h==null||isNaN(h=+h)?o:(u||(u=s(t.map(r),e,n)))(r(a(h)))}return l.invert=function(h){return a(i((c||(c=s(e,t.map(r),Z)))(h)))},l.domain=function(h){return arguments.length?(t=Array.from(h,cc),f()):t.slice()},l.range=function(h){return arguments.length?(e=Array.from(h),f()):e.slice()},l.rangeRound=function(h){return e=Array.from(h),n=nn,f()},l.clamp=function(h){return arguments.length?(a=h?!0:ut,f()):a!==ut},l.interpolate=function(h){return arguments.length?(n=h,f()):n},l.unknown=function(h){return arguments.length?(o=h,l):o},function(h,p){return r=h,i=p,f()}}function mc(){return pc()(ut,ut)}function gc(t,e,n,r){var i=Ei(t,e,n),o;switch(r=se(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return r.precision==null&&!isNaN(o=Mu(i,a))&&(r.precision=o),qr(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=Su(i,Math.max(Math.abs(t),Math.abs(e))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=Au(i))&&(r.precision=o-(r.type==="%")*2);break}}return ue(r)}function Hr(t){var e=t.domain;return t.ticks=function(n){var r=e();return ki(r[0],r[r.length-1],n??10)},t.tickFormat=function(n,r){var i=e();return gc(i[0],i[i.length-1],n??10,r)},t.nice=function(n){n==null&&(n=10);var r=e(),i=0,o=r.length-1,a=r[i],s=r[o],u,c,f=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);f-- >0;){if(c=Ce(a,s,n),c===u)return r[i]=a,r[o]=s,e(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;u=c}return t},t}function ge(){var t=mc();return t.copy=function(){return dc(t,ge())},cn.apply(t,arguments),Hr(t)}function yc(){var t=0,e=1,n,r,i,o,a=ut,s=!1,u;function c(l){return l==null||isNaN(l=+l)?u:a(i===0?.5:(l=(o(l)-n)*i,s?Math.max(0,Math.min(1,l)):l))}c.domain=function(l){return arguments.length?([t,e]=l,n=o(t=+t),r=o(e=+e),i=n===r?0:1/(r-n),c):[t,e]},c.clamp=function(l){return arguments.length?(s=!!l,c):s},c.interpolator=function(l){return arguments.length?(a=l,c):a};function f(l){return function(h){var p,y;return arguments.length?([p,y]=h,a=l(p,y),c):[a(0),a(1)]}}return c.range=f(St),c.rangeRound=f(nn),c.unknown=function(l){return arguments.length?(u=l,c):u},function(l){return o=l,n=l(t),r=l(e),i=n===r?0:1/(r-n),c}}function _c(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Kr(){var t=Hr(yc()(ut));return t.copy=function(){return _c(t,Kr())},sc.apply(t,arguments)}function Br(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(r*6,++r*6);return n}const xc=Br("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),jn=Br("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab");Tr(ct(-100,.75,.35),ct(80,1.5,.8));var tr=Tr(ct(260,.75,.35),ct(80,1.5,.8));ct();function _t(t){return function(){return t}}function vc(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(n==null)e=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);e=r}return t},()=>new pu(e)}function wc(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function Ur(t){this._context=t}Ur.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&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);break}}};function Wr(t){return new Ur(t)}function bc(t){return t[0]}function Ac(t){return t[1]}function Mc(t,e){var n=_t(!0),r=null,i=Wr,o=null,a=vc(s);t=typeof t=="function"?t:t===void 0?bc:_t(t),e=typeof e=="function"?e:e===void 0?Ac:_t(e);function s(u){var c,f=(u=wc(u)).length,l,h=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=f;++c)!(c<f&&n(l=u[c],c,u))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(l,c,u),+e(l,c,u));if(p)return o=null,p+""||null}return s.x=function(u){return arguments.length?(t=typeof u=="function"?u:_t(+u),s):t},s.y=function(u){return arguments.length?(e=typeof u=="function"?u:_t(+u),s):e},s.defined=function(u){return arguments.length?(n=typeof u=="function"?u:_t(!!u),s):n},s.curve=function(u){return arguments.length?(i=u,r!=null&&(o=i(r)),s):i},s.context=function(u){return arguments.length?(u==null?r=o=null:o=i(r=u),s):r},s}var Sc=Yr(Wr);function Xr(t){this._curve=t}Xr.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};function Yr(t){function e(n){return new Xr(t(n))}return e._curve=t,e}function kc(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(n){return arguments.length?e(Yr(n)):e()._curve},t}function er(){return kc(Mc().curve(Sc))}function nr(){}function Ue(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Zr(t,e){this._context=t,this._k=(1-e)/6}Zr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ue(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&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,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ue(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};(function t(e){function n(r){return new Zr(r,e)}return n.tension=function(r){return t(+r)},n})(0);function Jr(t,e){this._context=t,this._k=(1-e)/6}Jr.prototype={areaStart:nr,areaEnd:nr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ue(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ec=function t(e){function n(r){return new Jr(r,e)}return n.tension=function(r){return t(+r)},n}(0),Xt=t=>()=>t;function Nc(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function ot(t,e,n){this.k=t,this.x=e,this.y=n}ot.prototype={constructor:ot,scale:function(t){return t===1?this:new ot(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new ot(this.k,this.x+this.k*t,this.y+this.k*e)},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 ye=new ot(1,0,0);Qr.prototype=ot.prototype;function Qr(t){for(;!t.__zoom;)if(!(t=t.parentNode))return ye;return t.__zoom}function Ne(t){t.stopImmediatePropagation()}function zt(t){t.preventDefault(),t.stopImmediatePropagation()}function Tc(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function Cc(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function rr(){return this.__zoom||ye}function Pc(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $c(){return navigator.maxTouchPoints||"ontouchstart"in this}function zc(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[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 Rc(){var t=Tc,e=Cc,n=zc,r=Pc,i=$c,o=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,u=ts,c=Xe("start","zoom","end"),f,l,h,p=500,y=150,_=0,v=10;function g(d){d.property("__zoom",rr).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",O).filter(i).on("touchstart.zoom",S).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}g.transform=function(d,x,m,w){var k=d.selection?d.selection():d;k.property("__zoom",rr),d!==k?E(d,x,m,w):k.interrupt().each(function(){C(this,arguments).event(w).start().zoom(null,typeof x=="function"?x.apply(this,arguments):x).end()})},g.scaleBy=function(d,x,m,w){g.scaleTo(d,function(){var k=this.__zoom.k,M=typeof x=="function"?x.apply(this,arguments):x;return k*M},m,w)},g.scaleTo=function(d,x,m,w){g.transform(d,function(){var k=e.apply(this,arguments),M=this.__zoom,N=m==null?T(k):typeof m=="function"?m.apply(this,arguments):m,$=M.invert(N),L=typeof x=="function"?x.apply(this,arguments):x;return n(b(A(M,L),N,$),k,a)},m,w)},g.translateBy=function(d,x,m,w){g.transform(d,function(){return n(this.__zoom.translate(typeof x=="function"?x.apply(this,arguments):x,typeof m=="function"?m.apply(this,arguments):m),e.apply(this,arguments),a)},null,w)},g.translateTo=function(d,x,m,w,k){g.transform(d,function(){var M=e.apply(this,arguments),N=this.__zoom,$=w==null?T(M):typeof w=="function"?w.apply(this,arguments):w;return n(ye.translate($[0],$[1]).scale(N.k).translate(typeof x=="function"?-x.apply(this,arguments):-x,typeof m=="function"?-m.apply(this,arguments):-m),M,a)},w,k)};function A(d,x){return x=Math.max(o[0],Math.min(o[1],x)),x===d.k?d:new ot(x,d.x,d.y)}function b(d,x,m){var w=x[0]-m[0]*d.k,k=x[1]-m[1]*d.k;return w===d.x&&k===d.y?d:new ot(d.k,w,k)}function T(d){return[(+d[0][0]+ +d[1][0])/2,(+d[0][1]+ +d[1][1])/2]}function E(d,x,m,w){d.on("start.zoom",function(){C(this,arguments).event(w).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(w).end()}).tween("zoom",function(){var k=this,M=arguments,N=C(k,M).event(w),$=e.apply(k,M),L=m==null?T($):typeof m=="function"?m.apply(k,M):m,j=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),V=k.__zoom,W=typeof x=="function"?x.apply(k,M):x,nt=u(V.invert(L).concat(j/V.k),W.invert(L).concat(j/W.k));return function(X){if(X===1)X=W;else{var rt=nt(X),_e=j/rt[2];X=new ot(_e,L[0]-rt[0]*_e,L[1]-rt[1]*_e)}N.zoom(null,X)}})}function C(d,x,m){return!m&&d.__zooming||new P(d,x)}function P(d,x){this.that=d,this.args=x,this.active=0,this.sourceEvent=null,this.extent=e.apply(d,x),this.taps=0}P.prototype={event:function(d){return d&&(this.sourceEvent=d),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(d,x){return this.mouse&&d!=="mouse"&&(this.mouse[1]=x.invert(this.mouse[0])),this.touch0&&d!=="touch"&&(this.touch0[1]=x.invert(this.touch0[0])),this.touch1&&d!=="touch"&&(this.touch1[1]=x.invert(this.touch1[0])),this.that.__zoom=x,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(d){var x=q(this.that).datum();c.call(d,this.that,new Nc(d,{sourceEvent:this.sourceEvent,target:g,type:d,transform:this.that.__zoom,dispatch:c}),x)}};function R(d,...x){if(!t.apply(this,arguments))return;var m=C(this,x).event(d),w=this.__zoom,k=Math.max(o[0],Math.min(o[1],w.k*Math.pow(2,r.apply(this,arguments)))),M=lt(d);if(m.wheel)(m.mouse[0][0]!==M[0]||m.mouse[0][1]!==M[1])&&(m.mouse[1]=w.invert(m.mouse[0]=M)),clearTimeout(m.wheel);else{if(w.k===k)return;m.mouse=[M,w.invert(M)],Qt(this),m.start()}zt(d),m.wheel=setTimeout(N,y),m.zoom("mouse",n(b(A(w,k),m.mouse[0],m.mouse[1]),m.extent,a));function N(){m.wheel=null,m.end()}}function F(d,...x){if(h||!t.apply(this,arguments))return;var m=d.currentTarget,w=C(this,x,!0).event(d),k=q(d.view).on("mousemove.zoom",L,!0).on("mouseup.zoom",j,!0),M=lt(d,m),N=d.clientX,$=d.clientY;wa(d.view),Ne(d),w.mouse=[M,this.__zoom.invert(M)],Qt(this),w.start();function L(V){if(zt(V),!w.moved){var W=V.clientX-N,nt=V.clientY-$;w.moved=W*W+nt*nt>_}w.event(V).zoom("mouse",n(b(w.that.__zoom,w.mouse[0]=lt(V,m),w.mouse[1]),w.extent,a))}function j(V){k.on("mousemove.zoom mouseup.zoom",null),ba(V.view,w.moved),zt(V),w.event(V).end()}}function O(d,...x){if(t.apply(this,arguments)){var m=this.__zoom,w=lt(d.changedTouches?d.changedTouches[0]:d,this),k=m.invert(w),M=m.k*(d.shiftKey?.5:2),N=n(b(A(m,M),w,k),e.apply(this,x),a);zt(d),s>0?q(this).transition().duration(s).call(E,N,w,d):q(this).call(g.transform,N,w,d)}}function S(d,...x){if(t.apply(this,arguments)){var m=d.touches,w=m.length,k=C(this,x,d.changedTouches.length===w).event(d),M,N,$,L;for(Ne(d),N=0;N<w;++N)$=m[N],L=lt($,this),L=[L,this.__zoom.invert(L),$.identifier],k.touch0?!k.touch1&&k.touch0[2]!==L[2]&&(k.touch1=L,k.taps=0):(k.touch0=L,M=!0,k.taps=1+!!f);f&&(f=clearTimeout(f)),M&&(k.taps<2&&(l=L[0],f=setTimeout(function(){f=null},p)),Qt(this),k.start())}}function G(d,...x){if(this.__zooming){var m=C(this,x).event(d),w=d.changedTouches,k=w.length,M,N,$,L;for(zt(d),M=0;M<k;++M)N=w[M],$=lt(N,this),m.touch0&&m.touch0[2]===N.identifier?m.touch0[0]=$:m.touch1&&m.touch1[2]===N.identifier&&(m.touch1[0]=$);if(N=m.that.__zoom,m.touch1){var j=m.touch0[0],V=m.touch0[1],W=m.touch1[0],nt=m.touch1[1],X=(X=W[0]-j[0])*X+(X=W[1]-j[1])*X,rt=(rt=nt[0]-V[0])*rt+(rt=nt[1]-V[1])*rt;N=A(N,Math.sqrt(X/rt)),$=[(j[0]+W[0])/2,(j[1]+W[1])/2],L=[(V[0]+nt[0])/2,(V[1]+nt[1])/2]}else if(m.touch0)$=m.touch0[0],L=m.touch0[1];else return;m.zoom("touch",n(b(N,$,L),m.extent,a))}}function z(d,...x){if(this.__zooming){var m=C(this,x).event(d),w=d.changedTouches,k=w.length,M,N;for(Ne(d),h&&clearTimeout(h),h=setTimeout(function(){h=null},p),M=0;M<k;++M)N=w[M],m.touch0&&m.touch0[2]===N.identifier?delete m.touch0:m.touch1&&m.touch1[2]===N.identifier&&delete m.touch1;if(m.touch1&&!m.touch0&&(m.touch0=m.touch1,delete m.touch1),m.touch0)m.touch0[1]=this.__zoom.invert(m.touch0[0]);else if(m.end(),m.taps===2&&(N=lt(N,this),Math.hypot(l[0]-N[0],l[1]-N[1])<v)){var $=q(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return g.wheelDelta=function(d){return arguments.length?(r=typeof d=="function"?d:Xt(+d),g):r},g.filter=function(d){return arguments.length?(t=typeof d=="function"?d:Xt(!!d),g):t},g.touchable=function(d){return arguments.length?(i=typeof d=="function"?d:Xt(!!d),g):i},g.extent=function(d){return arguments.length?(e=typeof d=="function"?d:Xt([[+d[0][0],+d[0][1]],[+d[1][0],+d[1][1]]]),g):e},g.scaleExtent=function(d){return arguments.length?(o[0]=+d[0],o[1]=+d[1],g):[o[0],o[1]]},g.translateExtent=function(d){return arguments.length?(a[0][0]=+d[0][0],a[1][0]=+d[1][0],a[0][1]=+d[0][1],a[1][1]=+d[1][1],g):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},g.constrain=function(d){return arguments.length?(n=d,g):n},g.duration=function(d){return arguments.length?(s=+d,g):s},g.interpolate=function(d){return arguments.length?(u=d,g):u},g.on=function(){var d=c.on.apply(c,arguments);return d===c?g:d},g.clickDistance=function(d){return arguments.length?(_=(d=+d)*d,g):Math.sqrt(_)},g.tapDistance=function(d){return arguments.length?(v=+d,g):v},g}class jr{constructor(e,n){I(this,"config");I(this,"data");this.data=e,this.config={...n,parentElement:typeof n.parentElement=="string"?document.querySelector(n.parentElement):n.parentElement,containerWidth:n.containerWidth||500,containerHeight:n.containerHeight||140,margin:n.margin||{top:10,bottom:30,right:10,left:30},tooltipPadding:n.tooltipPadding||15}}height(){return this.config.containerHeight-this.config.margin.top-this.config.margin.bottom}width(){return this.config.containerWidth-this.config.margin.left-this.config.margin.right}}class Gc extends jr{constructor(e,n){super(e,n)}}function Lc(t,e=300){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{t.apply(this,r)},e)}}function Ic(t,{title:e,tickSize:n=6,width:r=320,height:i=44+n,marginTop:o=18,marginRight:a=0,marginBottom:s=16+n,marginLeft:u=0,ticks:c=r/64,tickFormat:f,tickValues:l}={}){function h(v,g=256){const A=document.createElement("canvas");A.width=g,A.height=1;const b=A.getContext("2d");for(let T=0;T<g;++T)b.fillStyle=v(T/(g-1)),b.fillRect(T,0,1,1);return A}const p=_a("svg").attr("width",r).attr("height",i).attr("viewBox",[0,0,r,i]).style("overflow","visible").style("display","block");let y=v=>v.selectAll(".tick line").attr("y1",o+s-i),_;if(t.interpolate){const v=Math.min(t.domain().length,t.range().length);_=t.copy().rangeRound(Rn(St(u,r-a),v)),p.append("image").attr("x",u).attr("y",o).attr("width",r-u-a).attr("height",i-o-s).attr("preserveAspectRatio","none").attr("xlink:href",h(t.copy().domain(Rn(St(0,1),v))).toDataURL())}else if(t.interpolator){if(_=Object.assign(t.copy().interpolator(nn(u,r-a)),{range(){return[u,r-a]}}),p.append("image").attr("x",u).attr("y",o).attr("width",r-u-a).attr("height",i-o-s).attr("preserveAspectRatio","none").attr("xlink:href",h(t.interpolator()).toDataURL()),!_.ticks){if(l===void 0){const v=Math.round(c+1);l=$e(v).map(g=>Ni(t.domain(),g/(v-1)))}typeof f!="function"&&(f=ue(f===void 0?",f":f))}}else if(t.invertExtent){const v=t.thresholds?t.thresholds():t.quantiles?t.quantiles():t.domain(),g=f===void 0?A=>A:typeof f=="string"?ue(f):f;_=ge().domain([-1,t.range().length-1]).rangeRound([u,r-a]),p.append("g").selectAll("rect").data(t.range()).join("rect").attr("x",(A,b)=>_(b-1)).attr("y",o).attr("width",(A,b)=>_(b)-_(b-1)).attr("height",i-o-s).attr("fill",A=>A),l=$e(v.length),f=A=>g(v[A],A)}else _=Fr().domain(t.domain()).rangeRound([u,r-a]),p.append("g").selectAll("rect").data(t.domain()).join("rect").attr("x",_).attr("y",o).attr("width",Math.max(0,_.bandwidth()-1)).attr("height",i-o-s).attr("fill",t),y=()=>{};return p.append("g").attr("transform",`translate(0,${i-s})`).call(Li(_).ticks(c,typeof f=="string"?f:void 0).tickFormat(typeof f=="function"?f:void 0).tickSize(n).tickValues(l)).call(y).call(v=>v.select(".domain").remove()).call(v=>v.append("text").attr("x",u).attr("y",o+s-i-6).attr("fill","currentColor").attr("text-anchor","start").attr("font-weight","bold").attr("class","title").text(e)),p.node()}class Dc extends Gc{constructor(n,r){super(n,r);I(this,"chartId","bubbleChart");I(this,"chart");I(this,"zoom");I(this,"config");I(this,"packRoot",null);I(this,"highlightedNode",null);I(this,"colorScale",null);I(this,"sizeScale",null);I(this,"groupLabels",null);I(this,"groupsWithLabels",[]);I(this,"defaultSizeAccessor",n=>5);I(this,"updateGroupsWithLabels",Lc(()=>{if(!this.packRoot){this.groupsWithLabels=[];return}const n=this.packRoot.descendants().filter(r=>r.children&&r.value&&r.value>=50/this.zoomLevel&&r.value<300/(this.zoomLevel*2.5)&&r.children.length>5);this.groupsWithLabels=n.length>1?n:[],this.renderGroupLabels()},300));this.config=this.createConfig(r),this.initVis()}setConfig(n){this.config=this.createConfig(n)}createConfig(n){return{...n,parentElement:typeof n.parentElement=="string"?document.querySelector(n.parentElement):n.parentElement,containerWidth:n.containerWidth||500,containerHeight:n.containerHeight||140,margin:n.margin||{top:10,bottom:30,right:10,left:30},tooltipPadding:n.tooltipPadding||30,groupAccessor:n.groupAccessor||(()=>null),sizeAccessor:n.sizeAccessor||this.defaultSizeAccessor,colorAccessor:n.colorAccessor||(()=>null),idAccessor:n.idAccessor||(()=>null),zoomExtent:n.zoomExtent||[.5,20],renderTooltip:n.renderTooltip||(()=>null),onClick:n.onClick||(()=>null)}}initVis(){let n=this;n.config.parentElement.innerHTML+=` <svg id="${this.chartId}"></svg> `,n.config.parentElement.innerHTML+=` <div id="tooltip" class="tooltip"></div> @@ -12,7 +12,7 @@ var ri=Object.defineProperty;var ii=(t,e,n)=>e in t?ri(t,e,{enumerable:!0,config <svg id="${this.chartId}"></svg> `,n.config.parentElement.innerHTML+=` <div id="tooltip-radar-chart" class="tooltip"></div> - `;const r=q(`#${this.chartId}`).attr("width",n.config.containerWidth).attr("height",n.config.containerHeight).attr("transform",`translate(${n.config.margin.left},${n.config.margin.top})`);n.chart=r.append("g"),n.updateAxes()}updateAxes(){this.axes=[];for(const n of this.config.attributes){const r=[0,Ce(this.data,o=>o[n.key])],i=ge(r,[0,this.axisLength]);this.axes.push({scale:i,domain:r,label:n.label,key:n.key})}}updateVis(n){this.config.selectedData=n,this.drawData()}updateSelectedAttribute(n){this.config.attributes=n,this.updateAxes();const r=this.config.selectedData;this.config.selectedData=[],this.renderVis(),this.config.selectedData=r,this.drawData()}getPreparedData(){return this.config.selectedData.map(n=>({data:n,axesValues:this.axes.map(r=>({label:r.label,r:r.scale(n[r.key]),value:n[r.key]}))}))}get chartCenter(){return Math.min(this.config.containerWidth,this.config.containerHeight)/2}get axisLength(){return this.config.containerWidth<this.config.containerHeight?this.width()/2:this.height()/2}renderVis(){let n=this;n.drawAxes(),n.drawData()}drawAxes(){let n=this.chart.selectAll(".axisWrapper");n.empty()&&(n=this.chart.append("g").attr("class","axisWrapper").attr("transform",`translate(${this.chartCenter},${this.chartCenter})`)),n.selectAll("*").remove();const r=n.selectAll(".axis").data(this.axes).enter().append("g").attr("class","axis");r.append("path").attr("pointer-events","none").attr("d",(i,o)=>er()([[0,0],[Math.PI*2*o/this.axes.length,this.axisLength]])),r.append("text").attr("x",(i,o)=>Math.sin(2*Math.PI*(o/this.axes.length))*(this.axisLength+10)).attr("y",(i,o)=>-Math.cos(2*Math.PI*(o/this.axes.length))*(this.axisLength+10)).attr("text-anchor","middle").attr("alignment-baseline","middle").attr("font-size",12).attr("fill","black").text(i=>i.label)}drawData(){let n=this.chart.selectAll(".dataWrapper");n.empty()&&(n=this.chart.append("g").attr("class","dataWrapper").attr("transform",`translate(${this.chartCenter},${this.chartCenter})`));const r=this.getPreparedData();n.selectAll(".data").data(r,i=>this.config.idAccessor(i.data)).join(i=>{const o=i.append("g").attr("class","data");o.append("path").attr("d",a=>{const s=a.axesValues.map(u=>u.r);return er().angle((u,c)=>Math.PI*2/this.axes.length*c).radius(u=>u||0).curve(Ec.tension(.6))([...s,s[0]])}).attr("fill",a=>{const s=ut(a.data._color);return s?s.copy({opacity:.2}).toString():"rgba(50,50,50,0.1)"}).attr("stroke",a=>a.data._color).attr("stroke-width",3),o.selectAll(".dataPoint").data(a=>a.axesValues.map(s=>({...s,data:a.data}))).join(a=>a.append("circle"),a=>a,a=>a.remove()).attr("class","dataPoint").attr("r",5).attr("cx",(a,s)=>Math.sin(2*Math.PI*(s/this.axes.length))*a.r).attr("cy",(a,s)=>-Math.cos(2*Math.PI*(s/this.axes.length))*a.r).attr("fill",a=>a.data._color).on("mouseover",(a,s)=>{const u=q("#tooltip-radar-chart").style("display","block");this.config.renderTooltip&&this.config.renderTooltip(s,u)}).on("mousemove",a=>{q("#tooltip-radar-chart").style("left",a.layerX+this.config.tooltipPadding+"px").style("top",a.layerY+this.config.tooltipPadding+"px")}).on("mouseleave",a=>{q("#tooltip-radar-chart").style("display","none")})},i=>i,i=>i.remove())}}const Hc=document.querySelector("#radar-chart-wrapper"),Kc=document.querySelector("#bubble-chart-wrapper"),fn=[1,5];let D=null,ft=null,We=[];const Et=document.querySelector("#zoom-slider");Et.min=Et.value=fn[0].toString();Et.max=fn[1].toString();Et.step="0.1";Et.oninput=t=>{if(D){const e=parseFloat(t.target.value);D.zoomTo(e)}};const Bc=document.querySelector("#group-by-setting");Bc.oninput=t=>{D&&D.updateVisConfig({groupAccessor:e=>e[t.target.value]})};const ti=document.querySelector("#color-by-setting");for(const t of Object.keys(U)){const e=document.createElement("option");e.value=t,e.text=U[t],ti.appendChild(e)}ti.oninput=t=>{D&&D.updateVisConfig({colorAccessor:e=>e[t.target.value]})};const ei=document.querySelector("#size-by-setting");for(const t of Object.keys(U)){const e=document.createElement("option");e.value=t,e.text=U[t],ei.appendChild(e)}ei.oninput=t=>{D&&D.updateVisConfig({sizeAccessor:e=>e[t.target.value]??0})};const j=[],Uc=document.querySelector(".radar-chart-settings"),zt=[{key:"Performance _ G+A",label:U["Performance _ G+A"]},{key:"Expected_0 _ npxG+xAG",label:U["Expected_0 _ npxG+xAG"]},{key:"PrgP",label:U.PrgP},{key:"Total _ Cmp%",label:U["Total _ Cmp%"]},{key:"Tkl+Int",label:U["Tkl+Int"]},{key:"Touches _ Touches",label:U["Touches _ Touches"]}];fi(";","data/output.csv").then(t=>{We=t.map(n=>{var r;for(const i of Object.keys(U))n[i]=parseFloat(n[i]);return ir.findIndex(i=>i.code===n.nation)===-1&&console.warn("Unknown country code:",n.nation),{...n,pos:Vc(n.pos),nation:((r=ir.find(i=>i.code===n.nation))==null?void 0:r.name)??n.nation}}),D=new Dc(We,{parentElement:Kc,containerWidth:1e3,containerHeight:1e3,margin:{top:20,right:20,bottom:20,left:20},zoomExtent:fn,idAccessor:n=>n.player,onZoom:n=>{Et.value=n.transform.k.toString()},renderTooltip:(n,r)=>{const i=n.age.split("-");r.html(` + `;const r=q(`#${this.chartId}`).attr("width",n.config.containerWidth).attr("height",n.config.containerHeight).attr("transform",`translate(${n.config.margin.left},${n.config.margin.top})`);n.chart=r.append("g"),n.updateAxes()}updateAxes(){this.axes=[];for(const n of this.config.attributes){const r=[0,Pe(this.data,o=>o[n.key])],i=ge(r,[0,this.axisLength]);this.axes.push({scale:i,domain:r,label:n.label,key:n.key})}}updateVis(n){this.config.selectedData=n,this.drawData()}updateSelectedAttribute(n){this.config.attributes=n,this.updateAxes();const r=this.config.selectedData;this.config.selectedData=[],this.renderVis(),this.config.selectedData=r,this.drawData()}getPreparedData(){return this.config.selectedData.map(n=>({data:n,axesValues:this.axes.map(r=>({label:r.label,r:r.scale(n[r.key]),value:n[r.key]}))}))}get chartCenter(){return Math.min(this.config.containerWidth,this.config.containerHeight)/2}get axisLength(){return this.config.containerWidth<this.config.containerHeight?this.width()/2:this.height()/2}renderVis(){let n=this;n.drawAxes(),n.drawData()}drawAxes(){let n=this.chart.selectAll(".axisWrapper");n.empty()&&(n=this.chart.append("g").attr("class","axisWrapper").attr("transform",`translate(${this.chartCenter},${this.chartCenter})`)),n.selectAll("*").remove();const r=n.selectAll(".axis").data(this.axes).enter().append("g").attr("class","axis");r.append("path").attr("pointer-events","none").attr("d",(i,o)=>er()([[0,0],[Math.PI*2*o/this.axes.length,this.axisLength]])),r.append("text").attr("x",(i,o)=>Math.sin(2*Math.PI*(o/this.axes.length))*(this.axisLength+10)).attr("y",(i,o)=>-Math.cos(2*Math.PI*(o/this.axes.length))*(this.axisLength+10)).attr("text-anchor","middle").attr("alignment-baseline","middle").attr("font-size",12).attr("fill","black").text(i=>i.label)}drawData(){let n=this.chart.selectAll(".dataWrapper");n.empty()&&(n=this.chart.append("g").attr("class","dataWrapper").attr("transform",`translate(${this.chartCenter},${this.chartCenter})`));const r=this.getPreparedData();n.selectAll(".data").data(r,i=>this.config.idAccessor(i.data)).join(i=>{const o=i.append("g").attr("class","data");o.append("path").attr("d",a=>{const s=a.axesValues.map(u=>u.r);return er().angle((u,c)=>Math.PI*2/this.axes.length*c).radius(u=>u||0).curve(Ec.tension(.6))([...s,s[0]])}).attr("fill",a=>{const s=at(a.data._color);return s?s.copy({opacity:.2}).toString():"rgba(50,50,50,0.1)"}).attr("stroke",a=>a.data._color).attr("stroke-width",3),o.selectAll(".dataPoint").data(a=>a.axesValues.map(s=>({...s,data:a.data}))).join(a=>a.append("circle"),a=>a,a=>a.remove()).attr("class","dataPoint").attr("r",5).attr("cx",(a,s)=>Math.sin(2*Math.PI*(s/this.axes.length))*a.r).attr("cy",(a,s)=>-Math.cos(2*Math.PI*(s/this.axes.length))*a.r).attr("fill",a=>a.data._color).on("mouseover",(a,s)=>{const u=q("#tooltip-radar-chart").style("display","block");this.config.renderTooltip&&this.config.renderTooltip(s,u)}).on("mousemove",a=>{q("#tooltip-radar-chart").style("left",a.layerX+this.config.tooltipPadding+"px").style("top",a.layerY+this.config.tooltipPadding+"px")}).on("mouseleave",a=>{q("#tooltip-radar-chart").style("display","none")})},i=>i,i=>i.remove())}}const Hc=document.querySelector("#radar-chart-wrapper"),Kc=document.querySelector("#bubble-chart-wrapper"),fn=[1,5];let D=null,ft=null,We=[];const Nt=document.querySelector("#zoom-slider");Nt.min=Nt.value=fn[0].toString();Nt.max=fn[1].toString();Nt.step="0.1";Nt.oninput=t=>{if(D){const e=parseFloat(t.target.value);D.zoomTo(e)}};const Bc=document.querySelector("#group-by-setting");Bc.oninput=t=>{D&&D.updateVisConfig({groupAccessor:e=>e[t.target.value]})};const ti=document.querySelector("#color-by-setting");for(const t of Object.keys(U)){const e=document.createElement("option");e.value=t,e.text=U[t],ti.appendChild(e)}ti.oninput=t=>{D&&D.updateVisConfig({colorAccessor:e=>e[t.target.value]})};const ei=document.querySelector("#size-by-setting");for(const t of Object.keys(U)){const e=document.createElement("option");e.value=t,e.text=U[t],ei.appendChild(e)}ei.oninput=t=>{D&&D.updateVisConfig({sizeAccessor:e=>e[t.target.value]??0})};const Y=[],Uc=document.querySelector(".radar-chart-settings"),xt=[{key:"Performance _ G+A",label:U["Performance _ G+A"]},{key:"Expected_0 _ npxG+xAG",label:U["Expected_0 _ npxG+xAG"]},{key:"PrgP",label:U.PrgP},{key:"Total _ Cmp%",label:U["Total _ Cmp%"]},{key:"Tkl+Int",label:U["Tkl+Int"]},{key:"Touches _ Touches",label:U["Touches _ Touches"]}];fi(";","data/output.csv").then(t=>{We=t.map(n=>{var r;for(const i of Object.keys(U))n[i]=parseFloat(n[i]);return ir.findIndex(i=>i.code===n.nation)===-1&&console.warn("Unknown country code:",n.nation),{...n,pos:Vc(n.pos),nation:((r=ir.find(i=>i.code===n.nation))==null?void 0:r.name)??n.nation}}),D=new Dc(We,{parentElement:Kc,containerWidth:1e3,containerHeight:1e3,margin:{top:20,right:20,bottom:20,left:20},zoomExtent:fn,idAccessor:n=>n.player,onZoom:n=>{Nt.value=n.transform.k.toString()},renderTooltip:(n,r)=>{const i=n.age.split("-");r.html(` <table> <tr><th>Name</th><td>${n.player}</td></tr> <tr><th>Liga</th><td>${n.league}</td></tr> @@ -21,9 +21,14 @@ var ri=Object.defineProperty;var ii=(t,e,n)=>e in t?ri(t,e,{enumerable:!0,config <tr><th>Team</th><td>${n.team}</td></tr> <tr><th>Alter</th><td>${i[0]}${i[1]?" - "+i[1]+" Tage":""}</td></tr> </table> - `)},onClick:n=>{Yc(n)}}),D.renderVis(),new qc(D).initOptions(t)});const Wc=document.querySelector("#zoom-in");Wc.onclick=()=>ni("+");const Xc=document.querySelector("#zoom-out");Xc.onclick=()=>ni("-");function ni(t){D&&(t==="+"?D.zoomIn():D.zoomOut())}function Yc(t){if(j.length>6&&alert("Maximal 6 Spieler können ausgewählt werden"),j.some(e=>e.player===t.player))j.splice(j.findIndex(e=>e.player===t.player),1);else{const e=jn.find(n=>j.findIndex(r=>r._color===n)===-1);j.push({...t,_color:e??jn[j.length]})}if(D==null||D.updateSelectedNodes(j),ft)ft.updateVis(j);else{ft=new Fc(We,{parentElement:Hc,selectedData:j,containerWidth:750,containerHeight:750,margin:{top:20,right:20,bottom:20,left:20},axisCircles:2,idAccessor:e=>e.player,renderTooltip:(e,n)=>{D==null||D.zoomToPoint(e.data.player),n.html(` + `)},onClick:n=>{Yc(n)}}),D.renderVis(),new qc(D).initOptions(t)});const Wc=document.querySelector("#zoom-in");Wc.onclick=()=>ni("+");const Xc=document.querySelector("#zoom-out");Xc.onclick=()=>ni("-");function ni(t){D&&(t==="+"?D.zoomIn():D.zoomOut())}function Yc(t){if(Y.length>6&&alert("Maximal 6 Spieler können ausgewählt werden"),Y.some(e=>e.player===t.player))Y.splice(Y.findIndex(e=>e.player===t.player),1);else{const e=jn.find(n=>Y.findIndex(r=>r._color===n)===-1);Y.push({...t,_color:e??jn[Y.length]})}if(D==null||D.updateSelectedNodes(Y),ft)ft.updateVis(Y);else{ft=new Fc(We,{parentElement:Hc,selectedData:Y,containerWidth:750,containerHeight:750,margin:{top:20,right:20,bottom:20,left:20},axisCircles:2,idAccessor:e=>e.player,renderTooltip:(e,n)=>{D==null||D.zoomToPoint(e.data.player),n.html(` <h4>${e.data.player}</h4> <table> <tr><th>${e.label}</th><td>${e.value}</td></tr> </table> - `)},attributes:zt}),ft.renderVis();for(const e in zt){const n=document.createElement("select");for(const r of Object.keys(U)){const i=document.createElement("option");i.value=r,i.text=U[r],n.appendChild(i)}n.value=zt[e].key,n.oninput=r=>{var o;const i=(o=r.target)==null?void 0:o.value;zt[e]={key:i,label:U[i]},ft==null||ft.updateSelectedAttribute(zt)},Uc.appendChild(n)}}} + `)},attributes:xt}),ft.renderVis();for(const e in xt){const n=document.createElement("select");for(const r of Object.keys(U)){const i=document.createElement("option");i.value=r,i.text=U[r],n.appendChild(i)}n.value=xt[e].key,n.oninput=r=>{var o;const i=(o=r.target)==null?void 0:o.value;xt[e]={key:i,label:U[i]},ft==null||ft.updateSelectedAttribute(xt)},Uc.appendChild(n)}}Zc()}function Zc(){const t=document.querySelector("#player-cards");t&&(t.innerHTML="",Y.forEach(e=>{var i;const n=(i=at(e._color))==null?void 0:i.brighter(.8),r=document.createElement("div");r.classList.add("player-card"),r.style.background=`linear-gradient(135deg, ${e._color}, ${n})`,r.innerHTML=` + <h3>${e.player}</h3> + <p>${e.team} - ${e.pos} - ${e.nation} - ${e.age}</p> + `;for(const o of xt){const a=e[o.key];r.innerHTML+=` + <p>${o.label}: ${a}</p> + `}t.appendChild(r)}))} diff --git a/dist/assets/index-D5SnUWTV.css b/dist/assets/index-D5SnUWTV.css deleted file mode 100644 index 786278fa24a28364328f60ed0e6df793ad4164c3..0000000000000000000000000000000000000000 --- a/dist/assets/index-D5SnUWTV.css +++ /dev/null @@ -1 +0,0 @@ -:root{--primary: #987070;--secondary: #C39898;--tertiary: #DBB5B5;--quaternary: #F1E5D1;--text: #333;--box-shadow: 0px 2px 15px 2px rgb(51 51 51 / 5%)}body{font-family:Segoe UI,sans-serif;background-color:var(--quaternary);color:var(--text)}h1{text-align:center;margin-bottom:2rem}.axis path,.axis line{fill:none;stroke:#333;shape-rendering:crispEdges}.axis text{font-family:sans-serif;font-size:11px}.tooltip{position:absolute;display:none;background:#fff;padding:8px 14px;border-radius:8px;border:1px solid #ccc;box-shadow:0 0 10px #0000001a;-webkit-user-select:none;user-select:none;z-index:10}.groupLabel{font-size:1rem;font-weight:700;text-align:center;padding:.25rem;background:#ffffff80;box-shadow:0 0 10px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#app{display:flex;gap:1rem}#app .left,#app .right{position:relative;flex:1;text-align:center}#app .left{flex:2}#app .left #bubble-chart-wrapper{position:relative;margin:1rem auto;width:fit-content;padding:1rem}#app .left .bubble-chart-settings{align-items:flex-end;justify-content:flex-end;gap:1rem}#app .left .bubble-chart-settings>div{align-items:center;justify-content:flex-end;gap:1rem}#app .left .bubble-chart-settings input,#app .left .bubble-chart-settings select{min-width:250px;margin-left:1rem}#app .right{flex:1}#app .right #radar-chart-wrapper{position:relative;margin:0 4rem 4rem}#app .chart-settings{position:absolute;top:100%;right:0;display:flex;padding:2rem;border-radius:.5rem;flex-direction:column;background:#ffffff80;box-shadow:0 0 10px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}#app .chart-settings:empty{display:none}button{padding:.5rem;border:none;cursor:pointer;transition:transform .2s;background:linear-gradient(145deg,var(--primary),var(--secondary));color:#fff;border-radius:.5rem;min-width:3rem}button:hover{transform:scale(1.05)}select,input[type=text]{border-radius:.5rem;box-shadow:0 0 10px #0000001a;padding:.5rem;border:1px solid var(--text)}.search-wrapper{margin-bottom:1rem}@media (max-width: 1536px){#app{flex-direction:column}#app .left .bubble-chart-settings{position:static;width:fit-content;margin:0 0 0 auto}}@keyframes shimmer{0%{filter:blur(70px);transform:scale(1)}50%{filter:blur(100px);transform:scale(1.3)}to{filter:blur(70px);transform:scale(1)}} diff --git a/dist/index.html b/dist/index.html index 17828ad9da7e22736814877ed58ef72f4a15059f..98c5e19ccc14c0bf0cca719925c6101a261e357b 100644 --- a/dist/index.html +++ b/dist/index.html @@ -4,13 +4,17 @@ <meta charset="UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1.0"/> <title>Scouting tool</title> - <script type="module" crossorigin src="/assets/index-jafTSk0V.js"></script> - <link rel="stylesheet" crossorigin href="/assets/index-D5SnUWTV.css"> + <script type="module" crossorigin src="/assets/index-Cnt_SO0i.js"></script> + <link rel="stylesheet" crossorigin href="/assets/index-BASoXudL.css"> </head> <body> <h1>Scouting tool</h1> -<p>Eine Visualisierung von Statistiken des Statistikportals <a href="https://fbref.com">https://fbref.com</a>, welche die Statistiken der Saison 2023/24 (bzw. den entsprechenden Zeitraum) von Spielern einiger der größten Profi-Fußballligen veranschaulicht. - Stand der Daten: <time datetime="2024-07-07 17:30">2024-07-07 17:30</time></p> +<p>Eine Visualisierung von Statistiken des Statistikportals <a href="https://fbref.com">https://fbref.com</a>, welche + die Statistiken der Saison 2023/24 (bzw. den entsprechenden Zeitraum) von Spielern einiger der größten + Profi-Fußballligen veranschaulicht. + Stand der Daten: + <time datetime="2024-07-07 17:30">2024-07-07 17:30</time> +</p> <div id="app"> <div class="left"> <div class="search-wrapper"> @@ -57,11 +61,14 @@ </div> <div class="right"> <h2>Vergleichen</h2> - <div id="radar-chart-wrapper"> - + <div class="comparison"> + <div id="player-cards"></div> + <div id="radar-chart-wrapper"></div> </div> - <div class="radar-chart-settings chart-settings"></div> </div> + + <div class="radar-chart-settings chart-settings"></div> +</div> </div> </body> </html> diff --git a/index.html b/index.html index 8cc4cceef786961fa3d2c1a2c57a11d77a0591df..f33180d857760b69f6b9b7b04ccb0223199dad40 100644 --- a/index.html +++ b/index.html @@ -7,8 +7,12 @@ </head> <body> <h1>Scouting tool</h1> -<p>Eine Visualisierung von Statistiken des Statistikportals <a href="https://fbref.com">https://fbref.com</a>, welche die Statistiken der Saison 2023/24 (bzw. den entsprechenden Zeitraum) von Spielern einiger der größten Profi-Fußballligen veranschaulicht. - Stand der Daten: <time datetime="2024-07-07 17:30">2024-07-07 17:30</time></p> +<p>Eine Visualisierung von Statistiken des Statistikportals <a href="https://fbref.com">https://fbref.com</a>, welche + die Statistiken der Saison 2023/24 (bzw. den entsprechenden Zeitraum) von Spielern einiger der größten + Profi-Fußballligen veranschaulicht. + Stand der Daten: + <time datetime="2024-07-07 17:30">2024-07-07 17:30</time> +</p> <div id="app"> <div class="left"> <div class="search-wrapper"> @@ -55,11 +59,14 @@ </div> <div class="right"> <h2>Vergleichen</h2> - <div id="radar-chart-wrapper"> - + <div class="comparison"> + <div id="player-cards"></div> + <div id="radar-chart-wrapper"></div> </div> - <div class="radar-chart-settings chart-settings"></div> </div> + + <div class="radar-chart-settings chart-settings"></div> +</div> </div> <script type="module" src="/src/main.ts"></script> </body> diff --git a/src/main.ts b/src/main.ts index 744eb82ae4fad1ad3fe56f2a225d0de5218d342a..35914cd11b6952c7ecfcc1956cf0a339e8d28e12 100644 --- a/src/main.ts +++ b/src/main.ts @@ -6,7 +6,7 @@ import {countries} from "@/countries.ts"; import {numericColumns, Player} from "@/player.ts"; import {getPositionName} from "@/positions.ts"; import RadarChart from "@/charts/radarChart.ts"; -import {schemeTableau10} from "d3"; +import {schemeTableau10, color} from "d3"; const radarChartWrapper = document.querySelector('#radar-chart-wrapper') as HTMLDivElement; const bubbleChartWrapper = document.querySelector('#bubble-chart-wrapper') as HTMLDivElement; @@ -206,13 +206,35 @@ function updateSelectedNodes(node: Player) { label: numericColumns[value as keyof typeof numericColumns] } radarChart?.updateSelectedAttribute(radarChartAttributes) - } radarChartSettings.appendChild(input) } - } else { radarChart.updateVis(selectedNodes) } + updatePlayerCards() +} + +function updatePlayerCards() { + const playerCardContainer = document.querySelector('#player-cards') + if (!playerCardContainer) return + playerCardContainer.innerHTML = '' + selectedNodes.forEach((node) => { + const d3color = color(node._color)?.brighter(0.8) + const card = document.createElement('div') + card.classList.add('player-card') + card.style.background = `linear-gradient(135deg, ${node._color}, ${d3color})` + card.innerHTML = ` + <h3>${node.player}</h3> + <p>${node.team} - ${node.pos} - ${node.nation} - ${node.age}</p> + ` + for (const attribute of radarChartAttributes) { + const value = node[attribute.key as keyof Player] + card.innerHTML += ` + <p>${attribute.label}: ${value}</p> + ` + } + playerCardContainer.appendChild(card) + }) } \ No newline at end of file diff --git a/src/styles/index.scss b/src/styles/index.scss index dcd41b8ceac6625bd36a888658163918a7640acb..088b8cd0b854d757c31520edc46eef1b9b068a80 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -10,7 +10,7 @@ @mixin neumorphism { border-radius: 10px; background: linear-gradient(145deg, #ffffff, #e0e0e0); - box-shadow: 20px 20px 60px #d4d4d4, + box-shadow: 20px 20px 60px #d4d4d4, -20px -20px 60px #ffffff; } @@ -50,9 +50,14 @@ h1 { padding: 8px 14px; border-radius: 8px; border: 1px solid #ccc; + color: #333; box-shadow: 0 0 10px 0 rgba(0, 0, 0, 0.1); user-select: none; z-index: 10; + + h4 { + margin: 0 0 .5rem; + } } .groupLabel { @@ -94,6 +99,7 @@ h1 { justify-content: flex-end; gap: 1rem; } + input, select { min-width: 250px; margin-left: 1rem; @@ -104,10 +110,43 @@ h1 { .right { flex: 1; + .comparison { + display: flex; + gap: 1rem; + padding: 1rem; + border-radius: 0.5rem; + color: white; + } + #radar-chart-wrapper { position: relative; margin: 0 4rem 4rem; } + + #player-cards { + display: flex; + flex-wrap: wrap; + gap: 1rem; + justify-content: center; + + .player-card { + position: relative; + display: flex; + flex-direction: column; + gap: .5rem; + padding: 1rem; + border-radius: 0.5rem; + color: white; + min-width: 300px; + height: fit-content; + @include glass; + + h3, p { + margin: 0; + text-shadow: 0 0 10px rgba(0, 0, 0, 0.5); + } + } + } } .chart-settings { @@ -149,12 +188,13 @@ select, input[type="text"] { } .search-wrapper { - margin-bottom: 1rem; + margin-bottom: 1rem; } @media (max-width: 1536px) { #app { flex-direction: column; + .left .bubble-chart-settings { position: static; width: fit-content;