1var Td=Object.create;var No=Object.defineProperty;var Ad=Object.getOwnPropertyDescriptor;var Md=Object.getOwnPropertyNames;var Sd=Object.getPrototypeOf,Cd=Object.prototype.hasOwnProperty;var hn=(r,i)=>()=>(i||r((i={exports:{}}).exports,i),i.exports),Xo=(r,i)=>{for(var o in i)No(r,o,{get:i[o],enumerable:!0})},Io=(r,i,o,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let l of Md(i))!Cd.call(r,l)&&l!==o&&No(r,l,{get:()=>i[l],enumerable:!(s=Ad(i,l))||s.enumerable});return r},v=(r,i,o)=>(Io(r,i,"default"),o&&Io(o,i,"default")),Be=(r,i,o)=>(o=r!=null?Td(Sd(r)):{},Io(i||!r||!r.__esModule?No(o,"default",{value:r,enumerable:!0}):o,r));var Hi=hn((Yi,kc)=>{(function(r,i){typeof Yi=="object"&&typeof kc<"u"?i(Yi):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(Yi,function(r){"use strict";var i=new Date,o=new Date;function s(y,P,et,yt){function Tt(St){return y(St=new Date(+St)),St}return Tt.floor=Tt,Tt.ceil=function(St){return y(St=new Date(St-1)),P(St,1),y(St),St},Tt.round=function(St){var Mt=Tt(St),$t=Tt.ceil(St);return St-Mt<$t-St?Mt:$t},Tt.offset=function(St,Mt){return P(St=new Date(+St),Mt==null?1:Math.floor(Mt)),St},Tt.range=function(St,Mt,$t){var me=[],ye;if(St=Tt.ceil(St),$t=$t==null?1:Math.floor($t),!(St<Mt)||!($t>0))return me;do me.push(ye=new Date(+St)),P(St,$t),y(St);while(ye<St&&St<Mt);return me},Tt.filter=function(St){return s(function(Mt){if(Mt>=Mt)for(;y(Mt),!St(Mt);)Mt.setTime(Mt-1)},function(Mt,$t){if(Mt>=Mt)if($t<0)for(;++$t<=0;)for(;P(Mt,-1),!St(Mt););else for(;--$t>=0;)for(;P(Mt,1),!St(Mt););})},et&&(Tt.count=function(St,Mt){return i.setTime(+St),o.setTime(+Mt),y(i),y(o),Math.floor(et(i,o))},Tt.every=function(St){return St=Math.floor(St),!isFinite(St)||!(St>0)?null:St>1?Tt.filter(yt?function(Mt){return yt(Mt)%St===0}:function(Mt){return Tt.count(0,Mt)%St===0}):Tt}),Tt}var l=s(function(){},function(y,P){y.setTime(+y+P)},function(y,P){return P-y});l.every=function(y){return y=Math.floor(y),!isFinite(y)||!(y>0)?null:y>1?s(function(P){P.setTime(Math.floor(P/y)*y)},function(P,et){P.setTime(+P+et*y)},function(P,et){return(et-P)/y}):l};var h=l.range,_=1e3,p=6e4,x=36e5,b=864e5,A=6048e5,k=s(function(y){y.setTime(Math.floor(y/_)*_)},function(y,P){y.setTime(+y+P*_)},function(y,P){return(P-y)/_},function(y){return y.getUTCSeconds()}),S=k.range,R=s(function(y){y.setTime(Math.floor(y/p)*p)},function(y,P){y.setTime(+y+P*p)},function(y,P){return(P-y)/p},function(y){return y.getMinutes()}),E=R.range,M=s(function(y){var P=y.getTimezoneOffset()*p%x;P<0&&(P+=x),y.setTime(Math.floor((+y-P)/x)*x+P)},function(y,P){y.setTime(+y+P*x)},function(y,P){return(P-y)/x},function(y){return y.getHours()}),z=M.range,D=s(function(y){y.setHours(0,0,0,0)},function(y,P){y.setDate(y.getDate()+P)},function(y,P){return(P-y-(P.getTimezoneOffset()-y.getTimezoneOffset())*p)/b},function(y){return y.getDate()-1}),B=D.range;function X(y){return s(function(P){P.setDate(P.getDate()-(P.getDay()+7-y)%7),P.setHours(0,0,0,0)},function(P,et){P.setDate(P.getDate()+et*7)},function(P,et){return(et-P-(et.getTimezoneOffset()-P.getTimezoneOffset())*p)/A})}var U=X(0),Z=X(1),it=X(2),q=X(3),ct=X(4),ut=X(5),C=X(6),Ct=U.range,Nt=Z.range,gt=it.range,zt=q.range,Wt=ct.range,pt=ut.range,Ot=C.range,At=s(function(y){y.setDate(1),y.setHours(0,0,0,0)},function(y,P){y.setMonth(y.getMonth()+P)},function(y,P){return P.getMonth()-y.getMonth()+(P.getFullYear()-y.getFullYear())*12},function(y){return y.getMonth()}),Bt=At.range,kt=s(function(y){y.setMonth(0,1),y.setHours(0,0,0,0)},function(y,P){y.setFullYear(y.getFullYear()+P)},function(y,P){return P.getFullYear()-y.getFullYear()},function(y){return y.getFullYear()});kt.every=function(y){return!isFinite(y=Math.floor(y))||!(y>0)?null:s(function(P){P.setFullYear(Math.floor(P.getFullYear()/y)*y),P.setMonth(0,1),P.setHours(0,0,0,0)},function(P,et){P.setFullYear(P.getFullYear()+et*y)})};var Ft=kt.range,fe=s(function(y){y.setUTCSeconds(0,0)},function(y,P){y.setTime(+y+P*p)},function(y,P){return(P-y)/p},function(y){return y.getUTCMinutes()}),Jt=fe.range,oe=s(function(y){y.setUTCMinutes(0,0,0)},function(y,P){y.setTime(+y+P*x)},function(y,P){return(P-y)/x},function(y){return y.getUTCHours()}),pe=oe.range,Ae=s(function(y){y.setUTCHours(0,0,0,0)},function(y,P){y.setUTCDate(y.getUTCDate()+P)},function(y,P){return(P-y)/b},function(y){return y.getUTCDate()-1}
1),Me=Ae.range;function K(y){return s(function(P){P.setUTCDate(P.getUTCDate()-(P.getUTCDay()+7-y)%7),P.setUTCHours(0,0,0,0)},function(P,et){P.setUTCDate(P.getUTCDate()+et*7)},function(P,et){return(et-P)/A})}var rt=K(0),j=K(1),Q=K(2),ot=K(3),F=K(4),vt=K(5),wt=K(6),jt=rt.range,Vt=j.range,he=Q.range,de=ot.range,re=F.range,Pt=vt.range,$e=wt.range,we=s(function(y){y.setUTCDate(1),y.setUTCHours(0,0,0,0)},function(y,P){y.setUTCMonth(y.getUTCMonth()+P)},function(y,P){return P.getUTCMonth()-y.getUTCMonth()+(P.getUTCFullYear()-y.getUTCFullYear())*12},function(y){return y.getUTCMonth()}),ze=we.range,Ne=s(function(y){y.setUTCMonth(0,1),y.setUTCHours(0,0,0,0)},function(y,P){y.setUTCFullYear(y.getUTCFullYear()+P)},function(y,P){return P.getUTCFullYear()-y.getUTCFullYear()},function(y){return y.getUTCFullYear()});Ne.every=function(y){return!isFinite(y=Math.floor(y))||!(y>0)?null:s(function(P){P.setUTCFullYear(Math.floor(P.getUTCFullYear()/y)*y),P.setUTCMonth(0,1),P.setUTCHours(0,0,0,0)},function(P,et){P.setUTCFullYear(P.getUTCFullYear()+et*y)})};var Le=Ne.range;r.timeInterval=s,r.timeMillisecond=l,r.timeMilliseconds=h,r.utcMillisecond=l,r.utcMilliseconds=h,r.timeSecond=k,r.timeSeconds=S,r.utcSecond=k,r.utcSeconds=S,r.timeMinute=R,r.timeMinutes=E,r.timeHour=M,r.timeHours=z,r.timeDay=D,r.timeDays=B,r.timeWeek=U,r.timeWeeks=Ct,r.timeSunday=U,r.timeSundays=Ct,r.timeMonday=Z,r.timeMondays=Nt,r.timeTuesday=it,r.timeTuesdays=gt,r.timeWednesday=q,r.timeWednesdays=zt,r.timeThursday=ct,r.timeThursdays=Wt,r.timeFriday=ut,r.timeFridays=pt,r.timeSaturday=C,r.timeSaturdays=Ot,r.timeMonth=At,r.timeMonths=Bt,r.timeYear=kt,r.timeYears=Ft,r.utcMinute=fe,r.utcMinutes=Jt,r.utcHour=oe,r.utcHours=pe,r.utcDay=Ae,r.utcDays=Me,r.utcWeek=rt,r.utcWeeks=jt,r.utcSunday=rt,r.utcSundays=jt,r.utcMonday=j,r.utcMondays=Vt,r.utcTuesday=Q,r.utcTuesdays=he,r.utcWednesday=ot,r.utcWednesdays=de,r.utcThursday=F,r.utcThursdays=re,r.utcFriday=vt,r.utcFridays=Pt,r.utcSaturday=wt,r.utcSaturdays=$e,r.utcMonth=we,r.utcMonths=ze,r.utcYear=Ne,r.utcYears=Le,Object.defineProperty(r,"__esModule",{value:!0})})});var ci=hn((Vi,Lc)=>{(function(r,i){typeof Vi=="object"&&typeof Lc<"u"?i(Vi,Hi()):typeof define=="function"&&define.amd?define(["exports","d3-time"],i):i(r.d3=r.d3||{},r.d3)})(Vi,function(r,i){"use strict";function o(tt){if(0<=tt.y&&tt.y<100){var xt=new Date(-1,tt.m,tt.d,tt.H,tt.M,tt.S,tt.L);return xt.setFullYear(tt.y),xt}return new Date(tt.y,tt.m,tt.d,tt.H,tt.M,tt.S,tt.L)}function s(tt){if(0<=tt.y&&tt.y<100){var xt=new Date(Date.UTC(-1,tt.m,tt.d,tt.H,tt.M,tt.S,tt.L));return xt.setUTCFullYear(tt.y),xt}return new Date(Date.UTC(tt.y,tt.m,tt.d,tt.H,tt.M,tt.S,tt.L))}function l(tt){return{y:tt,m:0,d:1,H:0,M:0,S:0,L:0}}function h(tt){var xt=tt.dateTime,It=tt.date,Xt=tt.time,Xe=tt.periods,V=tt.days,N=tt.shortDays,W=tt.months,H=tt.shortMonths,at=S(Xe),ht=R(Xe),dt=S(V),mt=R(V),bt=S(N),Rt=R(N),Yt=S(W),Ut=R(W),ie=S(H),se=R(H),ve={a:lt,A:Lt,b:Ht,B:qt,c:null,d:Ot,e:Ot,f:fe,H:At,I:Bt,j:kt,L:Ft,m:Jt,M:oe,p:ce,Q:St,s:Mt,S:pe,u:Ae,U:Me,V:K,w:rt,W:j,x:null,X:null,y:Q,Y:ot,Z:F,"%":Tt},je={a:d,A:e,b:t,B:n,c:null,d:vt,e:vt,f:de,H:wt,I:jt,j:Vt,L:he,m:re,M:Pt,p:a,Q:St,s:Mt,S:$e,u:we,U:ze,V:Ne,w:Le,W:y,x:null,X:null,y:P,Y:et,Z:yt,"%":Tt},nn={a:Dn,A:$n,b:Ee,B:xn,c:mn,d:q,e:q,f:gt,H:ut,I:ut,j:ct,L:Nt,m:it,M:C,p:Tn,Q:Wt,s:pt,S:Ct,u:M,U:z,V:D,w:E,W:B,x:cn,X:G,y:U,Y:X,Z,"%":zt};ve.x=sn(It,ve),ve.X=sn(Xt,ve),ve.c=sn(xt,ve),je.x=sn(It,je),je.X=sn(Xt,je),je.c=sn(xt,je);function sn(c,u){return function(g){var w=[],O=-1,L=0,I=c.length,f,T,$;for(g instanceof Date||(g=new Date(+g));++O<I;)c.charCodeAt(O)===37&&(w.push(c.slice(L,O)),(T=_[f=c.charAt(++O)])!=null?f=c.charAt(++O):T=f==="e"?" ":"0",($=u[f])&&(f=$(g,T)),w.push(f),L=O+1);return w.push(c.slice(L,O)),w.join("")}}function pn(c,u){return function(g){var w=l(1900),O=Mn(w,c,g+="",0),L,I;if(O!=g.length)return null;if("Q"in w)return new Date(w.Q);if("p"in w&&(w.H=w.H%12+w.p*12),"V"in w){if(w.V<1||w.V>53)return null;"w"in w||(w.w=1),"Z"in w?(L=s(l(w.y)),I=L.getUTCDay(),L=I>4||I===0?i.utcMonday.ceil(L):i.utcMonday(L),L=i.utcDay.offset(L,(w.V-1)*7),w.y=L.getUTCFullYear(),w.m=L.getUTCMonth(),w.d=L.getUTCDate()+(w.w+6)%7):(L=u(l(w.y)),I=L.getDay(),L=I>4||I===0?i.timeMonday.ceil(L):i.timeMonday(L),L=i.timeDay.offset(L,(w.V-1)*7),w.y=L.getFullYear(),w.m=L.getMonth(),w.d=L.getDate()+(w.w+6)%7)}
1else("W"in w||"U"in w)&&("w"in w||(w.w="u"in w?w.u%7:"W"in w?1:0),I="Z"in w?s(l(w.y)).getUTCDay():u(l(w.y)).getDay(),w.m=0,w.d="W"in w?(w.w+6)%7+w.W*7-(I+5)%7:w.w+w.U*7-(I+6)%7);return"Z"in w?(w.H+=w.Z/100|0,w.M+=w.Z%100,s(w)):u(w)}}function Mn(c,u,g,w){for(var O=0,L=u.length,I=g.length,f,T;O<L;){if(w>=I)return-1;if(f=u.charCodeAt(O++),f===37){if(f=u.charAt(O++),T=nn[f in _?u.charAt(O++):f],!T||(w=T(c,g,w))<0)return-1}else if(f!=g.charCodeAt(w++))return-1}return w}function Tn(c,u,g){var w=at.exec(u.slice(g));return w?(c.p=ht[w[0].toLowerCase()],g+w[0].length):-1}function Dn(c,u,g){var w=bt.exec(u.slice(g));return w?(c.w=Rt[w[0].toLowerCase()],g+w[0].length):-1}function $n(c,u,g){var w=dt.exec(u.slice(g));return w?(c.w=mt[w[0].toLowerCase()],g+w[0].length):-1}function Ee(c,u,g){var w=ie.exec(u.slice(g));return w?(c.m=se[w[0].toLowerCase()],g+w[0].length):-1}function xn(c,u,g){var w=Yt.exec(u.slice(g));return w?(c.m=Ut[w[0].toLowerCase()],g+w[0].length):-1}function mn(c,u,g){return Mn(c,xt,u,g)}function cn(c,u,g){return Mn(c,It,u,g)}function G(c,u,g){return Mn(c,Xt,u,g)}function lt(c){return N[c.getDay()]}function Lt(c){return V[c.getDay()]}function Ht(c){return H[c.getMonth()]}function qt(c){return W[c.getMonth()]}function ce(c){return Xe[+(c.getHours()>=12)]}function d(c){return N[c.getUTCDay()]}function e(c){return V[c.getUTCDay()]}function t(c){return H[c.getUTCMonth()]}function n(c){return W[c.getUTCMonth()]}function a(c){return Xe[+(c.getUTCHours()>=12)]}return{format:function(c){var u=sn(c+="",ve);return u.toString=function(){return c},u},parse:function(c){var u=pn(c+="",o);return u.toString=function(){return c},u},utcFormat:function(c){var u=sn(c+="",je);return u.toString=function(){return c},u},utcParse:function(c){var u=pn(c,s);return u.toString=function(){return c},u}}}var _={"-":"",_:" ",0:"0"},p=/^\s*\d+/,x=/^%/,b=/[\\^$*+?|[\]().{}]/g;function A(tt,xt,It){var Xt=tt<0?"-":"",Xe=(Xt?-tt:tt)+"",V=Xe.length;return Xt+(V<It?new Array(It-V+1).join(xt)+Xe:Xe)}function k(tt){return tt.replace(b,"\\$&")}function S(tt){return new RegExp("^(?:"+tt.map(k).join("|")+")","i")}function R(tt){for(var xt={},It=-1,Xt=tt.length;++It<Xt;)xt[tt[It].toLowerCase()]=It;return xt}function E(tt,xt,It){var Xt=p.exec(xt.slice(It,It+1));return Xt?(tt.w=+Xt[0],It+Xt[0].length):-1}function M(tt,xt,It){var Xt=p.exec(xt.slice(It,It+1));return Xt?(tt.u=+Xt[0],It+Xt[0].length):-1}function z(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.U=+Xt[0],It+Xt[0].length):-1}function D(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.V=+Xt[0],It+Xt[0].length):-1}function B(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.W=+Xt[0],It+Xt[0].length):-1}function X(tt,xt,It){var Xt=p.exec(xt.slice(It,It+4));return Xt?(tt.y=+Xt[0],It+Xt[0].length):-1}function U(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.y=+Xt[0]+(+Xt[0]>68?1900:2e3),It+Xt[0].length):-1}function Z(tt,xt,It){var Xt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(xt.slice(It,It+6));return Xt?(tt.Z=Xt[1]?0:-(Xt[2]+(Xt[3]||"00")),It+Xt[0].length):-1}function it(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.m=Xt[0]-1,It+Xt[0].length):-1}function q(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.d=+Xt[0],It+Xt[0].length):-1}function ct(tt,xt,It){var Xt=p.exec(xt.slice(It,It+3));return Xt?(tt.m=0,tt.d=+Xt[0],It+Xt[0].length):-1}function ut(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.H=+Xt[0],It+Xt[0].length):-1}function C(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.M=+Xt[0],It+Xt[0].length):-1}function Ct(tt,xt,It){var Xt=p.exec(xt.slice(It,It+2));return Xt?(tt.S=+Xt[0],It+Xt[0].length):-1}function Nt(tt,xt,It){var Xt=p.exec(xt.slice(It,It+3));return Xt?(tt.L=+Xt[0],It+Xt[0].length):-1}function gt(tt,xt,It){var Xt=p.exec(xt.slice(It,It+6));return Xt?(tt.L=Math.floor(Xt[0]/1e3),It+Xt[0].length):-1}function zt(tt,xt,It){var Xt=x.exec(xt.slice(It,It+1));return Xt?It+Xt[0].length:-1}function Wt(tt,xt,It){var Xt=p.exec(xt.slice(It));return Xt?(tt.Q=+Xt[0],It+Xt[0].length):-1}function pt(tt,xt,It){var Xt=p.exec(xt.slice(It));return Xt?(tt.Q=+Xt[0]*1e3,It+Xt[0].length):-1}function Ot(tt,xt){return A(tt.getDate(),xt,2)}function At(tt,xt){return A(tt.getHours(),xt,2)}function Bt(tt,xt){return A(tt.getHours()%12||12,xt,2)}function kt(tt,xt){return A(1+i.timeDay.count(i.timeYear(tt),tt),xt,3)}function Ft(tt,xt){return A(tt.getMilliseconds(),xt,3)}function fe(tt,xt){return Ft(tt,xt)+"000"}function Jt(tt,xt){return A(tt.getMonth()+1,xt,2)}function oe(tt,xt){return A(tt.getMinutes(),xt,2)}function pe(tt,xt){return A(tt.getSeconds(),xt,2)}function Ae(tt){var xt=tt.getDay();return xt===0?7:xt}function Me(tt,xt){return A(i.timeSunday.count(i.timeYear(tt),tt),xt,2)}function K(tt,xt){var It=tt.getDay();return tt=It>=4||It===0?i.timeThursday(tt):i.timeThursday.ceil(tt),A(i.timeThursday.count(i.timeYear(tt),tt)+(i.timeYear(tt).getDay()===4),xt,2)}function rt(tt){return tt.getDay()}function j(tt,xt){return A(i.timeMonday.count(i.timeYear(tt),tt),xt,2)}function Q(tt,xt){return A(tt.getFullYear()%100,xt,2)}function ot(tt,xt){return A(tt.getFullYear()%1e4,xt,4)}function F(tt){var xt=tt.getTimezoneOffset();return(xt>0?"-":(xt*=-1,"+"))+A(xt/60|0,"0",2)+A(xt%60,"0",2)}function vt(tt,xt){return A(tt.getUTCDate(),xt,2)}function wt(tt,xt){return A(tt.getUTCHours(),xt,2)}function jt(tt,xt){return A(tt.getUTCHours()%12||12,xt,2)}function Vt(tt,xt){return A(1+i.utcDay.count(i.utcYear(tt),tt),xt,3)}function he(tt,xt){return A(tt.getUTCMilliseconds(),xt,3)}function de(tt,xt){return he(tt,xt)+"000"}function re(tt,xt){return A(tt.getUTCMonth()+1,xt,2)}function Pt(tt,xt){return A(tt.getUTCMinutes(),xt,2)}function $e(tt,xt){return A(tt.getUTCSeconds(),xt,2)}function we(tt){var xt=tt.getUTCDay();return xt===0?7:xt}function ze(tt,xt){return A(i.utcSunday.count(i.utcYear(tt),tt),xt,2)}function Ne(tt,xt){var It=tt.getUTCDay();return tt=It>=4||It===0?i.utcThursday(tt):i.utcThursday.ceil(tt),A(i.utcThursday.count(i.utcYear(tt),tt)+(i.utcYear(tt).getUTCDay()===4),xt,2)}function Le(tt){return tt.getUTCDay()}function y(tt,xt){return A(i.utcMonday.count(i.utcYear(tt),tt),xt,2)}function P(tt,xt){return A(tt.getUTCFullYear()%100,xt,2)}function et(tt,xt){return A(tt.getUTCFullYear()%1e4,xt,4)}function yt(){return"+0000"}function Tt(){return"%"}function St(tt){return+tt}function Mt(tt){return Math.floor(+tt/1e3)}var $t;me({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Frid
1ay","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function me(tt){return $t=h(tt),r.timeFormat=$t.format,r.timeParse=$t.parse,r.utcFormat=$t.utcFormat,r.utcParse=$t.utcParse,$t}var ye="%Y-%m-%dT%H:%M:%S.%LZ";function ge(tt){return tt.toISOString()}var _e=Date.prototype.toISOString?ge:r.utcFormat(ye);function Ie(tt){var xt=new Date(tt);return isNaN(xt)?null:xt}var Ve=+new Date("2000-01-01T00:00:00.000Z")?Ie:r.utcParse(ye);r.timeFormatDefaultLocale=me,r.timeFormatLocale=h,r.isoFormat=_e,r.isoParse=Ve,Object.defineProperty(r,"__esModule",{value:!0})})});var dr=hn((qi,Rc)=>{(function(r,i){typeof qi=="object"&&typeof Rc<"u"?i(qi):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(qi,function(r){"use strict";var i="http://www.w3.org/1999/xhtml",o={svg:"http://www.w3.org/2000/svg",xhtml:i,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function s(G){var lt=G+="",Lt=lt.indexOf(":");return Lt>=0&&(lt=G.slice(0,Lt))!=="xmlns"&&(G=G.slice(Lt+1)),o.hasOwnProperty(lt)?{space:o[lt],local:G}:G}function l(G){return function(){var lt=this.ownerDocument,Lt=this.namespaceURI;return Lt===i&<.documentElement.namespaceURI===i?lt.createElement(G):lt.createElementNS(Lt,G)}}function h(G){return function(){return this.ownerDocument.createElementNS(G.space,G.local)}}function _(G){var lt=s(G);return(lt.local?h:l)(lt)}function p(){}function x(G){return G==null?p:function(){return this.querySelector(G)}}function b(G){typeof G!="function"&&(G=x(G));for(var lt=this._groups,Lt=lt.length,Ht=new Array(Lt),qt=0;qt<Lt;++qt)for(var ce=lt[qt],d=ce.length,e=Ht[qt]=new Array(d),t,n,a=0;a<d;++a)(t=ce[a])&&(n=G.call(t,t.__data__,a,ce))&&("__data__"in t&&(n.__data__=t.__data__),e[a]=n);return new ve(Ht,this._parents)}function A(){return[]}function k(G){return G==null?A:function(){return this.querySelectorAll(G)}}function S(G){typeof G!="function"&&(G=k(G));for(var lt=this._groups,Lt=lt.length,Ht=[],qt=[],ce=0;ce<Lt;++ce)for(var d=lt[ce],e=d.length,t,n=0;n<e;++n)(t=d[n])&&(Ht.push(G.call(t,t.__data__,n,d)),qt.push(t));return new ve(Ht,qt)}function R(G){return function(){return this.matches(G)}}function E(G){typeof G!="function"&&(G=R(G));for(var lt=this._groups,Lt=lt.length,Ht=new Array(Lt),qt=0;qt<Lt;++qt)for(var ce=lt[qt],d=ce.length,e=Ht[qt]=[],t,n=0;n<d;++n)(t=ce[n])&&G.call(t,t.__data__,n,ce)&&e.push(t);return new ve(Ht,this._parents)}function M(G){return new Array(G.length)}function z(){return new ve(this._enter||this._groups.map(M),this._parents)}function D(G,lt){this.ownerDocument=G.ownerDocument,this.namespaceURI=G.namespaceURI,this._next=null,this._parent=G,this.__data__=lt}D.prototype={constructor:D,appendChild:function(G){return this._parent.insertBefore(G,this._next)},insertBefore:function(G,lt){return this._parent.insertBefore(G,lt)},querySelector:function(G){return this._parent.querySelector(G)},querySelectorAll:function(G){return this._parent.querySelectorAll(G)}};function B(G){return function(){return G}}var X="$";function U(G,lt,Lt,Ht,qt,ce){for(var d=0,e,t=lt.length,n=ce.length;d<n;++d)(e=lt[d])?(e.__data__=ce[d],Ht[d]=e):Lt[d]=new D(G,ce[d]);for(;d<t;++d)(e=lt[d])&&(qt[d]=e)}function Z(G,lt,Lt,Ht,qt,ce,d){var e,t,n={},a=lt.length,c=ce.length,u=new Array(a),g;for(e=0;e<a;++e)(t=lt[e])&&(u[e]=g=X+d.call(t,t.__data__,e,lt),g in n?qt[e]=t:n[g]=t);for(e=0;e<c;++e)g=X+d.call(G,ce[e],e,ce),(t=n[g])?(Ht[e]=t,t.__data__=ce[e],n[g]=null):Lt[e]=new D(G,ce[e]);for(e=0;e<a;++e)(t=lt[e])&&n[u[e]]===t&&(qt[e]=t)}function it(G,lt){if(!G)return g=new Array(this.size()),n=-1,this.each(function(J){g[++n]=J}),g;var Lt=lt?Z:U,Ht=this._parents,qt=this._groups;typeof G!="function"&&(G=B(G));for(var ce=qt.length,d=new Array(ce),e=new Array(ce),t=new Array(ce),n=0;n<ce;++n){var a=Ht[n],c=qt[n],u=c.length,g=G.call(a,a&&a.__data__,n,Ht),w=g.length,O=e[n]=new Array(w),L=d[n]=new Array(w),I=t[n]=new Array(u);
vendor: 4,442 bytes, line 1
1Lt(a,c,O,L,I,g,lt);for(var f=0,T=0,$,Y;f<w;++f)if($=O[f]){for(f>=T&&(T=f+1);!(Y=L[T])&&++T<w;);$._next=Y||null}}return d=new ve(d,Ht),d._enter=e,d._exit=t,d}function q(){return new ve(this._exit||this._groups.map(M),this._parents)}function ct(G,lt,Lt){var Ht=this.enter(),qt=this,ce=this.exit();return Ht=typeof G=="function"?G(Ht):Ht.append(G+""),lt!=null&&(qt=lt(qt)),Lt==null?ce.remove():Lt(ce),Ht&&qt?Ht.merge(qt).order():qt}function ut(G){for(var lt=this._groups,Lt=G._groups,Ht=lt.length,qt=Lt.length,ce=Math.min(Ht,qt),d=new Array(Ht),e=0;e<ce;++e)for(var t=lt[e],n=Lt[e],a=t.length,c=d[e]=new Array(a),u,g=0;g<a;++g)(u=t[g]||n[g])&&(c[g]=u);for(;e<Ht;++e)d[e]=lt[e];return new ve(d,this._parents)}function C(){for(var G=this._groups,lt=-1,Lt=G.length;++lt<Lt;)for(var Ht=G[lt],qt=Ht.length-1,ce=Ht[qt],d;--qt>=0;)(d=Ht[qt])&&(ce&&d.compareDocumentPosition(ce)^4&&ce.parentNode.insertBefore(d,ce),ce=d);return this}function Ct(G){G||(G=Nt);function lt(c,u){return c&&u?G(c.__data__,u.__data__):!c-!u}for(var Lt=this._groups,Ht=Lt.length,qt=new Array(Ht),ce=0;ce<Ht;++ce){for(var d=Lt[ce],e=d.length,t=qt[ce]=new Array(e),n,a=0;a<e;++a)(n=d[a])&&(t[a]=n);t.sort(lt)}return new ve(qt,this._parents).order()}function Nt(G,lt){return G<lt?-1:G>lt?1:G>=lt?0:NaN}function gt(){var G=arguments[0];return arguments[0]=this,G.apply(null,arguments),this}function zt(){var G=new Array(this.size()),lt=-1;return this.each(function(){G[++lt]=this}),G}function Wt(){for(var G=this._groups,lt=0,Lt=G.length;lt<Lt;++lt)for(var Ht=G[lt],qt=0,ce=Ht.length;qt<ce;++qt){var d=Ht[qt];if(d)return d}return null}function pt(){var G=0;return this.each(function(){++G}),G}function Ot(){return!this.node()}function At(G){for(var lt=this._groups,Lt=0,Ht=lt.length;Lt<Ht;++Lt)for(var qt=lt[Lt],ce=0,d=qt.length,e;ce<d;++ce)(e=qt[ce])&&G.call(e,e.__data__,ce,qt);return this}function Bt(G){return function(){this.removeAttribute(G)}}function kt(G){return function(){this.removeAttributeNS(G.space,G.local)}}function Ft(G,lt){return function(){this.setAttribute(G,lt)}}function fe(G,lt){return function(){this.setAttributeNS(G.space,G.local,lt)}}function Jt(G,lt){return function(){var Lt=lt.apply(this,arguments);Lt==null?this.removeAttribute(G):this.setAttribute(G,Lt)}}function oe(G,lt){return function(){var Lt=lt.apply(this,arguments);Lt==null?this.removeAttributeNS(G.space,G.local):this.setAttributeNS(G.space,G.local,Lt)}}function pe(G,lt){var Lt=s(G);if(arguments.length<2){var Ht=this.node();return Lt.local?Ht.getAttributeNS(Lt.space,Lt.local):Ht.getAttribute(Lt)}return this.each((lt==null?Lt.local?kt:Bt:typeof lt=="function"?Lt.local?oe:Jt:Lt.local?fe:Ft)(Lt,lt))}function Ae(G){return G.ownerDocument&&G.ownerDocument.defaultView||G.document&&G||G.defaultView}function Me(G){return function(){this.style.removeProperty(G)}}function K(G,lt,Lt){return function(){this.style.setProperty(G,lt,Lt)}}function rt(G,lt,Lt){return function(){var Ht=lt.apply(this,arguments);Ht==null?this.style.removeProperty(G):this.style.setProperty(G,Ht,Lt)}}function j(G,lt,Lt){return arguments.length>1?this.each((lt==null?Me:typeof lt=="function"?rt:K)(G,lt,Lt??"")):Q(this.node(),G)}function Q(G,lt){return G.style.getPropertyValue(lt)||Ae(G).getComputedStyle(G,null).getPropertyValue(lt)}function ot(G){return function(){delete this[G]}}function F(G,lt){return function(){this[G]=lt}}function vt(G,lt){return function(){var Lt=lt.apply(this,arguments);Lt==null?delete this[G]:this[G]=Lt}}function wt(G,lt){return arguments.length>1?this.each((lt==null?ot:typeof lt=="function"?vt:F)(G,lt)):this.node()[G]}function jt(G){return G.trim().split(/^|\s+/)}function Vt(G){return G.classList||new he(G)}function he(G){this._node=G,this._names=jt(G.getAttribute("class")||"")}he.prototype={add:function(G){var lt=this._names.indexOf(G);lt<0&&(this._names.push(G),this._node.setAttribute("class",this._names.join(" ")))},remove:function(G){var lt=this._names.indexOf(G);lt>=0&&(this._names.splice(lt,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(G){return this._names.indexOf(G)>=0}};function de(G,lt){for(var Lt=Vt(G),Ht=-1,qt=lt.length;++Ht<qt;)Lt.add(lt[Ht])}function re(G,lt){for(var Lt=Vt(G),Ht=-1,qt=lt.length;++Ht<qt;)Lt.remove(lt[Ht])}function Pt(G){return function(){de(this,G)}}function $e(G){return function(){re(this,G)}}function we(G,lt){return function(){(lt.apply(this,arguments)?de:re)(this,G)}}function ze(G,lt){var Lt=jt(G+"");
1if(arguments.length<2){for(var Ht=Vt(this.node()),qt=-1,ce=Lt.length;++qt<ce;)if(!Ht.contains(Lt[qt]))return!1;return!0}return this.each((typeof lt=="function"?we:lt?Pt:$e)(Lt,lt))}function Ne(){this.textContent=""}function Le(G){return function(){this.textContent=G}}function y(G){return function(){var lt=G.apply(this,arguments);this.textContent=lt??""}}function P(G){return arguments.length?this.each(G==null?Ne:(typeof G=="function"?y:Le)(G)):this.node().textContent}function et(){this.innerHTML=""}function yt(G){return function(){this.innerHTML=G}}function Tt(G){return function(){var lt=G.apply(this,arguments);this.innerHTML=lt??""}}function St(G){return arguments.length?this.each(G==null?et:(typeof G=="function"?Tt:yt)(G)):this.node().innerHTML}function Mt(){this.nextSibling&&this.parentNode.appendChild(this)}function $t(){return this.each(Mt)}function me(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ye(){return this.each(me)}function ge(G){var lt=typeof G=="function"?G:_(G);return this.select(function(){return this.appendChild(lt.apply(this,arguments))})}function _e(){return null}function Ie(G,lt){var Lt=typeof G=="function"?G:_(G),Ht=lt==null?_e:typeof lt=="function"?lt:x(lt);return this.select(function(){return this.insertBefore(Lt.apply(this,arguments),Ht.apply(this,arguments)||null)})}function Ve(){var G=this.parentNode;G&&G.removeChild(this)}function tt(){return this.each(Ve)}function xt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function It(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function Xt(G){return this.select(G?It:xt)}function Xe(G){return arguments.length?this.property("__data__",G):this.node().__data__}var V={};if(r.event=null,typeof document<"u"){var N=document.documentElement;
1"onmouseenter"in N||(V={mouseenter:"mouseover",mouseleave:"mouseout"})}function W(G,lt,Lt){return G=H(G,lt,Lt),function(Ht){var qt=Ht.relatedTarget;(!qt||qt!==this&&!(qt.compareDocumentPosition(this)&8))&&G.call(this,Ht)}}function H(G,lt,Lt){return function(Ht){var qt=r.event;r.event=Ht;try{G.call(this,this.__data__,lt,Lt)}finally{r.event=qt}}}function at(G){return G.trim().split(/^|\s+/).map(function(lt){var Lt="",Ht=lt.indexOf(".");return Ht>=0&&(Lt=lt.slice(Ht+1),lt=lt.slice(0,Ht)),{type:lt,name:Lt}})}function ht(G){return function(){var lt=this.__on;if(lt){for(var Lt=0,Ht=-1,qt=lt.length,ce;Lt<qt;++Lt)ce=lt[Lt],(!G.type||ce.type===G.type)&&ce.name===G.name?this.removeEventListener(ce.type,ce.listener,ce.capture):lt[++Ht]=ce;++Ht?lt.length=Ht:delete this.__on}}}function dt(G,lt,Lt){var Ht=V.hasOwnProperty(G.type)?W:H;return function(qt,ce,d){var e=this.__on,t,n=Ht(lt,ce,d);if(e){for(var a=0,c=e.length;a<c;++a)if((t=e[a]).type===G.type&&t.name===G.name){this.removeEventListener(t.type,t.listener,t.capture),this.addEventListener(t.type,t.listener=n,t.capture=Lt),t.value=lt;return}}this.addEventListener(G.type,n,Lt),t={type:G.type,name:G.name,value:lt,listener:n,capture:Lt},e?e.push(t):this.__on=[t]}}function mt(G,lt,Lt){var Ht=at(G+""),qt,ce=Ht.length,d;if(arguments.length<2){var e=this.node().__on;if(e){for(var t=0,n=e.length,a;t<n;++t)for(qt=0,a=e[t];qt<ce;++qt)if((d=Ht[qt]).type===a.type&&d.name===a.name)return a.value}return}for(e=lt?dt:ht,Lt==null&&(Lt=!1),qt=0;qt<ce;++qt)this.each(e(Ht[qt],lt,Lt));return this}function bt(G,lt,Lt,Ht){var qt=r.event;G.sourceEvent=r.event,r.event=G;try{return lt.apply(Lt,Ht)}finally{r.event=qt}}function Rt(G,lt,Lt){var Ht=Ae(G),qt=Ht.CustomEvent;typeof qt=="function"?qt=new qt(lt,Lt):(qt=Ht.document.createEvent("Event"),Lt?(qt.initEvent(lt,Lt.bubbles,Lt.cancelable),qt.detail=Lt.detail):qt.initEvent(lt,!1,!1)),G.dispatchEvent(qt)}function Yt(G,lt){return function(){return Rt(this,G,lt)}}function Ut(G,lt){return function(){return Rt(this,G,lt.apply(this,arguments))}}function ie(G,lt){return this.each((typeof lt=="function"?Ut:Yt)(G,lt))}var se=[null];function ve(G,lt){this._groups=G,this._parents=lt}function je(){return new ve([[document.documentElement]],se)}ve.prototype=je.prototype={constructor:ve,select:b,selectAll:S,filter:E,data:it,enter:z,exit:q,join:ct,merge:ut,order:C,sort:Ct,call:gt,nodes:zt,node:Wt,size:pt,empty:Ot,each:At,attr:pe,style:j,property:wt,classed:ze,text:P,html:St,raise:$t,lower:ye,append:ge,insert:Ie,remove:tt,clone:Xt,datum:Xe,on:mt,dispatch:ie};function nn(G){return typeof G=="string"?new ve([[document.querySelector(G)]],[document.documentElement]):new ve([[G]],se)}function sn(G){return nn(_(G).call(document.documentElement))}var pn=0;function Mn(){return new Tn}function Tn(){this._="@"+(++pn).toString(36)}Tn.prototype=Mn.prototype={constructor:Tn,get:function(G){for(var lt=this._;!(lt in G);)if(!(G=G.parentNode))return;return G[lt]},set:function(G,lt){return G[this._]=lt},remove:function(G){return this._ in G&&delete G[this._]},toString:function(){return this._}};function Dn(){for(var G=r.event,lt;lt=G.sourceEvent;)G=lt;return G}function $n(G,lt){var Lt=G.ownerSVGElement||G;if(Lt.createSVGPoint){var Ht=Lt.createSVGPoint();return Ht.x=lt.clientX,Ht.y=lt.clientY,Ht=Ht.matrixTransform(G.getScreenCTM().inverse()),[Ht.x,Ht.y]}var qt=G.getBoundingClientRect();return[lt.clientX-qt.left-G.clientLeft,lt.clientY-qt.top-G.clientTop]}function Ee(G){var lt=Dn();return lt.changedTouches&&(lt=lt.changedTouches[0]),$n(G,lt)}function xn(G){return typeof G=="string"?new ve([document.querySelectorAll(G)],[document.documentElement]):new ve([G??[]],se)}function mn(G,lt,Lt){arguments.length<3&&(Lt=lt,lt=Dn().changedTouches);for(var Ht=0,qt=lt?lt.length:0,ce;Ht<qt;++Ht)if((ce=lt[Ht]).identifier===Lt)return $n(G,ce);return null}function cn(G,lt){lt==null&&(lt=Dn().touches);for(var Lt=0,Ht=lt?lt.length:0,qt=new Array(Ht);Lt<Ht;++Lt)qt[Lt]=$n(G,lt[Lt]);return qt}r.create=sn,r.creator=_,r.local=Mn,r.matcher=R,r.mouse=Ee,r.namespace=s,r.namespaces=o,r.clientPoint=$n,r.select=nn,r.selectAll=xn,r.selection=je,r.selector=x,r.selectorAll=k,r.style=Q,r.touch=mn,r.touches=cn,r.window=Ae,r.customEvent=bt,Object.defineProperty(r,"__esMo
1dule",{value:!0})})});var Tr=hn((Ui,$c)=>{(function(r,i){typeof Ui=="object"&&typeof $c<"u"?i(Ui):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(Ui,function(r){"use strict";var i={value:function(){}};function o(){for(var p=0,x=arguments.length,b={},A;p<x;++p){if(!(A=arguments[p]+"")||A in b)throw new Error("illegal type: "+A);b[A]=[]}return new s(b)}function s(p){this._=p}function l(p,x){return p.trim().split(/^|\s+/).map(function(b){var A="",k=b.indexOf(".");if(k>=0&&(A=b.slice(k+1),b=b.slice(0,k)),b&&!x.hasOwnProperty(b))throw new Error("unknown type: "+b);return{type:b,name:A}})}s.prototype=o.prototype={constructor:s,on:function(p,x){var b=this._,A=l(p+"",b),k,S=-1,R=A.length;if(arguments.length<2){for(;++S<R;)if((k=(p=A[S]).type)&&(k=h(b[k],p.name)))return k;return}if(x!=null&&typeof x!="function")throw new Error("invalid callback: "+x);for(;++S<R;)if(k=(p=A[S]).type)b[k]=_(b[k],p.name,x);else if(x==null)for(k in b)b[k]=_(b[k],p.name,null);return this},copy:function(){var p={},x=this._;for(var b in x)p[b]=x[b].slice();return new s(p)},call:function(p,x){if((k=arguments.length-2)>0)for(var b=new Array(k),A=0,k,S;A<k;++A)b[A]=arguments[A+2];if(!this._.hasOwnProperty(p))throw new Error("unknown type: "+p);for(S=this._[p],A=0,k=S.length;A<k;++A)S[A].value.apply(x,b)},apply:function(p,x,b){if(!this._.hasOwnProperty(p))throw new Error("unknown type: "+p);for(var A=this._[p],k=0,S=A.length;k<S;++k)A[k].value.apply(x,b)}};function h(p,x){for(var b=0,A=p.length,k;b<A;++b)if((k=p[b]).name===x)return k.value}function _(p,x,b){for(var A=0,k=p.length;A<k;++A)if(p[A].name===x){p[A]=i,p=p.slice(0,A).concat(p.slice(A+1));break}return b!=null&&p.push({name:x,value:b}),p}r.dispatch=o,Object.defineProperty(r,"__esModule",{value:!0})})});var Gi=hn((Wi,Ec)=>{(function(r,i){typeof Wi=="object"&&typeof Ec<"u"?i(Wi):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(Wi,function(r){"use strict";var i=0,o=0,s=0,l=1e3,h,_,p=0,x=0,b=0,A=typeof performance=="object"&&performance.now?performance:Date,k=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(q){setTimeout(q,17)};function S(){return x||(k(R),x=A.now()+b)}function R(){x=0}function E(){this._call=this._time=this._next=null}E.prototype=M.prototype={constructor:E,restart:function(q,ct,ut){if(typeof q!="function")throw new TypeError("callback is not a function");ut=(ut==null?S():+ut)+(ct==null?0:+ct),!this._next&&_!==this&&(_?_._next=this:h=this,_=this),this._call=q,this._time=ut,U()},stop:function(){this._call&&(this._call=null,this._time=1/0,U())}};function M(q,ct,ut){var C=new E;return C.restart(q,ct,ut),C}function z(){S(),++i;for(var q=h,ct;q;)(ct=x-q._time)>=0&&q._call.call(null,ct),q=q._next;--i}function D(){x=(p=A.now())+b,i=o=0;try{z()}finally{i=0,X(),x=0}}function B(){var q=A.now(),ct=q-p;ct>l&&(b-=ct,p=q)}function X(){for(var q,ct=h,ut,C=1/0;ct;)ct._call?(C>ct._time&&(C=ct._time),q=ct,ct=ct._next):(ut=ct._next,ct._next=null,ct=q?q._next=ut:h=ut);_=q,U(C)}function U(q){if(!i){o&&(o=clearTimeout(o));var ct=q-x;ct>24?(q<1/0&&(o=setTimeout(D,q-A.now()-b)),s&&(s=clearInterval(s))):(s||(p=A.now(),s=setInterval(B,l)),i=1,k(D))}}function Z(q,ct,ut){var C=new E;return ct=ct==null?0:+ct,C.restart(function(Ct){C.stop(),q(Ct+ct)},ct,ut),C}function it(q,ct,ut){var C=new E,Ct=ct;return ct==null?(C.restart(q,ct,ut),C):(ct=+ct,ut=ut==null?S():+ut,C.restart(function Nt(gt){gt+=Ct,C.restart(Nt,Ct+=ct,ut),q(gt)},ct,ut),C)}r.now=S,r.timer=M,r.timerFlush=z,r.timeout=Z,r.interval=it,Object.defineProperty(r,"__esModule",{value:!0})})});var ar=hn((ji,Oc)=>{(function(r,i){typeof ji=="object"&&typeof Oc<"u"?i(ji):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(ji,function(r){"use strict";function i(y,P,et){y.prototype=P.prototype=et,et.constructor=y}function o(y,P){var et=Object.create(y.prototype);for(var yt in P)et[yt]=P[yt];return et}function s(){}var l=.7,h=1/l,_="\\s*([+-]?\\d+)\\s*",p="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",x="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",b=/^#([0-9a-f]{3})$/,A=/^#([0-9a-f]{6})$/,k=new RegExp("^rgb\\("+[_,_,_]+"\\)$"),S=new RegExp("^rgb\\("+[x,x,x]+"\\)$"),R=new RegExp("^rgba\\("+[_,_,_,p]+"\\)$"),E=new RegExp("^rgba\\("+[x,x,x,p]+"\\)$"),M=new RegExp("^hsl\\("+[p,x,x]+"\\)$"),z=new RegExp("^hsla\\("+[p,x,x,p]+"\\)$"),D={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};i(s,B,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}});function B(y){var P;return y=(y+"").trim().toLowerCase(),(P=b.exec(y))?(P=parseInt(P[1],16),new q(P>>8&15|P>>4&240,P>>4&15|P&240,(P&15)<<4|P&15,1)):(P=A.exec(y))?X(parseInt(P[1],16)):(P=k.exec(y))?new q(P[1],P[2],P[3],1):(P=S.exec(y))?new q(P[1]*255/100,P[2]*255/100,P[3]*255/100,1):(P=R.exec(y))?U(P[1],P[2],P[3],P[4]):(P=E.exec(y))?U(P[1]*255/100,P[2]*255/100,P[3]*255/100,P[4]):(P=M.exec(y))?ut(P[1],P[2]/100,P[3]/100,1):(P=z.exec(y))?ut(P[1],P[2]/100,P[3]/100,P[4]):D.hasOwnProperty(y)?X(D[y]):y==="transparent"?new q(NaN,NaN,NaN,0):null}function X(y){return new q(y>>16&255,y>>8&255,y&255,1)}function U(y,P,et,yt){return yt<=0&&(y=P=et=NaN),new q(y,P,et,yt)}function Z(y){return y instanceof s||(y=B(y)),y?(y=y.rgb(),new q(y.r,y.g,y.b,y.opacity)):new q}function it(y,P,et,yt){return arguments.length===1?Z(y):new q(y,P,et,yt??1)}function q(y,P,et,yt){this.r=+y,this.g=+P,this.b=+et,this.opacity=+yt}i(q,it,o(s,{brighter:function(y){return y=y==null?h:Math.pow(h,y),new q(this.r*y,this.g*y,this.b*y,this.opacity)},darker:function(y){return y=y==null?l:Math.pow(l,y),new q(this.r*y,this.g*y,this.b*y,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+ct(this.r)+ct(this.g)+ct(this.b)},toString:function(){var y=this.opacity;return y=isNaN(y)?1:Math.max(0,Math.min(1,y)),(y===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||
10))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(y===1?")":", "+y+")")}}));function ct(y){return y=Math.max(0,Math.min(255,Math.round(y)||0)),(y<16?"0":"")+y.toString(16)}function ut(y,P,et,yt){return yt<=0?y=P=et=NaN:et<=0||et>=1?y=P=NaN:P<=0&&(y=NaN),new Nt(y,P,et,yt)}function C(y){if(y instanceof Nt)return new Nt(y.h,y.s,y.l,y.opacity);if(y instanceof s||(y=B(y)),!y)return new Nt;if(y instanceof Nt)return y;y=y.rgb();var P=y.r/255,et=y.g/255,yt=y.b/255,Tt=Math.min(P,et,yt),St=Math.max(P,et,yt),Mt=NaN,$t=St-Tt,me=(St+Tt)/2;return $t?(P===St?Mt=(et-yt)/$t+(et<yt)*6:et===St?Mt=(yt-P)/$t+2:Mt=(P-et)/$t+4,$t/=me<.5?St+Tt:2-St-Tt,Mt*=60):$t=me>0&&me<1?0:Mt,new Nt(Mt,$t,me,y.opacity)}function Ct(y,P,et,yt){return arguments.length===1?C(y):new Nt(y,P,et,yt??1)}function Nt(y,P,et,yt){this.h=+y,this.s=+P,this.l=+et,this.opacity=+yt}i(Nt,Ct,o(s,{brighter:function(y){return y=y==null?h:Math.pow(h,y),new Nt(this.h,this.s,this.l*y,this.opacity)},darker:function(y){return y=y==null?l:Math.pow(l,y),new Nt(this.h,this.s,this.l*y,this.opacity)},rgb:function(){var y=this.h%360+(this.h<0)*360,P=isNaN(y)||isNaN(this.s)?0:this.s,et=this.l,yt=et+(et<.5?et:1-et)*P,Tt=2*et-yt;return new q(gt(y>=240?y-240:y+120,Tt,yt),gt(y,Tt,yt),gt(y<120?y+240:y-120,Tt,yt),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));function gt(y,P,et){return(y<60?P+(et-P)*y/60:y<180?et:y<240?P+(et-P)*(240-y)/60:P)*255}var zt=Math.PI/180,Wt=180/Math.PI,pt=18,Ot=.96422,At=1,Bt=.82521,kt=4/29,Ft=6/29,fe=3*Ft*Ft,Jt=Ft*Ft*Ft;function oe(y){if(y instanceof Me)return new Me(y.l,y.a,y.b,y.opacity);if(y instanceof wt){if(isNaN(y.h))return new Me(y.l,0,0,y.opacity);var P=y.h*zt;return new Me(y.l,Math.cos(P)*y.c,Math.sin(P)*y.c,y.opacity)}y instanceof q||(y=Z(y));var et=Q(y.r),yt=Q(y.g),Tt=Q(y.b),St=K((.2225045*et+.7168786*yt+.0606169*Tt)/At),Mt,$t;return et===yt&&yt===Tt?Mt=$t=St:(Mt=K((.4360747*et+.3850649*yt+.1430804*Tt)/Ot),$t=K((.0139322*et+.0971045*yt+.7141733*Tt)/Bt)),new Me(116*St-16,500*(Mt-St),200*(St-$t),y.opacity)}function pe(y,P){return new Me(y,0,0,P??1)}function Ae(y,P,et,yt){return arguments.length===1?oe(y):new Me(y,P,et,yt??1)}function Me(y,P,et,yt){this.l=+y,this.a=+P,this.b=+et,this.opacity=+yt}i(Me,Ae,o(s,{brighter:function(y){return new Me(this.l+pt*(y??1),this.a,this.b,this.opacity)},darker:function(y){return new Me(this.l-pt*(y??1),this.a,this.b,this.opacity)},rgb:function(){var y=(this.l+16)/116,P=isNaN(this.a)?y:y+this.a/500,et=isNaN(this.b)?y:y-this.b/200;return P=Ot*rt(P),y=At*rt(y),et=Bt*rt(et),new q(j(3.1338561*P-1.6168667*y-.4906146*et),j(-.9787684*P+1.9161415*y+.033454*et),j(.0719453*P-.2289914*y+1.4052427*et),this.opacity)}}));function K(y){return y>Jt?Math.pow(y,1/3):y/fe+kt}function rt(y){return y>Ft?y*y*y:fe*(y-kt)}function j(y){return 255*(y<=.0031308?12.92*y:1.055*Math.pow(y,1/2.4)-.055)}function Q(y){return(y/=255)<=.04045?y/12.92:Math.pow((y+.055)/1.055,2.4)}function ot(y){if(y instanceof wt)return new wt(y.h,y.c,y.l,y.opacity);if(y instanceof Me||(y=oe(y)),y.a===0&&y.b===0)return new wt(NaN,0,y.l,y.opacity);var P=Math.atan2(y.b,y.a)*Wt;return new wt(P<0?P+360:P,Math.sqrt(y.a*y.a+y.b*y.b),y.l,y.opacity)}function F(y,P,et,yt){return arguments.length===1?ot(y):new wt(et,P,y,yt??1)}function vt(y,P,et,yt){return arguments.length===1?ot(y):new wt(y,P,et,yt??1)}function wt(y,P,et,yt){this.h=+y,this.c=+P,this.l=+et,this.opacity=+yt}i(wt,vt,o(s,{brighter:function(y){return new wt(this.h,this.c,this.l+pt*(y??1),this.opacity)},darker:function(y){return new wt(this.h,this.c,this.l-pt*(y??1),this.opacity)},rgb:function(){return oe(this).rgb()}}));var jt=-.14861,Vt=1.78277,he=-.29227,de=-.90649,re=1.97294,Pt=re*de,$e=re*Vt,we=Vt*he-de*jt;function ze(y){if(y instanceof Le)return new Le(y.h,y.s,y.l,y.opacity);y instanceof q||(y=Z(y));var P=y.r/255,et=y.g/255,yt=y.b/255,Tt=(we*yt+Pt*P-$e*et)/(we+Pt-$e),St=yt-Tt,Mt=(re*(et-Tt)-he*St)/de,$t=Math.sqrt(Mt*Mt+St*St)/(re*Tt*(1-Tt)),me=$t?Math.atan2(Mt,St)*Wt-120:NaN;return new Le(me<0?me+360:me,$t,Tt,y.opacity)}function Ne(y,P,et,yt){return arguments.length===1?ze(y):new Le(y,P,et,yt??1)}function Le(y,P,et,yt){this.h=+y,this.s=+P,this.l=+et,this.opacity=+yt}i(Le,Ne,o(s,{brighter:function(y){return y=y==null?h:Math.pow(h,y),new Le(this.h,this.s,this.l*y,this.opacity)},darker:function(y){return y=y==null?l:Math.pow(l,y),new Le(this.h,this.s,this.l*y,this.opacity)},rgb:function(){var y=isNaN(this.h)?0:(this.h+120)*zt,P=+this.l,et=isNaN(this.s)?0:this.s*P*(1-P),yt=Math.cos(y),Tt=Math.sin(y);return new q(255*(P+et*(jt*yt+Vt*Tt)),255*(P+et*(he*yt+de*Tt)),255*(P+et*(re*yt)),this.opacity)}})),r.color=B,r.rgb=it,r.hsl=Ct,r.lab=Ae,r.hcl=vt,r.lch=F,r.gray=pe,r.cubehelix=Ne,Object.defineProperty(r,"__esMo
1dule",{value:!0})})});var Un=hn((Zi,Pc)=>{(function(r,i){typeof Zi=="object"&&typeof Pc<"u"?i(Zi,ar()):typeof define=="function"&&define.amd?define(["exports","d3-color"],i):(r=r||self,i(r.d3=r.d3||{},r.d3))})(Zi,function(r,i){"use strict";function o(y,P,et,yt,Tt){var St=y*y,Mt=St*y;return((1-3*y+3*St-Mt)*P+(4-6*St+3*Mt)*et+(1+3*y+3*St-3*Mt)*yt+Mt*Tt)/6}function s(y){var P=y.length-1;return function(et){var yt=et<=0?et=0:et>=1?(et=1,P-1):Math.floor(et*P),Tt=y[yt],St=y[yt+1],Mt=yt>0?y[yt-1]:2*Tt-St,$t=yt<P-1?y[yt+2]:2*St-Tt;return o((et-yt/P)*P,Mt,Tt,St,$t)}}function l(y){var P=y.length;return function(et){var yt=Math.floor(((et%=1)<0?++et:et)*P),Tt=y[(yt+P-1)%P],St=y[yt%P],Mt=y[(yt+1)%P],$t=y[(yt+2)%P];return o((et-yt/P)*P,Tt,St,Mt,$t)}}function h(y){return function(){return y}}function _(y,P){return function(et){return y+et*P}}function p(y,P,et){return y=Math.pow(y,et),P=Math.pow(P,et)-y,et=1/et,function(yt){return Math.pow(y+yt*P,et)}}function x(y,P){var et=P-y;return et?_(y,et>180||et<-180?et-360*Math.round(et/360):et):h(isNaN(y)?P:y)}function b(y){return(y=+y)==1?A:function(P,et){return et-P?p(P,et,y):h(isNaN(P)?et:P)}}function A(y,P){var et=P-y;return et?_(y,et):h(isNaN(y)?P:y)}var k=function y(P){var et=b(P);function yt(Tt,St){var Mt=et((Tt=i.rgb(Tt)).r,(St=i.rgb(St)).r),$t=et(Tt.g,St.g),me=et(Tt.b,St.b),ye=A(Tt.opacity,St.opacity);return function(ge){return Tt.r=Mt(ge),Tt.g=$t(ge),Tt.b=me(ge),Tt.opacity=ye(ge),Tt+""}}return yt.gamma=y,yt}(1);function S(y){return function(P){var et=P.length,yt=new Array(et),Tt=new Array(et),St=new Array(et),Mt,$t;for(Mt=0;Mt<et;++Mt)$t=i.rgb(P[Mt]),yt[Mt]=$t.r||0,Tt[Mt]=$t.g||0,St[Mt]=$t.b||0;return yt=y(yt),Tt=y(Tt),St=y(St),$t.opacity=1,function(me){return $t.r=yt(me),$t.g=Tt(me),$t.b=St(me),$t+""}}}var R=S(s),E=S(l);function M(y,P){P||(P=[]);var et=y?Math.min(P.length,y.length):0,yt=P.slice(),Tt;return function(St){for(Tt=0;Tt<et;++Tt)yt[Tt]=y[Tt]*(1-St)+P[Tt]*St;return yt}}function z(y){return ArrayBuffer.isView(y)&&!(y instanceof DataView)}function D(y,P){return(z(P)?M:B)(y,P)}function B(y,P){var et=P?P.length:0,yt=y?Math.min(et,y.length):0,Tt=new Array(yt),St=new Array(et),Mt;for(Mt=0;Mt<yt;++Mt)Tt[Mt]=Ct(y[Mt],P[Mt]);for(;Mt<et;++Mt)St[Mt]=P[Mt];return function($t){for(Mt=0;Mt<yt;++Mt)St[Mt]=Tt[Mt]($t);return St}}function X(y,P){var et=new Date;return y=+y,P=+P,function(yt){return et.setTime(y*(1-yt)+P*yt),et}}function U(y,P){return y=+y,P=+P,function(et){return y*(1-et)+P*et}}function Z(y,P){var et={},yt={},Tt;(y===null||typeof y!="object")&&(y={}),(P===null||typeof P!="object")&&(P={});for(Tt in P)Tt in y?et[Tt]=Ct(y[Tt],P[Tt]):yt[Tt]=P[Tt];return function(St){for(Tt in et)yt[Tt]=et[Tt](St);return yt}}var it=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,q=new RegExp(it.source,"g");function ct(y){return function(){return y}}function ut(y){return function(P){return y(P)+""}}function C(y,P){var et=it.lastIndex=q.lastIndex=0,yt,Tt,St,Mt=-1,$t=[],me=[];for(y=y+"",P=P+"";(yt=it.exec(y))&&(Tt=q.exec(P));)(St=Tt.index)>et&&(St=P.slice(et,St),$t[Mt]?$t[Mt]+=St:$t[++Mt]=St),(yt=yt[0])===(Tt=Tt[0])?$t[Mt]?$t[Mt]+=Tt:$t[++Mt]=Tt:($t[++Mt]=null,me.push({i:Mt,x:U(yt,Tt)})),et=q.lastIndex;return et<P.length&&(St=P.slice(et),$t[Mt]?$t[Mt]+=St:$t[++Mt]=St),$t.length<2?me[0]?ut(me[0].x):ct(P):(P=me.length,function(ye){for(var ge=0,_e;ge<P;++ge)$t[(_e=me[ge]).i]=_e.x(ye);return $t.join("")})}function Ct(y,P){var et=typeof P,yt;return P==null||et==="boolean"?h(P):(et==="number"?U:et==="string"?(yt=i.color(P))?(P=yt,k):C:P instanceof i.color?k:P instanceof Date?X:z(P)?M:Array.isArray(P)?B:typeof P.valueOf!="function"&&typeof P.toString!="function"||isNaN(P)?Z:U)(y,P)}function Nt(y){var P=y.length;return function(et){return y[Math.max(0,Math.min(P-1,Math.floor(et*P)))]}}function gt(y,P){var et=x(+y,+P);return function(yt){var Tt=et(yt);return Tt-360*Math.floor(Tt/360)}}function zt(y,P){return y=+y,P=+P,function(et){return Math.round(y*(1-et)+P*et)}}var Wt=180/Math.PI,pt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ot(y,P,et,yt,Tt,St){var Mt,$t,me;return(Mt=Math.sqrt(y*y+P*P))&&(y/=Mt,P/=Mt),(me=y*et+P*yt)&&(et-=y*me,yt-=P*me),($t=Math.sqrt(et*et+yt*yt))&&(et/=$t,yt/=$t,me/=$t),y*yt<P*et&&(y=-y,P=-P,me=-me,Mt=-Mt),{translateX:Tt,translateY:St,rotate:Math.atan2(P,y)*Wt,skewX:Math.atan(me)*Wt,scaleX:Mt,scaleY:$t}}var At,Bt,kt,Ft;function fe(y){return y==="none"?pt:(At||(At=document.createElement("DIV"),Bt=document.documentElement,kt=document.defaultView),At.style.transform=y,y=kt.getComputedStyle(Bt.appendChild(At),null).getPropertyValue("transform"),Bt.removeChild(At),y=y.slice(7,-1).split(","),Ot(+y[0],+y[1],+y[2],+y[3],+y[4],+y[5]))}function Jt(y){return y==null||(Ft||(Ft=document.createElementNS("http://www.w3.org/2000/svg","g")),Ft.setAttribute("transform",y),!(y=Ft.transform.baseVal.consolidate()))?pt:(y=y.matrix,Ot(y.a,y.b,y.c,y.d,y.e,y.f))}function oe(y,P,et,yt){function Tt(ye){return ye.length?ye.pop()+" ":""}function St(ye,ge,_e,Ie,Ve,tt){if(ye!==_e||ge!==Ie){var xt=Ve.push("translate(",null,P,null,et);tt.push({i:xt-4,x:U(ye,_e)},{i:xt-2,x:U(ge,Ie)})}else(_e||Ie)&&Ve.push("translate("+_e+P+Ie+et)}function Mt(ye,ge,_e,Ie){ye!==ge?(ye-ge>180?ge+=360:ge-ye>180&&(ye+=360),Ie.push({i:_e.push(Tt(_e)+"rotate(",null,yt)-2,x:U(ye,ge)})):ge&&_e.push(Tt(_e)+"rotate("+ge+yt)}function $t(ye,ge,_e,Ie){ye!==ge?Ie.push({i:_e.push(Tt(_e)+"skewX(",
1null,yt)-2,x:U(ye,ge)}):ge&&_e.push(Tt(_e)+"skewX("+ge+yt)}function me(ye,ge,_e,Ie,Ve,tt){if(ye!==_e||ge!==Ie){var xt=Ve.push(Tt(Ve)+"scale(",null,",",null,")");tt.push({i:xt-4,x:U(ye,_e)},{i:xt-2,x:U(ge,Ie)})}else(_e!==1||Ie!==1)&&Ve.push(Tt(Ve)+"scale("+_e+","+Ie+")")}return function(ye,ge){var _e=[],Ie=[];return ye=y(ye),ge=y(ge),St(ye.translateX,ye.translateY,ge.translateX,ge.translateY,_e,Ie),Mt(ye.rotate,ge.rotate,_e,Ie),$t(ye.skewX,ge.skewX,_e,Ie),me(ye.scaleX,ye.scaleY,ge.scaleX,ge.scaleY,_e,Ie),ye=ge=null,function(Ve){for(var tt=-1,xt=Ie.length,It;++tt<xt;)_e[(It=Ie[tt]).i]=It.x(Ve);return _e.join("")}}}var pe=oe(fe,"px, ","px)","deg)"),Ae=oe(Jt,", ",")",")"),Me=Math.SQRT2,K=2,rt=4,j=1e-12;function Q(y){return((y=Math.exp(y))+1/y)/2}function ot(y){return((y=Math.exp(y))-1/y)/2}function F(y){return((y=Math.exp(2*y))-1)/(y+1)}function vt(y,P){var et=y[0],yt=y[1],Tt=y[2],St=P[0],Mt=P[1],$t=P[2],me=St-et,ye=Mt-yt,ge=me*me+ye*ye,_e,Ie;if(ge<j)Ie=Math.log($t/Tt)/Me,_e=function(Xe){return[et+Xe*me,yt+Xe*ye,Tt*Math.exp(Me*Xe*Ie)]};
1else{var Ve=Math.sqrt(ge),tt=($t*$t-Tt*Tt+rt*ge)/(2*Tt*K*Ve),xt=($t*$t-Tt*Tt-rt*ge)/(2*$t*K*Ve),It=Math.log(Math.sqrt(tt*tt+1)-tt),Xt=Math.log(Math.sqrt(xt*xt+1)-xt);Ie=(Xt-It)/Me,_e=function(Xe){var V=Xe*Ie,N=Q(It),W=Tt/(K*Ve)*(N*F(Me*V+It)-ot(It));return[et+W*me,yt+W*ye,Tt*N/Q(Me*V+It)]}}return _e.duration=Ie*1e3,_e}function wt(y){return function(P,et){var yt=y((P=i.hsl(P)).h,(et=i.hsl(et)).h),Tt=A(P.s,et.s),St=A(P.l,et.l),Mt=A(P.opacity,et.opacity);return function($t){return P.h=yt($t),P.s=Tt($t),P.l=St($t),P.opacity=Mt($t),P+""}}}var jt=wt(x),Vt=wt(A);function he(y,P){var et=A((y=i.lab(y)).l,(P=i.lab(P)).l),yt=A(y.a,P.a),Tt=A(y.b,P.b),St=A(y.opacity,P.opacity);return function(Mt){return y.l=et(Mt),y.a=yt(Mt),y.b=Tt(Mt),y.opacity=St(Mt),y+""}}function de(y){return function(P,et){var yt=y((P=i.hcl(P)).h,(et=i.hcl(et)).h),Tt=A(P.c,et.c),St=A(P.l,et.l),Mt=A(P.opacity,et.opacity);return function($t){return P.h=yt($t),P.c=Tt($t),P.l=St($t),P.opacity=Mt($t),P+""}}}var re=de(x),Pt=de(A);function $e(y){return function P(et){et=+et;function yt(Tt,St){var Mt=y((Tt=i.cubehelix(Tt)).h,(St=i.cubehelix(St)).h),$t=A(Tt.s,St.s),me=A(Tt.l,St.l),ye=A(Tt.opacity,St.opacity);return function(ge){return Tt.h=Mt(ge),Tt.s=$t(ge),Tt.l=me(Math.pow(ge,et)),Tt.opacity=ye(ge),Tt+""}}return yt.gamma=P,yt}(1)}var we=$e(x),ze=$e(A);function Ne(y,P){for(var et=0,yt=P.length-1,Tt=P[0],St=new Array(yt<0?0:yt);et<yt;)St[et]=y(Tt,Tt=P[++et]);return function(Mt){var $t=Math.max(0,Math.min(yt-1,Math.floor(Mt*=yt)));return St[$t](Mt-$t)}}function Le(y,P){for(var et=new Array(P),yt=0;yt<P;++yt)et[yt]=y(yt/(P-1));return et}r.interpolate=Ct,r.interpolateArray=D,r.interpolateBasis=s,r.interpolateBasisClosed=l,r.interpolateCubehelix=we,r.interpolateCubehelixLong=ze,r.interpolateDate=X,r.interpolateDiscrete=Nt,r.interpolateHcl=re,r.interpolateHclLong=Pt,r.interpolateHsl=jt,r.interpolateHslLong=Vt,r.interpolateHue=gt,r.interpolateLab=he,r.interpolateNumber=U,r.interpolateNumberArray=M,r.interpolateObject=Z,r.interpolateRgb=k,r.interpolateRgbBasis=R,r.interpolateRgbBasisClosed=E,r.interpolateRound=zt,r.interpolateString=C,r.interpolateTransformCss=pe,r.interpolateTransformSvg=Ae,r.interpolateZoom=vt,r.piecewise=Ne,r.quantize=Le,Object.defineProperty(r,"__esModule",{value:!0})})});var ui=hn((Ki,Dc)=>{(function(r,i){typeof Ki=="object"&&typeof Dc<"u"?i(Ki):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(Ki,function(r){"use strict";function i(j){return+j}function o(j){return j*j}function s(j){return j*(2-j)}function l(j){return((j*=2)<=1?j*j:--j*(2-j)+1)/2}function h(j){return j*j*j}function _(j){return--j*j*j+1}function p(j){return((j*=2)<=1?j*j*j:(j-=2)*j*j+2)/2}var x=3,b=function j(Q){Q=+Q;function ot(F){return Math.pow(F,Q)}return ot.exponent=j,ot}(x),A=function j(Q){Q=+Q;function ot(F){return 1-Math.pow(1-F,Q)}return ot.exponent=j,ot}(x),k=function j(Q){Q=+Q;function ot(F){return((F*=2)<=1?Math.pow(F,Q):2-Math.pow(2-F,Q))/2}return ot.exponent=j,ot}(x),S=Math.PI,R=S/2;function E(j){return 1-Math.cos(j*R)}function M(j){return Math.sin(j*R)}function z(j){return(1-Math.cos(S*j))/2}function D(j){return Math.pow(2,10*j-10)}function B(j){return 1-Math.pow(2,-10*j)}function X(j){return((j*=2)<=1?Math.pow(2,10*j-10):2-Math.pow(2,10-10*j))/2}function U(j){return 1-Math.sqrt(1-j*j)}function Z(j){return Math.sqrt(1- --j*j)}function it(j){return((j*=2)<=1?1-Math.sqrt(1-j*j):Math.sqrt(1-(j-=2)*j)+1)/2}var q=4/11,ct=6/11,ut=8/11,C=3/4,Ct=9/11,Nt=10/11,gt=15/16,zt=21/22,Wt=63/64,pt=1/q/q;function Ot(j){return 1-At(1-j)}function At(j){return(j=+j)<q?pt*j*j:j<ut?pt*(j-=ct)*j+C:j<Nt?pt*(j-=Ct)*j+gt:pt*(j-=zt)*j+Wt}function Bt(j){return((j*=2)<=1?1-At(1-j):At(j-1)+1)/2}var kt=1.70158,Ft=function j(Q){Q=+Q;function ot(F){return F*F*((Q+1)*F-Q)}return ot.overshoot=j,ot}(kt),fe=function j(Q){Q=+Q;function ot(F){return--F*F*((Q+1)*F+Q)+1}return ot.overshoot=j,ot}(kt),Jt=function j(Q){Q=+Q;function ot(F){return((F*=2)<1?F*F*((Q+1)*F-Q):(F-=2)*F*((Q+1)*F+Q)+2)/2}return ot.overshoot=j,ot}(kt),oe=2*Math.PI,pe=1,Ae=.3,Me=function j(Q,ot){var F=Math.asin(1/(Q=Math.max(1,Q)))*(ot/=oe);function vt(wt){return Q*Math.pow(2,10*--wt)*Math.sin((F-wt)/ot)}return vt.amplitude=function(wt){return j(wt,ot*oe)},vt.period=function(wt){return j(Q,wt)},vt}(pe,Ae),K=function j(Q,ot){var F=Math.asin(1/(Q=Math.max(1,Q)))*(ot/=oe);
1function vt(wt){return 1-Q*Math.pow(2,-10*(wt=+wt))*Math.sin((wt+F)/ot)}return vt.amplitude=function(wt){return j(wt,ot*oe)},vt.period=function(wt){return j(Q,wt)},vt}(pe,Ae),rt=function j(Q,ot){var F=Math.asin(1/(Q=Math.max(1,Q)))*(ot/=oe);function vt(wt){return((wt=wt*2-1)<0?Q*Math.pow(2,10*wt)*Math.sin((F-wt)/ot):2-Q*Math.pow(2,-10*wt)*Math.sin((F+wt)/ot))/2}return vt.amplitude=function(wt){return j(wt,ot*oe)},vt.period=function(wt){return j(Q,wt)},vt}(pe,Ae);r.easeLinear=i,r.easeQuad=l,r.easeQuadIn=o,r.easeQuadOut=s,r.easeQuadInOut=l,r.easeCubic=p,r.easeCubicIn=h,r.easeCubicOut=_,r.easeCubicInOut=p,r.easePoly=k,r.easePolyIn=b,r.easePolyOut=A,r.easePolyInOut=k,r.easeSin=z,r.easeSinIn=E,r.easeSinOut=M,r.easeSinInOut=z,r.easeExp=X,r.easeExpIn=D,r.easeExpOut=B,r.easeExpInOut=X,r.easeCircle=it,r.easeCircleIn=U,r.easeCircleOut=Z,r.easeCircleInOut=it,r.easeBounce=At,r.easeBounceIn=Ot,r.easeBounceOut=At,r.easeBounceInOut=Bt,r.easeBack=Jt,r.easeBackIn=Ft,r.easeBackOut=fe,r.easeBackInOut=Jt,r.easeElastic=K,r.easeElasticIn=Me,r.easeElasticOut=K,r.easeElasticInOut=rt,Object.defineProperty(r,"__esModule",{value:!0})})});var Xr=hn((Qi,zc)=>{(function(r,i){typeof Qi=="object"&&typeof zc<"u"?i(Qi,Tr(),Gi(),ar(),Un(),dr(),ui()):typeof define=="function"&&define.amd?define(["exports","d3-dispatch","d3-timer","d3-color","d3-interpolate","d3-selection","d3-ease"],i):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)})(Qi,function(r,i,o,s,l,h,_){"use strict";var p=i.dispatch("start","end","cancel","interrupt"),x=[],b=0,A=1,k=2,S=3,R=4,E=5,M=6;function z(N,W,H,at,ht,dt){var mt=N.__transition;if(!mt)N.__transition={};else if(H in mt)return;U(N,H,{name:W,index:at,group:ht,on:p,tween:x,time:dt.time,delay:dt.delay,duration:dt.duration,ease:dt.ease,timer:null,state:b})}function D(N,W){var H=X(N,W);if(H.state>b)throw new Error("too late; already scheduled");return H}function B(N,W){var H=X(N,W);if(H.state>S)throw new Error("too late; already running");return H}function X(N,W){var H=N.__transition;if(!H||!(H=H[W]))throw new Error("transition not found");return H}function U(N,W,H){var at=N.__transition,ht;at[W]=H,H.timer=o.timer(dt,0,H.time);function dt(Yt){H.state=A,H.timer.restart(mt,H.delay,H.time),H.delay<=Yt&&mt(Yt-H.delay)}function mt(Yt){var Ut,ie,se,ve;if(H.state!==A)return Rt();for(Ut in at)if(ve=at[Ut],ve.name===H.name){if(ve.state===S)return o.timeout(mt);ve.state===R?(ve.state=M,ve.timer.stop(),ve.on.call("interrupt",N,N.__data__,ve.index,ve.group),delete at[Ut]):+Ut<W&&(ve.state=M,ve.timer.stop(),ve.on.call("cancel",N,N.__data__,ve.index,ve.group),delete at[Ut])}if(o.timeout(function(){H.state===S&&(H.state=R,H.timer.restart(bt,H.delay,H.time),bt(Yt))}),H.state=k,H.on.call("start",N,N.__data__,H.index,H.group),H.state===k){for(H.state=S,ht=new Array(se=H.tween.length),Ut=0,ie=-1;Ut<se;++Ut)(ve=H.tween[Ut].value.call(N,N.__data__,H.index,H.group))&&(ht[++ie]=ve);ht.length=ie+1}}function bt(Yt){for(var Ut=Yt<H.duration?H.ease.call(null,Yt/H.duration):(H.timer.restart(Rt),H.state=E,1),ie=-1,se=ht.length;++ie<se;)ht[ie].call(N,Ut);H.state===E&&(H.on.call("end",N,N.__data__,H.index,H.group),Rt())}function Rt(){H.state=M,H.timer.stop(),delete at[W];for(var Yt in at)return;delete N.__transition}}function Z(N,W){var H=N.__transition,at,ht,dt=!0,mt;if(H){W=W==null?null:W+"";for(mt in H){if((at=H[mt]).name!==W){dt=!1;continue}ht=at.state>k&&at.state<E,at.state=M,at.timer.stop(),at.on.call(ht?"interrupt":"cancel",N,N.__data__,at.index,at.group),delete H[mt]}dt&&delete N.__transition}}function it(N){return this.each(function(){Z(this,N)})}function q(N,W){var H,at;return function(){var ht=B(this,N),dt=ht.tween;if(dt!==H){at=H=dt;for(var mt=0,bt=at.length;mt<bt;++mt)if(at[mt].name===W){at=at.slice(),at.splice(mt,1);break}}ht.tween=at}}function ct(N,W,H){var at,ht;if(typeof H!="function")throw new Error;return function(){var dt=B(this,N),mt=dt.tween;if(mt!==at){ht=(at=mt).slice();for(var bt={name:W,value:H},Rt=0,Yt=ht.length;Rt<Yt;++Rt)if(ht[Rt].name===W){ht[Rt]=bt;break}Rt===Yt&&ht.push(bt)}dt.tween=ht}}function ut(N,W){var H=this._id;if(N+="",arguments.length<2){for(var at=X(this.node(),H).tween,ht=0,dt=at.length,mt;ht<dt;++ht)if((mt=at[ht]).name===N)return mt.value;return null}return this.each((W==null?q:ct)(H,N,W))}function C(N,W,H){var at=N._id;return N.each(function(){var ht=B(this,at);(ht.value||(ht.value={}))[W]=H.apply(this,arguments)}),function(ht){return X(ht,at).value[W]}}function Ct(N,W){var H;return(typeof W=="number"?l.interpolateNumber:W instanceof s.color?l.interpolateRgb:(H=s.color(W))?(W=H,l.interpolateRgb):l.interpolateString)(N,W)}function Nt(N){return function(){this.removeAttribute(N)}}function gt(N){return function(){this.removeAttributeNS(N.space,N.local)}}function zt(N,W,H){var at,ht=H+"",dt;return function(){var mt=this.getAttribute(N);return mt===ht?null:mt===at?dt:dt=W(at=mt,H)}}function Wt(N,W,H){var at,ht=H+"",dt;return function(){var mt=this.getAttributeNS(N.space,N.local);return mt===ht?null:mt===at?dt:dt=W(at=mt,H)}}function pt(N,W,H){var at,ht,dt;return function(){var mt,bt=H(this),Rt;return bt==null?void this.removeAttribute(N):(mt=this.getAttribute(N),Rt=bt+"",mt===Rt?null:mt===at&&Rt===ht?dt:(ht=Rt,dt=W(at=mt,bt)))}}function Ot(N,W,H){var at,ht,dt;return function(){var mt,bt=H(this),Rt;return bt==null?void this.removeAttributeNS(N.space,N.local):(mt=this.getAttributeNS(N.space,N.local),Rt=bt+"",mt===Rt?null:mt===at&&Rt===ht?dt:(ht=Rt,dt=W(at=mt,bt)))}}function At(N,W){var H=h.namespace(N),at=H==="transform"?l.interpolateTransformSvg:Ct;return this.attrTween(N,typeof W=="function"?(H.local?Ot:pt)(H,at,C(this,"attr."+N,W)):W==null?(H.local?gt:Nt)(H):(H.local?Wt:zt)(H,at,W))}function Bt(N,W){return function(H){this.setAttribute(N,W(H))}}function kt(N,W){return function(H){this.setAttributeNS(N.space,N.local,W(H))}}function Ft(N,W){var H,at;function ht(){var dt=W.apply(this,arguments);return dt!==at&&(H=(at=dt)&&kt(N,dt)),H}return ht._value=W,ht}function fe(N,W){var H,at;function ht(){var dt=W.apply(this,arguments);return dt!==at&&(H=(at=dt)&&Bt(N,dt)),H}return ht._value=W,ht}function Jt(N,W){var H="attr."+N;if(arguments.length<2)return(H=this.tween(H))&&H._value;if(W==null)return this.tween(H,null);if(typeof W!="function")throw new Error;var at=h.namespace(N);return this.tween(H,(at.local?Ft:fe)(at,W))}function oe(N,W){return function(){D(this,N).delay=+W.apply(this,arguments)}}function pe(N,W){return W=+W,function(){D(this,N).delay=W}}function Ae(N){var W=this._id;return arguments.length?this.each((typeof N=="function"?oe:pe)(W,N)):X(this.node(),W).delay}function Me(N,W){return function(){B(this,N).duration=+W.apply(this,arguments)}}function K(N,W){return W=+W,function(){B(this,N).duration=W}}function rt(N){var W=this._id;return arguments.length?this.each((typeof N=="function"?Me:K)(W,N)):X(this.node(),W).duration}function j(N,W){if(typeof W!="function")throw new Error;return function(){B(this,N).ease=W}}function Q(N){var W=this._id;return arguments.length?this.each(j(W,N)):X(this.node(),W).ease}function ot(N){typeof N!="function"&&(N=h.matcher(N));for(var W=this._groups,H=W.length,at=new Array(H),ht=0;ht<H;++ht)for(var dt=W[ht],mt=dt.length,bt=at[ht]=[],Rt,Yt=0;Yt<mt;++Yt)(Rt=dt[Yt])&&N.call(Rt,Rt.__data__,Yt,dt)&&bt.push(Rt);return new _e(at,this._parents,this._name,this._id)}
1function F(N){if(N._id!==this._id)throw new Error;for(var W=this._groups,H=N._groups,at=W.length,ht=H.length,dt=Math.min(at,ht),mt=new Array(at),bt=0;bt<dt;++bt)for(var Rt=W[bt],Yt=H[bt],Ut=Rt.length,ie=mt[bt]=new Array(Ut),se,ve=0;ve<Ut;++ve)(se=Rt[ve]||Yt[ve])&&(ie[ve]=se);for(;bt<at;++bt)mt[bt]=W[bt];return new _e(mt,this._parents,this._name,this._id)}function vt(N){return(N+"").trim().split(/^|\s+/).every(function(W){var H=W.indexOf(".");return H>=0&&(W=W.slice(0,H)),!W||W==="start"})}function wt(N,W,H){var at,ht,dt=vt(W)?D:B;return function(){var mt=dt(this,N),bt=mt.on;bt!==at&&(ht=(at=bt).copy()).on(W,H),mt.on=ht}}function jt(N,W){var H=this._id;return arguments.length<2?X(this.node(),H).on.on(N):this.each(wt(H,N,W))}function Vt(N){return function(){var W=this.parentNode;for(var H in this.__transition)if(+H!==N)return;W&&W.removeChild(this)}}function he(){return this.on("end.remove",Vt(this._id))}function de(N){var W=this._name,H=this._id;typeof N!="function"&&(N=h.selector(N));for(var at=this._groups,ht=at.length,dt=new Array(ht),mt=0;mt<ht;++mt)for(var bt=at[mt],Rt=bt.length,Yt=dt[mt]=new Array(Rt),Ut,ie,se=0;se<Rt;++se)(Ut=bt[se])&&(ie=N.call(Ut,Ut.__data__,se,bt))&&("__data__"in Ut&&(ie.__data__=Ut.__data__),Yt[se]=ie,z(Yt[se],W,H,se,Yt,X(Ut,H)));return new _e(dt,this._parents,W,H)}function re(N){var W=this._name,H=this._id;typeof N!="function"&&(N=h.selectorAll(N));for(var at=this._groups,ht=at.length,dt=[],mt=[],bt=0;bt<ht;++bt)for(var Rt=at[bt],Yt=Rt.length,Ut,ie=0;ie<Yt;++ie)if(Ut=Rt[ie]){for(var se=N.call(Ut,Ut.__data__,ie,Rt),ve,je=X(Ut,H),nn=0,sn=se.length;nn<sn;++nn)(ve=se[nn])&&z(ve,W,H,nn,se,je);dt.push(se),mt.push(Ut)}return new _e(dt,mt,W,H)}var Pt=h.selection.prototype.constructor;function $e(){return new Pt(this._groups,this._parents)}function we(N,W){var H,at,ht;return function(){var dt=h.style(this,N),mt=(this.style.removeProperty(N),h.style(this,N));return dt===mt?null:dt===H&&mt===at?ht:ht=W(H=dt,at=mt)}}function ze(N){return function(){this.style.removeProperty(N)}}function Ne(N,W,H){var at,ht=H+"",dt;return function(){var mt=h.style(this,N);return mt===ht?null:mt===at?dt:dt=W(at=mt,H)}}function Le(N,W,H){var at,ht,dt;return function(){var mt=h.style(this,N),bt=H(this),Rt=bt+"";return bt==null&&(Rt=bt=(this.style.removeProperty(N),h.style(this,N))),mt===Rt?null:mt===at&&Rt===ht?dt:(ht=Rt,dt=W(at=mt,bt))}}function y(N,W){var H,at,ht,dt="style."+W,mt="end."+dt,bt;return function(){var Rt=B(this,N),Yt=Rt.on,Ut=Rt.value[dt]==null?bt||(bt=ze(W)):void 0;(Yt!==H||ht!==Ut)&&(at=(H=Yt).copy()).on(mt,ht=Ut),Rt.on=at}}function P(N,W,H){var at=(N+="")=="transform"?l.interpolateTransformCss:Ct;return W==null?this.styleTween(N,we(N,at)).on("end.style."+N,ze(N)):typeof W=="function"?this.styleTween(N,Le(N,at,C(this,"style."+N,W))).each(y(this._id,N)):this.styleTween(N,Ne(N,at,W),H).on("end.style."+N,null)}function et(N,W,H){return function(at){this.style.setProperty(N,W(at),H)}}function yt(N,W,H){var at,ht;function dt(){var mt=W.apply(this,arguments);return mt!==ht&&(at=(ht=mt)&&et(N,mt,H)),at}return dt._value=W,dt}function Tt(N,W,H){var at="style."+(N+="");if(arguments.length<2)return(at=this.tween(at))&&at._value;if(W==null)return this.tween(at,null);if(typeof W!="function")throw new Error;return this.tween(at,yt(N,W,H??""))}function St(N){return function(){this.textContent=N}}function Mt(N){return function(){var W=N(this);this.textContent=W??""}}function $t(N){return this.tween("text",typeof N=="function"?Mt(C(this,"text",N)):St(N==null?"":N+""))}function me(){for(var N=this._name,W=this._id,H=Ve(),at=this._groups,ht=at.length,dt=0;dt<ht;++dt)for(var mt=at[dt],bt=mt.length,Rt,Yt=0;Yt<bt;++Yt)if(Rt=mt[Yt]){var Ut=X(Rt,W);z(Rt,N,H,Yt,mt,{time:Ut.time+Ut.delay+Ut.duration,delay:0,duration:Ut.duration,ease:Ut.ease})}return new _e(at,this._parents,N,H)}function ye(){var N,W,H=this,at=H._id,ht=H.size();return new Promise(function(dt,mt){var bt={value:mt},Rt={value:function(){--ht===0&&dt()}};H.each(function(){var Yt=B(this,at),Ut=Yt.on;Ut!==N&&(W=(N=Ut).copy(),W._.cancel.push(bt),W._.interrupt.push(bt),W._.end.push(Rt)),Yt.on=W})})}var ge=0;function _e(N,W,H,at){this._groups=N,this._parents=W,this._name=H,this._id=at}function Ie(N){return h.selection().transition(N)}function Ve(){return++ge}var tt=h.selection.prototype;_e.prototype=Ie.prototype={constructor:_e,select:de,selectAll:re,filter:ot,merge:F,selection:$e,transition:me,call:tt.call,nodes:tt.nodes,node:tt.node,size:tt.size,empty:tt.empty,each:tt.each,on:jt,attr:At,attrTween:Jt,style:P,styleTween:Tt,text:$t,remove:he,tween:ut,delay:Ae,duration:rt,ease:Q,end:ye};var xt={time:null,delay:0,duration:250,ease:_.easeCubicInOut};function It(N,W){for(var H;!(H=N.__transition)||!(H=H[W]);)if(!(N=N.parentNode))return xt.time=o.now(),xt;return H}function Xt(N){var W,H;N instanceof _e?(W=N._id,N=N._name):(W=Ve(),(H=xt).time=o.now(),N=N==null?null:N+"");for(var at=this._groups,ht=at.length,dt=0;dt<ht;++dt)for(var mt=at[dt],bt=mt.length,Rt,Yt=0;Yt<bt;++Yt)(Rt=mt[Yt])&&z(Rt,N,W,Yt,mt,H||It(Rt,W));return new _e(at,this._parents,N,W)}h.selection.prototype.interrupt=it,h.selection.prototype.transition=Xt;var Xe=[null];function V(N,W){var H=N.__transition,at,ht;if(H){W=W==null?null:W+"";for(ht in H)if((at=H[ht]).state>A&&at.name===W)return new _e([[N]],Xe,W,+ht)}return null}r.transition=Ie,r.active=V,r.interrupt=Z,Object.defineProperty(r,"__esMo
1dule",{value:!0})})});var ta=hn((Ji,Fc)=>{(function(r,i){typeof Ji=="object"&&typeof Fc<"u"?i(Ji):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(Ji,function(r){"use strict";var i=Array.prototype.slice;function o(B){return B}var s=1,l=2,h=3,_=4,p=1e-6;function x(B){return"translate("+(B+.5)+",0)"}function b(B){return"translate(0,"+(B+.5)+")"}function A(B){return function(X){return+B(X)}}function k(B){var X=Math.max(0,B.bandwidth()-1)/2;return B.round()&&(X=Math.round(X)),function(U){return+B(U)+X}}function S(){return!this.__axis}function R(B,X){var U=[],Z=null,it=null,q=6,ct=6,ut=3,C=B===s||B===_?-1:1,Ct=B===_||B===l?"x":"y",Nt=B===s||B===h?x:b;function gt(zt){var Wt=Z??(X.ticks?X.ticks.apply(X,U):X.domain()),pt=it??(X.tickFormat?X.tickFormat.apply(X,U):o),Ot=Math.max(q,0)+ut,At=X.range(),Bt=+At[0]+.5,kt=+At[At.length-1]+.5,Ft=(X.bandwidth?k:A)(X.copy()),fe=zt.selection?zt.selection():zt,Jt=fe.selectAll(".domain").data([null]),oe=fe.selectAll(".tick").data(Wt,X).order(),pe=oe.exit(),Ae=oe.enter().append("g").attr("class","tick"),Me=oe.select("line"),K=oe.select("text");Jt=Jt.merge(Jt.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),oe=oe.merge(Ae),Me=Me.merge(Ae.append("line").attr("stroke","currentColor").attr(Ct+"2",C*q)),K=K.merge(Ae.append("text").attr("fill","currentColor").attr(Ct,C*Ot).attr("dy",B===s?"0em":B===h?"0.71em":"0.32em")),zt!==fe&&(Jt=Jt.transition(zt),oe=oe.transition(zt),Me=Me.transition(zt),K=K.transition(zt),pe=pe.transition(zt).attr("opacity",p).attr("transform",function(rt){return isFinite(rt=Ft(rt))?Nt(rt):this.getAttribute("transform")}),Ae.attr("opacity",p).attr("transform",function(rt){var j=this.parentNode.__axis;return Nt(j&&isFinite(j=j(rt))?j:Ft(rt))})),pe.remove(),Jt.attr("d",B===_||B==l?ct?"M"+C*ct+","+Bt+"H0.5V"+kt+"H"+C*ct:"M0.5,"+Bt+"V"+kt:ct?"M"+Bt+","+C*ct+"V0.5H"+kt+"V"+C*ct:"M"+Bt+",0.5H"+kt),oe.attr("opacity",1).attr("transform",function(rt){return Nt(Ft(rt))}),Me.attr(Ct+"2",C*q),K.attr(Ct,C*Ot).text(pt),fe.filter(S).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",B===l?"start":B===_?"end":"middle"),fe.each(function(){this.__axis=Ft})}return gt.scale=function(zt){return arguments.length?(X=zt,gt):X},gt.ticks=function(){return U=i.call(arguments),gt},gt.tickArguments=function(zt){return arguments.length?(U=zt==null?[]:i.call(zt),gt):U.slice()},gt.tickValues=function(zt){return arguments.length?(Z=zt==null?null:i.call(zt),gt):Z&&Z.slice()},gt.tickFormat=function(zt){return arguments.length?(it=zt,gt):it},gt.tickSize=function(zt){return arguments.length?(q=ct=+zt,gt):q},gt.tickSizeInner=function(zt){return arguments.length?(q=+zt,gt):q},gt.tickSizeOuter=function(zt){return arguments.length?(ct=+zt,gt):ct},gt.tickPadding=function(zt){return arguments.length?(ut=+zt,gt):ut},gt}function E(B){return R(s,B)}function M(B){return R(l,B)}function z(B){return R(h,B)}function D(B){return R(_,B)}r.axisTop=E,r.axisRight=M,r.axisBottom=z,r.axisLeft=D,Object.defineProperty(r,"__esModule",{value:!0})})});var Br=hn((ea,Ic)=>{(function(r,i){typeof ea=="object"&&typeof Ic<"u"?i(ea,dr(),Tr()):typeof define=="function"&&define.amd?define(["exports","d3-selection","d3-dispatch"],i):i(r.d3=r.d3||{},r.d3,r.d3)})(ea,function(r,i,o){"use strict";function s(){i.event.stopImmediatePropagation()}function l(){i.event.preventDefault(),i.event.stopImmediatePropagation()}function h(E){var M=E.document.documentElement,z=i.select(E).on("dragstart.drag",l,!0);"onselectstart"in M?z.on("selectstart.drag",l,!0):(M.__noselect=M.style.MozUserSelect,M.style.MozUserSelect="none")}function _(E,M){var z=E.document.documentElement,D=i.select(E).on("dragstart.drag",null);M&&(D.on("click.drag",l,!0),setTimeout(function(){D.on("click.drag",null)},0)),"onselectstart"in z?D.on("selectstart.drag",null):(z.style.MozUserSelect=z.__noselect,delete z.__noselect)}function p(E){return function(){return E}}function x(E,M,z,D,B,X,U,Z,it,q){this.target=E,this.type=M,this.subject=z,this.identifier=D,this.active=B,this.x=X,this.y=U,this.dx=Z,this.dy=it,this._=q}x.prototype.on=function(){var E=this._.on.apply(this._,arguments);return E===this._?this:E};function b(){return!i.event.button}function A(){return this.parentNode}function k(E){return E??{x:i.event.x,y:i.event.y}}function S(){return"ontouchstart"in this}function R(){var E=b,M=A,z=k,D=S,B={},X=o.dispatch("start","drag","end"),U=0,Z,it,q,ct,ut=0;function C(At){At.on("mousedown.drag",Ct).filter(D).on("touchstart.drag",zt).on("touchmove.drag",Wt).on("touchend.drag touchcancel.drag",pt).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function Ct(){if(!(ct||!E.apply(this,arguments))){var At=Ot("mou
1se",M.apply(this,arguments),i.mouse,this,arguments);At&&(i.select(i.event.view).on("mousemove.drag",Nt,!0).on("mouseup.drag",gt,!0),h(i.event.view),s(),q=!1,Z=i.event.clientX,it=i.event.clientY,At("start"))}}function Nt(){if(l(),!q){var At=i.event.clientX-Z,Bt=i.event.clientY-it;q=At*At+Bt*Bt>ut}B.mouse("drag")}function gt(){i.select(i.event.view).on("mousemove.drag mouseup.drag",null),_(i.event.view,q),l(),B.mouse("end")}function zt(){if(E.apply(this,arguments)){var At=i.event.changedTouches,Bt=M.apply(this,arguments),kt=At.length,Ft,fe;for(Ft=0;Ft<kt;++Ft)(fe=Ot(At[Ft].identifier,Bt,i.touch,this,arguments))&&(s(),fe("start"))}}function Wt(){var At=i.event.changedTouches,Bt=At.length,kt,Ft;for(kt=0;kt<Bt;++kt)(Ft=B[At[kt].identifier])&&(l(),Ft("drag"))}function pt(){var At=i.event.changedTouches,Bt=At.length,kt,Ft;for(ct&&clearTimeout(ct),ct=setTimeout(function(){ct=null},500),kt=0;kt<Bt;++kt)(Ft=B[At[kt].identifier])&&(s(),Ft("end"))}function Ot(At,Bt,kt,Ft,fe){var Jt=kt(Bt,At),oe,pe,Ae,Me=X.copy();if(i.customEvent(new x(C,"beforestart",oe,At,U,Jt[0],Jt[1],0,0,Me),function(){return(i.event.subject=oe=z.apply(Ft,fe))==null?!1:(pe=oe.x-Jt[0]||0,Ae=oe.y-Jt[1]||0,!0)}))return function K(rt){var j=Jt,Q;switch(rt){case"start":B[At]=K,Q=U++;break;case"end":delete B[At],--U;case"drag":Jt=kt(Bt,At),Q=U;break}i.customEvent(new x(C,rt,oe,At,Q,Jt[0]+pe,Jt[1]+Ae,Jt[0]-j[0],Jt[1]-j[1],Me),Me.apply,Me,[rt,Ft,fe])}}return C.filter=function(At){return arguments.length?(E=typeof At=="function"?At:p(!!At),C):E},C.container=function(At){return arguments.length?(M=typeof At=="function"?At:p(At),C):M},C.subject=function(At){return arguments.length?(z=typeof At=="function"?At:p(At),C):z},C.touchable=function(At){return arguments.length?(D=typeof At=="function"?At:p(!!At),C):D},C.on=function(){var At=X.on.apply(X,arguments);return At===X?C:At},C.clickDistance=function(At){return arguments.length?(ut=(At=+At)*At,C):Math.sqrt(ut)},C}r.drag=R,r.dragDisable=h,r.dragEnable=_,Object.defineProperty(r,"__esModule",{value:!0})})});var ra=hn((na,Nc)=>{(function(r,i){typeof na=="object"&&typeof Nc<"u"?i(na,dr(),Tr(),Br(),Un(),Xr()):typeof define=="function"&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-drag","d3-interpolate","d3-transition"],i):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3)})(na,function(r,i,o,s,l,h){"use strict";function _(pt){return function(){return pt}}function p(pt,Ot,At){this.target=pt,this.type=Ot,this.selection=At}function x(){i.event.stopImmediatePropagation()}function b(){i.event.preventDefault(),i.event.stopImmediatePropagation()}var A={name:"drag"},k={name:"space"},S={name:"handle"},R={name:"center"},E={name:"x",handles:["e","w"].map(it),input:function(pt,Ot){return pt&&[[pt[0],Ot[0][1]],[pt[1],Ot[1][1]]]},output:function(pt){return pt&&[pt[0][0],pt[1][0]]}},M={name:"y",handles:["n","s"].map(it),input:function(pt,Ot){return pt&&[[Ot[0][0],pt[0]],[Ot[1][0],pt[1]]]},output:function(pt){return pt&&[pt[0][1],pt[1][1]]}},z={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(it),input:function(pt){return pt},output:function(pt){return pt}},D={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},B={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},X={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},U={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Z={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function it(pt){return{type:pt}}function q(){return!i.event.button}function ct(){var pt=this.ownerSVGElement||this;return[[0,0],[pt.width.baseVal.value,pt.height.baseVal.value]]}function ut(pt){for(;!pt.__brush;)if(!(pt=pt.parentNode))return;return pt.__brush}function C(pt){return pt[0][0]===pt[1][0]||pt[0][1]===pt[1][1]}function Ct(pt){var Ot=pt.__brush;return Ot?Ot.dim.output(Ot.selection):null}function Nt(){return Wt(E)}function gt(){return Wt(M)}function zt(){return Wt(z)}function Wt(pt){var Ot=ct,At=q,Bt=o.dispatch(fe,"start","brush","end"),kt=6,Ft;function fe(K){var rt=K.property("__brush",Me).selectAll(".overlay").data([it("overlay")]);rt.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",D.overlay).merge(rt).each(function(){var Q=ut(this).extent;i.select(this).attr("x",Q[0][0]).attr("y",Q[0][1]).attr("width",Q[1][0]-Q[0][0]).attr("height",Q[1][1]-Q[0][1])}),K.selectAll(".selection").data([it("selection")]).enter().append("rect").attr("class","selection").attr("cursor",D.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var j=K.selectAll(".handle").data(pt.handles,function(Q){return Q.type});
1j.exit().remove(),j.enter().append("rect").attr("class",function(Q){return"handle handle--"+Q.type}).attr("cursor",function(Q){return D[Q.type]}),K.each(Jt).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",Ae)}fe.move=function(K,rt){K.selection?K.on("start.brush",function(){oe(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){oe(this,arguments).end()}).tween("brush",function(){var j=this,Q=j.__brush,ot=oe(j,arguments),F=Q.selection,vt=pt.input(typeof rt=="function"?rt.apply(this,arguments):rt,Q.extent),wt=l.interpolate(F,vt);function jt(Vt){Q.selection=Vt===1&&C(vt)?null:wt(Vt),Jt.call(j),ot.brush()}return F&&vt?jt:jt(1)}):K.each(function(){var j=this,Q=arguments,ot=j.__brush,F=pt.input(typeof rt=="function"?rt.apply(j,Q):rt,ot.extent),vt=oe(j,Q).beforestart();h.interrupt(j),ot.selection=F==null||C(F)?null:F,Jt.call(j),vt.start().brush().end()})};function Jt(){var K=i.select(this),rt=ut(this).selection;rt?(K.selectAll(".selection").style("display",null).attr("x",rt[0][0]).attr("y",rt[0][1]).attr("width",rt[1][0]-rt[0][0]).attr("height",rt[1][1]-rt[0][1]),K.selectAll(".handle").style("display",null).attr("x",function(j){return j.type[j.type.length-1]==="e"?rt[1][0]-kt/2:rt[0][0]-kt/2}).attr("y",function(j){return j.type[0]==="s"?rt[1][1]-kt/2:rt[0][1]-kt/2}).attr("width",function(j){return j.type==="n"||j.type==="s"?rt[1][0]-rt[0][0]+kt:kt}).attr("height",function(j){return j.type==="e"||j.type==="w"?rt[1][1]-rt[0][1]+kt:kt})):K.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function oe(K,rt){return K.__brush.emitter||new pe(K,rt)}function pe(K,rt){this.that=K,this.args=rt,this.state=K.__brush,this.active=0}pe.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting&&(this.starting=!1,this.emit("start")),this},brush:function(){return this.emit("brush"),this},end:function(){return--this.active===0&&(delete this.state.emitter,this.emit("end")),this},emit:function(K){i.customEvent(new p(fe,K,pt.output(this.state.selection)),Bt.apply,Bt,[K,this.that,this.args])}};function Ae(){if(i.event.touches){if(i.event.changedTouches.length<i.event.touches.length)return b()}else if(Ft)return;if(!At.apply(this,arguments))return;var K=this,rt=i.event.target.__data__.type,j=(i.event.metaKey?rt="overlay":rt)==="selection"?A:i.event.altKey?R:S,Q=pt===M?null:U[rt],ot=pt===E?null:Z[rt],F=ut(K),vt=F.extent,wt=F.selection,jt=vt[0][0],Vt,he,de=vt[0][1],re,Pt,$e=vt[1][0],we,ze,Ne=vt[1][1],Le,y,P,et,yt,Tt=Q&&ot&&i.event.shiftKey,St,Mt,$t=i.mouse(K),me=$t,ye=oe(K,arguments).beforestart();rt==="overlay"?F.selection=wt=[[Vt=pt===M?jt:$t[0],re=pt===E?de:$t[1]],[we=pt===M?$e:Vt,Le=pt===E?Ne:re]]:(Vt=wt[0][0],re=wt[0][1],we=wt[1][0],Le=wt[1][1]),he=Vt,Pt=re,ze=we,y=Le;var ge=i.select(K).attr("pointer-events","none"),_e=ge.selectAll(".overlay").attr("cursor",D[rt]);if(i.event.touches)ge.on("touchmove.brush",Ve,!0).on("touchend.brush touchcancel.brush",xt,!0);else{var Ie=i.select(i.event.view).on("keydown.brush",It,!0).on("keyup.brush",Xt,!0).on("mousemove.brush",Ve,!0).on("mouseup.brush",xt,!0);s.dragDisable(i.event.view)}x(),h.interrupt(K),Jt.call(K),ye.start();function Ve(){var Xe=i.mouse(K);Tt&&!St&&!Mt&&(Math.abs(Xe[0]-me[0])>Math.abs(Xe[1]-me[1])?Mt=!0:St=!0),me=Xe,yt=!0,b(),tt()}function tt(){var Xe;switch(P=me[0]-$t[0],et=me[1]-$t[1],j){case k:case A:{Q&&(P=Math.max(jt-Vt,Math.min($e-we,P)),he=Vt+P,ze=we+P),ot&&(et=Math.max(de-re,Math.min(Ne-Le,et)),Pt=re+et,y=Le+et);break}case S:{Q<0?(P=Math.max(jt-Vt,Math.min($e-Vt,P)),he=Vt+P,ze=we):Q>0&&(P=Math.max(jt-we,Math.min($e-we,P)),he=Vt,ze=we+P),ot<0?(et=Math.max(de-re,Math.min(Ne-re,et)),Pt=re+et,y=Le):ot>0&&(et=Math.max(de-Le,Math.min(Ne-Le,et)),Pt=re,y=Le+et);break}case R:{Q&&(he=Math.max(jt,Math.min($e,Vt-P*Q)),ze=Math.max(jt,Math.min($e,we+P*Q))),ot&&(Pt=Math.max(de,Math.min(Ne,re-et*ot)),y=Math.max(de,Math.min(Ne,Le+et*ot)));break}}ze<he&&(Q*=-1,Xe=Vt,Vt=we,we=Xe,Xe=he,he=ze,ze=Xe,rt in B&&_e.attr("cursor",D[rt=B[rt]])),y<Pt&&(ot*=-1,Xe=re,re=Le,Le=Xe,Xe=Pt,Pt=y,y=Xe,rt in X&&_e.attr("cursor",D[rt=X[rt]])),F.selection&&(wt=F.selection),St&&(he=wt[0][0],ze=wt[1][0]),Mt&&(Pt=wt[0][1],y=wt[1][1]),(wt[0][0]!==he||wt[0][1]!==Pt||wt[1][0]!==ze||wt[1][1]!==y)&&(F.selection=[[he,Pt],[ze,y]],Jt.call(K),ye.brush())}
1function xt(){if(x(),i.event.touches){if(i.event.touches.length)return;Ft&&clearTimeout(Ft),Ft=setTimeout(function(){Ft=null},500),ge.on("touchmove.brush touchend.brush touchcancel.brush",null)}else s.dragEnable(i.event.view,yt),Ie.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);ge.attr("pointer-events","all"),_e.attr("cursor",D.overlay),F.selection&&(wt=F.selection),C(wt)&&(F.selection=null,Jt.call(K)),ye.end()}function It(){switch(i.event.keyCode){case 16:{Tt=Q&&ot;break}case 18:{j===S&&(Q&&(we=ze-P*Q,Vt=he+P*Q),ot&&(Le=y-et*ot,re=Pt+et*ot),j=R,tt());break}case 32:{(j===S||j===R)&&(Q<0?we=ze-P:Q>0&&(Vt=he-P),ot<0?Le=y-et:ot>0&&(re=Pt-et),j=k,_e.attr("cursor",D.selection),tt());break}default:return}b()}function Xt(){switch(i.event.keyCode){case 16:{Tt&&(St=Mt=Tt=!1,tt());break}case 18:{j===R&&(Q<0?we=ze:Q>0&&(Vt=he),ot<0?Le=y:ot>0&&(re=Pt),j=S,tt());break}case 32:{j===k&&(i.event.altKey?(Q&&(we=ze-P*Q,Vt=he+P*Q),ot&&(Le=y-et*ot,re=Pt+et*ot),j=R):(Q<0?we=ze:Q>0&&(Vt=he),ot<0?Le=y:ot>0&&(re=Pt),j=S),_e.attr("cursor",D[rt]),tt());break}default:return}b()}}function Me(){var K=this.__brush||{selection:null};return K.extent=Ot.apply(this,arguments),K.dim=pt,K}return fe.extent=function(K){return arguments.length?(Ot=typeof K=="function"?K:_([[+K[0][0],+K[0][1]],[+K[1][0],+K[1][1]]]),fe):Ot},fe.filter=function(K){return arguments.length?(At=typeof K=="function"?K:_(!!K),fe):At},fe.handleSize=function(K){return arguments.length?(kt=+K,fe):kt},fe.on=function(){var K=Bt.on.apply(Bt,arguments);return K===Bt?fe:K},fe}r.brush=zt,r.brushX=Nt,r.brushY=gt,r.brushSelection=Ct,Object.defineProperty(r,"__esModule",{value:!0})})});var li=hn((ia,Xc)=>{(function(r,i){typeof ia=="object"&&typeof Xc<"u"?i(ia):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(ia,function(r){"use strict";var i="$";function o(){}o.prototype=s.prototype={constructor:o,has:function(M){return i+M in this},get:function(M){return this[i+M]},set:function(M,z){return this[i+M]=z,this},remove:function(M){var z=i+M;return z in this&&delete this[z]},clear:function(){for(var M in this)M[0]===i&&delete this[M]},keys:function(){var M=[];for(var z in this)z[0]===i&&M.push(z.slice(1));return M},values:function(){var M=[];for(var z in this)z[0]===i&&M.push(this[z]);return M},entries:function(){var M=[];for(var z in this)z[0]===i&&M.push({key:z.slice(1),value:this[z]});return M},size:function(){var M=0;for(var z in this)z[0]===i&&++M;return M},empty:function(){for(var M in this)if(M[0]===i)return!1;return!0},each:function(M){for(var z in this)z[0]===i&&M(this[z],z.slice(1),this)}};function s(M,z){var D=new o;if(M instanceof o)M.each(function(it,q){D.set(q,it)});else if(Array.isArray(M)){var B=-1,X=M.length,U;if(z==null)for(;++B<X;)D.set(B,M[B]);else for(;++B<X;)D.set(z(U=M[B],B,M),U)}else if(M)for(var Z in M)D.set(Z,M[Z]);return D}function l(){var M=[],z=[],D,B,X;function U(it,q,ct,ut){if(q>=M.length)return D!=null&&it.sort(D),B!=null?B(it):it;for(var C=-1,Ct=it.length,Nt=M[q++],gt,zt,Wt=s(),pt,Ot=ct();++C<Ct;)(pt=Wt.get(gt=Nt(zt=it[C])+""))?pt.push(zt):Wt.set(gt,[zt]);return Wt.each(function(At,Bt){ut(Ot,Bt,U(At,q,ct,ut))}),Ot}function Z(it,q){if(++q>M.length)return it;var ct,ut=z[q-1];return B!=null&&q>=M.length?ct=it.entries():(ct=[],it.each(function(C,Ct){ct.push({key:Ct,values:Z(C,q)})})),ut!=null?ct.sort(function(C,Ct){return ut(C.key,Ct.key)}):ct}return X={object:function(it){return U(it,0,h,_)},map:function(it){return U(it,0,p,x)},entries:function(it){return Z(U(it,0,p,x),0)},key:function(it){return M.push(it),X},sortKeys:function(it){return z[M.length-1]=it,X},sortValues:function(it){return D=it,X},rollup:function(it){return B=it,X}}}function h(){return{}}function _(M,z,D){M[z]=D}function p(){return s()}function x(M,z,D){M.set(z,D)}function b(){}var A=s.prototype;b.prototype=k.prototype={constructor:b,has:A.has,add:function(M){return M+="",this[i+M]=M,this},remove:A.remove,clear:A.clear,values:A.keys,size:A.size,empty:A.empty,each:A.each};function k(M,z){var D=new b;if(M instanceof b)M.each(function(U){D.add(U)});else if(M){var B=-1,X=M.length;if(z==null)for(;++B<X;
1)D.add(M[B]);else for(;++B<X;)D.add(z(M[B],B,M))}return D}function S(M){var z=[];for(var D in M)z.push(D);return z}function R(M){var z=[];for(var D in M)z.push(M[D]);return z}function E(M){var z=[];for(var D in M)z.push({key:D,value:M[D]});return z}r.nest=l,r.set=k,r.map=s,r.keys=S,r.values=R,r.entries=E,Object.defineProperty(r,"__esModule",{value:!0})})});var or=hn((aa,Bc)=>{(function(r,i){typeof aa=="object"&&typeof Bc<"u"?i(aa):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(aa,function(r){"use strict";function i(K,rt){return K<rt?-1:K>rt?1:K>=rt?0:NaN}function o(K){return K.length===1&&(K=s(K)),{left:function(rt,j,Q,ot){for(Q==null&&(Q=0),ot==null&&(ot=rt.length);Q<ot;){var F=Q+ot>>>1;K(rt[F],j)<0?Q=F+1:ot=F}return Q},right:function(rt,j,Q,ot){for(Q==null&&(Q=0),ot==null&&(ot=rt.length);Q<ot;){var F=Q+ot>>>1;K(rt[F],j)>0?ot=F:Q=F+1}return Q}}}function s(K){return function(rt,j){return i(K(rt),j)}}var l=o(i),h=l.right,_=l.left;function p(K,rt){rt==null&&(rt=x);for(var j=0,Q=K.length-1,ot=K[0],F=new Array(Q<0?0:Q);j<Q;)F[j]=rt(ot,ot=K[++j]);return F}function x(K,rt){return[K,rt]}function b(K,rt,j){var Q=K.length,ot=rt.length,F=new Array(Q*ot),vt,wt,jt,Vt;for(j==null&&(j=x),vt=jt=0;vt<Q;++vt)for(Vt=K[vt],wt=0;wt<ot;++wt,++jt)F[jt]=j(Vt,rt[wt]);return F}function A(K,rt){return rt<K?-1:rt>K?1:rt>=K?0:NaN}function k(K){return K===null?NaN:+K}function S(K,rt){var j=K.length,Q=0,ot=-1,F=0,vt,wt,jt=0;if(rt==null)for(;++ot<j;)isNaN(vt=k(K[ot]))||(wt=vt-F,F+=wt/++Q,jt+=wt*(vt-F));else for(;++ot<j;)isNaN(vt=k(rt(K[ot],ot,K)))||(wt=vt-F,F+=wt/++Q,jt+=wt*(vt-F));if(Q>1)return jt/(Q-1)}function R(K,rt){var j=S(K,rt);return j&&Math.sqrt(j)}function E(K,rt){var j=K.length,Q=-1,ot,F,vt;if(rt==null){for(;++Q<j;)if((ot=K[Q])!=null&&ot>=ot)for(F=vt=ot;++Q<j;)(ot=K[Q])!=null&&(F>ot&&(F=ot),vt<ot&&(vt=ot))}else for(;++Q<j;)if((ot=rt(K[Q],Q,K))!=null&&ot>=ot)for(F=vt=ot;++Q<j;)(ot=rt(K[Q],Q,K))!=null&&(F>ot&&(F=ot),vt<ot&&(vt=ot));return[F,vt]}var M=Array.prototype,z=M.slice,D=M.map;function B(K){return function(){return K}}function X(K){return K}function U(K,rt,j){K=+K,rt=+rt,j=(ot=arguments.length)<2?(rt=K,K=0,1):ot<3?1:+j;for(var Q=-1,ot=Math.max(0,Math.ceil((rt-K)/j))|0,F=new Array(ot);++Q<ot;)F[Q]=K+Q*j;return F}var Z=Math.sqrt(50),it=Math.sqrt(10),q=Math.sqrt(2);function ct(K,rt,j){var Q,ot=-1,F,vt,wt;if(rt=+rt,K=+K,j=+j,K===rt&&j>0)return[K];if((Q=rt<K)&&(F=K,K=rt,rt=F),(wt=ut(K,rt,j))===0||!isFinite(wt))return[];if(wt>0)for(K=Math.ceil(K/wt),rt=Math.floor(rt/wt),vt=new Array(F=Math.ceil(rt-K+1));++ot<F;)vt[ot]=(K+ot)*wt;else for(K=Math.floor(K*wt),rt=Math.ceil(rt*wt),vt=new Array(F=Math.ceil(K-rt+1));++ot<F;)vt[ot]=(K-ot)/wt;return Q&&vt.reverse(),vt}function ut(K,rt,j){var Q=(rt-K)/Math.max(0,j),ot=Math.floor(Math.log(Q)/Math.LN10),F=Q/Math.pow(10,ot);return ot>=0?(F>=Z?10:F>=it?5:F>=q?2:1)*Math.pow(10,ot):-Math.pow(10,-ot)/(F>=Z?10:F>=it?5:F>=q?2:1)}function C(K,rt,j){var Q=Math.abs(rt-K)/Math.max(0,j),ot=Math.pow(10,Math.floor(Math.log(Q)/Math.LN10)),F=Q/ot;return F>=Z?ot*=10:F>=it?ot*=5:F>=q&&(ot*=2),rt<K?-ot:ot}function Ct(K){return Math.ceil(Math.log(K.length)/Math.LN2)+1}function Nt(){var K=X,rt=E,j=Ct;function Q(ot){var F,vt=ot.length,wt,jt=new Array(vt);for(F=0;F<vt;++F)jt[F]=K(ot[F],F,ot);var Vt=rt(jt),he=Vt[0],de=Vt[1],re=j(jt,he,de);Array.isArray(re)||(re=C(he,de,re),re=U(Math.ceil(he/re)*re,de,re));for(var Pt=re.length;re[0]<=he;)re.shift(),--Pt;for(;re[Pt-1]>de;)re.pop(),--Pt;var $e=new Array(Pt+1),we;for(F=0;F<=Pt;++F)we=$e[F]=[],we.x0=F>0?re[F-1]:he,we.x1=F<Pt?re[F]:de;for(F=0;F<vt;++F)wt=jt[F],he<=wt&&wt<=de&&$e[h(re,wt,0,Pt)].push(ot[F]);return $e}return Q.value=function(ot){return arguments.length?(K=typeof ot=="function"?ot:B(ot),Q):K},Q.domain=function(ot){return arguments.length?(rt=typeof ot=="function"?ot:B([ot[0],ot[1]]),Q):rt},Q.thresholds=function(ot){return arguments.length?(j=typeof ot=="function"?ot:Array.isArray(ot)?B(z.call(ot)):B(ot),Q):j},Q}function gt(K,rt,j){if(j==null&&(j=k),!!(Q=K.length)){if((rt=+rt)<=0||Q<2)return+j(K[0],0,K);if(rt>=1)return+j(K[Q-1],Q-1,K);var Q,ot=(Q-1)*rt,F=Math.floor(ot),vt=+j(K[F],F,K),wt=+j(K[F+1],F+1,K);return vt+(wt-vt)*(ot-F)}}function zt(K,rt,j){return K=D.call(K,k).sort(i),Math.ceil((j-rt)/(2*(gt(K,.75)-gt(K,.25))*Math.pow(K.length,-1/3)))}function Wt(K,rt,j){return Math.ceil((j-rt)/(3.5*R(K)*Math.pow(K.length,-1/3)))}function pt(K,rt){var j=K.length,Q=-1,ot,F;if(rt==null){for(;++Q<j;)if((ot=K[Q])!=null&&ot>=ot)for(F=ot;++Q<j;)(ot=K[Q])!=null&&ot>F&&(F=ot)}else for(;++Q<j;)if((ot=rt(K[Q],Q,K))!=null&&ot>=ot)for(F=ot;++Q<j;)(ot=rt(K[Q],Q,K))!=null&&ot>F&&(F=ot);return F}function Ot(K,rt){var j=K.length,Q=j,ot=-1,F,vt=0;if(rt==null)for(;++ot<j;)isNaN(F=k(K[ot]))?--Q:vt+=F;else for(;++ot<j;)isNaN(F=k(rt(K[ot],ot,K)))?--Q:vt+=F;if(Q)return vt/Q}function At(K,rt){var j=K.length,Q=-1,ot,F=[];if(rt==null)for(;++Q<j;)isNaN(ot=k(K[Q]))||F.push(ot);else for(;++Q<j;)isNaN(ot=k(rt(K[Q],Q,K)))||F.push(ot);return gt(F.sort(i),.5)}function Bt(K){for(var rt=K.length,j,Q=-1,ot=0,F,vt;++Q<rt;)ot+=K[Q].length;for(F=new Array(ot);--rt>=0;)for(vt=K[rt],j=vt.length;--j>=0;)F[--ot]=vt[j];return F}function kt(K,rt){var j=K.length,Q=-1,ot,F;if(rt==null){for(;++Q<j;)if((ot=K[Q])!=null&&ot>=ot)for(F=ot;++Q<j;)(ot=K[Q])!=null&&F>ot&&(F=ot)}else for(;++Q<j;)if((ot=rt(K[Q],Q,K))!=null&&ot>=ot)for(F=ot;++Q<j;)(ot=rt(K[Q],Q,K))!=null&&F>ot&&(F=ot);return F}function Ft(K,rt){for(var j=rt.length,Q=new Array(j);j--;)Q[j]=K[rt[j]];return Q}function fe(K,rt){if(j=K.length){var j,Q=0,ot=0,F,vt=K[ot];for(rt==null&&(rt=i);++Q<j;)(rt(F=K[Q],vt)<0||rt(vt,vt)!==0)&&(vt=F,ot=Q);if(rt(vt,vt)===0)return ot}}function Jt(K,rt,j){for(var Q=(j??K.length)-(rt=rt==null?0:+rt),ot,F;Q;)F=Math.random()*Q--|0,ot=K[Q+rt],K[Q+rt]=K[F+rt],K[F+rt]=ot;return K}function oe(K,rt){var j=K.length,Q=-1,ot,F=0;if(rt==null)for(;++Q<j;)(ot=+K[Q])&&(F+=ot);else for(;++Q<j;)(ot=+rt(K[Q],Q,K))&&(F+=ot);return F}function pe(K){if(!(F=K.length))return[];for(var rt=-1,j=kt(K,Ae),Q=new Array(j);++rt<j;)for(var ot=-1,F,vt=Q[rt]=new Array(F);++ot<F;)vt[ot]=K[ot][rt];return Q}function Ae(K){return K.length}function Me(){return pe(arguments)}r.bisect=h,r.bisectRight=h,r.bisectLeft=_,r.ascending=i,r.bisector=o,r.cross=b,r.descending=A,r.deviation=R,r.extent=E,r.histogram=Nt,r.thresholdFreedmanDiaconis=zt,r.thresholdScott=Wt,r.thresholdSturges=Ct,r.max=pt,r.mean=Ot,r.median=At,r.merge=Bt,r.min=kt,r.pairs=p,r.permute=Ft,r.quantile=gt,r.range=U,r.scan=fe,r.shuffle=Jt,r.sum=oe,r.ticks=ct,r.tickIncrement=ut,r.tickStep=C,r.transpose=pe,r.variance=S,r.zip=Me,Object.defineProperty(r,"__esMo
1dule",{value:!0})})});var Bo=hn((oa,Yc)=>{(function(r,i){typeof oa=="object"&&typeof Yc<"u"?i(oa):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(oa,function(r){"use strict";function i(Z,it){if((q=(Z=it?Z.toExponential(it-1):Z.toExponential()).indexOf("e"))<0)return null;var q,ct=Z.slice(0,q);return[ct.length>1?ct[0]+ct.slice(2):ct,+Z.slice(q+1)]}function o(Z){return Z=i(Math.abs(Z)),Z?Z[1]:NaN}function s(Z,it){return function(q,ct){for(var ut=q.length,C=[],Ct=0,Nt=Z[0],gt=0;ut>0&&Nt>0&&(gt+Nt+1>ct&&(Nt=Math.max(1,ct-gt)),C.push(q.substring(ut-=Nt,ut+Nt)),!((gt+=Nt+1)>ct));)Nt=Z[Ct=(Ct+1)%Z.length];return C.reverse().join(it)}}function l(Z){return function(it){return it.replace(/[0-9]/g,function(q){return Z[+q]})}}var h=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function _(Z){return new p(Z)}_.prototype=p.prototype;function p(Z){if(!(it=h.exec(Z)))throw new Error("invalid format: "+Z);var it;this.fill=it[1]||" ",this.align=it[2]||">",this.sign=it[3]||"-",this.symbol=it[4]||"",this.zero=!!it[5],this.width=it[6]&&+it[6],this.comma=!!it[7],this.precision=it[8]&&+it[8].slice(1),this.trim=!!it[9],this.type=it[10]||""}p.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width==null?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision==null?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function x(Z){t:for(var it=Z.length,q=1,ct=-1,ut;q<it;++q)switch(Z[q]){case".":ct=ut=q;break;case"0":ct===0&&(ct=q),ut=q;break;default:if(ct>0){if(!+Z[q])break t;ct=0}break}return ct>0?Z.slice(0,ct)+Z.slice(ut+1):Z}var b;function A(Z,it){var q=i(Z,it);if(!q)return Z+"";var ct=q[0],ut=q[1],C=ut-(b=Math.max(-8,Math.min(8,Math.floor(ut/3)))*3)+1,Ct=ct.length;return C===Ct?ct:C>Ct?ct+new Array(C-Ct+1).join("0"):C>0?ct.slice(0,C)+"."+ct.slice(C):"0."+new Array(1-C).join("0")+i(Z,Math.max(0,it+C-1))[0]}function k(Z,it){var q=i(Z,it);if(!q)return Z+"";var ct=q[0],ut=q[1];return ut<0?"0."+new Array(-ut).join("0")+ct:ct.length>ut+1?ct.slice(0,ut+1)+"."+ct.slice(ut+1):ct+new Array(ut-ct.length+2).join("0")}var S={"%":function(Z,it){return(Z*100).toFixed(it)},b:function(Z){return Math.round(Z).toString(2)},c:function(Z){return Z+""},d:function(Z){return Math.round(Z).toString(10)},e:function(Z,it){return Z.toExponential(it)},f:function(Z,it){return Z.toFixed(it)},g:function(Z,it){return Z.toPrecision(it)},o:function(Z){return Math.round(Z).toString(8)},p:function(Z,it){return k(Z*100,it)},r:k,s:A,X:function(Z){return Math.round(Z).toString(16).toUpperCase()},x:function(Z){return Math.round(Z).toString(16)}};function R(Z){return Z}var E=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function M(Z){var it=Z.grouping&&Z.thousands?s(Z.grouping,Z.thousands):R,q=Z.currency,ct=Z.decimal,ut=Z.numerals?l(Z.numerals):R,C=Z.percent||"%";function Ct(gt){gt=_(gt);var zt=gt.fill,Wt=gt.align,pt=gt.sign,Ot=gt.symbol,At=gt.zero,Bt=gt.width,kt=gt.comma,Ft=gt.precision,fe=gt.trim,Jt=gt.type;Jt==="n"?(kt=!0,Jt="g"):S[Jt]||(Ft==null&&(Ft=12),fe=!0,Jt="g"),(At||zt==="0"&&Wt==="=")&&(At=!0,zt="0",Wt="=");var oe=Ot==="$"?q[0]:Ot==="#"&&/[boxX]/.test(Jt)?"0"+Jt.toLowerCase():"",pe=Ot==="$"?q[1]:/[%p]/.test(Jt)?C:"",Ae=S[Jt],Me=/[defgprs%]/.test(Jt);Ft=Ft==null?6:/[gprs]/.test(Jt)?Math.max(1,Math.min(21,Ft)):Math.max(0,Math.min(20,Ft));function K(rt){var j=oe,Q=pe,ot,F,vt;if(Jt==="c")Q=Ae(rt)+Q,rt="";else{rt=+rt;var wt=rt<0;if(rt=Ae(Math.abs(rt),Ft),fe&&(rt=x(rt)),wt&&+rt==0&&(wt=!1),j=(wt?pt==="("?pt:"-":pt==="-"||pt==="("?"":pt)+j,Q=(Jt==="s"?E[8+b/3]:"")+Q+(wt&&pt==="("?")":""),Me){for(ot=-1,F=rt.length;++ot<F;)if(vt=rt.charCodeAt(ot),48>vt||vt>57){Q=(vt===46?ct+rt.slice(ot+1):rt.slice(ot))+Q,rt=rt.slice(0,ot);break}}}kt&&!At&&(rt=it(rt,1/0));var jt=j.length+rt.length+Q.length,Vt=jt<Bt?new Array(Bt-jt+1).join(zt):"";switch(kt&&At&&(rt=it(Vt+rt,Vt.length?Bt-Q.length:1/0),Vt=""),Wt){case"<":rt=j+rt+Q+Vt;break;case"=":rt=j+Vt+rt+Q;break;case"^":rt=Vt.slice(0,jt=Vt.length>>1)+j+rt+Q+Vt.slice(jt);break;default:rt=Vt+j+rt+Q;break}return ut(rt)}return K.toString=function(){return gt+""},K}function Nt(gt,zt){var Wt=Ct((gt=_(gt),gt.type="f",gt)),pt=Math.max(-8,Math.min(8,Math.floor(o(zt)/3)))*3,Ot=Math.pow(10,-pt),At=E[8+pt/3];return function(Bt){return Wt(Ot*Bt)+At}}return{format:Ct,formatPrefix:Nt}}var z;D({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function D(Z){return z=M(Z),r.format=z.format,r.formatPrefix=z.formatPrefix,z}function B(Z){return Math.max(0,-o(Math.abs(Z)))}function X(Z,it){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(o(it)/3)))*3-o(Math.abs(Z)))}function U(Z,it){return Z=Math.abs(Z),it=Math.abs(it)-Z,Math.max(0,o(it)-o(Z))+1}r.formatDefaultLocale=D,r.formatLocale=M,r.formatSpecifier=_,r.precisionFixed=B,r.precisionPrefix=X,r.precisionRound=U,Object.defineProperty(r,"__esMo
1dule",{value:!0})})});var ca=hn((sa,Hc)=>{(function(r,i){typeof sa=="object"&&typeof Hc<"u"?i(sa,li(),or(),Un(),Bo(),Hi(),ci()):typeof define=="function"&&define.amd?define(["exports","d3-collection","d3-array","d3-interpolate","d3-format","d3-time","d3-time-format"],i):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3,r.d3)})(sa,function(r,i,o,s,l,h,_){"use strict";function p(V,N){switch(arguments.length){case 0:break;case 1:this.range(V);break;default:this.range(N).domain(V);break}return this}function x(V,N){switch(arguments.length){case 0:break;case 1:this.interpolator(V);break;default:this.interpolator(N).domain(V);break}return this}var b=Array.prototype,A=b.map,k=b.slice,S={name:"implicit"};function R(){var V=i.map(),N=[],W=[],H=S;function at(ht){var dt=ht+"",mt=V.get(dt);if(!mt){if(H!==S)return H;V.set(dt,mt=N.push(ht))}return W[(mt-1)%W.length]}return at.domain=function(ht){if(!arguments.length)return N.slice();N=[],V=i.map();for(var dt=-1,mt=ht.length,bt,Rt;++dt<mt;)V.has(Rt=(bt=ht[dt])+"")||V.set(Rt,N.push(bt));return at},at.range=function(ht){return arguments.length?(W=k.call(ht),at):W.slice()},at.unknown=function(ht){return arguments.length?(H=ht,at):H},at.copy=function(){return R(N,W).unknown(H)},p.apply(at,arguments),at}function E(){var V=R().unknown(void 0),N=V.domain,W=V.range,H=[0,1],at,ht,dt=!1,mt=0,bt=0,Rt=.5;delete V.unknown;function Yt(){var Ut=N().length,ie=H[1]<H[0],se=H[ie-0],ve=H[1-ie];at=(ve-se)/Math.max(1,Ut-mt+bt*2),dt&&(at=Math.floor(at)),se+=(ve-se-at*(Ut-mt))*Rt,ht=at*(1-mt),dt&&(se=Math.round(se),ht=Math.round(ht));var je=o.range(Ut).map(function(nn){return se+at*nn});return W(ie?je.reverse():je)}return V.domain=function(Ut){return arguments.length?(N(Ut),Yt()):N()},V.range=function(Ut){return arguments.length?(H=[+Ut[0],+Ut[1]],Yt()):H.slice()},V.rangeRound=function(Ut){return H=[+Ut[0],+Ut[1]],dt=!0,Yt()},V.bandwidth=function(){return ht},V.step=function(){return at},V.round=function(Ut){return arguments.length?(dt=!!Ut,Yt()):dt},V.padding=function(Ut){return arguments.length?(mt=Math.min(1,bt=+Ut),Yt()):mt},V.paddingInner=function(Ut){return arguments.length?(mt=Math.min(1,Ut),Yt()):mt},V.paddingOuter=function(Ut){return arguments.length?(bt=+Ut,Yt()):bt},V.align=function(Ut){return arguments.length?(Rt=Math.max(0,Math.min(1,Ut)),Yt()):Rt},V.copy=function(){return E(N(),H).round(dt).paddingInner(mt).paddingOuter(bt).align(Rt)},p.apply(Yt(),arguments)}function M(V){var N=V.copy;return V.padding=V.paddingOuter,delete V.paddingInner,delete V.paddingOuter,V.copy=function(){return M(N())},V}function z(){return M(E.apply(null,arguments).paddingInner(1))}function D(V){return function(){return V}}function B(V){return+V}var X=[0,1];function U(V){return V}function Z(V,N){return(N-=V=+V)?function(W){return(W-V)/N}:D(isNaN(N)?NaN:.5)}function it(V){var N=V[0],W=V[V.length-1],H;return N>W&&(H=N,N=W,W=H),function(at){return Math.max(N,Math.min(W,at))}}function q(V,N,W){var H=V[0],at=V[1],ht=N[0],dt=N[1];return at<H?(H=Z(at,H),ht=W(dt,ht)):(H=Z(H,at),ht=W(ht,dt)),function(mt){return ht(H(mt))}}function ct(V,N,W){var H=Math.min(V.length,N.length)-1,at=new Array(H),ht=new Array(H),dt=-1;for(V[H]<V[0]&&(V=V.slice().reverse(),N=N.slice().reverse());++dt<H;)at[dt]=Z(V[dt],V[dt+1]),ht[dt]=W(N[dt],N[dt+1]);return function(mt){var bt=o.bisect(V,mt,1,H)-1;return ht[bt](at[bt](mt))}}function ut(V,N){return N.domain(V.domain()).range(V.range()).interpolate(V.interpolate()).clamp(V.clamp()).unknown(V.unknown())}function C(){var V=X,N=X,W=s.interpolate,H,at,ht,dt=U,mt,bt,Rt;function Yt(){return mt=Math.min(V.length,N.length)>2?ct:q,bt=Rt=null,Ut}function Ut(ie){return isNaN(ie=+ie)?ht:(bt||(bt=mt(V.map(H),N,W)))(H(dt(ie)))}return Ut.invert=function(ie){return dt(at((Rt||(Rt=mt(N,V.map(H),s.interpolateNumber)))(ie)))},Ut.domain=function(ie){return arguments.length?(V=A.call(ie,B),dt===U||(dt=it(V)),Yt()):V.slice()},Ut.range=function(ie){return arguments.length?(N=k.call(ie),Yt()):N.slice()},Ut.rangeRound=function(ie){return N=k.call(ie),W=s.interpolateRound,Yt()},Ut.clamp=function(ie){return arguments.length?(dt=ie?it(V):U,Ut):dt!==U},Ut.interpolate=function(ie){return arguments.length?(W=ie,Yt()):W},Ut.unknown=function(ie){return arguments.length?(ht=ie,Ut):ht},function(ie,se){return H=ie,at=se,Yt()}}function Ct(V,N){return C()(V,N)}function Nt(V,N,W,H){var at=o.tickStep(V,N,W),ht;
1switch(H=l.formatSpecifier(H??",f"),H.type){case"s":{var dt=Math.max(Math.abs(V),Math.abs(N));return H.precision==null&&!isNaN(ht=l.precisionPrefix(at,dt))&&(H.precision=ht),l.formatPrefix(H,dt)}case"":case"e":case"g":case"p":case"r":{H.precision==null&&!isNaN(ht=l.precisionRound(at,Math.max(Math.abs(V),Math.abs(N))))&&(H.precision=ht-(H.type==="e"));break}case"f":case"%":{H.precision==null&&!isNaN(ht=l.precisionFixed(at))&&(H.precision=ht-(H.type==="%")*2);break}}return l.format(H)}function gt(V){var N=V.domain;return V.ticks=function(W){var H=N();return o.ticks(H[0],H[H.length-1],W??10)},V.tickFormat=function(W,H){var at=N();return Nt(at[0],at[at.length-1],W??10,H)},V.nice=function(W){W==null&&(W=10);var H=N(),at=0,ht=H.length-1,dt=H[at],mt=H[ht],bt;return mt<dt&&(bt=dt,dt=mt,mt=bt,bt=at,at=ht,ht=bt),bt=o.tickIncrement(dt,mt,W),bt>0?(dt=Math.floor(dt/bt)*bt,mt=Math.ceil(mt/bt)*bt,bt=o.tickIncrement(dt,mt,W)):bt<0&&(dt=Math.ceil(dt*bt)/bt,mt=Math.floor(mt*bt)/bt,bt=o.tickIncrement(dt,mt,W)),bt>0?(H[at]=Math.floor(dt/bt)*bt,H[ht]=Math.ceil(mt/bt)*bt,N(H)):bt<0&&(H[at]=Math.ceil(dt*bt)/bt,H[ht]=Math.floor(mt*bt)/bt,N(H)),V},V}function zt(){var V=Ct(U,U);return V.copy=function(){return ut(V,zt())},p.apply(V,arguments),gt(V)}function Wt(V){var N;function W(H){return isNaN(H=+H)?N:H}return W.invert=W,W.domain=W.range=function(H){return arguments.length?(V=A.call(H,B),W):V.slice()},W.unknown=function(H){return arguments.length?(N=H,W):N},W.copy=function(){return Wt(V).unknown(N)},V=arguments.length?A.call(V,B):[0,1],gt(W)}function pt(V,N){V=V.slice();var W=0,H=V.length-1,at=V[W],ht=V[H],dt;return ht<at&&(dt=W,W=H,H=dt,dt=at,at=ht,ht=dt),V[W]=N.floor(at),V[H]=N.ceil(ht),V}function Ot(V){return Math.log(V)}function At(V){return Math.exp(V)}function Bt(V){return-Math.log(-V)}function kt(V){return-Math.exp(-V)}function Ft(V){return isFinite(V)?+("1e"+V):V<0?0:V}function fe(V){return V===10?Ft:V===Math.E?Math.exp:function(N){return Math.pow(V,N)}}function Jt(V){return V===Math.E?Math.log:V===10&&Math.log10||V===2&&Math.log2||(V=Math.log(V),function(N){return Math.log(N)/V})}function oe(V){return function(N){return-V(-N)}}function pe(V){var N=V(Ot,At),W=N.domain,H=10,at,ht;function dt(){return at=Jt(H),ht=fe(H),W()[0]<0?(at=oe(at),ht=oe(ht),V(Bt,kt)):V(Ot,At),N}return N.base=function(mt){return arguments.length?(H=+mt,dt()):H},N.domain=function(mt){return arguments.length?(W(mt),dt()):W()},N.ticks=function(mt){var bt=W(),Rt=bt[0],Yt=bt[bt.length-1],Ut;(Ut=Yt<Rt)&&(ie=Rt,Rt=Yt,Yt=ie);var ie=at(Rt),se=at(Yt),ve,je,nn,sn=mt==null?10:+mt,pn=[];if(!(H%1)&&se-ie<sn){if(ie=Math.round(ie)-1,se=Math.round(se)+1,Rt>0){for(;ie<se;++ie)for(je=1,ve=ht(ie);je<H;++je)if(nn=ve*je,!(nn<Rt)){if(nn>Yt)break;pn.push(nn)}}else for(;ie<se;++ie)for(je=H-1,ve=ht(ie);je>=1;--je)if(nn=ve*je,!(nn<Rt)){if(nn>Yt)break;pn.push(nn)}}else pn=o.ticks(ie,se,Math.min(se-ie,sn)).map(ht);return Ut?pn.reverse():pn},N.tickFormat=function(mt,bt){if(bt==null&&(bt=H===10?".0e":","),typeof bt!="function"&&(bt=l.format(bt)),mt===1/0)return bt;mt==null&&(mt=10);var Rt=Math.max(1,H*mt/N.ticks().length);return function(Yt){var Ut=Yt/ht(Math.round(at(Yt)));return Ut*H<H-.5&&(Ut*=H),Ut<=Rt?bt(Yt):""}},N.nice=function(){return W(pt(W(),{floor:function(mt){return ht(Math.floor(at(mt)))},ceil:function(mt){return ht(Math.ceil(at(mt)))}}))},N}function Ae(){var V=pe(C()).domain([1,10]);return V.copy=function(){return ut(V,Ae()).base(V.base())},p.apply(V,arguments),V}function Me(V){return function(N){return Math.sign(N)*Math.log1p(Math.abs(N/V))}}function K(V){return function(N){return Math.sign(N)*Math.expm1(Math.abs(N))*V}}function rt(V){var N=1,W=V(Me(N),K(N));return W.constant=function(H){return arguments.length?V(Me(N=+H),K(N)):N},gt(W)}function j(){var V=rt(C());return V.copy=function(){return ut(V,j()).constant(V.constant())},p.apply(V,arguments)}function Q(V){return function(N){return N<0?-Math.pow(-N,V):Math.pow(N,V)}}function ot(V){return V<0?-Math.sqrt(-V):Math.sqrt(V)}function F(V){return V<0?-V*V:V*V}function vt(V){var N=V(U,U),W=1;function H(){return W===1?V(U,U):W===.5?V(ot,F):V(Q(W),Q(1/W))}return N.exponent=function(at){return arguments.length?(W=+at,H()):W},gt(N)}function wt(){var V=vt(C());return V.copy=function(){return ut(V,wt()).exponent(V.exponent())},p.apply(V,arguments),V}function jt(){return wt.apply(null,arguments).exponent(.5)}function Vt(){var V=[],N=[],W=[],H;function at(){var dt=0,mt=Math.max(1,N.length);for(W=new Array(mt-1);++dt<mt;)W[dt-1]=o.quantile(V,dt/mt);return ht}function ht(dt){return isNaN(dt=+dt)?H:N[o.bisect(W,dt)]}return ht.invertExtent=function(dt){var mt=N.indexOf(dt);return mt<0?[NaN,NaN]:[mt>0?W[mt-1]:V[0],mt<W.length?W[mt]:V[V.length-1]]},ht.domain=function(dt){if(!arguments.length)return V.slice();V=[];for(var mt=0,bt=dt.length,Rt;mt<bt;++mt)Rt=dt[mt],Rt!=null&&!isNaN(Rt=+Rt)&&V.push(Rt);return V.sort(o.ascending),at()}
1,ht.range=function(dt){return arguments.length?(N=k.call(dt),at()):N.slice()},ht.unknown=function(dt){return arguments.length?(H=dt,ht):H},ht.quantiles=function(){return W.slice()},ht.copy=function(){return Vt().domain(V).range(N).unknown(H)},p.apply(ht,arguments)}function he(){var V=0,N=1,W=1,H=[.5],at=[0,1],ht;function dt(bt){return bt<=bt?at[o.bisect(H,bt,0,W)]:ht}function mt(){var bt=-1;for(H=new Array(W);++bt<W;)H[bt]=((bt+1)*N-(bt-W)*V)/(W+1);return dt}return dt.domain=function(bt){return arguments.length?(V=+bt[0],N=+bt[1],mt()):[V,N]},dt.range=function(bt){return arguments.length?(W=(at=k.call(bt)).length-1,mt()):at.slice()},dt.invertExtent=function(bt){var Rt=at.indexOf(bt);return Rt<0?[NaN,NaN]:Rt<1?[V,H[0]]:Rt>=W?[H[W-1],N]:[H[Rt-1],H[Rt]]},dt.unknown=function(bt){return arguments.length&&(ht=bt),dt},dt.thresholds=function(){return H.slice()},dt.copy=function(){return he().domain([V,N]).range(at).unknown(ht)},p.apply(gt(dt),arguments)}function de(){var V=[.5],N=[0,1],W,H=1;function at(ht){return ht<=ht?N[o.bisect(V,ht,0,H)]:W}return at.domain=function(ht){return arguments.length?(V=k.call(ht),H=Math.min(V.length,N.length-1),at):V.slice()},at.range=function(ht){return arguments.length?(N=k.call(ht),H=Math.min(V.length,N.length-1),at):N.slice()},at.invertExtent=function(ht){var dt=N.indexOf(ht);return[V[dt-1],V[dt]]},at.unknown=function(ht){return arguments.length?(W=ht,at):W},at.copy=function(){return de().domain(V).range(N).unknown(W)},p.apply(at,arguments)}var re=1e3,Pt=re*60,$e=Pt*60,we=$e*24,ze=we*7,Ne=we*30,Le=we*365;function y(V){return new Date(V)}function P(V){return V instanceof Date?+V:+new Date(+V)}function et(V,N,W,H,at,ht,dt,mt,bt){var Rt=Ct(U,U),Yt=Rt.invert,Ut=Rt.domain,ie=bt(".%L"),se=bt(":%S"),ve=bt("%I:%M"),je=bt("%I %p"),nn=bt("%a %d"),sn=bt("%b %d"),pn=bt("%B"),Mn=bt("%Y"),Tn=[[dt,1,re],[dt,5,5*re],[dt,15,15*re],[dt,30,30*re],[ht,1,Pt],[ht,5,5*Pt],[ht,15,15*Pt],[ht,30,30*Pt],[at,1,$e],[at,3,3*$e],[at,6,6*$e],[at,12,12*$e],[H,1,we],[H,2,2*we],[W,1,ze],[N,1,Ne],[N,3,3*Ne],[V,1,Le]];function Dn(Ee){return(dt(Ee)<Ee?ie:ht(Ee)<Ee?se:at(Ee)<Ee?ve:H(Ee)<Ee?je:N(Ee)<Ee?W(Ee)<Ee?nn:sn:V(Ee)<Ee?pn:Mn)(Ee)}function $n(Ee,xn,mn,cn){if(Ee==null&&(Ee=10),typeof Ee=="number"){var G=Math.abs(mn-xn)/Ee,lt=o.bisector(function(Lt){return Lt[2]}).right(Tn,G);lt===Tn.length?(cn=o.tickStep(xn/Le,mn/Le,Ee),Ee=V):lt?(lt=Tn[G/Tn[lt-1][2]<Tn[lt][2]/G?lt-1:lt],cn=lt[1],Ee=lt[0]):(cn=Math.max(o.tickStep(xn,mn,Ee),1),Ee=mt)}return cn==null?Ee:Ee.every(cn)}return Rt.invert=function(Ee){return new Date(Yt(Ee))},Rt.domain=function(Ee){return arguments.length?Ut(A.call(Ee,P)):Ut().map(y)},Rt.ticks=function(Ee,xn){var mn=Ut(),cn=mn[0],G=mn[mn.length-1],lt=G<cn,Lt;return lt&&(Lt=cn,cn=G,G=Lt),Lt=$n(Ee,cn,G,xn),Lt=Lt?Lt.range(cn,G+1):[],lt?Lt.reverse():Lt},Rt.tickFormat=function(Ee,xn){return xn==null?Dn:bt(xn)},Rt.nice=function(Ee,xn){var mn=Ut();return(Ee=$n(Ee,mn[0],mn[mn.length-1],xn))?Ut(pt(mn,Ee)):Rt},Rt.copy=function(){return ut(Rt,et(V,N,W,H,at,ht,dt,mt,bt))},Rt}function yt(){return p.apply(et(h.timeYear,h.timeMonth,h.timeWeek,h.timeDay,h.timeHour,h.timeMinute,h.timeSecond,h.timeMillisecond,_.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Tt(){return p.apply(et(h.utcYear,h.utcMonth,h.utcWeek,h.utcDay,h.utcHour,h.utcMinute,h.utcSecond,h.utcMillisecond,_.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function St(){var V=0,N=1,W,H,at,ht,dt=U,mt=!1,bt;function Rt(Yt){return isNaN(Yt=+Yt)?bt:dt(at===0?.5:(Yt=(ht(Yt)-W)*at,mt?Math.max(0,Math.min(1,Yt)):Yt))}return Rt.domain=function(Yt){return arguments.length?(W=ht(V=+Yt[0]),H=ht(N=+Yt[1]),at=W===H?0:1/(H-W),Rt):[V,N]},Rt.clamp=function(Yt){return arguments.length?(mt=!!Yt,Rt):mt},Rt.interpolator=function(Yt){return arguments.length?(dt=Yt,Rt):dt},Rt.unknown=function(Yt){return arguments.length?(bt=Yt,Rt):bt},function(Yt){return ht=Yt,W=Yt(V),H=Yt(N),at=W===H?0:1/(H-W),Rt}}function Mt(V,N){return N.domain(V.domain()).interpolator(V.interpolator()).clamp(V.clamp()).unknown(V.unknown())}function $t(){var V=gt(St()(U));return V.copy=function(){return Mt(V,$t())},x.apply(V,arguments)}function me(){var V=pe(St()).domain([1,10]);return V.copy=function(){return Mt(V,me()).base(V.base())},x.apply(V,arguments)}function ye(){var V=rt(St());return V.copy=function(){return Mt(V,ye()).constant(V.constant())},x.apply(V,arguments)}function ge(){var V=vt(St());return V.copy=function(){return Mt(V,ge()).exponent(V.exponent())},x.apply(V,arguments)}function _e(){return ge.apply(null,arguments).exponent(.5)}function Ie(){var V=[],N=U;function W(H){if(!isNaN(H=+H))return N((o.bisect(V,H)-1)/(V.length-1))}return W.domain=function(H){if(!arguments.length)return V.slice();V=[];for(var at=0,ht=H.length,dt;at<ht;++at)dt=H[at],dt!=null&&!isNaN(dt=+dt)&&V.push(dt);return V.sort(o.ascending),W}
1,W.interpolator=function(H){return arguments.length?(N=H,W):N},W.copy=function(){return Ie(N).domain(V)},x.apply(W,arguments)}function Ve(){var V=0,N=.5,W=1,H,at,ht,dt,mt,bt=U,Rt,Yt=!1,Ut;function ie(se){return isNaN(se=+se)?Ut:(se=.5+((se=+Rt(se))-at)*(se<at?dt:mt),bt(Yt?Math.max(0,Math.min(1,se)):se))}return ie.domain=function(se){return arguments.length?(H=Rt(V=+se[0]),at=Rt(N=+se[1]),ht=Rt(W=+se[2]),dt=H===at?0:.5/(at-H),mt=at===ht?0:.5/(ht-at),ie):[V,N,W]},ie.clamp=function(se){return arguments.length?(Yt=!!se,ie):Yt},ie.interpolator=function(se){return arguments.length?(bt=se,ie):bt},ie.unknown=function(se){return arguments.length?(Ut=se,ie):Ut},function(se){return Rt=se,H=se(V),at=se(N),ht=se(W),dt=H===at?0:.5/(at-H),mt=at===ht?0:.5/(ht-at),ie}}function tt(){var V=gt(Ve()(U));return V.copy=function(){return Mt(V,tt())},x.apply(V,arguments)}function xt(){var V=pe(Ve()).domain([.1,1,10]);return V.copy=function(){return Mt(V,xt()).base(V.base())},x.apply(V,arguments)}function It(){var V=rt(Ve());return V.copy=function(){return Mt(V,It()).constant(V.constant())},x.apply(V,arguments)}function Xt(){var V=vt(Ve());return V.copy=function(){return Mt(V,Xt()).exponent(V.exponent())},x.apply(V,arguments)}function Xe(){return Xt.apply(null,arguments).exponent(.5)}r.scaleBand=E,r.scalePoint=z,r.scaleIdentity=Wt,r.scaleLinear=zt,r.scaleLog=Ae,r.scaleSymlog=j,r.scaleOrdinal=R,r.scaleImplicit=S,r.scalePow=wt,r.scaleSqrt=jt,r.scaleQuantile=Vt,r.scaleQuantize=he,r.scaleThreshold=de,r.scaleTime=yt,r.scaleUtc=Tt,r.scaleSequential=$t,r.scaleSequentialLog=me,r.scaleSequentialPow=ge,r.scaleSequentialSqrt=_e,r.scaleSequentialSymlog=ye,r.scaleSequentialQuantile=Ie,r.scaleDiverging=tt,r.scaleDivergingLog=xt,r.scaleDivergingPow=Xt,r.scaleDivergingSqrt=Xe,r.scaleDivergingSymlog=It,r.tickFormat=Nt,Object.defineProperty(r,"__esModule",{value:!0})})});var fi=hn((ua,Vc)=>{(function(r,i){typeof ua=="object"&&typeof Vc<"u"?i(ua):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3=r.d3||{})})(ua,function(r){"use strict";var i={},o={},s=34,l=10,h=13;function _(U){return new Function("d","return {"+U.map(function(Z,it){return JSON.stringify(Z)+": d["+it+"]"}).join(",")+"}")}function p(U,Z){var it=_(U);return function(q,ct){return Z(it(q),ct,U)}}function x(U){var Z=Object.create(null),it=[];return U.forEach(function(q){for(var ct in q)ct in Z||it.push(Z[ct]=ct)}),it}function b(U){var Z=new RegExp('["'+U+` 2\r]`),it=U.charCodeAt(0);function q(gt,zt){var Wt,pt,Ot=ct(gt,function(At,Bt){if(Wt)return Wt(At,Bt-1);pt=At,Wt=zt?p(At,zt):_(At)});return Ot.columns=pt||[],Ot}function ct(gt,zt){var Wt=[],pt=gt.length,Ot=0,At=0,Bt,kt=pt<=0,Ft=!1;gt.charCodeAt(pt-1)===l&&--pt,gt.charCodeAt(pt-1)===h&&--pt;function fe(){if(kt)return o;if(Ft)return Ft=!1,i;var oe,pe=Ot,Ae;if(gt.charCodeAt(pe)===s){for(;Ot++<pt&>.charCodeAt(Ot)!==s||gt.charCodeAt(++Ot)===s;);return(oe=Ot)>=pt?kt=!0:(Ae=gt.charCodeAt(Ot++))===l?Ft=!0:Ae===h&&(Ft=!0,gt.charCodeAt(Ot)===l&&++Ot),gt.slice(pe+1,oe-1).replace(/""/g,'"')}for(;Ot<pt;){if((Ae=gt.charCodeAt(oe=Ot++))===l)Ft=!0;else if(Ae===h)Ft=!0,gt.charCodeAt(Ot)===l&&++Ot;else if(Ae!==it)continue;return gt.slice(pe,oe)}return kt=!0,gt.slice(pe,pt)}for(;(Bt=fe())!==o;){for(var Jt=[];Bt!==i&&Bt!==o;)Jt.push(Bt),Bt=fe();zt&&(Jt=zt(Jt,At++))==null||Wt.push(Jt)}return Wt}function ut(gt,zt){return zt==null&&(zt=x(gt)),[zt.map(Nt).join(U)].concat(gt.map(function(Wt){return zt.map(function(pt){return Nt(Wt[pt])}).join(U)})).join(` 3`)}function C(gt){return gt.map(Ct).join(` 4`)}function Ct(gt){return gt.map(Nt).join(U)}function Nt(gt){return gt==null?"":Z.test(gt+="")?'"'+gt.replace(/"/g,'""')+'"':gt}return{parse:q,parseRows:ct,format:ut,formatRows:C}}var A=b(","),k=A.parse,S=A.parseRows,R=A.format,E=A.formatRows,M=b(" "),z=M.parse,D=M.parseRows,B=M.format,X=M.formatRows;r.dsvFormat=b,r.csvParse=k,r.csvParseRows=S,r.csvFormat=R,r.csvFormatRows=E,r.tsvParse=z,r.tsvParseRows=D,r.tsvFormat=B,r.tsvFormatRows=X,Object.defineProperty(r,"__esModule",{value:!0})})});var fa=hn((la,qc)=>{(function(r,i){typeof la=="object"&&typeof qc<"u"?i(la):typeof define=="function"&&define.amd?define(["exports"],i):i(r.d3
4=r.d3||{})})(la,function(r){"use strict";var i=Math.PI,o=2*i,s=1e-6,l=o-s;function h(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function _(){return new h}h.prototype=_.prototype={constructor:h,moveTo:function(p,x){this._+="M"+(this._x0=this._x1=+p)+","+(this._y0=this._y1=+x)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(p,x){this._+="L"+(this._x1=+p)+","+(this._y1=+x)},quadraticCurveTo:function(p,x,b,A){this._+="Q"+ +p+","+ +x+","+(this._x1=+b)+","+(this._y1=+A)},bezierCurveTo:function(p,x,b,A,k,S){this._+="C"+ +p+","+ +x+","+ +b+","+ +A+","+(this._x1=+k)+","+(this._y1=+S)},arcTo:function(p,x,b,A,k){p=+p,x=+x,b=+b,A=+A,k=+k;var S=this._x1,R=this._y1,E=b-p,M=A-x,z=S-p,D=R-x,B=z*z+D*D;if(k<0)throw new Error("negative radius: "+k);if(this._x1===null)this._+="M"+(this._x1=p)+","+(this._y1=x);else if(B>s)if(!(Math.abs(D*E-M*z)>s)||!k)this._+="L"+(this._x1=p)+","+(this._y1=x);else{var X=b-S,U=A-R,Z=E*E+M*M,it=X*X+U*U,q=Math.sqrt(Z),ct=Math.sqrt(B),ut=k*Math.tan((i-Math.acos((Z+B-it)/(2*q*ct)))/2),C=ut/ct,Ct=ut/q;Math.abs(C-1)>s&&(this._+="L"+(p+C*z)+","+(x+C*D)),this._+="A"+k+","+k+",0,0,"+ +(D*X>z*U)+","+(this._x1=p+Ct*E)+","+(this._y1=x+Ct*M)}},arc:function(p,x,b,A,k,S){p=+p,x=+x,b=+b;var R=b*Math.cos(A),E=b*Math.sin(A),M=p+R,z=x+E,D=1^S,B=S?A-k:k-A;if(b<0)throw new Error("negative radius: "+b);this._x1===null?this._+="M"+M+","+z:(Math.abs(this._x1-M)>s||Math.abs(this._y1-z)>s)&&(this._+="L"+M+","+z),b&&(B<0&&(B=B%o+o),B>l?this._+="A"+b+","+b+",0,1,"+D+","+(p-R)+","+(x-E)+"A"+b+","+b+",0,1,"+D+","+(this._x1=M)+","+(this._y1=z):B>s&&(this._+="A"+b+","+b+",0,"+ +(B>=i)+","+D+","+(this._x1=p+b*Math.cos(k))+","+(this._y1=x+b*Math.sin(k))))},rect:function(p,x,b,A){this._+="M"+(this._x0=this._x1=+p)+","+(this._y0=this._y1=+x)+"h"+ +b+"v"+ +A+"h"+-b+"Z"},toString:function(){return this._}},r.path=_,Object.defineProperty(r,"__esModule",{value:!0})})});var da=hn((ha,Uc)=>{(function(r,i){typeof ha=="object"&&typeof Uc<"u"?i(ha,fa()):typeof define=="function"&&define.amd?define(["exports","d3-path"],i):(r=r||self,i(r.d3=r.d3||{},r.d3))})(ha,function(r,i){"use strict";function o(f){return function(){return f}}var s=Math.abs,l=Math.atan2,h=Math.cos,_=Math.max,p=Math.min,x=Math.sin,b=Math.sqrt,A=1e-12,k=Math.PI,S=k/2,R=2*k;function E(f){return f>1?0:f<-1?k:Math.acos(f)}function M(f){return f>=1?S:f<=-1?-S:Math.asin(f)}function z(f){return f.innerRadius}function D(f){return f.outerRadius}function B(f){return f.startAngle}function X(f){return f.endAngle}function U(f){return f&&f.padAngle}function Z(f,T,$,Y,J,nt,ft,st){var _t=$-f,Et=Y-T,Dt=ft-J,Zt=st-nt,ue=Zt*_t-Dt*Et;if(!(ue*ue<A))return ue=(Dt*(T-nt)-Zt*(f-J))/ue,[f+ue*_t,T+ue*Et]}function it(f,T,$,Y,J,nt,ft){var st=f-$,_t=T-Y,Et=(ft?nt:-nt)/b(st*st+_t*_t),Dt=Et*_t,Zt=-Et*st,ue=f+Dt,ke=T+Zt,Te=$+Dt,be=Y+Zt,Gt=(ue+Te)/2,De=(ke+be)/2,Oe=Te-ue,Se=be-ke,He=Oe*Oe+Se*Se,un=J-nt,Ze=ue*be-Te*ke,Fe=(Se<0?-1:1)*b(_(0,un*un*He-Ze*Ze)),We=(Ze*Se-Oe*Fe)/He,Re=(-Ze*Oe-Se*Fe)/He,qe=(Ze*Se+Oe*Fe)/He,te=(-Ze*Oe+Se*Fe)/He,Kt=We-Gt,le=Re-De,Je=qe-Gt,tn=te-De;return Kt*Kt+le*le>Je*Je+tn*tn&&(We=qe,Re=te),{cx:We,cy:Re,x01:-Dt,y01:-Zt,x11:We*(J/un-1),y11:Re*(J/un-1)}}function q(){var f=z,T=D,$=o(0),Y=null,J=B,nt=X,ft=U,st=null;function _t(){var Et,Dt,Zt=+f.apply(this,arguments),ue=+T.apply(this,arguments),ke=J.apply(this,arguments)-S,Te=nt.apply(this,arguments)-S,be=s(Te-ke),Gt=Te>ke;if(st||(st=Et=i.path()),ue<Zt&&(Dt=ue,ue=Zt,Zt=Dt),!(ue>A))st.moveTo(0,0);else if(be>R-A)st.moveTo(ue*h(ke),ue*x(ke)),st.arc(0,0,ue,ke,Te,!Gt),Zt>A&&(st.moveTo(Zt*h(Te),Zt*x(Te)),st.arc(0,0,Zt,Te,ke,Gt));else{var De=ke,Oe=Te,Se=ke,He=Te,un=be,Ze=be,Fe=ft.apply(this,arguments)/2,We=Fe>A&&(Y?+Y.apply(this,arguments):b(Zt*Zt+ue*ue)),Re=p(s(ue-Zt)/2,+$.apply(this,arguments)),qe=Re,te=Re,Kt,le;if(We>A){var Je=M(We/Zt*x(Fe)),tn=M(We/ue*x(Fe));(un-=Je*2)>A?(Je*=Gt?1:-1,Se+=Je,He-=Je):(un=0,Se=He=(ke+Te)/2),(Ze-=tn*2)>A?(tn*=Gt?1:-1,De+=tn,Oe-=tn):(Ze=0,De=Oe=(ke+Te)/2)}var An=ue*h(De),yn=ue*x(De),zn=Zt*h(He),Fn=Zt*x(He);if(Re>A){var Hn=ue*h(Oe),Vn=ue*x(Oe),rr=Zt*h(Se),In=Zt*x(Se),qn;if(be<k&&(qn=Z(An,yn,rr,In,Hn,Vn,zn,Fn))){var Po=An-qn[0],Do=yn-qn[1],zo=Hn-qn[0],Fo=Vn-qn[1],Sc=1/x(E((Po*zo+Do*Fo)/(b(Po*Po+Do*Do)*b(zo*zo+Fo*Fo)))/2),Cc=b(qn[0]*qn[0]+qn[1]*qn[1]);qe=p(Re,(Zt-Cc)/(Sc-1)),te=p(Re,(ue-Cc)/(Sc+1))}}Ze>A?te>A?(Kt=it(rr,In,An,yn,ue,te,Gt),le=it(Hn,Vn,zn,Fn,ue,te,Gt),st.moveTo(Kt.cx+Kt.x01,Kt.cy+Kt.y01),te<Re?st.arc(Kt.cx,Kt.cy,te,l(Kt.y01,Kt.x01),l(le.y01,le.x01),!Gt):(st.arc(Kt.cx,Kt.cy,te,l(Kt.y01,Kt.x01),l(Kt.y11,Kt.x11),!Gt),st.arc(0,0,ue,l(Kt.cy+Kt.y11,Kt.cx+Kt.x11),l(le.cy+le.y11,le.cx+le.x11),!Gt),st.arc(le.cx,le.cy,te,l(le.y11,le.x11),l(le.y01,le.x01),!Gt))):(st.moveTo(An,yn),st.arc(0,0,ue,De,Oe,!Gt)):st.moveTo(An,yn),!(Zt>A)||!(un>A)?st.lineTo(zn,Fn):qe>A?(Kt=it(zn,Fn,Hn,Vn,Zt,-qe,Gt),le=it(An,yn,rr,In,Zt,-qe,Gt),st.lineTo(Kt.cx+Kt.x01,Kt.cy+Kt.y01),qe<Re?st.arc(Kt.cx,Kt.cy,qe,l(Kt.y01,Kt.x01),l(le.y01,le.x01),!Gt):(st.arc(Kt.cx,Kt.cy,qe,l(Kt.y01,Kt.x01),l(Kt.y11,Kt.x11),!Gt),st.arc(0,0,Zt,l(Kt.cy+Kt.y11,Kt.cx+Kt.x11),l(le.cy+le.y11,le.cx+le.x11),Gt),st.arc(le.cx,le.cy,qe,l(le.y11,le.x11),l(le.y01,le.x01),!Gt))):st.arc(0,0,Zt,He,Se,Gt)}if(st.closePath(),Et)return st=null,Et+""||null}return _t.centroid=function(){var Et=(+f.apply(this,arguments)+ +T.apply(this,arguments))/2,Dt=(+J.apply(this,arguments)+ +nt.apply(this,arguments))/2-k/2;return[h(Dt)*Et,x(Dt)*Et]},_t.innerRadius=function(Et){return arguments.length?(f=typeof Et=="function"?Et:o(+Et),_t):f},_t.outerRadius=function(Et){return arguments.length?(T=typeof Et=="function"?Et:o(+Et),_t):T},_t.cornerRadius=function(Et){return arguments.length?($=typeof Et=="function"?Et:o(+Et),_t):$},_t.padRadius=function(Et){return arguments.length?(Y=Et==null?null:typeof Et=="function"?Et:o(+Et),_t):Y},_t.startAngle=function(Et){return arguments.length?(J=typeof Et=="function"?Et:o(+Et),_t):J},_t.endAngle=function(Et){return arguments.length?(nt=typeof Et=="function"?Et:o(+Et),_t):nt},_t.padAngle=function(Et){return arguments.length?(ft=typeof Et=="function"?Et:o(+Et),_t):ft},_t.context=function(Et){return arguments.length?(st=Et??null,_t):st},_t}function ct(f){this._context=f}ct.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(f,T){switch(f=+f,T=+T,this._point){case 0:this._point=1,this._line?this._context.lineTo(f,T):this._context.moveTo(f,T);break;case 1:this._point=2;default:this._context.lineTo(f,T);break}}};function ut(f){return new ct(f)}function C(f){return f[0]}function Ct(f){return f[1]}function Nt(){var f=C,T=Ct,$=o(!0),Y=null,J=ut,nt=null;function ft(st){var _t,Et=st.length,Dt,Zt=!1,ue;for(Y==null&&(nt=J(ue=i.path())),_t=0;_t<=Et;++_t)!(_t<Et&&$(Dt=st[_t],_t,st))===Zt&&((Zt=!Zt)?nt.lineStart():nt.lineEnd()),Zt&&nt.point(+f(Dt,_t,st),+T(Dt,_t,st));if(ue)return nt=null,ue+""||null}return ft.x=function(st){return arguments.length?(f=typeof st=="function"?st:o(+st),ft):f}
4,ft.y=function(st){return arguments.length?(T=typeof st=="function"?st:o(+st),ft):T},ft.defined=function(st){return arguments.length?($=typeof st=="function"?st:o(!!st),ft):$},ft.curve=function(st){return arguments.length?(J=st,Y!=null&&(nt=J(Y)),ft):J},ft.context=function(st){return arguments.length?(st==null?Y=nt=null:nt=J(Y=st),ft):Y},ft}function gt(){var f=C,T=null,$=o(0),Y=Ct,J=o(!0),nt=null,ft=ut,st=null;function _t(Dt){var Zt,ue,ke,Te=Dt.length,be,Gt=!1,De,Oe=new Array(Te),Se=new Array(Te);for(nt==null&&(st=ft(De=i.path())),Zt=0;Zt<=Te;++Zt){if(!(Zt<Te&&J(be=Dt[Zt],Zt,Dt))===Gt)if(Gt=!Gt)ue=Zt,st.areaStart(),st.lineStart();else{for(st.lineEnd(),st.lineStart(),ke=Zt-1;ke>=ue;--ke)st.point(Oe[ke],Se[ke]);st.lineEnd(),st.areaEnd()}Gt&&(Oe[Zt]=+f(be,Zt,Dt),Se[Zt]=+$(be,Zt,Dt),st.point(T?+T(be,Zt,Dt):Oe[Zt],Y?+Y(be,Zt,Dt):Se[Zt]))}if(De)return st=null,De+""||null}function Et(){return Nt().defined(J).curve(ft).context(nt)}return _t.x=function(Dt){return arguments.length?(f=typeof Dt=="function"?Dt:o(+Dt),T=null,_t):f},_t.x0=function(Dt){return arguments.length?(f=typeof Dt=="function"?Dt:o(+Dt),_t):f},_t.x1=function(Dt){return arguments.length?(T=Dt==null?null:typeof Dt=="function"?Dt:o(+Dt),_t):T},_t.y=function(Dt){return arguments.length?($=typeof Dt=="function"?Dt:o(+Dt),Y=null,_t):$},_t.y0=function(Dt){return arguments.length?($=typeof Dt=="function"?Dt:o(+Dt),_t):$},_t.y1=function(Dt){return arguments.length?(Y=Dt==null?null:typeof Dt=="function"?Dt:o(+Dt),_t):Y},_t.lineX0=_t.lineY0=function(){return Et().x(f).y($)},_t.lineY1=function(){return Et().x(f).y(Y)},_t.lineX1=function(){return Et().x(T).y($)},_t.defined=function(Dt){return arguments.length?(J=typeof Dt=="function"?Dt:o(!!Dt),_t):J},_t.curve=function(Dt){return arguments.length?(ft=Dt,nt!=null&&(st=ft(nt)),_t):ft},_t.context=function(Dt){return arguments.length?(Dt==null?nt=st=null:st=ft(nt=Dt),_t):nt},_t}function zt(f,T){return T<f?-1:T>f?1:T>=f?0:NaN}function Wt(f){return f}function pt(){var f=Wt,T=zt,$=null,Y=o(0),J=o(R),nt=o(0);function ft(st){var _t,Et=st.length,Dt,Zt,ue=0,ke=new Array(Et),Te=new Array(Et),be=+Y.apply(this,arguments),Gt=Math.min(R,Math.max(-R,J.apply(this,arguments)-be)),De,Oe=Math.min(Math.abs(Gt)/Et,nt.apply(this,arguments)),Se=Oe*(Gt<0?-1:1),He;for(_t=0;_t<Et;++_t)(He=Te[ke[_t]=_t]=+f(st[_t],_t,st))>0&&(ue+=He);for(T!=null?ke.sort(function(un,Ze){return T(Te[un],Te[Ze])}):$!=null&&ke.sort(function(un,Ze){return $(st[un],st[Ze])}),_t=0,Zt=ue?(Gt-Et*Se)/ue:0;_t<Et;++_t,be=De)Dt=ke[_t],He=Te[Dt],De=be+(He>0?He*Zt:0)+Se,Te[Dt]={data:st[Dt],index:_t,value:He,startAngle:be,endAngle:De,padAngle:Oe};return Te}return ft.value=function(st){return arguments.length?(f=typeof st=="function"?st:o(+st),ft):f},ft.sortValues=function(st){return arguments.length?(T=st,$=null,ft):T},ft.sort=function(st){return arguments.length?($=st,T=null,ft):$},ft.startAngle=function(st){return arguments.length?(Y=typeof st=="function"?st:o(+st),ft):Y},ft.endAngle=function(st){return arguments.length?(J=typeof st=="function"?st:o(+st),ft):J},ft.padAngle=function(st){return arguments.length?(nt=typeof st=="function"?st:o(+st),ft):nt},ft}var Ot=Bt(ut);function At(f){this._curve=f}At.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(f,T){this._curve.point(T*Math.sin(f),T*-Math.cos(f))}};function Bt(f){function T($){return new At(f($))}return T._curve=f,T}function kt(f){var T=f.curve;return f.angle=f.x,delete f.x,f.radius=f.y,delete f.y,f.curve=function($){return arguments.length?T(Bt($)):T()._curve},f}function Ft(){return kt(Nt().curve(Ot))}function fe(){var f=gt().curve(Ot),T=f.curve,$=f.lineX0,Y=f.lineX1,J=f.lineY0,nt=f.lineY1;return f.angle=f.x,delete f.x,f.startAngle=f.x0,delete f.x0,f.endAngle=f.x1,delete f.x1,f.radius=f.y,delete f.y,f.innerRadius=f.y0,delete f.y0,f.outerRadius=f.y1,delete f.y1,f.lineStartAngle=function(){return kt($())},delete f.lineX0,f.lineEndAngle=function(){return kt(Y())},delete f.lineX1,f.lineInnerRadius=function(){return kt(J())},delete f.lineY0,f.lineOuterRadius=function(){return kt(nt())},delete f.lineY1,f.curve=function(ft){return arguments.length?T(Bt(ft)):T()._curve},f}function Jt(f,T){return[(T=+T)*Math.cos(f-=Math.PI/2),T*Math.sin(f)]}var oe=Array.prototype.slice;function pe(f){return f.source}function Ae(f){return f.target}function Me(f){var T=pe,$=Ae,Y=C,J=Ct,nt=null;function ft(){var st,_t=oe.call(arguments),Et=T.apply(this,_t),Dt=$.apply(this,_t);if(nt||(nt=st=i.path()),f(nt,+Y.apply(this,(_t[0]=Et,_t)),+J.apply(this,_t),+Y.apply(this,(_t[0]=Dt,_t)),+J.apply(this,_t)),st)return nt=null,st+""||null}return ft.source=function(st){return arguments.length?(T=st,ft):T},ft.target=function(st){return arguments.length?($=st,ft):$},ft.x=function(st){return arguments.length?(Y=typeof st=="function"?st:o(+st),ft):Y},ft.y=function(st){return arguments.length?(J=typeof st=="function"?st:o(+st),ft):J},ft.context=function(st){return arguments.length?(nt=st??null,ft):nt},ft}function K(f,T,$,Y,J){f.moveTo(T,$),f.bezierCurveTo(T=(T+Y)/2,$,T,J,Y,J)}function rt(f,T,$,Y,J){f.moveTo(T,$),f.bezierCurveTo(T,$=($+J)/2,Y,$,Y,J)}function j(f,T,$,Y,J){var nt=Jt(T,$),ft=Jt(T,$=($+J)/2),st=Jt(Y,$),_t=Jt(Y,J);f.moveTo(nt[0],nt[1]),f.bezierCurveTo(ft[0],ft[1],st[0],st[1],_t[0],_t[1])}function Q(){return Me(K)}function ot(){return Me(rt)}function F(){var f=Me(j);
4return f.angle=f.x,delete f.x,f.radius=f.y,delete f.y,f}var vt={draw:function(f,T){var $=Math.sqrt(T/k);f.moveTo($,0),f.arc(0,0,$,0,R)}},wt={draw:function(f,T){var $=Math.sqrt(T/5)/2;f.moveTo(-3*$,-$),f.lineTo(-$,-$),f.lineTo(-$,-3*$),f.lineTo($,-3*$),f.lineTo($,-$),f.lineTo(3*$,-$),f.lineTo(3*$,$),f.lineTo($,$),f.lineTo($,3*$),f.lineTo(-$,3*$),f.lineTo(-$,$),f.lineTo(-3*$,$),f.closePath()}},jt=Math.sqrt(1/3),Vt=jt*2,he={draw:function(f,T){var $=Math.sqrt(T/Vt),Y=$*jt;f.moveTo(0,-$),f.lineTo(Y,0),f.lineTo(0,$),f.lineTo(-Y,0),f.closePath()}},de=.8908130915292852,re=Math.sin(k/10)/Math.sin(7*k/10),Pt=Math.sin(R/10)*re,$e=-Math.cos(R/10)*re,we={draw:function(f,T){var $=Math.sqrt(T*de),Y=Pt*$,J=$e*$;f.moveTo(0,-$),f.lineTo(Y,J);for(var nt=1;nt<5;++nt){var ft=R*nt/5,st=Math.cos(ft),_t=Math.sin(ft);f.lineTo(_t*$,-st*$),f.lineTo(st*Y-_t*J,_t*Y+st*J)}f.closePath()}},ze={draw:function(f,T){var $=Math.sqrt(T),Y=-$/2;f.rect(Y,Y,$,$)}},Ne=Math.sqrt(3),Le={draw:function(f,T){var $=-Math.sqrt(T/(Ne*3));f.moveTo(0,$*2),f.lineTo(-Ne*$,-$),f.lineTo(Ne*$,-$),f.closePath()}},y=-.5,P=Math.sqrt(3)/2,et=1/Math.sqrt(12),yt=(et/2+1)*3,Tt={draw:function(f,T){var $=Math.sqrt(T/yt),Y=$/2,J=$*et,nt=Y,ft=$*et+$,st=-nt,_t=ft;f.moveTo(Y,J),f.lineTo(nt,ft),f.lineTo(st,_t),f.lineTo(y*Y-P*J,P*Y+y*J),f.lineTo(y*nt-P*ft,P*nt+y*ft),f.lineTo(y*st-P*_t,P*st+y*_t),f.lineTo(y*Y+P*J,y*J-P*Y),f.lineTo(y*nt+P*ft,y*ft-P*nt),f.lineTo(y*st+P*_t,y*_t-P*st),f.closePath()}},St=[vt,wt,he,ze,we,Le,Tt];function Mt(){var f=o(vt),T=o(64),$=null;function Y(){var J;if($||($=J=i.path()),f.apply(this,arguments).draw($,+T.apply(this,arguments)),J)return $=null,J+""||null}return Y.type=function(J){return arguments.length?(f=typeof J=="function"?J:o(J),Y):f},Y.size=function(J){return arguments.length?(T=typeof J=="function"?J:o(+J),Y):T},Y.context=function(J){return arguments.length?($=J??null,Y):$},Y}function $t(){}function me(f,T,$){f._context.bezierCurveTo((2*f._x0+f._x1)/3,(2*f._y0+f._y1)/3,(f._x0+2*f._x1)/3,(f._y0+2*f._y1)/3,(f._x0+4*f._x1+T)/6,(f._y0+4*f._y1+$)/6)}function ye(f){this._context=f}ye.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:me(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(f,T){switch(f=+f,T=+T,this._point){case 0:this._point=1,this._line?this._context.lineTo(f,T):this._context.moveTo(f,T);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:me(this,f,T);break}this._x0=this._x1,this._x1=f,this._y0=this._y1,this._y1=T}};function ge(f){return new ye(f)}function _e(f){this._context=f}_e.prototype={areaStart:$t,areaEnd:$t,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(f,T){switch(f=+f,T=+T,this._point){case 0:this._point=1,this._x2=f,this._y2=T;break;case 1:this._point=2,this._x3=f,this._y3=T;break;case 2:this._point=3,this._x4=f,this._y4=T,this._context.moveTo((this._x0+4*this._x1+f)/6,(this._y0+4*this._y1+T)/6);break;default:me(this,f,T);break}this._x0=this._x1,this._x1=f,this._y0=this._y1,this._y1=T}};function Ie(f){return new _e(f)}function Ve(f){this._context=f}Ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(f,T){switch(f=+f,T=+T,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var $=(this._x0+4*this._x1+f)/6,Y=(this._y0+4*this._y1+T)/6;this._line?this._context.lineTo($,Y):this._context.moveTo($,Y);break;case 3:this._point=4;default:me(this,f,T);break}this._x0=this._x1,this._x1=f,this._y0=this._y1,this._y1=T}};function tt(f){return new Ve(f)}function xt(f,T){this._basis=new ye(f),this._beta=T}xt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var f=this._x,T=this._y,$=f.length-1;if($>0)for(var Y=f[0],J=T[0],nt=f[$]-Y,ft=T[$]-J,st=-1,_t;++st<=$;)_t=st/$,this._basis.point(this._beta*f[st]+(1-this._beta)*(Y+_t*nt),this._beta*T[st]+(1-this._beta)*(J+_t*ft));this._x=this._y=null,this._basis.lineEnd()},point:function(f,T){this._x.push(+f),this._y.push(+T)}};var It=function f(T){function $(Y){return T===1?new ye(Y):new xt(Y,T)}return $.beta=function(Y){return f(+Y)},$}(.85);function Xt(f,T,$){f._context.bezierCurveTo(f._x1+f._k*(f._x2-f._x0),f._y1+f._k*(f._y2-f._y0),f._x2+f._k*(f._x1-T),f._y2+f._k*(f._y1-$),f._x2,f._y2)}function Xe(f,T){this._context=f,this._k=(1-T)/6}Xe.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:Xt(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(f,T){switch(f=+f,T=+T,this._point){case 0:this._point=1,this._line?this._context.lineTo(f,T):this._context.moveTo(f,T);break;case 1:this._point=2,this._x1=f,this._y1=T;break;case 2:this._point=3;default:Xt(this,f,T);break}this._x0=this._x1,this._x1=this._x2,this._x2=f,this._y0=this._y1,this._y1=this._y2,this._y2=T}};var V=function f(T){function $(Y){return new Xe(Y,T)}return $.tension=function(Y){return f(+Y)},$}(0);function N(f,T){this._context=f,this._k=(1-T)/6}N.prototype={areaStart:$t,areaEnd:$t,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(f,T){switch(f=+f,T=+T,this._point){case 0:this._point=1,this._x3=f,this._y3=T;break;case 1:this._point=2,this._context.moveTo(this._x4=f,this._y4=T);break;case 2:this._point=3,this._x5=f,this._y5=T;break;default:Xt(this,f,T);break}this._x0=this._x1,this._x1=this._x2,this._x2=f,this._y0=this._y1,this._y1=this._y2,this._y2=T}};var W=function f(T){function $(Y){return new N(Y,T)}return $.tension=function(Y){return f(+Y)},$}(0);function H(f,T){this._context=f,this._k=(1-T)/6}H.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(f,T){switch(f=+f,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:Xt(this,f,T);break}this._x0=this._x1,this._x1=this._x2,this._x2=f,this._y0=this._y1,this._y1=this._y2,this._y2=T}};var at=function f(T){function $(Y){return new H(Y,T)}return $.tension=function(Y){return f(+Y)},$}(0);function ht(f,T,$){var Y=f._x1,J=f._y1,nt=f._x2,ft=f._y2;if(f._l01_a>A){var st=2*f._l01_2a+3*f._l01_a*f._l12_a+f._l12_2a,_t=3*f._l01_a*(f._l01_a+f._l12_a);Y=(Y*st-f._x0*f._l12_2a+f._x2*f._l01_2a)/_t,J=(J*st-f._y0*f._l12_2a+f._y2*f._l01_2a)/_t}if(f._l23_a>A){var Et=2*f._l23_2a+3*f._l23_a*f._l12_a+f._l12_2a,Dt=3*f._l23_a*(f._l23_a+f._l12_a);nt=(nt*Et+f._x1*f._l23_2a-T*f._l12_2a)/Dt,ft=(ft*Et+f._y1*f._l23_2a-$*f._l12_2a)/Dt}f._context.bezierCurveTo(Y,J,nt,ft,f._x2,f._y2)}function dt(f,T){this._context=f,this._alpha=T}dt.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(f,T){if(f=+f,T=+T,this._point){var $=this._x2-f,Y=this._y2-T;this._l23_a=Math.sqrt(this._l23_2a=Math.pow($*$+Y*Y,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(f,T):this._context.moveTo(f,T);break;case 1:this._point=2;break;case 2:this._point=3;default:ht(this,f,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=f,this._y0=this._y1,this._y1=this._y2,this._y2=T}};var mt=function f(T){function $(Y){return T?new dt(Y,T):new Xe(Y,0)}return $.alpha=function(Y){return f(+Y)},$}(.5);function bt(f,T){this._context=f,this._alpha=T}bt.prototype={areaStart:$t,areaEnd:$t,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(f,T){if(f=+f,T=+T,this._point){var $=this._x2-f,Y=this._y2-T;this._l23_a=Math.sqrt(this._l23_2a=Math.pow($*$+Y*Y,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=f,this._y3=T;break;case 1:this._point=2,this._context.moveTo(this._x4=f,this._y4=T);break;case 2:this._point=3,this._x5=f,this._y5=T;break;default:ht(this,f,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=f,this._y0=this._y1,this._y1=this._y2,this._y2=T}};var Rt=function f(T){function $(Y){return T?new bt(Y,T):new N(Y,0)}return $.alpha=function(Y){return f(+Y)},$}(.5);function Yt(f,T){this._context=f,this._alpha=T}Yt.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(f,T){if(f=+f,T=+T,this._point){var $=this._x2-f,Y=this._y2-T;this._l23_a=Math.sqrt(this._l23_2a=Math.pow($*$+Y*Y,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:ht(this,f,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=f,this._y0=this._y1,this._y1=this._y2,this._y2=T}};var Ut=function f(T){function $(Y){return T?new Yt(Y,T):new H(Y,0)}return $.alpha=function(Y){return f(+Y)},$}(.5);function ie(f){this._context=f}ie.prototype={areaStart:$t,areaEnd:$t,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(f,T){f=+f,T=+T,this._point?this._context.lineTo(f,T):(this._point=1,this._context.moveTo(f,T))}};function se(f){return new ie(f)}function ve(f){return f<0?-1:1}function je(f,T,$){var Y=f._x1-f._x0,J=T-f._x1,nt=(f._y1-f._y0)/(Y||J<0&&-0),ft=($-f._y1)/(J||Y<0&&-0),st=(nt*J+ft*Y)/(Y+J);return(ve(nt)+ve(ft))*Math.min(Math.abs(nt),Math.abs(ft),.5*Math.abs(st))||0}function nn(f,T){var $=f._x1-f._x0;return $?(3*(f._y1-f._y0)/$-T)/2:T}function sn(f,T,$){var Y=f._x0,J=f._y0,nt=f._x1,ft=f._y1,st=(nt-Y)/3;f._context.bezierCurveTo(Y+st,J+st*T,nt-st,ft-st*$,nt,ft)}function pn(f){this._context=f}pn.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:sn(this,this._t0,nn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(f,T){var $=NaN;if(f=+f,T=+T,!(f===this._x1&&T===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(f,T):this._context.moveTo(f,T);break;case 1:this._point=2;break;case 2:this._point=3,sn(this,nn(this,$=je(this,f,T)),$);break;default:sn(this,this._t0,$=je(this,f,T));break}this._x0=this._x1,this._x1=f,this._y0=this._y1,this._y1=T,this._t0=$}}};function Mn(f){this._context=new Tn(f)}(Mn.prototype=Object.create(pn.prototype)).point=function(f,T){pn.prototype.point.call(this,T,f)};function Tn(f){this._context=f}Tn.prototype={moveTo:function(f,T){this._context.moveTo(T,f)},closePath:function(){this._context.closePath()},lineTo:function(f,T){this._context.lineTo(T,f)},bezierCurveTo:function(f,T,$,Y,J,nt){this._context.bezierCurveTo(T,f,Y,$,nt,J)}};function Dn(f){return new pn(f)}function $n(f){return new Mn(f)}function Ee(f){this._context=f}Ee.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var f=this._x,T=this._y,$=f.length;if($)if(this._line?this._context.lineTo(f[0],T[0]):this._context.moveTo(f[0],T[0]),$===2)this._context.lineTo(f[1],T[1]);else for(var Y=xn(f),J=xn(T),nt=0,ft=1;ft<$;++nt,++ft)this._context.bezierCurveTo(Y[0][nt],J[0][nt],Y[1][nt],J[1][nt],f[ft],T[ft]);(this._line||this._line!==0&&$===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(f,T){this._x.push(+f),this._y.push(+T)}};
4function xn(f){var T,$=f.length-1,Y,J=new Array($),nt=new Array($),ft=new Array($);for(J[0]=0,nt[0]=2,ft[0]=f[0]+2*f[1],T=1;T<$-1;++T)J[T]=1,nt[T]=4,ft[T]=4*f[T]+2*f[T+1];for(J[$-1]=2,nt[$-1]=7,ft[$-1]=8*f[$-1]+f[$],T=1;T<$;++T)Y=J[T]/nt[T-1],nt[T]-=Y,ft[T]-=Y*ft[T-1];for(J[$-1]=ft[$-1]/nt[$-1],T=$-2;T>=0;--T)J[T]=(ft[T]-J[T+1])/nt[T];for(nt[$-1]=(f[$]+J[$-1])/2,T=0;T<$-1;++T)nt[T]=2*f[T+1]-J[T+1];return[J,nt]}function mn(f){return new Ee(f)}function cn(f,T){this._context=f,this._t=T}cn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(f,T){switch(f=+f,T=+T,this._point){case 0:this._point=1,this._line?this._context.lineTo(f,T):this._context.moveTo(f,T);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,T),this._context.lineTo(f,T);else{var $=this._x*(1-this._t)+f*this._t;this._context.lineTo($,this._y),this._context.lineTo($,T)}break}}this._x=f,this._y=T}};function G(f){return new cn(f,.5)}function lt(f){return new cn(f,0)}function Lt(f){return new cn(f,1)}function Ht(f,T){if((ft=f.length)>1)for(var $=1,Y,J,nt=f[T[0]],ft,st=nt.length;$<ft;++$)for(J=nt,nt=f[T[$]],Y=0;Y<st;++Y)nt[Y][1]+=nt[Y][0]=isNaN(J[Y][1])?J[Y][0]:J[Y][1]}function qt(f){for(var T=f.length,$=new Array(T);--T>=0;)$[T]=T;return $}function ce(f,T){return f[T]}function d(){var f=o([]),T=qt,$=Ht,Y=ce;function J(nt){var ft=f.apply(this,arguments),st,_t=nt.length,Et=ft.length,Dt=new Array(Et),Zt;for(st=0;st<Et;++st){for(var ue=ft[st],ke=Dt[st]=new Array(_t),Te=0,be;Te<_t;++Te)ke[Te]=be=[0,+Y(nt[Te],ue,Te,nt)],be.data=nt[Te];ke.key=ue}for(st=0,Zt=T(Dt);st<Et;++st)Dt[Zt[st]].index=st;return $(Dt,Zt),Dt}return J.keys=function(nt){return arguments.length?(f=typeof nt=="function"?nt:o(oe.call(nt)),J):f},J.value=function(nt){return arguments.length?(Y=typeof nt=="function"?nt:o(+nt),J):Y},J.order=function(nt){return arguments.length?(T=nt==null?qt:typeof nt=="function"?nt:o(oe.call(nt)),J):T},J.offset=function(nt){return arguments.length?($=nt??Ht,J):$},J}function e(f,T){if((Y=f.length)>0){for(var $,Y,J=0,nt=f[0].length,ft;J<nt;++J){for(ft=$=0;$<Y;++$)ft+=f[$][J][1]||0;if(ft)for($=0;$<Y;++$)f[$][J][1]/=ft}Ht(f,T)}}function t(f,T){if((_t=f.length)>0)for(var $,Y=0,J,nt,ft,st,_t,Et=f[T[0]].length;Y<Et;++Y)for(ft=st=0,$=0;$<_t;++$)(nt=(J=f[T[$]][Y])[1]-J[0])>0?(J[0]=ft,J[1]=ft+=nt):nt<0?(J[1]=st,J[0]=st+=nt):(J[0]=0,J[1]=nt)}function n(f,T){if((J=f.length)>0){for(var $=0,Y=f[T[0]],J,nt=Y.length;$<nt;++$){for(var ft=0,st=0;ft<J;++ft)st+=f[ft][$][1]||0;Y[$][1]+=Y[$][0]=-st/2}Ht(f,T)}}function a(f,T){if(!(!((ft=f.length)>0)||!((nt=(J=f[T[0]]).length)>0))){for(var $=0,Y=1,J,nt,ft;Y<nt;++Y){for(var st=0,_t=0,Et=0;st<ft;++st){for(var Dt=f[T[st]],Zt=Dt[Y][1]||0,ue=Dt[Y-1][1]||0,ke=(Zt-ue)/2,Te=0;Te<st;++Te){var be=f[T[Te]],Gt=be[Y][1]||0,De=be[Y-1][1]||0;ke+=Gt-De}_t+=Zt,Et+=ke*Zt}J[Y-1][1]+=J[Y-1][0]=$,_t&&($-=Et/_t)}J[Y-1][1]+=J[Y-1][0]=$,Ht(f,T)}}function c(f){var T=f.map(u);return qt(f).sort(function($,Y){return T[$]-T[Y]})}function u(f){for(var T=-1,$=0,Y=f.length,J,nt=-1/0;++T<Y;)(J=+f[T][1])>nt&&(nt=J,$=T);return $}function g(f){var T=f.map(w);return qt(f).sort(function($,Y){return T[$]-T[Y]})}function w(f){for(var T=0,$=-1,Y=f.length,J;++$<Y;)(J=+f[$][1])&&(T+=J);return T}function O(f){return g(f).reverse()}function L(f){var T=f.length,$,Y,J=f.map(w),nt=c(f),ft=0,st=0,_t=[],Et=[];for($=0;$<T;++$)Y=nt[$],ft<st?(ft+=J[Y],_t.push(Y)):(st+=J[Y],Et.push(Y));return Et.reverse().concat(_t)}function I(f){return qt(f).reverse()}r.arc=q,r.area=gt,r.areaRadial=fe,r.curveBasis=ge,r.curveBasisClosed=Ie,r.curveBasisOpen=tt,r.curveBundle=It,r.curveCardinal=V,r.curveCardinalClosed=W,r.curveCardinalOpen=at,r.curveCatmullRom=mt,r.curveCatmullRomClosed=Rt,r.curveCatmullRomOpen=Ut,r.curveLinear=ut,r.curveLinearClosed=se,r.curveMonotoneX=Dn,r.curveMonotoneY=$n,r.curveNatural=mn,r.curveStep=G,r.curveStepAfter=Lt,r.curveStepBefore=lt,r.line=Nt,r.lineRadial=Ft,r.linkHorizontal=Q,r.linkRadial=F,r.linkVertical=ot,r.pie=pt,r.pointRadial=Jt,r.radialArea=fe,r.radialLine=Ft,r.stack=d,r.stackOffsetDiverging=t,r.stackOffsetExpand=e,r.stackOffsetNone=Ht,r.stackOffsetSilhouette=n,r.stackOffsetWiggle=a,r.stackOrderAppearance=c,r.stackOrderAscending=g,r.stackOrderDescending=O,r.stackOrderInsideOut=L,r.stackOrderNone=qt,r.stackOrderReverse=I,r.symbol=Mt,r.symbolCircle=vt,r.symbolCross=wt,r.symbolDiamond=he,r.symbolSquare=ze,r.symbolStar=we,r.symbolTriangle=Le,r.symbolWye=Tt,r.symbols=St,Object.defineProperty(r,"__esMo
4dule",{value:!0})})});var pa=hn((ga,Wc)=>{(function(r,i){typeof ga=="object"&&typeof Wc<"u"?i(ga,dr(),Tr(),Br(),Un(),Xr()):typeof define=="function"&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-drag","d3-interpolate","d3-transition"],i):i(r.d3=r.d3||{},r.d3,r.d3,r.d3,r.d3,r.d3)})(ga,function(r,i,o,s,l,h){"use strict";function _(U){return function(){return U}}function p(U,Z,it){this.target=U,this.type=Z,this.transform=it}function x(U,Z,it){this.k=U,this.x=Z,this.y=it}x.prototype={constructor:x,scale:function(U){return U===1?this:new x(this.k*U,this.x,this.y)},translate:function(U,Z){return U===0&Z===0?this:new x(this.k,this.x+this.k*U,this.y+this.k*Z)},apply:function(U){return[U[0]*this.k+this.x,U[1]*this.k+this.y]},applyX:function(U){return U*this.k+this.x},applyY:function(U){return U*this.k+this.y},invert:function(U){return[(U[0]-this.x)/this.k,(U[1]-this.y)/this.k]},invertX:function(U){return(U-this.x)/this.k},invertY:function(U){return(U-this.y)/this.k},rescaleX:function(U){return U.copy().domain(U.range().map(this.invertX,this).map(U.invert,U))},rescaleY:function(U){return U.copy().domain(U.range().map(this.invertY,this).map(U.invert,U))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var b=new x(1,0,0);A.prototype=x.prototype;function A(U){return U.__zoom||b}function k(){i.event.stopImmediatePropagation()}function S(){i.event.preventDefault(),i.event.stopImmediatePropagation()}function R(){return!i.event.button}function E(){var U=this,Z,it;return U instanceof SVGElement?(U=U.ownerSVGElement||U,Z=U.width.baseVal.value,it=U.height.baseVal.value):(Z=U.clientWidth,it=U.clientHeight),[[0,0],[Z,it]]}function M(){return this.__zoom||b}function z(){return-i.event.deltaY*(i.event.deltaMode?120:1)/500}function D(){return"ontouchstart"in this}function B(U,Z,it){var q=U.invertX(Z[0][0])-it[0][0],ct=U.invertX(Z[1][0])-it[1][0],ut=U.invertY(Z[0][1])-it[0][1],C=U.invertY(Z[1][1])-it[1][1];return U.translate(ct>q?(q+ct)/2:Math.min(0,q)||Math.max(0,ct),C>ut?(ut+C)/2:Math.min(0,ut)||Math.max(0,C))}function X(){var U=R,Z=E,it=B,q=z,ct=D,ut=[0,1/0],C=[[-1/0,-1/0],[1/0,1/0]],Ct=250,Nt=l.interpolateZoom,gt=[],zt=o.dispatch("start","zoom","end"),Wt,pt,Ot=500,At=150,Bt=0;function kt(F){F.property("__zoom",M).on("wheel.zoom",Me).on("mousedown.zoom",K).on("dblclick.zoom",rt).filter(ct).on("touchstart.zoom",j).on("touchmove.zoom",Q).on("touchend.zoom touchcancel.zoom",ot).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}kt.transform=function(F,vt){var wt=F.selection?F.selection():F;wt.property("__zoom",M),F!==wt?oe(F,vt):wt.interrupt().each(function(){pe(this,arguments).start().zoom(null,typeof vt=="function"?vt.apply(this,arguments):vt).end()})},kt.scaleBy=function(F,vt){kt.scaleTo(F,function(){var wt=this.__zoom.k,jt=typeof vt=="function"?vt.apply(this,arguments):vt;return wt*jt})},kt.scaleTo=function(F,vt){kt.transform(F,function(){var wt=Z.apply(this,arguments),jt=this.__zoom,Vt=Jt(wt),he=jt.invert(Vt),de=typeof vt=="function"?vt.apply(this,arguments):vt;return it(fe(Ft(jt,de),Vt,he),wt,C)})},kt.translateBy=function(F,vt,wt){kt.transform(F,function(){return it(this.__zoom.translate(typeof vt=="function"?vt.apply(this,arguments):vt,typeof wt=="function"?wt.apply(this,arguments):wt),Z.apply(this,arguments),C)})},kt.translateTo=function(F,vt,wt){kt.transform(F,function(){var jt=Z.apply(this,arguments),Vt=this.__zoom,he=Jt(jt);return it(b.translate(he[0],he[1]).scale(Vt.k).translate(typeof vt=="function"?-vt.apply(this,arguments):-vt,typeof wt=="function"?-wt.apply(this,arguments):-wt),jt,C)})};function Ft(F,vt){return vt=Math.max(ut[0],Math.min(ut[1],vt)),vt===F.k?F:new x(vt,F.x,F.y)}function fe(F,vt,wt){var jt=vt[0]-wt[0]*F.k,Vt=vt[1]-wt[1]*F.k;return jt===F.x&&Vt===F.y?F:new x(F.k,jt,Vt)}function Jt(F){return[(+F[0][0]+ +F[1][0])/2,(+F[0][1]+ +F[1][1])/2]}function oe(F,vt,wt){F.on("start.zoom",function(){pe(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){pe(this,arguments).end()}).tween("zoom",function(){var jt=this,Vt=arguments,he=pe(jt,Vt),de=Z.apply(jt,Vt),re=wt||Jt(de),Pt=Math.max(de[1][0]-de[0][0],de[1][1]-de[0][1]),$e=jt.__zoom,we=typeof vt=="function"?vt.apply(jt,Vt):vt,ze=Nt($e.invert(re).concat(Pt/$e.k),we.invert(re).concat(Pt/we.k));return function(Ne){if(Ne===1)Ne=we;else{var Le=ze(Ne),y=Pt/Le[2];Ne=new x(y,re[0]-Le[0]*y,re[1]-Le[1]*y)}he.zoom(null,Ne)}})}function pe(F,vt){for(var wt=0,jt=gt.length,Vt;wt<jt;
4++wt)if((Vt=gt[wt]).that===F)return Vt;return new Ae(F,vt)}function Ae(F,vt){this.that=F,this.args=vt,this.index=-1,this.active=0,this.extent=Z.apply(F,vt)}Ae.prototype={start:function(){return++this.active===1&&(this.index=gt.push(this)-1,this.emit("start")),this},zoom:function(F,vt){return this.mouse&&F!=="mouse"&&(this.mouse[1]=vt.invert(this.mouse[0])),this.touch0&&F!=="touch"&&(this.touch0[1]=vt.invert(this.touch0[0])),this.touch1&&F!=="touch"&&(this.touch1[1]=vt.invert(this.touch1[0])),this.that.__zoom=vt,this.emit("zoom"),this},end:function(){return--this.active===0&&(gt.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(F){i.customEvent(new p(kt,F,this.that.__zoom),zt.apply,zt,[F,this.that,this.args])}};function Me(){if(!U.apply(this,arguments))return;var F=pe(this,arguments),vt=this.__zoom,wt=Math.max(ut[0],Math.min(ut[1],vt.k*Math.pow(2,q.apply(this,arguments)))),jt=i.mouse(this);if(F.wheel)(F.mouse[0][0]!==jt[0]||F.mouse[0][1]!==jt[1])&&(F.mouse[1]=vt.invert(F.mouse[0]=jt)),clearTimeout(F.wheel);else{if(vt.k===wt)return;F.mouse=[jt,vt.invert(jt)],h.interrupt(this),F.start()}S(),F.wheel=setTimeout(Vt,At),F.zoom("mouse",it(fe(Ft(vt,wt),F.mouse[0],F.mouse[1]),F.extent,C));function Vt(){F.wheel=null,F.end()}}function K(){if(pt||!U.apply(this,arguments))return;var F=pe(this,arguments),vt=i.select(i.event.view).on("mousemove.zoom",he,!0).on("mouseup.zoom",de,!0),wt=i.mouse(this),jt=i.event.clientX,Vt=i.event.clientY;s.dragDisable(i.event.view),k(),F.mouse=[wt,this.__zoom.invert(wt)],h.interrupt(this),F.start();function he(){if(S(),!F.moved){var re=i.event.clientX-jt,Pt=i.event.clientY-Vt;F.moved=re*re+Pt*Pt>Bt}F.zoom("mouse",it(fe(F.that.__zoom,F.mouse[0]=i.mouse(F.that),F.mouse[1]),F.extent,C))}function de(){vt.on("mousemove.zoom mouseup.zoom",null),s.dragEnable(i.event.view,F.moved),S(),F.end()}}function rt(){if(U.apply(this,arguments)){var F=this.__zoom,vt=i.mouse(this),wt=F.invert(vt),jt=F.k*(i.event.shiftKey?.5:2),Vt=it(fe(Ft(F,jt),vt,wt),Z.apply(this,arguments),C);S(),Ct>0?i.select(this).transition().duration(Ct).call(oe,Vt,vt):i.select(this).call(kt.transform,Vt)}}function j(){if(U.apply(this,arguments)){var F=pe(this,arguments),vt=i.event.changedTouches,wt,jt=vt.length,Vt,he,de;for(k(),Vt=0;Vt<jt;++Vt)he=vt[Vt],de=i.touch(this,vt,he.identifier),de=[de,this.__zoom.invert(de),he.identifier],F.touch0?F.touch1||(F.touch1=de):(F.touch0=de,wt=!0);if(Wt&&(Wt=clearTimeout(Wt),!F.touch1)){F.end(),de=i.select(this).on("dblclick.zoom"),de&&de.apply(this,arguments);return}wt&&(Wt=setTimeout(function(){Wt=null},Ot),h.interrupt(this),F.start())}}function Q(){var F=pe(this,arguments),vt=i.event.changedTouches,wt=vt.length,jt,Vt,he,de;for(S(),Wt&&(Wt=clearTimeout(Wt)),jt=0;jt<wt;++jt)Vt=vt[jt],he=i.touch(this,vt,Vt.identifier),F.touch0&&F.touch0[2]===Vt.identifier?F.touch0[0]=he:F.touch1&&F.touch1[2]===Vt.identifier&&(F.touch1[0]=he);if(Vt=F.that.__zoom,F.touch1){var re=F.touch0[0],Pt=F.touch0[1],$e=F.touch1[0],we=F.touch1[1],ze=(ze=$e[0]-re[0])*ze+(ze=$e[1]-re[1])*ze,Ne=(Ne=we[0]-Pt[0])*Ne+(Ne=we[1]-Pt[1])*Ne;Vt=Ft(Vt,Math.sqrt(ze/Ne)),he=[(re[0]+$e[0])/2,(re[1]+$e[1])/2],de=[(Pt[0]+we[0])/2,(Pt[1]+we[1])/2]}else if(F.touch0)he=F.touch0[0],de=F.touch0[1];else return;F.zoom("touch",it(fe(Vt,he,de),F.extent,C))}function ot(){var F=pe(this,arguments),vt=i.event.changedTouches,wt=vt.length,jt,Vt;for(k(),pt&&clearTimeout(pt),pt=setTimeout(function(){pt=null},Ot),jt=0;jt<wt;++jt)Vt=vt[jt],F.touch0&&F.touch0[2]===Vt.identifier?delete F.touch0:F.touch1&&F.touch1[2]===Vt.identifier&&delete F.touch1;F.touch1&&!F.touch0&&(F.touch0=F.touch1,delete F.touch1),F.touch0?F.touch0[1]=this.__zoom.invert(F.touch0[0]):F.end()}return kt.wheelDelta=function(F){return arguments.length?(q=typeof F=="function"?F:_(+F),kt):q},kt.filter=function(F){return arguments.length?(U=typeof F=="function"?F:_(!!F),kt):U},kt.touchable=function(F){return arguments.length?(ct=typeof F=="function"?F:_(!!F),kt):ct},kt.extent=function(F){return arguments.length?(Z=typeof F=="function"?F:_([[+F[0][0],+F[0][1]],[+F[1][0],+F[1][1]]]),kt):Z},kt.scaleExtent=function(F){return arguments.length?(ut[0]=+F[0],ut[1]=+F[1],kt):[ut[0],ut[1]]},kt.translateExtent=function(F){return arguments.length?(C[0][0]=+F[0][0],C[1][0]=+F[1][0],C[
40][1]=+F[0][1],C[1][1]=+F[1][1],kt):[[C[0][0],C[0][1]],[C[1][0],C[1][1]]]},kt.constrain=function(F){return arguments.length?(it=F,kt):it},kt.duration=function(F){return arguments.length?(Ct=+F,kt):Ct},kt.interpolate=function(F){return arguments.length?(Nt=F,kt):Nt},kt.on=function(){var F=zt.on.apply(zt,arguments);return F===zt?kt:F},kt.clickDistance=function(F){return arguments.length?(Bt=(F=+F)*F,kt):Math.sqrt(Bt)},kt}r.zoom=X,r.zoomTransform=A,r.zoomIdentity=b,Object.defineProperty(r,"__esModule",{value:!0})})});var Gc=hn((hi,Yo)=>{(function(i,o){if(typeof hi=="object"&&typeof Yo=="object")Yo.exports=o(ci(),dr(),Xr(),ta(),ra(),ca(),fi(),Br(),da(),Un(),ar(),pa(),ui());else if(typeof define=="function"&&define.amd)define(["d3-time-format","d3-selection","d3-transition","d3-axis","d3-brush","d3-scale","d3-dsv","d3-drag","d3-shape","d3-interpolate","d3-color","d3-zoom","d3-ease"],o);else{var s=typeof hi=="object"?o(ci(),dr(),Xr(),ta(),ra(),ca(),fi(),Br(),da(),Un(),ar(),pa(),ui()):o(i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3,i.d3);for(var l in s)(typeof hi=="object"?hi:i)[l]=s[l]}})(window,function(r,i,o,s,l,h,_,p,x,b,A,k,S){return function(R){var E={};function M(z){if(E[z])return E[z].exports;var D=E[z]={i:z,l:!1,exports:{}};return R[z].call(D.exports,D,D.exports,M),D.l=!0,D.exports}return M.m=R,M.c=E,M.d=function(z,D,B){M.o(z,D)||Object.defineProperty(z,D,{enumerable:!0,get:B})},M.r=function(z){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(z,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(z,"__esModule",{value:!0})},M.t=function(z,D){if(D&1&&(z=M(z)),D&8||D&4&&typeof z=="object"&&z&&z.__esModule)return z;var B=Object.create(null);if(M.r(B),Object.defineProperty(B,"default",{enumerable:!0,value:z}),D&2&&typeof z!="string")for(var X in z)M.d(B,X,function(U){return z[U]}.bind(null,X));return B},M.n=function(z){var D=z&&z.__esModule?function(){return z.default}:function(){return z};return M.d(D,"a",D),D},M.o=function(z,D){return Object.prototype.hasOwnProperty.call(z,D)},M.p="",M(M.s=27)}([function(R,E){function M(z,D){if(!(z instanceof D))throw new TypeError("Cannot call a class as a function")}R.exports=M},function(R,E,M){var z=M(2),D=M(3),B=M(4);function X(U,Z){return z(U)||D(U,Z)||B()}R.exports=X},function(R,E){function M(z){if(Array.isArray(z))return z}R.exports=M},function(R,E){function M(z,D){var B=[],X=!0,U=!1,Z=void 0;try{for(var it=z[Symbol.iterator](),q;!(X=(q=it.next()).done)&&(B.push(q.value),!(D&&B.length===D));X=!0);}catch(ct){U=!0,Z=ct}finally{try{!X&&it.return!=null&&it.return()}finally{if(U)throw Z}}return B}R.exports=M},function(R,E){function M(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}R.exports=M},function(R,E){function M(D,B){for(var X=0;X<B.length;X++){var U=B[X];U.enumerable=U.enumerable||!1,U.configurable=!0,"value"in U&&(U.writable=!0),Object.defineProperty(D,U.key,U)}}function z(D,B,X){return B&&M(D.prototype,B),X&&M(D,X),D}R.exports=z},function(R,E){R.exports=r},function(R,E){R.exports=i},function(R,E){R.exports=o},function(R,E){R.exports=s},function(R,E,M){var z=M(11),D=M(12),B=M(13);function X(U){return z(U)||D(U)||B()}R.exports=X},function(R,E){function M(z){if(Array.isArray(z)){for(var D=0,B=new Array(z.length);D<z.length;D++)B[D]=z[D];return B}}R.exports=M},function(R,E){function M(z){if(Symbol.iterator in Object(z)||Object.prototype.toString.call(z)==="[object Arguments]")return Array.from(z)}R.exports=M},function(R,E){function M(){throw new TypeError("Invalid attempt to spread non-iterable instance")}R.exports=M},function(R,E){function M(D){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?M=function(X){return typeof X}:M=function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":typeof X},M(D)}function z(D){return typeof Symbol=="function"&&M(Symbol.iterator)==="symbol"?R.exports=z=function(X){return M(X)}:R.exports=z=function(X){return X&&typeof Symbol=="function"&&X.constructor===Symbol&&X!==Symbol.prototype?"symbol":M(X)},z(D)}R.exports=z},function(R,E){R.exports=l},function(R,E){R.exports=h},function(R,E,M){"use strict";(function(z){M.d(E,"b",function(){return D}),M.d(E,"a",function(){return X});var D=function(){var U=function(Z){return typeof Z<"u"&&Z};return U(self)||U(window)||U(z)||U(globalThis)||Function("return this")()}(),B=D&&D.document,X=D.navigator&&D.navigator.userAgent&&D.navigator.userAgent.indexOf("Mobi")>-1||!1}).call(this,M(18))},function(R,E){var M;M=function(){return this}();try{M=M||new Function("return this")()}catch{typeof window=="object"&&(M=window)}R.exports=M},function(R,E){R.exports=_},function(R,E){R.exports=p},function(R,E){R.exports=x},function(R,E){R.exports=b},function(R,E){R.exports=A},function(R,E){R.exports=k},function(R,E){R.exports=S},function(R,E,M){},function(R,E,M){"use strict";M.r(E);var z=M(0),D=M.n(z),B=M(1),X=M.n(B),U=M(5),Z=M.n(U),it=M(6),q=M(7),ct=M(8),ut=M(9),C={arc:"bb-arc",arcs:"bb-arcs",area:"bb-area",areas:"bb-areas",axis:"bb-axis",axisX:"bb-axis-x",axisXLabel:"bb-axis-x-label",axisY:"bb-axis-y",axisY2:"bb-axis-y2",axisY2Label:"bb-axis-y2-label",axisYLabel:"bb-axis-y-label",bar:"bb-bar",bars:"bb-bars",brush:"bb-brush",button:"bb-button",button
4ZoomReset:"bb-zoom-reset",chart:"bb-chart",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackground:"bb-chart-arcs-background",chartArcsGaugeMax:"bb-chart-arcs-gauge-max",chartArcsGaugeMin:"bb-chart-arcs-gauge-min",chartArcsGaugeUnit:"bb-chart-arcs-gauge-unit",chartArcsTitle:"bb-chart-arcs-title",chartArcsGaugeTitle:"bb-chart-arcs-gauge-title",chartBar:"bb-chart-bar",chartBars:"bb-chart-bars",chartLine:"bb-chart-line",chartLines:"bb-chart-lines",chartRadar:"bb-chart-radar",chartRadars:"bb-chart-radars",chartText:"bb-chart-text",chartTexts:"bb-chart-texts",circle:"bb-circle",circles:"bb-circles",colorPattern:"bb-color-pattern",colorScale:"bb-colorscale",defocused:"bb-defocused",dragarea:"bb-dragarea",empty:"bb-empty",eventRect:"bb-event-rect",eventRects:"bb-event-rects",eventRectsMultiple:"bb-event-rects-multiple",eventRectsSingle:"bb-event-rects-single",focused:"bb-focused",gaugeValue:"bb-gauge-value",grid:"bb-grid",gridLines:"bb-grid-lines",legendBackground:"bb-legend-background",legendItem:"bb-legend-item",legendItemEvent:"bb-legend-item-event",legendItemFocused:"bb-legend-item-focused",legendItemHidden:"bb-legend-item-hidden",legendItemPoint:"bb-legend-item-point",legendItemTile:"bb-legend-item-tile",level:"bb-level",levels:"bb-levels",line:"bb-line",lines:"bb-lines",region:"bb-region",regions:"bb-regions",selectedCircle:"bb-selected-circle",selectedCircles:"bb-selected-circles",shape:"bb-shape",shapes:"bb-shapes",stanfordElements:"bb-stanford-elements",stanfordLine:"bb-stanford-line",stanfordLines:"bb-stanford-lines",stanfordRegion:"bb-stanford-region",stanfordRegions:"bb-stanford-regions",target:"bb-target",text:"bb-text",texts:"bb-texts",title:"bb-title",tooltip:"bb-tooltip",tooltipContainer:"bb-tooltip-container",tooltipName:"bb-tooltip-name",xgrid:"bb-xgrid",xgridFocus:"bb-xgrid-focus",xgridLine:"bb-xgrid-line",xgridLines:"bb-xgrid-lines",xgrids:"bb-xgrids",ygrid:"bb-ygrid",ygridLine:"bb-ygrid-line",ygridLines:"bb-ygrid-lines",ygrids:"bb-ygrids",zoomBrush:"bb-zoom-brush",zoomRect:"bb-zoom-rect",EXPANDED:"_expanded_",SELECTED:"_selected_",INCLUDED:"_included_"},Ct=M(10),Nt=M.n(Ct),gt=M(14),zt=M.n(gt),Wt=M(15),pt=function(d){return d||d===0},Ot=function(d){return typeof d=="function"},At=function(d){return typeof d=="string"},Bt=function(d){return typeof d=="number"},kt=function(d){return typeof d>"u"},Ft=function(d){return typeof d<"u"},fe=function(d){return typeof d=="boolean"},Jt=function(d){return Math.ceil(d/10)*10},oe=function(d){return Math.ceil(d)+.5},pe=function(d){return d[1]-d[0]},Ae=function(d){return zt()(d)==="object"},Me=function(d){return kt(d)||d===null||At(d)&&d.length===0||Ae(d)&&!(d instanceof Date)&&Object.keys(d).length===0||Bt(d)&&isNaN(d)},K=function(d){return!Me(d)},rt=function(d){return d&&d.constructor===Array},j=function(d){return d&&!d.nodeType&&Ae(d)&&!rt(d)},Q=function(d,e,t){return Ft(d[e])?d[e]:t},ot=function(d,e){var t=!1;return Object.keys(d).forEach(function(n){return d[n]===e&&(t=!0)}),t},F=function(d){for(var e=Ot(d),t=arguments.length,n=Array(t>1?t-1:0),a=1;a<t;a++)n[a-1]=arguments[a];return e&&d.call.apply(d,n),e},vt=function(d){return At(d)?d.replace(/</g,"<").replace(/>/g,">"):d},wt=function(d,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[-1,1];if(d&&At(e))if(e.indexOf(` 5`)===-1)d.text(e);else{var n=[d.text(),e].map(function(c){return c.replace(/[\s\n]/g,"")});if(n[0]!==n[1]){var a=e.split(` 6`);d.html(""),a.forEach(function(c,u){d.append("tspan").attr("x",0).attr("dy","".concat(u===0?t[0]:t[1],"em")).text(c)})}}},jt=function(d){var e=d.getBBox(),t=e.x,n=e.y,a=e.width,c=e.height;return[{x:t,y:n+c},{x:t,y:n},{x:t+a,y:n},{x:t+a,y:n+c}]},Vt=function(d){var e=d.getBoundingClientRect(),t=e.width,n=e.height,a=jt(d),c=a[0].x,u=Math.min(a[0].y,a[1].y);return{x:c,y:u,width:t,height:n}},he=function(d){var e=null,t=q.event,n=d.context||d.main;return t&&t.constructor.name==="BrushEvent"?e=t.selection:n&&(e=n.select(".".concat(C.brush)).node())&&(e=Object(Wt.brushSelection)(e)),e},de=function(){var d=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Math.random()+(d?"":0)},re=function(d){var e=he(d);return!e||e[0]===e[1]},Pt=function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var t in e)d[t]=e[t];return d},$e=function(d){return d.charAt(0).toUpperCase()+d.slice(1)},we=function(d){return[].slice.call(d)},ze=function(d){var e=[];return d.forEach(function(t){try{t.cssRules&&t.cssRules.length&&(e=e.concat(we(t.cssRules)))}catch(n){console.error("Error while reading rules from ".concat(t.href,": ").concat(n.toString()))}}),e},Ne=function(d){return d.filter(function(e,t,n){return n.indexOf(e)===t})},Le=function(d){return d&&d.length?d.reduce(function(e,t){return e.concat(t)}):[]},y=function(d){function e(){return d.apply(this,arguments)}return e.toString=function(){return d.toString()},e}(function(d){for(var e=arguments.length,t=Array(e>1?e-1:0),n=1;n<e;n++)t[n-1]=arguments[n];if(!t.length||t.length===1&&!t[0])return d;var a=t.shift();
6return j(d)&&j(a)&&Object.keys(a).forEach(function(c){var u=a[c];j(u)?(!d[c]&&(d[c]={}),d[c]=y(d[c],u)):d[c]=rt(u)?u.concat():u}),y.apply(void 0,[d].concat(t))}),P=function(d){var e,t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return d[0]instanceof Date?e=t?function(n,a){return n-a}:function(n,a){return a-n}:t&&d.every(Number)?e=function(n,a){return n-a}:!t&&(e=function(n,a){return n>a&&-1||n<a&&1||n===a&&0}),d.concat().sort(e)},et=function(d,e){var t=e.filter(function(n){return K(n)});return t.length?Bt(t[0])?t=Math[d].apply(Math,Nt()(t)):t[0]instanceof Date&&(t=P(t,d==="min")[0]):t=void 0,t},yt=function(d,e){for(var t=[],n=d;n<e;n++)t.push(n);return t},Tt=function(){if(navigator&&localStorage){var d="https://www.google-analytics.com/collect?v=1&tid=UA-141911582-1&cid=555&t=pageview&dp=%2F".concat(location?location.hostname:""),e=+new Date,t=+localStorage.getItem("$bb.stats"),n=12096e5;if(!t||t+n<e)if(localStorage.setItem("$bb.stats",e+n),navigator.sendBeacon)navigator.sendBeacon(d);else{var a=new Image;a.src=d,a.style.display="none",document.body.appendChild(a),document.body.removeChild(a)}}},St={mouse:function(){var d=function(){return{bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0}};try{return new MouseEvent("t"),function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d();e.dispatchEvent(new MouseEvent(t,n))}}catch{return function(t,n){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:d(),c=document.createEvent("MouseEvent");c.initMouseEvent(n,a.bubbles,a.cancelable,window,0,a.screenX,a.screenY,a.clientX,a.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(c)}}}(),touch:function(e,t,n){var a=new Touch(Object.assign({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));e.dispatchEvent(new TouchEvent(t,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[a],targetTouches:[],changedTouches:[a]}))}},Mt=function(d,e){var t=d;for(var n in e)t=t.replace(new RegExp("{=".concat(n,"}"),"g"),e[n]);return t},$t=M(16),me=function(){function d(e,t){D()(this,d);var n=Object($t.scaleLinear)();this.config=e,this.scale=n,(e.noTransition||!t.config.transition_duration)&&(e.withoutTransition=!0),e.range=n.rangeExtent?n.rangeExtent():this.scaleExtent((t.orgXScale||n).range())}return Z()(d,[{key:"axisX",value:function(t,n){var a=this;t.attr("transform",function(c){return"translate(".concat(Math.ceil(n(c)+a.config.tickOffset),",0)")})}},{key:"axisY",value:function(t,n){t.attr("transform",function(a){return"translate(0,".concat(Math.ceil(n(a)),")")})}},{key:"scaleExtent",value:function(t){var n=t[0],a=t[t.length-1];return n<a?[n,a]:[a,n]}},{key:"generateTicks",value:function(t){var n=[];if(t.ticks)return t.ticks.apply(t,Nt()(this.config.tickArguments||[])).map(function(u){return At(u)&&Bt(u)&&!isNaN(u)&&Math.round(u*10)/10||u});for(var a=t.domain(),c=Math.ceil(a[0]);c<a[1];c++)n.push(c);return n.length>0&&n[0]>0&&n.unshift(n[0]-(n[1]-n[0])),n}},{key:"copyScale",value:function(){var t=this.scale.copy();return t.domain().length||t.domain(this.scale.domain()),t}},{key:"textFormatted",value:function(t){var n=this.config.tickFormat,a=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,c=n?n(a):a;return Ft(c)?c:""}},{key:"transitionise",value:function(t){var n=this.config;return n.withoutTransition?t.interrupt():t.transition(n.transition)}}],[{key:"getSizeFor1Char",value:function(t){var n={w:5.5,h:11.5};return t.empty()||t.select("text").text("0").call(function(a){try{var c=a.node().getBBox(),u=c.width,g=c.height;u&&g&&(n.w=u,n.h=g),a.text("")}catch{}}),this.getSizeFor1Char=function(){return n},n}}]),d}(),ye=function(){function d(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};D()(this,d);var t={innerTickSize:6,outerTickSize:e.outerTick?6:0,orient:"bottom",range:[],tickArguments:null,tickCentered:null,tickCulling:!0,tickFormat:null,tickLength:9,tickOffset:0,tickPadding:3,tickValues:null,transition:null,noTransition:e.noTransition};t.tickLength=Math.max(t.innerTickSize,0)+t.tickPadding,this.helper=new me(t,e),this.config=t,this.params=e}return Z()(d,[{key:"create",value:function(t){var n=this,a=this.config,c=this.params,u=this.helper,g=u.scale,w=a.orient,O=this.splitTickText.bind(this),L=/^(left|right)$/.test(w),I=/^(top|bottom)$/.test(w),f=u[I?"axisX":"axisY"],T=f===u.axisX?"y":"x",$=/^(top|left)$/.test(w)?-1:1,Y=c.tickTextRotate;this.config.range=g.rangeExtent?g.rangeExtent():u.scaleExtent((c.orgXScale||g).range());var J=a,nt=J.innerTickSize,ft=J.tickLength,st=J.range,_t=c.name,Et=_t&&/^(x|y|y2)$/.test(_t)?c.config["axis_".concat(_t,"_tick_text_position")]:{x:0,y:0}
6,Dt=_t==="subX"?"subchart_axis_x":"axis_".concat(_t),Zt=c.config["".concat(Dt,"_show")],ue={tick:!!Zt&&c.config["".concat(Dt,"_tick_show")],text:!!Zt&&c.config["".concat(Dt,"_tick_text_show")]},ke=null;t.each(function(){var Te=Object(q.select)(this),be=this.__chart__||g,Gt=u.copyScale();ke=Te,this.__chart__=Gt,a.tickOffset=c.isCategory?Math.ceil((Gt(1)-Gt(0))/2):0;var De=Te.selectAll(".domain").data([0]);if(De.enter().append("path").attr("class","domain").merge(u.transitionise(De)).attr("d",function(){var le=a.outerTickSize*$;return I?"M".concat(st[0],",").concat(le,"V0H").concat(st[1],"V").concat(le):"M".concat(le,",").concat(st[0],"H0V").concat(st[1],"H").concat(le)}),ue.tick||ue.text){var Oe=a.tickValues||u.generateTicks(Gt),Se=Te.selectAll(".tick").data(Oe,Gt),He=Se.enter().insert("g",".domain").attr("class","tick").style("opacity","1"),un=Se.exit().remove();Se=He.merge(Se),ue.tick&&He.append("line"),ue.text&&He.append("text");var Ze=me.getSizeFor1Char(Se),Fe=[],We=Se.select("text").selectAll("tspan").data(function(le,Je){var tn=c.tickMultiline?O(le,Gt,Oe,L,Ze.w):rt(u.textFormatted(le))?u.textFormatted(le).concat():[u.textFormatted(le)];return Fe[Je]=tn.length,tn.map(function(An){return{index:Je,splitted:An}})});We.exit().remove(),We=We.enter().append("tspan").merge(We).text(function(le){return le.splitted}),We.attr("x",I?0:ft*$).attr("dx",function(){var le=0;return w==="bottom"&&Y&&(le=8*Math.sin(Math.PI*(Y/180))),le+(Et.x||0)}()).attr("dy",function(le,Je){var tn=0;
6return w!=="top"&&(tn=Ze.h,Je===0&&(tn=L?-((Fe[le.index]-1)*(Ze.h/2)-3):Et.y===0?".71em":0)),Bt(tn)&&Et.y?tn+Et.y:tn||".71em"});var Re=Se.select("line"),qe=Se.select("text");if(He.select("line").attr("".concat(T,"2"),nt*$),He.select("text").attr("".concat(T),ft*$),n.setTickLineTextPosition(Re,qe),c.tickTitle&&qe.append&&qe.append("title").each(function(le){Object(q.select)(this).text(c.tickTitle[le])}),Gt.bandwidth){var te=Gt,Kt=te.bandwidth()/2;be=function(le){return te(le)+Kt},Gt=be}else be.bandwidth?be=Gt:f.call(u,un,Gt);f.call(u,He,be),f.call(u,u.transitionise(Se).style("opacity","1"),Gt)}}),this.g=ke}},{key:"getTickXY",value:function(){var t=this.config,n={x:0,y:0};return this.params.isCategory&&(n.x=t.tickCentered?0:t.tickOffset,n.y=t.tickCentered?t.tickOffset:0),n}},{key:"getTickSize",value:function(t){var n=this.helper.scale,a=this.config,c=a.innerTickSize,u=a.range,g=n(t)+(a.tickCentered?0:a.tickOffset);return u[0]<g&&g<u[1]?c:0}},{key:"setTickLineTextPosition",value:function(t,n){var a=this.getTickXY(),c=this.config,u=c.innerTickSize,g=c.orient,w=c.tickLength,O=c.tickOffset,L=this.params.tickTextRotate;g==="bottom"?(t.attr("x1",a.x).attr("x2",a.x).attr("y2",this.getTickSize.bind(this)),n.attr("x",0).attr("y",function(f){return f?11.5-2.5*(f/15)*(f>0?1:-1):w}(L)).style("text-anchor",function(f){return f?f>0?"start":"end":"middle"}(L)).attr("transform",function(f){return f?"rotate(".concat(f,")"):null}(L))):g==="top"?(t.attr("x2",0).attr("y2",-u),n.attr("x",0).attr("y",-w*2).style("text-anchor","middle")):g==="left"?(t.attr("x2",-u).attr("y1",a.y).attr("y2",a.y),n.attr("x",-w).attr("y",O).style("text-anchor","end")):g==="right"&&(t.attr("x2",u).attr("y2",0),n.attr("x",w).attr("y",0).style("text-anchor","start"))}},{key:"splitTickText",value:function(t,n,a,c,u){function g(f,T){for(var $,Y,J,nt=1;nt<T.length;nt++)if(T.charAt(nt)===" "&&(Y=nt),$=T.substr(0,nt+1),J=u*$.length,I<J)return g(f.concat(T.substr(0,Y||nt)),T.slice(Y?Y+1:nt));return f.concat(T)}var w=this.params,O=this.helper.textFormatted(t),L=At(O)&&O.indexOf(` 7`)>-1?O.split(` 8`):[];if(L.length)return L;if(rt(O))return O;var I=w.tickWidth;return(!I||I<=0)&&(I=c?95:w.isCategory?Math.ceil(n(a[1])-n(a[0]))-12:110),g(L,O+"")}},{key:"scale",value:function(t){return arguments.length?(this.helper.scale=t,this):this.helper.scale}},{key:"orient",value:function(t){return arguments.length?(this.config.orient=t in{top:1,right:1,bottom:1,left:1}?t+"":"bottom",this):this.config.orient}},{key:"tickFormat",value:function(t){return arguments.length?(this.config.tickFormat=t,this):this.config.tickFormat}},{key:"tickCentered",value:function(t){var n=this.config;return arguments.length?(n.tickCentered=t,this):n.tickCentered}},{key:"tickOffset",value:function(){return this.config.tickOffset}},{key:"tickInterval",value:function(t){var n;if(this.params.isCategory)n=this.config.tickOffset*2;else{var a=this.g.select("path.domain").node().getTotalLength()-this.config.outerTickSize*2;n=a/(t||this.g.selectAll("line").size())}return n===1/0?0:n}},{key:"ticks",value:function(){for(var t=this.config,n=arguments.length,a=Array(n),c=0;c<n;c++)a[c]=arguments[c];return a.length?(t.tickArguments=we(a),this):t.tickArguments}},{key:"tickCulling",value:function(t){var n=this.config;return arguments.length?(n.tickCulling=t,this):n.tickCulling}},{key:"tickValues",value:function(t){var n=this,a=this.config;if(Ot(t))a.tickValues=function(){return t(n.helper.scale.domain())};else{if(!arguments.length)return a.tickValues;a.tickValues=t}return this}},{key:"setTransition",value:function(t){return this.config.transition=t,this}}]),d}(),ge=function(d,e){var t=d.config.axis_rotated;return e?t:!t},_e=function(d){return"".concat(C.axis," ").concat(C["axis".concat($e(d))])},Ie=function(){function d(e){D()(this,d),this.owner=e,this.setOrient()}return Z()(d,[{key:"init",value:function(){var t=this,n=this.owner,a=n.config,c=a.axis_rotated,u=n.main,g=["x","y"];a.axis_y2_show&&g.push("y2"),n.axesList={},g.forEach(function(w){var O=_e(w),L=C["axis".concat($e(w),"Label")];n.axes[w]=u.append("g").attr("class",O).attr("clip-path",function(){var I=null;return w==="x"?I=n.clipPathForXAxis:w==="y"&&a.axis_y_inner&&(I=n.clipPathForYAxis),I}).attr("transform",n.getTranslate(w)).style("visibility",a["axis_".concat(w,"_show")]?"visible":"hidden"),n.axes[w].append("text").attr("class",L).attr("transform",["rotate(-90)",null][w==="x"?+!c:+c]).style("text-anchor",t.textAnchorForXAxisLabel.bind(t)),t.generateAxes(w)})}},{key:"setOrient",value:function(){var t=this.owner,n=t.config,a=n.axis_rotated,c=n.axis_y_inner,u=n.axis_y2_inner;t.xOrient=a?"left":"bottom",t.yOrient=a?c?"top":"bottom":c?"right":"left",t.y2Orient=a?u?"bottom":"top":u?"left"
8:"right",t.subXOrient=a?"left":"bottom"}},{key:"generateAxes",value:function(t){var n,a=this.owner,c=a.config,u=[],g=c["axis_".concat(t,"_axes")],w=c.axis_rotated;t==="x"?n=w?ut.axisLeft:ut.axisBottom:t==="y"?n=w?ut.axisBottom:ut.axisLeft:t==="y2"&&(n=w?ut.axisTop:ut.axisRight),g.length&&g.forEach(function(O){var L=O.tick;u.push(n(a[t]).ticks(L.count).tickFormat(L.format||function(I){return I}).tickValues(L.values).tickSizeOuter(L.outer===!1?0:6))}),a.axesList[t]=u}},{key:"updateAxes",value:function(){var t=this.owner,n=t.config;Object.keys(t.axesList).forEach(function(a){var c=t[a].range();t.axesList[a].forEach(function(u,g){var w=u.scale().range();c.every(function(I,f){return I===w[f]})||u.scale().range(c);var O="".concat(_e(a),"-").concat(g+1),L=t.main.select(".".concat(O.replace(/\s/,".")));L.empty()?L=t.main.append("g").attr("class",O).style("visibility",n["axis_".concat(a,"_show")]?"visible":"hidden").call(u):t.xAxis.helper.transitionise(L).call(u.scale(t[a])),L.attr("transform",t.getTranslate(a,g+1))})})}},{key:"getXAxis",value:function(t,n,a,c,u){var g=this.owner,w=g.config,O=g.isCategorized(),L=g["".concat(t,"Orient")],I=g.xAxisTickFormat,f=g.xAxisTickValues,T={isCategory:O,outerTick:a,noTransition:c,config:w,name:t,tickMultiline:w.axis_x_tick_multiline,tickWidth:w.axis_x_tick_width,tickTextRotate:u?0:w.axis_x_tick_rotate,tickTitle:O&&w.axis_x_tick_tooltip&&g.api.categories(),orgXScale:g.x},$=new ye(T).scale(g.zoomScale||n).orient(L),Y=f;return g.isTimeSeries()&&f&&!Ot(f)&&(Y=f.map(function(J){return g.parseDate(J)})),$.tickFormat(I).tickValues(Y),O&&($.tickCentered(w.axis_x_tick_centered),Me(w.axis_x_tick_culling)&&(w.axis_x_tick_culling=!1)),w.axis_x_tick_count&&$.ticks(w.axis_x_tick_count),$}},{key:"getYAxis",value:function(t,n,a,c,u){var g=this.owner,w=g.config,O=g["".concat(t,"Orient")],L=w["axis_".concat(t,"_tick_format")],I=g["".concat(t,"AxisTickValues")],f={outerTick:a,noTransition:c,config:w,name:t,tickTextRotate:u?0:w.axis_y_tick_rotate},T=new ye(f).scale(n).orient(O).tickFormat(L||g.isStackNormalized()&&function($){return"".concat($,"%")});return g.isTimeSeriesY()?T.ticks(w.axis_y_tick_time_value):T.tickValues(I),T}},{key:"updateXAxisTickValues",value:function(t,n){var a,c=this.owner,u=c.config,g=u.axis_x_tick_fit,w=u.axis_x_tick_count;return(g||w&&g)&&(a=this.generateTickValues(c.mapTargetsToUniqueXs(t),w,c.isTimeSeries())),n?n.tickValues(a):c.xAxis&&(c.xAxis.tickValues(a),c.subXAxis.tickValues(a)),a}},{key:"getId",value:function(t){var n=this.owner.config;return t in n.data_axes?n.data_axes[t]:"y"}},{key:"getXAxisTickFormat",value:function(){var t,n=this.owner,a=n.config,c=a.axis_x_tick_format,u=n.isTimeSeries(),g=n.isCategorized();return c?Ot(c)?t=c:u&&(t=function(w){return w?n.axisTimeFormat(c)(w):""}):t=u?n.defaultAxisTimeFormat:g?n.categoryName:function(w){return w<0?w.toFixed(0):w},Ot(t)?function(w){return t.apply(n,g?[w,n.categoryName(w)]:[w])}:t}},{key:"getTickValues",value:function(t){var n=this.owner,a=n.config["axis_".concat(t,"_tick_values")],c=n["".concat(t,"Axis")];return a||(c?c.tickValues():void 0)}},{key:"getXAxisTickValues",value:function(){return this.getTickValues("x")}},{key:"getYAxisTickValues",value:function(){return this.getTickValues("y")}},{key:"getY2AxisTickValues",value:function(){return this.getTickValues("y2")}},{key:"getLabelOptionByAxisId",value:function(t){return this.owner.config["axis_".concat(t,"_label")]}},{key:"getLabelText",value:function(t){var n=this.getLabelOptionByAxisId(t);return At(n)?n:n?n.text:null}},{key:"setLabelText",value:function(t,n){var a=this.owner,c=a.config,u=this.getLabelOptionByAxisId(t);At(u)?c["axis_".concat(t,"_label")]=n:u&&(u.text=n)}},{key:"getLabelPosition",value:function(t,n){var a=this.owner.config.axis_rotated,c=this.getLabelOptionByAxisId(t),u=Ae(c)&&c.position?c.position:n[+!a],g=function(w){return!!~u.indexOf(w)};return{isInner:g("inner"),isOuter:g("outer"),isLeft:g("left"),isCenter:g("center"),isRight:g("right"),isTop:g("top"),isMiddle:g("middle"),isBottom:g("bottom")}}},{key:"getXAxisLabelPosition",value:function(){return this.getLabelPosition("x",["inner-top","inner-right"])}},{key:"getYAxisLabelPosition",value:function(){return this.getLabelPosition("y",["inner-right","inner-top"])}},{key:"getY2AxisLabelPosition",value:function(){return this.getLabelPosition("y2",["inner-right","inner-top"])}},{key:"getLabelPositionById",value:function(t){return this["get".concat(t.toUpperCase(),"AxisLabelPosition")]()}},{key:"textForXAxisLabel",value:function(){return this.getLabelText("x")}},{key:"textForYAxisLabel",value:function(){return this.getLabelText("y")}},{key:"textForY2AxisLabel",value:function(){return this.getLabelText("y2")}},{key:"xForAxisLabel",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=this.owner,c=t.isMiddle?-a.height/2:0;return ge(a,n)?c=t.isLeft?0:t.isCenter?a.width/2:a.width:t.isBottom&&(c=-a.height),c}},{key:"dxForAxisLabel",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=this.owner,c=t.isBottom?"0.5em":"0";return ge(a,n)?c=t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop&&(c="-0.5em"),c}},{key:"textAnchorForAxisLabel",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],a=this.owner,c=t.isMiddle?"middle":"end";return ge(a,n)?c=t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom&&(c="start"),c}},{key:"xForXAxisLabel",value:function(){return this.xForAxisLabel(this.getXAxisLabelPosition(),!1)}},{key:"xForYAxisLabel",value:function(){return this.xForAxisLabel(this.getYAxisLabelPosition())}},{key:"xForY2AxisLabel",value:function(){return this.xForAxisLabel(this.getY2AxisLabelPosition())}},{key:"dxForXAxisLabel",value:function(){return this.dxForAxisLabel(this.getXAxisLabelPosition(),!1)}},{key:"dxForYAxisLabel",value:function(){return this.dxForAxisLabel(this.getYAxisLabelPosition())}},{key:"dxForY2AxisLabel",value:function(){return this.dxForAxisLabel(this.getY2AxisLabelPosition())}},{key:"dyForXAxisLabel",value:function(){var t=this.owner,n=t.config,a=this.getXAxisLabelPosition().isInner,c=n.axis_x_height;return n.axis_rotated?a?"1.2em":-25-this.getMaxTickWidth("x"):a?"-0.5em":c?c-10:"3em"}},{key:"dyForYAxisLabel",value:function(){var t=this.owner,n=this.getYAxisLabelPosition().isInner;return t.config.axis_rotated?n?"-0.5em":"3em":n?"1.2em":-10-(t.config.axis_y_inner?0:this.getMaxTickWidth("y")+10)}},{key:"dyForY2AxisLabel",value:function(){var t=this.owner,n=this.getY2AxisLabelPosition().isInner;return t.config.axis_rotated?n?"1.2em":"-2.2em":n?"-0.5em":15+(t.config.axis_y2_inner?0:this.getMaxTickWidth("y2")+15)}},{key:"textAnchorForXAxisLabel",value:function(){return this.textAnchorForAxisLabel(this.getXAxisLabelPosition(),!1)}},{key:"textAnchorForYAxisLabel",value:function(){return this.textAnchorForAxisLabel(this.getYAxisLabelPosition())}},{key:"textAnchorForY2AxisLabel",value:function(){return this.textAnchorForAxisLabel(this.getY2AxisLabelPosition())}},{key:"getMaxTickWidth",value:function(t,n){var a=this.owner,c=a.config,u=a.currentMaxTickWidths[t],g=0;if(n||!c["axis_".concat(t,"_show")])return u.size;if(a.svg){var w=/^y2?$/.test(t),O=a.filterTargetsToShow(a.data.targets),L=w?"getY":"getX",I=a[t].copy().domain(a["".concat(L,"Domain")](O,t)),f=I.domain();if(rt(u.domain)&&u.domain.every(function(J,nt){return J===f[nt]}))return u.size;u.domain=f;var T=this["".concat(L,"Axis")](t,I,!1,!1,!0),$=c["axis_".concat(t,"_tick_count")];$&&T.tickValues(this.generateTickValues(f,$,w?a.isTimeSeriesY():a.isTimeSeries())),w||this.updateXAxisTickValues(O,T);var Y=a.selectChart.append("svg").style("visibility","hidden").style("position","fixed").style("top","0px").style("left","0px");T.create(Y),Y.selectAll("text").each(function(){g=Math.max(g,this.getBoundingClientRect().width)}),Y.remove()}return g>0&&(u.size=g),u.size}},{key:"updateLabels",value:function(t){var n=this,a=this.owner,c={X:a.main.select(".".concat(C.axisX," .").concat(C.axisXLabel)),Y:a.main.select(".".concat(C.axisY," .").concat(C.axisYLabel)),Y2:a.main.select(".".concat(C.axisY2," .").concat(C.axisY2Label))};Object.keys(c).filter(function(u){return!c[u].empty()}
8).forEach(function(u){var g=c[u],w="".concat(u,"AxisLabel");(t?g.transition():g).attr("x",n["xFor".concat(w)].bind(n)).attr("dx",n["dxFor".concat(w)].bind(n)).attr("dy",n["dyFor".concat(w)].bind(n)).text(n["textFor".concat(w)].bind(n))})}},{key:"getPadding",value:function(t,n,a,c){var u=Bt(t)?t:t[n];return pt(u)?t.unit==="ratio"?t[n]*c:this.convertPixelsToAxisPadding(u,c):a}},{key:"convertPixelsToAxisPadding",value:function(t,n){var a=this.owner,c=a.config.axis_rotated?a.width:a.height;return n*(t/c)}},{key:"generateTickValues",value:function(t,n,a){var c,u,g,w,O,L,I=t;if(n){var f=Ot(n)?n():n;if(f===1)I=[t[0]];else if(f===2)I=[t[0],t[t.length-1]];else if(f>2){for(g=f-2,c=t[0],u=t[t.length-1],w=(u-c)/(g+1),I=[c],O=0;O<g;O++)L=+c+w*(O+1),I.push(a?new Date(L):L);I.push(u)}}return a||(I=I.sort(function(T,$){return T-$})),I}},{key:"generateTransitions",value:function(t){var n=this.owner,a=n.axes,c=["x","y","y2","subx"].map(function(I){var f=a[I];return f&&t&&(f=f.transition().duration(t)),f}),u=X()(c,4),g=u[0],w=u[1],O=u[2],L=u[3];return{axisX:g,axisY:w,axisY2:O,axisSubX:L}}},{key:"redraw",value:function(t,n,a){var c=this.owner,u=n?"0":"1";["x","y","y2","subX"].forEach(function(g){var w=c["".concat(g,"Axis")];w&&(!a&&(w.config.withoutTransition=!c.config.transition_duration),c.axes[g.toLowerCase()].style("opacity",u),w.create(t["axis".concat($e(g))]))}),this.updateAxes()}}]),d}(),Ve=M(17),tt=function(){function d(e){D()(this,d);var t=this;t.api=e,t.config=t.getOptions(),t.data={},t.cache={},t.axes={}}return Z()(d,[{key:"beforeInit",value:function(){var t=this;t.config.stats&&Tt(),t.callPluginHook("$beforeInit"),F(t.config.onbeforeinit,t)}},{key:"afterInit",value:function(){var t=this;t.callPluginHook("$afterInit"),F(t.config.onafterinit,t)}},{key:"init",value:function(){var t=this;t.initParams();var n=t.convertData(t.config,t.initWithData);n&&t.initWithData(n)}},{key:"initParams",value:function(){var t=this,n=this,a=n.config,c=a.axis_rotated;n.datetimeId="bb-".concat(+new Date),n.initClip(),n.dragStart=null,n.dragging=!1,n.flowing=!1,n.cancelClick=!1,n.mouseover=!1,n.transiting=!1,n.color=n.generateColor(),n.levelColor=n.generateLevelColor(),n.point=n.generatePoint(),n.extraLineClasses=n.generateExtraLineClass(),n.dataTimeFormat=a.data_xLocaltime?it.timeParse:it.utcParse,n.axisTimeFormat=a.axis_x_localtime?it.timeFormat:it.utcFormat;var u=n.config.zoom_enabled&&n.config.zoom_enabled.type==="drag";n.defaultAxisTimeFormat=function(g){var w=u?t.zoomScale:t.zoomScale&&n.x.orgDomain().toString()!==t.zoomScale.domain().toString(),O=g.getMilliseconds()&&".%L"||g.getSeconds()&&".:%S"||g.getMinutes()&&"%I:%M"||g.getHours()&&"%I %p"||g.getDate()!==1&&"%b %d"||w&&g.getDate()===1&&"%b'%y"||g.getMonth()&&"%-m/%-d"||"%Y";return n.axisTimeFormat(O)(g)},n.hiddenTargetIds=[],n.hiddenLegendIds=[],n.focusedTargetIds=[],n.defocusedTargetIds=[],n.isLegendRight=a.legend_position==="right",n.isLegendInset=a.legend_position==="inset",n.isLegendTop=a.legend_inset_anchor==="top-left"||a.legend_inset_anchor==="top-right",n.isLegendLeft=a.legend_inset_anchor==="top-left"||a.legend_inset_anchor==="bottom-left",n.legendStep=0,n.legendItemWidth=0,n.legendItemHeight=0,n.currentMaxTickWidths={x:{size:0,domain:""},y:{size:0,domain:""},y2:{size:0,domain:""}},n.rotated_padding_left=30,n.rotated_padding_right=c&&!a.axis_x_show?0:30,n.rotated_padding_top=5,n.withoutFadeIn={},n.inputType=n.convertInputType(),n.axes.subx=Object(q.selectAll)([])}},{key:"initWithData",value:function(t){var n=this,a=n.config;n.axis=new Ie(n),a.zoom_enabled&&n.initZoom();var c={element:a.bindto,classname:"bb"};if(j(a.bindto)&&(c.element=a.bindto.element||"#chart",c.classname=a.bindto.classname||c.classname),n.selectChart=Ot(c.element.node)?a.bindto.element:Object(q.select)(c.element||[]),n.selectChart.empty()&&(n.selectChart=Object(q.select)(document.body.appendChild(document.createElement("div")))),n.selectChart.html("").classed(c.classname,!0),n.data.xs={},n.data.targets=n.convertDataToTargets(t),a.data_filter&&(n.data.targets=n.data.targets.filter(a.data_filter)),a.data_hide&&n.addHiddenTargetIds(a.data_hide===!0?n.mapToIds(n.data.targets):a.data_hide),a.legend_hide&&n.addHiddenLegendIds(a.legend_hide===!0?n.mapToIds(n.data.targets):a.legend_hide),n.hasType("gauge")&&(a.legend_show=!1),n.updateSizes(),n.updateScales(!0),n.x&&(n.x.domain(P(n.getXDomain(n.data.targets))),n.subX.domain(n.x.domain()),n.orgXDomain=n.x.domain()),n.y&&(n.y.domain(n.getYDomain(n.data.targets,"y")),n.subY.domain(n.y.domain())),n.y2&&(n.y2.domain(n.getYDomain(n.data.targets,"y2")),n.subY2&&n.subY2.domain(n.y2.domain())),n.svg=n.selectChart.append("svg").style("overflow","hidden").style("display","block"),a.interaction_enabled&&n.inputType){var u=n.inputType==="touch";n.svg.on(u?"touchstart":"mouseenter",function(){return F(a.onover,n)}
8).on(u?"touchend":"mouseleave",function(){return F(a.onout,n)})}a.svg_classname&&n.svg.attr("class",a.svg_classname),n.defs=n.svg.append("defs"),n.clipChart=n.appendClip(n.defs,n.clipId),n.clipXAxis=n.appendClip(n.defs,n.clipIdForXAxis),n.clipYAxis=n.appendClip(n.defs,n.clipIdForYAxis),n.clipGrid=n.appendClip(n.defs,n.clipIdForGrid),Ot(a.color_tiles)&&n.patterns&&n.patterns.forEach(function(O){return n.defs.append(function(){return O.node})}),n.updateSvgSize();var g=n.svg.append("g").attr("transform",n.getTranslate("main"));if(n.main=g,a.subchart_show&&n.initSubchart(),n.initTooltip&&n.initTooltip(),n.initLegend&&n.initLegend(),n.initTitle&&n.initTitle(),a.data_empty_label_text&&g.append("text").attr("class","".concat(C.text," ").concat(C.empty)).attr("text-anchor","middle").attr("dominant-baseline","middle"),n.initRegion(),a.clipPath||n.axis.init(),g.append("g").attr("class",C.chart).attr("clip-path",n.clipPath),n.callPluginHook("$init"),n.initEventRect(),n.initChartElements(),n.initGrid(),g.insert("rect",a.zoom_privileged?null:"g.".concat(C.regions)).attr("class",C.zoomRect).attr("width",n.width).attr("height",n.height).style("opacity","0").on("dblclick.zoom",null),a.clipPath&&n.axis.init(),n.updateTargets(n.data.targets),n.updateDimension(),a.oninit.call(n),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),a.data_onmin||a.data_onmax){var w=n.getMinMaxData();F(a.data_onmin,n,w.min),F(a.data_onmax,n,w.max)}n.bindResize(),n.api.element=n.selectChart.node()}},{key:"initChartElements",value:function(){var t=this;["Bar","Line","Bubble","Arc","Gauge","Pie","Radar"].forEach(function(n){t["init".concat(n)]()}),K(t.config.data_labels)&&t.initText()}},{key:"getChartElements",value:function(){var t=this;return{chart:t.selectChart,svg:t.svg,defs:t.defs,main:t.main,tooltip:t.tooltip,legend:t.legend,title:t.title,grid:t.grid,arc:t.arcs,bar:{bars:t.mainBar},line:{lines:t.mainLine,areas:t.mainArea,circles:t.mainCircle},text:{texts:t.mainText}}}},{key:"smoothLines",value:function(t,n){n==="grid"&&t.each(function(){var a=Object(q.select)(this),c=["x1","x2","y1","y2"].map(function(I){return Math.ceil(a.attr(I))}),u=X()(c,4),g=u[0],w=u[1],O=u[2],L=u[3];a.attr({x1:g,x2:w,y1:O,y2:L})})}},{key:"updateSizes",value:function(t){var n=this,a=n.config,c=a.axis_rotated,u=n.hasArcType(),g={width:n.legend?n.getLegendWidth():0,height:n.legend?n.getLegendHeight():0},w=n.isLegendRight||n.isLegendInset?0:g.height,O=c||u?0:n.getHorizontalAxisHeight("x"),L=a.subchart_axis_x_show&&a.subchart_axis_x_tick_text_show?O:30,I=a.subchart_show&&!u?a.subchart_size_height+L:0;t||n.setContainerSize(),n.margin=c?{top:n.getHorizontalAxisHeight("y2")+n.getCurrentPaddingTop(),right:u?0:n.getCurrentPaddingRight(),bottom:n.getHorizontalAxisHeight("y")+w+n.getCurrentPaddingBottom(),left:I+(u?0:n.getCurrentPaddingLeft())}:{top:4+n.getCurrentPaddingTop(),right:u?0:n.getCurrentPaddingRight(),bottom:O+I+w+n.getCurrentPaddingBottom(),left:u?0:n.getCurrentPaddingLeft()},n.margin2=c?{top:n.margin.top,right:NaN,bottom:20+w,left:n.rotated_padding_left}:{top:n.currentHeight-I-w,right:NaN,bottom:L+w,left:n.margin.left},n.margin3={top:0,right:NaN,bottom:0,left:0},n.updateSizeForLegend&&n.updateSizeForLegend(g),n.width=n.currentWidth-n.margin.left-n.margin.right,n.height=n.currentHeight-n.margin.top-n.margin.bottom,n.width<0&&(n.width=0),n.height<0&&(n.height=0),n.width2=c?n.margin.left-n.rotated_padding_left-n.rotated_padding_right:n.width,n.height2=c?n.height:n.currentHeight-n.margin2.top-n.margin2.bottom,n.width2<0&&(n.width2=0),n.height2<0&&(n.height2=0),n.arcWidth=n.width-(n.isLegendRight?g.width+10:0),n.arcHeight=n.height-(n.isLegendRight?0:10),n.hasType("gauge")&&!a.gauge_fullCircle&&(n.arcHeight+=n.height-n.getGaugeLabelHeight()),n.updateRadius&&n.updateRadius(),n.isLegendRight&&u&&(n.margin3.left=n.arcWidth/2+n.radiusExpanded*1.1)}},{key:"updateTargets",value:function(t){var n=this;n.updateTargetsForText(t),n.updateTargetsForBar(t),n.updateTargetsForLine(t),n.hasArcType(t)&&(n.hasType("radar")?n.updateTargetsForRadar(t):n.updateTargetsForArc(t)),n.updateTargetsForSubchart&&n.updateTargetsForSubchart(t),n.showTargets()}},{key:"showTargets",value:function(){var t=this;t.svg.selectAll(".".concat(C.target)).filter(function(n){return t.isTargetToShow(n.id)}).transition().duration(t.config.transition_duration).style("opacity","1")}},{key:"getWithOption",value:function(t){var n={Y:!0,Subchart:!0,Transition:!0,EventRect:!0,Dimension:!0,TrimXDomain:!0,Transform:!1,UpdateXDomain:!1,UpdateOrgXDomain:!1,Legend:!1,UpdateXAxis:"UpdateXDomain",TransitionForExit:"Transition",TransitionForAxis:"Transition"};
8return Object.keys(n).forEach(function(a){var c=n[a];At(c)&&(c=n[c]),n[a]=Q(t,"with".concat(a),c)}),n}},{key:"redraw",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,a=this,c=a.main,u=a.config,g=a.filterTargetsToShow(a.data.targets),w=t.initializing,O=t.flow,L=a.getWithOption(t),I=L.Transition?u.transition_duration:0,f=L.TransitionForExit?I:0,T=L.TransitionForAxis?I:0,$=n||a.axis.generateTransitions(T);w&&u.tooltip_init_show||a.inputType!=="touch"||a.hideTooltip(),a.updateSizes(w),L.Legend&&u.legend_show?a.updateLegend(a.mapToIds(a.data.targets),t,$):L.Dimension&&a.updateDimension(!0),a.redrawAxis(g,L,$,O,w),a.updateCircleY(),a.updateXgridFocus(),u.data_empty_label_text&&c.select("text.".concat(C.text,".").concat(C.empty)).attr("x",a.width/2).attr("y",a.height/2).text(u.data_empty_label_text).style("display",g.length?"none":null),a.updateGrid(I),a.updateRegion(I),a.updateBar(f),a.updateLine(f),a.updateArea(f),a.updateCircle(),a.hasDataLabel()&&a.updateText(f),a.redrawTitle&&a.redrawTitle(),a.arcs&&a.redrawArc(I,f,L.Transform),a.radars&&a.redrawRadar(I,f),a.mainText&&c.selectAll(".".concat(C.selectedCircles)).filter(a.isBarType.bind(a)).selectAll("circle").remove(),u.interaction_enabled&&!O&&L.EventRect&&(a.redrawEventRect(),a.bindZoomEvent()),a.generateRedrawList(g,O,I,L.Subchart),a.callPluginHook("$redraw",t,I)}},{key:"redrawAxis",value:function(t,n,a,c,u){var g,w,O,L=this,I=L.config,f=L.hasArcType(),T=!!L.zoomScale;if(!T&&L.isCategorized()&&t.length===0&&L.x.domain([0,L.axes.x.selectAll(".tick").size()]),L.x&&t.length?(!T&&L.updateXDomain(t,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),!I.axis_x_tick_values&&(g=L.axis.updateXAxisTickValues(t))):L.xAxis&&(L.xAxis.tickValues([]),L.subXAxis.tickValues([])),I.zoom_rescale&&!c&&(O=L.x.orgDomain()),["y","y2"].forEach(function(Y){var J=L[Y];if(J){var nt=I["axis_".concat(Y,"_tick_values")],ft=I["axis_".concat(Y,"_tick_count")];if(J.domain(L.getYDomain(t,Y,O)),!nt&&ft){var st=J.domain();L["".concat(Y,"Axis")].tickValues(L.axis.generateTickValues(st,st.every(function(_t){return _t===0})?1:ft,L.isTimeSeriesY()))}}}),L.axis.redraw(a,f,u),L.axis.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis)&&t.length)if(I.axis_x_tick_culling&&g){for(var $=1;$<g.length;$++)if(g.length/$<I.axis_x_tick_culling_max){w=$;break}L.svg.selectAll(".".concat(C.axisX," .tick text")).each(function(Y){var J=g.indexOf(Y);J>=0&&Object(q.select)(this).style("display",J%w?"none":"block")})}else L.svg.selectAll(".".concat(C.axisX," .tick text")).style("display","block");n.Y&&(L.subY&&L.subY.domain(L.getYDomain(t,"y")),L.subY2&&L.subY2.domain(L.getYDomain(t,"y2")))}},{key:"generateRedrawList",value:function(t,n,a,c){var u=this,g=u.config,w=u.getDrawShape();g.subchart_show&&u.redrawSubchart(c,a,w);var O=n&&u.generateFlow({targets:t,flow:n,duration:n.duration,shape:w,xv:u.xv.bind(u)}),L=(a||O)&&u.isTabVisible(),I=u.getRedrawList(w,n,O,L),f=n||g.onrendered?function(){O&&O(),F(g.onrendered,u)}:null;if(f)if(L){var T=u.generateWait();Object(ct.transition)().duration(a).each(function(){I.reduce(function($,Y){return $.concat(Y)},[]).forEach(function($){return T.add($)})}).call(T,f)}else f();u.mapToIds(u.data.targets).forEach(function($){u.withoutFadeIn[$]=!0})}},{key:"getDrawShape",value:function(){var t=this,n=t.config.axis_rotated,a=t.hasType("radar"),c={type:{},indices:{}};if(t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")){var u=t.getShapeIndices(t.isLineType);if(c.indices.line=u,c.type.line=t.generateDrawLine?t.generateDrawLine(u,!1):void 0,t.hasTypeOf("Area")){var g=t.getShapeIndices(t.isAreaType);c.indices.area=g,c.type.area=t.generateDrawArea?t.generateDrawArea(g,!1):void 0}}if(t.hasType("bar")){var w=t.getShapeIndices(t.isBarType);c.indices.bar=w,c.type.bar=t.generateDrawBar?t.generateDrawBar(w):void 0}return c.pos={xForText:t.generateXYForText(c.indices,!0),yForText:t.generateXYForText(c.indices,!1),cx:(a?t.radarCircleX:n?t.circleY:t.circleX).bind(t),cy:(a?t.radarCircleY:n?t.circleX:t.circleY).bind(t)},c}},{key:"getRedrawList",value:function(t,n,a,c){var u=this,g=u.config,w=u.hasArcType(),O=t.pos,L=O.cx,I=O.cy,f=O.xForText,T=O.yForText,$=[];if(!w){var Y=t.type,J=Y.area,nt=Y.bar,ft=Y.line;(g.grid_x_lines.length||g.grid_y_lines.length)&&$.push(u.redrawGri
8d(c)),g.regions.length&&$.push(u.redrawRegion(c)),u.hasTypeOf("Line")&&($.push(u.redrawLine(ft,c)),u.hasTypeOf("Area")&&$.push(u.redrawArea(J,c))),u.hasType("bar")&&$.push(u.redrawBar(nt,c)),K(g.data_labels)&&$.push(u.redrawText(f,T,n,c))}return(!w||u.hasType("radar"))&&$.push(u.redrawCircle(L,I,c,a)),$}},{key:"updateAndRedraw",value:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this,c=a.config;n.withTransition=Q(n,"withTransition",!0),n.withTransform=Q(n,"withTransform",!1),n.withLegend=Q(n,"withLegend",!1),n.withUpdateXDomain=!0,n.withUpdateOrgXDomain=!0,n.withTransitionForExit=!1,n.withTransitionForTransform=Q(n,"withTransitionForTransform",n.withTransition),n.withLegend&&c.legend_show||(t=a.axis.generateTransitions(n.withTransitionForAxis?c.transition_duration:0),a.updateScales(),a.updateSvgSize(),a.transformAll(n.withTransitionForTransform,t)),a.redraw(n,t)}},{key:"redrawWithoutRescale",value:function(){this.redraw({withY:!1,withSubchart:!1,withEventRect:!1,withTransitionForAxis:!1})}},{key:"isTimeSeries",value:function(){return this.config.axis_x_type==="timeseries"}},{key:"isCategorized",value:function(){return this.config.axis_x_type.indexOf("category")>=0||this.hasType("radar")}},{key:"isCustomX",value:function(){var t=this,n=t.config;return!t.isTimeSeries()&&(n.data_x||K(n.data_xs))}},{key:"isTimeSeriesY",value:function(){return this.config.axis_y_type==="timeseries"}},{key:"getTranslate",value:function(t){var n,a,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,u=this,g=u.config,w=g.axis_rotated,O=0;if(c&&/^(x|y2?)$/.test(t)&&(O=u.getAxisSize(t)*c),t==="main")n=oe(u.margin.left),a=oe(u.margin.top);else if(t==="context")n=oe(u.margin2.left),a=oe(u.margin2.top);else if(t==="legend")n=u.margin3.left,a=u.margin3.top;else if(t==="x")n=w?-O:0,a=w?0:u.height+O;else if(t==="y")n=w?0:-O,a=w?u.height+O:0;else if(t==="y2")n=w?0:u.width+O,a=w?1-O:0;else if(t==="subx")n=0,a=w?0:u.height2;else if(t==="arc")n=u.arcWidth/2,a=u.arcHeight/2;else if(t==="radar"){var L=(u.arcWidth-u.arcHeight)/2;n=Math.max(L,0)+4,a=L<0?Math.abs(L):oe(u.margin.top)}return"translate(".concat(n,", ").concat(a,")")}},{key:"initialOpacity",value:function(t){return this.getBaseValue(t)!==null&&this.withoutFadeIn[t.id]?"1":"0"}},{key:"initialOpacityForCircle",value:function(t){return this.getBaseValue(t)!==null&&this.withoutFadeIn[t.id]?this.opacityForCircle(t):"0"}},{key:"opacityForCircle",value:function(t){var n=this.config.point_show?"1":"0";return pt(this.getBaseValue(t))?this.isBubbleType(t)||this.isScatterType(t)?"0.5":n:"0"}},{key:"opacityForText",value:function(){return this.hasDataLabel()?"1":"0"}},{key:"xx",value:function(t){var n=this.config.zoom_enabled&&this.zoomScale?this.zoomScale:this.x;return t?n(t.x):null}},{key:"xv",value:function(t){var n=this,a=n.getBaseValue(t);return n.isTimeSeries()?a=n.parseDate(a):n.isCategorized()&&At(a)&&(a=n.config.axis_x_categories.indexOf(a)),Math.ceil(n.x(a))}},{key:"yv",value:function(t){var n=this,a=t.axis&&t.axis==="y2"?n.y2:n.y;return Math.ceil(a(n.getBaseValue(t)))}},{key:"subxx",value:function(t){return t?this.subX(t.x):null}},{key:"transformMain",value:function(t,n){var a,c,u,g=this;n&&n.axisX?a=n.axisX:(a=g.main.select(".".concat(C.axisX)),t&&(a=a.transition())),n&&n.axisY?c=n.axisY:(c=g.main.select(".".concat(C.axisY)),t&&(c=c.transition())),n&&n.axisY2?u=n.axisY2:(u=g.main.select(".".concat(C.axisY2)),t&&(u=u.transition())),(t?g.main.transition():g.main).attr("transform",g.getTranslate("main")),a.attr("transform",g.getTranslate("x")),c.attr("transform",g.getTranslate("y")),u.attr("transform",g.getTranslate("y2")),g.main.select(".".concat(C.chartArcs)).attr("transform",g.getTranslate("arc"))}},{key:"transformAll",value:function(t,n){var a=this;a.transformMain(t,n),a.config.subchart_show&&a.transformContext(t,n),a.legend&&a.transformLegend(t)}},{key:"updateSvgSize",value:function(){var t=this,n=t.svg.select(".".concat(C.brush," .overlay")),a={width:0,height:0};n.size()&&(a.width=+n.attr("width"),a.height=+n.attr("height")),t.svg.attr("width",t.currentWidth).attr("height",t.currentHeight),t.svg.selectAll(["#".concat(t.clipId),"#".concat(t.clipIdForGrid)]).select("rect").attr("width",t.width).attr("height",t.height),t.svg.select("#".concat(t.clipIdForXAxis)).select("rect").attr("x",t.getXAxisClipX.bind(t)).attr("y",t.getXAxisClipY.bind(t)).attr("width",t.getXAxisClipWidth.bind(t)).attr("height",t.getXAxisClipHeight.bind(t)),t.svg.select("#".concat(t.clipIdForYAxis)).select("rect").attr("x",t.getYAxisClipX.bind(t)).attr("y",t.getYAxisClipY.bind(t)).attr("width",t.getYAxisClipWidth.bind(t)).attr("height",t.getYAxisClipHeight.bind(t)),t.svg.select("#".concat(t.clipIdForSubchart)).select("rect").attr("width",t.width).attr("height",a.height),t.svg.select(".".concat(C.zoomRect)).attr("width",t.width).attr("height",t.height)}},{key:"updateDimension",value:function(t){var n=this;t||(n.xAxis&&n.config.axis_rotated?(n.xAxis.create(n.axes.x),n.subXAxis.create(n.axes.subx)):(n.yAxis&&n.yAxis.create(n.axes.y),n.y2Axis&&n.y2Axis.create(n.axes.y2))),n.updateScales(t),n.updateSvgSize(),n.transformAll(!1)}},{key:"bindResize",value:function(){var t=this,n=t.config;t.resizeFunction=t.generateResize(),t.resizeFunction.add(n.onresize.bind(t)),n.resize_auto&&t.resizeFunction.add(function(){t.resizeTimeout&&(window.clearTimeout(t.resizeTimeout),t.resizeTimeout=null),t.resizeTimeout=window.setTimeout(function(){t.api.flush(!1,!0)},200)}),t.resizeFunction.add(n.onresized.bind(t)),window.addEventListener("resize",t.resizeFunction)}}
8,{key:"generateResize",value:function(){function t(){n.forEach(function(a){return a()})}var n=[];return t.add=function(a){return n.push(a)},t.remove=function(a){return n.splice(n.indexOf(a),1)},t}},{key:"endall",value:function(t,n){var a=0;t.each(function(){return++a}).on("end",function(){for(var c=arguments.length,u=Array(c),g=0;g<c;g++)u[g]=arguments[g];--a||n.apply.apply(n,[this].concat(u))})}},{key:"generateWait",value:function(){var t=[],n=function(a,c){function u(){var w=0;t.forEach(function(O){if(O.empty())return void w++;try{O.transition()}catch{w++}}),g&&clearTimeout(g),w===t.length?c&&c():g=setTimeout(u,50)}var g;u()};return n.add=function(a){rt(a)?t=t.concat(a):t.push(a)},n}},{key:"parseDate",value:function(t){var n,a=this;return t instanceof Date?n=t:At(t)?n=a.dataTimeFormat(a.config.data_xFormat)(t):Bt(t)&&!isNaN(t)&&(n=new Date(+t)),(!n||isNaN(+n))&&console&&console.error&&console.error("Failed to parse x '".concat(t,"' to Date object")),n}},{key:"isTabVisible",value:function(){return!document.hidden}},{key:"convertInputType",value:function(){var t=this,n=t.config,a=n.interaction_inputType_mouse&&!Ve.a&&"onmouseover"in window,c=!1;return n.interaction_inputType_touch&&(c="ontouchmove"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),a&&"mouse"||c&&"touch"||null}},{key:"callPluginHook",value:function(t){for(var n=this,a=arguments.length,c=Array(a>1?a-1:0),u=1;u<a;u++)c[u-1]=arguments[u];this.config.plugins.forEach(function(g){t==="$beforeInit"&&(g.$$=n,n.api.plugins.push(g)),g[t].apply(g,c)})}}]),d}(),xt=function d(e){D()(this,d);var t=new tt(this);this.plugins=[],this.internal=t,t.loadConfig(e),t.beforeInit(e),t.init(),this.$=t.getChartElements(),t.afterInit(e),function n(a,c,u){Object.keys(a).forEach(function(g){c[g]=a[g].bind(u),Object.keys(a[g]).length&&n(a[g],c[g],u)})}(d.prototype,this,this)},It=function d(){return D()(this,d),{bindto:"#chart",clipPath:!0,svg_classname:void 0,size_width:void 0,size_height:void 0,stats:!0,padding_left:void 0,padding_right:void 0,padding_top:void 0,padding_bottom:void 0,resize_auto:!0,zoom_enabled:void 0,zoom_extent:void 0,zoom_privileged:!1,zoom_rescale:!1,zoom_onzoom:void 0,zoom_onzoomstart:void 0,zoom_onzoomend:void 0,zoom_resetButton:!0,zoom_x_min:void 0,zoom_x_max:void 0,interaction_enabled:!0,interaction_brighten:!0,interaction_inputType_mouse:!0,interaction_inputType_touch:{},onover:function(){},onout:function(){},onresize:function(){},onresized:function(){},onbeforeinit:void 0,oninit:function(){},onafterinit:void 0,onrendered:void 0,transition_duration:350,data_x:void 0,data_xs:{},data_xFormat:"%Y-%m-%d",data_xLocaltime:!0,data_xSort:!0,data_idConverter:function(t){return t},data_names:{},data_classes:{},data_groups:[],data_axes:{},data_type:void 0,data_types:{},data_labels:{},data_labels_colors:void 0,data_labels_position:{},data_order:"desc",data_regions:{},data_color:void 0,data_colors:{},data_hide:!1,data_filter:void 0,data_stack_normalize:!1,data_selection_enabled:!1,data_selection_grouped:!1,data_selection_isselectable:function(){return!0},data_selection_multiple:!0,data_selection_draggable:!1,data_onclick:function(){},data_onover:function(){},data_onout:function(){},data_onselected:function(){},data_onunselected:function(){},data_onmin:void 0,data_onmax:void 0,data_url:void 0,data_headers:void 0,data_json:void 0,data_rows:void 0,data_columns:void 0,data_mimeType:void 0,data_keys:void 0,data_empty_label_text:"",subchart_show:!1,subchart_size_height:60,subchart_axis_x_show:!0,subchart_axis_x_tick_show:!0,subchart_axis_x_tick_text_show:!0,subchart_onbrush:function(){},color_pattern:[],color_tiles:void 0,color_threshold:{},color_onover:void 0,legend_show:!0,legend_hide:!1,legend_contents_bindto:void 0,legend_contents_template:void 0,legend_position:"bottom",legend_inset_anchor:"top-left",legend_inset_x:10,legend_inset_y:0,legend_inset_step:void 0,legend_item_onclick:void 0,legend_item_onover:void 0,legend_item_onout:void 0,legend_equally:!1,legend_padding:0,legend_item_tile_width:10,legend_item_tile_height:10,legend_usePoint:!1,axis_rotated:!1,axis_x_clipPath:!0,axis_x_show:!0,axis_x_type:"indexed",axis_x_localtime:!0,axis_x_categories:[],axis_x_tick_centered:!1,axis_x_tick_format:void 0,axis_x_tick_culling:{},axis_x_tick_culling_max:10,axis_x_tick_count:void 0,axis_x_tick_show:!0,axis_x_tick_text_show:!0,axis_x_tick_text_position:{x:0,y:0},axis_x_tick_fit:!0,axis_x_tick_values:null,axis_x_tick_rotate:0,axis_x_tick_outer:!0,axis_x_tick_multiline:!0,axis_x_tick_width:null,axis_x_tick_tooltip:!1,axis_x_max:void 0,axis_x_min:void 0,axis_x_padding:{},axis_x_height:void 0,axis_x_extent:void 0,axis_x_label:{},axis_x_axes:[],axis_y_clipPath:!0,axis_y_show:!0,axis_y_type:void 0,axis_y_max:void 0,axis_y_min:void 0,axis_y_inverted:!1,axis_y_center:void 0,axis_y_inner:!1,axis_y_label:{},axis_y_tick_format:void 0,axis_y_tick_outer:!0,axis_y_tick_values:null,axis_y_tick_rotate:0,axis_y_tick_count:void 0,axis_y_tick_show:!0,axis_y_tick_text_show:!0,axis_y_tick_text_position:{x:0,y:0},axis_y_tick_time_value:void 0,axis_y_padding:{},axis_y_default:void 0,axis_y_axes:[],axis_y2_show:!1,axis_y2_max:void 0,axis_y2_min:void 0,axis_y2_inverted:!1,axis_y2_center:void 0,axis_y2_inner:!1,axis_y2_label:{},axis_y2_tick_format:void 0,axis_y2_tick_outer:!0,axis_y2_tick_values:null,axis_y2_tick_count:void 0,axis_y2_tick_show:!0,axis_y2_tick_text_show:!0,axis_y2_tick_text_position:{x:0,y:0},axis_y2_padding:{},axis_y2_default:void 0,axis_y2_axes:[],grid_x_show:!1,grid_x_type:"tick",grid_x_lines:[],grid_y_show:!1,grid_y_lines:[],grid_y_ticks:10,grid_focus_show:!0,grid_front:!1,grid_lines_front:!0,point_show:!0,point_r:2.5,point_sensitivity:10,point_focus_expand_enabled:!0,point_focus_expand_r:void 0,point_pattern:[],point_select_r:void 0,point_type:"circle",line_connectNull:!1,line_step_type:"step",line_classes:void 0,line_point:!0,bar_padding:0,bar_radius:void 0,bar_radius_ratio:void 0,bar_sensitivity:2,bar_width:void 0,bar_width_ratio:.6,bar_width_max:void 0,bar_zerobased:!0,bubble_maxR:35,area_zerobased:!0,area_above:!1,area_linearGradient:!1,pie_label_show:!0,pie_label_format:void 0,pie_label_threshold:.05,pie_label_ratio:void 0,pie_expand:{},pie_expand_duration:50,pie_innerRadius:0,pie_padAngle:0,pie_padding:0,plugins:[],gauge_fullCircle:!1,gauge_label_show:!0,gauge_label_format:void 0,gauge_min:0,gauge_max:100,gauge_startingAngle:-1*Math.PI/2,gauge_label_extents:void 0,gauge_title:"",gauge_units:void 0,gauge_width:void 0,gauge_expand:{},gauge_expand_duration:50,donut_label_show:!0,donut_label_format:void 0,donut_label_threshold:.05,donut_label_ratio:void 0,donut_width:void 0,donut_title:"",donut_expand:{},donut_expand_duration:50,donut_padAngle:0,spline_interpolation_type:"cardinal",radar_axis_max:void 0,radar_axis_line_show:!0,radar_axis_text_show:!0,radar_level_depth:3,radar_level_show:!0,radar_level_text_format:function(t){return t%1===0?t:t.toFixed(2)},radar_level_text_show:!0,radar_size_ratio:.87,radar_direction_clockwise:!1,regions:[],tooltip_show:!0,tooltip_doNotHide:!1,tooltip_grouped:!0,tooltip_format_title:void 0,tooltip_format_name:void 0,tooltip_format_value:void 0,tooltip_position:void 0,tooltip_contents:{},tooltip_init_show:!1,tooltip_init_x:0,tooltip_init_position:{top:"0px",left:"50px"},tooltip_linked:!1,tooltip_linked_name:"",tooltip_onshow:function(){},tooltip_onhide:function(){},tooltip_onshown:function(){},tooltip_onhidden:function(){},tooltip_order:null,title_text:void 0,title_padding:{top:0,right:0,bottom:0,left:0},title_position:"center"}};Pt(tt.prototype,{getOptions:function(){return new It},loadConfig:function(e){var t,n,a,c=this.config,u=function(){var g=n.shift();return g&&t&&Ae(t)&&g in t?(t=t[g],u()):g?void 0:t};
8Object.keys(c).forEach(function(g){t=e,n=g.split("_"),a=u(),Ft(a)&&(c[g]=a)})}}),Pt(tt.prototype,{getScale:function(e,t,n){return(n?Object($t.scaleTime)():Object($t.scaleLinear)()).range([e,t])},getX:function(e,t,n,a){var c=this,u=c.zoomScale||c.getScale(e,t,c.isTimeSeries());return c.getCustomizedScale(n?u.domain(n):u,a)},getY:function(e,t,n){var a=this.getScale(e,t,this.isTimeSeriesY());return n&&a.domain(n),a},getCustomizedScale:function(e,t){var n=this,a=t||function(){return n.xAxis.tickOffset()},c=function(g,w){var O=e(g)+a();return w?O:Math.ceil(O)};for(var u in e)c[u]=e[u];return c.orgDomain=function(){return e.domain()},c.orgScale=function(){return e},n.isCategorized()&&(c.domain=function(g){var w=g;return arguments.length?(e.domain(w),c):(w=this.orgDomain(),[w[0],w[1]+1])}),c},getYScale:function(e){return this.axis.getId(e)==="y2"?this.y2:this.y},getSubYScale:function(e){return this.axis.getId(e)==="y2"?this.subY2:this.subY},updateScales:function(e){var t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],n=this,a=n.config,c=a.axis_rotated;n.xMin=c?1:0,n.xMax=c?n.height:n.width,n.yMin=c?0:n.height,n.yMax=c?n.width:1,n.subXMin=n.xMin,n.subXMax=n.xMax,n.subYMin=c?0:n.height2,n.subYMax=c?n.width2:1;var u=t&&n.x&&n.x.orgDomain(),g=t&&n.orgXDomain;n.x=n.getX(n.xMin,n.xMax,u,function(){return n.xAxis.tickOffset()}),n.subX=n.getX(n.xMin,n.xMax,g,function(w){return w%1?0:n.subXAxis.tickOffset()}),n.xAxisTickFormat=n.axis.getXAxisTickFormat(),n.xAxisTickValues=n.axis.getXAxisTickValues(),n.xAxis=n.axis.getXAxis("x",n.x,a.axis_x_tick_outer,e),n.subXAxis=n.axis.getXAxis("subX",n.subX,a.axis_x_tick_outer,e),n.y=n.getY(n.yMin,n.yMax,n.y?n.y.domain():a.axis_y_default),n.subY=n.getY(n.subYMin,n.subYMax,n.subY?n.subY.domain():a.axis_y_default),n.yAxisTickValues=n.axis.getYAxisTickValues(),n.yAxis=n.axis.getYAxis("y",n.y,a.axis_y_tick_outer,e),a.axis_y2_show&&(n.y2=n.getY(n.yMin,n.yMax,n.y2?n.y2.domain():a.axis_y2_default),n.subY2=n.getY(n.subYMin,n.subYMax,n.subY2?n.subY2.domain():a.axis_y2_default),n.y2AxisTickValues=n.axis.getY2AxisTickValues(),n.y2Axis=n.axis.getYAxis("y2",n.y2,a.axis_y2_tick_outer,e)),n.updateArc&&n.updateArc()}}),Pt(tt.prototype,{getYDomainMinMax:function(e,t){var n=this,a=n.config,c=t==="min",u=a.data_groups,g=n.mapToIds(e),w=n.getValuesAsIdKeyed(e);return u.length>0&&function(){for(var O,L,I=n["has".concat(c?"Negative":"Positive","ValueInTargets")](e),f=function($,Y){if(Y=Y.filter(function(Dt){return g.indexOf(Dt)>=0}),Y.length===0)return O=Y,"continue";var J=Y[0],nt=n.axis.getId(J);I&&w[J]&&(w[J]=w[J].map(function(Dt){return(c?Dt<0:Dt>0)?Dt:0}));for(var ft,st,_t=function(Dt,Zt){if(!w[Zt])return"continue";var ue=n.axis.getId(Zt);w[Zt].forEach(function(ke,Te){var be=+ke,Gt=c?be>0:be<0;ue!==nt||I&&Gt||(w[J][Te]+=be)})},Et=1;ft=Y[Et];Et++)st=_t(Et,ft);O=Y},T=0;O=u[T];T++)L=f(T,O)}(),et(t,Object.keys(w).map(function(O){return et(t,w[O])}))},getYDomainMin:function(e){return this.getYDomainMinMax(e,"min")},getYDomainMax:function(e){return this.getYDomainMinMax(e,"max")},getYDomain:function(e,t,n){var a=this,c=a.config;if(a.isStackNormalized())return[0,100];var u=e.filter(function(be){return a.axis.getId(be.id)===t}),g=n?a.filterByXDomain(u,n):u,w=c["axis_".concat(t,"_min")],O=c["axis_".concat(t,"_max")],L=a.getYDomainMin(g),I=a.getYDomainMax(g),f=c["axis_".concat(t,"_center")],T=a.hasType("bar",g)&&c.bar_zerobased||a.hasType("area",g)&&c.area_zerobased,$=c["axis_".concat(t,"_inverted")],Y=a.hasDataLabel()&&c.axis_rotated,J=a.hasDataLabel()&&!c.axis_rotated;if(L=pt(w)?w:pt(O)?L<O?L:O-10:L,I=pt(O)?O:pt(w)?w<I?I:w+10:I,g.length===0)return a[t].domain();isNaN(L)&&(L=0),isNaN(I)&&(I=L),L===I&&(L<0?I=0:L=0);var nt=L>=0&&I>=0,ft=L<=0&&I<=0;(pt(w)&&nt||pt(O)&&ft)&&(T=!1),T&&(nt&&(L=0),ft&&(I=0));var st=Math.abs(I-L),_t={top:st*.1,bottom:st*.1};if(Ft(f)){var Et=Math.max(Math.abs(L),Math.abs(I));I=f+Et,L=f-Et}if(Y){var Dt=pe(a.y.range()),Zt=a.getDataLabelLength(L,I,"width").map(function(be){return be/Dt});["bottom","top"].forEach(function(be,Gt){_t[be]+=st*(Zt[Gt]/(1-Zt[0]-Zt[1]))})}else if(J){var ue=a.getDataLabelLength(L,I,"height");["bottom","top"].forEach(function(be,Gt){_t[be]+=a.axis.convertPixelsToAxisPadding(ue[Gt],st)})}if(/^y2?$/.test(t)){var ke=c["axis_".concat(t,"_padding")];K(ke)&&["bottom","top"].forEach(function(be){_t[be]=a.axis.getPadding(ke,be,_t[be],st)})}T&&(nt&&(_t.bottom=L),ft&&(_t.top=-I));var Te=[L-_t.bottom,I+_t.top];return $?Te.reverse():Te},getXDomainMinMax:function(e,t){var n=this,a=n.config["axis_x_".concat(t)];return Ft(a)?n.isTimeSeries()?n.parseDate(a):a:et(t,e.map(function(c){return et(t,c.values.map(function(u){return u.x}))}))},getXDomainMin:function(e){return this.getXDomainMinMax(e,"min")},getXDomainMax:function(e){return this.getXDomainMinMax(e,"max")},getXDomainPadding:function(e){var t,n,a=this,c=a.config,u=e[1]-e[0],g=c.axis_x_padding;a.isCategorized()?n=0:a.hasType("bar")?(t=a.getMaxDataCount(),n=t>1?u/(t-1)/2:.5):n=u*.01;var w=n,O=n;return j(g)&&K(g)?(w=pt(g.left)?g.left:n,O=pt(g.right)?g.right:n):Bt(c.axis_x_padding)&&(w=g,O=g),{left:w,right:O}},getXDomain:function(e){var t=this,n=[t.getXDomainMin(e),t.getXDomainMax(e)],a=n[0],c=n[1],u=t.getXDomainPadding(n),g=0,w=0;return a-c!==0||t.isCategorized()||(t.isTimeSeries()?(a=new Date(a.getTime()*.5),c=new Date(c.getTime()*1.5)):(a=a===0?1:a*.5,c=c===0?-1:c*1.5)),(a||a===0)&&(g=t.isTimeSeries()?new Date(a.getTime()-u.left):a-u.left),(c||c===0)&&(w=t.isTimeSeries()?new Date(c.getTime()+u.right):c+u.right),[g,w]},updateXDomain:function(e,t,n,a,c){var u=this,g=u.config,w=g.zoom_enabled;if(n&&(u.x.domain(c||P(u.getXDomain(e))),u.orgXDomain=u.x.domain(),w&&u.zoom.updateScaleExtent(),u.subX.domain(u.x.domain()),u.brush&&u.brush.scale(u.subX)),t){var O=c||!u.brush||re(u)?u.orgXDomain:he(u).map(u.subX.invert);u.x.domain(O),w&&u.zoom.updateScaleExtent()}return a&&u.x.domain(u.trimXDomain(u.x.orgDomain())),u.x.domain()},trimXDomain:function(e){var t=this.getZoomDomain(),n=X()(t,2),a=n[0],c=n[1];return e[0]<=a&&(e[1]=+e[1]+(a-e[0]),e[0]=a),c<=e[1]&&(e[0]=+e[0]-(e[1]-c),e[1]=c),e}}),Pt(tt.prototype,{isX:function(e){var t=this,n=t.config,a=n.data_x&&e===n.data_x,c=K(n.data_xs)&&ot(n.data_xs,e);return a||c},isNotX:function(e){return!this.isX(e)},isStackNormalized:function(){var e=this.config;return e.data_stack_normalize&&e.data_groups.length},isGrouped:function(e){return this.config.data_groups.map(function(t){return t.indexOf(e)>=0})[0]},getXKey:function(e){var t=this,n=t.config;return n.data_x?n.data_x:K(n.data_xs)?n.data_xs[e]:null},getXValuesOfXKey:function(e,t){var n,a=this,c=t&&K(t)?a.mapToIds(t):[];
8return c.forEach(function(u){a.getXKey(u)===e&&(n=a.data.xs[u])}),n},getIndexByX:function(e,t){var n=this;return t?t.indexOf(At(e)?e:+e):(n.filterByX(n.data.targets,e)[0]||{index:null}).index},getXValue:function(e,t){var n=this;return e in n.data.xs&&n.data.xs[e]&&pt(n.data.xs[e][t])?n.data.xs[e][t]:t},getOtherTargetXs:function(){var e=this,t=Object.keys(e.data.xs);return t.length?e.data.xs[t[0]]:null},getOtherTargetX:function(e){var t=this.getOtherTargetXs();return t&&e<t.length?t[e]:null},addXs:function(e){var t=this;Object.keys(e).forEach(function(n){t.config.data_xs[n]=e[n]})},hasMultipleX:function(e){return Object.keys(e).map(function(t){return e[t]}).length>1},isMultipleX:function(){return K(this.config.data_xs)||!this.config.data_xSort||this.hasType("bubble")||this.hasType("scatter")},addName:function(e){var t,n=this;return e&&(t=n.config.data_names[e.id],e.name=t===void 0?e.id:t),e},getAllValuesOnIndex:function(e){var t=this;return t.filterTargetsToShow(t.data.targets).map(function(n){return t.addName(t.getValueOnIndex(n.values,e))})},getValueOnIndex:function(e,t){var n=e.filter(function(a){return a.index===t});return n.length?n[0]:null},updateTargetX:function(e,t){var n=this;e.forEach(function(a){a.values.forEach(function(c,u){c.x=n.generateTargetX(t[u],a.id,u)}),n.data.xs[a.id]=t})},updateTargetXs:function(e,t){var n=this;e.forEach(function(a){t[a.id]&&n.updateTargetX([a],t[a.id])})},generateTargetX:function(e,t,n){var a=this,c=a.isCategorized()?n:e||n;return a.isTimeSeries()?c=e?a.parseDate(e):a.parseDate(a.getXValue(t,n)):a.isCustomX()&&!a.isCategorized()&&(c=pt(e)?+e:a.getXValue(t,n)),c},cloneTarget:function(e){return{id:e.id,id_org:e.id_org,values:e.values.map(function(t){return{x:t.x,value:t.value,id:t.id}})}},updateXs:function(){var e=this,t=e.data.targets;t.length&&(e.xs=[],t[0].values.forEach(function(n){e.xs[n.index]=n.x}))},getPrevX:function(e){var t=this.xs[e-1];return Ft(t)?t:null},getNextX:function(e){var t=this.xs[e+1];return Ft(t)?t:null},getBaseValue:function(e){var t=this,n=e.value;return n&&t.isAreaRangeType(e)&&(n=t.getAreaRangeData(e,"mid")),n},getMinMaxValue:function(e){var t,n,a=this.getBaseValue.bind(this);return(e||this.data.targets.map(function(c){return c.values})).forEach(function(c,u){var g=c.map(a).filter(Bt);t=Math.min.apply(Math,[u?t:1/0].concat(Nt()(g))),n=Math.max.apply(Math,[u?n:-1/0].concat(Nt()(g)))}),{min:t,max:n}},getMinMaxData:function(){var e=this,t="$minMaxData",n=e.getCache(t);if(!n){var a=e.data.targets.map(function(w){return w.values}),c=e.getMinMaxValue(a),u=[],g=[];a.forEach(function(w){var O=e.getFilteredDataByValue(w,c.min),L=e.getFilteredDataByValue(w,c.max);O.length&&(u=u.concat(O)),L.length&&(g=g.concat(L))}),e.addCache(t,n={min:u,max:g})}return n},getTotalPerIndex:function(){var e=this,t=e.getCache("$totalPerIndex");return e.isStackNormalized()&&!t&&(t=[],e.data.targets.forEach(function(n){n.values.forEach(function(a,c){t[c]||(t[c]=0),t[c]+=Bt(a.value)?a.value:0})})),t},getTotalDataSum:function(){var e=this,t="$totalDataSum",n=e.getCache(t);if(!n){var a=Le(e.data.targets.map(function(c){return c.values})).map(function(c){return c.value}).reduce(function(c,u){return c+u});e.addCache(t,n=a)}return n},getFilteredDataByValue:function(e,t){var n=this;return e.filter(function(a){return n.getBaseValue(a)===t})},getMaxDataCount:function(){return Math.max.apply(Math,Nt()(this.data.targets.map(function(e){return e.values.length})))},getMaxDataCountTarget:function(e){var t,n=e.length,a=0;return n>1?e.forEach(function(c){c.values.length>a&&(t=c,a=c.values.length)}):t=n?e[0]:null,t},mapToIds:function(e){return e.map(function(t){return t.id})},mapToTargetIds:function(e){var t=this;return e?rt(e)?e.concat():[e]:t.mapToIds(t.data.targets)},hasTarget:function(e,t){for(var n=this.mapToIds(e),a,c=0;a=n[c];c++)if(a===t)return!0;return!1},isTargetToShow:function(e){return this.hiddenTargetIds.indexOf(e)<0},isLegendToShow:function(e){return this.hiddenLegendIds.indexOf(e)<0},filterTargetsToShow:function(e){var t=this;return(e||t.data.targets).filter(function(n){return t.isTargetToShow(n.id)})},mapTargetsToUniqueXs:function(e){var t=this,n=[];return e&&e.length&&(n=Ne(Le(e.map(function(a){return a.values.map(function(c){return+c.x})}))),n=t.isTimeSeries()?n.map(function(a){return new Date(+a)}):n.map(function(a){return+a})),P(n)},addHiddenTargetIds:function(e){this.hiddenTargetIds=this.hiddenTargetIds.concat(e)},removeHiddenTargetIds:function(e){this.hiddenTargetIds=this.hiddenTargetIds.filter(function(t){return e.indexOf(t)<0})},addHiddenLegendIds:function(e){this.hiddenLegendIds=this.hiddenLegendIds.concat(e)},removeHiddenLegendIds:function(e){this.hiddenLegendIds=this.hiddenLegendIds.filter(function(t){return e.indexOf(t)<0})},getValuesAsIdKeyed:function(e){var t=this,n={},a=t.isMultipleX(),c=a?t.mapTargetsToUniqueXs(e).map(function(u){return At(u)?u:+u}):null;return e.forEach(function(u){var g=[];
8u.values.forEach(function(w){var O=w.value;rt(O)?g.push.apply(g,Nt()(O)):j(O)&&"high"in O?g.push.apply(g,Nt()(Object.values(O))):a?g[t.getIndexByX(w.x,c)]=O:g.push(O)}),n[u.id]=g}),n},checkValueInTargets:function(e,t){for(var n,a=Object.keys(e),c=0;c<a.length;c++){n=e[a[c]].values;for(var u=0;u<n.length;u++)if(t(n[u].value))return!0}return!1},hasMultiTargets:function(){return this.filterTargetsToShow().length>1},hasNegativeValueInTargets:function(e){return this.checkValueInTargets(e,function(t){return t<0})},hasPositiveValueInTargets:function(e){return this.checkValueInTargets(e,function(t){return t>0})},_checkOrder:function(e){var t=this.config,n=t.data_order;return At(n)&&n.toLowerCase()===e},isOrderDesc:function(){return this._checkOrder("desc")},isOrderAsc:function(){return this._checkOrder("asc")},orderTargets:function(e){var t=this,n=t.config,a=Nt()(e),c=t.isOrderAsc(),u=t.isOrderDesc();return c||u?a.sort(function(g,w){var O=function(f,T){return f+Math.abs(T.value)},L=g.values.reduce(O,0),I=w.values.reduce(O,0);return c?I-L:L-I}):Ot(n.data_order)&&a.sort(n.data_order),a},filterByX:function(e,t){return Le(e.map(function(n){return n.values})).filter(function(n){return n.x-t===0})},filterRemoveNull:function(e){var t=this;return e.filter(function(n){return pt(t.getBaseValue(n))})},filterByXDomain:function(e,t){return e.map(function(n){return{id:n.id,id_org:n.id_org,values:n.values.filter(function(a){return t[0]<=a.x&&a.x<=t[1]})}})},hasDataLabel:function(){var e=this.config.data_labels;return fe(e)&&e||Ae(e)&&K(e)},getDataLabelLength:function(e,t,n){var a=this,c=[0,0];return a.selectChart.select("svg").selectAll(".dummy").data([e,t]).enter().append("text").text(function(u){return a.dataLabelFormat(u.id)(u)}).each(function(u,g){c[g]=this.getBoundingClientRect()[n]*1.3}).remove(),c},isNoneArc:function(e){return this.hasTarget(this.data.targets,e.id)},isArc:function(e){return"data"in e&&this.hasTarget(this.data.targets,e.data.id)},findSameXOfValues:function(e,t){var n,a=e[t].x,c=[];for(n=t-1;n>=0&&a===e[n].x;n--)c.push(e[n]);for(n=t;n<e.length&&a===e[n].x;n++)c.push(e[n]);return c},findClosestFromTargets:function(e,t){var n=this,a=e.map(function(c){return n.findClosest(c.values,t)});return n.findClosest(a,t)},findClosest:function(e,t){var n,a=this,c=a.config.point_sensitivity;return e.filter(function(u){return u&&a.isBarType(u.id)}).forEach(function(u){var g=a.main.select(".".concat(C.bars).concat(a.getTargetSelectorSuffix(u.id)," .").concat(C.bar,"-").concat(u.index)).node();!n&&a.isWithinBar(g)&&(n=u)}),e.filter(function(u){return u&&!a.isBarType(u.id)}).forEach(function(u){var g=a.dist(u,t);g<c&&(c=g,n=u)}),n},dist:function(e,t){var n=this,a=n.config.axis_rotated,c=a?1:0,u=a?0:1,g=n.circleY(e,e.index),w=(n.zoomScale||n.x)(e.x);return Math.sqrt(Math.pow(w-t[c],2)+Math.pow(g-t[u],2))},convertValuesToStep:function(e){var t=this,n=t.config,a=n.axis_rotated,c=n.line_step_type,u=t.isCategorized(),g=rt(e)?e.concat():[e];if(!a&&!u)return e;var w=g[0].id,O=g[0].x-1,L=g[0].value;return u&&g.unshift({x:O,value:L,id:w}),c==="step-after"&&g.unshift({x:O-1,value:L,id:w}),O=g.length,L=g[O-1].value,u&&g.push({x:O,value:L,id:w}),c==="step-before"&&g.push({x:O+1,value:L,id:w}),g},convertValuesToRange:function(e){var t=rt(e)?e.concat():[e],n=[];return t.forEach(function(a){var c=a.x,u=a.id;n.push({x:c,id:u,value:a.value[0]}),n.push({x:c,id:u,value:a.value[2]})}),n},updateDataAttributes:function(e,t){var n=this,a=n.config,c=a["data_".concat(e)];return kt(t)||(Object.keys(t).forEach(function(u){c[u]=t[u]}),n.redraw({withLegend:!0})),c},getAreaRangeData:function(e,t){var n=e.value;if(rt(n)){var a=["high","mid","low"].indexOf(t);return a===-1?null:n[a]}return n[t]},getRatio:function(e,t,n){var a=this,c=a.config,u=a.api,g=0;if(t&&u.data.shown.call(u).length){var w=u.data.values.bind(u);if(g=t.ratio||t.value,e==="arc")if(a.pie.padAngle()()){var O=a.getTotalDataSum();a.hiddenTargetIds.length&&(O-=w(a.hiddenTargetIds).reduce(function(f,T){return f+T})),g=t.value/O}else g=(t.endAngle-t.startAngle)/(Math.PI*(a.hasType("gauge")&&!c.gauge_fullCircle?1:2));else if(e==="index"){var L=this.getTotalPerIndex();if(a.hiddenTargetIds.length){var I=w(a.hiddenTargetIds,!1);I.length&&(I=I.reduce(function(f,T){return f.map(function($,Y){return(Bt($)?$:0)+T[Y]})}),L=L.map(function(f,T){return f-I[T]}))}t.ratio=Bt(t.value)&&L&&L[t.index]>0?t.value/L[t.index]:0,g=t.ratio}
8else e==="radar"&&(g=parseFloat(Math.max(t.value,0))/a.maxValue*c.radar_size_ratio)}return n&&g?g*100:g}});var Xt=M(19);Pt(tt.prototype,{convertData:function(e,t){var n,a=this;if(e.bindto?(n={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(c){var u="data_".concat(c);u in e&&(n[c]=e[u])})):n=e,n.url&&t)a.convertUrlToData(n.url,n.mimeType,n.headers,n.keys,t);else if(n.json)n=a.convertJsonToData(n.json,n.keys);else if(n.rows)n=a.convertRowsToData(n.rows);else if(n.columns)n=a.convertColumnsToData(n.columns);else if(e.bindto)throw Error("url or json or rows or columns is required.");return n},convertUrlToData:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"csv",a=arguments.length>2?arguments[2]:void 0,c=arguments.length>3?arguments[3]:void 0,u=arguments.length>4?arguments[4]:void 0,g=new XMLHttpRequest;a&&Object.keys(a).forEach(function(w){g.setRequestHeader(w,a[w])}),g.open("GET",e),g.onreadystatechange=function(){if(g.readyState===4)if(g.status===200){var w=g.responseText;w&&u.call(t,t["convert".concat($e(n),"ToData")](n==="json"?JSON.parse(w):w,c))}else throw new Error("".concat(e,": Something went wrong loading!"))},g.send()},_convertCsvTsvToData:function(e,t){var n,a=e.rows(t);return a.length===1?(n=[{}],a[0].forEach(function(c){n[0][c]=null})):n=e.parse(t),n},convertCsvToData:function(e){return this._convertCsvTsvToData({rows:Xt.csvParseRows,parse:Xt.csvParse},e)},convertTsvToData:function(e){return this._convertCsvTsvToData({rows:Xt.tsvParseRows,parse:Xt.tsvParse},e)},convertJsonToData:function(e,t){var n,a,c=this,u=this.config,g=[];if(rt(e)){var w=t||u.data_keys;w.x?(n=w.value.concat(w.x),u.data_x=w.x):n=w.value,g.push(n),e.forEach(function(O){var L=n.map(function(I){var f=c.findValueInJson(O,I);return kt(f)&&(f=null),f});g.push(L)}),a=this.convertRowsToData(g)}else Object.keys(e).forEach(function(O){var L=e[O].concat();L.unshift(O),g.push(L)}),a=this.convertColumnsToData(g);return a},findValueInJson:function(e,t){if(e[t]!==void 0)return e[t];var n=t.replace(/\[(\w+)\]/g,".$1"),a=n.replace(/^\./,"").split("."),c=e;return a.some(function(u){return!(c=c&&u in c?c[u]:void 0)}),c},convertRowsToData:function(e){for(var t=e[0],n=[],a=1,c=e.length;a<c;a++){for(var u={},g=0,w=e[a].length;g<w;g++){if(kt(e[a][g]))throw new Error("Source data is missing a component at (".concat(a,", ").concat(g,")!"));u[t[g]]=e[a][g]}n.push(u)}return n},convertColumnsToData:function(e){for(var t=[],n=0,a=e.length;n<a;n++)for(var c=e[n][0],u=1,g=e[n].length;u<g;u++){if(kt(t[u-1])&&(t[u-1]={}),kt(e[n][u]))throw new Error("Source data is missing a component at (".concat(n,", ").concat(u,")!"));t[u-1][c]=e[n][u]}return t},convertDataToTargets:function(e,t){var n,a=this,c=this,u=c.config,g=Object.keys(e[0]||{}),w=g.length?g.filter(c.isNotX,c):[],O=g.length?g.filter(c.isX,c):[];w.forEach(function(I){var f=a.getXKey(I);a.isCustomX()||a.isTimeSeries()?O.indexOf(f)>=0?n=(t&&c.data.xs[I]||[]).concat(e.map(function(T){return T[f]}).filter(pt).map(function(T,$){return c.generateTargetX(T,I,$)})):u.data_x?n=a.getOtherTargetXs():K(u.data_xs)&&(n=c.getXValuesOfXKey(f,c.data.targets)):n=e.map(function(T,$){return $}),n&&(a.data.xs[I]=n)}
8),w.forEach(function(I){if(!n)throw new Error('x is not defined for id = "'.concat(I,'".'))});var L=w.map(function(I,f){var T=u.data_idConverter(I),$=c.getXKey(I),Y=c.isCustomX()&&c.isCategorized(),J=Y&&e.map(function(nt){return nt.x}).every(function(nt){return u.axis_x_categories.indexOf(nt)>-1});return{id:T,id_org:I,values:e.map(function(nt,ft){var st,_t=nt[$],Et=nt[I];return Et=Et===null||isNaN(Et)?rt(Et)||j(Et)&&Et.high?Et:null:+nt[I],Y&&f===0&&!kt(_t)?(!J&&f===0&&ft===0&&(u.axis_x_categories=[]),st=u.axis_x_categories.indexOf(_t),st===-1&&(st=u.axis_x_categories.length,u.axis_x_categories.push(_t))):st=c.generateTargetX(_t,I,ft),(kt(nt[I])||c.data.xs[I].length<=ft)&&(st=void 0),{x:st,value:Et,id:T}}).filter(function(nt){return Ft(nt.x)})}});return L.forEach(function(I){u.data_xSort&&(I.values=I.values.sort(function(f,T){var $=f.x||f.x===0?f.x:1/0,Y=T.x||T.x===0?T.x:1/0;return $-Y})),I.values.forEach(function(f,T){return f.index=T}),c.data.xs[I.id].sort(function(f,T){return f-T})}),c.hasNegativeValue=c.hasNegativeValueInTargets(L),c.hasPositiveValue=c.hasPositiveValueInTargets(L),u.data_type&&c.setTargetType(c.mapToIds(L).filter(function(I){return!(I in u.data_types)}),u.data_type),L.forEach(function(I){return c.addCache(I.id_org,I,!0)}),L}}),Pt(tt.prototype,{load:function(e,t){var n=this,a=e;a&&(t.filter&&(a=a.filter(t.filter)),(t.type||t.types)&&a.forEach(function(c){var u=t.types&&t.types[c.id]||t.type;n.setTargetType(c.id,u)}),n.data.targets.forEach(function(c){for(var u=0;u<a.length;u++)if(c.id===a[u].id){c.values=a[u].values,a.splice(u,1);break}}),n.data.targets=n.data.targets.concat(a)),n.updateTargets(n.data.targets),n.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.done&&t.done()},loadFromArgs:function(e){var t=this;if(t.config){t.resetCache();var n=e.data||t.convertData(e,function(a){return t.load(t.convertDataToTargets(a),e)});t.load(n?t.convertDataToTargets(n):null,e)}},unload:function(e,t){var n=this,a=t,c=e;return n.resetCache(),a||(a=function(){}),c=c.filter(function(u){return n.hasTarget(n.data.targets,u)}),c&&c.length!==0?(n.svg.selectAll(c.map(function(u){return n.selectorTarget(u)})).transition().style("opacity","0").remove().call(n.endall,a),void c.forEach(function(u){n.withoutFadeIn[u]=!1,n.legend&&n.legend.selectAll(".".concat(C.legendItem).concat(n.getTargetSelectorSuffix(u))).remove(),n.data.targets=n.data.targets.filter(function(g){return g.id!==u})})):void a()}}),Pt(tt.prototype,{categoryName:function(e){var t=this.config;return e<t.axis_x_categories.length?t.axis_x_categories[e]:e}});var Xe=M(20);Pt(tt.prototype,{initEventRect:function(){var e=this;e.main.select(".".concat(C.chart)).append("g").attr("class",C.eventRects).style("fill-opacity","0")},redrawEventRect:function(){var e,t=this,n=t.config,a=t.isMultipleX(),c=n.zoom_enabled,u=t.main.select(".".concat(C.eventRects)).style("cursor",c&&c.type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(C.eventRectsMultiple,a).classed(C.eventRectsSingle,!a);if(u.selectAll(".".concat(C.eventRect)).remove(),t.eventRect=u.selectAll(".".concat(C.eventRect)),a)e=t.eventRect.data([0]),e=t.generateEventRectsForMultipleXs(e.enter()).merge(e);else{var g=t.getMaxDataCountTarget(t.data.targets);u.datum(g?g.values:[]),t.eventRect=u.selectAll(".".concat(C.eventRect)),e=t.eventRect.data(function(w){return w}),e.exit().remove(),e=t.generateEventRectsForSingleX(e.enter()).merge(e)}t.updateEventRect(e),t.inputType!=="touch"||t.svg.on("touchstart.eventRect")||t.hasArcType()||t.bindTouchOnEventRect(a)},bindTouchOnEventRect:function(e){var t,n=this,a=n.config,c=function(){var f=q.event.changedTouches[0];return Object(q.select)(document.elementFromPoint(f.clientX,f.clientY))},u=function(f){var T=f&&f.attr("class")&&f.attr("class").replace(new RegExp("(".concat(C.eventRect,"-?|s)"),"g"),"")*1;return(isNaN(T)||T===null)&&(T=-1),T},g=function(f){if(e)n.selectRectForMultipleXs(f);else{var T=c(),$=u(T);n.callOverOutForTouch($),$===-1?n.unselectRect():n.selectRectForSingle(f,T,$)}},w=a.interaction_inputType_touch.preventDefault,O=fe(w)&&w||!1,L=!isNaN(w)&&w||null,I=function(f){var T=f.type,$=f.changedTouches[0],Y=$["client".concat(a.axis_rotated?"Y":"X")];T==="touchstart"?O?f.preventDefault():L!==null&&(t=Y):T==="touchmove"&&(O||t===!0||L!==null&&Math.abs(t-Y)>=L)&&(t=!0,f.preventDefault())};n.svg.on("touchstart.eventRect touchmove.eventRect",function(){var f=c();if(!f.empty()&&f.classed(C.eventRect)){if(n.dragging||n.flowing||n.hasArcType())return;I(q.event),g(this)}else n.unselectRect(),n.callOverOutForTouch()}).on("touchend.eventRect",function(){var f=c();!f.empty()&&f.classed(C.eventRect)&&(n.hasArcType()||!n.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)})},updateEventRect:function(e){var t,n,a,c,u=this,g=u.config,w=u.zoomScale||u.x,O=e||u.eventRect.data(),L=g.axis_rotated;if(u.isMultipleX())t=0,n=0,a=u.width,c=u.height;else{var I,f;if(u.isCategorized())I=u.getEventRectWidth(),f=function($){return w($.x)-I/2};else{u.updateXs();var T=function($){var Y=$.index;return{prev:u.getPrevX(Y),next:u.getNextX(Y)}};I=function($){var Y=T($);return Y.prev===null&&Y.next===null?L?u.height:u.width:(Y.prev===null&&(Y.prev=w.domain()[0]),Y.next===null&&(Y.next=w.domain()[1]),Math.max(0,(w(Y.next)-w(Y.prev))/2))},f=function($){var Y=T($),J=u.data.xs[$.id][$.index];return Y.prev===null&&Y.next===null?0:(Y.prev===null&&(Y.prev=w.domain()[0]),(w(J)+w(Y.prev))/2)}}t=L?0:f,n=L?f:0,a=L?u.width:I,c=L?I:u.height}O.attr("class",u.classEvent.bind(u)).attr("x",t).attr("y",n).attr("width",a).attr("height",c)},selectRectForSingle:function(e,t,n){var a=this,c=a.config,u=c.data_selection_enabled,g=c.data_selection_grouped,w=c.tooltip_grouped,O=a.getAllValuesOnIndex(n);w&&(a.showTooltip(O,e),a.showXGridFocus(O),!u||g)||a.main.selectAll(".".concat(C.shape,"-").concat(n)).each(function(){Object(q.select)(this).classed(C.EXPANDED,!0),u&&t.style("cursor",g?"pointer":null),w||(a.hideXGridFocus(),a.hideTooltip(),!g&&a.expandCirclesBars(n))}).filter(function(L){return a.isWithinShape(this,L)}).call(function(L){var I=L.data();u&&(g||c.data_selection_isselectable(I))&&t.style("cursor","pointer"),w||(a.showTooltip(I,e),a.showXGridFocus(I),a.unexpandCircles(),L.each(function(f){return a.expandCirclesBars(n,f.id)}))})},expandCirclesBars:function(e,t,n){var a=this,c=a.config;
8c.point_focus_expand_enabled&&a.expandCircles(e,t,n),a.expandBars(e,t,n)},selectRectForMultipleXs:function(e){var t=this,n=t.config,a=t.filterTargetsToShow(t.data.targets);if(!(t.dragging||t.hasArcType(a))){var c=Object(q.mouse)(e),u=t.findClosestFromTargets(a,c);if(t.mouseover&&(!u||u.id!==t.mouseover.id)&&(n.data_onout.call(t.api,t.mouseover),t.mouseover=void 0),!u)return void t.unselectRect();var g=t.isBubbleType(u)||t.isScatterType(u)||!n.tooltip_grouped?[u]:t.filterByX(a,u.x),w=g.map(function(O){return t.addName(O)});t.showTooltip(w,e),t.expandCirclesBars(u.index,u.id,!0),t.showXGridFocus(w),(t.isBarType(u.id)||t.dist(u,c)<n.point_sensitivity)&&(t.svg.select(".".concat(C.eventRect)).style("cursor","pointer"),!t.mouseover&&(n.data_onover.call(t.api,u),t.mouseover=u))}},unselectRect:function(){var e=this;e.svg.select(".".concat(C.eventRect)).style("cursor",null),e.hideXGridFocus(),e.hideTooltip(),e._handleLinkedCharts(!1),e.unexpandCircles(),e.unexpandBars()},setOverOut:function(e,t){var n=this,a=n.config,c=j(t);if(c||t!==-1){var u=a[e?"data_onover":"data_onout"].bind(n.api);a.color_onover&&n.setOverColor(e,t,c),c?u(t):(e&&n.expandCirclesBars(t,null,!0),!n.isMultipleX()&&n.main.selectAll(".".concat(C.shape,"-").concat(t)).each(u))}},callOverOutForTouch:function(e){var t=this,n=t.callOverOutForTouch,a=n.last;(j(e)&&a?e.id!==a.id:e!==a)&&((a||Bt(a))&&t.setOverOut(!1,a),(e||Bt(e))&&t.setOverOut(!0,e),n.last=e)},getDraggableSelection:function(){var e=this,t=e.config;return t.interaction_enabled&&t.data_selection_draggable&&e.drag?Object(Xe.drag)().on("drag",function(){e.drag(Object(q.mouse)(this))}).on("start",function(){e.dragstart(Object(q.mouse)(this))}).on("end",function(){e.dragend()}):function(){}},generateEventRectsForSingleX:function(e){var t=this,n=t.config,a=e.append("rect").attr("class",t.classEvent.bind(t)).style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(c){t.clickHandlerForSingleX.bind(this)(c,t)}).call(t.getDraggableSelection());return t.inputType==="mouse"&&a.on("mouseover",function(c){t.dragging||t.flowing||t.hasArcType()||t.setOverOut(!0,c.index)}).on("mousemove",function(c){if(!(t.dragging||t.flowing||t.hasArcType())){var u=c.index,g=t.svg.select(".".concat(C.eventRect,"-").concat(u));t.isStepType(c)&&t.config.line_step_type==="step-after"&&Object(q.mouse)(this)[0]<t.x(t.getXValue(c.id,u))&&(u-=1),u===-1?t.unselectRect():t.selectRectForSingle(this,g,u)}}).on("mouseout",function(c){!t.config||t.hasArcType()||(t.unselectRect(),t.setOverOut(!1,c.index))}),a},clickHandlerForSingleX:function(e,t){var n=t,a=n.config;if(n.hasArcType()||!n.toggleShape||n.cancelClick)return void(n.cancelClick&&(n.cancelClick=!1));var c=e.index;n.main.selectAll(".".concat(C.shape,"-").concat(c)).each(function(u){(a.data_selection_grouped||n.isWithinShape(this,u))&&(n.toggleShape(this,u,c),a.data_onclick.call(n.api,u,this))})},generateEventRectsForMultipleXs:function(e){var t=this,n=e.append("rect").attr("x",0).attr("y",0).attr("width",t.width).attr("height",t.height).attr("class",C.eventRect).on("click",function(){t.clickHandlerForMultipleXS.bind(this)(t)}).call(t.getDraggableSelection());return t.inputType==="mouse"&&n.on("mouseover mousemove",function(){t.selectRectForMultipleXs(this)}).on("mouseout",function(){!t.config||t.hasArcType()||t.unselectRect()}),n},clickHandlerForMultipleXS:function(e){var t=e,n=t.config,a=t.filterTargetsToShow(t.data.targets);if(!t.hasArcType(a)){var c=Object(q.mouse)(this),u=t.findClosestFromTargets(a,c);!u||(t.isBarType(u.id)||t.dist(u,c)<n.point_sensitivity)&&t.main.selectAll(".".concat(C.shapes).concat(t.getTargetSelectorSuffix(u.id))).selectAll(".".concat(C.shape,"-").concat(u.index)).each(function(){(n.data_selection_grouped||t.isWithinShape(this,u))&&(t.toggleShape(this,u,u.index),n.data_onclick.call(t.api,u,this))})}},dispatchEvent:function(e,t,n){var a=this,c=a.isMultipleX(),u=".".concat(c?C.eventRect:"".concat(C.eventRect,"-").concat(t)),g=a.main.select(u).node(),w=g.getBoundingClientRect(),O=w.width,L=w.left,I=w.top,f=L+(n?n[0]:0)+(c?0:O/2),T=I+(n?n[1]:0);St[/^(mouse|click)/.test(e)?"mouse":"touch"](g,e,{screenX:f,screenY:T,clientX:f,clientY:T})}}),Pt(tt.prototype,{setContainerSize:function(){var e=this;e.currentWidth=e.getCurrentWidth(),e.currentHeight=e.getCurrentHeight()},getCurrentWidth:function(){var e=this;return e.config.size_width||e.getParentWidth()},getCurrentHeight:function(){var e=this,t=e.config,n=t.size_height||e.getParentHeight();return n>0?n:320/(e.hasType("gauge")&&!t.gauge_fullCircle?2:1)},getAxisSize:function(e){var t=this,n=t.config,a=n.axis_rotated;return a&&e==="x"||!a&&/y2?/.test(e)?t.getAxisWidthByAxisId(e,!0):t.getHorizontalAxisHeight(e)},getCurrentPaddingTop:function(){var e=this,t=e.config,n=t.axis_y2_axes.length,a=pt(t.padding_top)?t.padding_top:0;return e.title&&e.title.node()&&(a+=e.getTitlePadding()),n&&t.axis_rotated&&(a+=e.getHorizontalAxisHeight("y2")*n),a},getCurrentPaddingBottom:function(){var e=this,t=e.config,n=t.axis_rotated?"y":"x",a=t["axis_".concat(n,"_axes")].length,c=pt(t.padding_bottom)?t.padding_bottom:0;return c+(a?e.getHorizontalAxisHeight(n)*a:0)},getCurrentPaddingLeft:function(e){var t,n=this,a=n.config,c=a.axis_rotated,u=c?"x":"y",g=a["axis_".concat(u,"_axes")].length,w=n.getAxisWidthByAxisId(u,e);return t=pt(a.padding_left)?a.padding_left:c?a.axis_x_show?Math.max(Jt(w),40):1:!a.axis_y_show||a.axis_y_inner?n.axis.getYAxisLabelPosition().isOuter?30:1:Jt(w),t+w*g},getCurrentPaddingRight:function(){var e,t=this,n=t.config,a=t.isLegendRight?t.getLegendWidth()+20:0,c=n.axis_y2_axes.length,u=t.getAxisWidthByAxisId("y2");return e=pt(n.padding_right)?n.padding_right+1:n.axis_rotated?10+a:!n.axis_y2_show||n.axis_y2_inner?2+a+(t.axis.getY2AxisLabelPosition().isOuter?20:0):Jt(u)+a,e+u*c},getParentRectValue:function(e){for(var t,n="offset".concat($e(e)),a=this.selectChart.node();!t&&a&&a.tagName!=="BODY";){try{t=a.getBoundingClientRect()[e]}catch{n in a&&(t=a[n])}a=a.parentNode}if(e==="width"){var c=document.body.offsetWidth;t>c&&(t=c)}return t},getParentWidth:function(){return this.getParentRectValue("width")},getParentHeight:function(){var e=this.selectChart.style("height");return e.indexOf("px")>0?parseInt(e,10):0},getSvgLeft:function(e){var t=this,n=t.config,a=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,c=n.axis_rotated?C.axisX:C.axisY,u=t.main.select(".".concat(c)).node(),g=u&&a?u.getBoundingClientRect():{right:0},w=t.selectChart.node().getBoundingClientRect(),O=t.hasArcType(),L=g.right-w.left-(O?0:t.getCurrentPaddingLeft(e));return L>0?L:0},getAxisWidthByAxisId:function(e,t){var n=this,a=n.axis.getLabelPositionById(e);return n.axis.getMaxTickWidth(e,t)+(a.isInner?20:40)},getHorizontalAxisHeight:function(e){var t=this,n=t.config,a=n.axis_rotated,c=30;return e!=="x"||n.axis_x_show?e==="x"&&n.axis_x_height?n.axis_x_height:e!=="y"||n.axis_y_show?e!=="y2"||n.axis_y2_show?((e==="x"&&!a&&n.axis_x_tick_rotate||e==="y"&&a&&n.axis_y_tick_rotate)&&(c=30+t.axis.getMaxTickWidth(e)*Math.cos(Math.PI*(90-n["axis_".concat(e,"_tick_rotate")])/180)),c+(t.axis.getLabelPositionById(e).isInner?0:10)+(e!=="y2"||a?0:-10)):t.rotated_padding_top:!n.legend_show||t.isLegendRight||t.isLegendInset?1:10:8},getEventRectWidth:function(){return Math.max(0,this.xAxis.tickInterval())}});var V=M(21);Pt(tt.prototype,{getShapeIndices:function(e){var t=this,n=t.config,a={},c=0;
8return t.filterTargetsToShow(t.data.targets.filter(e,t)).forEach(function(u){for(var g,w=0;g=n.data_groups[w];w++)if(!(g.indexOf(u.id)<0)){for(var O,L=0;O=g[L];L++)if(O in a){a[u.id]=a[O];break}}kt(a[u.id])&&(a[u.id]=c++)}),a.__max__=c-1,a},getShapeX:function(e,t,n,a){var c=this,u=a?c.subX:c.zoomScale||c.x,g=c.config.bar_padding,w=function(L,I){return L+I},O=Ae(e)&&e.total.length?e.total.reduce(w)/2:0;return function(L){var I=L.id in n?n[L.id]:0,f=0;if(K(L.x)){var T=u(L.x);f=O?T-(e[L.id]||e.width)+e.total.slice(0,I+1).reduce(w)-O:T-(Bt(e)?e:e.width)*(t/2-I)}return e&&f&&t>1&&g&&(I&&(f+=g*I),t>2?f-=(t-1)*g/2:t===2&&(f-=g/2)),f}},getShapeY:function(e){var t=this,n=t.isStackNormalized();return function(a){return(e?t.getSubYScale(a.id):t.getYScale(a.id))(n?t.getRatio("index",a,!0):a.value)}},getShapeOffset:function(e,t,n){var a=this,c=a.orderTargets(a.filterTargetsToShow(a.data.targets.filter(e,a))),u=c.map(function(g){return g.id});return function(g,w){var O=n?a.getSubYScale(g.id):a.getYScale(g.id),L=O(0),I=L,f=w;return c.forEach(function(T){var $=a.isStepType(g)?a.convertValuesToStep(T.values):T.values,Y=$.map(function(J){return a.isStackNormalized()?a.getRatio("index",J,!0):J.value});
8T.id===g.id||t[T.id]!==t[g.id]||u.indexOf(T.id)<u.indexOf(g.id)&&((kt($[f])||+$[f].x!=+g.x)&&(f=-1,$.forEach(function(J,nt){var ft=J.x.constructor===Date?+J.x:J.x,st=g.x.constructor===Date?+g.x:g.x;ft===st&&(f=nt)})),f in $&&$[f].value*g.value>=0&&(I+=O(Y[f])-L))}),I}},isWithinShape:function(e,t){var n,a=this,c=Object(q.select)(e);return a.isTargetToShow(t.id)?a.hasValidPointType(e.nodeName)?n=a.isStepType(t)?a.isWithinStep(e,a.getYScale(t.id)(t.value)):a.isWithinCircle(e,a.isBubbleType(t)?a.pointSelectR(t)*1.5:0):e.nodeName==="path"&&(n=!c.classed(C.bar)||a.isWithinBar(e)):n=!1,n},getInterpolate:function(e){var t=this,n=t.getInterpolateType(e);return{basis:V.curveBasis,"basis-closed":V.curveBasisClosed,"basis-open":V.curveBasisOpen,bundle:V.curveBundle,cardinal:V.curveCardinal,"cardinal-closed":V.curveCardinalClosed,"cardinal-open":V.curveCardinalOpen,"catmull-rom":V.curveCatmullRom,"catmull-rom-closed":V.curveCatmullRomClosed,"catmull-rom-open":V.curveCatmullRomOpen,"monotone-x":V.curveMonotoneX,"monotone-y":V.curveMonotoneY,natural:V.curveNatural,"linear-closed":V.curveLinearClosed,linear:V.curveLinear,step:V.curveStep,"step-after":V.curveStepAfter,"step-before":V.curveStepBefore}[n]},getInterpolateType:function(e){var t=this,n=t.config.spline_interpolation_type,a=t.isInterpolationType(n)?n:"cardinal";return t.isSplineType(e)?a:t.isStepType(e)?t.config.line_step_type:"linear"}});var N=M(22);Pt(tt.prototype,{initPie:function(){var e=this,t=e.config,n=t.pie_padding,a=e.hasType("pie")&&n?n*.01:t["".concat(t.data_type,"_padAngle")]?t["".concat(t.data_type,"_padAngle")]:0;e.pie=Object(V.pie)().padAngle(a).sortValues(e.isOrderAsc()||e.isOrderDesc()?function(c,u){return e.isOrderAsc()?c-u:u-c}:null).value(function(c){return c.values.reduce(function(u,g){return u+g.value},0)})},updateRadius:function(){var e=this,t=e.config,n=t.pie_innerRadius,a=t.pie_padding,c=t.gauge_width||t.donut_width;e.radiusExpanded=Math.min(e.arcWidth,e.arcHeight)/2,e.radius=e.radiusExpanded*.95,e.innerRadiusRatio=c?(e.radius-c)/e.radius:.6;var u=n||(a?a*(e.innerRadiusRatio+.1):0);e.innerRadius=e.hasType("donut")||e.hasType("gauge")?e.radius*e.innerRadiusRatio:u},getInnerRadius:function(e){var t=this,n=t.innerRadius;return!Bt(n)&&e&&(n=n[e.data.id]||0),n},updateArc:function(){var e=this;e.svgArc=e.getSvgArc(),e.svgArcExpanded=e.getSvgArcExpanded(),e.svgArcExpandedSub=e.getSvgArcExpanded(.98)},updateAngle:function(e){var t=this,n=t.config,a=t.pie,c=e,u=!1;if(!n)return null;if(c.data&&t.isGaugeType(c.data)){var g=t.getTotalDataSum();g>n.gauge_max&&(n.gauge_max=g);var w=Math.PI*(n.gauge_fullCircle?2:1),O=n.gauge_startingAngle,L=w*(g/(n.gauge_max-n.gauge_min));a=t.pie.startAngle(O).endAngle(L+O)}return a(t.filterTargetsToShow()).forEach(function(I){u||I.data.id!==c.data.id||(u=!0,c=I)}),isNaN(c.startAngle)&&(c.startAngle=0),isNaN(c.endAngle)&&(c.endAngle=c.startAngle),u?c:null},getSvgArc:function(){var e=this,t=e.getInnerRadius(),n=Object(V.arc)().outerRadius(e.radius).innerRadius(Bt(t)?t:0),a=function(c,u){var g="M 0 0";if(c.value||c.data){Bt(t)||(n=n.innerRadius(e.getInnerRadius(c)));var w=!u&&e.updateAngle(c);u?g=n(c):w&&(g=n(w))}return g};return a.centroid=n.centroid,a},getSvgArcExpanded:function(e){var t=this,n=Object(V.arc)().outerRadius(t.radiusExpanded*(e||1));return function(a){var c=t.updateAngle(a);return c?n.innerRadius(t.getInnerRadius(a))(c):"M 0 0"}},getArc:function(e,t,n){return n||this.isArcType(e.data)?this.svgArc(e,t):"M 0 0"},transformForArcLabel:function(e){var t=this,n=t.config,a=t.updateAngle(e),c="";if(a&&(!t.hasType("gauge")||t.hasMultiTargets())){var u=this.svgArc.centroid(a),g=isNaN(u[0])?0:u[0],w=isNaN(u[1])?0:u[1],O=Math.sqrt(g*g+w*w),L=t.hasType("donut")&&n.donut_label_ratio||t.hasType("pie")&&n.pie_label_ratio;L=L?Ot(L)?L(e,t.radius,O):L:t.radius&&(O?(36/t.radius>.375?1.175-36/t.radius:.8)*t.radius/O:0),c="translate(".concat(g*L,",").concat(w*L,")")}return c},convertToArcData:function(e){return this.addName({id:e.data.id,value:e.value,ratio:this.getRatio("arc",e),index:e.index})},textForArcLabel:function(e){var t=this;t.shouldShowArcLabel()&&e.each(function(n){var a=Object(q.select)(this),c=t.updateAngle(n),u=c?c.value:null,g=t.getRatio("arc",c),w=n.data.id,O=t.hasType("gauge")||t.meetsArcLabelThreshold(g);if(O){var L=(t.getArcLabelFormat()||t.defaultArcValueFormat)(u,g,w).toString();wt(a,L)}})},textForGaugeMinMax:function(e,t){var n=this.getGaugeLabelExtents();return n?n(e,t):e},expandArc:function(e){var t=this;if(t.transiting){var n=setInterval(function(){t.transiting||(clearInterval(n),t.legend.selectAll(".".concat(C.legendItemFocused)).size()>0&&t.expandArc(e))},10);return}var a=t.mapToTargetIds(e);t.svg.selectAll(t.selectorTargets(a,".".concat(C.chartArc))).each(function(c){if(t.shouldExpand(c.data.id)&&c.value!==0){var u=t.expandDuration(c.data.id);Object(q.select)(this).selectAll("path").transition().duration(u).attr("d",t.svgArcExpanded).transition().duration(u*2).attr("d",t.svgArcExpandedSub)}})},unexpandArc:function(e){var t=this;if(!t.transiting){var n=t.mapToTargetIds(e);t.svg.selectAll(t.selectorTargets(n,".".concat(C.chartArc))).selectAll("path").transition().duration(function(a){return t.expandDuration(a.data.id)}).attr("d",t.svgArc),t.svg.selectAll("".concat(C.arc)).style("opacity","1")}},expandDuration:function(e){var t,n=this,a=n.config;return n.isDonutType(e)?t="donut":n.isGaugeType(e)?t="gauge":n.isPieType(e)&&(t="pie"),t?a["".concat(t,"_expand_duration")]:50},shouldExpand:function(e){var t=this,n=t.config;return t.isDonutType(e)&&n.donut_expand||t.isGaugeType(e)&&n.gauge_expand||t.isPieType(e)&&n.pie_expand},shouldShowArcLabel:function(){var e=this,t=e.config;return["pie","donut","gauge"].some(function(n){return e.hasType(n)&&t["".concat(n,"_label_show")]})},meetsArcLabelThreshold:function(e){var t=this,n=t.config,a=t.hasType("donut")?
8n.donut_label_threshold:n.pie_label_threshold;return e>=a},getArcLabelFormat:function(){var e=this,t=e.config,n=t.pie_label_format;return e.hasType("gauge")?n=t.gauge_label_format:e.hasType("donut")&&(n=t.donut_label_format),n},getGaugeLabelExtents:function(){var e=this.config;return e.gauge_label_extents},getArcTitle:function(){var e=this,t=e.hasType("donut")&&"donut"||e.hasType("gauge")&&"gauge";return t?e.config["".concat(t,"_title")]:""},updateTargetsForArc:function(e){var t=this,n=t.main,a=t.hasType("gauge"),c=t.classChartArc.bind(t),u=t.classArcs.bind(t),g=t.classFocus.bind(t),w=n.select(".".concat(C.chartArcs)).selectAll(".".concat(C.chartArc)).data(t.pie(e)).attr("class",function(L){return c(L)+g(L.data)}),O=w.enter().append("g").attr("class",c);O.append("g").attr("class",u).merge(w),O.append("text").attr("dy",a&&!t.hasMultiTargets()?"-.1em":".35em").style("opacity","0").style("text-anchor","middle").style("pointer-events","none")},initArc:function(){var e=this;e.arcs=e.main.select(".".concat(C.chart)).append("g").attr("class",C.chartArcs).attr("transform",e.getTranslate("arc")),e.setArcTitle()},setArcTitle:function(){var e=this,t=e.getArcTitle(),n=e.hasType("gauge");if(t){var a=e.arcs.append("text").attr("class",C[n?"chartArcsGaugeTitle":"chartArcsTitle"]).style("text-anchor","middle");n&&a.attr("dy","-0.3em").style("font-size","27px"),wt(a,t,n?void 0:[-1.3,1.3])}},redrawArc:function(e,t,n){var a=this,c=a.config,u=a.main,g=c.interaction_enabled,w=u.selectAll(".".concat(C.arcs)).selectAll(".".concat(C.arc)).data(a.arcData.bind(a));w.exit().transition().duration(t).style("opacity","0").remove(),w=w.enter().append("path").attr("class",a.classArc.bind(a)).style("fill",function(O){return a.color(O.data)}).style("cursor",function(O){return g&&(c.data_selection_isselectable(O)?"pointer":null)}).style("opacity","0").each(function(O){a.isGaugeType(O.data)&&(O.startAngle=c.gauge_startingAngle,O.endAngle=c.gauge_startingAngle),this._current=O}).merge(w),w.attr("transform",function(O){return!a.isGaugeType(O.data)&&n?"scale(0)":""}).style("opacity",function(O){return O===this._current?"0":"1"}).each(function(){a.transiting=!0}).transition().duration(e).attrTween("d",function(O){var L=a.updateAngle(O);if(!L)return function(){return"M 0 0"};isNaN(this._current.startAngle)&&(this._current.startAngle=0),isNaN(this._current.endAngle)&&(this._current.endAngle=this._current.startAngle);var I=Object(N.interpolate)(this._current,L);return this._current=I(0),function(f){var T=I(f);return T.data=O.data,a.getArc(T,!0)}}).attr("transform",n?"scale(1)":"").style("fill",function(O){return a.levelColor?a.levelColor(O.data.values[0].value):a.color(O.data.id)}).style("opacity","1").call(a.endall,function(){a.transiting=!1}),g&&a.bindArcEvent(w),a.redrawArcText(e)},bindArcEvent:function(e){function t(O,L,I){a.expandArc(I),a.api.focus(I),a.toggleFocusLegend(I,!0),a.showTooltip([L],O)}function n(O){var L=O&&O.id||void 0;a.unexpandArc(L),a.api.revert(),a.revertLegend(),a.hideTooltip()}var a=this,c=a.inputType==="touch",u=a.inputType==="mouse";if(e.on("click",function(O,L){var I,f=a.updateAngle(O);f&&(I=a.convertToArcData(f),a.toggleShape&&a.toggleShape(this,I,L),a.config.data_onclick.call(a.api,I,this))}),u&&e.on("mouseover",function(O){if(!a.transiting){var L=a.updateAngle(O),I=L?a.convertToArcData(L):null,f=I&&I.id||void 0;t(this,I,f),a.setOverOut(!0,I)}}).on("mouseout",function(O){if(!a.transiting){var L=a.updateAngle(O),I=L?a.convertToArcData(L):null;n(),a.setOverOut(!1,I)}}).on("mousemove",function(O){var L=a.updateAngle(O),I=L?a.convertToArcData(L):null;a.showTooltip([I],this)}),c&&a.hasArcType()&&!a.radars){var g=function(){var O=q.event.changedTouches[0],L=Object(q.select)(document.elementFromPoint(O.clientX,O.clientY));return L},w=function(){if(!a.transiting){var O=g(),L=O.datum(),I=L&&L.data&&L.data.id?a.updateAngle(L):null,f=I?a.convertToArcData(I):null,T=f&&f.id||void 0;a.callOverOutForTouch(f),kt(T)?n():t(this,f,T)}};a.svg.on("touchstart",w).on("touchmove",w)}},redrawArcText:function(e){var t=this,n=t.config,a=t.main,c=t.hasType("gauge"),u=a.selectAll(".".concat(C.chartArc)).select("text").style("opacity","0").attr("class",function(O){return t.isGaugeType(O.data)?C.gaugeValue:null}).call(t.textForArcLabel.bind(t)).attr("transform",t.transformForArcLabel.bind(t)).style("font-size",function(O){return t.isGaugeType(O.data)&&!t.hasMultiTargets()?"".concat(Math.round(t.radius/5),"px"):""}).transition().duration(e).style("opacity",function(O){return t.isTargetToShow(O.data.id)&&t.isArcType(O.data)?"1":"0"});if(a.select(".".concat(C.chartArcsTitle)).style("opacity",t.hasType("donut")||c?"1":"0"),c){var g=n.gauge_fullCircle,w=(g?-4:-1)*n.gauge_startingAngle;g&&u.attr("dy","".concat(Math.round(t.radius/14))),t.arcs.select(".".concat(C.chartArcsBackgroun
8d)).attr("d",function(){var O={data:[{value:n.gauge_max}],startAngle:n.gauge_startingAngle,endAngle:w};return t.getArc(O,!0,!0)}),t.arcs.select(".".concat(C.chartArcsGaugeUnit)).attr("dy",".75em").text(n.gauge_label_show?n.gauge_units:""),n.gauge_label_show&&(t.arcs.select(".".concat(C.chartArcsGaugeMin)).attr("dx","".concat(-1*(t.innerRadius+(t.radius-t.innerRadius)/(n.gauge_fullCircle?1:2)),"px")).attr("dy","1.2em").text(t.textForGaugeMinMax(n.gauge_min,!1)),!g&&t.arcs.select(".".concat(C.chartArcsGaugeMax)).attr("dx","".concat(t.innerRadius+(t.radius-t.innerRadius)/2,"px")).attr("dy","1.2em").text(t.textForGaugeMinMax(n.gauge_max,!0)))}},initGauge:function(){var e=this,t=e.config,n=e.arcs,a=function(c){n.append("text").attr("class",c).style("text-anchor","middle").style("pointer-events","none")};e.hasType("gauge")&&(n.append("path").attr("class",C.chartArcsBackground),t.gauge_units&&a(C.chartArcsGaugeUnit),t.gauge_label_show&&(a(C.chartArcsGaugeMin),!t.gauge_fullCircle&&a(C.chartArcsGaugeMax)))},getGaugeLabelHeight:function(){return this.config.gauge_label_show?20:0}}),Pt(tt.prototype,{initBar:function(){var e=this;e.main.select(".".concat(C.chart)).append("g").attr("class",C.chartBars)},updateTargetsForBar:function(e){var t=this,n=t.config,a=t.classChartBar.bind(t),c=t.classBars.bind(t),u=t.classFocus.bind(t),g=t.main.select(".".concat(C.chartBars)).selectAll(".".concat(C.chartBar)).data(e).attr("class",function(O){return a(O)+u(O)}),w=g.enter().append("g").attr("class",a).style("opacity","0").style("pointer-events","none");w.append("g").attr("class",c).style("cursor",function(O){return n.data_selection_isselectable(O)?"pointer":null})},updateBar:function(e){var t=this,n=t.barData.bind(t),a=t.classBar.bind(t),c=t.initialOpacity.bind(t);t.mainBar=t.main.selectAll(".".concat(C.bars)).selectAll(".".concat(C.bar)).data(n),t.mainBar.exit().transition().duration(e).style("opacity","0").remove(),t.mainBar=t.mainBar.enter().append("path").attr("class",a).style("fill",t.color).merge(t.mainBar).style("opacity",c)},redrawBar:function(e,t){return[(t?this.mainBar.transition(de()):this.mainBar).attr("d",e).style("fill",this.color).style("opacity","1")]},getBarW:function(e,t){var n,a=this,c=a.config,u=e.tickInterval(a.getMaxDataCount()),g=c.data_groups.length,w=function(O){var L=O?c.bar_width[O]:c.bar_width,I=O?L.ratio:c.bar_width_ratio,f=O?L.max:c.bar_width_max,T=Bt(L)?L:t?u*I/t:0;return f&&T>f?f:T};return n=w(),!g&&Ae(c.bar_width)&&(n={width:n,total:[]},a.filterTargetsToShow(a.data.targets).forEach(function(O){c.bar_width[O.id]&&(n[O.id]=w(O.id),n.total.push(n[O.id]||n.width))})),n},getBars:function(e,t){var n=this,a=pt(e)?"-".concat(e):"";return(t?n.main.selectAll(".".concat(C.bars).concat(n.getTargetSelectorSuffix(t))):n.main).selectAll(".".concat(C.bar).concat(a))},expandBars:function(e,t,n){var a=this;n&&a.unexpandBars(),a.getBars(e,t).classed(C.EXPANDED,!0)},unexpandBars:function(e){this.getBars(e).classed(C.EXPANDED,!1)},generateDrawBar:function(e,t){var n=this,a=n.config,c=n.generateGetBarPoints(e,t),u=a.axis_rotated,g=a.data_groups.length,w=a.bar_radius,O=a.bar_radius_ratio,L=Bt(w)&&w>0?function(){return w}:Bt(O)?function(I){return I*O}:null;return function(I,f){var T=c(I,f),$=+u,Y=+!$,J=I.value<0,nt=["",""],ft=0;if(L&&!g){var st=u?Y:$,_t=T[2][st]-T[0][st];ft=L(_t);var Et="a".concat(ft,",").concat(ft," ").concat(J?"1 0 0":"0 0 1"," ");nt[+!u]="".concat(Et).concat(ft,",").concat(ft),nt[+u]="".concat(Et).concat([-ft,ft][u?"sort":"reverse"]()),J&&nt.reverse()}var Dt=u?"H".concat(T[1][$]-ft," ").concat(nt[0],"V").concat(T[2][Y]-ft," ").concat(nt[1],"H").concat(T[3][$]):"V".concat(T[1][Y]+(J?-ft:ft)," ").concat(nt[0],"H").concat(T[2][$]-ft," ").concat(nt[1],"V").concat(T[3][Y]);return"M".concat(T[0][$],",").concat(T[0][Y]).concat(Dt,"z")}},generateGetBarPoints:function(e,t){var n=this,a=t?n.subXAxis:n.xAxis,c=e.__max__+1,u=n.getBarW(a,c),g=n.getShapeX(u,c,e,!!t),w=n.getShapeY(!!t),O=n.getShapeOffset(n.isBarType,e,!!t),L=t?n.getSubYScale:n.getYScale;return function(I,f){var T=L.call(n,I.id)(0),$=O(I,f)||T,Y=Bt(u)?u:u[I.id]||u.width,J=g(I),nt=w(I);return n.config.axis_rotated&&(I.value>0&&nt<T||I.value<0&&T<nt)&&(nt=T),nt-=T-$,[[J,$],[J,nt],[J+Y,nt],[J+Y,$]]}},isWithinBar:function(e){var t=Object(q.mouse)(e),n=jt(e),a=X()(n,2),c=a[0],u=a[1],g=Math.min(c.x,u.x),w=Math.min(c.y,u.y),O=this.config.bar_sensitivity,L=e.getBBox(),I=L.width,f=L.height;return g-O<t[0]&&t[0]<g+I+O&&w-O<t[1]&&t[1]<w+f+O}}),Pt(tt.prototype,{initBubble:function(){var e=this,t=e.config;e.hasType("bubble")&&(t.point_show=!0,t.point_type="circle",t.point_sensitivity=25)}
8,getBaseLength:function(){var e=this,t="$baseLength",n=e.getCache(t);return n||e.addCache(t,n=et("min",[e.axes.x.select("path").node().getTotalLength(),e.axes.y.select("path").node().getTotalLength()])),n},getBubbleR:function(e){var t=this,n=t.config.bubble_maxR;Ot(n)?n=n(e):!Bt(n)&&(n=t.getBaseLength()/(t.getMaxDataCount()*2)+12);var a=et("max",t.getMinMaxData().max.map(function(g){return j(g.value)?g.value.mid:g.value})),c=n*n*Math.PI,u=e.value*(c/a);return Math.sqrt(u/Math.PI)}}),Pt(tt.prototype,{initLine:function(){var e=this;e.main.select(".".concat(C.chart)).append("g").attr("class",C.chartLines)},updateTargetsForLine:function(e){var t=this,n=t.config,a=t.classChartLine.bind(t),c=t.classLines.bind(t),u=t.classAreas.bind(t),g=t.classCircles.bind(t),w=t.classFocus.bind(t),O=t.main.select(".".concat(C.chartLines)).selectAll(".".concat(C.chartLine)).data(e).attr("class",function(I){return a(I)+w(I)}),L=O.enter().append("g").attr("class",a).style("opacity","0").style("pointer-events","none");L.append("g").attr("class",c),L.append("g").attr("class",u),n.point_show&&(n.data_selection_enabled&&L.append("g").attr("class",function(I){return t.generateClass(C.selectedCircles,I.id)}),L.append("g").attr("class",g).style("cursor",function(I){return n.data_selection_isselectable(I)?"pointer":null})),e.forEach(function(I){t.main.selectAll(".".concat(C.selectedCircles).concat(t.getTargetSelectorSuffix(I.id))).selectAll("".concat(C.selectedCircle)).each(function(f){f.value=I.values[f.index].value})})},updateLine:function(e){var t=this;t.mainLine=t.main.selectAll(".".concat(C.lines)).selectAll(".".concat(C.line)).data(t.lineData.bind(t)),t.mainLine.exit().transition().duration(e).style("opacity","0").remove(),t.mainLine=t.mainLine.enter().append("path").attr("class",function(n){return"".concat(t.classLine.bind(t)(n)," ").concat(t.extraLineClasses(n)||"")}).style("stroke",t.color).merge(t.mainLine).style("opacity",t.initialOpacity.bind(t)).style("shape-rendering",function(n){return t.isStepType(n)?"crispEdges":""}).attr("transform",null)},redrawLine:function(e,t){return[(t?this.mainLine.transition(de()):this.mainLine).attr("d",e).style("stroke",this.color).style("opacity","1")]},getCurve:function(e){var t=this,n=t.config.axis_rotated&&t.isStepType(e);return n?function(a){var c=t.getInterpolate(e)(a);return c.orgPoint=c.point,c.pointRotated=function(u,g){this._point===1&&(this._point=2);var w=this._y*(1-this._t)+g*this._t;this._context.lineTo(this._x,w),this._context.lineTo(u,w),this._x=u,this._y=g},c.point=function(u,g){this._point===0?this.orgPoint(u,g):this.pointRotated(u,g)},c}:t.getInterpolate(e)},generateDrawLine:function(e,t){var n=this,a=n.config,c=a.line_connectNull,u=a.axis_rotated,g=n.generateGetLinePoints(e,t),w=t?n.getSubYScale:n.getYScale,O=function(T){return(t?n.subxx:n.xx).call(n,T)},L=function(T,$){return n.isGrouped(T.id)?g(T,$)[0][1]:w.call(n,T.id)(n.getBaseValue(T))},I=Object(V.line)();I=u?I.x(L).y(O):I.x(O).y(L),c||(I=I.defined(function(T){return n.getBaseValue(T)!==null}));var f=t?n.subX:n.x;return function(T){var $,Y=w.call(n,T.id),J=c?n.filterRemoveNull(T.values):T.values,nt=0,ft=0;if(n.isLineType(T)){var st=a.data_regions[T.id];st?$=n.lineWithRegions(J,f,Y,st):(n.isStepType(T)&&(J=n.convertValuesToStep(J)),$=I.curve(n.getCurve(T))(J))}else J[0]&&(nt=f(J[0].x),ft=Y(J[0].value)),$=u?"M ".concat(ft," ").concat(nt):"M ".concat(nt," ").concat(ft);return $||"M 0 0"}},generateGetLinePoints:function(e,t){var n=this,a=n.config,c=e.__max__+1,u=!!t,g=n.getShapeX(0,c,e,u),w=n.getShapeY(u),O=n.getShapeOffset(n.isLineType,e,u),L=u?n.getSubYScale:n.getYScale;return function(I,f){var T=L.call(n,I.id)(0),$=O(I,f)||T,Y=g(I),J=w(I);a.axis_rotated&&(I.value>0&&J<T||I.value<0&&T<J)&&(J=T);var nt=[Y,J-(T-$)];return[nt,nt,nt,nt]}},lineWithRegions:function(e,t,n,a){var c,u,g,w,O=this,L=O.config,I=L.axis_rotated,f=O.isTimeSeries(),T=O.isCategorized()?.5:0,$=[],Y="2 2",J=function(Fe,We){for(var Re,qe=0;Re=We[qe];qe++)if(Re.start<Fe&&Fe<=Re.end)return Re.style;return!1};if(Ft(a))for(var nt=function(Fe,We){return kt(Fe)?We:f?O.parseDate(Fe):Fe},ft,st=0;ft=a[st];st++){var _t=nt(ft.start,e[0].x),Et=nt(ft.end,e[e.length-1].x),Dt=ft.style||{dasharray:Y};$[st]={start:_t,end:Et,style:Dt}}for(var Zt=I?function(Fe){return n(Fe.value)}:function(Fe){return t(Fe.x)},ue=I?function(Fe){return t(Fe.x)}:function(Fe){return n(Fe.value)},ke=function(Fe){return"M".concat(Fe[0][0],",").concat(Fe[0][1],"L").concat(Fe[1][0],",").concat(Fe[1][1])},Te=f?function(Fe,We,Re,qe){var te=Fe.x.getTime(),Kt=We.x-Fe.x,le=new Date(te+Kt*Re),Je=new Date(te+Kt*(Re+qe)),tn=I?[[n(u(Re)),t(le)],[n(u(Re+g)),t(Je)]]:[[t(le),n(u(Re))],[t(Je),n(u(Re+g))]];return ke(tn)}:function(Fe,We,Re,qe){var te=I?[[n(u(Re),!0),t(c(Re))],[n(u(Re+qe),!0),t(c(Re+qe))]]:[[t(c(Re),!0),n(u(Re))],[t(c(Re+qe),!0),n(u(Re+qe))]];return ke(te)},be="M",Gt,De=0;Gt=e[De];De++){var Oe=e[De-1],Dt=J(Gt.x,$);if(kt($)||!Dt)be+="".concat(De?"L":"").concat(Zt(Gt),",").concat(ue(Gt));else{try{Dt=Dt.dasharray.split(" ")}catch{Dt=Y.split(" ")}c=O.getScale(Oe.x+T,Gt.x+T,f),u=O.getScale(Oe.value,Gt.value);var Se=t(Gt.x)-t(Oe.x),He=n(Gt.value)-n(Oe.value),un=Math.sqrt(Math.pow(Se,2)+Math.pow(He,2));g=Dt[0]/un,w=g*Dt[1];for(var Ze=g;Ze<=1;Ze+=w)be+=Te(Oe,Gt,Ze,g),Ze+w>=1&&(be+=Te(Oe,Gt,1,0))}}return be},updateAreaGradient:function(){var e=this;
8e.data.targets.forEach(function(t){var n="".concat(e.datetimeId,"-areaGradient").concat(e.getTargetSelectorSuffix(t.id));if(e.isAreaType(t)&&e.defs.select("#".concat(n)).empty()){var a=e.color(t),c=e.config.area_linearGradient,u=c.x,g=u===void 0?[0,0]:u,w=c.y,O=w===void 0?[0,1]:w,L=c.stops,I=L===void 0?[[0,a,1],[1,a,0]]:L,f=e.defs.append("linearGradient").attr("id","".concat(n)).attr("x1",g[0]).attr("x2",g[1]).attr("y1",O[0]).attr("y2",O[1]);I.forEach(function(T){var $=Ot(T[1])?T[1](t.id):T[1];f.append("stop").attr("offset",T[0]).attr("stop-color",$||a).attr("stop-opacity",T[2])})}})},updateAreaColor:function(e){var t=this;return t.config.area_linearGradient?"url(#".concat(t.datetimeId,"-areaGradient").concat(t.getTargetSelectorSuffix(e.id),")"):t.color(e)},updateArea:function(e){var t=this;t.config.area_linearGradient&&t.updateAreaGradient(),t.mainArea=t.main.selectAll(".".concat(C.areas)).selectAll(".".concat(C.area)).data(t.lineData.bind(t)),t.mainArea.exit().transition().duration(e).style("opacity","0").remove(),t.mainArea=t.mainArea.enter().append("path").attr("class",t.classArea.bind(t)).style("fill",t.updateAreaColor.bind(t)).style("opacity",function(){return t.orgAreaOpacity=Object(q.select)(this).style("opacity"),"0"}).merge(t.mainArea),t.mainArea.style("opacity",t.orgAreaOpacity)},redrawArea:function(e,t){var n=this;return[(t?n.mainArea.transition(de()):n.mainArea).attr("d",e).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(a){return n.isAreaRangeType(a)?n.orgAreaOpacity/1.75:n.orgAreaOpacity})]},generateDrawArea:function(e,t){var n=this,a=n.config,c=a.line_connectNull,u=a.axis_rotated,g=n.generateGetAreaPoints(e,t),w=t?n.getSubYScale:n.getYScale,O=function(f){return(t?n.subxx:n.xx).call(n,f)},L=function(f,T){return n.isGrouped(f.id)?g(f,T)[0][1]:w.call(n,f.id)(n.isAreaRangeType(f)?n.getAreaRangeData(f,"high"):0)},I=function(f,T){return n.isGrouped(f.id)?g(f,T)[1][1]:w.call(n,f.id)(n.isAreaRangeType(f)?n.getAreaRangeData(f,"low"):f.value)};return function(f){var T,$=c?n.filterRemoveNull(f.values):f.values,Y=0,J=0;if(n.isAreaType(f)){var nt=Object(V.area)();nt=u?nt.y(O).x0(L).x1(I):nt.x(O).y0(a.area_above?0:L).y1(I),c||(nt=nt.defined(function(ft){return n.getBaseValue(ft)!==null})),n.isStepType(f)&&($=n.convertValuesToStep($)),T=nt.curve(n.getCurve(f))($)}
8else $[0]&&(Y=n.x($[0].x),J=n.getYScale(f.id)($[0].value)),T=u?"M ".concat(J," ").concat(Y):"M ".concat(Y," ").concat(J);return T||"M 0 0"}},generateGetAreaPoints:function(e,t){var n=this,a=n.config,c=e.__max__+1,u=n.getShapeX(0,c,e,!!t),g=n.getShapeY(!!t),w=n.getShapeOffset(n.isAreaType,e,!!t),O=t?n.getSubYScale:n.getYScale;return function(L,I){var f=O.call(n,L.id)(0),T=w(L,I)||f,$=u(L),Y=g(L);return a.axis_rotated&&(L.value>0&&Y<f||L.value<0&&f<Y)&&(Y=f),[[$,T],[$,Y-(f-T)],[$,Y-(f-T)],[$,T]]}},updateCircle:function(){var e=this;e.config.point_show&&(e.mainCircle=e.main.selectAll(".".concat(C.circles)).selectAll(".".concat(C.circle)).data(function(t){return!e.isBarType(t)&&(!e.isLineType(t)||e.shouldDrawPointsForLine(t))&&e.labelishData(t)}),e.mainCircle.exit().remove(),e.mainCircle=e.mainCircle.enter().append(e.point("create",this,e.classCircle.bind(e),e.pointR.bind(e),e.color)).merge(e.mainCircle).style("stroke",e.color).style("opacity",e.initialOpacityForCircle.bind(e)))},redrawCircle:function(e,t,n,a){var c=this,u=c.main.selectAll(".".concat(C.selectedCircle));if(!c.config.point_show)return[];var g=[];c.mainCircle.each(function(O){var L=c.point("update",c,e,t,c.opacityForCircle.bind(c),c.color,n,a,u).bind(this),I=L(O);g.push(I)});var w=c.isCirclePoint()?"c":"";return[g,u.attr("".concat(w,"x"),e).attr("".concat(w,"y"),t)]},circleX:function(e){var t=this,n=pt(e.x);return t.config.zoom_enabled&&t.zoomScale?n?t.zoomScale(e.x):null:n?t.x(e.x):null},updateCircleY:function(){var e=this;e.circleY=function(t,n){var a=t.id;return e.isGrouped(a)?e.generateGetLinePoints(e.getShapeIndices(e.isLineType))(t,n)[0][1]:e.getYScale(a)(e.getBaseValue(t))}},getCircles:function(e,t){var n=this,a=pt(e)?"-".concat(e):"";return(t?n.main.selectAll(".".concat(C.circles).concat(n.getTargetSelectorSuffix(t))):n.main).selectAll(".".concat(C.circle).concat(a))},expandCircles:function(e,t,n){var a=this,c=a.pointExpandedR.bind(a);n&&a.unexpandCircles();var u=a.getCircles(e,t).classed(C.EXPANDED,!0),g=c(u)/a.config.point_r,w=1-g;a.isCirclePoint()?u.attr("r",c):u.each(function(){var O=Object(q.select)(this);if(this.tagName==="circle")O.attr("r",c);else{var L=this.getBBox(),I=L.width,f=L.height,T=w*(+O.attr("x")+I/2),$=w*(+O.attr("y")+f/2);O.attr("transform","translate(".concat(T," ").concat($,") scale(").concat(g,")"))}})},unexpandCircles:function(e){var t=this,n=t.pointR.bind(t),a=t.getCircles(e).filter(function(){return Object(q.select)(this).classed(C.EXPANDED)}).classed(C.EXPANDED,!1);a.attr("r",n),t.isCirclePoint()||a.attr("transform","scale(".concat(n(a)/t.config.point_r,")"))},pointR:function(d){var e=this,t=e.config,n=t.point_r,a=n;return e.isStepType(d)?a=0:e.isBubbleType(d)?a=e.getBubbleR(d):Ot(n)&&(a=n(d)),a},pointExpandedR:function(e){var t=this,n=t.config,a=t.isBubbleType(e)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||t.pointR(e)*a:t.pointR(e)},pointSelectR:function(e){var t=this,n=t.config.point_select_r;return Ot(n)?n(e):n||t.pointR(e)*4},isWithinCircle:function(e,t){var n=Object(q.mouse)(e),a=Object(q.select)(e),c=this.isCirclePoint()?"c":"",u=+a.attr("".concat(c,"x")),g=+a.attr("".concat(c,"y"));if(!(u||g)&&e.nodeType===1){var w=e.getBBox?e.getBBox():e.getBoundingClientRect(),O=w.x,L=w.y;u=O,g=L}var I=Math.sqrt(Math.pow(u-n[0],2)+Math.pow(g-n[1],2))<(t||this.config.point_sensitivity);return I},isWithinStep:function(e,t){return Math.abs(t-Object(q.mouse)(e)[1])<30},shouldDrawPointsForLine:function(e){var t=this.config.line_point;return t===!0||rt(t)&&t.indexOf(e.id)!==-1}}),Pt(tt.prototype,{hasValidPointType:function(e){return/^(circle|rect(angle)?|polygon|ellipse|use)$/i.test(e||this.config.point_type)},hasValidPointDrawMethods:function(e){var t=e||this.config.point_type;return Ae(t)&&Ot(t.create)&&Ot(t.update)},insertPointInfoDefs:function(e,t){var n=this,a=function(O,L){for(var I,f=O.attributes,T=0;I=f[T];T++)I=I.name,L.setAttribute(I,O.getAttribute(I))},c=new DOMParser().parseFromString(e,"image/svg+xml"),u=c.documentElement,g=document.createElementNS(q.namespaces.svg,u.nodeName.toLowerCase());if(g.id=t,g.style.fill="inherit",g.style.stroke="inherit",a(u,g),u.childNodes&&u.childNodes.length){var w=Object(q.select)(g);
8"innerHTML"in g?w.html(u.innerHTML):we(u.childNodes).forEach(function(O){a(O,w.append(O.tagName).node())})}n.defs.node().appendChild(g)},pointFromDefs:function(e){return this.defs.select("#".concat(e))},generatePoint:function(){var e=this,t=e.config,n=[],a=K(t.point_pattern)?t.point_pattern:[t.point_type];return function(c,u){for(var g=arguments.length,w=Array(g>2?g-2:0),O=2;O<g;O++)w[O-2]=arguments[O];return function(L){var I,f=L.id||L.data&&L.data.id||L,T=Object(q.select)(this);if(n.indexOf(f)<0&&n.push(f),I=a[n.indexOf(f)%a.length],e.hasValidPointType(I))I=e[I];else if(!e.hasValidPointDrawMethods(I)){var $="".concat(e.datetimeId,"-point-").concat(f),Y=e.pointFromDefs($);if(Y.size()<1&&e.insertPointInfoDefs(I,$),c==="create")return e.custom.create.bind(u).apply(void 0,[T,$].concat(w));if(c==="update")return e.custom.update.bind(u).apply(void 0,[T].concat(w))}return I[c].bind(u).apply(void 0,[T].concat(w))}}},getTransitionName:function(){return de()},custom:{create:function(e,t,n,a,c){return e.append("use").attr("xlink:href","#".concat(t)).attr("class",n).style("fill",c).node()},update:function(e,t,n,a,c,u,g,w){var O=this,L=e.node().getBBox(),I=L.width,f=L.height,T=function(nt){return t(nt)-I/2},$=function(nt){return n(nt)-f/2},Y=e;if(u){var J=O.getTransitionName();g&&(Y=e.attr("x",T)),Y=e.transition(J).attr("x",T).attr("y",$).transition(J),w.transition(O.getTransitionName())}else Y=e.attr("x",T).attr("y",$);return Y.style("opacity",a).style("fill",c)}},circle:{create:function(e,t,n,a){return e.append("circle").attr("class",t).attr("r",n).style("fill",a).node()},update:function(e,t,n,a,c,u,g,w){var O=this,L=e;if(O.hasType("bubble")&&(L=L.attr("r",O.pointR.bind(O))),u){var I=O.getTransitionName();g&&(L=L.attr("cx",t)),L=e.attr("cx")?L.transition(I).attr("cx",t).attr("cy",n).transition(I):L.attr("cx",t).attr("cy",n),w.transition(O.getTransitionName())}else L=L.attr("cx",t).attr("cy",n);return L.style("opacity",a).style("fill",c)}},rectangle:{create:function(e,t,n,a){var c=function(u){return n(u)*2};return e.append("rect").attr("class",t).attr("width",c).attr("height",c).style("fill",a).node()},update:function(e,t,n,a,c,u,g,w){var O=this,L=O.config.point_r,I=function(Y){return t(Y)-L},f=function(Y){return n(Y)-L},T=e;if(u){var $=O.getTransitionName();g&&(T=T.attr("x",I)),T=T.transition($).attr("x",I).attr("y",f).transition($),w.transition(O.getTransitionName())}else T=T.attr("x",I).attr("y",f);return T.style("opacity",a).style("fill",c)}}});function W(d,e,t,n,a,c){var u=d&&n>0?t-n:n,g=2*Math.PI,w=e==="x"?Math.sin:Math.cos;return a*(1-c*w(u*g/t))}var H="$radarPoints";Pt(tt.prototype,{initRadar:function(){var e=this,t=e.config;e.hasType("radar")&&(e.radars=e.main.select(".".concat(C.chart)).append("g").attr("class",C.chartRadars),e.radars.levels=e.radars.append("g").attr("class",C.levels),e.radars.axes=e.radars.append("g").attr("class",C.axis),e.radars.shapes=e.radars.append("g").attr("class",C.shapes),e.maxValue=t.radar_axis_max||e.getMinMaxData().max[0].value)},getRadarSize:function(){var e=this,t=e.config,n=t.axis_x_categories.length<4?-20:10,a=(Math.min(e.arcWidth,e.arcHeight)-n)/2;return[a,a]},updateTargetsForRadar:function(e){var t=this,n=t.config;Me(n.axis_x_categories)&&(n.axis_x_categories=yt(0,et("max",e.map(function(a){return a.values.length})))),t.generateRadarPoints()},getRadarPosition:function(e,t,n,a){var c=this,u=c.config,g=c.getRadarSize(),w=X()(g,2),O=w[0],L=w[1],I=u.axis_x_categories.length,f=u.radar_direction_clockwise,T=we(e).map(function($){return W(f,$,I,t,Ft(n)?n:e==="x"?O:L,Bt(a)?a:u.radar_size_ratio)});return T.length===1?T[0]:T},generateRadarPoints:function(){var e=this,t=e.data.targets,n=e.getRadarSize(),a=X()(n,2),c=a[0],u=a[1],g=e.getCache(H)||{},w=g._size;w&&(w.width===c||w.height===u)||(t.forEach(function(O){g[O.id]=O.values.map(function(L,I){return e.getRadarPosition(["x","y"],I,void 0,e.getRatio("radar",L))})}),g._size={width:c,height:u},e.addCache(H,g))},redrawRadar:function(e,t){var n=this,a=n.getTranslate("radar");a&&(n.radars.attr("transform",a),n.main.selectAll(".".concat(C.circles)).attr("transform",a),n.main.select(".".concat(C.chartTexts)).attr("transform",a),n.generateRadarPoints(),n.updateRadarLevel(),n.updateRadarAxes(),n.updateRadarShape(e,t))},generateGetRadarPoints:function(){var e=this,t=e.getCache(H);return function(n,a){var c=t[n.id][a];return[c,c,c,c]}},updateRadarLevel:function(){var e=this,t=e.config,n=e.getRadarSize(),a=X()(n,2),c=a[0],u=a[1],g=t.radar_level_depth,w=t.axis_x_categories.length,O=t.radar_level_text_show,L=e.radars.levels,I=yt(0,g),f=t.radar_size_ratio*Math.min(c,u),T=I.map(function(ft){return f*((ft+1)/g)}),$=t.radar_level_text_format,Y=I.map(function(ft){var st=T[ft],_t=yt(0,w).map(function(Et){return e.getRadarPosition(["x","y"],Et,st,1).join(",")});return _t.join(" ")}),J=L.selectAll(".".concat(C.level)).data(I);J.exit().remove();var nt=J.enter().append("g").attr("class",function(ft,st){return"".concat(C.level," ").concat(C.level,"-").concat(st)});
8nt.append("polygon").style("visibility",t.radar_level_show?null:"hidden"),O&&(L.select("text").empty()&&L.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return $(0)}),nt.append("text").attr("dx","-.5em").style("text-anchor","end").text(function(ft){return $(e.maxValue/I.length*(ft+1))})),nt.merge(J).attr("transform",function(ft){return"translate(".concat(c-T[ft],", ").concat(u-T[ft],")")}).selectAll("polygon").attr("points",function(ft){return Y[ft]}),O&&L.selectAll("text").attr("x",function(ft){return kt(ft)?c:Y[ft].split(",")[0]}).attr("y",function(ft){return kt(ft)?u:0})},updateRadarAxes:function(){var e=this,t=e.config,n=e.getRadarSize(),a=X()(n,2),c=a[0],u=a[1],g=t.axis_x_categories,w=e.radars.axes.selectAll("g").data(g);w.exit().remove();var O=w.enter().append("g").attr("class",function(L,I){return"".concat(C.axis,"-").concat(I)});t.radar_axis_line_show&&O.append("line"),t.radar_axis_text_show&&O.append("text"),w=O.merge(w),t.radar_axis_line_show&&w.select("line").attr("x1",c).attr("y1",u).attr("x2",function(L,I){return e.getRadarPosition("x",I)}).attr("y2",function(L,I){return e.getRadarPosition("y",I)}),t.radar_axis_text_show&&w.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(L){L.each(function(I){wt(Object(q.select)(this),I,[-1.2,1.2])})}).datum(function(L,I){return{index:I}}).attr("transform",function(L,I){return"translate(".concat(e.getRadarPosition("x",I,void 0,1)," ").concat(e.getRadarPosition("y",I,void 0,1),")")}),e.bindEvent()},bindEvent:function(){var e=this,t=this,n=t.config;if(n.interaction_enabled){var a=t.inputType==="mouse",c=function(){var g=q.event.target;/tspan/i.test(g.tagName)&&(g=g.parentNode);var w=Object(q.select)(g).datum();return w&&Object.keys(w).length===1?w.index:void 0},u=function(){var g=c(),w=kt(g);(a||w)&&(e.hideTooltip(),e.unexpandCircles(),a?t.setOverOut(!1,g):w&&t.callOverOutForTouch())};t.radars.select(".".concat(C.axis)).on(a?"mouseover ":"touchstart",function(){if(!t.transiting){var g=c();t.selectRectForSingle(t.svg.node(),null,g),a?t.setOverOut(!0,g):t.callOverOutForTouch(g)}}).on("mouseout",a?u:null),a||t.svg.on("touchstart",u)}},updateRadarShape:function(e,t){var n=this,a=n.data.targets,c=n.getCache(H),u=n.radars.shapes.selectAll("polygon").data(a),g=u.enter().append("g").attr("class",n.classChartRadar.bind(n));u.exit().transition().duration(t).remove(),g.append("polygon").merge(u).transition().duration(e).style("fill",function(w){return n.color(w)}).style("stroke",function(w){return n.color(w)}).attr("points",function(w){return c[w.id].join(" ")})},radarCircleX:function(e){return this.getCache(H)[e.id][e.index][0]},radarCircleY:function(e){return this.getCache(H)[e.id][e.index][1]}}),Pt(tt.prototype,{initText:function(){var e=this;e.main.select(".".concat(C.chart)).append("g").attr("class",C.chartTexts),e.mainText=Object(q.selectAll)([])},updateTargetsForText:function(e){var t=this,n=t.classChartText.bind(t),a=t.classTexts.bind(t),c=t.classFocus.bind(t),u=t.main.select(".".concat(C.chartTexts)).selectAll(".".concat(C.chartText)).data(e).attr("class",function(w){return n(w)+c(w)}),g=u.enter().append("g").attr("class",n).style("opacity","0").style("pointer-events","none");g.append("g").attr("class",a)},updateText:function(e){var t=this,n=this,a=n.config,c=n.labelishData.bind(n),u=n.classText.bind(n);n.mainText=n.main.selectAll(".".concat(C.texts)).selectAll(".".concat(C.text)).data(function(g){return t.isRadarType(g)?g.values:c(g)}),n.mainText.exit().transition().duration(e).style("fill-opacity","0").remove(),n.mainText=n.mainText.enter().append("text").merge(n.mainText).attr("class",u).attr("text-anchor",function(g){return a.axis_rotated?g.value<0?"end":"start":"middle"}).style("fill",n.updateTextColor.bind(n)).style("fill-opacity","0").text(function(g,w,O){return n.dataLabelFormat(g.id)(g.value,g.id,w,O)})},updateTextColor:function(e){var t,n=this,a=n.config.data_labels_colors;return At(a)?t=a:j(a)&&(t=a[e.id]),t||n.color(e)},redrawText:function(e,t,n,a){var c=this,u=de(),g=n?0:c.opacityForText.bind(c);return[this.mainText.each(function(){var w=Object(q.select)(this);(a&&w.attr("x")?w.transition(u):w).attr("x",e).attr("y",t).style("fill",c.updateTextColor.bind(c)).style("fill-opacity",g)})]},getTextRect:function(e,t){var n=this,a=e.node?e.node():e;/text/i.test(a.tagName)||(a=a.querySelector("text"));var c=a.textContent,u="$".concat(c.replace(/\W/g,"_")),g=n.getCache(u);return g||(n.svg.append("text").style("visibility","hidden").style("font",Object(q.select)(a).style("font")).classed(t,!0).text(c).call(function(w){g=w.node().getBoundingClientRect()}).remove(),n.addCache(u,g)),g},generateXYForText:function(e,t){var n=this,a=Object.keys(e),c={},u=t?n.getXForText:n.getYForText;return n.hasType("radar")&&a.push("radar"),a.forEach(function(g){c[g]=n["generateGet".concat($e(g),"Points")](e[g],!1)}),function(g,w){var O=n.isAreaType(g)&&"area"||n.isBarType(g)&&"bar"||n.isRadarType(g)&&"radar"||"line";return u.call(n,c[O](g,w),g,this)}},getCenteredTextPos:function(e,t,n){var a=this,c=a.config,u=c.axis_rotated;if(c.data_labels.centered&&a.isBarType(e)){var g=n.getBoundingClientRect(),w=e.value>=0;if(u){var O=(w?t[1][1]-t[0][1]:t[0][1]-t[1][1])/2+g.width/2;return w?-O-3:O+2}var L=(w?t[0][1]-t[1][1]:t[1][1]-t[0][1])/2+g.height/2;return w?L:-L-2}return 0},getXForText:function(e,t,n){var a,c,u=this,g=u.config,w=g.axis_rotated;return w?(c=u.isBarType(t)?4:6,a=e[2][1]+c*(t.value<0?-1:1)):a=u.hasType("bar")?(e[2][0]+e[0][0])/2:e[0][0],t.value===null&&(a>u.width?a=u.width-n.getBoundingClientRect().width:a<0&&(a=4)),w&&(a+=u.getCenteredTextPos(t,e,n)),a+(g.data_labels_position.x||0)},getYForText:function(e,t,n){var a,c=this,u=c.config,g=u.axis_rotated,w=u.point_r,O=n.getBoundingClientRect(),L=3;if(g)a=(e[0][0]+e[2][0]+O.height*.6)/2;else if(a=e[2][1],Bt(w)&&w>5&&(c.isLineType(t)||c.isScatterType(t))&&(L+=u.point_r/2.3),t.value<0||t.value===0&&!c.hasPositiveValue)a+=O.height,c.isBarType(t)?a-=L:!c.isBarType(t)&&(a+=L);else{var I=-L*2;c.isBarType(t)?I=-L:c.isBubbleType(t)&&(I=L),a+=I}if(t.value===null&&!g){var f=O.height;a<f?a=f:a>this.height&&(a=this.height-4)}return g||(a+=c.getCenteredTextPos(t,e,n)),a+(u.data_labels_position.y||0)}});var at={Area:["area","area-spline","area-spline-range","area-line-range","area-step"],AreaRange:["area-spline-range","area-line-range"],Arc:["pie","donut","gauge","radar"],Line:["line","spline","area","area-spline","area-spline-range","area-line-range","step","area-step"],Step:["step","area-step"],Spline:["spline","area-spline","area-spline-range"]};Pt(tt.prototype,{setTargetType:function(e,t){var n=this,a=n.config;n.mapToTargetIds(e).forEach(function(c){n.withoutFadeIn[c]=t===a.data_types[c],a.data_types[c]=t}
8),e||(a.data_type=t)},hasType:function(e,t){var n=this,a=n.config.data_types,c=t||n.data.targets,u=!1;return c&&c.length?c.forEach(function(g){var w=a[g.id];(w&&w.indexOf(e)>=0||!w&&e==="line")&&(u=!0)}):Object.keys(a).length?Object.keys(a).forEach(function(g){a[g]===e&&(u=!0)}):u=n.config.data_type===e,u},hasTypeOf:function(e,t){var n=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return!at[e].filter(function(c){return a.indexOf(c)===-1}).every(function(c){return!n.hasType(c,t)})},isTypeOf:function(e,t){var n=At(e)?e:e.id,a=this.config.data_types[n];return rt(t)?t.indexOf(a)>=0:a===t},hasArcType:function(e,t){return this.hasTypeOf("Arc",e,t)},isLineType:function(e){var t=At(e)?e:e.id;return!this.config.data_types[t]||this.isTypeOf(t,at.Line)},isStepType:function(e){return this.isTypeOf(e,at.Step)},isSplineType:function(e){return this.isTypeOf(e,at.Spline)},isAreaType:function(e){return this.isTypeOf(e,at.Area)},isAreaRangeType:function(e){return this.isTypeOf(e,at.AreaRange)},isBarType:function(e){return this.isTypeOf(e,"bar")},isBubbleType:function(e){return this.isTypeOf(e,"bubble")},isScatterType:function(e){return this.isTypeOf(e,"scatter")},isPieType:function(e){return this.isTypeOf(e,"pie")},isGaugeType:function(e){return this.isTypeOf(e,"gauge")},isDonutType:function(e){return this.isTypeOf(e,"donut")},isRadarType:function(e){return this.isTypeOf(e,"radar")},isArcType:function(e){return this.isPieType(e)||this.isDonutType(e)||this.isGaugeType(e)||this.isRadarType(e)},isCirclePoint:function(){var e=this.config,t=e.point_pattern;return e.point_type==="circle"&&(!t||rt(t)&&t.length===0)},lineData:function(e){return this.isLineType(e)?[e]:[]},arcData:function(e){return this.isArcType(e.data)?[e]:[]},barData:function(e){return this.isBarType(e)?e.values:[]},labelishData:function(e){return this.isBarType(e)||this.isLineType(e)||this.isScatterType(e)||this.isBubbleType(e)||this.isRadarType(e)?e.values:[]},barLineBubbleData:function(e){return this.isBarType(e)||this.isLineType(e)||this.isBubbleType(e)?e.values:[]},isInterpolationType:function(e){return["basis","basis-closed","basis-open","bundle","cardinal","cardinal-closed","cardinal-open","catmull-rom","catmull-rom-closed","catmull-rom-open","linear","linear-closed","monotone-x","monotone-y","natural"].indexOf(e)>=0}});var ht=function(d){return pt(d.position)||"end"},dt=function(d){return d.position==="start"?4:d.position==="middle"?0:-4},mt=function(d,e,t){return function(n){var a=d?0:e;return n.position==="start"?a=d?-t:0:n.position==="middle"&&(a=(d?-t:e)/2),a}};Pt(tt.prototype,{initGrid:function(){var e=this;e.xgrid=Object(q.selectAll)([]),e.initGridLines(),e.initXYFocusGrid()},initGridLines:function(){var e=this,t=e.config;(t.grid_x_lines.length||t.grid_y_lines.length)&&(e.gridLines=e.main.insert("g",".".concat(C.chart).concat(t.grid_lines_front?" + *":"")).attr("clip-path",e.clipPathForGrid).attr("class","".concat(C.grid," ").concat(C.gridLines)),e.gridLines.append("g").attr("class",C.xgridLines),e.gridLines.append("g").attr("class",C.ygridLines),e.xgridLines=Object(q.selectAll)([]))},updateXGrid:function(e){var t=this,n=t.config,a=n.axis_rotated,c=t.generateGridData(n.grid_x_type,t.x),u=t.isCategorized()?t.xAxis.tickOffset():0,g=function(w){return((t.zoomScale||t.x)(w)+u)*(a?-1:1)};t.xgridAttr=a?{x1:0,x2:t.width,y1:g,y2:g}:{x1:g,x2:g,y1:0,y2:t.height},t.xgrid=t.main.select(".".concat(C.xgrids)).selectAll(".".concat(C.xgrid)).data(c),t.xgrid.exit().remove(),t.xgrid=t.xgrid.enter().append("line").attr("class",C.xgrid).merge(t.xgrid),e||t.xgrid.each(function(){var w=Object(q.select)(this);Object.keys(t.xgridAttr).forEach(function(O){w.attr(O,t.xgridAttr[O]).style("opacity",function(){return w.attr(a?"y1":"x1")===(a?t.height:0)?"0":"1"})})})},updateYGrid:function(){var e=this,t=e.config,n=t.axis_rotated,a=e.yAxis.tickValues()||e.y.ticks(t.grid_y_ticks),c=function(u){return Math.ceil(e.y(u))};e.ygrid=e.main.select(".".concat(C.ygrids)).selectAll(".".concat(C.ygrid)).data(a),e.ygrid.exit().remove(),e.ygrid=e.ygrid.enter().append("line").attr("class",C.ygrid).merge(e.ygrid),e.ygrid.attr("x1",n?c:0).attr("x2",n?c:e.width).attr("y1",n?0:c).attr("y2",n?e.height:c),e.smoothLines(e.ygrid,"grid")},updateGrid:function(e){var t=this;t.gridLines||t.initGridLines(),t.grid.style("visibility",t.hasArcType()?"hidden":"visible"),t.main.select("line.".concat(C.xgridFocus)).style("visibility","hidden"),t.updateXGridLines(e),t.updateYGridLines(e)},updateXGridLines:function(e){var t=this,n=t.main,a=t.config,c=a.axis_rotated;a.grid_x_show&&t.updateXGrid(),t.xgridLines=n.select(".".concat(C.xgridLines)).selectAll(".".concat(C.xgridLine)).data(a.grid_x_lines),t.xgridLines.exit(
8).transition().duration(e).style("opacity","0").remove();var u=t.xgridLines.enter().append("g");u.append("line").style("opacity","0"),u.append("text").attr("transform",c?"":"rotate(-90)").attr("dy",-5).style("opacity","0"),t.xgridLines=u.merge(t.xgridLines),t.xgridLines.attr("class",function(g){return"".concat(C.xgridLine," ").concat(g.class||"").trim()}).select("text").attr("text-anchor",ht).attr("dx",dt).transition().duration(e).text(function(g){return g.text}).transition().style("opacity","1")},updateYGridLines:function(e){var t=this,n=t.main,a=t.config,c=a.axis_rotated;a.grid_y_show&&t.updateYGrid(),t.ygridLines=n.select(".".concat(C.ygridLines)).selectAll(".".concat(C.ygridLine)).data(a.grid_y_lines),t.ygridLines.exit().transition().duration(e).style("opacity","0").remove();var u=t.ygridLines.enter().append("g");u.append("line").style("opacity","0"),u.append("text").attr("transform",c?"rotate(-90)":"").style("opacity","0"),t.ygridLines=u.merge(t.ygridLines);var g=t.yv.bind(t);t.ygridLines.attr("class",function(w){return"".concat(C.ygridLine," ").concat(w.class||"").trim()}).select("line").transition().duration(e).attr("x1",c?g:0).attr("x2",c?g:t.width).attr("y1",c?0:g).attr("y2",c?t.height:g).transition().style("opacity","1"),t.ygridLines.select("text").attr("text-anchor",ht).attr("dx",dt).transition().duration(e).attr("dy",-5).attr("x",mt(c,t.width,t.height)).attr("y",g).text(function(w){return w.text}).transition().style("opacity","1")}
8,redrawGrid:function(e){var t=this,n=t.config.axis_rotated,a=t.xv.bind(t),c=t.xgridLines.select("line"),u=t.xgridLines.select("text");return c=(e?c.transition():c).attr("x1",n?0:a).attr("x2",n?t.width:a).attr("y1",n?a:0).attr("y2",n?a:t.height),u=(e?u.transition():u).attr("x",mt(!n,t.width,t.height)).attr("y",a).text(function(g){return g.text}),[(e?c.transition():c).style("opacity","1"),(e?u.transition():u).style("opacity","1")]},initXYFocusGrid:function(){var e=this,t=e.config,n=t.grid_front,a=".".concat(C[n&&e.gridLines?"gridLines":"chart"]).concat(n?" + *":"");e.grid=e.main.insert("g",a).attr("clip-path",e.clipPathForGrid).attr("class",C.grid),t.grid_x_show&&e.grid.append("g").attr("class",C.xgrids),t.grid_y_show&&e.grid.append("g").attr("class",C.ygrids),t.grid_focus_show&&e.grid.append("g").attr("class",C.xgridFocus).append("line").attr("class",C.xgridFocus)},showXGridFocus:function(e){var t=this,n=t.config,a=n.axis_rotated,c=e.filter(function(w){return w&&pt(t.getBaseValue(w))}),u=t.main.selectAll("line.".concat(C.xgridFocus)),g=t.xx.bind(t);!n.tooltip_show||t.hasType("bubble")||t.hasType("scatter")||t.hasArcType()||(u.style("visibility","visible").data([c[0]]).attr(a?"y1":"x1",g).attr(a?"y2":"x2",g),t.smoothLines(u,"grid"))},hideXGridFocus:function(){this.main.select("line.".concat(C.xgridFocus)).style("visibility","hidden")},updateXgridFocus:function(){var e=this,t=e.config.axis_rotated;e.main.select("line.".concat(C.xgridFocus)).attr("x1",t?0:-10).attr("x2",t?e.width:-10).attr("y1",t?-10:0).attr("y2",t?-10:e.height)},generateGridData:function(e,t){var n=this,a=n.main.select(".".concat(C.axisX)).selectAll(".tick").size(),c=[];if(e==="year")for(var u=n.getXDomain(),g=u[0].getFullYear(),w=u[1].getFullYear(),O=g;O<=w;O++)c.push(new Date("".concat(O,"-01-01 00:00:00")));else c=t.ticks(10),c.length>a&&(c=c.filter(function(L){return(L+"").indexOf(".")<0}));return c},getGridFilterToRemove:function(e){return e?function(t){var n=!1;return(rt(e)?e.concat():[e]).forEach(function(a){("value"in a&&t.value===a.value||"class"in a&&t.class===a.class)&&(n=!0)}),n}:function(){return!0}},removeGridLines:function(e,t){var n=this,a=n.config,c=n.getGridFilterToRemove(e),u=t?C.xgridLines:C.ygridLines,g=t?C.xgridLine:C.ygridLine;n.main.select(".".concat(u)).selectAll(".".concat(g)).filter(c).transition().duration(a.transition_duration).style("opacity","0").remove();var w="grid_".concat(t?"x":"y","_lines");a[w]=a[w].filter(function(L){return!c(L)})}}),Pt(tt.prototype,{initTooltip:function(){var e=this,t=e.config,n=t.tooltip_contents.bindto;if(e.tooltip=Object(q.select)(n),e.tooltip.empty()&&(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",C.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.tooltip_init_show){if(e.isTimeSeries()&&At(t.tooltip_init_x)){var a,c,u=e.data.targets[0];for(t.tooltip_init_x=e.parseDate(t.tooltip_init_x),a=0;(c=u.values[a])&&c.x-t.tooltip_init_x!==0;a++);t.tooltip_init_x=a}e.tooltip.html(e.getTooltipHTML(e.data.targets.map(function(g){return e.addName(g.values[t.tooltip_init_x])}),e.axis.getXAxisTickFormat(),e.getYFormat(e.hasArcType(null,["radar"])),e.color)),n||e.tooltip.style("top",t.tooltip_init_position.top).style("left",t.tooltip_init_position.left).style("display","block")}},getTooltipHTML:function(){for(var e,t,n=this,a=n.config,c=arguments.length,u=Array(c),g=0;g<c;g++)u[g]=arguments[g];return Ot(a.tooltip_contents)?(e=a.tooltip_contents).call.apply(e,[n].concat(u)):(t=n).getTooltipContent.apply(t,u)},getTooltipContent:function(e,t,n,a){var c=this,u=c.config,g=u.tooltip_format_title||t,w=u.tooltip_format_name||function(Gt){return Gt},O=u.tooltip_format_value||(c.isStackNormalized()?function(Gt,De){return"".concat((De*100).toFixed(2),"%")}:n),L=u.tooltip_order,I=function(Gt){return c.getBaseValue(Gt)},f=c.levelColor?function(Gt){return c.levelColor(Gt.value)}:function(Gt){return a(Gt)},T=u.tooltip_contents,$=T.template;if(L===null&&u.data_groups.length){var Y=c.orderTargets(c.data.targets).map(function(Gt){return Gt.id}).reverse();e.sort(function(Gt,De){var Oe=Gt?Gt.value:null,Se=De?De.value:null;return Oe>0&&Se>0&&(Oe=Gt.id?Y.indexOf(Gt.id):null,Se=De.id?Y.indexOf(De.id):null),Oe-Se})}else/^(asc|desc)$/.test(L)?e.sort(function(Gt,De){var Oe=Gt?I(Gt):null,Se=De?I(De):null;return L==="asc"?Oe-Se:Se-Oe}):Ot(L)&&e.sort(L);var J,nt,ft,st,_t,Et=c.getTooltipContentTemplate($);for(_t=0;nt=e[_t];_t++)if(I(nt)||I(nt)===0){if(kt(J)){var Dt=vt(g?g(nt.x):nt.x);J=Mt(Et[0],{CLASS_TOOLTIP:C.tooltip,TITLE:pt(Dt)?$?Dt:'<tr><th colspan="2">'.concat(Dt,"</th></tr>"):""})}if(ft=[nt.ratio,nt.id,nt.index,e],st=vt(O.apply(void 0,[I(nt)].concat(Nt()(ft)))),c.isAreaRangeType(nt)){var Zt=["high","low"].map(function(Gt){return vt(O.apply(void 0,[c.getAreaRangeData(nt,Gt)].concat(Nt()(ft))))}),ue=X()(Zt,2),ke=ue[0],Te=ue[1];st="<b>Mid:</b> ".concat(st," <b>High:</b> ").concat(ke," <b>Low:</b> ").concat(Te)}if(st!==void 0){var be=function(){if(nt.name===null)return"continue";var Gt=vt(w.apply(void 0,[nt.name].concat(Nt()(ft)))),De=f(nt),Oe={CLASS_TOOLTIP_NAME:C.tooltipName+c.getTargetSelectorSuffix(nt.id),COLOR:$||!c.patterns?De:'<svg><rect style="fill:'.concat(De,'" width="10" height="10"></rect></svg>'),NAME:Gt,VALUE:st};$&&j(T.text)&&Object.keys(T.text).forEach(function(Se){Oe[Se]=T.text[Se][_t]}),J+=Mt(Et[1],Oe)}();if(be==="continue")continue}}return"".concat(J,"</table>")},getTooltipContentTemplate:function(e){return(e||`<table class="{=CLASS_TOOLTIP}"><tbody> 9 {=TITLE} 10 {{<tr class="{=CLASS_TOOLTIP_NAME}"> 11 <td class="name">`.concat(this.patterns?"{=COLOR}":'<span style="background-color:{=COLOR}"></span>',`{=NAME}</td> 12 <td class="value">{=VALUE}</td> 13 </tr>}} 14 </tbody></table>`)).replace(/(\r?\n|\t)/g,"").split(/{{(.*)}}/)},tooltipPosition:function(e,t,n,a){var c=this,u=c.config,g=Object(q.mouse)(a),w=X()(g,2),O=w[0],L=w[1],I=c.getSvgLeft(!0),f=I+c.currentWidth-c.getCurrentPaddingRight();if(L+=20,c.hasArcType()){var T=c.inputType==="touch"||c.hasType("radar");T||(L+=c.height/2,O+=(c.width-(c.isLegendRight?c.getLegendWidth():0))/2)}
14else{var $=c.x(e[0].x);u.axis_rotated?(L=$+20,O+=I+100,f-=I):(L-=5,O=I+c.getCurrentPaddingLeft(!0)+20+(c.zoomScale?O:$))}var Y=O+t;return Y>f&&(O-=Y-f+20),L+n>c.currentHeight&&(L-=n+30),L<0&&(L=0),{top:L,left:O}},showTooltip:function(e,t){var n=this,a=n.config,c=a.tooltip_contents.bindto,u=n.hasArcType(null,["radar"]),g=e.filter(function(Y){return Y&&pt(n.getBaseValue(Y))}),w=a.tooltip_position||n.tooltipPosition;if(g.length!==0&&a.tooltip_show){var O=n.tooltip.datum(),L=JSON.stringify(e),I=O&&O.width||0,f=O&&O.height||0;if(!O||O.current!==L){var T=e.concat().sort()[0].index;F(a.tooltip_onshow,n),n.tooltip.html(n.getTooltipHTML(e,n.axis.getXAxisTickFormat(),n.getYFormat(u),n.color)).style("display",null).style("visibility",null).datum({index:T,current:L,width:I=n.tooltip.property("offsetWidth"),height:f=n.tooltip.property("offsetHeight")}),F(a.tooltip_onshown,n),n._handleLinkedCharts(!0,T)}if(!c){var $=w.call(this,g,I,f,t);n.tooltip.style("top","".concat($.top,"px")).style("left","".concat($.left,"px"))}}},hideTooltip:function(e){var t=this,n=t.config;(!n.tooltip_doNotHide||e)&&(F(n.tooltip_onhide,t),this.tooltip.style("display","none").style("visibility","hidden").datum(null),F(n.tooltip_onhidden,t))},_handleLinkedCharts:function(e,t){var n=this;if(n.config.tooltip_linked){var a=n.config.tooltip_linked_name;(n.api.internal.charts||[]).forEach(function(c){if(c!==n.api){var u=c.internal.config,g=u.tooltip_linked,w=u.tooltip_linked_name,O=document.body.contains(c.element);if(g&&a===w&&O){var L=c.internal.tooltip.data()[0],I=t!==(L&&L.index);try{e&&I?c.tooltip.show({index:t}):!e&&c.tooltip.hide()}catch{}}}})}}}),Pt(tt.prototype,{initLegend:function(){var e=this,t=e.config;e.legendItemTextBox={},e.legendHasRendered=!1,e.legend=e.svg.append("g"),t.legend_show?(e.legend.attr("transform",e.getTranslate("legend")),e.updateLegend()):(e.legend.style("visibility","hidden"),e.hiddenLegendIds=e.mapToIds(e.data.targets))},updateLegend:function(e,t,n){var a=this,c=a.config,u=t||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};u.withTransition=Q(u,"withTransition",!0),u.withTransitionForTransform=Q(u,"withTransitionForTransform",!0),c.legend_contents_bindto&&c.legend_contents_template?a.updateLegendTemplate():a.updateLegendElement(e||a.mapToIds(a.data.targets),u,n),a.legend.selectAll(".".concat(C.legendItem)).classed(C.legendItemHidden,function(g){return!a.isTargetToShow(g)}),a.updateScales(!1,!a.zoomScale),a.updateSvgSize(),a.transformAll(u.withTransitionForTransform,n),a.legendHasRendered=!0},updateLegendTemplate:function(){var e=this,t=e.config,n=Object(q.select)(t.legend_contents_bindto),a=t.legend_contents_template;if(!n.empty()){var c=e.mapToIds(e.data.targets),u=[],g="";c.forEach(function(O){var L=Ot(a)?a.call(e,O,e.color(O),e.api.data(O)[0].values):Mt(a,{COLOR:e.color(O),TITLE:O});L&&(u.push(O),g+=L)});var w=n.html(g).selectAll(function(){return this.childNodes}).data(u);e.setLegendItem(w),e.legend=n}},updateSizeForLegend:function(e){var t=this,n=t.config,a=e.width,c=e.height,u={top:t.isLegendTop?t.getCurrentPaddingTop()+n.legend_inset_y+5.5:t.currentHeight-c-t.getCurrentPaddingBottom()-n.legend_inset_y,left:t.isLegendLeft?t.getCurrentPaddingLeft()+n.legend_inset_x+.5:t.currentWidth-a-t.getCurrentPaddingRight()-n.legend_inset_x+.5};t.margin3={top:t.isLegendRight?0:t.isLegendInset?u.top:t.currentHeight-c,right:NaN,bottom:0,left:t.isLegendRight?t.currentWidth-a:t.isLegendInset?u.left:0}},transformLegend:function(e){var t=this;(e?t.legend.transition():t.legend).attr("transform",t.getTranslate("legend"))},updateLegendStep:function(e){this.legendStep=e},updateLegendItemWidth:function(e){this.legendItemWidth=e},updateLegendItemHeight:function(e){this.legendItemHeight=e},getLegendWidth:function(){var e=this;return e.config.legend_show?e.isLegendRight||e.isLegendInset?e.legendItemWidth*(e.legendStep+1):e.currentWidth:0},getLegendHeight:function(){var e=this;return e.config.legend_show?e.isLegendRight?e.currentHeight:Math.max(20,e.legendItemHeight)*(e.legendStep+1):0},opacityForLegend:function(e){return e.classed(C.legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function(e){return e.classed(C.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(e,t){var n=this,a=n.mapToTargetIds(e);n.legend.selectAll(".".concat(C.legendItem)).filter(function(c){return a.indexOf(c)>=0}).classed(C.legendItemFocused,t).transition().duration(100).style("opacity",function(){return(t?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,Object(q.select)(this))})},revertLegend:function(){var e=this;e.legend.selectAll(".".concat(C.legendItem)).classed(C.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return e.opacityForLegend(Object(q.select)(this))})},showLegend:function(e){var t=this,n=t.config;n.legend_show||(n.legend_show=!0,t.legend.style("visibility","visible"),!t.legendHasRendered&&t.updateLegend()),t.removeHiddenLegendIds(e),t.legend.selectAll(t.selectorLegends(e)).style("visibility","visible").transition().style("opacity",function(){return t.opacityForLegend(Object(q.select)(this))})},hideLegend:function(e){var t=this,n=t.config;n.legend_show&&Me(e)&&(n.legend_show=!1,t.legend.style("visibility","hidden")),t.addHiddenLegendIds(e),t.legend.selectAll(t.selectorLegends(e)).style("opacity","0").style("visibility","hidden")},clearLegendItemTextBoxCache:function(){this.legendItemTextBox={}},setLegendItem:function(e){var t=this,n=t.config,a=t.inputType==="touch";e.attr("class",function(c){var u=Object(q.select)(this),g=!u.empty()&&u.attr("class")||"";return g+t.generateClass(C.legendItem,c)}).style("visibility",function(c){return t.isLegendToShow(c)?"visible":"hidden"}).style("cursor","pointer").on("click",function(c){F(n.legend_item_onclick,t,c)||(q.event.altKey?(t.api.hide(),t.api.show(c)):(t.api.toggle(c),!a&&t.isTargetToShow(c)?t.api.focus(c):t.api.revert())),a&&t.hideTooltip()}),a||e.on("mouseout",function(c){F(n.legend_item_onout,t,c)||(Object(q.select)(this).classed(C.legendItemFocused,!1),t.api.revert())}).on("mouseover",function(c){F(n.legend_item_onover,t,c)||(Object(q.select)(this).classed(C.legendItemFocused,!0),!t.transiting&&t.isTargetToShow(c)&&t.api.focus(c))})},updateLegendElement:function(e,t){var n,a,c,u=this,g=u.config,w=10,O=g.legend_item_tile_width+5,L=0,I=0,f=0,T={},$={},Y={},J=[0],nt={},ft=0,st=u.isLegendRight||u.isLegendInset,_t=e.filter(function(te){return!Ft(g.data_names[te])||g.data_names[te]!==null}),Et=t.withTransition,Dt=function(te,Kt){return u.legendItemTextBox[Kt]||(u.legendItemTextBox[Kt]=u.getTextRect
14(te,C.legendItem)),u.legendItemTextBox[Kt]},Zt=function(te,Kt,le){var Je,tn=le===_t.length-1,An=Dt(te,Kt),yn=An.width+O+(tn&&!st?0:10)+g.legend_padding,zn=An.height+4,Fn=st?zn:yn,Hn=st?u.getLegendHeight():u.getLegendWidth(),Vn=function(In,qn){qn||(Je=(Hn-f-Fn)/2,Je<w&&(Je=(Hn-Fn)/2,f=0,ft++)),nt[In]=ft,J[ft]=u.isLegendInset?10:Je,T[In]=f,f+=Fn};if(le===0&&(f=0,ft=0,L=0,I=0),g.legend_show&&!u.isLegendToShow(Kt))return $[Kt]=0,Y[Kt]=0,nt[Kt]=0,void(T[Kt]=0);$[Kt]=yn,Y[Kt]=zn,(!L||yn>=L)&&(L=yn),(!I||zn>=I)&&(I=zn);var rr=st?I:L;g.legend_equally?(Object.keys($).forEach(function(In){return $[In]=L}),Object.keys(Y).forEach(function(In){return Y[In]=I}),Je=(Hn-rr*_t.length)/2,Je<w?(f=0,ft=0,_t.forEach(function(In){return Vn(In)})):Vn(Kt,!0)):Vn(Kt)};u.isLegendInset&&(ft=g.legend_inset_step?g.legend_inset_step:_t.length,u.updateLegendStep(ft)),u.isLegendRight?(n=function(te){return L*nt[te]},a=function(te){return J[nt[te]]+T[te]}):u.isLegendInset?(n=function(te){return L*nt[te]+10},a=function(te){return J[nt[te]]+T[te]}):(n=function(te){return J[nt[te]]+T[te]},a=function(te){return I*nt[te]});var ue=function(te,Kt){return n(te,Kt)+4+g.legend_item_tile_width},ke=function(te,Kt){return n(te,Kt)},Te=function(te,Kt){return n(te,Kt)-2},be=function(te,Kt){return n(te,Kt)-2+g.legend_item_tile_width},Gt=function(te,Kt){return a(te,Kt)+9},De=function(te,Kt){return a(te,Kt)-5},Oe=function(te,Kt){return a(te,Kt)+4},Se=-200,He=u.legend.selectAll(".".concat(C.legendItem)).data(_t).enter().append("g");u.setLegendItem(He),He.append("text").text(function(te){return Ft(g.data_names[te])?g.data_names[te]:te}).each(function(te,Kt){Zt(this,te,Kt)}).style("pointer-events","none").attr("x",st?ue:Se).attr("y",st?Se:Gt),He.append("rect").attr("class",C.legendItemEvent).style("fill-opacity","0").attr("x",st?ke:Se).attr("y",st?Se:De);var un=u.config.legend_usePoint;if(un){var Ze=[];He.append(function(te){var Kt=K(g.point_pattern)?g.point_pattern:[g.point_type];Ze.indexOf(te)===-1&&Ze.push(te);var le=Kt[Ze.indexOf(te)%Kt.length];return le==="rectangle"&&(le="rect"),document.createElementNS(q.namespaces.svg,u.hasValidPointType(le)?le:"use")}).attr("class",C.legendItemPoint).style("fill",function(te){return u.color(te)}).style("pointer-events","none").attr("href",function(te,Kt,le){var Je=le[Kt],tn=Je.nodeName.toLowerCase();return tn==="use"?"#".concat(u.datetimeId,"-point-").concat(te):void 0})}else He.append("line").attr("class",C.legendItemTile).style("stroke",u.color).style("pointer-events","none").attr("x1",st?Te:Se).attr("y1",st?Se:Oe).attr("x2",st?be:Se).attr("y2",st?Se:Oe).attr("stroke-width",g.legend_item_tile_height);c=u.legend.select(".".concat(C.legendBackground," rect")),u.isLegendInset&&L>0&&c.size()===0&&(c=u.legend.insert("g",".".concat(C.legendItem)).attr("class",C.legendBackground).append("rect"));var Fe=u.legend.selectAll("text").data(_t).text(function(te){return Ft(g.data_names[te])?g.data_names[te]:te}).each(function(te,Kt){Zt(this,te,Kt)});(Et?Fe.transition():Fe).attr("x",ue).attr("y",Gt);var We=u.legend.selectAll("rect.".concat(C.legendItemEvent)).data(_t);if((Et?We.transition():We).attr("width",function(te){return $[te]}).attr("height",function(te){return Y[te]}).attr("x",ke).attr("y",De),un){var Re=u.legend.selectAll(".".concat(C.legendItemPoint)).data(_t);(Et?Re.transition():Re).each(function(){var te,Kt,le,Je=this.nodeName.toLowerCase(),tn=u.config.point_r,An="x",yn="y",zn=2,Fn=2.5;if(Je==="circle"){var Hn=tn*.2;An="cx",yn="cy",te=tn+Hn,zn=tn*2,Fn=-Hn}else if(Je==="rect"){var Vn=tn*2.5;Kt=Vn,le=Vn,Fn=3}Object(q.select)(this).attr(An,function(rr){return Te(rr)+zn}).attr(yn,function(rr){return Oe(rr)-Fn}).attr("r",te).attr("width",Kt).attr("height",le)})}else{var qe=u.legend.selectAll("line.".concat(C.legendItemTile)).data(_t);(Et?qe.transition():qe).style("stroke",u.color).attr("x1",Te).attr("y1",Oe).attr("x2",be).attr("y2",Oe)}c&&(Et?c.transition():c).attr("height",u.getLegendHeight()-12).attr("width",L*(ft+1)+10),u.updateLegendItemWidth(L),u.updateLegendItemHeight(I),u.updateLegendStep(ft)}});var bt=function(){var d,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"left",t=arguments.length>1?arguments[1]:void 0,n=Bt(t);return d=e.indexOf("center")>-1?n?t/2:"middle":e.indexOf("right")>-1?n?t:"end":n?0:"start",d};Pt(tt.prototype,{initTitle:function(){var e=this;if(e.config.title_text){e.title=e.svg.append("g");var t=e.title.append("text").style("text-anchor",bt(e.config.title_position)).attr("class",C.title);wt(t,e.config.title_text,[.3,1.5])}},redrawTitle:function(){var e=this;if(e.title){var t=e.yForTitle.call(e);/g/i.test(e.title.node().tagName)?e.title.attr("transform","translate(".concat(bt(e.config.title_position,e.currentWidth),", ").concat(t,")")):e.title.attr("x",e.xForTitle.call(e)).attr("y",t)}},xForTitle:function(){var e,t=this,n=t.config,a=n.title_position||"left";
14return/(right|center)/.test(a)?(e=t.currentWidth-t.getTextRect(t.title,C.title).width,a.indexOf("right")>=0?e-=n.title_padding.right||0:a.indexOf("center")>=0&&(e/=2)):e=n.title_padding.left||0,e},yForTitle:function(){var e=this;return(e.config.title_padding.top||0)+e.getTextRect(e.title,C.title).height},getTitlePadding:function(){var e=this;return e.yForTitle()+(e.config.title_padding.bottom||0)}}),Pt(tt.prototype,{initClip:function(){var e=this;e.clipId="".concat(e.datetimeId,"-clip"),e.clipIdForXAxis="".concat(e.clipId,"-xaxis"),e.clipIdForYAxis="".concat(e.clipId,"-yaxis"),e.clipIdForGrid="".concat(e.clipId,"-grid"),e.clipPath=e.getClipPath(e.clipId),e.clipPathForXAxis=e.getClipPath(e.clipIdForXAxis),e.clipPathForYAxis=e.getClipPath(e.clipIdForYAxis),e.clipPathForGrid=e.getClipPath(e.clipIdForGrid)},getClipPath:function(e){var t=this,n=t.config;if(!n.clipPath&&/-clip$/.test(e)||!n.axis_x_clipPath&&/-clip-xaxis$/.test(e)||!n.axis_y_clipPath&&/-clip-yaxis$/.test(e))return null;var a=window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url(".concat(a?"":document.URL.split("#")[0],"#").concat(e,")")},appendClip:function(e,t){return e.append("clipPath").attr("id",t).append("rect")},getAxisClipX:function(e){var t=Math.max(30,this.margin.left);return e?-(1+t):-(t-1)},getAxisClipY:function(e){return e?-20:-this.margin.top},getXAxisClipX:function(){var e=this;return e.getAxisClipX(!e.config.axis_rotated)},getXAxisClipY:function(){var e=this;return e.getAxisClipY(!e.config.axis_rotated)},getYAxisClipX:function(){var e=this;return e.config.axis_y_inner?-1:e.getAxisClipX(e.config.axis_rotated)}
14,getYAxisClipY:function(){var e=this;return e.getAxisClipY(e.config.axis_rotated)},getAxisClipWidth:function(e){var t=this,n=Math.max(30,t.margin.left),a=Math.max(30,t.margin.right);return e?t.width+2+n+a:t.margin.left+20},getAxisClipHeight:function(e){return(e?this.margin.bottom:this.margin.top+this.height)+20},getXAxisClipWidth:function(){var e=this;return e.getAxisClipWidth(!e.config.axis_rotated)},getXAxisClipHeight:function(){var e=this;return e.getAxisClipHeight(!e.config.axis_rotated)},getYAxisClipWidth:function(){var e=this;return e.getAxisClipWidth(e.config.axis_rotated)+(e.config.axis_y_inner?20:0)},getYAxisClipHeight:function(){var e=this;return e.getAxisClipHeight(e.config.axis_rotated)}}),Pt(tt.prototype,{initRegion:function(){var e=this;e.region=e.main.append("g").attr("clip-path",e.clipPath).attr("class",C.regions)},updateRegion:function(e){var t=this,n=t.config;t.region.style("visibility",t.hasArcType()?"hidden":"visible"),t.mainRegion=t.main.select(".".concat(C.regions)).selectAll(".".concat(C.region)).data(n.regions),t.mainRegion.exit().transition().duration(e).style("opacity","0").remove(),t.mainRegion=t.mainRegion.enter().append("g").merge(t.mainRegion).attr("class",t.classRegion.bind(t)),t.mainRegion.append("rect").style("fill-opacity","0")}
14,redrawRegion:function(e){var t=this,n=t.mainRegion.select("rect");return n=(e?n.transition():n).attr("x",t.regionX.bind(t)).attr("y",t.regionY.bind(t)).attr("width",t.regionWidth.bind(t)).attr("height",t.regionHeight.bind(t)),[(e?n.transition():n).style("fill-opacity",function(a){return pt(a.opacity)?a.opacity:"0.1"}).on("end",function(){Object(q.select)(this.parentNode).selectAll("rect:not([x])").remove()})]},getRegionXY:function(e,t){var n,a=this,c=a.config,u=c.axis_rotated,g=e==="x",w="start",O=0;return t.axis==="y"||t.axis==="y2"?(!g&&(w="end"),(g?u:!u)&&w in t&&(n=a[t.axis],O=n(t[w]))):(g?!u:u)&&w in t&&(n=a.zoomScale||a.x,O=n(a.isTimeSeries()?a.parseDate(t[w]):t[w])),O},regionX:function(e){return this.getRegionXY("x",e)},regionY:function(e){return this.getRegionXY("y",e)},getRegionSize:function(e,t){var n,a=this,c=a.config,u=c.axis_rotated,g=e==="width",w=a[g?"regionX":"regionY"](t),O="end",L=a[e];return t.axis==="y"||t.axis==="y2"?(!g&&(O="start"),(g?u:!u)&&O in t&&(n=a[t.axis],L=n(t[O]))):(g?!u:u)&&O in t&&(n=a.zoomScale||a.x,L=n(a.isTimeSeries()?a.parseDate(t[O]):t[O])),L<w?0:L-w},regionWidth:function(e){return this.getRegionSize("width",e)},regionHeight:function(e){return this.getRegionSize("height",e)},isRegionOnX:function(e){return!e.axis||e.axis==="x"}}),Pt(tt.prototype,{drag:function(e){var t=this,n=t.config,a=t.main;if(!t.hasArcType()&&n.data_selection_enabled&&(!n.zoom_enabled||t.zoom.altDomain)&&n.data_selection_multiple){var c=X()(t.dragStart,2),u=c[0],g=c[1],w=X()(e,2),O=w[0],L=w[1],I=Math.min(u,O),f=Math.max(u,O),T=n.data_selection_grouped?t.margin.top:Math.min(g,L),$=n.data_selection_grouped?t.height:Math.max(g,L);a.select(".".concat(C.dragarea)).attr("x",I).attr("y",T).attr("width",f-I).attr("height",$-T),a.selectAll(".".concat(C.shapes)).selectAll(".".concat(C.shape)).filter(function(Y){return n.data_selection_isselectable(Y)}).each(function(Y,J){var nt,ft=Object(q.select)(this),st=ft.classed(C.SELECTED),_t=ft.classed(C.INCLUDED),Et=!1;if(ft.classed(C.circle)){var Dt=ft.attr("cx")*1,Zt=ft.attr("cy")*1;nt=t.togglePoint,Et=I<Dt&&Dt<f&&T<Zt&&Zt<$}else if(ft.classed(C.bar)){var ue=Vt(this),ke=ue.x,Zt=ue.y,Te=ue.width,be=ue.height;nt=t.togglePath,Et=!(f<ke||ke+Te<I)&&!($<Zt||Zt+be<T)}else return;Et^_t&&(ft.classed(C.INCLUDED,!_t),ft.classed(C.SELECTED,!st),nt.call(t,!st,ft,Y,J))})}},dragstart:function(e){var t=this,n=t.config;t.hasArcType()||!n.data_selection_enabled||(t.dragStart=e,t.main.select(".".concat(C.chart)).append("rect").attr("class",C.dragarea).style("opacity","0.1"),t.setDragStatus(!0))},dragend:function(){var e=this,t=e.config;e.hasArcType()||!t.data_selection_enabled||(e.main.select(".".concat(C.dragarea)).transition().duration(100).style("opacity","0").remove(),e.main.selectAll(".".concat(C.shape)).classed(C.INCLUDED,!1),e.setDragStatus(!1))},setDragStatus:function(e){this.dragging=e}});var Rt=M(23);Pt(tt.prototype,{selectPoint:function(e,t,n){var a=this,c=a.config,u=c.axis_rotated,g=(u?a.circleY:a.circleX).bind(a),w=(u?a.circleX:a.circleY).bind(a),O=a.pointSelectR.bind(a);F(c.data_onselected,a.api,t,e.node()),a.main.select(".".concat(C.selectedCircles).concat(a.getTargetSelectorSuffix(t.id))).selectAll(".".concat(C.selectedCircle,"-").concat(n)).data([t]).enter().append("circle").attr("class",function(){return a.generateClass(C.selectedCircle,n)}).attr("cx",g).attr("cy",w).attr("stroke",a.color).attr("r",function(L){return a.pointSelectR(L)*1.4}).transition().duration(100).attr("r",O)},unselectPoint:function(e,t,n){var a=this;F(a.config.data_onunselected,a.api,t,e.node()),a.main.select(".".concat(C.selectedCircles).concat(a.getTargetSelectorSuffix(t.id))).selectAll(".".concat(C.selectedCircle,"-").concat(n)).transition().duration(100).attr("r",0).remove()},togglePoint:function(e,t,n,a){var c="".concat(e?"":"un","selectPoint");this[c](t,n,a)},selectPath:function(e,t){var n=this,a=n.config;F(a.data_onselected,n,t,e.node()),a.interaction_brighten&&e.transition().duration(100).style("fill",function(){return Object(Rt.rgb)(n.color(t)).brighter(.75)})},unselectPath:function(e,t){var n=this,a=n.config;F(a.data_onunselected,n,t,e.node()),a.interaction_brighten&&e.transition().duration(100).style("fill",function(){return n.color(t)})},togglePath:function(e,t,n,a){this["".concat(e?"":"un","selectPath")](t,n,a)},getToggle:function(e,t){var n=this;
14return e.nodeName==="path"?n.togglePath:n.isStepType(t)?function(){}:n.togglePoint},toggleShape:function(e,t,n){var a,c=this,u=c.config,g=Object(q.select)(e),w=g.classed(C.SELECTED),O=c.getToggle(e,t).bind(c);if(u.data_selection_enabled&&u.data_selection_isselectable(t)){if(!u.data_selection_multiple){var L=".".concat(C.shapes);u.data_selection_grouped&&(L+=c.getTargetSelectorSuffix(t.id)),c.main.selectAll(L).selectAll(".".concat(C.shape)).each(function(I,f){var T=Object(q.select)(this);T.classed(C.SELECTED)&&(a=T,O(!1,T.classed(C.SELECTED,!1),I,f))})}a&&a.node()===g.node()||(g.classed(C.SELECTED,!w),O(!w,g,t,n))}}}),Pt(tt.prototype,{initBrush:function(){var e=this,t=e.config,n=t.axis_rotated;e.brush=n?Object(Wt.brushY)():Object(Wt.brushX)();var a,c,u=function(){e.redrawForBrush()},g=function(){var w=e.svg.select(".".concat(C.brush," .overlay")),O={width:0,height:0};return w.size()&&(O.width=+w.attr("width"),O.height=+w.attr("height")),O[n?"width":"height"]};e.brush.on("start",function(){e.inputType==="touch"&&e.hideTooltip(),u()}).on("brush",u).on("end",function(){a=e.x.orgDomain()}),e.brush.updateResize=function(){var w=this;c&&clearTimeout(c),c=setTimeout(function(){var O=w.getSelection();a&&Object(Wt.brushSelection)(O.node())&&w.move(O,a.map(e.subX.orgScale()))},0)},e.brush.update=function(){var w=this.extent()();return w[1].filter(function(O){return isNaN(O)}).length===0&&e.context&&e.context.select(".".concat(C.brush)).call(this),this},e.brush.scale=function(w){var O=t.subchart_size_height||g(),L=e.getExtent();!L&&w.range?L=[[0,0],[w.range()[1],O]]:rt(L)&&(L=L.map(function(I,f){return[I,f>0?O:f]})),n&&L[1].reverse(),this.extent(L),this.update()},e.brush.getSelection=function(){return e.context?e.context.select(".".concat(C.brush)):Object(q.select)([])}},initSubchart:function(){var e=this,t=e.config,n=t.subchart_show?"visible":"hidden",a="".concat(e.clipId,"-subchart"),c=e.getClipPath(a);e.clipIdForSubchart=a,e.appendClip(e.defs,a),e.initBrush(),e.context=e.svg.append("g").attr("transform",e.getTranslate("context"));var u=e.context;u.style("visibility",n),u.append("g").attr("clip-path",c).attr("class",C.chart),e.hasType("bar")&&u.select(".".concat(C.chart)).append("g").attr("class",C.chartBars),u.select(".".concat(C.chart)).append("g").attr("class",C.chartLines),u.append("g").attr("clip-path",c).attr("class",C.brush).call(e.brush),e.axes.subx=u.append("g").attr("class",C.axisX).attr("transform",e.getTranslate("subx")).attr("clip-path",t.axis_rotated?"":e.clipPathForXAxis).style("visibility",t.subchart_axis_x_show?n:"hidden")},updateTargetsForSubchart:function(e){var t=this,n=t.context,a=t.config,c=t.classChartBar.bind(t),u=t.classBars.bind(t),g=t.classChartLine.bind(t),w=t.classLines.bind(t),O=t.classAreas.bind(t);if(a.subchart_show){var L=n.select(".".concat(C.chartBars)).selectAll(".".concat(C.chartBar)).data(e).attr("class",c),I=L.enter().append("g").style("opacity","0").attr("class",c).merge(L);I.append("g").attr("class",u);var f=n.select(".".concat(C.chartLines)).selectAll(".".concat(C.chartLine)).data(e).attr("class",g),T=f.enter().append("g").style("opacity","0").attr("class",g).merge(f);T.append("g").attr("class",w),t.hasType("area")&&T.append("g").attr("class",O),n.selectAll(".".concat(C.brush," rect")).attr(a.axis_rotated?"width":"height",a.axis_rotated?t.width2:t.height2)}},updateBarForSubchart:function(e){var t=this;t.contextBar=t.context.selectAll(".".concat(C.bars)).selectAll(".".concat(C.bar)).data(t.barData.bind(t)),t.contextBar.exit().transition().duration(e).style("opacity","0").remove(),t.contextBar=t.contextBar.enter().append("path").attr("class",t.classBar.bind(t)).style("stroke","none").style("fill",t.color).merge(t.contextBar).style("opacity",t.initialOpacity.bind(t))},redrawBarForSubchart:function(e,t,n){var a=t?this.contextBar.transition(de()).duration(n):this.contextBar;a.attr("d",e).style("opacity","1")},updateLineForSubchart:function(e){var t=this;t.contextLine=t.context.selectAll(".".concat(C.lines)).selectAll(".".concat(C.line)).data(t.lineData.bind(t)),t.contextLine.exit().transition().duration(e).style("opacity","0").remove(),t.contextLine=t.contextLine.enter().append("path").attr("class",t.classLine.bind(t)).style("stroke",t.color).merge(t.contextLine).style("opacity",t.initialOpacity.bind(t))},redrawLineForSubchart:function(e,t,n){var a=t?this.contextLine.transition(de()).duration(n):this.contextLine;a.attr("d",e).style("opacity","1")},updateAreaForSubchart:function(e){var t=this;t.contextArea=t.context.selectAll(".".concat(C.areas)).selectAll(".".concat(C.area)).data(t.lineData.bind(t)),t.contextArea.exit().transition().duration(e).style("opacity","0").remove(),t.contextArea=t.contextArea.enter().append("path").attr("class",t.classArea.bind(t)).style("fill",t.color).style("opacity",function(){return t.orgAreaOpacity=Object(q.select)(this).style("opacity"),"0"}).merge(t.contextArea).style("opacity","0")},redrawAreaForSubchart:function(e,t,n){var a=t?this.contextArea.transition(de()).duration(n):this.contextArea;a.attr("d",e).style("fill",this.color).style("opacity",this.orgAreaOpacity)},redrawSubchart:function(e,t,n){var a=this,c=a.config;a.context.style("visibility",c.subchart_show?"visible":"hidden"),c.subchart_show&&(q.event&&q.event.type==="zoom"&&a.brush.update(),e&&(!re(a)&&a.brush.update(),Object.keys(n.type).forEach(function(u){var g=$e(u),w=a["generateDraw".concat(g)](n.indices[u],!0);a["update".concat(g,"ForSubchart")](t),a["redraw".concat(g,"ForSubchart")](w,t,t)})))},redrawForBrush:function(){var e=this;e.redraw({withTransition:!1,withY:e.config.zoom_rescale,withSubchart:!1,withUpdateXDomain:!0,withDimension:!1}),e.config.subchart_onbrush.call(e.api,e.x.orgDomain())},transformContext:function(e,t){var n,a=this;t&&t.axisSubX?n=t.axisSubX:(n=a.context.select(".".concat(C.axisX)),e&&(n=n.transition())),a.context.attr("transform",a.getTranslate("context")),n.attr("transform",a.getTranslate("subx"))},getExtent:function(){var e=this,t=e.config.axis_x_extent;return t&&(Ot(t)?t=t(e.getXDomain(e.data.targets),e.subX):e.isTimeSeries()&&t.every(isNaN)&&(t=t.map(function(n){return e.subX(e.parseDate(n))}))),t}});var Yt=M(24);Pt(tt.prototype,{initZoom:function(){var e=this;e.zoomScale=null,e.generateZoom(),e.initZoomBehaviour()},bindZoomEvent:function(){var e=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0],t=this,n=t.config.zoom_enabled;t.redrawEventRect();var a=t.main.select(".".concat(C.eventRects));n&&e?t.bindZoomOnEventRect(a,n.type):e===!1&&(t.api.unzoom(),a.on(".zoom",null).on(".drag",null))},generateZoom:function(){var e=this,t=e.config,n=Object(Yt.zoom)().duration(0).on("start",e.onZoomStart.bind(e)).on("zoom",e.onZoom.bind(e)).on("end",e.onZoomEnd.bind(e));n.orgScaleExtent=function(){var a=t.zoom_extent||[1,10];return[a[0],Math.max(e.getMaxDataCount()/a[1],a[1])]},n.updateScaleExtent=function(){var a=pe(e.x.orgDomain())/pe(e.getZoomDomain()),c=this.orgScaleExtent();return this.scaleExtent([c[0]*a,c[1]*a]),this},n.updateTransformScale=function(a){e.orgXScale&&e.orgXScale.range(e.x.range());var c=a[t.axis_rotated?"rescaleY":"rescaleX"](e.orgXScale||e.x),u=e.trimXDomain(c.domain()),g=t.zoom_rescale;c.domain(u,e.orgXDomain),e.zoomScale=e.getCustomizedScale(c),e.xAxis.scale(e.zoomScale),g&&(!e.orgXScale&&(e.orgXScale=e.x.copy()),e.x.domain(u))},e.zoom=n},onZoomStart:function(){var e=this,t=q.event.sourceEvent;t&&(e.zoom.startEvent=t,F(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(){var e=this,t=e.config,n=q.event;if(t.zoom_enabled&&n.sourceEvent&&e.filterTargetsToShow(e.data.targets).length!==0){var a=n.sourceEvent.type==="mousemove",c=n.sourceEvent.wheelDelta<0,u=n.transform;!a&&c&&e.x.domain().every(function(g,w){return g!==e.orgXDomain[w]})&&e.x.domain(e.orgXDomain),e.zoom.updateTransformScale(u),e.isCategorized()&&e.x.orgDomain()[0]===e.orgXDomain[0]&&e.x.domain([e.orgXDomain[0]-1e-10,e.x.orgDomain()[1]]),e.redraw({withTransition:!1,withY:t.zoom_rescale,withSubchart:!1,withEventRect:!1,withDimension:!1}),e.cancelClick=a,F(t.zoom_onzoom,e.api,e.zoomScale.domain())}},onZoomEnd:function(){var e=this,t=e.zoom.startEvent;!t||event&&t.clientX===event.clientX&&t.clientY===event.clientY||(e.redrawEventRect(),e.updateZoom(),F(e.config.zoom_onzoomend,e.api,e[e.zoomScale?"zoomScale":"subX"].domain()))},getZoomDomain:function(){var e=this,t=e.config,n=X()(e.orgXDomain,2),a=n[0],c=n[1];return Ft(t.zoom_x_min)&&(a=et("min",[a,t.zoom_x_min])),Ft(t.zoom_x_max)&&(c=et("max",[c,t.zoom_x_max])),[a,c]},updateZoom:function(e){var t=this;if(t.zoomScale){var n=t.zoomScale.domain(),a=t.subX.domain(),c=.015,u=(n[0]<=a[0]||n[0]-c<=a[0])&&(a[1]<=n[1]||a[1]<=n[1]-c);(e||u)&&(t.xAxis.scale(t.subX),t.x.domain(t.subX.orgDomain()),t.zoomScale=null)}},bindZoomOnEventRect:function(e,t){var n=this,a=t==="drag"?n.zoomBehaviour:n.zoom;e.call(a).on("dblclick.zoom",null)},initZoomBehaviour:function(){var e=this,t=e.config,n=t.axis_rotated,a=0,c=0,u=null,g={axis:n?"y":"x",attr:n?"height":"width",index:n?1:0};e.zoomBehaviour=Object(Xe.drag)().clickDistance(4).on("start",function(){e.setDragStatus(!0),u||(u=e.main.append("rect").attr("clip-path",e.clipPath).attr("class",C.zoomBrush).attr("width",n?e.width:0).attr("height",n?0:e.he
14ight)),a=Object(q.mouse)(this)[g.index],c=a,u.attr(g.axis,a).attr(g.attr,0),e.onZoomStart()}).on("drag",function(){c=Object(q.mouse)(this)[g.index],u.attr(g.axis,Math.min(a,c)).attr(g.attr,Math.abs(c-a))}).on("end",function(){var w,O=e.zoomScale||e.x;if(e.setDragStatus(!1),u.attr(g.axis,0).attr(g.attr,0),a>c&&(w=[c,a],a=w[0],c=w[1]),a<0&&(c+=Math.abs(a),a=0),a!==c)e.api.zoom([a,c].map(function(J){return O.invert(J)})),e.onZoomEnd();else if(e.isMultipleX())e.clickHandlerForMultipleXS.bind(this)(e);else{var L=q.event.sourceEvent||q.event,I="clientX"in L?[L.clientX,L.clientY]:[L.x,L.y],f=X()(I,2),T=f[0],$=f[1],Y=document.elementFromPoint(T,$);e.clickHandlerForSingleX.bind(Y)(Object(q.select)(Y).datum(),e)}})},setZoomResetButton:function(){var e=this,t=e.config,n=t.zoom_resetButton;n&&t.zoom_enabled.type==="drag"&&(e.zoom.resetBtn?e.zoom.resetBtn.style("display",null):e.zoom.resetBtn=e.selectChart.append("div").classed(C.button,!0).append("span").on("click",e.api.unzoom.bind(e)).classed(C.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}});var Ut=function(d,e,t){var n=Object(q.select)(d.cloneNode(!0));return n.attr("id",t).insert("rect",":first-child").attr("width",n.attr("width")).attr("height",n.attr("height")).style("fill",e),{id:t,node:n.node()}},ie=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Pt(tt.prototype,{getColorFromCss:function(){var e=document.body,t=e.__colorPattern__;if(!t){var n=document.createElement("span");n.className=C.colorPattern,n.style.display="none",e.appendChild(n);var a=window.getComputedStyle(n).backgroundImage;n.parentNode.removeChild(n),a.indexOf(";")>-1&&(t=a.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(c){return c.trim().replace(/[\"'\s]/g,"")}).filter(Boolean),e.__colorPattern__=t)}return t},generateColor:function(){var e=this,t=e.config,n=t.data_colors,a=t.data_color,c=[],u=K(t.color_pattern)?t.color_pattern:Object($t.scaleOrdinal)(e.getColorFromCss()||ie).range(),g=u;if(Ot(t.color_tiles)){var w=t.color_tiles(),O=u.map(function(L,I){var f=L.replace(/[#\(\)\s,]/g,""),T="".concat(e.datetimeId,"-pattern-").concat(f,"-").concat(I);return Ut(w[I%w.length],L,T)});u=O.map(function(L){return"url(#".concat(L.id,")")}),e.patterns=O}return function(L){var I,f=L.id||L.data&&L.data.id||L,T=e.isTypeOf(f,["line","spline","step"])||!e.config.data_types[f];return Ot(n[f])?I=n[f](L):n[f]?I=n[f]:(c.indexOf(f)<0&&c.push(f),I=T?g[c.indexOf(f)%g.length]:u[c.indexOf(f)%u.length],n[f]=I),Ot(a)?a(I,L):I}},generateLevelColor:function(){var e=this,t=e.config,n=t.color_pattern,a=t.color_threshold,c=a.unit==="value",u=a.max||100,g=a.values&&a.values.length?a.values:[];return K(a)?function(w){for(var O=n[n.length-1],L,I,f=0;I=g[f];f++)if(L=c?w:w*100/u,L<I){O=n[f];break}return O}:null},setOverColor:function(e,t){var n=this,a=n.config,c=a.color_onover,u=e?c:n.color;j(u)?u=function(g){var w=g.id;return w in c?c[w]:n.color(w)}:At(u)&&(u=function(){return c}),j(t)?n.main.selectAll(".".concat(C.arc,"-").concat(t.id)).style("fill",u(t)):n.main.selectAll(".".concat(C.shape,"-").concat(t)).each(function(g){var w=u(g);this.style.stroke=w,this.style.fill=w})}});var se=function(d,e,t){var n=d.config,a="axis_".concat(e,"_tick_format"),c=n[a]?n[a]:d.defaultValueFormat;return c(t)};Pt(tt.prototype,{getYFormat:function(e){var t=this,n=t.yFormat,a=t.y2Format;return e&&!t.hasType("gauge")&&(n=t.defaultArcValueFormat,a=t.defaultArcValueFormat),function(c,u,g){var w=t.axis.getId(g)==="y2"?a:n;return w.call(t,c,u)}},yFormat:function(e){return se(this,"y",e)},y2Format:function(e){return se(this,"y2",e)},defaultValueFormat:function(e){return pt(e)?+e:""},defaultArcValueFormat:function(e,t){return"".concat((t*100).toFixed(1),"%")},dataLabelFormat:function(e){var t=this,n=t.config.data_labels,a=function(u){return pt(u)?+u:""},c=a;return Ot(n.format)?c=n.format:Ae(n.format)&&(n.format[e]?c=n.format[e]===!0?a:n.format[e]:c=function(){return""}),c}}),Pt(tt.prototype,{addCache:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];this.cache[e]=n?this.cloneTarget(t):t},removeCache:function(e){var t=this;we(e).forEach(function(n){return delete t.cache[n]})},getCache:function(e){var t=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(t){for(var n=[],a,c=0;a=e[c];c++)a in this.cache&&n.push(this.cloneTarget(this.cache[a]));return n}return this.cache[e]||null},resetCache:function(e){var t=this;for(var n in t.cache)(e||/^\$/.test(n))&&(t.cache[n]=null)}}),Pt(tt.prototype,{generateClass:function(e,t){return" ".concat(e," ").concat(e+this.getTargetSelectorSuffix(t))},classText:function(e){return this.generateClass(C.text,e.index)},classTexts:function(e){return this.generateClass(C.texts,e.id)},classShape:function(e){return this.generateClass(C.shape,e.index)},classShapes:function(e){return this.generateClass(C.shapes,e.id)},generateExtraLineClass:function(){var e=this,t=e.config.line_classes||[],n=[];return function(a){var c=a.id||a.data&&a.data.id||a;return n.indexOf(c)<0&&n.push(c),t[n.indexOf(c)%t.length]}},classLine:function(e){return this.classShape(e)+this.generateClass(C.line,e.id)},classLines:function(e){return this.classShapes(e)+this.generateClass(C.lines,e.id)},classCircle:function(e){return this.classShape(e)+this.generateClass(C.circle,e.index)},classCircles:function(e){return this.classShapes(e)+this.generateClass(C.circles,e.id)},classBar:function(e){return this.classShape(e)+this.generateClass(C.bar,e.index)},classBars:function(e){return this.classShapes(e)+this.generateClass(C.bars,e.id)},classArc:function(e){return this.classShape(e.data)+this.generateClass(C.arc,e.data.id)},classArcs:function(e){return this.classShapes(e.data)+this.generateClass(C.arcs,e.data.id)},classArea:function(e){return this.classShape(e)+this.generateClass(C.area,e.id)},classAreas:function(e){return this.classShapes(e)+this.generateClass(C.areas,e.id)},classRegion:function(e,t){return"".concat(this.generateClass(C.region,t)," ").concat("class"in e?e.class:"")},classEvent:function(e){return this.generateClass(C.eventRect,e.index)},classTarget:function(e){var t=this.config.data_classes[e],n="";return t&&(n=" ".concat(C.target,"-").concat(t)),this.generateClass(C.target,e)+n},classFocus:function(e){return this.classFocused(e)+this.classDefocused(e)},classFocused:function(e){return" ".concat(this.focusedTargetIds.indexOf(e.id)>=0?C.focused:"")},classDefocused:function(e){return" ".concat(this.defocusedTargetIds.indexOf(e.id)>=0?C.defocused:"")},classChartText:function(e){return C.chartText+this.classTarget(e.id)},classChartLine:function(e){return C.chartLine+this.classTarget(e.id)},classChartBar:function(e){return C.chartBar+this.classTarget(e.id)},classChartArc:function(e){return C.chartArc+this.classTarget(e.data.id)},classChartRadar:function(e){return C.chartRadar+this.classTarget(e.id)},getTargetSelectorSuffix:function(e){return e||e===0?"-".concat(e).replace(/[\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g,"-"):""},selectorTarget:function(e,t){return"".concat(t||"",".").concat(C.target+this.getTargetSelectorSuffix(e))},selectorTargets:function(e,t){var n=this,a=e||[];return a.length?a.map(function(c){return n.selectorTarget(c,t)}):null},selectorLegend:function(e){return".".concat(C.legendItem+this.getTargetSelectorSuffix(e))},selectorLegends:function(e){var t=this;return e&&e.length?e.map(function(n){return t.selectorLegend(n)}):null}}),Pt(xt.prototype,{focus:function(e){var t=this.internal,n=t.mapToTargetIds(e),a=t.svg.selectAll(t.selectorTargets(n.filter(t.isTargetToShow,t)));this.revert(),this.defocus(),a.classed(C.focused,!0).classed(C.defocused,!1),t.hasArcType()&&t.expandArc(n),t.toggleFocusLegend(n,!0),t.focusedTargetIds=n,t.defocusedTargetIds=t.defocusedTargetIds.filter(function(c){return n.indexOf(c)<0})},defocus:function(e){var t=this.internal,n=t.mapToTargetIds(e),a=t.svg.selectAll(t.selectorTargets(n.filter(t.isTargetToShow,t)));a.classed(C.focused,!1).classed(C.defocused,!0),t.hasArcType()&&t.unexpandArc(n),t.toggleFocusLegend(n,!1),t.focusedTargetIds=t.focusedTargetIds.filter(function(c){return n.indexOf(c)<0}),t.defocusedTargetIds=n},revert:function(e){var t=this.internal,n=t.mapToTargetIds(e),a=t.svg.selectAll(t.selectorTargets(n));a.classed(C.focused,!1).classed(C.defocused,!1),t.hasArcType()&&t.unexpandArc(n),t.config.legend_show&&(t.showLegend(n.filter(t.isLegendToShow.bind(t))),t.legend.selectAll(t.selectorLegends(n)).filter(function(){return Object(q.select)(this).classed(C.legendItemFocused)}).classed(C.legendItemFocused,!1)),t.focusedTargetIds=[],t.defocusedTargetIds=[]}}),Pt(xt.prototype,{_showHide:function(e,t,n){var a=this.internal,c=a.mapToTargetIds(t);a["".concat(e?"remove":"add","HiddenTargetIds")](c);var u=a.svg.selectAll(a.selectorTargets(c)),g=e?"1":"0";u.transition().style("opacity",g,"important").call(a.endall,function(){u.style("opacity",null).style("opacity",g)}),n.withLegend&&a["".concat(e?"show":"hide","Legend")](c),a.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0})},show:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._showHide(!0,e,t)},hide:function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this._showHide(!1,e,t)},toggle:function(e){var t=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.internal,c={show:[],hide:[]};a.mapToTargetIds(e).forEach(function(u){return c[a.isTargetToShow(u)?"hide":"show"].push(u)}),c.show.length&&this.show(c.show,n),c.hide.length&&setTimeout(function(){return t.hide(c.hide,n)},0)}});var ve=function(d,e){var t=X()(e,2),n=t[0],a=t[1];return d.every(function(c,u){return u===0?c>=n:c<=a})},je=function(d){var e,t=this.internal,n=d;if(t.config.zoom_enabled&&n&&ve(n,t.getZoomDomain())){var a=t.isTimeSeries();if(a&&(n=n.map(function(u){return t.parseDate(u)})),t.config.subchart_show){var c=t.zoomScale||t.x;t.brush.getSelection().call(t.brush.move,[c(n[0]),c(n[1])]),e=n}else t.x.domain(n),t.zoomScale=t.x,t.xAxis.scale(t.zoomScale),e=t.zoomScale.orgDomain();t.redraw({withTransition:!0,withY:t.config.zoom_rescale,withDimension:!1}),t.setZoomResetButton(),F(t.config.zoom_onzoom,e)}else e=t.zoomScale?t.zoomScale.domain():t.x.orgDomain();return e};Pt(je,{enable:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"wheel",t=this.internal,n=t.config,a=e;e&&(a=At(e)&&/^(drag|wheel)$/.test(e)?{type:e}:e),n.zoom_enabled=a,t.zoom?e===!1&&t.bindZoomEvent(!1):(t.initZoom(),t.bindZoomEvent()),t.updateAndRedraw()},max:function(e){var t=this.internal,n=t.config;return(e===0||e)&&(n.zoom_x_max=et("max",[t.orgXDomain[1],e])),n.zoom_x_max},min:function(e){var t=this.internal,n=t.config;return(e===0||e)&&(n.zoom_x_min=et("min",[t.orgXDomain[0],e])),n.zoom_x_min},range:function(e){var t=this.zoom;if(j(e)){var n=e.min,a=e.max;Ft(n)&&t.min(n),Ft(a)&&t.max(a)}return{min:t.min(),max:t.max()}}}),Pt(xt.prototype,{zoom:je,unzoom:function(){var e=this.internal,t
14=e.config;if(e.zoomScale){t.subchart_show?e.brush.getSelection().call(e.brush.move,null):e.zoom.updateTransformScale(Yt.zoomIdentity),e.updateZoom(!0),e.zoom.resetBtn&&e.zoom.resetBtn.style("display","none");var n=e.main.select(".".concat(C.eventRects));Object(Yt.zoomTransform)(n.node())!==Yt.zoomIdentity&&e.zoom.transform(n,Yt.zoomIdentity),e.redraw({withTransition:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withY:t.zoom_rescale})}}}),Pt(xt.prototype,{load:function(e){var t=this.internal,n=t.config;e.xs&&t.addXs(e.xs),"names"in e&&this.data.names(e.names),"classes"in e&&Object.keys(e.classes).forEach(function(a){n.data_classes[a]=e.classes[a]}),"categories"in e&&t.isCategorized()&&(n.axis_x_categories=e.categories),"axes"in e&&Object.keys(e.axes).forEach(function(a){n.data_axes[a]=e.axes[a]}),"colors"in e&&Object.keys(e.colors).forEach(function(a){n.data_colors[a]=e.colors[a]}),"unload"in e&&e.unload!==!1?t.unload(t.mapToTargetIds(e.unload===!0?null:e.unload),function(){return t.loadFromArgs(e)}):t.loadFromArgs(e)},unload:function(e){var t=this.internal,n=e||{};rt(n)?n={ids:n}:At(n)&&(n={ids:[n]});var a=t.mapToTargetIds(n.ids);t.unload(a,function(){t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.removeCache(a),n.done&&n.done()})}});var nn=M(25);Pt(xt.prototype,{flow:function(e){var t,n,a,c,u=this.internal,g=0,w=0;if((e.json||e.rows||e.columns)&&(t=u.convertData(e)),t&&u.isTabVisible()){var O=[],L=u.getMaxDataCount(),I=u.convertDataToTargets(t,!0);u.data.targets.forEach(function($){for(var Y=!1,J=0;J<I.length;J++)if($.id===I[J].id){Y=!0,$.values[$.values.length-1]&&(w=$.values[$.values.length-1].index+1),g=I[J].values.length;for(var nt=0;nt<g;nt++)I[J].values[nt].index=w+nt,u.isTimeSeries()||(I[J].values[nt].x=w+nt);$.values=$.values.concat(I[J].values),I.splice(J,1);break}Y||O.push($.id)}),u.data.targets.forEach(function($){for(var Y=0;Y<O.length;Y++)if($.id===O[Y]){w=$.values[$.values.length-1].index+1;for(var J=0;J<g;J++)$.values.push({id:$.id,index:w+J,x:u.isTimeSeries()?u.getOtherTargetX(w+J):w+J,value:null})}}),u.data.targets.length&&I.forEach(function($){for(var Y=[],J=u.data.targets[0].values[0].index;J<w;J++)Y.push({id:$.id,index:J,x:u.isTimeSeries()?u.getOtherTargetX(J):J,value:null});$.values.forEach(function(nt){nt.index+=w,u.isTimeSeries()||(nt.x+=w)}),$.values=Y.concat($.values)}),u.data.targets=u.data.targets.concat(I);var f=u.data.targets[0],T=f.values[0];Ft(e.to)?(g=0,c=u.isTimeSeries()?u.parseDate(e.to):e.to,f.values.forEach(function($){$.x<c&&g++})):Ft(e.length)&&(g=e.length),L?L===1&&u.isTimeSeries()&&(a=(f.values[f.values.length-1].x-T.x)/2,n=[new Date(+T.x-a),new Date(+T.x+a)]):(a=u.isTimeSeries()?f.values.length>1?f.values[f.values.length-1].x-T.x:T.x-u.getXDomain(u.data.targets)[0]:1,n=[T.x-a,T.x]),n&&u.updateXDomain(null,!0,!0,!1,n),u.updateTargets(u.data.targets),u.redraw({flow:{index:T.index,length:g,duration:pt(e.duration)?e.duration:u.config.transition_duration,done:e.done,orgDataCount:L},withLegend:!0,withTransition:L>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}}),Pt(tt.prototype,{generateFlow:function(e){var t=this,n=t.config;return function(){var a,c=e.targets,u=e.flow,g=e.shape.type,w=g.bar,O=g.line,L=g.area,I=e.shape.pos,f=I.cx,T=I.cy,$=I.xForText,Y=I.yForText,J=e.xv,nt=e.duration,ft=1,st=u.index,_t=u.length,Et=t.getValueOnIndex(t.data.targets[0].values,st),Dt=t.getValueOnIndex(t.data.targets[0].values,st+_t),Zt=t.x.domain(),ue=u.duration||nt,ke=u.done||function(){},Te=t.generateWait(),be=t.xgrid||Object(q.selectAll)([]),Gt=t.xgridLines||Object(q.selectAll)([]),De=t.mainRegion||Object(q.selectAll)([]),Oe=t.mainText||Object(q.selectAll)([]),Se=t.mainBar||Object(q.selectAll)([]),He=t.mainLine||Object(q.selectAll)([]),un=t.mainArea||Object(q.selectAll)([]),Ze=t.mainCircle||Object(q.selectAll)([]);t.flowing=!0,t.data.targets.forEach(function(qe){qe.values.splice(0,_t)});var Fe=t.updateXDomain(c,!0,!0);t.updateXGrid&&t.updateXGrid(!0),u.orgDataCount?u.orgDataCount===1||(Et&&Et.x)===(Dt&&Dt.x)||t.isTimeSeries()?a=t.x(Zt[0])-t.x(Fe[0]):a=t.x(Et.x)-t.x(Dt.x):t.data.targets[0].values.length===1?t.isTimeSeries()?(Et=t.getValueOnIndex(t.data.targets[0].values,0),Dt=t.getValueOnIndex(t.data.targets[0].values,t.data.targets[0].values.length-1),a=t.x(Et.x)-t.x(Dt.x)):a=pe(Fe)/2:a=t.x(Zt[0])-t.x(Fe[0]),ft=pe(Zt)/pe(Fe);var We="translate(".concat(a,",0) scale(").concat(ft,",1)");t.hideXGridFocus();var Re=Object(ct.transition)().ease(nn.easeLinear).duration(ue);Te.add([t.axes.x.transition(Re).call(function(qe){return t.xAxis.setTransition(Re).create(qe)}),Se.transition(Re).attr("transform",We),He.transition(Re).attr("transform",We),un.transition(Re).attr("transform",We),Ze.transition(Re).attr("transform",We),Oe.transition(Re).attr("transform",We),De.filter(t.isRegionOnX).transition(Re).attr("transform",We),be.transition(Re).attr("transform",We),Gt.transition(Re).attr("transform",We)]),Re.call(Te,function(){var qe=[],te=[],Kt=[];if(_t){for(var le,Je=0;Je<_t;
14Je++)le=st+Je,qe.push(".".concat(C.shape,"-").concat(le)),te.push(".".concat(C.text,"-").concat(le)),Kt.push(".".concat(C.eventRect,"-").concat(le));t.svg.selectAll(".".concat(C.shapes)).selectAll(qe).remove(),t.svg.selectAll(".".concat(C.texts)).selectAll(te).remove(),t.svg.selectAll(".".concat(C.eventRects)).selectAll(Kt).remove(),t.svg.select(".".concat(C.xgrid)).remove()}if(be.size()&&be.attr("transform",null).attr(t.xgridAttr),Gt.attr("transform",null),Gt.select("line").attr("x1",n.axis_rotated?0:J).attr("x2",n.axis_rotated?t.width:J),Gt.select("text").attr("x",n.axis_rotated?t.width:0).attr("y",J),Se.attr("transform",null).attr("d",w),He.attr("transform",null).attr("d",O),un.attr("transform",null).attr("d",L),Ze.attr("transform",null),t.isCirclePoint())Ze.attr("cx",f).attr("cy",T);else{var tn=function(yn){return f(yn)-n.point_r},An=function(yn){return T(yn)-n.point_r};Ze.attr("x",tn).attr("y",An).attr("cx",f).attr("cy",T)}Oe.attr("transform",null).attr("x",$).attr("y",Y).style("fill-opacity",t.opacityForText.bind(t)),De.attr("transform",null),De.select("rect").filter(t.isRegionOnX).attr("x",t.regionX.bind(t)).attr("width",t.regionWidth.bind(t)),n.interaction_enabled&&t.redrawEventRect(),ke(),t.flowing=!1})}}}),Pt(xt.prototype,{selected:function(e){var t=this.internal,n=[];return t.main.selectAll(".".concat(C.shapes+t.getTargetSelectorSuffix(e))).selectAll(".".concat(C.shape)).filter(function(){return Object(q.select)(this).classed(C.SELECTED)}).each(function(a){return n.push(a)}),n},select:function(e,t,n){var a=this.internal,c=a.config;c.data_selection_enabled&&a.main.selectAll(".".concat(C.shapes)).selectAll(".".concat(C.shape)).each(function(u,g){var w=Object(q.select)(this),O=u.data?u.data.id:u.id,L=a.getToggle(this,u).bind(a),I=c.data_selection_grouped||!e||e.indexOf(O)>=0,f=!t||t.indexOf(g)>=0,T=w.classed(C.SELECTED);w.classed(C.line)||w.classed(C.area)||(I&&f?c.data_selection_isselectable(u)&&!T&&L(!0,w.classed(C.SELECTED,!0),u,g):Ft(n)&&n&&T&&L(!1,w.classed(C.SELECTED,!1),u,g))})},unselect:function(e,t){var n=this.internal,a=n.config;a.data_selection_enabled&&n.main.selectAll(".".concat(C.shapes)).selectAll(".".concat(C.shape)).each(function(c,u){var g=Object(q.select)(this),w=c.data?c.data.id:c.id,O=n.getToggle(this,c).bind(n),L=a.data_selection_grouped||!e||e.indexOf(w)>=0,I=!t||t.indexOf(u)>=0,f=g.classed(C.SELECTED);g.classed(C.line)||g.classed(C.area)||L&&I&&a.data_selection_isselectable(c)&&f&&O(!1,g.classed(C.SELECTED,!1),c,u)})}});function sn(d,e,t){var n=this,a=t||{withTransitionForAxis:!n.hasArcType()};a.withTransitionForTransform=!1,n.transiting=!1,n.setTargetType(d,e),n.updateTargets(n.data.targets),n.updateAndRedraw(a)}Pt(xt.prototype,{transform:function(e,t){var n=this.internal,a=["pie","donut"].indexOf(e)>=0?{withTransform:!0}:null;sn.bind(n)(t,e,a)}}),Pt(xt.prototype,{groups:function(e){var t=this.internal,n=t.config;return kt(e)||(n.data_groups=e,t.redraw()),n.data_groups}});var pn=function(d){var e=this.internal,t=e.config;return d&&(t.grid_x_lines=d,e.redrawWithoutRescale()),t.grid_x_lines};
14Pt(pn,{add:function(e){return this.xgrids(this.internal.config.grid_x_lines.concat(e||[]))},remove:function(e){this.internal.removeGridLines(e,!0)}});var Mn=function(d){var e=this.internal,t=e.config;return d&&(t.grid_y_lines=d,e.redrawWithoutRescale()),t.grid_y_lines};Pt(Mn,{add:function(e){return this.ygrids(this.internal.config.grid_y_lines.concat(e||[]))},remove:function(e){this.internal.removeGridLines(e,!1)}}),Pt(xt.prototype,{xgrids:pn,ygrids:Mn});var Tn=function(d){var e=this.internal,t=e.config;return d?(t.regions=d,e.redrawWithoutRescale(),d):t.regions};Pt(Tn,{add:function(e){var t=this.internal,n=t.config;return e&&(n.regions=n.regions.concat(e),t.redrawWithoutRescale()),n.regions},remove:function(e){var t=this.internal,n=t.config,a=e||{},c=Q(a,"duration",n.transition_duration),u=Q(a,"classes",[C.region]),g=t.main.select(".".concat(C.regions)).selectAll(u.map(function(w){return".".concat(w)}));return(c?g.transition().duration(c):g).style("opacity","0").remove(),g=n.regions,Object.keys(a).length?(g=g.filter(function(w){var O=!1;return!w.class||(w.class.split(" ").forEach(function(L){u.indexOf(L)>=0&&(O=!0)}),!O)}),n.regions=g):n.regions=[],g}}),Pt(xt.prototype,{regions:Tn});var Dn=function(d){var e=this.internal.data.targets;return kt(d)?e:e.filter(function(t){return d.indexOf(t.id)>=0})};Pt(Dn,{shown:function(e){return this.internal.filterTargetsToShow(this.data(e))},values:function(d){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=null;if(d){var n=this.data(d);n&&rt(n)&&(t=[],n.forEach(function(a){var c=a.values.map(function(u){return u.value});e?t=t.concat(c):t.push(c)}))}return t},names:function(e){return this.internal.clearLegendItemTextBoxCache(),this.internal.updateDataAttributes("names",e)},colors:function(e){return this.internal.updateDataAttributes("colors",e)},axes:function(e){return this.internal.updateDataAttributes("axes",e)},min:function(){return this.internal.getMinMaxData().min},max:function(){return this.internal.getMinMaxData().max}}),Pt(xt.prototype,{data:Dn}),Pt(xt.prototype,{category:function(e,t){var n=this.internal,a=n.config;return arguments.length>1&&(a.axis_x_categories[e]=t,n.redraw()),a.axis_x_categories[e]},categories:function(e){var t=this.internal,n=t.config;return arguments.length&&(n.axis_x_categories=e,t.redraw()),n.axis_x_categories}}),Pt(xt.prototype,{color:function(e){return this.internal.color(e)}}),Pt(xt.prototype,{x:function(e){var t=this.internal,n=t.isCustomX()&&t.isCategorized();return rt(e)&&(n?t.api.categories(e):(t.updateTargetX(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0}))),n?t.api.categories():t.data.xs},xs:function(e){var t=this.internal;return j(e)&&(t.updateTargetXs(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs}});var $n=function(d,e,t){var n=d.config,a="axis_x_".concat(e),c="axis_y_".concat(e),u="axis_y2_".concat(e);return Ft(t)&&(Ae(t)?(pt(t.x)&&(n[a]=t.x),pt(t.y)&&(n[c]=t.y),pt(t.y2)&&(n[u]=t.y2)):(n[c]=t,n[u]=t),d.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),void 0},Ee=function(d,e){var t=d.config;return{x:t["axis_x_".concat(e)],y:t["axis_y_".concat(e)],y2:t["axis_y2_".concat(e)]}},xn=Pt(function(){},{labels:function(e){var t=this.internal;arguments.length&&(Object.keys(e).forEach(function(n){t.axis.setLabelText(n,e[n])}),t.axis.updateLabels())},min:function(e){var t=this.internal;return arguments.length?$n(t,"min",e):Ee(t,"min")},max:function(e){var t=this.internal;return arguments.length?$n(t,"max",e):Ee(t,"max")},range:function(e){var t=this.axis;if(arguments.length)Ft(e.max)&&t.max(e.max),Ft(e.min)&&t.min(e.min);else return{max:t.max(),min:t.min()}}});Pt(xt.prototype,{axis:xn});var mn=Pt(function(){},{show:function(e){var t=this.internal;t.showLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})},hide:function(e){var t=this.internal;t.hideLegend(t.mapToTargetIds(e)),t.updateAndRedraw({withLegend:!0})}});Pt(xt.prototype,{legend:mn}),Pt(xt.prototype,{resize:function(e){var t=this.internal.config;t.size_width=e?e.width:null,t.size_height=e?e.height:null,this.flush(!1,!0)},flush:function(e,t){var n=this.internal;t?n.brush&&n.brush.updateResize():n.axis&&n.axis.setOrient(),n.zoomScale=null,e?n.redraw({withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withLegend:!0}):n.updateAndRedraw({withLegend:!0,withTransition:!1,withTransitionForTransform:!1})},destroy:function(){var e=this,t=this.internal;return K(t)&&(t.callPluginHook("$willDestroy"),t.charts.splice(t.charts.indexOf(this),1),t.svg.select("*").interrupt(),Ft(t.resizeTimeout)&&Ve.b.clearTimeout(t.resizeTimeout),Ve.b.removeEventListener("resize",t.resizeFunction),t.selectChart.classed("bb",!1).html(""),Object.keys(this).forEac
14h(function(n){n==="internal"&&Object.keys(t).forEach(function(a){t[a]=null}),e[n]=null,delete e[n]})),null},config:function(e,t,n){var a,c=this.internal,u=e&&e.replace(/\./g,"_");return u in c.config&&(Ft(t)?(c.config[u]=t,a=t,n&&this.flush()):a=c.config[u]),a}});var cn=Pt(function(){},{show:function(){var e,t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=this.internal;if(n.mouse&&(t=n.mouse),n.data){var c=a.getYScale(n.data.id)(n.data.value);a.isMultipleX()?t=[a.x(n.data.x),c]:(!a.config.tooltip_grouped&&(t=[0,c]),e=pt(n.data.index)?n.data.index:a.getIndexByX(n.data.x))}else Ft(n.x)?e=a.getIndexByX(n.x):Ft(n.index)&&(e=n.index);(a.inputType==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(function(u){a.dispatchEvent(u,e,t)})},hide:function(){var e=this.internal;e.hideTooltip(!0),e.hideXGridFocus(),e.unexpandCircles(),e.unexpandBars()}});Pt(xt.prototype,{tooltip:cn});var G=function(d){return btoa(encodeURIComponent(d).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x".concat(t))}))},lt=function(d,e){var t=new XMLSerializer,n=d.cloneNode(!0),a=ze(we(document.styleSheets)).filter(function(O){return O.cssText}).map(function(O){return O.cssText});n.setAttribute("xmlns",q.namespaces.xhtml);var c=t.serializeToString(n),u=document.createElement("style");u.appendChild(document.createTextNode(a.join(` 15`)));var g=t.serializeToString(u),w='<svg xmlns="'.concat(q.namespaces.svg,'" width="').concat(e.width,'" height="').concat(e.height,`"> 16 <foreignObject width="100%" height="100%"> 17 `).concat(g,` 18 `).concat(c.replace(/(url\()[^#]+/g,"$1"),` 19 </foreignObject></svg>`).replace(`/ 20/g`,"%0A");return"data:image/svg+xml;base64,".concat(G(w))};Pt(xt.prototype,{export:function(e,t){var n=this.internal,a={width:n.currentWidth,height:n.currentHeight},c=lt(this.element,a);if(Ot(t)){var u=new Image;u.crosssOrigin="Anonymous",u.onload=function(){var g=document.createElement("canvas"),w=g.getContext("2d");g.width=a.width,g.height=a.height,w.drawImage(u,0,0),t(g.toDataURL(e))},u.src=c}return c}});var Lt=M(26);M.d(E,"bb",function(){return qt});var Ht={},qt={version:"1.9.1",generate:function(e){var t=y({},Ht,e),n=new xt(t);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(e){return j(e)&&(Ht=e),Ht},instance:[],plugin:{},chart:{fn:xt.prototype,internal:{fn:tt.prototype,axis:{fn:Ie.prototype}}}},ce=E.default=qt}])})});var Mc={};Xo(Mc,{bb:()=>ma,default:()=>Mp});var ir={};Xo(ir,{default:()=>ln});v(ir,Lp);import*as Lp from"../../../frontend-js-react-web/__liferay__/exports/react.js";import kd from"../../../frontend-js-react-web/__liferay__/exports/react.js";var ln=kd;var Ho=Be(Gc());function jc(r){if(typeof r!="object"||r===null)return r;if(Array.isArray(r))return r.map(o=>jc(o));let i={};for(let o in r)Object.prototype.hasOwnProperty.call(r,o)&&(/^(__proto__|constructor|prototype)$/i.test(o)?console.warn(`<ClayChart />: The key "${o}" has been removed from an object passed to a Clay Chart because it may be an attempted prototype pollution attack. Please update the data removing the key: "${o}".`):i[o]=r[o]);return i}function Ld(r){return Ho.bb.generate(jc(r))}var ma={...Ho.bb,generate:Ld};function va(){return va=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},va.apply(null,arguments)}var Zc=typeof window>"u"?ln.useEffect:ln.useLayoutEffect,Rd=r=>{let{forwardRef:i,elementProps:o={},...s}=r,l=ln.useRef(null),h=ln.useCallback(_=>{let{data:p,onafterinit:x,...b}=_;l.current&&(i.current||(i.current=ma.generate({bindto:l.current,data:p,onafterinit(){x&&setTimeout(()=>x(),0)},...b})),i.current.load(p))},[]);return Zc(()=>(requestAnimationFrame(()=>h(s)),()=>{if(i.current)try{i.current.destroy()}catch(_){console.error("Internal billboard.js error",_)}i.current=null}),[]),Zc(()=>{h(s)},[s]),ln.createElement("div",va({},o,{ref:l}))},xa=ln.forwardRef((r,i)=>ln.createElement(Rd,va({forwardRef:i},r)));var m={};Xo(m,{blob:()=>cu,buffer:()=>uu,chord:()=>Jc,cluster:()=>mf,contourDensity:()=>su,contours:()=>ba,csv:()=>fu,dsv:()=>jo,forceCenter:()=>xu,forceCollide:()=>Fu,forceLink:()=>Xu,forceManyBody:()=>Wu,forceRadial:()=>Gu,forceSimulation:()=>Uu,forceX:()=>ju,forceY:()=>Zu,geoAlbers:()=>oo,geoAlbersUsa:()=>nf,geoArea:()=>il,geoAzimuthalEqualArea:()=>rf,geoAzimuthalEqualAreaRaw:()=>co,geoAzimuthalEquidistant:()=>af,geoAzimuthalEquidistantRaw:()=>uo,geoBounds:()=>hl,geoCentroid:()=>xl,geoCircle:()=>Tl,geoClipAntimeridian:()=>Ai,geoClipCircle:()=>qa,geoClipExtent:()=>kl,geoClipRectangle:()=>fr,geoConicConformal:()=>of,geoConicConformalRaw:()=>Es,geoConicEqualArea:()=>Pr,geoConicEqualAreaRaw:()=>Rs,geoConicEquidistant:()=>cf,geoConicEquidistantRaw:()=>Os,geoContains:()=>Dl,geoDistance:()=>Rr,geoEqualEarth:()=>uf,geoEqualEarthRaw:()=>go,geoEquirectangular:()=>sf,geoEquirectangularRaw:()=>zr,geoGnomonic:()=>lf,geoGnomonicRaw:()=>po,geoGraticule:()=>Ka,geoGraticule10:()=>Il,geoIdentity:()=>ff,geoInterpolate:()=>Nl,geoLength:()=>ja,geoMercator:()=>lo,geoMercatorRaw:()=>Dr,geoNaturalEarth1:()=>hf,geoNaturalEarth1Raw:()=>vo,geoOrthographic:()=>df,geoOrthographicRaw:()=>xo,geoPath:()=>ao,geoProjection:()=>gn,geoProjectionMutator:()=>$i,geoRotation:()=>Na,geoStereographic:()=>gf,geoStereographicRaw:()=>yo,geoStream:()=>bn,geoTransform:()=>Ql,geoTransverseMercator:()=>pf,geoTransverseMercatorRaw:()=>_o,hierarchy:()=>zi,html:()=>mu,image:()=>du,interpolateBlues:()=>Fh,interpolateBrBG:()=>mh,interpolateBuGn:()=>Mh,interpolateBuPu:()=>Sh,interpolateCool:()=>Uh,interpolateCubehelixDefault:()=>Vh,interpolateGnBu:()=>Ch,interpolateGreens:()=>Ih,interpolateGreys:()=>Nh,interpolateInferno:()=>Qh,interpolateMagma:()=>Kh,interpolateOrRd:()=>kh,interpolateOranges:()=>Yh,interpolatePRGn:()=>vh,interpolatePiYG:()=>xh,interpolatePlasma:()=>Jh,interpolatePuBu:()=>Rh,interpolatePuBuGn:()=>Lh,interpolatePuOr:()=>yh,interpolatePuRd:()=>$h,interpolatePurples:()=>Xh,interpolateRainbow:()=>Wh,interpolateRdBu:()=>_h,interpolateRdGy:()=>bh,interpolateRdPu:()=>Eh,interpolateRdYlBu:()=>wh,interpolateRdYlGn:()=>Th,interpolateReds:()=>Bh,interpolateSinebow:()=>jh,interpolateSpectral:()=>Ah,interpolateViridis:()=>Zh,interpolateWarm:()=>qh,interpolateYlGn:()=>Ph,interpolateYlGnBu:()=>Oh,interpolateYlOrBr:()=>Dh,interpolateYlOrRd:()=>zh,json:()=>gu,pack:()=>Nf,packEnclose:()=>wo,packSiblings:()=>Df,partition:()=>Xf,polygonArea:()=>jf,polygonCentroid:()=>Zf,polygonContains:()=>th,polygonHull:()=>Jf,polygonLength:()=>eh,quadtree:()=>pr,randomBates:()=>ih,randomExponential:()=>ah,randomIrwinHall:()=>ko,randomLogNormal:()=>rh,randomNormal:()=>Co,randomUniform:()=>nh,ribbon:()=>nu,schemeAccent:()=>sh,schemeBlues:()=>uc,schemeBrBG:()=>Ys,schemeBuGn:()=>Ks,schemeBuPu:()=>Qs,schemeCategory10:()=>oh,schemeDark2:()=>ch,schemeGnBu:()=>Js,schemeGreens:()=>lc,schemeGreys:()=>fc,schemeOrRd:()=>tc,schemeOranges:()=>gc,schemePRGn:()=>Hs,schemePaired:()=>uh,schemePastel1:()=>lh,schemePastel2:()=>fh,schemePiYG:()=>
20Vs,schemePuBu:()=>nc,schemePuBuGn:()=>ec,schemePuOr:()=>qs,schemePuRd:()=>rc,schemePurples:()=>hc,schemeRdBu:()=>Us,schemeRdGy:()=>Ws,schemeRdPu:()=>ic,schemeRdYlBu:()=>Gs,schemeRdYlGn:()=>js,schemeReds:()=>dc,schemeSet1:()=>hh,schemeSet2:()=>dh,schemeSet3:()=>gh,schemeSpectral:()=>Zs,schemeYlGn:()=>oc,schemeYlGnBu:()=>ac,schemeYlOrBr:()=>sc,schemeYlOrRd:()=>cc,stratify:()=>Hf,svg:()=>vu,text:()=>Ar,tree:()=>Vf,treemap:()=>qf,treemapBinary:()=>Uf,treemapDice:()=>nr,treemapResquarify:()=>Gf,treemapSlice:()=>wr,treemapSliceDice:()=>Wf,treemapSquarify:()=>So,tsv:()=>hu,version:()=>Kc,voronoi:()=>gd,xml:()=>pu});var Kc="5.9.3";v(m,Be(or()));v(m,Be(ta()));v(m,Be(ra()));var Go=Be(or());var Vo=Math.cos,qo=Math.sin,Qc=Math.PI,di=Qc/2,Uo=Qc*2,Wo=Math.max;function $d(r){return function(i,o){return r(i.source.value+i.target.value,o.source.value+o.target.value)}}function Jc(){var r=0,i=null,o=null,s=null;function l(h){var _=h.length,p=[],x=(0,Go.range)(_),b=[],A=[],k=A.groups=new Array(_),S=new Array(_*_),R,E,M,z,D,B;for(R=0,D=-1;++D<_;){for(E=0,B=-1;++B<_;)E+=h[D][B];p.push(E),b.push((0,Go.range)(_)),R+=E}for(i&&x.sort(function(C,Ct){return i(p[C],p[Ct])}),o&&b.forEach(function(C,Ct){C.sort(function(Nt,gt){return o(h[Ct][Nt],h[Ct][gt])})}),R=Wo(0,Uo-r*_)/R,z=R?r:Uo/_,E=0,D=-1;++D<_;){for(M=E,B=-1;++B<_;){var X=x[D],U=b[X][B],Z=h[X][U],it=E,q=E+=Z*R;S[U*_+X]={index:X,subindex:U,startAngle:it,endAngle:q,value:Z}}k[X]={index:X,startAngle:M,endAngle:E,value:p[X]},E+=z}for(D=-1;++D<_;)for(B=D-1;++B<_;){var ct=S[B*_+D],ut=S[D*_+B];(ct.value||ut.value)&&A.push(ct.value<ut.value?{source:ut,target:ct}:{source:ct,target:ut})}return s?A.sort(s):A}return l.padAngle=function(h){return arguments.length?(r=Wo(0,h),l):r},l.sortGroups=function(h){return arguments.length?(i=h,l):i},l.sortSubgroups=function(h){return arguments.length?(o=h,l):o},l.sortChords=function(h){return arguments.length?(h==null?s=null:(s=$d(h))._=h,l):s&&s._},l}var tu=Array.prototype.slice;function ya(r){return function(){return r}}var eu=Be(fa());function Ed(r){return r.source}function Od(r){return r.target}function Pd(r){return r.radius}function Dd(r){return r.startAngle}function zd(r){return r.endAngle}function nu(){var r=Ed,i=Od,o=Pd,s=Dd,l=zd,h=null;function _(){var p,x=tu.call(arguments),b=r.apply(this,x),A=i.apply(this,x),k=+o.apply(this,(x[0]=b,x)),S=s.apply(this,x)-di,R=l.apply(this,x)-di,E=k*Vo(S),M=k*qo(S),z=+o.apply(this,(x[0]=A,x)),D=s.apply(this,x)-di,B=l.apply(this,x)-di;if(h||(h=p=(0,eu.path)()),h.moveTo(E,M),h.arc(0,0,k,S,R),(S!==D||R!==B)&&(h.quadraticCurveTo(0,0,z*Vo(D),z*qo(D)),h.arc(0,0,z,D,B)),h.quadraticCurveTo(0,0,E,M),h.closePath(),p)return h=null,p+""||null}return _.radius=function(p){return arguments.length?(o=typeof p=="function"?p:ya(+p),_):o},_.startAngle=function(p){return arguments.length?(s=typeof p=="function"?p:ya(+p),_):s},_.endAngle=function(p){return arguments.length?(l=typeof p=="function"?p:ya(+p),_):l},_.source=function(p){return arguments.length?(r=p,_):r},_.target=function(p){return arguments.length?(i=p,_):i},_.context=function(p){return arguments.length?(h=p??null,_):h},_}v(m,Be(li()));v(m,Be(ar()));var gr=Be(or());var Fd=Array.prototype,_a=Fd.slice;function ru(r,i){return r-i}function iu(r){for(var i=0,o=r.length,s=r[o-1][1]*r[0][0]-r[o-1][0]*r[0][1];++i<o;)s+=r[i-1][1]*r[i][0]-r[i-1][0]*r[i][1];return s}function Kn(r){return function(){return r}}function au(r,i){for(var o=-1,s=i.length,l;++o<s;)if(l=Id(r,i[o]))return l;return 0}function Id(r,i){for(var o=i[0],s=i[1],l=-1,h=0,_=r.length,p=_-1;h<_;p=h++){var x=r[h],b=x[0],A=x[1],k=r[p],S=k[0],R=k[1];if(Nd(x,k,i))return 0;A>s!=R>s&&o<(S-b)*(s-A)/(R-A)+b&&(l=-l)}return l}function Nd(r,i,o){var s;return Xd(r,i,o)&&Bd(r[s=+(r[0]===i[0])],o[s],i[s])}function Xd(r,i,o){return(i[0]-r[0])*(o[1]-r[1])===(o[0]-r[0])*(i[1]-r[1])}function Bd(r,i,o){return r<=i&&i<=o||o<=i&&i<=r}function ou(){}var sr=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ba(){var r=1,i=1,o=gr.thresholdSturges,s=x;function l(b){var A=o(b);if(Array.isArray(A))A=A.slice().sort(ru);else{var k=(0,gr.extent)(b),S=k[0],R=k[1];A=(0,gr.tickStep)(S,R,A),A=(0,gr.range)(Math.floor(S/A)*A,Math.floor(R/A)*A,A)}return A.map(function(E){return h(b,E)})}function h(b,A){var k=[],S=[];return _(b,A,function(R){s(R,b,A),iu(R)>0?k.push([R]):S.push(R)}
20),S.forEach(function(R){for(var E=0,M=k.length,z;E<M;++E)if(au((z=k[E])[0],R)!==-1){z.push(R);return}}),{type:"MultiPolygon",value:A,coordinates:k}}function _(b,A,k){var S=new Array,R=new Array,E,M,z,D,B,X;for(E=M=-1,D=b[0]>=A,sr[D<<1].forEach(U);++E<r-1;)z=D,D=b[E+1]>=A,sr[z|D<<1].forEach(U);for(sr[D<<0].forEach(U);++M<i-1;){for(E=-1,D=b[M*r+r]>=A,B=b[M*r]>=A,sr[D<<1|B<<2].forEach(U);++E<r-1;)z=D,D=b[M*r+r+E+1]>=A,X=B,B=b[M*r+E+1]>=A,sr[z|D<<1|B<<2|X<<3].forEach(U);sr[D|B<<3].forEach(U)}for(E=-1,B=b[M*r]>=A,sr[B<<2].forEach(U);++E<r-1;)X=B,B=b[M*r+E+1]>=A,sr[B<<2|X<<3].forEach(U);sr[B<<3].forEach(U);function U(Z){var it=[Z[0][0]+E,Z[0][1]+M],q=[Z[1][0]+E,Z[1][1]+M],ct=p(it),ut=p(q),C,Ct;(C=R[ct])?(Ct=S[ut])?(delete R[C.end],delete S[Ct.start],C===Ct?(C.ring.push(q),k(C.ring)):S[C.start]=R[Ct.end]={start:C.start,end:Ct.end,ring:C.ring.concat(Ct.ring)}):(delete R[C.end],C.ring.push(q),R[C.end=ut]=C):(C=S[ut])?(Ct=R[ct])?(delete S[C.start],delete R[Ct.end],C===Ct?(C.ring.push(q),k(C.ring)):S[Ct.start]=R[C.end]={start:Ct.start,end:C.end,ring:Ct.ring.concat(C.ring)}):(delete S[C.start],C.ring.unshift(it),S[C.start=ct]=C):S[ct]=R[ut]={start:ct,end:ut,ring:[it,q]}}}function p(b){return b[0]*2+b[1]*(r+1)*4}function x(b,A,k){b.forEach(function(S){var R=S[0],E=S[1],M=R|0,z=E|0,D,B=A[z*r+M];R>0&&R<r&&M===R&&(D=A[z*r+M-1],S[0]=R+(k-D)/(B-D)-.5),E>0&&E<i&&z===E&&(D=A[(z-1)*r+M],S[1]=E+(k-D)/(B-D)-.5)})}return l.contour=h,l.size=function(b){if(!arguments.length)return[r,i];var A=Math.ceil(b[0]),k=Math.ceil(b[1]);if(!(A>0)||!(k>0))throw new Error("invalid size");return r=A,i=k,l},l.thresholds=function(b){return arguments.length?(o=typeof b=="function"?b:Array.isArray(b)?Kn(_a.call(b)):Kn(b),l):o},l.smooth=function(b){return arguments.length?(s=b?x:ou,l):s===x},l}var Yr=Be(or());function wa(r,i,o){for(var s=r.width,l=r.height,h=(o<<1)+1,_=0;_<l;++_)for(var p=0,x=0;p<s+o;++p)p<s&&(x+=r.data[p+_*s]),p>=o&&(p>=h&&(x-=r.data[p-h+_*s]),i.data[p-o+_*s]=x/Math.min(p+1,s-1+h-p,h))}function Ta(r,i,o){for(var s=r.width,l=r.height,h=(o<<1)+1,_=0;_<s;++_)for(var p=0,x=0;p<l+o;++p)p<l&&(x+=r.data[_+p*s]),p>=o&&(p>=h&&(x-=r.data[_+(p-h)*s]),i.data[_+(p-o)*s]=x/Math.min(p+1,l-1+h-p,h))}function Yd(r){return r[0]}function Hd(r){return r[1]}function Vd(){return 1}function su(){var r=Yd,i=Hd,o=Vd,s=960,l=500,h=20,_=2,p=h*3,x=s+p*2>>_,b=l+p*2>>_,A=Kn(20);function k(D){var B=new Float32Array(x*b),X=new Float32Array(x*b);D.forEach(function(it,q,ct){var ut=+r(it,q,ct)+p>>_,C=+i(it,q,ct)+p>>_,Ct=+o(it,q,ct);ut>=0&&ut<x&&C>=0&&C<b&&(B[ut+C*x]+=Ct)}),wa({width:x,height:b,data:B},{width:x,height:b,data:X},h>>_),Ta({width:x,height:b,data:X},{width:x,height:b,data:B},h>>_),wa({width:x,height:b,data:B},{width:x,height:b,data:X},h>>_),Ta({width:x,height:b,data:X},{width:x,height:b,data:B},h>>_),wa({width:x,height:b,data:B},{width:x,height:b,data:X},h>>_),Ta({width:x,height:b,data:X},{width:x,height:b,data:B},h>>_);var U=A(B);if(!Array.isArray(U)){var Z=(0,Yr.max)(B);U=(0,Yr.tickStep)(0,Z,U),U=(0,Yr.range)(0,Math.floor(Z/U)*U,U),U.shift()}return ba().thresholds(U).size([x,b])(B).map(S)}function S(D){return D.value*=Math.pow(2,-2*_),D.coordinates.forEach(R),D}function R(D){D.forEach(E)}function E(D){D.forEach(M)}function M(D){D[0]=D[0]*Math.pow(2,_)-p,D[1]=D[1]*Math.pow(2,_)-p}function z(){return p=h*3,x=s+p*2>>_,b=l+p*2>>_,k}return k.x=function(D){return arguments.length?(r=typeof D=="function"?D:Kn(+D),k):r},k.y=function(D){return arguments.length?(i=typeof D=="function"?D:Kn(+D),k):i},k.weight=function(D){return arguments.length?(o=typeof D=="function"?D:Kn(+D),k):o},k.size=function(D){if(!arguments.length)return[s,l];var B=Math.ceil(D[0]),X=Math.ceil(D[1]);if(!(B>=0)&&!(B>=0))throw new Error("invalid size");return s=B,l=X,z()},k.cellSize=function(D){if(!arguments.length)return 1<<_;if(!((D=+D)>=1))throw new Error("invalid cell size");return _=Math.floor(Math.log(D)/Math.LN2),z()},k.thresholds=function(D){return arguments.length?(A=typeof D=="function"?D:Array.isArray(D)?Kn(_a.call(D)):Kn(D),k):A},k.bandwidth=function(D){if(!arguments.length)return Math.sqrt(h*(h+1));if(!((D=+D)>=0))throw new Error("invalid bandwidth");return h=Math.round((Math.sqrt(4*D*D+1)-1)/2),z()}
20,k}v(m,Be(Tr()));v(m,Be(Br()));v(m,Be(fi()));v(m,Be(ui()));function qd(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.blob()}function cu(r,i){return fetch(r,i).then(qd)}function Ud(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.arrayBuffer()}function uu(r,i){return fetch(r,i).then(Ud)}var Hr=Be(fi());function Wd(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.text()}function Ar(r,i){return fetch(r,i).then(Wd)}function lu(r){return function(i,o,s){return arguments.length===2&&typeof o=="function"&&(s=o,o=void 0),Ar(i,o).then(function(l){return r(l,s)})}}function jo(r,i,o,s){arguments.length===3&&typeof o=="function"&&(s=o,o=void 0);var l=(0,Hr.dsvFormat)(r);return Ar(i,o).then(function(h){return l.parse(h,s)})}var fu=lu(Hr.csvParse),hu=lu(Hr.tsvParse);function du(r,i){return new Promise(function(o,s){var l=new Image;for(var h in i)l[h]=i[h];l.onerror=s,l.onload=function(){o(l)},l.src=r})}function Gd(r){if(!r.ok)throw new Error(r.status+" "+r.statusText);return r.json()}function gu(r,i){return fetch(r,i).then(Gd)}function Zo(r){return function(i,o){return Ar(i,o).then(function(s){return new DOMParser().parseFromString(s,r)})}}var pu=Zo("application/xml"),mu=Zo("text/html"),vu=Zo("image/svg+xml");function xu(r,i){var o;r==null&&(r=0),i==null&&(i=0);function s(){var l,h=o.length,_,p=0,x=0;for(l=0;l<h;++l)_=o[l],p+=_.x,x+=_.y;for(p=p/h-r,x=x/h-i,l=0;l<h;++l)_=o[l],_.x-=p,_.y-=x}return s.initialize=function(l){o=l},s.x=function(l){return arguments.length?(r=+l,s):r},s.y=function(l){return arguments.length?(i=+l,s):i},s}function on(r){return function(){return r}}function Wn(){return(Math.random()-.5)*1e-6}function yu(r){var i=+this._x.call(null,r),o=+this._y.call(null,r);return _u(this.cover(i,o),i,o,r)}function _u(r,i,o,s){if(isNaN(i)||isNaN(o))return r;var l,h=r._root,_={data:s},p=r._x0,x=r._y0,b=r._x1,A=r._y1,k,S,R,E,M,z,D,B;if(!h)return r._root=_,r;for(;h.length;)if((M=i>=(k=(p+b)/2))?p=k:b=k,(z=o>=(S=(x+A)/2))?x=S:A=S,l=h,!(h=h[D=z<<1|M]))return l[D]=_,r;if(R=+r._x.call(null,h.data),E=+r._y.call(null,h.data),i===R&&o===E)return _.next=h,l?l[D]=_:r._root=_,r;do l=l?l[D]=new Array(4):r._root=new Array(4),(M=i>=(k=(p+b)/2))?p=k:b=k,(z=o>=(S=(x+A)/2))?x=S:A=S;while((D=z<<1|M)===(B=(E>=S)<<1|R>=k));return l[B]=h,l[D]=_,r}function bu(r){var i,o,s=r.length,l,h,_=new Array(s),p=new Array(s),x=1/0,b=1/0,A=-1/0,k=-1/0;for(o=0;o<s;++o)isNaN(l=+this._x.call(null,i=r[o]))||isNaN(h=+this._y.call(null,i))||(_[o]=l,p[o]=h,l<x&&(x=l),l>A&&(A=l),h<b&&(b=h),h>k&&(k=h));for(A<x&&(x=this._x0,A=this._x1),k<b&&(b=this._y0,k=this._y1),this.cover(x,b).cover(A,k),o=0;o<s;++o)_u(this,_[o],p[o],r[o]);return this}function wu(r,i){if(isNaN(r=+r)||isNaN(i=+i))return this;var o=this._x0,s=this._y0,l=this._x1,h=this._y1;if(isNaN(o))l=(o=Math.floor(r))+1,h=(s=Math.floor(i))+1;else if(o>r||r>l||s>i||i>h){var _=l-o,p=this._root,x,b;switch(b=(i<(s+h)/2)<<1|r<(o+l)/2){case 0:{do x=new Array(4),x[b]=p,p=x;while(_*=2,l=o+_,h=s+_,r>l||i>h);break}case 1:{do x=new Array(4),x[b]=p,p=x;while(_*=2,o=l-_,h=s+_,o>r||i>h);break}case 2:{do x=new Array(4),x[b]=p,p=x;while(_*=2,l=o+_,s=h-_,r>l||s>i);break}case 3:{do x=new Array(4),x[b]=p,p=x;while(_*=2,o=l-_,s=h-_,o>r||s>i);break}}this._root&&this._root.length&&(this._root=p)}else return this;return this._x0=o,this._y0=s,this._x1=l,this._y1=h,this}function Tu(){var r=[];return this.visit(function(i){if(!i.length)do r.push(i.data);while(i=i.next)}),r}function Au(r){return arguments.length?this.cover(+r[0][0],+r[0][1]).cover(+r[1][0],+r[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function _n(r,i,o,s,l){this.node=r,this.x0=i,this.y0=o,this.x1=s,this.y1=l}function Mu(r,i,o){var s,l=this._x0,h=this._y0,_,p,x,b,A=this._x1,k=this._y1,S=[],R=this._root,E,M;for(R&&S.push(new _n(R,l,h,A,k)),o==null?o=1/0:(l=r-o,h=i-o,A=r+o,k=i+o,o*=o);E=S.pop();)if(!(!(R=E.node)||(_=E.x0)>A||(p=E.y0)>k||(x=E.x1)<l||(b=E.y1)<h))if(R.length){var z=(_+x)/2,D=(p+b)/2;S.push(new _n(R[3],z,D,x,b),new _n(R[2],_,D,z,b),new _n(R[1],z,p,x,D),new _n(R[0],_,p,z,D)),(M=(i>=D)<<1|r>=z)&&(E=S[S.length-1],S[S.length-1]=S[S.length-1-M],S[S.length-1-M]=E)}else{var B=r-+this._x.call(null,R.data),X=i-+this._y.call(null,R.data),U=B*B+X*X;if(U<o){var Z=Math.sqrt(o=U);l=r-Z,h=i-Z,A=r+Z,k=i+Z,s=R.data}}return s}function Su(r){if(isNaN(A=+this._x.call(null,r))||isNaN(k=+this._y.call(null,r)))return this;var i,o=this._root,s,l,h,_=this._x0,p=this._y0,x=this._x1,b=this._y1,A,k,S,R,E,M,z,D;if(!o)return this;if(o.length)for(;;){if((E=A>=(S=(_+x)/2))?_=S:x=S,(M=k>=(R=(p+b)/2))?p=R:b=R,i=o,!(o=o[z=M<<1|E]))return this;if(!o.length)break;(i[z+1&3]||i[z+2&3]||i[z+3&3])&&(s=i,D=z)}for(;o.data!==r;)if(l=o,!(o=o.next))return this;
vendor: 4,334 bytes, line 20
20return(h=o.next)&&delete o.next,l?(h?l.next=h:delete l.next,this):i?(h?i[z]=h:delete i[z],(o=i[0]||i[1]||i[2]||i[3])&&o===(i[3]||i[2]||i[1]||i[0])&&!o.length&&(s?s[D]=o:this._root=o),this):(this._root=h,this)}function Cu(r){for(var i=0,o=r.length;i<o;++i)this.remove(r[i]);return this}function ku(){return this._root}function Lu(){var r=0;return this.visit(function(i){if(!i.length)do++r;while(i=i.next)}),r}function Ru(r){var i=[],o,s=this._root,l,h,_,p,x;for(s&&i.push(new _n(s,this._x0,this._y0,this._x1,this._y1));o=i.pop();)if(!r(s=o.node,h=o.x0,_=o.y0,p=o.x1,x=o.y1)&&s.length){var b=(h+p)/2,A=(_+x)/2;(l=s[3])&&i.push(new _n(l,b,A,p,x)),(l=s[2])&&i.push(new _n(l,h,A,b,x)),(l=s[1])&&i.push(new _n(l,b,_,p,A)),(l=s[0])&&i.push(new _n(l,h,_,b,A))}return this}function $u(r){var i=[],o=[],s;for(this._root&&i.push(new _n(this._root,this._x0,this._y0,this._x1,this._y1));s=i.pop();){var l=s.node;if(l.length){var h,_=s.x0,p=s.y0,x=s.x1,b=s.y1,A=(_+x)/2,k=(p+b)/2;(h=l[0])&&i.push(new _n(h,_,p,A,k)),(h=l[1])&&i.push(new _n(h,A,p,x,k)),(h=l[2])&&i.push(new _n(h,_,k,A,b)),(h=l[3])&&i.push(new _n(h,A,k,x,b))}o.push(s)}for(;s=o.pop();)r(s.node,s.x0,s.y0,s.x1,s.y1);return this}function Eu(r){return r[0]}function Ou(r){return arguments.length?(this._x=r,this):this._x}function Pu(r){return r[1]}function Du(r){return arguments.length?(this._y=r,this):this._y}function pr(r,i,o){var s=new Ko(i??Eu,o??Pu,NaN,NaN,NaN,NaN);return r==null?s:s.addAll(r)}function Ko(r,i,o,s,l,h){this._x=r,this._y=i,this._x0=o,this._y0=s,this._x1=l,this._y1=h,this._root=void 0}function zu(r){for(var i={data:r.data},o=i;r=r.next;)o=o.next={data:r.data};return i}var Sn=pr.prototype=Ko.prototype;Sn.copy=function(){var r=new Ko(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root,o,s;if(!i)return r;if(!i.length)return r._root=zu(i),r;for(o=[{source:i,target:r._root=new Array(4)}];i=o.pop();)for(var l=0;l<4;++l)(s=i.source[l])&&(s.length?o.push({source:s,target:i.target[l]=new Array(4)}):i.target[l]=zu(s));return r};Sn.add=yu;Sn.addAll=bu;Sn.cover=wu;Sn.data=Tu;Sn.extent=Au;Sn.find=Mu;Sn.remove=Su;Sn.removeAll=Cu;Sn.root=ku;Sn.size=Lu;Sn.visit=Ru;Sn.visitAfter=$u;Sn.x=Ou;Sn.y=Du;function jd(r){return r.x+r.vx}function Zd(r){return r.y+r.vy}function Fu(r){var i,o,s=1,l=1;typeof r!="function"&&(r=on(r==null?1:+r));function h(){for(var x,b=i.length,A,k,S,R,E,M,z=0;z<l;++z)for(A=pr(i,jd,Zd).visitAfter(_),x=0;x<b;++x)k=i[x],E=o[k.index],M=E*E,S=k.x+k.vx,R=k.y+k.vy,A.visit(D);function D(B,X,U,Z,it){var q=B.data,ct=B.r,ut=E+ct;if(q){if(q.index>k.index){var C=S-q.x-q.vx,Ct=R-q.y-q.vy,Nt=C*C+Ct*Ct;Nt<ut*ut&&(C===0&&(C=Wn(),Nt+=C*C),Ct===0&&(Ct=Wn(),Nt+=Ct*Ct),Nt=(ut-(Nt=Math.sqrt(Nt)))/Nt*s,k.vx+=(C*=Nt)*(ut=(ct*=ct)/(M+ct)),k.vy+=(Ct*=Nt)*ut,q.vx-=C*(ut=1-ut),q.vy-=Ct*ut)}return}return X>S+ut||Z<S-ut||U>R+ut||it<R-ut}}function _(x){if(x.data)return x.r=o[x.data.index];for(var b=x.r=0;b<4;++b)x[b]&&x[b].r>x.r&&(x.r=x[b].r)}function p(){if(i){var x,b=i.length,A;for(o=new Array(b),x=0;x<b;++x)A=i[x],o[A.index]=+r(A,x,i)}}return h.initialize=function(x){i=x,p()},h.iterations=function(x){return arguments.length?(l=+x,h):l},h.strength=function(x){return arguments.length?(s=+x,h):s},h.radius=function(x){return arguments.length?(r=typeof x=="function"?x:on(+x),p(),h):r},h}var Nu=Be(li());function Kd(r){return r.index}function Iu(r,i){var o=r.get(i);if(!o)throw new Error("missing: "+i);return o}function Xu(r){var i=Kd,o=A,s,l=on(30),h,_,p,x,b=1;r==null&&(r=[]);function A(M){return 1/Math.min(p[M.source.index],p[M.target.index])}function k(M){for(var z=0,D=r.length;z<b;++z)for(var B=0,X,U,Z,it,q,ct,ut;B<D;++B)X=r[B],U=X.source,Z=X.target,it=Z.x+Z.vx-U.x-U.vx||Wn(),q=Z.y+Z.vy-U.y-U.vy||Wn(),ct=Math.sqrt(it*it+q*q),ct=(ct-h[B])/ct*M*s[B],it*=ct,q*=ct,Z.vx-=it*(ut=x[B]),Z.vy-=q*ut,U.vx+=it*(ut=1-ut),U.vy+=q*ut}function S(){if(_){var M,z=_.length,D=r.length,B=(0,Nu.map)(_,i),X;for(M=0,p=new Array(z);M<D;++M)X=r[M],X.index=M,typeof X.source!="object"&&(X.source=Iu(B,X.source)),typeof X.target!="object"&&(X.target=Iu(B,X.target)),p[X.source.index]=(p[X.source.index]||0)+1,p[X.target.index]=(p[X.target.index]||0)+1;for(M=0,x=new Array(D);M<D;++M)X=r[M],x[M]=p[X.source.index]/(p[X.source.index]+p[X.target.index]);s=new Array(D),R(),h=new Array(D),E()}}function R(){if(_)for(var M=0,z=r.length;M<z;++M)s[M]=+o(r[M],M,r)}
20function E(){if(_)for(var M=0,z=r.length;M<z;++M)h[M]=+l(r[M],M,r)}return k.initialize=function(M){_=M,S()},k.links=function(M){return arguments.length?(r=M,S(),k):r},k.id=function(M){return arguments.length?(i=M,k):i},k.iterations=function(M){return arguments.length?(b=+M,k):b},k.strength=function(M){return arguments.length?(o=typeof M=="function"?M:on(+M),R(),k):o},k.distance=function(M){return arguments.length?(l=typeof M=="function"?M:on(+M),E(),k):l},k}var Bu=Be(Tr()),Yu=Be(li()),Hu=Be(Gi());function Vu(r){return r.x}function qu(r){return r.y}var Qd=10,Jd=Math.PI*(3-Math.sqrt(5));function Uu(r){var i,o=1,s=.001,l=1-Math.pow(s,1/300),h=0,_=.6,p=(0,Yu.map)(),x=(0,Hu.timer)(A),b=(0,Bu.dispatch)("tick","end");r==null&&(r=[]);function A(){k(),b.call("tick",i),o<s&&(x.stop(),b.call("end",i))}function k(E){var M,z=r.length,D;E===void 0&&(E=1);for(var B=0;B<E;++B)for(o+=(h-o)*l,p.each(function(X){X(o)}),M=0;M<z;++M)D=r[M],D.fx==null?D.x+=D.vx*=_:(D.x=D.fx,D.vx=0),D.fy==null?D.y+=D.vy*=_:(D.y=D.fy,D.vy=0);return i}function S(){for(var E=0,M=r.length,z;E<M;++E){if(z=r[E],z.index=E,isNaN(z.fx)||(z.x=z.fx),isNaN(z.fy)||(z.y=z.fy),isNaN(z.x)||isNaN(z.y)){var D=Qd*Math.sqrt(E),B=E*Jd;z.x=D*Math.cos(B),z.y=D*Math.sin(B)}(isNaN(z.vx)||isNaN(z.vy))&&(z.vx=z.vy=0)}}function R(E){return E.initialize&&E.initialize(r),E}return S(),i={tick:k,restart:function(){return x.restart(A),i},stop:function(){return x.stop(),i},nodes:function(E){return arguments.length?(r=E,S(),p.each(R),i):r},alpha:function(E){return arguments.length?(o=+E,i):o},alphaMin:function(E){return arguments.length?(s=+E,i):s},alphaDecay:function(E){return arguments.length?(l=+E,i):+l},alphaTarget:function(E){return arguments.length?(h=+E,i):h},velocityDecay:function(E){return arguments.length?(_=1-E,i):1-_},force:function(E,M){return arguments.length>1?(M==null?p.remove(E):p.set(E,R(M)),i):p.get(E)},find:function(E,M,z){var D=0,B=r.length,X,U,Z,it,q;for(z==null?z=1/0:z*=z,D=0;D<B;++D)it=r[D],X=E-it.x,U=M-it.y,Z=X*X+U*U,Z<z&&(q=it,z=Z);return q},on:function(E,M){return arguments.length>1?(b.on(E,M),i):b.on(E)}}}function Wu(){var r,i,o,s=on(-30),l,h=1,_=1/0,p=.81;function x(S){var R,E=r.length,M=pr(r,Vu,qu).visitAfter(A);for(o=S,R=0;R<E;++R)i=r[R],M.visit(k)}function b(){if(r){var S,R=r.length,E;for(l=new Array(R),S=0;S<R;++S)E=r[S],l[E.index]=+s(E,S,r)}}function A(S){var R=0,E,M,z=0,D,B,X;if(S.length){for(D=B=X=0;X<4;++X)(E=S[X])&&(M=Math.abs(E.value))&&(R+=E.value,z+=M,D+=M*E.x,B+=M*E.y);S.x=D/z,S.y=B/z}else{E=S,E.x=E.data.x,E.y=E.data.y;do R+=l[E.data.index];while(E=E.next)}S.value=R}function k(S,R,E,M){if(!S.value)return!0;var z=S.x-i.x,D=S.y-i.y,B=M-R,X=z*z+D*D;if(B*B/p<X)return X<_&&(z===0&&(z=Wn(),X+=z*z),D===0&&(D=Wn(),X+=D*D),X<h&&(X=Math.sqrt(h*X)),i.vx+=z*S.value*o/X,i.vy+=D*S.value*o/X),!0;if(S.length||X>=_)return;(S.data!==i||S.next)&&(z===0&&(z=Wn(),X+=z*z),D===0&&(D=Wn(),X+=D*D),X<h&&(X=Math.sqrt(h*X)));do S.data!==i&&(B=l[S.data.index]*o/X,i.vx+=z*B,i.vy+=D*B);while(S=S.next)}return x.initialize=function(S){r=S,b()},x.strength=function(S){return arguments.length?(s=typeof S=="function"?S:on(+S),b(),x):s},x.distanceMin=function(S){return arguments.length?(h=S*S,x):Math.sqrt(h)},x.distanceMax=function(S){return arguments.length?(_=S*S,x):Math.sqrt(_)},x.theta=function(S){return arguments.length?(p=S*S,x):Math.sqrt(p)},x}function Gu(r,i,o){var s,l=on(.1),h,_;typeof r!="function"&&(r=on(+r)),i==null&&(i=0),o==null&&(o=0);function p(b){for(var A=0,k=s.length;A<k;++A){var S=s[A],R=S.x-i||1e-6,E=S.y-o||1e-6,M=Math.sqrt(R*R+E*E),z=(_[A]-M)*h[A]*b/M;S.vx+=R*z,S.vy+=E*z}}function x(){if(s){var b,A=s.length;for(h=new Array(A),_=new Array(A),b=0;b<A;++b)_[b]=+r(s[b],b,s),h[b]=isNaN(_[b])?0:+l(s[b],b,s)}}return p.initialize=function(b){s=b,x()},p.strength=function(b){return arguments.length?(l=typeof b=="function"?b:on(+b),x(),p):l},p.radius=function(b){return arguments.length?(r=typeof b=="function"?b:on(+b),x(),p):r},p.x=function(b){return arguments.length?(i=+b,p):i},p.y=function(b){return arguments.length?(o=+b,p):o},p}function ju(r){var i=on(.1),o,s,l;typeof r!="function"&&(r=on(r==null?0:+r));function h(p){for(var x=0,b=o.length,A;x<b;++x)A=o[x],A.vx+=(l[x]-A.x)*s[x]*p}function _(){if(o){var p,x=o.length;for(s=new Array(x),l=new Array(x),p=0;p<x;
20++p)s[p]=isNaN(l[p]=+r(o[p],p,o))?0:+i(o[p],p,o)}}return h.initialize=function(p){o=p,_()},h.strength=function(p){return arguments.length?(i=typeof p=="function"?p:on(+p),_(),h):i},h.x=function(p){return arguments.length?(r=typeof p=="function"?p:on(+p),_(),h):r},h}function Zu(r){var i=on(.1),o,s,l;typeof r!="function"&&(r=on(r==null?0:+r));function h(p){for(var x=0,b=o.length,A;x<b;++x)A=o[x],A.vy+=(l[x]-A.y)*s[x]*p}function _(){if(o){var p,x=o.length;for(s=new Array(x),l=new Array(x),p=0;p<x;++p)s[p]=isNaN(l[p]=+r(o[p],p,o))?0:+i(o[p],p,o)}}return h.initialize=function(p){o=p,_()},h.strength=function(p){return arguments.length?(i=typeof p=="function"?p:on(+p),_(),h):i},h.y=function(p){return arguments.length?(r=typeof p=="function"?p:on(+p),_(),h):r},h}v(m,Be(Bo()));function En(){return new Ma}function Ma(){this.reset()}Ma.prototype={constructor:Ma,reset:function(){this.s=this.t=0},add:function(r){Ku(Aa,r,this.t),Ku(this,Aa.s,this.s),this.s?this.t+=Aa.t:this.s=Aa.t},valueOf:function(){return this.s}};var Aa=new Ma;function Ku(r,i,o){var s=r.s=i+o,l=s-i,h=s-l;r.t=i-h+(o-l)}var ae=1e-6,gi=1e-12,Ye=Math.PI,en=Ye/2,Vr=Ye/4,vn=Ye*2,Ge=180/Ye,xe=Ye/180,Pe=Math.abs,Nn=Math.atan,rn=Math.atan2,ee=Math.cos,pi=Math.ceil,Sa=Math.exp;var Mr=Math.log,Ca=Math.pow,Qt=Math.sin,mr=Math.sign||function(r){return r>0?1:r<0?-1:0},Ue=Math.sqrt,qr=Math.tan;function ka(r){return r>1?0:r<-1?Ye:Math.acos(r)}function an(r){return r>1?en:r<-1?-en:Math.asin(r)}function Qo(r){return(r=Qt(r/2))*r}function Ke(){}function La(r,i){r&&Ju.hasOwnProperty(r.type)&&Ju[r.type](r,i)}var Qu={Feature:function(r,i){La(r.geometry,i)},FeatureCollection:function(r,i){for(var o=r.features,s=-1,l=o.length;++s<l;)La(o[s].geometry,i)}},Ju={Sphere:function(r,i){i.sphere()},Point:function(r,i){r=r.coordinates,i.point(r[0],r[1],r[2])},MultiPoint:function(r,i){for(var o=r.coordinates,s=-1,l=o.length;++s<l;)r=o[s],i.point(r[0],r[1],r[2])},LineString:function(r,i){Jo(r.coordinates,i,0)},MultiLineString:function(r,i){for(var o=r.coordinates,s=-1,l=o.length;++s<l;)Jo(o[s],i,0)},Polygon:function(r,i){tl(r.coordinates,i)},MultiPolygon:function(r,i){for(var o=r.coordinates,s=-1,l=o.length;++s<l;)tl(o[s],i)},GeometryCollection:function(r,i){for(var o=r.geometries,s=-1,l=o.length;++s<l;)La(o[s],i)}};function Jo(r,i,o){var s=-1,l=r.length-o,h;for(i.lineStart();++s<l;)h=r[s],i.point(h[0],h[1],h[2]);i.lineEnd()}function tl(r,i){var o=-1,s=r.length;for(i.polygonStart();++o<s;)Jo(r[o],i,1);i.polygonEnd()}function bn(r,i){r&&Qu.hasOwnProperty(r.type)?Qu[r.type](r,i):La(r,i)}var mi=En(),Ra=En(),el,nl,ts,es,ns,Gn={point:Ke,lineStart:Ke,lineEnd:Ke,polygonStart:function(){mi.reset(),Gn.lineStart=tg,Gn.lineEnd=eg},polygonEnd:function(){var r=+mi;Ra.add(r<0?vn+r:r),this.lineStart=this.lineEnd=this.point=Ke},sphere:function(){Ra.add(vn)}};function tg(){Gn.point=ng}function eg(){rl(el,nl)}function ng(r,i){Gn.point=rl,el=r,nl=i,r*=xe,i*=xe,ts=r,es=ee(i=i/2+Vr),ns=Qt(i)}function rl(r,i){r*=xe,i*=xe,i=i/2+Vr;var o=r-ts,s=o>=0?1:-1,l=s*o,h=ee(i),_=Qt(i),p=ns*_,x=es*h+p*ee(l),b=p*s*Qt(l);mi.add(rn(b,x)),ts=r,es=h,ns=_}function il(r){return Ra.reset(),bn(r,Gn),Ra*2}function Sr(r){return[rn(r[1],r[0]),an(r[2])]}function Xn(r){var i=r[0],o=r[1],s=ee(o);return[s*ee(i),s*Qt(i),Qt(o)]}function vi(r,i){return r[0]*i[0]+r[1]*i[1]+r[2]*i[2]}function cr(r,i){return[r[1]*i[2]-r[2]*i[1],r[2]*i[0]-r[0]*i[2],r[0]*i[1]-r[1]*i[0]]}function $a(r,i){r[0]+=i[0],r[1]+=i[1],r[2]+=i[2]}function xi(r,i){return[r[0]*i,r[1]*i,r[2]*i]}function Cr(r){var i=Ue(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=i,r[1]/=i,r[2]/=i}var fn,Pn,dn,Bn,kr,cl,ul,Ur,yi=En(),vr,lr,ur={point:rs,lineStart:al,lineEnd:ol,polygonStart:function(){ur.point=fl,ur.lineStart=rg,ur.lineEnd=ig,yi.reset(),Gn.polygonStart()},polygonEnd:function(){Gn.polygonEnd(),ur.point=rs,ur.lineStart=al,ur.lineEnd=ol,mi<0?(fn=-(dn=180),Pn=-(Bn=90)):yi>ae?Bn=90:yi<-ae&&(Pn=-90),lr[0]=fn,lr[1]=dn}};function rs(r,i){vr.push(lr=[fn=r,dn=r]),i<Pn&&(Pn=i),i>Bn&&(Bn=i)}function ll(r,i){var o=Xn([r*xe,i*xe]);if(Ur){var s=cr(Ur,o),l=[s[1],-s[0],0],h=cr(l,s);Cr(h),h=Sr(h);var _=r-kr,p=_>0?1:-1,x=h[0]*Ge*p,b,A=Pe(_)>180;A^(p*kr<x&&x<p*r)?(b=h[1]*Ge,b>Bn&&(Bn=b)):(x=(x+360)%360-180,A^(p*kr<x&&x<p*r)?(b=-h[1]*Ge,b<Pn&&(Pn=b)):(i<Pn&&(Pn=i),i>Bn&&(Bn=i))),A?r<kr?On(fn,r)>On(fn,dn)&&(dn=r):On(r,dn)>On(fn,dn)&&(fn=r):dn>=fn?(r<fn&&(fn=r),r>
20dn&&(dn=r)):r>kr?On(fn,r)>On(fn,dn)&&(dn=r):On(r,dn)>On(fn,dn)&&(fn=r)}else vr.push(lr=[fn=r,dn=r]);i<Pn&&(Pn=i),i>Bn&&(Bn=i),Ur=o,kr=r}function al(){ur.point=ll}function ol(){lr[0]=fn,lr[1]=dn,ur.point=rs,Ur=null}function fl(r,i){if(Ur){var o=r-kr;yi.add(Pe(o)>180?o+(o>0?360:-360):o)}else cl=r,ul=i;Gn.point(r,i),ll(r,i)}function rg(){Gn.lineStart()}function ig(){fl(cl,ul),Gn.lineEnd(),Pe(yi)>ae&&(fn=-(dn=180)),lr[0]=fn,lr[1]=dn,Ur=null}function On(r,i){return(i-=r)<0?i+360:i}function ag(r,i){return r[0]-i[0]}function sl(r,i){return r[0]<=r[1]?r[0]<=i&&i<=r[1]:i<r[0]||r[1]<i}function hl(r){var i,o,s,l,h,_,p;if(Bn=dn=-(fn=Pn=1/0),vr=[],bn(r,ur),o=vr.length){for(vr.sort(ag),i=1,s=vr[0],h=[s];i<o;++i)l=vr[i],sl(s,l[0])||sl(s,l[1])?(On(s[0],l[1])>On(s[0],s[1])&&(s[1]=l[1]),On(l[0],s[1])>On(s[0],s[1])&&(s[0]=l[0])):h.push(s=l);for(_=-1/0,o=h.length-1,i=0,s=h[o];i<=o;s=l,++i)l=h[i],(p=On(s[1],l[0]))>_&&(_=p,fn=l[0],dn=s[1])}return vr=lr=null,fn===1/0||Pn===1/0?[[NaN,NaN],[NaN,NaN]]:[[fn,Pn],[dn,Bn]]}var _i,Ea,Oa,Pa,Da,za,Fa,Ia,is,as,os,pl,ml,Cn,kn,Ln,jn={sphere:Ke,point:ss,lineStart:dl,lineEnd:gl,polygonStart:function(){jn.lineStart=cg,jn.lineEnd=ug},polygonEnd:function(){jn.lineStart=dl,jn.lineEnd=gl}};function ss(r,i){r*=xe,i*=xe;var o=ee(i);bi(o*ee(r),o*Qt(r),Qt(i))}function bi(r,i,o){++_i,Oa+=(r-Oa)/_i,Pa+=(i-Pa)/_i,Da+=(o-Da)/_i}function dl(){jn.point=og}function og(r,i){r*=xe,i*=xe;var o=ee(i);Cn=o*ee(r),kn=o*Qt(r),Ln=Qt(i),jn.point=sg,bi(Cn,kn,Ln)}function sg(r,i){r*=xe,i*=xe;var o=ee(i),s=o*ee(r),l=o*Qt(r),h=Qt(i),_=rn(Ue((_=kn*h-Ln*l)*_+(_=Ln*s-Cn*h)*_+(_=Cn*l-kn*s)*_),Cn*s+kn*l+Ln*h);Ea+=_,za+=_*(Cn+(Cn=s)),Fa+=_*(kn+(kn=l)),Ia+=_*(Ln+(Ln=h)),bi(Cn,kn,Ln)}function gl(){jn.point=ss}function cg(){jn.point=lg}function ug(){vl(pl,ml),jn.point=ss}function lg(r,i){pl=r,ml=i,r*=xe,i*=xe,jn.point=vl;var o=ee(i);Cn=o*ee(r),kn=o*Qt(r),Ln=Qt(i),bi(Cn,kn,Ln)}function vl(r,i){r*=xe,i*=xe;var o=ee(i),s=o*ee(r),l=o*Qt(r),h=Qt(i),_=kn*h-Ln*l,p=Ln*s-Cn*h,x=Cn*l-kn*s,b=Ue(_*_+p*p+x*x),A=an(b),k=b&&-A/b;is+=k*_,as+=k*p,os+=k*x,Ea+=A,za+=A*(Cn+(Cn=s)),Fa+=A*(kn+(kn=l)),Ia+=A*(Ln+(Ln=h)),bi(Cn,kn,Ln)}function xl(r){_i=Ea=Oa=Pa=Da=za=Fa=Ia=is=as=os=0,bn(r,jn);var i=is,o=as,s=os,l=i*i+o*o+s*s;return l<gi&&(i=za,o=Fa,s=Ia,Ea<ae&&(i=Oa,o=Pa,s=Da),l=i*i+o*o+s*s,l<gi)?[NaN,NaN]:[rn(o,i)*Ge,an(s/Ue(l))*Ge]}function Lr(r){return function(){return r}}function wi(r,i){function o(s,l){return s=r(s,l),i(s[0],s[1])}return r.invert&&i.invert&&(o.invert=function(s,l){return s=i.invert(s,l),s&&r.invert(s[0],s[1])}),o}function cs(r,i){return[Pe(r)>Ye?r+Math.round(-r/vn)*vn:r,i]}cs.invert=cs;function Ti(r,i,o){return(r%=vn)?i||o?wi(_l(r),bl(i,o)):_l(r):i||o?bl(i,o):cs}function yl(r){return function(i,o){return i+=r,[i>Ye?i-vn:i<-Ye?i+vn:i,o]}}function _l(r){var i=yl(r);return i.invert=yl(-r),i}function bl(r,i){var o=ee(r),s=Qt(r),l=ee(i),h=Qt(i);function _(p,x){var b=ee(x),A=ee(p)*b,k=Qt(p)*b,S=Qt(x),R=S*o+A*s;return[rn(k*l-R*h,A*o-S*s),an(R*l+k*h)]}return _.invert=function(p,x){var b=ee(x),A=ee(p)*b,k=Qt(p)*b,S=Qt(x),R=S*l-k*h;return[rn(k*l+S*h,A*o+R*s),an(R*o-A*s)]},_}function Na(r){r=Ti(r[0]*xe,r[1]*xe,r.length>2?r[2]*xe:0);function i(o){return o=r(o[0]*xe,o[1]*xe),o[0]*=Ge,o[1]*=Ge,o}return i.invert=function(o){return o=r.invert(o[0]*xe,o[1]*xe),o[0]*=Ge,o[1]*=Ge,o},i}function us(r,i,o,s,l,h){if(o){var _=ee(i),p=Qt(i),x=s*o;l==null?(l=i+s*vn,h=i-x/2):(l=wl(_,l),h=wl(_,h),(s>0?l<h:l>h)&&(l+=s*vn));for(var b,A=l;s>0?A>h:A<h;A-=x)b=Sr([_,-p*ee(A),-p*Qt(A)]),r.point(b[0],b[1])}}function wl(r,i){i=Xn(i),i[0]-=r,Cr(i);var o=ka(-i[1]);return((-i[2]<0?-o:o)+vn-ae)%vn}function Tl(){var r=Lr([0,0]),i=Lr(90),o=Lr(6),s,l,h={point:_};function _(x,b){s.push(x=l(x,b)),x[0]*=Ge,x[1]*=Ge}function p(){var x=r.apply(this,arguments),b=i.apply(this,arguments)*xe,A=o.apply(this,arguments)*xe;return s=[],l=Ti(-x[0]*xe,-x[1]*xe,0).invert,us(h,b,A,1),x={type:"Polygon",coordinates:[s]},s=l=null,x}return p.center=function(x){return arguments.length?(r=typeof x=="function"?x:Lr([+x[0],+x[1]]),p):r},p.radius=function(x){return arguments.length?(i=typeof x=="function"?x:Lr(+x),p):i},p.precision=function(x){return arguments.length?(o=typeof x=="function"?x:Lr(+x),p):o},p}function Xa(){var r=[],i;return{point:function(o,s){i.push([o,s])},lineStart:function(){r.push(i=[])},lineEnd:Ke,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var o=r;return r=[],i=null,o}}}function Wr(r,i){return Pe(r[0]-i[0])<ae&&Pe(r[1]-i[1])<ae}
20function Ba(r,i,o,s){this.x=r,this.z=i,this.o=o,this.e=s,this.v=!1,this.n=this.p=null}function Ya(r,i,o,s,l){var h=[],_=[],p,x;if(r.forEach(function(E){if(!((M=E.length-1)<=0)){var M,z=E[0],D=E[M],B;if(Wr(z,D)){for(l.lineStart(),p=0;p<M;++p)l.point((z=E[p])[0],z[1]);l.lineEnd();return}h.push(B=new Ba(z,E,null,!0)),_.push(B.o=new Ba(z,null,B,!1)),h.push(B=new Ba(D,E,null,!1)),_.push(B.o=new Ba(D,null,B,!0))}}),!!h.length){for(_.sort(i),Al(h),Al(_),p=0,x=_.length;p<x;++p)_[p].e=o=!o;for(var b=h[0],A,k;;){for(var S=b,R=!0;S.v;)if((S=S.n)===b)return;A=S.z,l.lineStart();do{if(S.v=S.o.v=!0,S.e){if(R)for(p=0,x=A.length;p<x;++p)l.point((k=A[p])[0],k[1]);else s(S.x,S.n.x,1,l);S=S.n}else{if(R)for(A=S.p.z,p=A.length-1;p>=0;--p)l.point((k=A[p])[0],k[1]);else s(S.x,S.p.x,-1,l);S=S.p}S=S.o,A=S.z,R=!R}while(!S.v);l.lineEnd()}}}function Al(r){if(i=r.length){for(var i,o=0,s=r[0],l;++o<i;)s.n=l=r[o],l.p=s,s=l;s.n=l=r[0],l.p=s}}var ls=En();function Ha(r,i){var o=i[0],s=i[1],l=Qt(s),h=[Qt(o),-ee(o),0],_=0,p=0;ls.reset(),l===1?s=en+ae:l===-1&&(s=-en-ae);for(var x=0,b=r.length;x<b;++x)if(k=(A=r[x]).length)for(var A,k,S=A[k-1],R=S[0],E=S[1]/2+Vr,M=Qt(E),z=ee(E),D=0;D<k;++D,R=X,M=Z,z=it,S=B){var B=A[D],X=B[0],U=B[1]/2+Vr,Z=Qt(U),it=ee(U),q=X-R,ct=q>=0?1:-1,ut=ct*q,C=ut>Ye,Ct=M*Z;if(ls.add(rn(Ct*ct*Qt(ut),z*it+Ct*ee(ut))),_+=C?q+ct*vn:q,C^R>=o^X>=o){var Nt=cr(Xn(S),Xn(B));Cr(Nt);var gt=cr(h,Nt);Cr(gt);var zt=(C^q>=0?-1:1)*an(gt[2]);(s>zt||s===zt&&(Nt[0]||Nt[1]))&&(p+=C^q>=0?1:-1)}}return(_<-ae||_<ae&&ls<-ae)^p&1}var Ml=Be(or());function Va(r,i,o,s){return function(l){var h=i(l),_=Xa(),p=i(_),x=!1,b,A,k,S={point:R,lineStart:M,lineEnd:z,polygonStart:function(){S.point=D,S.lineStart=B,S.lineEnd=X,A=[],b=[]},polygonEnd:function(){S.point=R,S.lineStart=M,S.lineEnd=z,A=(0,Ml.merge)(A);var U=Ha(b,s);A.length?(x||(l.polygonStart(),x=!0),Ya(A,hg,U,o,l)):U&&(x||(l.polygonStart(),x=!0),l.lineStart(),o(null,null,1,l),l.lineEnd()),x&&(l.polygonEnd(),x=!1),A=b=null},sphere:function(){l.polygonStart(),l.lineStart(),o(null,null,1,l),l.lineEnd(),l.polygonEnd()}};function R(U,Z){r(U,Z)&&l.point(U,Z)}function E(U,Z){h.point(U,Z)}function M(){S.point=E,h.lineStart()}function z(){S.point=R,h.lineEnd()}function D(U,Z){k.push([U,Z]),p.point(U,Z)}function B(){p.lineStart(),k=[]}function X(){D(k[0][0],k[0][1]),p.lineEnd();var U=p.clean(),Z=_.result(),it,q=Z.length,ct,ut,C;if(k.pop(),b.push(k),k=null,!!q){if(U&1){if(ut=Z[0],(ct=ut.length-1)>0){for(x||(l.polygonStart(),x=!0),l.lineStart(),it=0;
vendor: 4,897 bytes, line 20
20it<ct;++it)l.point((C=ut[it])[0],C[1]);l.lineEnd()}return}q>1&&U&2&&Z.push(Z.pop().concat(Z.shift())),A.push(Z.filter(fg))}}return S}}function fg(r){return r.length>1}function hg(r,i){return((r=r.x)[0]<0?r[1]-en-ae:en-r[1])-((i=i.x)[0]<0?i[1]-en-ae:en-i[1])}var Ai=Va(function(){return!0},dg,pg,[-Ye,-en]);function dg(r){var i=NaN,o=NaN,s=NaN,l;return{lineStart:function(){r.lineStart(),l=1},point:function(h,_){var p=h>0?Ye:-Ye,x=Pe(h-i);Pe(x-Ye)<ae?(r.point(i,o=(o+_)/2>0?en:-en),r.point(s,o),r.lineEnd(),r.lineStart(),r.point(p,o),r.point(h,o),l=0):s!==p&&x>=Ye&&(Pe(i-s)<ae&&(i-=s*ae),Pe(h-p)<ae&&(h-=p*ae),o=gg(i,o,h,_),r.point(s,o),r.lineEnd(),r.lineStart(),r.point(p,o),l=0),r.point(i=h,o=_),s=p},lineEnd:function(){r.lineEnd(),i=o=NaN},clean:function(){return 2-l}}}function gg(r,i,o,s){var l,h,_=Qt(r-o);return Pe(_)>ae?Nn((Qt(i)*(h=ee(s))*Qt(o)-Qt(s)*(l=ee(i))*Qt(r))/(l*h*_)):(i+s)/2}function pg(r,i,o,s){var l;if(r==null)l=o*en,s.point(-Ye,l),s.point(0,l),s.point(Ye,l),s.point(Ye,0),s.point(Ye,-l),s.point(0,-l),s.point(-Ye,-l),s.point(-Ye,0),s.point(-Ye,l);else if(Pe(r[0]-i[0])>ae){var h=r[0]<i[0]?Ye:-Ye;l=o*h/2,s.point(-h,l),s.point(0,l),s.point(h,l)}else s.point(i[0],i[1])}function qa(r){var i=ee(r),o=6*xe,s=i>0,l=Pe(i)>ae;function h(A,k,S,R){us(R,r,o,S,A,k)}function _(A,k){return ee(A)*ee(k)>i}function p(A){var k,S,R,E,M;return{lineStart:function(){E=R=!1,M=1},point:function(z,D){var B=[z,D],X,U=_(z,D),Z=s?U?0:b(z,D):U?b(z+(z<0?Ye:-Ye),D):0;if(!k&&(E=R=U)&&A.lineStart(),U!==R&&(X=x(k,B),(!X||Wr(k,X)||Wr(B,X))&&(B[0]+=ae,B[1]+=ae,U=_(B[0],B[1]))),U!==R)M=0,U?(A.lineStart(),X=x(B,k),A.point(X[0],X[1])):(X=x(k,B),A.point(X[0],X[1]),A.lineEnd()),k=X;else if(l&&k&&s^U){var it;!(Z&S)&&(it=x(B,k,!0))&&(M=0,s?(A.lineStart(),A.point(it[0][0],it[0][1]),A.point(it[1][0],it[1][1]),A.lineEnd()):(A.point(it[1][0],it[1][1]),A.lineEnd(),A.lineStart(),A.point(it[0][0],it[0][1])))}U&&(!k||!Wr(k,B))&&A.point(B[0],B[1]),k=B,R=U,S=Z},lineEnd:function(){R&&A.lineEnd(),k=null},clean:function(){return M|(E&&R)<<1}}}function x(A,k,S){var R=Xn(A),E=Xn(k),M=[1,0,0],z=cr(R,E),D=vi(z,z),B=z[0],X=D-B*B;if(!X)return!S&&A;var U=i*D/X,Z=-i*B/X,it=cr(M,z),q=xi(M,U),ct=xi(z,Z);$a(q,ct);var ut=it,C=vi(q,ut),Ct=vi(ut,ut),Nt=C*C-Ct*(vi(q,q)-1);if(!(Nt<0)){var gt=Ue(Nt),zt=xi(ut,(-C-gt)/Ct);if($a(zt,q),zt=Sr(zt),!S)return zt;var Wt=A[0],pt=k[0],Ot=A[1],At=k[1],Bt;pt<Wt&&(Bt=Wt,Wt=pt,pt=Bt);var kt=pt-Wt,Ft=Pe(kt-Ye)<ae,fe=Ft||kt<ae;if(!Ft&&At<Ot&&(Bt=Ot,Ot=At,At=Bt),fe?Ft?Ot+At>0^zt[1]<(Pe(zt[0]-Wt)<ae?Ot:At):Ot<=zt[1]&&zt[1]<=At:kt>Ye^(Wt<=zt[0]&&zt[0]<=pt)){var Jt=xi(ut,(-C+gt)/Ct);return $a(Jt,q),[zt,Sr(Jt)]}}}function b(A,k){var S=s?r:Ye-r,R=0;return A<-S?R|=1:A>S&&(R|=2),k<-S?R|=4:k>S&&(R|=8),R}return Va(_,p,h,s?[0,-r]:[-Ye,r-Ye])}function Sl(r,i,o,s,l,h){var _=r[0],p=r[1],x=i[0],b=i[1],A=0,k=1,S=x-_,R=b-p,E;if(E=o-_,!(!S&&E>0)){if(E/=S,S<0){if(E<A)return;E<k&&(k=E)}else if(S>0){if(E>k)return;E>A&&(A=E)}if(E=l-_,!(!S&&E<0)){if(E/=S,S<0){if(E>k)return;E>A&&(A=E)}else if(S>0){if(E<A)return;E<k&&(k=E)}if(E=s-p,!(!R&&E>0)){if(E/=R,R<0){if(E<A)return;E<k&&(k=E)}else if(R>0){if(E>k)return;E>A&&(A=E)}if(E=h-p,!(!R&&E<0)){if(E/=R,R<0){if(E>k)return;E>A&&(A=E)}else if(R>0){if(E<A)return;E<k&&(k=E)}return A>0&&(r[0]=_+A*S,r[1]=p+A*R),k<1&&(i[0]=_+k*S,i[1]=p+k*R),!0}}}}}var Cl=Be(or()),Mi=1e9,Ua=-Mi;function fr(r,i,o,s){function l(b,A){return r<=b&&b<=o&&i<=A&&A<=s}function h(b,A,k,S){var R=0,E=0;if(b==null||(R=_(b,k))!==(E=_(A,k))||x(b,A)<0^k>0)do S.point(R===0||R===3?r:o,R>1?s:i);while((R=(R+k+4)%4)!==E);else S.point(A[0],A[1])}function _(b,A){return Pe(b[0]-r)<ae?A>0?0:3:Pe(b[0]-o)<ae?A>0?2:1:Pe(b[1]-i)<ae?A>0?1:0:A>0?3:2}function p(b,A){return x(b.x,A.x)}function x(b,A){var k=_(b,1),S=_(A,1);return k!==S?k-S:k===0?A[1]-b[1]:k===1?b[0]-A[0]:k===2?b[1]-A[1]:A[0]-b[0]}return function(b){var A=b,k=Xa(),S,R,E,M,z,D,B,X,U,Z,it,q={point:ct,lineStart:Nt,lineEnd:gt,polygonStart:C,polygonEnd:Ct};function ct(Wt,pt){l(Wt,pt)&&A.point(Wt,pt)}function ut(){for(var Wt=0,pt=0,Ot=R.length;pt<Ot;++pt)for(var At=R[pt],Bt=1,kt=At.length,Ft=At[0],fe,Jt,oe=Ft[0],pe=Ft[1];Bt<kt;++Bt)fe=oe,Jt=pe,Ft=At[Bt],oe=Ft[0],pe=Ft[1],Jt<=s?pe>s&&(oe-fe)*(s-Jt)>(pe-Jt)*(r-fe)&&++Wt:pe<=s&&(oe-fe)*(s-Jt)<(pe-Jt)*(r-fe)&&--Wt;return Wt}function C(){A=k,S=[],R=[],it=!0}function Ct(){var Wt=ut(),pt=it&&Wt,Ot=(S=(0,Cl.merge)(S)).length;(pt||Ot)&&(b.polygonStart(),pt&&(b.lineStart(),h(null,null,1,b),b.lineEnd()),Ot&&Ya(S,p,Wt,h,b),b.polygonEnd()),A=b,S=R=E=null}function Nt(){q.point=zt,R&&R.push(E=[]),Z=!0,U=!1,B=X=NaN}function gt(){S&&(zt(M,z),D&&U&&k.rejoin(),S.push(k.result())),q.point=ct,U&&A.lineEnd()}function zt(Wt,pt){var Ot=l(Wt,pt);if(R&&E.push([Wt,pt]),Z)M=Wt,z=pt,D=Ot,Z=!1,Ot&&(A.lineStart(),A.point(Wt,pt));else if(Ot&&U)A.point(Wt,pt);else{var At=[B=Math.max(Ua,Math.min(Mi,B)),X=Math.max(Ua,Math.min(Mi,X))],Bt=[Wt=Math.max(Ua,Math.min(Mi,Wt)),pt=Math.max(Ua,Math.min(Mi,pt))];
20Sl(At,Bt,r,i,o,s)?(U||(A.lineStart(),A.point(At[0],At[1])),A.point(Bt[0],Bt[1]),Ot||A.lineEnd(),it=!1):Ot&&(A.lineStart(),A.point(Wt,pt),it=!1)}B=Wt,X=pt,U=Ot}return q}}function kl(){var r=0,i=0,o=960,s=500,l,h,_;return _={stream:function(p){return l&&h===p?l:l=fr(r,i,o,s)(h=p)},extent:function(p){return arguments.length?(r=+p[0][0],i=+p[0][1],o=+p[1][0],s=+p[1][1],l=h=null,_):[[r,i],[o,s]]}}}var fs=En(),hs,Wa,Ga,Gr={sphere:Ke,point:Ke,lineStart:mg,lineEnd:Ke,polygonStart:Ke,polygonEnd:Ke};function mg(){Gr.point=xg,Gr.lineEnd=vg}function vg(){Gr.point=Gr.lineEnd=Ke}function xg(r,i){r*=xe,i*=xe,hs=r,Wa=Qt(i),Ga=ee(i),Gr.point=yg}function yg(r,i){r*=xe,i*=xe;var o=Qt(i),s=ee(i),l=Pe(r-hs),h=ee(l),_=Qt(l),p=s*_,x=Ga*o-Wa*s*h,b=Wa*o+Ga*s*h;fs.add(rn(Ue(p*p+x*x),b)),hs=r,Wa=o,Ga=s}function ja(r){return fs.reset(),bn(r,Gr),+fs}var ds=[null,null],_g={type:"LineString",coordinates:ds};function Rr(r,i){return ds[0]=r,ds[1]=i,ja(_g)}var Ll={Feature:function(r,i){return Za(r.geometry,i)},FeatureCollection:function(r,i){for(var o=r.features,s=-1,l=o.length;++s<l;)if(Za(o[s].geometry,i))return!0;return!1}},Rl={Sphere:function(){return!0},Point:function(r,i){return $l(r.coordinates,i)},MultiPoint:function(r,i){for(var o=r.coordinates,s=-1,l=o.length;++s<l;)if($l(o[s],i))return!0;return!1},LineString:function(r,i){return El(r.coordinates,i)},MultiLineString:function(r,i){for(var o=r.coordinates,s=-1,l=o.length;++s<l;)if(El(o[s],i))return!0;return!1},Polygon:function(r,i){return Ol(r.coordinates,i)},MultiPolygon:function(r,i){for(var o=r.coordinates,s=-1,l=o.length;++s<l;)if(Ol(o[s],i))return!0;return!1},GeometryCollection:function(r,i){for(var o=r.geometries,s=-1,l=o.length;++s<l;)if(Za(o[s],i))return!0;return!1}};function Za(r,i){return r&&Rl.hasOwnProperty(r.type)?Rl[r.type](r,i):!1}function $l(r,i){return Rr(r,i)===0}function El(r,i){var o=Rr(r[0],r[1]),s=Rr(r[0],i),l=Rr(i,r[1]);return s+l<=o+ae}function Ol(r,i){return!!Ha(r.map(bg),Pl(i))}function bg(r){return r=r.map(Pl),r.pop(),r}function Pl(r){return[r[0]*xe,r[1]*xe]}function Dl(r,i){return(r&&Ll.hasOwnProperty(r.type)?Ll[r.type]:Za)(r,i)}var $r=Be(or());function zl(r,i,o){var s=(0,$r.range)(r,i-ae,o).concat(i);return function(l){return s.map(function(h){return[l,h]})}}function Fl(r,i,o){var s=(0,$r.range)(r,i-ae,o).concat(i);return function(l){return s.map(function(h){return[h,l]})}}function Ka(){var r,i,o,s,l,h,_,p,x=10,b=x,A=90,k=360,S,R,E,M,z=2.5;function D(){return{type:"MultiLineString",coordinates:B()}}function B(){return(0,$r.range)(pi(s/A)*A,o,A).map(E).concat((0,$r.range)(pi(p/k)*k,_,k).map(M)).concat((0,$r.range)(pi(i/x)*x,r,x).filter(function(X){return Pe(X%A)>ae}).map(S)).concat((0,$r.range)(pi(h/b)*b,l,b).filter(function(X){return Pe(X%k)>ae}).map(R))}return D.lines=function(){return B().map(function(X){return{type:"LineString",coordinates:X}})},D.outline=function(){return{type:"Polygon",coordinates:[E(s).concat(M(_).slice(1),E(o).reverse().slice(1),M(p).reverse().slice(1))]}},D.extent=function(X){return arguments.length?D.extentMajor(X).extentMinor(X):D.extentMinor()},D.extentMajor=function(X){return arguments.length?(s=+X[0][0],o=+X[1][0],p=+X[0][1],_=+X[1][1],s>o&&(X=s,s=o,o=X),p>_&&(X=p,p=_,_=X),D.precision(z)):[[s,p],[o,_]]},D.extentMinor=function(X){return arguments.length?(i=+X[0][0],r=+X[1][0],h=+X[0][1],l=+X[1][1],i>r&&(X=i,i=r,r=X),h>l&&(X=h,h=l,l=X),D.precision(z)):[[i,h],[r,l]]},D.step=function(X){return arguments.length?D.stepMajor(X).stepMinor(X):D.stepMinor()},D.stepMajor=function(X){return arguments.length?(A=+X[0],k=+X[1],D):[A,k]},D.stepMinor=function(X){return arguments.length?(x=+X[0],b=+X[1],D):[x,b]},D.precision=function(X){return arguments.length?(z=+X,S=zl(h,l,90),R=Fl(i,r,z),E=zl(p,_,90),M=Fl(s,o,z),D):z},D.extentMajor([[-180,-90+ae],[180,90-ae]]).extentMinor([[-180,-80-ae],[180,80+ae]])}function Il(){return Ka()()}function Nl(r,i){var o=r[0]*xe,s=r[1]*xe,l=i[0]*xe,h=i[1]*xe,_=ee(s),p=Qt(s),x=ee(h),b=Qt(h),A=_*ee(o),k=_*Qt(o),S=x*ee(l),R=x*Qt(l),E=2*an(Ue(Qo(h-s)+_*x*Qo(l-o))),M=Qt(E),z=E?function(D){var B=Qt(D*=E)/M,X=Qt(E-D)/M,U=X*A+B*S,Z=X*k+B*R,it=X*p+B*b;return[rn(Z,U)*Ge,rn(it,Ue(U*U+Z*Z))*Ge]}:function(){return[o*Ge,s*Ge]};return z.distance=E,z}function Qn(r){return r}var gs=En(),ps=En(),Xl,Bl,ms,vs,xr={point:Ke,lineStart:Ke,lineEnd:Ke,polygonStart:function(){xr.lineStart=wg,xr.lineEnd=Ag},polygonEnd:function(){xr.lineStart=xr.lineEnd=xr.point=Ke,gs.add(Pe(ps)),ps.reset()},result:function(){var r=gs/2;return gs.reset(),r}};function wg(){xr.point=Tg}function Tg(r,i){xr.point=Yl,Xl=ms=r,Bl=vs=i}function Yl(r,i){ps.add(vs*r-ms*i),ms=r,vs=i}function Ag(){Yl(Xl,Bl)}var xs=xr;var jr=1/0,Qa=jr,Si=-jr,Ja=Si,Mg={point:Sg,lineStart:Ke,lineEnd:Ke,polygonStart:Ke,polygonEnd:Ke,result:function(){var r=[[jr,Qa],[Si,Ja]];return Si=Ja=-(Qa=jr=1/0),r}};function Sg(r,i){r<jr&&(jr=r),r>Si&&(Si=r),i<Qa&&(Qa=i),i>Ja&&(Ja=i)}var Zr=Mg;var ys=0,_s=0,Ci=0,to=0,eo=0,Kr=0,bs=0,ws=0,ki=0,ql,Ul,Jn,tr,Zn={point:Er,lineStart:Hl,lineEnd:Vl,polygonStart:function(){Zn.lineStart=Lg,Zn.lineEnd=Rg},polygonEnd:function(){Zn.point=Er,Zn.lineStart=Hl,Zn.lineEnd=Vl},result:function(){var r=ki?[bs/ki,ws/ki]:Kr?[to/Kr,eo/Kr]:Ci?[ys/Ci,_s/Ci]:[NaN,NaN];return ys=_s=Ci=to=eo=Kr=bs=ws=ki=0,r}};function Er(r,i){ys+=r,_s+=i,++Ci}function Hl(){Zn.point=Cg}function Cg(r,i){Zn.point=kg,Er(Jn=r,tr=i)}function kg(r,i){var o=r-Jn,s=i-tr,l=Ue(o*o+s*s);to+=l*(Jn+r)/2,eo+=l*(tr+i)/2,Kr+=l,Er(Jn=r,tr=i)}function Vl(){Zn.point=Er}function Lg(){Zn.point=$g}function Rg(){Wl(ql,Ul)}function $g(r,i){Zn.point=Wl,Er(ql=Jn=r,Ul=tr=i)}function Wl(r,i){var o=r-Jn,s=i-tr,l=Ue(o*o+s*s);to+=l*(Jn+r)/2,eo+=l*(tr+i)/2,Kr+=l,l=tr*r-Jn*i,bs+=l*(Jn+r),ws+=l*(tr+i),ki+=l*3,Er(Jn=r,tr=i)}var Ts=Zn;function no(r){this._context=r}no.prototype={_radius:4.5,pointRadius:function(r){return this._radius=r,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(r,i){switch(this._point){case 0:{this._context.moveTo(r,i),this._point=1;break}case 1:{this._context.lineTo(r,i);break}default:{this._context.moveTo(r+this._radius,i),this._context.arc(r,i,this._radius,0,vn);break}}},result:Ke};var Ms=En(),As,Gl,jl,Li,Ri,ro={point:Ke,lineStart:function(){ro.point=Eg},lineEnd:function(){As&&Zl(Gl,jl),ro.point=Ke},polygonStart:function(){As=!0},polygonEnd:function(){As=null},result:function(){var r=+Ms;return Ms.reset(),r}};function Eg(r,i){ro.point=Zl,Gl=Li=r,jl=Ri=i}
20function Zl(r,i){Li-=r,Ri-=i,Ms.add(Ue(Li*Li+Ri*Ri)),Li=r,Ri=i}var Ss=ro;function io(){this._string=[]}io.prototype={_radius:4.5,_circle:Kl(4.5),pointRadius:function(r){return(r=+r)!==this._radius&&(this._radius=r,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(r,i){switch(this._point){case 0:{this._string.push("M",r,",",i),this._point=1;break}case 1:{this._string.push("L",r,",",i);break}default:{this._circle==null&&(this._circle=Kl(this._radius)),this._string.push("M",r,",",i,this._circle);break}}},result:function(){if(this._string.length){var r=this._string.join("");return this._string=[],r}else return null}};function Kl(r){return"m0,"+r+"a"+r+","+r+" 0 1,1 0,"+-2*r+"a"+r+","+r+" 0 1,1 0,"+2*r+"z"}function ao(r,i){var o=4.5,s,l;function h(_){return _&&(typeof o=="function"&&l.pointRadius(+o.apply(this,arguments)),bn(_,s(l))),l.result()}return h.area=function(_){return bn(_,s(xs)),xs.result()},h.measure=function(_){return bn(_,s(Ss)),Ss.result()},h.bounds=function(_){return bn(_,s(Zr)),Zr.result()},h.centroid=function(_){return bn(_,s(Ts)),Ts.result()},h.projection=function(_){return arguments.length?(s=_==null?(r=null,Qn):(r=_).stream,h):r},h.context=function(_){return arguments.length?(l=_==null?(i=null,new io):new no(i=_),typeof o!="function"&&l.pointRadius(o),h):i},h.pointRadius=function(_){return arguments.length?(o=typeof _=="function"?_:(l.pointRadius(+_),+_),h):o},h.projection(r).context(i)}function Ql(r){return{stream:yr(r)}}function yr(r){return function(i){var o=new Cs;for(var s in r)o[s]=r[s];return o.stream=i,o}}function Cs(){}Cs.prototype={constructor:Cs,point:function(r,i){this.stream.point(r,i)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function ks(r,i,o){var s=r.clipExtent&&r.clipExtent();return r.scale(150).translate([0,0]),s!=null&&r.clipExtent(null),bn(o,r.stream(Zr)),i(Zr.result()),s!=null&&r.clipExtent(s),r}function Or(r,i,o){return ks(r,function(s){var l=i[1][0]-i[0][0],h=i[1][1]-i[0][1],_=Math.min(l/(s[1][0]-s[0][0]),h/(s[1][1]-s[0][1])),p=+i[0][0]+(l-_*(s[1][0]+s[0][0]))/2,x=+i[0][1]+(h-_*(s[1][1]+s[0][1]))/2;r.scale(150*_).translate([p,x])},o)}function Qr(r,i,o){return Or(r,[[0,0],i],o)}function Jr(r,i,o){return ks(r,function(s){var l=+i,h=l/(s[1][0]-s[0][0]),_=(l-h*(s[1][0]+s[0][0]))/2,p=-h*s[0][1];r.scale(150*h).translate([_,p])},o)}function ti(r,i,o){return ks(r,function(s){var l=+i,h=l/(s[1][1]-s[0][1]),_=-h*s[0][0],p=(l-h*(s[1][1]+s[0][1]))/2;r.scale(150*h).translate([_,p])},o)}var Jl=16,Og=ee(30*xe);function Ls(r,i){return+i?Dg(r,i):Pg(r)}function Pg(r){return yr({point:function(i,o){i=r(i,o),this.stream.point(i[0],i[1])}})}function Dg(r,i){function o(s,l,h,_,p,x,b,A,k,S,R,E,M,z){var D=b-s,B=A-l,X=D*D+B*B;if(X>4*i&&M--){var U=_+S,Z=p+R,it=x+E,q=Ue(U*U+Z*Z+it*it),ct=an(it/=q),ut=Pe(Pe(it)-1)<ae||Pe(h-k)<ae?(h+k)/2:rn(Z,U),C=r(ut,ct),Ct=C[0],Nt=C[1],gt=Ct-s,zt=Nt-l,Wt=B*gt-D*zt;(Wt*Wt/X>i||Pe((D*gt+B*zt)/X-.5)>.3||_*S+p*R+x*E<Og)&&(o(s,l,h,_,p,x,Ct,Nt,ut,U/=q,Z/=q,it,M,z),z.point(Ct,Nt),o(Ct,Nt,ut,U,Z,it,b,A,k,S,R,E,M,z))}}return function(s){var l,h,_,p,x,b,A,k,S,R,E,M,z={point:D,lineStart:B,lineEnd:U,polygonStart:function(){s.polygonStart(),z.lineStart=Z},polygonEnd:function(){s.polygonEnd(),z.lineStart=B}};function D(ct,ut){ct=r(ct,ut),s.point(ct[0],ct[1])}function B(){k=NaN,z.point=X,s.lineStart()}function X(ct,ut){var C=Xn([ct,ut]),Ct=r(ct,ut);o(k,S,A,R,E,M,k=Ct[0],S=Ct[1],A=ct,R=C[0],E=C[1],M=C[2],Jl,s),s.point(k,S)}function U(){z.point=D,s.lineEnd()}function Z(){B(),z.point=it,z.lineEnd=q}function it(ct,ut){X(l=ct,ut),h=k,_=S,p=R,x=E,b=M,z.point=X}function q(){o(k,S,A,R,E,M,h,_,l,p,x,b,Jl,s),z.lineEnd=U,U()}return z}}var zg=yr({point:function(r,i){this.stream.point(r*xe,i*xe)}});function Fg(r){return yr({point:function(i,o){var s=r(i,o);return this.stream.point(s[0],s[1])}})}function Ig(r,i,o){function s(l,h){return[i+r*l,o-r*h]}return s.invert=function(l,h){return[(l-i)/r,(o-h)/r]},s}function tf(r,i,o,s){var l=ee(s),h=Qt(s),_=l*r,p=h*r,x=l/r,b=h/r,A=(h*
vendor: 4,351 bytes, line 20
20o-l*i)/r,k=(h*i+l*o)/r;function S(R,E){return[_*R-p*E+i,o-p*R-_*E]}return S.invert=function(R,E){return[x*R-b*E+A,k-b*R-x*E]},S}function gn(r){return $i(function(){return r})()}function $i(r){var i,o=150,s=480,l=250,h=0,_=0,p=0,x=0,b=0,A,k=0,S=null,R=Ai,E=null,M,z,D,B=Qn,X=.5,U,Z,it,q,ct;function ut(gt){return it(gt[0]*xe,gt[1]*xe)}function C(gt){return gt=it.invert(gt[0],gt[1]),gt&&[gt[0]*Ge,gt[1]*Ge]}ut.stream=function(gt){return q&&ct===gt?q:q=zg(Fg(A)(R(U(B(ct=gt)))))},ut.preclip=function(gt){return arguments.length?(R=gt,S=void 0,Nt()):R},ut.postclip=function(gt){return arguments.length?(B=gt,E=M=z=D=null,Nt()):B},ut.clipAngle=function(gt){return arguments.length?(R=+gt?qa(S=gt*xe):(S=null,Ai),Nt()):S*Ge},ut.clipExtent=function(gt){return arguments.length?(B=gt==null?(E=M=z=D=null,Qn):fr(E=+gt[0][0],M=+gt[0][1],z=+gt[1][0],D=+gt[1][1]),Nt()):E==null?null:[[E,M],[z,D]]},ut.scale=function(gt){return arguments.length?(o=+gt,Ct()):o},ut.translate=function(gt){return arguments.length?(s=+gt[0],l=+gt[1],Ct()):[s,l]},ut.center=function(gt){return arguments.length?(h=gt[0]%360*xe,_=gt[1]%360*xe,Ct()):[h*Ge,_*Ge]},ut.rotate=function(gt){return arguments.length?(p=gt[0]%360*xe,x=gt[1]%360*xe,b=gt.length>2?gt[2]%360*xe:0,Ct()):[p*Ge,x*Ge,b*Ge]},ut.angle=function(gt){return arguments.length?(k=gt%360*xe,Ct()):k*Ge},ut.precision=function(gt){return arguments.length?(U=Ls(Z,X=gt*gt),Nt()):Ue(X)},ut.fitExtent=function(gt,zt){return Or(ut,gt,zt)},ut.fitSize=function(gt,zt){return Qr(ut,gt,zt)},ut.fitWidth=function(gt,zt){return Jr(ut,gt,zt)},ut.fitHeight=function(gt,zt){return ti(ut,gt,zt)};function Ct(){var gt=tf(o,0,0,k).apply(null,i(h,_)),zt=(k?tf:Ig)(o,s-gt[0],l-gt[1],k);return A=Ti(p,x,b),Z=wi(i,zt),it=wi(A,Z),U=Ls(Z,X),Nt()}function Nt(){return q=ct=null,ut}return function(){return i=r.apply(this,arguments),ut.invert=i.invert&&C,Ct()}}function ei(r){var i=0,o=Ye/3,s=$i(r),l=s(i,o);return l.parallels=function(h){return arguments.length?s(i=h[0]*xe,o=h[1]*xe):[i*Ge,o*Ge]},l}function ef(r){var i=ee(r);function o(s,l){return[s*i,Qt(l)/i]}return o.invert=function(s,l){return[s/i,an(l*i)]},o}function Rs(r,i){var o=Qt(r),s=(o+Qt(i))/2;if(Pe(s)<ae)return ef(r);var l=1+o*(2*s-o),h=Ue(l)/s;function _(p,x){var b=Ue(l-2*s*Qt(x))/s;return[b*Qt(p*=s),h-b*ee(p)]}return _.invert=function(p,x){var b=h-x;return[rn(p,Pe(b))/s*mr(b),an((l-(p*p+b*b)*s*s)/(2*s))]},_}function Pr(){return ei(Rs).scale(155.424).center([0,33.6442])}function oo(){return Pr().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Ng(r){var i=r.length;return{point:function(o,s){for(var l=-1;++l<i;)r[l].point(o,s)},sphere:function(){for(var o=-1;++o<i;)r[o].sphere()},lineStart:function(){for(var o=-1;++o<i;)r[o].lineStart()},lineEnd:function(){for(var o=-1;++o<i;)r[o].lineEnd()},polygonStart:function(){for(var o=-1;++o<i;)r[o].polygonStart()},polygonEnd:function(){for(var o=-1;++o<i;)r[o].polygonEnd()}}}function nf(){var r,i,o=oo(),s,l=Pr().rotate([154,0]).center([-2,58.5]).parallels([55,65]),h,_=Pr().rotate([157,0]).center([-3,19.9]).parallels([8,18]),p,x,b={point:function(S,R){x=[S,R]}};function A(S){var R=S[0],E=S[1];return x=null,s.point(R,E),x||(h.point(R,E),x)||(p.point(R,E),x)}A.invert=function(S){var R=o.scale(),E=o.translate(),M=(S[0]-E[0])/R,z=(S[1]-E[1])/R;return(z>=.12&&z<.234&&M>=-.425&&M<-.214?l:z>=.166&&z<.234&&M>=-.214&&M<-.115?_:o).invert(S)},A.stream=function(S){return r&&i===S?r:r=Ng([o.stream(i=S),l.stream(S),_.stream(S)])},A.precision=function(S){return arguments.length?(o.precision(S),l.precision(S),_.precision(S),k()):o.precision()},A.scale=function(S){return arguments.length?(o.scale(S),l.scale(S*.35),_.scale(S),A.translate(o.translate())):o.scale()},A.translate=function(S){if(!arguments.length)return o.translate();var R=o.scale(),E=+S[0],M=+S[1];return s=o.translate(S).clipExtent([[E-.455*R,M-.238*R],[E+.455*R,M+.238*R]]).stream(b),h=l.translate([E-.307*R,M+.201*R]).clipExtent([[E-.425*R+ae,M+.12*R+ae],[E-.214*R-ae,M+.234*R-ae]]).stream(b),p=_.translate([E-.205*R,M+.212*R]).clipExtent([[E-.214*R+ae,M+.166*R+ae],[E-.115*R-ae,M+.234*R-ae]]).stream(b),k()},A.fitExtent=function(S,R){return Or(A,S,R)},A.fitSize=function(S,R){return Qr(A,S,R)},A.fitWidth=function(S,R){return Jr(A,S,R)},A.fitHeight=function(S,R){return ti(A,S,R)};function k(){return r=i=null,A}
20return A.scale(1070)}function so(r){return function(i,o){var s=ee(i),l=ee(o),h=r(s*l);return[h*l*Qt(i),h*Qt(o)]}}function er(r){return function(i,o){var s=Ue(i*i+o*o),l=r(s),h=Qt(l),_=ee(l);return[rn(i*h,s*_),an(s&&o*h/s)]}}var co=so(function(r){return Ue(2/(1+r))});co.invert=er(function(r){return 2*an(r/2)});function rf(){return gn(co).scale(124.75).clipAngle(180-.001)}var uo=so(function(r){return(r=ka(r))&&r/Qt(r)});uo.invert=er(function(r){return r});function af(){return gn(uo).scale(79.4188).clipAngle(180-.001)}function Dr(r,i){return[r,Mr(qr((en+i)/2))]}Dr.invert=function(r,i){return[r,2*Nn(Sa(i))-en]};function lo(){return $s(Dr).scale(961/vn)}function $s(r){var i=gn(r),o=i.center,s=i.scale,l=i.translate,h=i.clipExtent,_=null,p,x,b;i.scale=function(k){return arguments.length?(s(k),A()):s()},i.translate=function(k){return arguments.length?(l(k),A()):l()},i.center=function(k){return arguments.length?(o(k),A()):o()},i.clipExtent=function(k){return arguments.length?(k==null?_=p=x=b=null:(_=+k[0][0],p=+k[0][1],x=+k[1][0],b=+k[1][1]),A()):_==null?null:[[_,p],[x,b]]};function A(){var k=Ye*s(),S=i(Na(i.rotate()).invert([0,0]));return h(_==null?[[S[0]-k,S[1]-k],[S[0]+k,S[1]+k]]:r===Dr?[[Math.max(S[0]-k,_),p],[Math.min(S[0]+k,x),b]]:[[_,Math.max(S[1]-k,p)],[x,Math.min(S[1]+k,b)]])}return A()}function fo(r){return qr((en+r)/2)}function Es(r,i){var o=ee(r),s=r===i?Qt(r):Mr(o/ee(i))/Mr(fo(i)/fo(r)),l=o*Ca(fo(r),s)/s;if(!s)return Dr;function h(_,p){l>0?p<-en+ae&&(p=-en+ae):p>en-ae&&(p=en-ae);var x=l/Ca(fo(p),s);return[x*Qt(s*_),l-x*ee(s*_)]}return h.invert=function(_,p){var x=l-p,b=mr(s)*Ue(_*_+x*x);return[rn(_,Pe(x))/s*mr(x),2*Nn(Ca(l/b,1/s))-en]},h}function of(){return ei(Es).scale(109.5).parallels([30,30])}function zr(r,i){return[r,i]}zr.invert=zr;function sf(){return gn(zr).scale(152.63)}function Os(r,i){var o=ee(r),s=r===i?Qt(r):(o-ee(i))/(i-r),l=o/s+r;if(Pe(s)<ae)return zr;function h(_,p){var x=l-p,b=s*_;return[x*Qt(b),l-x*ee(b)]}return h.invert=function(_,p){var x=l-p;return[rn(_,Pe(x))/s*mr(x),l-mr(s)*Ue(_*_+x*x)]},h}function cf(){return ei(Os).scale(131.154).center([0,13.9389])}var Ei=1.340264,Oi=-.081106,Pi=893e-6,Di=.003796,ho=Ue(3)/2,Xg=12;function go(r,i){var o=an(ho*Qt(i)),s=o*o,l=s*s*s;return[r*ee(o)/(ho*(Ei+3*Oi*s+l*(7*Pi+9*Di*s))),o*(Ei+Oi*s+l*(Pi+Di*s))]}go.invert=function(r,i){for(var o=i,s=o*o,l=s*s*s,h=0,_,p,x;h<Xg&&(p=o*(Ei+Oi*s+l*(Pi+Di*s))-i,x=Ei+3*Oi*s+l*(7*Pi+9*Di*s),o-=_=p/x,s=o*o,l=s*s*s,!(Pe(_)<gi));++h);return[ho*r*(Ei+3*Oi*s+l*(7*Pi+9*Di*s))/ee(o),an(Qt(o)/ho)]};function uf(){return gn(go).scale(177.158)}function po(r,i){var o=ee(i),s=ee(r)*o;return[o*Qt(r)/s,Qt(i)/s]}po.invert=er(Nn);function lf(){return gn(po).scale(144.049).clipAngle(60)}function mo(r,i,o,s){return r===1&&i===1&&o===0&&s===0?Qn:yr({point:function(l,h){this.stream.point(l*r+o,h*i+s)}})}function ff(){var r=1,i=0,o=0,s=1,l=1,h=Qn,_=null,p,x,b,A=Qn,k,S,R;function E(){return k=S=null,R}return R={stream:function(M){return k&&S===M?k:k=h(A(S=M))},postclip:function(M){return arguments.length?(A=M,_=p=x=b=null,E()):A},clipExtent:function(M){return arguments.length?(A=M==null?(_=p=x=b=null,Qn):fr(_=+M[0][0],p=+M[0][1],x=+M[1][0],b=+M[1][1]),E()):_==null?null:[[_,p],[x,b]]},scale:function(M){return arguments.length?(h=mo((r=+M)*s,r*l,i,o),E()):r},translate:function(M){return arguments.length?(h=mo(r*s,r*l,i=+M[0],o=+M[1]),E()):[i,o]},reflectX:function(M){return arguments.length?(h=mo(r*(s=M?-1:1),r*l,i,o),E()):s<0},reflectY:function(M){return arguments.length?(h=mo(r*s,r*(l=M?-1:1),i,o),E()):l<0},fitExtent:function(M,z){return Or(R,M,z)},fitSize:function(M,z){return Qr(R,M,z)},fitWidth:function(M,z){return Jr(R,M,z)},fitHeight:function(M,z){return ti(R,M,z)}}}function vo(r,i){var o=i*i,s=o*o;return[r*(.8707-.131979*o+s*(-.013791+s*(.003971*o-.001529*s))),i*(1.007226+o*(.015085+s*(-.044475+.028874*o-.005916*s)))]}vo.invert=function(r,i){var o=i,s=25,l;do{var h=o*o,_=h*h;o-=l=(o*(1.007226+h*(.015085+_*(-.044475+.028874*h-.005916*_)))-i)/(1.007226+h*(.015085*3+_*(-.044475*7+.028874*9*h-.005916*11*_)))}while(Pe(l)>ae&&--s>0);
20return[r/(.8707+(h=o*o)*(-.131979+h*(-.013791+h*h*h*(.003971-.001529*h)))),o]};function hf(){return gn(vo).scale(175.295)}function xo(r,i){return[ee(i)*Qt(r),Qt(i)]}xo.invert=er(an);function df(){return gn(xo).scale(249.5).clipAngle(90+ae)}function yo(r,i){var o=ee(i),s=1+ee(r)*o;return[o*Qt(r)/s,Qt(i)/s]}yo.invert=er(function(r){return 2*Nn(r)});function gf(){return gn(yo).scale(250).clipAngle(142)}function _o(r,i){return[Mr(qr((en+i)/2)),-r]}_o.invert=function(r,i){return[-i,2*Nn(Sa(r))-en]};function pf(){var r=$s(_o),i=r.center,o=r.rotate;return r.center=function(s){return arguments.length?i([-s[1],s[0]]):(s=i(),[s[1],-s[0]])},r.rotate=function(s){return arguments.length?o([s[0],s[1],s.length>2?s[2]+90:90]):(s=o(),[s[0],s[1],s[2]-90])},o([0,0,90]).scale(159.155)}function Bg(r,i){return r.parent===i.parent?1:2}function Yg(r){return r.reduce(Hg,0)/r.length}function Hg(r,i){return r+i.x}function Vg(r){return 1+r.reduce(qg,0)}function qg(r,i){return Math.max(r,i.y)}function Ug(r){for(var i;i=r.children;)r=i[0];return r}function Wg(r){for(var i;i=r.children;)r=i[i.length-1];return r}function mf(){var r=Bg,i=1,o=1,s=!1;function l(h){var _,p=0;h.eachAfter(function(S){var R=S.children;R?(S.x=Yg(R),S.y=Vg(R)):(S.x=_?p+=r(S,_):0,S.y=0,_=S)});var x=Ug(h),b=Wg(h),A=x.x-r(x,b)/2,k=b.x+r(b,x)/2;return h.eachAfter(s?function(S){S.x=(S.x-h.x)*i,S.y=(h.y-S.y)*o}:function(S){S.x=(S.x-A)/(k-A)*i,S.y=(1-(h.y?S.y/h.y:1))*o})}return l.separation=function(h){return arguments.length?(r=h,l):r},l.size=function(h){return arguments.length?(s=!1,i=+h[0],o=+h[1],l):s?null:[i,o]},l.nodeSize=function(h){return arguments.length?(s=!0,i=+h[0],o=+h[1],l):s?[i,o]:null},l}function Gg(r){var i=0,o=r.children,s=o&&o.length;if(!s)i=1;else for(;--s>=0;)i+=o[s].value;r.value=i}function vf(){return this.eachAfter(Gg)}function xf(r){var i=this,o,s=[i],l,h,_;do for(o=s.reverse(),s=[];i=o.pop();)if(r(i),l=i.children,l)for(h=0,_=l.length;h<_;++h)s.push(l[h]);while(s.length);return this}function yf(r){for(var i=this,o=[i],s,l;i=o.pop();)if(r(i),s=i.children,s)for(l=s.length-1;l>=0;--l)o.push(s[l]);return this}function _f(r){for(var i=this,o=[i],s=[],l,h,_;i=o.pop();)if(s.push(i),l=i.children,l)for(h=0,_=l.length;h<_;++h)o.push(l[h]);for(;i=s.pop();)r(i);return this}function bf(r){return this.eachAfter(function(i){for(var o=+r(i.data)||0,s=i.children,l=s&&s.length;--l>=0;)o+=s[l].value;i.value=o})}function wf(r){return this.eachBefore(function(i){i.children&&i.children.sort(r)})}function Tf(r){for(var i=this,o=jg(i,r),s=[i];i!==o;)i=i.parent,s.push(i);for(var l=s.length;r!==o;)s.splice(l,0,r),r=r.parent;return s}function jg(r,i){if(r===i)return r;var o=r.ancestors(),s=i.ancestors(),l=null;for(r=o.pop(),i=s.pop();r===i;)l=r,r=o.pop(),i=s.pop();return l}function Af(){for(var r=this,i=[r];r=r.parent;)i.push(r);return i}function Mf(){var r=[];return this.each(function(i){r.push(i)}),r}function Sf(){var r=[];return this.eachBefore(function(i){i.children||r.push(i)}),r}function Cf(){var r=this,i=[];return r.each(function(o){o!==r&&i.push({source:o.parent,target:o})}),i}function zi(r,i){var o=new _r(r),s=+r.value&&(o.value=r.value),l,h=[o],_,p,x,b;for(i==null&&(i=Kg);l=h.pop();)if(s&&(l.value=+l.data.value),(p=i(l.data))&&(b=p.length))for(l.children=new Array(b),x=b-1;x>=0;--x)h.push(_=l.children[x]=new _r(p[x])),_.parent=l,_.depth=l.depth+1;return o.eachBefore(Ps)}function Zg(){return zi(this).eachBefore(Qg)}function Kg(r){return r.children}function Qg(r){r.data=r.data.data}function Ps(r){var i=0;do r.height=i;while((r=r.parent)&&r.height<++i)}function _r(r){this.data=r,this.depth=this.height=0,this.parent=null}_r.prototype=zi.prototype={constructor:_r,count:vf,each:xf,eachAfter:_f,eachBefore:yf,sum:bf,sort:wf,path:Tf,ancestors:Af,descendants:Mf,leaves:Sf,links:Cf,copy:Zg};var kf=Array.prototype.slice;function Lf(r){for(var i=r.length,o,s;i;)s=Math.random()*i--|0,o=r[i],r[i]=r[s],r[s]=o;return r}function wo(r){for(var i=0,o=(r=Lf(kf.call(r))).length,s=[],l,h;i<o;)l=r[i],h&&Rf(h,l)?++i:(h=tp(s=Jg(s,l)),i=0);return h}function Jg(r,i){var o,s;if(Ds(i,r))return[i];for(o=0;o<r.length;++o)if(bo(i,r[o])&&Ds(Fi(r[o],i),r))return[r[o],i];for(o=0;o<r.length-1;++o)for(s=o+1;s<r.length;++s)if(bo(Fi(r[o],r[s]),i)&&bo(Fi(r[o],i),r[s])&&bo(Fi(r[s],i),r[o])&&Ds($f(r[o],r[s],i),r))return[r[o],r[s],i];throw new Error}function bo(r,i){var o=r.r-i.r,s=i.x-r.x,l=i.y-r.y;return o<0||o*o<s*s+l*l}function Rf(r,i){var o=r.r-i.r+1e-6,s=i.x-r.x,l=i.y-r.y;return o>0&&o*o>s*s+l*l}function Ds(r,i){for(var o=0;o<i.length;++o)if(!Rf(r,i[o]))return!1;return!0}function tp(r){switch(r.length){case 1:return ep(r[0]);case 2:return Fi(r[0],r[1]);case 3:return $f(r[0],r[1],r[2])}}function ep(r){return{x:r.x,y:r.y,r:r.r}}function Fi(r,i){var o=r.x,s=r.y,l=r.r,h=i.x,_=i.y,p=i.r,x=h-o,b=_-s,A=p-l,k=Math.sqrt(x*x+b*b);return{x:(o+h+x/k*A)/2,y:(s+_+b/k*A)/2,r:(k+l+p)/2}}function $f(r,i,o){var s=r.x,l=r.y,h=r.r,_=i.x,p=i.y,x=i.r,b=o.x,A=o.y,k=o.r,S=s-_,R=s-b,E=l-p,M=l-A,z=x-h,D=k-h,B=s*s+l*l-h*h,X=B-_*_-p*p+x*x,U=B-b*b-A*A+k*k,Z=R*E-S*M,it=(E*U-M*X)/(Z*2)-s,q=(M*z-E*D)/Z,ct=(R*X-S*U)/(Z*2)-l,ut=(S*D-R*z)/Z,C=q*q+ut*ut-1,Ct=2*(h+it*q+ct*ut),Nt=it*it+ct*ct-h*h,gt=-(C?(Ct+Math.sqrt(Ct*Ct-4*C*Nt))/(2*C):Nt/Ct);
20return{x:s+it+q*gt,y:l+ct+ut*gt,r:gt}}function Ef(r,i,o){var s=r.x-i.x,l,h,_=r.y-i.y,p,x,b=s*s+_*_;b?(h=i.r+o.r,h*=h,x=r.r+o.r,x*=x,h>x?(l=(b+x-h)/(2*b),p=Math.sqrt(Math.max(0,x/b-l*l)),o.x=r.x-l*s-p*_,o.y=r.y-l*_+p*s):(l=(b+h-x)/(2*b),p=Math.sqrt(Math.max(0,h/b-l*l)),o.x=i.x+l*s-p*_,o.y=i.y+l*_+p*s)):(o.x=i.x+o.r,o.y=i.y)}function Of(r,i){var o=r.r+i.r-1e-6,s=i.x-r.x,l=i.y-r.y;return o>0&&o*o>s*s+l*l}function Pf(r){var i=r._,o=r.next._,s=i.r+o.r,l=(i.x*o.r+o.x*i.r)/s,h=(i.y*o.r+o.y*i.r)/s;return l*l+h*h}function To(r){this._=r,this.next=null,this.previous=null}function zs(r){if(!(l=r.length))return 0;var i,o,s,l,h,_,p,x,b,A,k;if(i=r[0],i.x=0,i.y=0,!(l>1))return i.r;if(o=r[1],i.x=-o.r,o.x=i.r,o.y=0,!(l>2))return i.r+o.r;Ef(o,i,s=r[2]),i=new To(i),o=new To(o),s=new To(s),i.next=s.previous=o,o.next=i.previous=s,s.next=o.previous=i;t:for(p=3;p<l;++p){Ef(i._,o._,s=r[p]),s=new To(s),x=o.next,b=i.previous,A=o._.r,k=i._.r;do if(A<=k){if(Of(x._,s._)){o=x,i.next=o,o.previous=i,--p;continue t}A+=x._.r,x=x.next}else{if(Of(b._,s._)){i=b,i.next=o,o.previous=i,--p;continue t}k+=b._.r,b=b.previous}while(x!==b.next);for(s.previous=i,s.next=o,i.next=o.previous=o=s,h=Pf(i);(s=s.next)!==o;)(_=Pf(s))<h&&(i=s,h=_);o=i.next}for(i=[o._],s=o;(s=s.next)!==o;)i.push(s._);for(s=wo(i),p=0;p<l;++p)i=r[p],i.x-=s.x,i.y-=s.y;return s.r}function Df(r){return zs(r),r}function zf(r){return r==null?null:ni(r)}function ni(r){if(typeof r!="function")throw new Error;return r}function hr(){return 0}function br(r){return function(){return r}}function np(r){return Math.sqrt(r.value)}function Nf(){var r=null,i=1,o=1,s=hr;function l(h){return h.x=i/2,h.y=o/2,r?h.eachBefore(Ff(r)).eachAfter(Fs(s,.5)).eachBefore(If(1)):h.eachBefore(Ff(np)).eachAfter(Fs(hr,1)).eachAfter(Fs(s,h.r/Math.min(i,o))).eachBefore(If(Math.min(i,o)/(2*h.r))),h}return l.radius=function(h){return arguments.length?(r=zf(h),l):r},l.size=function(h){return arguments.length?(i=+h[0],o=+h[1],l):[i,o]},l.padding=function(h){return arguments.length?(s=typeof h=="function"?h:br(+h),l):s},l}function Ff(r){return function(i){i.children||(i.r=Math.max(0,+r(i)||0))}}function Fs(r,i){return function(o){if(s=o.children){var s,l,h=s.length,_=r(o)*i||0,p;if(_)for(l=0;l<h;++l)s[l].r+=_;if(p=zs(s),_)for(l=0;l<h;++l)s[l].r-=_;o.r=p+_}}}function If(r){return function(i){var o=i.parent;i.r*=r,o&&(i.x=o.x+r*i.x,i.y=o.y+r*i.y)}}function Ao(r){r.x0=Math.round(r.x0),r.y0=Math.round(r.y0),r.x1=Math.round(r.x1),r.y1=Math.round(r.y1)}function nr(r,i,o,s,l){for(var h=r.children,_,p=-1,x=h.length,b=r.value&&(s-i)/r.value;++p<x;)_=h[p],_.y0=o,_.y1=l,_.x0=i,_.x1=i+=_.value*b}function Xf(){var r=1,i=1,o=0,s=!1;function l(_){var p=_.height+1;return _.x0=_.y0=o,_.x1=r,_.y1=i/p,_.eachBefore(h(i,p)),s&&_.eachBefore(Ao),_}function h(_,p){return function(x){x.children&&nr(x,x.x0,_*(x.depth+1)/p,x.x1,_*(x.depth+2)/p);var b=x.x0,A=x.y0,k=x.x1-o,S=x.y1-o;k<b&&(b=k=(b+k)/2),S<A&&(A=S=(A+S)/2),x.x0=b,x.y0=A,x.x1=k,x.y1=S}}return l.round=function(_){return arguments.length?(s=!!_,l):s},l.size=function(_){return arguments.length?(r=+_[0],i=+_[1],l):[r,i]},l.padding=function(_){return arguments.length?(o=+_,l):o},l}var Bf="$",rp={depth:-1},Yf={};function ip(r){return r.id}function ap(r){return r.parentId}function Hf(){var r=ip,i=ap;function o(s){var l,h,_=s.length,p,x,b,A=new Array(_),k,S,R={};for(h=0;h<_;++h)l=s[h],b=A[h]=new _r(l),(k=r(l,h,s))!=null&&(k+="")&&(S=Bf+(b.id=k),R[S]=S in R?Yf:b);for(h=0;h<_;++h)if(b=A[h],k=i(s[h],h,s),k==null||!(k+="")){if(p)throw new Error("multiple roots");p=b}else{if(x=R[Bf+k],!x)throw new Error("missing: "+k);if(x===Yf)throw new Error("ambiguous: "+k);x.children?x.children.push(b):x.children=[b],b.parent=x}if(!p)throw new Error("no root");if(p.parent=rp,p.eachBefore(function(E){E.depth=E.parent.depth+1,--_}).eachBefore(Ps),p.parent=null,_>0)throw new Error("cycle");return p}return o.id=function(s){return arguments.length?(r=ni(s),o):r},o.parentId=function(s){return arguments.length?(i=ni(s),o):i},o}function op(r,i){return r.parent===i.parent?1:2}function Is(r){var i=r.children;return i?i[0]:r.t}function Ns(r){var i=r.children;return i?i[i.length-1]:r.t}function sp(r,i,o){var s=o/(i.i-r.i);i.c-=s,i.s+=o,r.c+=s,i.z+=o,i.m+=o}function cp(r){for(var i=0,o=0,s=r.children,l=s.length,h;--l>=0;
20)h=s[l],h.z+=i,h.m+=i,i+=h.s+(o+=h.c)}function up(r,i,o){return r.a.parent===i.parent?r.a:o}function Mo(r,i){this._=r,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=i}Mo.prototype=Object.create(_r.prototype);function lp(r){for(var i=new Mo(r,0),o,s=[i],l,h,_,p;o=s.pop();)if(h=o._.children)for(o.children=new Array(p=h.length),_=p-1;_>=0;--_)s.push(l=o.children[_]=new Mo(h[_],_)),l.parent=o;return(i.parent=new Mo(null,0)).children=[i],i}function Vf(){var r=op,i=1,o=1,s=null;function l(b){var A=lp(b);if(A.eachAfter(h),A.parent.m=-A.z,A.eachBefore(_),s)b.eachBefore(x);else{var k=b,S=b,R=b;b.eachBefore(function(B){B.x<k.x&&(k=B),B.x>S.x&&(S=B),B.depth>R.depth&&(R=B)});var E=k===S?1:r(k,S)/2,M=E-k.x,z=i/(S.x+E+M),D=o/(R.depth||1);b.eachBefore(function(B){B.x=(B.x+M)*z,B.y=B.depth*D})}return b}function h(b){var A=b.children,k=b.parent.children,S=b.i?k[b.i-1]:null;if(A){cp(b);var R=(A[0].z+A[A.length-1].z)/2;S?(b.z=S.z+r(b._,S._),b.m=b.z-R):b.z=R}else S&&(b.z=S.z+r(b._,S._));b.parent.A=p(b,S,b.parent.A||k[0])}function _(b){b._.x=b.z+b.parent.m,b.m+=b.parent.m}function p(b,A,k){if(A){for(var S=b,R=b,E=A,M=S.parent.children[0],z=S.m,D=R.m,B=E.m,X=M.m,U;E=Ns(E),S=Is(S),E&&S;)M=Is(M),R=Ns(R),R.a=b,U=E.z+B-S.z-z+r(E._,S._),U>0&&(sp(up(E,b,k),b,U),z+=U,D+=U),B+=E.m,z+=S.m,X+=M.m,D+=R.m;E&&!Ns(R)&&(R.t=E,R.m+=B-D),S&&!Is(M)&&(M.t=S,M.m+=z-X,k=b)}return k}function x(b){b.x*=i,b.y=b.depth*o}return l.separation=function(b){return arguments.length?(r=b,l):r},l.size=function(b){return arguments.length?(s=!1,i=+b[0],o=+b[1],l):s?null:[i,o]},l.nodeSize=function(b){return arguments.length?(s=!0,i=+b[0],o=+b[1],l):s?[i,o]:null},l}function wr(r,i,o,s,l){for(var h=r.children,_,p=-1,x=h.length,b=r.value&&(l-o)/r.value;++p<x;)_=h[p],_.x0=i,_.x1=s,_.y0=o,_.y1=o+=_.value*b}var Xs=(1+Math.sqrt(5))/2;function Bs(r,i,o,s,l,h){for(var _=[],p=i.children,x,b,A=0,k=0,S=p.length,R,E,M=i.value,z,D,B,X,U,Z,it;A<S;){R=l-o,E=h-s;do z=p[k++].value;while(!z&&k<S);for(D=B=z,Z=Math.max(E/R,R/E)/(M*r),it=z*z*Z,U=Math.max(B/it,it/D);k<S;++k){if(z+=b=p[k].value,b<D&&(D=b),b>B&&(B=b),it=z*z*Z,X=Math.max(B/it,it/D),X>U){z-=b;break}U=X}_.push(x={value:z,dice:R<E,children:p.slice(A,k)}),x.dice?nr(x,o,s,l,M?s+=E*z/M:h):wr(x,o,s,M?o+=R*z/M:l,h),M-=z,A=k}return _}var So=function r(i){function o(s,l,h,_,p){Bs(i,s,l,h,_,p)}return o.ratio=function(s){return r((s=+s)>1?s:1)},o}(Xs);function qf(){var r=So,i=!1,o=1,s=1,l=[0],h=hr,_=hr,p=hr,x=hr,b=hr;function A(S){return S.x0=S.y0=0,S.x1=o,S.y1=s,S.eachBefore(k),l=[0],i&&S.eachBefore(Ao),S}function k(S){var R=l[S.depth],E=S.x0+R,M=S.y0+R,z=S.x1-R,D=S.y1-R;z<E&&(E=z=(E+z)/2),D<M&&(M=D=(M+D)/2),S.x0=E,S.y0=M,S.x1=z,S.y1=D,S.children&&(R=l[S.depth+1]=h(S)/2,E+=b(S)-R,M+=_(S)-R,z-=p(S)-R,D-=x(S)-R,z<E&&(E=z=(E+z)/2),D<M&&(M=D=(M+D)/2),r(S,E,M,z,D))}return A.round=function(S){return arguments.length?(i=!!S,A):i},A.size=function(S){return arguments.length?(o=+S[0],s=+S[1],A):[o,s]},A.tile=function(S){return arguments.length?(r=ni(S),A):r},A.padding=function(S){return arguments.length?A.paddingInner(S).paddingOuter(S):A.paddingInner()},A.paddingInner=function(S){return arguments.length?(h=typeof S=="function"?S:br(+S),A):h},A.paddingOuter=function(S){return arguments.length?A.paddingTop(S).paddingRight(S).paddingBottom(S).paddingLeft(S):A.paddingTop()},A.paddingTop=function(S){return arguments.length?(_=typeof S=="function"?S:br(+S),A):_},A.paddingRight=function(S){return arguments.length?(p=typeof S=="function"?S:br(+S),A):p},A.paddingBottom=function(S){return arguments.length?(x=typeof S=="function"?S:br(+S),A):x},A.paddingLeft=function(S){return arguments.length?(b=typeof S=="function"?S:br(+S),A):b},A}function Uf(r,i,o,s,l){var h=r.children,_,p=h.length,x,b=new Array(p+1);for(b[0]=x=_=0;_<p;++_)b[_+1]=x+=h[_].value;A(0,p,r.value,i,o,s,l);function A(k,S,R,E,M,z,D){if(k>=S-1){var B=h[k];B.x0=E,B.y0=M,B.x1=z,B.y1=D;return}for(var X=b[k],U=R/2+X,Z=k+1,it=S-1;Z<it;){var q=Z+it>>>1;b[q]<U?Z=q+1:it=q}U-b[Z-1]<b[Z]-U&&k+1<Z&&--Z;var ct=b[Z]-X,ut=R-ct;if(z-E>D-M){var C=(E*ut+z*ct)/R;A(k,Z,ct,E,M,C,D),A(Z,S,ut,C,M,z,D)}else{var Ct=(M*ut+D*ct)/R;A(k,Z,ct,E,M,z,Ct),A(Z,S,ut,E,Ct,z,D)}}}function Wf(r,i,o,s,l){(r.depth&1?wr:nr)(r,i,o,s,l)}var Gf=function r(i){function o(s,l,h,_,p){if((x=s._squarify)&&x.ratio===i)for(var x,b,A,k,S=-1,R,E=x.length,M=s.value;++S<E;){for(b=x[S],A=b.children,k=b.value=0,R=A.length;k<R;++k)b.value+=A[k].value;b.dice?nr(b,l,h,_,h+=(p-h)*b.value/M):wr(b,l,h,l+=(_-l)*b.value/M,p),M-=b.value}else s._squarify=x=Bs(i,s,l,h,_,p),x.ratio=i}return o.ratio=function(s){return r((s=+s)>1?s:1)},o}(Xs);v(m,Be(Un()));v(m,Be(fa()));function jf(r){for(var i=-1,o=r.length,s,l=r[o-1],h=0;++i<o;)s=l,l=r[i],h+=s[1]*l[0]-s[0]*l[1];return h/2}function Zf(r){for(var i=-1,o=r.length,s=0,l=0,h,_=r[o-1],p,x=0;++i<o;)h=_,_=r[i],x+=p=h[0]*_[1]-_[0]*h[1],s+=(h[0]+_[0])*p,l+=(h[1]+_[1])*p;
20return x*=3,[s/x,l/x]}function Kf(r,i,o){return(i[0]-r[0])*(o[1]-r[1])-(i[1]-r[1])*(o[0]-r[0])}function fp(r,i){return r[0]-i[0]||r[1]-i[1]}function Qf(r){for(var i=r.length,o=[0,1],s=2,l=2;l<i;++l){for(;s>1&&Kf(r[o[s-2]],r[o[s-1]],r[l])<=0;)--s;o[s++]=l}return o.slice(0,s)}function Jf(r){if((o=r.length)<3)return null;var i,o,s=new Array(o),l=new Array(o);for(i=0;i<o;++i)s[i]=[+r[i][0],+r[i][1],i];for(s.sort(fp),i=0;i<o;++i)l[i]=[s[i][0],-s[i][1]];var h=Qf(s),_=Qf(l),p=_[0]===h[0],x=_[_.length-1]===h[h.length-1],b=[];for(i=h.length-1;i>=0;--i)b.push(r[s[h[i]][2]]);for(i=+p;i<_.length-x;++i)b.push(r[s[_[i]][2]]);return b}function th(r,i){for(var o=r.length,s=r[o-1],l=i[0],h=i[1],_=s[0],p=s[1],x,b,A=!1,k=0;k<o;++k)s=r[k],x=s[0],b=s[1],b>h!=p>h&&l<(_-x)*(h-b)/(p-b)+x&&(A=!A),_=x,p=b;return A}function eh(r){for(var i=-1,o=r.length,s=r[o-1],l,h,_=s[0],p=s[1],x=0;++i<o;)l=_,h=p,s=r[i],_=s[0],p=s[1],l-=_,h-=p,x+=Math.sqrt(l*l+h*h);return x}function Yn(){return Math.random()}var nh=function r(i){function o(s,l){return s=s==null?0:+s,l=l==null?1:+l,arguments.length===1?(l=s,s=0):l-=s,function(){return i()*l+s}}return o.source=r,o}(Yn);var Co=function r(i){function o(s,l){var h,_;return s=s==null?0:+s,l=l==null?1:+l,function(){var p;if(h!=null)p=h,h=null;else do h=i()*2-1,p=i()*2-1,_=h*h+p*p;while(!_||_>1);return s+l*p*Math.sqrt(-2*Math.log(_)/_)}}return o.source=r,o}(Yn);var rh=function r(i){function o(){var s=Co.source(i).apply(this,arguments);return function(){return Math.exp(s())}}return o.source=r,o}(Yn);var ko=function r(i){function o(s){return function(){for(var l=0,h=0;h<s;++h)l+=i();return l}}return o.source=r,o}(Yn);var ih=function r(i){function o(s){var l=ko.source(i)(s);return function(){return l()/s}}return o.source=r,o}(Yn);var ah=function r(i){function o(s){return function(){return-Math.log(1-i())/s}}return o.source=r,o}(Yn);v(m,Be(ca()));function ne(r){for(var i=r.length/6|0,o=new Array(i),s=0;s<i;)o[s]="#"+r.slice(s*6,++s*6);return o}var oh=ne("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");var sh=ne("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");var ch=ne("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");var uh=ne("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");var lh=ne("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");var fh=ne("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");var hh=ne("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");var dh=ne("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");var gh=ne("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");var ph=Be(Un());function Ce(r){return(0,ph.interpolateRgbBasis)(r[r.length-1])}var Ys=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(ne),mh=Ce(Ys);var Hs=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(ne),vh=Ce(Hs);var Vs=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(ne),xh=Ce(Vs);var qs=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(ne),yh=Ce(qs);var Us=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(ne),_h=Ce(Us);var Ws=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(ne),bh=Ce(Ws);var Gs=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(ne),wh=Ce(Gs);var js=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d
207191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(ne),Th=Ce(js);var Zs=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(ne),Ah=Ce(Zs);var Ks=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(ne),Mh=Ce(Ks);var Qs=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(ne),Sh=Ce(Qs);var Js=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(ne),Ch=Ce(Js);var tc=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(ne),kh=Ce(tc);var ec=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(ne),Lh=Ce(ec);var nc=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(ne),Rh=Ce(nc);var rc=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(ne),$h=Ce(rc);var ic=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(ne),Eh=Ce(ic);var ac=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(ne),Oh=Ce(ac);var oc=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(ne),Ph=Ce(oc);var sc=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(ne),Dh=Ce(sc);var cc=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(ne),zh=Ce(cc);var uc=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ec
20ae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(ne),Fh=Ce(uc);var lc=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(ne),Ih=Ce(lc);var fc=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(ne),Nh=Ce(fc);var hc=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(ne),Xh=Ce(hc);var dc=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(ne),Bh=Ce(dc);var gc=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(ne),Yh=Ce(gc);var pc=Be(ar()),Hh=Be(Un()),Vh=(0,Hh.interpolateCubehelixLong)((0,pc.cubehelix)(300,.5,0),(0,pc.cubehelix)(-240,.5,1));var ri=Be(ar()),mc=Be(Un()),qh=(0,mc.interpolateCubehelixLong)((0,ri.cubehelix)(-100,.75,.35),(0,ri.cubehelix)(80,1.5,.8)),Uh=(0,mc.interpolateCubehelixLong)((0,ri.cubehelix)(260,.75,.35),(0,ri.cubehelix)(80,1.5,.8)),Lo=(0,ri.cubehelix)();function Wh(r){(r<0||r>1)&&(r-=Math.floor(r));var i=Math.abs(r-.5);return Lo.h=360*r-100,Lo.s=1.5-1.5*i,Lo.l=.8-.9*i,Lo+""}var Gh=Be(ar()),Ro=(0,Gh.rgb)(),hp=Math.PI/3,dp=Math.PI*2/3;function jh(r){var i;return r=(.5-r)*Math.PI,Ro.r=255*(i=Math.sin(r))*i,Ro.g=255*(i=Math.sin(r+hp))*i,Ro.b=255*(i=Math.sin(r+dp))*i,Ro+""}function $o(r){var i=r.length;return function(o){return r[Math.max(0,Math.min(i-1,Math.floor(o*i)))]}}var Zh=$o(ne("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e62
201fbe723fde725")),Kh=$o(ne("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Qh=$o(ne("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Jh=$o(ne("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));v(m,Be(dr()));v(m,Be(da()));v(m,Be(Hi()));v(m,Be(ci()));v(m,Be(Gi()));v(m,Be(Xr()));function vc(r){return function(){return r}}function td(r){return r[0]}function ed(r){return r[1]}function xc(){this._=null}function ii(r){r.U=r.C=r.L=r.R=r.P=r.N=null}xc.prototype={constructor:xc,insert:function(r,i){var o,s,l;if(r){if(i.P=r,i.N=r.N,r.N&&(r.N.P=i),r.N=i,r.R){for(r=r.R;r.L;)r=r.L;r.L=i}else r.R=i;o=r}else this._?(r=nd(this._),i.P=null,i.N=r,r.P=r.L=i,o=r):(i.P=i.N=null,this._=i,o=null);for(i.L=i.R=null,i.U=o,i.C=!0,r=i;o&&o.C;)s=o.U,o===s.L?(l=s.R,l&&l.C?(o.C=l.C=!1,s.C=!0,r=s):(r===o.R&&(Ii(this,o),r=o,o=r.U),o.C=!1,s.C=!0,Ni(this,s))):(l=s.L,l&&l.C?(o.C=l.C=!1,s.C=!0,r=s):(r===o.L&&(Ni(this,o),r=o,o=r.U),o.C=!1,s.C=!0,Ii(this,s))),o=r.U;this._.C=!1},remove:function(r){r.N&&(r.N.P=r.P),r.P&&(r.P.N=r.N),r.N=r.P=null;var i=r.U,o,s=r.L,l=r.R,h,_;if(s?l?h=nd(l):h=s:h=l,i?i.L===r?i.L=h:i.R=h:this._=h,s&&l?(_=h.C,h.C=r.C,h.L=s,s.U=h,h!==l?(i=h.U,h.U=r.U,r=h.R,i.L=r,h.R=l,l.U=h):(h.U=i,i=h,r=h.R)):(_=r.C,r=h),r&&(r.U=i),!_){if(r&&r.C){r.C=!1;return}do{if(r===this._)break;
20if(r===i.L){if(o=i.R,o.C&&(o.C=!1,i.C=!0,Ii(this,i),o=i.R),o.L&&o.L.C||o.R&&o.R.C){(!o.R||!o.R.C)&&(o.L.C=!1,o.C=!0,Ni(this,o),o=i.R),o.C=i.C,i.C=o.R.C=!1,Ii(this,i),r=this._;break}}else if(o=i.L,o.C&&(o.C=!1,i.C=!0,Ni(this,i),o=i.L),o.L&&o.L.C||o.R&&o.R.C){(!o.L||!o.L.C)&&(o.R.C=!1,o.C=!0,Ii(this,o),o=i.L),o.C=i.C,i.C=o.L.C=!1,Ni(this,i),r=this._;break}o.C=!0,r=i,i=i.U}while(!r.C);r&&(r.C=!1)}}};function Ii(r,i){var o=i,s=i.R,l=o.U;l?l.L===o?l.L=s:l.R=s:r._=s,s.U=l,o.U=s,o.R=s.L,o.R&&(o.R.U=o),s.L=o}function Ni(r,i){var o=i,s=i.L,l=o.U;l?l.L===o?l.L=s:l.R=s:r._=s,s.U=l,o.U=s,o.L=s.R,o.L&&(o.L.U=o),s.R=o}function nd(r){for(;r.L;)r=r.L;return r}var yc=xc;function ai(r,i,o,s){var l=[null,null],h=wn.push(l)-1;return l.left=r,l.right=i,o&&Xi(l,r,i,o),s&&Xi(l,i,r,s),Rn[r.index].halfedges.push(h),Rn[i.index].halfedges.push(h),l}function oi(r,i,o){var s=[i,o];return s.left=r,s}function Xi(r,i,o,s){!r[0]&&!r[1]?(r[0]=s,r.left=i,r.right=o):r.left===o?r[1]=s:r[0]=s}function gp(r,i,o,s,l){var h=r[0],_=r[1],p=h[0],x=h[1],b=_[0],A=_[1],k=0,S=1,R=b-p,E=A-x,M;if(M=i-p,!(!R&&M>0)){if(M/=R,R<0){if(M<k)return;M<S&&(S=M)}else if(R>0){if(M>S)return;M>k&&(k=M)}if(M=s-p,!(!R&&M<0)){if(M/=R,R<0){if(M>S)return;M>k&&(k=M)}else if(R>0){if(M<k)return;M<S&&(S=M)}if(M=o-x,!(!E&&M>0)){if(M/=E,E<0){if(M<k)return;M<S&&(S=M)}else if(E>0){if(M>S)return;M>k&&(k=M)}if(M=l-x,!(!E&&M<0)){if(M/=E,E<0){if(M>S)return;M>k&&(k=M)}else if(E>0){if(M<k)return;M<S&&(S=M)}return!(k>0)&&!(S<1)||(k>0&&(r[0]=[p+k*R,x+k*E]),S<1&&(r[1]=[p+S*R,x+S*E])),!0}}}}}function pp(r,i,o,s,l){var h=r[1];if(h)return!0;var _=r[0],p=r.left,x=r.right,b=p[0],A=p[1],k=x[0],S=x[1],R=(b+k)/2,E=(A+S)/2,M,z;if(S===A){if(R<i||R>=s)return;if(b>k){if(!_)_=[R,o];else if(_[1]>=l)return;h=[R,l]}else{if(!_)_=[R,l];else if(_[1]<o)return;h=[R,o]}}else if(M=(b-k)/(S-A),z=E-M*R,M<-1||M>1)if(b>k){if(!_)_=[(o-z)/M,o];else if(_[1]>=l)return;h=[(l-z)/M,l]}else{if(!_)_=[(l-z)/M,l];else if(_[1]<o)return;h=[(o-z)/M,o]}else if(A<S){if(!_)_=[i,M*i+z];else if(_[0]>=s)return;h=[s,M*s+z]}else{if(!_)_=[s,M*s+z];else if(_[0]<i)return;h=[i,M*i+z]}return r[0]=_,r[1]=h,!0}function rd(r,i,o,s){for(var l=wn.length,h;l--;)(!pp(h=wn[l],r,i,o,s)||!gp(h,r,i,o,s)||!(Math.abs(h[0][0]-h[1][0])>Qe||Math.abs(h[0][1]-h[1][1])>Qe))&&delete wn[l]}function id(r){return Rn[r.index]={site:r,halfedges:[]}}function mp(r,i){var o=r.site,s=i.left,l=i.right;return o===l&&(l=s,s=o),l?Math.atan2(l[1]-s[1],l[0]-s[0]):(o===s?(s=i[1],l=i[0]):(s=i[0],l=i[1]),Math.atan2(s[0]-l[0],l[1]-s[1]))}function _c(r,i){return i[+(i.left!==r.site)]}function vp(r,i){return i[+(i.left===r.site)]}function ad(){for(var r=0,i=Rn.length,o,s,l,h;r<i;++r)if((o=Rn[r])&&(h=(s=o.halfedges).length)){var _=new Array(h),p=new Array(h);for(l=0;l<h;++l)_[l]=l,p[l]=mp(o,wn[s[l]]);for(_.sort(function(x,b){return p[b]-p[x]}),l=0;l<h;++l)p[l]=s[_[l]];for(l=0;l<h;++l)s[l]=p[l]}}function od(r,i,o,s){var l=Rn.length,h,_,p,x,b,A,k,S,R,E,M,z,D=!0;for(h=0;h<l;++h)if(_=Rn[h]){for(p=_.site,b=_.halfedges,x=b.length;x--;)wn[b[x]]||b.splice(x,1);for(x=0,A=b.length;x<A;)E=vp(_,wn[b[x]]),M=E[0],z=E[1],k=_c(_,wn[b[++x%A]]),S=k[0],R=k[1],(Math.abs(M-S)>Qe||Math.abs(z-R)>Qe)&&(b.splice(x,0,wn.push(oi(p,E,Math.abs(M-r)<Qe&&s-z>Qe?[r,Math.abs(S-r)<Qe?R:s]:Math.abs(z-s)<Qe&&o-M>Qe?[Math.abs(R-s)<Qe?S:o,s]:Math.abs(M-o)<Qe&&z-i>Qe?[o,Math.abs(S-o)<Qe?R:i]:Math.abs(z-i)<Qe&&M-r>Qe?[Math.abs(R-i)<Qe?S:r,i]:null))-1),++A);A&&(D=!1)}if(D){var B,X,U,Z=1/0;for(h=0,D=null;h<l;++h)(_=Rn[h])&&(p=_.site,B=p[0]-r,X=p[1]-i,U=B*B+X*X,U<Z&&(Z=U,D=_));if(D){var it=[r,i],q=[r,s],ct=[o,s],ut=[o,i];D.halfedges.push(wn.push(oi(p=D.site,it,q))-1,wn.push(oi(p,q,ct))-1,wn.push(oi(p,ct,ut))-1,wn.push(oi(p,ut,it))-1)}}for(h=0;h<l;++h)(_=Rn[h])&&(_.halfedges.length||delete Rn[h])}var sd=[],Eo;function xp(){ii(this),this.x=this.y=this.arc=this.site=this.cy=null}function Fr(r){var i=r.P,o=r.N;if(!(!i||!o)){var s=i.site,l=r.site,h=o.site;if(s!==h){var _=l[0],p=l[1],x=s[0]-_,b=s[1]-p,A=h[0]-_,k=h[1]-p,S=2*(x*k-b*A);if(!(S>=-cd)){var R=x*x+b*b,E=A*A+k*k,M=(k*R-b*E)/S,z=(x*E-A*R)/S,D=sd.pop()||new xp;D.arc=r,D.site=l,D.x=M+_,D.y=(D.cy=z+p)+Math.sqrt(M*M+z*z),r.circle=D;for(var B=null,X=si._;X;)if(D.y<X.y||D.y===X.y&&D.x<=X.x)if(X.L)X=X.L;else{B=X.P;break}else if(X.R)X=X.R;else{B=X;break}si.insert(B,D),B||(Eo=D)}}}}function Ir(r){var i=r.circle;i&&(i.P||(Eo=i.N),si.remove(i),sd.push(i),ii(i),r.circle=null)}var ld=[];function yp(){ii(this),this.edge=this.site=this.circle=null}function ud(r){var i=ld.pop()||new yp;return i.site=r,i}function bc(r){Ir(r),Nr.remove(r),ld.push(r),ii(r)}function fd(r){var i=r.circle,o=i.x,s=i.cy,l=[o,s],h=r.P,_=r.N,p=[r];bc(r);for(var x=h;x.circle&&Math.abs(o-x.circle.x)<Qe&&Math.abs(s-x.circle.cy)<Qe;)h=x.P,p.unshift(x),bc(x),x=h;p.unshift(x),Ir(x);for(var b=_;
20b.circle&&Math.abs(o-b.circle.x)<Qe&&Math.abs(s-b.circle.cy)<Qe;)_=b.N,p.push(b),bc(b),b=_;p.push(b),Ir(b);var A=p.length,k;for(k=1;k<A;++k)b=p[k],x=p[k-1],Xi(b.edge,x.site,b.site,l);x=p[0],b=p[A-1],b.edge=ai(x.site,b.site,null,l),Fr(x),Fr(b)}function hd(r){for(var i=r[0],o=r[1],s,l,h,_,p=Nr._;p;)if(h=dd(p,o)-i,h>Qe)p=p.L;else if(_=i-_p(p,o),_>Qe){if(!p.R){s=p;break}p=p.R}else{h>-Qe?(s=p.P,l=p):_>-Qe?(s=p,l=p.N):s=l=p;break}id(r);var x=ud(r);if(Nr.insert(s,x),!(!s&&!l)){if(s===l){Ir(s),l=ud(s.site),Nr.insert(x,l),x.edge=l.edge=ai(s.site,x.site),Fr(s),Fr(l);return}if(!l){x.edge=ai(s.site,x.site);return}Ir(s),Ir(l);var b=s.site,A=b[0],k=b[1],S=r[0]-A,R=r[1]-k,E=l.site,M=E[0]-A,z=E[1]-k,D=2*(S*z-R*M),B=S*S+R*R,X=M*M+z*z,U=[(z*B-R*X)/D+A,(S*X-M*B)/D+k];Xi(l.edge,b,E,U),x.edge=ai(b,r,null,U),l.edge=ai(r,E,null,U),Fr(s),Fr(l)}}function dd(r,i){var o=r.site,s=o[0],l=o[1],h=l-i;if(!h)return s;var _=r.P;if(!_)return-1/0;o=_.site;var p=o[0],x=o[1],b=x-i;if(!b)return p;var A=p-s,k=1/h-1/b,S=A/b;return k?(-S+Math.sqrt(S*S-2*k*(A*A/(-2*b)-x+b/2+l-h/2)))/k+s:(s+p)/2}function _p(r,i){var o=r.N;if(o)return dd(o,i);var s=r.site;return s[1]===i?s[0]:1/0}var Qe=1e-6,cd=1e-12,Nr,Rn,si,wn;function bp(r,i,o){return(r[0]-o[0])*(i[1]-r[1])-(r[0]-i[0])*(o[1]-r[1])}function wp(r,i){return i[1]-r[1]||i[0]-r[0]}function Bi(r,i){var o=r.sort(wp).pop(),s,l,h;for(wn=[],Rn=new Array(r.length),Nr=new yc,si=new yc;;)if(h=Eo,o&&(!h||o[1]<h.y||o[1]===h.y&&o[0]<h.x))(o[0]!==s||o[1]!==l)&&(hd(o),s=o[0],l=o[1]),o=r.pop();else if(h)fd(h.arc);else break;if(ad(),i){var _=+i[0][0],p=+i[0][1],x=+i[1][0],b=+i[1][1];rd(_,p,x,b),od(_,p,x,b)}this.edges=wn,this.cells=Rn,Nr=si=wn=Rn=null}Bi.prototype={constructor:Bi,polygons:function(){var r=this.edges;return this.cells.map(function(i){var o=i.halfedges.map(function(s){return _c(i,r[s])});return o.data=i.site.data,o})},triangles:function(){var r=[],i=this.edges;return this.cells.forEach(function(o,s){if(p=(h=o.halfedges).length)for(var l=o.site,h,_=-1,p,x,b=i[h[p-1]],A=b.left===l?b.right:b.left;++_<p;)x=A,b=i[h[_]],A=b.left===l?b.right:b.left,x&&A&&s<x.index&&s<A.index&&bp(l,x,A)<0&&r.push([l.data,x.data,A.data])}),r},links:function(){return this.edges.filter(function(r){return r.right}).map(function(r){return{source:r.left.data,target:r.right.data}})},find:function(r,i,o){for(var s=this,l,h=s._found||0,_=s.cells.length,p;!(p=s.cells[h]);)if(++h>=_)return null;var x=r-p.site[0],b=i-p.site[1],A=x*x+b*b;
20do p=s.cells[l=h],h=null,p.halfedges.forEach(function(k){var S=s.edges[k],R=S.left;if(!((R===p.site||!R)&&!(R=S.right))){var E=r-R[0],M=i-R[1],z=E*E+M*M;z<A&&(A=z,h=R.index)}});while(h!==null);return s._found=l,o==null||A<=o*o?p.site:null}};function gd(){var r=td,i=ed,o=null;function s(l){return new Bi(l.map(function(h,_){var p=[Math.round(r(h,_,l)/Qe)*Qe,Math.round(i(h,_,l)/Qe)*Qe];return p.index=_,p.data=h,p}),o)}return s.polygons=function(l){return s(l).polygons()},s.links=function(l){return s(l).links()},s.triangles=function(l){return s(l).triangles()},s.x=function(l){return arguments.length?(r=typeof l=="function"?l:vc(+l),s):r},s.y=function(l){return arguments.length?(i=typeof l=="function"?l:vc(+l),s):i},s.extent=function(l){return arguments.length?(o=l==null?null:[[+l[0][0],+l[0][1]],[+l[1][0],+l[1][1]]],s):o&&[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},s.size=function(l){return arguments.length?(o=l==null?null:[[0,0],[+l[0],+l[1]]],s):o&&[o[1][0]-o[0][0],o[1][1]-o[0][1]]},s}v(m,Be(pa()));function Oo(){return Oo=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},Oo.apply(null,arguments)}var Tp={range:{max:"#006be6",min:"#97c5ff"},selected:"#006eff",value:"pop_est"},wc=class{constructor(i){this._data=i.data,this._element=i.element,this._color={...Tp,...i.color},this._pollingInterval=i.pollingInterval,this._height="100%",this._width="100%"}attached(){let i=typeof this._width=="string"?this._width:`${this._width}px`,o=typeof this._height=="string"?this._height:`${this._height}px`;this.svg=m.select(this._element).append("svg").attr("width",i).attr("height",o),this._handleClickHandler=this._handleClick.bind(this),this.rect=this.svg.append("rect").attr("fill","rgba(1, 1, 1, 0)").attr("width",i).attr("height",o).on("click",this._handleClickHandler);let s=this.svg.node().getBoundingClientRect();this.svgGroup=this.svg.append("g"),this.mapLayer=this.svgGroup.append("g"),this.projection=lo().scale(100).translate([s.width/2,s.height/2]),this.path=ao().projection(this.projection),this._selected=null,this._onDataLoad(this._data),this._internalPollingInterval&&clearInterval(this._internalPollingInterval),this.pollingInterval&&(this._internalPollingInterval=setInterval(()=>{this._onDataLoad(this._data)},this._pollingInterval))}disposed(){this._internalPollingInterval&&(clearInterval(this._internalPollingInterval),this._internalPollingInterval=null),this.svg&&this.svg.remove()}_fillFn(i){let o=i&&i.properties?i.properties[this._color.value]:0;return this.colorScale(o||0)}getSize(){return{height:this._height,width:this._width}}_handleClick(i){i&&this._selected!==i?this._selected=i:this._selected=null,this.mapLayer.selectAll("path").style("fill",o=>this._selected&&o===this._selected?this._color.selected:this._fillFn.bind(this)(o))}_handleMouseOver(i,o,s){let l=s[o];m.select(l).style("fill",this._color.selected)}_handleMouseOut(i,o,s){let l=s[o];m.select(l).style("fill",h=>this._fillFn.bind(this)(h)||0)}_onDataLoad(i){let o=i.features,s=o.map(l=>l.properties[this._color.value]);this._domainMin=Math.min.apply(null,s),this._domainMax=Math.max.apply(null,s),this.colorScale=m.scaleLinear().domain([this._domainMin,this._domainMax]).range([this._color.range.min,this._color.range.max]),this.mapLayer.selectAll("path").data(o).enter().append("path").attr("d",this.path).attr("vector-effect","non-scaling-stroke").attr("fill",l=>this._fillFn.bind(this)(l)||0).on("click",this._handleClickHandler).on("mouseout",this._handleMouseOut.bind(this)).on("mouseover",this._handleMouseOver.bind(this))}},Ap=r=>{let{data:i,elementProps:o={},forwardRef:s,...l}=r,h=ln.useRef(null);ln.useEffect(()=>(s&&(s.current=new wc({...l,data:i,element:h.current}),s.current.attached()),()=>{s.current.disposed()}),[]);let{height:_="100%",width:p="100%"}=s.current?s.current.getSize():{};return ln.createElement("div",Oo({style:{height:_,width:p}},o,{ref:h}))},pd=ln.forwardRef((r,i)=>ln.createElement(Ap,Oo({forwardRef:i},r)));function Tc(){return Tc=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},Tc.apply(null,arguments)}var md=ln.forwardRef((r,i)=>{let{data:o,predictionDate:s,...l}=r,h=o.columns;h&&(h=h.map(p=>(p[0]!=="x"&&(p=p.map(x=>typeof x=="number"?{high:x,low:x,mid:x}:x)),p)));let _=[];return s&&_.push({axis:"x",start:s}),ln.createElement(xa,Tc({data:{...o,columns:h},ref:i,regions:_},l))});md.displayName="ClayPredictiveChart";var vd=md;var xd=["#006eff","#cc4e00","#e60000","#1b7e6e","#e50082","#458613","#aa33ff","#cc4e00","#0077b3"],yd={x:{show:!0},y:{show:!0}},_d=["bb-line-dashed-2-2","bb-line-dashed-2-3","bb-line-dashed-2-4","bb-line-dashed-3-2","bb-line-dashed-3-3","bb-line-dashed-3-4","bb-line-dashed-4-2","bb-line-dashed-4-3","bb-line-dashed-4-4"];var bd=["circle","rectangle",'<polygon points="2.5 0 0 5 5 5"></polygon>','<polygon points="2.5 0 0 2.5 2.5 5 5 2.5"></polygon>','<polygon points="0 0 2.5 5 5 0"></polygon>','<path d="M5,5 a1,1 0 1,1 5,0">','<path d="M0,0 a1,1 0 0,0 5,0">','<rect width="5" height="2.5"></rect>','<rect width="2.5" height="5"></rect>'];function Ac(){return Ac=Object.assign?Object.assign.bind():function(r){for(var i=1;i<arguments.length;i++){var o=arguments[i];for(var s in o)({}).hasOwnProperty.call(o,s)&&(r[s]=o[s])}return r},Ac.apply(null,arguments)}var wd=ln.forwardRef((r,i)=>{let{color:o,data:s,elementProps:l,grid:h,line:_,point:p,...x}=r,b=ln.useRef(),A={...s},k;switch(s.type){case"geo-map":delete A.type,k=pd;break;case"predictive":delete A.type,k=vd;break;default:k=xa}return ln.createElement(k,Ac({},x,{color:{pattern:xd,...o},data:A,elementProps:l,grid:Object.assign(yd,h),line:{classes:_d,..._},point:{pattern:bd,...p},ref:i||b}))});wd.displayName="ClayChart";var Mp=wd;var{default:Sp,bb:r5}=Mc;var i5=Sp;export{r5 as bb,i5 as default}; 21/*! Bundled license information: 22 23billboard.js/dist/billboard.js: 24 (*! 25 * Copyright (c) 2017 ~ present NAVER Corp. 26 * billboard.js project is licensed under the MIT license 27 * 28 * billboard.js, JavaScript chart library 29 * http://naver.github.io/billboard.js/ 30 * 31 * @version 1.9.1 32 *) 33*/ 34//# sourceMappingURL=@clayui$charts.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.