Current section
Files
Jump to
Current section
Files
dist/js/app.js
(()=>{var ar=Object.create;var to=Object.defineProperty;var ur=Object.getOwnPropertyDescriptor;var cr=Object.getOwnPropertyNames;var hr=Object.getPrototypeOf,pr=Object.prototype.hasOwnProperty;var dr=(e,l)=>()=>(l||e((l={exports:{}}).exports,l),l.exports);var mr=(e,l,s,n)=>{if(l&&typeof l=="object"||typeof l=="function")for(let o of cr(l))!pr.call(e,o)&&o!==s&&to(e,o,{get:()=>l[o],enumerable:!(n=ur(l,o))||n.enumerable});return e};var gr=(e,l,s)=>(s=e!=null?ar(hr(e)):{},mr(l||!e||!e.__esModule?to(s,"default",{value:e,enumerable:!0}):s,e));var no=dr((lo,on)=>{(function(e,l){"use strict";function s(){n.width=e.innerWidth,n.height=5*d.barThickness;var p=n.getContext("2d");p.shadowBlur=d.shadowBlur,p.shadowColor=d.shadowColor;var w,k=p.createLinearGradient(0,0,n.width,0);for(w in d.barColors)k.addColorStop(w,d.barColors[w]);p.lineWidth=d.barThickness,p.beginPath(),p.moveTo(0,d.barThickness/2),p.lineTo(Math.ceil(o*n.width),d.barThickness/2),p.strokeStyle=k,p.stroke()}var n,o,a,u=null,h=null,m=null,d={autoRun:!0,barThickness:3,barColors:{0:"rgba(26, 188, 156, .9)",".25":"rgba(52, 152, 219, .9)",".50":"rgba(241, 196, 15, .9)",".75":"rgba(230, 126, 34, .9)","1.0":"rgba(211, 84, 0, .9)"},shadowBlur:10,shadowColor:"rgba(0, 0, 0, .6)",className:null},_={config:function(p){for(var w in p)d.hasOwnProperty(w)&&(d[w]=p[w])},show:function(p){var w,k;a||(p?m=m||setTimeout(()=>_.show(),p):(a=!0,h!==null&&e.cancelAnimationFrame(h),n||((k=(n=l.createElement("canvas")).style).position="fixed",k.top=k.left=k.right=k.margin=k.padding=0,k.zIndex=100001,k.display="none",d.className&&n.classList.add(d.className),w="resize",p=s,(k=e).addEventListener?k.addEventListener(w,p,!1):k.attachEvent?k.attachEvent("on"+w,p):k["on"+w]=p),n.parentElement||l.body.appendChild(n),n.style.opacity=1,n.style.display="block",_.progress(0),d.autoRun&&function P(){u=e.requestAnimationFrame(P),_.progress("+"+.05*Math.pow(1-Math.sqrt(o),2))}()))},progress:function(p){return p===void 0||(typeof p=="string"&&(p=(0<=p.indexOf("+")||0<=p.indexOf("-")?o:0)+parseFloat(p)),o=1<p?1:p,s()),o},hide:function(){clearTimeout(m),m=null,a&&(a=!1,u!=null&&(e.cancelAnimationFrame(u),u=null),function p(){return 1<=_.progress("+.1")&&(n.style.opacity-=.05,n.style.opacity<=.05)?(n.style.display="none",void(h=null)):void(h=e.requestAnimationFrame(p))}())}};typeof on=="object"&&typeof on.exports=="object"?on.exports=_:typeof define=="function"&&define.amd?define(function(){return _}):this.topbar=_}).call(lo,window,document)});var bn=gr(no());var Pe="u-",wr="uplot",Sr=Pe+"hz",_r=Pe+"vt",yr=Pe+"title",vr=Pe+"wrap",br=Pe+"under",kr=Pe+"over",Tr=Pe+"axis",Qt=Pe+"off",xr=Pe+"select",Mr=Pe+"cursor-x",Ar=Pe+"cursor-y",Er=Pe+"cursor-pt",Pr=Pe+"legend",Dr=Pe+"live",Lr=Pe+"inline",Cr=Pe+"series",Fr=Pe+"marker",io=Pe+"label",Vr=Pe+"value",Gl="width",Il="height",Hl="top",oo="bottom",vl="left",qn="right",ai="#000",so=ai+"0",Kn="mousemove",ro="mousedown",jn="mouseup",fo="mouseenter",ao="mouseleave",uo="dblclick",Rr="resize",zr="scroll",co="change",un="dppxchange",ui="--",El=typeof window<"u",Xn=El?document:null,kl=El?window:null,Nr=El?navigator:null,oe,sn;function ei(){let e=devicePixelRatio;oe!=e&&(oe=e,sn&&li(co,sn,ei),sn=matchMedia(`(min-resolution: ${oe-.001}dppx) and (max-resolution: ${oe+.001}dppx)`),Xt(co,sn,ei),kl.dispatchEvent(new CustomEvent(un)))}function et(e,l){if(l!=null){let s=e.classList;!s.contains(l)&&s.add(l)}}function ti(e,l){let s=e.classList;s.contains(l)&&s.remove(l)}function ge(e,l,s){e.style[l]=s+"px"}function gt(e,l,s,n){let o=Xn.createElement(e);return l!=null&&et(o,l),s?.insertBefore(o,n),o}function at(e,l){return gt("div",e,l)}var ho=new WeakMap;function Mt(e,l,s,n,o){let a="translate("+l+"px,"+s+"px)",u=ho.get(e);a!=u&&(e.style.transform=a,ho.set(e,a),l<0||s<0||l>n||s>o?et(e,Qt):ti(e,Qt))}var po=new WeakMap;function mo(e,l,s){let n=l+s,o=po.get(e);n!=o&&(po.set(e,n),e.style.background=l,e.style.borderColor=s)}var go=new WeakMap;function wo(e,l,s,n){let o=l+""+s,a=go.get(e);o!=a&&(go.set(e,o),e.style.height=s+"px",e.style.width=l+"px",e.style.marginLeft=n?-l/2+"px":0,e.style.marginTop=n?-s/2+"px":0)}var ci={passive:!0},Or={...ci,capture:!0};function Xt(e,l,s,n){l.addEventListener(e,s,n?Or:ci)}function li(e,l,s,n){l.removeEventListener(e,s,ci)}El&&ei();function wt(e,l,s,n){let o;s=s||0,n=n||l.length-1;let a=n<=2147483647;for(;n-s>1;)o=a?s+n>>1:tt((s+n)/2),l[o]<e?s=o:n=o;return e-l[s]<=l[n]-e?s:n}function Uo(e){return(s,n,o)=>{let a=-1,u=-1;for(let h=n;h<=o;h++)if(e(s[h])){a=h;break}for(let h=o;h>=n;h--)if(e(s[h])){u=h;break}return[a,u]}}var qo=e=>e!=null,Ko=e=>e!=null&&e>0,pn=Uo(qo),Hr=Uo(Ko);function Wr(e,l,s,n=0,o=!1){let a=o?Hr:pn,u=o?Ko:qo;[l,s]=a(e,l,s);let h=e[l],m=e[l];if(l>-1)if(n==1)h=e[l],m=e[s];else if(n==-1)h=e[s],m=e[l];else for(let d=l;d<=s;d++){let _=e[d];u(_)&&(_<h?h=_:_>m&&(m=_))}return[h??ue,m??-ue]}function dn(e,l,s,n){let o=yo(e),a=yo(l);e==l&&(o==-1?(e*=s,l/=s):(e/=s,l*=s));let u=s==10?Dt:jo,h=o==1?tt:ut,m=a==1?ut:tt,d=h(u(Ee(e))),_=m(u(Ee(l))),p=Tl(s,d),w=Tl(s,_);return s==10&&(d<0&&(p=ce(p,-d)),_<0&&(w=ce(w,-_))),n||s==2?(e=p*o,l=w*a):(e=Qo(e,p),l=mn(l,w)),[e,l]}function hi(e,l,s,n){let o=dn(e,l,s,n);return e==0&&(o[0]=0),l==0&&(o[1]=0),o}var pi=.1,So={mode:3,pad:pi},Bl={pad:0,soft:null,mode:0},Gr={min:Bl,max:Bl};function cn(e,l,s,n){return gn(s)?_o(e,l,s):(Bl.pad=s,Bl.soft=n?0:null,Bl.mode=n?3:0,_o(e,l,Gr))}function ne(e,l){return e??l}function Ir(e,l,s){for(l=ne(l,0),s=ne(s,e.length-1);l<=s;){if(e[l]!=null)return!0;l++}return!1}function _o(e,l,s){let n=s.min,o=s.max,a=ne(n.pad,0),u=ne(o.pad,0),h=ne(n.hard,-ue),m=ne(o.hard,ue),d=ne(n.soft,ue),_=ne(o.soft,-ue),p=ne(n.mode,0),w=ne(o.mode,0),k=l-e,P=Dt(k),C=Ue(Ee(e),Ee(l)),H=Dt(C),W=Ee(H-P);(k<1e-24||W>10)&&(k=0,(e==0||l==0)&&(k=1e-24,p==2&&d!=ue&&(a=0),w==2&&_!=-ue&&(u=0)));let v=k||C||1e3,z=Dt(v),T=Tl(10,tt(z)),j=v*(k==0?e==0?.1:1:a),L=ce(Qo(e-j,T/10),24),J=e>=d&&(p==1||p==3&&L<=d||p==2&&L>=d)?d:ue,U=Ue(h,L<J&&e>=J?J:St(J,L)),Q=v*(k==0?l==0?.1:1:u),B=ce(mn(l+Q,T/10),24),x=l<=_&&(w==1||w==3&&B>=_||w==2&&B<=_)?_:-ue,K=St(m,B>x&&l<=x?x:Ue(x,B));return U==K&&U==0&&(K=100),[U,K]}var Yr=new Intl.NumberFormat(El?Nr.language:"en-US"),di=e=>Yr.format(e),lt=Math,an=lt.PI,Ee=lt.abs,tt=lt.floor,Ae=lt.round,ut=lt.ceil,St=lt.min,Ue=lt.max,Tl=lt.pow,yo=lt.sign,Dt=lt.log10,jo=lt.log2,Br=(e,l=1)=>lt.sinh(e)*l,Jn=(e,l=1)=>lt.asinh(e/l),ue=1/0;function vo(e){return(Dt((e^e>>31)-(e>>31))|0)+1}function ni(e,l,s){return St(Ue(e,l),s)}function Jo(e){return typeof e=="function"}function X(e){return Jo(e)?e:()=>e}var Ur=()=>{},$o=e=>e,Zo=(e,l)=>l,qr=e=>null,bo=e=>!0,ko=(e,l)=>e==l,Kr=/\.\d*?(?=9{6,}|0{6,})/gm,el=e=>{if(es(e)||Ht.has(e))return e;let l=`${e}`,s=l.match(Kr);if(s==null)return e;let n=s[0].length-1;if(l.indexOf("e-")!=-1){let[o,a]=l.split("e");return+`${el(o)}e${a}`}return ce(e,n)};function $t(e,l){return el(ce(el(e/l))*l)}function mn(e,l){return el(ut(el(e/l))*l)}function Qo(e,l){return el(tt(el(e/l))*l)}function ce(e,l=0){if(es(e))return e;let s=10**l,n=e*s*(1+Number.EPSILON);return Ae(n)/s}var Ht=new Map;function Xo(e){return((""+e).split(".")[1]||"").length}function ql(e,l,s,n){let o=[],a=n.map(Xo);for(let u=l;u<s;u++){let h=Ee(u),m=ce(Tl(e,u),h);for(let d=0;d<n.length;d++){let _=e==10?+`${n[d]}e${u}`:n[d]*m,p=(u>=0?0:h)+(u>=a[d]?0:a[d]),w=e==10?_:ce(_,p);o.push(w),Ht.set(w,p)}}return o}var Ul={},mi=[],xl=[null,null],Ot=Array.isArray,es=Number.isInteger,jr=e=>e===void 0;function To(e){return typeof e=="string"}function gn(e){let l=!1;if(e!=null){let s=e.constructor;l=s==null||s==Object}return l}function Jr(e){return e!=null&&typeof e=="object"}var $r=Object.getPrototypeOf(Uint8Array),ts="__proto__";function Ml(e,l=gn){let s;if(Ot(e)){let n=e.find(o=>o!=null);if(Ot(n)||l(n)){s=Array(e.length);for(let o=0;o<e.length;o++)s[o]=Ml(e[o],l)}else s=e.slice()}else if(e instanceof $r)s=e.slice();else if(l(e)){s={};for(let n in e)n!=ts&&(s[n]=Ml(e[n],l))}else s=e;return s}function Te(e){let l=arguments;for(let s=1;s<l.length;s++){let n=l[s];for(let o in n)o!=ts&&(gn(e[o])?Te(e[o],Ml(n[o])):e[o]=Ml(n[o]))}return e}var Zr=0,Qr=1,Xr=2;function ef(e,l,s){for(let n=0,o,a=-1;n<l.length;n++){let u=l[n];if(u>a){for(o=u-1;o>=0&&e[o]==null;)e[o--]=null;for(o=u+1;o<s&&e[o]==null;)e[a=o++]=null}}}function tf(e,l){if(of(e)){let u=e[0].slice();for(let h=1;h<e.length;h++)u.push(...e[h].slice(1));return sf(u[0])||(u=nf(u)),u}let s=new Set;for(let u=0;u<e.length;u++){let m=e[u][0],d=m.length;for(let _=0;_<d;_++)s.add(m[_])}let n=[Array.from(s).sort((u,h)=>u-h)],o=n[0].length,a=new Map;for(let u=0;u<o;u++)a.set(n[0][u],u);for(let u=0;u<e.length;u++){let h=e[u],m=h[0];for(let d=1;d<h.length;d++){let _=h[d],p=Array(o).fill(void 0),w=l?l[u][d]:Qr,k=[];for(let P=0;P<_.length;P++){let C=_[P],H=a.get(m[P]);C===null?w!=Zr&&(p[H]=C,w==Xr&&k.push(H)):p[H]=C}ef(p,k,o),n.push(p)}}return n}var lf=typeof queueMicrotask>"u"?e=>Promise.resolve().then(e):queueMicrotask;function nf(e){let l=e[0],s=l.length,n=Array(s);for(let a=0;a<n.length;a++)n[a]=a;n.sort((a,u)=>l[a]-l[u]);let o=[];for(let a=0;a<e.length;a++){let u=e[a],h=Array(s);for(let m=0;m<s;m++)h[m]=u[n[m]];o.push(h)}return o}function of(e){let l=e[0][0],s=l.length;for(let n=1;n<e.length;n++){let o=e[n][0];if(o.length!=s)return!1;if(o!=l){for(let a=0;a<s;a++)if(o[a]!=l[a])return!1}}return!0}function sf(e,l=100){let s=e.length;if(s<=1)return!0;let n=0,o=s-1;for(;n<=o&&e[n]==null;)n++;for(;o>=n&&e[o]==null;)o--;if(o<=n)return!0;let a=Ue(1,tt((o-n+1)/l));for(let u=e[n],h=n+a;h<=o;h+=a){let m=e[h];if(m!=null){if(m<=u)return!1;u=m}}return!0}var ls=["January","February","March","April","May","June","July","August","September","October","November","December"],ns=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"];function is(e){return e.slice(0,3)}var rf=ns.map(is),ff=ls.map(is),af={MMMM:ls,MMM:ff,WWWW:ns,WWW:rf};function Wl(e){return(e<10?"0":"")+e}function uf(e){return(e<10?"00":e<100?"0":"")+e}var cf={YYYY:e=>e.getFullYear(),YY:e=>(e.getFullYear()+"").slice(2),MMMM:(e,l)=>l.MMMM[e.getMonth()],MMM:(e,l)=>l.MMM[e.getMonth()],MM:e=>Wl(e.getMonth()+1),M:e=>e.getMonth()+1,DD:e=>Wl(e.getDate()),D:e=>e.getDate(),WWWW:(e,l)=>l.WWWW[e.getDay()],WWW:(e,l)=>l.WWW[e.getDay()],HH:e=>Wl(e.getHours()),H:e=>e.getHours(),h:e=>{let l=e.getHours();return l==0?12:l>12?l-12:l},AA:e=>e.getHours()>=12?"PM":"AM",aa:e=>e.getHours()>=12?"pm":"am",a:e=>e.getHours()>=12?"p":"a",mm:e=>Wl(e.getMinutes()),m:e=>e.getMinutes(),ss:e=>Wl(e.getSeconds()),s:e=>e.getSeconds(),fff:e=>uf(e.getMilliseconds())};function gi(e,l){l=l||af;let s=[],n=/\{([a-z]+)\}|[^{]+/gi,o;for(;o=n.exec(e);)s.push(o[0][0]=="{"?cf[o[1]]:o[0]);return a=>{let u="";for(let h=0;h<s.length;h++)u+=typeof s[h]=="string"?s[h]:s[h](a,l);return u}}var hf=new Intl.DateTimeFormat().resolvedOptions().timeZone;function pf(e,l){let s;return l=="UTC"||l=="Etc/UTC"?s=new Date(+e+e.getTimezoneOffset()*6e4):l==hf?s=e:(s=new Date(e.toLocaleString("en-US",{timeZone:l})),s.setMilliseconds(e.getMilliseconds())),s}var os=e=>e%1==0,hn=[1,2,2.5,5],df=ql(10,-32,0,hn),ss=ql(10,0,32,hn),mf=ss.filter(os),Zt=df.concat(ss),wi=`
`,rs="{YYYY}",xo=wi+rs,fs="{M}/{D}",Yl=wi+fs,rn=Yl+"/{YY}",as="{aa}",gf="{h}:{mm}",bl=gf+as,Mo=wi+bl,Ao=":{ss}",re=null;function us(e){let l=e*1e3,s=l*60,n=s*60,o=n*24,a=o*30,u=o*365,m=(e==1?ql(10,0,3,hn).filter(os):ql(10,-3,0,hn)).concat([l,l*5,l*10,l*15,l*30,s,s*5,s*10,s*15,s*30,n,n*2,n*3,n*4,n*6,n*8,n*12,o,o*2,o*3,o*4,o*5,o*6,o*7,o*8,o*9,o*10,o*15,a,a*2,a*3,a*4,a*6,u,u*2,u*5,u*10,u*25,u*50,u*100]),d=[[u,rs,re,re,re,re,re,re,1],[o*28,"{MMM}",xo,re,re,re,re,re,1],[o,fs,xo,re,re,re,re,re,1],[n,"{h}"+as,rn,re,Yl,re,re,re,1],[s,bl,rn,re,Yl,re,re,re,1],[l,Ao,rn+" "+bl,re,Yl+" "+bl,re,Mo,re,1],[e,Ao+".{fff}",rn+" "+bl,re,Yl+" "+bl,re,Mo,re,1]];function _(p){return(w,k,P,C,H,W)=>{let v=[],z=H>=u,T=H>=a&&H<u,j=p(P),L=ce(j*e,3),J=$n(j.getFullYear(),z?0:j.getMonth(),T||z?1:j.getDate()),U=ce(J*e,3);if(T||z){let Q=T?H/a:0,B=z?H/u:0,x=L==U?L:ce($n(J.getFullYear()+B,J.getMonth()+Q,1)*e,3),K=new Date(Ae(x/e)),F=K.getFullYear(),I=K.getMonth();for(let O=0;x<=C;O++){let ee=$n(F+B*O,I+Q*O,1),N=ee-p(ce(ee*e,3));x=ce((+ee+N)*e,3),x<=C&&v.push(x)}}else{let Q=H>=o?o:H,B=tt(P)-tt(L),x=U+B+mn(L-U,Q);v.push(x);let K=p(x),F=K.getHours()+K.getMinutes()/s+K.getSeconds()/n,I=H/n,O=w.axes[k]._space,ee=W/O;for(;x=ce(x+H,e==1?0:3),!(x>C);)if(I>1){let N=tt(ce(F+I,6))%24,te=p(x).getHours()-N;te>1&&(te=-1),x-=te*n,F=(F+I)%24;let fe=v[v.length-1];ce((x-fe)/H,3)*ee>=.7&&v.push(x)}else v.push(x)}return v}}return[m,d,_]}var[wf,Sf,_f]=us(1),[yf,vf,bf]=us(.001);ql(2,-53,53,[1]);function Eo(e,l){return e.map(s=>s.map((n,o)=>o==0||o==8||n==null?n:l(o==1||s[8]==0?n:s[1]+n)))}function Po(e,l){return(s,n,o,a,u)=>{let h=l.find(P=>u>=P[0])||l[l.length-1],m,d,_,p,w,k;return n.map(P=>{let C=e(P),H=C.getFullYear(),W=C.getMonth(),v=C.getDate(),z=C.getHours(),T=C.getMinutes(),j=C.getSeconds(),L=H!=m&&h[2]||W!=d&&h[3]||v!=_&&h[4]||z!=p&&h[5]||T!=w&&h[6]||j!=k&&h[7]||h[1];return m=H,d=W,_=v,p=z,w=T,k=j,L(C)})}}function kf(e,l){let s=gi(l);return(n,o,a,u,h)=>o.map(m=>s(e(m)))}function $n(e,l,s){return new Date(e,l,s)}function Do(e,l){return l(e)}var Tf="{YYYY}-{MM}-{DD} {h}:{mm}{aa}";function Lo(e,l){return(s,n,o,a)=>a==null?ui:l(e(n))}function xf(e,l){let s=e.series[l];return s.width?s.stroke(e,l):s.points.width?s.points.stroke(e,l):null}function Mf(e,l){return e.series[l].fill(e,l)}var Af={show:!0,live:!0,isolate:!1,mount:Ur,markers:{show:!0,width:2,stroke:xf,fill:Mf,dash:"solid"},idx:null,idxs:null,values:[]};function Ef(e,l){let s=e.cursor.points,n=at(),o=s.size(e,l);ge(n,Gl,o),ge(n,Il,o);let a=o/-2;ge(n,"marginLeft",a),ge(n,"marginTop",a);let u=s.width(e,l,o);return u&&ge(n,"borderWidth",u),n}function Pf(e,l){let s=e.series[l].points;return s._fill||s._stroke}function Df(e,l){let s=e.series[l].points;return s._stroke||s._fill}function Lf(e,l){return e.series[l].points.size}var Zn=[0,0];function Cf(e,l,s){return Zn[0]=l,Zn[1]=s,Zn}function fn(e,l,s,n=!0){return o=>{o.button==0&&(!n||o.target==l)&&s(o)}}function Qn(e,l,s,n=!0){return o=>{(!n||o.target==l)&&s(o)}}var Ff={show:!0,x:!0,y:!0,lock:!1,move:Cf,points:{one:!1,show:Ef,size:Lf,width:0,stroke:Df,fill:Pf},bind:{mousedown:fn,mouseup:fn,click:fn,dblclick:fn,mousemove:Qn,mouseleave:Qn,mouseenter:Qn},drag:{setScale:!0,x:!0,y:!1,dist:0,uni:null,click:(e,l)=>{l.stopPropagation(),l.stopImmediatePropagation()},_x:!1,_y:!1},focus:{dist:(e,l,s,n,o)=>n-o,prox:-1,bias:0},hover:{skip:[void 0],prox:null,bias:0},left:-10,top:-10,idx:null,dataIdx:null,idxs:null,event:null},cs={show:!0,stroke:"rgba(0,0,0,0.07)",width:2},Si=Te({},cs,{filter:Zo}),hs=Te({},Si,{size:10}),ps=Te({},cs,{show:!1}),_i='12px system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',ds="bold "+_i,ms=1.5,Co={show:!0,scale:"x",stroke:ai,space:50,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:ds,side:2,grid:Si,ticks:hs,border:ps,font:_i,lineGap:ms,rotate:0},Vf="Value",Rf="Time",Fo={show:!0,scale:"x",auto:!1,sorted:1,min:ue,max:-ue,idxs:[]};function zf(e,l,s,n,o){return l.map(a=>a==null?"":di(a))}function Nf(e,l,s,n,o,a,u){let h=[],m=Ht.get(o)||0;s=u?s:ce(mn(s,o),m);for(let d=s;d<=n;d=ce(d+o,m))h.push(Object.is(d,-0)?0:d);return h}function ii(e,l,s,n,o,a,u){let h=[],m=e.scales[e.axes[l].scale].log,d=m==10?Dt:jo,_=tt(d(s));o=Tl(m,_),m==10&&(o=Zt[wt(o,Zt)]);let p=s,w=o*m;m==10&&(w=Zt[wt(w,Zt)]);do h.push(p),p=p+o,m==10&&!Ht.has(p)&&(p=ce(p,Ht.get(o))),p>=w&&(o=p,w=o*m,m==10&&(w=Zt[wt(w,Zt)]));while(p<=n);return h}function Of(e,l,s,n,o,a,u){let m=e.scales[e.axes[l].scale].asinh,d=n>m?ii(e,l,Ue(m,s),n,o):[m],_=n>=0&&s<=0?[0]:[];return(s<-m?ii(e,l,Ue(m,-n),-s,o):[m]).reverse().map(w=>-w).concat(_,d)}var gs=/./,Hf=/[12357]/,Wf=/[125]/,Vo=/1/,oi=(e,l,s,n)=>e.map((o,a)=>l==4&&o==0||a%n==0&&s.test(o.toExponential()[o<0?1:0])?o:null);function Gf(e,l,s,n,o){let a=e.axes[s],u=a.scale,h=e.scales[u],m=e.valToPos,d=a._space,_=m(10,u),p=m(9,u)-_>=d?gs:m(7,u)-_>=d?Hf:m(5,u)-_>=d?Wf:Vo;if(p==Vo){let w=Ee(m(1,u)-_);if(w<d)return oi(l.slice().reverse(),h.distr,p,ut(d/w)).reverse()}return oi(l,h.distr,p,1)}function If(e,l,s,n,o){let a=e.axes[s],u=a.scale,h=a._space,m=e.valToPos,d=Ee(m(1,u)-m(2,u));return d<h?oi(l.slice().reverse(),3,gs,ut(h/d)).reverse():l}function Yf(e,l,s,n){return n==null?ui:l==null?"":di(l)}var Ro={show:!0,scale:"y",stroke:ai,space:30,gap:5,alignTo:1,size:50,labelGap:0,labelSize:30,labelFont:ds,side:3,grid:Si,ticks:hs,border:ps,font:_i,lineGap:ms,rotate:0};function Bf(e,l){let s=3+(e||1)*2;return ce(s*l,3)}function Uf(e,l){let{scale:s,idxs:n}=e.series[0],o=e._data[0],a=e.valToPos(o[n[0]],s,!0),u=e.valToPos(o[n[1]],s,!0),h=Ee(u-a),m=e.series[l],d=h/(m.points.space*oe);return n[1]-n[0]<=d}var zo={scale:null,auto:!0,sorted:0,min:ue,max:-ue},ws=(e,l,s,n,o)=>o,No={show:!0,auto:!0,sorted:0,gaps:ws,alpha:1,facets:[Te({},zo,{scale:"x"}),Te({},zo,{scale:"y"})]},Oo={scale:"y",auto:!0,sorted:0,show:!0,spanGaps:!1,gaps:ws,alpha:1,points:{show:Uf,filter:null},values:null,min:ue,max:-ue,idxs:[],path:null,clip:null};function qf(e,l,s,n,o){return s/10}var Ss={time:!0,auto:!0,distr:1,log:10,asinh:1,min:null,max:null,dir:1,ori:0},Kf=Te({},Ss,{time:!1,ori:1}),Ho={};function _s(e,l){let s=Ho[e];return s||(s={key:e,plots:[],sub(n){s.plots.push(n)},unsub(n){s.plots=s.plots.filter(o=>o!=n)},pub(n,o,a,u,h,m,d){for(let _=0;_<s.plots.length;_++)s.plots[_]!=o&&s.plots[_].pub(n,o,a,u,h,m,d)}},e!=null&&(Ho[e]=s)),s}var Al=1<<0,si=1<<1;function tl(e,l,s){let n=e.mode,o=e.series[l],a=n==2?e._data[l]:e._data,u=e.scales,h=e.bbox,m=a[0],d=n==2?a[1]:a[l],_=n==2?u[o.facets[0].scale]:u[e.series[0].scale],p=n==2?u[o.facets[1].scale]:u[o.scale],w=h.left,k=h.top,P=h.width,C=h.height,H=e.valToPosH,W=e.valToPosV;return _.ori==0?s(o,m,d,_,p,H,W,w,k,P,C,Sn,Pl,yn,vs,ks):s(o,m,d,_,p,W,H,k,w,C,P,_n,Dl,bi,bs,Ts)}function yi(e,l){let s=0,n=0,o=ne(e.bands,mi);for(let a=0;a<o.length;a++){let u=o[a];u.series[0]==l?s=u.dir:u.series[1]==l&&(u.dir==1?n|=1:n|=2)}return[s,n==1?-1:n==2?1:n==3?2:0]}function jf(e,l,s,n,o){let a=e.mode,u=e.series[l],h=a==2?u.facets[1].scale:u.scale,m=e.scales[h];return o==-1?m.min:o==1?m.max:m.distr==3?m.dir==1?m.min:m.max:0}function Lt(e,l,s,n,o,a){return tl(e,l,(u,h,m,d,_,p,w,k,P,C,H)=>{let W=u.pxRound,v=d.dir*(d.ori==0?1:-1),z=d.ori==0?Pl:Dl,T,j;v==1?(T=s,j=n):(T=n,j=s);let L=W(p(h[T],d,C,k)),J=W(w(m[T],_,H,P)),U=W(p(h[j],d,C,k)),Q=W(w(a==1?_.max:_.min,_,H,P)),B=new Path2D(o);return z(B,U,Q),z(B,L,Q),z(B,L,J),B})}function wn(e,l,s,n,o,a){let u=null;if(e.length>0){u=new Path2D;let h=l==0?yn:bi,m=s;for(let p=0;p<e.length;p++){let w=e[p];if(w[1]>w[0]){let k=w[0]-m;k>0&&h(u,m,n,k,n+a),m=w[1]}}let d=s+o-m,_=10;d>0&&h(u,m,n-_/2,d,n+a+_)}return u}function Jf(e,l,s){let n=e[e.length-1];n&&n[0]==l?n[1]=s:e.push([l,s])}function vi(e,l,s,n,o,a,u){let h=[],m=e.length;for(let d=o==1?s:n;d>=s&&d<=n;d+=o)if(l[d]===null){let p=d,w=d;if(o==1)for(;++d<=n&&l[d]===null;)w=d;else for(;--d>=s&&l[d]===null;)w=d;let k=a(e[p]),P=w==p?k:a(e[w]),C=p-o;k=u<=0&&C>=0&&C<m?a(e[C]):k;let W=w+o;P=u>=0&&W>=0&&W<m?a(e[W]):P,P>=k&&h.push([k,P])}return h}function Wo(e){return e==0?$o:e==1?Ae:l=>$t(l,e)}function ys(e){let l=e==0?Sn:_n,s=e==0?(o,a,u,h,m,d)=>{o.arcTo(a,u,h,m,d)}:(o,a,u,h,m,d)=>{o.arcTo(u,a,m,h,d)},n=e==0?(o,a,u,h,m)=>{o.rect(a,u,h,m)}:(o,a,u,h,m)=>{o.rect(u,a,m,h)};return(o,a,u,h,m,d=0,_=0)=>{d==0&&_==0?n(o,a,u,h,m):(d=St(d,h/2,m/2),_=St(_,h/2,m/2),l(o,a+d,u),s(o,a+h,u,a+h,u+m,d),s(o,a+h,u+m,a,u+m,_),s(o,a,u+m,a,u,_),s(o,a,u,a+h,u,d),o.closePath())}}var Sn=(e,l,s)=>{e.moveTo(l,s)},_n=(e,l,s)=>{e.moveTo(s,l)},Pl=(e,l,s)=>{e.lineTo(l,s)},Dl=(e,l,s)=>{e.lineTo(s,l)},yn=ys(0),bi=ys(1),vs=(e,l,s,n,o,a)=>{e.arc(l,s,n,o,a)},bs=(e,l,s,n,o,a)=>{e.arc(s,l,n,o,a)},ks=(e,l,s,n,o,a,u)=>{e.bezierCurveTo(l,s,n,o,a,u)},Ts=(e,l,s,n,o,a,u)=>{e.bezierCurveTo(s,l,o,n,u,a)};function xs(e){return(l,s,n,o,a)=>tl(l,s,(u,h,m,d,_,p,w,k,P,C,H)=>{let{pxRound:W,points:v}=u,z,T;d.ori==0?(z=Sn,T=vs):(z=_n,T=bs);let j=ce(v.width*oe,3),L=(v.size-v.width)/2*oe,J=ce(L*2,3),U=new Path2D,Q=new Path2D,{left:B,top:x,width:K,height:F}=l.bbox;yn(Q,B-J,x-J,K+J*2,F+J*2);let I=O=>{if(m[O]!=null){let ee=W(p(h[O],d,C,k)),N=W(w(m[O],_,H,P));z(U,ee+L,N),T(U,ee,N,L,0,an*2)}};if(a)a.forEach(I);else for(let O=n;O<=o;O++)I(O);return{stroke:j>0?U:null,fill:U,clip:Q,flags:Al|si}})}function Ms(e){return(l,s,n,o,a,u)=>{n!=o&&(a!=n&&u!=n&&e(l,s,n),a!=o&&u!=o&&e(l,s,o),e(l,s,u))}}var $f=Ms(Pl),Zf=Ms(Dl);function As(e){let l=ne(e?.alignGaps,0);return(s,n,o,a)=>tl(s,n,(u,h,m,d,_,p,w,k,P,C,H)=>{[o,a]=pn(m,o,a);let W=u.pxRound,v=F=>W(p(F,d,C,k)),z=F=>W(w(F,_,H,P)),T,j;d.ori==0?(T=Pl,j=$f):(T=Dl,j=Zf);let L=d.dir*(d.ori==0?1:-1),J={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Al},U=J.stroke,Q=!1;if(a-o>=C*4){let F=V=>s.posToVal(V,d.key,!0),I=null,O=null,ee,N,qe,we=v(h[L==1?o:a]),te=v(h[o]),fe=v(h[a]),$=F(L==1?te+1:fe-1);for(let V=L==1?o:a;V>=o&&V<=a;V+=L){let xe=h[V],Se=(L==1?xe<$:xe>$)?we:v(xe),se=m[V];Se==we?se!=null?(N=se,I==null?(T(U,Se,z(N)),ee=I=O=N):N<I?I=N:N>O&&(O=N)):se===null&&(Q=!0):(I!=null&&j(U,we,z(I),z(O),z(ee),z(N)),se!=null?(N=se,T(U,Se,z(N)),I=O=ee=N):(I=O=null,se===null&&(Q=!0)),we=Se,$=F(we+L))}I!=null&&I!=O&&qe!=we&&j(U,we,z(I),z(O),z(ee),z(N))}else for(let F=L==1?o:a;F>=o&&F<=a;F+=L){let I=m[F];I===null?Q=!0:I!=null&&T(U,v(h[F]),z(I))}let[x,K]=yi(s,n);if(u.fill!=null||x!=0){let F=J.fill=new Path2D(U),I=u.fillTo(s,n,u.min,u.max,x),O=z(I),ee=v(h[o]),N=v(h[a]);L==-1&&([N,ee]=[ee,N]),T(F,N,O),T(F,ee,O)}if(!u.spanGaps){let F=[];Q&&F.push(...vi(h,m,o,a,L,v,l)),J.gaps=F=u.gaps(s,n,o,a,F),J.clip=wn(F,d.ori,k,P,C,H)}return K!=0&&(J.band=K==2?[Lt(s,n,o,a,U,-1),Lt(s,n,o,a,U,1)]:Lt(s,n,o,a,U,K)),J})}function Qf(e){let l=ne(e.align,1),s=ne(e.ascDesc,!1),n=ne(e.alignGaps,0),o=ne(e.extend,!1);return(a,u,h,m)=>tl(a,u,(d,_,p,w,k,P,C,H,W,v,z)=>{[h,m]=pn(p,h,m);let T=d.pxRound,{left:j,width:L}=a.bbox,J=te=>T(P(te,w,v,H)),U=te=>T(C(te,k,z,W)),Q=w.ori==0?Pl:Dl,B={stroke:new Path2D,fill:null,clip:null,band:null,gaps:null,flags:Al},x=B.stroke,K=w.dir*(w.ori==0?1:-1),F=U(p[K==1?h:m]),I=J(_[K==1?h:m]),O=I,ee=I;o&&l==-1&&(ee=j,Q(x,ee,F)),Q(x,I,F);for(let te=K==1?h:m;te>=h&&te<=m;te+=K){let fe=p[te];if(fe==null)continue;let $=J(_[te]),V=U(fe);l==1?Q(x,$,F):Q(x,O,V),Q(x,$,V),F=V,O=$}let N=O;o&&l==1&&(N=j+L,Q(x,N,F));let[qe,we]=yi(a,u);if(d.fill!=null||qe!=0){let te=B.fill=new Path2D(x),fe=d.fillTo(a,u,d.min,d.max,qe),$=U(fe);Q(te,N,$),Q(te,ee,$)}if(!d.spanGaps){let te=[];te.push(...vi(_,p,h,m,K,J,n));let fe=d.width*oe/2,$=s||l==1?fe:-fe,V=s||l==-1?-fe:fe;te.forEach(xe=>{xe[0]+=$,xe[1]+=V}),B.gaps=te=d.gaps(a,u,h,m,te),B.clip=wn(te,w.ori,H,W,v,z)}return we!=0&&(B.band=we==2?[Lt(a,u,h,m,x,-1),Lt(a,u,h,m,x,1)]:Lt(a,u,h,m,x,we)),B})}function Go(e,l,s,n,o,a,u=ue){if(e.length>1){let h=null;for(let m=0,d=1/0;m<e.length;m++)if(l[m]!==void 0){if(h!=null){let _=Ee(e[m]-e[h]);_<d&&(d=_,u=Ee(s(e[m],n,o,a)-s(e[h],n,o,a)))}h=m}}return u}function Xf(e){e=e||Ul;let l=ne(e.size,[.6,ue,1]),s=e.align||0,n=e.gap||0,o=e.radius;o=o==null?[0,0]:typeof o=="number"?[o,0]:o;let a=X(o),u=1-l[0],h=ne(l[1],ue),m=ne(l[2],1),d=ne(e.disp,Ul),_=ne(e.each,k=>{}),{fill:p,stroke:w}=d;return(k,P,C,H)=>tl(k,P,(W,v,z,T,j,L,J,U,Q,B,x)=>{let K=W.pxRound,F=s,I=n*oe,O=h*oe,ee=m*oe,N,qe;T.ori==0?[N,qe]=a(k,P):[qe,N]=a(k,P);let we=T.dir*(T.ori==0?1:-1),te=T.ori==0?yn:bi,fe=T.ori==0?_:(E,he,Me,ol,It,yt,Yt)=>{_(E,he,Me,It,ol,Yt,yt)},$=ne(k.bands,mi).find(E=>E.series[0]==P),V=$!=null?$.dir:0,xe=W.fillTo(k,P,W.min,W.max,V),We=K(J(xe,j,x,Q)),Se,se,ct,Je=B,ye=K(W.width*oe),_t=!1,At=null,nt=null,Ct=null,ll=null;p!=null&&(ye==0||w!=null)&&(_t=!0,At=p.values(k,P,C,H),nt=new Map,new Set(At).forEach(E=>{E!=null&&nt.set(E,new Path2D)}),ye>0&&(Ct=w.values(k,P,C,H),ll=new Map,new Set(Ct).forEach(E=>{E!=null&&ll.set(E,new Path2D)})));let{x0:nl,size:Ll}=d;if(nl!=null&&Ll!=null){F=1,v=nl.values(k,P,C,H),nl.unit==2&&(v=v.map(Me=>k.posToVal(U+Me*B,T.key,!0)));let E=Ll.values(k,P,C,H);Ll.unit==2?se=E[0]*B:se=L(E[0],T,B,U)-L(0,T,B,U),Je=Go(v,z,L,T,B,U,Je),ct=Je-se+I}else Je=Go(v,z,L,T,B,U,Je),ct=Je*u+I,se=Je-ct;ct<1&&(ct=0),ye>=se/2&&(ye=0),ct<5&&(K=$o);let jl=ct>0,Wt=Je-ct-(jl?ye:0);se=K(ni(Wt,ee,O)),Se=(F==0?se/2:F==we?0:se)-F*we*((F==0?I/2:0)+(jl?ye/2:0));let Ge={stroke:null,fill:null,clip:null,band:null,gaps:null,flags:0},il=_t?null:new Path2D,Et=null;if($!=null)Et=k.data[$.series[1]];else{let{y0:E,y1:he}=d;E!=null&&he!=null&&(z=he.values(k,P,C,H),Et=E.values(k,P,C,H))}let Gt=N*se,q=qe*se;for(let E=we==1?C:H;E>=C&&E<=H;E+=we){let he=z[E];if(he==null)continue;if(Et!=null){let Ke=Et[E]??0;if(he-Ke==0)continue;We=J(Ke,j,x,Q)}let Me=T.distr!=2||d!=null?v[E]:E,ol=L(Me,T,B,U),It=J(ne(he,xe),j,x,Q),yt=K(ol-Se),Yt=K(Ue(It,We)),$e=K(St(It,We)),it=Yt-$e;if(he!=null){let Ke=he<0?q:Gt,ht=he<0?Gt:q;_t?(ye>0&&Ct[E]!=null&&te(ll.get(Ct[E]),yt,$e+tt(ye/2),se,Ue(0,it-ye),Ke,ht),At[E]!=null&&te(nt.get(At[E]),yt,$e+tt(ye/2),se,Ue(0,it-ye),Ke,ht)):te(il,yt,$e+tt(ye/2),se,Ue(0,it-ye),Ke,ht),fe(k,P,E,yt-ye/2,$e,se+ye,it)}}return ye>0?Ge.stroke=_t?ll:il:_t||(Ge._fill=W.width==0?W._fill:W._stroke??W._fill,Ge.width=0),Ge.fill=_t?nt:il,Ge})}function ea(e,l){let s=ne(l?.alignGaps,0);return(n,o,a,u)=>tl(n,o,(h,m,d,_,p,w,k,P,C,H,W)=>{[a,u]=pn(d,a,u);let v=h.pxRound,z=N=>v(w(N,_,H,P)),T=N=>v(k(N,p,W,C)),j,L,J;_.ori==0?(j=Sn,J=Pl,L=ks):(j=_n,J=Dl,L=Ts);let U=_.dir*(_.ori==0?1:-1),Q=z(m[U==1?a:u]),B=Q,x=[],K=[];for(let N=U==1?a:u;N>=a&&N<=u;N+=U)if(d[N]!=null){let we=m[N],te=z(we);x.push(B=te),K.push(T(d[N]))}let F={stroke:e(x,K,j,J,L,v),fill:null,clip:null,band:null,gaps:null,flags:Al},I=F.stroke,[O,ee]=yi(n,o);if(h.fill!=null||O!=0){let N=F.fill=new Path2D(I),qe=h.fillTo(n,o,h.min,h.max,O),we=T(qe);J(N,B,we),J(N,Q,we)}if(!h.spanGaps){let N=[];N.push(...vi(m,d,a,u,U,z,s)),F.gaps=N=h.gaps(n,o,a,u,N),F.clip=wn(N,_.ori,P,C,H,W)}return ee!=0&&(F.band=ee==2?[Lt(n,o,a,u,I,-1),Lt(n,o,a,u,I,1)]:Lt(n,o,a,u,I,ee)),F})}function ta(e){return ea(la,e)}function la(e,l,s,n,o,a){let u=e.length;if(u<2)return null;let h=new Path2D;if(s(h,e[0],l[0]),u==2)n(h,e[1],l[1]);else{let m=Array(u),d=Array(u-1),_=Array(u-1),p=Array(u-1);for(let w=0;w<u-1;w++)_[w]=l[w+1]-l[w],p[w]=e[w+1]-e[w],d[w]=_[w]/p[w];m[0]=d[0];for(let w=1;w<u-1;w++)d[w]===0||d[w-1]===0||d[w-1]>0!=d[w]>0?m[w]=0:(m[w]=3*(p[w-1]+p[w])/((2*p[w]+p[w-1])/d[w-1]+(p[w]+2*p[w-1])/d[w]),isFinite(m[w])||(m[w]=0));m[u-1]=d[u-2];for(let w=0;w<u-1;w++)o(h,e[w]+p[w]/3,l[w]+m[w]*p[w]/3,e[w+1]-p[w]/3,l[w+1]-m[w+1]*p[w]/3,e[w+1],l[w+1])}return h}var ri=new Set;function Io(){for(let e of ri)e.syncRect(!0)}El&&(Xt(Rr,kl,Io),Xt(zr,kl,Io,!0),Xt(un,kl,()=>{Oe.pxRatio=oe}));var na=As(),ia=xs();function Yo(e,l,s,n){return(n?[e[0],e[1]].concat(e.slice(2)):[e[0]].concat(e.slice(1))).map((a,u)=>fi(a,u,l,s))}function oa(e,l){return e.map((s,n)=>n==0?{}:Te({},l,s))}function fi(e,l,s,n){return Te({},l==0?s:n,e)}function Es(e,l,s){return l==null?xl:[l,s]}var sa=Es;function ra(e,l,s){return l==null?xl:cn(l,s,pi,!0)}function Ps(e,l,s,n){return l==null?xl:dn(l,s,e.scales[n].log,!1)}var fa=Ps;function Ds(e,l,s,n){return l==null?xl:hi(l,s,e.scales[n].log,!1)}var aa=Ds;function ua(e,l,s,n,o){let a=Ue(vo(e),vo(l)),u=l-e,h=wt(o/n*u,s);do{let m=s[h],d=n*m/u;if(d>=o&&a+(m<5?Ht.get(m):0)<=17)return[m,d]}while(++h<s.length);return[0,0]}function Bo(e){let l,s;return e=e.replace(/(\d+)px/,(n,o)=>(l=Ae((s=+o)*oe))+"px"),[e,l,s]}function ca(e){e.show&&[e.font,e.labelFont].forEach(l=>{let s=ce(l[2]*oe,1);l[0]=l[0].replace(/[0-9.]+px/,s+"px"),l[1]=s})}function Oe(e,l,s){let n={mode:ne(e.mode,1)},o=n.mode;function a(t,i,r,f){let c=i.valToPct(t);return f+r*(i.dir==-1?1-c:c)}function u(t,i,r,f){let c=i.valToPct(t);return f+r*(i.dir==-1?c:1-c)}function h(t,i,r,f){return i.ori==0?a(t,i,r,f):u(t,i,r,f)}n.valToPosH=a,n.valToPosV=u;let m=!1;n.status=0;let d=n.root=at(wr);if(e.id!=null&&(d.id=e.id),et(d,e.class),e.title){let t=at(yr,d);t.textContent=e.title}let _=gt("canvas"),p=n.ctx=_.getContext("2d"),w=at(vr,d);Xt("click",w,t=>{t.target===P&&(pe!=gl||_e!=wl)&&Ne.click(n,t)},!0);let k=n.under=at(br,w);w.appendChild(_);let P=n.over=at(kr,w);e=Ml(e);let C=+ne(e.pxAlign,1),H=Wo(C);(e.plugins||[]).forEach(t=>{t.opts&&(e=t.opts(n,e)||e)});let W=e.ms||.001,v=n.series=o==1?Yo(e.series||[],Fo,Oo,!1):oa(e.series||[null],No),z=n.axes=Yo(e.axes||[],Co,Ro,!0),T=n.scales={},j=n.bands=e.bands||[];j.forEach(t=>{t.fill=X(t.fill||null),t.dir=ne(t.dir,-1)});let L=o==2?v[1].facets[0].scale:v[0].scale,J={axes:js,series:Ys},U=(e.drawOrder||["axes","series"]).map(t=>J[t]);function Q(t){let i=t.distr==3?r=>Dt(r>0?r:t.clamp(n,r,t.min,t.max,t.key)):t.distr==4?r=>Jn(r,t.asinh):t.distr==100?r=>t.fwd(r):r=>r;return r=>{let f=i(r),{_min:c,_max:g}=t,S=g-c;return(f-c)/S}}function B(t){let i=T[t];if(i==null){let r=(e.scales||Ul)[t]||Ul;if(r.from!=null){B(r.from);let f=Te({},T[r.from],r,{key:t});f.valToPct=Q(f),T[t]=f}else{i=T[t]=Te({},t==L?Ss:Kf,r),i.key=t;let f=i.time,c=i.range,g=Ot(c);if((t!=L||o==2&&!f)&&(g&&(c[0]==null||c[1]==null)&&(c={min:c[0]==null?So:{mode:1,hard:c[0],soft:c[0]},max:c[1]==null?So:{mode:1,hard:c[1],soft:c[1]}},g=!1),!g&&gn(c))){let S=c;c=(y,b,M)=>b==null?xl:cn(b,M,S)}i.range=X(c||(f?sa:t==L?i.distr==3?fa:i.distr==4?aa:Es:i.distr==3?Ps:i.distr==4?Ds:ra)),i.auto=X(g?!1:i.auto),i.clamp=X(i.clamp||qf),i._min=i._max=null,i.valToPct=Q(i)}}}B("x"),B("y"),o==1&&v.forEach(t=>{B(t.scale)}),z.forEach(t=>{B(t.scale)});for(let t in e.scales)B(t);let x=T[L],K=x.distr,F,I;x.ori==0?(et(d,Sr),F=a,I=u):(et(d,_r),F=u,I=a);let O={};for(let t in T){let i=T[t];(i.min!=null||i.max!=null)&&(O[t]={min:i.min,max:i.max},i.min=i.max=null)}let ee=e.tzDate||(t=>new Date(Ae(t/W))),N=e.fmtDate||gi,qe=W==1?_f(ee):bf(ee),we=Po(ee,Eo(W==1?Sf:vf,N)),te=Lo(ee,Do(Tf,N)),fe=[],$=n.legend=Te({},Af,e.legend),V=n.cursor=Te({},Ff,{drag:{y:o==2}},e.cursor),xe=$.show,We=V.show,Se=$.markers;$.idxs=fe,Se.width=X(Se.width),Se.dash=X(Se.dash),Se.stroke=X(Se.stroke),Se.fill=X(Se.fill);let se,ct,Je,ye=[],_t=[],At,nt=!1,Ct={};if($.live){let t=v[1]?v[1].values:null;nt=t!=null,At=nt?t(n,1,0):{_:0};for(let i in At)Ct[i]=ui}if(xe)if(se=gt("table",Pr,d),Je=gt("tbody",null,se),$.mount(n,se),nt){ct=gt("thead",null,se,Je);let t=gt("tr",null,ct);gt("th",null,t);for(var ll in At)gt("th",io,t).textContent=ll}else et(se,Lr),$.live&&et(se,Dr);let nl={show:!0},Ll={show:!1};function jl(t,i){if(i==0&&(nt||!$.live||o==2))return xl;let r=[],f=gt("tr",Cr,Je,Je.childNodes[i]);et(f,t.class),t.show||et(f,Qt);let c=gt("th",null,f);if(Se.show){let y=at(Fr,c);if(i>0){let b=Se.width(n,i);b&&(y.style.border=b+"px "+Se.dash(n,i)+" "+Se.stroke(n,i)),y.style.background=Se.fill(n,i)}}let g=at(io,c);t.label instanceof HTMLElement?g.appendChild(t.label):g.textContent=t.label,i>0&&(Se.show||(g.style.color=t.width>0?Se.stroke(n,i):Se.fill(n,i)),Ge("click",c,y=>{if(V._lock)return;Ut(y);let b=v.indexOf(t);if((y.ctrlKey||y.metaKey)!=$.isolate){let M=v.some((A,D)=>D>0&&D!=b&&A.show);v.forEach((A,D)=>{D>0&&bt(D,M?D==b?nl:Ll:nl,!0,ke.setSeries)})}else bt(b,{show:!t.show},!0,ke.setSeries)},!1),rl&&Ge(fo,c,y=>{V._lock||(Ut(y),bt(v.indexOf(t),_l,!0,ke.setSeries))},!1));for(var S in At){let y=gt("td",Vr,f);y.textContent="--",r.push(y)}return[f,r]}let Wt=new Map;function Ge(t,i,r,f=!0){let c=Wt.get(i)||{},g=V.bind[t](n,i,r,f);g&&(Xt(t,i,c[t]=g),Wt.set(i,c))}function il(t,i,r){let f=Wt.get(i)||{};for(let c in f)(t==null||c==t)&&(li(c,i,f[c]),delete f[c]);t==null&&Wt.delete(i)}let Et=0,Gt=0,q=0,E=0,he=0,Me=0,ol=he,It=Me,yt=q,Yt=E,$e=0,it=0,Ke=0,ht=0;n.bbox={};let kn=!1,Jl=!1,sl=!1,Bt=!1,$l=!1,ot=!1;function Tn(t,i,r){(r||t!=n.width||i!=n.height)&&xi(t,i),hl(!1),sl=!0,Jl=!0,pl()}function xi(t,i){n.width=Et=q=t,n.height=Gt=E=i,he=Me=0,zs(),Ns();let r=n.bbox;$e=r.left=$t(he*oe,.5),it=r.top=$t(Me*oe,.5),Ke=r.width=$t(q*oe,.5),ht=r.height=$t(E*oe,.5)}let Fs=3;function Vs(){let t=!1,i=0;for(;!t;){i++;let r=qs(i),f=Ks(i);t=i==Fs||r&&f,t||(xi(n.width,n.height),Jl=!0)}}function Rs({width:t,height:i}){Tn(t,i)}n.setSize=Rs;function zs(){let t=!1,i=!1,r=!1,f=!1;z.forEach((c,g)=>{if(c.show&&c._show){let{side:S,_size:y}=c,b=S%2,M=c.label!=null?c.labelSize:0,A=y+M;A>0&&(b?(q-=A,S==3?(he+=A,f=!0):r=!0):(E-=A,S==0?(Me+=A,t=!0):i=!0))}}),qt[0]=t,qt[1]=r,qt[2]=i,qt[3]=f,q-=Ft[1]+Ft[3],he+=Ft[3],E-=Ft[2]+Ft[0],Me+=Ft[0]}function Ns(){let t=he+q,i=Me+E,r=he,f=Me;function c(g,S){switch(g){case 1:return t+=S,t-S;case 2:return i+=S,i-S;case 3:return r-=S,r+S;case 0:return f-=S,f+S}}z.forEach((g,S)=>{if(g.show&&g._show){let y=g.side;g._pos=c(y,g._size),g.label!=null&&(g._lpos=c(y,g.labelSize))}})}if(V.dataIdx==null){let t=V.hover,i=t.skip=new Set(t.skip??[]);i.add(void 0);let r=t.prox=X(t.prox),f=t.bias??(t.bias=0);V.dataIdx=(c,g,S,y)=>{if(g==0)return S;let b=S,M=r(c,g,S,y)??ue,A=M>=0&&M<ue,D=x.ori==0?q:E,Y=V.left,ie=l[0],le=l[g];if(i.has(le[S])){b=null;let Z=null,G=null,R;if(f==0||f==-1)for(R=S;Z==null&&R-- >0;)i.has(le[R])||(Z=R);if(f==0||f==1)for(R=S;G==null&&R++<le.length;)i.has(le[R])||(G=R);if(Z!=null||G!=null)if(A){let me=Z==null?-1/0:F(ie[Z],x,D,0),ve=G==null?1/0:F(ie[G],x,D,0),Re=Y-me,ae=ve-Y;Re<=ae?Re<=M&&(b=Z):ae<=M&&(b=G)}else b=G==null?Z:Z==null?G:S-Z<=G-S?Z:G}else A&&Ee(Y-F(ie[S],x,D,0))>M&&(b=null);return b}}let Ut=t=>{V.event=t};V.idxs=fe,V._lock=!1;let He=V.points;He.show=X(He.show),He.size=X(He.size),He.stroke=X(He.stroke),He.width=X(He.width),He.fill=X(He.fill);let vt=n.focus=Te({},e.focus||{alpha:.3},V.focus),rl=vt.prox>=0,fl=rl&&He.one,st=[],al=[],ul=[];function Mi(t,i){let r=He.show(n,i);if(r instanceof HTMLElement)return et(r,Er),et(r,t.class),Mt(r,-10,-10,q,E),P.insertBefore(r,st[i]),r}function Ai(t,i){if(o==1||i>0){let r=o==1&&T[t.scale].time,f=t.value;t.value=r?To(f)?Lo(ee,Do(f,N)):f||te:f||Yf,t.label=t.label||(r?Rf:Vf)}if(fl||i>0){t.width=t.width==null?1:t.width,t.paths=t.paths||na||qr,t.fillTo=X(t.fillTo||jf),t.pxAlign=+ne(t.pxAlign,C),t.pxRound=Wo(t.pxAlign),t.stroke=X(t.stroke||null),t.fill=X(t.fill||null),t._stroke=t._fill=t._paths=t._focus=null;let r=Bf(Ue(1,t.width),1),f=t.points=Te({},{size:r,width:Ue(1,r*.2),stroke:t.stroke,space:r*2,paths:ia,_stroke:null,_fill:null},t.points);f.show=X(f.show),f.filter=X(f.filter),f.fill=X(f.fill),f.stroke=X(f.stroke),f.paths=X(f.paths),f.pxAlign=t.pxAlign}if(xe){let r=jl(t,i);ye.splice(i,0,r[0]),_t.splice(i,0,r[1]),$.values.push(null)}if(We){fe.splice(i,0,null);let r=null;fl?i==0&&(r=Mi(t,i)):i>0&&(r=Mi(t,i)),st.splice(i,0,r),al.splice(i,0,0),ul.splice(i,0,0)}Ve("addSeries",i)}function Os(t,i){i=i??v.length,t=o==1?fi(t,i,Fo,Oo):fi(t,i,{},No),v.splice(i,0,t),Ai(v[i],i)}n.addSeries=Os;function Hs(t){if(v.splice(t,1),xe){$.values.splice(t,1),_t.splice(t,1);let i=ye.splice(t,1)[0];il(null,i.firstChild),i.remove()}We&&(fe.splice(t,1),st.splice(t,1)[0].remove(),al.splice(t,1),ul.splice(t,1)),Ve("delSeries",t)}n.delSeries=Hs;let qt=[!1,!1,!1,!1];function Ws(t,i){if(t._show=t.show,t.show){let r=t.side%2,f=T[t.scale];f==null&&(t.scale=r?v[1].scale:L,f=T[t.scale]);let c=f.time;t.size=X(t.size),t.space=X(t.space),t.rotate=X(t.rotate),Ot(t.incrs)&&t.incrs.forEach(S=>{!Ht.has(S)&&Ht.set(S,Xo(S))}),t.incrs=X(t.incrs||(f.distr==2?mf:c?W==1?wf:yf:Zt)),t.splits=X(t.splits||(c&&f.distr==1?qe:f.distr==3?ii:f.distr==4?Of:Nf)),t.stroke=X(t.stroke),t.grid.stroke=X(t.grid.stroke),t.ticks.stroke=X(t.ticks.stroke),t.border.stroke=X(t.border.stroke);let g=t.values;t.values=Ot(g)&&!Ot(g[0])?X(g):c?Ot(g)?Po(ee,Eo(g,N)):To(g)?kf(ee,g):g||we:g||zf,t.filter=X(t.filter||(f.distr>=3&&f.log==10?Gf:f.distr==3&&f.log==2?If:Zo)),t.font=Bo(t.font),t.labelFont=Bo(t.labelFont),t._size=t.size(n,null,i,0),t._space=t._rotate=t._incrs=t._found=t._splits=t._values=null,t._size>0&&(qt[i]=!0,t._el=at(Tr,w))}}function Cl(t,i,r,f){let[c,g,S,y]=r,b=i%2,M=0;return b==0&&(y||g)&&(M=i==0&&!c||i==2&&!S?Ae(Co.size/3):0),b==1&&(c||S)&&(M=i==1&&!g||i==3&&!y?Ae(Ro.size/2):0),M}let Ei=n.padding=(e.padding||[Cl,Cl,Cl,Cl]).map(t=>X(ne(t,Cl))),Ft=n._padding=Ei.map((t,i)=>t(n,i,qt,0)),ze,De=null,Le=null,Zl=o==1?v[0].idxs:null,pt=null,Fl=!1;function Pi(t,i){if(l=t??[],n.data=n._data=l,o==2){ze=0;for(let r=1;r<v.length;r++)ze+=l[r][0].length}else{l.length==0&&(n.data=n._data=l=[[]]),pt=l[0],ze=pt.length;let r=l;if(K==2){r=l.slice();let f=r[0]=Array(ze);for(let c=0;c<ze;c++)f[c]=c}n._data=l=r}if(hl(!0),Ve("setData"),K==2&&(sl=!0),i!==!1){let r=x;r.auto(n,Fl)?xn():Rt(L,r.min,r.max),Bt=Bt||V.left>=0,ot=!0,pl()}}n.setData=Pi;function xn(){Fl=!0;let t,i;o==1&&(ze>0?(De=Zl[0]=0,Le=Zl[1]=ze-1,t=l[0][De],i=l[0][Le],K==2?(t=De,i=Le):t==i&&(K==3?[t,i]=dn(t,t,x.log,!1):K==4?[t,i]=hi(t,t,x.log,!1):x.time?i=t+Ae(86400/W):[t,i]=cn(t,i,pi,!0))):(De=Zl[0]=t=null,Le=Zl[1]=i=null)),Rt(L,t,i)}let Ql,cl,Mn,An,En,Pn,Dn,Ln,Cn,je;function Di(t,i,r,f,c,g){t??(t=so),r??(r=mi),f??(f="butt"),c??(c=so),g??(g="round"),t!=Ql&&(p.strokeStyle=Ql=t),c!=cl&&(p.fillStyle=cl=c),i!=Mn&&(p.lineWidth=Mn=i),g!=En&&(p.lineJoin=En=g),f!=Pn&&(p.lineCap=Pn=f),r!=An&&p.setLineDash(An=r)}function Li(t,i,r,f){i!=cl&&(p.fillStyle=cl=i),t!=Dn&&(p.font=Dn=t),r!=Ln&&(p.textAlign=Ln=r),f!=Cn&&(p.textBaseline=Cn=f)}function Fn(t,i,r,f,c=0){if(f.length>0&&t.auto(n,Fl)&&(i==null||i.min==null)){let g=ne(De,0),S=ne(Le,f.length-1),y=r.min==null?Wr(f,g,S,c,t.distr==3):[r.min,r.max];t.min=St(t.min,r.min=y[0]),t.max=Ue(t.max,r.max=y[1])}}let Ci={min:null,max:null};function Gs(){for(let f in T){let c=T[f];O[f]==null&&(c.min==null||O[L]!=null&&c.auto(n,Fl))&&(O[f]=Ci)}for(let f in T){let c=T[f];O[f]==null&&c.from!=null&&O[c.from]!=null&&(O[f]=Ci)}O[L]!=null&&hl(!0);let t={};for(let f in O){let c=O[f];if(c!=null){let g=t[f]=Ml(T[f],Jr);if(c.min!=null)Te(g,c);else if(f!=L||o==2)if(ze==0&&g.from==null){let S=g.range(n,null,null,f);g.min=S[0],g.max=S[1]}else g.min=ue,g.max=-ue}}if(ze>0){v.forEach((f,c)=>{if(o==1){let g=f.scale,S=O[g];if(S==null)return;let y=t[g];if(c==0){let b=y.range(n,y.min,y.max,g);y.min=b[0],y.max=b[1],De=wt(y.min,l[0]),Le=wt(y.max,l[0]),Le-De>1&&(l[0][De]<y.min&&De++,l[0][Le]>y.max&&Le--),f.min=pt[De],f.max=pt[Le]}else f.show&&f.auto&&Fn(y,S,f,l[c],f.sorted);f.idxs[0]=De,f.idxs[1]=Le}else if(c>0&&f.show&&f.auto){let[g,S]=f.facets,y=g.scale,b=S.scale,[M,A]=l[c],D=t[y],Y=t[b];D!=null&&Fn(D,O[y],g,M,g.sorted),Y!=null&&Fn(Y,O[b],S,A,S.sorted),f.min=S.min,f.max=S.max}});for(let f in t){let c=t[f],g=O[f];if(c.from==null&&(g==null||g.min==null)){let S=c.range(n,c.min==ue?null:c.min,c.max==-ue?null:c.max,f);c.min=S[0],c.max=S[1]}}}for(let f in t){let c=t[f];if(c.from!=null){let g=t[c.from];if(g.min==null)c.min=c.max=null;else{let S=c.range(n,g.min,g.max,f);c.min=S[0],c.max=S[1]}}}let i={},r=!1;for(let f in t){let c=t[f],g=T[f];if(g.min!=c.min||g.max!=c.max){g.min=c.min,g.max=c.max;let S=g.distr;g._min=S==3?Dt(g.min):S==4?Jn(g.min,g.asinh):S==100?g.fwd(g.min):g.min,g._max=S==3?Dt(g.max):S==4?Jn(g.max,g.asinh):S==100?g.fwd(g.max):g.max,i[f]=r=!0}}if(r){v.forEach((f,c)=>{o==2?c>0&&i.y&&(f._paths=null):i[f.scale]&&(f._paths=null)});for(let f in i)sl=!0,Ve("setScale",f);We&&V.left>=0&&(Bt=ot=!0)}for(let f in O)O[f]=null}function Is(t){let i=ni(De-1,0,ze-1),r=ni(Le+1,0,ze-1);for(;t[i]==null&&i>0;)i--;for(;t[r]==null&&r<ze-1;)r++;return[i,r]}function Ys(){if(ze>0){let t=v.some(i=>i._focus)&&je!=vt.alpha;t&&(p.globalAlpha=je=vt.alpha),v.forEach((i,r)=>{if(r>0&&i.show&&(Fi(r,!1),Fi(r,!0),i._paths==null)){let f=je;je!=i.alpha&&(p.globalAlpha=je=i.alpha);let c=o==2?[0,l[r][0].length-1]:Is(l[r]);i._paths=i.paths(n,r,c[0],c[1]),je!=f&&(p.globalAlpha=je=f)}}),v.forEach((i,r)=>{if(r>0&&i.show){let f=je;je!=i.alpha&&(p.globalAlpha=je=i.alpha),i._paths!=null&&Vi(r,!1);{let c=i._paths!=null?i._paths.gaps:null,g=i.points.show(n,r,De,Le,c),S=i.points.filter(n,r,g,c);(g||S)&&(i.points._paths=i.points.paths(n,r,De,Le,S),Vi(r,!0))}je!=f&&(p.globalAlpha=je=f),Ve("drawSeries",r)}}),t&&(p.globalAlpha=je=1)}}function Fi(t,i){let r=i?v[t].points:v[t];r._stroke=r.stroke(n,t),r._fill=r.fill(n,t)}function Vi(t,i){let r=i?v[t].points:v[t],{stroke:f,fill:c,clip:g,flags:S,_stroke:y=r._stroke,_fill:b=r._fill,_width:M=r.width}=r._paths;M=ce(M*oe,3);let A=null,D=M%2/2;i&&b==null&&(b=M>0?"#fff":y);let Y=r.pxAlign==1&&D>0;if(Y&&p.translate(D,D),!i){let ie=$e-M/2,le=it-M/2,Z=Ke+M,G=ht+M;A=new Path2D,A.rect(ie,le,Z,G)}i?Vn(y,M,r.dash,r.cap,b,f,c,S,g):Bs(t,y,M,r.dash,r.cap,b,f,c,S,A,g),Y&&p.translate(-D,-D)}function Bs(t,i,r,f,c,g,S,y,b,M,A){let D=!1;b!=0&&j.forEach((Y,ie)=>{if(Y.series[0]==t){let le=v[Y.series[1]],Z=l[Y.series[1]],G=(le._paths||Ul).band;Ot(G)&&(G=Y.dir==1?G[0]:G[1]);let R,me=null;le.show&&G&&Ir(Z,De,Le)?(me=Y.fill(n,ie)||g,R=le._paths.clip):G=null,Vn(i,r,f,c,me,S,y,b,M,A,R,G),D=!0}}),D||Vn(i,r,f,c,g,S,y,b,M,A)}let Ri=Al|si;function Vn(t,i,r,f,c,g,S,y,b,M,A,D){Di(t,i,r,f,c),(b||M||D)&&(p.save(),b&&p.clip(b),M&&p.clip(M)),D?(y&Ri)==Ri?(p.clip(D),A&&p.clip(A),en(c,S),Xl(t,g,i)):y&si?(en(c,S),p.clip(D),Xl(t,g,i)):y&Al&&(p.save(),p.clip(D),A&&p.clip(A),en(c,S),p.restore(),Xl(t,g,i)):(en(c,S),Xl(t,g,i)),(b||M||D)&&p.restore()}function Xl(t,i,r){r>0&&(i instanceof Map?i.forEach((f,c)=>{p.strokeStyle=Ql=c,p.stroke(f)}):i!=null&&t&&p.stroke(i))}function en(t,i){i instanceof Map?i.forEach((r,f)=>{p.fillStyle=cl=f,p.fill(r)}):i!=null&&t&&p.fill(i)}function Us(t,i,r,f){let c=z[t],g;if(f<=0)g=[0,0];else{let S=c._space=c.space(n,t,i,r,f),y=c._incrs=c.incrs(n,t,i,r,f,S);g=ua(i,r,y,f,S)}return c._found=g}function Rn(t,i,r,f,c,g,S,y,b,M){let A=S%2/2;C==1&&p.translate(A,A),Di(y,S,b,M,y),p.beginPath();let D,Y,ie,le,Z=c+(f==0||f==3?-g:g);r==0?(Y=c,le=Z):(D=c,ie=Z);for(let G=0;G<t.length;G++)i[G]!=null&&(r==0?D=ie=t[G]:Y=le=t[G],p.moveTo(D,Y),p.lineTo(ie,le));p.stroke(),C==1&&p.translate(-A,-A)}function qs(t){let i=!0;return z.forEach((r,f)=>{if(!r.show)return;let c=T[r.scale];if(c.min==null){r._show&&(i=!1,r._show=!1,hl(!1));return}else r._show||(i=!1,r._show=!0,hl(!1));let g=r.side,S=g%2,{min:y,max:b}=c,[M,A]=Us(f,y,b,S==0?q:E);if(A==0)return;let D=c.distr==2,Y=r._splits=r.splits(n,f,y,b,M,A,D),ie=c.distr==2?Y.map(R=>pt[R]):Y,le=c.distr==2?pt[Y[1]]-pt[Y[0]]:M,Z=r._values=r.values(n,r.filter(n,ie,f,A,le),f,A,le);r._rotate=g==2?r.rotate(n,Z,f,A):0;let G=r._size;r._size=ut(r.size(n,Z,f,t)),G!=null&&r._size!=G&&(i=!1)}),i}function Ks(t){let i=!0;return Ei.forEach((r,f)=>{let c=r(n,f,qt,t);c!=Ft[f]&&(i=!1),Ft[f]=c}),i}function js(){for(let t=0;t<z.length;t++){let i=z[t];if(!i.show||!i._show)continue;let r=i.side,f=r%2,c,g,S=i.stroke(n,t),y=r==0||r==3?-1:1,[b,M]=i._found;if(i.label!=null){let Ye=i.labelGap*y,Xe=Ae((i._lpos+Ye)*oe);Li(i.labelFont[0],S,"center",r==2?Hl:oo),p.save(),f==1?(c=g=0,p.translate(Xe,Ae(it+ht/2)),p.rotate((r==3?-an:an)/2)):(c=Ae($e+Ke/2),g=Xe);let Jt=Jo(i.label)?i.label(n,t,b,M):i.label;p.fillText(Jt,c,g),p.restore()}if(M==0)continue;let A=T[i.scale],D=f==0?Ke:ht,Y=f==0?$e:it,ie=i._splits,le=A.distr==2?ie.map(Ye=>pt[Ye]):ie,Z=A.distr==2?pt[ie[1]]-pt[ie[0]]:b,G=i.ticks,R=i.border,me=G.show?G.size:0,ve=Ae(me*oe),Re=Ae((i.alignTo==2?i._size-me-i.gap:i.gap)*oe),ae=i._rotate*-an/180,be=H(i._pos*oe),Ze=(ve+Re)*y,Ie=be+Ze;g=f==0?Ie:0,c=f==1?Ie:0;let rt=i.font[0],dt=i.align==1?vl:i.align==2?qn:ae>0?vl:ae<0?qn:f==0?"center":r==3?qn:vl,Tt=ae||f==1?"middle":r==2?Hl:oo;Li(rt,S,dt,Tt);let Qe=i.font[1]*i.lineGap,ft=ie.map(Ye=>H(h(Ye,A,D,Y))),mt=i._values;for(let Ye=0;Ye<mt.length;Ye++){let Xe=mt[Ye];if(Xe!=null){f==0?c=ft[Ye]:g=ft[Ye],Xe=""+Xe;let Jt=Xe.indexOf(`
`)==-1?[Xe]:Xe.split(/\n/gm);for(let Be=0;Be<Jt.length;Be++){let eo=Jt[Be];ae?(p.save(),p.translate(c,g+Be*Qe),p.rotate(ae),p.fillText(eo,0,0),p.restore()):p.fillText(eo,c,g+Be*Qe)}}}G.show&&Rn(ft,G.filter(n,le,t,M,Z),f,r,be,ve,ce(G.width*oe,3),G.stroke(n,t),G.dash,G.cap);let xt=i.grid;xt.show&&Rn(ft,xt.filter(n,le,t,M,Z),f,f==0?2:1,f==0?it:$e,f==0?ht:Ke,ce(xt.width*oe,3),xt.stroke(n,t),xt.dash,xt.cap),R.show&&Rn([be],[1],f==0?1:0,f==0?1:2,f==1?it:$e,f==1?ht:Ke,ce(R.width*oe,3),R.stroke(n,t),R.dash,R.cap)}Ve("drawAxes")}function hl(t){v.forEach((i,r)=>{r>0&&(i._paths=null,t&&(o==1?(i.min=null,i.max=null):i.facets.forEach(f=>{f.min=null,f.max=null})))})}let tn=!1,zn=!1,Vl=[];function Js(){zn=!1;for(let t=0;t<Vl.length;t++)Ve(...Vl[t]);Vl.length=0}function pl(){tn||(lf(zi),tn=!0)}function $s(t,i=!1){tn=!0,zn=i,t(n),zi(),i&&Vl.length>0&&queueMicrotask(Js)}n.batch=$s;function zi(){if(kn&&(Gs(),kn=!1),sl&&(Vs(),sl=!1),Jl){if(ge(k,vl,he),ge(k,Hl,Me),ge(k,Gl,q),ge(k,Il,E),ge(P,vl,he),ge(P,Hl,Me),ge(P,Gl,q),ge(P,Il,E),ge(w,Gl,Et),ge(w,Il,Gt),_.width=Ae(Et*oe),_.height=Ae(Gt*oe),z.forEach(({_el:t,_show:i,_size:r,_pos:f,side:c})=>{if(t!=null)if(i){let g=c===3||c===0?r:0,S=c%2==1;ge(t,S?"left":"top",f-g),ge(t,S?"width":"height",r),ge(t,S?"top":"left",S?Me:he),ge(t,S?"height":"width",S?E:q),ti(t,Qt)}else et(t,Qt)}),Ql=cl=Mn=En=Pn=Dn=Ln=Cn=An=null,je=1,Nl(!0),he!=ol||Me!=It||q!=yt||E!=Yt){hl(!1);let t=q/yt,i=E/Yt;if(We&&!Bt&&V.left>=0){V.left*=t,V.top*=i,dl&&Mt(dl,Ae(V.left),0,q,E),ml&&Mt(ml,0,Ae(V.top),q,E);for(let r=0;r<st.length;r++){let f=st[r];f!=null&&(al[r]*=t,ul[r]*=i,Mt(f,ut(al[r]),ut(ul[r]),q,E))}}if(de.show&&!$l&&de.left>=0&&de.width>0){de.left*=t,de.width*=t,de.top*=i,de.height*=i;for(let r in In)ge(Sl,r,de[r])}ol=he,It=Me,yt=q,Yt=E}Ve("setSize"),Jl=!1}Et>0&&Gt>0&&(p.clearRect(0,0,_.width,_.height),Ve("drawClear"),U.forEach(t=>t()),Ve("draw")),de.show&&$l&&(ln(de),$l=!1),We&&Bt&&(jt(null,!0,!1),Bt=!1),$.show&&$.live&&ot&&(Wn(),ot=!1),m||(m=!0,n.status=1,Ve("ready")),Fl=!1,tn=!1}n.redraw=(t,i)=>{sl=i||!1,t!==!1?Rt(L,x.min,x.max):pl()};function Nn(t,i){let r=T[t];if(r.from==null){if(ze==0){let f=r.range(n,i.min,i.max,t);i.min=f[0],i.max=f[1]}if(i.min>i.max){let f=i.min;i.min=i.max,i.max=f}if(ze>1&&i.min!=null&&i.max!=null&&i.max-i.min<1e-16)return;t==L&&r.distr==2&&ze>0&&(i.min=wt(i.min,l[0]),i.max=wt(i.max,l[0]),i.min==i.max&&i.max++),O[t]=i,kn=!0,pl()}}n.setScale=Nn;let On,Hn,dl,ml,Ni,Oi,gl,wl,Hi,Wi,pe,_e,Vt=!1,Ne=V.drag,Ce=Ne.x,Fe=Ne.y;We&&(V.x&&(On=at(Mr,P)),V.y&&(Hn=at(Ar,P)),x.ori==0?(dl=On,ml=Hn):(dl=Hn,ml=On),pe=V.left,_e=V.top);let de=n.select=Te({show:!0,over:!0,left:0,width:0,top:0,height:0},e.select),Sl=de.show?at(xr,de.over?P:k):null;function ln(t,i){if(de.show){for(let r in t)de[r]=t[r],r in In&&ge(Sl,r,t[r]);i!==!1&&Ve("setSelect")}}n.setSelect=ln;function Zs(t){if(v[t].show)xe&&ti(ye[t],Qt);else if(xe&&et(ye[t],Qt),We){let r=fl?st[0]:st[t];r!=null&&Mt(r,-10,-10,q,E)}}function Rt(t,i,r){Nn(t,{min:i,max:r})}function bt(t,i,r,f){i.focus!=null&&lr(t),i.show!=null&&v.forEach((c,g)=>{g>0&&(t==g||t==null)&&(c.show=i.show,Zs(g),o==2?(Rt(c.facets[0].scale,null,null),Rt(c.facets[1].scale,null,null)):Rt(c.scale,null,null),pl())}),r!==!1&&Ve("setSeries",t,i),f&&Ol("setSeries",n,t,i)}n.setSeries=bt;function Qs(t,i){Te(j[t],i)}function Xs(t,i){t.fill=X(t.fill||null),t.dir=ne(t.dir,-1),i=i??j.length,j.splice(i,0,t)}function er(t){t==null?j.length=0:j.splice(t,1)}n.addBand=Xs,n.setBand=Qs,n.delBand=er;function tr(t,i){v[t].alpha=i,We&&st[t]!=null&&(st[t].style.opacity=i),xe&&ye[t]&&(ye[t].style.opacity=i)}let Pt,zt,Kt,_l={focus:!0};function lr(t){if(t!=Kt){let i=t==null,r=vt.alpha!=1;v.forEach((f,c)=>{if(o==1||c>0){let g=i||c==0||c==t;f._focus=i?null:g,r&&tr(c,g?1:vt.alpha)}}),Kt=t,r&&pl()}}xe&&rl&&Ge(ao,se,t=>{V._lock||(Ut(t),Kt!=null&&bt(null,_l,!0,ke.setSeries))});function kt(t,i,r){let f=T[i];r&&(t=t/oe-(f.ori==1?Me:he));let c=q;f.ori==1&&(c=E,t=c-t),f.dir==-1&&(t=c-t);let g=f._min,S=f._max,y=t/c,b=g+(S-g)*y,M=f.distr;return M==3?Tl(10,b):M==4?Br(b,f.asinh):M==100?f.bwd(b):b}function nr(t,i){let r=kt(t,L,i);return wt(r,l[0],De,Le)}n.valToIdx=t=>wt(t,l[0]),n.posToIdx=nr,n.posToVal=kt,n.valToPos=(t,i,r)=>T[i].ori==0?a(t,T[i],r?Ke:q,r?$e:0):u(t,T[i],r?ht:E,r?it:0),n.setCursor=(t,i,r)=>{pe=t.left,_e=t.top,jt(null,i,r)};function Gi(t,i){ge(Sl,vl,de.left=t),ge(Sl,Gl,de.width=i)}function Ii(t,i){ge(Sl,Hl,de.top=t),ge(Sl,Il,de.height=i)}let Rl=x.ori==0?Gi:Ii,zl=x.ori==1?Gi:Ii;function ir(){if(xe&&$.live)for(let t=o==2?1:0;t<v.length;t++){if(t==0&&nt)continue;let i=$.values[t],r=0;for(let f in i)_t[t][r++].firstChild.nodeValue=i[f]}}function Wn(t,i){if(t!=null&&(t.idxs?t.idxs.forEach((r,f)=>{fe[f]=r}):jr(t.idx)||fe.fill(t.idx),$.idx=fe[0]),xe&&$.live){for(let r=0;r<v.length;r++)(r>0||o==1&&!nt)&&or(r,fe[r]);ir()}ot=!1,i!==!1&&Ve("setLegend")}n.setLegend=Wn;function or(t,i){let r=v[t],f=t==0&&K==2?pt:l[t],c;nt?c=r.values(n,t,i)??Ct:(c=r.value(n,i==null?null:f[i],t,i),c=c==null?Ct:{_:c}),$.values[t]=c}function jt(t,i,r){Hi=pe,Wi=_e,[pe,_e]=V.move(n,pe,_e),V.left=pe,V.top=_e,We&&(dl&&Mt(dl,Ae(pe),0,q,E),ml&&Mt(ml,0,Ae(_e),q,E));let f,c=De>Le;Pt=ue,zt=null;let g=x.ori==0?q:E,S=x.ori==1?q:E;if(pe<0||ze==0||c){f=V.idx=null;for(let y=0;y<v.length;y++){let b=st[y];b!=null&&Mt(b,-10,-10,q,E)}rl&&bt(null,_l,!0,t==null&&ke.setSeries),$.live&&(fe.fill(f),ot=!0)}else{let y,b,M;o==1&&(y=x.ori==0?pe:_e,b=kt(y,L),f=V.idx=wt(b,l[0],De,Le),M=F(l[0][f],x,g,0));let A=-10,D=-10,Y=0,ie=0,le=!0,Z="",G="";for(let R=o==2?1:0;R<v.length;R++){let me=v[R],ve=fe[R],Re=ve==null?null:o==1?l[R][ve]:l[R][1][ve],ae=V.dataIdx(n,R,f,b),be=ae==null?null:o==1?l[R][ae]:l[R][1][ae];if(ot=ot||be!=Re||ae!=ve,fe[R]=ae,R>0&&me.show){let Ze=ae==null?-10:ae==f?M:F(o==1?l[0][ae]:l[R][0][ae],x,g,0),Ie=be==null?-10:I(be,o==1?T[me.scale]:T[me.facets[1].scale],S,0);if(rl&&be!=null){let rt=x.ori==1?pe:_e,dt=Ee(vt.dist(n,R,ae,Ie,rt));if(dt<Pt){let Tt=vt.bias;if(Tt!=0){let Qe=kt(rt,me.scale),ft=be>=0?1:-1,mt=Qe>=0?1:-1;mt==ft&&(mt==1?Tt==1?be>=Qe:be<=Qe:Tt==1?be<=Qe:be>=Qe)&&(Pt=dt,zt=R)}else Pt=dt,zt=R}}if(ot||fl){let rt,dt;x.ori==0?(rt=Ze,dt=Ie):(rt=Ie,dt=Ze);let Tt,Qe,ft,mt,xt,Ye,Xe=!0,Jt=He.bbox;if(Jt!=null){Xe=!1;let Be=Jt(n,R);ft=Be.left,mt=Be.top,Tt=Be.width,Qe=Be.height}else ft=rt,mt=dt,Tt=Qe=He.size(n,R);if(Ye=He.fill(n,R),xt=He.stroke(n,R),fl)R==zt&&Pt<=vt.prox&&(A=ft,D=mt,Y=Tt,ie=Qe,le=Xe,Z=Ye,G=xt);else{let Be=st[R];Be!=null&&(al[R]=ft,ul[R]=mt,wo(Be,Tt,Qe,Xe),mo(Be,Ye,xt),Mt(Be,ut(ft),ut(mt),q,E))}}}}if(fl){let R=vt.prox,me=Kt==null?Pt<=R:Pt>R||zt!=Kt;if(ot||me){let ve=st[0];ve!=null&&(al[0]=A,ul[0]=D,wo(ve,Y,ie,le),mo(ve,Z,G),Mt(ve,ut(A),ut(D),q,E))}}}if(de.show&&Vt)if(t!=null){let[y,b]=ke.scales,[M,A]=ke.match,[D,Y]=t.cursor.sync.scales,ie=t.cursor.drag;if(Ce=ie._x,Fe=ie._y,Ce||Fe){let{left:le,top:Z,width:G,height:R}=t.select,me=t.scales[D].ori,ve=t.posToVal,Re,ae,be,Ze,Ie,rt=y!=null&&M(y,D),dt=b!=null&&A(b,Y);rt&&Ce?(me==0?(Re=le,ae=G):(Re=Z,ae=R),be=T[y],Ze=F(ve(Re,D),be,g,0),Ie=F(ve(Re+ae,D),be,g,0),Rl(St(Ze,Ie),Ee(Ie-Ze))):Rl(0,g),dt&&Fe?(me==1?(Re=le,ae=G):(Re=Z,ae=R),be=T[b],Ze=I(ve(Re,Y),be,S,0),Ie=I(ve(Re+ae,Y),be,S,0),zl(St(Ze,Ie),Ee(Ie-Ze))):zl(0,S)}else Yn()}else{let y=Ee(Hi-Ni),b=Ee(Wi-Oi);if(x.ori==1){let Y=y;y=b,b=Y}Ce=Ne.x&&y>=Ne.dist,Fe=Ne.y&&b>=Ne.dist;let M=Ne.uni;M!=null?Ce&&Fe&&(Ce=y>=M,Fe=b>=M,!Ce&&!Fe&&(b>y?Fe=!0:Ce=!0)):Ne.x&&Ne.y&&(Ce||Fe)&&(Ce=Fe=!0);let A,D;Ce&&(x.ori==0?(A=gl,D=pe):(A=wl,D=_e),Rl(St(A,D),Ee(D-A)),Fe||zl(0,S)),Fe&&(x.ori==1?(A=gl,D=pe):(A=wl,D=_e),zl(St(A,D),Ee(D-A)),Ce||Rl(0,g)),!Ce&&!Fe&&(Rl(0,0),zl(0,0))}if(Ne._x=Ce,Ne._y=Fe,t==null){if(r){if(Xi!=null){let[y,b]=ke.scales;ke.values[0]=y!=null?kt(x.ori==0?pe:_e,y):null,ke.values[1]=b!=null?kt(x.ori==1?pe:_e,b):null}Ol(Kn,n,pe,_e,q,E,f)}if(rl){let y=r&&ke.setSeries,b=vt.prox;Kt==null?Pt<=b&&bt(zt,_l,!0,y):Pt>b?bt(null,_l,!0,y):zt!=Kt&&bt(zt,_l,!0,y)}}ot&&($.idx=f,Wn()),i!==!1&&Ve("setCursor")}let Nt=null;Object.defineProperty(n,"rect",{get(){return Nt==null&&Nl(!1),Nt}});function Nl(t=!1){t?Nt=null:(Nt=P.getBoundingClientRect(),Ve("syncRect",Nt))}function Yi(t,i,r,f,c,g,S){V._lock||Vt&&t!=null&&t.movementX==0&&t.movementY==0||(Gn(t,i,r,f,c,g,S,!1,t!=null),t!=null?jt(null,!0,!0):jt(i,!0,!1))}function Gn(t,i,r,f,c,g,S,y,b){if(Nt==null&&Nl(!1),Ut(t),t!=null)r=t.clientX-Nt.left,f=t.clientY-Nt.top;else{if(r<0||f<0){pe=-10,_e=-10;return}let[M,A]=ke.scales,D=i.cursor.sync,[Y,ie]=D.values,[le,Z]=D.scales,[G,R]=ke.match,me=i.axes[0].side%2==1,ve=x.ori==0?q:E,Re=x.ori==1?q:E,ae=me?g:c,be=me?c:g,Ze=me?f:r,Ie=me?r:f;if(le!=null?r=G(M,le)?h(Y,T[M],ve,0):-10:r=ve*(Ze/ae),Z!=null?f=R(A,Z)?h(ie,T[A],Re,0):-10:f=Re*(Ie/be),x.ori==1){let rt=r;r=f,f=rt}}b&&(i==null||i.cursor.event.type==Kn)&&((r<=1||r>=q-1)&&(r=$t(r,q)),(f<=1||f>=E-1)&&(f=$t(f,E))),y?(Ni=r,Oi=f,[gl,wl]=V.move(n,r,f)):(pe=r,_e=f)}let In={width:0,height:0,left:0,top:0};function Yn(){ln(In,!1)}let Bi,Ui,qi,Ki;function ji(t,i,r,f,c,g,S){Vt=!0,Ce=Fe=Ne._x=Ne._y=!1,Gn(t,i,r,f,c,g,S,!0,!1),t!=null&&(Ge(jn,Xn,Ji,!1),Ol(ro,n,gl,wl,q,E,null));let{left:y,top:b,width:M,height:A}=de;Bi=y,Ui=b,qi=M,Ki=A}function Ji(t,i,r,f,c,g,S){Vt=Ne._x=Ne._y=!1,Gn(t,i,r,f,c,g,S,!1,!0);let{left:y,top:b,width:M,height:A}=de,D=M>0||A>0,Y=Bi!=y||Ui!=b||qi!=M||Ki!=A;if(D&&Y&&ln(de),Ne.setScale&&D&&Y){let ie=y,le=M,Z=b,G=A;if(x.ori==1&&(ie=b,le=A,Z=y,G=M),Ce&&Rt(L,kt(ie,L),kt(ie+le,L)),Fe)for(let R in T){let me=T[R];R!=L&&me.from==null&&me.min!=ue&&Rt(R,kt(Z+G,R),kt(Z,R))}Yn()}else V.lock&&(V._lock=!V._lock,jt(i,!0,t!=null));t!=null&&(il(jn,Xn),Ol(jn,n,pe,_e,q,E,null))}function sr(t,i,r,f,c,g,S){if(V._lock)return;Ut(t);let y=Vt;if(Vt){let b=!0,M=!0,A=10,D,Y;x.ori==0?(D=Ce,Y=Fe):(D=Fe,Y=Ce),D&&Y&&(b=pe<=A||pe>=q-A,M=_e<=A||_e>=E-A),D&&b&&(pe=pe<gl?0:q),Y&&M&&(_e=_e<wl?0:E),jt(null,!0,!0),Vt=!1}pe=-10,_e=-10,fe.fill(null),jt(null,!0,!0),y&&(Vt=y)}function $i(t,i,r,f,c,g,S){V._lock||(Ut(t),xn(),Yn(),t!=null&&Ol(uo,n,pe,_e,q,E,null))}function Zi(){z.forEach(ca),Tn(n.width,n.height,!0)}Xt(un,kl,Zi);let yl={};yl.mousedown=ji,yl.mousemove=Yi,yl.mouseup=Ji,yl.dblclick=$i,yl.setSeries=(t,i,r,f)=>{let c=ke.match[2];r=c(n,i,r),r!=-1&&bt(r,f,!0,!1)},We&&(Ge(ro,P,ji),Ge(Kn,P,Yi),Ge(fo,P,t=>{Ut(t),Nl(!1)}),Ge(ao,P,sr),Ge(uo,P,$i),ri.add(n),n.syncRect=Nl);let nn=n.hooks=e.hooks||{};function Ve(t,i,r){zn?Vl.push([t,i,r]):t in nn&&nn[t].forEach(f=>{f.call(null,n,i,r)})}(e.plugins||[]).forEach(t=>{for(let i in t.hooks)nn[i]=(nn[i]||[]).concat(t.hooks[i])});let Qi=(t,i,r)=>r,ke=Te({key:null,setSeries:!1,filters:{pub:bo,sub:bo},scales:[L,v[1]?v[1].scale:null],match:[ko,ko,Qi],values:[null,null]},V.sync);ke.match.length==2&&ke.match.push(Qi),V.sync=ke;let Xi=ke.key,Bn=_s(Xi);function Ol(t,i,r,f,c,g,S){ke.filters.pub(t,i,r,f,c,g,S)&&Bn.pub(t,i,r,f,c,g,S)}Bn.sub(n);function rr(t,i,r,f,c,g,S){ke.filters.sub(t,i,r,f,c,g,S)&&yl[t](null,i,r,f,c,g,S)}n.pub=rr;function fr(){Bn.unsub(n),ri.delete(n),Wt.clear(),li(un,kl,Zi),d.remove(),se?.remove(),Ve("destroy")}n.destroy=fr;function Un(){Ve("init",e,l),Pi(l||e.data,!1),O[L]?Nn(L,O[L]):xn(),$l=de.show&&(de.width>0||de.height>0),Bt=ot=!0,Tn(e.width,e.height)}return v.forEach(Ai),z.forEach(Ws),s?s instanceof HTMLElement?(s.appendChild(d),Un()):s(n,Un):Un(),n}Oe.assign=Te;Oe.fmtNum=di;Oe.rangeNum=cn;Oe.rangeLog=dn;Oe.rangeAsinh=hi;Oe.orient=tl;Oe.pxRatio=oe;Oe.join=tf;Oe.fmtDate=gi,Oe.tzDate=pf;Oe.sync=_s;{Oe.addGap=Jf,Oe.clipGaps=wn;let e=Oe.paths={points:xs};e.linear=As,e.stepped=Qf,e.bars=Xf,e.spline=ta}function ki(e,l,s,n){let o=e.series[l],a=e.data[0],u=e.data[l],h="x",m=o.scale,d=new Path2D,_=Math.abs((e.valToPos(a[0],h,!0)-e.valToPos(a[1],h,!0))/2);d.moveTo(Math.round(e.valToPos(a[0],h,!0)),Math.round(e.valToPos(u[0],m,!0)));for(let C=s;C<n;C++){let H=Math.round(e.valToPos(a[C],h,!0)),W=Math.round(e.valToPos(u[C],m,!0)),v=Math.round(e.valToPos(a[C+1],h,!0)),z=Math.round(e.valToPos(u[C+1],m,!0));d.lineTo(H-_,W),d.lineTo(v-_,W),C==n-1&&(d.lineTo(v-_,z),d.lineTo(v,z))}let p=new Path2D(d),w=Math.round(e.valToPos(e.scales[m].min,m,!0)),k=Math.round(e.valToPos(e.scales[h].min,h,!0)),P=Math.round(e.valToPos(e.scales[h].max,h,!0));return p.lineTo(P,w),p.lineTo(k,w),{stroke:d,fill:p}}function Kl(e,l){return e&&e.toFixed(l)}function ha(e,l){let s={width:e.clientWidth,height:600},n=null;return l=="Linear"?n=o=>o&&o:l=="Log10"?n=o=>o&&Math.pow(10,o):l=="Log2"&&(n=o=>o&&Math.pow(2,o)),{id:e.id+"-chart",width:s.width,height:s.height,labelSize:10,labelFont:"bold 8px Arial",ticks:{show:!1},points:{show:!1},font:"8px Arial",padding:[null,30,null,30],series:[{value:"{HH}:{mm}:{ss}"},{label:"P99",stroke:"rgb(155, 214, 206)",value:(o,a)=>Kl(n(a),3)+"ms",fill:"rgb(155, 214, 206, 0.5 )",paths:ki,scale:"ms"},{label:"P90",stroke:"rgb(79, 169, 184)",value:(o,a)=>Kl(n(a),3)+"ms",fill:"rgb(79, 169, 184, 0.5)",paths:ki,scale:"ms"},{label:"P50",stroke:"rgb(2, 88, 115)",value:(o,a)=>Kl(n(a),3)+"ms",fill:"rgb(2, 88, 115, 0.5)",paths:ki,scale:"ms"},{label:"count",stroke:"rgb(30, 30, 30)",value:(o,a)=>n(a)+"cps",scale:"calls"}],axes:[{values:[[1,"{HH}:{mm}:{ss}",null,null,null,null,null,null,1]]},{scale:"ms",grid:{show:!1},values:(o,a,u)=>a.map(h=>Kl(n(h),3)+"ms")},{side:1,values:(o,a,u)=>a.map(h=>Kl(n(h),1)+" calls"),scale:"calls",grid:{show:!1}}]}}var Ti=class{constructor(l,s,n){let o=ha(l,n);this.uplotChart=new Oe(o,s,l)}updateData(l,s){this.uplotChart.setData(l,s)}},vn="",Ls={mounted(){let e=this.el.parentElement.querySelector(".chart");vn=JSON.parse(e.dataset.scale);let l=JSON.parse(e.dataset.quantile);this.chart=new Ti(e,l,vn)},updated(){let e=this.el.parentElement.querySelector(".chart"),l=JSON.parse(e.dataset.scale);if(vn==l){let s=JSON.parse(e.dataset.quantile);this.chart.updateData(s,vn)}else this.mounted()}};var pa=document.querySelector("html").getAttribute("phx-socket")||"/live",da=document.querySelector("meta[name='csrf-token']").getAttribute("content"),ma={ChartData:Ls},Cs=new LiveView.LiveSocket(pa,Phoenix.Socket,{hooks:ma,params:{_csrf_token:da}});bn.default.config({barColors:{0:"#29d"},shadowColor:"rgba(0, 0, 0, .3)"});window.addEventListener("phx:page-loading-start",e=>bn.default.show());window.addEventListener("phx:page-loading-stop",e=>bn.default.hide());Cs.connect();window.liveSocket=Cs;})();
/*! Bundled license information:
topbar/topbar.min.js:
(**
* @license MIT
* topbar 3.0.0
* http://buunguyen.github.io/topbar
* Copyright (c) 2024 Buu Nguyen
*)
*/