1var fs=Object.create;var tr=Object.defineProperty;var hs=Object.getOwnPropertyDescriptor;var ds=Object.getOwnPropertyNames;var gs=Object.getPrototypeOf,ps=Object.prototype.hasOwnProperty;var vs=(a,v)=>()=>(a&&(v=a(a=0)),v);var hn=(a,v)=>()=>(v||a((v={exports:{}}).exports,v),v.exports),ms=(a,v)=>{for(var B in v)tr(a,B,{get:v[B],enumerable:!0})},Qi=(a,v,B,Y)=>{if(v&&typeof v=="object"||typeof v=="function")for(let kt of ds(v))!ps.call(a,kt)&&kt!==B&&tr(a,kt,{get:()=>v[kt],enumerable:!(Y=hs(v,kt))||Y.enumerable});return a},Ei=(a,v,B)=>(Qi(a,v,"default"),B&&Qi(B,v,"default")),ys=(a,v,B)=>(B=a!=null?fs(gs(a)):{},Qi(v||!a||!a.__esModule?tr(B,"default",{value:a,enumerable:!0}):B,a)),er=a=>Qi(tr({},"__esModule",{value:!0}),a);var ir=hn((nr,Ga)=>{(function(a,v){typeof nr=="object"&&typeof Ga<"u"?v(nr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(nr,function(a){"use strict";var v=new Date,B=new Date;function Y(l,C,tt,It){function Ut(Jt){return l(Jt=new Date(+Jt)),Jt}return Ut.floor=Ut,Ut.ceil=function(Jt){return l(Jt=new Date(Jt-1)),C(Jt,1),l(Jt),Jt},Ut.round=function(Jt){var Zt=Ut(Jt),oe=Ut.ceil(Jt);return Jt-Zt<oe-Jt?Zt:oe},Ut.offset=function(Jt,Zt){return C(Jt=new Date(+Jt),Zt==null?1:Math.floor(Zt)),Jt},Ut.range=function(Jt,Zt,oe){var Oe=[],De;if(Jt=Ut.ceil(Jt),oe=oe==null?1:Math.floor(oe),!(Jt<Zt)||!(oe>0))return Oe;do Oe.push(De=new Date(+Jt)),C(Jt,oe),l(Jt);while(De<Jt&&Jt<Zt);return Oe},Ut.filter=function(Jt){return Y(function(Zt){if(Zt>=Zt)for(;l(Zt),!Jt(Zt);)Zt.setTime(Zt-1)},function(Zt,oe){if(Zt>=Zt)if(oe<0)for(;++oe<=0;)for(;C(Zt,-1),!Jt(Zt););else for(;--oe>=0;)for(;C(Zt,1),!Jt(Zt););})},tt&&(Ut.count=function(Jt,Zt){return v.setTime(+Jt),B.setTime(+Zt),l(v),l(B),Math.floor(tt(v,B))}
vendor: 7,370 bytes, line 1
1,Ut.every=function(Jt){return Jt=Math.floor(Jt),!isFinite(Jt)||!(Jt>0)?null:Jt>1?Ut.filter(It?function(Zt){return It(Zt)%Jt===0}:function(Zt){return Ut.count(0,Zt)%Jt===0}):Ut}),Ut}var kt=Y(function(){},function(l,C){l.setTime(+l+C)},function(l,C){return C-l});kt.every=function(l){return l=Math.floor(l),!isFinite(l)||!(l>0)?null:l>1?Y(function(C){C.setTime(Math.floor(C/l)*l)},function(C,tt){C.setTime(+C+tt*l)},function(C,tt){return(tt-C)/l}):kt};var Et=kt.range,Ot=1e3,At=6e4,xt=36e5,wt=864e5,rt=6048e5,Rt=Y(function(l){l.setTime(Math.floor(l/Ot)*Ot)},function(l,C){l.setTime(+l+C*Ot)},function(l,C){return(C-l)/Ot},function(l){return l.getUTCSeconds()}),zt=Rt.range,et=Y(function(l){l.setTime(Math.floor(l/At)*At)},function(l,C){l.setTime(+l+C*At)},function(l,C){return(C-l)/At},function(l){return l.getMinutes()}),Pt=et.range,j=Y(function(l){var C=l.getTimezoneOffset()*At%xt;C<0&&(C+=xt),l.setTime(Math.floor((+l-C)/xt)*xt+C)},function(l,C){l.setTime(+l+C*xt)},function(l,C){return(C-l)/xt},function(l){return l.getHours()}),Mt=j.range,ht=Y(function(l){l.setHours(0,0,0,0)},function(l,C){l.setDate(l.getDate()+C)},function(l,C){return(C-l-(C.getTimezoneOffset()-l.getTimezoneOffset())*At)/wt},function(l){return l.getDate()-1}),Nt=ht.range;function Tt(l){return Y(function(C){C.setDate(C.getDate()-(C.getDay()+7-l)%7),C.setHours(0,0,0,0)},function(C,tt){C.setDate(C.getDate()+tt*7)},function(C,tt){return(tt-C-(tt.getTimezoneOffset()-C.getTimezoneOffset())*At)/rt})}var pt=Tt(0),W=Tt(1),X=Tt(2),w=Tt(3),R=Tt(4),N=Tt(5),f=Tt(6),ct=pt.range,yt=W.range,Q=X.range,J=w.range,gt=R.range,V=N.range,Lt=f.range,at=Y(function(l){l.setDate(1),l.setHours(0,0,0,0)},function(l,C){l.setMonth(l.getMonth()+C)},function(l,C){return C.getMonth()-l.getMonth()+(C.getFullYear()-l.getFullYear())*12},function(l){return l.getMonth()}),_t=at.range,bt=Y(function(l){l.setMonth(0,1),l.setHours(0,0,0,0)},function(l,C){l.setFullYear(l.getFullYear()+C)},function(l,C){return C.getFullYear()-l.getFullYear()},function(l){return l.getFullYear()});bt.every=function(l){return!isFinite(l=Math.floor(l))||!(l>0)?null:Y(function(C){C.setFullYear(Math.floor(C.getFullYear()/l)*l),C.setMonth(0,1),C.setHours(0,0,0,0)},function(C,tt){C.setFullYear(C.getFullYear()+tt*l)})};var ft=bt.range,vt=Y(function(l){l.setUTCSeconds(0,0)},function(l,C){l.setTime(+l+C*At)},function(l,C){return(C-l)/At},function(l){return l.getUTCMinutes()}),Ct=vt.range,Gt=Y(function(l){l.setUTCMinutes(0,0,0)},function(l,C){l.setTime(+l+C*xt)},function(l,C){return(C-l)/xt},function(l){return l.getUTCHours()}),ue=Gt.range,ie=Y(function(l){l.setUTCHours(0,0,0,0)},function(l,C){l.setUTCDate(l.getUTCDate()+C)},function(l,C){return(C-l)/wt},function(l){return l.getUTCDate()-1}),xe=ie.range;function y(l){return Y(function(C){C.setUTCDate(C.getUTCDate()-(C.getUTCDay()+7-l)%7),C.setUTCHours(0,0,0,0)},function(C,tt){C.setUTCDate(C.getUTCDate()+tt*7)},function(C,tt){return(tt-C)/rt})}var $=y(0),x=y(1),A=y(2),k=y(3),_=y(4),it=y(5),ut=y(6),Wt=$.range,qt=x.range,pe=A.range,le=k.range,Qt=_.range,Xt=it.range,be=ut.range,ee=Y(function(l){l.setUTCDate(1),l.setUTCHours(0,0,0,0)},function(l,C){l.setUTCMonth(l.getUTCMonth()+C)},function(l,C){return C.getUTCMonth()-l.getUTCMonth()+(C.getUTCFullYear()-l.getUTCFullYear())*12},function(l){return l.getUTCMonth()}),Ce=ee.range,Fe=Y(function(l){l.setUTCMonth(0,1),l.setUTCHours(0,0,0,0)},function(l,C){l.setUTCFullYear(l.getUTCFullYear()+C)},function(l,C){return C.getUTCFullYear()-l.getUTCFullYear()},function(l){return l.getUTCFullYear()});Fe.every=function(l){return!isFinite(l=Math.floor(l))||!(l>0)?null:Y(function(C){C.setUTCFullYear(Math.floor(C.getUTCFullYear()/l)*l),C.setUTCMonth(0,1),C.setUTCHours(0,0,0,0)},function(C,tt){C.setUTCFullYear(C.getUTCFullYear()+tt*l)})};var ze=Fe.range;a.timeInterval=Y,a.timeMillisecond=kt,a.timeMilliseconds=Et,a.utcMillisecond=kt,a.utcMilliseconds=Et,a.timeSecond=Rt,a.timeSeconds=zt,a.utcSecond=Rt,a.utcSeconds=zt,a.timeMinute=et,a.timeMinutes=Pt,a.timeHour=j,a.timeHours=Mt,a.timeDay=ht,a.timeDays=Nt,a.timeWeek=pt,a.timeWeeks=ct,a.timeSunday=pt,a.timeSundays=ct,a.timeMonday=W,a.timeMondays=yt,a.timeTuesday=X,a.timeTuesdays=Q,a.timeWednesday=w,a.timeWednesdays=J,a.timeThursday=R,a.timeThursdays=gt,a.timeFriday=N,a.timeFridays=V,a.timeSaturday=f,a.timeSaturdays=Lt,a.timeMonth=at,a.timeMonths=_t,a.timeYear=bt,a.timeYears=ft,a.utcMinute=vt,a.utcMinutes=Ct,a.utcHour=Gt,a.utcHours=ue,a.utcDay=ie,a.utcDays=xe,a.utcWeek=$,a.utcWeeks=Wt,a.utcSunday=$,a.utcSundays=Wt,a.utcMonday=x,a.utcMondays=qt,a.utcTuesday=A,a.utcTuesdays=pe,a.utcWednesday=k,a.utcWednesdays=le,a.utcThursday=_,a.utcThursdays=Qt,a.utcFriday=it,a.utcFridays=Xt,a.utcSaturday=ut,a.utcSaturdays=be,a.utcMonth=ee,a.utcMonths=Ce,a.utcYear=Fe,a.utcYears=ze,Object.defineProperty(a,"__esModule",{value:!0})})});var Pi=hn((rr,Za)=>{(function(a,v){typeof rr=="object"&&typeof Za<"u"?v(rr,ir()):typeof define=="function"&&define.amd?define(["exports","d3-time"],v):v(a.d3=a.d3||{},a.d3)})(rr,function(a,v){"use strict";function B(nt){if(0<=nt.y&&nt.y<100){var Bt=new Date(-1,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L);return Bt.setFullYear(nt.y),Bt}return new Date(nt.y,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L)}function Y(nt){if(0<=nt.y&&nt.y<100){var Bt=new Date(Date.UTC(-1,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L));return Bt.setUTCFullYear(nt.y),Bt}return new Date(Date.UTC(nt.y,nt.m,nt.d,nt.H,nt.M,nt.S,nt.L))}function kt(nt){return{y:nt,m:0,d:1,H:0,M:0,S:0,L:0}}function Et(nt){var Bt=nt.dateTime,de=nt.date,E=nt.time,H=nt.periods,m=nt.days,p=nt.shortDays,M=nt.months,T=nt.shortMonths,z=zt(H),G=et(H),Z=zt(m),q=et(m),mt=zt(p),Ft=et(p),lt=zt(M),jt=et(M),re=zt(T),ce=et(T),ye={a:St,A:se,b:_e,B:we,c:null,d:Lt,e:Lt,f:vt,H:at,I:_t,j:bt,L:ft,m:Ct,M:Gt,p:Re,Q:Jt,s:Zt,S:ue,u:ie,U:xe,V:y,w:$,W:x,x:null,X:null,y:A,Y:k,Z:_,"%":Ut},Ne={a:s,A:e,b:t,B:n,c:null,d:it,e:it,f:le,H:ut,I:Wt,j:qt,L:pe,m:Qt,M:Xt,p:i,Q:Jt,s:Zt,S:be,u:ee,U:Ce,V:Fe,w:ze,W:l,x:null,X:null,y:C,Y:tt,Z:It,"%":Ut},Ue={a:$n,A:Sn,b:Ve,B:An,c:pn,d:w,e:w,f:Q,H:N,I:N,j:R,L:yt,m:X,M:f,p:gn,Q:gt,s:V,S:ct,u:j,U:Mt,V:ht,w:Pt,W:Nt,x:wn,X:U,y:pt,Y:Tt,Z:W,"%":J};ye.x=fn(de,ye),ye.X=fn(E,ye),ye.c=fn(Bt,ye),Ne.x=fn(de,Ne),Ne.X=fn(E,Ne),Ne.c=fn(Bt,Ne);function fn(r,o){return function(u){var d=[],O=-1,S=0,D=r.length,c,g,L;for(u instanceof Date||(u=new Date(+u));++O<D;)r.charCodeAt(O)===37&&(d.push(r.slice(S,O)),(g=Ot[c=r.charAt(++O)])!=null?c=r.charAt(++O):g=c==="e"?" ":"0",(L=o[c])&&(c=L(u,g)),d.push(c),S=O+1);return d.push(r.slice(S,O)),d.join("")}}function sn(r,o){return function(u){var d=kt(1900),O=on(d,r,u+="",0),S,D;if(O!=u.length)return null;if("Q"in d)return new Date(d.Q);if("p"in d&&(d.H=d.H%12+d.p*12),"V"in d){if(d.V<1||d.V>53)return null;"w"in d||(d.w=1),"Z"in d?(S=Y(kt(d.y)),D=S.getUTCDay(),S=D>4||D===0?v.utcMonday.ceil(S):v.utcMonday(S),S=v.utcDay.offset(S,(d.V-1)*7),d.y=S.getUTCFullYear(),d.m=S.getUTCMonth(),d.d=S.getUTCDate()+(d.w+6)%7):(S=o(kt(d.y)),D=S.getDay(),S=D>4||D===0?v.timeMonday.ceil(S):v.timeMonday(S),S=v.timeDay.offset(S,(d.V-1)*7),d.y=S.getFullYear(),d.m=S.getMonth(),d.d=S.getDate()+(d.w+6)%7)}else("W"in d||"U"in d)&&("w"in d||(d.w="u"in d?d.u%7:"W"in d?1:0),D="Z"in d?Y(kt(d.y)).getUTCDay():o(kt(d.y)).getDay(),d.m=0,d.d="W"in d?(d.w+6)%7+d.W*7-(D+5)%7:d.w+d.U*7-(D+6)%7);return"Z"in d?(d.H+=d.Z/100|0,d.M+=d.Z%100,Y(d)):o(d)}}function on(r,o,u,d){for(var O=0,S=o.length,D=u.length,c,g;O<S;){if(d>=D)return-1;
vendor: 6,169 bytes, line 1
1if(c=o.charCodeAt(O++),c===37){if(c=o.charAt(O++),g=Ue[c in Ot?o.charAt(O++):c],!g||(d=g(r,u,d))<0)return-1}else if(c!=u.charCodeAt(d++))return-1}return d}function gn(r,o,u){var d=z.exec(o.slice(u));return d?(r.p=G[d[0].toLowerCase()],u+d[0].length):-1}function $n(r,o,u){var d=mt.exec(o.slice(u));return d?(r.w=Ft[d[0].toLowerCase()],u+d[0].length):-1}function Sn(r,o,u){var d=Z.exec(o.slice(u));return d?(r.w=q[d[0].toLowerCase()],u+d[0].length):-1}function Ve(r,o,u){var d=re.exec(o.slice(u));return d?(r.m=ce[d[0].toLowerCase()],u+d[0].length):-1}function An(r,o,u){var d=lt.exec(o.slice(u));return d?(r.m=jt[d[0].toLowerCase()],u+d[0].length):-1}function pn(r,o,u){return on(r,Bt,o,u)}function wn(r,o,u){return on(r,de,o,u)}function U(r,o,u){return on(r,E,o,u)}function St(r){return p[r.getDay()]}function se(r){return m[r.getDay()]}function _e(r){return T[r.getMonth()]}function we(r){return M[r.getMonth()]}function Re(r){return H[+(r.getHours()>=12)]}function s(r){return p[r.getUTCDay()]}function e(r){return m[r.getUTCDay()]}function t(r){return T[r.getUTCMonth()]}function n(r){return M[r.getUTCMonth()]}function i(r){return H[+(r.getUTCHours()>=12)]}return{format:function(r){var o=fn(r+="",ye);return o.toString=function(){return r},o},parse:function(r){var o=sn(r+="",B);return o.toString=function(){return r},o},utcFormat:function(r){var o=fn(r+="",Ne);return o.toString=function(){return r},o},utcParse:function(r){var o=sn(r,Y);return o.toString=function(){return r},o}}}var Ot={"-":"",_:" ",0:"0"},At=/^\s*\d+/,xt=/^%/,wt=/[\\^$*+?|[\]().{}]/g;function rt(nt,Bt,de){var E=nt<0?"-":"",H=(E?-nt:nt)+"",m=H.length;return E+(m<de?new Array(de-m+1).join(Bt)+H:H)}function Rt(nt){return nt.replace(wt,"\\$&")}function zt(nt){return new RegExp("^(?:"+nt.map(Rt).join("|")+")","i")}function et(nt){for(var Bt={},de=-1,E=nt.length;++de<E;)Bt[nt[de].toLowerCase()]=de;return Bt}function Pt(nt,Bt,de){var E=At.exec(Bt.slice(de,de+1));return E?(nt.w=+E[0],de+E[0].length):-1}function j(nt,Bt,de){var E=At.exec(Bt.slice(de,de+1));return E?(nt.u=+E[0],de+E[0].length):-1}function Mt(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.U=+E[0],de+E[0].length):-1}function ht(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.V=+E[0],de+E[0].length):-1}function Nt(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.W=+E[0],de+E[0].length):-1}function Tt(nt,Bt,de){var E=At.exec(Bt.slice(de,de+4));return E?(nt.y=+E[0],de+E[0].length):-1}function pt(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.y=+E[0]+(+E[0]>68?1900:2e3),de+E[0].length):-1}function W(nt,Bt,de){var E=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Bt.slice(de,de+6));return E?(nt.Z=E[1]?0:-(E[2]+(E[3]||"00")),de+E[0].length):-1}function X(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.m=E[0]-1,de+E[0].length):-1}function w(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.d=+E[0],de+E[0].length):-1}function R(nt,Bt,de){var E=At.exec(Bt.slice(de,de+3));return E?(nt.m=0,nt.d=+E[0],de+E[0].length):-1}function N(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.H=+E[0],de+E[0].length):-1}function f(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.M=+E[0],de+E[0].length):-1}function ct(nt,Bt,de){var E=At.exec(Bt.slice(de,de+2));return E?(nt.S=+E[0],de+E[0].length):-1}function yt(nt,Bt,de){var E=At.exec(Bt.slice(de,de+3));return E?(nt.L=+E[0],de+E[0].length):-1}function Q(nt,Bt,de){var E=At.exec(Bt.slice(de,de+6));return E?(nt.L=Math.floor(E[0]/1e3),de+E[0].length):-1}function J(nt,Bt,de){var E=xt.exec(Bt.slice(de,de+1));return E?de+E[0].length:-1}function gt(nt,Bt,de){var E=At.exec(Bt.slice(de));return E?(nt.Q=+E[0],de+E[0].length):-1}function V(nt,Bt,de){var E=At.exec(Bt.slice(de));return E?(nt.Q=+E[0]*1e3,de+E[0].length):-1}function Lt(nt,Bt){return rt(nt.getDate(),Bt,2)}function at(nt,Bt){return rt(nt.getHours(),Bt,2)}function _t(nt,Bt){return rt(nt.getHours()%12||12,Bt,2)}function bt(nt,Bt){return rt(1+v.timeDay.count(v.timeYear(nt),nt),Bt,3)}function ft(nt,Bt){return rt(nt.getMilliseconds(),Bt,3)}function vt(nt,Bt){return ft(nt,Bt)+"000"}function Ct(nt,Bt){return rt(nt.getMonth()+1,Bt,2)}function Gt(nt,Bt){return rt(nt.getMinutes(),Bt,2)}function ue(nt,Bt){return rt(nt.getSeconds(),Bt,2)}function ie(nt){var Bt=nt.getDay();return Bt===0?7:Bt}function xe(nt,Bt){return rt(v.timeSunday.count(v.timeYear(nt),nt),Bt,2)}function y(nt,Bt){var de=nt.getDay();return nt=de>=4||de===0?v.timeThursday(nt):v.timeThursday.ceil(nt),rt(v.timeThursday.count(v.timeYear(nt),nt)+(v.timeYear(nt).getDay()===4),Bt,2)}function $(nt){return nt.getDay()}function x(nt,Bt){return rt(v.timeMonday.count(v.timeYear(nt),nt),Bt,2)}function A(nt,Bt){return rt(nt.getFullYear()%100,Bt,2)}function k(nt,Bt){return rt(nt.getFullYear()%1e4,Bt,4)}function _(nt){var Bt=nt.getTimezoneOffset();return(Bt>0?"-":(Bt*=-1,"+"))+rt(Bt/60|0,"0",2)+rt(Bt%60,"0",2)}function it(nt,Bt){return rt(nt.getUTCDate(),Bt,2)}function ut(nt,Bt){return rt(nt.getUTCHours(),Bt,2)}function Wt(nt,Bt){return rt(nt.getUTCHours()%12||12,Bt,2)}function qt(nt,Bt){return rt(1+v.utcDay.count(v.utcYear(nt),nt),Bt,3)}function pe(nt,Bt){return rt(nt.getUTCMilliseconds(),Bt,3)}function le(nt,Bt){return pe(nt,Bt)+"000"}function Qt(nt,Bt){return rt(nt.getUTCMonth()+1,Bt,2)}function Xt(nt,Bt){return rt(nt.getUTCMinutes(),Bt,2)}function be(nt,Bt){return rt(nt.getUTCSeconds(),Bt,2)}function ee(nt){var Bt=nt.getUTCDay();return Bt===0?7:Bt}function Ce(nt,Bt){return rt(v.utcSunday.count(v.utcYear(nt),nt),Bt,2)}function Fe(nt,Bt){var de=nt.getUTCDay();return nt=de>=4||de===0?v.utcThursday(nt):v.utcThursday.ceil(nt),rt(v.utcThursday.count(v.utcYear(nt),nt)+(v.utcYear(nt).getUTCDay()===4),Bt,2)}function ze(nt){return nt.getUTCDay()}function l(nt,Bt){return rt(v.utcMonday.count(v.utcYear(nt),nt),Bt,2)}function C(nt,Bt){return rt(nt.getUTCFullYear()%100,Bt,2)}function tt(nt,Bt){return rt(nt.getUTCFullYear()%1e4,Bt,4)}function It(){return"+0000"}function Ut(){return"%"}function Jt(nt){return+nt}function Zt(nt){return Math.floor(+nt/1e3)}var oe;Oe({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 Oe(nt){return oe=Et(nt),a.timeFormat=oe.format,a.timeParse=oe.parse,a.utcFormat=oe.utcFormat,a.utcParse=oe.utcParse,oe}var De="%Y-%m-%dT%H:%M:%S.%LZ";function ke(nt){return nt.toISOString()}var Ie=Date.prototype.toISOString?ke:a.utcFormat(De);function He(nt){var Bt=new Date(nt);return isNaN(Bt)?null:Bt}var an=+new Date("2000-01-01T00:00:00.000Z")?He:a.utcParse(De);a.timeFormatDefaultLocale=Oe,a.timeFormatLocale=Et,a.isoFormat=Ie,a.isoParse=an,Object.defineProperty(a,"__esModule",{value:!0})})});var ei=hn((ar,Ka)=>{(function(a,v){typeof ar=="object"&&typeof Ka<"u"?v(ar):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(ar,function(a){"use strict";var v="http://www.w3.org/1999/xhtml",B={svg:"http://www.w3.org/2000/svg",xhtml:v,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Y(U){var St=U+="",se=St.indexOf(":");return se>=0&&(St=U.slice(0,se))!=="xmlns"&&(U=U.slice(se+1)),B.hasOwnProperty(St)?{space:B[St],local:U}:U}function kt(U){return function(){var St=this.ownerDocument,se=this.namespaceURI;return se===v&&St.documentElement.namespaceURI===v?St.createElement(U):St.createElementNS(se,U)}}function Et(U){return function(){return this.ownerDocument.createElementNS(U.space,U.local)}}function Ot(U){var St=Y(U);return(St.local?Et:kt)(St)}function At(){}function xt(U){return U==null?At:function(){return this.querySelector(U)}}function wt(U){typeof U!="function"&&(U=xt(U));for(var St=this._groups,se=St.length,_e=new Array(se),we=0;we<se;++we)for(var Re=St[we],s=Re.length,e=_e[we]=new Array(s),t,n,i=0;i<s;++i)(t=Re[i])&&(n=U.call(t,t.__data__,i,Re))&&("__data__"in t&&(n.__data__=t.__data__),e[i]=n);return new ye(_e,this._parents)}function rt(){return[]}function Rt(U){return U==null?rt:function(){return this.querySelectorAll(U)}}function zt(U){typeof U!="function"&&(U=Rt(U));for(var St=this._groups,se=St.length,_e=[],we=[],Re=0;Re<se;++Re)for(var s=St[Re],e=s.length,t,n=0;n<e;++n)(t=s[n])&&(_e.push(U.call(t,t.__data__,n,s)),we.push(t));return new ye(_e,we)}function et(U){return function(){return this.matches(U)}}function Pt(U){typeof U!="function"&&(U=et(U));for(var St=this._groups,se=St.length,_e=new Array(se),we=0;we<se;++we)for(var Re=St[we],s=Re.length,e=_e[we]=[],t,n=0;n<s;++n)(t=Re[n])&&U.call(t,t.__data__,n,Re)&&e.push(t);return new ye(_e,this._parents)}function j(U){return new Array(U.length)}function Mt(){return new ye(this._enter||this._groups.map(j),this._parents)}function ht(U,St){this.ownerDocument=U.ownerDocument,this.namespaceURI=U.namespaceURI,this._next=null,this._parent=U,this.__data__=St}ht.prototype={constructor:ht,appendChild:function(U){return this._parent.insertBefore(U,this._next)},insertBefore:function(U,St){return this._parent.insertBefore(U,St)},querySelector:function(U){return this._parent.querySelector(U)},querySelectorAll:function(U){return this._parent.querySelectorAll(U)}};function Nt(U){return function(){return U}}var Tt="$";function pt(U,St,se,_e,we,Re){for(var s=0,e,t=St.length,n=Re.length;s<n;++s)(e=St[s])?(e.__data__=Re[s],_e[s]=e):se[s]=new ht(U,Re[s]);for(;s<t;++s)(e=St[s])&&(we[s]=e)}function W(U,St,se,_e,we,Re,s){var e,t,n={},i=St.length,r=Re.length,o=new Array(i),u;for(e=0;e<i;++e)(t=St[e])&&(o[e]=u=Tt+s.call(t,t.__data__,e,St),u in n?we[e]=t:n[u]=t);for(e=0;e<r;++e)u=Tt+s.call(U,Re[e],e,Re),(t=n[u])?(_e[e]=t,t.__data__=Re[e],n[u]=null):se[e]=new ht(U,Re[e]);for(e=0;e<i;++e)(t=St[e])&&n[o[e]]===t&&(we[e]=t)}function X(U,St){if(!U)return u=new Array(this.size()),n=-1,this.each(function(ot){u[++n]=ot}),u;var se=St?W:pt,_e=this._parents,we=this._groups;typeof U!="function"&&(U=Nt(U));for(var Re=we.length,s=new Array(Re),e=new Array(Re),t=new Array(Re),n=0;n<Re;++n){var i=_e[n],r=we[n],o=r.length,u=U.call(i,i&&i.__data__,n,_e),d=u.length,O=e[n]=new Array(d),S=s[n]=new Array(d),D=t[n]=new Array(o);se(i,r,O,S,D,u,St);for(var c=0,g=0,L,I;c<d;++c)if(L=O[c]){for(c>=g&&(g=c+1);!(I=S[g])&&++g<d;);L._next=I||null}}return s=new ye(s,_e),s._enter=e,s._exit=t,s}function w(){return new ye(this._exit||this._groups.map(j),this._parents)}function R(U,St,se){var _e=this.enter(),we=this,Re=this.exit();return _e=typeof U=="function"?U(_e):_e.append(U+""),St!=null&&(we=St(we)),se==null?Re.remove():se(Re),_e&&we?_e.merge(we).order():we}function N(U){for(var St=this._groups,se=U._groups,_e=St.length,we=se.length,Re=Math.min(_e,
vendor: 5,751 bytes, line 1
1we),s=new Array(_e),e=0;e<Re;++e)for(var t=St[e],n=se[e],i=t.length,r=s[e]=new Array(i),o,u=0;u<i;++u)(o=t[u]||n[u])&&(r[u]=o);for(;e<_e;++e)s[e]=St[e];return new ye(s,this._parents)}function f(){for(var U=this._groups,St=-1,se=U.length;++St<se;)for(var _e=U[St],we=_e.length-1,Re=_e[we],s;--we>=0;)(s=_e[we])&&(Re&&s.compareDocumentPosition(Re)^4&&Re.parentNode.insertBefore(s,Re),Re=s);return this}function ct(U){U||(U=yt);function St(r,o){return r&&o?U(r.__data__,o.__data__):!r-!o}for(var se=this._groups,_e=se.length,we=new Array(_e),Re=0;Re<_e;++Re){for(var s=se[Re],e=s.length,t=we[Re]=new Array(e),n,i=0;i<e;++i)(n=s[i])&&(t[i]=n);t.sort(St)}return new ye(we,this._parents).order()}function yt(U,St){return U<St?-1:U>St?1:U>=St?0:NaN}function Q(){var U=arguments[0];return arguments[0]=this,U.apply(null,arguments),this}function J(){var U=new Array(this.size()),St=-1;return this.each(function(){U[++St]=this}),U}function gt(){for(var U=this._groups,St=0,se=U.length;St<se;++St)for(var _e=U[St],we=0,Re=_e.length;we<Re;++we){var s=_e[we];if(s)return s}return null}function V(){var U=0;return this.each(function(){++U}),U}function Lt(){return!this.node()}function at(U){for(var St=this._groups,se=0,_e=St.length;se<_e;++se)for(var we=St[se],Re=0,s=we.length,e;Re<s;++Re)(e=we[Re])&&U.call(e,e.__data__,Re,we);return this}function _t(U){return function(){this.removeAttribute(U)}}function bt(U){return function(){this.removeAttributeNS(U.space,U.local)}}function ft(U,St){return function(){this.setAttribute(U,St)}}function vt(U,St){return function(){this.setAttributeNS(U.space,U.local,St)}}function Ct(U,St){return function(){var se=St.apply(this,arguments);se==null?this.removeAttribute(U):this.setAttribute(U,se)}}function Gt(U,St){return function(){var se=St.apply(this,arguments);se==null?this.removeAttributeNS(U.space,U.local):this.setAttributeNS(U.space,U.local,se)}}function ue(U,St){var se=Y(U);if(arguments.length<2){var _e=this.node();return se.local?_e.getAttributeNS(se.space,se.local):_e.getAttribute(se)}return this.each((St==null?se.local?bt:_t:typeof St=="function"?se.local?Gt:Ct:se.local?vt:ft)(se,St))}function ie(U){return U.ownerDocument&&U.ownerDocument.defaultView||U.document&&U||U.defaultView}function xe(U){return function(){this.style.removeProperty(U)}}function y(U,St,se){return function(){this.style.setProperty(U,St,se)}}function $(U,St,se){return function(){var _e=St.apply(this,arguments);_e==null?this.style.removeProperty(U):this.style.setProperty(U,_e,se)}}function x(U,St,se){return arguments.length>1?this.each((St==null?xe:typeof St=="function"?$:y)(U,St,se??"")):A(this.node(),U)}function A(U,St){return U.style.getPropertyValue(St)||ie(U).getComputedStyle(U,null).getPropertyValue(St)}function k(U){return function(){delete this[U]}}function _(U,St){return function(){this[U]=St}}function it(U,St){return function(){var se=St.apply(this,arguments);se==null?delete this[U]:this[U]=se}}function ut(U,St){return arguments.length>1?this.each((St==null?k:typeof St=="function"?it:_)(U,St)):this.node()[U]}function Wt(U){return U.trim().split(/^|\s+/)}function qt(U){return U.classList||new pe(U)}function pe(U){this._node=U,this._names=Wt(U.getAttribute("class")||"")}pe.prototype={add:function(U){var St=this._names.indexOf(U);St<0&&(this._names.push(U),this._node.setAttribute("class",this._names.join(" ")))},remove:function(U){var St=this._names.indexOf(U);St>=0&&(this._names.splice(St,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(U){return this._names.indexOf(U)>=0}};function le(U,St){for(var se=qt(U),_e=-1,we=St.length;++_e<we;)se.add(St[_e])}function Qt(U,St){for(var se=qt(U),_e=-1,we=St.length;++_e<we;)se.remove(St[_e])}function Xt(U){return function(){le(this,U)}}function be(U){return function(){Qt(this,U)}}function ee(U,St){return function(){(St.apply(this,arguments)?le:Qt)(this,U)}}function Ce(U,St){var se=Wt(U+"");if(arguments.length<2){for(var _e=qt(this.node()),we=-1,Re=se.length;++we<Re;)if(!_e.contains(se[we]))return!1;return!0}return this.each((typeof St=="function"?ee:St?Xt:be)(se,St))}function Fe(){this.textContent=""}function ze(U){return function(){this.textContent=U}}function l(U){return function(){var St=U.apply(this,arguments);this.textContent=St??""}}function C(U){return arguments.length?this.each(U==null?Fe:(typeof U=="function"?l:ze)(U)):this.node().textContent}function tt(){this.innerHTML=""}function It(U){return function(){this.innerHTML=U}}function Ut(U){return function(){var St=U.apply(this,arguments);this.innerHTML=St??""}}function Jt(U){return arguments.length?this.each(U==null?tt:(typeof U=="function"?Ut:It)(U)):this.node().innerHTML}function Zt(){this.nextSibling&&this.parentNode.appendChild(this)}function oe(){return this.each(Zt)}function Oe(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function De(){return this.each(Oe)}function ke(U){var St=typeof U=="function"?U:Ot(U);return this.select(function(){return this.appendChild(St.apply(this,arguments))})}function Ie(){return null}function He(U,St){var se=typeof U=="function"?U:Ot(U),_e=St==null?Ie:typeof St=="function"?St:xt(St);return this.select(function(){return this.insertBefore(se.apply(this,arguments),_e.apply(this,arguments)||null)})}function an(){var U=this.parentNode;U&&U.removeChild(this)}function nt(){return this.each(an)}function Bt(){return this.parentNode.insertBefore(this.cloneNode(!1),this.nextSibling)}function de(){return this.parentNode.insertBefore(this.cloneNode(!0),this.nextSibling)}function E(U){return this.select(U?de:Bt)}function H(U){return arguments.length?this.property("__data__",U):this.node().__data__}var m={};if(a.event=null,typeof document<"u"){var p=document.documentElement;
1"onmouseenter"in p||(m={mouseenter:"mouseover",mouseleave:"mouseout"})}function M(U,St,se){return U=T(U,St,se),function(_e){var we=_e.relatedTarget;(!we||we!==this&&!(we.compareDocumentPosition(this)&8))&&U.call(this,_e)}}function T(U,St,se){return function(_e){var we=a.event;a.event=_e;try{U.call(this,this.__data__,St,se)}finally{a.event=we}}}function z(U){return U.trim().split(/^|\s+/).map(function(St){var se="",_e=St.indexOf(".");return _e>=0&&(se=St.slice(_e+1),St=St.slice(0,_e)),{type:St,name:se}})}function G(U){return function(){var St=this.__on;if(St){for(var se=0,_e=-1,we=St.length,Re;se<we;++se)Re=St[se],(!U.type||Re.type===U.type)&&Re.name===U.name?this.removeEventListener(Re.type,Re.listener,Re.capture):St[++_e]=Re;++_e?St.length=_e:delete this.__on}}}function Z(U,St,se){var _e=m.hasOwnProperty(U.type)?M:T;return function(we,Re,s){var e=this.__on,t,n=_e(St,Re,s);if(e){for(var i=0,r=e.length;i<r;++i)if((t=e[i]).type===U.type&&t.name===U.name){this.removeEventListener(t.type,t.listener,t.capture),this.addEventListener(t.type,t.listener=n,t.capture=se),t.value=St;return}}this.addEventListener(U.type,n,se),t={type:U.type,name:U.name,value:St,listener:n,capture:se},e?e.push(t):this.__on=[t]}}function q(U,St,se){var _e=z(U+""),we,Re=_e.length,s;if(arguments.length<2){var e=this.node().__on;if(e){for(var t=0,n=e.length,i;t<n;++t)for(we=0,i=e[t];we<Re;++we)if((s=_e[we]).type===i.type&&s.name===i.name)return i.value}return}for(e=St?Z:G,se==null&&(se=!1),we=0;we<Re;++we)this.each(e(_e[we],St,se));return this}function mt(U,St,se,_e){var we=a.event;U.sourceEvent=a.event,a.event=U;try{return St.apply(se,_e)}finally{a.event=we}}function Ft(U,St,se){var _e=ie(U),we=_e.CustomEvent;typeof we=="function"?we=new we(St,se):(we=_e.document.createEvent("Event"),se?(we.initEvent(St,se.bubbles,se.cancelable),we.detail=se.detail):we.initEvent(St,!1,!1)),U.dispatchEvent(we)}function lt(U,St){return function(){return Ft(this,U,St)}}function jt(U,St){return function(){return Ft(this,U,St.apply(this,arguments))}}function re(U,St){return this.each((typeof St=="function"?jt:lt)(U,St))}var ce=[null];function ye(U,St){this._groups=U,this._parents=St}function Ne(){return new ye([[document.documentElement]],ce)}ye.prototype=Ne.prototype={constructor:ye,select:wt,selectAll:zt,filter:Pt,data:X,enter:Mt,exit:w,join:R,merge:N,order:f,sort:ct,call:Q,nodes:J,node:gt,size:V,empty:Lt,each:at,attr:ue,style:x,property:ut,classed:Ce,text:C,html:Jt,raise:oe,lower:De,append:ke,insert:He,remove:nt,clone:E,datum:H,on:q,dispatch:re};function Ue(U){return typeof U=="string"?new ye([[document.querySelector(U)]],[document.documentElement]):new ye([[U]],ce)}function fn(U){return Ue(Ot(U).call(document.documentElement))}var sn=0;function on(){return new gn}function gn(){this._="@"+(++sn).toString(36)}gn.prototype=on.prototype={constructor:gn,get:function(U){for(var St=this._;!(St in U);)if(!(U=U.parentNode))return;return U[St]},set:function(U,St){return U[this._]=St},remove:function(U){return this._ in U&&delete U[this._]},toString:function(){return this._}};function $n(){for(var U=a.event,St;St=U.sourceEvent;)U=St;return U}function Sn(U,St){var se=U.ownerSVGElement||U;if(se.createSVGPoint){var _e=se.createSVGPoint();return _e.x=St.clientX,_e.y=St.clientY,_e=_e.matrixTransform(U.getScreenCTM().inverse()),[_e.x,_e.y]}var we=U.getBoundingClientRect();return[St.clientX-we.left-U.clientLeft,St.clientY-we.top-U.clientTop]}function Ve(U){var St=$n();return St.changedTouches&&(St=St.changedTouches[0]),Sn(U,St)}function An(U){return typeof U=="string"?new ye([document.querySelectorAll(U)],[document.documentElement]):new ye([U??[]],ce)}function pn(U,St,se){arguments.length<3&&(se=St,St=$n().changedTouches);for(var _e=0,we=St?St.length:0,Re;_e<we;++_e)if((Re=St[_e]).identifier===se)return Sn(U,Re);return null}function wn(U,St){St==null&&(St=$n().touches);for(var se=0,_e=St?St.length:0,we=new Array(_e);se<_e;++se)we[se]=Sn(U,St[se]);return we}a.create=fn,a.creator=Ot,a.local=on,a.matcher=et,a.mouse=Ve,a.namespace=Y,a.namespaces=B,a.clientPoint=Sn,a.select=Ue,a.selectAll=An,a.selection=Ne,a.selector=xt,a.selectorAll=Rt,a.style=A,a.touch=pn,a.touches=wn,a.window=ie,a.customEvent=mt,Object.defineProperty(a,"__esModule",{value:!0})})});var oi=hn((or,Ja)=>{(function(a,v){typeof or=="object"&&typeof Ja<"u"?v(or):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(or,function(a){"use strict";var v={value:function(){}};function B(){for(var At=0,xt=arguments.length,wt={},rt;At<xt;++At){if(!(rt=arguments[At]+"")||rt in wt)throw new Error("illegal type: "+rt);wt[rt]=[]}return new Y(wt)}function Y(At){this._=At}function kt(At,xt){return At.trim().split(/^|\s+/).map(function(wt){var rt="",Rt=wt.indexOf(".");if(Rt>=0&&(rt=wt.slice(Rt+1),wt=wt.slice(0,Rt)),wt&&!xt.hasOwnProperty(wt))throw new Error("unknown type: "+wt);return{type:wt,name:rt}})}Y.prototype=B.prototype={constructor:Y,on:function(At,xt){var wt=this._,rt=kt(At+"",wt),Rt,zt=-1,et=rt.length;if(arguments.length<2){for(;++zt<et;)if((Rt=(At=rt[zt]).type)&&(Rt=Et(wt[Rt],At.name)))return Rt;return}if(xt!=null&&typeof xt!="function")throw new Error("invalid callback: "+xt);for(;++zt<et;)if(Rt=(At=rt[zt]).type)wt[Rt]=Ot(wt[Rt],At.name,xt);else if(xt==null)for(Rt in wt)wt[Rt]=Ot(wt[Rt],At.name,null);return this},copy:function(){var At={},xt=this._;for(var wt in xt)At[wt]=xt[wt].slice();return new Y(At)},call:function(At,xt){if((Rt=arguments.length-2)>0)for(var wt=new Array(Rt),rt=0,Rt,zt;rt<Rt;++rt)wt[rt]=arguments[rt+2];if(!this._.hasOwnProperty(At))throw new Error("unknown type: "+At);for(zt=this._[At],rt=0,Rt=zt.length;rt<Rt;++rt)zt[rt].value.apply(xt,wt)},apply:function(At,xt,wt){if(!this._.hasOwnProperty(At))throw new Error("unknown type: "+At);for(var rt=this._[At],Rt=0,zt=rt.length;Rt<zt;++Rt)rt[Rt].value.apply(xt,wt)}};function Et(At,xt){for(var wt=0,rt=At.length,Rt;wt<rt;++wt)if((Rt=At[wt]).name===xt)return Rt.value}function Ot(At,xt,wt){for(var rt=0,Rt=At.length;rt<Rt;++rt)if(At[rt].name===xt){At[rt]=v,At=At.slice(0,rt).concat(At.slice(rt+1));break}return wt!=null&&At.push({name:xt,value:wt}),At}a.dispatch=B,Object.defineProperty(a,"__esModule",{value:!0})})});var sr=hn((cr,Qa)=>{(function(a,v){typeof cr=="object"&&typeof Qa<"u"?v(cr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(cr,function(a){"use strict";var v=0,B=0,Y=0,kt=1e3,Et,Ot,At=0,xt=0,wt=0,rt=typeof performance=="object"&&performance.now?performance:Date,Rt=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(w){setTimeout(w,17)};function zt(){return xt||(Rt(et),xt=rt.now()+wt)}function et(){xt=0}function Pt(){this._call=this._time=this._next=null}Pt.prototype=j.prototype={constructor:Pt,restart:function(w,R,N){if(typeof w!="function")throw new TypeError("callback is not a function");N=(N==null?zt():+N)+(R==null?0:+R),!this._next&&Ot!==this&&(Ot?Ot._next=this:Et=this,Ot=this),this._call=w,this._time=N,pt()},stop:function(){this._call&&(this._call=null,this._time=1/0,pt())}};function j(w,R,N){var f=new Pt;return f.restart(w,R,N),f}function Mt(){zt(),++v;for(var w=Et,R;w;)(R=xt-w._time)>=0&&w._call.call(null,R),w=w._next;--v}function ht(){xt=(At=rt.now())+wt,v=B=0;try{Mt()}finally{v=0,Tt(),xt=0}}function Nt(){var w=rt.now(),R=w-At;R>kt&&(wt-=R,At=w)}function Tt(){for(var w,R=Et,N,f=1/0;R;)R._call?(f>R._time&&(f=R._time),w=R,R=R._next):(N=R._next,R._next=null,R=w?w._next=N:Et=N);Ot=w,pt(f)}function pt(w){if(!v){B&&(B=clearTimeout(B));var R=w-xt;R>24?(w<1/0&&(B=setTimeout(ht,w-rt.now()-wt)),Y&&(Y=clearInterval(Y))):(Y||(At=rt.now(),Y=setInterval(Nt,kt)),v=1,Rt(ht))}}function W(w,R,N){var f=new Pt;return R=R==null?0:+R,f.restart(function(ct){f.stop(),w(ct+R)},R,N),f}function X(w,R,N){var f=new Pt,ct=R;return R==null?(f.restart(w,R,N),f):(R=+R,N=N==null?zt():+N,f.restart(function yt(Q){Q+=ct,f.restart(yt,ct+=R,N),w(Q)},R,N),f)}a.now=zt,a.timer=j,a.timerFlush=Mt,a.timeout=W,a.interval=X,Object.defineProperty(a,"__esModule",{value:!0})})});var ci=hn((ur,to)=>
1{(function(a,v){typeof ur=="object"&&typeof to<"u"?v(ur):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(ur,function(a){"use strict";function v(l,C,tt){l.prototype=C.prototype=tt,tt.constructor=l}function B(l,C){var tt=Object.create(l.prototype);for(var It in C)tt[It]=C[It];return tt}function Y(){}var kt=.7,Et=1/kt,Ot="\\s*([+-]?\\d+)\\s*",At="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",xt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wt=/^#([0-9a-f]{3})$/,rt=/^#([0-9a-f]{6})$/,Rt=new RegExp("^rgb\\("+[Ot,Ot,Ot]+"\\)$"),zt=new RegExp("^rgb\\("+[xt,xt,xt]+"\\)$"),et=new RegExp("^rgba\\("+[Ot,Ot,Ot,At]+"\\)$"),Pt=new RegExp("^rgba\\("+[xt,xt,xt,At]+"\\)$"),j=new RegExp("^hsl\\("+[At,xt,xt]+"\\)$"),Mt=new RegExp("^hsla\\("+[At,xt,xt,At]+"\\)$"),ht={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};v(Y,Nt,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}});function Nt(l){var C;return l=(l+"").trim().toLowerCase(),(C=wt.exec(l))?(C=parseInt(C[1],16),new w(C>>8&15|C>>4&240,C>>4&15|C&240,(C&15)<<4|C&15,1)):(C=rt.exec(l))?Tt(parseInt(C[1],16)):(C=Rt.exec(l))?new w(C[1],C[2],C[3],1):(C=zt.exec(l))?new w(C[1]*255/100,C[2]*255/100,C[3]*255/100,1):(C=et.exec(l))?pt(C[1],C[2],C[3],C[4]):(C=Pt.exec(l))?pt(C[1]*255/100,C[2]*255/100,C[3]*255/100,C[4]):(C=j.exec(l))?N(C[1],C[2]/100,C[3]/100,1):(C=Mt.exec(l))?N(C[1],C[2]/100,C[3]/100,C[4]):ht.hasOwnProperty(l)?Tt(ht[l]):l==="transparent"?new w(NaN,NaN,NaN,0):null}function Tt(l){return new w(l>>16&255,l>>8&255,l&255,1)}function pt(l,C,tt,It){return It<=0&&(l=C=tt=NaN),new w(l,C,tt,It)}function W(l){return l instanceof Y||(l=Nt(l)),l?(l=l.rgb(),new w(l.r,l.g,l.b,l.opacity)):new w}function X(l,C,tt,It){return arguments.length===1?W(l):new w(l,C,tt,It??1)}function w(l,C,tt,It){this.r=+l,this.g=+C,this.b=+tt,this.opacity=+It}v(w,X,B(Y,{brighter:function(l){return l=l==null?Et:Math.pow(Et,l),new w(this.r*l,this.g*l,this.b*l,this.opacity)}
1,darker:function(l){return l=l==null?kt:Math.pow(kt,l),new w(this.r*l,this.g*l,this.b*l,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"#"+R(this.r)+R(this.g)+R(this.b)},toString:function(){var l=this.opacity;return l=isNaN(l)?1:Math.max(0,Math.min(1,l)),(l===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(l===1?")":", "+l+")")}}));function R(l){return l=Math.max(0,Math.min(255,Math.round(l)||0)),(l<16?"0":"")+l.toString(16)}function N(l,C,tt,It){return It<=0?l=C=tt=NaN:tt<=0||tt>=1?l=C=NaN:C<=0&&(l=NaN),new yt(l,C,tt,It)}function f(l){if(l instanceof yt)return new yt(l.h,l.s,l.l,l.opacity);if(l instanceof Y||(l=Nt(l)),!l)return new yt;if(l instanceof yt)return l;l=l.rgb();var C=l.r/255,tt=l.g/255,It=l.b/255,Ut=Math.min(C,tt,It),Jt=Math.max(C,tt,It),Zt=NaN,oe=Jt-Ut,Oe=(Jt+Ut)/2;return oe?(C===Jt?Zt=(tt-It)/oe+(tt<It)*6:tt===Jt?Zt=(It-C)/oe+2:Zt=(C-tt)/oe+4,oe/=Oe<.5?Jt+Ut:2-Jt-Ut,Zt*=60):oe=Oe>0&&Oe<1?0:Zt,new yt(Zt,oe,Oe,l.opacity)}function ct(l,C,tt,It){return arguments.length===1?f(l):new yt(l,C,tt,It??1)}function yt(l,C,tt,It){this.h=+l,this.s=+C,this.l=+tt,this.opacity=+It}v(yt,ct,B(Y,{brighter:function(l){return l=l==null?Et:Math.pow(Et,l),new yt(this.h,this.s,this.l*l,this.opacity)},darker:function(l){return l=l==null?kt:Math.pow(kt,l),new yt(this.h,this.s,this.l*l,this.opacity)},rgb:function(){var l=this.h%360+(this.h<0)*360,C=isNaN(l)||isNaN(this.s)?0:this.s,tt=this.l,It=tt+(tt<.5?tt:1-tt)*C,Ut=2*tt-It;return new w(Q(l>=240?l-240:l+120,Ut,It),Q(l,Ut,It),Q(l<120?l+240:l-120,Ut,It),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 Q(l,C,tt){return(l<60?C+(tt-C)*l/60:l<180?tt:l<240?C+(tt-C)*(240-l)/60:C)*255}var J=Math.PI/180,gt=180/Math.PI,V=18,Lt=.96422,at=1,_t=.82521,bt=4/29,ft=6/29,vt=3*ft*ft,Ct=ft*ft*ft;function Gt(l){if(l instanceof xe)return new xe(l.l,l.a,l.b,l.opacity);if(l instanceof ut){if(isNaN(l.h))return new xe(l.l,0,0,l.opacity);var C=l.h*J;return new xe(l.l,Math.cos(C)*l.c,Math.sin(C)*l.c,l.opacity)}l instanceof w||(l=W(l));var tt=A(l.r),It=A(l.g),Ut=A(l.b),Jt=y((.2225045*tt+.7168786*It+.0606169*Ut)/at),Zt,oe;return tt===It&&It===Ut?Zt=oe=Jt:(Zt=y((.4360747*tt+.3850649*It+.1430804*Ut)/Lt),oe=y((.0139322*tt+.0971045*It+.7141733*Ut)/_t)),new xe(116*Jt-16,500*(Zt-Jt),200*(Jt-oe),l.opacity)}function ue(l,C){return new xe(l,0,0,C??1)}function ie(l,C,tt,It){return arguments.length===1?Gt(l):new xe(l,C,tt,It??1)}function xe(l,C,tt,It){this.l=+l,this.a=+C,this.b=+tt,this.opacity=+It}v(xe,ie,B(Y,{brighter:function(l){return new xe(this.l+V*(l??1),this.a,this.b,this.opacity)},darker:function(l){return new xe(this.l-V*(l??1),this.a,this.b,this.opacity)},rgb:function(){var l=(this.l+16)/116,C=isNaN(this.a)?l:l+this.a/500,tt=isNaN(this.b)?l:l-this.b/200;return C=Lt*$(C),l=at*$(l),tt=_t*$(tt),new w(x(3.1338561*C-1.6168667*l-.4906146*tt),x(-.9787684*C+1.9161415*l+.033454*tt),x(.0719453*C-.2289914*l+1.4052427*tt),this.opacity)}}));function y(l){return l>Ct?Math.pow(l,1/3):l/vt+bt}function $(l){return l>ft?l*l*l:vt*(l-bt)}function x(l){return 255*(l<=.0031308?12.92*l:1.055*Math.pow(l,1/2.4)-.055)}function A(l){return(l/=255)<=.04045?l/12.92:Math.pow((l+.055)/1.055,2.4)}function k(l){if(l instanceof ut)return new ut(l.h,l.c,l.l,l.opacity);if(l instanceof xe||(l=Gt(l)),l.a===0&&l.b===0)return new ut(NaN,0,l.l,l.opacity);var C=Math.atan2(l.b,l.a)*gt;return new ut(C<0?C+360:C,Math.sqrt(l.a*l.a+l.b*l.b),l.l,l.opacity)}function _(l,C,tt,It){return arguments.length===1?k(l):new ut(tt,C,l,It??1)}function it(l,C,tt,It){return arguments.length===1?k(l):new ut(l,C,tt,It??1)}function ut(l,C,tt,It){this.h=+l,this.c=+C,this.l=+tt,this.opacity=+It}v(ut,it,B(Y,{brighter:function(l){return new ut(this.h,this.c,this.l+V*(l??1),this.opacity)},darker:function(l){return new ut(this.h,this.c,this.l-V*(l??1),this.opacity)},rgb:function(){return Gt(this).rgb()}}));var Wt=-.14861,qt=1.78277,pe=-.29227,le=-.90649,Qt=1.97294,Xt=Qt*le,be=Qt*qt,ee=qt*pe-le*Wt;function Ce(l){if(l instanceof ze)return new ze(l.h,l.s,l.l,l.opacity);l instanceof w||(l=W(l));
1var C=l.r/255,tt=l.g/255,It=l.b/255,Ut=(ee*It+Xt*C-be*tt)/(ee+Xt-be),Jt=It-Ut,Zt=(Qt*(tt-Ut)-pe*Jt)/le,oe=Math.sqrt(Zt*Zt+Jt*Jt)/(Qt*Ut*(1-Ut)),Oe=oe?Math.atan2(Zt,Jt)*gt-120:NaN;return new ze(Oe<0?Oe+360:Oe,oe,Ut,l.opacity)}function Fe(l,C,tt,It){return arguments.length===1?Ce(l):new ze(l,C,tt,It??1)}function ze(l,C,tt,It){this.h=+l,this.s=+C,this.l=+tt,this.opacity=+It}v(ze,Fe,B(Y,{brighter:function(l){return l=l==null?Et:Math.pow(Et,l),new ze(this.h,this.s,this.l*l,this.opacity)},darker:function(l){return l=l==null?kt:Math.pow(kt,l),new ze(this.h,this.s,this.l*l,this.opacity)},rgb:function(){var l=isNaN(this.h)?0:(this.h+120)*J,C=+this.l,tt=isNaN(this.s)?0:this.s*C*(1-C),It=Math.cos(l),Ut=Math.sin(l);return new w(255*(C+tt*(Wt*It+qt*Ut)),255*(C+tt*(pe*It+le*Ut)),255*(C+tt*(Qt*It)),this.opacity)}})),a.color=Nt,a.rgb=X,a.hsl=ct,a.lab=ie,a.hcl=it,a.lch=_,a.gray=ue,a.cubehelix=Fe,Object.defineProperty(a,"__esModule",{value:!0})})});var ti=hn((lr,eo)=>{(function(a,v){typeof lr=="object"&&typeof eo<"u"?v(lr,ci()):typeof define=="function"&&define.amd?define(["exports","d3-color"],v):(a=a||self,v(a.d3=a.d3||{},a.d3))})(lr,function(a,v){"use strict";function B(l,C,tt,It,Ut){var Jt=l*l,Zt=Jt*l;return((1-3*l+3*Jt-Zt)*C+(4-6*Jt+3*Zt)*tt+(1+3*l+3*Jt-3*Zt)*It+Zt*Ut)/6}function Y(l){var C=l.length-1;return function(tt){var It=tt<=0?tt=0:tt>=1?(tt=1,C-1):Math.floor(tt*C),Ut=l[It],Jt=l[It+1],Zt=It>0?l[It-1]:2*Ut-Jt,oe=It<C-1?l[It+2]:2*Jt-Ut;return B((tt-It/C)*C,Zt,Ut,Jt,oe)}}function kt(l){var C=l.length;return function(tt){var It=Math.floor(((tt%=1)<0?++tt:tt)*C),Ut=l[(It+C-1)%C],Jt=l[It%C],Zt=l[(It+1)%C],oe=l[(It+2)%C];return B((tt-It/C)*C,Ut,Jt,Zt,oe)}}function Et(l){return function(){return l}}function Ot(l,C){return function(tt){return l+tt*C}}function At(l,C,tt){return l=Math.pow(l,tt),C=Math.pow(C,tt)-l,tt=1/tt,function(It){return Math.pow(l+It*C,tt)}}function xt(l,C){var tt=C-l;return tt?Ot(l,tt>180||tt<-180?tt-360*Math.round(tt/360):tt):Et(isNaN(l)?C:l)}function wt(l){return(l=+l)==1?rt:function(C,tt){return tt-C?At(C,tt,l):Et(isNaN(C)?tt:C)}}function rt(l,C){var tt=C-l;return tt?Ot(l,tt):Et(isNaN(l)?C:l)}var Rt=function l(C){var tt=wt(C);function It(Ut,Jt){var Zt=tt((Ut=v.rgb(Ut)).r,(Jt=v.rgb(Jt)).r),oe=tt(Ut.g,Jt.g),Oe=tt(Ut.b,Jt.b),De=rt(Ut.opacity,Jt.opacity);return function(ke){return Ut.r=Zt(ke),Ut.g=oe(ke),Ut.b=Oe(ke),Ut.opacity=De(ke),Ut+""}}return It.gamma=l,It}(1);function zt(l){return function(C){var tt=C.length,It=new Array(tt),Ut=new Array(tt),Jt=new Array(tt),Zt,oe;for(Zt=0;Zt<tt;++Zt)oe=v.rgb(C[Zt]),It[Zt]=oe.r||0,Ut[Zt]=oe.g||0,Jt[Zt]=oe.b||0;return It=l(It),Ut=l(Ut),Jt=l(Jt),oe.opacity=1,function(Oe){return oe.r=It(Oe),oe.g=Ut(Oe),oe.b=Jt(Oe),oe+""}}}var et=zt(Y),Pt=zt(kt);function j(l,C){C||(C=[]);var tt=l?Math.min(C.length,l.length):0,It=C.slice(),Ut;return function(Jt){for(Ut=0;Ut<tt;++Ut)It[Ut]=l[Ut]*(1-Jt)+C[Ut]*Jt;return It}}function Mt(l){return ArrayBuffer.isView(l)&&!(l instanceof DataView)}function ht(l,C){return(Mt(C)?j:Nt)(l,C)}function Nt(l,C){var tt=C?C.length:0,It=l?Math.min(tt,l.length):0,Ut=new Array(It),Jt=new Array(tt),Zt;for(Zt=0;Zt<It;++Zt)Ut[Zt]=ct(l[Zt],C[Zt]);for(;Zt<tt;++Zt)Jt[Zt]=C[Zt];return function(oe){for(Zt=0;Zt<It;++Zt)Jt[Zt]=Ut[Zt](oe);return Jt}}function Tt(l,C){var tt=new Date;return l=+l,C=+C,function(It){return tt.setTime(l*(1-It)+C*It),tt}}function pt(l,C){return l=+l,C=+C,function(tt){return l*(1-tt)+C*tt}}function W(l,C){var tt={},It={},Ut;(l===null||typeof l!="object")&&(l={}),(C===null||typeof C!="object")&&(C={});for(Ut in C)Ut in l?tt[Ut]=ct(l[Ut],C[Ut]):It[Ut]=C[Ut];return function(Jt){for(Ut in tt)It[Ut]=tt[Ut](Jt);return It}}var X=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,w=new RegExp(X.source,"g");function R(l){return function(){return l}}function N(l){return function(C){return l(C)+""}}function f(l,C){var tt=X.lastIndex=w.lastIndex=0,It,Ut,Jt,Zt=-1,oe=[],Oe=[];for(l=l+"",C=C+"";(It=X.exec(l))&&(Ut=w.exec(C));)(Jt=Ut.index)>tt&&(Jt=C.slice(tt,Jt),oe[Zt]?oe[Zt]+=Jt:oe[++Zt]=Jt),(It=It[0])===(Ut=Ut[0])?oe[Zt]?oe[Zt]+=Ut:oe[++Zt]=Ut:(oe[++Zt]=null,Oe.push({i:Zt,x:pt(It,Ut)})),tt=w.lastIndex;return tt<C.length&&(Jt=C.slice(tt),oe[Zt]?oe[Zt]+=Jt:oe[++Zt]=Jt),oe.length<2?Oe[0]?N(Oe[0].x):R(C):(C=Oe.length,function(De){for(var ke=0,Ie;ke<C;++ke)oe[(Ie=Oe[ke]).i]=Ie.x(De);return oe.join("")})}function ct(l,C){var tt=typeof C,It;return C==null||tt==="boolean"?Et(C):(tt==="number"?pt:tt==="string"?(It=v.color(C))?(C=It,Rt):f:C instanceof v.color?Rt:C instanceof Date?Tt:Mt(C)?j:Array.isArray(C)?Nt:typeof C.valueOf!="function"&&typeof C.toString!="function"||isNaN(C)?W:pt)(l,C)}function yt(l){var C=l.length;return function(tt){return l[Math.max(0,Math.min(C-1,Math.floor(tt*C)))]}}function Q(l,C){var tt=xt(+l,+C);return function(It){var Ut=tt(It);return Ut-360*Math.floor(Ut/360)}}function J(l,C){return l=+l,C=+C,function(tt){return Math.round(l*(1-tt)+C*tt)}}var gt=180/Math.PI,V={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Lt(l,C,tt,It,Ut,Jt){var Zt,oe,Oe;return(Zt=Math.sqrt(l*l+C*C))&&(l/=Zt,C/=Zt),(Oe=l*tt+C*It)&&(tt-=l*Oe,It-=C*Oe),(oe=Math.sqrt(tt*tt+It*It))&&(tt/=oe,It/=oe,Oe/=oe),l*It<C*tt&&(l=-l,C=-C,Oe=-Oe,Zt=-Zt),{translateX:Ut,translateY:Jt,rotate:Math.atan2(C,l)*gt,skewX:Math.atan(Oe)*gt,scaleX:Zt,scaleY:oe}}var at,_t,bt,ft;function vt(l){return l==="none"?V:(at||(at=document.createElement("DIV"),_t=document.documentElement,bt=document.defaultView),at.style.transform=l,l=bt.getComputedStyle(_t.appendChild(at),null).getPropertyValue("transform"),_t.removeChild(at),l=l.slice(7,-1).split(","),Lt(+l[0],+l[1],+l[2],+l[3],+l[4],+l[5]))}function Ct(l){return l==null||(ft||(ft=document.createElementNS("http://www.w3.org/2000/svg","g")),ft.setAttribute("transform",l),!(l=ft.transform.baseVal.consolidate()))?V:(l=l.matrix,Lt(l.a,l.b,l.c,l.d,l.e,l.f))}function Gt(l,C,tt,It){function Ut(De){return De.length?De.pop()+" ":""}function Jt(De,ke,Ie,He,an,nt){if(De!==Ie||ke!==He){var Bt=an.push("translate(",null,C,null,tt);
1nt.push({i:Bt-4,x:pt(De,Ie)},{i:Bt-2,x:pt(ke,He)})}else(Ie||He)&&an.push("translate("+Ie+C+He+tt)}function Zt(De,ke,Ie,He){De!==ke?(De-ke>180?ke+=360:ke-De>180&&(De+=360),He.push({i:Ie.push(Ut(Ie)+"rotate(",null,It)-2,x:pt(De,ke)})):ke&&Ie.push(Ut(Ie)+"rotate("+ke+It)}function oe(De,ke,Ie,He){De!==ke?He.push({i:Ie.push(Ut(Ie)+"skewX(",null,It)-2,x:pt(De,ke)}):ke&&Ie.push(Ut(Ie)+"skewX("+ke+It)}function Oe(De,ke,Ie,He,an,nt){if(De!==Ie||ke!==He){var Bt=an.push(Ut(an)+"scale(",null,",",null,")");nt.push({i:Bt-4,x:pt(De,Ie)},{i:Bt-2,x:pt(ke,He)})}else(Ie!==1||He!==1)&&an.push(Ut(an)+"scale("+Ie+","+He+")")}return function(De,ke){var Ie=[],He=[];return De=l(De),ke=l(ke),Jt(De.translateX,De.translateY,ke.translateX,ke.translateY,Ie,He),Zt(De.rotate,ke.rotate,Ie,He),oe(De.skewX,ke.skewX,Ie,He),Oe(De.scaleX,De.scaleY,ke.scaleX,ke.scaleY,Ie,He),De=ke=null,function(an){for(var nt=-1,Bt=He.length,de;++nt<Bt;)Ie[(de=He[nt]).i]=de.x(an);return Ie.join("")}}}var ue=Gt(vt,"px, ","px)","deg)"),ie=Gt(Ct,", ",")",")"),xe=Math.SQRT2,y=2,$=4,x=1e-12;function A(l){return((l=Math.exp(l))+1/l)/2}function k(l){return((l=Math.exp(l))-1/l)/2}function _(l){return((l=Math.exp(2*l))-1)/(l+1)}function it(l,C){var tt=l[0],It=l[1],Ut=l[2],Jt=C[0],Zt=C[1],oe=C[2],Oe=Jt-tt,De=Zt-It,ke=Oe*Oe+De*De,Ie,He;if(ke<x)He=Math.log(oe/Ut)/xe,Ie=function(H){return[tt+H*Oe,It+H*De,Ut*Math.exp(xe*H*He)]};else{var an=Math.sqrt(ke),nt=(oe*oe-Ut*Ut+$*ke)/(2*Ut*y*an),Bt=(oe*oe-Ut*Ut-$*ke)/(2*oe*y*an),de=Math.log(Math.sqrt(nt*nt+1)-nt),E=Math.log(Math.sqrt(Bt*Bt+1)-Bt);He=(E-de)/xe,Ie=function(H){var m=H*He,p=A(de),M=Ut/(y*an)*(p*_(xe*m+de)-k(de));return[tt+M*Oe,It+M*De,Ut*p/A(xe*m+de)]}}return Ie.duration=He*1e3,Ie}function ut(l){return function(C,tt){var It=l((C=v.hsl(C)).h,(tt=v.hsl(tt)).h),Ut=rt(C.s,tt.s),Jt=rt(C.l,tt.l),Zt=rt(C.opacity,tt.opacity);return function(oe){return C.h=It(oe),C.s=Ut(oe),C.l=Jt(oe),C.opacity=Zt(oe),C+""}}}var Wt=ut(xt),qt=ut(rt);function pe(l,C){var tt=rt((l=v.lab(l)).l,(C=v.lab(C)).l),It=rt(l.a,C.a),Ut=rt(l.b,C.b),Jt=rt(l.opacity,C.opacity);return function(Zt){return l.l=tt(Zt),l.a=It(Zt),l.b=Ut(Zt),l.opacity=Jt(Zt),l+""}}function le(l){return function(C,tt){var It=l((C=v.hcl(C)).h,(tt=v.hcl(tt)).h),Ut=rt(C.c,tt.c),Jt=rt(C.l,tt.l),Zt=rt(C.opacity,tt.opacity);return function(oe){return C.h=It(oe),C.c=Ut(oe),C.l=Jt(oe),C.opacity=Zt(oe),C+""}}}var Qt=le(xt),Xt=le(rt);function be(l){return function C(tt){tt=+tt;function It(Ut,Jt){var Zt=l((Ut=v.cubehelix(Ut)).h,(Jt=v.cubehelix(Jt)).h),oe=rt(Ut.s,Jt.s),Oe=rt(Ut.l,Jt.l),De=rt(Ut.opacity,Jt.opacity);return function(ke){return Ut.h=Zt(ke),Ut.s=oe(ke),Ut.l=Oe(Math.pow(ke,tt)),Ut.opacity=De(ke),Ut+""}}return It.gamma=C,It}(1)}var ee=be(xt),Ce=be(rt);function Fe(l,C){for(var tt=0,It=C.length-1,Ut=C[0],Jt=new Array(It<0?0:It);tt<It;)Jt[tt]=l(Ut,Ut=C[++tt]);return function(Zt){var oe=Math.max(0,Math.min(It-1,Math.floor(Zt*=It)));return Jt[oe](Zt-oe)}}function ze(l,C){for(var tt=new Array(C),It=0;It<C;++It)tt[It]=l(It/(C-1));return tt}a.interpolate=ct,a.interpolateArray=ht,a.interpolateBasis=Y,a.interpolateBasisClosed=kt,a.interpolateCubehelix=ee,a.interpolateCubehelixLong=Ce,a.interpolateDate=Tt,a.interpolateDiscrete=yt,a.interpolateHcl=Qt,a.interpolateHclLong=Xt,a.interpolateHsl=Wt,a.interpolateHslLong=qt,a.interpolateHue=Q,a.interpolateLab=pe,a.interpolateNumber=pt,a.interpolateNumberArray=j,a.interpolateObject=W,a.interpolateRgb=Rt,a.interpolateRgbBasis=et,a.interpolateRgbBasisClosed=Pt,a.interpolateRound=J,a.interpolateString=f,a.interpolateTransformCss=ue,a.interpolateTransformSvg=ie,a.interpolateZoom=it,a.piecewise=Fe,a.quantize=ze,Object.defineProperty(a,"__esModule",{value:!0})})});var Di=hn((fr,no)=>{(function(a,v){typeof fr=="object"&&typeof no<"u"?v(fr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(fr,function(a){"use strict";function v(x){return+x}function B(x){return x*x}function Y(x){return x*(2-x)}function kt(x){return((x*=2)<=1?x*x:--x*(2-x)+1)/2}function Et(x){return x*x*x}function Ot(x){return--x*x*x+1}function At(x){return((x*=2)<=1?x*x*x:(x-=2)*x*x+2)/2}var xt=3,wt=function x(A){A=+A;function k(_){return Math.pow(_,A)}return k.exponent=x,k}(xt),rt=function x(A){A=+A;function k(_){return 1-Math.pow(1-_,A)}return k.exponent=x,k}(xt),Rt=function x(A){A=+A;function k(_){return((_*=2)<=1?Math.pow(_,A):2-Math.pow(2-_,A))/2}return k.exponent=x,k}
1(xt),zt=Math.PI,et=zt/2;function Pt(x){return 1-Math.cos(x*et)}function j(x){return Math.sin(x*et)}function Mt(x){return(1-Math.cos(zt*x))/2}function ht(x){return Math.pow(2,10*x-10)}function Nt(x){return 1-Math.pow(2,-10*x)}function Tt(x){return((x*=2)<=1?Math.pow(2,10*x-10):2-Math.pow(2,10-10*x))/2}function pt(x){return 1-Math.sqrt(1-x*x)}function W(x){return Math.sqrt(1- --x*x)}function X(x){return((x*=2)<=1?1-Math.sqrt(1-x*x):Math.sqrt(1-(x-=2)*x)+1)/2}var w=4/11,R=6/11,N=8/11,f=3/4,ct=9/11,yt=10/11,Q=15/16,J=21/22,gt=63/64,V=1/w/w;function Lt(x){return 1-at(1-x)}function at(x){return(x=+x)<w?V*x*x:x<N?V*(x-=R)*x+f:x<yt?V*(x-=ct)*x+Q:V*(x-=J)*x+gt}function _t(x){return((x*=2)<=1?1-at(1-x):at(x-1)+1)/2}var bt=1.70158,ft=function x(A){A=+A;function k(_){return _*_*((A+1)*_-A)}return k.overshoot=x,k}(bt),vt=function x(A){A=+A;function k(_){return--_*_*((A+1)*_+A)+1}return k.overshoot=x,k}(bt),Ct=function x(A){A=+A;function k(_){return((_*=2)<1?_*_*((A+1)*_-A):(_-=2)*_*((A+1)*_+A)+2)/2}return k.overshoot=x,k}(bt),Gt=2*Math.PI,ue=1,ie=.3,xe=function x(A,k){var _=Math.asin(1/(A=Math.max(1,A)))*(k/=Gt);function it(ut){return A*Math.pow(2,10*--ut)*Math.sin((_-ut)/k)}return it.amplitude=function(ut){return x(ut,k*Gt)},it.period=function(ut){return x(A,ut)},it}(ue,ie),y=function x(A,k){var _=Math.asin(1/(A=Math.max(1,A)))*(k/=Gt);function it(ut){return 1-A*Math.pow(2,-10*(ut=+ut))*Math.sin((ut+_)/k)}return it.amplitude=function(ut){return x(ut,k*Gt)},it.period=function(ut){return x(A,ut)},it}(ue,ie),$=function x(A,k){var _=Math.asin(1/(A=Math.max(1,A)))*(k/=Gt);function it(ut){return((ut=ut*2-1)<0?A*Math.pow(2,10*ut)*Math.sin((_-ut)/k):2-A*Math.pow(2,-10*ut)*Math.sin((_+ut)/k))/2}return it.amplitude=function(ut){return x(ut,k*Gt)},it.period=function(ut){return x(A,ut)},it}(ue,ie);a.easeLinear=v,a.easeQuad=kt,a.easeQuadIn=B,a.easeQuadOut=Y,a.easeQuadInOut=kt,a.easeCubic=At,a.easeCubicIn=Et,a.easeCubicOut=Ot,a.easeCubicInOut=At,a.easePoly=Rt,a.easePolyIn=wt,a.easePolyOut=rt,a.easePolyInOut=Rt,a.easeSin=Mt,a.easeSinIn=Pt,a.easeSinOut=j,a.easeSinInOut=Mt,a.easeExp=Tt,a.easeExpIn=ht,a.easeExpOut=Nt,a.easeExpInOut=Tt,a.easeCircle=X,a.easeCircleIn=pt,a.easeCircleOut=W,a.easeCircleInOut=X,a.easeBounce=at,a.easeBounceIn=Lt,a.easeBounceOut=at,a.easeBounceInOut=_t,a.easeBack=Ct,a.easeBackIn=ft,a.easeBackOut=vt,a.easeBackInOut=Ct,a.easeElastic=y,a.easeElasticIn=xe,a.easeElasticOut=y,a.easeElasticInOut=$,Object.defineProperty(a,"__esModule",{value:!0})})});var gi=hn((hr,io)=>{(function(a,v){typeof hr=="object"&&typeof io<"u"?v(hr,oi(),sr(),ci(),ti(),ei(),Di()):typeof define=="function"&&define.amd?define(["exports","d3-dispatch","d3-timer","d3-color","d3-interpolate","d3-selection","d3-ease"],v):v(a.d3=a.d3||{},a.d3,a.d3,a.d3,a.d3,a.d3,a.d3)})(hr,function(a,v,B,Y,kt,Et,Ot){"use strict";var At=v.dispatch("start","end","cancel","interrupt"),xt=[],wt=0,rt=1,Rt=2,zt=3,et=4,Pt=5,j=6;function Mt(p,M,T,z,G,Z){var q=p.__transition;if(!q)p.__transition={};else if(T in q)return;pt(p,T,{name:M,index:z,group:G,on:At,tween:xt,time:Z.time,delay:Z.delay,duration:Z.duration,ease:Z.ease,timer:null,state:wt})}function ht(p,M){var T=Tt(p,M);if(T.state>wt)throw new Error("too late; already scheduled");return T}function Nt(p,M){var T=Tt(p,M);if(T.state>zt)throw new Error("too late; already running");return T}function Tt(p,M){var T=p.__transition;if(!T||!(T=T[M]))throw new Error("transition not found");return T}function pt(p,M,T){var z=p.__transition,G;z[M]=T,T.timer=B.timer(Z,0,T.time);function Z(lt){T.state=rt,T.timer.restart(q,T.delay,T.time),T.delay<=lt&&q(lt-T.delay)}function q(lt){var jt,re,ce,ye;if(T.state!==rt)return Ft();for(jt in z)if(ye=z[jt],ye.name===T.name){if(ye.state===zt)return B.timeout(q);ye.state===et?(ye.state=j,ye.timer.stop(),ye.on.call("interrupt",p,p.__data__,ye.index,ye.group),delete z[jt]):+jt<M&&(ye.state=j,ye.timer.stop(),ye.on.call("cancel",p,p.__data__,ye.index,ye.group),delete z[jt])}if(B.timeout(function(){T.state===zt&&(T.state=et,T.timer.restart(mt,T.delay,T.time),mt(lt))}),T.state=Rt,T.on.call("start",p,p.__data__,T.index,T.group),T.state===Rt){for(T.state=zt,G=new Array(ce=T.tween.length),jt=0,re=-1;jt<ce;++jt)(ye=T.tween[jt].value.call(p,p.__data__,T.index,T.group))&&(G[++re]=ye);G.length=re+1}}function mt(lt){for(var jt=lt<T.duration?T.ease.call(null,lt/T.duration):(T.timer.restart(Ft),T.state=Pt,1),re=-1,ce=G.length;++re<ce;
vendor: 4,332 bytes, line 1
1)G[re].call(p,jt);T.state===Pt&&(T.on.call("end",p,p.__data__,T.index,T.group),Ft())}function Ft(){T.state=j,T.timer.stop(),delete z[M];for(var lt in z)return;delete p.__transition}}function W(p,M){var T=p.__transition,z,G,Z=!0,q;if(T){M=M==null?null:M+"";for(q in T){if((z=T[q]).name!==M){Z=!1;continue}G=z.state>Rt&&z.state<Pt,z.state=j,z.timer.stop(),z.on.call(G?"interrupt":"cancel",p,p.__data__,z.index,z.group),delete T[q]}Z&&delete p.__transition}}function X(p){return this.each(function(){W(this,p)})}function w(p,M){var T,z;return function(){var G=Nt(this,p),Z=G.tween;if(Z!==T){z=T=Z;for(var q=0,mt=z.length;q<mt;++q)if(z[q].name===M){z=z.slice(),z.splice(q,1);break}}G.tween=z}}function R(p,M,T){var z,G;if(typeof T!="function")throw new Error;return function(){var Z=Nt(this,p),q=Z.tween;if(q!==z){G=(z=q).slice();for(var mt={name:M,value:T},Ft=0,lt=G.length;Ft<lt;++Ft)if(G[Ft].name===M){G[Ft]=mt;break}Ft===lt&&G.push(mt)}Z.tween=G}}function N(p,M){var T=this._id;if(p+="",arguments.length<2){for(var z=Tt(this.node(),T).tween,G=0,Z=z.length,q;G<Z;++G)if((q=z[G]).name===p)return q.value;return null}return this.each((M==null?w:R)(T,p,M))}function f(p,M,T){var z=p._id;return p.each(function(){var G=Nt(this,z);(G.value||(G.value={}))[M]=T.apply(this,arguments)}),function(G){return Tt(G,z).value[M]}}function ct(p,M){var T;return(typeof M=="number"?kt.interpolateNumber:M instanceof Y.color?kt.interpolateRgb:(T=Y.color(M))?(M=T,kt.interpolateRgb):kt.interpolateString)(p,M)}function yt(p){return function(){this.removeAttribute(p)}}function Q(p){return function(){this.removeAttributeNS(p.space,p.local)}}function J(p,M,T){var z,G=T+"",Z;return function(){var q=this.getAttribute(p);return q===G?null:q===z?Z:Z=M(z=q,T)}}function gt(p,M,T){var z,G=T+"",Z;return function(){var q=this.getAttributeNS(p.space,p.local);return q===G?null:q===z?Z:Z=M(z=q,T)}}function V(p,M,T){var z,G,Z;return function(){var q,mt=T(this),Ft;return mt==null?void this.removeAttribute(p):(q=this.getAttribute(p),Ft=mt+"",q===Ft?null:q===z&&Ft===G?Z:(G=Ft,Z=M(z=q,mt)))}}function Lt(p,M,T){var z,G,Z;return function(){var q,mt=T(this),Ft;return mt==null?void this.removeAttributeNS(p.space,p.local):(q=this.getAttributeNS(p.space,p.local),Ft=mt+"",q===Ft?null:q===z&&Ft===G?Z:(G=Ft,Z=M(z=q,mt)))}}function at(p,M){var T=Et.namespace(p),z=T==="transform"?kt.interpolateTransformSvg:ct;return this.attrTween(p,typeof M=="function"?(T.local?Lt:V)(T,z,f(this,"attr."+p,M)):M==null?(T.local?Q:yt)(T):(T.local?gt:J)(T,z,M))}function _t(p,M){return function(T){this.setAttribute(p,M(T))}}function bt(p,M){return function(T){this.setAttributeNS(p.space,p.local,M(T))}}function ft(p,M){var T,z;function G(){var Z=M.apply(this,arguments);return Z!==z&&(T=(z=Z)&&bt(p,Z)),T}return G._value=M,G}function vt(p,M){var T,z;function G(){var Z=M.apply(this,arguments);return Z!==z&&(T=(z=Z)&&_t(p,Z)),T}return G._value=M,G}function Ct(p,M){var T="attr."+p;if(arguments.length<2)return(T=this.tween(T))&&T._value;if(M==null)return this.tween(T,null);if(typeof M!="function")throw new Error;var z=Et.namespace(p);return this.tween(T,(z.local?ft:vt)(z,M))}function Gt(p,M){return function(){ht(this,p).delay=+M.apply(this,arguments)}}function ue(p,M){return M=+M,function(){ht(this,p).delay=M}}function ie(p){var M=this._id;return arguments.length?this.each((typeof p=="function"?Gt:ue)(M,p)):Tt(this.node(),M).delay}function xe(p,M){return function(){Nt(this,p).duration=+M.apply(this,arguments)}}function y(p,M){return M=+M,function(){Nt(this,p).duration=M}}function $(p){var M=this._id;return arguments.length?this.each((typeof p=="function"?xe:y)(M,p)):Tt(this.node(),M).duration}function x(p,M){if(typeof M!="function")throw new Error;return function(){Nt(this,p).ease=M}}function A(p){var M=this._id;return arguments.length?this.each(x(M,p)):Tt(this.node(),M).ease}function k(p){typeof p!="function"&&(p=Et.matcher(p));for(var M=this._groups,T=M.length,z=new Array(T),G=0;G<T;++G)for(var Z=M[G],q=Z.length,mt=z[G]=[],Ft,lt=0;lt<q;++lt)(Ft=Z[lt])&&p.call(Ft,Ft.__data__,lt,Z)&&mt.push(Ft);return new Ie(z,this._parents,this._name,this._id)}function _(p){if(p._id!==this._id)throw new Error;for(var M=this._groups,T=p._groups,z=M.length,G=T.length,Z=Math.min(z,G),q=new Array(z),mt=0;mt<Z;++mt)for(var Ft=M[mt],lt=T[mt],jt=Ft.length,re=q[mt]=new Array(jt),
1ce,ye=0;ye<jt;++ye)(ce=Ft[ye]||lt[ye])&&(re[ye]=ce);for(;mt<z;++mt)q[mt]=M[mt];return new Ie(q,this._parents,this._name,this._id)}function it(p){return(p+"").trim().split(/^|\s+/).every(function(M){var T=M.indexOf(".");return T>=0&&(M=M.slice(0,T)),!M||M==="start"})}function ut(p,M,T){var z,G,Z=it(M)?ht:Nt;return function(){var q=Z(this,p),mt=q.on;mt!==z&&(G=(z=mt).copy()).on(M,T),q.on=G}}function Wt(p,M){var T=this._id;return arguments.length<2?Tt(this.node(),T).on.on(p):this.each(ut(T,p,M))}function qt(p){return function(){var M=this.parentNode;for(var T in this.__transition)if(+T!==p)return;M&&M.removeChild(this)}}function pe(){return this.on("end.remove",qt(this._id))}function le(p){var M=this._name,T=this._id;typeof p!="function"&&(p=Et.selector(p));for(var z=this._groups,G=z.length,Z=new Array(G),q=0;q<G;++q)for(var mt=z[q],Ft=mt.length,lt=Z[q]=new Array(Ft),jt,re,ce=0;ce<Ft;++ce)(jt=mt[ce])&&(re=p.call(jt,jt.__data__,ce,mt))&&("__data__"in jt&&(re.__data__=jt.__data__),lt[ce]=re,Mt(lt[ce],M,T,ce,lt,Tt(jt,T)));return new Ie(Z,this._parents,M,T)}function Qt(p){var M=this._name,T=this._id;typeof p!="function"&&(p=Et.selectorAll(p));for(var z=this._groups,G=z.length,Z=[],q=[],mt=0;mt<G;++mt)for(var Ft=z[mt],lt=Ft.length,jt,re=0;re<lt;++re)if(jt=Ft[re]){for(var ce=p.call(jt,jt.__data__,re,Ft),ye,Ne=Tt(jt,T),Ue=0,fn=ce.length;Ue<fn;++Ue)(ye=ce[Ue])&&Mt(ye,M,T,Ue,ce,Ne);Z.push(ce),q.push(jt)}return new Ie(Z,q,M,T)}var Xt=Et.selection.prototype.constructor;function be(){return new Xt(this._groups,this._parents)}function ee(p,M){var T,z,G;return function(){var Z=Et.style(this,p),q=(this.style.removeProperty(p),Et.style(this,p));return Z===q?null:Z===T&&q===z?G:G=M(T=Z,z=q)}}function Ce(p){return function(){this.style.removeProperty(p)}}function Fe(p,M,T){var z,G=T+"",Z;return function(){var q=Et.style(this,p);return q===G?null:q===z?Z:Z=M(z=q,T)}}function ze(p,M,T){var z,G,Z;return function(){var q=Et.style(this,p),mt=T(this),Ft=mt+"";return mt==null&&(Ft=mt=(this.style.removeProperty(p),Et.style(this,p))),q===Ft?null:q===z&&Ft===G?Z:(G=Ft,Z=M(z=q,mt))}}function l(p,M){var T,z,G,Z="style."+M,q="end."+Z,mt;return function(){var Ft=Nt(this,p),lt=Ft.on,jt=Ft.value[Z]==null?mt||(mt=Ce(M)):void 0;(lt!==T||G!==jt)&&(z=(T=lt).copy()).on(q,G=jt),Ft.on=z}}function C(p,M,T){var z=(p+="")=="transform"?kt.interpolateTransformCss:ct;return M==null?this.styleTween(p,ee(p,z)).on("end.style."+p,Ce(p)):typeof M=="function"?this.styleTween(p,ze(p,z,f(this,"style."+p,M))).each(l(this._id,p)):this.styleTween(p,Fe(p,z,M),T).on("end.style."+p,null)}function tt(p,M,T){return function(z){this.style.setProperty(p,M(z),T)}}function It(p,M,T){var z,G;function Z(){var q=M.apply(this,arguments);return q!==G&&(z=(G=q)&&tt(p,q,T)),z}return Z._value=M,Z}function Ut(p,M,T){var z="style."+(p+="");if(arguments.length<2)return(z=this.tween(z))&&z._value;if(M==null)return this.tween(z,null);if(typeof M!="function")throw new Error;return this.tween(z,It(p,M,T??""))}function Jt(p){return function(){this.textContent=p}}function Zt(p){return function(){var M=p(this);this.textContent=M??""}}function oe(p){return this.tween("text",typeof p=="function"?Zt(f(this,"text",p)):Jt(p==null?"":p+""))}function Oe(){for(var p=this._name,M=this._id,T=an(),z=this._groups,G=z.length,Z=0;Z<G;++Z)for(var q=z[Z],mt=q.length,Ft,lt=0;lt<mt;++lt)if(Ft=q[lt]){var jt=Tt(Ft,M);Mt(Ft,p,T,lt,q,{time:jt.time+jt.delay+jt.duration,delay:0,duration:jt.duration,ease:jt.ease})}return new Ie(z,this._parents,p,T)}function De(){var p,M,T=this,z=T._id,G=T.size();return new Promise(function(Z,q){var mt={value:q},Ft={value:function(){--G===0&&Z()}};T.each(function(){var lt=Nt(this,z),jt=lt.on;jt!==p&&(M=(p=jt).copy(),M._.cancel.push(mt),M._.interrupt.push(mt),M._.end.push(Ft)),lt.on=M})})}var ke=0;function Ie(p,M,T,z){this._groups=p,this._parents=M,this._name=T,this._id=z}function He(p){return Et.selection().transition(p)}function an(){return++ke}var nt=Et.selection.prototype;Ie.prototype=He.prototype={constructor:Ie,select:le,selectAll:Qt,filter:k,merge:_,selection:be,transition:Oe,call:nt.call,nodes:nt.nodes,node:nt.node,size:nt.size,empty:nt.empty,each:nt.each,on:Wt,attr:at,attrTween:Ct,style:C,styleTween:Ut,text:oe,remove:pe,tween:N,delay:ie,duration:$,ease:A,end:De};var Bt={time:null,delay:0,duration:250,ease:Ot.easeCubicInOut};function de(p,M){for(var T;!(T=p.__transition)||!(T=T[M]);)if(!(p=p.parentNode))return Bt.time=B.now(),Bt;return T}function E(p){var M,T;p instanceof Ie?(M=p._id,p=p._name):(M=an(),(T=Bt).time=B.now(),p=p==null?null:p+"");for(var z=this._groups,G=z.length,Z=0;Z<G;++Z)for(var q=z[Z],mt=q.length,Ft,lt=0;lt<mt;++lt)(Ft=q[lt])&&Mt(Ft,p,M,lt,q,T||de(Ft,M));return new Ie(z,this._parents,p,M)}Et.selection.prototype.interrupt=X,Et.selection.prototype.transition=E;var H=[null];function m(p,M){var T=p.__transition,z,G;if(T){M=M==null?null:M+"";for(G in T)if((z=T[G]).state>rt&&z.name===M)return new Ie([[p]],H,M,+G)}
1return null}a.transition=He,a.active=m,a.interrupt=W,Object.defineProperty(a,"__esModule",{value:!0})})});var gr=hn((dr,ro)=>{(function(a,v){typeof dr=="object"&&typeof ro<"u"?v(dr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(dr,function(a){"use strict";var v=Array.prototype.slice;function B(Nt){return Nt}var Y=1,kt=2,Et=3,Ot=4,At=1e-6;function xt(Nt){return"translate("+(Nt+.5)+",0)"}function wt(Nt){return"translate(0,"+(Nt+.5)+")"}function rt(Nt){return function(Tt){return+Nt(Tt)}}function Rt(Nt){var Tt=Math.max(0,Nt.bandwidth()-1)/2;return Nt.round()&&(Tt=Math.round(Tt)),function(pt){return+Nt(pt)+Tt}}function zt(){return!this.__axis}function et(Nt,Tt){var pt=[],W=null,X=null,w=6,R=6,N=3,f=Nt===Y||Nt===Ot?-1:1,ct=Nt===Ot||Nt===kt?"x":"y",yt=Nt===Y||Nt===Et?xt:wt;function Q(J){var gt=W??(Tt.ticks?Tt.ticks.apply(Tt,pt):Tt.domain()),V=X??(Tt.tickFormat?Tt.tickFormat.apply(Tt,pt):B),Lt=Math.max(w,0)+N,at=Tt.range(),_t=+at[0]+.5,bt=+at[at.length-1]+.5,ft=(Tt.bandwidth?Rt:rt)(Tt.copy()),vt=J.selection?J.selection():J,Ct=vt.selectAll(".domain").data([null]),Gt=vt.selectAll(".tick").data(gt,Tt).order(),ue=Gt.exit(),ie=Gt.enter().append("g").attr("class","tick"),xe=Gt.select("line"),y=Gt.select("text");Ct=Ct.merge(Ct.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Gt=Gt.merge(ie),xe=xe.merge(ie.append("line").attr("stroke","currentColor").attr(ct+"2",f*w)),y=y.merge(ie.append("text").attr("fill","currentColor").attr(ct,f*Lt).attr("dy",Nt===Y?"0em":Nt===Et?"0.71em":"0.32em")),J!==vt&&(Ct=Ct.transition(J),Gt=Gt.transition(J),xe=xe.transition(J),y=y.transition(J),ue=ue.transition(J).attr("opacity",At).attr("transform",function($){return isFinite($=ft($))?yt($):this.getAttribute("transform")}),ie.attr("opacity",At).attr("transform",function($){var x=this.parentNode.__axis;return yt(x&&isFinite(x=x($))?x:ft($))})),ue.remove(),Ct.attr("d",Nt===Ot||Nt==kt?R?"M"+f*R+","+_t+"H0.5V"+bt+"H"+f*R:"M0.5,"+_t+"V"+bt:R?"M"+_t+","+f*R+"V0.5H"+bt+"V"+f*R:"M"+_t+",0.5H"+bt),Gt.attr("opacity",1).attr("transform",function($){return yt(ft($))}),xe.attr(ct+"2",f*w),y.attr(ct,f*Lt).text(V),vt.filter(zt).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",Nt===kt?"start":Nt===Ot?"end":"middle"),vt.each(function(){this.__axis=ft})}return Q.scale=function(J){return arguments.length?(Tt=J,Q):Tt},Q.ticks=function(){return pt=v.call(arguments),Q},Q.tickArguments=function(J){return arguments.length?(pt=J==null?[]:v.call(J),Q):pt.slice()},Q.tickValues=function(J){return arguments.length?(W=J==null?null:v.call(J),Q):W&&W.slice()},Q.tickFormat=function(J){return arguments.length?(X=J,Q):X},Q.tickSize=function(J){return arguments.length?(w=R=+J,Q):w},Q.tickSizeInner=function(J){return arguments.length?(w=+J,Q):w},Q.tickSizeOuter=function(J){return arguments.length?(R=+J,Q):R},Q.tickPadding=function(J){return arguments.length?(N=+J,Q):N},Q}function Pt(Nt){return et(Y,Nt)}function j(Nt){return et(kt,Nt)}function Mt(Nt){return et(Et,Nt)}function ht(Nt){return et(Ot,Nt)}a.axisTop=Pt,a.axisRight=j,a.axisBottom=Mt,a.axisLeft=ht,Object.defineProperty(a,"__esModule",{value:!0})})});var pi=hn((pr,ao)=>{(function(a,v){typeof pr=="object"&&typeof ao<"u"?v(pr,ei(),oi()):typeof define=="function"&&define.amd?define(["exports","d3-selection","d3-dispatch"],v):v(a.d3=a.d3||{},a.d3,a.d3)})(pr,function(a,v,B){"use strict";function Y(){v.event.stopImmediatePropagation()}function kt(){v.event.preventDefault(),v.event.stopImmediatePropagation()}function Et(Pt){var j=Pt.document.documentElement,Mt=v.select(Pt).on("dragstart.drag",kt,!0);"onselectstart"in j?Mt.on("selectstart.drag",kt,!0):(j.__noselect=j.style.MozUserSelect,j.style.MozUserSelect="none")}function Ot(Pt,j){var Mt=Pt.document.documentElement,ht=v.select(Pt).on("dragstart.drag",null);j&&(ht.on("click.drag",kt,!0),setTimeout(function(){ht.on("click.drag",null)},0)),"onselectstart"in Mt?ht.on("selectstart.drag",null):(Mt.style.MozUserSelect=Mt.__noselect,delete Mt.__noselect)}function At(Pt){return function(){return Pt}}function xt(Pt,j,Mt,ht,Nt,Tt,pt,W,X,w){this.target=Pt,this.type=j,this.subject=Mt,this.identifier=ht,this.active=Nt,this.x=Tt,this.y=pt,this.dx=W,this.dy=X,this._=w}xt.prototype.on=function(){var Pt=this._.on.apply(this._,arguments);return Pt===this._?this:Pt};function wt(){return!v.event.button}function rt(){return this.parentNode}function Rt(Pt){return Pt??{x:v.event.x,y:v.event.y}}function zt(){return"ontouchstart"in this}function et(){var Pt=wt,j=rt,Mt=Rt,ht=zt,Nt={},Tt=B.dispatch("start","drag","end"),pt=0,W,X,w,R,N=0;function f(at){at.on("mousedown.drag",ct).filter(ht).on("touchstart.drag",J).on("touchmove.drag",gt).on("touchend.drag touchcancel.drag",V).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function ct(){if(!(R||!Pt.apply(this,arguments))){var at=Lt("mouse",j.apply(this,arguments),v.mouse,this,arguments);at&&(v.select(v.event.view).on("mousemove.drag",yt,!0).on("mouseup.drag",Q,!0),Et(v.event.view),Y(),w=!1,W=v.event.clientX,X=v.event.clientY,at("start"))}}function yt(){if(kt(),!w){var at=v.event.clientX-W,_t=v.event.clientY-X;w=at*at+_t*_t>N}Nt.mouse("drag")}
1function Q(){v.select(v.event.view).on("mousemove.drag mouseup.drag",null),Ot(v.event.view,w),kt(),Nt.mouse("end")}function J(){if(Pt.apply(this,arguments)){var at=v.event.changedTouches,_t=j.apply(this,arguments),bt=at.length,ft,vt;for(ft=0;ft<bt;++ft)(vt=Lt(at[ft].identifier,_t,v.touch,this,arguments))&&(Y(),vt("start"))}}function gt(){var at=v.event.changedTouches,_t=at.length,bt,ft;for(bt=0;bt<_t;++bt)(ft=Nt[at[bt].identifier])&&(kt(),ft("drag"))}function V(){var at=v.event.changedTouches,_t=at.length,bt,ft;for(R&&clearTimeout(R),R=setTimeout(function(){R=null},500),bt=0;bt<_t;++bt)(ft=Nt[at[bt].identifier])&&(Y(),ft("end"))}function Lt(at,_t,bt,ft,vt){var Ct=bt(_t,at),Gt,ue,ie,xe=Tt.copy();if(v.customEvent(new xt(f,"beforestart",Gt,at,pt,Ct[0],Ct[1],0,0,xe),function(){return(v.event.subject=Gt=Mt.apply(ft,vt))==null?!1:(ue=Gt.x-Ct[0]||0,ie=Gt.y-Ct[1]||0,!0)}))return function y($){var x=Ct,A;switch($){case"start":Nt[at]=y,A=pt++;break;case"end":delete Nt[at],--pt;case"drag":Ct=bt(_t,at),A=pt;break}v.customEvent(new xt(f,$,Gt,at,A,Ct[0]+ue,Ct[1]+ie,Ct[0]-x[0],Ct[1]-x[1],xe),xe.apply,xe,[$,ft,vt])}}return f.filter=function(at){return arguments.length?(Pt=typeof at=="function"?at:At(!!at),f):Pt},f.container=function(at){return arguments.length?(j=typeof at=="function"?at:At(at),f):j},f.subject=function(at){return arguments.length?(Mt=typeof at=="function"?at:At(at),f):Mt},f.touchable=function(at){return arguments.length?(ht=typeof at=="function"?at:At(!!at),f):ht},f.on=function(){var at=Tt.on.apply(Tt,arguments);return at===Tt?f:at},f.clickDistance=function(at){return arguments.length?(N=(at=+at)*at,f):Math.sqrt(N)},f}a.drag=et,a.dragDisable=Et,a.dragEnable=Ot,Object.defineProperty(a,"__esModule",{value:!0})})});var mr=hn((vr,oo)=>{(function(a,v){typeof vr=="object"&&typeof oo<"u"?v(vr,ei(),oi(),pi(),ti(),gi()):typeof define=="function"&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-drag","d3-interpolate","d3-transition"],v):v(a.d3=a.d3||{},a.d3,a.d3,a.d3,a.d3,a.d3)})(vr,function(a,v,B,Y,kt,Et){"use strict";function Ot(V){return function(){return V}}function At(V,Lt,at){this.target=V,this.type=Lt,this.selection=at}function xt(){v.event.stopImmediatePropagation()}function wt(){v.event.preventDefault(),v.event.stopImmediatePropagation()}var rt={name:"drag"},Rt={name:"space"},zt={name:"handle"},et={name:"center"},Pt={name:"x",handles:["e","w"].map(X),input:function(V,Lt){return V&&[[V[0],Lt[0][1]],[V[1],Lt[1][1]]]},output:function(V){return V&&[V[0][0],V[1][0]]}},j={name:"y",handles:["n","s"].map(X),input:function(V,Lt){return V&&[[Lt[0][0],V[0]],[Lt[1][0],V[1]]]},output:function(V){return V&&[V[0][1],V[1][1]]}},Mt={name:"xy",handles:["n","e","s","w","nw","ne","se","sw"].map(X),input:function(V){return V},output:function(V){return V}},ht={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"},Nt={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Tt={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pt={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},W={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function X(V){return{type:V}}function w(){return!v.event.button}function R(){var V=this.ownerSVGElement||this;return[[0,0],[V.width.baseVal.value,V.height.baseVal.value]]}function N(V){for(;!V.__brush;)if(!(V=V.parentNode))return;return V.__brush}function f(V){return V[0][0]===V[1][0]||V[0][1]===V[1][1]}function ct(V){var Lt=V.__brush;return Lt?Lt.dim.output(Lt.selection):null}function yt(){return gt(Pt)}function Q(){return gt(j)}function J(){return gt(Mt)}function gt(V){var Lt=R,at=w,_t=B.dispatch(vt,"start","brush","end"),bt=6,ft;function vt(y){var $=y.property("__brush",xe).selectAll(".overlay").data([X("overlay")]);$.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",ht.overlay).merge($).each(function(){var A=N(this).extent;v.select(this).attr("x",A[0][0]).attr("y",A[0][1]).attr("width",A[1][0]-A[0][0]).attr("height",A[1][1]-A[0][1])}),y.selectAll(".selection").data([X("selection")]).enter().append("rect").attr("class","selection").attr("cursor",ht.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=y.selectAll(".handle").data(V.handles,function(A){return A.type});x.exit().remove(),x.enter().append("rect").attr("class",function(A){return"handle handle--"+A.type}).attr("cursor",function(A){return ht[A.type]}),y.each(Ct).attr("fill","none").attr("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush touchstart.brush",ie)}vt.move=function(y,$){y.selection?y.on("start.brush",function(){Gt(this,arguments).beforestart().start()}).on("interrupt.brush end.brush",function(){Gt(this,arguments).end()}).tween("brush",function(){var x=this,A=x.__brush,k=Gt(x,arguments),_=A.selection,it=V.input(typeof $=="function"?$.apply(this,arguments):$,A.extent),ut=kt.interpolate(_,it);function Wt(qt){A.selection=qt===1&&f(it)?null:ut(qt),Ct.call(x),k.brush()}return _&&it?Wt:Wt(1)}):y.each(function(){var x=this,A=arguments,k=x.__brush,_=V.input(typeof $=="function"?$.apply(x,A):$,k.extent),it=Gt(x,A).beforestart();Et.interrupt(x),k.selection=_==null||f(_)?null:_,Ct.call(x),it.start().brush().end()})};function Ct(){var y=v.select(this),$=N(this).selection;$?(y.selectAll(".selection").style("display",null).attr("x",$[0][0]).attr("y",$[0][1]).attr("width",$[1][0]-$[0][0]).attr("height",$[1][1]-$[0][1]),y.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?$[1][0]-bt/2:$[0][0]-bt/2}).attr("y",function(x){return x.type[0]==="s"?$[1][1]-bt/2:$[0][1]-bt/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?$[1][0]-$[0][0]+bt:bt}).attr("height",function(x){return x.type==="e"||x.type==="w"?$[1][1]-$[0][1]+bt:bt})):y.selectAll(".selection,.handle").style("display","none").attr("x",
1null).attr("y",null).attr("width",null).attr("height",null)}function Gt(y,$){return y.__brush.emitter||new ue(y,$)}function ue(y,$){this.that=y,this.args=$,this.state=y.__brush,this.active=0}ue.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(y){v.customEvent(new At(vt,y,V.output(this.state.selection)),_t.apply,_t,[y,this.that,this.args])}};function ie(){if(v.event.touches){if(v.event.changedTouches.length<v.event.touches.length)return wt()}else if(ft)return;if(!at.apply(this,arguments))return;var y=this,$=v.event.target.__data__.type,x=(v.event.metaKey?$="overlay":$)==="selection"?rt:v.event.altKey?et:zt,A=V===j?null:pt[$],k=V===Pt?null:W[$],_=N(y),it=_.extent,ut=_.selection,Wt=it[0][0],qt,pe,le=it[0][1],Qt,Xt,be=it[1][0],ee,Ce,Fe=it[1][1],ze,l,C,tt,It,Ut=A&&k&&v.event.shiftKey,Jt,Zt,oe=v.mouse(y),Oe=oe,De=Gt(y,arguments).beforestart();$==="overlay"?_.selection=ut=[[qt=V===j?Wt:oe[0],Qt=V===Pt?le:oe[1]],[ee=V===j?be:qt,ze=V===Pt?Fe:Qt]]:(qt=ut[0][0],Qt=ut[0][1],ee=ut[1][0],ze=ut[1][1]),pe=qt,Xt=Qt,Ce=ee,l=ze;var ke=v.select(y).attr("pointer-events","none"),Ie=ke.selectAll(".overlay").attr("cursor",ht[$]);if(v.event.touches)ke.on("touchmove.brush",an,!0).on("touchend.brush touchcancel.brush",Bt,!0);else{var He=v.select(v.event.view).on("keydown.brush",de,!0).on("keyup.brush",E,!0).on("mousemove.brush",an,!0).on("mouseup.brush",Bt,!0);Y.dragDisable(v.event.view)}xt(),Et.interrupt(y),Ct.call(y),De.start();function an(){var H=v.mouse(y);Ut&&!Jt&&!Zt&&(Math.abs(H[0]-Oe[0])>Math.abs(H[1]-Oe[1])?Zt=!0:Jt=!0),Oe=H,It=!0,wt(),nt()}function nt(){var H;switch(C=Oe[0]-oe[0],tt=Oe[1]-oe[1],x){case Rt:case rt:{A&&(C=Math.max(Wt-qt,Math.min(be-ee,C)),pe=qt+C,Ce=ee+C),k&&(tt=Math.max(le-Qt,Math.min(Fe-ze,tt)),Xt=Qt+tt,l=ze+tt);break}case zt:{A<0?(C=Math.max(Wt-qt,Math.min(be-qt,C)),pe=qt+C,Ce=ee):A>0&&(C=Math.max(Wt-ee,Math.min(be-ee,C)),pe=qt,Ce=ee+C),k<0?(tt=Math.max(le-Qt,Math.min(Fe-Qt,tt)),Xt=Qt+tt,l=ze):k>0&&(tt=Math.max(le-ze,Math.min(Fe-ze,tt)),Xt=Qt,l=ze+tt);break}case et:{A&&(pe=Math.max(Wt,Math.min(be,qt-C*A)),Ce=Math.max(Wt,Math.min(be,ee+C*A))),k&&(Xt=Math.max(le,Math.min(Fe,Qt-tt*k)),l=Math.max(le,Math.min(Fe,ze+tt*k)));break}}Ce<pe&&(A*=-1,H=qt,qt=ee,ee=H,H=pe,pe=Ce,Ce=H,$ in Nt&&Ie.attr("cursor",ht[$=Nt[$]])),l<Xt&&(k*=-1,H=Qt,Qt=ze,ze=H,H=Xt,Xt=l,l=H,$ in Tt&&Ie.attr("cursor",ht[$=Tt[$]])),_.selection&&(ut=_.selection),Jt&&(pe=ut[0][0],Ce=ut[1][0]),Zt&&(Xt=ut[0][1],l=ut[1][1]),(ut[0][0]!==pe||ut[0][1]!==Xt||ut[1][0]!==Ce||ut[1][1]!==l)&&(_.selection=[[pe,Xt],[Ce,l]],Ct.call(y),De.brush())}function Bt(){if(xt(),v.event.touches){if(v.event.touches.length)return;ft&&clearTimeout(ft),ft=setTimeout(function(){ft=null},500),ke.on("touchmove.brush touchend.brush touchcancel.brush",null)}
1else Y.dragEnable(v.event.view,It),He.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);ke.attr("pointer-events","all"),Ie.attr("cursor",ht.overlay),_.selection&&(ut=_.selection),f(ut)&&(_.selection=null,Ct.call(y)),De.end()}function de(){switch(v.event.keyCode){case 16:{Ut=A&&k;break}case 18:{x===zt&&(A&&(ee=Ce-C*A,qt=pe+C*A),k&&(ze=l-tt*k,Qt=Xt+tt*k),x=et,nt());break}case 32:{(x===zt||x===et)&&(A<0?ee=Ce-C:A>0&&(qt=pe-C),k<0?ze=l-tt:k>0&&(Qt=Xt-tt),x=Rt,Ie.attr("cursor",ht.selection),nt());break}default:return}wt()}function E(){switch(v.event.keyCode){case 16:{Ut&&(Jt=Zt=Ut=!1,nt());break}case 18:{x===et&&(A<0?ee=Ce:A>0&&(qt=pe),k<0?ze=l:k>0&&(Qt=Xt),x=zt,nt());break}case 32:{x===Rt&&(v.event.altKey?(A&&(ee=Ce-C*A,qt=pe+C*A),k&&(ze=l-tt*k,Qt=Xt+tt*k),x=et):(A<0?ee=Ce:A>0&&(qt=pe),k<0?ze=l:k>0&&(Qt=Xt),x=zt),Ie.attr("cursor",ht[$]),nt());break}default:return}wt()}}function xe(){var y=this.__brush||{selection:null};return y.extent=Lt.apply(this,arguments),y.dim=V,y}return vt.extent=function(y){return arguments.length?(Lt=typeof y=="function"?y:Ot([[+y[0][0],+y[0][1]],[+y[1][0],+y[1][1]]]),vt):Lt},vt.filter=function(y){return arguments.length?(at=typeof y=="function"?y:Ot(!!y),vt):at},vt.handleSize=function(y){return arguments.length?(bt=+y,vt):bt},vt.on=function(){var y=_t.on.apply(_t,arguments);return y===_t?vt:y},vt}a.brush=J,a.brushX=yt,a.brushY=Q,a.brushSelection=ct,Object.defineProperty(a,"__esModule",{value:!0})})});var _r=hn((yr,co)=>{(function(a,v){typeof yr=="object"&&typeof co<"u"?v(yr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(yr,function(a){"use strict";var v="$";function B(){}B.prototype=Y.prototype={constructor:B,has:function(j){return v+j in this},get:function(j){return this[v+j]},set:function(j,Mt){return this[v+j]=Mt,this},remove:function(j){var Mt=v+j;return Mt in this&&delete this[Mt]},clear:function(){for(var j in this)j[0]===v&&delete this[j]},keys:function(){var j=[];for(var Mt in this)Mt[0]===v&&j.push(Mt.slice(1));return j},values:function(){var j=[];for(var Mt in this)Mt[0]===v&&j.push(this[Mt]);return j},entries:function(){var j=[];for(var Mt in this)Mt[0]===v&&j.push({key:Mt.slice(1),value:this[Mt]});return j},size:function(){var j=0;for(var Mt in this)Mt[0]===v&&++j;return j},empty:function(){for(var j in this)if(j[0]===v)return!1;return!0},each:function(j){for(var Mt in this)Mt[0]===v&&j(this[Mt],Mt.slice(1),this)}};function Y(j,Mt){var ht=new B;if(j instanceof B)j.each(function(X,w){ht.set(w,X)});else if(Array.isArray(j)){var Nt=-1,Tt=j.length,pt;if(Mt==null)for(;++Nt<Tt;)ht.set(Nt,j[Nt]);else for(;++Nt<Tt;)ht.set(Mt(pt=j[Nt],Nt,j),pt)}else if(j)for(var W in j)ht.set(W,j[W]);return ht}function kt(){var j=[],Mt=[],ht,Nt,Tt;function pt(X,w,R,N){if(w>=j.length)return ht!=null&&X.sort(ht),Nt!=null?Nt(X):X;for(var f=-1,ct=X.length,yt=j[w++],Q,J,gt=Y(),V,Lt=R();++f<ct;)(V=gt.get(Q=yt(J=X[f])+""))?V.push(J):gt.set(Q,[J]);return gt.each(function(at,_t){N(Lt,_t,pt(at,w,R,N))}),Lt}function W(X,w){if(++w>j.length)return X;var R,N=Mt[w-1];return Nt!=null&&w>=j.length?R=X.entries():(R=[],X.each(function(f,ct){R.push({key:ct,values:W(f,w)})})),N!=null?R.sort(function(f,ct){return N(f.key,ct.key)}):R}return Tt={object:function(X){return pt(X,0,Et,Ot)},map:function(X){return pt(X,0,At,xt)},entries:function(X){return W(pt(X,0,At,xt),0)},key:function(X){return j.push(X),Tt},sortKeys:function(X){return Mt[j.length-1]=X,Tt},sortValues:function(X){return ht=X,Tt},rollup:function(X){return Nt=X,Tt}}}function Et(){return{}}function Ot(j,Mt,ht){j[Mt]=ht}function At(){return Y()}function xt(j,Mt,ht){j.set(Mt,ht)}function wt(){}var rt=Y.prototype;wt.prototype=Rt.prototype={constructor:wt,has:rt.has,add:function(j){return j+="",this[v+j]=j,this},remove:rt.remove,clear:rt.clear,values:rt.keys,size:rt.size,empty:rt.empty,each:rt.each};function Rt(j,Mt){var ht=new wt;if(j instanceof wt)j.each(function(pt){ht.add(pt)});else if(j){var Nt=-1,Tt=j.length;if(Mt==null)for(;++Nt<Tt;)ht.add(j[Nt]);else for(;++Nt<Tt;)ht.add(Mt(j[Nt],Nt,j))}return ht}function zt(j){var Mt=[];for(var ht in j)Mt.push(ht);return Mt}function et(j){var Mt=[];for(var ht in j)Mt.push(j[ht]);return Mt}function Pt(j){var Mt=[];for(var ht in j)Mt.push({key:ht,value:j[ht]});return Mt}a.nest=kt,a.set=Rt,a.map=Y,a.keys=zt,a.values=et,a.entries=Pt,Object.defineProperty(a,"__esModule",{value:!0})})});var vi=hn((xr,so)=>{(function(a,v){typeof xr=="object"&&typeof so<"u"?v(xr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(xr,function(a){"use strict";function v(y,$){return y<$?-1:y>$?1:y>=$?0:NaN}function B(y){return y.length===1&&(y=Y(y)),{left:function($,x,A,k){for(A==null&&(A=0),
vendor: 4,998 bytes, line 1
1k==null&&(k=$.length);A<k;){var _=A+k>>>1;y($[_],x)<0?A=_+1:k=_}return A},right:function($,x,A,k){for(A==null&&(A=0),k==null&&(k=$.length);A<k;){var _=A+k>>>1;y($[_],x)>0?k=_:A=_+1}return A}}}function Y(y){return function($,x){return v(y($),x)}}var kt=B(v),Et=kt.right,Ot=kt.left;function At(y,$){$==null&&($=xt);for(var x=0,A=y.length-1,k=y[0],_=new Array(A<0?0:A);x<A;)_[x]=$(k,k=y[++x]);return _}function xt(y,$){return[y,$]}function wt(y,$,x){var A=y.length,k=$.length,_=new Array(A*k),it,ut,Wt,qt;for(x==null&&(x=xt),it=Wt=0;it<A;++it)for(qt=y[it],ut=0;ut<k;++ut,++Wt)_[Wt]=x(qt,$[ut]);return _}function rt(y,$){return $<y?-1:$>y?1:$>=y?0:NaN}function Rt(y){return y===null?NaN:+y}function zt(y,$){var x=y.length,A=0,k=-1,_=0,it,ut,Wt=0;if($==null)for(;++k<x;)isNaN(it=Rt(y[k]))||(ut=it-_,_+=ut/++A,Wt+=ut*(it-_));else for(;++k<x;)isNaN(it=Rt($(y[k],k,y)))||(ut=it-_,_+=ut/++A,Wt+=ut*(it-_));if(A>1)return Wt/(A-1)}function et(y,$){var x=zt(y,$);return x&&Math.sqrt(x)}function Pt(y,$){var x=y.length,A=-1,k,_,it;if($==null){for(;++A<x;)if((k=y[A])!=null&&k>=k)for(_=it=k;++A<x;)(k=y[A])!=null&&(_>k&&(_=k),it<k&&(it=k))}else for(;++A<x;)if((k=$(y[A],A,y))!=null&&k>=k)for(_=it=k;++A<x;)(k=$(y[A],A,y))!=null&&(_>k&&(_=k),it<k&&(it=k));return[_,it]}var j=Array.prototype,Mt=j.slice,ht=j.map;function Nt(y){return function(){return y}}function Tt(y){return y}function pt(y,$,x){y=+y,$=+$,x=(k=arguments.length)<2?($=y,y=0,1):k<3?1:+x;for(var A=-1,k=Math.max(0,Math.ceil(($-y)/x))|0,_=new Array(k);++A<k;)_[A]=y+A*x;return _}var W=Math.sqrt(50),X=Math.sqrt(10),w=Math.sqrt(2);function R(y,$,x){var A,k=-1,_,it,ut;if($=+$,y=+y,x=+x,y===$&&x>0)return[y];if((A=$<y)&&(_=y,y=$,$=_),(ut=N(y,$,x))===0||!isFinite(ut))return[];if(ut>0)for(y=Math.ceil(y/ut),$=Math.floor($/ut),it=new Array(_=Math.ceil($-y+1));++k<_;)it[k]=(y+k)*ut;else for(y=Math.floor(y*ut),$=Math.ceil($*ut),it=new Array(_=Math.ceil(y-$+1));++k<_;)it[k]=(y-k)/ut;return A&&it.reverse(),it}function N(y,$,x){var A=($-y)/Math.max(0,x),k=Math.floor(Math.log(A)/Math.LN10),_=A/Math.pow(10,k);return k>=0?(_>=W?10:_>=X?5:_>=w?2:1)*Math.pow(10,k):-Math.pow(10,-k)/(_>=W?10:_>=X?5:_>=w?2:1)}function f(y,$,x){var A=Math.abs($-y)/Math.max(0,x),k=Math.pow(10,Math.floor(Math.log(A)/Math.LN10)),_=A/k;return _>=W?k*=10:_>=X?k*=5:_>=w&&(k*=2),$<y?-k:k}function ct(y){return Math.ceil(Math.log(y.length)/Math.LN2)+1}function yt(){var y=Tt,$=Pt,x=ct;function A(k){var _,it=k.length,ut,Wt=new Array(it);for(_=0;_<it;++_)Wt[_]=y(k[_],_,k);var qt=$(Wt),pe=qt[0],le=qt[1],Qt=x(Wt,pe,le);Array.isArray(Qt)||(Qt=f(pe,le,Qt),Qt=pt(Math.ceil(pe/Qt)*Qt,le,Qt));for(var Xt=Qt.length;Qt[0]<=pe;)Qt.shift(),--Xt;for(;Qt[Xt-1]>le;)Qt.pop(),--Xt;var be=new Array(Xt+1),ee;for(_=0;_<=Xt;++_)ee=be[_]=[],ee.x0=_>0?Qt[_-1]:pe,ee.x1=_<Xt?Qt[_]:le;for(_=0;_<it;++_)ut=Wt[_],pe<=ut&&ut<=le&&be[Et(Qt,ut,0,Xt)].push(k[_]);return be}return A.value=function(k){return arguments.length?(y=typeof k=="function"?k:Nt(k),A):y},A.domain=function(k){return arguments.length?($=typeof k=="function"?k:Nt([k[0],k[1]]),A):$},A.thresholds=function(k){return arguments.length?(x=typeof k=="function"?k:Array.isArray(k)?Nt(Mt.call(k)):Nt(k),A):x},A}function Q(y,$,x){if(x==null&&(x=Rt),!!(A=y.length)){if(($=+$)<=0||A<2)return+x(y[0],0,y);if($>=1)return+x(y[A-1],A-1,y);var A,k=(A-1)*$,_=Math.floor(k),it=+x(y[_],_,y),ut=+x(y[_+1],_+1,y);return it+(ut-it)*(k-_)}}function J(y,$,x){return y=ht.call(y,Rt).sort(v),Math.ceil((x-$)/(2*(Q(y,.75)-Q(y,.25))*Math.pow(y.length,-1/3)))}function gt(y,$,x){return Math.ceil((x-$)/(3.5*et(y)*Math.pow(y.length,-1/3)))}function V(y,$){var x=y.length,A=-1,k,_;if($==null){for(;++A<x;)if((k=y[A])!=null&&k>=k)for(_=k;++A<x;)(k=y[A])!=null&&k>_&&(_=k)}else for(;++A<x;)if((k=$(y[A],A,y))!=null&&k>=k)for(_=k;++A<x;)(k=$(y[A],A,y))!=null&&k>_&&(_=k);return _}function Lt(y,$){var x=y.length,A=x,k=-1,_,it=0;if($==null)for(;++k<x;)isNaN(_=Rt(y[k]))?--A:it+=_;else for(;++k<x;)isNaN(_=Rt($(y[k],k,y)))?--A:it+=_;if(A)return it/A}function at(y,$){var x=y.length,A=-1,k,_=[];if($==null)for(;++A<x;)isNaN(k=Rt(y[A]))||_.push(k);else for(;++A<x;)isNaN(k=Rt($(y[A],A,y)))||_.push(k);return Q(_.sort(v),.5)}function _t(y){for(var $=y.length,x,A=-1,k=0,_,it;++A<$;)k+=y[A].length;for(_=new Array(k);--$>=0;)for(it=y[$],x=it.length;--x>=0;)_[--k]=it[x];return _}function bt(y,$){var x=y.length,A=-1,k,_;if($==null){for(;++A<x;)if((k=y[A])!=null&&k>=k)for(_=k;++A<x;)(k=y[A])!=null&&_>k&&(_=k)}else for(;++A<x;)if((k=$(y[A],A,y))!=null&&k>=k)for(_=k;++A<x;)(k=$(y[A],A,y))!=null&&_>k&&(_=k);return _}function ft(y,$){for(var x=$.length,A=new Array(x);x--;)A[x]=y[$[x]];return A}function vt(y,$){if(x=y.length){var x,A=0,k=0,_,it=y[k];for($==null&&($=v);++A<x;)($(_=y[A],it)<0||$(it,it)!==0)&&(it=_,k=A);if($(it,it)===0)return k}}function Ct(y,$,x){for(var A=(x??y.length)-($=$==null?0:+$),k,_;A;)_=Math.random()*A--|0,k=y[A+$],y[A+$]=y[_+$],y[_+$]=k;return y}function Gt(y,$){var x=y.length,A=-1,k,_=0;if($==null)for(;++A<x;)(k=+y[A])&&(_+=k);else for(;++A<x;
1)(k=+$(y[A],A,y))&&(_+=k);return _}function ue(y){if(!(_=y.length))return[];for(var $=-1,x=bt(y,ie),A=new Array(x);++$<x;)for(var k=-1,_,it=A[$]=new Array(_);++k<_;)it[k]=y[k][$];return A}function ie(y){return y.length}function xe(){return ue(arguments)}a.bisect=Et,a.bisectRight=Et,a.bisectLeft=Ot,a.ascending=v,a.bisector=B,a.cross=wt,a.descending=rt,a.deviation=et,a.extent=Pt,a.histogram=yt,a.thresholdFreedmanDiaconis=J,a.thresholdScott=gt,a.thresholdSturges=ct,a.max=V,a.mean=Lt,a.median=at,a.merge=_t,a.min=bt,a.pairs=At,a.permute=ft,a.quantile=Q,a.range=pt,a.scan=vt,a.shuffle=Ct,a.sum=Gt,a.ticks=R,a.tickIncrement=N,a.tickStep=f,a.transpose=ue,a.variance=zt,a.zip=xe,Object.defineProperty(a,"__esModule",{value:!0})})});var ma=hn((br,uo)=>{(function(a,v){typeof br=="object"&&typeof uo<"u"?v(br):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(br,function(a){"use strict";function v(W,X){if((w=(W=X?W.toExponential(X-1):W.toExponential()).indexOf("e"))<0)return null;var w,R=W.slice(0,w);return[R.length>1?R[0]+R.slice(2):R,+W.slice(w+1)]}function B(W){return W=v(Math.abs(W)),W?W[1]:NaN}function Y(W,X){return function(w,R){for(var N=w.length,f=[],ct=0,yt=W[0],Q=0;N>0&&yt>0&&(Q+yt+1>
1R&&(yt=Math.max(1,R-Q)),f.push(w.substring(N-=yt,N+yt)),!((Q+=yt+1)>R));)yt=W[ct=(ct+1)%W.length];return f.reverse().join(X)}}function kt(W){return function(X){return X.replace(/[0-9]/g,function(w){return W[+w]})}}var Et=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ot(W){return new At(W)}Ot.prototype=At.prototype;function At(W){if(!(X=Et.exec(W)))throw new Error("invalid format: "+W);var X;this.fill=X[1]||" ",this.align=X[2]||">",this.sign=X[3]||"-",this.symbol=X[4]||"",this.zero=!!X[5],this.width=X[6]&&+X[6],this.comma=!!X[7],this.precision=X[8]&&+X[8].slice(1),this.trim=!!X[9],this.type=X[10]||""}At.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 xt(W){t:for(var X=W.length,w=1,R=-1,N;w<X;++w)switch(W[w]){case".":R=N=w;break;case"0":R===0&&(R=w),N=w;break;default:if(R>0){if(!+W[w])break t;R=0}break}return R>0?W.slice(0,R)+W.slice(N+1):W}var wt;function rt(W,X){var w=v(W,X);if(!w)return W+"";var R=w[0],N=w[1],f=N-(wt=Math.max(-8,Math.min(8,Math.floor(N/3)))*3)+1,ct=R.length;return f===ct?R:f>ct?R+new Array(f-ct+1).join("0"):f>0?R.slice(0,f)+"."+R.slice(f):"0."+new Array(1-f).join("0")+v(W,Math.max(0,X+f-1))[0]}function Rt(W,X){var w=v(W,X);if(!w)return W+"";var R=w[0],N=w[1];return N<0?"0."+new Array(-N).join("0")+R:R.length>N+1?R.slice(0,N+1)+"."+R.slice(N+1):R+new Array(N-R.length+2).join("0")}var zt={"%":function(W,X){return(W*100).toFixed(X)},b:function(W){return Math.round(W).toString(2)},c:function(W){return W+""},d:function(W){return Math.round(W).toString(10)},e:function(W,X){return W.toExponential(X)},f:function(W,X){return W.toFixed(X)},g:function(W,X){return W.toPrecision(X)},o:function(W){return Math.round(W).toString(8)},p:function(W,X){return Rt(W*100,X)},r:Rt,s:rt,X:function(W){return Math.round(W).toString(16).toUpperCase()},x:function(W){return Math.round(W).toString(16)}};function et(W){return W}var Pt=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function j(W){var X=W.grouping&&W.thousands?Y(W.grouping,W.thousands):et,w=W.currency,R=W.decimal,N=W.numerals?kt(W.numerals):et,f=W.percent||"%";function ct(Q){Q=Ot(Q);var J=Q.fill,gt=Q.align,V=Q.sign,Lt=Q.symbol,at=Q.zero,_t=Q.width,bt=Q.comma,ft=Q.precision,vt=Q.trim,Ct=Q.type;Ct==="n"?(bt=!0,Ct="g"):zt[Ct]||(ft==null&&(ft=12),vt=!0,Ct="g"),(at||J==="0"&>==="=")&&(at=!0,J="0",gt="=");var Gt=Lt==="$"?w[0]:Lt==="#"&&/[boxX]/.test(Ct)?"0"+Ct.toLowerCase():"",ue=Lt==="$"?w[1]:/[%p]/.test(Ct)?f:"",ie=zt[Ct],xe=/[defgprs%]/.test(Ct);ft=ft==null?6:/[gprs]/.test(Ct)?Math.max(1,Math.min(21,ft)):Math.max(0,Math.min(20,ft));function y($){var x=Gt,A=ue,k,_,it;if(Ct==="c")A=ie($)+A,$="";else{$=+$;var ut=$<0;if($=ie(Math.abs($),ft),vt&&($=xt($)),ut&&+$==0&&(ut=!1),x=(ut?V==="("?V:"-":V==="-"||V==="("?"":V)+x,A=(Ct==="s"?Pt[8+wt/3]:"")+A+(ut&&V==="("?")":""),xe){for(k=-1,_=$.length;++k<_;)if(it=$.charCodeAt(k),48>it||it>57){A=(it===46?R+$.slice(k+1):$.slice(k))+A,$=$.slice(0,k);break}}}bt&&!at&&($=X($,1/0));var Wt=x.length+$.length+A.length,qt=Wt<_t?new Array(_t-Wt+1).join(J):"";switch(bt&&at&&($=X(qt+$,qt.length?_t-A.length:1/0),qt=""),gt){case"<":$=x+$+A+qt;break;case"=":$=x+qt+$+A;break;case"^":$=qt.slice(0,Wt=qt.length>>1)+x+$+A+qt.slice(Wt);break;default:$=qt+x+$+A;break}return N($)}return y.toString=function(){return Q+""},y}function yt(Q,J){var gt=ct((Q=Ot(Q),Q.type="f",Q)),V=Math.max(-8,Math.min(8,Math.floor(B(J)/3)))*3,Lt=Math.pow(10,-V),at=Pt[8+V/3];return function(_t){return gt(Lt*_t)+at}}return{format:ct,formatPrefix:yt}}var Mt;ht({decimal:".",thousands:",",grouping:[3],currency:["$",""]});function ht(W){return Mt=j(W),a.format=Mt.format,a.formatPrefix=Mt.formatPrefix,Mt}function Nt(W){return Math.max(0,-B(Math.abs(W)))}function Tt(W,X){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(B(X)/3)))*3-B(Math.abs(W)))}function pt(W,X){return W=Math.abs(W),X=Math.abs(X)-W,Math.max(0,B(X)-B(W))+1}a.formatDefaultLocale=ht,a.formatLocale=j,a.formatSpecifier=Ot,a.precisionFixed=Nt,a.precisionPrefix=Tt,a.precisionRound=pt,Object.defineProperty(a,"__esModule",{value:!0})})});var Tr=hn((wr,lo)=>{(function(a,v){typeof wr=="object"&&typeof lo<"u"?v(wr,_r(),vi(),ti(),ma(),ir(),Pi()):typeof define=="function"&&define.amd?define(["exports","d3-collection","d3-array","d3-interpolate","d3-format","d3-time","d3-time-format"],v):v(a.d3=a.d3||{},a.d3,a.d3,a.d3,a.d3,a.d3,a.d3)})(wr,function(a,v,B,Y,kt,Et,Ot){"use strict";function At(m,p){switch(arguments.length){case 0:break;case 1:this.range(m);break;default:this.range(p).domain(m);break}return this}function xt(m,p){switch(arguments.length){case 0:break;case 1:this.interpolator(m);break;default:this.interpolator(p).domain(m);break}return this}var wt=Array.prototype,rt=wt.map,Rt=wt.slice,zt={name:"implicit"};function et(){var m=v.map(),p=[],M=[],T=zt;function z(G){var Z=G+"",q=m.get(Z);if(!q){if(T!==zt)return T;m.set(Z,q=p.push(G))}return M[(q-1)%M.length]}return z.domain=function(G){if(!arguments.length)return p.slice();p=[],m=v.map();for(var Z=-1,q=G.length,mt,Ft;++Z<q;)m.has(Ft=(mt=G[Z])+"")||m.set(Ft,p.push(mt));return z},z.range=function(G){return arguments.length?(M=Rt.call(G),z):M.slice()},z.unknown=function(G){return arguments.length?(T=G,z):T},z.copy=function(){return et(p,M).unknown(T)},At.apply(z,arguments),z}function Pt(){var m=et().unknown(void 0),p=m.domain,M=m.range,T=[0,1],z,G,Z=!1,q=0,mt=0,Ft=.5;delete m.unknown;function lt(){var jt=p().length,re=T[1]<T[0],ce=T[re-0],ye=T[1-re];z=(ye-ce)/Math.max(1,jt-q+mt*2),Z&&(z=Math.floor(z)),ce+=(ye-ce-z*(jt-q))*Ft,G=z*(1-q),Z&&(ce=Math.round(ce),G=Math.round(G));var Ne=B.range(jt).map(function(Ue){return ce+z*Ue});return M(re?Ne.reverse():Ne)}return m.domain=function(jt){return arguments.length?(p(jt),lt()):p()},m.range=function(jt){return arguments.length?(T=[+jt[0],+jt[1]],lt()):T.slice()},m.rangeRound=function(jt){return T=[+jt[0],+jt[1]],Z=!0,lt()},m.bandwidth=function(){return G},m.step=function(){return z},m.round=function(jt){return arguments.length?(Z=!!jt,lt()):Z},m.padding=function(jt){return arguments.length?(q=Math.min(1,mt=+jt),lt()):q},m.paddingInner=function(jt){return arguments.length?(q=Math.min(1,jt),lt()):q},m.paddingOuter=function(jt){return arguments.length?(mt=+jt,lt()):mt},m.align=function(jt){return arguments.length?(Ft=Math.max(0,Math.min(1,jt)),lt()):Ft},m.copy=function(){return Pt(p(),T).round(Z).paddingInner(q).paddingOuter(mt).align(Ft)},At.apply(lt(),arguments)}function j(m){var p=m.copy;return m.padding=m.paddingOuter,delete m.paddingInner,delete m.paddingOuter,m.copy=function(){return j(p())},m}function Mt(){return j(Pt.apply(null,arguments).paddingInner(1))}function ht(m){return function(){return m}}function Nt(m){return+m}var Tt=[0,1];function pt(m){return m}function W(m,p){return(p-=m=+m)?function(M){return(M-m)/p}:ht(isNaN(p)?NaN:.5)}function X(m){var p=m[0],M=m[m.length-1],T;return p>M&&(T=p,p=M,M=T),function(z){return Math.max(p,Math.min(M,z))}}function w(m,p,M){var T=m[0],z=m[1],G=p[0],Z=p[1];return z<T?(T=W(z,T),G=M(Z,G)):(T=W(T,z),G=M(G,Z)),function(q){return G(T(q))}}function R(m,p,M){var T=Math.min(m.length,p.length)-1,z=new Array(T),G=new Array(T),Z=-1;for(m[T]<m[0]&&(m=m.slice().reverse(),p=p.slice().reverse());
1++Z<T;)z[Z]=W(m[Z],m[Z+1]),G[Z]=M(p[Z],p[Z+1]);return function(q){var mt=B.bisect(m,q,1,T)-1;return G[mt](z[mt](q))}}function N(m,p){return p.domain(m.domain()).range(m.range()).interpolate(m.interpolate()).clamp(m.clamp()).unknown(m.unknown())}function f(){var m=Tt,p=Tt,M=Y.interpolate,T,z,G,Z=pt,q,mt,Ft;function lt(){return q=Math.min(m.length,p.length)>2?R:w,mt=Ft=null,jt}function jt(re){return isNaN(re=+re)?G:(mt||(mt=q(m.map(T),p,M)))(T(Z(re)))}return jt.invert=function(re){return Z(z((Ft||(Ft=q(p,m.map(T),Y.interpolateNumber)))(re)))},jt.domain=function(re){return arguments.length?(m=rt.call(re,Nt),Z===pt||(Z=X(m)),lt()):m.slice()},jt.range=function(re){return arguments.length?(p=Rt.call(re),lt()):p.slice()},jt.rangeRound=function(re){return p=Rt.call(re),M=Y.interpolateRound,lt()},jt.clamp=function(re){return arguments.length?(Z=re?X(m):pt,jt):Z!==pt},jt.interpolate=function(re){return arguments.length?(M=re,lt()):M},jt.unknown=function(re){return arguments.length?(G=re,jt):G},function(re,ce){return T=re,z=ce,lt()}}function ct(m,p){return f()(m,p)}function yt(m,p,M,T){var z=B.tickStep(m,p,M),G;switch(T=kt.formatSpecifier(T??",f"),T.type){case"s":{var Z=Math.max(Math.abs(m),Math.abs(p));return T.precision==null&&!isNaN(G=kt.precisionPrefix(z,Z))&&(T.precision=G),kt.formatPrefix(T,Z)}case"":case"e":case"g":case"p":case"r":{T.precision==null&&!isNaN(G=kt.precisionRound(z,Math.max(Math.abs(m),Math.abs(p))))&&(T.precision=G-(T.type==="e"));break}case"f":case"%":{T.precision==null&&!isNaN(G=kt.precisionFixed(z))&&(T.precision=G-(T.type==="%")*2);break}}return kt.format(T)}function Q(m){var p=m.domain;return m.ticks=function(M){var T=p();return B.ticks(T[0],T[T.length-1],M??10)},m.tickFormat=function(M,T){var z=p();return yt(z[0],z[z.length-1],M??10,T)},m.nice=function(M){M==null&&(M=10);var T=p(),z=0,G=T.length-1,Z=T[z],q=T[G],mt;return q<Z&&(mt=Z,Z=q,q=mt,mt=z,z=G,G=mt),mt=B.tickIncrement(Z,q,M),mt>0?(Z=Math.floor(Z/mt)*mt,q=Math.ceil(q/mt)*mt,mt=B.tickIncrement(Z,q,M)):mt<0&&(Z=Math.ceil(Z*mt)/mt,q=
1Math.floor(q*mt)/mt,mt=B.tickIncrement(Z,q,M)),mt>0?(T[z]=Math.floor(Z/mt)*mt,T[G]=Math.ceil(q/mt)*mt,p(T)):mt<0&&(T[z]=Math.ceil(Z*mt)/mt,T[G]=Math.floor(q*mt)/mt,p(T)),m},m}function J(){var m=ct(pt,pt);return m.copy=function(){return N(m,J())},At.apply(m,arguments),Q(m)}function gt(m){var p;function M(T){return isNaN(T=+T)?p:T}return M.invert=M,M.domain=M.range=function(T){return arguments.length?(m=rt.call(T,Nt),M):m.slice()},M.unknown=function(T){return arguments.length?(p=T,M):p},M.copy=function(){return gt(m).unknown(p)},m=arguments.length?rt.call(m,Nt):[0,1],Q(M)}function V(m,p){m=m.slice();var M=0,T=m.length-1,z=m[M],G=m[T],Z;return G<z&&(Z=M,M=T,T=Z,Z=z,z=G,G=Z),m[M]=p.floor(z),m[T]=p.ceil(G),m}function Lt(m){return Math.log(m)}function at(m){return Math.exp(m)}function _t(m){return-Math.log(-m)}function bt(m){return-Math.exp(-m)}function ft(m){return isFinite(m)?+("1e"+m):m<0?0:m}function vt(m){return m===10?ft:m===Math.E?Math.exp:function(p){return Math.pow(m,p)}}function Ct(m){return m===Math.E?Math.log:m===10&&Math.log10||m===2&&Math.log2||(m=Math.log(m),function(p){return Math.log(p)/m})}function Gt(m){return function(p){return-m(-p)}}function ue(m){var p=m(Lt,at),M=p.domain,T=10,z,G;function Z(){return z=Ct(T),G=vt(T),M()[0]<0?(z=Gt(z),G=Gt(G),m(_t,bt)):m(Lt,at),p}return p.base=function(q){return arguments.length?(T=+q,Z()):T},p.domain=function(q){return arguments.length?(M(q),Z()):M()},p.ticks=function(q){var mt=M(),Ft=mt[0],lt=mt[mt.length-1],jt;(jt=lt<Ft)&&(re=Ft,Ft=lt,lt=re);var re=z(Ft),ce=z(lt),ye,Ne,Ue,fn=q==null?10:+q,sn=[];if(!(T%1)&&ce-re<fn){if(re=Math.round(re)-1,ce=Math.round(ce)+1,Ft>0){for(;re<ce;++re)for(Ne=1,ye=G(re);Ne<T;++Ne)if(Ue=ye*Ne,!(Ue<Ft)){if(Ue>lt)break;sn.push(Ue)}}else for(;re<ce;++re)for(Ne=T-1,ye=G(re);Ne>=1;--Ne)if(Ue=ye*Ne,!(Ue<Ft)){if(Ue>lt)break;sn.push(Ue)}}else sn=B.ticks(re,ce,Math.min(ce-re,fn)).map(G);return jt?sn.reverse():sn},p.tickFormat=function(q,mt){if(mt==null&&(mt=T===10?".0e":","),typeof mt!="function"&&(mt=kt.format(mt)),q===1/0)return mt;q==null&&(q=10);var Ft=Math.max(1,T*q/p.ticks().length);return function(lt){var jt=lt/G(Math.round(z(lt)));return jt*T<T-.5&&(jt*=T),jt<=Ft?mt(lt):""}},p.nice=function(){return M(V(M(),{floor:function(q){return G(Math.floor(z(q)))},ceil:function(q){return G(Math.ceil(z(q)))}}))},p}function ie(){var m=ue(f()).domain([1,10]);return m.copy=function(){return N(m,ie()).base(m.base())},At.apply(m,arguments),m}function xe(m){return function(p){return Math.sign(p)*Math.log1p(Math.abs(p/m))}}function y(m){return function(p){return Math.sign(p)*Math.expm1(Math.abs(p))*m}}function $(m){var p=1,M=m(xe(p),y(p));return M.constant=function(T){return arguments.length?m(xe(p=+T),y(p)):p},Q(M)}function x(){var m=$(f());return m.copy=function(){return N(m,x()).constant(m.constant())},At.apply(m,arguments)}function A(m){return function(p){return p<0?-Math.pow(-p,m):Math.pow(p,m)}}function k(m){return m<0?-Math.sqrt(-m):Math.sqrt(m)}function _(m){return m<0?-m*m:m*m}function it(m){var p=m(pt,pt),M=1;function T(){return M===1?m(pt,pt):M===.5?m(k,_):m(A(M),A(1/M))}return p.exponent=function(z){return arguments.length?(M=+z,T()):M},Q(p)}function ut(){var m=it(f());
1return m.copy=function(){return N(m,ut()).exponent(m.exponent())},At.apply(m,arguments),m}function Wt(){return ut.apply(null,arguments).exponent(.5)}function qt(){var m=[],p=[],M=[],T;function z(){var Z=0,q=Math.max(1,p.length);for(M=new Array(q-1);++Z<q;)M[Z-1]=B.quantile(m,Z/q);return G}function G(Z){return isNaN(Z=+Z)?T:p[B.bisect(M,Z)]}return G.invertExtent=function(Z){var q=p.indexOf(Z);return q<0?[NaN,NaN]:[q>0?M[q-1]:m[0],q<M.length?M[q]:m[m.length-1]]},G.domain=function(Z){if(!arguments.length)return m.slice();m=[];for(var q=0,mt=Z.length,Ft;q<mt;++q)Ft=Z[q],Ft!=null&&!isNaN(Ft=+Ft)&&m.push(Ft);return m.sort(B.ascending),z()},G.range=function(Z){return arguments.length?(p=Rt.call(Z),z()):p.slice()},G.unknown=function(Z){return arguments.length?(T=Z,G):T},G.quantiles=function(){return M.slice()},G.copy=function(){return qt().domain(m).range(p).unknown(T)},At.apply(G,arguments)}function pe(){var m=0,p=1,M=1,T=[.5],z=[0,1],G;function Z(mt){return mt<=mt?z[B.bisect(T,mt,0,M)]:G}function q(){var mt=-1;for(T=new Array(M);++mt<M;)T[mt]=((mt+1)*p-(mt-M)*m)/(M+1);return Z}return Z.domain=function(mt){return arguments.length?(m=+mt[0],p=+mt[1],q()):[m,p]},Z.range=function(mt){return arguments.length?(M=(z=Rt.call(mt)).length-1,q()):z.slice()},Z.invertExtent=function(mt){var Ft=z.indexOf(mt);return Ft<0?[NaN,NaN]:Ft<1?[m,T[0]]:Ft>=M?[T[M-1],p]:[T[Ft-1],T[Ft]]},Z.unknown=function(mt){return arguments.length&&(G=mt),Z},Z.thresholds=function(){return T.slice()},Z.copy=function(){return pe().domain([m,p]).range(z).unknown(G)},At.apply(Q(Z),arguments)}function le(){var m=[.5],p=[0,1],M,T=1;function z(G){return G<=G?p[B.bisect(m,G,0,T)]:M}return z.domain=function(G){return arguments.length?(m=Rt.call(G),T=Math.min(m.length,p.length-1),z):m.slice()},z.range=function(G){return arguments.length?(p=Rt.call(G),T=Math.min(m.length,p.length-1),z):p.slice()},z.invertExtent=function(G){var Z=p.indexOf(G);return[m[Z-1],m[Z]]},z.unknown=function(G){return arguments.length?(M=G,z):M},z.copy=function(){return le().domain(m).range(p).unknown(M)},At.apply(z,arguments)}var Qt=1e3,Xt=Qt*60,be=Xt*60,ee=be*24,Ce=ee*7,Fe=ee*30,ze=ee*365;function l(m){return new Date(m)}function C(m){return m instanceof Date?+m:+new Date(+m)}function tt(m,p,M,T,z,G,Z,q,mt){var Ft=ct(pt,pt),lt=Ft.invert,jt=Ft.domain,re=mt(".%L"),ce=mt(":%S"),ye=mt("%I:%M"),Ne=mt("%I %p"),Ue=mt("%a %d"),fn=mt("%b %d"),sn=mt("%B"),on=mt("%Y"),gn=[[Z,1,Qt],[Z,5,5*Qt],[Z,15,15*Qt],[Z,30,30*Qt],[G,1,Xt],[G,5,5*Xt],[G,15,15*Xt],[G,30,30*Xt],[z,1,be],[z,3,3*be],[z,6,6*be],[z,12,12*be],[T,1,ee],[T,2,2*ee],[M,1,Ce],[p,1,Fe],[p,3,3*Fe],[m,1,ze]];function $n(Ve){return(Z(Ve)<Ve?re:G(Ve)<Ve?ce:z(Ve)<Ve?ye:T(Ve)<Ve?Ne:p(Ve)<Ve?M(Ve)<Ve?Ue:fn:m(Ve)<Ve?sn:on)(Ve)}function Sn(Ve,An,pn,wn){if(Ve==null&&(Ve=10),typeof Ve=="number"){var U=Math.abs(pn-An)/Ve,St=B.bisector(function(se){return se[2]}).right(gn,U);St===gn.length?(wn=B.tickStep(An/ze,pn/ze,Ve),Ve=m):St?(St=gn[U/gn[St-1][2]<gn[St][2]/U?St-1:St],wn=St[1],Ve=St[0]):(wn=Math.max(B.tickStep(An,pn,Ve),1),Ve=q)}return wn==null?Ve:Ve.every(wn)}return Ft.invert=function(Ve){return new Date(lt(Ve))},Ft.domain=function(Ve){return arguments.length?jt(rt.call(Ve,C)):jt().map(l)},Ft.ticks=function(Ve,An){var pn=jt(),wn=pn[0],U=pn[pn.length-1],St=U<wn,se;return St&&(se=wn,wn=U,U=se),se=Sn(Ve,wn,U,An),se=se?se.range(wn,U+1):[],St?se.reverse():se},Ft.tickFormat=function(Ve,An){return An==null?$n:mt(An)},Ft.nice=function(Ve,An){var pn=jt();return(Ve=Sn(Ve,pn[0],pn[pn.length-1],An))?jt(V(pn,Ve)):Ft},Ft.copy=function(){return N(Ft,tt(m,p,M,T,z,G,Z,q,mt))},Ft}function It(){return At.apply(tt(Et.timeYear,Et.timeMonth,Et.timeWeek,Et.timeDay,Et.timeHour,Et.timeMinute,Et.timeSecond,Et.timeMillisecond,Ot.timeFormat).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ut(){return At.apply(tt(Et.utcYear,Et.utcMonth,Et.utcWeek,Et.utcDay,Et.utcHour,Et.utcMinute,Et.utcSecond,Et.utcMillisecond,Ot.utcFormat).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Jt(){var m=0,p=1,M,T,z,G,Z=pt,q=!1,mt;function Ft(lt){return isNaN(lt=+lt)?mt:Z(z===0?.5:(lt=(G(lt)-M)*z,q?Math.max(0,Math.min(1,lt)):lt))}return Ft.domain=function(lt){return arguments.length?(M=G(m=+lt[0]),T=G(p=+lt[1]),z=M===T?0:1/(T-M),Ft):[m,p]},Ft.clamp=function(lt){return arguments.length?(q=!!lt,Ft):q},Ft.interpolator=function(lt){return arguments.length?(Z=lt,Ft):Z},Ft.unknown=function(lt){return arguments.length?(mt=lt,Ft):mt},function(lt){return G=lt,M=lt(m),T=lt(p),z=M===T?0:1/(T-M),Ft}}function Zt(m,p){return p.domain(m.domain()).interpolator(m.interpolator()).clamp(m.clamp()).unknown(m.unknown())}function oe(){var m=Q(Jt()(pt));return m.copy=function(){return Zt(m,oe())},xt.apply(m,arguments)}function Oe(){var m=ue(Jt()).domain([1,10]);return m.copy=function(){return Zt(m,Oe()).base(m.base())},xt.apply(m,arguments)}function De(){var m=$(Jt());return m.copy=function(){return Zt(m,De()).constant(m.constant())},xt.apply(m,arguments)}function ke(){var m=it(Jt());
1return m.copy=function(){return Zt(m,ke()).exponent(m.exponent())},xt.apply(m,arguments)}function Ie(){return ke.apply(null,arguments).exponent(.5)}function He(){var m=[],p=pt;function M(T){if(!isNaN(T=+T))return p((B.bisect(m,T)-1)/(m.length-1))}return M.domain=function(T){if(!arguments.length)return m.slice();m=[];for(var z=0,G=T.length,Z;z<G;++z)Z=T[z],Z!=null&&!isNaN(Z=+Z)&&m.push(Z);return m.sort(B.ascending),M},M.interpolator=function(T){return arguments.length?(p=T,M):p},M.copy=function(){return He(p).domain(m)},xt.apply(M,arguments)}function an(){var m=0,p=.5,M=1,T,z,G,Z,q,mt=pt,Ft,lt=!1,jt;function re(ce){return isNaN(ce=+ce)?jt:(ce=.5+((ce=+Ft(ce))-z)*(ce<z?Z:q),mt(lt?Math.max(0,Math.min(1,ce)):ce))}return re.domain=function(ce){return arguments.length?(T=Ft(m=+ce[0]),z=Ft(p=+ce[1]),G=Ft(M=+ce[2]),Z=T===z?0:.5/(z-T),q=z===G?0:.5/(G-z),re):[m,p,M]},re.clamp=function(ce){return arguments.length?(lt=!!ce,re):lt},re.interpolator=function(ce){return arguments.length?(mt=ce,re):mt},re.unknown=function(ce){return arguments.length?(jt=ce,re):jt},function(ce){return Ft=ce,T=ce(m),z=ce(p),G=ce(M),Z=T===z?0:.5/(z-T),q=z===G?0:.5/(G-z),re}}function nt(){var m=Q(an()(pt));return m.copy=function(){return Zt(m,nt())},xt.apply(m,arguments)}function Bt(){var m=ue(an()).domain([.1,1,10]);return m.copy=function(){return Zt(m,Bt()).base(m.base())},xt.apply(m,arguments)}function de(){var m=$(an());return m.copy=function(){return Zt(m,de()).constant(m.constant())},xt.apply(m,arguments)}function E(){var m=it(an());
1return m.copy=function(){return Zt(m,E()).exponent(m.exponent())},xt.apply(m,arguments)}function H(){return E.apply(null,arguments).exponent(.5)}a.scaleBand=Pt,a.scalePoint=Mt,a.scaleIdentity=gt,a.scaleLinear=J,a.scaleLog=ie,a.scaleSymlog=x,a.scaleOrdinal=et,a.scaleImplicit=zt,a.scalePow=ut,a.scaleSqrt=Wt,a.scaleQuantile=qt,a.scaleQuantize=pe,a.scaleThreshold=le,a.scaleTime=It,a.scaleUtc=Ut,a.scaleSequential=oe,a.scaleSequentialLog=Oe,a.scaleSequentialPow=ke,a.scaleSequentialSqrt=Ie,a.scaleSequentialSymlog=De,a.scaleSequentialQuantile=He,a.scaleDiverging=nt,a.scaleDivergingLog=Bt,a.scaleDivergingPow=E,a.scaleDivergingSqrt=H,a.scaleDivergingSymlog=de,a.tickFormat=yt,Object.defineProperty(a,"__esModule",{value:!0})})});var Fi=hn((Ar,fo)=>{(function(a,v){typeof Ar=="object"&&typeof fo<"u"?v(Ar):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(Ar,function(a){"use strict";var v={},B={},Y=34,kt=10,Et=13;function Ot(pt){return new Function("d","return {"+pt.map(function(W,X){return JSON.str
vendor: 1,277 bytes, lines 1-2
1ingify(W)+": d["+X+"]"}).join(",")+"}")}function At(pt,W){var X=Ot(pt);return function(w,R){return W(X(w),R,pt)}}function xt(pt){var W=Object.create(null),X=[];return pt.forEach(function(w){for(var R in w)R in W||X.push(W[R]=R)}),X}function wt(pt){var W=new RegExp('["'+pt+` 2\r]`),X=pt.charCodeAt(0);function w(Q,J){var gt,V,Lt=R(Q,function(at,_t){if(gt)return gt(at,_t-1);V=at,gt=J?At(at,J):Ot(at)});return Lt.columns=V||[],Lt}function R(Q,J){var gt=[],V=Q.length,Lt=0,at=0,_t,bt=V<=0,ft=!1;Q.charCodeAt(V-1)===kt&&--V,Q.charCodeAt(V-1)===Et&&--V;function vt(){if(bt)return B;if(ft)return ft=!1,v;var Gt,ue=Lt,ie;if(Q.charCodeAt(ue)===Y){for(;Lt++<V&&Q.charCodeAt(Lt)!==Y||Q.charCodeAt(++Lt)===Y;);return(Gt=Lt)>=V?bt=!0:(ie=Q.charCodeAt(Lt++))===kt?ft=!0:ie===Et&&(ft=!0,Q.charCodeAt(Lt)===kt&&++Lt),Q.slice(ue+1,Gt-1).replace(/""/g,'"')}for(;Lt<V;){if((ie=Q.charCodeAt(Gt=Lt++))===kt)ft=!0;else if(ie===Et)ft=!0,Q.charCodeAt(Lt)===kt&&++Lt;else if(ie!==X)continue;return Q.slice(ue,Gt)}return bt=!0,Q.slice(ue,V)}for(;(_t=vt())!==B;){for(var Ct=[];_t!==v&&_t!==B;)Ct.push(_t),_t=vt();J&&(Ct=J(Ct,at++))==null||gt.push(Ct)}return gt}function N(Q,J){return J==null&&(J=xt(Q)),[J.map(yt).join(pt)].concat(Q.map(function(gt){return J.map(function(V){return yt(gt[V])}).join(pt)}
2)).join(` 3`)}function f(Q){return Q.map(ct).join(` 4`)}function ct(Q){return Q.map(yt).join(pt)}function yt(Q){return Q==null?"":W.test(Q+="")?'"'+Q.replace(/"/g,'""')+'"':Q}return{parse:w,parseRows:R,format:N,formatRows:f}}var rt=wt(","),Rt=rt.parse,zt=rt.parseRows,et=rt.format,Pt=rt.formatRows,j=wt(" "),Mt=j.parse,ht=j.parseRows,Nt=j.format,Tt=j.formatRows;a.dsvFormat=wt,a.csvParse=Rt,a.csvParseRows=zt,a.csvFormat=et,a.csvFormatRows=Pt,a.tsvParse=Mt,a.tsvParseRows=ht,a.tsvFormat=Nt,a.tsvFormatRows=Tt,Object.defineProperty(a,"__esModule",{value:!0})})});var Sr=hn((Mr,ho)=>{(function(a,v){typeof Mr=="object"&&typeof ho<"u"?v(Mr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(Mr,function(a){"use strict";var v=Math.PI,B=2*v,Y=1e-6,kt=B-Y;function Et(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ot(){return new Et}Et.prototype=Ot.prototype={constructor:Et,moveTo:function(At,xt){this._+="M"+(this._x0=this._x1=+At)+","+(this._y0=this._y1=+xt)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(At,xt){this._+="L"+(this._x1=+At)+","+(this._y1=+xt)},quadraticCurveTo:function(At,xt,wt,rt){this._+="Q"+ +At+","+ +xt+","+(this._x1=+wt)+","+(this._y1=+rt)},bezierCurveTo:function(At,xt,wt,rt,Rt,zt){this._+="C"+ +At+","+ +xt+","+ +wt+","+ +rt+","+(this._x1=+Rt)+","+(this._y1=+zt)},arcTo:function(At,xt,wt,rt,Rt){At=+At,xt=+xt,wt=+wt,rt=+rt,Rt=+Rt;var zt=this._x1,et=this._y1,Pt=wt-At,j=rt-xt,Mt=zt-At,ht=et-xt,Nt=Mt*Mt+ht*ht;if(Rt<0)throw new Error("negative radius: "+Rt);if(this._x1===null)this._+="M"+(this._x1=At)+","+(this._y1=xt);else if(Nt>Y)if(!(Math.abs(ht*Pt-j*Mt)>
4Y)||!Rt)this._+="L"+(this._x1=At)+","+(this._y1=xt);else{var Tt=wt-zt,pt=rt-et,W=Pt*Pt+j*j,X=Tt*Tt+pt*pt,w=Math.sqrt(W),R=Math.sqrt(Nt),N=Rt*Math.tan((v-Math.acos((W+Nt-X)/(2*w*R)))/2),f=N/R,ct=N/w;Math.abs(f-1)>Y&&(this._+="L"+(At+f*Mt)+","+(xt+f*ht)),this._+="A"+Rt+","+Rt+",0,0,"+ +(ht*Tt>Mt*pt)+","+(this._x1=At+ct*Pt)+","+(this._y1=xt+ct*j)}},arc:function(At,xt,wt,rt,Rt,zt){At=+At,xt=+xt,wt=+wt;var et=wt*Math.cos(rt),Pt=wt*Math.sin(rt),j=At+et,Mt=xt+Pt,ht=1^zt,Nt=zt?rt-Rt:Rt-rt;if(wt<0)throw new Error("negative radius: "+wt);this._x1===null?this._+="M"+j+","+Mt:(Math.abs(this._x1-j)>Y||Math.abs(this._y1-Mt)>Y)&&(this._+="L"+j+","+Mt),wt&&(Nt<0&&(Nt=Nt%B+B),Nt>kt?this._+="A"+wt+","+wt+",0,1,"+ht+","+(At-et)+","+(xt-Pt)+"A"+wt+","+wt+",0,1,"+ht+","+(this._x1=j)+","+(this._y1=Mt):Nt>Y&&(this._+="A"+wt+","+wt+",0,"+ +(Nt>=v)+","+ht+","+(this._x1=At+wt*Math.cos(Rt))+","+(this._y1=xt+wt*Math.sin(Rt))))},rect:function(At,xt,wt,rt){this._+="M"+(this._x0=this._x1=+At)+","+(this._y0=this._y1=+xt)+"h"+ +wt+"v"+ +rt+"h"+-wt+"Z"},toString:function(){return this._}},a.path=Ot,Object.defineProperty(a,"__esModule",{value:!0})})});var Lr=hn((Cr,go)=>{(function(a,v){typeof Cr=="object"&&typeof go<"u"?v(Cr,Sr()):typeof define=="function"&&define.amd?define(["exports","d3-path"],v):(a=a||self,v(a.d3=a.d3||{},a.d3))})(Cr,function(a,v){"use strict";function B(c){return function(){return c}}var Y=Math.abs,kt=Math.atan2,Et=Math.cos,Ot=Math.max,At=Math.min,xt=Math.sin,wt=Math.sqrt,rt=1e-12,Rt=Math.PI,zt=Rt/2,et=2*Rt;function Pt(c){return c>1?0:c<-1?Rt:Math.acos(c)}function j(c){return c>=1?zt:c<=-1?-zt:Math.asin(c)}function Mt(c){return c.innerRadius}function ht(c){return c.outerRadius}function Nt(c){return c.startAngle}function Tt(c){return c.endAngle}function pt(c){return c&&c.padAngle}function W(c,g,L,I,ot,st,$t,dt){var Vt=L-c,he=I-g,ve=$t-ot,Ae=dt-st,Ee=Ae*Vt-ve*he;if(!(Ee*Ee<rt))return Ee=(ve*(g-st)-Ae*(c-ot))/Ee,[c+Ee*Vt,g+Ee*he]}function X(c,g,L,I,ot,st,$t){var dt=c-L,Vt=g-I,he=($t?st:-st)/wt(dt*dt+Vt*Vt),ve=he*Vt,Ae=-he*dt,Ee=c+ve,We=g+Ae,Ye=L+ve,Xe=I+Ae,Te=(Ee+Ye)/2,en=(We+Xe)/2,Qe=Ye-Ee,Ze=Xe-We,un=Qe*Qe+Ze*Ze,Cn=ot-st,mn=Ee*Xe-Ye*We,tn=(Ze<0?-1:1)*wt(Ot(0,Cn*Cn*un-mn*mn)),dn=(mn*Ze-Qe*tn)/un,Je=(-mn*Qe-Ze*tn)/un,cn=(mn*Ze+Qe*tn)/un,Se=(-mn*Qe+Ze*tn)/un,Me=dn-Te,Pe=Je-en,yn=cn-Te,_n=Se-en;return Me*Me+Pe*Pe>yn*yn+_n*_n&&(dn=cn,Je=Se),{cx:dn,cy:Je,x01:-ve,y01:-Ae,x11:dn*(ot/Cn-1),y11:Je*(ot/Cn-1)}}function w(){var c=Mt,g=ht,L=B(0),I=null,ot=Nt,st=Tt,$t=pt,dt=null;function Vt(){var he,ve,Ae=+c.apply(this,arguments),Ee=+g.apply(this,arguments),We=ot.apply(this,arguments)-zt,Ye=st.apply(this,arguments)-zt,Xe=Y(Ye-We),Te=Ye>We;if(dt||(dt=he=v.path()),Ee<Ae&&(ve=Ee,Ee=Ae,Ae=ve),!(Ee>rt))dt.moveTo(0,0);else if(Xe>et-rt)dt.moveTo(Ee*Et(We),Ee*xt(We)),dt.arc(0,0,Ee,We,Ye,!Te),Ae>rt&&(dt.moveTo(Ae*Et(Ye),Ae*xt(Ye)),dt.arc(0,0,Ae,Ye,We,Te));else{var en=We,Qe=Ye,Ze=We,un=Ye,Cn=Xe,mn=Xe,tn=$t.apply(this,arguments)/2,dn=tn>rt&&(I?+I.apply(this,arguments):wt(Ae*Ae+Ee*Ee)),Je=At(Y(Ee-Ae)/2,+L.apply(this,arguments)),cn=Je,Se=Je,Me,Pe;if(dn>rt){var yn=j(dn/Ae*xt(tn)),_n=j(dn/Ee*xt(tn));(Cn-=yn*2)>rt?(yn*=Te?1:-1,Ze+=yn,un-=yn):(Cn=0,Ze=un=(We+Ye)/2),(mn-=_n*2)>rt?(_n*=Te?1:-1,en+=_n,Qe-=_n):(mn=0,en=Qe=(We+Ye)/2)}var Pn=Ee*Et(en),Rn=Ee*xt(en),In=Ae*Et(un),Nn=Ae*xt(un);if(Je>rt){var Yn=Ee*Et(Qe),qn=Ee*xt(Qe),Fn=Ae*Et(Ze),zn=Ae*xt(Ze),Xn;if(Xe<Rt&&(Xn=W(Pn,Rn,Fn,zn,Yn,qn,In,Nn))){var ui=Pn-Xn[0],li=Rn-Xn[1],ni=Yn-Xn[0],ii=qn-Xn[1],Hn=1/xt(Pt((ui*ni+li*ii)/(wt(ui*ui+li*li)*wt(ni*ni+ii*ii)))/2),Bi=wt(Xn[0]*Xn[0]+Xn[1]*Xn[1]);cn=At(Je,(Ae-Bi)/(Hn-1)),Se=At(Je,(Ee-Bi)/(Hn+1))}}mn>rt?Se>rt?(Me=X(Fn,zn,Pn,Rn,Ee,Se,Te),Pe=X(Yn,qn,In,Nn,Ee,Se,Te),dt.moveTo(Me.cx+Me.x01,Me.cy+Me.y01),Se<Je?dt.arc(Me.cx,Me.cy,Se,kt(Me.y01,Me.x01),kt(Pe.y01,Pe.x01),!Te):(dt.arc(Me.cx,Me.cy,Se,kt(Me.y01,Me.x01),kt(Me.y11,Me.x11),!Te),dt.arc(0,0,Ee,kt(Me.cy+Me.y11,Me.cx+Me.x11),kt(Pe.cy+Pe.y11,Pe.cx+Pe.x11),!Te),dt.arc(Pe.cx,Pe.cy,Se,kt(Pe.y11,Pe.x11),kt(Pe.y01,Pe.x01),!Te))):(dt.moveTo(Pn,Rn),dt.arc(0,0,Ee,en,Qe,!Te)):dt.moveTo(Pn,Rn),!(Ae>rt)||!(Cn>rt)?dt.lineTo(In,Nn):cn>rt?(Me=X(In,Nn,Yn,qn,Ae,-cn,Te),Pe=X(Pn,Rn,Fn,zn,Ae,-cn,Te),dt.lineTo(Me.cx+Me.x01,Me.cy+Me.y01),cn<Je?dt.arc(Me.cx,Me.cy,cn,kt(Me.y01,Me.x01),kt(Pe.y01,Pe.x01),!Te):(dt.arc(Me.cx,Me.cy,cn,kt(Me.y01,Me.x01),kt(Me.y11,Me.x11),!Te),dt.arc(0,0,Ae,kt(Me.cy+Me.y11,Me.cx+Me.x11),kt(Pe.cy+Pe.y11,Pe.cx+Pe.x11),Te),dt.arc(Pe.cx,Pe.cy,cn,kt(Pe.y11,Pe.x11),kt(Pe.y01,Pe.x01),!Te))):dt.arc(0,0,Ae,un,Ze,Te)}if(dt.closePath(),he)return dt=null,he+""||null}return Vt.centroid=function(){var he=(+c.apply(this,arguments)+ +g.apply(this,arguments))/2,ve=(+ot.apply(this,arguments)+ +st.apply(this,arguments))/2-Rt/2;return[Et(ve)*he,xt(ve)*he]},Vt.innerRadius=function(he){return arguments.length?(c=typeof he=="function"?he:B(+he),Vt):c},Vt.outerRadius=function(he){return arguments.length?(g=typeof he=="function"?he:B(+he),Vt):g},Vt.cornerRadius=function(he){return arguments.length?(L=typeof he=="function"?he:B(+he),Vt):L}
vendor: 4,281 bytes, line 4
4,Vt.padRadius=function(he){return arguments.length?(I=he==null?null:typeof he=="function"?he:B(+he),Vt):I},Vt.startAngle=function(he){return arguments.length?(ot=typeof he=="function"?he:B(+he),Vt):ot},Vt.endAngle=function(he){return arguments.length?(st=typeof he=="function"?he:B(+he),Vt):st},Vt.padAngle=function(he){return arguments.length?($t=typeof he=="function"?he:B(+he),Vt):$t},Vt.context=function(he){return arguments.length?(dt=he??null,Vt):dt},Vt}function R(c){this._context=c}R.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(c,g){switch(c=+c,g=+g,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,g):this._context.moveTo(c,g);break;case 1:this._point=2;default:this._context.lineTo(c,g);break}}};function N(c){return new R(c)}function f(c){return c[0]}function ct(c){return c[1]}function yt(){var c=f,g=ct,L=B(!0),I=null,ot=N,st=null;function $t(dt){var Vt,he=dt.length,ve,Ae=!1,Ee;for(I==null&&(st=ot(Ee=v.path())),Vt=0;Vt<=he;++Vt)!(Vt<he&&L(ve=dt[Vt],Vt,dt))===Ae&&((Ae=!Ae)?st.lineStart():st.lineEnd()),Ae&&st.point(+c(ve,Vt,dt),+g(ve,Vt,dt));if(Ee)return st=null,Ee+""||null}return $t.x=function(dt){return arguments.length?(c=typeof dt=="function"?dt:B(+dt),$t):c},$t.y=function(dt){return arguments.length?(g=typeof dt=="function"?dt:B(+dt),$t):g},$t.defined=function(dt){return arguments.length?(L=typeof dt=="function"?dt:B(!!dt),$t):L},$t.curve=function(dt){return arguments.length?(ot=dt,I!=null&&(st=ot(I)),$t):ot},$t.context=function(dt){return arguments.length?(dt==null?I=st=null:st=ot(I=dt),$t):I},$t}function Q(){var c=f,g=null,L=B(0),I=ct,ot=B(!0),st=null,$t=N,dt=null;function Vt(ve){var Ae,Ee,We,Ye=ve.length,Xe,Te=!1,en,Qe=new Array(Ye),Ze=new Array(Ye);for(st==null&&(dt=$t(en=v.path())),Ae=0;Ae<=Ye;++Ae){if(!(Ae<Ye&&ot(Xe=ve[Ae],Ae,ve))===Te)if(Te=!Te)Ee=Ae,dt.areaStart(),dt.lineStart();else{for(dt.lineEnd(),dt.lineStart(),We=Ae-1;We>=Ee;--We)dt.point(Qe[We],Ze[We]);dt.lineEnd(),dt.areaEnd()}Te&&(Qe[Ae]=+c(Xe,Ae,ve),Ze[Ae]=+L(Xe,Ae,ve),dt.point(g?+g(Xe,Ae,ve):Qe[Ae],I?+I(Xe,Ae,ve):Ze[Ae]))}if(en)return dt=null,en+""||null}function he(){return yt().defined(ot).curve($t).context(st)}return Vt.x=function(ve){return arguments.length?(c=typeof ve=="function"?ve:B(+ve),g=null,Vt):c},Vt.x0=function(ve){return arguments.length?(c=typeof ve=="function"?ve:B(+ve),Vt):c},Vt.x1=function(ve){return arguments.length?(g=ve==null?null:typeof ve=="function"?ve:B(+ve),Vt):g},Vt.y=function(ve){return arguments.length?(L=typeof ve=="function"?ve:B(+ve),I=null,Vt):L},Vt.y0=function(ve){return arguments.length?(L=typeof ve=="function"?ve:B(+ve),Vt):L},Vt.y1=function(ve){return arguments.length?(I=ve==null?null:typeof ve=="function"?ve:B(+ve),Vt):I},Vt.lineX0=Vt.lineY0=function(){return he().x(c).y(L)},Vt.lineY1=function(){return he().x(c).y(I)},Vt.lineX1=function(){return he().x(g).y(L)},Vt.defined=function(ve){return arguments.length?(ot=typeof ve=="function"?ve:B(!!ve),Vt):ot},Vt.curve=function(ve){return arguments.length?($t=ve,st!=null&&(dt=$t(st)),Vt):$t},Vt.context=function(ve){return arguments.length?(ve==null?st=dt=null:dt=$t(st=ve),Vt):st},Vt}function J(c,g){return g<c?-1:g>c?1:g>=c?0:NaN}function gt(c){return c}function V(){var c=gt,g=J,L=null,I=B(0),ot=B(et),st=B(0);function $t(dt){var Vt,he=dt.length,ve,Ae,Ee=0,We=new Array(he),Ye=new Array(he),Xe=+I.apply(this,arguments),Te=Math.min(et,Math.max(-et,ot.apply(this,arguments)-Xe)),en,Qe=Math.min(Math.abs(Te)/he,st.apply(this,arguments)),Ze=Qe*(Te<0?-1:1),un;for(Vt=0;Vt<he;++Vt)(un=Ye[We[Vt]=Vt]=+c(dt[Vt],Vt,dt))>0&&(Ee+=un);for(g!=null?We.sort(function(Cn,mn){return g(Ye[Cn],Ye[mn])}):L!=null&&We.sort(function(Cn,mn){return L(dt[Cn],dt[mn])}),Vt=0,Ae=Ee?(Te-he*Ze)/Ee:0;Vt<he;++Vt,Xe=en)ve=We[Vt],un=Ye[ve],en=Xe+(un>0?un*Ae:0)+Ze,Ye[ve]={data:dt[ve],index:Vt,value:un,startAngle:Xe,endAngle:en,padAngle:Qe};return Ye}return $t.value=function(dt){return arguments.length?(c=typeof dt=="function"?dt:B(+dt),$t):c},$t.sortValues=function(dt){return arguments.length?(g=dt,L=null,$t):g},$t.sort=function(dt){return arguments.length?(L=dt,g=null,$t):L}
vendor: 12,193 bytes, line 4
4,$t.startAngle=function(dt){return arguments.length?(I=typeof dt=="function"?dt:B(+dt),$t):I},$t.endAngle=function(dt){return arguments.length?(ot=typeof dt=="function"?dt:B(+dt),$t):ot},$t.padAngle=function(dt){return arguments.length?(st=typeof dt=="function"?dt:B(+dt),$t):st},$t}var Lt=_t(N);function at(c){this._curve=c}at.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(c,g){this._curve.point(g*Math.sin(c),g*-Math.cos(c))}};function _t(c){function g(L){return new at(c(L))}return g._curve=c,g}function bt(c){var g=c.curve;return c.angle=c.x,delete c.x,c.radius=c.y,delete c.y,c.curve=function(L){return arguments.length?g(_t(L)):g()._curve},c}function ft(){return bt(yt().curve(Lt))}function vt(){var c=Q().curve(Lt),g=c.curve,L=c.lineX0,I=c.lineX1,ot=c.lineY0,st=c.lineY1;return c.angle=c.x,delete c.x,c.startAngle=c.x0,delete c.x0,c.endAngle=c.x1,delete c.x1,c.radius=c.y,delete c.y,c.innerRadius=c.y0,delete c.y0,c.outerRadius=c.y1,delete c.y1,c.lineStartAngle=function(){return bt(L())},delete c.lineX0,c.lineEndAngle=function(){return bt(I())},delete c.lineX1,c.lineInnerRadius=function(){return bt(ot())},delete c.lineY0,c.lineOuterRadius=function(){return bt(st())},delete c.lineY1,c.curve=function($t){return arguments.length?g(_t($t)):g()._curve},c}function Ct(c,g){return[(g=+g)*Math.cos(c-=Math.PI/2),g*Math.sin(c)]}var Gt=Array.prototype.slice;function ue(c){return c.source}function ie(c){return c.target}function xe(c){var g=ue,L=ie,I=f,ot=ct,st=null;function $t(){var dt,Vt=Gt.call(arguments),he=g.apply(this,Vt),ve=L.apply(this,Vt);if(st||(st=dt=v.path()),c(st,+I.apply(this,(Vt[0]=he,Vt)),+ot.apply(this,Vt),+I.apply(this,(Vt[0]=ve,Vt)),+ot.apply(this,Vt)),dt)return st=null,dt+""||null}return $t.source=function(dt){return arguments.length?(g=dt,$t):g},$t.target=function(dt){return arguments.length?(L=dt,$t):L},$t.x=function(dt){return arguments.length?(I=typeof dt=="function"?dt:B(+dt),$t):I},$t.y=function(dt){return arguments.length?(ot=typeof dt=="function"?dt:B(+dt),$t):ot},$t.context=function(dt){return arguments.length?(st=dt??null,$t):st},$t}function y(c,g,L,I,ot){c.moveTo(g,L),c.bezierCurveTo(g=(g+I)/2,L,g,ot,I,ot)}function $(c,g,L,I,ot){c.moveTo(g,L),c.bezierCurveTo(g,L=(L+ot)/2,I,L,I,ot)}function x(c,g,L,I,ot){var st=Ct(g,L),$t=Ct(g,L=(L+ot)/2),dt=Ct(I,L),Vt=Ct(I,ot);c.moveTo(st[0],st[1]),c.bezierCurveTo($t[0],$t[1],dt[0],dt[1],Vt[0],Vt[1])}function A(){return xe(y)}function k(){return xe($)}function _(){var c=xe(x);return c.angle=c.x,delete c.x,c.radius=c.y,delete c.y,c}var it={draw:function(c,g){var L=Math.sqrt(g/Rt);c.moveTo(L,0),c.arc(0,0,L,0,et)}},ut={draw:function(c,g){var L=Math.sqrt(g/5)/2;c.moveTo(-3*L,-L),c.lineTo(-L,-L),c.lineTo(-L,-3*L),c.lineTo(L,-3*L),c.lineTo(L,-L),c.lineTo(3*L,-L),c.lineTo(3*L,L),c.lineTo(L,L),c.lineTo(L,3*L),c.lineTo(-L,3*L),c.lineTo(-L,L),c.lineTo(-3*L,L),c.closePath()}},Wt=Math.sqrt(1/3),qt=Wt*2,pe={draw:function(c,g){var L=Math.sqrt(g/qt),I=L*Wt;c.moveTo(0,-L),c.lineTo(I,0),c.lineTo(0,L),c.lineTo(-I,0),c.closePath()}},le=.8908130915292852,Qt=Math.sin(Rt/10)/Math.sin(7*Rt/10),Xt=Math.sin(et/10)*Qt,be=-Math.cos(et/10)*Qt,ee={draw:function(c,g){var L=Math.sqrt(g*le),I=Xt*L,ot=be*L;c.moveTo(0,-L),c.lineTo(I,ot);for(var st=1;st<5;++st){var $t=et*st/5,dt=Math.cos($t),Vt=Math.sin($t);c.lineTo(Vt*L,-dt*L),c.lineTo(dt*I-Vt*ot,Vt*I+dt*ot)}c.closePath()}},Ce={draw:function(c,g){var L=Math.sqrt(g),I=-L/2;c.rect(I,I,L,L)}},Fe=Math.sqrt(3),ze={draw:function(c,g){var L=-Math.sqrt(g/(Fe*3));c.moveTo(0,L*2),c.lineTo(-Fe*L,-L),c.lineTo(Fe*L,-L),c.closePath()}},l=-.5,C=Math.sqrt(3)/2,tt=1/Math.sqrt(12),It=(tt/2+1)*3,Ut={draw:function(c,g){var L=Math.sqrt(g/It),I=L/2,ot=L*tt,st=I,$t=L*tt+L,dt=-st,Vt=$t;c.moveTo(I,ot),c.lineTo(st,$t),c.lineTo(dt,Vt),c.lineTo(l*I-C*ot,C*I+l*ot),c.lineTo(l*st-C*$t,C*st+l*$t),c.lineTo(l*dt-C*Vt,C*dt+l*Vt),c.lineTo(l*I+C*ot,l*ot-C*I),c.lineTo(l*st+C*$t,l*$t-C*st),c.lineTo(l*dt+C*Vt,l*Vt-C*dt),c.closePath()}},Jt=[it,ut,pe,Ce,ee,ze,Ut];function Zt(){var c=B(it),g=B(64),L=null;function I(){var ot;if(L||(L=ot=v.path()),c.apply(this,arguments).draw(L,+g.apply(this,arguments)),ot)return L=null,ot+""||null}return I.type=function(ot){return arguments.length?(c=typeof ot=="function"?ot:B(ot),I):c},I.size=function(ot){return arguments.length?(g=typeof ot=="function"?ot:B(+ot),I):g},I.context=function(ot){return arguments.length?(L=ot??null,I):L},I}function oe(){}function Oe(c,g,L){c._context.bezierCurveTo((2*c._x0+c._x1)/3,(2*c._y0+c._y1)/3,(c._x0+2*c._x1)/3,(c._y0+2*c._y1)/3,(c._x0+4*c._x1+g)/6,(c._y0+4*c._y1+L)/6)}function De(c){this._context=c}De.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:Oe(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(c,g){switch(c=+c,g=+g,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,g):this._context.moveTo(c,g);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:Oe(this,c,g);break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=g}};function ke(c){return new De(c)}function Ie(c){this._context=c}Ie.prototype={areaStart:oe,areaEnd:oe,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(c,g){switch(c=+c,g=+g,this._point){case 0:this._point=1,this._x2=c,this._y2=g;break;case 1:this._point=2,this._x3=c,this._y3=g;break;case 2:this._point=3,this._x4=c,this._y4=g,this._context.moveTo((this._x0+4*this._x1+c)/6,(this._y0+4*this._y1+g)/6);break;default:Oe(this,c,g);break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=g}};function He(c){return new Ie(c)}function an(c){this._context=c}an.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(c,g){switch(c=+c,g=+g,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var L=(this._x0+4*this._x1+c)/6,I=(this._y0+4*this._y1+g)/6;this._line?this._context.lineTo(L,I):this._context.moveTo(L,I);break;case 3:this._point=4;default:Oe(this,c,g);break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=g}};function nt(c){return new an(c)}function Bt(c,g){this._basis=new De(c),this._beta=g}Bt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var c=this._x,g=this._y,L=c.length-1;if(L>0)for(var I=c[0],ot=g[0],st=c[L]-I,$t=g[L]-ot,dt=-1,Vt;++dt<=L;)Vt=dt/L,this._basis.point(this._beta*c[dt]+(1-this._beta)*(I+Vt*st),this._beta*g[dt]+(1-this._beta)*(ot+Vt*$t));this._x=this._y=null,this._basis.lineEnd()},point:function(c,g){this._x.push(+c),this._y.push(+g)}};var de=function c(g){function L(I){return g===1?new De(I):new Bt(I,g)}return L.beta=function(I){return c(+I)},L}(.85);function E(c,g,L){c._context.bezierCurveTo(c._x1+c._k*(c._x2-c._x0),c._y1+c._k*(c._y2-c._y0),c._x2+c._k*(c._x1-g),c._y2+c._k*(c._y1-L),c._x2,c._y2)}function H(c,g){this._context=c,this._k=(1-g)/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(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:E(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(c,g){switch(c=+c,g=+g,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,g):this._context.moveTo(c,g);break;case 1:this._point=2,this._x1=c,this._y1=g;break;case 2:this._point=3;default:E(this,c,g);break}this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=g}};var m=function c(g){function L(I){return new H(I,g)}return L.tension=function(I){return c(+I)},L}(0);function p(c,g){this._context=c,this._k=(1-g)/6}p.prototype={areaStart:oe,areaEnd:oe,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(c,g){switch(c=+c,g=+g,this._point){case 0:this._point=1,this._x3=c,this._y3=g;break;case 1:this._point=2,this._context.moveTo(this._x4=c,this._y4=g);break;case 2:this._point=3,this._x5=c,this._y5=g;break;default:E(this,c,g);break}this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=g}};var M=function c(g){function L(I){return new p(I,g)}return L.tension=function(I){return c(+I)},L}(0);function T(c,g){this._context=c,this._k=(1-g)/6}T.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(c,g){switch(c=+c,g=+g,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:E(this,c,g);break}this._x0=this._x1,this._x1=this._x2,this._x2=c,this._y0=this._y1,this._y1=this._y2,this._y2=g}};var z=function c(g){function L(I){return new T(I,g)}return L.tension=function(I){return c(+I)},L}(0);function G(c,g,L){var I=c._x1,ot=c._y1,st=c._x2,$t=c._y2;if(c._l01_a>rt){var dt=2*c._l01_2a+3*c._l01_a*c._l12_a+c._l12_2a,Vt=3*c._l01_a*(c._l01_a+c._l12_a);I=(I*dt-c._x0*c._l12_2a+c._x2*c._l01_2a)/Vt,ot=(ot*dt-c._y0*c._l12_2a+c._y2*c._l01_2a)/Vt}if(c._l23_a>rt){var he=2*c._l23_2a+3*c._l23_a*c._l12_a+c._l12_2a,ve=3*c._l23_a*(c._l23_a+c._l12_a);st=(st*he+c._x1*c._l23_2a-g*c._l12_2a)/ve,$t=($t*he+c._y1*c._l23_2a-L*c._l12_2a)/ve}c._context.bezierCurveTo(I,ot,st,$t,c._x2,c._y2)}function Z(c,g){this._context=c,this._alpha=g}Z.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(c,g){if(c=+c,g=+g,this._point){var L=this._x2-c,I=this._y2-g;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(L*L+I*I,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(c,g):this._context.moveTo(c,g);break;case 1:this._point=2;break;case 2:this._point=3;default:G(this,c,g);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=c,this._y0=this._y1,this._y1=this._y2,this._y2=g}};var q=function c(g){function L(I){return g?new Z(I,g):new H(I,0)}
vendor: 6,150 bytes, line 4
4return L.alpha=function(I){return c(+I)},L}(.5);function mt(c,g){this._context=c,this._alpha=g}mt.prototype={areaStart:oe,areaEnd:oe,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(c,g){if(c=+c,g=+g,this._point){var L=this._x2-c,I=this._y2-g;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(L*L+I*I,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=c,this._y3=g;break;case 1:this._point=2,this._context.moveTo(this._x4=c,this._y4=g);break;case 2:this._point=3,this._x5=c,this._y5=g;break;default:G(this,c,g);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=c,this._y0=this._y1,this._y1=this._y2,this._y2=g}};var Ft=function c(g){function L(I){return g?new mt(I,g):new p(I,0)}return L.alpha=function(I){return c(+I)},L}(.5);function lt(c,g){this._context=c,this._alpha=g}lt.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(c,g){if(c=+c,g=+g,this._point){var L=this._x2-c,I=this._y2-g;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(L*L+I*I,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:G(this,c,g);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=c,this._y0=this._y1,this._y1=this._y2,this._y2=g}};var jt=function c(g){function L(I){return g?new lt(I,g):new T(I,0)}return L.alpha=function(I){return c(+I)},L}(.5);function re(c){this._context=c}re.prototype={areaStart:oe,areaEnd:oe,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(c,g){c=+c,g=+g,this._point?this._context.lineTo(c,g):(this._point=1,this._context.moveTo(c,g))}};function ce(c){return new re(c)}function ye(c){return c<0?-1:1}function Ne(c,g,L){var I=c._x1-c._x0,ot=g-c._x1,st=(c._y1-c._y0)/(I||ot<0&&-0),$t=(L-c._y1)/(ot||I<0&&-0),dt=(st*ot+$t*I)/(I+ot);return(ye(st)+ye($t))*Math.min(Math.abs(st),Math.abs($t),.5*Math.abs(dt))||0}function Ue(c,g){var L=c._x1-c._x0;return L?(3*(c._y1-c._y0)/L-g)/2:g}function fn(c,g,L){var I=c._x0,ot=c._y0,st=c._x1,$t=c._y1,dt=(st-I)/3;c._context.bezierCurveTo(I+dt,ot+dt*g,st-dt,$t-dt*L,st,$t)}function sn(c){this._context=c}sn.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:fn(this,this._t0,Ue(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(c,g){var L=NaN;if(c=+c,g=+g,!(c===this._x1&&g===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(c,g):this._context.moveTo(c,g);break;case 1:this._point=2;break;case 2:this._point=3,fn(this,Ue(this,L=Ne(this,c,g)),L);break;default:fn(this,this._t0,L=Ne(this,c,g));break}this._x0=this._x1,this._x1=c,this._y0=this._y1,this._y1=g,this._t0=L}}};function on(c){this._context=new gn(c)}(on.prototype=Object.create(sn.prototype)).point=function(c,g){sn.prototype.point.call(this,g,c)};function gn(c){this._context=c}gn.prototype={moveTo:function(c,g){this._context.moveTo(g,c)},closePath:function(){this._context.closePath()},lineTo:function(c,g){this._context.lineTo(g,c)},bezierCurveTo:function(c,g,L,I,ot,st){this._context.bezierCurveTo(g,c,I,L,st,ot)}};function $n(c){return new sn(c)}function Sn(c){return new on(c)}function Ve(c){this._context=c}Ve.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var c=this._x,g=this._y,L=c.length;if(L)if(this._line?this._context.lineTo(c[0],g[0]):this._context.moveTo(c[0],g[0]),L===2)this._context.lineTo(c[1],g[1]);else for(var I=An(c),ot=An(g),st=0,$t=1;$t<L;++st,++$t)this._context.bezierCurveTo(I[0][st],ot[0][st],I[1][st],ot[1][st],c[$t],g[$t]);(this._line||this._line!==0&&L===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(c,g){this._x.push(+c),this._y.push(+g)}};function An(c){var g,L=c.length-1,I,ot=new Array(L),st=new Array(L),$t=new Array(L);for(ot[0]=0,st[0]=2,$t[0]=c[0]+2*c[1],g=1;g<L-1;++g)ot[g]=1,st[g]=4,$t[g]=4*c[g]+2*c[g+1];for(ot[L-1]=2,st[L-1]=7,$t[L-1]=8*c[L-1]+c[L],g=1;g<L;++g)I=ot[g]/st[g-1],st[g]-=I,$t[g]-=I*$t[g-1];for(ot[L-1]=$t[L-1]/st[L-1],g=L-2;g>=0;--g)ot[g]=($t[g]-ot[g+1])/st[g];for(st[L-1]=(c[L]+ot[L-1])/2,g=0;g<L-1;++g)st[g]=2*c[g+1]-ot[g+1];return[ot,st]}function pn(c){return new Ve(c)}function wn(c,g){this._context=c,this._t=g}wn.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(c,g){switch(c=+c,g=+g,this._point){case 0:this._point=1,this._line?this._context.lineTo(c,g):this._context.moveTo(c,g);break;case 1:this._point=2;
4default:{if(this._t<=0)this._context.lineTo(this._x,g),this._context.lineTo(c,g);else{var L=this._x*(1-this._t)+c*this._t;this._context.lineTo(L,this._y),this._context.lineTo(L,g)}break}}this._x=c,this._y=g}};function U(c){return new wn(c,.5)}function St(c){return new wn(c,0)}function se(c){return new wn(c,1)}function _e(c,g){if(($t=c.length)>1)for(var L=1,I,ot,st=c[g[0]],$t,dt=st.length;L<$t;++L)for(ot=st,st=c[g[L]],I=0;I<dt;++I)st[I][1]+=st[I][0]=isNaN(ot[I][1])?ot[I][0]:ot[I][1]}function we(c){for(var g=c.length,L=new Array(g);--g>=0;)L[g]=g;return L}function Re(c,g){return c[g]}function s(){var c=B([]),g=we,L=_e,I=Re;function ot(st){var $t=c.apply(this,arguments),dt,Vt=st.length,he=$t.length,ve=new Array(he),Ae;for(dt=0;dt<he;++dt){for(var Ee=$t[dt],We=ve[dt]=new Array(Vt),Ye=0,Xe;Ye<Vt;++Ye)We[Ye]=Xe=[0,+I(st[Ye],Ee,Ye,st)],Xe.data=st[Ye];We.key=Ee}for(dt=0,Ae=g(ve);dt<he;++dt)ve[Ae[dt]].index=dt;return L(ve,Ae),ve}return ot.keys=function(st){return arguments.length?(c=typeof st=="function"?st:B(Gt.call(st)),ot):c},ot.value=function(st){return arguments.length?(I=typeof st=="function"?st:B(+st),ot):I},ot.order=function(st){return arguments.length?(g=st==null?we:typeof st=="function"?st:B(Gt.call(st)),ot):g},ot.offset=function(st){return arguments.length?(L=st??_e,ot):L},ot}function e(c,g){if((I=c.length)>0){for(var L,I,ot=0,st=c[0].length,$t;ot<st;++ot){for($t=L=0;L<I;++L)$t+=c[L][ot][1]||0;if($t)for(L=0;L<I;++L)c[L][ot][1]/=$t}_e(c,g)}}function t(c,g){if((Vt=c.length)>0)for(var L,I=0,ot,st,$t,dt,Vt,he=c[g[0]].length;I<he;++I)for($t=dt=0,L=0;L<Vt;++L)(st=(ot=c[g[L]][I])[1]-ot[0])>0?(ot[0]=$t,ot[1]=$t+=st):st<0?(ot[1]=dt,ot[0]=dt+=st):(ot[0]=0,ot[1]=st)}function n(c,g){if((ot=c.length)>0){for(var L=0,I=c[g[0]],ot,st=I.length;L<st;++L){for(var $t=0,dt=0;$t<ot;++$t)dt+=c[$t][L][1]||0;I[L][1]+=I[L][0]=-dt/2}_e(c,g)}}function i(c,g){if(!(!(($t=c.length)>0)||!((st=(ot=c[g[0]]).length)>0))){for(var L=0,I=1,ot,st,$t;I<st;++I){for(var dt=0,Vt=0,he=0;dt<$t;++dt){for(var ve=c[g[dt]],Ae=ve[I][1]||0,Ee=ve[I-1][1]||0,We=(Ae-Ee)/2,Ye=0;Ye<dt;++Ye){var Xe=c[g[Ye]],Te=Xe[I][1]||0,en=Xe[I-1][1]||0;We+=Te-en}Vt+=Ae,he+=We*Ae}ot[I-1][1]+=ot[I-1][0]=L,Vt&&(L-=he/Vt)}ot[I-1][1]+=ot[I-1][0]=L,_e(c,g)}}function r(c){var g=c.map(o);return we(c).sort(function(L,I){return g[L]-g[I]})}function o(c){for(var g=-1,L=0,I=c.length,ot,st=-1/0;++g<I;)(ot=+c[g][1])>st&&(st=ot,L=g);return L}function u(c){var g=c.map(d);return we(c).sort(function(L,I){return g[L]-g[I]})}function d(c){for(var g=0,L=-1,I=c.length,ot;++L<I;)(ot=+c[L][1])&&(g+=ot);return g}function O(c){return u(c).reverse()}function S(c){var g=c.length,L,I,ot=c.map(d),st=r(c),$t=0,dt=0,Vt=[],he=[];for(L=0;L<g;++L)I=st[L],$t<dt?($t+=ot[I],Vt.push(I)):(dt+=ot[I],he.push(I));return he.reverse().concat(Vt)}function D(c){return we(c).reverse()}a.arc=w,a.area=Q,a.areaRadial=vt,a.curveBasis=ke,a.curveBasisClosed=He,a.curveBasisOpen=nt,a.curveBundle=de,a.curveCardinal=m,a.curveCardinalClosed=M,a.curveCardinalOpen=z,a.curveCatmullRom=q,a.curveCatmullRomClosed=Ft,a.curveCatmullRomOpen=jt,a.curveLinear=N,a.curveLinearClosed=ce,a.curveMonotoneX=$n,a.curveMonotoneY=Sn,a.curveNatural=pn,a.curveStep=U,a.curveStepAfter=se,a.curveStepBefore=St,a.line=yt,a.lineRadial=ft,a.linkHorizontal=A,a.linkRadial=_,a.linkVertical=k,a.pie=V,a.pointRadial=Ct,a.radialArea=vt,a.radialLine=ft,a.stack=s,a.stackOffsetDiverging=t,a.stackOffsetExpand=e,a.stackOffsetNone=_e,a.stackOffsetSilhouette=n,a.stackOffsetWiggle=i,a.stackOrderAppearance=r,a.stackOrderAscending=u,a.stackOrderDescending=O,a.stackOrderInsideOut=S,a.stackOrderNone=we,a.stackOrderReverse=D,a.symbol=Zt,a.symbolCircle=it,a.symbolCross=ut,a.symbolDiamond=pe,a.symbolSquare=Ce,a.symbolStar=ee,a.symbolTriangle=ze,a.symbolWye=Ut,a.symbols=Jt,Object.defineProperty(a,"__esModule",{value:!0})})});var kr=hn(($r,po)=>{(function(a,v){typeof $r=="object"&&typeof po<"u"?v($r,ei(),oi(),pi(),ti(),gi()):typeof define=="function"&&define.amd?define(["exports","d3-selection","d3-dispatch","d3-drag","d3-interpolate","d3-transition"],v):v(a.d3=a.d3||{},a.d3,a.d3,a.d3,a.d3,a.d3)})($r,function(a,v,B,Y,kt,Et){"use strict";function Ot(pt){return function(){return pt}}function At(pt,W,X){this.target=pt,this.type=W,this.transform=X}function xt(pt,W,X){this.k=pt,this.x=W,this.y=X}xt.prototype={constructor:xt,scale:function(pt){return pt===1?this:new xt(this.k*pt,this.x,this.y)},translate:function(pt,W){return pt===0&W===0?this:new xt(this.k,this.x+this.k*pt,this.y+this.k*W)},apply:function(pt){return[pt[0]*this.k+this.x,pt[1]*this.k+this.y]},applyX:function(pt){return pt*this.k+this.x},applyY:function(pt){return pt*this.k+this.y},invert:function(pt){return[(pt[0]-this.x)/this.k,(pt[1]-this.y)/this.k]},invertX:function(pt){return(pt-this.x)/this.k},invertY:function(pt){return(pt-this.y)/this.k},rescaleX:function(pt){return pt.copy().domain(pt.range().map(this.invertX,this).map(pt.invert,pt))},rescaleY:function(pt){return pt.copy().domain(pt.range().map(this.invertY,this).map(pt.invert,pt))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var wt=new xt(1,0,0);rt.prototype=xt.prototype;function rt(pt){return pt.__zoom||wt}function Rt(){v.event.stopImmediatePropagation()}function zt(){v.event.preventDefault(),v.event.stopImmediatePropagation()}function et(){return!v.event.button}function Pt(){var pt=this,W,X;return pt instanceof SVGElement?(pt=pt.ownerSVGElement||pt,W=pt.width.baseVal.value,X=pt.height.baseVal.value):(W=pt.clientWidth,X=pt.clientHeight),[[0,0],[W,X]]}function j(){return this.__zoom||wt}
4function Mt(){return-v.event.deltaY*(v.event.deltaMode?120:1)/500}function ht(){return"ontouchstart"in this}function Nt(pt,W,X){var w=pt.invertX(W[0][0])-X[0][0],R=pt.invertX(W[1][0])-X[1][0],N=pt.invertY(W[0][1])-X[0][1],f=pt.invertY(W[1][1])-X[1][1];return pt.translate(R>w?(w+R)/2:Math.min(0,w)||Math.max(0,R),f>N?(N+f)/2:Math.min(0,N)||Math.max(0,f))}function Tt(){var pt=et,W=Pt,X=Nt,w=Mt,R=ht,N=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],ct=250,yt=kt.interpolateZoom,Q=[],J=B.dispatch("start","zoom","end"),gt,V,Lt=500,at=150,_t=0;function bt(_){_.property("__zoom",j).on("wheel.zoom",xe).on("mousedown.zoom",y).on("dblclick.zoom",$).filter(R).on("touchstart.zoom",x).on("touchmove.zoom",A).on("touchend.zoom touchcancel.zoom",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}bt.transform=function(_,it){var ut=_.selection?_.selection():_;ut.property("__zoom",j),_!==ut?Gt(_,it):ut.interrupt().each(function(){ue(this,arguments).start().zoom(null,typeof it=="function"?it.apply(this,arguments):it).end()})},bt.scaleBy=function(_,it){bt.scaleTo(_,function(){var ut=this.__zoom.k,Wt=typeof it=="function"?it.apply(this,arguments):it;return ut*Wt})},bt.scaleTo=function(_,it){bt.transform(_,function(){var ut=W.apply(this,arguments),Wt=this.__zoom,qt=Ct(ut),pe=Wt.invert(qt),le=typeof it=="function"?it.apply(this,arguments):it;return X(vt(ft(Wt,le),qt,pe),ut,f)})},bt.translateBy=function(_,it,ut){bt.transform(_,function(){return X(this.__zoom.translate(typeof it=="function"?it.apply(this,arguments):it,typeof ut=="function"?ut.apply(this,arguments):ut),W.apply(this,arguments),f)})},bt.translateTo=function(_,it,ut){bt.transform(_,function(){var Wt=W.apply(this,arguments),qt=this.__zoom,pe=Ct(Wt);return X(wt.translate(pe[0],pe[1]).scale(qt.k).translate(typeof it=="function"?-it.apply(this,arguments):-it,typeof ut=="function"?-ut.apply(this,arguments):-ut),Wt,f)})};function ft(_,it){return it=Math.max(N[0],Math.min(N[1],it)),it===_.k?_:new xt(it,_.x,_.y)}function vt(_,it,ut){var Wt=it[0]-ut[0]*_.k,qt=it[1]-ut[1]*_.k;return Wt===_.x&&qt===_.y?_:new xt(_.k,Wt,qt)}function Ct(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function Gt(_,it,ut){_.on("start.zoom",function(){ue(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){ue(this,arguments).end()}).tween("zoom",function(){var Wt=this,qt=arguments,pe=ue(Wt,qt),le=W.apply(Wt,qt),Qt=ut||Ct(le),Xt=Math.max(le[1][0]-le[0][0],le[1][1]-le[0][1]),be=Wt.__zoom,ee=typeof it=="function"?it.apply(Wt,qt):it,Ce=yt(be.invert(Qt).concat(Xt/be.k),ee.invert(Qt).concat(Xt/ee.k));return function(Fe){if(Fe===1)Fe=ee;else{var ze=Ce(Fe),l=Xt/ze[2];Fe=new xt(l,Qt[0]-ze[0]*l,Qt[1]-ze[1]*l)}pe.zoom(null,Fe)}})}function ue(_,it){for(var ut=0,Wt=Q.length,qt;ut<Wt;++ut)if((qt=Q[ut]).that===_)return qt;return new ie(_,it)}function ie(_,it){this.that=_,this.args=it,this.index=-1,this.active=0,this.extent=W.apply(_,it)}ie.prototype={start:function(){return++this.active===1&&(this.index=Q.push(this)-1,this.emit("start")),this},zoom:function(_,it){return this.mouse&&_!=="mouse"&&(this.mouse[1]=it.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=it.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=it.invert(this.touch1[0])),this.that.__zoom=it,this.emit("zoom"),this},end:function(){return--this.active===0&&(Q.splice(this.index,1),this.index=-1,this.emit("end")),this},emit:function(_){v.customEvent(new At(bt,_,this.that.__zoom),J.apply,J,[_,this.that,this.args])}};function xe(){if(!pt.apply(this,arguments))return;var _=ue(this,arguments),it=this.__zoom,ut=Math.max(N[0],Math.min(N[1],it.k*Math.pow(2,w.apply(this,arguments)))),Wt=v.mouse(this);if(_.wheel)(_.mouse[0][0]!==Wt[0]||_.mouse[0][1]!==Wt[1])&&(_.mouse[1]=it.invert(_.mouse[0]=Wt)),clearTimeout(_.wheel);else{if(it.k===ut)return;_.mouse=[Wt,it.invert(Wt)],Et.interrupt(this),_.start()}zt(),_.wheel=setTimeout(qt,at),_.zoom("mouse",X(vt(ft(it,ut),_.mouse[0],_.mouse[1]),_.extent,f));function qt(){_.wheel=null,_.end()}}function y(){if(V||!pt.apply(this,arguments))return;var _=ue(this,arguments),it=v.select(v.event.view).on("mousemove.zoom",pe,!0).on("mouseup.zoom",le,!0),ut=v.mouse(this),Wt=v.event.clientX,qt=v.event.clientY;Y.dragDisable(v.event.view),Rt(),_.mouse=[ut,this.__zoom.invert(ut)],Et.interrupt(this),_.start();function pe(){if(zt(),!_.moved){var Qt=v.event.clientX-Wt,Xt=v.event.clientY-qt;_.moved=Qt*Qt+Xt*Xt>_t}
4_.zoom("mouse",X(vt(_.that.__zoom,_.mouse[0]=v.mouse(_.that),_.mouse[1]),_.extent,f))}function le(){it.on("mousemove.zoom mouseup.zoom",null),Y.dragEnable(v.event.view,_.moved),zt(),_.end()}}function $(){if(pt.apply(this,arguments)){var _=this.__zoom,it=v.mouse(this),ut=_.invert(it),Wt=_.k*(v.event.shiftKey?.5:2),qt=X(vt(ft(_,Wt),it,ut),W.apply(this,arguments),f);zt(),ct>0?v.select(this).transition().duration(ct).call(Gt,qt,it):v.select(this).call(bt.transform,qt)}}function x(){if(pt.apply(this,arguments)){var _=ue(this,arguments),it=v.event.changedTouches,ut,Wt=it.length,qt,pe,le;for(Rt(),qt=0;qt<Wt;++qt)pe=it[qt],le=v.touch(this,it,pe.identifier),le=[le,this.__zoom.invert(le),pe.identifier],_.touch0?_.touch1||(_.touch1=le):(_.touch0=le,ut=!0);if(gt&&(gt=clearTimeout(gt),!_.touch1)){_.end(),le=v.select(this).on("dblclick.zoom"),le&&le.apply(this,arguments);return}ut&&(gt=setTimeout(function(){gt=null},Lt),Et.interrupt(this),_.start())}}function A(){var _=ue(this,arguments),it=v.event.changedTouches,ut=it.length,Wt,qt,pe,le;for(zt(),gt&&(gt=clearTimeout(gt)),Wt=0;Wt<ut;++Wt)qt=it[Wt],pe=v.touch(this,it,qt.identifier),_.touch0&&_.touch0[2]===qt.identifier?_.touch0[0]=pe:_.touch1&&_.touch1[2]===qt.identifier&&(_.touch1[0]=pe);if(qt=_.that.__zoom,_.touch1){var Qt=_.touch0[0],Xt=_.touch0[1],be=_.touch1[0],ee=_.touch1[1],Ce=(Ce=be[0]-Qt[0])*Ce+(Ce=be[1]-Qt[1])*Ce,Fe=(Fe=ee[0]-Xt[0])*Fe+(Fe=ee[1]-Xt[1])*Fe;qt=ft(qt,Math.sqrt(Ce/Fe)),pe=[(Qt[0]+be[0])/2,(Qt[1]+be[1])/2],le=[(Xt[0]+ee[0])/2,(Xt[1]+ee[1])/2]}else if(_.touch0)pe=_.touch0[0],le=_.touch0[1];else return;_.zoom("touch",X(vt(qt,pe,le),_.extent,f))}function k(){var _=ue(this,arguments),it=v.event.changedTouches,ut=it.length,Wt,qt;for(Rt(),V&&clearTimeout(V),V=setTimeout(function(){V=null},Lt),Wt=0;Wt<ut;++Wt)qt=it[Wt],_.touch0&&_.touch0[2]===qt.identifier?delete _.touch0:_.touch1&&_.touch1[2]===qt.identifier&&delete _.touch1;_.touch1&&!_.touch0&&(_.touch0=_.touch1,delete _.touch1),_.touch0?_.touch0[1]=this.__zoom.invert(_.touch0[0]):_.end()}return bt.wheelDelta=function(_){return arguments.length?(w=typeof _=="function"?_:Ot(+_),bt):w},bt.filter=function(_){return arguments.length?(pt=typeof _=="function"?_:Ot(!!_),bt):pt},bt.touchable=function(_){return arguments.length?(R=typeof _=="function"?_:Ot(!!_),bt):R},bt.extent=function(_){return arguments.length?(W=typeof _=="function"?_:Ot([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),bt):W},bt.scaleExtent=function(_){return arguments.length?(N[0]=+_[0],N[1]=+_[1],bt):[N[0],N[1]]},bt.translateExtent=function(_){return arguments.length?(f[0][0]=+_[0][0],f[1][0]=+_[1][0],f[0][1]=+_[0][1],f[1][1]=+_[1][1],bt):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},bt.constrain=function(_){return arguments.length?(X=_,bt):X},bt.duration=function(_){return arguments.length?(ct=+_,bt):ct},bt.interpolate=function(_){return arguments.length?(yt=_,bt):yt},bt.on=function(){var _=J.on.apply(J,arguments);return _===J?bt:_},bt.clickDistance=function(_){return arguments.length?(_t=(_=+_)*_,bt):Math.sqrt(_t)},bt}a.zoom=Tt,a.zoomTransform=rt,a.zoomIdentity=wt,Object.defineProperty(a,"__esModule",{value:!0})})});var _a=hn((zi,ya)=>{(function(v,B){if(typeof zi=="object"&&typeof ya=="object")ya.exports=B(Pi(),ei(),gi(),gr(),mr(),Tr(),Fi(),pi(),Lr(),ti(),ci(),kr(),Di());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"],B);else{var Y=typeof zi=="object"?B(Pi(),ei(),gi(),gr(),mr(),Tr(),Fi(),pi(),Lr(),ti(),ci(),kr(),Di()):B(v.d3,v.d3,v.d3,v.d3,v.d3,v.d3,v.d3,v.d3,v.d3,v.d3,v.d3,v.d3,v.d3);for(var kt in Y)(typeof zi=="object"?zi:v)[kt]=Y[kt]}})(window,function(a,v,B,Y,kt,Et,Ot,At,xt,wt,rt,Rt,zt){return function(et){var Pt={};function j(Mt){if(Pt[Mt])return Pt[Mt].exports;var ht=Pt[Mt]={i:Mt,l:!1,exports:{}};return et[Mt].call(ht.exports,ht,ht.exports,j),ht.l=!0,ht.exports}return j.m=et,j.c=Pt,j.d=function(Mt,ht,Nt){j.o(Mt,ht)||Object.defineProperty(Mt,ht,{enumerable:!0,get:Nt})},j.r=function(Mt){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(Mt,Symbol.toStringTag,{value:"Module"}
4),Object.defineProperty(Mt,"__esModule",{value:!0})},j.t=function(Mt,ht){if(ht&1&&(Mt=j(Mt)),ht&8||ht&4&&typeof Mt=="object"&&Mt&&Mt.__esModule)return Mt;var Nt=Object.create(null);if(j.r(Nt),Object.defineProperty(Nt,"default",{enumerable:!0,value:Mt}),ht&2&&typeof Mt!="string")for(var Tt in Mt)j.d(Nt,Tt,function(pt){return Mt[pt]}.bind(null,Tt));return Nt},j.n=function(Mt){var ht=Mt&&Mt.__esModule?function(){return Mt.default}:function(){return Mt};return j.d(ht,"a",ht),ht},j.o=function(Mt,ht){return Object.prototype.hasOwnProperty.call(Mt,ht)},j.p="",j(j.s=27)}([function(et,Pt){function j(Mt,ht){if(!(Mt instanceof ht))throw new TypeError("Cannot call a class as a function")}et.exports=j},function(et,Pt,j){var Mt=j(2),ht=j(3),Nt=j(4);function Tt(pt,W){return Mt(pt)||ht(pt,W)||Nt()}et.exports=Tt},function(et,Pt){function j(Mt){if(Array.isArray(Mt))return Mt}et.exports=j},function(et,Pt){function j(Mt,ht){var Nt=[],Tt=!0,pt=!1,W=void 0;try{for(var X=Mt[Symbol.iterator](),w;!(Tt=(w=X.next()).done)&&(Nt.push(w.value),!(ht&&Nt.length===ht));Tt=!0);}catch(R){pt=!0,W=R}finally{try{!Tt&&X.return!=null&&X.return()}finally{if(pt)throw W}}return Nt}et.exports=j},function(et,Pt){function j(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}et.exports=j},function(et,Pt){function j(ht,Nt){for(var Tt=0;Tt<Nt.length;Tt++){var pt=Nt[Tt];pt.enumerable=pt.enumerable||!1,pt.configurable=!0,"value"in pt&&(pt.writable=!0),Object.defineProperty(ht,pt.key,pt)}}function Mt(ht,Nt,Tt){return Nt&&j(ht.prototype,Nt),Tt&&j(ht,Tt),ht}et.exports=Mt},function(et,Pt){et.exports=a},function(et,Pt){et.exports=v},function(et,Pt){et.exports=B},function(et,Pt){et.exports=Y},function(et,Pt,j){var Mt=j(11),ht=j(12),Nt=j(13);function Tt(pt){return Mt(pt)||ht(pt)||Nt()}et.exports=Tt},function(et,Pt){function j(Mt){if(Array.isArray(Mt)){for(var ht=0,Nt=new Array(Mt.length);ht<Mt.length;ht++)Nt[ht]=Mt[ht];return Nt}}et.exports=j},function(et,Pt){function j(Mt){if(Symbol.iterator in Object(Mt)||Object.prototype.toString.call(Mt)==="[object Arguments]")return Array.from(Mt)}et.exports=j},function(et,Pt){function j(){throw new TypeError("Invalid attempt to spread non-iterable instance")}et.exports=j},function(et,Pt){function j(ht){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?j=function(Tt){return typeof Tt}:j=function(Tt){return Tt&&typeof Symbol=="function"&&Tt.constructor===Symbol&&Tt!==Symbol.prototype?"symbol":typeof Tt},j(ht)}function Mt(ht){return typeof Symbol=="function"&&j(Symbol.iterator)==="symbol"?et.exports=Mt=function(Tt){return j(Tt)}:et.exports=Mt=function(Tt){return Tt&&typeof Symbol=="function"&&Tt.constructor===Symbol&&Tt!==Symbol.prototype?"symbol":j(Tt)},Mt(ht)}et.exports=Mt},function(et,Pt){et.exports=kt},function(et,Pt){et.exports=Et},function(et,Pt,j){"use strict";(function(Mt){j.d(Pt,"b",function(){return ht}),j.d(Pt,"a",function(){return Tt});var ht=function(){var pt=function(W){return typeof W<"u"&&W};return pt(self)||pt(window)||pt(Mt)||pt(globalThis)||Function("return this")()}(),Nt=ht&&ht.document,Tt=ht.navigator&&ht.navigator.userAgent&&ht.navigator.userAgent.indexOf("Mobi")>-1||!1}).call(this,j(18))},function(et,Pt){var j;j=function(){return this}();try{j=j||new Function("return this")()}catch{typeof window=="object"&&(j=window)}et.exports=j},function(et,Pt){et.exports=Ot},function(et,Pt){et.exports=At},function(et,Pt){et.exports=xt},function(et,Pt){et.exports=wt},function(et,Pt){et.exports=rt},function(et,Pt){et.exports=Rt},function(et,Pt){et.exports=zt},function(et,Pt,j){},function(et,Pt,j){"use strict";j.r(Pt);var Mt=j(0),ht=j.n(Mt),Nt=j(1),Tt=j.n(Nt),pt=j(5),W=j.n(pt),X=j(6),w=j(7),R=j(8),N=j(9),f={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",buttonZoomReset:"bb-zoom-reset",chart:"bb-chart",chartArc:"bb-chart-arc",chartArcs:"bb-chart-arcs",chartArcsBackgroun
4d:"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=j(10),yt=j.n(ct),Q=j(14),J=j.n(Q),gt=j(15),V=function(s){return s||s===0},Lt=function(s){return typeof s=="function"},at=function(s){return typeof s=="string"},_t=function(s){return typeof s=="number"},bt=function(s){return typeof s>"u"},ft=function(s){return typeof s<"u"},vt=function(s){return typeof s=="boolean"},Ct=function(s){return Math.ceil(s/10)*10},Gt=function(s){return Math.ceil(s)+.5},ue=function(s){return s[1]-s[0]},ie=function(s){return J()(s)==="object"},xe=function(s){return bt(s)||s===null||at(s)&&s.length===0||ie(s)&&!(s instanceof Date)&&Object.keys(s).length===0||_t(s)&&isNaN(s)},y=function(s){return!xe(s)},$=function(s){return s&&s.constructor===Array},x=function(s){return s&&!s.nodeType&&ie(s)&&!$(s)},A=function(s,e,t){return ft(s[e])?s[e]:t},k=function(s,e){var t=!1;return Object.keys(s).forEach(function(n){return s[n]===e&&(t=!0)}),t},_=function(s){for(var e=Lt(s),t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];return e&&s.call.apply(s,n),e},it=function(s){return at(s)?s.replace(/</g,"<").replace(/>/g,">"):s},ut=function(s,e){var t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[-1,1];if(s&&at(e))if(e.indexOf(` 5`)===-1)s.text(e);else{var n=[s.text(),e].map(function(r){return r.replace(/[\s\n]/g,"")});if(n[0]!==n[1]){var i=e.split(` 6`);s.html(""),i.forEach(function(r,o){s.append("tspan").attr("x",0).attr("dy","".concat(o===0?t[0]:t[1],"em")).text(r)})}}},Wt=function(s){var e=s.getBBox(),t=e.x,n=e.y,i=e.width,r=e.height;return[{x:t,y:n+r},{x:t,y:n},{x:t+i,y:n},{x:t+i,y:n+r}]},qt=function(s){var e=s.getBoundingClientRect(),t=e.width,n=e.height,i=Wt(s),r=i[0].x,o=Math.min(i[0].y,i[1].y);return{x:r,y:o,width:t,height:n}},pe=function(s){var e=null,t=w.event,n=s.context||s.main;return t&&t.constructor.name==="BrushEvent"?e=t.selection:n&&(e=n.select(".".concat(f.brush)).node())&&(e=Object(gt.brushSelection)(e)),e},le=function(){var s=!(arguments.length>0&&arguments[0]!==void 0)||arguments[0];return Math.random()+(s?"":0)},Qt=function(s){var e=pe(s);return!e||e[0]===e[1]},Xt=function(){var s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0;for(var t in e)s[t]=e[t];return s},be=function(s){return s.charAt(0).toUpperCase()+s.slice(1)},ee=function(s){return[].slice.call(s)},Ce=function(s){var e=[];
6return s.forEach(function(t){try{t.cssRules&&t.cssRules.length&&(e=e.concat(ee(t.cssRules)))}catch(n){console.error("Error while reading rules from ".concat(t.href,": ").concat(n.toString()))}}),e},Fe=function(s){return s.filter(function(e,t,n){return n.indexOf(e)===t})},ze=function(s){return s&&s.length?s.reduce(function(e,t){return e.concat(t)}):[]},l=function(s){function e(){return s.apply(this,arguments)}return e.toString=function(){return s.toString()},e}(function(s){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 s;var i=t.shift();return x(s)&&x(i)&&Object.keys(i).forEach(function(r){var o=i[r];x(o)?(!s[r]&&(s[r]={}),s[r]=l(s[r],o)):s[r]=$(o)?o.concat():o}),l.apply(void 0,[s].concat(t))}),C=function(s){var e,t=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1];return s[0]instanceof Date?e=t?function(n,i){return n-i}:function(n,i){return i-n}:t&&s.every(Number)?e=function(n,i){return n-i}:!t&&(e=function(n,i){return n>i&&-1||n<i&&1||n===i&&0}),s.concat().sort(e)},tt=function(s,e){var t=e.filter(function(n){return y(n)});return t.length?_t(t[0])?t=Math[s].apply(Math,yt()(t)):t[0]instanceof Date&&(t=C(t,s==="min")[0]):t=void 0,t},It=function(s,e){for(var t=[],n=s;n<e;n++)t.push(n);return t},Ut=function(){if(navigator&&localStorage){var s="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(s);else{var i=new Image;i.src=s,i.style.display="none",document.body.appendChild(i),document.body.removeChild(i)}}},Jt={mouse:function(){var s=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]:s();e.dispatchEvent(new MouseEvent(t,n))}}catch{return function(t,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:s(),r=document.createEvent("MouseEvent");r.initMouseEvent(n,i.bubbles,i.cancelable,window,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(r)}}}(),touch:function(e,t,n){var i=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:[i],targetTouches:[],changedTouches:[i]}))}},Zt=function(s,e){var t=s;for(var n in e)t=t.replace(new RegExp("{=".concat(n,"}"),"g"),e[n]);return t},oe=j(16),Oe=function(){function s(e,t){ht()(this,s);var n=Object(oe.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 W()(s,[{key:"axisX",value:function(t,n){var i=this;t.attr("transform",function(r){return"translate(".concat(Math.ceil(n(r)+i.config.tickOffset),",0)")})}},{key:"axisY",value:function(t,n){t.attr("transform",function(i){return"translate(0,".concat(Math.ceil(n(i)),")")})}},{key:"scaleExtent",value:function(t){var n=t[0],i=t[t.length-1];return n<i?[n,i]:[i,n]}},{key:"generateTicks",value:function(t){var n=[];if(t.ticks)return t.ticks.apply(t,yt()(this.config.tickArguments||[])).map(function(o){return at(o)&&_t(o)&&!isNaN(o)&&Math.round(o*10)/10||o});for(var i=t.domain(),r=Math.ceil(i[0]);r<i[1];r++)n.push(r);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,i=/\d+\.\d+0{5,}\d$/.test(t)?+(t+"").replace(/0+\d$/,""):t,r=n?n(i):i;return ft(r)?r:""}},{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(i){try{var r=i.node().getBBox(),o=r.width,u=r.height;o&&u&&(n.w=o,n.h=u),i.text("")}catch{}}
6),this.getSizeFor1Char=function(){return n},n}}]),s}(),De=function(){function s(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ht()(this,s);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 Oe(t,e),this.config=t,this.params=e}return W()(s,[{key:"create",value:function(t){var n=this,i=this.config,r=this.params,o=this.helper,u=o.scale,d=i.orient,O=this.splitTickText.bind(this),S=/^(left|right)$/.test(d),D=/^(top|bottom)$/.test(d),c=o[D?"axisX":"axisY"],g=c===o.axisX?"y":"x",L=/^(top|left)$/.test(d)?-1:1,I=r.tickTextRotate;this.config.range=u.rangeExtent?u.rangeExtent():o.scaleExtent((r.orgXScale||u).range());var ot=i,st=ot.innerTickSize,$t=ot.tickLength,dt=ot.range,Vt=r.name,he=Vt&&/^(x|y|y2)$/.test(Vt)?r.config["axis_".concat(Vt,"_tick_text_position")]:{x:0,y:0},ve=Vt==="subX"?"subchart_axis_x":"axis_".concat(Vt),Ae=r.config["".concat(ve,"_show")],Ee={tick:!!Ae&&r.config["".concat(ve,"_tick_show")],text:!!Ae&&r.config["".concat(ve,"_tick_text_show")]},We=null;t.each(function(){var Ye=Object(w.select)(this),Xe=this.__chart__||u,Te=o.copyScale();We=Ye,this.__chart__=Te,i.tickOffset=r.isCategory?Math.ceil((Te(1)-Te(0))/2):0;var en=Ye.selectAll(".domain").data([0]);if(en.enter().append("path").attr("class","domain").merge(o.transitionise(en)).attr("d",function(){var Pe=i.outerTickSize*L;return D?"M".concat(dt[0],",").concat(Pe,"V0H").concat(dt[1],"V").concat(Pe):"M".concat(Pe,",").concat(dt[0],"H0V").concat(dt[1],"H").concat(Pe)}),Ee.tick||Ee.text){var Qe=i.tickValues||o.generateTicks(Te),Ze=Ye.selectAll(".tick").data(Qe,Te),un=Ze.enter().insert("g",".domain").attr("class","tick").style("opacity","1"),Cn=Ze.exit().remove();Ze=un.merge(Ze),Ee.tick&&un.append("line"),Ee.text&&un.append("text");var mn=Oe.getSizeFor1Char(Ze),tn=[],dn=Ze.select("text").selectAll("tspan").data(function(Pe,yn){var _n=r.tickMultiline?O(Pe,Te,Qe,S,mn.w):$(o.textFormatted(Pe))?o.textFormatted(Pe).concat():[o.textFormatted(Pe)];return tn[yn]=_n.length,_n.map(function(Pn){return{index:yn,splitted:Pn}})});dn.exit().remove(),dn=dn.enter().append("tspan").merge(dn).text(function(Pe){return Pe.splitted}),dn.attr("x",D?0:$t*L).attr("dx",function(){var Pe=0;return d==="bottom"&&I&&(Pe=8*Math.sin(Math.PI*(I/180))),Pe+(he.x||0)}()).attr("dy",function(Pe,yn){var _n=0;return d!=="top"&&(_n=mn.h,yn===0&&(_n=S?-((tn[Pe.index]-1)*(mn.h/2)-3):he.y===0?".71em":0)),_t(_n)&&he.y?_n+he.y:_n||".71em"});var Je=Ze.select("line"),cn=Ze.select("text");if(un.select("line").attr("".concat(g,"2"),st*L),un.select("text").attr("".concat(g),$t*L),n.setTickLineTextPosition(Je,cn),r.tickTitle&&cn.append&&cn.append("title").each(function(Pe){Object(w.select)(this).text(r.tickTitle[Pe])}),Te.bandwidth){var Se=Te,Me=Se.bandwidth()/2;Xe=function(Pe){return Se(Pe)+Me},Te=Xe}else Xe.bandwidth?Xe=Te:c.call(o,Cn,Te);c.call(o,un,Xe),c.call(o,o.transitionise(Ze).style("opacity","1"),Te)}}),this.g=We}},{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,i=this.config,r=i.innerTickSize,o=i.range,u=n(t)+(i.tickCentered?0:i.tickOffset);return o[0]<u&&u<o[1]?r:0}},{key:"setTickLineTextPosition",value:function(t,n){var i=this.getTickXY(),r=this.config,o=r.innerTickSize,u=r.orient,d=r.tickLength,O=r.tickOffset,S=this.params.tickTextRotate;u==="bottom"?(t.attr("x1",i.x).attr("x2",i.x).attr("y2",this.getTickSize.bind(this)),n.attr("x",0).attr("y",function(c){return c?11.5-2.5*(c/15)*(c>0?1:-1):d}(S)).style("text-anchor",function(c){return c?c>0?"start":"end":"middle"}(S)).attr("transform",function(c){return c?"rotate(".concat(c,")"):null}(S))):u==="top"?(t.attr("x2",0).attr("y2",-o),n.attr("x",0).attr("y",-d*2).style("text-anchor","middle")):u==="left"?
6(t.attr("x2",-o).attr("y1",i.y).attr("y2",i.y),n.attr("x",-d).attr("y",O).style("text-anchor","end")):u==="right"&&(t.attr("x2",o).attr("y2",0),n.attr("x",d).attr("y",0).style("text-anchor","start"))}},{key:"splitTickText",value:function(t,n,i,r,o){function u(c,g){for(var L,I,ot,st=1;st<g.length;st++)if(g.charAt(st)===" "&&(I=st),L=g.substr(0,st+1),ot=o*L.length,D<ot)return u(c.concat(g.substr(0,I||st)),g.slice(I?I+1:st));return c.concat(g)}var d=this.params,O=this.helper.textFormatted(t),S=at(O)&&O.indexOf(` 7`)>-1?O.split(` 8`):[];if(S.length)return S;if($(O))return O;var D=d.tickWidth;return(!D||D<=0)&&(D=r?95:d.isCategory?Math.ceil(n(i[1])-n(i[0]))-12:110),u(S,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 i=this.g.select("path.domain").node().getTotalLength()-this.config.outerTickSize*2;n=i/(t||this.g.selectAll("line").size())}return n===1/0?0:n}},{key:"ticks",value:function(){for(var t=this.config,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];return i.length?(t.tickArguments=ee(i),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,i=this.config;if(Lt(t))i.tickValues=function(){return t(n.helper.scale.domain())};else{if(!arguments.length)return i.tickValues;i.tickValues=t}return this}},{key:"setTransition",value:function(t){return this.config.transition=t,this}}]),s}(),ke=function(s,e){var t=s.config.axis_rotated;return e?t:!t},Ie=function(s){return"".concat(f.axis," ").concat(f["axis".concat(be(s))])},He=function(){function s(e){ht()(this,s),this.owner=e,this.setOrient()}return W()(s,[{key:"init",value:function(){var t=this,n=this.owner,i=n.config,r=i.axis_rotated,o=n.main,u=["x","y"];i.axis_y2_show&&u.push("y2"),n.axesList={},u.forEach(function(d){var O=Ie(d),S=f["axis".concat(be(d),"Label")];n.axes[d]=o.append("g").attr("class",O).attr("clip-path",function(){var D=null;return d==="x"?D=n.clipPathForXAxis:d==="y"&&i.axis_y_inner&&(D=n.clipPathForYAxis),D}).attr("transform",n.getTranslate(d)).style("visibility",i["axis_".concat(d,"_show")]?"visible":"hidden"),n.axes[d].append("text").attr("class",S).attr("transform",["rotate(-90)",null][d==="x"?+!r:+r]).style("text-anchor",t.textAnchorForXAxisLabel.bind(t)),t.generateAxes(d)})}},{key:"setOrient",value:function(){var t=this.owner,n=t.config,i=n.axis_rotated,r=n.axis_y_inner,o=n.axis_y2_inner;t.xOrient=i?"left":"bottom",t.yOrient=i?r?"top":"bottom":r?"right":"left",t.y2Orient=i?o?"bottom":"top":o?"left":"right",t.subXOrient=i?"left":"bottom"}},{key:"generateAxes",value:function(t){var n,i=this.owner,r=i.config,o=[],u=r["axis_".concat(t,"_axes")],d=r.axis_rotated;t==="x"?n=d?N.axisLeft:N.axisBottom:t==="y"?n=d?N.axisBottom:N.axisLeft:t==="y2"&&(n=d?N.axisTop:N.axisRight),u.length&&u.forEach(function(O){var S=O.tick;o.push(n(i[t]).ticks(S.count).tickFormat(S.format||function(D){return D}).tickValues(S.values).tickSizeOuter(S.outer===!1?0:6))}),i.axesList[t]=o}},{key:"updateAxes",value:function(){var t=this.owner,n=t.config;Object.keys(t.axesList).forEach(function(i){var r=t[i].range();t.axesList[i].forEach(function(o,u){var d=o.scale().range();r.every(function(D,c){return D===d[c]})||o.scale().range(r);var O="".concat(Ie(i),"-").concat(u+1),S=t.main.select(".".concat(O.replace(/\s/,".")));S.empty()?S=t.main.append("g").attr("class",O).style("visibility",n["axis_".concat(i,"_show")]?"visible":"hidden").call(o):t.xAxis.helper.transitionise(S).call(o.scale(t[i])),S.attr("transform",t.getTranslate(i,u+1))})})}},{key:"getXAxis",value:function(t,n,i,r,o){var u=this.owner,d=u.config,O=u.isCategorized(),S=u["".concat(t,"Orient")],D=u.xAxisTickFormat,c=u.xAxisTickValues,g={isCategory:O,outerTick:i,noTransition:r,config:d,name:t,tickMultiline:d.axis_x_tick_multiline,tickWidth:d.axis_x_tick_width,tickTextRotate:o?0:d.axis_x_tick_rotate,tickTitle:O&&d.axis_x_tick_tooltip&&u.api.categories(),orgXScale:u.x},L=new De(g).scale(u.zoomScale||n).orient(S),I=c;return u.isTimeSeries()&&c&&!Lt(c)&&(I=c.map(function(ot){return u.parseDate(ot)}
8)),L.tickFormat(D).tickValues(I),O&&(L.tickCentered(d.axis_x_tick_centered),xe(d.axis_x_tick_culling)&&(d.axis_x_tick_culling=!1)),d.axis_x_tick_count&&L.ticks(d.axis_x_tick_count),L}},{key:"getYAxis",value:function(t,n,i,r,o){var u=this.owner,d=u.config,O=u["".concat(t,"Orient")],S=d["axis_".concat(t,"_tick_format")],D=u["".concat(t,"AxisTickValues")],c={outerTick:i,noTransition:r,config:d,name:t,tickTextRotate:o?0:d.axis_y_tick_rotate},g=new De(c).scale(n).orient(O).tickFormat(S||u.isStackNormalized()&&function(L){return"".concat(L,"%")});return u.isTimeSeriesY()?g.ticks(d.axis_y_tick_time_value):g.tickValues(D),g}},{key:"updateXAxisTickValues",value:function(t,n){var i,r=this.owner,o=r.config,u=o.axis_x_tick_fit,d=o.axis_x_tick_count;return(u||d&&u)&&(i=this.generateTickValues(r.mapTargetsToUniqueXs(t),d,r.isTimeSeries())),n?n.tickValues(i):r.xAxis&&(r.xAxis.tickValues(i),r.subXAxis.tickValues(i)),i}},{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,i=n.config,r=i.axis_x_tick_format,o=n.isTimeSeries(),u=n.isCategorized();return r?Lt(r)?t=r:o&&(t=function(d){return d?n.axisTimeFormat(r)(d):""}):t=o?n.defaultAxisTimeFormat:u?n.categoryName:function(d){return d<0?d.toFixed(0):d},Lt(t)?function(d){return t.apply(n,u?[d,n.categoryName(d)]:[d])}:t}},{key:"getTickValues",value:function(t){var n=this.owner,i=n.config["axis_".concat(t,"_tick_values")],r=n["".concat(t,"Axis")];return i||(r?r.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 i=this.owner,r=i.config,o=this.getLabelOptionByAxisId(t);at(o)?r["axis_".concat(t,"_label")]=n:o&&(o.text=n)}},{key:"getLabelPosition",value:function(t,n){var i=this.owner.config.axis_rotated,r=this.getLabelOptionByAxisId(t),o=ie(r)&&r.position?r.position:n[+!i],u=function(d){return!!~o.indexOf(d)};return{isInner:u("inner"),isOuter:u("outer"),isLeft:u("left"),isCenter:u("center"),isRight:u("right"),isTop:u("top"),isMiddle:u("middle"),isBottom:u("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],i=this.owner,r=t.isMiddle?-i.height/2:0;return ke(i,n)?r=t.isLeft?0:t.isCenter?i.width/2:i.width:t.isBottom&&(r=-i.height),r}},{key:"dxForAxisLabel",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.owner,r=t.isBottom?"0.5em":"0";return ke(i,n)?r=t.isLeft?"0.5em":t.isRight?"-0.5em":"0":t.isTop&&(r="-0.5em"),r}},{key:"textAnchorForAxisLabel",value:function(t){var n=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],i=this.owner,r=t.isMiddle?"middle":"end";return ke(i,n)?r=t.isLeft?"start":t.isCenter?"middle":"end":t.isBottom&&(r="start"),r}},{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,i=this.getXAxisLabelPosition().isInner,r=n.axis_x_height;return n.axis_rotated?i?"1.2em":-25-this.getMaxTickWidth("x"):i?"-0.5em":r?r-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 i=this.owner,r=i.config,o=i.currentMaxTickWidths[t],u=0;if(n||!r["axis_".concat(t,"_show")])return o.size;if(i.svg){var d=/^y2?$/.test(t),O=i.filterTargetsToShow(i.data.targets),S=d?"getY":"getX",D=i[t].copy().domain(i["".concat(S,"Domain")](O,t)),c=D.domain();if($(o.domain)&&o.domain.every(function(ot,st){return ot===c[st]}))return o.size;o.domain=c;var g=this["".concat(S,"Axis")](t,D,!1,!1,!0),L=r["axis_".concat(t,"_tick_count")];L&&g.tickValues(this.generateTickValues(c,L,d?i.isTimeSeriesY():i.isTimeSeries())),d||this.updateXAxisTickValues(O,g);var I=i.selectChart.append("svg").style("visibility","hidden").style("position","fixed").style("top","0px").style("left","0px");g.create(I),I.selectAll("text").each(function(){u=Math.max(u,this.getBoundingClientRect().width)}),I.remove()}return u>0&&(o.size=u),o.size}},{key:"updateLabels",value:function(t){var n=this,i=this.owner,r={X:i.main.select(".".concat(f.axisX," .").concat(f.axisXLabel)),Y:i.main.select(".".concat(f.axisY," .").concat(f.axisYLabel)),Y2:i.main.select(".".concat(f.axisY2," .").concat(f.axisY2Label))};Object.keys(r).filter(function(o){return!r[o].empty()}
8).forEach(function(o){var u=r[o],d="".concat(o,"AxisLabel");(t?u.transition():u).attr("x",n["xFor".concat(d)].bind(n)).attr("dx",n["dxFor".concat(d)].bind(n)).attr("dy",n["dyFor".concat(d)].bind(n)).text(n["textFor".concat(d)].bind(n))})}},{key:"getPadding",value:function(t,n,i,r){var o=_t(t)?t:t[n];return V(o)?t.unit==="ratio"?t[n]*r:this.convertPixelsToAxisPadding(o,r):i}},{key:"convertPixelsToAxisPadding",value:function(t,n){var i=this.owner,r=i.config.axis_rotated?i.width:i.height;return n*(t/r)}},{key:"generateTickValues",value:function(t,n,i){var r,o,u,d,O,S,D=t;if(n){var c=Lt(n)?n():n;if(c===1)D=[t[0]];else if(c===2)D=[t[0],t[t.length-1]];else if(c>2){for(u=c-2,r=t[0],o=t[t.length-1],d=(o-r)/(u+1),D=[r],O=0;O<u;O++)S=+r+d*(O+1),D.push(i?new Date(S):S);D.push(o)}}return i||(D=D.sort(function(g,L){return g-L})),D}},{key:"generateTransitions",value:function(t){var n=this.owner,i=n.axes,r=["x","y","y2","subx"].map(function(D){var c=i[D];return c&&t&&(c=c.transition().duration(t)),c}),o=Tt()(r,4),u=o[0],d=o[1],O=o[2],S=o[3];return{axisX:u,axisY:d,axisY2:O,axisSubX:S}}},{key:"redraw",value:function(t,n,i){var r=this.owner,o=n?"0":"1";["x","y","y2","subX"].forEach(function(u){var d=r["".concat(u,"Axis")];d&&(!i&&(d.config.withoutTransition=!r.config.transition_duration),r.axes[u.toLowerCase()].style("opacity",o),d.create(t["axis".concat(be(u))]))}),this.updateAxes()}}]),s}(),an=j(17),nt=function(){function s(e){ht()(this,s);var t=this;t.api=e,t.config=t.getOptions(),t.data={},t.cache={},t.axes={}}return W()(s,[{key:"beforeInit",value:function(){var t=this;t.config.stats&&Ut(),t.callPluginHook("$beforeInit"),_(t.config.onbeforeinit,t)}},{key:"afterInit",value:function(){var t=this;t.callPluginHook("$afterInit"),_(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,i=n.config,r=i.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=i.data_xLocaltime?X.timeParse:X.utcParse,n.axisTimeFormat=i.axis_x_localtime?X.timeFormat:X.utcFormat;var o=n.config.zoom_enabled&&n.config.zoom_enabled.type==="drag";n.defaultAxisTimeFormat=function(u){var d=o?t.zoomScale:t.zoomScale&&n.x.orgDomain().toString()!==t.zoomScale.domain().toString(),O=u.getMilliseconds()&&".%L"||u.getSeconds()&&".:%S"||u.getMinutes()&&"%I:%M"||u.getHours()&&"%I %p"||u.getDate()!==1&&"%b %d"||d&&u.getDate()===1&&"%b'%y"||u.getMonth()&&"%-m/%-d"||"%Y";return n.axisTimeFormat(O)(u)},n.hiddenTargetIds=[],n.hiddenLegendIds=[],n.focusedTargetIds=[],n.defocusedTargetIds=[],n.isLegendRight=i.legend_position==="right",n.isLegendInset=i.legend_position==="inset",n.isLegendTop=i.legend_inset_anchor==="top-left"||i.legend_inset_anchor==="top-right",n.isLegendLeft=i.legend_inset_anchor==="top-left"||i.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=r&&!i.axis_x_show?0:30,n.rotated_padding_top=5,n.withoutFadeIn={},n.inputType=n.convertInputType(),n.axes.subx=Object(w.selectAll)([])}},{key:"initWithData",value:function(t){var n=this,i=n.config;n.axis=new He(n),i.zoom_enabled&&n.initZoom();var r={element:i.bindto,classname:"bb"};if(x(i.bindto)&&(r.element=i.bindto.element||"#chart",r.classname=i.bindto.classname||r.classname),n.selectChart=Lt(r.element.node)?i.bindto.element:Object(w.select)(r.element||[]),n.selectChart.empty()&&(n.selectChart=Object(w.select)(document.body.appendChild(document.createElement("div")))),n.selectChart.html("").classed(r.classname,!0),n.data.xs={},n.data.targets=n.convertDataToTargets(t),i.data_filter&&(n.data.targets=n.data.targets.filter(i.data_filter)),i.data_hide&&n.addHiddenTargetIds(i.data_hide===!0?n.mapToIds(n.data.targets):i.data_hide),i.legend_hide&&n.addHiddenLegendIds(i.legend_hide===!0?n.mapToIds(n.data.targets):i.legend_hide),n.hasType("gauge")&&(i.legend_show=!1),n.updateSizes(),n.updateScales(!0),n.x&&(n.x.domain(C(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"),i.interaction_enabled&&n.inputType){var o=n.inputType==="touch";n.svg.on(o?"touchstart":"mouseenter",function(){return _(i.onover,n)}
8).on(o?"touchend":"mouseleave",function(){return _(i.onout,n)})}i.svg_classname&&n.svg.attr("class",i.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),Lt(i.color_tiles)&&n.patterns&&n.patterns.forEach(function(O){return n.defs.append(function(){return O.node})}),n.updateSvgSize();var u=n.svg.append("g").attr("transform",n.getTranslate("main"));if(n.main=u,i.subchart_show&&n.initSubchart(),n.initTooltip&&n.initTooltip(),n.initLegend&&n.initLegend(),n.initTitle&&n.initTitle(),i.data_empty_label_text&&u.append("text").attr("class","".concat(f.text," ").concat(f.empty)).attr("text-anchor","middle").attr("dominant-baseline","middle"),n.initRegion(),i.clipPath||n.axis.init(),u.append("g").attr("class",f.chart).attr("clip-path",n.clipPath),n.callPluginHook("$init"),n.initEventRect(),n.initChartElements(),n.initGrid(),u.insert("rect",i.zoom_privileged?null:"g.".concat(f.regions)).attr("class",f.zoomRect).attr("width",n.width).attr("height",n.height).style("opacity","0").on("dblclick.zoom",null),i.clipPath&&n.axis.init(),n.updateTargets(n.data.targets),n.updateDimension(),i.oninit.call(n),n.redraw({withTransition:!1,withTransform:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withTransitionForAxis:!1,initializing:!0}),i.data_onmin||i.data_onmax){var d=n.getMinMaxData();_(i.data_onmin,n,d.min),_(i.data_onmax,n,d.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)]()}),y(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 i=Object(w.select)(this),r=["x1","x2","y1","y2"].map(function(D){return Math.ceil(i.attr(D))}),o=Tt()(r,4),u=o[0],d=o[1],O=o[2],S=o[3];i.attr({x1:u,x2:d,y1:O,y2:S})})}},{key:"updateSizes",value:function(t){var n=this,i=n.config,r=i.axis_rotated,o=n.hasArcType(),u={width:n.legend?n.getLegendWidth():0,height:n.legend?n.getLegendHeight():0},d=n.isLegendRight||n.isLegendInset?0:u.height,O=r||o?0:n.getHorizontalAxisHeight("x"),S=i.subchart_axis_x_show&&i.subchart_axis_x_tick_text_show?O:30,D=i.subchart_show&&!o?i.subchart_size_height+S:0;t||n.setContainerSize(),n.margin=r?{top:n.getHorizontalAxisHeight("y2")+n.getCurrentPaddingTop(),right:o?0:n.getCurrentPaddingRight(),bottom:n.getHorizontalAxisHeight("y")+d+n.getCurrentPaddingBottom(),left:D+(o?0:n.getCurrentPaddingLeft())}:{top:4+n.getCurrentPaddingTop(),right:o?0:n.getCurrentPaddingRight(),bottom:O+D+d+n.getCurrentPaddingBottom(),left:o?0:n.getCurrentPaddingLeft()},n.margin2=r?{top:n.margin.top,right:NaN,bottom:20+d,left:n.rotated_padding_left}:{top:n.currentHeight-D-d,right:NaN,bottom:S+d,left:n.margin.left},n.margin3={top:0,right:NaN,bottom:0,left:0},n.updateSizeForLegend&&n.updateSizeForLegend(u),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=r?n.margin.left-n.rotated_padding_left-n.rotated_padding_right:n.width,n.height2=r?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?u.width+10:0),n.arcHeight=n.height-(n.isLegendRight?0:10),n.hasType("gauge")&&!i.gauge_fullCircle&&(n.arcHeight+=n.height-n.getGaugeLabelHeight()),n.updateRadius&&n.updateRadius(),n.isLegendRight&&o&&(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(f.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(i){var r=n[i];at(r)&&(r=n[r]),n[i]=A(t,"with".concat(i),r)}),n}},{key:"redraw",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,i=this,r=i.main,o=i.config,u=i.filterTargetsToShow(i.data.targets),d=t.initializing,O=t.flow,S=i.getWithOption(t),D=S.Transition?o.transition_duration:0,c=S.TransitionForExit?D:0,g=S.TransitionForAxis?D:0,L=n||i.axis.generateTransitions(g);d&&o.tooltip_init_show||i.inputType!=="touch"||i.hideTooltip(),i.updateSizes(d),S.Legend&&o.legend_show?i.updateLegend(i.mapToIds(i.data.targets),t,L):S.Dimension&&i.updateDimension(!0),i.redrawAxis(u,S,L,O,d),i.updateCircleY(),i.updateXgridFocus(),o.data_empty_label_text&&r.select("text.".concat(f.text,".").concat(f.empty)).attr("x",i.width/2).attr("y",i.height/2).text(o.data_empty_label_text).style("display",u.length?"none":null),i.updateGrid(D),i.updateRegion(D),i.updateBar(c),i.updateLine(c),i.updateArea(c),i.updateCircle(),i.hasDataLabel()&&i.updateText(c),i.redrawTitle&&i.redrawTitle(),i.arcs&&i.redrawArc(D,c,S.Transform),i.radars&&i.redrawRadar(D,c),i.mainText&&r.selectAll(".".concat(f.selectedCircles)).filter(i.isBarType.bind(i)).selectAll("circle").remove(),o.interaction_enabled&&!O&&S.EventRect&&(i.redrawEventRect(),i.bindZoomEvent()),i.generateRedrawList(u,O,D,S.Subchart),i.callPluginHook("$redraw",t,D)}},{key:"redrawAxis",value:function(t,n,i,r,o){var u,d,O,S=this,D=S.config,c=S.hasArcType(),g=!!S.zoomScale;if(!g&&S.isCategorized()&&t.length===0&&S.x.domain([0,S.axes.x.selectAll(".tick").size()]),S.x&&t.length?(!g&&S.updateXDomain(t,n.UpdateXDomain,n.UpdateOrgXDomain,n.TrimXDomain),!D.axis_x_tick_values&&(u=S.axis.updateXAxisTickValues(t))):S.xAxis&&(S.xAxis.tickValues([]),S.subXAxis.tickValues([])),D.zoom_rescale&&!r&&(O=S.x.orgDomain()),["y","y2"].forEach(function(I){var ot=S[I];if(ot){var st=D["axis_".concat(I,"_tick_values")],$t=D["axis_".concat(I,"_tick_count")];if(ot.domain(S.getYDomain(t,I,O)),!st&&$t){var dt=ot.domain();S["".concat(I,"Axis")].tickValues(S.axis.generateTickValues(dt,dt.every(function(Vt){return Vt===0})?1:$t,S.isTimeSeriesY()))}}}),S.axis.redraw(i,c,o),S.axis.updateLabels(n.Transition),(n.UpdateXDomain||n.UpdateXAxis)&&t.length)if(D.axis_x_tick_culling&&u){for(var L=1;L<u.length;L++)if(u.length/L<D.axis_x_tick_culling_max){d=L;break}S.svg.selectAll(".".concat(f.axisX," .tick text")).each(function(I){var ot=u.indexOf(I);ot>=0&&Object(w.select)(this).style("display",ot%d?"none":"block")})}else S.svg.selectAll(".".concat(f.axisX," .tick text")).style("display","block");n.Y&&(S.subY&&S.subY.domain(S.getYDomain(t,"y")),S.subY2&&S.subY2.domain(S.getYDomain(t,"y2")))}},{key:"generateRedrawList",value:function(t,n,i,r){var o=this,u=o.config,d=o.getDrawShape();u.subchart_show&&o.redrawSubchart(r,i,d);var O=n&&o.generateFlow({targets:t,flow:n,duration:n.duration,shape:d,xv:o.xv.bind(o)}),S=(i||O)&&o.isTabVisible(),D=o.getRedrawList(d,n,O,S),c=n||u.onrendered?function(){O&&O(),_(u.onrendered,o)}:null;if(c)if(S){var g=o.generateWait();Object(R.transition)().duration(i).each(function(){D.reduce(function(L,I){return L.concat(I)},[]).forEach(function(L){return g.add(L)})}).call(g,c)}else c();o.mapToIds(o.data.targets).forEach(function(L){o.withoutFadeIn[L]=!0})}},{key:"getDrawShape",value:function(){var t=this,n=t.config.axis_rotated,i=t.hasType("radar"),r={type:{},indices:{}};if(t.hasTypeOf("Line")||t.hasType("bubble")||t.hasType("scatter")){var o=t.getShapeIndices(t.isLineType);if(r.indices.line=o,r.type.line=t.generateDrawLine?t.generateDrawLine(o,!1):void 0,t.hasTypeOf("Area")){var u=t.getShapeIndices(t.isAreaType);r.indices.area=u,r.type.area=t.generateDrawArea?t.generateDrawArea(u,!1):void 0}}if(t.hasType("bar")){var d=t.getShapeIndices(t.isBarType);r.indices.bar=d,r.type.bar=t.generateDrawBar?t.generateDrawBar(d):void 0}return r.pos={xForText:t.generateXYForText(r.indices,!0),yForText:t.generateXYForText(r.indices,!1),cx:(i?t.radarCircleX:n?t.circleY:t.circleX).bind(t),cy:(i?t.radarCircleY:n?t.circleX:t.circleY).bind(t)},r}},{key:"getRedrawList",value:function(t,n,i,r){var o=this,u=o.config,d=o.hasArcType(),O=t.pos,S=O.cx,D=O.cy,c=O.xForText,g=O.yForText,L=[];if(!d){var I=t.type,ot=I.area,st=I.bar,$t=I.line;(u.grid_x_lines.length||u.grid_y_lines.length)&&L.push(o.redrawGri
8d(r)),u.regions.length&&L.push(o.redrawRegion(r)),o.hasTypeOf("Line")&&(L.push(o.redrawLine($t,r)),o.hasTypeOf("Area")&&L.push(o.redrawArea(ot,r))),o.hasType("bar")&&L.push(o.redrawBar(st,r)),y(u.data_labels)&&L.push(o.redrawText(c,g,n,r))}return(!d||o.hasType("radar"))&&L.push(o.redrawCircle(S,D,r,i)),L}},{key:"updateAndRedraw",value:function(){var t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=this,r=i.config;n.withTransition=A(n,"withTransition",!0),n.withTransform=A(n,"withTransform",!1),n.withLegend=A(n,"withLegend",!1),n.withUpdateXDomain=!0,n.withUpdateOrgXDomain=!0,n.withTransitionForExit=!1,n.withTransitionForTransform=A(n,"withTransitionForTransform",n.withTransition),n.withLegend&&r.legend_show||(t=i.axis.generateTransitions(n.withTransitionForAxis?r.transition_duration:0),i.updateScales(),i.updateSvgSize(),i.transformAll(n.withTransitionForTransform,t)),i.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||y(n.data_xs))}},{key:"isTimeSeriesY",value:function(){return this.config.axis_y_type==="timeseries"}},{key:"getTranslate",value:function(t){var n,i,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=this,u=o.config,d=u.axis_rotated,O=0;if(r&&/^(x|y2?)$/.test(t)&&(O=o.getAxisSize(t)*r),t==="main")n=Gt(o.margin.left),i=Gt(o.margin.top);else if(t==="context")n=Gt(o.margin2.left),i=Gt(o.margin2.top);else if(t==="legend")n=o.margin3.left,i=o.margin3.top;else if(t==="x")n=d?-O:0,i=d?0:o.height+O;else if(t==="y")n=d?0:-O,i=d?o.height+O:0;else if(t==="y2")n=d?0:o.width+O,i=d?1-O:0;else if(t==="subx")n=0,i=d?0:o.height2;else if(t==="arc")n=o.arcWidth/2,i=o.arcHeight/2;else if(t==="radar"){var S=(o.arcWidth-o.arcHeight)/2;n=Math.max(S,0)+4,i=S<0?Math.abs(S):Gt(o.margin.top)}return"translate(".concat(n,", ").concat(i,")")}},{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 V(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,i=n.getBaseValue(t);return n.isTimeSeries()?i=n.parseDate(i):n.isCategorized()&&at(i)&&(i=n.config.axis_x_categories.indexOf(i)),Math.ceil(n.x(i))}},{key:"yv",value:function(t){var n=this,i=t.axis&&t.axis==="y2"?n.y2:n.y;return Math.ceil(i(n.getBaseValue(t)))}},{key:"subxx",value:function(t){return t?this.subX(t.x):null}},{key:"transformMain",value:function(t,n){var i,r,o,u=this;n&&n.axisX?i=n.axisX:(i=u.main.select(".".concat(f.axisX)),t&&(i=i.transition())),n&&n.axisY?r=n.axisY:(r=u.main.select(".".concat(f.axisY)),t&&(r=r.transition())),n&&n.axisY2?o=n.axisY2:(o=u.main.select(".".concat(f.axisY2)),t&&(o=o.transition())),(t?u.main.transition():u.main).attr("transform",u.getTranslate("main")),i.attr("transform",u.getTranslate("x")),r.attr("transform",u.getTranslate("y")),o.attr("transform",u.getTranslate("y2")),u.main.select(".".concat(f.chartArcs)).attr("transform",u.getTranslate("arc"))}},{key:"transformAll",value:function(t,n){var i=this;i.transformMain(t,n),i.config.subchart_show&&i.transformContext(t,n),i.legend&&i.transformLegend(t)}},{key:"updateSvgSize",value:function(){var t=this,n=t.svg.select(".".concat(f.brush," .overlay")),i={width:0,height:0};n.size()&&(i.width=+n.attr("width"),i.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",i.height),t.svg.select(".".concat(f.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(i){return i()})}var n=[];return t.add=function(i){return n.push(i)},t.remove=function(i){return n.splice(n.indexOf(i),1)},t}},{key:"endall",value:function(t,n){var i=0;t.each(function(){return++i}).on("end",function(){for(var r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];--i||n.apply.apply(n,[this].concat(o))})}},{key:"generateWait",value:function(){var t=[],n=function(i,r){function o(){var d=0;t.forEach(function(O){if(O.empty())return void d++;try{O.transition()}catch{d++}}),u&&clearTimeout(u),d===t.length?r&&r():u=setTimeout(o,50)}var u;o()};return n.add=function(i){$(i)?t=t.concat(i):t.push(i)},n}},{key:"parseDate",value:function(t){var n,i=this;return t instanceof Date?n=t:at(t)?n=i.dataTimeFormat(i.config.data_xFormat)(t):_t(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,i=n.interaction_inputType_mouse&&!an.a&&"onmouseover"in window,r=!1;return n.interaction_inputType_touch&&(r="ontouchmove"in window||window.DocumentTouch&&document instanceof window.DocumentTouch),i&&"mouse"||r&&"touch"||null}},{key:"callPluginHook",value:function(t){for(var n=this,i=arguments.length,r=Array(i>1?i-1:0),o=1;o<i;o++)r[o-1]=arguments[o];this.config.plugins.forEach(function(u){t==="$beforeInit"&&(u.$$=n,n.api.plugins.push(u)),u[t].apply(u,r)})}}]),s}(),Bt=function s(e){ht()(this,s);var t=new nt(this);this.plugins=[],this.internal=t,t.loadConfig(e),t.beforeInit(e),t.init(),this.$=t.getChartElements(),t.afterInit(e),function n(i,r,o){Object.keys(i).forEac
8h(function(u){r[u]=i[u].bind(o),Object.keys(i[u]).length&&n(i[u],r[u],o)})}(s.prototype,this,this)},de=function s(){return ht()(this,s),{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"}};Xt(nt.prototype,{getOptions:function(){return new de},loadConfig:function(e){var t,n,i,r=this.config,o=function(){var u=n.shift();return u&&t&&ie(t)&&u in t?(t=t[u],o()):u?void 0:t};
8Object.keys(r).forEach(function(u){t=e,n=u.split("_"),i=o(),ft(i)&&(r[u]=i)})}}),Xt(nt.prototype,{getScale:function(e,t,n){return(n?Object(oe.scaleTime)():Object(oe.scaleLinear)()).range([e,t])},getX:function(e,t,n,i){var r=this,o=r.zoomScale||r.getScale(e,t,r.isTimeSeries());return r.getCustomizedScale(n?o.domain(n):o,i)},getY:function(e,t,n){var i=this.getScale(e,t,this.isTimeSeriesY());return n&&i.domain(n),i},getCustomizedScale:function(e,t){var n=this,i=t||function(){return n.xAxis.tickOffset()},r=function(u,d){var O=e(u)+i();return d?O:Math.ceil(O)};for(var o in e)r[o]=e[o];return r.orgDomain=function(){return e.domain()},r.orgScale=function(){return e},n.isCategorized()&&(r.domain=function(u){var d=u;return arguments.length?(e.domain(d),r):(d=this.orgDomain(),[d[0],d[1]+1])}),r},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,i=n.config,r=i.axis_rotated;n.xMin=r?1:0,n.xMax=r?n.height:n.width,n.yMin=r?0:n.height,n.yMax=r?n.width:1,n.subXMin=n.xMin,n.subXMax=n.xMax,n.subYMin=r?0:n.height2,n.subYMax=r?n.width2:1;var o=t&&n.x&&n.x.orgDomain(),u=t&&n.orgXDomain;n.x=n.getX(n.xMin,n.xMax,o,function(){return n.xAxis.tickOffset()}),n.subX=n.getX(n.xMin,n.xMax,u,function(d){return d%1?0:n.subXAxis.tickOffset()}),n.xAxisTickFormat=n.axis.getXAxisTickFormat(),n.xAxisTickValues=n.axis.getXAxisTickValues(),n.xAxis=n.axis.getXAxis("x",n.x,i.axis_x_tick_outer,e),n.subXAxis=n.axis.getXAxis("subX",n.subX,i.axis_x_tick_outer,e),n.y=n.getY(n.yMin,n.yMax,n.y?n.y.domain():i.axis_y_default),n.subY=n.getY(n.subYMin,n.subYMax,n.subY?n.subY.domain():i.axis_y_default),n.yAxisTickValues=n.axis.getYAxisTickValues(),n.yAxis=n.axis.getYAxis("y",n.y,i.axis_y_tick_outer,e),i.axis_y2_show&&(n.y2=n.getY(n.yMin,n.yMax,n.y2?n.y2.domain():i.axis_y2_default),n.subY2=n.getY(n.subYMin,n.subYMax,n.subY2?n.subY2.domain():i.axis_y2_default),n.y2AxisTickValues=n.axis.getY2AxisTickValues(),n.y2Axis=n.axis.getYAxis("y2",n.y2,i.axis_y2_tick_outer,e)),n.updateArc&&n.updateArc()}}),Xt(nt.prototype,{getYDomainMinMax:function(e,t){var n=this,i=n.config,r=t==="min",o=i.data_groups,u=n.mapToIds(e),d=n.getValuesAsIdKeyed(e);return o.length>0&&function(){for(var O,S,D=n["has".concat(r?"Negative":"Positive","ValueInTargets")](e),c=function(L,I){if(I=I.filter(function(ve){return u.indexOf(ve)>=0}),I.length===0)return O=I,"continue";var ot=I[0],st=n.axis.getId(ot);D&&d[ot]&&(d[ot]=d[ot].map(function(ve){return(r?ve<0:ve>0)?ve:0}));for(var $t,dt,Vt=function(ve,Ae){if(!d[Ae])return"continue";var Ee=n.axis.getId(Ae);d[Ae].forEach(function(We,Ye){var Xe=+We,Te=r?Xe>0:Xe<0;Ee!==st||D&&Te||(d[ot][Ye]+=Xe)})},he=1;$t=I[he];he++)dt=Vt(he,$t);O=I},g=0;O=o[g];g++)S=c(g,O)}(),tt(t,Object.keys(d).map(function(O){return tt(t,d[O])}))},getYDomainMin:function(e){return this.getYDomainMinMax(e,"min")},getYDomainMax:function(e){return this.getYDomainMinMax(e,"max")},getYDomain:function(e,t,n){var i=this,r=i.config;if(i.isStackNormalized())return[0,100];var o=e.filter(function(Xe){return i.axis.getId(Xe.id)===t}),u=n?i.filterByXDomain(o,n):o,d=r["axis_".concat(t,"_min")],O=r["axis_".concat(t,"_max")],S=i.getYDomainMin(u),D=i.getYDomainMax(u),c=r["axis_".concat(t,"_center")],g=i.hasType("bar",u)&&r.bar_zerobased||i.hasType("area",u)&&r.area_zerobased,L=r["axis_".concat(t,"_inverted")],I=i.hasDataLabel()&&r.axis_rotated,ot=i.hasDataLabel()&&!r.axis_rotated;if(S=V(d)?d:V(O)?S<O?S:O-10:S,D=V(O)?O:V(d)?d<D?D:d+10:D,u.length===0)return i[t].domain();isNaN(S)&&(S=0),isNaN(D)&&(D=S),S===D&&(S<0?D=0:S=0);var st=S>=0&&D>=0,$t=S<=0&&D<=0;(V(d)&&st||V(O)&&$t)&&(g=!1),g&&(st&&(S=0),$t&&(D=0));var dt=Math.abs(D-S),Vt={top:dt*.1,bottom:dt*.1};if(ft(c)){var he=Math.max(Math.abs(S),Math.abs(D));D=c+he,S=c-he}if(I){var ve=ue(i.y.range()),Ae=i.getDataLabelLength(S,D,"width").map(function(Xe){return Xe/ve});["bottom","top"].forEach(function(Xe,Te){Vt[Xe]+=dt*(Ae[Te]/(1-Ae[0]-Ae[1]))})}else if(ot){var Ee=i.getDataLabelLength(S,D,"height");["bottom","top"].forEach(function(Xe,Te){Vt[Xe]+=i.axis.convertPixelsToAxisPadding(Ee[Te],dt)})}if(/^y2?$/.test(t)){var We=r["axis_".concat(t,"_padding")];y(We)&&["bottom","top"].forEach(function(Xe){Vt[Xe]=i.axis.getPadding(We,Xe,Vt[Xe],dt)})}g&&(st&&(Vt.bottom=S),$t&&(Vt.top=-D));var Ye=[S-Vt.bottom,D+Vt.top];return L?Ye.reverse():Ye},getXDomainMinMax:function(e,t){var n=this,i=n.config["axis_x_".concat(t)];return ft(i)?n.isTimeSeries()?n.parseDate(i):i:tt(t,e.map(function(r){return tt(t,r.values.map(function(o){return o.x}))}))},getXDomainMin:function(e){return this.getXDomainMinMax(e,"min")},getXDomainMax:function(e){return this.getXDomainMinMax(e,"max")},getXDomainPadding:function(e){var t,n,i=this,r=i.config,o=e[1]-e[0],u=r.axis_x_padding;i.isCategorized()?n=0:i.hasType("bar")?(t=i.getMaxDataCount(),n=t>1?o/(t-1)/2:.5):n=o*.01;var d=n,O=n;return x(u)&&y(u)?(d=V(u.left)?u.left:n,O=V(u.right)?u.right:n):_t(r.axis_x_padding)&&(
8d=u,O=u),{left:d,right:O}},getXDomain:function(e){var t=this,n=[t.getXDomainMin(e),t.getXDomainMax(e)],i=n[0],r=n[1],o=t.getXDomainPadding(n),u=0,d=0;return i-r!==0||t.isCategorized()||(t.isTimeSeries()?(i=new Date(i.getTime()*.5),r=new Date(r.getTime()*1.5)):(i=i===0?1:i*.5,r=r===0?-1:r*1.5)),(i||i===0)&&(u=t.isTimeSeries()?new Date(i.getTime()-o.left):i-o.left),(r||r===0)&&(d=t.isTimeSeries()?new Date(r.getTime()+o.right):r+o.right),[u,d]},updateXDomain:function(e,t,n,i,r){var o=this,u=o.config,d=u.zoom_enabled;if(n&&(o.x.domain(r||C(o.getXDomain(e))),o.orgXDomain=o.x.domain(),d&&o.zoom.updateScaleExtent(),o.subX.domain(o.x.domain()),o.brush&&o.brush.scale(o.subX)),t){var O=r||!o.brush||Qt(o)?o.orgXDomain:pe(o).map(o.subX.invert);o.x.domain(O),d&&o.zoom.updateScaleExtent()}return i&&o.x.domain(o.trimXDomain(o.x.orgDomain())),o.x.domain()},trimXDomain:function(e){var t=this.getZoomDomain(),n=Tt()(t,2),i=n[0],r=n[1];return e[0]<=i&&(e[1]=+e[1]+(i-e[0]),e[0]=i),r<=e[1]&&(e[0]=+e[0]-(e[1]-r),e[1]=r),e}}),Xt(nt.prototype,{isX:function(e){var t=this,n=t.config,i=n.data_x&&e===n.data_x,r=y(n.data_xs)&&k(n.data_xs,e);return i||r},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:y(n.data_xs)?n.data_xs[e]:null},getXValuesOfXKey:function(e,t){var n,i=this,r=t&&y(t)?i.mapToIds(t):[];return r.forEach(function(o){i.getXKey(o)===e&&(n=i.data.xs[o])}),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]&&V(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 y(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(i){return i.index===t});return n.length?n[0]:null},updateTargetX:function(e,t){var n=this;e.forEach(function(i){i.values.forEach(function(r,o){r.x=n.generateTargetX(t[o],i.id,o)}),n.data.xs[i.id]=t})},updateTargetXs:function(e,t){var n=this;e.forEach(function(i){t[i.id]&&n.updateTargetX([i],t[i.id])})},generateTargetX:function(e,t,n){var i=this,r=i.isCategorized()?n:e||n;return i.isTimeSeries()?r=e?i.parseDate(e):i.parseDate(i.getXValue(t,n)):i.isCustomX()&&!i.isCategorized()&&(r=V(e)?+e:i.getXValue(t,n)),r},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,i=this.getBaseValue.bind(this);return(e||this.data.targets.map(function(r){return r.values})).forEach(function(r,o){var u=r.map(i).filter(_t);t=Math.min.apply(Math,[o?t:1/0].concat(yt()(u))),n=Math.max.apply(Math,[o?n:-1/0].concat(yt()(u)))}),{min:t,max:n}},getMinMaxData:function(){var e=this,t="$minMaxData",n=e.getCache(t);if(!n){var i=e.data.targets.map(function(d){return d.values}
8),r=e.getMinMaxValue(i),o=[],u=[];i.forEach(function(d){var O=e.getFilteredDataByValue(d,r.min),S=e.getFilteredDataByValue(d,r.max);O.length&&(o=o.concat(O)),S.length&&(u=u.concat(S))}),e.addCache(t,n={min:o,max:u})}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(i,r){t[r]||(t[r]=0),t[r]+=_t(i.value)?i.value:0})})),t},getTotalDataSum:function(){var e=this,t="$totalDataSum",n=e.getCache(t);if(!n){var i=ze(e.data.targets.map(function(r){return r.values})).map(function(r){return r.value}).reduce(function(r,o){return r+o});e.addCache(t,n=i)}return n},getFilteredDataByValue:function(e,t){var n=this;return e.filter(function(i){return n.getBaseValue(i)===t})},getMaxDataCount:function(){return Math.max.apply(Math,yt()(this.data.targets.map(function(e){return e.values.length})))},getMaxDataCountTarget:function(e){var t,n=e.length,i=0;return n>1?e.forEach(function(r){r.values.length>i&&(t=r,i=r.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?$(e)?e.concat():[e]:t.mapToIds(t.data.targets)},hasTarget:function(e,t){for(var n=this.mapToIds(e),i,r=0;i=n[r];r++)if(i===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=Fe(ze(e.map(function(i){return i.values.map(function(r){return+r.x})}))),n=t.isTimeSeries()?n.map(function(i){return new Date(+i)}):n.map(function(i){return+i})),C(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={},i=t.isMultipleX(),r=i?t.mapTargetsToUniqueXs(e).map(function(o){return at(o)?o:+o}):null;return e.forEach(function(o){var u=[];o.values.forEach(function(d){var O=d.value;$(O)?u.push.apply(u,yt()(O)):x(O)&&"high"in O?u.push.apply(u,yt()(Object.values(O))):i?u[t.getIndexByX(d.x,r)]=O:u.push(O)}),n[o.id]=u}),n},checkValueInTargets:function(e,t){for(var n,i=Object.keys(e),r=0;r<i.length;r++){n=e[i[r]].values;for(var o=0;o<n.length;o++)if(t(n[o].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,i=yt()(e),r=t.isOrderAsc(),o=t.isOrderDesc();return r||o?i.sort(function(u,d){var O=function(c,g){return c+Math.abs(g.value)},S=u.values.reduce(O,0),D=d.values.reduce(O,0);return r?D-S:S-D}):Lt(n.data_order)&&i.sort(n.data_order),i},filterByX:function(e,t){return ze(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 V(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(i){return t[0]<=i.x&&i.x<=t[1]})}})},hasDataLabel:function(){var e=this.config.data_labels;return vt(e)&&e||ie(e)&&y(e)},getDataLabelLength:function(e,t,n){var i=this,r=[0,0];return i.selectChart.select("svg").selectAll(".dummy").data([e,t]).enter().append("text").text(function(o){return i.dataLabelFormat(o.id)(o)}).each(function(o,u){r[u]=this.getBoundingClientRect()[n]*1.3}).remove(),r},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,i=e[t].x,r=[];for(n=t-1;n>=0&&i===e[n].x;n--)r.push(e[n]);for(n=t;n<e.length&&i===e[n].x;n++)r.push(e[n]);return r},findClosestFromTargets:function(e,t){var n=this,i=e.map(function(r){return n.findClosest(r.values,t)});return n.findClosest(i,t)},findClosest:function(e,t){var n,i=this,r=i.config.point_sensitivity;return e.filter(function(o){return o&&i.isBarType(o.id)}
8).forEach(function(o){var u=i.main.select(".".concat(f.bars).concat(i.getTargetSelectorSuffix(o.id)," .").concat(f.bar,"-").concat(o.index)).node();!n&&i.isWithinBar(u)&&(n=o)}),e.filter(function(o){return o&&!i.isBarType(o.id)}).forEach(function(o){var u=i.dist(o,t);u<r&&(r=u,n=o)}),n},dist:function(e,t){var n=this,i=n.config.axis_rotated,r=i?1:0,o=i?0:1,u=n.circleY(e,e.index),d=(n.zoomScale||n.x)(e.x);return Math.sqrt(Math.pow(d-t[r],2)+Math.pow(u-t[o],2))},convertValuesToStep:function(e){var t=this,n=t.config,i=n.axis_rotated,r=n.line_step_type,o=t.isCategorized(),u=$(e)?e.concat():[e];if(!i&&!o)return e;var d=u[0].id,O=u[0].x-1,S=u[0].value;return o&&u.unshift({x:O,value:S,id:d}),r==="step-after"&&u.unshift({x:O-1,value:S,id:d}),O=u.length,S=u[O-1].value,o&&u.push({x:O,value:S,id:d}),r==="step-before"&&u.push({x:O+1,value:S,id:d}),u},convertValuesToRange:function(e){var t=$(e)?e.concat():[e],n=[];return t.forEach(function(i){var r=i.x,o=i.id;n.push({x:r,id:o,value:i.value[0]}),n.push({x:r,id:o,value:i.value[2]})}),n},updateDataAttributes:function(e,t){var n=this,i=n.config,r=i["data_".concat(e)];return bt(t)||(Object.keys(t).forEach(function(o){r[o]=t[o]}),n.redraw({withLegend:!0})),r},getAreaRangeData:function(e,t){var n=e.value;if($(n)){var i=["high","mid","low"].indexOf(t);return i===-1?null:n[i]}return n[t]},getRatio:function(e,t,n){var i=this,r=i.config,o=i.api,u=0;if(t&&o.data.shown.call(o).length){var d=o.data.values.bind(o);if(u=t.ratio||t.value,e==="arc")if(i.pie.padAngle()()){var O=i.getTotalDataSum();i.hiddenTargetIds.length&&(O-=d(i.hiddenTargetIds).reduce(function(c,g){return c+g})),u=t.value/O}else u=(t.endAngle-t.startAngle)/(Math.PI*(i.hasType("gauge")&&!r.gauge_fullCircle?1:2));else if(e==="index"){var S=this.getTotalPerIndex();if(i.hiddenTargetIds.length){var D=d(i.hiddenTargetIds,!1);D.length&&(D=D.reduce(function(c,g){return c.map(function(L,I){return(_t(L)?L:0)+g[I]})}),S=S.map(function(c,g){return c-D[g]}))}t.ratio=_t(t.value)&&S&&S[t.index]>0?t.value/S[t.index]:0,u=t.ratio}else e==="radar"&&(u=parseFloat(Math.max(t.value,0))/i.maxValue*r.radar_size_ratio)}return n&&u?u*100:u}});var E=j(19);Xt(nt.prototype,{convertData:function(e,t){var n,i=this;if(e.bindto?(n={},["url","mimeType","headers","keys","json","keys","rows","columns"].forEach(function(r){var o="data_".concat(r);o in e&&(n[r]=e[o])})):n=e,n.url&&t)i.convertUrlToData(n.url,n.mimeType,n.headers,n.keys,t);else if(n.json)n=i.convertJsonToData(n.json,n.keys);else if(n.rows)n=i.convertRowsToData(n.rows);else if(n.columns)n=i.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",i=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0,u=new XMLHttpRequest;
8i&&Object.keys(i).forEach(function(d){u.setRequestHeader(d,i[d])}),u.open("GET",e),u.onreadystatechange=function(){if(u.readyState===4)if(u.status===200){var d=u.responseText;d&&o.call(t,t["convert".concat(be(n),"ToData")](n==="json"?JSON.parse(d):d,r))}else throw new Error("".concat(e,": Something went wrong loading!"))},u.send()},_convertCsvTsvToData:function(e,t){var n,i=e.rows(t);return i.length===1?(n=[{}],i[0].forEach(function(r){n[0][r]=null})):n=e.parse(t),n},convertCsvToData:function(e){return this._convertCsvTsvToData({rows:E.csvParseRows,parse:E.csvParse},e)},convertTsvToData:function(e){return this._convertCsvTsvToData({rows:E.tsvParseRows,parse:E.tsvParse},e)},convertJsonToData:function(e,t){var n,i,r=this,o=this.config,u=[];if($(e)){var d=t||o.data_keys;d.x?(n=d.value.concat(d.x),o.data_x=d.x):n=d.value,u.push(n),e.forEach(function(O){var S=n.map(function(D){var c=r.findValueInJson(O,D);return bt(c)&&(c=null),c});u.push(S)}),i=this.convertRowsToData(u)}else Object.keys(e).forEach(function(O){var S=e[O].concat();S.unshift(O),u.push(S)}),i=this.convertColumnsToData(u);return i},findValueInJson:function(e,t){if(e[t]!==void 0)return e[t];var n=t.replace(/\[(\w+)\]/g,".$1"),i=n.replace(/^\./,"").split("."),r=e;return i.some(function(o){return!(r=r&&o in r?r[o]:void 0)}),r},convertRowsToData:function(e){for(var t=e[0],n=[],i=1,r=e.length;i<r;i++){for(var o={},u=0,d=e[i].length;u<d;u++){if(bt(e[i][u]))throw new Error("Source data is missing a component at (".concat(i,", ").concat(u,")!"));o[t[u]]=e[i][u]}n.push(o)}return n},convertColumnsToData:function(e){for(var t=[],n=0,i=e.length;n<i;n++)for(var r=e[n][0],o=1,u=e[n].length;o<u;o++){if(bt(t[o-1])&&(t[o-1]={}),bt(e[n][o]))throw new Error("Source data is missing a component at (".concat(n,", ").concat(o,")!"));t[o-1][r]=e[n][o]}return t},convertDataToTargets:function(e,t){var n,i=this,r=this,o=r.config,u=Object.keys(e[0]||{}),d=u.length?u.filter(r.isNotX,r):[],O=u.length?u.filter(r.isX,r):[];d.forEach(function(D){var c=i.getXKey(D);i.isCustomX()||i.isTimeSeries()?O.indexOf(c)>=0?n=(t&&r.data.xs[D]||[]).concat(e.map(function(g){return g[c]}).filter(V).map(function(g,L){return r.generateTargetX(g,D,L)})):o.data_x?n=i.getOtherTargetXs():y(o.data_xs)&&(n=r.getXValuesOfXKey(c,r.data.targets)):n=e.map(function(g,L){return L}),n&&(i.data.xs[D]=n)}),d.forEach(function(D){if(!n)throw new Error('x is not defined for id = "'.concat(D,'".'))});var S=d.map(function(D,c){var g=o.data_idConverter(D),L=r.getXKey(D),I=r.isCustomX()&&r.isCategorized(),ot=I&&e.map(function(st){return st.x}).every(function(st){return o.axis_x_categories.indexOf(st)>-1});return{id:g,id_org:D,values:e.map(function(st,$t){var dt,Vt=st[L],he=st[D];return he=he===null||isNaN(he)?$(he)||x(he)&&he.high?he:null:+st[D],I&&c===0&&!bt(Vt)?(!ot&&c===0&&$t===0&&(o.axis_x_categories=[]),dt=o.axis_x_categories.indexOf(Vt),dt===-1&&(dt=o.axis_x_categories.length,o.axis_x_categories.push(Vt))):dt=r.generateTargetX(Vt,D,$t),(bt(st[D])||r.data.xs[D].length<=$t)&&(dt=void 0),{x:dt,value:he,id:g}}).filter(function(st){return ft(st.x)})}});return S.forEach(function(D){o.data_xSort&&(D.values=D.values.sort(function(c,g){var L=c.x||c.x===0?c.x:1/0,I=g.x||g.x===0?g.x:1/0;return L-I})),D.values.forEach(function(c,g){return c.index=g}),r.data.xs[D.id].sort(function(c,g){return c-g})}),r.hasNegativeValue=r.hasNegativeValueInTargets(S),r.hasPositiveValue=r.hasPositiveValueInTargets(S),o.data_type&&r.setTargetType(r.mapToIds(S).filter(function(D){return!(D in o.data_types)}),o.data_type),S.forEach(function(D){return r.addCache(D.id_org,D,!0)}),S}}),Xt(nt.prototype,{load:function(e,t){var n=this,i=e;i&&(t.filter&&(i=i.filter(t.filter)),(t.type||t.types)&&i.forEach(function(r){var o=t.types&&t.types[r.id]||t.type;n.setTargetType(r.id,o)}),n.data.targets.forEach(function(r){for(var o=0;o<i.length;o++)if(r.id===i[o].id){r.values=i[o].values,i.splice(o,1);break}}),n.data.targets=n.data.targets.concat(i)),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(i){return t.load(t.convertDataToTargets(i),e)});t.load(n?t.convertDataToTargets(n):null,e)}},unload:function(e,t){var n=this,i=t,r=e;return n.resetCache(),i||(i=function(){}),r=r.filter(function(o){return n.hasTarget(n.data.targets,o)}),r&&r.length!==0?(n.svg.selectAll(r.map(function(o){return n.selectorTarget(o)})).transition().style("opacity","0").remove().call(n.endall,i),void r.forEach(function(o){n.withoutFadeIn[o]=!1,n.legend&&n.legend.selectAll(".".concat(f.legendItem).concat(n.getTargetSelectorSuffix(o))).remove(),n.data.targets=n.data.targets.filter(function(u){return u.id!==o})})):void i()}}),Xt(nt.prototype,{categoryName:function(e){var t=this.config;return e<t.axis_x_categories.length?t.axis_x_categories[e]:e}});
8var H=j(20);Xt(nt.prototype,{initEventRect:function(){var e=this;e.main.select(".".concat(f.chart)).append("g").attr("class",f.eventRects).style("fill-opacity","0")},redrawEventRect:function(){var e,t=this,n=t.config,i=t.isMultipleX(),r=n.zoom_enabled,o=t.main.select(".".concat(f.eventRects)).style("cursor",r&&r.type!=="drag"?n.axis_rotated?"ns-resize":"ew-resize":null).classed(f.eventRectsMultiple,i).classed(f.eventRectsSingle,!i);if(o.selectAll(".".concat(f.eventRect)).remove(),t.eventRect=o.selectAll(".".concat(f.eventRect)),i)e=t.eventRect.data([0]),e=t.generateEventRectsForMultipleXs(e.enter()).merge(e);else{var u=t.getMaxDataCountTarget(t.data.targets);o.datum(u?u.values:[]),t.eventRect=o.selectAll(".".concat(f.eventRect)),e=t.eventRect.data(function(d){return d}),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(i)},bindTouchOnEventRect:function(e){var t,n=this,i=n.config,r=function(){var c=w.event.changedTouches[0];return Object(w.select)(document.elementFromPoint(c.clientX,c.clientY))},o=function(c){var g=c&&c.attr("class")&&c.attr("class").replace(new RegExp("(".concat(f.eventRect,"-?|s)"),"g"),"")*1;return(isNaN(g)||g===null)&&(g=-1),g},u=function(c){if(e)n.selectRectForMultipleXs(c);else{var g=r(),L=o(g);n.callOverOutForTouch(L),L===-1?n.unselectRect():n.selectRectForSingle(c,g,L)}},d=i.interaction_inputType_touch.preventDefault,O=vt(d)&&d||!1,S=!isNaN(d)&&d||null,D=function(c){var g=c.type,L=c.changedTouches[0],I=L["client".concat(i.axis_rotated?"Y":"X")];g==="touchstart"?O?c.preventDefault():S!==null&&(t=I):g==="touchmove"&&(O||t===!0||S!==null&&Math.abs(t-I)>=S)&&(t=!0,c.preventDefault())};n.svg.on("touchstart.eventRect touchmove.eventRect",function(){var c=r();if(!c.empty()&&c.classed(f.eventRect)){if(n.dragging||n.flowing||n.hasArcType())return;D(w.event),u(this)}else n.unselectRect(),n.callOverOutForTouch()}).on("touchend.eventRect",function(){var c=r();!c.empty()&&c.classed(f.eventRect)&&(n.hasArcType()||!n.toggleShape||n.cancelClick)&&n.cancelClick&&(n.cancelClick=!1)})},updateEventRect:function(e){var t,n,i,r,o=this,u=o.config,d=o.zoomScale||o.x,O=e||o.eventRect.data(),S=u.axis_rotated;if(o.isMultipleX())t=0,n=0,i=o.width,r=o.height;else{var D,c;if(o.isCategorized())D=o.getEventRectWidth(),c=function(L){return d(L.x)-D/2};else{o.updateXs();var g=function(L){var I=L.index;return{prev:o.getPrevX(I),next:o.getNextX(I)}};D=function(L){var I=g(L);return I.prev===null&&I.next===null?S?o.height:o.width:(I.prev===null&&(I.prev=d.domain()[0]),I.next===null&&(I.next=d.domain()[1]),Math.max(0,(d(I.next)-d(I.prev))/2))},c=function(L){var I=g(L),ot=o.data.xs[L.id][L.index];return I.prev===null&&I.next===null?0:(I.prev===null&&(I.prev=d.domain()[0]),(d(ot)+d(I.prev))/2)}}t=S?0:c,n=S?c:0,i=S?o.width:D,r=S?D:o.height}O.attr("class",o.classEvent.bind(o)).attr("x",t).attr("y",n).attr("width",i).attr("height",r)},selectRectForSingle:function(e,t,n){var i=this,r=i.config,o=r.data_selection_enabled,u=r.data_selection_grouped,d=r.tooltip_grouped,O=i.getAllValuesOnIndex(n);d&&(i.showTooltip(O,e),i.showXGridFocus(O),!o||u)||i.main.selectAll(".".concat(f.shape,"-").concat(n)).each(function(){Object(w.select)(this).classed(f.EXPANDED,!0),o&&t.style("cursor",u?"pointer":null),d||(i.hideXGridFocus(),i.hideTooltip(),!u&&i.expandCirclesBars(n))}).filter(function(S){return i.isWithinShape(this,S)}).call(function(S){var D=S.data();o&&(u||r.data_selection_isselectable(D))&&t.style("cursor","pointer"),d||(i.showTooltip(D,e),i.showXGridFocus(D),i.unexpandCircles(),S.each(function(c){return i.expandCirclesBars(n,c.id)}))})},expandCirclesBars:function(e,t,n){var i=this,r=i.config;r.point_focus_expand_enabled&&i.expandCircles(e,t,n),i.expandBars(e,t,n)},selectRectForMultipleXs:function(e){var t=this,n=t.config,i=t.filterTargetsToShow(t.data.targets);if(!(t.dragging||t.hasArcType(i))){var r=Object(w.mouse)(e),o=t.findClosestFromTargets(i,r);if(t.mouseover&&(!o||o.id!==t.mouseover.id)&&(n.data_onout.call(t.api,t.mouseover),t.mouseover=void 0),!o)return void t.unselectRect();var u=t.isBubbleType(o)||t.isScatterType(o)||!n.tooltip_grouped?[o]:t.filterByX(i,o.x),d=u.map(function(O){return t.addName(O)});t.showTooltip(d,e),t.expandCirclesBars(o.index,o.id,!0),t.showXGridFocus(d),(t.isBarType(o.id)||t.dist(o,r)<n.point_sensitivity)&&(t.svg.select(".".concat(f.eventRect)).style("cursor","pointer"),
8!t.mouseover&&(n.data_onover.call(t.api,o),t.mouseover=o))}},unselectRect:function(){var e=this;e.svg.select(".".concat(f.eventRect)).style("cursor",null),e.hideXGridFocus(),e.hideTooltip(),e._handleLinkedCharts(!1),e.unexpandCircles(),e.unexpandBars()},setOverOut:function(e,t){var n=this,i=n.config,r=x(t);if(r||t!==-1){var o=i[e?"data_onover":"data_onout"].bind(n.api);i.color_onover&&n.setOverColor(e,t,r),r?o(t):(e&&n.expandCirclesBars(t,null,!0),!n.isMultipleX()&&n.main.selectAll(".".concat(f.shape,"-").concat(t)).each(o))}},callOverOutForTouch:function(e){var t=this,n=t.callOverOutForTouch,i=n.last;(x(e)&&i?e.id!==i.id:e!==i)&&((i||_t(i))&&t.setOverOut(!1,i),(e||_t(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(H.drag)().on("drag",function(){e.drag(Object(w.mouse)(this))}).on("start",function(){e.dragstart(Object(w.mouse)(this))}).on("end",function(){e.dragend()}):function(){}},generateEventRectsForSingleX:function(e){var t=this,n=t.config,i=e.append("rect").attr("class",t.classEvent.bind(t)).style("cursor",n.data_selection_enabled&&n.data_selection_grouped?"pointer":null).on("click",function(r){t.clickHandlerForSingleX.bind(this)(r,t)}).call(t.getDraggableSelection());return t.inputType==="mouse"&&i.on("mouseover",function(r){t.dragging||t.flowing||t.hasArcType()||t.setOverOut(!0,r.index)}).on("mousemove",function(r){if(!(t.dragging||t.flowing||t.hasArcType())){var o=r.index,u=t.svg.select(".".concat(f.eventRect,"-").concat(o));t.isStepType(r)&&t.config.line_step_type==="step-after"&&Object(w.mouse)(this)[0]<t.x(t.getXValue(r.id,o))&&(o-=1),o===-1?t.unselectRect():t.selectRectForSingle(this,u,o)}}).on("mouseout",function(r){!t.config||t.hasArcType()||(t.unselectRect(),t.setOverOut(!1,r.index))}),i},clickHandlerForSingleX:function(e,t){var n=t,i=n.config;if(n.hasArcType()||!n.toggleShape||n.cancelClick)return void(n.cancelClick&&(n.cancelClick=!1));var r=e.index;n.main.selectAll(".".concat(f.shape,"-").concat(r)).each(function(o){(i.data_selection_grouped||n.isWithinShape(this,o))&&(n.toggleShape(this,o,r),i.data_onclick.call(n.api,o,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",f.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,i=t.filterTargetsToShow(t.data.targets);if(!t.hasArcType(i)){var r=Object(w.mouse)(this),o=t.findClosestFromTargets(i,r);!o||(t.isBarType(o.id)||t.dist(o,r)<n.point_sensitivity)&&t.main.selectAll(".".concat(f.shapes).concat(t.getTargetSelectorSuffix(o.id))).selectAll(".".concat(f.shape,"-").concat(o.index)).each(function(){(n.data_selection_grouped||t.isWithinShape(this,o))&&(t.toggleShape(this,o,o.index),n.data_onclick.call(t.api,o,this))})}},dispatchEvent:function(e,t,n){var i=this,r=i.isMultipleX(),o=".".concat(r?f.eventRect:"".concat(f.eventRect,"-").concat(t)),u=i.main.select(o).node(),d=u.getBoundingClientRect(),O=d.width,S=d.left,D=d.top,c=S+(n?n[0]:0)+(r?0:O/2),g=D+(n?n[1]:0);Jt[/^(mouse|click)/.test(e)?"mouse":"touch"](u,e,{screenX:c,screenY:g,clientX:c,clientY:g})}}),Xt(nt.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,i=n.axis_rotated;return i&&e==="x"||!i&&/y2?/.test(e)?t.getAxisWidthByAxisId(e,!0):t.getHorizontalAxisHeight(e)},getCurrentPaddingTop:function(){var e=this,t=e.config,n=t.axis_y2_axes.length,i=V(t.padding_top)?t.padding_top:0;return e.title&&e.title.node()&&(i+=e.getTitlePadding()),n&&t.axis_rotated&&(i+=e.getHorizontalAxisHeight("y2")*n),i},getCurrentPaddingBottom:function(){var e=this,t=e.config,n=t.axis_rotated?"y":"x",i=t["axis_".concat(n,"_axes")].length,r=V(t.padding_bottom)?t.padding_bottom:0;return r+(i?e.getHorizontalAxisHeight(n)*i:0)},getCurrentPaddingLeft:function(e){var t,n=this,i=n.config,r=i.axis_rotated,o=r?"x":"y",u=i["axis_".concat(o,"_axes")].length,d=n.getAxisWidthByAxisId(o,e);return t=V(i.padding_left)?i.padding_left:r?i.axis_x_show?Math.max(Ct(d),40):1:!i.axis_y_show||i.axis_y_inner?n.axis.getYAxisLabelPosition().isOuter?30:1:Ct(d),t+d*u}
8,getCurrentPaddingRight:function(){var e,t=this,n=t.config,i=t.isLegendRight?t.getLegendWidth()+20:0,r=n.axis_y2_axes.length,o=t.getAxisWidthByAxisId("y2");return e=V(n.padding_right)?n.padding_right+1:n.axis_rotated?10+i:!n.axis_y2_show||n.axis_y2_inner?2+i+(t.axis.getY2AxisLabelPosition().isOuter?20:0):Ct(o)+i,e+o*r},getParentRectValue:function(e){for(var t,n="offset".concat(be(e)),i=this.selectChart.node();!t&&i&&i.tagName!=="BODY";){try{t=i.getBoundingClientRect()[e]}catch{n in i&&(t=i[n])}i=i.parentNode}if(e==="width"){var r=document.body.offsetWidth;t>r&&(t=r)}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,i=n.axis_rotated||!n.axis_rotated&&!n.axis_y_inner,r=n.axis_rotated?f.axisX:f.axisY,o=t.main.select(".".concat(r)).node(),u=o&&i?o.getBoundingClientRect():{right:0},d=t.selectChart.node().getBoundingClientRect(),O=t.hasArcType(),S=u.right-d.left-(O?0:t.getCurrentPaddingLeft(e));return S>0?S:0},getAxisWidthByAxisId:function(e,t){var n=this,i=n.axis.getLabelPositionById(e);return n.axis.getMaxTickWidth(e,t)+(i.isInner?20:40)},getHorizontalAxisHeight:function(e){var t=this,n=t.config,i=n.axis_rotated,r=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"&&!i&&n.axis_x_tick_rotate||e==="y"&&i&&n.axis_y_tick_rotate)&&(r=30+t.axis.getMaxTickWidth(e)*Math.cos(Math.PI*(90-n["axis_".concat(e,"_tick_rotate")])/180)),r+(t.axis.getLabelPositionById(e).isInner?0:10)+(e!=="y2"||i?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 m=j(21);Xt(nt.prototype,{getShapeIndices:function(e){var t=this,n=t.config,i={},r=0;return t.filterTargetsToShow(t.data.targets.filter(e,t)).forEach(function(o){for(var u,d=0;u=n.data_groups[d];d++)if(!(u.indexOf(o.id)<0)){for(var O,S=0;O=u[S];S++)if(O in i){i[o.id]=i[O];break}}bt(i[o.id])&&(i[o.id]=r++)}),i.__max__=r-1,i},getShapeX:function(e,t,n,i){var r=this,o=i?r.subX:r.zoomScale||r.x,u=r.config.bar_padding,d=function(S,D){return S+D},O=ie(e)&&e.total.length?e.total.reduce(d)/2:0;return function(S){var D=S.id in n?n[S.id]:0,c=0;if(y(S.x)){var g=o(S.x);c=O?g-(e[S.id]||e.width)+e.total.slice(0,D+1).reduce(d)-O:g-(_t(e)?e:e.width)*(t/2-D)}return e&&c&&t>1&&u&&(D&&(c+=u*D),t>2?c-=(t-1)*u/2:t===2&&(c-=u/2)),c}},getShapeY:function(e){var t=this,n=t.isStackNormalized();return function(i){return(e?t.getSubYScale(i.id):t.getYScale(i.id))(n?t.getRatio("index",i,!0):i.value)}},getShapeOffset:function(e,t,n){var i=this,r=i.orderTargets(i.filterTargetsToShow(i.data.targets.filter(e,i))),o=r.map(function(u){return u.id});return function(u,d){var O=n?i.getSubYScale(u.id):i.getYScale(u.id),S=O(0),D=S,c=d;return r.forEach(function(g){var L=i.isStepType(u)?i.convertValuesToStep(g.values):g.values,I=L.map(function(ot){return i.isStackNormalized()?i.getRatio("index",ot,!0):ot.value});g.id===u.id||t[g.id]!==t[u.id]||o.indexOf(g.id)<o.indexOf(u.id)&&((bt(L[c])||+L[c].x!=+u.x)&&(c=-1,L.forEach(function(ot,st){var $t=ot.x.constructor===Date?+ot.x:ot.x,dt=u.x.constructor===Date?+u.x:u.x;$t===dt&&(c=st)})),c in L&&L[c].value*u.value>=0&&(D+=O(I[c])-S))}),D}},isWithinShape:function(e,t){var n,i=this,r=Object(w.select)(e);return i.isTargetToShow(t.id)?i.hasValidPointType(e.nodeName)?n=i.isStepType(t)?i.isWithinStep(e,i.getYScale(t.id)(t.value)):i.isWithinCircle(e,i.isBubbleType(t)?i.pointSelectR(t)*1.5:0):e.nodeName==="path"&&(n=!r.classed(f.bar)||i.isWithinBar(e)):n=!1,n},getInterpolate:function(e){var t=this,n=t.getInterpolateType(e);return{basis:m.curveBasis,"basis-closed":m.curveBasisClosed,"basis-open":m.curveBasisOpen,bundle:m.curveBundle,cardinal:m.curveCardinal,"cardinal-closed":m.curveCardinalClosed,"cardinal-open":m.curveCardinalOpen,"catmull-rom":m.curveCatmullRom,"catmull-rom-closed":m.curveCatmullRomClosed,"catmull-rom-open":m.curveCatmullRomOpen,"monotone-x":m.curveMonotoneX,"monotone-y":m.curveMonotoneY,natural
8:m.curveNatural,"linear-closed":m.curveLinearClosed,linear:m.curveLinear,step:m.curveStep,"step-after":m.curveStepAfter,"step-before":m.curveStepBefore}[n]},getInterpolateType:function(e){var t=this,n=t.config.spline_interpolation_type,i=t.isInterpolationType(n)?n:"cardinal";return t.isSplineType(e)?i:t.isStepType(e)?t.config.line_step_type:"linear"}});var p=j(22);Xt(nt.prototype,{initPie:function(){var e=this,t=e.config,n=t.pie_padding,i=e.hasType("pie")&&n?n*.01:t["".concat(t.data_type,"_padAngle")]?t["".concat(t.data_type,"_padAngle")]:0;e.pie=Object(m.pie)().padAngle(i).sortValues(e.isOrderAsc()||e.isOrderDesc()?function(r,o){return e.isOrderAsc()?r-o:o-r}:null).value(function(r){return r.values.reduce(function(o,u){return o+u.value},0)})},updateRadius:function(){var e=this,t=e.config,n=t.pie_innerRadius,i=t.pie_padding,r=t.gauge_width||t.donut_width;e.radiusExpanded=Math.min(e.arcWidth,e.arcHeight)/2,e.radius=e.radiusExpanded*.95,e.innerRadiusRatio=r?(e.radius-r)/e.radius:.6;var o=n||(i?i*(e.innerRadiusRatio+.1):0);e.innerRadius=e.hasType("donut")||e.hasType("gauge")?e.radius*e.innerRadiusRatio:o},getInnerRadius:function(e){var t=this,n=t.innerRadius;return!_t(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,i=t.pie,r=e,o=!1;if(!n)return null;if(r.data&&t.isGaugeType(r.data)){var u=t.getTotalDataSum();u>n.gauge_max&&(n.gauge_max=u);var d=Math.PI*(n.gauge_fullCircle?2:1),O=n.gauge_startingAngle,S=d*(u/(n.gauge_max-n.gauge_min));i=t.pie.startAngle(O).endAngle(S+O)}return i(t.filterTargetsToShow()).forEach(function(D){o||D.data.id!==r.data.id||(o=!0,r=D)}),isNaN(r.startAngle)&&(r.startAngle=0),isNaN(r.endAngle)&&(r.endAngle=r.startAngle),o?r:null},getSvgArc:function(){var e=this,t=e.getInnerRadius(),n=Object(m.arc)().outerRadius(e.radius).innerRadius(_t(t)?t:0),i=function(r,o){var u="M 0 0";if(r.value||r.data){_t(t)||(n=n.innerRadius(e.getInnerRadius(r)));var d=!o&&e.updateAngle(r);o?u=n(r):d&&(u=n(d))}return u};return i.centroid=n.centroid,i},getSvgArcExpanded:function(e){var t=this,n=Object(m.arc)().outerRadius(t.radiusExpanded*(e||1));return function(i){var r=t.updateAngle(i);return r?n.innerRadius(t.getInnerRadius(i))(r):"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,i=t.updateAngle(e),r="";if(i&&(!t.hasType("gauge")||t.hasMultiTargets())){var o=this.svgArc.centroid(i),u=isNaN(o[0])?0:o[0],d=isNaN(o[1])?0:o[1],O=Math.sqrt(u*u+d*d),S=t.hasType("donut")&&n.donut_label_ratio||t.hasType("pie")&&n.pie_label_ratio;S=S?Lt(S)?S(e,t.radius,O):S:t.radius&&(O?(36/t.radius>.375?1.175-36/t.radius:.8)*t.radius/O:0),r="translate(".concat(u*S,",").concat(d*S,")")}return r},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 i=Object(w.select)(this),r=t.updateAngle(n),o=r?r.value:null,u=t.getRatio("arc",r),d=n.data.id,O=t.hasType("gauge")||t.meetsArcLabelThreshold(u);if(O){var S=(t.getArcLabelFormat()||t.defaultArcValueFormat)(o,u,d).toString();ut(i,S)}})},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(f.legendItemFocused)).size()>0&&t.expandArc(e))},10);return}var i=t.mapToTargetIds(e);t.svg.selectAll(t.selectorTargets(i,".".concat(f.chartArc))).each(function(r){if(t.shouldExpand(r.data.id)&&r.value!==0){var o=t.expandDuration(r.data.id);Object(w.select)(this).selectAll("path").transition().duration(o).attr("d",t.svgArcExpanded).transition().duration(o*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(f.chartArc))).selectAll("path").transition().duration(function(i){return t.expandDuration(i.data.id)}).attr("d",t.svgArc),t.svg.selectAll("".concat(f.arc)).style("opacity","1")}},expandDuration:function(e){var t,n=this,i=n.config;return n.isDonutType(e)?t="donut":n.isGaugeType(e)?t="gauge":n.isPieType(e)&&(t="pie"),t?i["".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,i=t.hasType("donut")?
8n.donut_label_threshold:n.pie_label_threshold;return e>=i},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,i=t.hasType("gauge"),r=t.classChartArc.bind(t),o=t.classArcs.bind(t),u=t.classFocus.bind(t),d=n.select(".".concat(f.chartArcs)).selectAll(".".concat(f.chartArc)).data(t.pie(e)).attr("class",function(S){return r(S)+u(S.data)}),O=d.enter().append("g").attr("class",r);O.append("g").attr("class",o).merge(d),O.append("text").attr("dy",i&&!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(f.chart)).append("g").attr("class",f.chartArcs).attr("transform",e.getTranslate("arc")),e.setArcTitle()},setArcTitle:function(){var e=this,t=e.getArcTitle(),n=e.hasType("gauge");if(t){var i=e.arcs.append("text").attr("class",f[n?"chartArcsGaugeTitle":"chartArcsTitle"]).style("text-anchor","middle");n&&i.attr("dy","-0.3em").style("font-size","27px"),ut(i,t,n?void 0:[-1.3,1.3])}},redrawArc:function(e,t,n){var i=this,r=i.config,o=i.main,u=r.interaction_enabled,d=o.selectAll(".".concat(f.arcs)).selectAll(".".concat(f.arc)).data(i.arcData.bind(i));d.exit().transition().duration(t).style("opacity","0").remove(),d=d.enter().append("path").attr("class",i.classArc.bind(i)).style("fill",function(O){return i.color(O.data)}).style("cursor",function(O){return u&&(r.data_selection_isselectable(O)?"pointer":null)}).style("opacity","0").each(function(O){i.isGaugeType(O.data)&&(O.startAngle=r.gauge_startingAngle,O.endAngle=r.gauge_startingAngle),this._current=O}).merge(d),d.attr("transform",function(O){return!i.isGaugeType(O.data)&&n?"scale(0)":""}).style("opacity",function(O){return O===this._current?"0":"1"}).each(function(){i.transiting=!0}).transition().duration(e).attrTween("d",function(O){var S=i.updateAngle(O);if(!S)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 D=Object(p.interpolate)(this._current,S);return this._current=D(0),function(c){var g=D(c);return g.data=O.data,i.getArc(g,!0)}}).attr("transform",n?"scale(1)":"").style("fill",function(O){return i.levelColor?i.levelColor(O.data.values[0].value):i.color(O.data.id)}).style("opacity","1").call(i.endall,function(){i.transiting=!1}),u&&i.bindArcEvent(d),i.redrawArcText(e)},bindArcEvent:function(e){function t(O,S,D){i.expandArc(D),i.api.focus(D),i.toggleFocusLegend(D,!0),i.showTooltip([S],O)}function n(O){var S=O&&O.id||void 0;i.unexpandArc(S),i.api.revert(),i.revertLegend(),i.hideTooltip()}var i=this,r=i.inputType==="touch",o=i.inputType==="mouse";if(e.on("click",function(O,S){var D,c=i.updateAngle(O);c&&(D=i.convertToArcData(c),i.toggleShape&&i.toggleShape(this,D,S),i.config.data_onclick.call(i.api,D,this))}),o&&e.on("mouseover",function(O){if(!i.transiting){var S=i.updateAngle(O),D=S?i.convertToArcData(S):null,c=D&&D.id||void 0;t(this,D,c),i.setOverOut(!0,D)}}).on("mouseout",function(O){if(!i.transiting){var S=i.updateAngle(O),D=S?i.convertToArcData(S):null;n(),i.setOverOut(!1,D)}}).on("mousemove",function(O){var S=i.updateAngle(O),D=S?i.convertToArcData(S):null;i.showTooltip([D],this)}),r&&i.hasArcType()&&!i.radars){var u=function(){var O=w.event.changedTouches[0],S=Object(w.select)(document.elementFromPoint(O.clientX,O.clientY));return S},d=function(){if(!i.transiting){var O=u(),S=O.datum(),D=S&&S.data&&S.data.id?i.updateAngle(S):null,c=D?i.convertToArcData(D):null,g=c&&c.id||void 0;i.callOverOutForTouch(c),bt(g)?n():t(this,c,g)}};i.svg.on("touchstart",d).on("touchmove",d)}},redrawArcText:function(e){var t=this,n=t.config,i=t.main,r=t.hasType("gauge"),o=i.selectAll(".".concat(f.chartArc)).select("text").style("opacity","0").attr("class",function(O){return t.isGaugeType(O.data)?f.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(i.select(".".concat(f.chartArcsTitle)).style("opacity",t.hasType("donut")||r?"1":"0"),r){var u=n.gauge_fullCircle,d=(u?-4:-1)*n.gauge_startingAngle;u&&o.attr("dy","".concat(Math.round(t.radius/14))),t.arcs.select(".".concat(f.chartArcsBackgroun
8d)).attr("d",function(){var O={data:[{value:n.gauge_max}],startAngle:n.gauge_startingAngle,endAngle:d};return t.getArc(O,!0,!0)}),t.arcs.select(".".concat(f.chartArcsGaugeUnit)).attr("dy",".75em").text(n.gauge_label_show?n.gauge_units:""),n.gauge_label_show&&(t.arcs.select(".".concat(f.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)),!u&&t.arcs.select(".".concat(f.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,i=function(r){n.append("text").attr("class",r).style("text-anchor","middle").style("pointer-events","none")};e.hasType("gauge")&&(n.append("path").attr("class",f.chartArcsBackground),t.gauge_units&&i(f.chartArcsGaugeUnit),t.gauge_label_show&&(i(f.chartArcsGaugeMin),!t.gauge_fullCircle&&i(f.chartArcsGaugeMax)))},getGaugeLabelHeight:function(){return this.config.gauge_label_show?20:0}}),Xt(nt.prototype,{initBar:function(){var e=this;e.main.select(".".concat(f.chart)).append("g").attr("class",f.chartBars)},updateTargetsForBar:function(e){var t=this,n=t.config,i=t.classChartBar.bind(t),r=t.classBars.bind(t),o=t.classFocus.bind(t),u=t.main.select(".".concat(f.chartBars)).selectAll(".".concat(f.chartBar)).data(e).attr("class",function(O){return i(O)+o(O)}),d=u.enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none");d.append("g").attr("class",r).style("cursor",function(O){return n.data_selection_isselectable(O)?"pointer":null})},updateBar:function(e){var t=this,n=t.barData.bind(t),i=t.classBar.bind(t),r=t.initialOpacity.bind(t);t.mainBar=t.main.selectAll(".".concat(f.bars)).selectAll(".".concat(f.bar)).data(n),t.mainBar.exit().transition().duration(e).style("opacity","0").remove(),t.mainBar=t.mainBar.enter().append("path").attr("class",i).style("fill",t.color).merge(t.mainBar).style("opacity",r)},redrawBar:function(e,t){return[(t?this.mainBar.transition(le()):this.mainBar).attr("d",e).style("fill",this.color).style("opacity","1")]},getBarW:function(e,t){var n,i=this,r=i.config,o=e.tickInterval(i.getMaxDataCount()),u=r.data_groups.length,d=function(O){var S=O?r.bar_width[O]:r.bar_width,D=O?S.ratio:r.bar_width_ratio,c=O?S.max:r.bar_width_max,g=_t(S)?S:t?o*D/t:0;return c&&g>c?c:g};return n=d(),!u&&ie(r.bar_width)&&(n={width:n,total:[]},i.filterTargetsToShow(i.data.targets).forEach(function(O){r.bar_width[O.id]&&(n[O.id]=d(O.id),n.total.push(n[O.id]||n.width))})),n},getBars:function(e,t){var n=this,i=V(e)?"-".concat(e):"";return(t?n.main.selectAll(".".concat(f.bars).concat(n.getTargetSelectorSuffix(t))):n.main).selectAll(".".concat(f.bar).concat(i))},expandBars:function(e,t,n){var i=this;n&&i.unexpandBars(),i.getBars(e,t).classed(f.EXPANDED,!0)},unexpandBars:function(e){this.getBars(e).classed(f.EXPANDED,!1)},generateDrawBar:function(e,t){var n=this,i=n.config,r=n.generateGetBarPoints(e,t),o=i.axis_rotated,u=i.data_groups.length,d=i.bar_radius,O=i.bar_radius_ratio,S=_t(d)&&d>0?function(){return d}:_t(O)?function(D){return D*O}:null;return function(D,c){var g=r(D,c),L=+o,I=+!L,ot=D.value<0,st=["",""],$t=0;if(S&&!u){var dt=o?I:L,Vt=g[2][dt]-g[0][dt];$t=S(Vt);var he="a".concat($t,",").concat($t," ").concat(ot?"1 0 0":"0 0 1"," ");st[+!o]="".concat(he).concat($t,",").concat($t),st[+o]="".concat(he).concat([-$t,$t][o?"sort":"reverse"]()),ot&&st.reverse()}var ve=o?"H".concat(g[1][L]-$t," ").concat(st[0],"V").concat(g[2][I]-$t," ").concat(st[1],"H").concat(g[3][L]):"V".concat(g[1][I]+(ot?-$t:$t)," ").concat(st[0],"H").concat(g[2][L]-$t," ").concat(st[1],"V").concat(g[3][I]);return"M".concat(g[0][L],",").concat(g[0][I]).concat(ve,"z")}},generateGetBarPoints:function(e,t){var n=this,i=t?n.subXAxis:n.xAxis,r=e.__max__+1,o=n.getBarW(i,r),u=n.getShapeX(o,r,e,!!t),d=n.getShapeY(!!t),O=n.getShapeOffset(n.isBarType,e,!!t),S=t?n.getSubYScale:n.getYScale;return function(D,c){var g=S.call(n,D.id)(0),L=O(D,c)||g,I=_t(o)?o:o[D.id]||o.width,ot=u(D),st=d(D);return n.config.axis_rotated&&(D.value>0&&st<g||D.value<0&&g<st)&&(st=g),st-=g-L,[[ot,L],[ot,st],[ot+I,st],[ot+I,L]]}},isWithinBar:function(e){var t=Object(w.mouse)(e),n=Wt(e),i=Tt()(n,2),r=i[0],o=i[1],u=Math.min(r.x,o.x),d=Math.min(r.y,o.y),O=this.config.bar_sensitivity,S=e.getBBox(),D=S.width,c=S.height;return u-O<t[0]&&t[0]<u+D+O&&d-O<t[1]&&t[1]<d+c+O}}),Xt(nt.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=tt("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;Lt(n)?n=n(e):!_t(n)&&(n=t.getBaseLength()/(t.getMaxDataCount()*2)+12);var i=tt("max",t.getMinMaxData().max.map(function(u){return x(u.value)?u.value.mid:u.value})),r=n*n*Math.PI,o=e.value*(r/i);return Math.sqrt(o/Math.PI)}}),Xt(nt.prototype,{initLine:function(){var e=this;e.main.select(".".concat(f.chart)).append("g").attr("class",f.chartLines)},updateTargetsForLine:function(e){var t=this,n=t.config,i=t.classChartLine.bind(t),r=t.classLines.bind(t),o=t.classAreas.bind(t),u=t.classCircles.bind(t),d=t.classFocus.bind(t),O=t.main.select(".".concat(f.chartLines)).selectAll(".".concat(f.chartLine)).data(e).attr("class",function(D){return i(D)+d(D)}),S=O.enter().append("g").attr("class",i).style("opacity","0").style("pointer-events","none");S.append("g").attr("class",r),S.append("g").attr("class",o),n.point_show&&(n.data_selection_enabled&&S.append("g").attr("class",function(D){return t.generateClass(f.selectedCircles,D.id)}),S.append("g").attr("class",u).style("cursor",function(D){return n.data_selection_isselectable(D)?"pointer":null})),e.forEach(function(D){t.main.selectAll(".".concat(f.selectedCircles).concat(t.getTargetSelectorSuffix(D.id))).selectAll("".concat(f.selectedCircle)).each(function(c){c.value=D.values[c.index].value})})},updateLine:function(e){var t=this;t.mainLine=t.main.selectAll(".".concat(f.lines)).selectAll(".".concat(f.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(le()):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(i){var r=t.getInterpolate(e)(i);return r.orgPoint=r.point,r.pointRotated=function(o,u){this._point===1&&(this._point=2);var d=this._y*(1-this._t)+u*this._t;this._context.lineTo(this._x,d),this._context.lineTo(o,d),this._x=o,this._y=u},r.point=function(o,u){this._point===0?this.orgPoint(o,u):this.pointRotated(o,u)},r}:t.getInterpolate(e)},generateDrawLine:function(e,t){var n=this,i=n.config,r=i.line_connectNull,o=i.axis_rotated,u=n.generateGetLinePoints(e,t),d=t?n.getSubYScale:n.getYScale,O=function(g){return(t?n.subxx:n.xx).call(n,g)},S=function(g,L){return n.isGrouped(g.id)?u(g,L)[0][1]:d.call(n,g.id)(n.getBaseValue(g))},D=Object(m.line)();D=o?D.x(S).y(O):D.x(O).y(S),r||(D=D.defined(function(g){return n.getBaseValue(g)!==null}));var c=t?n.subX:n.x;return function(g){var L,I=d.call(n,g.id),ot=r?n.filterRemoveNull(g.values):g.values,st=0,$t=0;if(n.isLineType(g)){var dt=i.data_regions[g.id];dt?L=n.lineWithRegions(ot,c,I,dt):(n.isStepType(g)&&(ot=n.convertValuesToStep(ot)),L=D.curve(n.getCurve(g))(ot))}else ot[0]&&(st=c(ot[0].x),$t=I(ot[0].value)),L=o?"M ".concat($t," ").concat(st):"M ".concat(st," ").concat($t);return L||"M 0 0"}},generateGetLinePoints:function(e,t){var n=this,i=n.config,r=e.__max__+1,o=!!t,u=n.getShapeX(0,r,e,o),d=n.getShapeY(o),O=n.getShapeOffset(n.isLineType,e,o),S=o?n.getSubYScale:n.getYScale;return function(D,c){var g=S.call(n,D.id)(0),L=O(D,c)||g,I=u(D),ot=d(D);i.axis_rotated&&(D.value>0&&ot<g||D.value<0&&g<ot)&&(ot=g);var st=[I,ot-(g-L)];return[st,st,st,st]}},lineWithRegions:function(e,t,n,i){var r,o,u,d,O=this,S=O.config,D=S.axis_rotated,c=O.isTimeSeries(),g=O.isCategorized()?.5:0,L=[],I="2 2",ot=function(tn,dn){for(var Je,cn=0;Je=dn[cn];cn++)if(Je.start<tn&&tn<=Je.end)return Je.style;return!1};if(ft(i))for(var st=function(tn,dn){return bt(tn)?dn:c?O.parseDate(tn):tn},$t,dt=0;$t=i[dt];
8dt++){var Vt=st($t.start,e[0].x),he=st($t.end,e[e.length-1].x),ve=$t.style||{dasharray:I};L[dt]={start:Vt,end:he,style:ve}}for(var Ae=D?function(tn){return n(tn.value)}:function(tn){return t(tn.x)},Ee=D?function(tn){return t(tn.x)}:function(tn){return n(tn.value)},We=function(tn){return"M".concat(tn[0][0],",").concat(tn[0][1],"L").concat(tn[1][0],",").concat(tn[1][1])},Ye=c?function(tn,dn,Je,cn){var Se=tn.x.getTime(),Me=dn.x-tn.x,Pe=new Date(Se+Me*Je),yn=new Date(Se+Me*(Je+cn)),_n=D?[[n(o(Je)),t(Pe)],[n(o(Je+u)),t(yn)]]:[[t(Pe),n(o(Je))],[t(yn),n(o(Je+u))]];return We(_n)}:function(tn,dn,Je,cn){var Se=D?[[n(o(Je),!0),t(r(Je))],[n(o(Je+cn),!0),t(r(Je+cn))]]:[[t(r(Je),!0),n(o(Je))],[t(r(Je+cn),!0),n(o(Je+cn))]];return We(Se)},Xe="M",Te,en=0;Te=e[en];en++){var Qe=e[en-1],ve=ot(Te.x,L);if(bt(L)||!ve)Xe+="".concat(en?"L":"").concat(Ae(Te),",").concat(Ee(Te));else{try{ve=ve.dasharray.split(" ")}catch{ve=I.split(" ")}r=O.getScale(Qe.x+g,Te.x+g,c),o=O.getScale(Qe.value,Te.value);var Ze=t(Te.x)-t(Qe.x),un=n(Te.value)-n(Qe.value),Cn=Math.sqrt(Math.pow(Ze,2)+Math.pow(un,2));u=ve[0]/Cn,d=u*ve[1];for(var mn=u;mn<=1;mn+=d)Xe+=Ye(Qe,Te,mn,u),mn+d>=1&&(Xe+=Ye(Qe,Te,1,0))}}return Xe},updateAreaGradient:function(){var e=this;e.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 i=e.color(t),r=e.config.area_linearGradient,o=r.x,u=o===void 0?[0,0]:o,d=r.y,O=d===void 0?[0,1]:d,S=r.stops,D=S===void 0?[[0,i,1],[1,i,0]]:S,c=e.defs.append("linearGradient").attr("id","".concat(n)).attr("x1",u[0]).attr("x2",u[1]).attr("y1",O[0]).attr("y2",O[1]);D.forEach(function(g){var L=Lt(g[1])?g[1](t.id):g[1];c.append("stop").attr("offset",g[0]).attr("stop-color",L||i).attr("stop-opacity",g[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(f.areas)).selectAll(".".concat(f.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(w.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(le()):n.mainArea).attr("d",e).style("fill",n.updateAreaColor.bind(n)).style("opacity",function(i){return n.isAreaRangeType(i)?n.orgAreaOpacity/1.75:n.orgAreaOpacity})]},generateDrawArea:function(e,t){var n=this,i=n.config,r=i.line_connectNull,o=i.axis_rotated,u=n.generateGetAreaPoints(e,t),d=t?n.getSubYScale:n.getYScale,O=function(c){return(t?n.subxx:n.xx).call(n,c)},S=function(c,g){return n.isGrouped(c.id)?u(c,g)[0][1]:d.call(n,c.id)(n.isAreaRangeType(c)?n.getAreaRangeData(c,"high"):0)},D=function(c,g){return n.isGrouped(c.id)?u(c,g)[1][1]:d.call(n,c.id)(n.isAreaRangeType(c)?n.getAreaRangeData(c,"low"):c.value)};return function(c){var g,L=r?n.filterRemoveNull(c.values):c.values,I=0,ot=0;if(n.isAreaType(c)){var st=Object(m.area)();st=o?st.y(O).x0(S).x1(D):st.x(O).y0(i.area_above?0:S).y1(D),r||(st=st.defined(function($t){return n.getBaseValue($t)!==null})),n.isStepType(c)&&(L=n.convertValuesToStep(L)),g=st.curve(n.getCurve(c))(L)}else L[0]&&(I=n.x(L[0].x),ot=n.getYScale(c.id)(L[0].value)),g=o?"M ".concat(ot," ").concat(I):"M ".concat(I," ").concat(ot);return g||"M 0 0"}},generateGetAreaPoints:function(e,t){var n=this,i=n.config,r=e.__max__+1,o=n.getShapeX(0,r,e,!!t),u=n.getShapeY(!!t),d=n.getShapeOffset(n.isAreaType,e,!!t),O=t?n.getSubYScale:n.getYScale;return function(S,D){var c=O.call(n,S.id)(0),g=d(S,D)||c,L=o(S),I=u(S);return i.axis_rotated&&(S.value>0&&I<c||S.value<0&&c<I)&&(I=c),[[L,g],[L,I-(c-g)],[L,I-(c-g)],[L,g]]}},updateCircle:function(){var e=this;e.config.point_show&&(e.mainCircle=e.main.selectAll(".".concat(f.circles)).selectAll(".".concat(f.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,i){var r=this,o=r.main.selectAll(".".concat(f.selectedCircle));if(!r.config.point_show)return[];var u=[];r.mainCircle.each(function(O){var S=r.point("update",r,e,t,r.opacityForCircle.bind(r),r.color,n,i,o).bind(this),D=S(O);u.push(D)});var d=r.isCirclePoint()?"c":"";return[u,o.attr("".concat(d,"x"),e).attr("".concat(d,"y"),t)]},circleX:function(e){var t=this,n=V(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 i=t.id;return e.isGrouped(i)?e.generateGetLinePoints(e.getShapeIndices(e.isLineType))(t,n)[0][1]:e.getYScale(i)(e.getBaseValue(t))}},getCircles:function(e,t){var n=this,i=V(e)?"-".concat(e):"";return(t?n.main.selectAll(".".concat(f.circles).concat(n.getTargetSelectorSuffix(t))):n.main).selectAll(".".concat(f.circle).concat(i))},expandCircles:function(e,t,n){var i=this,r=i.pointExpandedR.bind(i);n&&i.unexpandCircles();var o=i.getCircles(e,t).classed(f.EXPANDED,!0),u=r(o)/i.config.point_r,d=1-u;i.isCirclePoint()?o.attr("r",r):o.each(function(){var O=Object(w.select)(this);if(this.tagName==="circle")O.attr("r",r);else{var S=this.getBBox(),D=S.width,c=S.height,g=d*(+O.attr("x")+D/2),L=d*(+O.attr("y")+c/2);O.attr("transform","translate(".concat(g," ").concat(L,") scale(").concat(u,")"))}})},unexpandCircles:function(e){var t=this,n=t.pointR.bind(t),i=t.getCircles(e).filter(function(){return Object(w.select)(this).classed(f.EXPANDED)}).classed(f.EXPANDED,!1);i.attr("r",n),t.isCirclePoint()||i.attr("transform","scale(".concat(n(i)/t.config.point_r,")"))},pointR:function(s){var e=this,t=e.config,n=t.point_r,i=n;return e.isStepType(s)?i=0:e.isBubbleType(s)?i=e.getBubbleR(s):Lt(n)&&(i=n(s)),i}
8,pointExpandedR:function(e){var t=this,n=t.config,i=t.isBubbleType(e)?1.15:1.75;return n.point_focus_expand_enabled?n.point_focus_expand_r||t.pointR(e)*i:t.pointR(e)},pointSelectR:function(e){var t=this,n=t.config.point_select_r;return Lt(n)?n(e):n||t.pointR(e)*4},isWithinCircle:function(e,t){var n=Object(w.mouse)(e),i=Object(w.select)(e),r=this.isCirclePoint()?"c":"",o=+i.attr("".concat(r,"x")),u=+i.attr("".concat(r,"y"));if(!(o||u)&&e.nodeType===1){var d=e.getBBox?e.getBBox():e.getBoundingClientRect(),O=d.x,S=d.y;o=O,u=S}var D=Math.sqrt(Math.pow(o-n[0],2)+Math.pow(u-n[1],2))<(t||this.config.point_sensitivity);return D},isWithinStep:function(e,t){return Math.abs(t-Object(w.mouse)(e)[1])<30},shouldDrawPointsForLine:function(e){var t=this.config.line_point;return t===!0||$(t)&&t.indexOf(e.id)!==-1}}),Xt(nt.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 ie(t)&&Lt(t.create)&&Lt(t.update)},insertPointInfoDefs:function(e,t){var n=this,i=function(O,S){for(var D,c=O.attributes,g=0;D=c[g];g++)D=D.name,S.setAttribute(D,O.getAttribute(D))},r=new DOMParser().parseFromString(e,"image/svg+xml"),o=r.documentElement,u=document.createElementNS(w.namespaces.svg,o.nodeName.toLowerCase());if(u.id=t,u.style.fill="inherit",u.style.stroke="inherit",i(o,u),o.childNodes&&o.childNodes.length){var d=Object(w.select)(u);"innerHTML"in u?d.html(o.innerHTML):ee(o.childNodes).forEach(function(O){i(O,d.append(O.tagName).node())})}n.defs.node().appendChild(u)},pointFromDefs:function(e){return this.defs.select("#".concat(e))},generatePoint:function(){var e=this,t=e.config,n=[],i=y(t.point_pattern)?t.point_pattern:[t.point_type];return function(r,o){for(var u=arguments.length,d=Array(u>2?u-2:0),O=2;O<u;O++)d[O-2]=arguments[O];return function(S){var D,c=S.id||S.data&&S.data.id||S,g=Object(w.select)(this);if(n.indexOf(c)<0&&n.push(c),D=i[n.indexOf(c)%i.length],e.hasValidPointType(D))D=e[D];else if(!e.hasValidPointDrawMethods(D)){var L="".concat(e.datetimeId,"-point-").concat(c),I=e.pointFromDefs(L);if(I.size()<1&&e.insertPointInfoDefs(D,L),r==="create")return e.custom.create.bind(o).apply(void 0,[g,L].concat(d));if(r==="update")return e.custom.update.bind(o).apply(void 0,[g].concat(d))}return D[r].bind(o).apply(void 0,[g].concat(d))}}},getTransitionName:function(){return le()},custom:{create:function(e,t,n,i,r){return e.append("use").attr("xlink:href","#".concat(t)).attr("class",n).style("fill",r).node()},update:function(e,t,n,i,r,o,u,d){var O=this,S=e.node().getBBox(),D=S.width,c=S.height,g=function(st){return t(st)-D/2},L=function(st){return n(st)-c/2},I=e;if(o){var ot=O.getTransitionName();u&&(I=e.attr("x",g)),I=e.transition(ot).attr("x",g).attr("y",L).transition(ot),d.transition(O.getTransitionName())}else I=e.attr("x",g).attr("y",L);return I.style("opacity",i).style("fill",r)}},circle:{create:function(e,t,n,i){return e.append("circle").attr("class",t).attr("r",n).style("fill",i).node()},update:function(e,t,n,i,r,o,u,d){var O=this,S=e;if(O.hasType("bubble")&&(S=S.attr("r",O.pointR.bind(O))),o){var D=O.getTransitionName();u&&(S=S.attr("cx",t)),S=e.attr("cx")?S.transition(D).attr("cx",t).attr("cy",n).transition(D):S.attr("cx",t).attr("cy",n),d.transition(O.getTransitionName())}else S=S.attr("cx",t).attr("cy",n);return S.style("opacity",i).style("fill",r)}},rectangle:{create:function(e,t,n,i){var r=function(o){return n(o)*2};return e.append("rect").attr("class",t).attr("width",r).attr("height",r).style("fill",i).node()},update:function(e,t,n,i,r,o,u,d){var O=this,S=O.config.point_r,D=function(I){return t(I)-S},c=function(I){return n(I)-S},g=e;if(o){var L=O.getTransitionName();u&&(g=g.attr("x",D)),g=g.transition(L).attr("x",D).attr("y",c).transition(L),d.transition(O.getTransitionName())}else g=g.attr("x",D).attr("y",c);return g.style("opacity",i).style("fill",r)}}});function M(s,e,t,n,i,r){var o=s&&n>0?t-n:n,u=2*Math.PI,d=e==="x"?Math.sin:Math.cos;return i*(1-r*d(o*u/t))}var T="$radarPoints";Xt(nt.prototype,{initRadar:function(){var e=this,t=e.config;e.hasType("radar")&&(e.radars=e.main.select(".".concat(f.chart)).append("g").attr("class",f.chartRadars),e.radars.levels=e.radars.append("g").attr("class",f.levels),e.radars.axes=e.radars.append("g").attr("class",f.axis),e.radars.shapes=e.radars.append("g").attr("class",f.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,i=(Math.min(e.arcWidth,e.arcHeight)-n)/2;return[i,i]},updateTargetsForRadar:function(e){var t=this,n=t.config;xe(n.axis_x_categories)&&(n.axis_x_categories=It(0,tt("max",e.map(function(i){return i.values.length})))),t.generateRadarPoints()},getRadarPosition:function(e,t,n,i){var r=this,o=r.config,u=r.getRadarSize(),d=Tt()(u,2),O=
8d[0],S=d[1],D=o.axis_x_categories.length,c=o.radar_direction_clockwise,g=ee(e).map(function(L){return M(c,L,D,t,ft(n)?n:e==="x"?O:S,_t(i)?i:o.radar_size_ratio)});return g.length===1?g[0]:g},generateRadarPoints:function(){var e=this,t=e.data.targets,n=e.getRadarSize(),i=Tt()(n,2),r=i[0],o=i[1],u=e.getCache(T)||{},d=u._size;d&&(d.width===r||d.height===o)||(t.forEach(function(O){u[O.id]=O.values.map(function(S,D){return e.getRadarPosition(["x","y"],D,void 0,e.getRatio("radar",S))})}),u._size={width:r,height:o},e.addCache(T,u))},redrawRadar:function(e,t){var n=this,i=n.getTranslate("radar");i&&(n.radars.attr("transform",i),n.main.selectAll(".".concat(f.circles)).attr("transform",i),n.main.select(".".concat(f.chartTexts)).attr("transform",i),n.generateRadarPoints(),n.updateRadarLevel(),n.updateRadarAxes(),n.updateRadarShape(e,t))},generateGetRadarPoints:function(){var e=this,t=e.getCache(T);return function(n,i){var r=t[n.id][i];return[r,r,r,r]}},updateRadarLevel:function(){var e=this,t=e.config,n=e.getRadarSize(),i=Tt()(n,2),r=i[0],o=i[1],u=t.radar_level_depth,d=t.axis_x_categories.length,O=t.radar_level_text_show,S=e.radars.levels,D=It(0,u),c=t.radar_size_ratio*Math.min(r,o),g=D.map(function($t){return c*(($t+1)/u)}),L=t.radar_level_text_format,I=D.map(function($t){var dt=g[$t],Vt=It(0,d).map(function(he){return e.getRadarPosition(["x","y"],he,dt,1).join(",")});return Vt.join(" ")}),ot=S.selectAll(".".concat(f.level)).data(D);ot.exit().remove();var st=ot.enter().append("g").attr("class",function($t,dt){return"".concat(f.level," ").concat(f.level,"-").concat(dt)});st.append("polygon").style("visibility",t.radar_level_show?null:"hidden"),O&&(S.select("text").empty()&&S.append("text").attr("dx","-.5em").attr("dy","-.7em").style("text-anchor","end").text(function(){return L(0)}),st.append("text").attr("dx","-.5em").style("text-anchor","end").text(function($t){return L(e.maxValue/D.length*($t+1))})),st.merge(ot).attr("transform",function($t){return"translate(".concat(r-g[$t],", ").concat(o-g[$t],")")}).selectAll("polygon").attr("points",function($t){return I[$t]}),O&&S.selectAll("text").attr("x",function($t){return bt($t)?r:I[$t].split(",")[0]}).attr("y",function($t){return bt($t)?o:0})},updateRadarAxes:function(){var e=this,t=e.config,n=e.getRadarSize(),i=Tt()(n,2),r=i[0],o=i[1],u=t.axis_x_categories,d=e.radars.axes.selectAll("g").data(u);d.exit().remove();var O=d.enter().append("g").attr("class",function(S,D){return"".concat(f.axis,"-").concat(D)});t.radar_axis_line_show&&O.append("line"),t.radar_axis_text_show&&O.append("text"),d=O.merge(d),t.radar_axis_line_show&&d.select("line").attr("x1",r).attr("y1",o).attr("x2",function(S,D){return e.getRadarPosition("x",D)}).attr("y2",function(S,D){return e.getRadarPosition("y",D)}),t.radar_axis_text_show&&d.select("text").style("text-anchor","middle").attr("dy",".5em").call(function(S){S.each(function(D){ut(Object(w.select)(this),D,[-1.2,1.2])})}).datum(function(S,D){return{index:D}}).attr("transform",function(S,D){return"translate(".concat(e.getRadarPosition("x",D,void 0,1)," ").concat(e.getRadarPosition("y",D,void 0,1),")")}),e.bindEvent()},bindEvent:function(){var e=this,t=this,n=t.config;if(n.interaction_enabled){var i=t.inputType==="mouse",r=function(){var u=w.event.target;/tspan/i.test(u.tagName)&&(u=u.parentNode);var d=Object(w.select)(u).datum();return d&&Object.keys(d).length===1?d.index:void 0},o=function(){var u=r(),d=bt(u);(i||d)&&(e.hideTooltip(),e.unexpandCircles(),i?t.setOverOut(!1,u):d&&t.callOverOutForTouch())};t.radars.select(".".concat(f.axis)).on(i?"mouseover ":"touchstart",function(){if(!t.transiting){var u=r();t.selectRectForSingle(t.svg.node(),null,u),i?t.setOverOut(!0,u):t.callOverOutForTouch(u)}}).on("mouseout",i?o:null),i||t.svg.on("touchstart",o)}},updateRadarShape:function(e,t){var n=this,i=n.data.targets,r=n.getCache(T),o=n.radars.shapes.selectAll("polygon").data(i),u=o.enter().append("g").attr("class",n.classChartRadar.bind(n));o.exit().transition().duration(t).remove(),u.append("polygon").merge(o).transition().duration(e).style("fill",function(d){return n.color(d)}).style("stroke",function(d){return n.color(d)}).attr("points",function(d){return r[d.id].join(" ")})},radarCircleX:function(e){return this.getCache(T)[e.id][e.index][0]},radarCircleY:function(e){return this.getCache(T)[e.id][e.index][1]}}),Xt(nt.prototype,{initText:function(){var e=this;e.main.select(".".concat(f.chart)).append("g").attr("class",f.chartTexts),e.mainText=Object(w.selectAll)([])},updateTargetsForText:function(e){var t=this,n=t.classChartText.bind(t),i=t.classTexts.bind(t),r=t.classFocus.bind(t),o=t.main.select(".".concat(f.chartTexts)).selectAll(".".concat(f.chartText)).data(e).attr("class",function(d){return n(d)+r(d)}),u=o.enter().append("g").attr("class",n).style("opacity","0").style("pointer-events","none");u.append("g").attr("class",i)},updateText:function(e){var t=this,n=this,i=n.config,r=n.labelishData.bind(n),o=n.classText.bind(n);n.mainText=n.main.selectAll(".".concat(f.texts)).selectAll(".".concat(f.text)).data(function(u){return t.isRadarType(u)?u.values:r(u)}),n.mainText.exit().transition().duration(e).style("fill-opacity","0").remove(),n.mainText=n.mainText.enter().append("text").merge
8(n.mainText).attr("class",o).attr("text-anchor",function(u){return i.axis_rotated?u.value<0?"end":"start":"middle"}).style("fill",n.updateTextColor.bind(n)).style("fill-opacity","0").text(function(u,d,O){return n.dataLabelFormat(u.id)(u.value,u.id,d,O)})},updateTextColor:function(e){var t,n=this,i=n.config.data_labels_colors;return at(i)?t=i:x(i)&&(t=i[e.id]),t||n.color(e)},redrawText:function(e,t,n,i){var r=this,o=le(),u=n?0:r.opacityForText.bind(r);return[this.mainText.each(function(){var d=Object(w.select)(this);(i&&d.attr("x")?d.transition(o):d).attr("x",e).attr("y",t).style("fill",r.updateTextColor.bind(r)).style("fill-opacity",u)})]},getTextRect:function(e,t){var n=this,i=e.node?e.node():e;/text/i.test(i.tagName)||(i=i.querySelector("text"));var r=i.textContent,o="$".concat(r.replace(/\W/g,"_")),u=n.getCache(o);return u||(n.svg.append("text").style("visibility","hidden").style("font",Object(w.select)(i).style("font")).classed(t,!0).text(r).call(function(d){u=d.node().getBoundingClientRect()}).remove(),n.addCache(o,u)),u},generateXYForText:function(e,t){var n=this,i=Object.keys(e),r={},o=t?n.getXForText:n.getYForText;return n.hasType("radar")&&i.push("radar"),i.forEach(function(u){r[u]=n["generateGet".concat(be(u),"Points")](e[u],!1)}),function(u,d){var O=n.isAreaType(u)&&"area"||n.isBarType(u)&&"bar"||n.isRadarType(u)&&"radar"||"line";return o.call(n,r[O](u,d),u,this)}},getCenteredTextPos:function(e,t,n){var i=this,r=i.config,o=r.axis_rotated;if(r.data_labels.centered&&i.isBarType(e)){var u=n.getBoundingClientRect(),d=e.value>=0;if(o){var O=(d?t[1][1]-t[0][1]:t[0][1]-t[1][1])/2+u.width/2;return d?-O-3:O+2}var S=(d?t[0][1]-t[1][1]:t[1][1]-t[0][1])/2+u.height/2;return d?S:-S-2}return 0},getXForText:function(e,t,n){var i,r,o=this,u=o.config,d=u.axis_rotated;return d?(r=o.isBarType(t)?4:6,i=e[2][1]+r*(t.value<0?-1:1)):i=o.hasType("bar")?(e[2][0]+e[0][0])/2:e[0][0],t.value===null&&(i>o.width?i=o.width-n.getBoundingClientRect().width:i<0&&(i=4)),d&&(i+=o.getCenteredTextPos(t,e,n)),i+(u.data_labels_position.x||0)},getYForText:function(e,t,n){var i,r=this,o=r.config,u=o.axis_rotated,d=o.point_r,O=n.getBoundingClientRect(),S=3;if(u)i=(e[0][0]+e[2][0]+O.height*.6)/2;else if(i=e[2][1],_t(d)&&d>5&&(r.isLineType(t)||r.isScatterType(t))&&(S+=o.point_r/2.3),t.value<0||t.value===0&&!r.hasPositiveValue)i+=O.height,r.isBarType(t)?i-=S:!r.isBarType(t)&&(i+=S);else{var D=-S*2;r.isBarType(t)?D=-S:r.isBubbleType(t)&&(D=S),i+=D}if(t.value===null&&!u){var c=O.height;i<c?i=c:i>this.height&&(i=this.height-4)}return u||(i+=r.getCenteredTextPos(t,e,n)),i+(o.data_labels_position.y||0)}});var z={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"]};Xt(nt.prototype,{setTargetType:function(e,t){var n=this,i=n.config;n.mapToTargetIds(e).forEach(function(r){n.withoutFadeIn[r]=t===i.data_types[r],i.data_types[r]=t}),e||(i.data_type=t)},hasType:function(e,t){var n=this,i=n.config.data_types,r=t||n.data.targets,o=!1;return r&&r.length?r.forEach(function(u){var d=i[u.id];(d&&d.indexOf(e)>=0||!d&&e==="line")&&(o=!0)}
8):Object.keys(i).length?Object.keys(i).forEach(function(u){i[u]===e&&(o=!0)}):o=n.config.data_type===e,o},hasTypeOf:function(e,t){var n=this,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];return!z[e].filter(function(r){return i.indexOf(r)===-1}).every(function(r){return!n.hasType(r,t)})},isTypeOf:function(e,t){var n=at(e)?e:e.id,i=this.config.data_types[n];return $(t)?t.indexOf(i)>=0:i===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,z.Line)},isStepType:function(e){return this.isTypeOf(e,z.Step)},isSplineType:function(e){return this.isTypeOf(e,z.Spline)},isAreaType:function(e){return this.isTypeOf(e,z.Area)},isAreaRangeType:function(e){return this.isTypeOf(e,z.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||$(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 G=function(s){return V(s.position)||"end"},Z=function(s){return s.position==="start"?4:s.position==="middle"?0:-4},q=function(s,e,t){return function(n){var i=s?0:e;return n.position==="start"?i=s?-t:0:n.position==="middle"&&(i=(s?-t:e)/2),i}};Xt(nt.prototype,{initGrid:function(){var e=this;e.xgrid=Object(w.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(f.chart).concat(t.grid_lines_front?" + *":"")).attr("clip-path",e.clipPathForGrid).attr("class","".concat(f.grid," ").concat(f.gridLines)),e.gridLines.append("g").attr("class",f.xgridLines),e.gridLines.append("g").attr("class",f.ygridLines),e.xgridLines=Object(w.selectAll)([]))},updateXGrid:function(e){var t=this,n=t.config,i=n.axis_rotated,r=t.generateGridData(n.grid_x_type,t.x),o=t.isCategorized()?t.xAxis.tickOffset():0,u=function(d){return((t.zoomScale||t.x)(d)+o)*(i?-1:1)};t.xgridAttr=i?{x1:0,x2:t.width,y1:u,y2:u}:{x1:u,x2:u,y1:0,y2:t.height},t.xgrid=t.main.select(".".concat(f.xgrids)).selectAll(".".concat(f.xgrid)).data(r),t.xgrid.exit().remove(),t.xgrid=t.xgrid.enter().append("line").attr("class",f.xgrid).merge(t.xgrid),e||t.xgrid.each(function(){var d=Object(w.select)(this);Object.keys(t.xgridAttr).forEach(function(O){d.attr(O,t.xgridAttr[O]).style("opacity",function(){return d.attr(i?"y1":"x1")===(i?t.height:0)?"0":"1"})})})},updateYGrid:function(){var e=this,t=e.config,n=t.axis_rotated,i=e.yAxis.tickValues()||e.y.ticks(t.grid_y_ticks),r=function(o){return Math.ceil(e.y(o))};e.ygrid=e.main.select(".".concat(f.ygrids)).selectAll(".".concat(f.ygrid)).data(i),e.ygrid.exit().remove(),e.ygrid=e.ygrid.enter().append("line").attr("class",f.ygrid).merge(e.ygrid),e.ygrid.attr("x1",n?r:0).attr("x2",n?r:e.width).attr("y1",n?0:r).attr("y2",n?e.height:r),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(f.xgridFocus)).style("visibility","hidden"),t.updateXGridLines(e),t.updateYGridLines(e)},updateXGridLines:function(e){var t=this,n=t.main,i=t.config,r=i.axis_rotated;i.grid_x_show&&t.updateXGrid(),t.xgridLines=n.select(".".concat(f.xgridLines)).selectAll(".".concat(f.xgridLine)).data(i.grid_x_lines),t.xgridLines.exit(
8).transition().duration(e).style("opacity","0").remove();var o=t.xgridLines.enter().append("g");o.append("line").style("opacity","0"),o.append("text").attr("transform",r?"":"rotate(-90)").attr("dy",-5).style("opacity","0"),t.xgridLines=o.merge(t.xgridLines),t.xgridLines.attr("class",function(u){return"".concat(f.xgridLine," ").concat(u.class||"").trim()}).select("text").attr("text-anchor",G).attr("dx",Z).transition().duration(e).text(function(u){return u.text}).transition().style("opacity","1")},updateYGridLines:function(e){var t=this,n=t.main,i=t.config,r=i.axis_rotated;i.grid_y_show&&t.updateYGrid(),t.ygridLines=n.select(".".concat(f.ygridLines)).selectAll(".".concat(f.ygridLine)).data(i.grid_y_lines),t.ygridLines.exit().transition().duration(e).style("opacity","0").remove();var o=t.ygridLines.enter().append("g");o.append("line").style("opacity","0"),o.append("text").attr("transform",r?"rotate(-90)":"").style("opacity","0"),t.ygridLines=o.merge(t.ygridLines);var u=t.yv.bind(t);t.ygridLines.attr("class",function(d){return"".concat(f.ygridLine," ").concat(d.class||"").trim()}).select("line").transition().duration(e).attr("x1",r?u:0).attr("x2",r?u:t.width).attr("y1",r?0:u).attr("y2",r?t.height:u).transition().style("opacity","1"),t.ygridLines.select("text").attr("text-anchor",G).attr("dx",Z).transition().duration(e).attr("dy",-5).attr("x",q(r,t.width,t.height)).attr("y",u).text(function(d){return d.text}).transition().style("opacity","1")}
8,redrawGrid:function(e){var t=this,n=t.config.axis_rotated,i=t.xv.bind(t),r=t.xgridLines.select("line"),o=t.xgridLines.select("text");return r=(e?r.transition():r).attr("x1",n?0:i).attr("x2",n?t.width:i).attr("y1",n?i:0).attr("y2",n?i:t.height),o=(e?o.transition():o).attr("x",q(!n,t.width,t.height)).attr("y",i).text(function(u){return u.text}),[(e?r.transition():r).style("opacity","1"),(e?o.transition():o).style("opacity","1")]},initXYFocusGrid:function(){var e=this,t=e.config,n=t.grid_front,i=".".concat(f[n&&e.gridLines?"gridLines":"chart"]).concat(n?" + *":"");e.grid=e.main.insert("g",i).attr("clip-path",e.clipPathForGrid).attr("class",f.grid),t.grid_x_show&&e.grid.append("g").attr("class",f.xgrids),t.grid_y_show&&e.grid.append("g").attr("class",f.ygrids),t.grid_focus_show&&e.grid.append("g").attr("class",f.xgridFocus).append("line").attr("class",f.xgridFocus)},showXGridFocus:function(e){var t=this,n=t.config,i=n.axis_rotated,r=e.filter(function(d){return d&&V(t.getBaseValue(d))}),o=t.main.selectAll("line.".concat(f.xgridFocus)),u=t.xx.bind(t);!n.tooltip_show||t.hasType("bubble")||t.hasType("scatter")||t.hasArcType()||(o.style("visibility","visible").data([r[0]]).attr(i?"y1":"x1",u).attr(i?"y2":"x2",u),t.smoothLines(o,"grid"))},hideXGridFocus:function(){this.main.select("line.".concat(f.xgridFocus)).style("visibility","hidden")},updateXgridFocus:function(){var e=this,t=e.config.axis_rotated;e.main.select("line.".concat(f.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,i=n.main.select(".".concat(f.axisX)).selectAll(".tick").size(),r=[];if(e==="year")for(var o=n.getXDomain(),u=o[0].getFullYear(),d=o[1].getFullYear(),O=u;O<=d;O++)r.push(new Date("".concat(O,"-01-01 00:00:00")));else r=t.ticks(10),r.length>i&&(r=r.filter(function(S){return(S+"").indexOf(".")<0}));return r},getGridFilterToRemove:function(e){return e?function(t){var n=!1;return($(e)?e.concat():[e]).forEach(function(i){("value"in i&&t.value===i.value||"class"in i&&t.class===i.class)&&(n=!0)}),n}:function(){return!0}},removeGridLines:function(e,t){var n=this,i=n.config,r=n.getGridFilterToRemove(e),o=t?f.xgridLines:f.ygridLines,u=t?f.xgridLine:f.ygridLine;n.main.select(".".concat(o)).selectAll(".".concat(u)).filter(r).transition().duration(i.transition_duration).style("opacity","0").remove();var d="grid_".concat(t?"x":"y","_lines");i[d]=i[d].filter(function(S){return!r(S)})}}),Xt(nt.prototype,{initTooltip:function(){var e=this,t=e.config,n=t.tooltip_contents.bindto;if(e.tooltip=Object(w.select)(n),e.tooltip.empty()&&(e.tooltip=e.selectChart.style("position","relative").append("div").attr("class",f.tooltipContainer).style("position","absolute").style("pointer-events","none").style("display","none")),t.tooltip_init_show){if(e.isTimeSeries()&&at(t.tooltip_init_x)){var i,r,o=e.data.targets[0];for(t.tooltip_init_x=e.parseDate(t.tooltip_init_x),i=0;(r=o.values[i])&&r.x-t.tooltip_init_x!==0;i++);t.tooltip_init_x=i}e.tooltip.html(e.getTooltipHTML(e.data.targets.map(function(u){return e.addName(u.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,i=n.config,r=arguments.length,o=Array(r),u=0;u<r;u++)o[u]=arguments[u];return Lt(i.tooltip_contents)?(e=i.tooltip_contents).call.apply(e,[n].concat(o)):(t=n).getTooltipContent.apply(t,o)},getTooltipContent:function(e,t,n,i){var r=this,o=r.config,u=o.tooltip_format_title||t,d=o.tooltip_format_name||function(Te){return Te},O=o.tooltip_format_value||(r.isStackNormalized()?function(Te,en){return"".concat((en*100).toFixed(2),"%")}:n),S=o.tooltip_order,D=function(Te){return r.getBaseValue(Te)},c=r.levelColor?function(Te){return r.levelColor(Te.value)}:function(Te){return i(Te)},g=o.tooltip_contents,L=g.template;if(S===null&&o.data_groups.length){var I=r.orderTargets(r.data.targets).map(function(Te){return Te.id}).reverse();e.sort(function(Te,en){var Qe=Te?Te.value:null,Ze=en?en.value:null;return Qe>0&&Ze>0&&(Qe=Te.id?I.indexOf(Te.id):null,Ze=en.id?I.indexOf(en.id):null),Qe-Ze})}else/^(asc|desc)$/.test(S)?e.sort(function(Te,en){var Qe=Te?D(Te):null,Ze=en?D(en):null;return S==="asc"?Qe-Ze:Ze-Qe}):Lt(S)&&e.sort(S);var ot,st,$t,dt,Vt,he=r.getTooltipContentTemplate(L);for(Vt=0;st=e[Vt];Vt++)if(D(st)||D(st)===0){if(bt(ot)){var ve=it(u?u(st.x):st.x);
8ot=Zt(he[0],{CLASS_TOOLTIP:f.tooltip,TITLE:V(ve)?L?ve:'<tr><th colspan="2">'.concat(ve,"</th></tr>"):""})}if($t=[st.ratio,st.id,st.index,e],dt=it(O.apply(void 0,[D(st)].concat(yt()($t)))),r.isAreaRangeType(st)){var Ae=["high","low"].map(function(Te){return it(O.apply(void 0,[r.getAreaRangeData(st,Te)].concat(yt()($t))))}),Ee=Tt()(Ae,2),We=Ee[0],Ye=Ee[1];dt="<b>Mid:</b> ".concat(dt," <b>High:</b> ").concat(We," <b>Low:</b> ").concat(Ye)}if(dt!==void 0){var Xe=function(){if(st.name===null)return"continue";var Te=it(d.apply(void 0,[st.name].concat(yt()($t)))),en=c(st),Qe={CLASS_TOOLTIP_NAME:f.tooltipName+r.getTargetSelectorSuffix(st.id),COLOR:L||!r.patterns?en:'<svg><rect style="fill:'.concat(en,'" width="10" height="10"></rect></svg>'),NAME:Te,VALUE:dt};L&&x(g.text)&&Object.keys(g.text).forEach(function(Ze){Qe[Ze]=g.text[Ze][Vt]}),ot+=Zt(he[1],Qe)}();if(Xe==="continue")continue}}return"".concat(ot,"</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,i){var r=this,o=r.config,u=Object(w.mouse)(i),d=Tt()(u,2),O=d[0],S=d[1],D=r.getSvgLeft(!0),c=D+r.currentWidth-r.getCurrentPaddingRight();if(S+=20,r.hasArcType()){var g=r.inputType==="touch"||r.hasType("radar");g||(S+=r.height/2,O+=(r.width-(r.isLegendRight?r.getLegendWidth():0))/2)}else{var L=r.x(e[0].x);o.axis_rotated?(S=L+20,O+=D+100,c-=D):(S-=5,O=D+r.getCurrentPaddingLeft(!0)+20+(r.zoomScale?O:L))}var I=O+t;return I>c&&(O-=I-c+20),S+n>r.currentHeight&&(S-=n+30),S<0&&(S=0),{top:S,left:O}},showTooltip:function(e,t){var n=this,i=n.config,r=i.tooltip_contents.bindto,o=n.hasArcType(null,["radar"]),u=e.filter(function(I){return I&&V(n.getBaseValue(I))}),d=i.tooltip_position||n.tooltipPosition;if(u.length!==0&&i.tooltip_show){var O=n.tooltip.datum(),S=JSON.stringify(e),D=O&&O.width||0,c=O&&O.height||0;if(!O||O.current!==S){var g=e.concat().sort()[0].index;_(i.tooltip_onshow,n),n.tooltip.html(n.getTooltipHTML(e,n.axis.getXAxisTickFormat(),n.getYFormat(o),n.color)).style("display",null).style("visibility",null).datum({index:g,current:S,width:D=n.tooltip.property("offsetWidth"),height:c=n.tooltip.property("offsetHeight")}),_(i.tooltip_onshown,n),n._handleLinkedCharts(!0,g)}if(!r){var L=d.call(this,u,D,c,t);n.tooltip.style("top","".concat(L.top,"px")).style("left","".concat(L.left,"px"))}}},hideTooltip:function(e){var t=this,n=t.config;(!n.tooltip_doNotHide||e)&&(_(n.tooltip_onhide,t),this.tooltip.style("display","none").style("visibility","hidden").datum(null),_(n.tooltip_onhidden,t))},_handleLinkedCharts:function(e,t){var n=this;if(n.config.tooltip_linked){var i=n.config.tooltip_linked_name;(n.api.internal.charts||[]).forEach(function(r){if(r!==n.api){var o=r.internal.config,u=o.tooltip_linked,d=o.tooltip_linked_name,O=document.body.contains(r.element);if(u&&i===d&&O){var S=r.internal.tooltip.data()[0],D=t!==(S&&S.index);try{e&&D?r.tooltip.show({index:t}):!e&&r.tooltip.hide()}catch{}}}})}}}),Xt(nt.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 i=this,r=i.config,o=t||{withTransform:!1,withTransitionForTransform:!1,withTransition:!1};o.withTransition=A(o,"withTransition",!0),o.withTransitionForTransform=A(o,"withTransitionForTransform",!0),r.legend_contents_bindto&&r.legend_contents_template?i.updateLegendTemplate():i.updateLegendElement(e||i.mapToIds(i.data.targets),o,n),i.legend.selectAll(".".concat(f.legendItem)).classed(f.legendItemHidden,function(u){return!i.isTargetToShow(u)}),i.updateScales(!1,!i.zoomScale),i.updateSvgSize(),i.transformAll(o.withTransitionForTransform,n),i.legendHasRendered=!0},updateLegendTemplate:function(){var e=this,t=e.config,n=Object(w.select)(t.legend_contents_b
14indto),i=t.legend_contents_template;if(!n.empty()){var r=e.mapToIds(e.data.targets),o=[],u="";r.forEach(function(O){var S=Lt(i)?i.call(e,O,e.color(O),e.api.data(O)[0].values):Zt(i,{COLOR:e.color(O),TITLE:O});S&&(o.push(O),u+=S)});var d=n.html(u).selectAll(function(){return this.childNodes}).data(o);e.setLegendItem(d),e.legend=n}},updateSizeForLegend:function(e){var t=this,n=t.config,i=e.width,r=e.height,o={top:t.isLegendTop?t.getCurrentPaddingTop()+n.legend_inset_y+5.5:t.currentHeight-r-t.getCurrentPaddingBottom()-n.legend_inset_y,left:t.isLegendLeft?t.getCurrentPaddingLeft()+n.legend_inset_x+.5:t.currentWidth-i-t.getCurrentPaddingRight()-n.legend_inset_x+.5};t.margin3={top:t.isLegendRight?0:t.isLegendInset?o.top:t.currentHeight-r,right:NaN,bottom:0,left:t.isLegendRight?t.currentWidth-i:t.isLegendInset?o.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(f.legendItemHidden)?null:"1"},opacityForUnfocusedLegend:function(e){return e.classed(f.legendItemHidden)?null:"0.3"},toggleFocusLegend:function(e,t){var n=this,i=n.mapToTargetIds(e);n.legend.selectAll(".".concat(f.legendItem)).filter(function(r){return i.indexOf(r)>=0}).classed(f.legendItemFocused,t).transition().duration(100).style("opacity",function(){return(t?n.opacityForLegend:n.opacityForUnfocusedLegend).call(n,Object(w.select)(this))})},revertLegend:function(){var e=this;e.legend.selectAll(".".concat(f.legendItem)).classed(f.legendItemFocused,!1).transition().duration(100).style("opacity",function(){return e.opacityForLegend(Object(w.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(w.select)(this))})},hideLegend:function(e){var t=this,n=t.config;n.legend_show&&xe(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,i=t.inputType==="touch";e.attr("class",function(r){var o=Object(w.select)(this),u=!o.empty()&&o.attr("class")||"";return u+t.generateClass(f.legendItem,r)}).style("visibility",function(r){return t.isLegendToShow(r)?"visible":"hidden"}).style("cursor","pointer").on("click",function(r){_(n.legend_item_onclick,t,r)||(w.event.altKey?(t.api.hide(),t.api.show(r)):(t.api.toggle(r),!i&&t.isTargetToShow(r)?t.api.focus(r):t.api.revert())),i&&t.hideTooltip()}),i||e.on("mouseout",function(r){_(n.legend_item_onout,t,r)||(Object(w.select)(this).classed(f.legendItemFocused,!1),t.api.revert())}).on("mouseover",function(r){_(n.legend_item_onover,t,r)||(Object(w.select)(this).classed(f.legendItemFocused,!0),!t.transiting&&t.isTargetToShow(r)&&t.api.focus(r))})},updateLegendElement:function(e,t){var n,i,r,o=this,u=o.config,d=10,O=u.legend_item_tile_width+5,S=0,D=0,c=0,g={},L={},I={},ot=[0],st={},$t=0,dt=o.isLegendRight||o.isLegendInset,Vt=e.filter(function(Se){return!ft(u.data_names[Se])||u.data_names[Se]!==null}),he=t.withTransition,ve=function(Se,Me){return o.legendItemTextBox[Me]||(o.legendItemTextBox[Me]=o.getTextRect(Se,f.legendItem)),o.legendItemTextBox[Me]},Ae=function(Se,Me,Pe){var yn,_n=Pe===Vt.length-1,Pn=ve(Se,Me),Rn=Pn.width+O+(_n&&!dt?0:10)+u.legend_padding,In=Pn.height+4,Nn=dt?In:Rn,Yn=dt?o.getLegendHeight():o.getLegendWidth(),qn=function(zn,Xn){Xn||(yn=(Yn-c-Nn)/2,yn<d&&(yn=(Yn-Nn)/2,c=0,$t++)),st[zn]=$t,ot[$t]=o.isLegendInset?10:yn,g[z
14n]=c,c+=Nn};if(Pe===0&&(c=0,$t=0,S=0,D=0),u.legend_show&&!o.isLegendToShow(Me))return L[Me]=0,I[Me]=0,st[Me]=0,void(g[Me]=0);L[Me]=Rn,I[Me]=In,(!S||Rn>=S)&&(S=Rn),(!D||In>=D)&&(D=In);var Fn=dt?D:S;u.legend_equally?(Object.keys(L).forEach(function(zn){return L[zn]=S}),Object.keys(I).forEach(function(zn){return I[zn]=D}),yn=(Yn-Fn*Vt.length)/2,yn<d?(c=0,$t=0,Vt.forEach(function(zn){return qn(zn)})):qn(Me,!0)):qn(Me)};o.isLegendInset&&($t=u.legend_inset_step?u.legend_inset_step:Vt.length,o.updateLegendStep($t)),o.isLegendRight?(n=function(Se){return S*st[Se]},i=function(Se){return ot[st[Se]]+g[Se]}):o.isLegendInset?(n=function(Se){return S*st[Se]+10},i=function(Se){return ot[st[Se]]+g[Se]}):(n=function(Se){return ot[st[Se]]+g[Se]},i=function(Se){return D*st[Se]});var Ee=function(Se,Me){return n(Se,Me)+4+u.legend_item_tile_width},We=function(Se,Me){return n(Se,Me)},Ye=function(Se,Me){return n(Se,Me)-2},Xe=function(Se,Me){return n(Se,Me)-2+u.legend_item_tile_width},Te=function(Se,Me){return i(Se,Me)+9},en=function(Se,Me){return i(Se,Me)-5},Qe=function(Se,Me){return i(Se,Me)+4},Ze=-200,un=o.legend.selectAll(".".concat(f.legendItem)).data(Vt).enter().append("g");o.setLegendItem(un),un.append("text").text(function(Se){return ft(u.data_names[Se])?u.data_names[Se]:Se}).each(function(Se,Me){Ae(this,Se,Me)}).style("pointer-events","none").attr("x",dt?Ee:Ze).attr("y",dt?Ze:Te),un.append("rect").attr("class",f.legendItemEvent).style("fill-opacity","0").attr("x",dt?We:Ze).attr("y",dt?Ze:en);var Cn=o.config.legend_usePoint;if(Cn){var mn=[];un.append(function(Se){var Me=y(u.point_pattern)?u.point_pattern:[u.point_type];mn.indexOf(Se)===-1&&mn.push(Se);var Pe=Me[mn.indexOf(Se)%Me.length];return Pe==="rectangle"&&(Pe="rect"),document.createElementNS(w.namespaces.svg,o.hasValidPointType(Pe)?Pe:"use")}).attr("class",f.legendItemPoint).style("fill",function(Se){return o.color(Se)}).style("pointer-events","none").attr("href",function(Se,Me,Pe){var yn=Pe[Me],_n=yn.nodeName.toLowerCase();return _n==="use"?"#".concat(o.datetimeId,"-point-").concat(Se):void 0})}else un.append("line").attr("class",f.legendItemTile).style("stroke",o.color).style("pointer-events","none").attr("x1",dt?Ye:Ze).attr("y1",dt?Ze:Qe).attr("x2",dt?Xe:Ze).attr("y2",dt?Ze:Qe).attr("stroke-width",u.legend_item_tile_height);r=o.legend.select(".".concat(f.legendBackground," rect")),o.isLegendInset&&S>0&&r.size()===0&&(r=o.legend.insert("g",".".concat(f.legendItem)).attr("class",f.legendBackground).append("rect"));var tn=o.legend.selectAll("text").data(Vt).text(function(Se){return ft(u.data_names[Se])?u.data_names[Se]:Se}).each(function(Se,Me){Ae(this,Se,Me)});(he?tn.transition():tn).attr("x",Ee).attr("y",Te);var dn=o.legend.selectAll("rect.".concat(f.legendItemEvent)).data(Vt);if((he?dn.transition():dn).attr("width",function(Se){return L[Se]}).attr("height",function(Se){return I[Se]}).attr("x",We).attr("y",en),Cn){var Je=o.legend.selectAll(".".concat(f.legendItemPoint)).data(Vt);(he?Je.transition():Je).each(function(){var Se,Me,Pe,yn=this.nodeName.toLowerCase(),_n=o.config.point_r,Pn="x",Rn="y",In=2,Nn=2.5;if(yn==="circle"){var Yn=_n*.2;Pn="cx",Rn="cy",Se=_n+Yn,In=_n*2,Nn=-Yn}else if(yn==="rect"){var qn=_n*2.5;Me=qn,Pe=qn,Nn=3}Object(w.select)(this).attr(Pn,function(Fn){return Ye(Fn)+In}).attr(Rn,function(Fn){return Qe(Fn)-Nn}).attr("r",Se).attr("width",Me).attr("height",Pe)})}else{var cn=o.legend.selectAll("line.".concat(f.legendItemTile)).data(Vt);(he?cn.transition():cn).style("stroke",o.color).attr("x1",Ye).attr("y1",Qe).attr("x2",Xe).attr("y2",Qe)}r&&(he?r.transition():r).attr("height",o.getLegendHeight()-12).attr("width",S*($t+1)+10),o.updateLegendItemWidth(S),o.updateLegendItemHeight(D),o.updateLegendStep($t)}});var mt=function(){var s,e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"left",t=arguments.length>1?arguments[1]:void 0,n=_t(t);return s=e.indexOf("center")>-1?n?t/2:"middle":e.indexOf("right")>-1?n?t:"end":n?0:"start",s};Xt(nt.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",mt(e.config.title_position)).attr("class",f.title);ut(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(mt(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,i=n.title_position||"left";
14return/(right|center)/.test(i)?(e=t.currentWidth-t.getTextRect(t.title,f.title).width,i.indexOf("right")>=0?e-=n.title_padding.right||0:i.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,f.title).height},getTitlePadding:function(){var e=this;return e.yForTitle()+(e.config.title_padding.bottom||0)}}),Xt(nt.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 i=window.navigator.appVersion.toLowerCase().indexOf("msie 9.")>=0;return"url(".concat(i?"":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),i=Math.max(30,t.margin.right);return e?t.width+2+n+i: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)}}),Xt(nt.prototype,{initRegion:function(){var e=this;e.region=e.main.append("g").attr("clip-path",e.clipPath).attr("class",f.regions)},updateRegion:function(e){var t=this,n=t.config;t.region.style("visibility",t.hasArcType()?"hidden":"visible"),t.mainRegion=t.main.select(".".concat(f.regions)).selectAll(".".concat(f.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(i){return V(i.opacity)?i.opacity:"0.1"}).on("end",function(){Object(w.select)(this.parentNode).selectAll("rect:not([x])").remove()})]},getRegionXY:function(e,t){var n,i=this,r=i.config,o=r.axis_rotated,u=e==="x",d="start",O=0;return t.axis==="y"||t.axis==="y2"?(!u&&(d="end"),(u?o:!o)&&d in t&&(n=i[t.axis],O=n(t[d]))):(u?!o:o)&&d in t&&(n=i.zoomScale||i.x,O=n(i.isTimeSeries()?i.parseDate(t[d]):t[d])),O},regionX:function(e){return this.getRegionXY("x",e)},regionY:function(e){return this.getRegionXY("y",e)},getRegionSize:function(e,t){var n,i=this,r=i.config,o=r.axis_rotated,u=e==="width",d=i[u?"regionX":"regionY"](t),O="end",S=i[e];return t.axis==="y"||t.axis==="y2"?(!u&&(O="start"),(u?o:!o)&&O in t&&(n=i[t.axis],S=n(t[O]))):(u?!o:o)&&O in t&&(n=i.zoomScale||i.x,S=n(i.isTimeSeries()?i.parseDate(t[O]):t[O])),S<d?0:S-d},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"}}),Xt(nt.prototype,{drag:function(e){var t=this,n=t.config,i=t.main;if(!t.hasArcType()&&n.data_selection_enabled&&(!n.zoom_enabled||t.zoom.altDomain)&&n.data_selection_multiple){var r=Tt()(t.dragStart,2),o=r[0],u=r[1],d=Tt()(e,2),O=d[0],S=d[1],D=Math.min(o,O),c=Math.max(o,O),g=n.data_selection_grouped?t.margin.top:Math.min(u,S),L=n.data_selection_grouped?t.height:Math.max(u,S);i.select(".".concat(f.dragarea)).attr("x",D).attr("y",g).attr("width",c-D).attr("height",L-g),i.selectAll(".".concat(f.shapes)).selectAll(".".concat(f.shape)).filter(function(I){return n.data_selection_isselectable(I)}).each(function(I,ot){var st,$t=Object(w.select)(this),dt=$t.classed(f.SELECTED),Vt=$t.classed(f.INCLUDED),he=!1;if($t.classed(f.circle)){var ve=$t.attr("cx")*1,Ae=$t.attr("cy")*1;st=t.togglePoint,he=D<ve&&ve<c&&g<Ae&&Ae<L}else if($t.classed(f.bar)){var Ee=qt(this),We=Ee.x,Ae=Ee.y,Ye=Ee.width,Xe=Ee.height;st=t.togglePath,he=!(c<We||We+Ye<D)&&!(L<Ae||Ae+Xe<g)}else return;he^Vt&&($t.classed(f.INCLUDED,!Vt),$t.classed(f.SELECTED,!dt),st.call(t,!dt,$t,I,ot))})}},dragstart:function(e){var t=this,n=t.config;t.hasArcType()||!n.data_selection_enabled||(t.dragStart=e,t.main.select(".".concat(f.chart)).append("rect").attr("class",f.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(f.dragarea)).transition().duration(100).style("opacity","0").remove(),e.main.selectAll(".".concat(f.shape)).classed(f.INCLUDED,!1),e.setDragStatus(!1))},setDragStatus:function(e){this.dragging=e}});var Ft=j(23);Xt(nt.prototype,{selectPoint:function(e,t,n){var i=this,r=i.config,o=r.axis_rotated,u=(o?i.circleY:i.circleX).bind(i),d=(o?i.circleX:i.circleY).bind(i),O=i.pointSelectR.bind(i);_(r.data_onselected,i.api,t,e.node()),i.main.select(".".concat(f.selectedCircles).concat(i.getTargetSelectorSuffix(t.id))).selectAll(".".concat(f.selectedCircle,"-").concat(n)).data([t]).enter().append("circle").attr("class",function(){return i.generateClass(f.selectedCircle,n)}).attr("cx",u).attr("cy",d).attr("stroke",i.color).attr("r",function(S){return i.pointSelectR(S)*1.4}).transition().duration(100).attr("r",O)},unselectPoint:function(e,t,n){var i=this;_(i.config.data_onunselected,i.api,t,e.node()),i.main.select(".".concat(f.selectedCircles).concat(i.getTargetSelectorSuffix(t.id))).selectAll(".".concat(f.selectedCircle,"-").concat(n)).transition().duration(100).attr("r",0).remove()},togglePoint:function(e,t,n,i){var r="".concat(e?"":"un","selectPoint");this[r](t,n,i)},selectPath:function(e,t){var n=this,i=n.config;_(i.data_onselected,n,t,e.node()),i.interaction_brighten&&e.transition().duration(100).style("fill",function(){return Object(Ft.rgb)(n.color(t)).brighter(.75)})},unselectPath:function(e,t){var n=this,i=n.config;_(i.data_onunselected,n,t,e.node()),i.interaction_brighten&&e.transition().duration(100).style("fill",function(){return n.color(t)})},togglePath:function(e,t,n,i){this["".concat(e?"":"un","selectPath")](t,n,i)},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 i,r=this,o=r.config,u=Object(w.select)(e),d=u.classed(f.SELECTED),O=r.getToggle(e,t).bind(r);if(o.data_selection_enabled&&o.data_selection_isselectable(t)){if(!o.data_selection_multiple){var S=".".concat(f.shapes);o.data_selection_grouped&&(S+=r.getTargetSelectorSuffix(t.id)),r.main.selectAll(S).selectAll(".".concat(f.shape)).each(function(D,c){var g=Object(w.select)(this);g.classed(f.SELECTED)&&(i=g,O(!1,g.classed(f.SELECTED,!1),D,c))})}i&&i.node()===u.node()||(u.classed(f.SELECTED,!d),O(!d,u,t,n))}}}),Xt(nt.prototype,{initBrush:function(){var e=this,t=e.config,n=t.axis_rotated;e.brush=n?Object(gt.brushY)():Object(gt.brushX)();var i,r,o=function(){e.redrawForBrush()},u=function(){var d=e.svg.select(".".concat(f.brush," .overlay")),O={width:0,height:0};return d.size()&&(O.width=+d.attr("width"),O.height=+d.attr("height")),O[n?"width":"height"]};e.brush.on("start",function(){e.inputType==="touch"&&e.hideTooltip(),o()}).on("brush",o).on("end",function(){i=e.x.orgDomain()}),e.brush.updateResize=function(){var d=this;r&&clearTimeout(r),r=setTimeout(function(){var O=d.getSelection();i&&Object(gt.brushSelection)(O.node())&&d.move(O,i.map(e.subX.orgScale()))},0)},e.brush.update=function(){var d=this.extent()();return d[1].filter(function(O){return isNaN(O)}).length===0&&e.context&&e.context.select(".".concat(f.brush)).call(this),this},e.brush.scale=function(d){var O=t.subchart_size_height||u(),S=e.getExtent();!S&&d.range?S=[[0,0],[d.range()[1],O]]:$(S)&&(S=S.map(function(D,c){return[D,c>0?O:c]})),n&&S[1].reverse(),this.extent(S),this.update()},e.brush.getSelection=function(){return e.context?e.context.select(".".concat(f.brush)):Object(w.select)([])}},initSubchart:function(){var e=this,t=e.config,n=t.subchart_show?"visible":"hidden",i="".concat(e.clipId,"-subchart"),r=e.getClipPath(i);e.clipIdForSubchart=i,e.appendClip(e.defs,i),e.initBrush(),e.context=e.svg.append("g").attr("transform",e.getTranslate("context"));var o=e.context;o.style("visibility",n),o.append("g").attr("clip-path",r).attr("class",f.chart),e.hasType("bar")&&o.select(".".concat(f.chart)).append("g").attr("class",f.chartBars),o.select(".".concat(f.chart)).append("g").attr("class",f.chartLines),o.append("g").attr("clip-path",r).attr("class",f.brush).call(e.brush),e.axes.subx=o.append("g").attr("class",f.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,i=t.config,r=t.classChartBar.bind(t),o=t.classBars.bind(t),u=t.classChartLine.bind(t),d=t.classLines.bind(t),O=t.classAreas.bind(t);if(i.subchart_show){var S=n.select(".".concat(f.chartBars)).selectAll(".".concat(f.chartBar)).data(e).attr("class",r),D=S.enter().append("g").style("opacity","0").attr("class",r).merge(S);D.append("g").attr("class",o);var c=n.select(".".concat(f.chartLines)).selectAll(".".concat(f.chartLine)).data(e).attr("class",u),g=c.enter().append("g").style("opacity","0").attr("class",u).merge(c);g.append("g").attr("class",d),t.hasType("area")&&g.append("g").attr("class",O),n.selectAll(".".concat(f.brush," rect")).attr(i.axis_rotated?"width":"height",i.axis_rotated?t.width2:t.height2)}},updateBarForSubchart:function(e){var t=this;t.contextBar=t.context.selectAll(".".concat(f.bars)).selectAll(".".concat(f.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 i=t?this.contextBar.transition(le()).duration(n):this.contextBar;i.attr("d",e).style("opacity","1")},updateLineForSubchart:function(e){var t=this;t.contextLine=t.context.selectAll(".".concat(f.lines)).selectAll(".".concat(f.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 i=t?this.contextLine.transition(le()).duration(n):this.contextLine;i.attr("d",e).style("opacity","1")},updateAreaForSubchart:function(e){var t=this;t.contextArea=t.context.selectAll(".".concat(f.areas)).selectAll(".".concat(f.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(w.select)(this).style("opacity"),"0"}).merge(t.contextArea).style("opacity","0")},redrawAreaForSubchart:function(e,t,n){var i=t?this.contextArea.transition(le()).duration(n):this.contextArea;i.attr("d",e).style("fill",this.color).style("opacity",this.orgAreaOpacity)},redrawSubchart:function(e,t,n){var i=this,r=i.config;i.context.style("visibility",r.subchart_show?"visible":"hidden"),r.subchart_show&&(w.event&&w.event.type==="zoom"&&i.brush.update(),e&&(!Qt(i)&&i.brush.update(),Object.keys(n.type).forEach(function(o){var u=be(o),d=i["generateDraw".concat(u)](n.indices[o],!0);i["update".concat(u,"ForSubchart")](t),i["redraw".concat(u,"ForSubchart")](d,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,i=this;t&&t.axisSubX?n=t.axisSubX:(n=i.context.select(".".concat(f.axisX)),e&&(n=n.transition())),i.context.attr("transform",i.getTranslate("context")),n.attr("transform",i.getTranslate("subx"))},getExtent:function(){var e=this,t=e.config.axis_x_extent;return t&&(Lt(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 lt=j(24);Xt(nt.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 i=t.main.select(".".concat(f.eventRects));n&&e?t.bindZoomOnEventRect(i,n.type):e===!1&&(t.api.unzoom(),i.on(".zoom",null).on(".drag",null))},generateZoom:function(){var e=this,t=e.config,n=Object(lt.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 i=t.zoom_extent||[1,10];return[i[0],Math.max(e.getMaxDataCount()/i[1],i[1])]},n.updateScaleExtent=function(){var i=ue(e.x.orgDomain())/ue(e.getZoomDomain()),r=this.orgScaleExtent();return this.scaleExtent([r[0]*i,r[1]*i]),this},n.updateTransformScale=function(i){e.orgXScale&&e.orgXScale.range(e.x.range());var r=i[t.axis_rotated?"rescaleY":"rescaleX"](e.orgXScale||e.x),o=e.trimXDomain(r.domain()),u=t.zoom_rescale;r.domain(o,e.orgXDomain),e.zoomScale=e.getCustomizedScale(r),e.xAxis.scale(e.zoomScale),u&&(!e.orgXScale&&(e.orgXScale=e.x.copy()),e.x.domain(o))},e.zoom=n},onZoomStart:function(){var e=this,t=w.event.sourceEvent;t&&(e.zoom.startEvent=t,_(e.config.zoom_onzoomstart,e.api,t))},onZoom:function(){var e=this,t=e.config,n=w.event;if(t.zoom_enabled&&n.sourceEvent&&e.filterTargetsToShow(e.data.targets).length!==0){var i=n.sourceEvent.type==="mousemove",r=n.sourceEvent.wheelDelta<0,o=n.transform;!i&&r&&e.x.domain().every(function(u,d){return u!==e.orgXDomain[d]})&&e.x.domain(e.orgXDomain),e.zoom.updateTransformScale(o),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=i,_(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(),_(e.config.zoom_onzoomend,e.api,e[e.zoomScale?"zoomScale":"subX"].domain()))},getZoomDomain:function(){var e=this,t=e.config,n=Tt()(e.orgXDomain,2),i=n[0],r=n[1];return ft(t.zoom_x_min)&&(i=tt("min",[i,t.zoom_x_min])),ft(t.zoom_x_max)&&(r=tt("max",[r,t.zoom_x_max])),[i,r]},updateZoom:function(e){var t=this;if(t.zoomScale){var n=t.zoomScale.domain(),i=t.subX.domain(),r=.015,o=(n[0]<=i[0]||n[0]-r<=i[0])&&(i[1]<=n[1]||i[1]<=n[1]-r);(e||o)&&(t.xAxis.scale(t.subX),t.x.domain(t.subX.orgDomain()),t.zoomScale=null)}},bindZoomOnEventRect:function(e,t){var n=this,i=t==="drag"?n.zoomBehaviour:n.zoom;e.call(i).on("dblclick.zoom",null)},initZoomBehaviour:function(){var e=this,t=e.config,n=t.axis_rotated,i=0,r=0,o=null,u={axis:n?"y":"x",attr:n?"height":"width",index:n?1:0};e.zoomBehaviour=Object(H.drag)().clickDistance(4).on("start",function(){e.setDragStatus(!0),o||(o=e.main.append("rect").attr("clip-path",e.clipPath).attr("class",f.zoomBrush).attr("width",n?e.width:0).attr("height",n?0:e.he
14ight)),i=Object(w.mouse)(this)[u.index],r=i,o.attr(u.axis,i).attr(u.attr,0),e.onZoomStart()}).on("drag",function(){r=Object(w.mouse)(this)[u.index],o.attr(u.axis,Math.min(i,r)).attr(u.attr,Math.abs(r-i))}).on("end",function(){var d,O=e.zoomScale||e.x;if(e.setDragStatus(!1),o.attr(u.axis,0).attr(u.attr,0),i>r&&(d=[r,i],i=d[0],r=d[1]),i<0&&(r+=Math.abs(i),i=0),i!==r)e.api.zoom([i,r].map(function(ot){return O.invert(ot)})),e.onZoomEnd();else if(e.isMultipleX())e.clickHandlerForMultipleXS.bind(this)(e);else{var S=w.event.sourceEvent||w.event,D="clientX"in S?[S.clientX,S.clientY]:[S.x,S.y],c=Tt()(D,2),g=c[0],L=c[1],I=document.elementFromPoint(g,L);e.clickHandlerForSingleX.bind(I)(Object(w.select)(I).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(f.button,!0).append("span").on("click",e.api.unzoom.bind(e)).classed(f.buttonZoomReset,!0).text(n.text||"Reset Zoom"))}});var jt=function(s,e,t){var n=Object(w.select)(s.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()}},re=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Xt(nt.prototype,{getColorFromCss:function(){var e=document.body,t=e.__colorPattern__;if(!t){var n=document.createElement("span");n.className=f.colorPattern,n.style.display="none",e.appendChild(n);var i=window.getComputedStyle(n).backgroundImage;n.parentNode.removeChild(n),i.indexOf(";")>-1&&(t=i.replace(/url[^#]*|["'()]|(\s|%20)/g,"").split(";").map(function(r){return r.trim().replace(/[\"'\s]/g,"")}).filter(Boolean),e.__colorPattern__=t)}return t},generateColor:function(){var e=this,t=e.config,n=t.data_colors,i=t.data_color,r=[],o=y(t.color_pattern)?t.color_pattern:Object(oe.scaleOrdinal)(e.getColorFromCss()||re).range(),u=o;if(Lt(t.color_tiles)){var d=t.color_tiles(),O=o.map(function(S,D){var c=S.replace(/[#\(\)\s,]/g,""),g="".concat(e.datetimeId,"-pattern-").concat(c,"-").concat(D);return jt(d[D%d.length],S,g)});o=O.map(function(S){return"url(#".concat(S.id,")")}),e.patterns=O}return function(S){var D,c=S.id||S.data&&S.data.id||S,g=e.isTypeOf(c,["line","spline","step"])||!e.config.data_types[c];return Lt(n[c])?D=n[c](S):n[c]?D=n[c]:(r.indexOf(c)<0&&r.push(c),D=g?u[r.indexOf(c)%u.length]:o[r.indexOf(c)%o.length],n[c]=D),Lt(i)?i(D,S):D}},generateLevelColor:function(){var e=this,t=e.config,n=t.color_pattern,i=t.color_threshold,r=i.unit==="value",o=i.max||100,u=i.values&&i.values.length?i.values:[];return y(i)?function(d){for(var O=n[n.length-1],S,D,c=0;D=u[c];c++)if(S=r?d:d*100/o,S<D){O=n[c];break}return O}:null},setOverColor:function(e,t){var n=this,i=n.config,r=i.color_onover,o=e?r:n.color;x(o)?o=function(u){var d=u.id;return d in r?r[d]:n.color(d)}:at(o)&&(o=function(){return r}),x(t)?n.main.selectAll(".".concat(f.arc,"-").concat(t.id)).style("fill",o(t)):n.main.selectAll(".".concat(f.shape,"-").concat(t)).each(function(u){var d=o(u);this.style.stroke=d,this.style.fill=d})}});var ce=function(s,e,t){var n=s.config,i="axis_".concat(e,"_tick_format"),r=n[i]?n[i]:s.defaultValueFormat;return r(t)};Xt(nt.prototype,{getYFormat:function(e){var t=this,n=t.yFormat,i=t.y2Format;return e&&!t.hasType("gauge")&&(n=t.defaultArcValueFormat,i=t.defaultArcValueFormat),function(r,o,u){var d=t.axis.getId(u)==="y2"?i:n;return d.call(t,r,o)}},yFormat:function(e){return ce(this,"y",e)},y2Format:function(e){return ce(this,"y2",e)},defaultValueFormat:function(e){return V(e)?+e:""},defaultArcValueFormat:function(e,t){return"".concat((t*100).toFixed(1),"%")},dataLabelFormat:function(e){var t=this,n=t.config.data_labels,i=function(o){return V(o)?+o:""},r=i;return Lt(n.format)?r=n.format:ie(n.format)&&(n.format[e]?r=n.format[e]===!0?i:n.format[e]:r=function(){return""}),r}}),Xt(nt.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;ee(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=[],i,r=0;i=e[r];r++)i in this.cache&&n.push(this.cloneTarget(this.cache[i]));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)}}),Xt(nt.prototype,{generateClass:function(e,t){return" ".concat(e," ").concat(e+this.getTargetSelectorSuffix(t))},classText:function(e){return this.generateClass(f.text,e.index)},classTexts:function(e){return this.generateClass(f.texts,e.id)},classShape:function(e){return this.generateClass(f.shape,e.index)},classShapes:function(e){return this.generateClass(f.shapes,e.id)},generateExtraLineClass:function(){var e=this,t=e.config.line_classes||[],n=[];return function(i){var r=i.id||i.data&&i.data.id||i;return n.indexOf(r)<0&&n.push(r),t[n.indexOf(r)%t.length]}},classLine:function(e){return this.classShape(e)+this.generateClass(f.line,e.id)},classLines:function(e){return this.classShapes(e)+this.generateClass(f.lines,e.id)},classCircle:function(e){return this.classShape(e)+this.generateClass(f.circle,e.index)},classCircles:function(e){return this.classShapes(e)+this.generateClass(f.circles,e.id)},classBar:function(e){return this.classShape(e)+this.generateClass(f.bar,e.index)},classBars:function(e){return this.classShapes(e)+this.generateClass(f.bars,e.id)},classArc:function(e){return this.classShape(e.data)+this.generateClass(f.arc,e.data.id)},classArcs:function(e){return this.classShapes(e.data)+this.generateClass(f.arcs,e.data.id)},classArea:function(e){return this.classShape(e)+this.generateClass(f.area,e.id)},classAreas:function(e){return this.classShapes(e)+this.generateClass(f.areas,e.id)},classRegion:function(e,t){return"".concat(this.generateClass(f.region,t)," ").concat("class"in e?e.class:"")},classEvent:function(e){return this.generateClass(f.eventRect,e.index)},classTarget:function(e){var t=this.config.data_classes[e],n="";return t&&(n=" ".concat(f.target,"-").concat(t)),this.generateClass(f.target,e)+n},classFocus:function(e){return this.classFocused(e)+this.classDefocused(e)},classFocused:function(e){return" ".concat(this.focusedTargetIds.indexOf(e.id)>=0?f.focused:"")},classDefocused:function(e){return" ".concat(this.defocusedTargetIds.indexOf(e.id)>=0?f.defocused:"")},classChartText:function(e){return f.chartText+this.classTarget(e.id)},classChartLine:function(e){return f.chartLine+this.classTarget(e.id)},classChartBar:function(e){return f.chartBar+this.classTarget(e.id)},classChartArc:function(e){return f.chartArc+this.classTarget(e.data.id)},classChartRadar:function(e){return f.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(f.target+this.getTargetSelectorSuffix(e))},selectorTargets:function(e,t){var n=this,i=e||[];return i.length?i.map(function(r){return n.selectorTarget(r,t)}):null},selectorLegend:function(e){return".".concat(f.legendItem+this.getTargetSelectorSuffix(e))},selectorLegends:function(e){var t=this;return e&&e.length?e.map(function(n){return t.selectorLegend(n)}):null}}),Xt(Bt.prototype,{focus:function(e){var t=this.internal,n=t.mapToTargetIds(e),i=t.svg.selectAll(t.selectorTargets(n.filter(t.isTargetToShow,t)));this.revert(),this.defocus(),i.classed(f.focused,!0).classed(f.defocused,!1),t.hasArcType()&&t.expandArc(n),t.toggleFocusLegend(n,!0),t.focusedTargetIds=n,t.defocusedTargetIds=t.defocusedTargetIds.filter(function(r){return n.indexOf(r)<0})},defocus:function(e){var t=this.internal,n=t.mapToTargetIds(e),i=t.svg.selectAll(t.selectorTargets(n.filter(t.isTargetToShow,t)));i.classed(f.focused,!1).classed(f.defocused,!0),t.hasArcType()&&t.unexpandArc(n),t.toggleFocusLegend(n,!1),t.focusedTargetIds=t.focusedTargetIds.filter(function(r){return n.indexOf(r)<0}),t.defocusedTargetIds=n},revert:function(e){var t=this.internal,n=t.mapToTargetIds(e),i=t.svg.selectAll(t.selectorTargets(n));i.classed(f.focused,!1).classed(f.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(w.select)(this).classed(f.legendItemFocused)}).classed(f.legendItemFocused,!1)),t.focusedTargetIds=[],t.defocusedTargetIds=[]}}),Xt(Bt.prototype,{_showHide:function(e,t,n){var i=this.internal,r=i.mapToTargetIds(t);i["".concat(e?"remove":"add","HiddenTargetIds")](r);var o=i.svg.selectAll(i.selectorTargets(r)),u=e?"1":"0";o.transition().style("opacity",u,"important").call(i.endall,function(){o.style("opacity",null).style("opacity",u)}),n.withLegend&&i["".concat(e?"show":"hide","Legend")](r),i.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]:{},i=this.internal,r={show:[],hide:[]};i.mapToTargetIds(e).forEach(function(o){return r[i.isTargetToShow(o)?"hide":"show"].push(o)}),r.show.length&&this.show(r.show,n),r.hide.length&&setTimeout(function(){return t.hide(r.hide,n)},0)}});var ye=function(s,e){var t=Tt()(e,2),n=t[0],i=t[1];return s.every(function(r,o){return o===0?r>=n:r<=i})},Ne=function(s){var e,t=this.internal,n=s;if(t.config.zoom_enabled&&n&&ye(n,t.getZoomDomain())){var i=t.isTimeSeries();if(i&&(n=n.map(function(o){return t.parseDate(o)})),t.config.subchart_show){var r=t.zoomScale||t.x;t.brush.getSelection().call(t.brush.move,[r(n[0]),r(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(),_(t.config.zoom_onzoom,e)}else e=t.zoomScale?t.zoomScale.domain():t.x.orgDomain();return e};Xt(Ne,{enable:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"wheel",t=this.internal,n=t.config,i=e;e&&(i=at(e)&&/^(drag|wheel)$/.test(e)?{type:e}:e),n.zoom_enabled=i,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=tt("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=tt("min",[t.orgXDomain[0],e])),n.zoom_x_min},range:function(e){var t=this.zoom;if(x(e)){var n=e.min,i=e.max;ft(n)&&t.min(n),ft(i)&&t.max(i)}return{min:t.min(),max:t.max()}}}),Xt(Bt.prototype,{zoom:Ne,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(lt.zoomIdentity),e.updateZoom(!0),e.zoom.resetBtn&&e.zoom.resetBtn.style("display","none");var n=e.main.select(".".concat(f.eventRects));Object(lt.zoomTransform)(n.node())!==lt.zoomIdentity&&e.zoom.transform(n,lt.zoomIdentity),e.redraw({withTransition:!0,withUpdateXDomain:!0,withUpdateOrgXDomain:!0,withY:t.zoom_rescale})}}}),Xt(Bt.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(i){n.data_classes[i]=e.classes[i]}),"categories"in e&&t.isCategorized()&&(n.axis_x_categories=e.categories),"axes"in e&&Object.keys(e.axes).forEach(function(i){n.data_axes[i]=e.axes[i]}),"colors"in e&&Object.keys(e.colors).forEach(function(i){n.data_colors[i]=e.colors[i]}),"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||{};$(n)?n={ids:n}:at(n)&&(n={ids:[n]});var i=t.mapToTargetIds(n.ids);t.unload(i,function(){t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0,withLegend:!0}),t.removeCache(i),n.done&&n.done()})}});var Ue=j(25);Xt(Bt.prototype,{flow:function(e){var t,n,i,r,o=this.internal,u=0,d=0;if((e.json||e.rows||e.columns)&&(t=o.convertData(e)),t&&o.isTabVisible()){var O=[],S=o.getMaxDataCount(),D=o.convertDataToTargets(t,!0);o.data.targets.forEach(function(L){for(var I=!1,ot=0;ot<D.length;ot++)if(L.id===D[ot].id){I=!0,L.values[L.values.length-1]&&(d=L.values[L.values.length-1].index+1),u=D[ot].values.length;for(var st=0;st<u;st++)D[ot].values[st].index=d+st,o.isTimeSeries()||(D[ot].values[st].x=d+st);L.values=L.values.concat(D[ot].values),D.splice(ot,1);break}I||O.push(L.id)}),o.data.targets.forEach(function(L){for(var I=0;I<O.length;I++)if(L.id===O[I]){d=L.values[L.values.length-1].index+1;for(var ot=0;ot<u;ot++)L.values.push({id:L.id,index:d+ot,x:o.isTimeSeries()?o.getOtherTargetX(d+ot):d+ot,value:null})}}),o.data.targets.length&&D.forEach(function(L){for(var I=[],ot=o.data.targets[0].values[0].index;ot<d;ot++)I.push({id:L.id,index:ot,x:o.isTimeSeries()?o.getOtherTargetX(ot):ot,value:null});L.values.forEach(function(st){st.index+=d,o.isTimeSeries()||(st.x+=d)}),L.values=I.concat(L.values)}),o.data.targets=o.data.targets.concat(D);var c=o.data.targets[0],g=c.values[0];ft(e.to)?(u=0,r=o.isTimeSeries()?o.parseDate(e.to):e.to,c.values.forEach(function(L){L.x<r&&u++})):ft(e.length)&&(u=e.length),S?S===1&&o.isTimeSeries()&&(i=(c.values[c.values.length-1].x-g.x)/2,n=[new Date(+g.x-i),new Date(+g.x+i)]):(i=o.isTimeSeries()?c.values.length>1?c.values[c.values.length-1].x-g.x:g.x-o.getXDomain(o.data.targets)[0]:1,n=[g.x-i,g.x]),n&&o.updateXDomain(null,!0,!0,!1,n),o.updateTargets(o.data.targets),o.redraw({flow:{index:g.index,length:u,duration:V(e.duration)?e.duration:o.config.transition_duration,done:e.done,orgDataCount:S},withLegend:!0,withTransition:S>1,withTrimXDomain:!1,withUpdateXAxis:!0})}}}),Xt(nt.prototype,{generateFlow:function(e){var t=this,n=t.config;return function(){var i,r=e.targets,o=e.flow,u=e.shape.type,d=u.bar,O=u.line,S=u.area,D=e.shape.pos,c=D.cx,g=D.cy,L=D.xForText,I=D.yForText,ot=e.xv,st=e.duration,$t=1,dt=o.index,Vt=o.length,he=t.getValueOnIndex(t.data.targets[0].values,dt),ve=t.getValueOnIndex(t.data.targets[0].values,dt+Vt),Ae=t.x.domain(),Ee=o.duration||st,We=o.done||function(){},Ye=t.generateWait(),Xe=t.xgrid||Object(w.selectAll)([]),Te=t.xgridLines||Object(w.selectAll)([]),en=t.mainReg
14ion||Object(w.selectAll)([]),Qe=t.mainText||Object(w.selectAll)([]),Ze=t.mainBar||Object(w.selectAll)([]),un=t.mainLine||Object(w.selectAll)([]),Cn=t.mainArea||Object(w.selectAll)([]),mn=t.mainCircle||Object(w.selectAll)([]);t.flowing=!0,t.data.targets.forEach(function(cn){cn.values.splice(0,Vt)});var tn=t.updateXDomain(r,!0,!0);t.updateXGrid&&t.updateXGrid(!0),o.orgDataCount?o.orgDataCount===1||(he&&he.x)===(ve&&ve.x)||t.isTimeSeries()?i=t.x(Ae[0])-t.x(tn[0]):i=t.x(he.x)-t.x(ve.x):t.data.targets[0].values.length===1?t.isTimeSeries()?(he=t.getValueOnIndex(t.data.targets[0].values,0),ve=t.getValueOnIndex(t.data.targets[0].values,t.data.targets[0].values.length-1),i=t.x(he.x)-t.x(ve.x)):i=ue(tn)/2:i=t.x(Ae[0])-t.x(tn[0]),$t=ue(Ae)/ue(tn);var dn="translate(".concat(i,",0) scale(").concat($t,",1)");t.hideXGridFocus();var Je=Object(R.transition)().ease(Ue.easeLinear).duration(Ee);Ye.add([t.axes.x.transition(Je).call(function(cn){return t.xAxis.setTransition(Je).create(cn)}),Ze.transition(Je).attr("transform",dn),un.transition(Je).attr("transform",dn),Cn.transition(Je).attr("transform",dn),mn.transition(Je).attr("transform",dn),Qe.transition(Je).attr("transform",dn),en.filter(t.isRegionOnX).transition(Je).attr("transform",dn),Xe.transition(Je).attr("transform",dn),Te.transition(Je).attr("transform",dn)]),Je.call(Ye,function(){var cn=[],Se=[],Me=[];if(Vt){for(var Pe,yn=0;yn<Vt;yn++)Pe=dt+yn,cn.push(".".concat(f.shape,"-").concat(Pe)),Se.push(".".concat(f.text,"-").concat(Pe)),Me.push(".".concat(f.eventRect,"-").concat(Pe));t.svg.selectAll(".".concat(f.shapes)).selectAll(cn).remove(),t.svg.selectAll(".".concat(f.texts)).selectAll(Se).remove(),t.svg.selectAll(".".concat(f.eventRects)).selectAll(Me).remove(),t.svg.select(".".concat(f.xgrid)).remove()}if(Xe.size()&&Xe.attr("transform",null).attr(t.xgridAttr),Te.attr("transform",null),Te.select("line").attr("x1",n.axis_rotated?0:ot).attr("x2",n.axis_rotated?t.width:ot),Te.select("text").attr("x",n.axis_rotated?t.width:0).attr("y",ot),Ze.attr("transform",null).attr("d",d),un.attr("transform",null).attr("d",O),Cn.attr("transform",null).attr("d",S),mn.attr("transform",null),t.isCirclePoint())mn.attr("cx",c).attr("cy",g);else{var _n=function(Rn){return c(Rn)-n.point_r},Pn=function(Rn){return g(Rn)-n.point_r};mn.attr("x",_n).attr("y",Pn).attr("cx",c).attr("cy",g)}Qe.attr("transform",null).attr("x",L).attr("y",I).style("fill-opacity",t.opacityForText.bind(t)),en.attr("transform",null),en.select("rect").filter(t.isRegionOnX).attr("x",t.regionX.bind(t)).attr("width",t.regionWidth.bind(t)),n.interaction_enabled&&t.redrawEventRect(),We(),t.flowing=!1})}}}),Xt(Bt.prototype,{selected:function(e){var t=this.internal,n=[];return t.main.selectAll(".".concat(f.shapes+t.getTargetSelectorSuffix(e))).selectAll(".".concat(f.shape)).filter(function(){return Object(w.select)(this).classed(f.SELECTED)}).each(function(i){return n.push(i)}),n},select:function(e,t,n){var i=this.internal,r=i.config;r.data_selection_enabled&&i.main.selectAll(".".concat(f.shapes)).selectAll(".".concat(f.shape)).each(function(o,u){var d=Object(w.select)(this),O=o.data?o.data.id:o.id,S=i.getToggle(this,o).bind(i),D=r.data_selection_grouped||!e||e.indexOf(O)>=0,c=!t||t.indexOf(u)>=0,g=d.classed(f.SELECTED);d.classed(f.line)||d.classed(f.area)||(D&&c?r.data_selection_isselectable(o)&&!g&&S(!0,d.classed(f.SELECTED,!0),o,u):ft(n)&&n&&g&&S(!1,d.classed(f.SELECTED,!1),o,u))})},unselect:function(e,t){var n=this.internal,i=n.config;i.data_selection_enabled&&n.main.selectAll(".".concat(f.shapes)).selectAll(".".concat(f.shape)).each(function(r,o){var u=Object(w.select)(this),d=r.data?r.data.id:r.id,O=n.getToggle(this,r).bind(n),S=i.data_selection_grouped||!e||e.indexOf(d)>=0,D=!t||t.indexOf(o)>=0,c=u.classed(f.SELECTED);u.classed(f.line)||u.classed(f.area)||S&&D&&i.data_selection_isselectable(r)&&c&&O(!1,u.classed(f.SELECTED,!1),r,o)})}});function fn(s,e,t){var n=this,i=t||{withTransitionForAxis:!n.hasArcType()};i.withTransitionForTransform=!1,n.transiting=!1,n.setTargetType(s,e),n.updateTargets(n.data.targets),n.updateAndRedraw(i)}Xt(Bt.prototype,{transform:function(e,t){var n=this.internal,i=["pie","donut"].indexOf(e)>=0?{withTransform:!0}:null;fn.bind(n)(t,e,i)}}),Xt(Bt.prototype,{groups:function(e){var t=this.internal,n=t.config;return bt(e)||(n.data_groups=e,t.redraw()),n.data_groups}});
14var sn=function(s){var e=this.internal,t=e.config;return s&&(t.grid_x_lines=s,e.redrawWithoutRescale()),t.grid_x_lines};Xt(sn,{add:function(e){return this.xgrids(this.internal.config.grid_x_lines.concat(e||[]))},remove:function(e){this.internal.removeGridLines(e,!0)}});var on=function(s){var e=this.internal,t=e.config;return s&&(t.grid_y_lines=s,e.redrawWithoutRescale()),t.grid_y_lines};Xt(on,{add:function(e){return this.ygrids(this.internal.config.grid_y_lines.concat(e||[]))},remove:function(e){this.internal.removeGridLines(e,!1)}}),Xt(Bt.prototype,{xgrids:sn,ygrids:on});var gn=function(s){var e=this.internal,t=e.config;return s?(t.regions=s,e.redrawWithoutRescale(),s):t.regions};Xt(gn,{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,i=e||{},r=A(i,"duration",n.transition_duration),o=A(i,"classes",[f.region]),u=t.main.select(".".concat(f.regions)).selectAll(o.map(function(d){return".".concat(d)}));return(r?u.transition().duration(r):u).style("opacity","0").remove(),u=n.regions,Object.keys(i).length?(u=u.filter(function(d){var O=!1;return!d.class||(d.class.split(" ").forEach(function(S){o.indexOf(S)>=0&&(O=!0)}),!O)}),n.regions=u):n.regions=[],u}}),Xt(Bt.prototype,{regions:gn});var $n=function(s){var e=this.internal.data.targets;return bt(s)?e:e.filter(function(t){return s.indexOf(t.id)>=0})};Xt($n,{shown:function(e){return this.internal.filterTargetsToShow(this.data(e))},values:function(s){var e=!(arguments.length>1&&arguments[1]!==void 0)||arguments[1],t=null;if(s){var n=this.data(s);n&&$(n)&&(t=[],n.forEach(function(i){var r=i.values.map(function(o){return o.value});e?t=t.concat(r):t.push(r)}))}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}}),Xt(Bt.prototype,{data:$n}),Xt(Bt.prototype,{category:function(e,t){var n=this.internal,i=n.config;return arguments.length>1&&(i.axis_x_categories[e]=t,n.redraw()),i.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}}),Xt(Bt.prototype,{color:function(e){return this.internal.color(e)}}),Xt(Bt.prototype,{x:function(e){var t=this.internal,n=t.isCustomX()&&t.isCategorized();return $(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 x(e)&&(t.updateTargetXs(t.data.targets,e),t.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),t.data.xs}});var Sn=function(s,e,t){var n=s.config,i="axis_x_".concat(e),r="axis_y_".concat(e),o="axis_y2_".concat(e);return ft(t)&&(ie(t)?(V(t.x)&&(n[i]=t.x),V(t.y)&&(n[r]=t.y),V(t.y2)&&(n[o]=t.y2)):(n[r]=t,n[o]=t),s.redraw({withUpdateOrgXDomain:!0,withUpdateXDomain:!0})),void 0},Ve=function(s,e){var t=s.config;return{x:t["axis_x_".concat(e)],y:t["axis_y_".concat(e)],y2:t["axis_y2_".concat(e)]}},An=Xt(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?Sn(t,"min",e):Ve(t,"min")},max:function(e){var t=this.internal;return arguments.length?Sn(t,"max",e):Ve(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()}}});Xt(Bt.prototype,{axis:An});var pn=Xt(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})}});Xt(Bt.prototype,{legend:pn}),Xt(Bt.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 y(t)&&(t.callPluginHook("$willDestroy"),t.charts.splice(t.charts.indexOf(this),1),t.svg.select("*").interrupt(),ft(t.resizeTimeout)&&an.b.clearTimeout(t.resizeTimeout),an.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(i){t[i]=null}),e[n]=null,delete e[n]})),null},config:function(e,t,n){var i,r=this.internal,o=e&&e.replace(/\./g,"_");return o in r.config&&(ft(t)?(r.config[o]=t,i=t,n&&this.flush()):i=r.config[o]),i}});var wn=Xt(function(){},{show:function(){var e,t,n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=this.internal;if(n.mouse&&(t=n.mouse),n.data){var r=i.getYScale(n.data.id)(n.data.value);i.isMultipleX()?t=[i.x(n.data.x),r]:(!i.config.tooltip_grouped&&(t=[0,r]),e=V(n.data.index)?n.data.index:i.getIndexByX(n.data.x))}else ft(n.x)?e=i.getIndexByX(n.x):ft(n.index)&&(e=n.index);(i.inputType==="mouse"?["mouseover","mousemove"]:["touchstart"]).forEach(function(o){i.dispatchEvent(o,e,t)})},hide:function(){var e=this.internal;e.hideTooltip(!0),e.hideXGridFocus(),e.unexpandCircles(),e.unexpandBars()}});Xt(Bt.prototype,{tooltip:wn});var U=function(s){return btoa(encodeURIComponent(s).replace(/%([0-9A-F]{2})/g,function(e,t){return String.fromCharCode("0x".concat(t))}))},St=function(s,e){var t=new XMLSerializer,n=s.cloneNode(!0),i=Ce(ee(document.styleSheets)).filter(function(O){return O.cssText}).map(function(O){return O.cssText});n.setAttribute("xmlns",w.namespaces.xhtml);var r=t.serializeToString(n),o=document.createElement("style");o.appendChild(document.createTextNode(i.join(` 15`)));var u=t.serializeToString(o),d='<svg xmlns="'.concat(w.namespaces.svg,'" width="').concat(e.width,'" height="').concat(e.height,`"> 16 <foreignObject width="100%" height="100%"> 17 `).concat(u,` 18 `).concat(r.replace(/(url\()[^#]+/g,"$1"),` 19 </foreignObject></svg>`).replace(`/ 20/g`,"%0A");return"data:image/svg+xml;base64,".concat(U(d))};Xt(Bt.prototype,{export:function(e,t){var n=this.internal,i={width:n.currentWidth,height:n.currentHeight},r=St(this.element,i);if(Lt(t)){var o=new Image;o.crosssOrigin="Anonymous",o.onload=function(){var u=document.createElement("canvas"),d=u.getContext("2d");u.width=i.width,u.height=i.height,d.drawImage(o,0,0),t(u.toDataURL(e))},o.src=r}return r}});var se=j(26);j.d(Pt,"bb",function(){return we});var _e={},we={version:"1.9.1",generate:function(e){var t=l({},_e,e),n=new Bt(t);return n.internal.charts=this.instance,this.instance.push(n),n},defaults:function(e){return x(e)&&(_e=e),_e},instance:[],plugin:{},chart:{fn:Bt.prototype,internal:{fn:nt.prototype,axis:{fn:He.prototype}}}},Re=Pt.default=we}])})});var Kn={};ms(Kn,{default:()=>xs});import*as du from"../../../frontend-js-react-web/__liferay__/exports/react.js";import _s from"../../../frontend-js-react-web/__liferay__/exports/react.js";var xs,Ii=vs(()=>{Ei(Kn,du);xs=_s});var xa=hn(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Rr.default=void 0;var bs=_a(),si=As((Ii(),er(Kn))),ws=["forwardRef","elementProps"],Ts=["data","onafterinit"];function As(a){return a&&a.__esModule?a:{default:a}}function Or(){return Or=Object.assign?Object.assign.bind():function(a){for(var v=1;v<arguments.length;v++){var B=arguments[v];for(var Y in B)Object.prototype.hasOwnProperty.call(B,Y)&&(a[Y]=B[Y])}return a},Or.apply(this,arguments)}function vo(a,v){var B=Object.keys(a);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(a);v&&(Y=Y.filter(function(kt){return Object.getOwnPropertyDescriptor(a,kt).enumerable})),B.push.apply(B,Y)}return B}function Ms(a){for(var v=1;v<arguments.length;v++){var B=arguments[v]!=null?arguments[v]:{};v%2?vo(Object(B),!0).forEach(function(Y){Ss(a,Y,B[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(B)):vo(Object(B)).forEach(function(Y){Object.defineProperty(a,Y,Object.getOwnPropertyDescriptor(B,Y))})}return a}function Ss(a,v,B){return v in a?Object.defineProperty(a,v,{value:B,enumerable:!0,configurable:!0,writable:!0}):a[v]=B,a}function mo(a,v){if(a==null)return{};var B=Cs(a,v),Y,kt;if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols(a);for(kt=0;kt<Et.length;kt++)Y=Et[kt],!(v.indexOf(Y)>=0)&&Object.prototype.propertyIsEnumerable.call(a,Y)&&(B[Y]=a[Y])}return B}function Cs(a,v){if(a==null)return{};var B={},Y=Object.keys(a),kt,Et;for(Et=0;Et<Y.length;Et++)kt=Y[Et],!(v.indexOf(kt)>=0)&&(B[kt]=a[kt]);return B}var yo=typeof window>"u"?si.default.useEffect:si.default.useLayoutEffect,Ls=function(v){var B=v.forwardRef,Y=v.elementProps,kt=Y===void 0?{}:Y,Et=mo(v,ws),Ot=si.default.useRef(null),At=si.default.useCallback(function(xt){var wt=xt.data,rt=xt.onafterinit,Rt=mo(xt,Ts);Ot.current&&(B.current||(B.current=bs.bb.generate(Ms({bindto:Ot.current,data:wt,onafterinit:function(){rt&&setTimeout(function(){return rt()},0)}},Rt))),B.current.load(wt))},[]);return yo(function(){return requestAnimationFrame(function(){return At(Et)}),function(){if(B.current)try{B.current.destroy()}catch(xt){console.error("Internal billboard.js error",xt)}B.current=null}},[]),yo(function(){At(Et)},[Et]),si.default.createElement("div",Or({},kt,{ref:Ot}))},$s=si.default.forwardRef(function(a,v){return si.default.createElement(Ls,Or({forwardRef:v},a))});Rr.default=$s});var xo=hn((Er,_o)=>{(function(a,v){typeof Er=="object"&&typeof _o<"u"?v(Er,vi(),Sr()):typeof define=="function"&&define.amd?define(["exports","d3-array","d3-path"],v):v(a.d3=a.d3||{},a.d3,a.d3)})(Er,function(a,v,B){"use strict";var Y=Math.cos,kt=Math.sin,Et=Math.PI,Ot=Et/2,At=Et*2,xt=Math.max;function wt(Tt){return function(pt,W){return Tt(pt.source.value+pt.target.value,W.source.value+W.target.value)}}function rt(){var Tt=0,pt=null,W=null,X=null;function w(R){var N=R.length,f=[],ct=v.range(N),yt=[],Q=[],J=Q.groups=new Array(N),gt=new Array(N*N),V,Lt,at,_t,bt,ft;for(V=0,bt=-1;++bt<N;){for(Lt=0,ft=-1;++ft<N;)Lt+=R[bt][ft];f.push(Lt),yt.push(v.range(N)),V+=Lt}for(pt&&ct.sort(function($,x){return pt(f[$],f[x])}),W&&yt.forEach(function($,x){$.sort(function(A,k){return W(R[x][A],R[x][k])})}),V=xt(0,At-Tt*N)/V,_t=V?Tt:At/N,Lt=0,bt=-1;++bt<N;){for(at=Lt,ft=-1;++ft<N;){var vt=ct[bt],Ct=yt[vt][ft],Gt=R[vt][Ct],ue=Lt,ie=Lt+=Gt*V;gt[Ct*N+vt]={index:vt,subindex:Ct,startAngle:ue,endAngle:ie,value:Gt}}J[vt]={index:vt,startAngle:at,endAngle:Lt,value:f[vt]},Lt+=_t}for(bt=-1;++bt<N;)for(ft=bt-1;++ft<N;){var xe=gt[ft*N+bt],y=gt[bt*N+ft];(xe.value||y.value)&&Q.push(xe.value<y.value?{source:y,target:xe}:{source:xe,target:y})}return X?Q.sort(X):Q}return w.padAngle=function(R){return arguments.length?(Tt=xt(0,R),w):Tt},w.sortGroups=function(R){return arguments.length?(pt=R,w):pt},w.sortSubgroups=function(R){return arguments.length?(W=R,w):W},w.sortChords=function(R){return arguments.length?(R==null?X=null:(X=wt(R))._=R,w):X&&X._},w}var Rt=Array.prototype.slice;function zt(Tt){return function(){return Tt}}function et(Tt){return Tt.source}function Pt(Tt){return Tt.target}
20function j(Tt){return Tt.radius}function Mt(Tt){return Tt.startAngle}function ht(Tt){return Tt.endAngle}function Nt(){var Tt=et,pt=Pt,W=j,X=Mt,w=ht,R=null;function N(){var f,ct=Rt.call(arguments),yt=Tt.apply(this,ct),Q=pt.apply(this,ct),J=+W.apply(this,(ct[0]=yt,ct)),gt=X.apply(this,ct)-Ot,V=w.apply(this,ct)-Ot,Lt=J*Y(gt),at=J*kt(gt),_t=+W.apply(this,(ct[0]=Q,ct)),bt=X.apply(this,ct)-Ot,ft=w.apply(this,ct)-Ot;if(R||(R=f=B.path()),R.moveTo(Lt,at),R.arc(0,0,J,gt,V),(gt!==bt||V!==ft)&&(R.quadraticCurveTo(0,0,_t*Y(bt),_t*kt(bt)),R.arc(0,0,_t,bt,ft)),R.quadraticCurveTo(0,0,Lt,at),R.closePath(),f)return R=null,f+""||null}return N.radius=function(f){return arguments.length?(W=typeof f=="function"?f:zt(+f),N):W},N.startAngle=function(f){return arguments.length?(X=typeof f=="function"?f:zt(+f),N):X},N.endAngle=function(f){return arguments.length?(w=typeof f=="function"?f:zt(+f),N):w},N.source=function(f){return arguments.length?(Tt=f,N):Tt},N.target=function(f){return arguments.length?(pt=f,N):pt},N.context=function(f){return arguments.length?(R=f??null,N):R},N}a.chord=rt,a.ribbon=Nt,Object.defineProperty(a,"__esModule",{value:!0})})});var wo=hn((Pr,bo)=>{(function(a,v){typeof Pr=="object"&&typeof bo<"u"?v(Pr,vi()):typeof define=="function"&&define.amd?define(["exports","d3-array"],v):v(a.d3=a.d3||{},a.d3)})(Pr,function(a,v){"use strict";var B=Array.prototype,Y=B.slice;function kt(W,X){return W-X}function Et(W){for(var X=0,w=W.length,R=W[w-1][1]*W[0][0]-W[w-1][0]*W[0][1];++X<w;)R+=W[X-1][1]*W[X][0]-W[X-1][0]*W[X][1];return R}function Ot(W){return function(){return W}}function At(W,X){for(var w=-1,R=X.length,N;++w<R;)if(N=xt(W,X[w]))return N;return 0}function xt(W,X){for(var w=X[0],R=X[1],N=-1,f=0,ct=W.length,yt=ct-1;f<ct;yt=f++){var Q=W[f],J=Q[0],gt=Q[1],V=W[yt],Lt=V[0],at=V[1];if(wt(Q,V,X))return 0;gt>R!=at>R&&w<(Lt-J)*(R-gt)/(at-gt)+J&&(N=-N)}return N}function wt(W,X,w){var R;return rt(W,X,w)&&Rt(W[R=+(W[0]===X[0])],w[R],X[R])}function rt(W,X,w){return(X[0]-W[0])*(w[1]-W[1])===(w[0]-W[0])*(X[1]-W[1])}function Rt(W,X,w){return W<=X&&X<=w||w<=X&&X<=W}function zt(){}var et=[[],[[[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 Pt(){var W=1,X=1,w=v.thresholdSturges,R=Q;function N(J){var gt=w(J);if(Array.isArray(gt))gt=gt.slice().sort(kt);else{var V=v.extent(J),Lt=V[0],at=V[1];gt=v.tickStep(Lt,at,gt),gt=v.range(Math.floor(Lt/gt)*gt,Math.floor(at/gt)*gt,gt)}return gt.map(function(_t){return f(J,_t)})}function f(J,gt){var V=[],Lt=[];return ct(J,gt,function(at){R(at,J,gt),Et(at)>0?V.push([at]):Lt.push(at)}),Lt.forEach(function(at){for(var _t=0,bt=V.length,ft;_t<bt;++_t)if(At((ft=V[_t])[0],at)!==-1){ft.push(at);return}}),{type:"MultiPolygon",value:gt,coordinates:V}}function ct(J,gt,V){var Lt=new Array,at=new Array,_t,bt,ft,vt,Ct,Gt;for(_t=bt=-1,vt=J[0]>=gt,et[vt<<1].forEach(ue);++_t<W-1;)ft=vt,vt=J[_t+1]>=gt,et[ft|vt<<1].forEach(ue);for(et[vt<<0].forEach(ue);++bt<X-1;){for(_t=-1,vt=J[bt*W+W]>=gt,Ct=J[bt*W]>=gt,et[vt<<1|Ct<<2].forEach(ue);++_t<W-1;)ft=vt,vt=J[bt*W+W+_t+1]>=gt,Gt=Ct,Ct=J[bt*W+_t+1]>=gt,et[ft|vt<<1|Ct<<2|Gt<<3].forEach(ue);et[vt|Ct<<3].forEach(ue)}for(_t=-1,Ct=J[bt*W]>=gt,et[Ct<<2].forEach(ue);++_t<W-1;)Gt=Ct,Ct=J[bt*W+_t+1]>=gt,et[Ct<<2|Gt<<3].forEach(ue);et[Ct<<3].forEach(ue);function ue(ie){var xe=[ie[0][0]+_t,ie[0][1]+bt],y=[ie[1][0]+_t,ie[1][1]+bt],$=yt(xe),x=yt(y),A,k;(A=at[$])?(k=Lt[x])?(delete at[A.end],delete Lt[k.start],A===k?(A.ring.push(y),V(A.ring)):Lt[A.start]=at[k.end]={start:A.start,end:k.end,ring:A.ring.concat(k.ring)}):(delete at[A.end],A.ring.push(y),at[A.end=x]=A):(A=Lt[x])?(k=at[$])?(delete Lt[A.start],delete at[k.end],A===k?(A.ring.push(y),V(A.ring)):Lt[k.start]=at[A.end]={start:k.start,end:A.end,ring:k.ring.concat(A.ring)}):(delete Lt[A.start],A.ring.unshift(xe),Lt[A.start=$]=A):Lt[$]=at[x]={start:$,end:x,ring:[xe,y]}}}function yt(J){return J[0]*2+J[1]*(W+1)*4}function Q(J,gt,V){J.forEach(function(Lt){var at=Lt[0],_t=Lt[1],bt=at|0,ft=_t|0,vt,Ct=gt[ft*W+bt];at>0&&at<W&&bt===at&&(vt=gt[ft*W+bt-1],Lt[0]=at+(V-vt)/(Ct-vt)-.5),_t>0&&_t<X&&ft===_t&&(vt=gt[(ft-1)*W+bt],Lt[1]=_t+(V-vt)/(Ct-vt)-.5)})}return N.contour=f,N.size=function(J){if(!arguments.length)return[W,X];var gt=Math.ceil(J[0]),V=Math.ceil(J[1]);if(!(gt>0)||!(V>0))throw new Error("invalid size");return W=gt,X=V,N},N.thresholds=function(J){return arguments.length?(w=typeof J=="function"?J:Array.isArray(J)?Ot(Y.call(J)):Ot(J),N):w},N.smooth=function(J){return arguments.length?(R=J?Q:zt,N):R===Q},N}function j(W,X,w){for(var R=W.width,N=W.height,f=(w<<1)+1,ct=0;ct<N;++ct)for(var yt=0,Q=0;yt<R+w;++yt)yt<R&&(Q+=W.data[yt+ct*R]),yt>=w&&(yt>=f&&(Q-=W.data[yt-f+ct*R]),X.data[yt-w+ct*R]=Q/Math.min(yt+1,R-1+f-yt,f))}function Mt(W,X,w){for(var R=W.width,N=W.height,f=(w<<1)+1,ct=0;ct<R;++ct)for(var yt=0,Q=0;yt<N+w;++yt)yt<N&&(Q+=W.data[ct+yt*R]),yt>=w&&(yt>=f&&(Q-=W.data[ct+(yt-f)*R]),X.data[ct+(yt-w)*R]=Q/Math.min(yt+1,N-1+f-yt,f))}function ht(W){return W[0]}function Nt(W){return W[1]}function Tt(){return 1}function pt(){var W=ht,X=Nt,w=Tt,R=960,N=500,f=20,ct=2,yt=f*3,Q=R+yt*2>>ct,J=N+yt*2>>ct,gt=Ot(20);
20function V(vt){var Ct=new Float32Array(Q*J),Gt=new Float32Array(Q*J);vt.forEach(function(xe,y,$){var x=+W(xe,y,$)+yt>>ct,A=+X(xe,y,$)+yt>>ct,k=+w(xe,y,$);x>=0&&x<Q&&A>=0&&A<J&&(Ct[x+A*Q]+=k)}),j({width:Q,height:J,data:Ct},{width:Q,height:J,data:Gt},f>>ct),Mt({width:Q,height:J,data:Gt},{width:Q,height:J,data:Ct},f>>ct),j({width:Q,height:J,data:Ct},{width:Q,height:J,data:Gt},f>>ct),Mt({width:Q,height:J,data:Gt},{width:Q,height:J,data:Ct},f>>ct),j({width:Q,height:J,data:Ct},{width:Q,height:J,data:Gt},f>>ct),Mt({width:Q,height:J,data:Gt},{width:Q,height:J,data:Ct},f>>ct);var ue=gt(Ct);if(!Array.isArray(ue)){var ie=v.max(Ct);ue=v.tickStep(0,ie,ue),ue=v.range(0,Math.floor(ie/ue)*ue,ue),ue.shift()}return Pt().thresholds(ue).size([Q,J])(Ct).map(Lt)}function Lt(vt){return vt.value*=Math.pow(2,-2*ct),vt.coordinates.forEach(at),vt}function at(vt){vt.forEach(_t)}function _t(vt){vt.forEach(bt)}function bt(vt){vt[0]=vt[0]*Math.pow(2,ct)-yt,vt[1]=vt[1]*Math.pow(2,ct)-yt}function ft(){return yt=f*3,Q=R+yt*2>>ct,J=N+yt*2>>ct,V}return V.x=function(vt){return arguments.length?(W=typeof vt=="function"?vt:Ot(+vt),V):W},V.y=function(vt){return arguments.length?(X=typeof vt=="function"?vt:Ot(+vt),V):X},V.weight=function(vt){return arguments.length?(w=typeof vt=="function"?vt:Ot(+vt),V):w},V.size=function(vt){if(!arguments.length)return[R,N];var Ct=Math.ceil(vt[0]),Gt=Math.ceil(vt[1]);if(!(Ct>=0)&&!(Ct>=0))throw new Error("invalid size");return R=Ct,N=Gt,ft()},V.cellSize=function(vt){if(!arguments.length)return 1<<ct;if(!((vt=+vt)>=1))throw new Error("invalid cell size");return ct=Math.floor(Math.log(vt)/Math.LN2),ft()},V.thresholds=function(vt){return arguments.length?(gt=typeof vt=="function"?vt:Array.isArray(vt)?Ot(Y.call(vt)):Ot(vt),V):gt},V.bandwidth=function(vt){if(!arguments.length)return Math.sqrt(f*(f+1));if(!((vt=+vt)>=0))throw new Error("invalid bandwidth");return f=Math.round((Math.sqrt(4*vt*vt+1)-1)/2),ft()},V}a.contours=Pt,a.contourDensity=pt,Object.defineProperty(a,"__esModule",{value:!0})})});var Ao=hn((Dr,To)=>{(function(a,v){typeof Dr=="object"&&typeof To<"u"?v(Dr,Fi()):typeof define=="function"&&define.amd?define(["exports","d3-dsv"],v):v(a.d3=a.d3||{},a.d3)})(Dr,function(a,v){"use strict";function B(Tt){if(!Tt.ok)throw new Error(Tt.status+" "+Tt.statusText);return Tt.blob()}function Y(Tt,pt){return fetch(Tt,pt).then(B)}function kt(Tt){if(!Tt.ok)throw new Error(Tt.status+" "+Tt.statusText);return Tt.arrayBuffer()}function Et(Tt,pt){return fetch(Tt,pt).then(kt)}function Ot(Tt){if(!Tt.ok)throw new Error(Tt.status+" "+Tt.statusText);return Tt.text()}function At(Tt,pt){return fetch(Tt,pt).then(Ot)}function xt(Tt){return function(pt,W,X){return arguments.length===2&&typeof W=="function"&&(X=W,W=void 0),At(pt,W).then(function(w){return Tt(w,X)})}}function wt(Tt,pt,W,X){arguments.length===3&&typeof W=="function"&&(X=W,W=void 0);var w=v.dsvFormat(Tt);return At(pt,W).then(function(R){return w.parse(R,X)})}var rt=xt(v.csvParse),Rt=xt(v.tsvParse);function zt(Tt,pt){return new Promise(function(W,X){var w=new Image;for(var R in pt)w[R]=pt[R];w.onerror=X,w.onload=function(){W(w)},w.src=Tt})}function et(Tt){if(!Tt.ok)throw new Error(Tt.status+" "+Tt.statusText);return Tt.json()}function Pt(Tt,pt){return fetch(Tt,pt).then(et)}function j(Tt){return function(pt,W){return At(pt,W).then(function(X){return new DOMParser().parseFromString(X,Tt)})}}var Mt=j("application/xml"),ht=j("text/html"),Nt=j("image/svg+xml");a.blob=Y,a.buffer=Et,a.dsv=wt,a.csv=rt,a.tsv=Rt,a.image=zt,a.json=Pt,a.text=At,a.xml=Mt,a.html=ht,a.svg=Nt,Object.defineProperty(a,"__esModule",{value:!0})})});var ba=hn((Fr,Mo)=>{(function(a,v){typeof Fr=="object"&&typeof Mo<"u"?v(Fr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(Fr,function(a){"use strict";function v(w){var R=+this._x.call(null,w),N=+this._y.call(null,w);return B(this.cover(R,N),R,N,w)}function B(w,R,N,f){if(isNaN(R)||isNaN(N))return w;var ct,yt=w._root,Q={data:f},J=w._x0,gt=w._y0,V=w._x1,Lt=w._y1,at,_t,bt,ft,vt,Ct,Gt,ue;if(!yt)return w._root=Q,w;for(;yt.length;)if((vt=R>=(at=(J+V)/2))?J=at:V=at,(Ct=N>=(_t=(gt+Lt)/2))?gt=_t:Lt=_t,ct=yt,!(yt=yt[Gt=Ct<<1|vt]))return ct[Gt]=Q,w;if(bt=+w._x.call(null,yt.data),ft=+w._y.call(null,yt.data),R===bt&&N===ft)return Q.next=yt,ct?ct[Gt]=Q:w._root=Q,w;do ct=ct?ct[Gt]=new Array(4):w._root=new Array(4),(vt=R>=(at=(J+V)/2))?J=at:V=at,(Ct=N>=(_t=(gt+Lt)/2))?gt=_t:Lt=_t;while((Gt=Ct<<1|vt)===(ue=(ft>=_t)<<1|bt>=at));return ct[ue]=yt,ct[Gt]=Q,w}function Y(w){var R,N,f=w.length,ct,yt,Q=new Array(f),J=new Array(f),gt=1/0,V=1/0,Lt=-1/0,at=-1/0;for(N=0;N<f;++N)isNaN(ct=+this._x.call(null,R=w[N]))||isNaN(yt=+this._y.call(null,R))||(Q[N]=ct,J[N]=yt,ct<gt&&(gt=ct),ct>Lt&&(Lt=ct),yt<V&&(V=yt),yt>at&&(at=yt));for(Lt<gt&&(gt=this._x0,Lt=this._x1),at<V&&(V=this._y0,at=this._y1),this.cover(gt,V).cover(Lt,at),N=0;N<f;
20++N)B(this,Q[N],J[N],w[N]);return this}function kt(w,R){if(isNaN(w=+w)||isNaN(R=+R))return this;var N=this._x0,f=this._y0,ct=this._x1,yt=this._y1;if(isNaN(N))ct=(N=Math.floor(w))+1,yt=(f=Math.floor(R))+1;else if(N>w||w>ct||f>R||R>yt){var Q=ct-N,J=this._root,gt,V;switch(V=(R<(f+yt)/2)<<1|w<(N+ct)/2){case 0:{do gt=new Array(4),gt[V]=J,J=gt;while(Q*=2,ct=N+Q,yt=f+Q,w>ct||R>yt);break}case 1:{do gt=new Array(4),gt[V]=J,J=gt;while(Q*=2,N=ct-Q,yt=f+Q,N>w||R>yt);break}case 2:{do gt=new Array(4),gt[V]=J,J=gt;while(Q*=2,ct=N+Q,f=yt-Q,w>ct||f>R);break}case 3:{do gt=new Array(4),gt[V]=J,J=gt;while(Q*=2,N=ct-Q,f=yt-Q,N>w||f>R);break}}this._root&&this._root.length&&(this._root=J)}else return this;return this._x0=N,this._y0=f,this._x1=ct,this._y1=yt,this}function Et(){var w=[];return this.visit(function(R){if(!R.length)do w.push(R.data);while(R=R.next)}),w}function Ot(w){return arguments.length?this.cover(+w[0][0],+w[0][1]).cover(+w[1][0],+w[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function At(w,R,N,f,ct){this.node=w,this.x0=R,this.y0=N,this.x1=f,this.y1=ct}function xt(w,R,N){var f,ct=this._x0,yt=this._y0,Q,J,gt,V,Lt=this._x1,at=this._y1,_t=[],bt=this._root,ft,vt;for(bt&&_t.push(new At(bt,ct,yt,Lt,at)),N==null?N=1/0:(ct=w-N,yt=R-N,Lt=w+N,at=R+N,N*=N);ft=_t.pop();)if(!(!(bt=ft.node)||(Q=ft.x0)>Lt||(J=ft.y0)>at||(gt=ft.x1)<ct||(V=ft.y1)<yt))if(bt.length){var Ct=(Q+gt)/2,Gt=(J+V)/2;_t.push(new At(bt[3],Ct,Gt,gt,V),new At(bt[2],Q,Gt,Ct,V),new At(bt[1],Ct,J,gt,Gt),new At(bt[0],Q,J,Ct,Gt)),(vt=(R>=Gt)<<1|w>=Ct)&&(ft=_t[_t.length-1],_t[_t.length-1]=_t[_t.length-1-vt],_t[_t.length-1-vt]=ft)}else{var ue=w-+this._x.call(null,bt.data),ie=R-+this._y.call(null,bt.data),xe=ue*ue+ie*ie;if(xe<N){var y=Math.sqrt(N=xe);ct=w-y,yt=R-y,Lt=w+y,at=R+y,f=bt.data}}return f}function wt(w){if(isNaN(Lt=+this._x.call(null,w))||isNaN(at=+this._y.call(null,w)))return this;var R,N=this._root,f,ct,yt,Q=this._x0,J=this._y0,gt=this._x1,V=this._y1,Lt,at,_t,bt,ft,vt,Ct,Gt;if(!N)return this;if(N.length)for(;;){if((ft=Lt>=(_t=(Q+gt)/2))?Q=_t:gt=_t,(vt=at>=(bt=(J+V)/2))?J=bt:V=bt,R=N,!(N=N[Ct=vt<<1|ft]))return this;if(!N.length)break;(R[Ct+1&3]||R[Ct+2&3]||R[Ct+3&3])&&(f=R,Gt=Ct)}for(;N.data!==w;)if(ct=N,!(N=N.next))return this;return(yt=N.next)&&delete N.next,ct?(yt?ct.next=yt:delete ct.next,this):R?(yt?R[Ct]=yt:delete R[Ct],(N=R[0]||R[1]||R[2]||R[3])&&N===(R[3]||R[2]||R[1]||R[0])&&!N.length&&(f?f[Gt]=N:this._root=N),this):(this._root=yt,this)}function rt(w){for(var R=0,N=w.length;R<N;++R)this.remove(w[R]);return this}function Rt(){return this._root}function zt(){var w=0;return this.visit(function(R){if(!R.length)do++w;while(R=R.next)}),w}function et(w){var R=[],N,f=this._root,ct,yt,Q,J,gt;for(f&&R.push(new At(f,this._x0,this._y0,this._x1,this._y1));N=R.pop();)if(!w(f=N.node,yt=N.x0,Q=N.y0,J=N.x1,gt=N.y1)&&f.length){var V=(yt+J)/2,Lt=(Q+gt)/2;(ct=f[3])&&R.push(new At(ct,V,Lt,J,gt)),(ct=f[2])&&R.push(new At(ct,yt,Lt,V,gt)),(ct=f[1])&&R.push(new At(ct,V,Q,J,Lt)),(ct=f[0])&&R.push(new At(ct,yt,Q,V,Lt))}return this}function Pt(w){var R=[],N=[],f;for(this._root&&R.push(new At(this._root,this._x0,this._y0,this._x1,this._y1));f=R.pop();){var ct=f.node;if(ct.length){var yt,Q=f.x0,J=f.y0,gt=f.x1,V=f.y1,Lt=(Q+gt)/2,at=(J+V)/2;(yt=ct[0])&&R.push(new At(yt,Q,J,Lt,at)),(yt=ct[1])&&R.push(new At(yt,Lt,J,gt,at)),(yt=ct[2])&&R.push(new At(yt,Q,at,Lt,V)),(yt=ct[3])&&R.push(new At(yt,Lt,at,gt,V))}N.push(f)}for(;f=N.pop();)w(f.node,f.x0,f.y0,f.x1,f.y1);return this}function j(w){return w[0]}function Mt(w){return arguments.length?(this._x=w,this):this._x}function ht(w){return w[1]}function Nt(w){return arguments.length?(this._y=w,this):this._y}function Tt(w,R,N){var f=new pt(R??j,N??ht,NaN,NaN,NaN,NaN);return w==null?f:f.addAll(w)}function pt(w,R,N,f,ct,yt){this._x=w,this._y=R,this._x0=N,this._y0=f,this._x1=ct,this._y1=yt,this._root=void 0}function W(w){for(var R={data:w.data},N=R;w=w.next;)N=N.next={data:w.data};return R}var X=Tt.prototype=pt.prototype;X.copy=function(){var w=new pt(this._x,this._y,this._x0,this._y0,this._x1,this._y1),R=this._root,N,f;if(!R)return w;if(!R.length)return w._root=W(R),w;for(N=[{source:R,target:w._root=new Array(4)}];R=N.pop();)for(var ct=0;ct<4;++ct)(f=R.source[ct])&&(f.length?N.push({source:f,target:R.target[ct]=new Array(4)}):R.target[ct]=W(f));return w},X.add=v,X.addAll=Y,X.cover=kt,X.data=Et,X.extent=Ot,X.find=xt,X.remove=wt,X.removeAll=rt,X.root=Rt,X.size=zt,X.visit=et,X.visitAfter=Pt,X.x=Mt,X.y=Nt,a.quadtree=Tt,Object.defineProperty(a,"__esModule",{value:!0})})});var Co=hn((zr,So)=>{(function(a,v){typeof zr=="object"&&typeof So<"u"?v(zr,ba(),_r(),oi(),sr()):typeof define=="function"&&define.amd?define(["exports","d3-quadtree","d3-collection","d3-dispat
20ch","d3-timer"],v):v(a.d3=a.d3||{},a.d3,a.d3,a.d3,a.d3)})(zr,function(a,v,B,Y,kt){"use strict";function Et(w,R){var N;w==null&&(w=0),R==null&&(R=0);function f(){var ct,yt=N.length,Q,J=0,gt=0;for(ct=0;ct<yt;++ct)Q=N[ct],J+=Q.x,gt+=Q.y;for(J=J/yt-w,gt=gt/yt-R,ct=0;ct<yt;++ct)Q=N[ct],Q.x-=J,Q.y-=gt}return f.initialize=function(ct){N=ct},f.x=function(ct){return arguments.length?(w=+ct,f):w},f.y=function(ct){return arguments.length?(R=+ct,f):R},f}function Ot(w){return function(){return w}}function At(){return(Math.random()-.5)*1e-6}function xt(w){return w.x+w.vx}function wt(w){return w.y+w.vy}function rt(w){var R,N,f=1,ct=1;typeof w!="function"&&(w=Ot(w==null?1:+w));function yt(){for(var gt,V=R.length,Lt,at,_t,bt,ft,vt,Ct=0;Ct<ct;++Ct)for(Lt=v.quadtree(R,xt,wt).visitAfter(Q),gt=0;gt<V;++gt)at=R[gt],ft=N[at.index],vt=ft*ft,_t=at.x+at.vx,bt=at.y+at.vy,Lt.visit(Gt);function Gt(ue,ie,xe,y,$){var x=ue.data,A=ue.r,k=ft+A;if(x){if(x.index>at.index){var _=_t-x.x-x.vx,it=bt-x.y-x.vy,ut=_*_+it*it;ut<k*k&&(_===0&&(_=At(),ut+=_*_),it===0&&(it=At(),ut+=it*it),ut=(k-(ut=Math.sqrt(ut)))/ut*f,at.vx+=(_*=ut)*(k=(A*=A)/(vt+A)),at.vy+=(it*=ut)*k,x.vx-=_*(k=1-k),x.vy-=it*k)}return}return ie>_t+k||y<_t-k||xe>bt+k||$<bt-k}}function Q(gt){if(gt.data)return gt.r=N[gt.data.index];for(var V=gt.r=0;V<4;++V)gt[V]&>[V].r>gt.r&&(gt.r=gt[V].r)}function J(){if(R){var gt,V=R.length,Lt;for(N=new Array(V),gt=0;gt<V;++gt)Lt=R[gt],N[Lt.index]=+w(Lt,gt,R)}}return yt.initialize=function(gt){R=gt,J()},yt.iterations=function(gt){return arguments.length?(ct=+gt,yt):ct},yt.strength=function(gt){return arguments.length?(f=+gt,yt):f},yt.radius=function(gt){return arguments.length?(w=typeof gt=="function"?gt:Ot(+gt),J(),yt):w},yt}function Rt(w){return w.index}function zt(w,R){var N=w.get(R);if(!N)throw new Error("missing: "+R);return N}function et(w){var R=Rt,N=Lt,f,ct=Ot(30),yt,Q,J,gt,V=1;w==null&&(w=[]);function Lt(vt){return 1/Math.min(J[vt.source.index],J[vt.target.index])}function at(vt){for(var Ct=0,Gt=w.length;Ct<V;++Ct)for(var ue=0,ie,xe,y,$,x,A,k;ue<Gt;++ue)ie=w[ue],xe=ie.source,y=ie.target,$=y.x+y.vx-xe.x-xe.vx||At(),x=y.y+y.vy-xe.y-xe.vy||At(),A=Math.sqrt($*$+x*x),A=(A-yt[ue])/A*vt*f[ue],$*=A,x*=A,y.vx-=$*(k=gt[ue]),y.vy-=x*k,xe.vx+=$*(k=1-k),xe.vy+=x*k}function _t(){if(Q){var vt,Ct=Q.length,Gt=w.length,ue=B.map(Q,R),ie;for(vt=0,J=new Array(Ct);vt<Gt;++vt)ie=w[vt],ie.index=vt,typeof ie.source!="object"&&(ie.source=zt(ue,ie.source)),typeof ie.target!="object"&&(ie.target=zt(ue,ie.target)),J[ie.source.index]=(J[ie.source.index]||0)+1,J[ie.target.index]=(J[ie.target.index]||0)+1;for(vt=0,gt=new Array(Gt);vt<Gt;++vt)ie=w[vt],gt[vt]=J[ie.source.index]/(J[ie.source.index]+J[ie.target.index]);f=new Array(Gt),bt(),yt=new Array(Gt),ft()}}function bt(){if(Q)for(var vt=0,Ct=w.length;vt<Ct;++vt)f[vt]=+N(w[vt],vt,w)}function ft(){if(Q)for(var vt=0,Ct=w.length;vt<Ct;++vt)yt[vt]=+ct(w[vt],vt,w)}return at.initialize=function(vt){Q=vt,_t()},at.links=function(vt){return arguments.length?(w=vt,_t(),at):w},at.id=function(vt){return arguments.length?(R=vt,at):R},at.iterations=function(vt){return arguments.length?(V=+vt,at):V},at.strength=function(vt){return arguments.length?(N=typeof vt=="function"?vt:Ot(+vt),bt(),at):N},at.distance=function(vt){return arguments.length?(ct=typeof vt=="function"?vt:Ot(+vt),ft(),at):ct},at}function Pt(w){return w.x}function j(w){return w.y}var Mt=10,ht=Math.PI*(3-Math.sqrt(5));function Nt(w){var R,N=1,f=.001,ct=1-Math.pow(f,1/300),yt=0,Q=.6,J=B.map(),gt=kt.timer(Lt),V=Y.dispatch("tick","end");w==null&&(w=[]);function Lt(){at(),V.call("tick",R),N<f&&(gt.stop(),V.call("end",R))}function at(ft){var vt,Ct=w.length,Gt;ft===void 0&&(ft=1);for(var ue=0;ue<ft;++ue)for(N+=(yt-N)*ct,J.each(function(ie){ie(N)}),vt=0;vt<Ct;++vt)Gt=w[vt],Gt.fx==null?Gt.x+=Gt.vx*=Q:(Gt.x=Gt.fx,Gt.vx=0),Gt.fy==null?Gt.y+=Gt.vy*=Q:(Gt.y=Gt.fy,Gt.vy=0);return R}function _t(){for(var ft=0,vt=w.length,Ct;ft<vt;++ft){if(Ct=w[ft],Ct.index=ft,isNaN(Ct.fx)||(Ct.x=Ct.fx),isNaN(Ct.fy)||(Ct.y=Ct.fy),isNaN(Ct.x)||isNaN(Ct.y)){var Gt=Mt*Math.sqrt(ft),ue=ft*ht;Ct.x=Gt*Math.cos(ue),Ct.y=Gt*Math.sin(ue)}(isNaN(Ct.vx)||isNaN(Ct.vy))&&(Ct.vx=Ct.vy=0)}}function bt(ft){return ft.initialize&&ft.initialize(w),ft}return _t(),R={tick:at,restart:function(){return gt.restart(Lt),R},stop:function(){return gt.stop(),R},nodes:function(ft){return arguments.length?(w=ft,_t(),J.each(bt),R):w},alpha:function(ft){return arguments.length?(N=+ft,R):N},alphaMin:function(ft){return arguments.length?(f=+ft,R):f},alphaDecay:function(ft){return arguments.length?(ct=+ft,R):+ct},alphaTarget:function(ft){return arguments.length?(yt=+ft,R):yt},velocityDecay:function(ft){return arguments.length?(Q=1-ft,R):1-Q},force:function(ft,vt){return arguments.length>1?(vt==null?J.remove(ft):J.set(ft,bt(vt)),R):J.get(ft)},find:function(ft,vt,Ct){var Gt=0,ue=w.length,ie,xe,y,$,x;for(Ct==null?Ct=1/0:Ct*=Ct,Gt=0;Gt<ue;++Gt)$=w[Gt],ie=ft-$.x,xe=vt-$.y,y=ie*ie+xe*xe,y<Ct&&(x=$,Ct=y);return x},on:function(ft,vt){return arguments.length>1?(V.on(ft,vt),R):V.on(ft)}}}function Tt(){var w,R,N,f=Ot(-30),ct,yt=1,Q=1/0,J=.81;function gt(_t){var bt,ft=w.length,vt=v.quadtree(w,Pt,j).visitAfter(Lt);for(N=_t,bt=0;bt<ft;
20++bt)R=w[bt],vt.visit(at)}function V(){if(w){var _t,bt=w.length,ft;for(ct=new Array(bt),_t=0;_t<bt;++_t)ft=w[_t],ct[ft.index]=+f(ft,_t,w)}}function Lt(_t){var bt=0,ft,vt,Ct=0,Gt,ue,ie;if(_t.length){for(Gt=ue=ie=0;ie<4;++ie)(ft=_t[ie])&&(vt=Math.abs(ft.value))&&(bt+=ft.value,Ct+=vt,Gt+=vt*ft.x,ue+=vt*ft.y);_t.x=Gt/Ct,_t.y=ue/Ct}else{ft=_t,ft.x=ft.data.x,ft.y=ft.data.y;do bt+=ct[ft.data.index];while(ft=ft.next)}_t.value=bt}function at(_t,bt,ft,vt){if(!_t.value)return!0;var Ct=_t.x-R.x,Gt=_t.y-R.y,ue=vt-bt,ie=Ct*Ct+Gt*Gt;if(ue*ue/J<ie)return ie<Q&&(Ct===0&&(Ct=At(),ie+=Ct*Ct),Gt===0&&(Gt=At(),ie+=Gt*Gt),ie<yt&&(ie=Math.sqrt(yt*ie)),R.vx+=Ct*_t.value*N/ie,R.vy+=Gt*_t.value*N/ie),!0;if(_t.length||ie>=Q)return;(_t.data!==R||_t.next)&&(Ct===0&&(Ct=At(),ie+=Ct*Ct),Gt===0&&(Gt=At(),ie+=Gt*Gt),ie<yt&&(ie=Math.sqrt(yt*ie)));do _t.data!==R&&(ue=ct[_t.data.index]*N/ie,R.vx+=Ct*ue,R.vy+=Gt*ue);while(_t=_t.next)}return gt.initialize=function(_t){w=_t,V()},gt.strength=function(_t){return arguments.length?(f=typeof _t=="function"?_t:Ot(+_t),V(),gt):f},gt.distanceMin=function(_t){return arguments.length?(yt=_t*_t,gt):Math.sqrt(yt)},gt.distanceMax=function(_t){return arguments.length?(Q=_t*_t,gt):Math.sqrt(Q)},gt.theta=function(_t){return arguments.length?(J=_t*_t,gt):Math.sqrt(J)},gt}function pt(w,R,N){var f,ct=Ot(.1),yt,Q;typeof w!="function"&&(w=Ot(+w)),R==null&&(R=0),N==null&&(N=0);function J(V){for(var Lt=0,at=f.length;Lt<at;++Lt){var _t=f[Lt],bt=_t.x-R||1e-6,ft=_t.y-N||1e-6,vt=Math.sqrt(bt*bt+ft*ft),Ct=(Q[Lt]-vt)*yt[Lt]*V/vt;_t.vx+=bt*Ct,_t.vy+=ft*Ct}}function gt(){if(f){var V,Lt=f.length;for(yt=new Array(Lt),Q=new Array(Lt),V=0;V<Lt;++V)Q[V]=+w(f[V],V,f),yt[V]=isNaN(Q[V])?0:+ct(f[V],V,f)}}return J.initialize=function(V){f=V,gt()},J.strength=function(V){return arguments.length?(ct=typeof V=="function"?V:Ot(+V),gt(),J):ct},J.radius=function(V){return arguments.length?(w=typeof V=="function"?V:Ot(+V),gt(),J):w},J.x=function(V){return arguments.length?(R=+V,J):R},J.y=function(V){return arguments.length?(N=+V,J):N},J}function W(w){var R=Ot(.1),N,f,ct;typeof w!="function"&&(w=Ot(w==null?0:+w));function yt(J){for(var gt=0,V=N.length,Lt;gt<V;++gt)Lt=N[gt],Lt.vx+=(ct[gt]-Lt.x)*f[gt]*J}function Q(){if(N){var J,gt=N.length;for(f=new Array(gt),ct=new Array(gt),J=0;J<gt;++J)f[J]=isNaN(ct[J]=+w(N[J],J,N))?0:+R(N[J],J,N)}}return yt.initialize=function(J){N=J,Q()},yt.strength=function(J){return arguments.length?(R=typeof J=="function"?J:Ot(+J),Q(),yt):R},yt.x=function(J){return arguments.length?(w=typeof J=="function"?J:Ot(+J),Q(),yt):w},yt}function X(w){var R=Ot(.1),N,f,ct;typeof w!="function"&&(w=Ot(w==null?0:+w));function yt(J){for(var gt=0,V=N.length,Lt;gt<V;++gt)Lt=N[gt],Lt.vy+=(ct[gt]-Lt.y)*f[gt]*J}function Q(){if(N){var J,gt=N.length;for(f=new Array(gt),ct=new Array(gt),J=0;J<gt;++J)f[J]=isNaN(ct[J]=+w(N[J],J,N))?0:+R(N[J],J,N)}}return yt.initialize=function(J){N=J,Q()},yt.strength=function(J){return arguments.length?(R=typeof J=="function"?J:Ot(+J),Q(),yt):R},yt.y=function(J){return arguments.length?(w=typeof J=="function"?J:Ot(+J),Q(),yt):w},yt}a.forceCenter=Et,a.forceCollide=rt,a.forceLink=et,a.forceManyBody=Tt,a.forceRadial=pt,a.forceSimulation=Nt,a.forceX=W,a.forceY=X,Object.defineProperty(a,"__esModule",{value:!0})})});var $o=hn((Ir,Lo)=>{(function(a,v){typeof Ir=="object"&&typeof Lo<"u"?v(Ir,vi()):typeof define=="function"&&define.amd?define(["exports","d3-array"],v):v(a.d3=a.d3||{},a.d3)})(Ir,function(a,v){"use strict";function B(){return new Y}function Y(){this.reset()}Y.prototype={constructor:Y,reset:function(){this.s=this.t=0},add:function(h){Et(kt,h,this.t),Et(this,kt.s,this.s),this.s?this.t+=kt.t:this.s=kt.t},valueOf:function(){return this.s}};var kt=new Y;function Et(h,b,F){var P=h.s=b+F,K=P-b,Dt=P-K;h.t=b-Dt+(F-K)}var Ot=1e-6,At=1e-12,xt=Math.PI,wt=xt/2,rt=xt/4,Rt=xt*2,zt=180/xt,et=xt/180,Pt=Math.abs,j=Math.atan,Mt=Math.atan2,ht=Math.cos,Nt=Math.ceil,Tt=Math.exp,pt=Math.log,W=Math.pow,X=Math.sin,w=Math.sign||function(h){return h>0?1:h<0?-1:0},R=Math.sqrt,N=Math.tan;function f(h){return h>1?0:h<-1?xt:Math.acos(h)}function ct(h){return h>1?wt:h<-1?-wt:Math.asin(h)}
vendor: 7,766 bytes, line 20
20function yt(h){return(h=X(h/2))*h}function Q(){}function J(h,b){h&&V.hasOwnProperty(h.type)&&V[h.type](h,b)}var gt={Feature:function(h,b){J(h.geometry,b)},FeatureCollection:function(h,b){for(var F=h.features,P=-1,K=F.length;++P<K;)J(F[P].geometry,b)}},V={Sphere:function(h,b){b.sphere()},Point:function(h,b){h=h.coordinates,b.point(h[0],h[1],h[2])},MultiPoint:function(h,b){for(var F=h.coordinates,P=-1,K=F.length;++P<K;)h=F[P],b.point(h[0],h[1],h[2])},LineString:function(h,b){Lt(h.coordinates,b,0)},MultiLineString:function(h,b){for(var F=h.coordinates,P=-1,K=F.length;++P<K;)Lt(F[P],b,0)},Polygon:function(h,b){at(h.coordinates,b)},MultiPolygon:function(h,b){for(var F=h.coordinates,P=-1,K=F.length;++P<K;)at(F[P],b)},GeometryCollection:function(h,b){for(var F=h.geometries,P=-1,K=F.length;++P<K;)J(F[P],b)}};function Lt(h,b,F){var P=-1,K=h.length-F,Dt;for(b.lineStart();++P<K;)Dt=h[P],b.point(Dt[0],Dt[1],Dt[2]);b.lineEnd()}function at(h,b){var F=-1,P=h.length;for(b.polygonStart();++F<P;)Lt(h[F],b,1);b.polygonEnd()}function _t(h,b){h&>.hasOwnProperty(h.type)?gt[h.type](h,b):J(h,b)}var bt=B(),ft=B(),vt,Ct,Gt,ue,ie,xe={point:Q,lineStart:Q,lineEnd:Q,polygonStart:function(){bt.reset(),xe.lineStart=y,xe.lineEnd=$},polygonEnd:function(){var h=+bt;ft.add(h<0?Rt+h:h),this.lineStart=this.lineEnd=this.point=Q},sphere:function(){ft.add(Rt)}};function y(){xe.point=x}function $(){A(vt,Ct)}function x(h,b){xe.point=A,vt=h,Ct=b,h*=et,b*=et,Gt=h,ue=ht(b=b/2+rt),ie=X(b)}function A(h,b){h*=et,b*=et,b=b/2+rt;var F=h-Gt,P=F>=0?1:-1,K=P*F,Dt=ht(b),Yt=X(b),Kt=ie*Yt,ne=ue*Dt+Kt*ht(K),ge=Kt*P*X(K);bt.add(Mt(ge,ne)),Gt=h,ue=Dt,ie=Yt}function k(h){return ft.reset(),_t(h,xe),ft*2}function _(h){return[Mt(h[1],h[0]),ct(h[2])]}function it(h){var b=h[0],F=h[1],P=ht(F);return[P*ht(b),P*X(b),X(F)]}function ut(h,b){return h[0]*b[0]+h[1]*b[1]+h[2]*b[2]}function Wt(h,b){return[h[1]*b[2]-h[2]*b[1],h[2]*b[0]-h[0]*b[2],h[0]*b[1]-h[1]*b[0]]}function qt(h,b){h[0]+=b[0],h[1]+=b[1],h[2]+=b[2]}function pe(h,b){return[h[0]*b,h[1]*b,h[2]*b]}function le(h){var b=R(h[0]*h[0]+h[1]*h[1]+h[2]*h[2]);h[0]/=b,h[1]/=b,h[2]/=b}var Qt,Xt,be,ee,Ce,Fe,ze,l,C=B(),tt,It,Ut={point:Jt,lineStart:oe,lineEnd:Oe,polygonStart:function(){Ut.point=De,Ut.lineStart=ke,Ut.lineEnd=Ie,C.reset(),xe.polygonStart()},polygonEnd:function(){xe.polygonEnd(),Ut.point=Jt,Ut.lineStart=oe,Ut.lineEnd=Oe,bt<0?(Qt=-(be=180),Xt=-(ee=90)):C>Ot?ee=90:C<-Ot&&(Xt=-90),It[0]=Qt,It[1]=be}};function Jt(h,b){tt.push(It=[Qt=h,be=h]),b<Xt&&(Xt=b),b>ee&&(ee=b)}function Zt(h,b){var F=it([h*et,b*et]);if(l){var P=Wt(l,F),K=[P[1],-P[0],0],Dt=Wt(K,P);le(Dt),Dt=_(Dt);var Yt=h-Ce,Kt=Yt>0?1:-1,ne=Dt[0]*zt*Kt,ge,Ht=Pt(Yt)>180;Ht^(Kt*Ce<ne&&ne<Kt*h)?(ge=Dt[1]*zt,ge>ee&&(ee=ge)):(ne=(ne+360)%360-180,Ht^(Kt*Ce<ne&&ne<Kt*h)?(ge=-Dt[1]*zt,ge<Xt&&(Xt=ge)):(b<Xt&&(Xt=b),b>ee&&(ee=b))),Ht?h<Ce?He(Qt,h)>He(Qt,be)&&(be=h):He(h,be)>He(Qt,be)&&(Qt=h):be>=Qt?(h<Qt&&(Qt=h),h>be&&(be=h)):h>Ce?He(Qt,h)>He(Qt,be)&&(be=h):He(h,be)>He(Qt,be)&&(Qt=h)}else tt.push(It=[Qt=h,be=h]);b<Xt&&(Xt=b),b>ee&&(ee=b),l=F,Ce=h}function oe(){Ut.point=Zt}function Oe(){It[0]=Qt,It[1]=be,Ut.point=Jt,l=null}function De(h,b){if(l){var F=h-Ce;C.add(Pt(F)>180?F+(F>0?360:-360):F)}else Fe=h,ze=b;xe.point(h,b),Zt(h,b)}function ke(){xe.lineStart()}function Ie(){De(Fe,ze),xe.lineEnd(),Pt(C)>Ot&&(Qt=-(be=180)),It[0]=Qt,It[1]=be,l=null}function He(h,b){return(b-=h)<0?b+360:b}function an(h,b){return h[0]-b[0]}function nt(h,b){return h[0]<=h[1]?h[0]<=b&&b<=h[1]:b<h[0]||h[1]<b}function Bt(h){var b,F,P,K,Dt,Yt,Kt;if(ee=be=-(Qt=Xt=1/0),tt=[],_t(h,Ut),F=tt.length){for(tt.sort(an),b=1,P=tt[0],Dt=[P];b<F;++b)K=tt[b],nt(P,K[0])||nt(P,K[1])?(He(P[0],K[1])>He(P[0],P[1])&&(P[1]=K[1]),He(K[0],P[1])>He(P[0],P[1])&&(P[0]=K[0])):Dt.push(P=K);for(Yt=-1/0,F=Dt.length-1,b=0,P=Dt[F];b<=F;P=K,++b)K=Dt[b],(Kt=He(P[1],K[0]))>Yt&&(Yt=Kt,Qt=K[0],be=P[1])}return tt=It=null,Qt===1/0||Xt===1/0?[[NaN,NaN],[NaN,NaN]]:[[Qt,Xt],[be,ee]]}var de,E,H,m,p,M,T,z,G,Z,q,mt,Ft,lt,jt,re,ce={sphere:Q,point:ye,lineStart:Ue,lineEnd:on,polygonStart:function(){ce.lineStart=gn,ce.lineEnd=$n},polygonEnd:function(){ce.lineStart=Ue,ce.lineEnd=on}};function ye(h,b){h*=et,b*=et;var F=ht(b);Ne(F*ht(h),F*X(h),X(b))}function Ne(h,b,F){++de,H+=(h-H)/de,m+=(b-m)/de,p+=(F-p)/de}function Ue(){ce.point=fn}function fn(h,b){h*=et,b*=et;var F=ht(b);lt=F*ht(h),jt=F*X(h),re=X(b),ce.point=sn,Ne(lt,jt,re)}function sn(h,b){h*=et,b*=et;var F=ht(b),P=F*ht(h),K=F*X(h),Dt=X(b),Yt=Mt(R((Yt=jt*Dt-re*K)*Yt+(Yt=re*P-lt*Dt)*Yt+(Yt=lt*K-jt*P)*Yt),lt*P+jt*K+re*Dt);E+=Yt,M+=Yt*(lt+(lt=P)),T+=Yt*(jt+(jt=K)),z+=Yt*(re+(re=Dt)),Ne(lt,jt,re)}function on(){ce.point=ye}function gn(){ce.point=Sn}function $n(){Ve(mt,Ft),ce.point=ye}function Sn(h,b){mt=h,Ft=b,h*=et,b*=et,ce.point=Ve;var F=ht(b);lt=F*ht(h),jt=F*X(h),re=X(b),Ne(lt,jt,re)}function Ve(h,b){h*=et,b*=et;var F=ht(b),P=F*ht(h),K=F*X(h),Dt=X(b),Yt=jt*Dt-re*K,Kt=re*P-lt*Dt,ne=lt*K-jt*P,ge=R(Yt*Yt+Kt*Kt+ne*ne),Ht=ct(ge),ae=ge&&-Ht/ge;G+=ae*Yt,Z+=ae*Kt,q+=ae*ne,E+=Ht,M+=Ht*(lt+(lt=P)),T+=Ht*(jt+(jt=K)),z+=Ht*(re+(re=Dt)),Ne(lt,jt,re)}function An(h){de=E=H=m=p=M=T=z=G=Z=q=0,_t(h,ce);var b=G,F=Z,P=q,K=b*b+F*F+P*P;return K<At&&(b=M,F=T,P=z,E<Ot&&(b=H,F=m,P=p),K=b*b+F*F+P*P,K<At)?[NaN,NaN]:[Mt(F,b)*zt,ct(P/R(K))*zt]}function pn(h){return function(){return h}}function wn(h,b){function F(P,K){return P=h(P,K),b(P[0],P[1])}return h.invert&&b.invert&&(F.invert=function(P,K){return P=b.invert(P,K),P&&h.invert(P[0],P[1])}),F}function U(h,b){return[Pt(h)>xt?h+Math.round(-h/Rt)*Rt:h,b]}U.invert=U;function St(h,b,F){return(h%=Rt)?b||F?wn(_e(h),we(b,F)):_e(h):b||F?we(b,F):U}function se(h){return function(b,F){return b+=h,[b>xt?b-Rt:b<-xt?b+Rt:b,F]}}function _e(h){var b=se(h);return b.invert=se(-h),b}function we(h,b){var F=ht(h),P=X(h),K=ht(b),Dt=X(b);function Yt(Kt,ne){var ge=ht(ne),Ht=ht(Kt)*ge,ae=X(Kt)*ge,te=X(ne),fe=te*F+Ht*P;return[Mt(ae*K-fe*Dt,Ht*F-te*P),ct(fe*K+ae*Dt)]}return Yt.invert=function(Kt,ne){var ge=ht(ne),Ht=ht(Kt)*ge,ae=X(Kt)*ge,te=X(ne),fe=te*K-ae*Dt;return[Mt(ae*K+te*Dt,Ht*F+fe*P),ct(fe*F-Ht*P)]},Yt}function Re(h){h=St(h[0]*et,h[1]*et,h.length>2?h[2]*et:0);function b(F){return F=h(F[0]*et,F[1]*et),F[0]*=zt,F[1]*=zt,F}return b.invert=function(F){return F=h.invert(F[0]*et,F[1]*et),F[0]*=zt,F[1]*=zt,F},b}function s(h,b,F,P,K,Dt){if(F){var Yt=ht(b),Kt=X(b),ne=P*F;K==null?(K=b+P*Rt,Dt=b-ne/2):(K=e(Yt,K),Dt=e(Yt,Dt),(P>0?K<Dt:K>Dt)&&(K+=P*Rt));for(var ge,Ht=K;P>0?Ht>Dt:Ht<Dt;Ht-=ne)ge=_([Yt,-Kt*ht(Ht),-Kt*X(Ht)]),h.point(ge[0],ge[1])}}function e(h,b){b=it(b),b[0]-=h,le(b);var F=f(-b[1]);return((-b[2]<0?-F:F)+Rt-Ot)%Rt}function t(){var h=pn([0,0]),b=pn(90),F=pn(6),P,K,Dt={point:Yt};function Yt(ne,ge){P.push(ne=K(ne,ge)),ne[0]*=zt,ne[1]*=zt}function Kt(){var ne=h.apply(this,arguments),ge=b.apply(this,arguments)*et,Ht=F.apply(this,arguments)*et;return P=[],K=St(-ne[0]*et,-ne[1]*et,0).invert,s(Dt,ge,Ht,1),ne={type:"Polygon",coordinates:[P]},P=K=null,ne}return Kt.center=function(ne){return arguments.length?(h=typeof ne=="function"?ne:pn([+ne[0],+ne[1]]),Kt):h},Kt.radius=function(ne){return arguments.length?(b=typeof ne=="function"?ne:pn(+ne),Kt):b},Kt.precision=function(ne){return arguments.length?(F=typeof ne=="function"?ne:pn(+ne),Kt):F},Kt}function n(){var h=[],b;return{point:function(F,P){b.push([F,P])},lineStart:function(){h.push(b=[])},lineEnd:Q,rejoin:function(){h.length>1&&h.push(h.pop().concat(h.shift()))},result:function(){var F=h;return h=[],b=null,F}}}function i(h,b){return Pt(h[0]-b[0])<Ot&&Pt(h[1]-b[1])<Ot}function r(h,b,F,P){this.x=h,this.z=b,this.o=F,this.e=P,this.v=!1,this.n=this.p=null}function o(h,b,F,P,K){var Dt=[],Yt=[],Kt,ne;if(h.forEach(function(me){if(!((Le=me.length-1)<=0)){var Le,Be=me[0],je=me[Le],Ge;if(i(Be,je)){for(K.lineStart(),Kt=0;Kt<Le;++Kt)K.point((Be=me[Kt])[0],Be[1]);K.lineEnd();return}
vendor: 13,286 bytes, line 20
20Dt.push(Ge=new r(Be,me,null,!0)),Yt.push(Ge.o=new r(Be,null,Ge,!1)),Dt.push(Ge=new r(je,me,null,!1)),Yt.push(Ge.o=new r(je,null,Ge,!0))}}),!!Dt.length){for(Yt.sort(b),u(Dt),u(Yt),Kt=0,ne=Yt.length;Kt<ne;++Kt)Yt[Kt].e=F=!F;for(var ge=Dt[0],Ht,ae;;){for(var te=ge,fe=!0;te.v;)if((te=te.n)===ge)return;Ht=te.z,K.lineStart();do{if(te.v=te.o.v=!0,te.e){if(fe)for(Kt=0,ne=Ht.length;Kt<ne;++Kt)K.point((ae=Ht[Kt])[0],ae[1]);else P(te.x,te.n.x,1,K);te=te.n}else{if(fe)for(Ht=te.p.z,Kt=Ht.length-1;Kt>=0;--Kt)K.point((ae=Ht[Kt])[0],ae[1]);else P(te.x,te.p.x,-1,K);te=te.p}te=te.o,Ht=te.z,fe=!fe}while(!te.v);K.lineEnd()}}}function u(h){if(b=h.length){for(var b,F=0,P=h[0],K;++F<b;)P.n=K=h[F],K.p=P,P=K;P.n=K=h[0],K.p=P}}var d=B();function O(h,b){var F=b[0],P=b[1],K=X(P),Dt=[X(F),-ht(F),0],Yt=0,Kt=0;d.reset(),K===1?P=wt+Ot:K===-1&&(P=-wt-Ot);for(var ne=0,ge=h.length;ne<ge;++ne)if(ae=(Ht=h[ne]).length)for(var Ht,ae,te=Ht[ae-1],fe=te[0],me=te[1]/2+rt,Le=X(me),Be=ht(me),je=0;je<ae;++je,fe=$e,Le=rn,Be=ln,te=Ge){var Ge=Ht[je],$e=Ge[0],Ke=Ge[1]/2+rt,rn=X(Ke),ln=ht(Ke),xn=$e-fe,Mn=xn>=0?1:-1,nn=Mn*xn,kn=nn>xt,On=Le*rn;if(d.add(Mt(On*Mn*X(nn),Be*ln+On*ht(nn))),Yt+=kn?xn+Mn*Rt:xn,kn^fe>=F^$e>=F){var En=Wt(it(te),it(Ge));le(En);var qe=Wt(Dt,En);le(qe);var bn=(kn^xn>=0?-1:1)*ct(qe[2]);(P>bn||P===bn&&(En[0]||En[1]))&&(Kt+=kn^xn>=0?1:-1)}}return(Yt<-Ot||Yt<Ot&&d<-Ot)^Kt&1}function S(h,b,F,P){return function(K){var Dt=b(K),Yt=n(),Kt=b(Yt),ne=!1,ge,Ht,ae,te={point:fe,lineStart:Le,lineEnd:Be,polygonStart:function(){te.point=je,te.lineStart=Ge,te.lineEnd=$e,Ht=[],ge=[]},polygonEnd:function(){te.point=fe,te.lineStart=Le,te.lineEnd=Be,Ht=v.merge(Ht);var Ke=O(ge,P);Ht.length?(ne||(K.polygonStart(),ne=!0),o(Ht,c,Ke,F,K)):Ke&&(ne||(K.polygonStart(),ne=!0),K.lineStart(),F(null,null,1,K),K.lineEnd()),ne&&(K.polygonEnd(),ne=!1),Ht=ge=null},sphere:function(){K.polygonStart(),K.lineStart(),F(null,null,1,K),K.lineEnd(),K.polygonEnd()}};function fe(Ke,rn){h(Ke,rn)&&K.point(Ke,rn)}function me(Ke,rn){Dt.point(Ke,rn)}function Le(){te.point=me,Dt.lineStart()}function Be(){te.point=fe,Dt.lineEnd()}function je(Ke,rn){ae.push([Ke,rn]),Kt.point(Ke,rn)}function Ge(){Kt.lineStart(),ae=[]}function $e(){je(ae[0][0],ae[0][1]),Kt.lineEnd();var Ke=Kt.clean(),rn=Yt.result(),ln,xn=rn.length,Mn,nn,kn;if(ae.pop(),ge.push(ae),ae=null,!!xn){if(Ke&1){if(nn=rn[0],(Mn=nn.length-1)>0){for(ne||(K.polygonStart(),ne=!0),K.lineStart(),ln=0;ln<Mn;++ln)K.point((kn=nn[ln])[0],kn[1]);K.lineEnd()}return}xn>1&&Ke&2&&rn.push(rn.pop().concat(rn.shift())),Ht.push(rn.filter(D))}}return te}}function D(h){return h.length>1}function c(h,b){return((h=h.x)[0]<0?h[1]-wt-Ot:wt-h[1])-((b=b.x)[0]<0?b[1]-wt-Ot:wt-b[1])}var g=S(function(){return!0},L,ot,[-xt,-wt]);function L(h){var b=NaN,F=NaN,P=NaN,K;return{lineStart:function(){h.lineStart(),K=1},point:function(Dt,Yt){var Kt=Dt>0?xt:-xt,ne=Pt(Dt-b);Pt(ne-xt)<Ot?(h.point(b,F=(F+Yt)/2>0?wt:-wt),h.point(P,F),h.lineEnd(),h.lineStart(),h.point(Kt,F),h.point(Dt,F),K=0):P!==Kt&&ne>=xt&&(Pt(b-P)<Ot&&(b-=P*Ot),Pt(Dt-Kt)<Ot&&(Dt-=Kt*Ot),F=I(b,F,Dt,Yt),h.point(P,F),h.lineEnd(),h.lineStart(),h.point(Kt,F),K=0),h.point(b=Dt,F=Yt),P=Kt},lineEnd:function(){h.lineEnd(),b=F=NaN},clean:function(){return 2-K}}}function I(h,b,F,P){var K,Dt,Yt=X(h-F);return Pt(Yt)>Ot?j((X(b)*(Dt=ht(P))*X(F)-X(P)*(K=ht(b))*X(h))/(K*Dt*Yt)):(b+P)/2}function ot(h,b,F,P){var K;if(h==null)K=F*wt,P.point(-xt,K),P.point(0,K),P.point(xt,K),P.point(xt,0),P.point(xt,-K),P.point(0,-K),P.point(-xt,-K),P.point(-xt,0),P.point(-xt,K);else if(Pt(h[0]-b[0])>Ot){var Dt=h[0]<b[0]?xt:-xt;K=F*Dt/2,P.point(-Dt,K),P.point(0,K),P.point(Dt,K)}else P.point(b[0],b[1])}function st(h){var b=ht(h),F=6*et,P=b>0,K=Pt(b)>Ot;function Dt(Ht,ae,te,fe){s(fe,h,F,te,Ht,ae)}function Yt(Ht,ae){return ht(Ht)*ht(ae)>b}function Kt(Ht){var ae,te,fe,me,Le;return{lineStart:function(){me=fe=!1,Le=1},point:function(Be,je){var Ge=[Be,je],$e,Ke=Yt(Be,je),rn=P?Ke?0:ge(Be,je):Ke?ge(Be+(Be<0?xt:-xt),je):0;if(!ae&&(me=fe=Ke)&&Ht.lineStart(),Ke!==fe&&($e=ne(ae,Ge),(!$e||i(ae,$e)||i(Ge,$e))&&(Ge[0]+=Ot,Ge[1]+=Ot,Ke=Yt(Ge[0],Ge[1]))),Ke!==fe)Le=0,Ke?(Ht.lineStart(),$e=ne(Ge,ae),Ht.point($e[0],$e[1])):($e=ne(ae,Ge),Ht.point($e[0],$e[1]),Ht.lineEnd()),ae=$e;else if(K&&ae&&P^Ke){var ln;!(rn&te)&&(ln=ne(Ge,ae,!0))&&(Le=0,P?(Ht.lineStart(),Ht.point(ln[0][0],ln[0][1]),Ht.point(ln[1][0],ln[1][1]),Ht.lineEnd()):(Ht.point(ln[1][0],ln[1][1]),Ht.lineEnd(),Ht.lineStart(),Ht.point(ln[0][0],ln[0][1])))}Ke&&(!ae||!i(ae,Ge))&&Ht.point(Ge[0],Ge[1]),ae=Ge,fe=Ke,te=rn},lineEnd:function(){fe&&Ht.lineEnd(),ae=null},clean:function(){return Le|(me&&fe)<<1}}}function ne(Ht,ae,te){var fe=it(Ht),me=it(ae),Le=[1,0,0],Be=Wt(fe,me),je=ut(Be,Be),Ge=Be[0],$e=je-Ge*Ge;if(!$e)return!te&&Ht;var Ke=b*je/$e,rn=-b*Ge/$e,ln=Wt(Le,Be),xn=pe(Le,Ke),Mn=pe(Be,rn);qt(xn,Mn);var nn=ln,kn=ut(xn,nn),On=ut(nn,nn),En=kn*kn-On*(ut(xn,xn)-1);if(!(En<0)){var qe=R(En),bn=pe(nn,(-kn-qe)/On);if(qt(bn,xn),bn=_(bn),!te)return bn;var Tn=Ht[0],Ln=ae[0],Dn=Ht[1],Bn=ae[1],Un;Ln<Tn&&(Un=Tn,Tn=Ln,Ln=Un);var Ri=Ln-Tn,Jn=Pt(Ri-xt)<Ot,ai=Jn||Ri<Ot;if(!Jn&&Bn<Dn&&(Un=Dn,Dn=Bn,Bn=Un),ai?Jn?Dn+Bn>0^bn[1]<(Pt(bn[0]-Tn)<Ot?Dn:Bn):Dn<=bn[1]&&bn[1]<=Bn:Ri>xt^(Tn<=bn[0]&&bn[0]<=Ln)){var Qn=pe(nn,(-kn+qe)/On);return qt(Qn,xn),[bn,_(Qn)]}}}function ge(Ht,ae){var te=P?h:xt-h,fe=0;return Ht<-te?fe|=1:Ht>te&&(fe|=2),ae<-te?fe|=4:ae>te&&(fe|=8),fe}return S(Yt,Kt,Dt,P?[0,-h]:[-xt,h-xt])}function $t(h,b,F,P,K,Dt){var Yt=h[0],Kt=h[1],ne=b[0],ge=b[1],Ht=0,ae=1,te=ne-Yt,fe=ge-Kt,me;if(me=F-Yt,!(!te&&me>0)){if(me/=te,te<0){if(me<Ht)return;me<ae&&(ae=me)}else if(te>0){if(me>ae)return;me>Ht&&(Ht=me)}if(me=K-Yt,!(!te&&me<0)){if(me/=te,te<0){if(me>ae)return;me>Ht&&(Ht=me)}else if(te>0){if(me<Ht)return;me<ae&&(ae=me)}if(me=P-Kt,!(!fe&&me>0)){if(me/=fe,fe<0){if(me<Ht)return;me<ae&&(ae=me)}else if(fe>0){if(me>ae)return;me>Ht&&(Ht=me)}if(me=Dt-Kt,!(!fe&&me<0)){if(me/=fe,fe<0){if(me>ae)return;me>Ht&&(Ht=me)}else if(fe>0){if(me<Ht)return;me<ae&&(ae=me)}return Ht>0&&(h[0]=Yt+Ht*te,h[1]=Kt+Ht*fe),ae<1&&(b[0]=Yt+ae*te,b[1]=Kt+ae*fe),!0}}}}}var dt=1e9,Vt=-dt;function he(h,b,F,P){function K(ge,Ht){return h<=ge&&ge<=F&&b<=Ht&&Ht<=P}function Dt(ge,Ht,ae,te){var fe=0,me=0;if(ge==null||(fe=Yt(ge,ae))!==(me=Yt(Ht,ae))||ne(ge,Ht)<0^ae>0)do te.point(fe===0||fe===3?h:F,fe>1?P:b);while((fe=(fe+ae+4)%4)!==me);else te.point(Ht[0],Ht[1])}function Yt(ge,Ht){return Pt(ge[0]-h)<Ot?Ht>0?0:3:Pt(ge[0]-F)<Ot?Ht>0?2:1:Pt(ge[1]-b)<Ot?Ht>0?1:0:Ht>0?3:2}function Kt(ge,Ht){return ne(ge.x,Ht.x)}function ne(ge,Ht){var ae=Yt(ge,1),te=Yt(Ht,1);return ae!==te?ae-te:ae===0?Ht[1]-ge[1]:ae===1?ge[0]-Ht[0]:ae===2?ge[1]-Ht[1]:Ht[0]-ge[0]}return function(ge){var Ht=ge,ae=n(),te,fe,me,Le,Be,je,Ge,$e,Ke,rn,ln,xn={point:Mn,lineStart:En,lineEnd:qe,polygonStart:kn,polygonEnd:On};function Mn(Tn,Ln){K(Tn,Ln)&&Ht.point(Tn,Ln)}function nn(){for(var Tn=0,Ln=0,Dn=fe.length;Ln<Dn;++Ln)for(var Bn=fe[Ln],Un=1,Ri=Bn.length,Jn=Bn[0],ai,Qn,Ji=Jn[0],di=Jn[1];Un<Ri;++Un)ai=Ji,Qn=di,Jn=Bn[Un],Ji=Jn[0],di=Jn[1],Qn<=P?di>P&&(Ji-ai)*(P-Qn)>(di-Qn)*(h-ai)&&++Tn:di<=P&&(Ji-ai)*(P-Qn)<(di-Qn)*(h-ai)&&--Tn;return Tn}function kn(){Ht=ae,te=[],fe=[],ln=!0}function On(){var Tn=nn(),Ln=ln&&Tn,Dn=(te=v.merge(te)).length;(Ln||Dn)&&(ge.polygonStart(),Ln&&(ge.lineStart(),Dt(null,null,1,ge),ge.lineEnd()),Dn&&o(te,Kt,Tn,Dt,ge),ge.polygonEnd()),Ht=ge,te=fe=me=null}function En(){xn.point=bn,fe&&fe.push(me=[]),rn=!0,Ke=!1,Ge=$e=NaN}function qe(){te&&(bn(Le,Be),je&&Ke&&ae.rejoin(),te.push(ae.result())),xn.point=Mn,Ke&&Ht.lineEnd()}function bn(Tn,Ln){var Dn=K(Tn,Ln);if(fe&&me.push([Tn,Ln]),rn)Le=Tn,Be=Ln,je=Dn,rn=!1,Dn&&(Ht.lineStart(),Ht.point(Tn,Ln));else if(Dn&&Ke)Ht.point(Tn,Ln);else{var Bn=[Ge=Math.max(Vt,Math.min(dt,Ge)),$e=Math.max(Vt,Math.min(dt,$e))],Un=[Tn=Math.max(Vt,Math.min(dt,Tn)),Ln=Math.max(Vt,Math.min(dt,Ln))];$t(Bn,Un,h,b,F,P)?(Ke||(Ht.lineStart(),Ht.point(Bn[0],Bn[1])),Ht.point(Un[0],Un[1]),Dn||Ht.lineEnd(),ln=!1):Dn&&(Ht.lineStart(),Ht.point(Tn,Ln),ln=!1)}Ge=Tn,$e=Ln,Ke=Dn}return xn}}function ve(){var h=0,b=0,F=960,P=500,K,Dt,Yt;return Yt={stream:function(Kt){return K&&Dt===Kt?K:K=he(h,b,F,P)(Dt=Kt)},extent:function(Kt){return arguments.length?(h=+Kt[0][0],b=+Kt[0][1],F=+Kt[1][0],P=+Kt[1][1],K=Dt=null,Yt):[[h,b],[F,P]]}}}var Ae=B(),Ee,We,Ye,Xe={sphere:Q,point:Q,lineStart:Te,lineEnd:Q,polygonStart:Q,polygonEnd:Q};function Te(){Xe.point=Qe,Xe.lineEnd=en}function en(){Xe.point=Xe.lineEnd=Q}function Qe(h,b){h*=et,b*=et,Ee=h,We=X(b),Ye=ht(b),Xe.point=Ze}function Ze(h,b){h*=et,b*=et;var F=X(b),P=ht(b),K=Pt(h-Ee),Dt=ht(K),Yt=X(K),Kt=P*Yt,ne=Ye*F-We*P*Dt,ge=We*F+Ye*P*Dt;Ae.add(Mt(R(Kt*Kt+ne*ne),ge)),Ee=h,We=F,Ye=P}function un(h){return Ae.reset(),_t(h,Xe),+Ae}var Cn=[null,null],mn={type:"LineString",coordinates:Cn};function tn(h,b){return Cn[0]=h,Cn[1]=b,un(mn)}var dn={Feature:function(h,b){return cn(h.geometry,b)},FeatureCollection:function(h,b){for(var F=h.features,P=-1,K=F.length;++P<K;)if(cn(F[P].geometry,b))return!0;return!1}},Je={Sphere:function(){return!0},Point:function(h,b){return Se(h.coordinates,b)},MultiPoint:function(h,b){for(var F=h.coordinates,P=-1,K=F.length;++P<K;)if(Se(F[P],b))return!0;return!1},LineString:function(h,b){return Me(h.coordinates,b)},MultiLineString:function(h,b){for(var F=h.coordinates,P=-1,K=F.length;++P<K;)if(Me(F[P],b))return!0;return!1},Polygon:function(h,b){return Pe(h.coordinates,b)},MultiPolygon:function(h,b){for(var F=h.coordinates,P=-1,K=F.length;++P<K;)if(Pe(F[P],b))return!0;return!1},GeometryCollection:function(h,b){for(var F=h.geometries,P=-1,K=F.length;++P<K;)if(cn(F[P],b))return!0;return!1}};function cn(h,b){return h&&Je.hasOwnProperty(h.type)?Je[h.type](h,b):!1}function Se(h,b){return tn(h,b)===0}function Me(h,b){var F=tn(h[0],h[1]),P=tn(h[0],b),K=tn(b,h[1]);return P+K<=F+Ot}function Pe(h,b){return!!O(h.map(yn),_n(b))}function yn(h){return h=h.map(_n),h.pop(),h}function _n(h){return[h[0]*et,h[1]*et]}function Pn(h,b){return(h&&dn.hasOwnProperty(h.type)?dn[h.type]:cn)(h,b)}function Rn(h,b,F){var P=v.range(h,b-Ot,F).concat(b);return function(K){return P.map(function(Dt){return[K,Dt]})}}function In(h,b,F){var P=v.range(h,b-Ot,F).concat(b);return function(K){return P.map(function(Dt){return[Dt,K]})}}function Nn(){var h,b,F,P,K,Dt,Yt,Kt,ne=10,ge=ne,Ht=90,ae=360,te,fe,me,Le,Be=2.5;function je(){return{type:"MultiLineString",coordinates:Ge()}}function Ge(){return v.range(Nt(P/Ht)*Ht,F,Ht).map(me).concat(v.range(Nt(Kt/ae)*ae,Yt,ae).map(Le)).concat(v.range(Nt(b/ne)*ne,h,ne).filter(function($e){return Pt($e%Ht)>Ot}).map(te)).concat(v.range(Nt(Dt/ge)*ge,K,ge).filter(function($e){return Pt($e%ae)>Ot}).map(fe))}return je.lines=function(){return Ge().map(function($e){return{type:"LineString",coordinates:$e}})},je.outline=function(){return{type:"Polygon",coordinates:[me(P).concat(Le(Yt).slice(1),me(F).reverse().slice(1),Le(Kt).reverse().slice(1))]}},je.extent=function($e){return arguments.length?je.extentMajor($e).extentMinor($e):je.extentMinor()},je.extentMajor=function($e){return arguments.length?(P=+$e[0][0],F=+$e[1][0],Kt=+$e[0][1],Yt=+$e[1][1],P>F&&($e=P,P=F,F=$e),Kt>Yt&&($e=Kt,Kt=Yt,Yt=$e),je.precision(Be)):[[P,Kt],[F,Yt]]},je.extentMinor=function($e){return arguments.length?(b=+$e[0][0],h=+$e[1][0],Dt=+$e[0][1],K=+$e[1][1],b>h&&($e=b,b=h,h=$e),Dt>K&&($e=Dt,Dt=K,K=$e),je.precision(Be)):[[b,Dt],[h,K]]},je.step=function($e){return arguments.length?je.stepMajor($e).stepMinor($e):je.stepMinor()},je.stepMajor=function($e){return arguments.length?(Ht=+$e[0],ae=+$e[1],je):[Ht,ae]},je.stepMinor=function($e){return arguments.length?(ne=+$e[0],ge=+$e[1],je):[ne,ge]},je.precision=function($e){return arguments.length?(Be=+$e,te=Rn(Dt,K,90),fe=In(b,h,Be),me=Rn(Kt,Yt,90),Le=In(P,F,Be),je):Be},je.extentMajor([[-180,-90+Ot],[180,90-Ot]]).extentMinor([[-180,-80-Ot],[180,80+Ot]])}function Yn(){return Nn()()}function qn(h,b){var F=h[0]*et,P=h[1]*et,K=b[0]*et,Dt=b[1]*et,Yt=ht(P),Kt=X(P),ne=ht(Dt),ge=X(Dt),Ht=Yt*ht(F),ae=Yt*X(F),te=ne*ht(K),fe=ne*X(K),me=2*ct(R(yt(Dt-P)+Yt*ne*yt(K-F))),Le=X(me),Be=me?function(je){var Ge=X(je*=me)/Le,$e=X(me-je)/Le,Ke=$e*Ht+Ge*te,rn=$e*ae+Ge*fe,ln=$e*Kt+Ge*ge;return[Mt(rn,Ke)*zt,Mt(ln,R(Ke*Ke+rn*rn))*zt]}:function(){return[F*zt,P*zt]};return Be.distance=me,Be}function Fn(h){return h}var zn=B(),Xn=B(),ui,li,ni,ii,Hn={point:Q,lineStart:Q,lineEnd:Q,polygonStart:function(){Hn.lineStart=Bi,Hn.lineEnd=Rc},polygonEnd:function(){Hn.lineStart=Hn.lineEnd=Hn.point=Q,zn.add(Pt(Xn)),Xn.reset()},result:function(){var h=zn/2;return zn.reset(),h}};function Bi(){Hn.point=Oc}function Oc(h,b){Hn.point=La,ui=ni=h,li=ii=b}function La(h,b){Xn.add(ii*h-ni*b),ni=h,ii=b}function Rc(){La(ui,li)}var fi=1/0,Yi=fi,yi=-fi,qi=yi,Hi={point:Ec,lineStart:Q,lineEnd:Q,polygonStart:Q,polygonEnd:Q,result:function(){var h=[[fi,Yi],[yi,qi]];return yi=qi=-(Yi=fi=1/0),h}};function Ec(h,b){h<fi&&(fi=h),h>yi&&(yi=h),b<Yi&&(Yi=b),b>qi&&(qi=b)}var Zr=0,Kr=0,_i=0,Vi=0,Ui=0,hi=0,Jr=0,Qr=0,xi=0,$a,ka,jn,Gn,Vn={point:ri,lineStart:Oa,lineEnd:Ra,polygonStart:function(){Vn.lineStart=Fc,Vn.lineEnd=zc},polygonEnd:function(){Vn.point=ri,Vn.lineStart=Oa,Vn.lineEnd=Ra},result:function(){var h=xi?[Jr/xi,Qr/xi]:hi?[Vi/hi,Ui/hi]:_i?[Zr/_i,Kr/_i]:[NaN,NaN];return Zr=Kr=_i=Vi=Ui=hi=Jr=Qr=xi=0,h}};function ri(h,b){Zr+=h,Kr+=b,++_i}function Oa(){Vn.point=Pc}function Pc(h,b){Vn.point=Dc,ri(jn=h,Gn=b)}function Dc(h,b){var F=h-jn,P=b-Gn,K=R(F*F+P*P);
vendor: 8,678 bytes, line 20
20Vi+=K*(jn+h)/2,Ui+=K*(Gn+b)/2,hi+=K,ri(jn=h,Gn=b)}function Ra(){Vn.point=ri}function Fc(){Vn.point=Ic}function zc(){Ea($a,ka)}function Ic(h,b){Vn.point=Ea,ri($a=jn=h,ka=Gn=b)}function Ea(h,b){var F=h-jn,P=b-Gn,K=R(F*F+P*P);Vi+=K*(jn+h)/2,Ui+=K*(Gn+b)/2,hi+=K,K=Gn*h-jn*b,Jr+=K*(jn+h),Qr+=K*(Gn+b),xi+=K*3,ri(jn=h,Gn=b)}function Pa(h){this._context=h}Pa.prototype={_radius:4.5,pointRadius:function(h){return this._radius=h,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(h,b){switch(this._point){case 0:{this._context.moveTo(h,b),this._point=1;break}case 1:{this._context.lineTo(h,b);break}default:{this._context.moveTo(h+this._radius,b),this._context.arc(h,b,this._radius,0,Rt);break}}},result:Q};var ta=B(),ea,Da,Fa,bi,wi,Ti={point:Q,lineStart:function(){Ti.point=Nc},lineEnd:function(){ea&&za(Da,Fa),Ti.point=Q},polygonStart:function(){ea=!0},polygonEnd:function(){ea=null},result:function(){var h=+ta;return ta.reset(),h}};function Nc(h,b){Ti.point=za,Da=bi=h,Fa=wi=b}function za(h,b){bi-=h,wi-=b,ta.add(R(bi*bi+wi*wi)),bi=h,wi=b}function Ia(){this._string=[]}Ia.prototype={_radius:4.5,_circle:Na(4.5),pointRadius:function(h){return(h=+h)!==this._radius&&(this._radius=h,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(h,b){switch(this._point){case 0:{this._string.push("M",h,",",b),this._point=1;break}case 1:{this._string.push("L",h,",",b);break}default:{this._circle==null&&(this._circle=Na(this._radius)),this._string.push("M",h,",",b,this._circle);break}}},result:function(){if(this._string.length){var h=this._string.join("");return this._string=[],h}else return null}};function Na(h){return"m0,"+h+"a"+h+","+h+" 0 1,1 0,"+-2*h+"a"+h+","+h+" 0 1,1 0,"+2*h+"z"}function Xc(h,b){var F=4.5,P,K;function Dt(Yt){return Yt&&(typeof F=="function"&&K.pointRadius(+F.apply(this,arguments)),_t(Yt,P(K))),K.result()}return Dt.area=function(Yt){return _t(Yt,P(Hn)),Hn.result()},Dt.measure=function(Yt){return _t(Yt,P(Ti)),Ti.result()},Dt.bounds=function(Yt){return _t(Yt,P(Hi)),Hi.result()},Dt.centroid=function(Yt){return _t(Yt,P(Vn)),Vn.result()},Dt.projection=function(Yt){return arguments.length?(P=Yt==null?(h=null,Fn):(h=Yt).stream,Dt):h},Dt.context=function(Yt){return arguments.length?(K=Yt==null?(b=null,new Ia):new Pa(b=Yt),typeof F!="function"&&K.pointRadius(F),Dt):b},Dt.pointRadius=function(Yt){return arguments.length?(F=typeof Yt=="function"?Yt:(K.pointRadius(+Yt),+Yt),Dt):F},Dt.projection(h).context(b)}function Bc(h){return{stream:Ai(h)}}function Ai(h){return function(b){var F=new na;for(var P in h)F[P]=h[P];return F.stream=b,F}}function na(){}na.prototype={constructor:na,point:function(h,b){this.stream.point(h,b)},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 ia(h,b,F){var P=h.clipExtent&&h.clipExtent();return h.scale(150).translate([0,0]),P!=null&&h.clipExtent(null),_t(F,h.stream(Hi)),b(Hi.result()),P!=null&&h.clipExtent(P),h}function Wi(h,b,F){return ia(h,function(P){var K=b[1][0]-b[0][0],Dt=b[1][1]-b[0][1],Yt=Math.min(K/(P[1][0]-P[0][0]),Dt/(P[1][1]-P[0][1])),Kt=+b[0][0]+(K-Yt*(P[1][0]+P[0][0]))/2,ne=+b[0][1]+(Dt-Yt*(P[1][1]+P[0][1]))/2;h.scale(150*Yt).translate([Kt,ne])},F)}function ra(h,b,F){return Wi(h,[[0,0],b],F)}function aa(h,b,F){return ia(h,function(P){var K=+b,Dt=K/(P[1][0]-P[0][0]),Yt=(K-Dt*(P[1][0]+P[0][0]))/2,Kt=-Dt*P[0][1];h.scale(150*Dt).translate([Yt,Kt])},F)}function oa(h,b,F){return ia(h,function(P){var K=+b,Dt=K/(P[1][1]-P[0][1]),Yt=-Dt*P[0][0],Kt=(K-Dt*(P[1][1]+P[0][1]))/2;h.scale(150*Dt).translate([Yt,Kt])},F)}var Xa=16,Yc=ht(30*et);function Ba(h,b){return+b?Hc(h,b):qc(h)}function qc(h){return Ai({point:function(b,F){b=h(b,F),this.stream.point(b[0],b[1])}})}function Hc(h,b){function F(P,K,Dt,Yt,Kt,ne,ge,Ht,ae,te,fe,me,Le,Be){var je=ge-P,Ge=Ht-K,$e=je*je+Ge*Ge;if($e>4*b&&Le--){var Ke=Yt+te,rn=Kt+fe,ln=ne+me,xn=R(Ke*Ke+rn*rn+ln*ln),Mn=ct(ln/=xn),nn=Pt(Pt(ln)-1)<Ot||Pt(Dt-ae)<Ot?(Dt+ae)/2:Mt(rn,Ke),kn=h(nn,Mn),On=kn[0],En=kn[1],qe=On-P,bn=En-K,Tn=Ge*qe-je*bn;(Tn*Tn/$e>b||Pt((je*qe+Ge*bn)/$e-.5)>.3||Yt*te+Kt*fe+ne*me<Yc)&&(F(P,K,Dt,Yt,Kt,ne,On,En,nn,Ke/=xn,rn/=xn,ln,Le,Be),Be.point(On,En),F(On,En,nn,Ke,rn,ln,ge,Ht,ae,te,fe,me,Le,Be))}}return function(P){var K,Dt,Yt,Kt,ne,ge,Ht,ae,te,fe,me,Le,Be={point:je,lineStart:Ge,lineEnd:Ke,polygonStart:function(){P.polygonStart(),Be.lineStart=rn},polygonEnd:function(){P.polygonEnd(),Be.lineStart=Ge}};function je(Mn,nn){Mn=h(Mn,nn),P.point(Mn[0],Mn[1])}function Ge(){ae=NaN,Be.point=$e,P.lineStart()}function $e(Mn,nn){var kn=it([Mn,nn]),On=h(Mn,nn);F(ae,te,Ht,fe,me,Le,ae=On[0],te=On[1],Ht=Mn,fe=kn[0],me=kn[1],Le=kn[2],Xa,P),P.point(ae,te)}function Ke(){Be.point=je,P.lineEnd()}function rn(){Ge(),Be.point=ln,Be.lineEnd=xn}function ln(Mn,nn){$e(K=Mn,nn),Dt=ae,Yt=te,Kt=fe,ne=me,ge=Le,Be.point=$e}function xn(){F(ae,te,Ht,fe,me,Le,Dt,Yt,K,Kt,ne,ge,Xa,P),Be.lineEnd=Ke,Ke()}return Be}}var Vc=Ai({point:function(h,b){this.stream.point(h*et,b*et)}});function Uc(h){return Ai({point:function(b,F){var P=h(b,F);return this.stream.point(P[0],P[1])}})}function Wc(h,b,F){function P(K,Dt){return[b+h*K,F-h*Dt]}return P.invert=function(K,Dt){return[(K-b)/h,(F-Dt)/h]},P}function Ya(h,b,F,P){var K=ht(P),Dt=X(P),Yt=K*h,Kt=Dt*h,ne=K/h,ge=Dt/h,Ht=(Dt*F-K*b)/h,ae=(Dt*b+K*F)/h;function te(fe,me){return[Yt*fe-Kt*me+b,F-Kt*fe-Yt*me]}return te.invert=function(fe,me){return[ne*fe-ge*me+Ht,ae-ge*fe-ne*me]},te}function Zn(h){return ca(function(){return h})()}function ca(h){var b,F=150,P=480,K=250,Dt=0,Yt=0,Kt=0,ne=0,ge=0,Ht,ae=0,te=null,fe=g,me=null,Le,Be,je,Ge=Fn,$e=.5,Ke,rn,ln,xn,Mn;function nn(qe){return ln(qe[0]*et,qe[1]*et)}function kn(qe){return qe=ln.invert(qe[0],qe[1]),qe&&[qe[0]*zt,qe[1]*zt]}nn.stream=function(qe){return xn&&Mn===qe?xn:xn=Vc(Uc(Ht)(fe(Ke(Ge(Mn=qe)))))},nn.preclip=function(qe){return arguments.length?(fe=qe,te=void 0,En()):fe},nn.postclip=function(qe){return arguments.length?(Ge=qe,me=Le=Be=je=null,En()):Ge},nn.clipAngle=function(qe){return arguments.length?(fe=+qe?st(te=qe*et):(te=null,g),En()):te*zt},nn.clipExtent=function(qe){return arguments.length?(Ge=qe==null?(me=Le=Be=je=null,Fn):he(me=+qe[0][0],Le=+qe[0][1],Be=+qe[1][0],je=+qe[1][1]),En()):me==null?null:[[me,Le],[Be,je]]},nn.scale=function(qe){return arguments.length?(F=+qe,On()):F},nn.translate=function(qe){return arguments.length?(P=+qe[0],K=+qe[1],On()):[P,K]},nn.center=function(qe){return arguments.length?(Dt=qe[0]%360*et,Yt=qe[1]%360*et,On()):[Dt*zt,Yt*zt]},nn.rotate=function(qe){return arguments.length?(Kt=qe[0]%360*et,ne=qe[1]%360*et,ge=qe.length>2?qe[2]%360*et:0,On()):[Kt*zt,ne*zt,ge*zt]},nn.angle=function(qe){return arguments.length?(ae=qe%360*et,On()):ae*zt},nn.precision=function(qe){return arguments.length?(Ke=Ba(rn,$e=qe*qe),En()):R($e)},nn.fitExtent=function(qe,bn){return Wi(nn,qe,bn)},nn.fitSize=function(qe,bn){return ra(nn,qe,bn)},nn.fitWidth=function(qe,bn){return aa(nn,qe,bn)},nn.fitHeight=function(qe,bn){return oa(nn,qe,bn)};function On(){var qe=Ya(F,0,0,ae).apply(null,b(Dt,Yt)),bn=(ae?Ya:Wc)(F,P-qe[0],K-qe[1],ae);return Ht=St(Kt,ne,ge),rn=wn(b,bn),ln=wn(Ht,rn),Ke=Ba(rn,$e),En()}function En(){return xn=Mn=null,nn}return function(){return b=h.apply(this,arguments),nn.invert=b.invert&&kn,On()}}function sa(h){var b=0,F=xt/3,P=ca(h),K=P(b,F);return K.parallels=function(Dt){return arguments.length?P(b=Dt[0]*et,F=Dt[1]*et):[b*zt,F*zt]},K}function jc(h){var b=ht(h);function F(P,K){return[P*b,X(K)/b]}return F.invert=function(P,K){return[P/b,ct(K*b)]},F}function qa(h,b){var F=X(h),P=(F+X(b))/2;if(Pt(P)<Ot)return jc(h);var K=1+F*(2*P-F),Dt=R(K)/P;function Yt(Kt,ne){var ge=R(K-2*P*X(ne))/P;return[ge*X(Kt*=P),Dt-ge*ht(Kt)]}return Yt.invert=function(Kt,ne){var ge=Dt-ne;return[Mt(Kt,Pt(ge))/P*w(ge),ct((K-(Kt*Kt+ge*ge)*P*P)/(2*P))]},Yt}function ji(){return sa(qa).scale(155.424).center([0,33.6442])}function Ha(){return ji().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Gc(h){var b=h.length;return{point:function(F,P){for(var K=-1;++K<b;)h[K].point(F,P)},sphere:function(){for(var F=-1;++F<b;)h[F].sphere()},lineStart:function(){for(var F=-1;++F<b;)h[F].lineStart()},lineEnd:function(){for(var F=-1;++F<b;)h[F].lineEnd()},polygonStart:function(){for(var F=-1;++F<b;
vendor: 4,677 bytes, line 20
20)h[F].polygonStart()},polygonEnd:function(){for(var F=-1;++F<b;)h[F].polygonEnd()}}}function Zc(){var h,b,F=Ha(),P,K=ji().rotate([154,0]).center([-2,58.5]).parallels([55,65]),Dt,Yt=ji().rotate([157,0]).center([-3,19.9]).parallels([8,18]),Kt,ne,ge={point:function(te,fe){ne=[te,fe]}};function Ht(te){var fe=te[0],me=te[1];return ne=null,P.point(fe,me),ne||(Dt.point(fe,me),ne)||(Kt.point(fe,me),ne)}Ht.invert=function(te){var fe=F.scale(),me=F.translate(),Le=(te[0]-me[0])/fe,Be=(te[1]-me[1])/fe;return(Be>=.12&&Be<.234&&Le>=-.425&&Le<-.214?K:Be>=.166&&Be<.234&&Le>=-.214&&Le<-.115?Yt:F).invert(te)},Ht.stream=function(te){return h&&b===te?h:h=Gc([F.stream(b=te),K.stream(te),Yt.stream(te)])},Ht.precision=function(te){return arguments.length?(F.precision(te),K.precision(te),Yt.precision(te),ae()):F.precision()},Ht.scale=function(te){return arguments.length?(F.scale(te),K.scale(te*.35),Yt.scale(te),Ht.translate(F.translate())):F.scale()},Ht.translate=function(te){if(!arguments.length)return F.translate();var fe=F.scale(),me=+te[0],Le=+te[1];return P=F.translate(te).clipExtent([[me-.455*fe,Le-.238*fe],[me+.455*fe,Le+.238*fe]]).stream(ge),Dt=K.translate([me-.307*fe,Le+.201*fe]).clipExtent([[me-.425*fe+Ot,Le+.12*fe+Ot],[me-.214*fe-Ot,Le+.234*fe-Ot]]).stream(ge),Kt=Yt.translate([me-.205*fe,Le+.212*fe]).clipExtent([[me-.214*fe+Ot,Le+.166*fe+Ot],[me-.115*fe-Ot,Le+.234*fe-Ot]]).stream(ge),ae()},Ht.fitExtent=function(te,fe){return Wi(Ht,te,fe)},Ht.fitSize=function(te,fe){return ra(Ht,te,fe)},Ht.fitWidth=function(te,fe){return aa(Ht,te,fe)},Ht.fitHeight=function(te,fe){return oa(Ht,te,fe)};function ae(){return h=b=null,Ht}return Ht.scale(1070)}function Va(h){return function(b,F){var P=ht(b),K=ht(F),Dt=h(P*K);return[Dt*K*X(b),Dt*X(F)]}}function Mi(h){return function(b,F){var P=R(b*b+F*F),K=h(P),Dt=X(K),Yt=ht(K);return[Mt(b*Dt,P*Yt),ct(P&&F*Dt/P)]}}var ua=Va(function(h){return R(2/(1+h))});ua.invert=Mi(function(h){return 2*ct(h/2)});function Kc(){return Zn(ua).scale(124.75).clipAngle(180-.001)}var la=Va(function(h){return(h=f(h))&&h/X(h)});la.invert=Mi(function(h){return h});function Jc(){return Zn(la).scale(79.4188).clipAngle(180-.001)}function Si(h,b){return[h,pt(N((wt+b)/2))]}Si.invert=function(h,b){return[h,2*j(Tt(b))-wt]};function Qc(){return Ua(Si).scale(961/Rt)}function Ua(h){var b=Zn(h),F=b.center,P=b.scale,K=b.translate,Dt=b.clipExtent,Yt=null,Kt,ne,ge;b.scale=function(ae){return arguments.length?(P(ae),Ht()):P()},b.translate=function(ae){return arguments.length?(K(ae),Ht()):K()},b.center=function(ae){return arguments.length?(F(ae),Ht()):F()},b.clipExtent=function(ae){return arguments.length?(ae==null?Yt=Kt=ne=ge=null:(Yt=+ae[0][0],Kt=+ae[0][1],ne=+ae[1][0],ge=+ae[1][1]),Ht()):Yt==null?null:[[Yt,Kt],[ne,ge]]};function Ht(){var ae=xt*P(),te=b(Re(b.rotate()).invert([0,0]));return Dt(Yt==null?[[te[0]-ae,te[1]-ae],[te[0]+ae,te[1]+ae]]:h===Si?[[Math.max(te[0]-ae,Yt),Kt],[Math.min(te[0]+ae,ne),ge]]:[[Yt,Math.max(te[1]-ae,Kt)],[ne,Math.min(te[1]+ae,ge)]])}return Ht()}function Gi(h){return N((wt+h)/2)}function Wa(h,b){var F=ht(h),P=h===b?X(h):pt(F/ht(b))/pt(Gi(b)/Gi(h)),K=F*W(Gi(h),P)/P;if(!P)return Si;function Dt(Yt,Kt){K>0?Kt<-wt+Ot&&(Kt=-wt+Ot):Kt>wt-Ot&&(Kt=wt-Ot);var ne=K/W(Gi(Kt),P);return[ne*X(P*Yt),K-ne*ht(P*Yt)]}return Dt.invert=function(Yt,Kt){var ne=K-Kt,ge=w(P)*R(Yt*Yt+ne*ne);return[Mt(Yt,Pt(ne))/P*w(ne),2*j(W(K/ge,1/P))-wt]},Dt}function ts(){return sa(Wa).scale(109.5).parallels([30,30])}function Ci(h,b){return[h,b]}Ci.invert=Ci;function es(){return Zn(Ci).scale(152.63)}function ja(h,b){var F=ht(h),P=h===b?X(h):(F-ht(b))/(b-h),K=F/P+h;if(Pt(P)<Ot)return Ci;function Dt(Yt,Kt){var ne=K-Kt,ge=P*Yt;return[ne*X(ge),K-ne*ht(ge)]}return Dt.invert=function(Yt,Kt){var ne=K-Kt;return[Mt(Yt,Pt(ne))/P*w(ne),K-w(P)*R(Yt*Yt+ne*ne)]},Dt}function ns(){return sa(ja).scale(131.154).center([0,13.9389])}var Li=1.340264,$i=-.081106,ki=893e-6,Oi=.003796,Zi=R(3)/2,is=12;function fa(h,b){var F=ct(Zi*X(b)),P=F*F,K=P*P*P;return[h*ht(F)/(Zi*(Li+3*$i*P+K*(7*ki+9*Oi*P))),F*(Li+$i*P+K*(ki+Oi*P))]}fa.invert=function(h,b){for(var F=b,P=F*F,K=P*P*P,Dt=0,Yt,Kt,ne;Dt<is&&(Kt=F*(Li+$i*P+K*(ki+Oi*P))-b,ne=Li+3*$i*P+K*(7*ki+9*Oi*P),F-=Yt=Kt/ne,P=F*F,K=P*P*P,!(Pt(Yt)<At));++Dt);return[Zi*h*(Li+3*$i*P+K*(7*ki+9*Oi*P))/ht(F),ct(X(F)/Zi)]};function rs(){return Zn(fa).scale(177.158)}function ha(h,b){var F=ht(b),P=ht(h)*F;return[F*X(h)/P,X(b)/P]}ha.invert=Mi(j);function as(){return Zn(ha).scale(144.049).clipAngle(60)}function Ki(h,b,F,P){return h===1&&b===1&&F===0&&P===0?Fn:Ai({point:function(K,Dt){this.stream.point(K*h+F,Dt*b+P)}})}function os(){var h=1,b=0,F=0,P=1,K=1,Dt=Fn,Yt=null,Kt,ne,ge,Ht=Fn,ae,te,fe;function me(){return ae=te=null,fe}
20return fe={stream:function(Le){return ae&&te===Le?ae:ae=Dt(Ht(te=Le))},postclip:function(Le){return arguments.length?(Ht=Le,Yt=Kt=ne=ge=null,me()):Ht},clipExtent:function(Le){return arguments.length?(Ht=Le==null?(Yt=Kt=ne=ge=null,Fn):he(Yt=+Le[0][0],Kt=+Le[0][1],ne=+Le[1][0],ge=+Le[1][1]),me()):Yt==null?null:[[Yt,Kt],[ne,ge]]},scale:function(Le){return arguments.length?(Dt=Ki((h=+Le)*P,h*K,b,F),me()):h},translate:function(Le){return arguments.length?(Dt=Ki(h*P,h*K,b=+Le[0],F=+Le[1]),me()):[b,F]},reflectX:function(Le){return arguments.length?(Dt=Ki(h*(P=Le?-1:1),h*K,b,F),me()):P<0},reflectY:function(Le){return arguments.length?(Dt=Ki(h*P,h*(K=Le?-1:1),b,F),me()):K<0},fitExtent:function(Le,Be){return Wi(fe,Le,Be)},fitSize:function(Le,Be){return ra(fe,Le,Be)},fitWidth:function(Le,Be){return aa(fe,Le,Be)},fitHeight:function(Le,Be){return oa(fe,Le,Be)}}}function da(h,b){var F=b*b,P=F*F;return[h*(.8707-.131979*F+P*(-.013791+P*(.003971*F-.001529*P))),b*(1.007226+F*(.015085+P*(-.044475+.028874*F-.005916*P)))]}da.invert=function(h,b){var F=b,P=25,K;do{var Dt=F*F,Yt=Dt*Dt;F-=K=(F*(1.007226+Dt*(.015085+Yt*(-.044475+.028874*Dt-.005916*Yt)))-b)/(1.007226+Dt*(.015085*3+Yt*(-.044475*7+.028874*9*Dt-.005916*11*Yt)))}while(Pt(K)>Ot&&--P>0);return[h/(.8707+(Dt=F*F)*(-.131979+Dt*(-.013791+Dt*Dt*Dt*(.003971-.001529*Dt)))),F]};function cs(){return Zn(da).scale(175.295)}function ga(h,b){return[ht(b)*X(h),X(b)]}ga.invert=Mi(ct);function ss(){return Zn(ga).scale(249.5).clipAngle(90+Ot)}function pa(h,b){var F=ht(b),P=1+ht(h)*F;return[F*X(h)/P,X(b)/P]}pa.invert=Mi(function(h){return 2*j(h)});function us(){return Zn(pa).scale(250).clipAngle(142)}function va(h,b){return[pt(N((wt+b)/2)),-h]}va.invert=function(h,b){return[-b,2*j(Tt(h))-wt]};function ls(){var h=Ua(va),b=h.center,F=h.rotate;return h.center=function(P){return arguments.length?b([-P[1],P[0]]):(P=b(),[P[1],-P[0]])},h.rotate=function(P){return arguments.length?F([P[0],P[1],P.length>2?P[2]+90:90]):(P=F(),[P[0],P[1],P[2]-90])},F([0,0,90]).scale(159.155)}a.geoArea=k,a.geoBounds=Bt,a.geoCentroid=An,a.geoCircle=t,a.geoClipAntimeridian=g,a.geoClipCircle=st,a.geoClipExtent=ve,a.geoClipRectangle=he,a.geoContains=Pn,a.geoDistance=tn,a.geoGraticule=Nn,a.geoGraticule10=Yn,a.geoInterpolate=qn,a.geoLength=un,a.geoPath=Xc,a.geoAlbers=Ha,a.geoAlbersUsa=Zc,a.geoAzimuthalEqualArea=Kc,a.geoAzimuthalEqualAreaRaw=ua,a.geoAzimuthalEquidistant=Jc,a.geoAzimuthalEquidistantRaw=la,a.geoConicConformal=ts,a.geoConicConformalRaw=Wa,a.geoConicEqualArea=ji,a.geoConicEqualAreaRaw=qa,a.geoConicEquidistant=ns,a.geoConicEquidistantRaw=ja,a.geoEqualEarth=rs,a.geoEqualEarthRaw=fa,a.geoEquirectangular=es,a.geoEquirectangularRaw=Ci,a.geoGnomonic=as,a.geoGnomonicRaw=ha,a.geoIdentity=os,a.geoProjection=Zn,a.geoProjectionMutator=ca,a.geoMercator=Qc,a.geoMercatorRaw=Si,a.geoNaturalEarth1=cs,a.geoNaturalEarth1Raw=da,a.geoOrthographic=ss,a.geoOrthographicRaw=ga,a.geoStereographic=us,a.geoStereographicRaw=pa,a.geoTransverseMercator=ls,a.geoTransverseMercatorRaw=va,a.geoRotation=Re,a.geoStream=_t,a.geoTransform=Bc,Object.defineProperty(a,"__esModule",{value:!0})})});var Oo=hn((Nr,ko)=>{(function(a,v){typeof Nr=="object"&&typeof ko<"u"?v(Nr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(Nr,function(a){"use strict";function v(E,H){return E.parent===H.parent?1:2}function B(E){return E.reduce(Y,0)/E.length}function Y(E,H){return E+H.x}function kt(E){return 1+E.reduce(Et,0)}function Et(E,H){return Math.max(E,H.y)}function Ot(E){for(var H;H=E.children;)E=H[0];return E}function At(E){for(var H;H=E.children;)E=H[H.length-1];return E}function xt(){var E=v,H=1,m=1,p=!1;function M(T){var z,G=0;T.eachAfter(function(lt){var jt=lt.children;jt?(lt.x=B(jt),lt.y=kt(jt)):(lt.x=z?G+=E(lt,z):0,lt.y=0,z=lt)});var Z=Ot(T),q=At(T),mt=Z.x-E(Z,q)/2,Ft=q.x+E(q,Z)/2;return T.eachAfter(p?function(lt){lt.x=(lt.x-T.x)*H,lt.y=(T.y-lt.y)*m}:function(lt){lt.x=(lt.x-mt)/(Ft-mt)*H,lt.y=(1-(T.y?lt.y/T.y:1))*m})}return M.separation=function(T){return arguments.length?(E=T,M):E},M.size=function(T){return arguments.length?(p=!1,H=+T[0],m=+T[1],M):p?null:[H,m]},M.nodeSize=function(T){return arguments.length?(p=!0,H=+T[0],m=+T[1],M):p?[H,m]:null},M}function wt(E){var H=0,m=E.children,p=m&&m.length;if(!p)H=1;else for(;--p>=0;)H+=m[p].value;E.value=H}function rt(){return this.eachAfter(wt)}function Rt(E){var H=this,m,p=[H],M,T,z;do for(m=p.reverse(),p=[];H=m.pop();)if(E(H),M=H.children,M)for(T=0,z=M.length;T<z;++T)p.push(M[T]);while(p.length);return this}function zt(E){for(var H=this,m=[H],p,M;H=m.pop();)if(E(H),p=H.children,p)for(M=p.length-1;M>=0;--M)m.push(p[M]);return this}function et(E){for(var H=this,m=[H],p=[],M,T,z;H=m.pop();)if(p.push(H),M=H.children,M)for(T=0,z=M.length;T<z;++T)m.push(M[T]);for(;H=p.pop();)E(H);return this}function Pt(E){return this.eachAfter(function(H){for(var m=+E(H.data)||0,p=H.children,M=p&&p.length;--M>=0;)m+=p[M].value;H.value=m})}function j(E){return this.eachBefore(function(H){H.children&&H.children.sort(E)})}function Mt(E){for(var H=this,m=ht(H,E),p=[H];H!==m;)H=H.parent,p.push(H);for(var M=p.length;E!==m;)p.splice(M,0,E),E=E.parent;return p}function ht(E,H){if(E===H)return E;var m=E.ancestors(),p=H.ancestors(),M=null;for(E=m.pop(),H=p.pop();E===H;)M=E,E=m.pop(),H=p.pop();return M}function Nt(){for(var E=this,H=[E];E=E.parent;)H.push(E);return H}function Tt(){var E=[];return this.each(function(H){E.push(H)}),E}function pt(){var E=[];return this.eachBefore(function(H){H.children||E.push(H)}),E}function W(){var E=this,H=[];return E.each(function(m){m!==E&&H.push({source:m.parent,target:m})}),H}function X(E,H){var m=new ct(E),p=+E.value&&(m.value=E.value),M,T=[m],z,G,Z,q;for(H==null&&(H=R);M=T.pop();)if(p&&(M.value=+M.data.value),(G=H(M.data))&&(q=G.length))for(M.children=new Array(q),Z=q-1;Z>=0;--Z)T.push(z=M.children[Z]=new ct(G[Z])),z.parent=M,z.depth=M.depth+1;return m.eachBefore(f)}function w(){return X(this).eachBefore(N)}function R(E){return E.children}function N(E){E.data=E.data.data}function f(E){var H=0;do E.height=H;while((E=E.parent)&&E.height<++H)}function ct(E){this.data=E,this.depth=this.height=0,this.parent=null}ct.prototype=X.prototype={constructor:ct,count:rt,each:Rt,eachAfter:et,eachBefore:zt,sum:Pt,sort:j,path:Mt,ancestors:Nt,descendants:Tt,leaves:pt,links:W,copy:w};var yt=Array.prototype.slice;function Q(E){for(var H=E.length,m,p;H;)p=Math.random()*H--|0,m=E[H],E[H]=E[p],E[p]=m;return E}function J(E){for(var H=0,m=(E=Q(yt.call(E))).length,p=[],M,T;H<m;)M=E[H],T&&Lt(T,M)?++H:(T=_t(p=gt(p,M)),H=0);return T}function gt(E,H){var m,p;if(at(H,E))return[H];for(m=0;m<E.length;++m)if(V(H,E[m])&&at(ft(E[m],H),E))return[E[m],H];for(m=0;m<E.length-1;++m)for(p=m+1;p<E.length;++p)if(V(ft(E[m],E[p]),H)&&V(ft(E[m],H),E[p])&&V(ft(E[p],H),E[m])&&at(vt(E[m],E[p],H),E))return[E[m],E[p],H];throw new Error}function V(E,H){var m=E.r-H.r,p=H.x-E.x,M=H.y-E.y;return m<0||m*m<p*p+M*M}function Lt(E,H){var m=E.r-H.r+1e-6,p=H.x-E.x,M=H.y-E.y;return m>0&&m*m>p*p+M*M}function at(E,H){for(var m=0;m<H.length;++m)if(!Lt(E,H[m]))return!1;return!0}function _t(E){switch(E.length){case 1:return bt(E[0]);case 2:return ft(E[0],E[1]);case 3:return vt(E[0],E[1],E[2])}}function bt(E){return{x:E.x,y:E.y,r:E.r}}function ft(E,H){var m=E.x,p=E.y,M=E.r,T=H.x,z=H.y,G=H.r,Z=T-m,q=z-p,mt=G-M,Ft=Math.sqrt(Z*Z+q*q);return{x:(m+T+Z/Ft*mt)/2,y:(p+z+q/Ft*mt)/2,r:(Ft+M+G)/2}}function vt(E,H,m){var p=E.x,M=E.y,T=E.r,z=H.x,G=H.y,Z=H.r,q=m.x,mt=m.y,Ft=m.r,lt=p-z,jt=p-q,re=M-G,ce=M-mt,ye=Z-T,Ne=Ft-T,Ue=p*p+M*M-T*T,fn=Ue-z*z-G*G+Z*Z,sn=Ue-q*q-mt*mt+Ft*Ft,on=jt*re-lt*ce,gn=(re*sn-ce*fn)/(on*2)-p,$n=(ce*ye-re*Ne)/on,Sn=(jt*fn-lt*sn)/(on*2)-M,Ve=(lt*Ne-jt*ye)/on,An=$n*$n+Ve*Ve-1,pn=2*(T+gn*$n+Sn*Ve),wn=gn*gn+Sn*Sn-T*T,U=-(An?(pn+Math.sqrt(pn*pn-4*An*wn))/(2*An):wn/pn);return{x:p+gn+$n*U,y:M+Sn+Ve*U,r:U}}function Ct(E,H,m){var p=E.x-H.x,M,T,z=E.y-H.y,G,Z,q=p*p+z*z;q?(T=H.r+m.r,T*=T,Z=E.r+m.r,Z*=Z,T>Z?(M=(q+Z-T)/(2*q),G=Math.sqrt(Math.max(0,Z/q-M*M)),m.x=E.x-M*p-G*z,m.y=E.y-M*z+G*p):(M=(q+T-Z)/(2*q),G=Math.sqrt(Math.max(0,T/q-M*M)),m.x=H.x+M*p-G*z,m.y=H.y+M*z+G*p)):(m.x=H.x+m.r,m.y=H.y)}function Gt(E,H){var m=E.r+H.r-1e-6,p=H.x-E.x,M=H.y-E.y;return m>0&&m*m>p*p+M*M}
20function ue(E){var H=E._,m=E.next._,p=H.r+m.r,M=(H.x*m.r+m.x*H.r)/p,T=(H.y*m.r+m.y*H.r)/p;return M*M+T*T}function ie(E){this._=E,this.next=null,this.previous=null}function xe(E){if(!(M=E.length))return 0;var H,m,p,M,T,z,G,Z,q,mt,Ft;if(H=E[0],H.x=0,H.y=0,!(M>1))return H.r;if(m=E[1],H.x=-m.r,m.x=H.r,m.y=0,!(M>2))return H.r+m.r;Ct(m,H,p=E[2]),H=new ie(H),m=new ie(m),p=new ie(p),H.next=p.previous=m,m.next=H.previous=p,p.next=m.previous=H;t:for(G=3;G<M;++G){Ct(H._,m._,p=E[G]),p=new ie(p),Z=m.next,q=H.previous,mt=m._.r,Ft=H._.r;do if(mt<=Ft){if(Gt(Z._,p._)){m=Z,H.next=m,m.previous=H,--G;continue t}mt+=Z._.r,Z=Z.next}else{if(Gt(q._,p._)){H=q,H.next=m,m.previous=H,--G;continue t}Ft+=q._.r,q=q.previous}while(Z!==q.next);for(p.previous=H,p.next=m,H.next=m.previous=m=p,T=ue(H);(p=p.next)!==m;)(z=ue(p))<T&&(H=p,T=z);m=H.next}for(H=[m._],p=m;(p=p.next)!==m;)H.push(p._);for(p=J(H),G=0;G<M;++G)H=E[G],H.x-=p.x,H.y-=p.y;return p.r}function y(E){return xe(E),E}function $(E){return E==null?null:x(E)}function x(E){if(typeof E!="function")throw new Error;return E}function A(){return 0}function k(E){return function(){return E}}function _(E){return Math.sqrt(E.value)}function it(){var E=null,H=1,m=1,p=A;function M(T){return T.x=H/2,T.y=m/2,E?T.eachBefore(ut(E)).eachAfter(Wt(p,.5)).eachBefore(qt(1)):T.eachBefore(ut(_)).eachAfter(Wt(A,1)).eachAfter(Wt(p,T.r/Math.min(H,m))).eachBefore(qt(Math.min(H,m)/(2*T.r))),T}return M.radius=function(T){return arguments.length?(E=$(T),M):E},M.size=function(T){return arguments.length?(H=+T[0],m=+T[1],M):[H,m]},M.padding=function(T){return arguments.length?(p=typeof T=="function"?T:k(+T),M):p},M}function ut(E){return function(H){H.children||(H.r=Math.max(0,+E(H)||0))}}function Wt(E,H){return function(m){if(p=m.children){var p,M,T=p.length,z=E(m)*H||0,G;if(z)for(M=0;M<T;++M)p[M].r+=z;if(G=xe(p),z)for(M=0;M<T;++M)p[M].r-=z;m.r=G+z}}}function qt(E){return function(H){var m=H.parent;H.r*=E,m&&(H.x=m.x+E*H.x,H.y=m.y+E*H.y)}}function pe(E){E.x0=Math.round(E.x0),E.y0=Math.round(E.y0),E.x1=Math.round(E.x1),E.y1=Math.round(E.y1)}function le(E,H,m,p,M){for(var T=E.children,z,G=-1,Z=T.length,q=E.value&&(p-H)/E.value;++G<Z;)z=T[G],z.y0=m,z.y1=M,z.x0=H,z.x1=H+=z.value*q}function Qt(){var E=1,H=1,m=0,p=!1;function M(z){var G=z.height+1;return z.x0=z.y0=m,z.x1=E,z.y1=H/G,z.eachBefore(T(H,G)),p&&z.eachBefore(pe),z}function T(z,G){return function(Z){Z.children&&le(Z,Z.x0,z*(Z.depth+1)/G,Z.x1,z*(Z.depth+2)/G);var q=Z.x0,mt=Z.y0,Ft=Z.x1-m,lt=Z.y1-m;Ft<q&&(q=Ft=(q+Ft)/2),lt<mt&&(mt=lt=(mt+lt)/2),Z.x0=q,Z.y0=mt,Z.x1=Ft,Z.y1=lt}}return M.round=function(z){return arguments.length?(p=!!z,M):p},M.size=function(z){return arguments.length?(E=+z[0],H=+z[1],M):[E,H]},M.padding=function(z){return arguments.length?(m=+z,M):m},M}var Xt="$",be={depth:-1},ee={};function Ce(E){return E.id}function Fe(E){return E.parentId}function ze(){var E=Ce,H=Fe;function m(p){var M,T,z=p.length,G,Z,q,mt=new Array(z),Ft,lt,jt={};for(T=0;T<z;++T)M=p[T],q=mt[T]=new ct(M),(Ft=E(M,T,p))!=null&&(Ft+="")&&(lt=Xt+(q.id=Ft),jt[lt]=lt in jt?ee:q);for(T=0;T<z;++T)if(q=mt[T],Ft=H(p[T],T,p),Ft==null||!(Ft+="")){if(G)throw new Error("multiple roots");G=q}else{if(Z=jt[Xt+Ft],!Z)throw new Error("missing: "+Ft);if(Z===ee)throw new Error("ambiguous: "+Ft);Z.children?Z.children.push(q):Z.children=[q],q.parent=Z}if(!G)throw new Error("no root");if(G.parent=be,G.eachBefore(function(re){re.depth=re.parent.depth+1,--z}).eachBefore(f),G.parent=null,z>0)throw new Error("cycle");return G}return m.id=function(p){return arguments.length?(E=x(p),m):E},m.parentId=function(p){return arguments.length?(H=x(p),m):H},m}function l(E,H){return E.parent===H.parent?1:2}function C(E){var H=E.children;return H?H[0]:E.t}function tt(E){var H=E.children;return H?H[H.length-1]:E.t}function It(E,H,m){var p=m/(H.i-E.i);H.c-=p,H.s+=m,E.c+=p,H.z+=m,H.m+=m}function Ut(E){for(var H=0,m=0,p=E.children,M=p.length,T;--M>=0;)T=p[M],T.z+=H,T.m+=H,H+=T.s+(m+=T.c)}function Jt(E,H,m){return E.a.parent===H.parent?E.a:m}function Zt(E,H){this._=E,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=H}Zt.prototype=Object.create(ct.prototype);function oe(E){for(var H=new Zt(E,0),m,p=[H],M,T,z,G;m=p.pop();)if(T=m._.children)for(m.children=new Array(G=T.length),z=G-1;z>=0;--z)p.push(M=m.children[z]=new Zt(T[z],z)),M.parent=m;return(H.parent=new Zt(null,0)).children=[H],H}function Oe(){var E=l,H=1,m=1,p=null;function M(q){var mt=oe(q);if(mt.eachAfter(T),mt.parent.m=-mt.z,mt.eachBefore(z),p)q.eachBefore(Z);else{var Ft=q,lt=q,jt=q;q.eachBefore(function(Ue){Ue.x<Ft.x&&(Ft=Ue),Ue.x>lt.x&&(lt=Ue),Ue.depth>jt.depth&&(jt=Ue)});var re=Ft===lt?1:E(Ft,lt)/2,ce=re-Ft.x,ye=H/(lt.x+re+ce),Ne=m/(jt.depth||1);q.eachBefore(function(Ue){Ue.x=(Ue.x+ce)*ye,Ue.y=Ue.depth*Ne})}return q}function T(q){var mt=q.children,Ft=q.parent.children,lt=q.i?Ft[q.i-1]:null;if(mt){Ut(q);var jt=(mt[0].z+mt[mt.length-1].z)/2;lt?(q.z=lt.z+E(q._,lt._),q.m=q.z-jt):q.z=jt}else lt&&(q.z=lt.z+E(q._,lt._));q.parent.A=G(q,lt,q.parent.A||Ft[0])}function z(q){q._.x=q.z+q.parent.m,q.m+=q.parent.m}function G(q,mt,Ft){if(mt){for(var lt=q,jt=q,re=mt,ce=lt.parent.children[0],ye=lt.m,Ne=jt.m,Ue=re.m,fn=ce.m,sn;re=tt(re),lt=C(lt),re&<)ce=C(ce),jt=tt(jt),jt.a=q,sn=re.z+Ue-lt.z-ye+E(re._,lt._),sn>0&&(It(Jt(re,q,Ft),q,sn),ye+=sn,Ne+=sn),Ue+=re.m,ye+=lt.m,fn+=ce.m,Ne+=jt.m;re&&!tt(jt)&&(jt.t=re,jt.m+=Ue-Ne),lt&&!C(ce)&&(ce.t=lt,ce.m+=ye-fn,Ft=q)}return Ft}function Z(q){q.x*=H,q.y=q.depth*m}return M.separation=function(q){return arguments.length?(E=q,M):E},M.size=function(q){return arguments.length?(p=!1,H=+q[0],m=+q[1],M):p?null:[H,m]},M.nodeSize=function(q){return arguments.length?(p=!0,H=+q[0],m=+q[1],M):p?[H,m]:null},M}function De(E,H,m,p,M){for(var T=E.children,z,G=-1,Z=T.length,q=E.value&&(M-m)/E.value;++G<Z;)z=T[G],z.x0=H,z.x1=p,z.y0=m,z.y1=m+=z.value*q}var ke=(1+Math.sqrt(5))/2;function Ie(E,H,m,p,M,T){for(var z=[],G=H.children,Z,q,mt=0,Ft=0,lt=G.length,jt,re,ce=H.value,ye,Ne,Ue,fn,sn,on,gn;mt<lt;){jt=M-m,re=T-p;do ye=G[Ft++].value;while(!ye&&Ft<lt);
20for(Ne=Ue=ye,on=Math.max(re/jt,jt/re)/(ce*E),gn=ye*ye*on,sn=Math.max(Ue/gn,gn/Ne);Ft<lt;++Ft){if(ye+=q=G[Ft].value,q<Ne&&(Ne=q),q>Ue&&(Ue=q),gn=ye*ye*on,fn=Math.max(Ue/gn,gn/Ne),fn>sn){ye-=q;break}sn=fn}z.push(Z={value:ye,dice:jt<re,children:G.slice(mt,Ft)}),Z.dice?le(Z,m,p,M,ce?p+=re*ye/ce:T):De(Z,m,p,ce?m+=jt*ye/ce:M,T),ce-=ye,mt=Ft}return z}var He=function E(H){function m(p,M,T,z,G){Ie(H,p,M,T,z,G)}return m.ratio=function(p){return E((p=+p)>1?p:1)},m}(ke);function an(){var E=He,H=!1,m=1,p=1,M=[0],T=A,z=A,G=A,Z=A,q=A;function mt(lt){return lt.x0=lt.y0=0,lt.x1=m,lt.y1=p,lt.eachBefore(Ft),M=[0],H&<.eachBefore(pe),lt}function Ft(lt){var jt=M[lt.depth],re=lt.x0+jt,ce=lt.y0+jt,ye=lt.x1-jt,Ne=lt.y1-jt;ye<re&&(re=ye=(re+ye)/2),Ne<ce&&(ce=Ne=(ce+Ne)/2),lt.x0=re,lt.y0=ce,lt.x1=ye,lt.y1=Ne,lt.children&&(jt=M[lt.depth+1]=T(lt)/2,re+=q(lt)-jt,ce+=z(lt)-jt,ye-=G(lt)-jt,Ne-=Z(lt)-jt,ye<re&&(re=ye=(re+ye)/2),Ne<ce&&(ce=Ne=(ce+Ne)/2),E(lt,re,ce,ye,Ne))}return mt.round=function(lt){return arguments.length?(H=!!lt,mt):H},mt.size=function(lt){return arguments.length?(m=+lt[0],p=+lt[1],mt):[m,p]},mt.tile=function(lt){return arguments.length?(E=x(lt),mt):E},mt.padding=function(lt){return arguments.length?mt.paddingInner(lt).paddingOuter(lt):mt.paddingInner()},mt.paddingInner=function(lt){return arguments.length?(T=typeof lt=="function"?lt:k(+lt),mt):T},mt.paddingOuter=function(lt){return arguments.length?mt.paddingTop(lt).paddingRight(lt).paddingBottom(lt).paddingLeft(lt):mt.paddingTop()},mt.paddingTop=function(lt){return arguments.length?(z=typeof lt=="function"?lt:k(+lt),mt):z},mt.paddingRight=function(lt){return arguments.length?(G=typeof lt=="function"?lt:k(+lt),mt):G},mt.paddingBottom=function(lt){return arguments.length?(Z=typeof lt=="function"?lt:k(+lt),mt):Z},mt.paddingLeft=function(lt){return arguments.length?(q=typeof lt=="function"?lt:k(+lt),mt):q},mt}function nt(E,H,m,p,M){var T=E.children,z,G=T.length,Z,q=new Array(G+1);for(q[0]=Z=z=0;z<G;++z)q[z+1]=Z+=T[z].value;mt(0,G,E.value,H,m,p,M);function mt(Ft,lt,jt,re,ce,ye,Ne){if(Ft>=lt-1){var Ue=T[Ft];Ue.x0=re,Ue.y0=ce,Ue.x1=ye,Ue.y1=Ne;return}for(var fn=q[Ft],sn=jt/2+fn,on=Ft+1,gn=lt-1;on<gn;){var $n=on+gn>>>1;q[$n]<sn?on=$n+1:gn=$n}sn-q[on-1]<q[on]-sn&&Ft+1<on&&--on;var Sn=q[on]-fn,Ve=jt-Sn;if(ye-re>Ne-ce){var An=(re*Ve+ye*Sn)/jt;mt(Ft,on,Sn,re,ce,An,Ne),mt(on,lt,Ve,An,ce,ye,Ne)}else{var pn=(ce*Ve+Ne*Sn)/jt;mt(Ft,on,Sn,re,ce,ye,pn),mt(on,lt,Ve,re,pn,ye,Ne)}}}function Bt(E,H,m,p,M){(E.depth&1?De:le)(E,H,m,p,M)}var de=function E(H){function m(p,M,T,z,G){if((Z=p._squarify)&&Z.ratio===H)for(var Z,q,mt,Ft,lt=-1,jt,re=Z.length,ce=p.value;++lt<re;){for(q=Z[lt],mt=q.children,Ft=q.value=0,jt=mt.length;Ft<jt;++Ft)q.value+=mt[Ft].value;q.dice?le(q,M,T,z,T+=(G-T)*q.value/ce):De(q,M,T,M+=(z-M)*q.value/ce,G),ce-=q.value}else p._squarify=Z=Ie(H,p,M,T,z,G),Z.ratio=H}return m.ratio=function(p){return E((p=+p)>1?p:1)},m}(ke);a.cluster=xt,a.hierarchy=X,a.pack=it,a.packSiblings=y,a.packEnclose=J,a.partition=Qt,a.stratify=ze,a.tree=Oe,a.treemap=an,a.treemapBinary=nt,a.treemapDice=le,a.treemapSlice=De,a.treemapSliceDice=Bt,a.treemapSquarify=He,a.treemapResquarify=de,Object.defineProperty(a,"__esModule",{value:!0})})});var Eo=hn((Xr,Ro)=>{(function(a,v){typeof Xr=="object"&&typeof Ro<"u"?v(Xr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(Xr,function(a){"use strict";function v(wt){for(var rt=-1,Rt=wt.length,zt,et=wt[Rt-1],Pt=0;++rt<Rt;)zt=et,et=wt[rt],Pt+=zt[1]*et[0]-zt[0]*et[1];return Pt/2}function B(wt){for(var rt=-1,Rt=wt.length,zt=0,et=0,Pt,j=wt[Rt-1],Mt,ht=0;++rt<Rt;)Pt=j,j=wt[rt],ht+=Mt=Pt[0]*j[1]-j[0]*Pt[1],zt+=(Pt[0]+j[0])*Mt,et+=(Pt[1]+j[1])*Mt;return ht*=3,[zt/ht,et/ht]}function Y(wt,rt,Rt){return(rt[0]-wt[0])*(Rt[1]-wt[1])-(rt[1]-wt[1])*(Rt[0]-wt[0])}function kt(wt,rt){return wt[0]-rt[0]||wt[1]-rt[1]}function Et(wt){for(var rt=wt.length,Rt=[0,1],zt=2,et=2;et<rt;++et){for(;zt>1&&Y(wt[Rt[zt-2]],wt[Rt[zt-1]],wt[et])<=0;)--zt;Rt[zt++]=et}return Rt.slice(0,zt)}function Ot(wt){if((Rt=wt.length)<3)return null;var rt,Rt,zt=new Array(Rt),et=new Array(Rt);for(rt=0;rt<Rt;++rt)zt[rt]=[+wt[rt][0],+wt[rt][1],rt];for(zt.sort(kt),rt=0;rt<Rt;++rt)et[rt]=[zt[rt][0],-zt[rt][1]];var Pt=Et(zt),j=Et(et),Mt=j[0]===Pt[0],ht=j[j.length-1]===Pt[Pt.length-1],Nt=[];for(rt=Pt.length-1;rt>=0;--rt)Nt.push(wt[zt[Pt[rt]][2]]);for(rt=+Mt;rt<j.length-ht;++rt)Nt.push(wt[zt[j[rt]][2]]);return Nt}function At(wt,rt){for(var Rt=wt.length,zt=wt[Rt-1],et=rt[0],Pt=rt[1],j=zt[0],Mt=zt[1],ht,Nt,Tt=!1,pt=0;pt<Rt;++pt)zt=wt[pt],ht=zt[0],Nt=zt[1],Nt>Pt!=Mt>Pt&&et<(j-ht)*(Pt-Nt)/(Mt-Nt)+ht&&(Tt=!Tt),j=ht,Mt=Nt;return Tt}function xt(wt){for(var rt=-1,Rt=wt.length,zt=wt[Rt-1],et,Pt,j=zt[0],Mt=zt[1],ht=0;++rt<Rt;)et=j,Pt=Mt,zt=wt[rt],j=zt[0],Mt=zt[1],et-=j,Pt-=Mt,ht+=Math.sqrt(et*et+Pt*Pt);return ht}a.polygonArea=v,a.polygonCentroid=B,a.polygonHull=Ot,a.polygonContains=At,a.polygonLength=xt,Object.defineProperty(a,"__esModule",{value:!0})})});var Do=hn((Br,Po)=>{(function(a,v){typeof Br=="object"&&typeof Po<"u"?v(Br):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(Br,function(a){"use strict";function v(){return Math.random()}var B=function xt(wt){function rt(Rt,zt){return Rt=Rt==null?0:+Rt,zt=zt==null?1:+zt,arguments.length===1?(zt=Rt,Rt=0):zt-=Rt,function(){return wt()*zt+Rt}}
20return rt.source=xt,rt}(v),Y=function xt(wt){function rt(Rt,zt){var et,Pt;return Rt=Rt==null?0:+Rt,zt=zt==null?1:+zt,function(){var j;if(et!=null)j=et,et=null;else do et=wt()*2-1,j=wt()*2-1,Pt=et*et+j*j;while(!Pt||Pt>1);return Rt+zt*j*Math.sqrt(-2*Math.log(Pt)/Pt)}}return rt.source=xt,rt}(v),kt=function xt(wt){function rt(){var Rt=Y.source(wt).apply(this,arguments);return function(){return Math.exp(Rt())}}return rt.source=xt,rt}(v),Et=function xt(wt){function rt(Rt){return function(){for(var zt=0,et=0;et<Rt;++et)zt+=wt();return zt}}return rt.source=xt,rt}(v),Ot=function xt(wt){function rt(Rt){var zt=Et.source(wt)(Rt);return function(){return zt()/Rt}}return rt.source=xt,rt}(v),At=function xt(wt){function rt(Rt){return function(){return-Math.log(1-wt())/Rt}}return rt.source=xt,rt}(v);a.randomUniform=B,a.randomNormal=Y,a.randomLogNormal=kt,a.randomBates=Ot,a.randomIrwinHall=Et,a.randomExponential=At,Object.defineProperty(a,"__esModule",{value:!0})})});var zo=hn((Yr,Fo)=>{(function(a,v){typeof Yr=="object"&&typeof Fo<"u"?v(Yr,ti(),ci()):typeof define=="function"&&define.amd?define(["exports","d3-interpolate","d3-color"],v):v(a.d3=a.d3||{},a.d3,a.d3)})(Yr,function(a,v,B){"use strict";function Y(m){for(var p=m.length/6|0,M=new Array(p),T=0;T<p;)M[T]="#"+m.slice(T*6,++T*6);return M}var kt=Y("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Et=Y("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Ot=Y("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),At=Y("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),xt=Y("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),wt=Y("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),rt=Y("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Rt=Y("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),zt=Y("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");function et(m){return v.interpolateRgbBasis(m[m.length-1])}var Pt=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Y),j=et(Pt),Mt=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Y),ht=et(Mt),Nt=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Y),Tt=et(Nt),pt=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Y),W=et(pt),X=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Y),w=et(X),R=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Y),N=et(R),f=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Y),ct=et(f),yt=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d
207191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Y),Q=et(yt),J=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Y),gt=et(J),V=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Y),Lt=et(V),at=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Y),_t=et(at),bt=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Y),ft=et(bt),vt=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Y),Ct=et(vt),Gt=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Y),ue=et(Gt),ie=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Y),xe=et(ie),y=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Y),$=et(y),x=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Y),A=et(x),k=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Y),_=et(k),it=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Y),ut=et(it),Wt=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Y),qt=et(Wt),pe=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Y),le=et(pe),Qt=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ec
20ae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Y),Xt=et(Qt),be=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Y),ee=et(be),Ce=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Y),Fe=et(Ce),ze=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Y),l=et(ze),C=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Y),tt=et(C),It=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Y),Ut=et(It),Jt=v.interpolateCubehelixLong(B.cubehelix(300,.5,0),B.cubehelix(-240,.5,1)),Zt=v.interpolateCubehelixLong(B.cubehelix(-100,.75,.35),B.cubehelix(80,1.5,.8)),oe=v.interpolateCubehelixLong(B.cubehelix(260,.75,.35),B.cubehelix(80,1.5,.8)),Oe=B.cubehelix();function De(m){(m<0||m>1)&&(m-=Math.floor(m));var p=Math.abs(m-.5);return Oe.h=360*m-100,Oe.s=1.5-1.5*p,Oe.l=.8-.9*p,Oe+""}var ke=B.rgb(),Ie=Math.PI/3,He=Math.PI*2/3;function an(m){var p;return m=(.5-m)*Math.PI,ke.r=255*(p=Math.sin(m))*p,ke.g=255*(p=Math.sin(m+Ie))*p,ke.b=255*(p=Math.sin(m+He))*p,ke+""}function nt(m){var p=m.length;return function(M){return m[Math.max(0,Math.min(p-1,Math.floor(M*p)))]}}var Bt=nt(Y("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),de=nt(Y("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb8
201febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),E=nt(Y("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),H=nt(Y("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));a.schemeCategory10=kt,a.schemeAccent=Et,a.schemeDark2=Ot,a.schemePaired=At,a.schemePastel1=xt,a.schemePastel2=wt,a.schemeSet1=rt,a.schemeSet2=Rt,a.schemeSet3=zt,a.interpolateBrBG=j,a.schemeBrBG=Pt,a.interpolatePRGn=ht,a.schemePRGn=Mt,a.interpolatePiYG=Tt,a.schemePiYG=Nt,a.interpolatePuOr=W,a.schemePuOr=pt,a.interpolateRdBu=w,a.schemeRdBu=X,a.interpolateRdGy=N,a.schemeRdGy=R,a.interpolateRdYlBu=ct,a.schemeRdYlBu=f,a.interpolateRdYlGn=Q,a.schemeRdYlGn=yt,a.interpolateSpectral=gt,a.schemeSpectral=J,a.interpolateBuGn=Lt,a.schemeBuGn=V,a.interpolateBuPu=_t,a.schemeBuPu=at,a.interpolateGnBu=ft,a.schemeGnBu=bt,a.interpolateOrRd=Ct,a.schemeOrRd=vt,a.interpolatePuBuGn=ue,a.schemePuBuGn=Gt,a.interpolatePuBu=xe,a.schemePuBu=ie,a.interpolatePuRd=$,a.schemePuRd=y,a.interpolateRdPu=A,a.schemeRdPu=x,a.interpolateYlGnBu=_,a.schemeYlGnBu=k,a.interpolateYlGn=ut,a.schemeYlGn=it,a.interpolateYlOrBr=qt,a.schemeYlOrBr=Wt,a.interpolateYlOrRd=le,a.schemeYlOrRd=pe,a.interpolateBlues=Xt,a.schemeBlues=Qt,a.interpolateGreens=ee,a.schemeGreens=be,a.interpolateGreys=Fe,a.schemeGreys=Ce,a.interpolatePurples=l,a.schemePurples=ze,a.interpolateReds=tt,a.schemeReds=C,a.interpolateOranges=Ut,a.schemeOranges=It,a.interpolateCubehelixDefault=Jt,a.interpolateRainbow=De,a.interpolateWarm=Zt,a.interpolateCool=oe,a.interpolateSinebow=an,a.interpolateViridis=Bt,a.interpolateMagma=de,a.interpolateInferno=E,a.interpolatePlasma=H,Object.defineProperty(a,"__esModule",{value:!0})})});var No=hn((qr,Io)=>{(function(a,v){typeof qr=="object"&&typeof Io<"u"?v(qr):typeof define=="function"&&define.amd?define(["exports"],v):v(a.d3=a.d3||{})})(qr,function(a){"use strict";function v(y){return function(){return y}}
20function B(y){return y[0]}function Y(y){return y[1]}function kt(){this._=null}function Et(y){y.U=y.C=y.L=y.R=y.P=y.N=null}kt.prototype={constructor:kt,insert:function(y,$){var x,A,k;if(y){if($.P=y,$.N=y.N,y.N&&(y.N.P=$),y.N=$,y.R){for(y=y.R;y.L;)y=y.L;y.L=$}else y.R=$;x=y}else this._?(y=xt(this._),$.P=null,$.N=y,y.P=y.L=$,x=y):($.P=$.N=null,this._=$,x=null);for($.L=$.R=null,$.U=x,$.C=!0,y=$;x&&x.C;)A=x.U,x===A.L?(k=A.R,k&&k.C?(x.C=k.C=!1,A.C=!0,y=A):(y===x.R&&(Ot(this,x),y=x,x=y.U),x.C=!1,A.C=!0,At(this,A))):(k=A.L,k&&k.C?(x.C=k.C=!1,A.C=!0,y=A):(y===x.L&&(At(this,x),y=x,x=y.U),x.C=!1,A.C=!0,Ot(this,A))),x=y.U;this._.C=!1},remove:function(y){y.N&&(y.N.P=y.P),y.P&&(y.P.N=y.N),y.N=y.P=null;var $=y.U,x,A=y.L,k=y.R,_,it;if(A?k?_=xt(k):_=A:_=k,$?$.L===y?$.L=_:$.R=_:this._=_,A&&k?(it=_.C,_.C=y.C,_.L=A,A.U=_,_!==k?($=_.U,_.U=y.U,y=_.R,$.L=y,_.R=k,k.U=_):(_.U=$,$=_,y=_.R)):(it=y.C,y=_),y&&(y.U=$),!it){if(y&&y.C){y.C=!1;return}do{if(y===this._)break;if(y===$.L){if(x=$.R,x.C&&(x.C=!1,$.C=!0,Ot(this,$),x=$.R),x.L&&x.L.C||x.R&&x.R.C){(!x.R||!x.R.C)&&(x.L.C=!1,x.C=!0,At(this,x),x=$.R),x.C=$.C,$.C=x.R.C=!1,Ot(this,$),y=this._;break}}else if(x=$.L,x.C&&(x.C=!1,$.C=!0,At(this,$),x=$.L),x.L&&x.L.C||x.R&&x.R.C){(!x.L||!x.L.C)&&(x.R.C=!1,x.C=!0,Ot(this,x),x=$.L),x.C=$.C,$.C=x.L.C=!1,At(this,$),y=this._;break}x.C=!0,y=$,$=$.U}while(!y.C);y&&(y.C=!1)}}};function Ot(y,$){var x=$,A=$.R,k=x.U;k?k.L===x?k.L=A:k.R=A:y._=A,A.U=k,x.U=A,x.R=A.L,x.R&&(x.R.U=x),A.L=x}function At(y,$){var x=$,A=$.L,k=x.U;k?k.L===x?k.L=A:k.R=A:y._=A,A.U=k,x.U=A,x.L=A.R,x.L&&(x.L.U=x),A.R=x}function xt(y){for(;y.L;)y=y.L;return y}function wt(y,$,x,A){var k=[null,null],_=Ct.push(k)-1;return k.left=y,k.right=$,x&&Rt(k,y,$,x),A&&Rt(k,$,y,A),ft[y.index].halfedges.push(_),ft[$.index].halfedges.push(_),k}function rt(y,$,x){var A=[$,x];return A.left=y,A}function Rt(y,$,x,A){!y[0]&&!y[1]?(y[0]=A,y.left=$,y.right=x):y.left===x?y[1]=A:y[0]=A}function zt(y,$,x,A,k){var _=y[0],it=y[1],ut=_[0],Wt=_[1],qt=it[0],pe=it[1],le=0,Qt=1,Xt=qt-ut,be=pe-Wt,ee;if(ee=$-ut,!(!Xt&&ee>0)){if(ee/=Xt,Xt<0){if(ee<le)return;ee<Qt&&(Qt=ee)}else if(Xt>0){if(ee>Qt)return;ee>le&&(le=ee)}if(ee=A-ut,!(!Xt&&ee<0)){if(ee/=Xt,Xt<0){if(ee>Qt)return;ee>le&&(le=ee)}else if(Xt>0){if(ee<le)return;ee<Qt&&(Qt=ee)}if(ee=x-Wt,!(!be&&ee>0)){if(ee/=be,be<0){if(ee<le)return;ee<Qt&&(Qt=ee)}else if(be>0){if(ee>Qt)return;ee>le&&(le=ee)}if(ee=k-Wt,!(!be&&ee<0)){if(ee/=be,be<0){if(ee>Qt)return;ee>le&&(le=ee)}else if(be>0){if(ee<le)return;ee<Qt&&(Qt=ee)}return!(le>0)&&!(Qt<1)||(le>0&&(y[0]=[ut+le*Xt,Wt+le*be]),Qt<1&&(y[1]=[ut+Qt*Xt,Wt+Qt*be])),!0}}}}}function et(y,$,x,A,k){var _=y[1];if(_)return!0;var it=y[0],ut=y.left,Wt=y.right,qt=ut[0],pe=ut[1],le=Wt[0],Qt=Wt[1],Xt=(qt+le)/2,be=(pe+Qt)/2,ee,Ce;if(Qt===pe){if(Xt<$||Xt>=A)return;if(qt>le){if(!it)it=[Xt,x];else if(it[1]>=k)return;_=[Xt,k]}else{if(!it)it=[Xt,k];else if(it[1]<x)return;_=[Xt,x]}}else if(ee=(qt-le)/(Qt-pe),Ce=be-ee*Xt,ee<-1||ee>1)if(qt>le){if(!it)it=[(x-Ce)/ee,x];else if(it[1]>=k)return;_=[(k-Ce)/ee,k]}else{if(!it)it=[(k-Ce)/ee,k];else if(it[1]<x)return;_=[(x-Ce)/ee,x]}else if(pe<Qt){if(!it)it=[$,ee*$+Ce];else if(it[0]>=A)return;_=[A,ee*A+Ce]}else{if(!it)it=[A,ee*A+Ce];else if(it[0]<$)return;_=[$,ee*$+Ce]}return y[0]=it,y[1]=_,!0}function Pt(y,$,x,A){for(var k=Ct.length,_;k--;)(!et(_=Ct[k],y,$,x,A)||!zt(_,y,$,x,A)||!(Math.abs(_[0][0]-_[1][0])>at||Math.abs(_[0][1]-_[1][1])>at))&&delete Ct[k]}function j(y){return ft[y.index]={site:y,halfedges:[]}}function Mt(y,$){var x=y.site,A=$.left,k=$.right;return x===k&&(k=A,A=x),k?Math.atan2(k[1]-A[1],k[0]-A[0]):(x===A?(A=$[1],k=$[0]):(A=$[0],k=$[1]),Math.atan2(A[0]-k[0],k[1]-A[1]))}function ht(y,$){return $[+($.left!==y.site)]}function Nt(y,$){return $[+($.left===y.site)]}function Tt(){for(var y=0,$=ft.length,x,A,k,_;y<$;++y)if((x=ft[y])&&(_=(A=x.halfedges).length)){var it=new Array(_),ut=new Array(_);for(k=0;k<_;++k)it[k]=k,ut[k]=Mt(x,Ct[A[k]]);for(it.sort(function(Wt,qt){return ut[qt]-ut[Wt]}),k=0;k<_;++k)ut[k]=A[it[k]];for(k=0;k<_;++k)A[k]=ut[k]}}function pt(y,$,x,A){var k=ft.length,_,it,ut,Wt,qt,pe,le,Qt,Xt,be,ee,Ce,Fe=!0;for(_=0;_<k;++_)if(it=ft[_]){for(ut=it.site,qt=it.halfedges,Wt=qt.length;Wt--;)Ct[qt[Wt]]||qt.splice(Wt,1);for(Wt=0,pe=qt.length;Wt<pe;)be=Nt(it,Ct[qt[Wt]]),ee=be[0],Ce=be[1],le=ht(it,Ct[qt[++Wt%pe]]),Qt=le[0],Xt=le[1],(Math.abs(ee-Qt)>at||Math.abs(Ce-Xt)>at)&&(qt.splice(Wt,0,Ct.push(rt(ut,be,Math.abs(ee-y)<at&&A-Ce>at?[y,Math.abs(Qt-y)<at?Xt:A]:Math.abs(Ce-A)<at&&x-ee>at?[Math.abs(Xt-A)<at?Qt:x,A]:Math.abs(ee-x)<at&&Ce-$>at?[x,Math.abs(Qt-x)<at?Xt:$]:Math.abs(Ce-$)<at&&ee-y>at?[Math.abs(Xt-$)<at?Qt:y,$]:null))-1),++pe);pe&&(Fe=!1)}if(Fe){var ze,l,C,tt=1/0;for(_=0,Fe=null;_<k;++_)(it=ft[_])&&(ut=it.site,ze=ut[0]-y,l=ut[1]-$,C=ze*ze+l*l,C<tt&&(tt=C,Fe=it));if(Fe){var It=[y,$],Ut=[y,A],Jt=[x,A],Zt=[x,$];Fe.halfedges.push(Ct.push(rt(ut=Fe.site,It,Ut))-1,Ct.push(rt(ut,Ut,Jt))-1,Ct.push(rt(ut,Jt,Zt))-1,Ct.push(rt(ut,Zt,It))-1)}}for(_=0;_<k;++_)(it=ft[_])&&(it.halfedges.length||delete ft[_])}var W=[],X;function w(){Et(this),this.x=this.y=this.arc=this.site=this.cy=null}function R(y){var $=y.P,x=y.N;if(!(!$||!x)){var A=$.site,k=y.site,_=x.site;if(A!==_){var it=k[0],ut=k[1],Wt=A[0]-it,qt=A[1]-ut,pe=_[0]-it,le=_[1]-ut,Qt=2*(Wt*le-qt*pe);
20if(!(Qt>=-_t)){var Xt=Wt*Wt+qt*qt,be=pe*pe+le*le,ee=(le*Xt-qt*be)/Qt,Ce=(Wt*be-pe*Xt)/Qt,Fe=W.pop()||new w;Fe.arc=y,Fe.site=k,Fe.x=ee+it,Fe.y=(Fe.cy=Ce+ut)+Math.sqrt(ee*ee+Ce*Ce),y.circle=Fe;for(var ze=null,l=vt._;l;)if(Fe.y<l.y||Fe.y===l.y&&Fe.x<=l.x)if(l.L)l=l.L;else{ze=l.P;break}else if(l.R)l=l.R;else{ze=l;break}vt.insert(ze,Fe),ze||(X=Fe)}}}}function N(y){var $=y.circle;$&&($.P||(X=$.N),vt.remove($),W.push($),Et($),y.circle=null)}var f=[];function ct(){Et(this),this.edge=this.site=this.circle=null}function yt(y){var $=f.pop()||new ct;return $.site=y,$}function Q(y){N(y),bt.remove(y),f.push(y),Et(y)}function J(y){var $=y.circle,x=$.x,A=$.cy,k=[x,A],_=y.P,it=y.N,ut=[y];Q(y);for(var Wt=_;Wt.circle&&Math.abs(x-Wt.circle.x)<at&&Math.abs(A-Wt.circle.cy)<at;)_=Wt.P,ut.unshift(Wt),Q(Wt),Wt=_;ut.unshift(Wt),N(Wt);for(var qt=it;qt.circle&&Math.abs(x-qt.circle.x)<at&&Math.abs(A-qt.circle.cy)<at;)it=qt.N,ut.push(qt),Q(qt),qt=it;ut.push(qt),N(qt);var pe=ut.length,le;for(le=1;le<pe;++le)qt=ut[le],Wt=ut[le-1],Rt(qt.edge,Wt.site,qt.site,k);Wt=ut[0],qt=ut[pe-1],qt.edge=wt(Wt.site,qt.site,null,k),R(Wt),R(qt)}function gt(y){for(var $=y[0],x=y[1],A,k,_,it,ut=bt._;ut;)if(_=V(ut,x)-$,_>at)ut=ut.L;else if(it=$-Lt(ut,x),it>at){if(!ut.R){A=ut;break}ut=ut.R}else{_>-at?(A=ut.P,k=ut):it>-at?(A=ut,k=ut.N):A=k=ut;break}j(y);var Wt=yt(y);if(bt.insert(A,Wt),!(!A&&!k)){if(A===k){N(A),k=yt(A.site),bt.insert(Wt,k),Wt.edge=k.edge=wt(A.site,Wt.site),R(A),R(k);return}if(!k){Wt.edge=wt(A.site,Wt.site);return}N(A),N(k);var qt=A.site,pe=qt[0],le=qt[1],Qt=y[0]-pe,Xt=y[1]-le,be=k.site,ee=be[0]-pe,Ce=be[1]-le,Fe=2*(Qt*Ce-Xt*ee),ze=Qt*Qt+Xt*Xt,l=ee*ee+Ce*Ce,C=[(Ce*ze-Xt*l)/Fe+pe,(Qt*l-ee*ze)/Fe+le];Rt(k.edge,qt,be,C),Wt.edge=wt(qt,y,null,C),k.edge=wt(y,be,null,C),R(A),R(k)}}function V(y,$){var x=y.site,A=x[0],k=x[1],_=k-$;if(!_)return A;var it=y.P;if(!it)return-1/0;x=it.site;var ut=x[0],Wt=x[1],qt=Wt-$;if(!qt)return ut;var pe=ut-A,le=1/_-1/qt,Qt=pe/qt;return le?(-Qt+Math.sqrt(Qt*Qt-2*le*(pe*pe/(-2*qt)-Wt+qt/2+k-_/2)))/le+A:(A+ut)/2}function Lt(y,$){var x=y.N;if(x)return V(x,$);var A=y.site;return A[1]===$?A[0]:1/0}var at=1e-6,_t=1e-12,bt,ft,vt,Ct;function Gt(y,$,x){return(y[0]-x[0])*($[1]-y[1])-(y[0]-$[0])*(x[1]-y[1])}function ue(y,$){return $[1]-y[1]||$[0]-y[0]}function ie(y,$){var x=y.sort(ue).pop(),A,k,_;for(Ct=[],ft=new Array(y.length),bt=new kt,vt=new kt;;)if(_=X,x&&(!_||x[1]<_.y||x[1]===_.y&&x[0]<_.x))(x[0]!==A||x[1]!==k)&&(gt(x),A=x[0],k=x[1]),x=y.pop();else if(_)J(_.arc);else break;if(Tt(),$){var it=+$[0][0],ut=+$[0][1],Wt=+$[1][0],qt=+$[1][1];Pt(it,ut,Wt,qt),pt(it,ut,Wt,qt)}this.edges=Ct,this.cells=ft,bt=vt=Ct=ft=null}ie.prototype={constructor:ie,polygons:function(){var y=this.edges;return this.cells.map(function($){var x=$.halfedges.map(function(A){return ht($,y[A])});return x.data=$.site.data,x})},triangles:function(){var y=[],$=this.edges;return this.cells.forEach(function(x,A){if(ut=(_=x.halfedges).length)for(var k=x.site,_,it=-1,ut,Wt,qt=$[_[ut-1]],pe=qt.left===k?qt.right:qt.left;++it<ut;)Wt=pe,qt=$[_[it]],pe=qt.left===k?qt.right:qt.left,Wt&&pe&&A<Wt.index&&A<pe.index&&Gt(k,Wt,pe)<0&&y.push([k.data,Wt.data,pe.data])}),y},links:function(){return this.edges.filter(function(y){return y.right}).map(function(y){return{source:y.left.data,target:y.right.data}})},find:function(y,$,x){for(var A=this,k,_=A._found||0,it=A.cells.length,ut;!(ut=A.cells[_]);)if(++_>=it)return null;var Wt=y-ut.site[0],qt=$-ut.site[1],pe=Wt*Wt+qt*qt;
20do ut=A.cells[k=_],_=null,ut.halfedges.forEach(function(le){var Qt=A.edges[le],Xt=Qt.left;if(!((Xt===ut.site||!Xt)&&!(Xt=Qt.right))){var be=y-Xt[0],ee=$-Xt[1],Ce=be*be+ee*ee;Ce<pe&&(pe=Ce,_=Xt.index)}});while(_!==null);return A._found=k,x==null||pe<=x*x?ut.site:null}};function xe(){var y=B,$=Y,x=null;function A(k){return new ie(k.map(function(_,it){var ut=[Math.round(y(_,it,k)/at)*at,Math.round($(_,it,k)/at)*at];return ut.index=it,ut.data=_,ut}),x)}return A.polygons=function(k){return A(k).polygons()},A.links=function(k){return A(k).links()},A.triangles=function(k){return A(k).triangles()},A.x=function(k){return arguments.length?(y=typeof k=="function"?k:v(+k),A):y},A.y=function(k){return arguments.length?($=typeof k=="function"?k:v(+k),A):$},A.extent=function(k){return arguments.length?(x=k==null?null:[[+k[0][0],+k[0][1]],[+k[1][0],+k[1][1]]],A):x&&[[x[0][0],x[0][1]],[x[1][0],x[1][1]]]},A.size=function(k){return arguments.length?(x=k==null?null:[[0,0],[+k[0],+k[1]]],A):x&&[x[1][0]-x[0][0],x[1][1]-x[0][1]]},A}a.voronoi=xe,Object.defineProperty(a,"__esModule",{value:!0})})});var vc=hn(vn=>{"use strict";Object.defineProperty(vn,"__esModule",{value:!0});var Xo=vi(),Bo=gr(),Yo=mr(),qo=xo(),Ho=_r(),Vo=ci(),Uo=wo(),Wo=oi(),jo=pi(),Go=Fi(),Zo=Di(),Ko=Ao(),Jo=Co(),Qo=ma(),tc=$o(),ec=Oo(),nc=ti(),ic=Sr(),rc=Eo(),ac=ba(),oc=Do(),cc=Tr(),sc=zo(),wa=ei(),uc=Lr(),lc=ir(),fc=Pi(),hc=sr(),dc=gi(),gc=No(),pc=kr(),ks="5.9.3";Object.keys(Xo).forEach(function(a){vn[a]=Xo[a]});Object.keys(Bo).forEach(function(a){vn[a]=Bo[a]});Object.keys(Yo).forEach(function(a){vn[a]=Yo[a]});
20Object.keys(qo).forEach(function(a){vn[a]=qo[a]});Object.keys(Ho).forEach(function(a){vn[a]=Ho[a]});Object.keys(Vo).forEach(function(a){vn[a]=Vo[a]});Object.keys(Uo).forEach(function(a){vn[a]=Uo[a]});Object.keys(Wo).forEach(function(a){vn[a]=Wo[a]});Object.keys(jo).forEach(function(a){vn[a]=jo[a]});Object.keys(Go).forEach(function(a){vn[a]=Go[a]});Object.keys(Zo).forEach(function(a){vn[a]=Zo[a]});Object.keys(Ko).forEach(function(a){vn[a]=Ko[a]});Object.keys(Jo).forEach(function(a){vn[a]=Jo[a]});Object.keys(Qo).forEach(function(a){vn[a]=Qo[a]});Object.keys(tc).forEach(function(a){vn[a]=tc[a]});Object.keys(ec).forEach(function(a){vn[a]=ec[a]});Object.keys(nc).forEach(function(a){vn[a]=nc[a]});Object.keys(ic).forEach(function(a){vn[a]=ic[a]});Object.keys(rc).forEach(function(a){vn[a]=rc[a]});Object.keys(ac).forEach(function(a){vn[a]=ac[a]});Object.keys(oc).forEach(function(a){vn[a]=oc[a]});Object.keys(cc).forEach(function(a){vn[a]=cc[a]});Object.keys(sc).forEach(function(a){vn[a]=sc[a]});Object.keys(wa).forEach(function(a){vn[a]=wa[a]});Object.keys(uc).forEach(function(a){vn[a]=uc[a]});Object.keys(lc).forEach(function(a){vn[a]=lc[a]});Object.keys(fc).forEach(function(a){vn[a]=fc[a]});Object.keys(hc).forEach(function(a){vn[a]=hc[a]});
20Object.keys(dc).forEach(function(a){vn[a]=dc[a]});Object.keys(gc).forEach(function(a){vn[a]=gc[a]});Object.keys(pc).forEach(function(a){vn[a]=pc[a]});vn.version=ks;Object.defineProperty(vn,"event",{get:function(){return wa.event}})});var xc=hn(Ur=>{"use strict";function Ta(a){"@babel/helpers - typeof";return Ta=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(v){return typeof v}:function(v){return v&&typeof Symbol=="function"&&v.constructor===Symbol&&v!==Symbol.prototype?"symbol":typeof v},Ta(a)}Object.defineProperty(Ur,"__esModule",{value:!0});Ur.default=void 0;var mi=Es(vc()),Ni=Rs((Ii(),er(Kn))),Os=["data","elementProps","forwardRef"];function Rs(a){return a&&a.__esModule?a:{default:a}}function _c(a){if(typeof WeakMap!="function")return null;var v=new WeakMap,B=new WeakMap;return(_c=function(kt){return kt?B:v})(a)}function Es(a,v){if(!v&&a&&a.__esModule)return a;if(a===null||Ta(a)!=="object"&&typeof a!="function")return{default:a};var B=_c(v);if(B&&B.has(a))return B.get(a);var Y={},kt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Et in a)if(Et!=="default"&&Object.prototype.hasOwnProperty.call(a,Et)){var Ot=kt?Object.getOwnPropertyDescriptor(a,Et):null;Ot&&(Ot.get||Ot.set)?Object.defineProperty(Y,Et,Ot):Y[Et]=a[Et]}return Y.default=a,B&&B.set(a,Y),Y}function Hr(){return Hr=Object.assign?Object.assign.bind():function(a){for(var v=1;v<arguments.length;v++){var B=arguments[v];for(var Y in B)Object.prototype.hasOwnProperty.call(B,Y)&&(a[Y]=B[Y])}return a},Hr.apply(this,arguments)}function Ps(a,v){if(a==null)return{};var B=Ds(a,v),Y,kt;if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols(a);for(kt=0;kt<Et.length;kt++)Y=Et[kt],!(v.indexOf(Y)>=0)&&Object.prototype.propertyIsEnumerable.call(a,Y)&&(B[Y]=a[Y])}return B}function Ds(a,v){if(a==null)return{};var B={},Y=Object.keys(a),kt,Et;for(Et=0;Et<Y.length;Et++)kt=Y[Et],!(v.indexOf(kt)>=0)&&(B[kt]=a[kt]);return B}function mc(a,v){var B=Object.keys(a);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(a);v&&(Y=Y.filter(function(kt){return Object.getOwnPropertyDescriptor(a,kt).enumerable})),B.push.apply(B,Y)}return B}function Vr(a){for(var v=1;v<arguments.length;v++){var B=arguments[v]!=null?arguments[v]:{};v%2?mc(Object(B),!0).forEach(function(Y){Fs(a,Y,B[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(B)):mc(Object(B)).forEach(function(Y){Object.defineProperty(a,Y,Object.getOwnPropertyDescriptor(B,Y))})}return a}function Fs(a,v,B){return v in a?Object.defineProperty(a,v,{value:B,enumerable:!0,configurable:!0,writable:!0}):a[v]=B,a}function zs(a,v){if(!(a instanceof v))throw new TypeError("Cannot call a class as a function")}function yc(a,v){for(var B=0;B<v.length;B++){var Y=v[B];Y.enumerable=Y.enumerable||!1,Y.configurable=!0,"value"in Y&&(Y.writable=!0),Object.defineProperty(a,Y.key,Y)}}function Is(a,v,B){return v&&yc(a.prototype,v),B&&yc(a,B),Object.defineProperty(a,"prototype",{writable:!1}),a}var Ns={range:{max:"#006be6",min:"#97c5ff"},selected:"#006eff",value:"pop_est"},Xs=function(){function a(v){zs(this,a),this._data=v.data,this._element=v.element,this._color=Vr(Vr({},Ns),v.color),this._pollingInterval=v.pollingInterval,this._height="100%",this._width="100%"}return Is(a,[{key:"attached",value:function(){var B=this,Y=typeof this._width=="string"?this._width:"".concat(this._width,"px"),kt=typeof this._height=="string"?this._height:"".concat(this._height,"px");this.svg=mi.select(this._element).append("svg").attr("width",Y).attr("height",kt),this._handleClickHandler=this._handleClick.bind(this),this.rect=this.svg.append("rect").attr("fill","rgba(1, 1, 1, 0)").attr("width",Y).attr("height",kt).on("click",this._handleClickHandler);var Et=this.svg.node().getBoundingClientRect();this.svgGroup=this.svg.append("g"),this.mapLayer=this.svgGroup.append("g"),this.projection=mi.geoMercator().scale(100).translate([Et.width/2,Et.height/2]),this.path=m
20i.geoPath().projection(this.projection),this._selected=null,this._onDataLoad(this._data),this._internalPollingInterval&&clearInterval(this._internalPollingInterval),this.pollingInterval&&(this._internalPollingInterval=setInterval(function(){B._onDataLoad(B._data)},this._pollingInterval))}},{key:"disposed",value:function(){this._internalPollingInterval&&(clearInterval(this._internalPollingInterval),this._internalPollingInterval=null),this.svg&&this.svg.remove()}},{key:"_fillFn",value:function(B){var Y=B&&B.properties?B.properties[this._color.value]:0;return this.colorScale(Y||0)}},{key:"getSize",value:function(){return{height:this._height,width:this._width}}},{key:"_handleClick",value:function(B){var Y=this;B&&this._selected!==B?this._selected=B:this._selected=null,this.mapLayer.selectAll("path").style("fill",function(kt){return Y._selected&&kt===Y._selected?Y._color.selected:Y._fillFn.bind(Y)(kt)})}},{key:"_handleMouseOver",value:function(B,Y,kt){var Et=kt[Y];mi.select(Et).style("fill",this._color.selected)}},{key:"_handleMouseOut",value:function(B,Y,kt){var Et=this,Ot=kt[Y];mi.select(Ot).style("fill",function(At){return Et._fillFn.bind(Et)(At)||0})}},{key:"_onDataLoad",value:function(B){var Y=this,kt=B.features,Et=kt.map(function(Ot){return Ot.properties[Y._color.value]});this._domainMin=Math.min.apply(null,Et),this._domainMax=Math.max.apply(null,Et),this.colorScale=mi.scaleLinear().domain([this._domainMin,this._domainMax]).range([this._color.range.min,this._color.range.max]),this.mapLayer.selectAll("path").data(kt).enter().append("path").attr("d",this.path).attr("vector-effect","non-scaling-stroke").attr("fill",function(Ot){return Y._fillFn.bind(Y)(Ot)||0}).on("click",this._handleClickHandler).on("mouseout",this._handleMouseOut.bind(this)).on("mouseover",this._handleMouseOver.bind(this))}}]),a}(),Bs=function(v){var B=v.data,Y=v.elementProps,kt=Y===void 0?{}:Y,Et=v.forwardRef,Ot=Ps(v,Os),At=Ni.default.useRef(null);Ni.default.useEffect(function(){return Et&&(Et.current=new Xs(Vr(Vr({},Ot),{},{data:B,element:At.current})),Et.current.attached()),function(){Et.current.disposed()}},[]);var xt=Et.current?Et.current.getSize():{},wt=xt.height,rt=wt===void 0?"100%":wt,Rt=xt.width,zt=Rt===void 0?"100%":Rt;return Ni.default.createElement("div",Hr({style:{height:rt,width:zt}},kt,{ref:At}))},Ys=Ni.default.forwardRef(function(a,v){return Ni.default.createElement(Bs,Hr({forwardRef:v},a))});Ur.default=Ys});var Sc=hn(Wr=>{"use strict";Object.defineProperty(Wr,"__esModule",{value:!0});Wr.default=void 0;var bc=Ac((Ii(),er(Kn))),qs=Ac(xa()),Hs=["data","predictionDate"];function Ac(a){return a&&a.__esModule?a:{default:a}}function Aa(){return Aa=Object.assign?Object.assign.bind():function(a){for(var v=1;v<arguments.length;v++){var B=arguments[v];for(var Y in B)Object.prototype.hasOwnProperty.call(B,Y)&&(a[Y]=B[Y])}return a},Aa.apply(this,arguments)}function wc(a,v){var B=Object.keys(a);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(a);v&&(Y=Y.filter(function(kt){return Object.getOwnPropertyDescriptor(a,kt).enumerable})),B.push.apply(B,Y)}return B}function Tc(a){for(var v=1;v<arguments.length;v++){var B=arguments[v]!=null?arguments[v]:{};v%2?wc(Object(B),!0).forEach(function(Y){Vs(a,Y,B[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(B)):wc(Object(B)).forEach(function(Y){Object.defineProperty(a,Y,Object.getOwnPropertyDescriptor(B,Y))})}return a}function Vs(a,v,B){return v in a?Object.defineProperty(a,v,{value:B,enumerable:!0,configurable:!0,writable:!0}):a[v]=B,a}function Us(a,v){if(a==null)return{};var B=Ws(a,v),Y,kt;if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols(a);for(kt=0;kt<Et.length;kt++)Y=Et[kt],!(v.indexOf(Y)>=0)&&Object.prototype.propertyIsEnumerable.call(a,Y)&&(B[Y]=a[Y])}return B}function Ws(a,v){if(a==null)return{};var B={},Y=Object.keys(a),kt,Et;for(Et=0;Et<Y.length;Et++)kt=Y[Et],!(v.indexOf(kt)>=0)&&(B[kt]=a[kt]);return B}var Mc=bc.default.forwardRef(function(a,v){var B=a.data,Y=a.predictionDate,kt=Us(a,Hs),Et=B.columns;Et&&(Et=Et.map(function(At){return At[0]!=="x"&&(At=At.map(function(xt){return typeof xt=="number"?{high:xt,low:xt,mid:xt}:xt})),At}));var Ot=[];return Y&&Ot.push({axis:"x",start:Y}),bc.default.createElement(qs.default,Aa({data:Tc(Tc({},B),{},{columns:Et}),ref:v,regions:Ot},kt))});Mc.displayName="ClayPredictiveChart";var js=Mc;Wr.default=js});var Cc=hn(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.DEFAULT_TILES=Wn.DEFAULT_POINT_PATTERNS=Wn.DEFAULT_LINE_CLASSES=Wn.DEFAULT_GRID_OBJECT=Wn.DEFAULT_COLORS=void 0;var Gs=["#006eff","#cc4e00","#e60000","#1b7e6e","#e50082","#458613","#aa33ff","#cc4e00","#0077b3"];Wn.DEFAULT_COLORS=Gs;var Zs={x:{show:!0},y:{show:!0}};Wn.DEFAULT_GRID_OBJECT=Zs;var Ks=["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"];Wn.DEFAULT_LINE_CLASSES=Ks;var Js=["circles","diagonal-left-large","diagonal-left-small","diagonal-right-large","diagonal-right-small","horizontal-large","horizontal-small","vertical-large","vertical-small"];Wn.DEFAULT_TILES=Js;var Qs=["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>'];Wn.DEFAULT_POINT_PATTERNS=Qs});var kc=hn(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});Object.defineProperty(Xi,"bb",{enumerable:!0,get:function(){return tu.bb}});Xi.default=void 0;var tu=_a(),Ma=Gr((Ii(),er(Kn))),eu=Gr(xa()),nu=Gr(xc()),iu=Gr(Sc()),jr=Cc(),ru=["color","data","elementProps","grid","line","point"];function Gr(a){return a&&a.__esModule?a:{default:a}}function Ca(){return Ca=Object.assign?Object.assign.bind():function(a){for(var v=1;v<arguments.length;v++){var B=arguments[v];for(var Y in B)Object.prototype.hasOwnProperty.call(B,Y)&&(a[Y]=B[Y])}return a},Ca.apply(this,arguments)}function Lc(a,v){var B=Object.keys(a);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(a);v&&(Y=Y.filter(function(kt){return Object.getOwnPropertyDescriptor(a,kt).enumerable})),B.push.apply(B,Y)}return B}function Sa(a){for(var v=1;v<arguments.length;v++){var B=arguments[v]!=null?arguments[v]:{};
20v%2?Lc(Object(B),!0).forEach(function(Y){au(a,Y,B[Y])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(B)):Lc(Object(B)).forEach(function(Y){Object.defineProperty(a,Y,Object.getOwnPropertyDescriptor(B,Y))})}return a}function au(a,v,B){return v in a?Object.defineProperty(a,v,{value:B,enumerable:!0,configurable:!0,writable:!0}):a[v]=B,a}function ou(a,v){if(a==null)return{};var B=cu(a,v),Y,kt;if(Object.getOwnPropertySymbols){var Et=Object.getOwnPropertySymbols(a);for(kt=0;kt<Et.length;kt++)Y=Et[kt],!(v.indexOf(Y)>=0)&&Object.prototype.propertyIsEnumerable.call(a,Y)&&(B[Y]=a[Y])}return B}function cu(a,v){if(a==null)return{};var B={},Y=Object.keys(a),kt,Et;for(Et=0;Et<Y.length;Et++)kt=Y[Et],!(v.indexOf(kt)>=0)&&(B[kt]=a[kt]);return B}var $c=Ma.default.forwardRef(function(a,v){var B=a.color,Y=a.data,kt=a.elementProps,Et=a.grid,Ot=a.line,At=a.point,xt=ou(a,ru),wt=Ma.default.useRef(),rt;switch(Y.type){case"geo-map":delete Y.type,rt=nu.default;break;case"predictive":delete Y.type,rt=iu.default;break;default:rt=eu.default}return Ma.default.createElement(rt,Ca({},xt,{color:Sa({pattern:jr.DEFAULT_COLORS},B),data:Y,elementProps:kt,grid:Object.assign(jr.DEFAULT_GRID_OBJECT,Et),line:Sa({classes:jr.DEFAULT_LINE_CLASSES},Ot),point:Sa({pattern:jr.DEFAULT_POINT_PATTERNS},At),ref:v||wt}))});$c.displayName="ClayChart";var su=$c;Xi.default=su});var uu=ys(kc()),{default:lu,bb:xu}=uu;var bu=lu;export{xu as bb,bu 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.