var e={value:()=>{}};function t(){for(var e=0,t=arguments.length,r={},i;e=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}n.prototype=t.prototype={constructor:n,on:function(e,t){var n=this._,o=r(e+``,n),s,c=-1,l=o.length;if(arguments.length<2){for(;++c0)for(var n=Array(i),r=0,i,a;r=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),o.hasOwnProperty(t)?{space:o[t],local:e}:e}function c(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function l(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function u(e){var t=s(e);return(t.local?l:c)(t)}function d(){}function f(e){return e==null?d:function(){return this.querySelector(e)}}function p(e){typeof e!=`function`&&(e=f(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i=v&&(v=_+1);!(b=g[v])&&++v=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function xe(e){e||=Se;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;at?1:e>=t?0:NaN}function Ce(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function we(){return Array.from(this)}function Te(){for(var e=this._groups,t=0,n=e.length;t1?this.each((t==null?Le:typeof t==`function`?ze:Re)(e,t,n??``)):S(this.node(),e)}function S(e,t){return e.style.getPropertyValue(t)||Ie(e).getComputedStyle(e,null).getPropertyValue(t)}function Ve(e){return function(){delete this[e]}}function He(e,t){return function(){this[e]=t}}function Ue(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function We(e,t){return arguments.length>1?this.each((t==null?Ve:typeof t==`function`?Ue:He)(e,t)):this.node()[e]}function Ge(e){return e.trim().split(/^|\s+/)}function Ke(e){return e.classList||new qe(e)}function qe(e){this._node=e,this._names=Ge(e.getAttribute(`class`)||``)}qe.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function Je(e,t){for(var n=Ke(e),r=-1,i=t.length;++r=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function Ct(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Yt(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Yt(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Lt.exec(e))?new M(t[1],t[2],t[3],1):(t=Rt.exec(e))?new M(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=zt.exec(e))?Yt(t[1],t[2],t[3],t[4]):(t=Bt.exec(e))?Yt(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Vt.exec(e))?tn(t[1],t[2]/100,t[3]/100,1):(t=Ht.exec(e))?tn(t[1],t[2]/100,t[3]/100,t[4]):Ut.hasOwnProperty(e)?Jt(Ut[e]):e===`transparent`?new M(NaN,NaN,NaN,0):null}function Jt(e){return new M(e>>16&255,e>>8&255,e&255,1)}function Yt(e,t,n,r){return r<=0&&(e=t=n=NaN),new M(e,t,n,r)}function Xt(e){return e instanceof E||(e=j(e)),e?(e=e.rgb(),new M(e.r,e.g,e.b,e.opacity)):new M}function Zt(e,t,n,r){return arguments.length===1?Xt(e):new M(e,t,n,r??1)}function M(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}T(M,Zt,Pt(E,{brighter(e){return e=e==null?Ft:Ft**+e,new M(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?D:D**+e,new M(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new M(P(this.r),P(this.g),P(this.b),N(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:Qt,formatHex:Qt,formatHex8:$t,formatRgb:en,toString:en}));function Qt(){return`#${F(this.r)}${F(this.g)}${F(this.b)}`}function $t(){return`#${F(this.r)}${F(this.g)}${F(this.b)}${F((isNaN(this.opacity)?1:this.opacity)*255)}`}function en(){let e=N(this.opacity);return`${e===1?`rgb(`:`rgba(`}${P(this.r)}, ${P(this.g)}, ${P(this.b)}${e===1?`)`:`, ${e})`}`}function N(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function P(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function F(e){return e=P(e),(e<16?`0`:``)+e.toString(16)}function tn(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new I(e,t,n,r)}function nn(e){if(e instanceof I)return new I(e.h,e.s,e.l,e.opacity);if(e instanceof E||(e=j(e)),!e)return new I;if(e instanceof I)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n0&&c<1?0:o,new I(o,s,c,e.opacity)}function rn(e,t,n,r){return arguments.length===1?nn(e):new I(e,t,n,r??1)}function I(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}T(I,rn,Pt(E,{brighter(e){return e=e==null?Ft:Ft**+e,new I(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?D:D**+e,new I(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new M(on(e>=240?e-240:e+120,i,r),on(e,i,r),on(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new I(an(this.h),L(this.s),L(this.l),N(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(){let e=N(this.opacity);return`${e===1?`hsl(`:`hsla(`}${an(this.h)}, ${L(this.s)*100}%, ${L(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function an(e){return e=(e||0)%360,e<0?e+360:e}function L(e){return Math.max(0,Math.min(1,e||0))}function on(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var R=e=>()=>e;function sn(e,t){return function(n){return e+n*t}}function cn(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function ln(e,t){var n=t-e;return n?sn(e,n>180||n<-180?n-360*Math.round(n/360):n):R(isNaN(e)?t:e)}function un(e){return(e=+e)==1?dn:function(t,n){return n-t?cn(t,n,e):R(isNaN(t)?n:t)}}function dn(e,t){var n=t-e;return n?sn(e,n):R(isNaN(e)?t:e)}var fn=(function e(t){var n=un(t);function r(e,t){var r=n((e=Zt(e)).r,(t=Zt(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=dn(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function z(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var pn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,mn=new RegExp(pn.source,`g`);function hn(e){return function(){return e}}function gn(e){return function(t){return e(t)+``}}function _n(e,t){var n=pn.lastIndex=mn.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=pn.exec(e))&&(i=mn.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:z(r,i)})),n=mn.lastIndex;return n180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:z(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:z(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:z(e,n)},{i:s-2,x:z(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t=0&&e._call.call(void 0,t),e=e._next;--B}function Ln(){W=(U=G.now())+An,B=V=0;try{In()}finally{B=0,zn(),W=0}}function Rn(){var e=G.now(),t=e-U;t>On&&(An-=t,U=e)}function zn(){for(var e,t=kn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:kn=n);H=e,Bn(r)}function Bn(e){B||(V&&=clearTimeout(V),e-W>24?(e<1/0&&(V=setTimeout(Ln,e-G.now()-An)),Dn&&=clearInterval(Dn)):(Dn||=(U=G.now(),setInterval(Rn,On)),B=1,jn(Ln)))}function Vn(e,t,n){var r=new Pn;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Hn=t(`start`,`end`,`cancel`,`interrupt`),Un=[];function Wn(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Kn(e,n,{name:t,index:r,group:i,on:Hn,tween:Un,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Gn(e,t){var n=q(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function K(e,t){var n=q(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function q(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Kn(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=Fn(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return Vn(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function Jn(e){return this.each(function(){qn(this,e)})}function Yn(e,t){var n,r;return function(){var i=K(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o=0&&(e=e.slice(0,t)),!e||e===`start`})}function Tr(e,t,n){var r,i,a=wr(t)?Gn:K;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Er(e,t){var n=this._id;return arguments.length<2?q(this.node(),n).on.on(e):this.each(Tr(n,e,t))}function Dr(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Or(){return this.on(`end.remove`,Dr(this._id))}function kr(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=f(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o=0))throw Error(`invalid digits: ${e}`);if(t>15)return di;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tX)if(!(Math.abs(u*s-c*l)>X)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((ci-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>X&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>X||Math.abs(this._y1-l)>X)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%li+li),d>ui?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>X&&this._append`A${n},${n},0,${+(d>=ci)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function mi(){return new pi}mi.prototype=pi.prototype;function Z(e){return function(){return e}}var hi=Math.abs,gi=Math.atan2,_i=Math.cos,vi=Math.max,yi=Math.min,bi=Math.sin,xi=Math.sqrt,Si=1e-12,Ci=Math.PI,wi=Ci/2,Ti=2*Ci;function Ei(e){return e>1?0:e<-1?Ci:Math.acos(e)}function Di(e){return e>=1?wi:e<=-1?-wi:Math.asin(e)}function Oi(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new pi(t)}Array.prototype.slice;function ki(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Ai(e){this._context=e}Ai.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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ji(e){return new Ai(e)}function Mi(e){return e[0]}function Ni(e){return e[1]}function Pi(e,t){var n=Z(!0),r=null,i=ji,a=null,o=Oi(s);e=typeof e==`function`?e:e===void 0?Mi:Z(e),t=typeof t==`function`?t:t===void 0?Ni:Z(t);function s(s){var c,l=(s=ki(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var Ui=(function e(t){function n(e){return t===1?new Ii(e):new Hi(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function Wi(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Gi(e,t){this._context=e,this._k=(1-t)/6}Gi.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:Wi(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Wi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ki=(function e(t){function n(e){return new Gi(e,t)}return n.tension=function(t){return e(+t)},n})(0);function qi(e,t){this._context=e,this._k=(1-t)/6}qi.prototype={areaStart:Q,areaEnd:Q,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(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Wi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Ji=(function e(t){function n(e){return new qi(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Yi(e,t){this._context=e,this._k=(1-t)/6}Yi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Wi(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Xi=(function e(t){function n(e){return new Yi(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Zi(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Qi(e,t){this._context=e,this._alpha=t}Qi.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Zi(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var $i=(function e(t){function n(e){return t?new Qi(e,t):new Gi(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function ea(e,t){this._context=e,this._alpha=t}ea.prototype={areaStart:Q,areaEnd:Q,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Zi(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ta=(function e(t){function n(e){return t?new ea(e,t):new qi(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function na(e,t){this._context=e,this._alpha=t}na.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Zi(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ra=(function e(t){function n(e){return t?new na(e,t):new Yi(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function ia(e){this._context=e}ia.prototype={areaStart:Q,areaEnd:Q,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function aa(e){return new ia(e)}function oa(e){return e<0?-1:1}function sa(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(oa(a)+oa(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ca(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function la(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ua(e){this._context=e}ua.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:la(this,this._t0,ca(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,la(this,ca(this,n=sa(this,e,t)),n);break;default:la(this,this._t0,n=sa(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function da(e){this._context=new fa(e)}(da.prototype=Object.create(ua.prototype)).point=function(e,t){ua.prototype.point.call(this,t,e)};function fa(e){this._context=e}fa.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function pa(e){return new ua(e)}function ma(e){return new da(e)}function ha(e){this._context=e}ha.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=ga(e),i=ga(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function ya(e){return new va(e,.5)}function ba(e){return new va(e,0)}function xa(e){return new va(e,1)}function $(e,t,n){this.k=e,this.x=t,this.y=n}$.prototype={constructor:$,scale:function(e){return e===1?this:new $(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new $(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var Sa=new $(1,0,0);Ca.prototype=$.prototype;function Ca(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Sa;return e.__zoom}export{C as $,wi as A,_n as B,Oi as C,gi as D,Di as E,xi as F,R as G,fn as H,Ti as I,j as J,E as K,Z as L,yi as M,Ci as N,_i as O,bi as P,Nt as Q,si as R,ki as S,Ei as T,ln as U,z as V,dn as W,T as X,Xt as Y,Pt as Z,Li as _,pa as a,Ni as b,ra as c,Xi as d,jt as et,Ji as f,zi as g,Vi as h,_a as i,vi as j,Si as k,ta as l,Ui as m,ba as n,o as nt,ma as o,Ki as p,M as q,ya as r,t as rt,aa as s,xa as t,m as tt,$i as u,Pi as v,hi as w,ji as x,Mi as y,Zr as z};