s)break;m.push(f)}}else for(;l<=u;++l)for(d=r-1;d>=1;--d)if(f=l>0?d/a(-l):d*a(l),!(fs)break;m.push(f)}m.length*2{if(e??=10,n??=r===10?`s`:`,`,typeof n!=`function`&&(!(r%1)&&(n=iA(n)).precision==null&&(n.trim=!0),n=gA(n)),e===1/0)return n;let o=Math.max(1,r*e/t.ticks().length);return e=>{let t=e/a(Math.round(i(e)));return t*rn(TA(n(),{floor:e=>a(Math.floor(i(e))),ceil:e=>a(Math.ceil(i(e)))})),t}function FA(){let e=PA(Xk()).domain([1,10]);return e.copy=()=>Yk(e,FA()).base(e.base()),NO.apply(e,arguments),e}function IA(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function LA(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function RA(e){var t=1,n=e(IA(t),LA(t));return n.constant=function(n){return arguments.length?e(IA(t=+n),LA(t)):t},CA(n)}function zA(){var e=RA(Xk());return e.copy=function(){return Yk(e,zA()).constant(e.constant())},NO.apply(e,arguments)}function BA(e){return function(t){return t<0?-((-t)**+e):t**+e}}function VA(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function HA(e){return e<0?-e*e:e*e}function UA(e){var t=e(Wk,Wk),n=1;function r(){return n===1?e(Wk,Wk):n===.5?e(VA,HA):e(BA(n),BA(1/n))}return t.exponent=function(e){return arguments.length?(n=+e,r()):n},CA(t)}function WA(){var e=UA(Xk());return e.copy=function(){return Yk(e,WA()).exponent(e.exponent())},NO.apply(e,arguments),e}function GA(){return WA.apply(null,arguments).exponent(.5)}function KA(){var e=[.5],t=[0,1],n,r=1;function i(i){return i!=null&&i<=i?t[bO(e,i,0,r)]:n}return i.domain=function(n){return arguments.length?(e=Array.from(n),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(n){return arguments.length?(t=Array.from(n),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(n){var r=t.indexOf(n);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(n=e,i):n},i.copy=function(){return KA().domain(e).range(t).unknown(n)},NO.apply(i,arguments)}var qA=new Date,JA=new Date;function YA(e,t,n,r){function i(t){return e(t=arguments.length===0?new Date:new Date(+t)),t}return i.floor=t=>(e(t=new Date(+t)),t),i.ceil=n=>(e(n=new Date(n-1)),t(n,1),e(n),n),i.round=e=>{let t=i(e),n=i.ceil(e);return e-t(t(e=new Date(+e),n==null?1:Math.floor(n)),e),i.range=(n,r,a)=>{let o=[];if(n=i.ceil(n),a=a==null?1:Math.floor(a),!(n0))return o;let s;do o.push(s=new Date(+n)),t(n,a),e(n);while(sYA(t=>{if(t>=t)for(;e(t),!n(t);)t.setTime(t-1)},(e,r)=>{if(e>=e)if(r<0)for(;++r<=0;)for(;t(e,-1),!n(e););else for(;--r>=0;)for(;t(e,1),!n(e););}),n&&(i.count=(t,r)=>(qA.setTime(+t),JA.setTime(+r),e(qA),e(JA),Math.floor(n(qA,JA))),i.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?i.filter(r?t=>r(t)%e===0:t=>i.count(0,t)%e===0):i)),i}var XA=YA(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);XA.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?YA(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):XA),XA.range;var ZA=1e3,QA=ZA*60,$A=QA*60,ej=$A*24,tj=ej*7,nj=ej*30,rj=ej*365,ij=YA(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ZA)},(e,t)=>(t-e)/ZA,e=>e.getUTCSeconds());ij.range;var aj=YA(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZA)},(e,t)=>{e.setTime(+e+t*QA)},(e,t)=>(t-e)/QA,e=>e.getMinutes());aj.range;var oj=YA(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*QA)},(e,t)=>(t-e)/QA,e=>e.getUTCMinutes());oj.range;var sj=YA(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ZA-e.getMinutes()*QA)},(e,t)=>{e.setTime(+e+t*$A)},(e,t)=>(t-e)/$A,e=>e.getHours());sj.range;var cj=YA(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*$A)},(e,t)=>(t-e)/$A,e=>e.getUTCHours());cj.range;var lj=YA(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*QA)/ej,e=>e.getDate()-1);lj.range;var uj=YA(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ej,e=>e.getUTCDate()-1);uj.range;var dj=YA(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ej,e=>Math.floor(e/ej));dj.range;function fj(e){return YA(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(e,t)=>{e.setDate(e.getDate()+t*7)},(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*QA)/tj)}var pj=fj(0),mj=fj(1),hj=fj(2),gj=fj(3),_j=fj(4),vj=fj(5),yj=fj(6);pj.range,mj.range,hj.range,gj.range,_j.range,vj.range,yj.range;function bj(e){return YA(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t*7)},(e,t)=>(t-e)/tj)}var xj=bj(0),Sj=bj(1),Cj=bj(2),wj=bj(3),Tj=bj(4),Ej=bj(5),Dj=bj(6);xj.range,Sj.range,Cj.range,wj.range,Tj.range,Ej.range,Dj.range;var Oj=YA(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth());Oj.range;var kj=YA(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth());kj.range;var Aj=YA(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());Aj.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:YA(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)}),Aj.range;var jj=YA(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());jj.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:YA(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)}),jj.range;function Mj(e,t,n,r,i,a){let o=[[ij,1,ZA],[ij,5,5*ZA],[ij,15,15*ZA],[ij,30,30*ZA],[a,1,QA],[a,5,5*QA],[a,15,15*QA],[a,30,30*QA],[i,1,$A],[i,3,3*$A],[i,6,6*$A],[i,12,12*$A],[r,1,ej],[r,2,2*ej],[n,1,tj],[t,1,nj],[t,3,3*nj],[e,1,rj]];function s(e,t,n){let r=te).right(o,i);if(a===o.length)return e.every(MO(t/rj,n/rj,r));if(a===0)return XA.every(Math.max(MO(t,n,r),1));let[s,c]=o[i/o[a-1][2]53)return null;`w`in r||(r.w=1),`Z`in r?(a=Rj(zj(r.y,0,1)),o=a.getUTCDay(),a=o>4||o===0?Sj.ceil(a):Sj(a),a=uj.offset(a,(r.V-1)*7),r.y=a.getUTCFullYear(),r.m=a.getUTCMonth(),r.d=a.getUTCDate()+(r.w+6)%7):(a=Lj(zj(r.y,0,1)),o=a.getDay(),a=o>4||o===0?mj.ceil(a):mj(a),a=lj.offset(a,(r.V-1)*7),r.y=a.getFullYear(),r.m=a.getMonth(),r.d=a.getDate()+(r.w+6)%7)}else(`W`in r||`U`in r)&&(`w`in r||(r.w=`u`in r?r.u%7:+(`W`in r)),o=`Z`in r?Rj(zj(r.y,0,1)).getUTCDay():Lj(zj(r.y,0,1)).getDay(),r.m=0,r.d=`W`in r?(r.w+6)%7+r.W*7-(o+5)%7:r.w+r.U*7-(o+6)%7);return`Z`in r?(r.H+=r.Z/100|0,r.M+=r.Z%100,Rj(r)):Lj(r)}}function w(e,t,n,r){for(var i=0,a=t.length,o=n.length,s,c;i=o)return-1;if(s=t.charCodeAt(i++),s===37){if(s=t.charAt(i++),c=x[s in Vj?t.charAt(i++):s],!c||(r=c(e,n,r))<0)return-1}else if(s!=n.charCodeAt(r++))return-1}return r}function T(e,t,n){var r=l.exec(t.slice(n));return r?(e.p=u.get(r[0].toLowerCase()),n+r[0].length):-1}function E(e,t,n){var r=p.exec(t.slice(n));return r?(e.w=m.get(r[0].toLowerCase()),n+r[0].length):-1}function D(e,t,n){var r=d.exec(t.slice(n));return r?(e.w=f.get(r[0].toLowerCase()),n+r[0].length):-1}function O(e,t,n){var r=_.exec(t.slice(n));return r?(e.m=v.get(r[0].toLowerCase()),n+r[0].length):-1}function k(e,t,n){var r=h.exec(t.slice(n));return r?(e.m=g.get(r[0].toLowerCase()),n+r[0].length):-1}function ee(e,n,r){return w(e,t,n,r)}function te(e,t,r){return w(e,n,t,r)}function A(e,t,n){return w(e,r,t,n)}function ne(e){return o[e.getDay()]}function re(e){return a[e.getDay()]}function ie(e){return c[e.getMonth()]}function j(e){return s[e.getMonth()]}function M(e){return i[+(e.getHours()>=12)]}function N(e){return 1+~~(e.getMonth()/3)}function ae(e){return o[e.getUTCDay()]}function oe(e){return a[e.getUTCDay()]}function se(e){return c[e.getUTCMonth()]}function ce(e){return s[e.getUTCMonth()]}function P(e){return i[+(e.getUTCHours()>=12)]}function F(e){return 1+~~(e.getUTCMonth()/3)}return{format:function(e){var t=S(e+=``,y);return t.toString=function(){return e},t},parse:function(e){var t=C(e+=``,!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=S(e+=``,b);return t.toString=function(){return e},t},utcParse:function(e){var t=C(e+=``,!0);return t.toString=function(){return e},t}}}var Vj={"-":``,_:` `,0:`0`},Hj=/^\s*\d+/,Uj=/^%/,Wj=/[\\^$*+?|[\]().{}]/g;function Gj(e,t,n){var r=e<0?`-`:``,i=(r?-e:e)+``,a=i.length;return r+(a[e.toLowerCase(),t]))}function Yj(e,t,n){var r=Hj.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Xj(e,t,n){var r=Hj.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function Zj(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function Qj(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function $j(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function eM(e,t,n){var r=Hj.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function tM(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nM(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||`00`)),n+r[0].length):-1}function rM(e,t,n){var r=Hj.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function iM(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function aM(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function oM(e,t,n){var r=Hj.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function sM(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function cM(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function lM(e,t,n){var r=Hj.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function uM(e,t,n){var r=Hj.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dM(e,t,n){var r=Hj.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fM(e,t,n){var r=Uj.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pM(e,t,n){var r=Hj.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function mM(e,t,n){var r=Hj.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function hM(e,t){return Gj(e.getDate(),t,2)}function gM(e,t){return Gj(e.getHours(),t,2)}function _M(e,t){return Gj(e.getHours()%12||12,t,2)}function vM(e,t){return Gj(1+lj.count(Aj(e),e),t,3)}function yM(e,t){return Gj(e.getMilliseconds(),t,3)}function bM(e,t){return yM(e,t)+`000`}function xM(e,t){return Gj(e.getMonth()+1,t,2)}function SM(e,t){return Gj(e.getMinutes(),t,2)}function CM(e,t){return Gj(e.getSeconds(),t,2)}function wM(e){var t=e.getDay();return t===0?7:t}function TM(e,t){return Gj(pj.count(Aj(e)-1,e),t,2)}function EM(e){var t=e.getDay();return t>=4||t===0?_j(e):_j.ceil(e)}function DM(e,t){return e=EM(e),Gj(_j.count(Aj(e),e)+(Aj(e).getDay()===4),t,2)}function OM(e){return e.getDay()}function kM(e,t){return Gj(mj.count(Aj(e)-1,e),t,2)}function AM(e,t){return Gj(e.getFullYear()%100,t,2)}function jM(e,t){return e=EM(e),Gj(e.getFullYear()%100,t,2)}function MM(e,t){return Gj(e.getFullYear()%1e4,t,4)}function NM(e,t){var n=e.getDay();return e=n>=4||n===0?_j(e):_j.ceil(e),Gj(e.getFullYear()%1e4,t,4)}function PM(e){var t=e.getTimezoneOffset();return(t>0?`-`:(t*=-1,`+`))+Gj(t/60|0,`0`,2)+Gj(t%60,`0`,2)}function FM(e,t){return Gj(e.getUTCDate(),t,2)}function IM(e,t){return Gj(e.getUTCHours(),t,2)}function LM(e,t){return Gj(e.getUTCHours()%12||12,t,2)}function RM(e,t){return Gj(1+uj.count(jj(e),e),t,3)}function zM(e,t){return Gj(e.getUTCMilliseconds(),t,3)}function BM(e,t){return zM(e,t)+`000`}function VM(e,t){return Gj(e.getUTCMonth()+1,t,2)}function HM(e,t){return Gj(e.getUTCMinutes(),t,2)}function UM(e,t){return Gj(e.getUTCSeconds(),t,2)}function WM(e){var t=e.getUTCDay();return t===0?7:t}function GM(e,t){return Gj(xj.count(jj(e)-1,e),t,2)}function KM(e){var t=e.getUTCDay();return t>=4||t===0?Tj(e):Tj.ceil(e)}function qM(e,t){return e=KM(e),Gj(Tj.count(jj(e),e)+(jj(e).getUTCDay()===4),t,2)}function JM(e){return e.getUTCDay()}function YM(e,t){return Gj(Sj.count(jj(e)-1,e),t,2)}function XM(e,t){return Gj(e.getUTCFullYear()%100,t,2)}function ZM(e,t){return e=KM(e),Gj(e.getUTCFullYear()%100,t,2)}function QM(e,t){return Gj(e.getUTCFullYear()%1e4,t,4)}function $M(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Tj(e):Tj.ceil(e),Gj(e.getUTCFullYear()%1e4,t,4)}function eN(){return`+0000`}function tN(){return`%`}function nN(e){return+e}function rN(e){return Math.floor(e/1e3)}var iN,aN,oN;sN({dateTime:`%x, %X`,date:`%-m/%-d/%Y`,time:`%-I:%M:%S %p`,periods:[`AM`,`PM`],days:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`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 sN(e){return iN=Bj(e),aN=iN.format,iN.parse,oN=iN.utcFormat,iN.utcParse,iN}function cN(e){return new Date(e)}function lN(e){return e instanceof Date?+e:+new Date(+e)}function uN(e,t,n,r,i,a,o,s,c,l){var u=Zk(),d=u.invert,f=u.domain,p=l(`.%L`),m=l(`:%S`),h=l(`%I:%M`),g=l(`%I %p`),_=l(`%a %d`),v=l(`%b %d`),y=l(`%B`),b=l(`%Y`);function x(e){return(c(e){let r=t.get(e);if(r===void 0)return;let i=n.length;if(i===0)return;let a=d?i-1-r%i:r%i;return f+l*a},m=()=>{let e=n.length;d=ibN({index:t,domain:n,r0:r,r1:i,isRound:a,paddingInner:o,paddingOuter:s,align:c}),m(),p}function xN(...e){let t=bN(),[n,r]=e;return e.length>1?(t.domain(n),t.range(r)):n&&t.range(n),t}function SN(...e){let t=xN(...e).paddingInner(1),n=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=()=>{let e=n();return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=t.copy,e},t}function CN(...e){let t=zA(...e),n=t.ticks,{negativeScale:r,linearScale:i,positiveScale:a}=wN(t);return t.ticks=e=>{let o=n(e),s=t.constant(),c=0,l=0,u=0;o.forEach(e=>{e>-s&&e=s&&(u+=1)});let d=[];if(c>0&&d.push(...r.ticks(c)),l>0){let e=i.ticks(l);d.at(-1)===e[0]?d.push(...e.slice(1)):d.push(...e)}if(u>0){let e=a.ticks(u);d.at(-1)===e[0]?d.push(...e.slice(1)):d.push(...e)}return d},t.tickFormat=(e=10,n)=>{let o=t.constant(),[s,c]=t.domain(),l=c-s,u=r.domain(),d=u[1]-u[0],f=(l===0?0:d/l)*e,p=i.domain(),m=p[1]-p[0],h=(l===0?0:m/l)*e,g=a.domain(),_=g[1]-g[0],v=(l===0?0:_/l)*e,y=r.tickFormat(f,n),b=i.tickFormat(h,n),x=a.tickFormat(v,n);return e=>(e.valueOf()<=-o?y:e.valueOf()>=o?x:b)(e)},t.copy=()=>CN(t.domain(),t.range()).constant(t.constant()),t}function wN(e){let t=e.constant(),n=e.domain();return{negativeScale:FA([n[0],Math.min(n[1],-t)],e.range()),linearScale:wA([Math.max(n[0],-t),Math.min(n[1],t)],e.range()),positiveScale:FA([Math.max(n[0],t),n[1]],e.range())}}function TN(e,t,n){switch(e){case`log`:return FA(t,n);case`pow`:return WA(t,n);case`sqrt`:return GA(t,n);case`time`:return dN(t,n);case`utc`:return fN(t,n);case`symlog`:return CN(t,n);default:return wA(t,n)}}function EN(e){return`groups`in e&&Array.isArray(e.groups)&&e.groups.length>0}function DN(e,t){let n=new Set;for(let r=0;rpO(e)))}function AN(e){if(e.length<=ON)return e;let t=[],n=1,r=null;for(let i of e){let e=i.split(`
+`).length;e>n&&(n=e,r=i);let a=kN(i);if(t.lengtht[0].length){let e=t.findIndex(e=>e.length>a);t.splice(e===-1?t.length:e,0,{label:i,length:a}),t.length>ON&&t.shift()}}return r!==null&&t.find(e=>e.label===r)===void 0&&t.push({label:r,length:kN(r)}),t.map(e=>e.label)}function jN(e,t){let{valueFormatter:n,scaleType:r,data:i}=e;if(r===`band`||r===`point`){if(!i||i.length===0)return[];let e=r===`band`?xN(i,[0,1]):SN(i,[0,1]);return AN(i.map(t=>n?n(t,{location:`tick`,scale:e,defaultTickLabel:`${t}`}):`${t}`))}let a=t?t.domain[0]:0,o=t?t.domain[1]:100,s=t?.tickNumber??2,c=TN(r??`linear`,[a,o],[0,1]),l=a===o?[a]:[a,o],u=c.tickFormat(s);return l.map(e=>{let t=u(e);return n?n(e,{location:`tick`,scale:c,defaultTickLabel:t}):t})}function MN(e,t){if(e.length===0)return{maxWidth:0,maxHeight:0};let n=new Set;for(let t of e){let e=t.split(`
+`);for(let t of e)n.add(t)}let r=aO(n,t),i=0,a=0;for(let t of e){let e=t.split(`
+`),n=0,o=0;for(let t of e){let e=r.get(t)??{width:0,height:0};n=Math.max(n,e.width),o+=e.height}i=Math.max(i,n),a=Math.max(a,o)}return{maxWidth:i,maxHeight:a}}function NN(e,t,n,r){if(!n||n%180==0)return r===`x`?t:e;if(n%90==0)return r===`x`?e:t;let i=lO(Math.abs(n)),a=Math.cos(i),o=Math.sin(i);return r===`x`?Math.abs(e*o)+Math.abs(t*a):Math.abs(e*a)+Math.abs(t*o)}function PN(e,t){let{groups:n,data:r,tickSize:i,tickLabelStyle:a}=e,o=!!e.label;if(!r||r.length===0)return{size:20};let s=[],c=[],l=i??6;for(let e=0;e{let i={},a=new Map;return e.forEach((e,o)=>{let s=r[e.type].getSeriesWithDefaultValues(e,o,t,n),c=s.id;if(i[e.type]===void 0&&(i[e.type]={series:{},seriesOrder:[]}),i[e.type]?.series[c]!==void 0)throw Error(eD(34,c));if(i[e.type].series[c]=s,i[e.type].seriesOrder.push(c),a.has(c))throw Error(eD(35,c));a.set(c,e.type)}),{defaultizedSeries:i,idToType:a}},LN=(e,t,n,r)=>{let i={};return Object.keys(t).forEach(a=>{let o=e[a];o!==void 0&&(i[a]=t[a]?.seriesProcessor?.(o,n,r)??o)}),i},RN=(e,t,n)=>{let r=!1,i={};return Object.keys(e).forEach(a=>{let o=t[a]?.seriesLayout,s=e[a];if(o!==void 0&&s!==void 0){let t=o(s,n);t&&t!==e[a]&&(r=!0,i[a]=t)}}),r?i:{}},zN=(e,t)=>{let n=e[t.type]?.identifierSerializer;if(!n)throw Error(eD(43,t.type));return n(t)},BN=(e,t)=>{let n=e[t.type]?.identifierCleaner;if(!n)throw Error(eD(42,t.type));return n(t)},VN=({store:e})=>({instance:{serializeIdentifier:_E(t=>zN(e.state.seriesConfig.config,t)),cleanIdentifier:_E(function(t){return BN(e.state.seriesConfig.config,t)})}});VN.params={seriesConfig:!0},VN.getDefaultizedParams=({params:e})=>q({},e,{seriesConfig:e.seriesConfig??{}}),VN.getInitialState=({seriesConfig:e})=>({seriesConfig:{config:e}});var HN=Q(e=>e.seriesConfig,e=>e.config),UN=e=>e.visibilityManager,WN=new Map,GN=$(Q(UN,e=>e?.visibilityMap??WN),HN,(e,t)=>n=>{let r=zN(t,n);return!e.has(r)}),KN=(e,t)=>{let n=new Map;return e&&e.forEach(e=>{let r=zN(t,e);n.set(r,e)}),n},qN=[`#4254FB`,`#FFB422`,`#FA4F58`,`#0DBEFF`,`#22BF75`,`#FA83B4`,`#FF7511`],JN=[`#495AFB`,`#FFC758`,`#F35865`,`#30C8FF`,`#44CE8D`,`#F286B3`,`#FF8C39`],YN=e=>e===`dark`?JN:qN;function XN(e){function t(t){if(t.type!==void 0)return t;let n=e.series.idToType.get(t.seriesId);if(n===void 0)throw Error(eD(36,t.seriesId));return q({},t,{type:n})}return t}var ZN=({params:e,store:t})=>{let{series:n,dataset:r,theme:i,colors:a}=e;return UD(()=>{let{defaultizedSeries:e,idToType:o}=IN({series:n,colors:typeof a==`function`?a(i):a,theme:i,seriesConfig:t.state.seriesConfig.config});t.set(`series`,q({},t.state.series,{defaultizedSeries:e,idToType:o,dataset:r}))},[a,r,n,i,t]),{instance:{identifierWithType:XN(t.state)}}};ZN.params={dataset:!0,series:!0,colors:!0,theme:!0};var QN=[];ZN.getDefaultizedParams=({params:e})=>q({},e,{series:e.series?.length?e.series:QN,colors:e.colors??YN,theme:e.theme??`light`}),ZN.getInitialState=({series:e=[],colors:t,theme:n,dataset:r},i)=>{let a=i.seriesConfig.config,{defaultizedSeries:o,idToType:s}=IN({series:e,colors:typeof t==`function`?t(n):t,theme:n,seriesConfig:a});return{series:{defaultizedSeries:o,idToType:s,dataset:r}}};var $N=({store:e,params:t,instance:n})=>{UD(()=>{t.hiddenItems!==void 0&&e.set(`visibilityManager`,q({},e.state.visibilityManager,{visibilityMap:KN(t.hiddenItems.map(e=>n.identifierWithType(e,`visibility`)),e.state.seriesConfig.config)}))},[e,n,t.hiddenItems]);let r=_E(r=>{let i=e.state.visibilityManager.visibilityMap,a=n.identifierWithType(r,`visibility`),o=n.serializeIdentifier(a);if(i.has(o))return;let s=new Map(i);s.set(o,a),e.set(`visibilityManager`,q({},e.state.visibilityManager,{visibilityMap:s}));let c=Array.from(s.values());t.onHiddenItemsChange?.(c)}),i=_E(r=>{let i=e.state.visibilityManager.visibilityMap,a=n.identifierWithType(r,`visibility`),o=n.serializeIdentifier(a);if(!i.has(o))return;let s=new Map(i);s.delete(o),e.set(`visibilityManager`,q({},e.state.visibilityManager,{visibilityMap:s})),t.onHiddenItemsChange?.(Array.from(s.values()))});return{instance:{hideItem:r,showItem:i,toggleItemVisibility:_E(t=>{let a=e.state.visibilityManager.visibilityMap,o=n.identifierWithType(t,`visibility`),s=n.serializeIdentifier(o);a.has(s)?i(o):r(o)})}}};$N.getInitialState=(e,t)=>{let n=t.seriesConfig.config,r=e.hiddenItems??e.initialHiddenItems;return{visibilityManager:{visibilityMap:r?KN(r.map(e=>XN(t)(e)),n):WN,isControlled:e.hiddenItems!==void 0}}},$N.params={onHiddenItemsChange:!0,hiddenItems:!0,initialHiddenItems:!0};var eP=e=>e.series,tP=Q(eP,e=>e.defaultizedSeries),nP=$(tP,HN,Q(eP,e=>e.dataset),GN,function(e,t,n,r){return LN(e,t,n,r)}),rP=$(HN,nP,(e,t)=>function(n){for(let r in t){if(!Object.hasOwn(t,r))continue;let i=t[r];if(i?.series&&i.series[n])return e[r]}return null});function iP(e){return e.scaleType===`band`}function aP(e){return e.scaleType===`point`}function oP(e){return e.scaleType!==`point`&&e.scaleType!==`band`}function sP(e){return e.scaleType===`symlog`}var cP,lP,uP=class{types=new Set;constructor(){if(cP)throw Error(eD(24));cP=this.types}addType(e){this.types.add(e)}getTypes(){return this.types}},dP=class{types=new Set;constructor(){if(lP)throw Error(eD(25));lP=this.types}addType(e){this.types.add(e)}getTypes(){return this.types}},fP=new uP;fP.addType(`bar`),fP.addType(`line`),fP.addType(`scatter`);var pP=new dP;pP.addType(`radar`);function mP(e){return fP.getTypes().has(e)}function hP(e){return mP(e.type)}var gP=(e,t,n,r,i,a,o)=>{let s=n===`x`?r[e].xExtremumGetter:r[e].yExtremumGetter,c=a[e]?.series??{};return s?.({series:c,axis:t,axisIndex:i,isDefaultAxis:i===0,getFilters:o})??[1/0,-1/0]};function _P(e,t,n,r,i,a){let o=Object.keys(n).filter(mP),s=[1/0,-1/0];for(let c of o){let[o,l]=gP(c,e,t,n,r,i,a);s=[Math.min(s[0],o),Math.max(s[1],l)]}return Number.isNaN(s[0])||Number.isNaN(s[1])?[1/0,-1/0]:s}var vP={},yP=$(qD,nP,HN,function(e,t,n){let r={},i=!1;return e?.forEach((e,a)=>{!iP(e)&&!aP(e)&&(r[e.id]=_P(e,`x`,n,a,t),i=!0)}),i?r:vP}),bP=$(JD,nP,HN,function(e,t,n){let r={},i=!1;return e?.forEach((e,a)=>{!iP(e)&&!aP(e)&&(r[e.id]=_P(e,`y`,n,a,t),i=!0)}),i?r:vP}),xP=(e,t,n,r)=>{if(e.domainLimit!==void 0)return e.domainLimit;if(t===`x`)for(let t of r.line?.seriesOrder??[]){let i=r.line.series[t];if(i.xAxisId===e.id||i.xAxisId===void 0&&n===0)return`strict`}return`nice`};function SP(e,t,n){let{tickMaxStep:r,tickMinStep:i,tickNumber:a}=e,o=i===void 0?999:Math.floor(Math.abs(t[1]-t[0])/i),s=r===void 0?2:Math.ceil(Math.abs(t[1]-t[0])/r);return Math.min(o,Math.max(s,a??n))}function CP(e,t){return t[1]-t[0]===0?1:e/((t[1]-t[0])/100)}function wP(e){return Math.floor(Math.abs(e)/50)}function TP(e,t,n){return TN(e??`linear`,t,[0,1]).nice(n).domain()}function EP(e,t,n,r,[i,a],o){let s=xP(e,t,n,r),c=OP(e,i,a);if(typeof s==`function`){let{min:e,max:t}=s(i.valueOf(),a.valueOf());c[0]=e,c[1]=t}let l=SP(e,c,o);return s===`nice`&&(c=TP(e.scaleType,c,l)),c=[`min`in e?e.min??c[0]:c[0],`max`in e?e.max??c[1]:c[1]],{domain:c,tickNumber:l}}function DP(e,t,n,r,[i,a],o){let s=xP(e,t,n,r),c=OP(e,i,a);if(typeof s==`function`){let{min:e,max:t}=s(i.valueOf(),a.valueOf());c[0]=e,c[1]=t}return s===`nice`&&(c=TP(e.scaleType,c,o)),[e.min??c[0],e.max??c[1]]}function OP(e,t,n){let r=t,i=n;return`max`in e&&e.max!=null&&e.maxn&&(i=e.min),!(`min`in e)&&!(`max`in e)?[r,i]:[e.min??r,e.max??i]}function kP(e,t,n,r,i){let a={};return e?.forEach((e,o)=>{let s=e;if(iP(s)||aP(s)){a[s.id]={domain:s.data},s.ordinalTimeTicks!==void 0&&(a[s.id].tickNumber=SP(s,[s.data?.find(e=>e!==null),s.data?.findLast(e=>e!==null)],n));return}let c=r[s.id];c&&(a[s.id]=EP(s,i,o,t,c,n))}),a}var AP=8,jP={},MP=$(qD,nP,yP,function(e,t,n){let r=kP(e,t,AP,n,`x`);return Object.keys(r).length>0?r:jP}),NP=$(JD,nP,bP,function(e,t,n){let r=kP(e,t,AP,n,`y`);return Object.keys(r).length>0?r:jP}),PP=e=>e.dimensions.width&&e.dimensions.height,FP={},IP={},LP=$(qD,PP,MP,function(e,t,n){if(!e?.some(e=>e.height===`auto`)||!t)return IP;let r={};for(let t=0;t<(e?.length??0);t+=1){let i=e[t];if(i.height===`auto`){let e=FN({axis:i,direction:`x`,domain:n[i.id]});e!==void 0&&(r[i.id]=e)}}return r}),RP=$(LP,function(e){if(e===IP)return FP;let t={};for(let[n,r]of Object.entries(e))t[n]=r.size;return t}),zP=$(JD,PP,NP,function(e,t,n){if(!e?.some(e=>e.width===`auto`)||!t)return IP;let r={};for(let t=0;t<(e?.length??0);t+=1){let i=e[t];if(i.width===`auto`){let e=FN({axis:i,direction:`y`,domain:n[i.id]});e!==void 0&&(r[i.id]=e)}}return r}),BP=$(zP,function(e){if(e===IP)return FP;let t={};for(let[n,r]of Object.entries(e))t[n]=r.size;return t});function VP(e){return 25+(e.label?20:0)}function HP(e){return 45+(e.label?20:0)}function UP(e,t,n,r){let i=0,a=0;for(let t of e??[]){if(t.position!==n)continue;let e;e=t.height===`auto`?r[t.id]??VP(t):t.height??0,i+=e+(t.zoom?.slider.enabled?t.zoom.slider.size:0),a+=1}return i+t*Math.max(0,a-1)}function WP(e,t,n,r){let i=0,a=0;for(let t of e??[]){if(t.position!==n)continue;let e;e=t.width===`auto`?r[t.id]??HP(t):t.width??0,i+=e+(t.zoom?.slider.enabled?t.zoom.slider.size:0),a+=1}return i+t*Math.max(0,a-1)}var GP=$(Q(JD,YD,BP,function(e,t,n){return WP(e,t,`left`,n)}),Q(JD,YD,BP,function(e,t,n){return WP(e,t,`right`,n)}),Q(qD,YD,RP,function(e,t,n){return UP(e,t,`top`,n)}),Q(qD,YD,RP,function(e,t,n){return UP(e,t,`bottom`,n)}),function(e,t,n,r){return{left:e,right:t,top:n,bottom:r}}),KP=e=>e.dimensions,qP=$(KP,e=>e.dimensions.margin,GP,function({width:e,height:t},{top:n,right:r,bottom:i,left:a},{left:o,right:s,top:c,bottom:l}){return{width:e-a-r-o-s,left:a+o,right:r+s,height:t-n-i-c-l,top:n+c,bottom:i+l}}),JP=Q(KP,e=>e.width),YP=Q(KP,e=>e.height),XP=Q(KP,e=>e.propsWidth),ZP=Q(KP,e=>e.propsHeight);function QP(e,t){return typeof e==`number`?{top:e,bottom:e,left:e,right:e}:t?q({},t,e):e}var $P=10,eF=({params:e,store:t,instance:n})=>{let{chartsLayerContainerRef:r}=n,i=e.width!==void 0&&e.height!==void 0,a=b.useRef({displayError:!1,initialCompute:!0,computeRun:0}),[o,s]=b.useState(0),[c,l]=b.useState(0),u=b.useCallback(()=>{let n=r?.current;if(!n)return{};let i=yE(n).getComputedStyle(n),a=Math.floor(parseFloat(i.height))||0,o=Math.floor(parseFloat(i.width))||0;return(t.state.dimensions.width!==o||t.state.dimensions.height!==a)&&t.set(`dimensions`,{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:e.width??o,height:e.height??a,propsWidth:e.width,propsHeight:e.height}),{height:a,width:o}},[t,r,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]);UD(()=>{let n=e.width??t.state.dimensions.width,r=e.height??t.state.dimensions.height;t.set(`dimensions`,{margin:{top:e.margin.top,right:e.margin.right,bottom:e.margin.bottom,left:e.margin.left},width:n,height:r,propsHeight:e.height,propsWidth:e.width})},[t,e.height,e.width,e.margin.left,e.margin.right,e.margin.top,e.margin.bottom]),b.useEffect(()=>{a.current.displayError=!0},[]),UC(()=>{if(i||!a.current.initialCompute||a.current.computeRun>$P)return;let e=u();e.width!==o||e.height!==c?(a.current.computeRun+=1,e.width!==void 0&&s(e.width),e.height!==void 0&&l(e.height)):a.current.initialCompute&&(a.current.initialCompute=!1)},[c,o,u,i]),UC(()=>{if(i)return()=>{};u();let e=r.current;if(typeof ResizeObserver>`u`)return()=>{};let t,n=new ResizeObserver(()=>{t=requestAnimationFrame(()=>{u()})});return e&&n.observe(e),()=>{t&&cancelAnimationFrame(t),e&&n.unobserve(e)}},[u,i,r]);let d=t.use(qP),f=b.useCallback(e=>e>=d.left-1&&e<=d.left+d.width,[d.left,d.width]),p=b.useCallback(e=>e>=d.top-1&&e<=d.top+d.height,[d.height,d.top]);return{instance:{isPointInside:b.useCallback((e,t,n)=>n&&`closest`in n&&n.closest(`[data-drawing-container]`)?!0:f(e)&&p(t),[f,p]),isXInside:f,isYInside:p}}};eF.params={width:!0,height:!0,margin:!0},eF.getDefaultizedParams=({params:e})=>q({},e,{margin:QP(e.margin,KD)}),eF.getInitialState=({width:e,height:t,margin:n})=>({dimensions:{margin:n,width:e??0,height:t??0,propsWidth:e,propsHeight:t}});var tF=()=>({instance:{chartsLayerContainerRef:b.useRef(null),chartRootRef:b.useRef(null)}});tF.params={};var nF=({params:e,store:t})=>(UC(()=>{t.set(`experimentalFeatures`,e.experimentalFeatures)},[t,e.experimentalFeatures]),{});nF.params={experimentalFeatures:!0},nF.getInitialState=({experimentalFeatures:e})=>({experimentalFeatures:e});var rF=(e,t)=>e.experimentalFeatures?.[t],iF=0,aF=()=>(iF+=1,`mui-chart-${iF}`),oF=({params:e,store:t})=>(b.useEffect(()=>{e.id===void 0||e.id===t.state.id.providedChartId&&t.state.id.chartId!==void 0||t.set(`id`,q({},t.state.id,{chartId:e.id??aF()}))},[t,e.id]),{});oF.params={id:!0},oF.getInitialState=({id:e})=>({id:{chartId:e,providedChartId:e}});var sF=Q(e=>e.id,e=>e.chartId),cF=$(nP,HN,qP,function(e,t,n){return RN(e,t,n)});function lF(e,...t){let n=new URL(`https://mui.com/x/production-error`);return n.searchParams.set(`code`,e.toString()),t.forEach(e=>n.searchParams.append(`args[]`,e)),`MUI X error #${e}; visit ${n} for the full message.`}var uF={abort:!0,animationcancel:!0,animationend:!0,animationiteration:!0,animationstart:!0,auxclick:!0,beforeinput:!0,beforetoggle:!0,blur:!0,cancel:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,close:!0,command:!0,compositionend:!0,compositionstart:!0,compositionupdate:!0,contextlost:!0,contextmenu:!0,contextrestored:!0,copy:!0,cuechange:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,emptied:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,formdata:!0,gotpointercapture:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,lostpointercapture:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseout:!0,mouseover:!0,mouseup:!0,paste:!0,pause:!0,play:!0,playing:!0,pointercancel:!0,pointerdown:!0,pointerenter:!0,pointerleave:!0,pointermove:!0,pointerout:!0,pointerover:!0,pointerup:!0,progress:!0,ratechange:!0,reset:!0,resize:!0,scroll:!0,scrollend:!0,securitypolicyviolation:!0,seeked:!0,seeking:!0,select:!0,selectionchange:!0,selectstart:!0,slotchange:!0,stalled:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitioncancel:!0,transitionend:!0,transitionrun:!0,transitionstart:!0,volumechange:!0,waiting:!0,webkitanimationend:!0,webkitanimationiteration:!0,webkitanimationstart:!0,webkittransitionend:!0,wheel:!0,beforematch:!0,pointerrawupdate:!0},dF=class{customData={};constructor(e){if(!e||!e.name)throw Error(lF(164));if(e.name in uF)throw Error(lF(165,e.name));this.name=e.name,this.preventDefault=e.preventDefault??!1,this.stopPropagation=e.stopPropagation??!1,this.preventIf=e.preventIf??[],this.requiredKeys=e.requiredKeys??[],this.pointerMode=e.pointerMode??[],this.pointerOptions=e.pointerOptions??{}}init(e,t,n,r){this.element=e,this.pointerManager=t,this.gesturesRegistry=n,this.keyboardManager=r;let i=`${this.name}ChangeOptions`;this.element.addEventListener(i,this.handleOptionsChange);let a=`${this.name}ChangeState`;this.element.addEventListener(a,this.handleStateChange)}handleOptionsChange=e=>{e&&e.detail&&this.updateOptions(e.detail)};updateOptions(e){this.preventDefault=e.preventDefault??this.preventDefault,this.stopPropagation=e.stopPropagation??this.stopPropagation,this.preventIf=e.preventIf??this.preventIf,this.requiredKeys=e.requiredKeys??this.requiredKeys,this.pointerMode=e.pointerMode??this.pointerMode,this.pointerOptions=e.pointerOptions??this.pointerOptions}getBaseConfig(){return{requiredKeys:this.requiredKeys}}getEffectiveConfig(e,t){if(e!==`mouse`&&e!==`touch`&&e!==`pen`)return t;let n=this.pointerOptions[e];return n?q({},t,n):t}handleStateChange=e=>{e&&e.detail&&this.updateState(e.detail)};updateState(e){Object.assign(this.state,e)}getTargetElement(e){return this.isActive||this.element===e.target||`contains`in this.element&&this.element.contains(e.target)||`getRootNode`in this.element&&this.element.getRootNode()instanceof ShadowRoot&&e.composedPath().includes(this.element)?this.element:null}set isActive(e){e?this.gesturesRegistry.registerActiveGesture(this.element,this):this.gesturesRegistry.unregisterActiveGesture(this.element,this)}get isActive(){return this.gesturesRegistry.isGestureActive(this.element,this)??!1}shouldPreventGesture(e,t){let n=this.getEffectiveConfig(t,this.getBaseConfig());if(!this.keyboardManager.areKeysPressed(n.requiredKeys))return!0;if(this.preventIf.length===0)return!1;let r=this.gesturesRegistry.getActiveGestures(e);return this.preventIf.some(e=>r[e])}isPointerTypeAllowed(e){return!this.pointerMode||this.pointerMode.length===0||this.pointerMode.includes(e)}destroy(){let e=`${this.name}ChangeOptions`;this.element.removeEventListener(e,this.handleOptionsChange);let t=`${this.name}ChangeState`;this.element.removeEventListener(t,this.handleStateChange)}},fF=class{activeGestures=new Map;registerActiveGesture(e,t){this.activeGestures.has(e)||this.activeGestures.set(e,new Set);let n=this.activeGestures.get(e),r={gesture:t,element:e};n.add(r)}unregisterActiveGesture(e,t){let n=this.activeGestures.get(e);n&&(n.forEach(e=>{e.gesture===t&&n.delete(e)}),n.size===0&&this.activeGestures.delete(e))}getActiveGestures(e){let t=this.activeGestures.get(e);return t?Array.from(t).reduce((e,t)=>(e[t.gesture.name]=!0,e),{}):{}}isGestureActive(e,t){let n=this.activeGestures.get(e);return n?Array.from(n).some(e=>e.gesture===t):!1}destroy(){this.activeGestures.clear()}unregisterElement(e){this.activeGestures.delete(e)}};function pF(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:mF,platform:hF,maxTouchPoints:gF}=pF(),_F=mF.toLowerCase(),vF=hF.toLowerCase(),yF=/^i(os$|p)/.test(vF)||vF===`macintel`&&gF>1,bF=`android`,xF=vF===bF||_F.includes(bF),SF=!yF&&vF.startsWith(`mac`);vF.startsWith(`win`),!xF&&/^(linux|chrome os)/.test(vF);var CF=SF||yF,wF=class{pressedKeys=new Set;constructor(){this.initialize()}initialize(){typeof window>`u`||(window.addEventListener(`keydown`,this.handleKeyDown),window.addEventListener(`keyup`,this.handleKeyUp),window.addEventListener(`blur`,this.clearKeys))}handleKeyDown=e=>{this.pressedKeys.add(e.key)};handleKeyUp=e=>{this.pressedKeys.delete(e.key)};clearKeys=()=>{this.pressedKeys.clear()};areKeysPressed(e){return!e||e.length===0||e.every(e=>e===`ControlOrMeta`?CF?this.pressedKeys.has(`Meta`):this.pressedKeys.has(`Control`):this.pressedKeys.has(e))}destroy(){typeof window<`u`&&(window.removeEventListener(`keydown`,this.handleKeyDown),window.removeEventListener(`keyup`,this.handleKeyUp),window.removeEventListener(`blur`,this.clearKeys)),this.clearKeys()}},TF=class{preventEventInterruption=!0;pointers=new Map;gestureHandlers=new Set;constructor(e){this.root=e.root??document.getRootNode({composed:!0})??document.body,this.touchAction=e.touchAction||`auto`,this.passive=e.passive??!1,this.preventEventInterruption=e.preventEventInterruption??!0,this.setupEventListeners()}registerGestureHandler(e){return this.gestureHandlers.add(e),()=>{this.gestureHandlers.delete(e)}}getPointers(){return this.pointers}setupEventListeners(){this.touchAction!==`auto`&&(this.root.style.touchAction=this.touchAction),this.root.addEventListener(`pointerdown`,this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener(`pointermove`,this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener(`pointerup`,this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener(`pointercancel`,this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener(`forceCancel`,this.handlePointerEvent,{passive:this.passive}),this.root.addEventListener(`blur`,this.handleInterruptEvents),this.root.addEventListener(`contextmenu`,this.handleInterruptEvents)}handleInterruptEvents=e=>{if(this.preventEventInterruption&&`pointerType`in e&&e.pointerType===`touch`){e.preventDefault();return}let t=new PointerEvent(`forceCancel`,{bubbles:!1,cancelable:!1}),n=this.pointers.values().next().value;if(this.pointers.size>0&&n){Object.defineProperties(t,{clientX:{value:n.clientX},clientY:{value:n.clientY},pointerId:{value:n.pointerId},pointerType:{value:n.pointerType}});for(let[e,t]of this.pointers.entries()){let n=q({},t,{type:`forceCancel`});this.pointers.set(e,n)}}this.notifyHandlers(t),this.pointers.clear()};handlePointerEvent=e=>{let{type:t,pointerId:n}=e;if(t===`pointerdown`||t===`pointermove`)this.pointers.set(n,this.createPointerData(e));else if(t===`pointerup`||t===`pointercancel`||t===`forceCancel`){this.pointers.set(n,this.createPointerData(e)),this.notifyHandlers(e),this.pointers.delete(n);return}this.notifyHandlers(e)};notifyHandlers(e){this.gestureHandlers.forEach(t=>t(this.pointers,e))}createPointerData(e){return{pointerId:e.pointerId,clientX:e.clientX,clientY:e.clientY,pageX:e.pageX,pageY:e.pageY,target:e.target,timeStamp:e.timeStamp,type:e.type,isPrimary:e.isPrimary,pressure:e.pressure,width:e.width,height:e.height,pointerType:e.pointerType,srcEvent:e}}destroy(){this.root.removeEventListener(`pointerdown`,this.handlePointerEvent),this.root.removeEventListener(`pointermove`,this.handlePointerEvent),this.root.removeEventListener(`pointerup`,this.handlePointerEvent),this.root.removeEventListener(`pointercancel`,this.handlePointerEvent),this.root.removeEventListener(`forceCancel`,this.handlePointerEvent),this.root.removeEventListener(`blur`,this.handleInterruptEvents),this.root.removeEventListener(`contextmenu`,this.handleInterruptEvents),this.pointers.clear(),this.gestureHandlers.clear()}},EF=class{gestureTemplates=new Map;elementGestureMap=new Map;activeGesturesRegistry=new fF;keyboardManager=new wF;constructor(e){this.pointerManager=new TF({root:e.root,touchAction:e.touchAction,passive:e.passive}),e.gestures&&e.gestures.length>0&&e.gestures.forEach(e=>{this.addGestureTemplate(e)})}addGestureTemplate(e){this.gestureTemplates.set(e.name,e)}addGestures(e){e.forEach(e=>{this.addGestureTemplate(e)})}removeGestures(e){e.forEach(e=>{this.elementGestureMap.forEach((t,n)=>{this.unregisterElement(e,n)}),this.gestureTemplates.delete(e)})}setGestureOptions(e,t,n){let r=this.elementGestureMap.get(t);if(!r||!r.has(e))return;let i=new CustomEvent(`${e}ChangeOptions`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});t.dispatchEvent(i)}setGestureState(e,t,n){let r=this.elementGestureMap.get(t);if(!r||!r.has(e))return;let i=new CustomEvent(`${e}ChangeState`,{detail:n,bubbles:!1,cancelable:!1,composed:!1});t.dispatchEvent(i)}registerElement(e,t,n){return Array.isArray(e)||(e=[e]),e.forEach(e=>{let r=n?.[e];this.registerSingleGesture(e,t,r)}),t}registerSingleGesture(e,t,n){let r=this.gestureTemplates.get(e);if(!r)return!1;this.elementGestureMap.has(t)||this.elementGestureMap.set(t,new Map);let i=this.elementGestureMap.get(t);i.has(e)&&this.unregisterElement(e,t);let a=r.clone(n);return a.init(t,this.pointerManager,this.activeGesturesRegistry,this.keyboardManager),i.set(e,a),!0}unregisterElement(e,t){let n=this.elementGestureMap.get(t);return!n||!n.has(e)?!1:(n.get(e).destroy(),n.delete(e),this.activeGesturesRegistry.unregisterElement(t),n.size===0&&this.elementGestureMap.delete(t),!0)}unregisterAllGestures(e){let t=this.elementGestureMap.get(e);if(t){for(let[,n]of t)n.destroy(),this.activeGesturesRegistry.unregisterElement(e);this.elementGestureMap.delete(e)}}destroy(){for(let[e]of this.elementGestureMap)this.unregisterAllGestures(e);this.gestureTemplates.clear(),this.elementGestureMap.clear(),this.activeGesturesRegistry.destroy(),this.keyboardManager.destroy(),this.pointerManager.destroy()}},DF=class extends dF{unregisterHandler=null;originalTarget=null;constructor(e){super(e),this.minPointers=e.minPointers??1,this.maxPointers=e.maxPointers??1/0}init(e,t,n,r){super.init(e,t,n,r),this.unregisterHandler=this.pointerManager.registerGestureHandler(this.handlePointerEvent)}updateOptions(e){super.updateOptions(e),this.minPointers=e.minPointers??this.minPointers,this.maxPointers=e.maxPointers??this.maxPointers}getBaseConfig(){return{requiredKeys:this.requiredKeys,minPointers:this.minPointers,maxPointers:this.maxPointers}}isWithinPointerCount(e,t){let n=this.getEffectiveConfig(t,this.getBaseConfig());return e.length>=n.minPointers&&e.length<=n.maxPointers}getRelevantPointers(e,t){return e.filter(e=>{if(!this.isPointerTypeAllowed(e.pointerType))return!1;let n=t===e.target||e.target===this.originalTarget||t===this.originalTarget||`contains`in t&&t.contains(e.target),r=`getRootNode`in t&&t.getRootNode()instanceof ShadowRoot&&e.srcEvent.composedPath().includes(t);return n||r})}destroy(){this.unregisterHandler&&=(this.unregisterHandler(),null),super.destroy()}};function OF(e){if(e.length===0)return{x:0,y:0};let t=e.reduce((e,t)=>(e.x+=t.clientX,e.y+=t.clientY,e),{x:0,y:0});return{x:t.x/e.length,y:t.y/e.length}}function kF(e,t){return`${e}${t===`ongoing`?``:t.charAt(0).toUpperCase()+t.slice(1)}`}var AF=1e-5,jF=.15;function MF(e,t){let n=t.x-e.x,r=t.y-e.y,i={vertical:null,horizontal:null,mainAxis:null},a=NF(t,e),o=Math.abs(n)>Math.abs(r)?`horizontal`:`vertical`,s=a||o===`horizontal`?AF:jF,c=a?AF:o===`horizontal`?jF:AF;return Math.abs(n)>s&&(i.horizontal=n>0?`right`:`left`),Math.abs(r)>c&&(i.vertical=r>0?`down`:`up`),i.mainAxis=a?`diagonal`:o,i}function NF(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.atan2(r,n)*180/Math.PI;return i>=-44.99999&&i<=-22.49999||i>=22.50001&&i<=45.00001||i>=135.00001&&i<=157.50001||i>=-157.49999&&i<=-134.99999}function PF(e,t){if(!e.vertical&&!e.horizontal)return!1;if(t.length===0)return!0;let n=e.vertical===null||t.includes(e.vertical),r=e.horizontal===null||t.includes(e.horizontal);return n&&r}var FF=class e extends DF{state={lastPosition:null};constructor(e){super(e),this.threshold=e.threshold||0}clone(t){return new e(q({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},t))}init(e,t,n,r){super.init(e,t,n,r),this.element.addEventListener(`pointerenter`,this.handleElementEnter),this.element.addEventListener(`pointerleave`,this.handleElementLeave)}destroy(){this.element.removeEventListener(`pointerenter`,this.handleElementEnter),this.element.removeEventListener(`pointerleave`,this.handleElementLeave),this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e)}resetState(){this.isActive=!1,this.state={lastPosition:null}}handleElementEnter=e=>{if(e.pointerType!==`mouse`&&e.pointerType!==`pen`)return;let t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());if(this.isWithinPointerCount(n,e.pointerType)){this.isActive=!0;let t={x:e.clientX,y:e.clientY};this.state.lastPosition=t,this.emitMoveEvent(this.element,`start`,n,e),this.emitMoveEvent(this.element,`ongoing`,n,e)}};handleElementLeave=e=>{if(e.pointerType!==`mouse`&&e.pointerType!==`pen`||!this.isActive)return;let t=this.pointerManager.getPointers()||new Map,n=Array.from(t.values());this.emitMoveEvent(this.element,`end`,n,e),this.resetState()};handlePointerEvent=(e,t)=>{if(t.type!==`pointermove`||t.pointerType!==`mouse`&&t.pointerType!==`pen`)return;this.preventDefault&&t.preventDefault(),this.stopPropagation&&t.stopPropagation();let n=Array.from(e.values()),r=this.getTargetElement(t);if(!r||!this.isWithinPointerCount(n,t.pointerType))return;if(this.shouldPreventGesture(r,t.pointerType)){if(!this.isActive)return;this.resetState(),this.emitMoveEvent(r,`end`,n,t);return}let i={x:t.clientX,y:t.clientY};this.state.lastPosition=i,this.isActive||(this.isActive=!0,this.emitMoveEvent(r,`start`,n,t)),this.emitMoveEvent(r,`ongoing`,n,t)};emitMoveEvent(e,t,n,r){let i=this.state.lastPosition||OF(n),a=this.gesturesRegistry.getActiveGestures(e),o={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,activeGestures:a,customData:this.customData},s=kF(this.name,t),c=new CustomEvent(s,{bubbles:!0,cancelable:!0,composed:!0,detail:o});e.dispatchEvent(c)}},IF=class e extends DF{state={startPointers:new Map,startCentroid:null,lastCentroid:null,movementThresholdReached:!1,totalDeltaX:0,totalDeltaY:0,activeDeltaX:0,activeDeltaY:0,lastDirection:{vertical:null,horizontal:null,mainAxis:null},lastDeltas:null};constructor(e){super(e),this.direction=e.direction||[`up`,`down`,`left`,`right`],this.threshold=e.threshold||0}clone(t){return new e(q({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,threshold:this.threshold,minPointers:this.minPointers,maxPointers:this.maxPointers,direction:[...this.direction],requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},t))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e),this.direction=e.direction||this.direction,this.threshold=e.threshold??this.threshold}resetState(){this.isActive=!1,this.state=q({},this.state,{startPointers:new Map,startCentroid:null,lastCentroid:null,lastDeltas:null,activeDeltaX:0,activeDeltaY:0,movementThresholdReached:!1,lastDirection:{vertical:null,horizontal:null,mainAxis:null}})}handlePointerEvent=(e,t)=>{let n=Array.from(e.values());if(t.type===`forceCancel`){this.cancel(t.target,n,t);return}let r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType)){this.cancel(r,n,t);return}let i=this.getRelevantPointers(n,r);if(!this.isWithinPointerCount(i,t.pointerType)){this.cancel(r,i,t);return}switch(t.type){case`pointerdown`:if(!this.isActive&&!this.state.startCentroid)i.forEach(e=>{this.state.startPointers.set(e.pointerId,e)}),this.originalTarget=r,this.state.startCentroid=OF(i),this.state.lastCentroid=q({},this.state.startCentroid);else if(this.state.startCentroid&&this.state.lastCentroid){let e=this.state.lastCentroid,t=OF(i),n=t.x-e.x,r=t.y-e.y;this.state.startCentroid={x:this.state.startCentroid.x+n,y:this.state.startCentroid.y+r},this.state.lastCentroid=t,i.forEach(e=>{this.state.startPointers.has(e.pointerId)||this.state.startPointers.set(e.pointerId,e)})}break;case`pointermove`:if(this.state.startCentroid&&this.isWithinPointerCount(n,t.pointerType)){let e=OF(i),n=e.x-this.state.startCentroid.x,a=e.y-this.state.startCentroid.y,o=Math.sqrt(n*n+a*a),s=MF(this.state.lastCentroid??this.state.startCentroid,e),c=this.state.lastCentroid?e.x-this.state.lastCentroid.x:0,l=this.state.lastCentroid?e.y-this.state.lastCentroid.y:0;!this.state.movementThresholdReached&&o>=this.threshold&&PF(s,this.direction)?(this.state.movementThresholdReached=!0,this.isActive=!0,this.state.lastDeltas={x:c,y:l},this.state.totalDeltaX+=c,this.state.totalDeltaY+=l,this.state.activeDeltaX+=c,this.state.activeDeltaY+=l,this.emitPanEvent(r,`start`,i,t,e),this.emitPanEvent(r,`ongoing`,i,t,e)):this.state.movementThresholdReached&&this.isActive&&(this.state.lastDeltas={x:c,y:l},this.state.totalDeltaX+=c,this.state.totalDeltaY+=l,this.state.activeDeltaX+=c,this.state.activeDeltaY+=l,this.emitPanEvent(r,`ongoing`,i,t,e)),this.state.lastCentroid=e,this.state.lastDirection=s}break;case`pointerup`:case`pointercancel`:case`forceCancel`:if(this.isActive&&this.state.movementThresholdReached){let e=i.filter(e=>e.type!==`pointerup`&&e.type!==`pointercancel`);if(!this.isWithinPointerCount(e,t.pointerType)){let e=this.state.lastCentroid||this.state.startCentroid;t.type===`pointercancel`&&this.emitPanEvent(r,`cancel`,i,t,e),this.emitPanEvent(r,`end`,i,t,e),this.resetState()}else if(e.length>=1&&this.state.lastCentroid){let t=OF(e),n=t.x-this.state.lastCentroid.x,r=t.y-this.state.lastCentroid.y;this.state.startCentroid={x:this.state.startCentroid.x+n,y:this.state.startCentroid.y+r},this.state.lastCentroid=t;let a=i.find(e=>e.type===`pointerup`||e.type===`pointercancel`)?.pointerId;a!==void 0&&this.state.startPointers.delete(a)}}else this.resetState()}};emitPanEvent(e,t,n,r,i){if(!this.state.startCentroid)return;let a=this.state.lastDeltas?.x??0,o=this.state.lastDeltas?.y??0,s=this.state.startPointers.values().next().value,c=s?(r.timeStamp-s.timeStamp)/1e3:0,l=c>0?a/c:0,u=c>0?o/c:0,d=Math.sqrt(l*l+u*u),f=this.gesturesRegistry.getActiveGestures(e),p={gestureName:this.name,initialCentroid:this.state.startCentroid,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,deltaX:a,deltaY:o,direction:this.state.lastDirection,velocityX:l,velocityY:u,velocity:d,totalDeltaX:this.state.totalDeltaX,totalDeltaY:this.state.totalDeltaY,activeDeltaX:this.state.activeDeltaX,activeDeltaY:this.state.activeDeltaY,activeGestures:f,customData:this.customData},m=kF(this.name,t),h=new CustomEvent(m,{bubbles:!0,cancelable:!0,composed:!0,detail:p});e.dispatchEvent(h),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancel(e,t,n){if(this.isActive){let r=e??this.element;this.emitPanEvent(r,`cancel`,t,n,this.state.lastCentroid),this.emitPanEvent(r,`end`,t,n,this.state.lastCentroid)}this.resetState()}},LF=class e extends DF{state={startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1};constructor(e){super(e),this.duration=e.duration??500,this.maxDistance=e.maxDistance??10}clone(t){return new e(q({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,duration:this.duration,maxDistance:this.maxDistance,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},t))}destroy(){this.clearPressTimer(),this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e),this.duration=e.duration??this.duration,this.maxDistance=e.maxDistance??this.maxDistance}resetState(){this.clearPressTimer(),this.isActive=!1,this.state=q({},this.state,{startCentroid:null,lastPosition:null,timerId:null,startTime:0,pressThresholdReached:!1})}clearPressTimer(){this.state.timerId!==null&&(clearTimeout(this.state.timerId),this.state.timerId=null)}handlePointerEvent=(e,t)=>{let n=Array.from(e.values());if(t.type===`forceCancel`){this.cancelPress(t.target,n,t);return}let r=this.getTargetElement(t);if(!r)return;if(this.shouldPreventGesture(r,t.pointerType)){this.isActive&&this.cancelPress(r,n,t);return}let i=this.getRelevantPointers(n,r);if(!this.isWithinPointerCount(i,t.pointerType)){this.isActive&&this.cancelPress(r,i,t);return}switch(t.type){case`pointerdown`:!this.isActive&&!this.state.startCentroid&&(this.state.startCentroid=OF(i),this.state.lastPosition=q({},this.state.startCentroid),this.state.startTime=t.timeStamp,this.isActive=!0,this.originalTarget=r,this.clearPressTimer(),this.state.timerId=setTimeout(()=>{if(this.isActive&&this.state.startCentroid){this.state.pressThresholdReached=!0;let e=this.state.lastPosition;this.emitPressEvent(r,`start`,i,t,e),this.emitPressEvent(r,`ongoing`,i,t,e)}},this.duration));break;case`pointermove`:if(this.isActive&&this.state.startCentroid){let e=OF(i);this.state.lastPosition=e;let n=e.x-this.state.startCentroid.x,a=e.y-this.state.startCentroid.y;Math.sqrt(n*n+a*a)>this.maxDistance&&this.cancelPress(r,i,t)}break;case`pointerup`:if(this.isActive){if(this.state.pressThresholdReached){let e=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(r,`end`,i,t,e)}this.resetState()}break;case`pointercancel`:case`forceCancel`:this.cancelPress(r,i,t)}};emitPressEvent(e,t,n,r,i){let a=this.gesturesRegistry.getActiveGestures(e),o=r.timeStamp-this.state.startTime,s={gestureName:this.name,centroid:i,target:r.target,srcEvent:r,phase:t,pointers:n,timeStamp:r.timeStamp,x:i.x,y:i.y,duration:o,activeGestures:a,customData:this.customData},c=kF(this.name,t),l=new CustomEvent(c,{bubbles:!0,cancelable:!0,composed:!0,detail:s});e.dispatchEvent(l),this.preventDefault&&r.preventDefault(),this.stopPropagation&&r.stopPropagation()}cancelPress(e,t,n){if(this.isActive&&this.state.pressThresholdReached){let r=this.state.lastPosition||this.state.startCentroid;this.emitPressEvent(e??this.element,`cancel`,t,n,r),this.emitPressEvent(e??this.element,`end`,t,n,r)}this.resetState()}},RF=class e extends DF{state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null,multiTapResetTimeoutId:null};constructor(e){super(e),this.maxDistance=e.maxDistance??10,this.taps=e.taps??1}clone(t){return new e(q({name:this.name,preventDefault:this.preventDefault,stopPropagation:this.stopPropagation,minPointers:this.minPointers,maxPointers:this.maxPointers,maxDistance:this.maxDistance,taps:this.taps,requiredKeys:[...this.requiredKeys],pointerMode:[...this.pointerMode],preventIf:[...this.preventIf],pointerOptions:structuredClone(this.pointerOptions)},t))}destroy(){this.resetState(),super.destroy()}updateOptions(e){super.updateOptions(e),this.maxDistance=e.maxDistance??this.maxDistance,this.taps=e.taps??this.taps}resetState(){this.isActive=!1,this.state.multiTapResetTimeoutId!==null&&clearTimeout(this.state.multiTapResetTimeoutId),this.state={startCentroid:null,currentTapCount:0,lastTapTime:0,lastPosition:null,multiTapResetTimeoutId:null}}handlePointerEvent=(e,t)=>{let n=Array.from(e.values()),r=this.getTargetElement(t);if(!r)return;let i=this.getRelevantPointers(n,r);if(this.shouldPreventGesture(r,t.pointerType)||!this.isWithinPointerCount(i,t.pointerType)){this.isActive&&this.cancelTap(r,i,t);return}switch(t.type){case`pointerdown`:this.isActive||(this.state.startCentroid=OF(i),this.state.lastPosition=q({},this.state.startCentroid),this.isActive=!0,this.originalTarget=r);break;case`pointermove`:if(this.isActive&&this.state.startCentroid){let e=OF(i);this.state.lastPosition=e;let n=e.x-this.state.startCentroid.x,a=e.y-this.state.startCentroid.y;Math.sqrt(n*n+a*a)>this.maxDistance&&this.cancelTap(r,i,t)}break;case`pointerup`:if(this.isActive){this.state.currentTapCount+=1;let e=this.state.lastPosition||this.state.startCentroid;if(!e){this.cancelTap(r,i,t);return}this.state.currentTapCount>=this.taps?(this.fireTapEvent(r,i,t,e),this.resetState()):(this.state.lastTapTime=t.timeStamp,this.isActive=!1,this.state.startCentroid=null,this.state.multiTapResetTimeoutId!==null&&clearTimeout(this.state.multiTapResetTimeoutId),this.state.multiTapResetTimeoutId=setTimeout(()=>{this.state.multiTapResetTimeoutId=null,this.state.currentTapCount>0&&this.state.currentTapCounte.preventDefault(),BF=({instance:e})=>{let{chartsLayerContainerRef:t}=e,n=b.useRef(null);b.useEffect(()=>{let e=t.current;n.current||=new EF({gestures:[new IF({name:`pan`,threshold:0,maxPointers:1}),new FF({name:`move`,preventIf:[`pan`,`zoomPinch`,`zoomPan`]}),new RF({name:`tap`,preventIf:[`zoomPinch`,`zoomPan`]}),new LF({name:`quickPress`,duration:50}),new IF({name:`brush`,threshold:0,maxPointers:1})]});let r=n.current;if(!(!e||!r))return r.registerElement([`pan`,`move`,`tap`,`quickPress`,`brush`],e),()=>{r.destroy(),n.current=null}},[t,n]);let r=b.useCallback((e,n,r)=>{let i=t.current;return i?.addEventListener(e,n,r),{cleanup:()=>i?.removeEventListener(e,n,r)}},[t]),i=b.useCallback((e,r)=>{let i=t.current,a=n.current;!a||!i||a.setGestureOptions(e,i,r??{})},[t,n]);return b.useEffect(()=>{let e=t.current;return e?.addEventListener(`gesturestart`,zF),e?.addEventListener(`gesturechange`,zF),e?.addEventListener(`gestureend`,zF),()=>{e?.removeEventListener(`gesturestart`,zF),e?.removeEventListener(`gesturechange`,zF),e?.removeEventListener(`gestureend`,zF)}},[t]),{instance:{addInteractionListener:r,updateZoomInteractionListeners:i,registerGestures:b.useCallback(e=>{let r=t.current,i=n.current;if(!i||!r)return()=>{};let a=e.map(e=>e.name);return i.addGestures(e),i.registerElement(a,r),()=>{i.removeGestures(a)}},[t,n])}}};BF.params={},BF.getInitialState=()=>({});var VF=[tF,oF,VN,nF,eF,ZN,BF,VD],HF=[`apiRef`],UF=e=>{let{plugins:t}=e,n=KE(e.props,HF),r={};t.forEach(e=>{Object.assign(r,e.params)});let i={};return Object.keys(n).forEach(e=>{let t=n[e];r[e]&&(i[e]=t)}),t.reduce((e,t)=>t.getDefaultizedParams?t.getDefaultizedParams({params:e}):e,i)},WF=0;function GF(e,t){let n=Dw(),r=b.useMemo(()=>[...VF,...e],[e]),i=UF({plugins:r,props:t});i.id=i.id??n;let a=b.useRef({}).current,o=qF(t.apiRef),s=b.useRef(null);if(s.current==null){WF+=1;let e={cacheKey:{id:WF}};r.forEach(t=>{t.getInitialState&&Object.assign(e,t.getInitialState(i,e))}),s.current=new BD(e)}return r.forEach(e=>{let t=e({instance:a,params:i,plugins:r,store:s.current});t.publicAPI&&Object.assign(o.current,t.publicAPI),t.instance&&Object.assign(a,t.instance)}),{contextValue:b.useMemo(()=>({store:s.current,publicAPI:o.current,instance:a}),[a,o])}}function KF(e){return e.current??={},e}function qF(e){let t=b.useRef({});return e?KF(e):t}var JF=b.createContext(null),YF=`hover`,XF=(e,t,n)=>{let r=n??!1;return e===`y`&&(t===`band`||t===`point`)?!r:r},ZF={minStart:0,maxEnd:100,step:5,minSpan:10,maxSpan:100,panning:!0,filterMode:`keep`,reverse:!1,slider:{enabled:!1,preview:!1,size:28,showTooltip:YF}},QF=(e,t,n,r)=>{if(e)return e===!0?q({axisId:t,axisDirection:n},ZF,{reverse:r??!1}):q({axisId:t,axisDirection:n},ZF,{reverse:r??!1},e,{slider:q({},ZF.slider,{size:e.slider?.preview??ZF.slider.preview?48:28},e.slider)})};function $F(e,t,n){let r={top:0,bottom:0,none:0};return(e&&e.length>0?e:[{id:WD,scaleType:`linear`}]).map((e,i)=>{let a=e.dataKey,o=i===0?`bottom`:`none`,s=e.position??o,c=25+(e.label?20:0),l=e.id??`defaultized-x-axis-${i}`,u=e.height??c,d=q({offset:r[s]},e,{id:l,position:s,height:u,zoom:QF(e.zoom,l,`x`,XF(`x`,e.scaleType,e.reverse))});if(s!==`none`&&(r[s]+=(u===`auto`?c:u)+n,d.zoom?.slider.enabled&&(r[s]+=d.zoom.slider.size)),e.data!==void 0||a===void 0&&!e.valueGetter)return d;if(t===void 0)throw Error(eD(37));return q({},d,{data:e.valueGetter?t.map(t=>e.valueGetter(t)):t.map(e=>e[a])})})}function eI(e,t,n){let r={right:0,left:0,none:0};return(e&&e.length>0?e:[{id:GD,scaleType:`linear`}]).map((e,i)=>{let a=e.dataKey,o=i===0?`left`:`none`,s=e.position??o,c=45+(e.label?20:0),l=e.id??`defaultized-y-axis-${i}`,u=e.width??c,d=q({offset:r[s]},e,{id:l,position:s,width:u,zoom:QF(e.zoom,l,`y`,XF(`y`,e.scaleType,e.reverse))});if(s!==`none`&&(r[s]+=(u===`auto`?c:u)+n,d.zoom?.slider.enabled&&(r[s]+=d.zoom.slider.size)),e.data!==void 0||a===void 0&&!e.valueGetter)return d;if(t===void 0)throw Error(eD(38));return q({},d,{data:e.valueGetter?t.map(t=>e.valueGetter(t)):t.map(e=>e[a])})})}function tI(e,t){return function(n,r){if(r.location===`tick`){let t=r.scale.domain();return t[0]===t[1]?r.scale.tickFormat(1)(n):r.scale.tickFormat(e)(n)}return r.location===`zoom-slider-tooltip`?t.tickFormat(2)(n):`${n}`}}function nI(e){return e.type===`piecewise`?KA(e.thresholds,e.colors).unknown(e.unknownColor??null):hN([e.min??0,e.max??100],e.color).unknown(e.unknownColor??null)}function rI(e){return e.values?IO(e.values,e.colors).unknown(e.unknownColor??null):IO(e.colors.map((e,t)=>t),e.colors).unknown(e.unknownColor??null)}function iI(e){return e.type===`ordinal`?rI(e):nI(e)}var aI=e=>e?.[0]instanceof Date;function oI(e,t,n){let r=dN(e,t);return(e,{location:t})=>t===`tick`?r.tickFormat(n)(e):`${e.toLocaleString()}`}var sI=(e,t,n,r)=>{let i=new Set;return Object.keys(t).filter(mP).forEach(a=>{let o=n[a]?.series??{},s=t[a].axisTooltipGetter?.(o);s!==void 0&&s.forEach(({axisId:t,direction:n})=>{n===e&&i.add(t??r)})}),i};function cI(e){return e.bandwidth!==void 0}function lI(e){return cI(e)&&e.paddingOuter!==void 0}function uI(e,t,n){let r=t===`x`?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n?[r[1],r[0]]:r}function dI(e,t){return e.step()*t<.1}function fI(e,t,n){let r=n===`x`?e.height:e.width;if(r===`auto`){let r=t?.[e.id];return r===void 0?(n===`x`?25:45)+(e.label?20:0):r}return r??0}var pI=.2,mI=.1;function hI(e,t,n,r){let i={},a={};for(let o of e){let e=o.position;if(e&&(i[e]??=0,a[o.id]=i[e],e!==`none`)){let a=fI(o,t,n);i[e]+=a+r;let s=o.zoom;s?.slider.enabled&&(i[e]+=s.slider.size)}}return a}function gI({scales:e,drawingArea:t,formattedSeries:n,axis:r,seriesConfig:i,axisDirection:a,zoomMap:o,domains:s,autoSizes:c,axesGap:l=0}){if(r===void 0)return{axis:{},axisIds:[]};let u=sI(a,i,n,r[0].id),d=hI(r,c,a,l),f={};return r.forEach(n=>{let r=n,i=e[r.id],l=o?.get(r.id),p=l?[l.start,l.end]:[0,100],m=uI(t,a,r.reverse??!1),h=s[r.id].tickNumber,g=!r.ignoreTooltip&&u.has(r.id),_=CP(h,p),v=fI(r,c,a),y=r.data??[],b=d[r.id]??r.offset??0;if(cI(i)){let e=a===`y`?[m[1],m[0]]:m;if(lI(i)&&iP(r)){let e=r.categoryGapRatio??pI,t=dI(i,e),n=t?0:e,o=t?0:r.barGapRatio??mI;f[r.id]=q({categoryGapRatio:n,barGapRatio:o,triggerTooltip:g},r,{offset:b},a===`x`?{height:v}:{width:v},{data:y,scale:t?i.copy().padding(0):i,tickNumber:_,colorScale:r.colorMap&&(r.colorMap.type===`ordinal`?rI(q({values:r.data},r.colorMap)):iI(r.colorMap))})}if(aP(r)&&(f[r.id]=q({triggerTooltip:g},r,{offset:b},a===`x`?{height:v}:{width:v},{data:y,scale:i,tickNumber:_,colorScale:r.colorMap&&(r.colorMap.type===`ordinal`?rI(q({values:r.data},r.colorMap)):iI(r.colorMap))})),aI(r.data)){let t=oI(r.data,e,r.tickNumber);f[r.id].valueFormatter=r.valueFormatter??t}return}if(r.scaleType===`band`||r.scaleType===`point`)return;let x=r,S=x.scaleType??`linear`;f[r.id]=q({triggerTooltip:g},x,{offset:b},a===`x`?{height:v}:{width:v},{data:y,scaleType:S,scale:i,tickNumber:_,colorScale:x.colorMap&&nI(x.colorMap),valueFormatter:r.valueFormatter??tI(_,TN(S,m.map(e=>i.invert(e)),m))})}),{axis:f,axisIds:r.map(({id:e})=>e)}}function _I(e){return e!=null}function vI(e,t,n,r){let i=e?.length??0,a=Math.floor(t*i/100),o=Math.ceil(n*i/100);return function(t,n){return(t[r]??e?.[n])==null||n>=a&&n=s&&n<=c}}var bI=e=>({currentAxisId:t,seriesXAxisId:n,seriesYAxisId:r,isDefaultAxis:i})=>(a,o)=>!(t===n?r:n)||i?Object.values(e??{})[0]?.(a,o)??!0:[r,n].filter(e=>e!==t).map(t=>e[t??``]).filter(_I).every(e=>e(a,o)),xI=e=>(t=[])=>t.reduce((t,n)=>{let{zoom:r,id:i,reverse:a,scaleType:o}=n,s=QF(r,i,e,XF(e,o,a));return s&&(t[i]=s),t},{}),SI=.2;function CI(e,t,n){let r=t===`x`?[e.left,e.left+e.width]:[e.top+e.height,e.top];return n.reverse?[r[1],r[0]]:r}var wI=new WeakMap;function TI(e,t,n){let r=wI.get(e);r||(r=new Map,wI.set(e,r));let i=r.get(t);return i||(i=n(),r.set(t,i)),i}function EI(e,t){let n=[0,1];if(iP(e)){let r=e.categoryGapRatio??SI;return TI(t,`band:${r}`,()=>xN(t,n).paddingInner(r).paddingOuter(r/2))}if(aP(e))return TI(t,`point`,()=>SN(t,n));let r=TN(e.scaleType??`linear`,t,n);return sP(e)&&e.constant!=null&&r.constant(e.constant),r}var DI=(e,t)=>{let n=e[1]-e[0],r=t[1]-t[0];return[e[0]-t[0]*n/r,e[1]+(100-t[1])*n/r]},OI=class{constructor(e=1/0,t=Float64Array,n=Uint32Array){let r=e!==1/0;this.ids=r?new n(e):[],this.values=r?new t(e):[],this.capacity=e,this.length=0}clear(){this.length=0}push(e,t){if(this.length===this.capacity)throw RangeError(`Queue is at capacity.`);let n=this.length++;for(;n>0;){let e=n-1>>1,r=this.values[e];if(t>=r)break;this.ids[n]=this.ids[e],this.values[n]=r,n=e}this.ids[n]=e,this.values[n]=t}pop(){if(this.length===0)return;let e=this.ids,t=this.values,n=e[0],r=--this.length;if(r>0){let n=e[r],i=t[r],a=0,o=r>>1;for(;a=i)break;e[a]=e[s],t[a]=t[s],a=s}e[a]=n,t[a]=i}return n}peek(){return this.length>0?this.ids[0]:void 0}peekValue(){return this.length>0?this.values[0]:void 0}shrink(){Array.isArray(this.ids)&&(this.ids.length=this.length),Array.isArray(this.values)&&(this.values.length=this.length)}},kI=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],AI=3,jI=class e{static from(t,n=0){if(n%8!=0)throw Error(eD(13));if(!t||t.byteLength===void 0||t.buffer)throw Error(eD(14));let[r,i]=new Uint8Array(t,n+0,2);if(r!==251)throw Error(eD(15));let a=i>>4;if(a!==AI)throw Error(eD(16,a,AI));let o=kI[i&15];if(!o)throw Error(eD(17));let[s]=new Uint16Array(t,n+2,1),[c]=new Uint32Array(t,n+4,1);return new e(c,s,o,void 0,t,n)}constructor(e,t=16,n=Float64Array,r=ArrayBuffer,i,a=0){if(e===void 0)throw Error(eD(18));if(isNaN(e)||e<=0)throw Error(eD(19,e));this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.byteOffset=a;let o=e,s=o;this._levelBounds=[o*4];do o=Math.ceil(o/this.nodeSize),s+=o,this._levelBounds.push(s*4);while(o!==1);this.ArrayType=n,this.IndexArrayType=s<16384?Uint16Array:Uint32Array;let c=kI.indexOf(n),l=s*4*n.BYTES_PER_ELEMENT;if(c<0)throw Error(eD(20,n));if(i)this.data=i,this._boxes=new n(i,a+8,s*4),this._indices=new this.IndexArrayType(i,a+8+l,s),this._pos=s*4,this.minX=this._boxes[this._pos-4],this.minY=this._boxes[this._pos-3],this.maxX=this._boxes[this._pos-2],this.maxY=this._boxes[this._pos-1];else{let i=this.data=new r(8+l+s*this.IndexArrayType.BYTES_PER_ELEMENT);this._boxes=new n(i,8,s*4),this._indices=new this.IndexArrayType(i,8+l,s),this._pos=0,this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,new Uint8Array(i,0,2).set([251,48+c]),new Uint16Array(i,2,1)[0]=t,new Uint32Array(i,4,1)[0]=e}this._queue=new OI}add(e,t,n=e,r=t){let i=this._pos>>2,a=this._boxes;return this._indices[i]=i,a[this._pos++]=e,a[this._pos++]=t,a[this._pos++]=n,a[this._pos++]=r,ethis.maxX&&(this.maxX=n),r>this.maxY&&(this.maxY=r),i}finish(){if(this._pos>>2!==this.numItems)throw Error(eD(21,this._pos>>2,this.numItems));let e=this._boxes;if(this.numItems<=this.nodeSize){e[this._pos++]=this.minX,e[this._pos++]=this.minY,e[this._pos++]=this.maxX,e[this._pos++]=this.maxY;return}let t=this.maxX-this.minX||1,n=this.maxY-this.minY||1,r=new Uint32Array(this.numItems),i=65535;for(let a=0,o=0;a>2]=t,e[this._pos++]=i,e[this._pos++]=a,e[this._pos++]=o,e[this._pos++]=s}}}search(e,t,n,r,i){if(this._pos!==this._boxes.length)throw Error(eD(22));let a=this._boxes.length-4,o=[],s=[];for(;a!==void 0;){let c=Math.min(a+this.nodeSize*4,NI(a,this._levelBounds));for(let l=a;lthis._boxes[l+2]||t>this._boxes[l+3])continue;let c=this._indices[l>>2]|0;a>=this.numItems*4?o.push(c):(i===void 0||i(c))&&(s.push(c),s.push(this._boxes[l]),s.push(this._boxes[l+1]))}a=o.pop()}return s}neighbors(e,t,n=1/0,r=1/0,i,a=MI){if(this._pos!==this._boxes.length)throw Error(eD(23));let o=this._boxes.length-4,s=this._queue,c=[];outer:for(;o!==void 0;){let l=Math.min(o+this.nodeSize*4,NI(o,this._levelBounds));for(let n=o;n>2]|0,l=this._boxes[n],u=this._boxes[n+1],d=this._boxes[n+2],f=this._boxes[n+3],p=a(ed?e-d:0,tf?t-f:0);p>r||(o>=this.numItems*4?s.push(c<<1,p):(i===void 0||i(c))&&s.push((c<<1)+1,p))}for(;s.length&&s.peek()&1;)if(s.peekValue()>r||(c.push(s.pop()>>1),c.length===n))break outer;o=s.length?s.pop()>>1:void 0}return s.clear(),c}};function MI(e,t){return e*e+t*t}function NI(e,t){let n=0,r=t.length-1;for(;n>1;t[i]>e?r=i:n=i+1}return t[n]}function PI(e,t,n,r,i,a){if(Math.floor(r/a)>=Math.floor(i/a))return;let o=e[r],s=e[r+i>>1],c=e[i],l=c,u=Math.max(o,s);c>u?l=u:u===o?l=Math.max(s,c):u===s&&(l=Math.max(o,c));let d=r-1,f=i+1;for(;;){do d++;while(e[d]l);if(d>=f)break;FI(e,t,n,d,f)}PI(e,t,n,r,f,a),PI(e,t,n,f+1,i,a)}function FI(e,t,n,r,i){let a=e[r];e[r]=e[i],e[i]=a;let o=4*r,s=4*i,c=t[o],l=t[o+1],u=t[o+2],d=t[o+3];t[o]=t[s],t[o+1]=t[s+1],t[o+2]=t[s+2],t[o+3]=t[s+3],t[s]=c,t[s+1]=l,t[s+2]=u,t[s+3]=d;let f=n[r];n[r]=n[i],n[i]=f}function II(e,t){let n=e^t,r=65535^n,i=65535^(e|t),a=e&(t^65535),o=n|r>>1,s=n>>1^n,c=i>>1^r&a>>1^i,l=n&i>>1^a>>1^a;n=o,r=s,i=c,a=l,o=n&n>>2^r&r>>2,s=n&r>>2^r&(n^r)>>2,c^=n&i>>2^r&a>>2,l^=r&i>>2^(n^r)&a>>2,n=o,r=s,i=c,a=l,o=n&n>>4^r&r>>4,s=n&r>>4^r&(n^r)>>4,c^=n&i>>4^r&a>>4,l^=r&i>>4^(n^r)&a>>4,n=o,r=s,i=c,a=l,c^=n&i>>8^r&a>>8,l^=r&i>>8^(n^r)&a>>8,n=c^c>>1,r=l^l>>1;let u=e^t,d=r|65535^(u|n);return u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,d=(d|d<<8)&16711935,d=(d|d<<4)&252645135,d=(d|d<<2)&858993459,d=(d|d<<1)&1431655765,(d<<1|u)>>>0}var LI=e=>typeof e.size==`function`;function RI(e){let[t,n]=e;return e=>t+Math.max(Math.min(e,1),0)*(n-t)}function zI(e){if(e.type===`piecewise`)return KA(e.thresholds,e.sizes);if(LI(e))return hN([e.min??0,e.max??100],e.size);switch(e.interpolator??`sqrt`){case`log`:return gN([e.min??0,e.max??100],RI(e.size));case`linear`:return hN([e.min??0,e.max??100],RI(e.size));default:return vN([e.min??0,e.max??100],RI(e.size))}}function BI(e){return e.values?IO(e.values,e.sizes).unknown(e.unknownSize??null):IO(e.sizes.map((e,t)=>t),e.sizes).unknown(e.unknownSize??null)}function VI(e){return e.type===`ordinal`?BI(e):zI(e)}function HI(e,t){return e.id===void 0?q({id:t},e):e}function UI(e){return e.colorMap?q({},e,{colorScale:e.colorMap.type===`ordinal`&&e.data?rI(q({values:e.data},e.colorMap)):iI(e.colorMap.type===`continuous`?q({min:e.min,max:e.max},e.colorMap):e.colorMap)}):e}function WI(e){return e.sizeMap?q({},e,{sizeScale:e.sizeMap.type===`ordinal`?BI(q({values:e.data},e.sizeMap)):VI(e.sizeMap.type===`continuous`?q({min:e.min,max:e.max},e.sizeMap):e.sizeMap)}):e}function GI(e,t){if(!e||e.length===0)return{axis:{},axisIds:[]};let n={},r=[];return e.forEach((e,i)=>{let a=e.dataKey,o=e.id??`defaultized-z-axis-${i}`;if(e.data!==void 0||a===void 0&&!e.valueGetter){n[o]=WI(UI(HI(e,o))),r.push(o);return}if(t===void 0)throw Error(eD(41));n[o]=WI(UI(HI(q({},e,{data:e.valueGetter?t.map(t=>e.valueGetter(t)):t.map(e=>e[a])}),o))),r.push(o)}),{axis:n,axisIds:r}}var KI=({params:e,store:t})=>{let{zAxis:n,dataset:r}=e,i=b.useRef(!0);return b.useEffect(()=>{if(i.current){i.current=!1;return}t.set(`zAxis`,GI(n,r))},[n,r,t]),{}};KI.params={zAxis:!0,dataset:!0},KI.getInitialState=e=>({zAxis:GI(e.zAxis,e.dataset)});var qI=Q(e=>e,e=>e.zAxis),JI=(e,t)=>{let n=t?.sizeScale;return n?r=>{if(t?.data?.[r]!==void 0){let e=n(t.data[r]);if(e!=null&&!Number.isNaN(e))return e}let i=e.data[r];if(i!=null){let e=n(i.sizeValue);if(e!=null&&!Number.isNaN(e))return e}return e.markerSize}:()=>e.markerSize},YI=e=>{let t=new Map;return e.forEach(e=>{t.set(e.axisId,e)}),t},XI=e=>e.zoom,ZI=Q(XI,e=>e?.isInteracting),QI=$(XI,function(e){return e?.zoomData&&YI(e?.zoomData)}),$I=Q(QI,(e,t)=>e?.get(t)),eL=$(qD,JD,function(e,t){return q({},xI(`x`)(e),xI(`y`)(t))});Q(eL,(e,t)=>e[t]);var tL=Q(qP,function(e){return wP(e.width)}),nL=Q(qP,function(e){return wP(e.height)}),rL=$(qD,nP,tL,yP,function(e,t,n,r){return{axes:e,domains:kP(e,t,n,r,`x`)}}),iL=$(JD,nP,nL,bP,function(e,t,n,r){return{axes:e,domains:kP(e,t,n,r,`y`)}}),aL=$(QI,eL,rL,iL,function(e,t,{axes:n,domains:r},{axes:i,domains:a}){if(!e||!t)return;let o=!1,s={},c=[...n??[],...i??[]];for(let i=0;i=100)continue;let d=i<(n?.length??0)?`x`:`y`;if(l.scaleType===`band`||l.scaleType===`point`)s[l.id]=vI(l.data,u.start,u.end,d);else{let{domain:e}=d===`x`?r[l.id]:a[l.id];s[l.id]=yI(e,u.start,u.end,d,l.data)}o=!0}if(o)return bI(s)}),oL=$(nP,HN,QI,eL,aL,rL,function(e,t,n,r,i,{axes:a,domains:o}){let s={};return a?.forEach((a,c)=>{let l=o[a.id].domain;if(iP(a)||aP(a)){s[a.id]=l;return}let u=n?.get(a.id),d=r?.[a.id],f=u===void 0&&!d?i:void 0;if(!f){s[a.id]=l;return}let p=o[a.id].tickNumber,m=_P(a,`x`,t,c,e,f);s[a.id]=DP(a,`x`,c,e,m,p)}),s}),sL=$(nP,HN,QI,eL,aL,iL,function(e,t,n,r,i,{axes:a,domains:o}){let s={};return a?.forEach((a,c)=>{let l=o[a.id].domain;if(iP(a)||aP(a)){s[a.id]=l;return}let u=n?.get(a.id),d=r?.[a.id],f=u===void 0&&!d?i:void 0;if(!f){s[a.id]=l;return}let p=o[a.id].tickNumber,m=_P(a,`y`,t,c,e,f);s[a.id]=DP(a,`y`,c,e,m,p)}),s}),cL=$(qD,oL,function(e,t){let n={};return e?.forEach(e=>{let r=e,i=t[r.id];n[r.id]=EI(r,i)}),n}),lL=$(JD,sL,function(e,t){let n={};return e?.forEach(e=>{let r=e,i=t[r.id];n[r.id]=EI(r,i)}),n}),uL=$(qD,cL,qP,QI,function(e,t,n,r){let i={};return e?.forEach(e=>{let a=e,o=r?.get(a.id),s=o?[o.start,o.end]:[0,100],c=CI(n,`x`,a),l=t[a.id].copy(),u=DI(c,s);l.range(u),i[a.id]=l}),i}),dL=$(JD,lL,qP,QI,function(e,t,n,r){let i={};return e?.forEach(e=>{let a=e,o=r?.get(a.id),s=o?[o.start,o.end]:[0,100],c=CI(n,`y`,a),l=t[a.id].copy(),u=DI(cI(l)?c.reverse():c,s);l.range(u),i[a.id]=l}),i}),fL=$(qP,nP,HN,QI,rL,uL,RP,YD,function(e,t,n,r,{axes:i,domains:a},o,s,c){return gI({scales:o,drawingArea:e,formattedSeries:t,axis:i,seriesConfig:n,axisDirection:`x`,zoomMap:r,domains:a,autoSizes:s,axesGap:c})}),pL=$(qP,nP,HN,QI,iL,dL,BP,YD,function(e,t,n,r,{axes:i,domains:a},o,s,c){return gI({scales:o,drawingArea:e,formattedSeries:t,axis:i,seriesConfig:n,axisDirection:`y`,zoomMap:r,domains:a,autoSizes:s,axesGap:c})});Q(fL,pL,(e,t,n)=>e?.axis[n]??t?.axis[n]),Q(qD,JD,(e,t,n)=>{let r=e?.find(e=>e.id===n)??t?.find(e=>e.id===n)??null;if(r)return r});var mL=Q(qD,e=>e[0].id),hL=Q(JD,e=>e[0].id),gL=new Map,_L=()=>gL,vL=$(nP,cL,lL,mL,hL,qI,function(e,t,n,r,i,a){let o=e.scatter,s=new Map;if(!o)return s;let c=a?.axis??{},l=a?.axisIds??[];return o.seriesOrder.forEach(e=>{let a=o.series[e],{data:u,xAxisId:d=r,yAxisId:f=i}=a;if(u.length===0)return;let p=new jI(u.length),m=c[a.sizeAxisId??l[0]],h=!m||!m.sizeScale,g=h?a.markerSize??0:JI(a,m),_=h?g:0,v=t[d],y=n[f];for(let e=0;e{let i=yL(n);return i>t&&(r===0||Math.abs(t-i)<=Math.abs(t-yL(e[r-1])))||i<=t&&(r===e.length-1||Math.abs(t-i)=r.length?-1:i?r.length-1-a:a}function SL(e,t,n,r){if(!cI(e)){if(r===null){let t=e.invert(n);return Number.isNaN(t)?null:t}return t[r]}return r===null||r<0||r>=t.length?null:t[r]}function CL(e,t){let n=e.getBoundingClientRect(),r=t.clientX-n.left,i=t.clientY-n.top;if(typeof DOMMatrix>`u`)return{x:r,y:i,z:0,w:1,matrixTransform:()=>({x:r,y:i,z:0,w:1})};let a=getComputedStyle(e),o=new DOMMatrix(a.transform);return new DOMPoint(r,i).matrixTransform(o.inverse())}var wL=({store:e})=>({instance:{cleanInteraction:_E(function(){e.update({interaction:q({},e.state.interaction,{pointer:null})})}),setLastUpdateSource:_E(function(t){e.state.interaction.lastUpdate!==t&&e.set(`interaction`,q({},e.state.interaction,{lastUpdate:t}))}),setPointerCoordinate:_E(function(t){e.set(`interaction`,q({},e.state.interaction,{pointer:t,lastUpdate:t===null?e.state.interaction.lastUpdate:`pointer`}))}),handlePointerEnter:_E(function(t){e.set(`interaction`,q({},e.state.interaction,{pointerType:t.pointerType}))}),handlePointerLeave:_E(function(){e.set(`interaction`,q({},e.state.interaction,{pointerType:null}))})}});wL.getInitialState=()=>({interaction:{item:null,pointer:null,lastUpdate:`pointer`,pointerType:null}}),wL.params={};var TL=e=>e.interaction,EL=Q(TL,e=>e!==void 0),DL=Q(TL,e=>e?.pointer??null),OL=Q(DL,e=>e&&e.x),kL=Q(DL,e=>e&&e.y),AL=Q(TL,e=>e?.lastUpdate),jL=Q(TL,e=>e?.pointerType??null);function ML(e,t,n=t.axisIds[0]){return Array.isArray(n)?n.map(n=>xL(t.axis[n],e)):xL(t.axis[n],e)}var NL=(e,t,n)=>{if(e===null)return null;let r=ML(e,t,n);return r===-1?null:r},PL=Q(OL,fL,NL),FL=Q(kL,pL,NL),IL=Q(OL,kL,fL,pL,(e,t,n,r)=>[...e===null?[]:n.axisIds.map(t=>({axisId:t,dataIndex:ML(e,n,t)})),...t===null?[]:r.axisIds.map(e=>({axisId:e,dataIndex:ML(t,r,e)}))].filter(e=>e.dataIndex!==null&&e.dataIndex>=0));function LL(e,t,n,r=t.axisIds[0]){return Array.isArray(r)?r.map((r,i)=>{let a=t.axis[r];return SL(a.scale,a.data,e,n[i])}):SL(t.axis[r].scale,t.axis[r].data,e,n)}var RL=Q(OL,fL,PL,(e,t,n,r)=>e===null||t.axisIds.length===0?null:LL(e,t,n,r)),zL=Q(kL,pL,FL,(e,t,n,r)=>e===null||t.axisIds.length===0?null:LL(e,t,n,r));function BL(e){return e.setPointerCoordinate!==void 0}var VL=new Set([`bar`,`rangeBar`,`line`]);function HL({axisId:e,dataIndex:t,isXAxis:n,axes:r,processedSeries:i}){let a=r[e]?.data?.[t];if(a===void 0)return null;let o={};return Object.keys(i).filter(e=>VL.has(e)).forEach(r=>{let a=i[r];a?.seriesOrder.forEach(r=>{let i=a.series[r],s=i.xAxisId,c=i.yAxisId,l=n?s:c;(l===void 0||l===e)&&(o[r]=i.data[t])})}),{dataIndex:t,axisValue:a,seriesValues:o}}var UL=({params:e,store:t,instance:n})=>{let{chartsLayerContainerRef:r}=n,{xAxis:i,yAxis:a,dataset:o,onHighlightedAxisChange:s,onTooltipAxisChange:c,axesGap:l}=e,u=t.use(nP),d=t.use(EL),{axis:f,axisIds:p}=t.use(fL),{axis:m,axisIds:h}=t.use(pL);e.highlightedAxis,e.tooltipAxis,UC(()=>{e.highlightedAxis!==void 0&&t.set(`controlledCartesianAxisHighlight`,e.highlightedAxis)},[t,e.highlightedAxis]),UC(()=>{e.tooltipAxis!==void 0&&t.set(`controlledCartesianAxisTooltip`,e.tooltipAxis)},[t,e.tooltipAxis]);let g=b.useRef(!0);b.useEffect(()=>{if(g.current){g.current=!1;return}t.set(`cartesianAxis`,{axesGap:l,x:$F(i,o,l),y:eI(a,o,l)})},[i,a,o,l,t]);let _=p[0],v=h[0];RD(t,IL,(e,t)=>{if(!(!s&&!c)&&!Object.is(e,t)){if(e.length!==t.length){s?.(t),c?.(t);return}e?.some(({axisId:e,dataIndex:n},r)=>t[r].axisId!==e||t[r].dataIndex!==n)&&(s?.(t),c?.(t))}});let y=BL(n);return b.useEffect(()=>{let t=r.current;if(!d||!y||!t||e.disableAxisListener)return()=>{};let i=n.addInteractionListener(`moveEnd`,e=>{e.detail.activeGestures.pan||n.cleanInteraction()}),a=n.addInteractionListener(`panEnd`,e=>{e.detail.activeGestures.move||n.cleanInteraction()}),o=n.addInteractionListener(`quickPressEnd`,e=>{!e.detail.activeGestures.move&&!e.detail.activeGestures.pan&&n.cleanInteraction()}),s=e=>{let r=e.detail.srcEvent,i=e.detail.target,a=CL(t,r);if(e.detail.srcEvent.buttons>=1&&i?.hasPointerCapture(e.detail.srcEvent.pointerId)&&!i?.closest(`[data-charts-zoom-slider]`)&&i?.releasePointerCapture(e.detail.srcEvent.pointerId),!n.isPointInside(a.x,a.y,i)){n.cleanInteraction?.();return}n.setPointerCoordinate(a)},c=n.addInteractionListener(`move`,s),l=n.addInteractionListener(`pan`,s),u=n.addInteractionListener(`quickPress`,s);return()=>{c.cleanup(),i.cleanup(),l.cleanup(),a.cleanup(),u.cleanup(),o.cleanup()}},[r,t,f,_,m,v,n,e.disableAxisListener,d,y]),b.useEffect(()=>{let t=r.current,i=e.onAxisClick;if(t===null||!i)return()=>{};let a=n.addInteractionListener(`tap`,e=>{let n=CL(t,e.detail.srcEvent),r=xL(f[_],n.x),a=r!==-1,o=a?r:xL(m[v],n.y);if(o===-1)return;let s=HL({axisId:a?p[0]:h[0],dataIndex:o,isXAxis:a,axes:a?f:m,processedSeries:u});s!==null&&i(e.detail.srcEvent,s)});return()=>{a.cleanup()}},[e.onAxisClick,u,r,f,p,m,h,_,v,n]),{}};UL.params={xAxis:!0,yAxis:!0,dataset:!0,onAxisClick:!0,disableAxisListener:!0,onHighlightedAxisChange:!0,highlightedAxis:!0,onTooltipAxisChange:!0,tooltipAxis:!0,axesGap:!0},UL.getDefaultizedParams=({params:e})=>q({},e,{axesGap:e.axesGap??0,colors:e.colors??YN,theme:e.theme??`light`,defaultizedXAxis:$F(e.xAxis,e.dataset,e.axesGap??0),defaultizedYAxis:eI(e.yAxis,e.dataset,e.axesGap??0)}),UL.getInitialState=e=>q({cartesianAxis:{axesGap:e.axesGap,x:e.defaultizedXAxis,y:e.defaultizedYAxis}},e.highlightedAxis===void 0?{}:{controlledCartesianAxisHighlight:e.highlightedAxis});var WL=Object.is;function GL(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!WL(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var KL=e=>e.keyboardNavigation;Q(KL,(e,t)=>e?.isFocused===!0&&e?.item!=null&&GL(e.item,t));var qL=Q(KL,e=>e?.isFocused===!0&&e?.item!=null),JL=Q(KL,e=>e?.isFocused===!0?e?.item??null:null),YL=Q(KL,e=>e?.item??null),XL=Q(KL,e=>!!e?.enabled),ZL=Q(KL,e=>e.experimentalFeatures?.keyboardActivation,(e,t)=>t===!0&&!!e?.enabled),QL=e=>(t,n,r)=>{if(t==null||!(`dataIndex`in t)||t.dataIndex===void 0)return;let i=r[t.type]?.series[t.seriesId];if(!i)return;let a=e===`x`?`xAxisId`in i&&i.xAxisId:`yAxisId`in i&&i.yAxisId;return(a===void 0||a===!1)&&(a=n.axisIds[0]),{axisId:a,dataIndex:t.dataIndex}},$L=Q(JL,fL,nP,QL(`x`)),eR=Q(JL,pL,nP,QL(`y`)),tR=$(KL,function(e){if(e?.isFocused!==!0||e?.item==null)return null;let{type:t,seriesId:n}=e.item;return t===void 0||n===void 0?null:e.item}),nR=e=>e.brush;Q(nR,e=>e?.start),Q(nR,e=>e?.current),$(Q(nR,e=>e?.start?.x??null),Q(nR,e=>e?.start?.y??null),Q(nR,e=>e?.current?.x??null),Q(nR,e=>e?.current?.y??null),(e,t,n,r)=>e===null||t===null||n===null||r===null?null:{start:{x:e,y:t},current:{x:n,y:r}}),Q(Q(nP,e=>{let t=!1,n=!1;return e&&Object.entries(e).forEach(([e,r])=>{Object.values(r.series).some(e=>e.layout===`horizontal`)&&(t=!0),e===`scatter`&&r.seriesOrder.length>0&&(n=!0)}),n?`xy`:t?`y`:`x`}),Q(eL,function(e){let t=!1,n=!1;return Object.values(e).forEach(e=>{e.axisDirection===`y`&&(n=!0),e.axisDirection===`x`&&(t=!0)}),t&&n?`xy`:n?`y`:t?`x`:null}),(e,t)=>t??e);var rR=Q(nR,e=>e?.enabled||e?.isZoomBrushEnabled),iR=Q(rR,nR,(e,t)=>e&&t?.start!==null&&t?.current!==null),aR=Q(nR,iR,(e,t)=>t&&e?.preventHighlight),oR=Q(nR,iR,(e,t)=>t&&e?.preventTooltip),sR=({store:e,instance:t,params:n})=>{let{chartsLayerContainerRef:r}=t,i=e.use(rR);UC(()=>{e.set(`brush`,q({},e.state.brush,{enabled:n.brushConfig.enabled,preventTooltip:n.brushConfig.preventTooltip,preventHighlight:n.brushConfig.preventHighlight}))},[e,n.brushConfig.enabled,n.brushConfig.preventTooltip,n.brushConfig.preventHighlight]);let a=_E(function(t){e.set(`brush`,q({},e.state.brush,{start:e.state.brush.start??t,current:t}))}),o=_E(function(){e.set(`brush`,q({},e.state.brush,{start:null,current:null}))}),s=_E(function(t){e.state.brush.isZoomBrushEnabled!==t&&e.set(`brush`,q({},e.state.brush,{isZoomBrushEnabled:t}))});return b.useEffect(()=>{let e=r.current;if(e===null||!i)return()=>{};let n=t=>{if(t.detail.target?.closest(`[data-charts-zoom-slider]`))return;let n=CL(e,{clientX:t.detail.initialCentroid.x,clientY:t.detail.initialCentroid.y});a(n)},s=t=>{let n=CL(e,{clientX:t.detail.centroid.x,clientY:t.detail.centroid.y});a(n)},c=t.addInteractionListener(`brushStart`,n),l=t.addInteractionListener(`brush`,s),u=t.addInteractionListener(`brushCancel`,o),d=t.addInteractionListener(`brushEnd`,o);return()=>{c.cleanup(),l.cleanup(),d.cleanup(),u.cleanup()}},[r,t,e,o,a,i]),{instance:{setBrushCoordinates:a,clearBrush:o,setZoomBrushEnabled:s}}};sR.params={brushConfig:!0},sR.getDefaultizedParams=({params:e})=>q({},e,{brushConfig:{enabled:e?.brushConfig?.enabled??!1,preventTooltip:e?.brushConfig?.preventTooltip??!0,preventHighlight:e?.brushConfig?.preventHighlight??!0}}),sR.getInitialState=e=>({brush:{enabled:e.brushConfig.enabled,isZoomBrushEnabled:!1,preventTooltip:e.brushConfig.preventTooltip,preventHighlight:e.brushConfig.preventHighlight,start:null,current:null}});function cR(e,t,n){if(e===`pointer`){if(t)return[t];if(n)return[n]}if(e===`keyboard`){if(n)return[n];if(t)return[t]}return[]}var lR=e=>e.controlledCartesianAxisHighlight,uR=(e,t,n,r,i,a)=>a?[]:n===void 0?cR(i,e!==null&&{axisId:t.axisIds[0],dataIndex:e},r!=null&&r):n.filter(e=>t.axis[e.axisId]!==void 0).map(e=>e),dR=$(PL,fL,lR,$L,AL,aR,uR);$(FL,pL,lR,eR,AL,aR,uR);var fR=(e,t,n,r,i,a,o)=>{if(o)return[];if(r!==void 0)return r.map(e=>q({},e,{value:n.axis[e.axisId]?.data?.[e.dataIndex]})).filter(({value:e})=>e!==void 0);let s=t!=null&&{axisId:n.axisIds[0],value:t};s&&e!=null&&(s.dataIndex=e);let c=i!=null&&n.axis[i.axisId]?.data?.[i.dataIndex];return cR(a,s,i!=null&&c!=null&&q({},i,{value:c}))},pR=$(PL,RL,fL,lR,$L,AL,aR,fR),mR=$(FL,zL,pL,lR,eR,AL,aR,fR),hR=(e,t)=>e===void 0?[t.axis[t.axisIds[0]]]:e.map(e=>t.axis[e.axisId]??null).filter(e=>e!==null);Q(lR,fL,hR),Q(lR,pL,hR);function gR(e,t,n){if(n===0)return{barWidth:e/t,offset:0};let r=e/(t+(t-1)*n);return{barWidth:r,offset:n*r}}function _R(e,t){return e.bandwidth()===0?Math.floor((t-Math.min(...e.range())+e.step()/2)/e.step()):Math.floor((t-Math.min(...e.range()))/e.step())}function vR(e,t,n){if(!lI(e.scale))return-1;let r=_R(e.scale,n),{barWidth:i,offset:a}=gR(e.scale.bandwidth(),t.groupNumber,e.barGapRatio),o=t.groupIndex*(i+a),s=e.data?.[r];if(s==null)return-1;let c=e.scale(s);if(c==null)return-1;let l=c+o,u=l+i;return n>=Math.min(l,u)&&n<=Math.max(l,u)?r:-1}var yR=Q(fL,pL,nP,function({axis:e,axisIds:t},{axis:n,axisIds:r},i,a){let{series:o,stackingGroups:s=[]}=i?.bar??{},c=t[0],l=r[0],u;for(let t=0;t=Math.min(x,S)&&v<=Math.max(x,S)&&(u={seriesId:i,dataIndex:y})}}if(u)return{type:`bar`,seriesId:u.seriesId,dataIndex:u.dataIndex}});function bR(e,t){if(e===t)return!0;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(e.constructor!==t.constructor)return!1;if(Array.isArray(e)){let n=e.length;if(n!==t.length)return!1;for(let r=0;r(e(t)??0)+e.bandwidth()/2;let t=e.domain();return t[0]===t[1]?n=>n===t[0]?e(n):NaN:t=>e(t)}var SR=e=>e.controlledCartesianAxisTooltip,CR=[];function wR(e,t){return e===void 0||!t.axis[e.axisId]?.triggerTooltip?CR:[e]}var TR=xD({memoizeOptions:{resultEqualityCheck:bR}})(SR,OL,fL,AL,$L,(e,t,n,r,i)=>{if(e!==void 0){if(e.length===0)return CR;let t=new Set(n.axisIds),r=e.filter(({axisId:e})=>t.has(e));return r.length===e.length?e:r}return r===`keyboard`?wR(i,n):t===null?CR:n.axisIds.filter(e=>n.axis[e].triggerTooltip).map(e=>({axisId:e,dataIndex:xL(n.axis[e],t)})).filter(({dataIndex:e})=>e>=0)}),ER=xD({memoizeOptions:{resultEqualityCheck:bR}})(SR,kL,pL,AL,eR,(e,t,n,r,i)=>{if(e!==void 0){if(e.length===0)return CR;let t=new Set(n.axisIds),r=e.filter(({axisId:e})=>t.has(e));return r.length===e.length?e:r}return r===`keyboard`?wR(i,n):t===null?CR:n.axisIds.filter(e=>n.axis[e].triggerTooltip).map(e=>({axisId:e,dataIndex:xL(n.axis[e],t)})).filter(({dataIndex:e})=>e>=0)}),DR=Q(TR,ER,(e,t)=>e.length>0||t.length>0);function OR(e,t){let n=t.axis[e.axisId];if(!n)return null;let r=n.data?.[e.dataIndex];if(r==null)return null;let i=xR(n.scale)(r);return i===void 0?null:i}var kR=$(TR,ER,fL,pL,qP,function(e,t,n,r,i,a){if(e.length===0&&t.length===0)return null;if(e.length>0){let t=OR(e[0],n);if(t===null)return null;switch(a){case`left`:case`right`:return{x:t,y:i.top+i.height/2};case`bottom`:return{x:t,y:i.top+i.height};default:return{x:t,y:i.top}}}if(t.length>0){let e=OR(t[0],r);if(e===null)return null;switch(a){case`right`:return{x:i.left+i.width/2,y:e};case`bottom`:case`top`:return{x:i.left+i.width/2,y:e};default:return{x:i.left+i.width/2,y:e}}}return null}),AR={},jR=new Map;function MR(e){return{axisId:e,start:0,end:100}}var NR=e=>e.sampling,PR=$(NR,nP,HN,function(e,t,n){if(!e?.enabled)return AR;let r;return Object.keys(t).forEach(i=>{let a=e.methods[i];if(!a||a===`none`)return;let o=n[i]?.sampler,s=t[i];if(!(!o||!s))for(let e of s.seriesOrder){let t=o.build(s.series[e]);t&&(r??={},r[e]=t)}}),r??AR}),FR=$(NR,QI,fL,pL,qP,eL,HN,function(e,t,n,r,i,a,o){if(!e?.enabled)return jR;let s=o.bar?.sampler?.bucketSizeAt??o.line?.sampler?.bucketSizeAt;if(!s)return jR;let c=new Map;return[[n,i.width],[r,i.height]].forEach(([e,n])=>{e.axisIds.forEach(r=>{let i=e.axis[r].data,o=t?.get(r)??MR(r),l=a[r]?.minSpan??0;i&&c.set(r,s(o.end-o.start,{dataLength:i.length,availableSize:n,minSpan:l}))})}),c}),IR=({store:e,params:t,instance:n})=>{t.tooltipItem,UC(()=>{if(e.state.tooltip.item!==t.tooltipItem){let r=t.tooltipItem?n.identifierWithType(t.tooltipItem,`seriesItem`):null;(e.state.tooltip.item===null||r===null?r!==e.state.tooltip.item:n.serializeIdentifier(e.state.tooltip.item)!==n.serializeIdentifier(r))&&e.set(`tooltip`,q({},e.state.tooltip,{item:r}))}},[e,n,t.tooltipItem]);let r=_E(function(r){let i=e.state.tooltip.item;if(i!==null&&(!r||n.serializeIdentifier(i)===n.serializeIdentifier(n.identifierWithType(r,`seriesItem`)))){t.onTooltipItemChange?.(null),e.state.tooltip.itemIsControlled||e.set(`tooltip`,q({},e.state.tooltip,{item:null}));return}});return{instance:{setTooltipItem:_E(function(n){GL(e.state.tooltip.item,n)||(t.onTooltipItemChange?.(n),e.state.tooltip.itemIsControlled||e.set(`tooltip`,q({},e.state.tooltip,{item:n})))}),removeTooltipItem:r}}};IR.getInitialState=(e,t)=>({tooltip:{itemIsControlled:e.tooltipItem!==void 0,item:e.tooltipItem==null?null:XN(t)(e.tooltipItem)}}),IR.params={tooltipItem:!0,onTooltipItemChange:!0};function LR(e){return e.key===`Enter`||e.key===` `}function RR(e,t){return e.type!==void 0&&e.type!==t.type||e.seriesId!==void 0&&(!(`seriesId`in t)||e.seriesId!==t.seriesId)?null:(e.type===void 0?0:1)+(e.seriesId===void 0?0:1)}function zR(e,t){let n=null,r=-1,i=-1;for(let a of e){let e=RR(a.scope,t),o=a.scope.priority??0;e!==null&&(a.scope.canActivate===void 0||a.scope.canActivate(t))&&(e>r||e===r&&o>i)&&(n=a.handler,r=e,i=o)}return n}var BR=({params:e,store:t,instance:n})=>{let{chartsLayerContainerRef:r}=n,i=b.useRef(new Map),a=b.useRef(0),o=b.useCallback((e,t)=>{let n=a.current;a.current+=1;let r=i.current;return r.set(n,{scope:e,handler:t}),()=>{r.delete(n)}},[]);return b.useEffect(()=>{let n=r.current;if(!n||e.disableKeyboardNavigation)return;function a(e){let n=e.currentTarget,r=e.relatedTarget;n&&r!==null&&n.contains(r)||t.state.keyboardNavigation.isFocused&&t.set(`keyboardNavigation`,q({},t.state.keyboardNavigation,{isFocused:!1}))}function o(){t.state.keyboardNavigation.isFocused||t.update(q({},t.state.highlight&&{highlight:q({},t.state.highlight,{lastUpdate:`keyboard`})},t.state.interaction&&{interaction:q({},t.state.interaction,{lastUpdate:`keyboard`})},{keyboardNavigation:q({},t.state.keyboardNavigation,{isFocused:!0})}))}function s(e){if(e.repeat||!LR(e)||!ZL(t.state))return;let n=t.state.keyboardNavigation.item;if(n===null||!t.state.keyboardNavigation.isFocused)return;let r=zR(i.current.values(),n);r!==null&&(e.preventDefault(),r(e,n))}function c(e){let n=t.state.keyboardNavigation.item,r=HN(t.state),i=n?.type;if(!i&&(i=Object.keys(tP(t.state)).find(e=>r[e]!==void 0),i===void 0))return;let a=r[i]?.keyboardFocusHandler?.(e);a&&(n=a(n,t.state),n!==t.state.keyboardNavigation.item&&(e.preventDefault(),t.update(q({},t.state.highlight&&{highlight:q({},t.state.highlight,{lastUpdate:`keyboard`})},t.state.interaction&&{interaction:q({},t.state.interaction,{lastUpdate:`keyboard`})},{keyboardNavigation:q({},t.state.keyboardNavigation,{item:n})}))))}return n.addEventListener(`keydown`,s),n.addEventListener(`keydown`,c),n.addEventListener(`focusout`,a),n.addEventListener(`focusin`,o),()=>{n.removeEventListener(`keydown`,s),n.removeEventListener(`keydown`,c),n.removeEventListener(`focusout`,a),n.removeEventListener(`focusin`,o)}},[r,e.disableKeyboardNavigation,t]),UC(()=>{t.set(`keyboardNavigation`,q({},t.state.keyboardNavigation,{enabled:!e.disableKeyboardNavigation}))},[t,e.disableKeyboardNavigation]),{instance:{registerItemActivationHandler:o}}};BR.getInitialState=e=>({keyboardNavigation:{item:null,isFocused:!1,enabled:!e.disableKeyboardNavigation}}),BR.params={disableKeyboardNavigation:!0};var VR=Q(e=>e.tooltip,e=>e?.item??null),HR=Q(VR,e=>e!==null),UR=Q(AL,VR,tR,(e,t,n)=>e===`keyboard`?n:t??null),WR=Q(AL,HR,qL,(e,t,n)=>e===`keyboard`?n:t),GR=({store:e,params:t,instance:n})=>(t.highlightedItem,UC(()=>{if(t.highlightedItem!==void 0&&e.state.highlight.item!==t.highlightedItem){if(t.highlightedItem===null){e.set(`highlight`,q({},e.state.highlight,{item:null}));return}let r=n.identifierWithType(t.highlightedItem,`highlightItem`),i=n.cleanIdentifier(r,`highlightItem`);e.set(`highlight`,q({},e.state.highlight,{item:i}))}},[e,t.highlightedItem,n]),{instance:{clearHighlight:_E(()=>{t.onHighlightChange?.(null);let n=e.state.highlight;n.item===null||n.isControlled||e.set(`highlight`,{item:null,lastUpdate:`pointer`,isControlled:!1})}),setHighlight:_E(r=>{let i=e.state.highlight,a=n.identifierWithType(r,`highlightItem`),o=n.cleanIdentifier(a,`highlightItem`);GL(i.item,o)||(t.onHighlightChange?.(o),!i.isControlled&&e.set(`highlight`,{item:o,lastUpdate:`pointer`,isControlled:!1}))})}});GR.getInitialState=(e,t)=>({highlight:{item:e.highlightedItem==null?e.highlightedItem:BN(t.seriesConfig.config,XN(t)(e.highlightedItem)),lastUpdate:`pointer`,isControlled:e.highlightedItem!==void 0}}),GR.params={highlightedItem:!0,onHighlightChange:!0};var KR=[KI,IR,wL,UL,GR];function qR(e){let{children:t,plugins:n=KR,pluginParams:r={}}=e,{contextValue:i}=GF(n,r);return(0,J.jsx)(JF.Provider,{value:i,children:t})}var JR=()=>{let e=b.useContext(JF);if(e==null)throw Error(eD(30));return e};function YR(e){`hasPointerCapture`in e.currentTarget&&e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId)}var XR=e=>{let{instance:t}=JR(),n=b.useRef(!1),r=_E(()=>{n.current=!0,t.setLastUpdateSource(`pointer`),t.setTooltipItem(e),t.setHighlight(e)}),i=_E(()=>{n.current=!1,t.removeTooltipItem(e),t.clearHighlight()});return b.useEffect(()=>()=>{n.current&&i()},[i]),b.useMemo(()=>({onPointerEnter:r,onPointerLeave:i,onPointerDown:YR}),[r,i])};function ZR(){let e=JR();if(!e)throw Error(eD(32));return e.store}function QR(e,t,n){return e?.highlight===`series`&&t?.seriesId===n}function $R(e,t,n){return QR(e,t,n)?!1:e?.fade===`global`&&t!=null||e?.fade===`series`&&t?.seriesId===n}function ez(e,t,n){return e?.highlight===`item`&&t?.seriesId===n?t.dataIndex:null}function tz(e,t,n){return QR(e,t,n)||ez(e,t,n)===t?.dataIndex?null:(e?.fade===`series`||e?.fade===`global`)&&t?.seriesId===n?t.dataIndex:null}var nz=e=>e.highlight,rz=$(nP,e=>{let t={};return Object.keys(e).forEach(n=>{t[n]=new Map;let r=e[n];r?.seriesOrder?.forEach(e=>{let i=r?.series[e];i?.highlightScope!==void 0&&t[n]?.set(e,i.highlightScope)})}),t}),iz=$(nz,tR,function(e,t){return e.isControlled||e.lastUpdate===`pointer`?e.item:t}),az=Q(rz,iz,function(e,t){if(!t)return null;let n=e[t.type]?.get(t.seriesId);return n===void 0?null:n}),oz=()=>`none`,sz=$(az,iz,HN,function(e,t,n){if(t===null||e===null)return oz;let r=n[t.type],i=r.isHighlightedCreator(e,t),a=r.isFadedCreator(e,t);return e=>i(e)?`highlighted`:a(e)?`faded`:`none`});function cz(e){return sz(e)}var lz=$(cz,function(e,t){return e(t)});function uz(e,t){return lz(e,t)}Q(az,iz,function(e,t,n){return QR(e,t,n)}),Q(az,iz,function(e,t,n){return $R(e,t,n)}),Q(az,iz,function(e,t,n){return tz(e,t,n)}),Q(az,iz,function(e,t,n){return ez(e,t,n)});function dz(){return!1}function fz(e,t){return!e||!t?dz:function(n){return n?(e.highlight===`series`||e.highlight===`item`&&n.dataIndex===t.dataIndex)&&n.seriesId===t.seriesId:!1}}function pz(){return!1}function mz(e,t){return!e||!t?pz:function(n){return n?e.fade===`series`?n.seriesId===t.seriesId&&n.dataIndex!==t.dataIndex:e.fade===`global`?n.seriesId!==t.seriesId||n.dataIndex!==t.dataIndex:!1:!1}}function hz(e){return ZR().use(uz,e)}function gz(e){return e}var{cbrt:_z,sqrt:vz,PI:yz}=Math,bz=(e,t,n,r,i)=>{let a=t+n*e,o=a**2+r;if(o>0){let e=vz(o);return _z(a+e)+_z(a-e)-i}let s=_z(vz(a*a-o)),c=a?Math.atan(vz(-o)/a):-yz/2,l;return l=n<0?(a>0?2*yz:yz)-c:i<0?(a>0?2*yz:-3*yz)+c:(a>0?0:yz)+c,2*s*Math.cos(l/3)-i},xz=(e,t,n,r)=>((t*e+3*n)*e+r)*e;function Sz(e,t,n,r){if(!(0<=e&&e<=1&&0<=n&&n<=1))throw Error(`bezier x values must be in [0, 1] range`);if(e===t&&n===r)return gz;let i=6*(3*e-3*n+1),a=6*(n-2*e),o=3*e,s=i*i,c=a*a,l=a/i,u=3*a*o/s-c*a/(s*i),d=2*o/i-c/s,f=d*d*d,p=3/i,m=3*t-3*r+1,h=r-2*t,g=3*t,_=i?bz:gz;return function(e){return e===0||e===1?e:xz(_(e,u,p,f,l),m,h,g)}}var Cz=`cubic-bezier(0.66, 0, 0.34, 1)`,wz=Sz(.66,0,.34,1),Tz=0,Ez=0,Dz=0,Oz=1e3,kz,Az,jz=0,Mz=0,Nz=0,Pz=typeof performance==`object`&&performance.now?performance:Date,Fz=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Iz(){return Mz||=(Fz(Lz),Pz.now()+Nz)}function Lz(){Mz=0}function Rz(){this._call=this._time=this._next=null}Rz.prototype=zz.prototype={constructor:Rz,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?Iz():+n)+(t==null?0:+t),!this._next&&Az!==this&&(Az?Az._next=this:kz=this,Az=this),this._call=e,this._time=n,Wz()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wz())}};function zz(e,t,n){var r=new Rz;return r.restart(e,t,n),r}function Bz(){Iz(),++Tz;for(var e=kz,t;e;)(t=Mz-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Tz}function Vz(){Mz=(jz=Pz.now())+Nz,Tz=Ez=0;try{Bz()}finally{Tz=0,Uz(),Mz=0}}function Hz(){var e=Pz.now(),t=e-jz;t>Oz&&(Nz-=t,jz=e)}function Uz(){for(var e,t=kz,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:kz=n);Az=e,Wz(r)}function Wz(e){Tz||(Ez&&=clearTimeout(Ez),e-Mz>24?(e<1/0&&(Ez=setTimeout(Vz,e-Pz.now()-Nz)),Dz&&=clearInterval(Dz)):(Dz||=(jz=Pz.now(),setInterval(Hz,Oz)),Tz=1,Fz(Vz)))}function Gz(e,t,n){var r=new Rz;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var Kz=class{elapsed=0;transitionTimer=null;constructor(e,t,n){this.duration=e,this.easingFn=t,this.onTickCallback=n,this.resume()}get running(){return this.transitionTimer!==null}timerCallback(e){this.elapsed=Math.min(e,this.duration);let t=this.duration===0?1:this.elapsed/this.duration,n=this.easingFn(t);this.onTickCallback(n),this.elapsed>=this.duration&&this.stop()}resume(){if(this.running||this.elapsed>=this.duration)return this;let e=Iz()-this.elapsed;return this.transitionTimer=zz(e=>this.timerCallback(e),0,e),this}stop(){return this.running&&(this.transitionTimer&&=(this.transitionTimer.stop(),null)),this}finish(){return this.stop(),Gz(()=>this.timerCallback(this.duration)),this}};function qz(e,t){if(Object.is(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r{c.current=e},[e]),UC(()=>{r&&(o.current?.finish(),o.current=null,s.current=null,a.current=e)},[e,r]);let l=b.useCallback(r=>{let i=a.current,s=t(i,e);o.current=new Kz(300,wz,e=>{let t=s(e);a.current=t,n(r,t)})},[n,t,e]);return[b.useCallback(t=>{if(t===null){o.current?.stop();return}let n=s.current;if(n===t){if(qz(c.current,e)){o.current?.resume();return}o.current?.stop()}n&&o.current?.stop(),s.current=t,(o.current||!r)&&l(t)},[l,e,r]),a.current]}function Yz(e,{createInterpolator:t,transformProps:n,applyProps:r,skip:i,initialProps:a=e,ref:o}){let s=n??(e=>e),[c,l]=Jz(e,{initialProps:a,createInterpolator:t,applyProps:(e,t)=>r(e,s(t)),skip:i}),u=n(i?e:l);return q({},u,{ref:gE(c,o)})}function Xz(e){return Yz({d:e.d},{createInterpolator:(e,t)=>{let n=Rk(e.d,t.d);return e=>({d:n(e)})},applyProps:(e,{d:t})=>e.setAttribute(`d`,t),transformProps:e=>e,skip:e.skipAnimation,ref:e.ref})}function Zz(e){return e.replace(` `,`_`)}function Qz(){return ZR().use(qP)}function $z(){return ZR().use(sF)}function eB(e){return pP.getTypes().has(e)}function tB(e){return eB(e.type)}var nB=(e,t,n,r,i,a,o)=>{let s=r===`rotation`?i[t].rotationExtremumGetter:i[t].radiusExtremumGetter,c=o[t]?.series??{},[l,u]=s?.({series:c,axis:n,axisIndex:a,isDefaultAxis:a===0})??[1/0,-1/0],[d,f]=e;return[Math.min(l,d),Math.max(u,f)]},rB=(e,t,n,r,i)=>{let a=Object.keys(n).filter(eB).reduce((a,o)=>nB(a,o,e,t,n,r,i),[1/0,-1/0]);return Number.isNaN(a[0])||Number.isNaN(a[1])?[1/0,-1/0]:a},iB=(e,t,n,r)=>{let i=new Set;return Object.keys(t).filter(eB).forEach(a=>{let o=n[a]?.series??{},s=t[a].axisTooltipGetter?.(o);s!==void 0&&s.forEach(({axisId:t,direction:n})=>{n===e&&i.add(t??r)})}),i};function aB(e,t){if(typeof e==`number`)return e;if(e===`100%`)return t;if(e.endsWith(`%`)){let n=Number.parseFloat(e.slice(0,e.length-1));if(!Number.isNaN(n))return n*t/100}if(e.endsWith(`px`)){let t=Number.parseFloat(e.slice(0,e.length-2));if(!Number.isNaN(t))return t}throw Error(eD(26,e))}var oB=.001;function sB(e,t,n){if(t===`rotation`){let e=[lO(n.startAngle,0),lO(n.endAngle,2*Math.PI)],t=e[1]-e[0],r=t>=Math.PI*2-oB;return n.scaleType===`point`&&r&&(e[1]-=t/n.data.length),{range:e,isFullCircle:r}}let r=Math.min(e.height,e.width)/2,{minRadius:i,maxRadius:a}=n;return{range:[i===void 0?0:aB(i,r),a===void 0?r:aB(a,r)],isFullCircle:!1}}var cB=.2,lB=.1;function uB({drawingArea:e,formattedSeries:t,axis:n,seriesConfig:r,axisDirection:i}){if(n===void 0)return{axis:{},axisIds:[]};let a=iB(i,r,t,n[0].id),o={};return n.forEach((n,s)=>{let c=n,{range:l,isFullCircle:u}=sB(e,i,c),[d,f]=rB(c,i,r,s,t),p=!c.ignoreTooltip&&a.has(c.id),m=c.data??[];if(iP(c)){let e=c.categoryGapRatio??cB,t=c.barGapRatio??lB;if(o[c.id]=q({offset:0,categoryGapRatio:e,barGapRatio:t,triggerTooltip:p},c,{data:m,scale:xN(c.data,l).paddingInner(e).paddingOuter(e/2),tickNumber:c.data.length,colorScale:c.colorMap&&(c.colorMap.type===`ordinal`?rI(q({values:c.data},c.colorMap)):iI(c.colorMap)),isFullCircle:u}),aI(c.data)){let e=oI(c.data,l,c.tickNumber);o[c.id].valueFormatter=c.valueFormatter??e}}if(aP(c)&&(o[c.id]=q({offset:0,triggerTooltip:p},c,{data:m,scale:SN(c.data,l),tickNumber:c.data.length,colorScale:c.colorMap&&(c.colorMap.type===`ordinal`?rI(q({values:c.data},c.colorMap)):iI(c.colorMap)),isFullCircle:u}),aI(c.data))){let e=oI(c.data,l,c.tickNumber);o[c.id].valueFormatter=c.valueFormatter??e}if(!oP(c))return;let h=c.scaleType??`linear`,g=c.domainLimit??`nice`,_=[c.min??d,c.max??f];if(typeof g==`function`){let{min:e,max:t}=g(d,f);_[0]=e,_[1]=t}let v=i===`rotation`?180/3:1,y=c.tickNumber??SP(c,_,wP(v*Math.abs(l[1]-l[0]))),b=TN(h,_,l),x=g===`nice`?b.nice(y):b,[S,C]=x.domain(),w=[c.min??S,c.max??C];o[c.id]=q({offset:0,triggerTooltip:p},c,{data:m,scaleType:h,scale:x.domain(w),tickNumber:y,colorScale:c.colorMap&&iI(c.colorMap),isFullCircle:u})}),{axis:o,axisIds:n.map(({id:e})=>e)}}var dB=e=>e.polarAxis,fB=Q(dB,e=>e?.rotation),pB=Q(dB,e=>e?.radius),mB=$(fB,qP,nP,HN,(e,t,n,r)=>uB({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:`rotation`})),hB=$(pB,qP,nP,HN,(e,t,n,r)=>uB({drawingArea:t,formattedSeries:n,axis:e,seriesConfig:r,axisDirection:`radius`}));function gB(e){return{cx:e.left+e.width/2,cy:e.top+e.height/2}}var _B=$(qP,gB),vB=e=>(t,n)=>Math.atan2(t-e.cx,e.cy-n);function yB(e){return(e%360+360)%360}var bB=2*Math.PI;function xB(e){return(e%bB+bB)%bB}function SB(e,t){let{scale:n,data:r,reverse:i,isFullCircle:a}=e,[o,s]=n.range(),c=xB(t-o),l=xB(s-o);if(!a&&c>l)return-1;if(!cI(n)){if(r===void 0)return-1;let e=o+xB(t-o);return bL(r,yL(n.invert(e)))}if(!r)return-1;let u;return n.bandwidth()===0?(u=Math.floor((c+n.step()/2)/n.step()),a&&(u%=r.length)):u=Math.floor(c/n.step()),u<0||u>=r.length?-1:i?r.length-1-u:u}function CB(e,t){let{scale:n,data:r,reverse:i}=e;if(!cI(n))return r===void 0?-1:bL(r,yL(n.invert(t)));if(!r)return-1;let a,o=t-Math.min(...n.range());return a=n.bandwidth()===0?Math.floor((o+n.step()/2)/n.step()):Math.floor(o/n.step()),a<0||a>=r.length?-1:i?r.length-1-a:a}var wB=(e,t)=>t,TB=(e,t)=>t;function EB(e,t,n,r){if(r===`rotation`){let r=t;return Array.isArray(n)?n.map(t=>SB(r.axis[t],e)):SB(r.axis[n],e)}let i=t;return Array.isArray(n)?n.map(t=>CB(i.axis[t],e)):CB(i.axis[n],e)}var DB=Q(OL,kL,_B,(e,t,n)=>e===null||t===null?null:vB(n)(e,t)),OB=Q(DB,mB,wB,(e,t,n)=>e===null?null:EB(e,t,n??t.axisIds[0],`rotation`)),kB=Q(DB,mB,TB,(e,t,n)=>e===null?null:EB(e,t,n??t.axisIds,`rotation`));Q(mB,OB,wB,(e,t,n)=>{if(n??=e.axisIds[0],t===null||t===-1||e.axisIds.length===0)return null;let r=e.axis[n]?.data;return r?r[t]:null}),Q(mB,kB,TB,(e,t,n)=>(n??=e.axisIds,t===null?null:n.map((n,r)=>{let i=t[r];return i===-1?null:e.axis[n].data?.[i]})));var AB=xD({memoizeOptions:{resultEqualityCheck:bR}})(kB,mB,(e,t)=>e===null?[]:t.axisIds.map((t,n)=>({axisId:t,dataIndex:e[n]})).filter(({axisId:e,dataIndex:n})=>t.axis[e].triggerTooltip&&n>=0)),jB=Q(OL,kL,_B,(e,t,n)=>e===null||t===null?null:Math.sqrt((e-n.cx)**2+(t-n.cy)**2)),MB=Q(jB,hB,wB,(e,t,n)=>e===null?null:EB(e,t,n??t.axisIds[0],`radius`)),NB=Q(jB,hB,TB,(e,t,n)=>e===null?null:EB(e,t,n??t.axisIds,`radius`));Q(hB,MB,wB,(e,t,n)=>{if(n??=e.axisIds[0],t===null||t===-1||e.axisIds.length===0)return null;let r=e.axis[n]?.data;return r?r[t]:null}),Q(hB,NB,TB,(e,t,n)=>(n??=e.axisIds,t===null?null:n.map((n,r)=>{let i=t[r];return i===-1?null:e.axis[n].data?.[i]})));var PB=xD({memoizeOptions:{resultEqualityCheck:bR}})(NB,hB,(e,t)=>e===null?[]:t.axisIds.map((t,n)=>({axisId:t,dataIndex:e[n]})).filter(({axisId:e,dataIndex:n})=>t.axis[e].triggerTooltip&&n>=0)),FB=Q(AB,PB,(e,t)=>e.length>0||t.length>0);function IB(){let{axis:e,axisIds:t}=ZR().use(fL);return{xAxis:e,xAxisIds:t}}function LB(){let{axis:e,axisIds:t}=ZR().use(pL);return{yAxis:e,yAxisIds:t}}function RB(e){let{axis:t,axisIds:n}=ZR().use(fL);return t[e??n[0]]}function zB(e){let{axis:t,axisIds:n}=ZR().use(pL);return t[e??n[0]]}function BB(){let{axis:e,axisIds:t}=ZR().use(mB);return{rotationAxis:e,rotationAxisIds:t}}function VB(){let{axis:e,axisIds:t}=ZR().use(hB);return{radiusAxis:e,radiusAxisIds:t}}function HB(e){let{axis:t,axisIds:n}=ZR().use(mB);return t[e??n[0]]}function UB(e){let{axis:t,axisIds:n}=ZR().use(hB);return t[e??n[0]]}function WB(){let{axis:e,axisIds:t}=ZR().use(qI)??{axis:{},axisIds:[]};return{zAxis:e,zAxisIds:t}}function GB(){let{instance:e}=JR();return e.chartsLayerContainerRef}function KB(){return ZR().use(nP)}var qB=Q(nP,(e,t)=>e[t]);$(nP,(e,t,n)=>{if(n===void 0)return e[t]?.seriesOrder?.map(n=>e[t]?.series[n])??[];if(!Array.isArray(n))return e[t]?.series?.[n];let r=[],i=[];for(let a of n){let n=e[t]?.series?.[a];n?r.push(n):i.push(a)}return r});var JB=e=>ZR().use(qB,e);function YB(){return JB(`line`)}function XB(){return ZR().use(cz)}function ZB(e,t){return Object.keys(e).flatMap(n=>{let r=t[n].legendGetter;return r===void 0?[]:r(e[n])})}function QB(){return{items:ZB(KB(),ZR().use(HN))}}function $B(){let e=$z();return b.useCallback(t=>`${e}-gradient-${t}`,[e])}function eV(){let e=$z();return b.useCallback(t=>`${e}-gradient-${t}-object-bound`,[e])}function tV(e){return Yz({d:e.d},{createInterpolator:(e,t)=>{let n=Rk(e.d,t.d);return e=>({d:n(e)})},applyProps:(e,{d:t})=>e.setAttribute(`d`,t),skip:e.skipAnimation,transformProps:e=>e,ref:e.ref})}function nV(e){return function(){return e}}var rV=Math.cos,iV=Math.sin,aV=Math.sqrt,oV=Math.PI;oV/2;var sV=2*oV,cV=Math.PI,lV=2*cV,uV=1e-6,dV=lV-uV;function fV(e){this._+=e[0];for(let t=1,n=e.length;t=0))throw Error(`invalid digits: ${e}`);if(t>15)return fV;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;tuV)if(!(Math.abs(u*s-c*l)>uV)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((cV-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>uV&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>uV||Math.abs(this._y1-l)>uV)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%lV+lV),d>dV?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>uV&&this._append`A${n},${n},0,${+(d>=cV)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};mV.prototype;function hV(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new mV(t)}Array.prototype.slice;function gV(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function _V(e){this._context=e}_V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};function vV(e){return new _V(e)}function yV(e){return e[0]}function bV(e){return e[1]}function xV(e,t){var n=nV(!0),r=null,i=vV,a=null,o=hV(s);e=typeof e==`function`?e:e===void 0?yV:nV(e),t=typeof t==`function`?t:t===void 0?bV:nV(t);function s(s){var c,l=(s=gV(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c=d;--f)s.point(_[f],v[f]);s.lineEnd(),s.areaEnd()}h&&(_[u]=+e(m,u,l),v[u]=+t(m,u,l),s.point(r?+r(m,u,l):_[u],n?+n(m,u,l):v[u]))}if(g)return s=null,g+``||null}function u(){return xV().defined(i).curve(o).context(a)}return l.x=function(t){return arguments.length?(e=typeof t==`function`?t:nV(+t),r=null,l):e},l.x0=function(t){return arguments.length?(e=typeof t==`function`?t:nV(+t),l):e},l.x1=function(e){return arguments.length?(r=e==null?null:typeof e==`function`?e:nV(+e),l):r},l.y=function(e){return arguments.length?(t=typeof e==`function`?e:nV(+e),n=null,l):t},l.y0=function(e){return arguments.length?(t=typeof e==`function`?e:nV(+e),l):t},l.y1=function(e){return arguments.length?(n=e==null?null:typeof e==`function`?e:nV(+e),l):n},l.lineX0=l.lineY0=function(){return u().x(e).y(t)},l.lineY1=function(){return u().x(e).y(n)},l.lineX1=function(){return u().x(r).y(t)},l.defined=function(e){return arguments.length?(i=typeof e==`function`?e:nV(!!e),l):i},l.curve=function(e){return arguments.length?(o=e,a!=null&&(s=o(a)),l):o},l.context=function(e){return arguments.length?(e==null?a=s=null:s=o(a=e),l):a},l}function CV(e,t){return te?1:t>=e?0:NaN}function wV(e){return e}function TV(){var e=wV,t=CV,n=null,r=nV(0),i=nV(sV),a=nV(0);function o(o){var s,c=(o=gV(o)).length,l,u,d=0,f=Array(c),p=Array(c),m=+r.apply(this,arguments),h=Math.min(sV,Math.max(-sV,i.apply(this,arguments)-m)),g,_=Math.min(Math.abs(h)/c,a.apply(this,arguments)),v=_*(h<0?-1:1),y;for(s=0;s0&&(d+=y);for(t==null?n!=null&&f.sort(function(e,t){return n(o[e],o[t])}):f.sort(function(e,n){return t(p[e],p[n])}),s=0,u=d?(h-c*v)/d:0;s0?y*u:0)+v,p[l]={data:o[l],index:s,value:y,startAngle:m,endAngle:g,padAngle:_};return p}return o.value=function(t){return arguments.length?(e=typeof t==`function`?t:nV(+t),o):e},o.sortValues=function(e){return arguments.length?(t=e,n=null,o):t},o.sort=function(e){return arguments.length?(n=e,t=null,o):n},o.startAngle=function(e){return arguments.length?(r=typeof e==`function`?e:nV(+e),o):r},o.endAngle=function(e){return arguments.length?(i=typeof e==`function`?e:nV(+e),o):i},o.padAngle=function(e){return arguments.length?(a=typeof e==`function`?e:nV(+e),o):a},o}var EV=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t)}this._x0=e,this._y0=t}};function DV(e){return new EV(e,!0)}function OV(e){return new EV(e,!1)}var kV={draw(e,t){let n=aV(t/oV);e.moveTo(n,0),e.arc(0,0,n,0,sV)}},AV={draw(e,t){let n=aV(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},jV=aV(1/3),MV=jV*2,NV={draw(e,t){let n=aV(t/MV),r=n*jV;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},PV={draw(e,t){let n=aV(t),r=-n/2;e.rect(r,r,n,n)}},FV=.8908130915292852,IV=iV(oV/10)/iV(7*oV/10),LV=iV(sV/10)*IV,RV=-rV(sV/10)*IV,zV={draw(e,t){let n=aV(t*FV),r=LV*n,i=RV*n;e.moveTo(0,-n),e.lineTo(r,i);for(let t=1;t<5;++t){let a=sV*t/5,o=rV(a),s=iV(a);e.lineTo(s*n,-o*n),e.lineTo(o*r-s*i,s*r+o*i)}e.closePath()}},BV=aV(3),VV={draw(e,t){let n=-aV(t/(BV*3));e.moveTo(0,n*2),e.lineTo(-BV*n,-n),e.lineTo(BV*n,-n),e.closePath()}},HV=-.5,UV=aV(3)/2,WV=1/aV(12),GV=(WV/2+1)*3,KV=[kV,AV,NV,PV,zV,VV,{draw(e,t){let n=aV(t/GV),r=n/2,i=n*WV,a=r,o=n*WV+n,s=-a,c=o;e.moveTo(r,i),e.lineTo(a,o),e.lineTo(s,c),e.lineTo(HV*r-UV*i,UV*r+HV*i),e.lineTo(HV*a-UV*o,UV*a+HV*o),e.lineTo(HV*s-UV*c,UV*s+HV*c),e.lineTo(HV*r+UV*i,HV*i-UV*r),e.lineTo(HV*a+UV*o,HV*o-UV*a),e.lineTo(HV*s+UV*c,HV*c-UV*s),e.closePath()}}];function qV(e,t){let n=null,r=hV(i);e=typeof e==`function`?e:nV(e||kV),t=typeof t==`function`?t:nV(t===void 0?64:+t);function i(){let i;if(n||=i=r(),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+``||null}return i.type=function(t){return arguments.length?(e=typeof t==`function`?t:nV(t),i):e},i.size=function(e){return arguments.length?(t=typeof e==`function`?e:nV(+e),i):t},i.context=function(e){return arguments.length?(n=e??null,i):n},i}function JV(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function YV(e,t){this._context=e,this._k=(1-t)/6}YV.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:JV(this,this._x1,this._y1)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:JV(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}},(function e(t){function n(e){return new YV(e,t)}return n.tension=function(t){return e(+t)},n})(0);function XV(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function ZV(e,t){this._context=e,this._alpha=t}ZV.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)}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:XV(this,e,t)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var QV=(function e(t){function n(e){return t?new ZV(e,t):new YV(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function $V(e){return e<0?-1:1}function eH(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return($V(a)+$V(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function tH(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function nH(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function rH(e){this._context=e}rH.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:nH(this,this._t0,tH(this,this._t0))}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,e!==this._x1||t!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,nH(this,tH(this,n=eH(this,e,t)),n);break;default:nH(this,this._t0,n=eH(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function iH(e){this._context=new aH(e)}(iH.prototype=Object.create(rH.prototype)).point=function(e,t){rH.prototype.point.call(this,t,e)};function aH(e){this._context=e}aH.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function oH(e){return new rH(e)}function sH(e){return new iH(e)}function cH(e){this._context=e}cH.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=lH(e),i=lH(t),a=0,o=1;o=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}}this._x=e,this._y=t}};function fH(e){return new dH(e,.5)}function pH(e){return new dH(e,0)}function mH(e){return new dH(e,1)}function hH(e,t){if((o=e.length)>1)for(var n=1,r,i,a=e[t[0]],o,s=a.length;n=0;)n[t]=t;return n}function _H(e,t){return e[t]}function vH(e){let t=[];return t.key=e,t}function yH(){var e=nV([]),t=gH,n=hH,r=_H;function i(i){var a=Array.from(e.apply(this,arguments),vH),o,s=a.length,c=-1,l;for(let e of i)for(o=0,++c;o0){for(var n,r,i=0,a=e[0].length,o;i0){for(var n=0,r=e[t[0]],i,a=r.length;n0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,o;ra&&(a=i,n=t);return n}function TH(e){var t=e.map(EH);return gH(e).sort(function(e,n){return t[e]-t[n]})}function EH(e){for(var t=0,n=-1,r=e.length,i;++n({components:{MuiChartsLocalizationProvider:{defaultProps:{localeText:q({},e)}}}}),NH={loading:`Loading data…`,noData:`No data to display`,zoomIn:`Zoom in`,zoomOut:`Zoom out`,toolbarExport:`Export`,toolbarExportPrint:`Print`,toolbarExportImage:e=>`Export as ${jH[e]??e}`,chartTypeBar:`Bar`,chartTypeColumn:`Column`,chartTypeLine:`Line`,chartTypeArea:`Area`,chartTypePie:`Pie`,chartPaletteLabel:`Color palette`,chartPaletteNameRainbowSurge:`Rainbow Surge`,chartPaletteNameBlueberryTwilight:`Blueberry Twilight`,chartPaletteNameMangoFusion:`Mango Fusion`,chartPaletteNameCheerfulFiesta:`Cheerful Fiesta`,chartPaletteNameStrawberrySky:`Strawberry Sky`,chartPaletteNameBlue:`Blue`,chartPaletteNameGreen:`Green`,chartPaletteNamePurple:`Purple`,chartPaletteNameRed:`Red`,chartPaletteNameOrange:`Orange`,chartPaletteNameYellow:`Yellow`,chartPaletteNameCyan:`Cyan`,chartPaletteNamePink:`Pink`,chartConfigurationSectionChart:`Chart`,chartConfigurationSectionColumns:`Columns`,chartConfigurationSectionBars:`Bars`,chartConfigurationSectionAxes:`Axes`,chartConfigurationGrid:`Grid`,chartConfigurationBorderRadius:`Border radius`,chartConfigurationCategoryGapRatio:`Category gap ratio`,chartConfigurationBarGapRatio:`Series gap ratio`,chartConfigurationStacked:`Stacked`,chartConfigurationShowToolbar:`Show toolbar`,chartConfigurationSkipAnimation:`Skip animation`,chartConfigurationInnerRadius:`Inner radius`,chartConfigurationOuterRadius:`Outer radius`,chartConfigurationColors:`Colors`,chartConfigurationHideLegend:`Hide legend`,chartConfigurationShowMark:`Show mark`,chartConfigurationHeight:`Height`,chartConfigurationWidth:`Width`,chartConfigurationSeriesGap:`Series gap`,chartConfigurationTickPlacement:`Tick placement`,chartConfigurationTickLabelPlacement:`Tick label placement`,chartConfigurationCategoriesAxisLabel:`Categories axis label`,chartConfigurationSeriesAxisLabel:`Series axis label`,chartConfigurationXAxisPosition:`X-axis position`,chartConfigurationYAxisPosition:`Y-axis position`,chartConfigurationSeriesAxisReverse:`Reverse series axis`,chartConfigurationTooltipPlacement:`Placement`,chartConfigurationTooltipTrigger:`Trigger`,chartConfigurationLegendPosition:`Position`,chartConfigurationLegendDirection:`Direction`,chartConfigurationBarLabels:`Bar labels`,chartConfigurationColumnLabels:`Column labels`,chartConfigurationInterpolation:`Interpolation`,chartConfigurationSectionTooltip:`Tooltip`,chartConfigurationSectionLegend:`Legend`,chartConfigurationSectionLines:`Lines`,chartConfigurationSectionAreas:`Areas`,chartConfigurationSectionArcs:`Arcs`,chartConfigurationPaddingAngle:`Padding angle`,chartConfigurationCornerRadius:`Corner radius`,chartConfigurationArcLabels:`Arc labels`,chartConfigurationStartAngle:`Start angle`,chartConfigurationEndAngle:`End angle`,chartConfigurationPieTooltipTrigger:`Trigger`,chartConfigurationPieLegendPosition:`Position`,chartConfigurationPieLegendDirection:`Direction`,chartConfigurationOptionNone:`None`,chartConfigurationOptionValue:`Value`,chartConfigurationOptionAuto:`Auto`,chartConfigurationOptionTop:`Top`,chartConfigurationOptionTopLeft:`Top Left`,chartConfigurationOptionTopRight:`Top Right`,chartConfigurationOptionBottom:`Bottom`,chartConfigurationOptionBottomLeft:`Bottom Left`,chartConfigurationOptionBottomRight:`Bottom Right`,chartConfigurationOptionLeft:`Left`,chartConfigurationOptionRight:`Right`,chartConfigurationOptionAxis:`Axis`,chartConfigurationOptionItem:`Item`,chartConfigurationOptionHorizontal:`Horizontal`,chartConfigurationOptionVertical:`Vertical`,chartConfigurationOptionBoth:`Both`,chartConfigurationOptionStart:`Start`,chartConfigurationOptionMiddle:`Middle`,chartConfigurationOptionEnd:`End`,chartConfigurationOptionExtremities:`Extremities`,chartConfigurationOptionTick:`Tick`,chartConfigurationOptionMonotoneX:`Monotone X`,chartConfigurationOptionMonotoneY:`Monotone Y`,chartConfigurationOptionCatmullRom:`Catmull-Rom`,chartConfigurationOptionLinear:`Linear`,chartConfigurationOptionNatural:`Natural`,chartConfigurationOptionStep:`Step`,chartConfigurationOptionStepBefore:`Step Before`,chartConfigurationOptionStepAfter:`Step After`,chartConfigurationOptionBumpX:`Bump X`,chartConfigurationOptionBumpY:`Bump Y`,open:`Open`,high:`High`,low:`Low`,close:`Close`,a11yNoValue:`no value`,a11yConnector:`; `,barDescription:function({value:e,formattedValue:t,formattedCategoryValue:n,seriesLabel:r}){return[n,r,e===null?this.a11yNoValue:t].filter(Boolean).join(this.a11yConnector)},lineDescription:function({y:e,formattedXValue:t,formattedYValue:n,seriesLabel:r}){return[t,r,e===null?this.a11yNoValue:n].filter(Boolean).join(this.a11yConnector)},scatterDescription:function({formattedXValue:e,formattedYValue:t,seriesLabel:n}){return[n,e,t].filter(Boolean).join(this.a11yConnector)},pieDescription:function({value:e,formattedValue:t,seriesLabel:n}){return[n,e===null?this.a11yNoValue:t].filter(Boolean).join(this.a11yConnector)},radarDescription:function({value:e,formattedValue:t,formattedCategoryValue:n,seriesLabel:r}){return[n,r,e===null?this.a11yNoValue:t].filter(Boolean).join(this.a11yConnector)},funnelDescription:function({value:e,formattedValue:t,seriesLabel:n}){return[n,e===null?this.a11yNoValue:t].filter(Boolean).join(this.a11yConnector)},heatmapDescription:function({value:e,formattedValue:t,formattedXValue:n,formattedYValue:r}){return[n,r,e===null?this.a11yNoValue:t].filter(Boolean).join(this.a11yConnector)},sankeyNodeDescription:function({formattedValue:e,nodeLabel:t}){return[t,e].filter(Boolean).join(this.a11yConnector)},sankeyLinkDescription:function({formattedValue:e,sourceLabel:t,targetLabel:n}){return[t&&n?`${t} to ${n}`:t??n,e].filter(Boolean).join(this.a11yConnector)},rangeBarDescription:function({value:e,formattedValue:t,formattedCategoryValue:n,seriesLabel:r}){return[n,r,e===null?this.a11yNoValue:t].filter(Boolean).join(this.a11yConnector)},ohlcDescription:function({open:e,high:t,low:n,close:r,formattedOpen:i,formattedHigh:a,formattedLow:o,formattedClose:s,formattedDate:c,seriesLabel:l}){return[c,l,e!==null&&t!==null&&n!==null&&r!==null?`Open: ${i??e}, High: ${a??t}, Low: ${o??n}, Close: ${s??r}`:this.a11yNoValue].filter(Boolean).join(this.a11yConnector)}},PH=NH;MH(NH);var FH=[`localeText`],IH=b.createContext(null);function LH(e){let{localeText:t}=e,n=KE(e,FH),{localeText:r}=b.useContext(IH)??{localeText:void 0},{children:i,localeText:a}=RE({props:n,name:`MuiChartsLocalizationProvider`}),o=b.useMemo(()=>q({},PH,a,r,t),[a,r,t]),s=b.useMemo(()=>({localeText:o}),[o]);return(0,J.jsx)(IH.Provider,{value:s,children:i})}var RH=()=>{let e=b.useContext(IH);if(e===null)throw Error(eD(12));return e};function zH(){return ZR().use(JL)}function BH(e){return DC(`MuiChartsAxis`,e)}var VH=OC(`MuiChartsAxis`,[`root`,`line`,`tickContainer`,`tick`,`tickLabel`,`label`,`directionX`,`directionY`,`top`,`bottom`,`left`,`right`]),HH=e=>{let{classes:t,position:n}=e;return tT({root:[`root`,`directionX`,n],line:[`line`],tickContainer:[`tickContainer`],tick:[`tick`],tickLabel:[`tickLabel`],label:[`label`]},BH,t)},UH={disableLine:!1,disableTicks:!1,tickSize:6,tickLabelMinGap:4};function WH(e){return typeof e==`number`&&!Number.isFinite(e)}function GH(e,t){return Math.abs(t.getFullYear()-e.getFullYear())}function KH(e,t){return Math.abs(t.getFullYear()*12+t.getMonth()-12*e.getFullYear()-e.getMonth())}function qH(e,t){return Math.abs(t.getTime()-e.getTime())/864e5}function JH(e,t){return Math.abs(t.getTime()-e.getTime())/36e5}var YH={years:{getTickNumber:GH,isTick:(e,t)=>t.getFullYear()!==e.getFullYear(),format:e=>e.getFullYear().toString()},quarterly:{getTickNumber:(e,t)=>Math.floor(KH(e,t)/3),isTick:(e,t)=>t.getMonth()!==e.getMonth()&&t.getMonth()%3==0,format:new Intl.DateTimeFormat(`default`,{month:`short`}).format},months:{getTickNumber:KH,isTick:(e,t)=>t.getMonth()!==e.getMonth(),format:new Intl.DateTimeFormat(`default`,{month:`short`}).format},biweekly:{getTickNumber:(e,t)=>qH(e,t)/14,isTick:(e,t)=>(t.getDay()7)&&Math.floor(t.getDate()/7)%2==1,format:new Intl.DateTimeFormat(`default`,{day:`numeric`}).format},weeks:{getTickNumber:(e,t)=>qH(e,t)/7,isTick:(e,t)=>t.getDay()=7,format:new Intl.DateTimeFormat(`default`,{day:`numeric`}).format},days:{getTickNumber:qH,isTick:(e,t)=>t.getDate()!==e.getDate(),format:new Intl.DateTimeFormat(`default`,{day:`numeric`}).format},hours:{getTickNumber:JH,isTick:(e,t)=>t.getHours()!==e.getHours(),format:new Intl.DateTimeFormat(`default`,{hour:`2-digit`,minute:`2-digit`}).format}},XH={start:0,extremities:0,end:1,middle:.5};function ZH(e,t,n){return e(t)-(e.step()-e.bandwidth())/2+XH[n]*e.step()}function QH(e,t,n){let r=Math.abs(t[1]-t[0]),i=Math.ceil(e.length/(r/n));return Number.isNaN(i)||i<=1?e:e.filter((e,t)=>t%i===0)}function $H(e,t,n,r,i){if(n.length===0)return[];let a=r.range()[0]>r.range()[1],o=e.findIndex(e=>i(ZH(r,e,a?`start`:`end`))),s=e.findLastIndex(e=>i(ZH(r,e,a?`end`:`start`))),c=e[0],l=e[e.length-1];if(!(c instanceof Date)||!(l instanceof Date))return[];let u=0;for(let e=0;et||t/rtypeof e==`string`?YH[e]:e),t,c).map(({index:n,formatter:r})=>{let i=e[n];return{value:i,formattedValue:r(i),offset:ZH(t,i,`middle`),labelOffset:0}})}let u=a??`extremities`;if(cI(t)){let e=t.domain(),a=o??`middle`,l=e;if(typeof i==`object`&&i?l=i:(typeof i==`function`&&(l=l.filter(i)),s!==void 0&&s>0&&(l=QH(l,t.range(),s))),l.length===0)return[];if(t.bandwidth()>0){let i=t.range()[0]>t.range()[1],o=l.findIndex(e=>c(ZH(t,e,i?`start`:`end`))),s=l.findLastIndex(e=>c(ZH(t,e,i?`end`:`start`)));return[...l.slice(o,s+1).map(e=>{let i=`${e}`;return{value:e,formattedValue:r?.(e,{location:`tick`,scale:t,tickNumber:n,defaultTickLabel:i})??i,offset:ZH(t,e,u),labelOffset:a===`tick`?0:t.step()*(XH[a]-XH[u])}}),...u===`extremities`&&s===e.length-1&&c(t.range()[1])?[{formattedValue:void 0,offset:t.range()[1],labelOffset:0}]:[]]}return l.map(e=>{let i=`${e}`;return{value:e,formattedValue:r?.(e,{location:`tick`,scale:t,tickNumber:n,defaultTickLabel:i})??i,offset:t(e),labelOffset:0}})}if(t.domain().some(WH))return[];let d=o,f=typeof i==`object`?i:tU(t,n),p=[];for(let e=0;e!0,rU=e=>t=>Math.abs(e.range()[0]-t)e>=1;case`x`:return n.isXInside;case`y`:return n.isYInside;default:return nU}}function aU(e){let{scale:t,tickNumber:n,valueFormatter:r,tickInterval:i,tickPlacement:a=`extremities`,tickLabelPlacement:o,tickSpacing:s,direction:c,ordinalTimeTicks:l}=e,{instance:u}=JR();return b.useMemo(()=>eU({scale:t,tickNumber:n,tickPlacement:a,tickInterval:i,tickLabelPlacement:o,tickSpacing:s,valueFormatter:r,isInside:iU(t,c,u),ordinalTimeTicks:l}),[t,n,a,i,o,s,r,c,u,l])}var oU=OC(`MuiAppearingMask`,[`animate`]),sU=Z(`rect`,{slot:`internal`,shouldForwardProp:void 0})({animationName:`animate-width`,animationTimingFunction:Cz,animationDuration:`0s`,[`&.${oU.animate}`]:{animationDuration:`300ms`},"@keyframes animate-width":{from:{width:0}}});function cU(e){let t=Qz(),n=Zz(`${$z()}-${e.seriesId}`);return(0,J.jsxs)(b.Fragment,{children:[(0,J.jsx)(`clipPath`,{id:n,children:(0,J.jsx)(sU,{className:e.skipAnimation?``:oU.animate,x:0,y:0,width:t.left+t.width+t.right,height:t.top+t.height+t.bottom})}),(0,J.jsx)(`g`,{clipPath:`url(#${n})`,children:e.children})]})}var lU=[`skipAnimation`,`ownerState`];function uU(e){let{skipAnimation:t,ownerState:n}=e,r=KE(e,lU),i=Xz(e);return(0,J.jsx)(cU,{skipAnimation:t,seriesId:`${n.seriesId}-area-clip`,children:(0,J.jsx)(`path`,q({fill:n.gradientId?`url(#${n.gradientId})`:n.color,filter:n.isHighlighted?`brightness(140%)`:n.gradientId?void 0:`brightness(120%)`,opacity:n.isFaded?.3:1,stroke:`none`,"data-series":n.seriesId,"data-highlighted":n.isHighlighted||void 0,"data-faded":n.isFaded||void 0},r,i))})}function dU(e){return DC(`MuiLineChart`,e)}var fU=OC(`MuiLineChart`,[`area`,`line`,`mark`,`markAnimate`,`highlight`,`areaPlot`,`linePlot`,`markPlot`]),pU=e=>{let{skipAnimation:t,classes:n}=e??{};return tT({area:[`area`],line:[`line`],mark:[`mark`,!t&&`markAnimate`],highlight:[`highlight`],areaPlot:[`areaPlot`],linePlot:[`linePlot`],markPlot:[`markPlot`]},dU,n)},mU=[`seriesId`,`classes`,`color`,`gradientId`,`slots`,`slotProps`,`onClick`];function hU(e){let{seriesId:t,classes:n,color:r,gradientId:i,slots:a,slotProps:o,onClick:s}=e,c=KE(e,mU),l=ZR().use(rF,`enablePositionBasedPointerInteraction`),u=b.useMemo(()=>({type:`line`,seriesId:t}),[t]),d=XR(u),f=hz(u),p=f===`highlighted`,m=f===`faded`,h={seriesId:t,classes:n,color:r,gradientId:i,isFaded:m,isHighlighted:p},g=pU(h),_=a?.area??uU,v=$E({elementType:_,externalSlotProps:o?.area,additionalProps:q({},l?{}:d,{onClick:s,cursor:s?`pointer`:`unset`,"data-highlighted":p||void 0,"data-faded":m||void 0,"data-series-id":t,"data-series":t}),className:g.area,ownerState:h});return(0,J.jsx)(_,q({},c,v))}function gU(e){let t=ZR().use(HD);return e||t}function _U(){return ZR().use(ZI)}function vU(e){switch(e){case`catmullRom`:return QV.alpha(.5);case`linear`:return vV;case`monotoneX`:return oH;case`monotoneY`:return sH;case`natural`:return uH;case`step`:return fH;case`stepBefore`:return pH;case`stepAfter`:return mH;case`bumpY`:return OV;case`bumpX`:return DV;default:return oH}}function yU(e,t){let n=YB(),r=IB().xAxisIds[0],i=LB().yAxisIds[0],a=$B();return b.useMemo(()=>{if(n===void 0)return[];let{series:o,stackingGroups:s}=n,c=[];for(let n of s){let s=n.ids;for(let n=s.length-1;n>=0;--n){let l=s[n],{xAxisId:u=r,yAxisId:d=i,visibleStackedData:f,stackedData:p,data:m,connectNulls:h,baseline:g,curve:_,strictStepCurve:v,area:y}=o[l];if(!y||!(u in e)||!(d in t))continue;let b=e[u].scale,x=xR(b),S=t[d].scale,C=e[u].data,w=t[d].colorScale&&a(d)||e[u].colorScale&&a(u)||void 0,T=_?.includes(`step`)&&!v&&cI(b),E=C?.flatMap((e,t)=>{let n=m[t]==null;if(T){let r=[{x:e,y:f[t],nullData:n,isExtension:!1}];return!n&&(t===0||m[t-1]==null)&&r.unshift({x:(b(e)??0)-(b.step()-b.bandwidth())/2,y:f[t],nullData:n,isExtension:!0}),!n&&(t===m.length-1||m[t+1]==null)&&r.push({x:(b(e)??0)+(b.step()+b.bandwidth())/2,y:f[t],nullData:n,isExtension:!0}),r}return{x:e,y:f[t],nullData:n}})??[],D=h?E.filter(e=>!e.nullData):E,O=SV().x(e=>e.isExtension?e.x:x(e.x)).defined(e=>h||!e.nullData||!!e.isExtension).y0(e=>{if(typeof g==`number`)return S(g);if(g===`max`)return S.range()[1];if(g===`min`)return S.range()[0];let t=e.y&&S(e.y[0]);return Number.isNaN(t)?S.range()[0]:t}).y1(e=>e.y&&S(e.y[1])).curve(vU(_))(D)||``;c.push({area:o[l].area,color:o[l].color,gradientId:w,d:O,seriesId:l})}}return c},[n,r,i,e,t,a])}function bU(e,t){let{instance:n}=JR(),{type:r,seriesId:i,priority:a,canActivate:o}=e,s=t!==void 0,c=_E((e,n)=>t?.(e,n)),l=o!==void 0,u=_E(e=>!o||o(e)),d=n.registerItemActivationHandler;b.useEffect(()=>{if(!(!s||!d))return d({type:r,seriesId:i,priority:a,canActivate:l?u:void 0},c)},[d,s,r,i,a,l,u,c])}var xU={mark:2,line:1,area:0};function SU(e,t,n){bU({type:`line`,priority:t,canActivate:n&&(e=>{let t=e;return n({type:`line`,seriesId:t.seriesId,dataIndex:t.dataIndex})})},e&&((t,n)=>e(t,{type:`line`,seriesId:n.seriesId,dataIndex:n.dataIndex})))}function CU(e,t,n){SU(e,t,n);let r=GB(),{xAxis:i,xAxisIds:a}=IB(),o=YB(),s=a[0];return b.useMemo(()=>{if(e)return(t,n)=>{let a=r.current,c=o?.series[n]?.xAxisId??s,l=c===void 0?void 0:i[c];if(a===null||l===void 0)return;let u=xL(l,CL(a,t).x);u!==-1&&e(t,{type:`line`,seriesId:n,dataIndex:u})}},[e,r,o,s,i])}var wU=[`slots`,`slotProps`,`onItemClick`,`skipAnimation`,`className`],TU=Z(`g`,{name:`MuiAreaPlot`,slot:`Root`})({[`& .${fU.area}`]:{transitionProperty:`opacity, fill`,transitionDuration:`300ms`,transitionTimingFunction:Cz}}),EU=()=>{let{xAxis:e}=IB(),{yAxis:t}=LB();return yU(e,t)};function DU(e){let{slots:t,slotProps:n,onItemClick:r,skipAnimation:i,className:a}=e,o=KE(e,wU),s=gU(_U()||i),c=EU(),l=pU(),u=CU(r,xU.area,({seriesId:e})=>c.some(t=>t.seriesId===e&&!!t.area));return(0,J.jsx)(TU,q({className:Y(l.areaPlot,a)},o,{children:c.map(({d:e,seriesId:r,color:i,area:a,gradientId:o})=>!!a&&(0,J.jsx)(hU,{seriesId:r,d:e,color:i,gradientId:o,slots:t,slotProps:n,onClick:u&&(e=>u(e,r)),skipAnimation:s},r))}))}var OU=[`skipAnimation`,`ownerState`],kU=b.forwardRef(function(e,t){let{skipAnimation:n,ownerState:r}=e,i=KE(e,OU),a=tV({d:e.d,skipAnimation:n,ref:t}),o=r.isFaded?.3:1;return(0,J.jsx)(cU,{skipAnimation:n,seriesId:`${r.seriesId}-line-clip`,children:(0,J.jsx)(`path`,q({stroke:r.gradientId?`url(#${r.gradientId})`:r.color,strokeWidth:2,strokeLinejoin:`round`,fill:`none`,filter:r.isHighlighted?`brightness(120%)`:void 0,opacity:r.hidden?0:o,"data-series":r.seriesId,"data-highlighted":r.isHighlighted||void 0,"data-faded":r.isFaded||void 0},i,a))})}),AU=[`seriesId`,`classes`,`color`,`gradientId`,`slots`,`slotProps`,`onClick`,`hidden`];function jU(e){let{seriesId:t,classes:n,color:r,gradientId:i,slots:a,slotProps:o,onClick:s,hidden:c}=e,l=KE(e,AU),u=ZR().use(rF,`enablePositionBasedPointerInteraction`),d=b.useMemo(()=>({type:`line`,seriesId:t}),[t]),f=XR(d),p=hz(d),m=p===`highlighted`,h=p===`faded`,g={seriesId:t,classes:n,color:r,gradientId:i,isFaded:h,isHighlighted:m,hidden:c},_=pU(),v=a?.line??kU,y=$E({elementType:v,externalSlotProps:o?.line,additionalProps:q({},u?{}:f,{onClick:s,cursor:s?`pointer`:`unset`,"data-highlighted":m||void 0,"data-faded":h||void 0,"data-series-id":t,"data-series":t}),className:_.line,ownerState:g});return(0,J.jsx)(v,q({},l,y))}function MU(e,t,n){let r=YB(),i=IB().xAxisIds[0],a=LB().yAxisIds[0],o=$B(),s=Qz(),c=ZR(),l=c.use(NR),u=c.use(PR),d=c.use(QI),f=c.use(eL),p=c.use(HN).line?.sampler,m=n?.zoomMap??d,h=n?.availableSize??s.width,g=l?.methods.line,_=g!=null&&g!==`none`,v=b.useRef(_),y=_||v.current;return b.useEffect(()=>{v.current=_},[_]),b.useMemo(()=>{if(r===void 0)return[];let{series:n,stackingGroups:s}=r,c=[];for(let r of s){let s=r.ids;for(let r of s){let{xAxisId:s=i,yAxisId:l=a,stackedData:d,visibleStackedData:v,data:b,connectNulls:x,curve:S,strictStepCurve:C}=n[r];if(!(s in e)||!(l in t))continue;let w=e[s].scale,T=xR(w),E=t[l].scale,D=e[s].data,O=t[l].colorScale&&o(l)||e[s].colorScale&&o(s)||void 0,k=S?.includes(`step`)&&!C&&cI(w),ee=u[r],te=m?.get(s)??(ee?MR(s):void 0),A=null;_&&ee&&te&&!k&&D&&(A=p?.sample?.({built:ee,zoom:te,availableSize:h,minSpan:f[s]?.minSpan??0,algorithm:g,getValues:()=>Float64Array.from(v,e=>e[1])})??null);let ne;ne=A?A.flatMap(e=>Array.from(e.indices,e=>({x:D[e],y:v[e],nullData:b[e]==null}))):D?.flatMap((e,t)=>{let n=b[t]==null;if(k){let r=[{x:e,y:v[t],nullData:n,isExtension:!1}];return!n&&(t===0||b[t-1]==null)&&r.unshift({x:(w(e)??0)-(w.step()-w.bandwidth())/2,y:v[t],nullData:n,isExtension:!0}),!n&&(t===b.length-1||b[t+1]==null)&&r.push({x:(w(e)??0)+(w.step()+w.bandwidth())/2,y:v[t],nullData:n,isExtension:!0}),r}return{x:e,y:v[t],nullData:n}})??[];let re=x?ne.filter(e=>!e.nullData):ne,ie=n[r].hidden,j=xV().x(e=>e.isExtension?e.x:T(e.x)).defined(e=>x||!e.nullData||!!e.isExtension).y(e=>E(ie?e.y[0]:e.y[1])).curve(vU(S))(re)||``;c.push({color:n[r].color,gradientId:O,d:j,seriesId:r,hidden:n[r].hidden,isSampled:y})}}return c},[r,i,a,e,t,o,_,g,u,m,h,f,p,y])}var NU=[`slots`,`slotProps`,`skipAnimation`,`onItemClick`,`className`],PU=Z(`g`,{name:`MuiLinePlot`,slot:`Root`})({[`& .${fU.line}`]:{transitionProperty:`opacity, fill`,transitionDuration:`300ms`,transitionTimingFunction:Cz}}),FU=()=>{let{xAxis:e}=IB(),{yAxis:t}=LB();return MU(e,t)};function IU(e){let{slots:t,slotProps:n,skipAnimation:r,onItemClick:i,className:a}=e,o=KE(e,NU),s=gU(_U()||r),c=FU(),l=pU(),u=CU(i,xU.line);return(0,J.jsx)(PU,q({className:Y(l.linePlot,a)},o,{children:c.map(({d:e,seriesId:r,color:i,gradientId:a,hidden:o,isSampled:c})=>(0,J.jsx)(jU,{seriesId:r,d:e,color:i,gradientId:a,hidden:o,skipAnimation:s||c,slots:t,slotProps:n,onClick:u&&(e=>u(e,r))},r))}))}var LU=[`x`,`y`,`seriesId`,`classes`,`color`,`dataIndex`,`onClick`,`skipAnimation`,`isFaded`,`isHighlighted`,`shape`,`hidden`],RU=Z(`circle`,{slot:`internal`,shouldForwardProp:void 0})({[`&.${fU.markAnimate}`]:{transitionDuration:`300ms`,transitionProperty:`cx, cy, opacity`,transitionTimingFunction:Cz}});function zU(e){let{x:t,y:n,seriesId:r,classes:i,color:a,dataIndex:o,onClick:s,skipAnimation:c,isFaded:l=!1,isHighlighted:u=!1,hidden:d}=e,f=KE(e,LU),p=ZR().use(rF,`enablePositionBasedPointerInteraction`),m=XR({type:`line`,seriesId:r,dataIndex:o}),h=xE(),g=pU({skipAnimation:c,classes:i});return(0,J.jsx)(RU,q({},f,p?{}:m,{cx:t,cy:n,r:5,fill:(h.vars||h).palette.background.paper,stroke:a,strokeWidth:2,className:g.mark,onClick:s,cursor:s?`pointer`:`unset`,pointerEvents:d?`none`:void 0,"data-highlighted":u||void 0,"data-faded":l||void 0,"data-series-id":r,"data-series":r,"data-index":o,opacity:+!d}))}function BU(e){switch(e){case`circle`:return 0;case`cross`:return 1;case`diamond`:return 2;case`square`:return 3;case`star`:return 4;case`triangle`:return 5;case`wye`:return 6;default:return 0}}var VU=[`x`,`y`,`seriesId`,`classes`,`color`,`shape`,`dataIndex`,`onClick`,`skipAnimation`,`isFaded`,`isHighlighted`,`hidden`,`style`],HU=Z(`path`,{name:`MuiMarkElement`,slot:`Root`})(({theme:e})=>({fill:(e.vars||e).palette.background.paper,[`&.${fU.markAnimate}`]:{transitionDuration:`300ms`,transitionProperty:`transform, transform-origin, opacity`,transitionTimingFunction:Cz}}));function UU(e){let{x:t,y:n,seriesId:r,classes:i,color:a,shape:o,dataIndex:s,onClick:c,skipAnimation:l,isFaded:u=!1,isHighlighted:d=!1,hidden:f,style:p}=e,m=KE(e,VU),h=ZR().use(rF,`enablePositionBasedPointerInteraction`),g=XR({type:`line`,seriesId:r,dataIndex:s}),_={seriesId:r,classes:i,isHighlighted:d,isFaded:u,skipAnimation:l},v=pU({skipAnimation:l,classes:i});return(0,J.jsx)(HU,q({},m,h?{}:g,{style:q({},p,{transform:`translate(${t}px, ${n}px)`,transformOrigin:`${t}px ${n}px`}),ownerState:_,className:v.mark,d:qV(KV[BU(o)])(),onClick:c,cursor:c?`pointer`:`unset`,pointerEvents:f?`none`:void 0,"data-highlighted":d||void 0,"data-faded":u||void 0,"data-series-id":r,"data-series":r,"data-index":s,opacity:+!f,strokeWidth:2,stroke:a}))}function WU(e){return e.colorGetter?e.colorGetter:()=>e.color}function GU(e){let{series:t,valueColorScale:n,categoryColorScale:r,categoryValues:i}=e,a=WU(t);return n?e=>{if(e===void 0)return t.color;let r=t.data[e],i=n(r);return typeof i==`string`?i:a({value:r,dataIndex:e})}:r&&i?e=>{if(e===void 0)return t.color;let n=i[e],o={value:t.data[e],dataIndex:e},s=r(n);return typeof s==`string`?s:a(o)}:e=>{if(e===void 0)return t.color;let n=t.data[e];return a({value:n,dataIndex:e})}}var KU=(e,t,n)=>GU({series:e,valueColorScale:n?.colorScale,categoryColorScale:t?.colorScale,categoryValues:t?.data});function qU(e,t){let n=YB(),r=IB().xAxisIds[0],i=LB().yAxisIds[0],a=$z(),{instance:o}=JR();return b.useMemo(()=>{if(n===void 0)return[];let{series:s,stackingGroups:c}=n,l=[];for(let n of c){let c=n.ids;for(let n of c){let{xAxisId:c=r,yAxisId:u=i,visibleStackedData:d,data:f,showMark:p,shape:m=`circle`,hidden:h}=s[n];if(!p||p===`start`||p===`end`||!(c in e)||!(u in t))continue;let g=xR(e[c].scale),_=t[u].scale,v=e[c].data,y=Zz(`${a}-${n}-line-clip`),b=KU(s[n],e[c],t[u]),x=[];if(v)for(let e=0;e{let e={};for(let{dataIndex:t,axisId:n}of f)e[n]===void 0?e[n]=new Set([t]):e[n].add(t);return e},[f]),m=qU(c,l);SU(i,xU.mark,({seriesId:e,dataIndex:t})=>m.some(n=>n.seriesId===e&&!n.hidden&&n.marks.some(e=>e.index===t)));let h=pU();return(0,J.jsx)(YU,q({className:Y(h.markPlot,a)},o,{children:m.map(({seriesId:e,clipId:r,shape:a,xAxisId:o,marks:c,hidden:l})=>{let u=t?.mark??(a===`circle`?zU:UU),f=d({type:`line`,seriesId:e}),m=f===`highlighted`,h=f===`faded`;return(0,J.jsx)(`g`,{clipPath:`url(#${r})`,"data-series":e,children:c.map(({x:t,y:r,index:c,color:d})=>(0,J.jsx)(u,q({seriesId:e,dataIndex:c,shape:a,color:d,x:t,y:r,skipAnimation:s,onClick:i&&(t=>i(t,{type:`line`,seriesId:e,dataIndex:c})),isHighlighted:p[o]?.has(c)||m,isFaded:h,hidden:l},n?.mark),`${e}-${c}`))},e)})}))}var ZU=()=>()=>{},QU=()=>!0,$U=()=>!1;function eW(){return b.useSyncExternalStore(ZU,QU,$U)}function tW(e=!1){let[t,n]=b.useState(!1);return UC(()=>{e||n(!0)},[e]),b.useEffect(()=>{e&&n(!0)},[e]),t}function nW(e){return Math.PI/180*e}var rW=typeof window<`u`&&`Intl`in window&&`Segmenter`in Intl?new Intl.Segmenter(void 0,{granularity:`grapheme`}):null;function iW(e,t){return e.slice(0,t)}function aW(e,t){let n=rW.segment(e),r=``,i=0;for(let e of n)if(r+=e.segment,i+=1,i>=t)break;return r}var oW=rW?aW:iW,sW=`…`;function cW(e,t){let{width:n,height:r,measureText:i}=t,a=nW(t.angle),o=i(e),s=Math.abs(o.width*Math.cos(a))+Math.abs(o.height*Math.sin(a)),c=Math.abs(o.width*Math.sin(a))+Math.abs(o.height*Math.cos(a));return s<=n&&c<=r}function lW(e,t){if(t(e))return e;let n=e,r=1,i=1/2,a=pO(e),o=a,s=a,c=null;do{if(s=o,o=Math.floor(a*i),o===0)break;n=oW(e,o).trim();let l=t(n+sW);r+=1,l?(c=n,i+=1/2**r):i-=1/2**r}while(Math.abs(o-s)!==1);return c?c+sW:``}function uW(e,t,n,r,i){let a=new Map,o=yB(i?.angle??0),s=1,c=1;i?.textAnchor===`start`?(s=1/0,c=1):i?.textAnchor===`end`?(s=1,c=1/0):(s=2,c=2),o>90&&o<270&&([s,c]=[c,s]),r&&([s,c]=[c,s]);for(let r of e)if(r.formattedValue){let e=Math.min((r.offset+r.labelOffset)*s,(t.left+t.width+t.right-r.offset-r.labelOffset)*c);a.set(r,lW(r.formattedValue.toString(),t=>cW(t,{width:e,height:n,angle:o,measureText:e=>iO(e,i)})))}return a}var dW=5;function fW(e,t,n=0){let r=Math.min(Math.abs(n)%180,Math.abs(Math.abs(n)%180-180)%180);if(r85)return t;let i=lO(r);return in(e.value,t)));let s=0,c=i?-1:1,l=e.filter(e=>{let{offset:t,labelOffset:n,formattedValue:r}=e;return r!==``&&o(t+n)}),u=hW(l,t);return new Set(l.filter((e,n)=>{let{offset:i,labelOffset:o}=e,l=i+o;if(n>0&&c*l0&&c*mn.add(e));return aO(n,t)}function gW({style:e,needsComputation:t,text:n}){return n.split(`
+`).map(n=>q({text:n},t?iO(n,e):{width:0,height:0}))}var _W=[`x`,`y`,`style`,`text`,`ownerState`],vW=[`angle`,`textAnchor`,`dominantBaseline`];function yW(e){let{x:t,y:n,style:r,text:i}=e,a=KE(e,_W),o=r??{},{angle:s,textAnchor:c,dominantBaseline:l}=o,u=KE(o,vW),d=eW(),f=b.useMemo(()=>gW({style:u,needsComputation:d&&i.includes(`
+`),text:i}),[u,i,d]),p;switch(l){case`hanging`:case`text-before-edge`:p=0;break;case`central`:p=(f.length-1)/2*-f[0].height;break;default:p=(f.length-1)*-f[0].height}return(0,J.jsx)(`text`,q({},a,{transform:s?`rotate(${s}, ${t}, ${n})`:void 0,x:t,y:n,textAnchor:c,dominantBaseline:l,style:u,children:f.map((e,n)=>(0,J.jsx)(`tspan`,{x:t,dy:`${n===0?p:f[0].height}px`,dominantBaseline:l,children:e.text},n))}))}function bW(e){let t=yB(e);return t<=30||t>=330||t<=210&&t>=150?`middle`:t<=180?`end`:`start`}function xW(e){let t=yB(e);return t<=30||t>=330?`hanging`:t<=210&&t>=150?`auto`:`central`}function SW(e){switch(e){case`start`:return`end`;case`end`:return`start`;default:return e}}var CW=[`scale`,`tickNumber`,`reverse`];function wW(e){let{xAxis:t,xAxisIds:n}=IB(),r=t[e.axisId??n[0]],{scale:i,tickNumber:a,reverse:o}=r,s=KE(r,CW),c=RE({props:q({},s,e),name:`MuiChartsXAxis`}),l=q({},UH,c),{position:u,tickLabelStyle:d,slots:f,slotProps:p}=l,m=xE(),h=yw(),g=HH(l),_=u===`bottom`?1:-1,v=f?.axisTick??`line`,y=f?.axisTickLabel??yW,b=bW((u===`bottom`?0:180)-(d?.angle??0)),x=xW((u===`bottom`?0:180)-(d?.angle??0));return{xScale:i,defaultizedProps:l,tickNumber:a,positionSign:_,classes:g,Tick:v,TickLabel:y,axisTickLabelProps:$E({elementType:y,externalSlotProps:p?.axisTickLabel,additionalProps:{style:q({},m.typography.caption,{fontSize:12,lineHeight:1.25,textAnchor:h?SW(b):b,dominantBaseline:x},d)},className:g.tickLabel,ownerState:{}}),reverse:o}}function TW(e){let{axisLabelHeight:t,ordinalTimeTicks:n}=e,{xScale:r,defaultizedProps:i,tickNumber:a,positionSign:o,classes:s,Tick:c,TickLabel:l,axisTickLabelProps:u,reverse:d}=wW(e),f=yw(),p=tW(),{disableTicks:m,tickSize:h,valueFormatter:g,slotProps:_,tickInterval:v,tickLabelInterval:y,tickPlacement:x,tickLabelPlacement:S,tickLabelMinGap:C,tickSpacing:w,height:T}=i,E=Qz(),{instance:D}=JR(),O=eW(),k=m?4:h,ee=aU({scale:r,tickNumber:a,valueFormatter:g,tickInterval:v,tickPlacement:x,tickLabelPlacement:S,tickSpacing:w,direction:`x`,ordinalTimeTicks:n}),te=pW(ee,{tickLabelStyle:u.style,tickLabelInterval:y,tickLabelMinGap:C,reverse:d,isMounted:p,isXInside:D.isXInside}),A=Math.max(0,T-(t>0?t+4:0)-k-3),ne=O?uW(te,E,A,f,u.style):new Map(Array.from(te).map(e=>[e,e.formattedValue]));return(0,J.jsx)(b.Fragment,{children:ee.map((e,t)=>{let{offset:n,labelOffset:r}=e,i=r??0,a=o*(k+3),d=D.isXInside(n),f=ne.get(e),p=te.has(e);return(0,J.jsxs)(`g`,{transform:`translate(${n}, 0)`,className:s.tickContainer,children:[!m&&d&&(0,J.jsx)(c,q({y2:o*k,className:s.tick},_?.axisTick)),f!==void 0&&p&&(0,J.jsx)(l,q({x:i,y:a},u,{text:f}))]},t)})})}var EW={start:0,extremities:0,end:1,middle:.5,tick:0};function DW(e){let{scale:t,tickInterval:n,tickLabelPlacement:r=`middle`,tickPlacement:i=`extremities`,groups:a}=e;return b.useMemo(()=>{let e=t.domain(),o=typeof n==`function`&&e.filter(n)||typeof n==`object`&&n||e;if(t.bandwidth()>0){let e=OW(o,a,i,r,t);return e[0]&&(e[0].ignoreTick=!0),[{formattedValue:void 0,offset:t.range()[0],labelOffset:0,groupIndex:a.length-1},...e,{formattedValue:void 0,offset:t.range()[1],labelOffset:0,groupIndex:a.length-1}]}return OW(o,a,i,r,t)},[t,n,a,i,r])}function OW(e,t,n,r,i){let a=[],o=new Map,s=0;for(let c=0;c{let i=e[t]??{},a=n??kW.tickSize,o=a*t*2+a;return q({},kW,i,{tickSize:r?.[t]??i.tickSize??o})};function jW(e){let{xScale:t,defaultizedProps:n,tickNumber:r,positionSign:i,classes:a,Tick:o,TickLabel:s,axisTickLabelProps:c}=wW(e);if(!cI(t))throw Error(eD(8));let{disableTicks:l,tickSize:u,valueFormatter:d,slotProps:f,tickInterval:p,tickPlacement:m,tickLabelPlacement:h}=n,g=n.groups,_=n.id,{instance:v}=JR(),y=ZR().use(LP),x=(_?y[_]:void 0)?.groupTickSizes,S=DW({scale:t,tickNumber:r,valueFormatter:d,tickInterval:p,tickPlacement:m,tickLabelPlacement:h,direction:`x`,groups:g});return(0,J.jsx)(b.Fragment,{children:S.map((e,t)=>{let{offset:n,labelOffset:r}=e,d=r??0,p=v.isXInside(n),m=e.formattedValue,h=e.ignoreTick??!1,_=e.groupIndex??0,y=AW(g,_,u,x),b=i*y.tickSize,S=i*(y.tickSize+3);return(0,J.jsxs)(`g`,{transform:`translate(${n}, 0)`,className:a.tickContainer,"data-group-index":_,children:[!l&&!h&&p&&(0,J.jsx)(o,q({y2:b,className:a.tick},f?.axisTick)),m!==void 0&&(0,J.jsx)(s,q({x:d,y:S},c,{style:q({},c.style,y.tickLabelStyle),text:m}))]},t)})})}var MW=Z(`g`,{name:`MuiChartsAxis`,slot:`Root`})(({theme:e})=>({[`& .${VH.tickLabel}`]:q({},e.typography.caption,{fill:(e.vars||e).palette.text.primary}),[`& .${VH.label}`]:{fill:(e.vars||e).palette.text.primary},[`& .${VH.line}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:`crispEdges`,strokeWidth:1},[`& .${VH.tick}`]:{stroke:(e.vars||e).palette.text.primary,shapeRendering:`crispEdges`}})),NW=[`axis`],PW=[`scale`,`tickNumber`,`reverse`,`ordinalTimeTicks`],FW=Z(MW,{name:`MuiChartsXAxis`,slot:`Root`})({});function IW(e){let{axis:t}=e,n=KE(e,NW),{scale:r,ordinalTimeTicks:i}=t,a=KE(t,PW),o=RE({props:q({},a,n),name:`MuiChartsXAxis`}),s=q({},UH,o),{position:c,className:l,labelStyle:u,offset:d,slots:f,slotProps:p,sx:m,disableLine:h,label:g,height:_}=s,v=xE(),y=HH(s),{left:b,top:x,width:S,height:C}=Qz(),w=c===`bottom`?1:-1,T=f?.axisLine??`line`,E=f?.axisLabel??yW,D=$E({elementType:E,externalSlotProps:p?.axisLabel,additionalProps:{style:q({},v.typography.body1,{lineHeight:1,fontSize:14,textAnchor:`middle`,dominantBaseline:c===`bottom`?`text-after-edge`:`text-before-edge`},u)},ownerState:{}});if(c===`none`)return null;let O=g?iO(g,D.style).height:0,k=r.domain(),ee=cI(r)?k.length===0:k.some(WH),te=null;ee||(te=`groups`in t&&Array.isArray(t.groups)?(0,J.jsx)(jW,q({},n)):(0,J.jsx)(TW,q({},n,{axisLabelHeight:O,ordinalTimeTicks:i})));let A={x:b+S/2,y:w*_};return(0,J.jsxs)(FW,{transform:`translate(0, ${c===`bottom`?x+C+d:x-d})`,className:Y(y.root,l),"data-axis-id":s.id,sx:m,children:[!h&&(0,J.jsx)(T,q({x1:b,x2:b+S,className:y.line},p?.axisLine)),te,g&&(0,J.jsx)(`g`,{className:y.label,children:(0,J.jsx)(E,q({},A,D,{text:g}))})]})}function LW(e){let{xAxis:t,xAxisIds:n}=IB(),r=t[e.axisId??n[0]];return r?(0,J.jsx)(IW,q({},e,{axis:r})):null}function RW(e,t,n,r,i){let a=new Map,o=yB(i?.angle??0),s=1,c=1;i?.textAnchor===`start`?(s=1/0,c=1):i?.textAnchor===`end`?(s=1,c=1/0):(s=2,c=2),o>180&&([s,c]=[c,s]),r&&([s,c]=[c,s]);for(let r of e)if(r.formattedValue){let e=Math.min((r.offset+r.labelOffset)*s,(t.top+t.height+t.bottom-r.offset-r.labelOffset)*c);a.set(r,lW(r.formattedValue.toString(),t=>cW(t,{width:n,height:e,angle:o,measureText:e=>iO(e,i)})))}return a}var zW=e=>{let{classes:t,position:n}=e;return tT({root:[`root`,`directionY`,n],line:[`line`],tickContainer:[`tickContainer`],tick:[`tick`],tickLabel:[`tickLabel`],label:[`label`]},BH,t)},BW={disableLine:!1,disableTicks:!1,tickSize:6},VW=[`scale`,`tickNumber`,`reverse`];function HW(e){let{yAxis:t,yAxisIds:n}=LB(),r=t[e.axisId??n[0]],{scale:i,tickNumber:a}=r,o=KE(r,VW),s=RE({props:q({},o,e),name:`MuiChartsYAxis`}),c=q({},BW,s),{position:l,tickLabelStyle:u,slots:d,slotProps:f}=c,p=xE(),m=yw(),h=zW(c),g=l===`right`?1:-1,_=typeof u?.fontSize==`number`?u.fontSize:12,v=d?.axisTick??`line`,y=d?.axisTickLabel??yW,b=bW((l===`right`?-90:90)-(u?.angle??0)),x=xW((l===`right`?-90:90)-(u?.angle??0));return{yScale:i,defaultizedProps:c,tickNumber:a,positionSign:g,classes:h,Tick:v,TickLabel:y,axisTickLabelProps:$E({elementType:y,externalSlotProps:f?.axisTickLabel,additionalProps:{style:q({},p.typography.caption,{fontSize:_,textAnchor:m?SW(b):b,dominantBaseline:x},u)},className:h.tickLabel,ownerState:{}})}}function UW(e){let{axisLabelHeight:t,ordinalTimeTicks:n}=e,{yScale:r,defaultizedProps:i,tickNumber:a,positionSign:o,classes:s,Tick:c,TickLabel:l,axisTickLabelProps:u}=HW(e),d=yw(),{disableTicks:f,tickSize:p,valueFormatter:m,slotProps:h,tickPlacement:g,tickLabelPlacement:_,tickInterval:v,tickLabelInterval:y,tickSpacing:x,width:S}=i,C=Qz(),{instance:w}=JR(),T=eW(),E=f?4:p,D=aU({scale:r,tickNumber:a,valueFormatter:m,tickPlacement:g,tickLabelPlacement:_,tickInterval:v,tickSpacing:x,direction:`y`,ordinalTimeTicks:n}),O=Math.max(0,S-(t>0?t+2:0)-E-2),k=T?RW(D,C,O,d,u.style):new Map(Array.from(D).map(e=>[e,e.formattedValue]));return(0,J.jsx)(b.Fragment,{children:D.map((e,t)=>{let{offset:n,labelOffset:r,value:i}=e,a=o*(E+2),d=r,p=typeof y==`function`&&!y?.(i,t),m=w.isYInside(n),g=k.get(e);return m?(0,J.jsxs)(`g`,{transform:`translate(0, ${n})`,className:s.tickContainer,children:[!f&&(0,J.jsx)(c,q({x2:o*E,className:s.tick},h?.axisTick)),g!==void 0&&!p&&(0,J.jsx)(l,q({x:a,y:d,text:g},u))]},t):null})})}function WW(e){let{yScale:t,defaultizedProps:n,tickNumber:r,positionSign:i,classes:a,Tick:o,TickLabel:s,axisTickLabelProps:c}=HW(e);if(!cI(t))throw Error(eD(9));let{disableTicks:l,tickSize:u,valueFormatter:d,slotProps:f,tickInterval:p,tickPlacement:m,tickLabelPlacement:h}=n,g=n.groups,_=n.id,{instance:v}=JR(),y=ZR().use(zP),x=(_?y[_]:void 0)?.groupTickSizes,S=DW({scale:t,tickNumber:r,valueFormatter:d,tickInterval:p,tickPlacement:m,tickLabelPlacement:h,direction:`y`,groups:g});return(0,J.jsx)(b.Fragment,{children:S.map((e,t)=>{let{offset:n,labelOffset:r}=e,d=r??0,p=v.isYInside(n),m=e.formattedValue,h=e.ignoreTick??!1,_=e.groupIndex??0,y=AW(g,_,u,x),b=i*y.tickSize,S=i*(y.tickSize+2);return(0,J.jsxs)(`g`,{transform:`translate(0, ${n})`,className:a.tickContainer,"data-group-index":_,children:[!l&&!h&&p&&(0,J.jsx)(o,q({x2:b,className:a.tick},f?.axisTick)),m!==void 0&&(0,J.jsx)(s,q({x:S,y:d},c,{style:q({},c.style,y.tickLabelStyle),text:m}))]},t)})})}var GW=[`axis`],KW=[`scale`,`tickNumber`,`reverse`,`ordinalTimeTicks`],qW=Z(MW,{name:`MuiChartsYAxis`,slot:`Root`})({});function JW(e){let{axis:t}=e,n=KE(e,GW),{scale:r,ordinalTimeTicks:i}=t,a=KE(t,KW),o=eW(),s=RE({props:q({},a,n),name:`MuiChartsYAxis`}),c=q({},BW,s),{position:l,className:u,disableLine:d,label:f,labelStyle:p,offset:m,width:h,sx:g,slots:_,slotProps:v}=c,y=xE(),b=zW(c),{left:x,top:S,width:C,height:w}=Qz(),T=l===`right`?1:-1,E=_?.axisLine??`line`,D=_?.axisLabel??yW,O=$E({elementType:E,externalSlotProps:v?.axisLine,additionalProps:{strokeLinecap:`square`},ownerState:{}}),k=$E({elementType:D,externalSlotProps:v?.axisLabel,additionalProps:{style:q({},y.typography.body1,{lineHeight:1,fontSize:14,angle:T*90,textAnchor:`middle`,dominantBaseline:`text-before-edge`},p)},ownerState:{}});if(l===`none`)return null;let ee={x:T*h,y:S+w/2},te=f==null?0:iO(f,k.style).height,A=r.domain(),ne=cI(r)?A.length===0:A.some(WH),re=null;return ne||(re=`groups`in t&&Array.isArray(t.groups)?(0,J.jsx)(WW,q({},n)):(0,J.jsx)(UW,q({},n,{axisLabelHeight:te,ordinalTimeTicks:i}))),(0,J.jsxs)(qW,{transform:`translate(${l===`right`?x+C+m:x-m}, 0)`,className:Y(b.root,u),"data-axis-id":c.id,sx:g,children:[!d&&(0,J.jsx)(E,q({y1:S,y2:S+w,className:b.line},O)),re,f&&o&&(0,J.jsx)(`g`,{className:b.label,children:(0,J.jsx)(D,q({},ee,k,{text:f}))})]})}function YW(e){let{yAxis:t,yAxisIds:n}=LB(),r=t[e.axisId??n[0]];return r?(0,J.jsx)(JW,q({},e,{axis:r})):null}function XW(e){let{slots:t,slotProps:n}=e,{xAxisIds:r,xAxis:i}=IB(),{yAxisIds:a,yAxis:o}=LB(),s=t?.xAxis??LW,c=t?.yAxis??YW;return(0,J.jsxs)(b.Fragment,{children:[r.map(e=>!i[e].position||i[e].position===`none`?null:(0,J.jsx)(s,{slots:t,slotProps:n,axisId:e},e)),a.map(e=>!o[e].position||o[e].position===`none`?null:(0,J.jsx)(c,{slots:t,slotProps:n,axisId:e},e))]})}function ZW(e){return typeof e.main==`string`}function QW(e,t=[]){if(!ZW(e))return!1;for(let n of t)if(!e.hasOwnProperty(n)||typeof e[n]!=`string`)return!1;return!0}function $W(e=[]){return([,t])=>t&&QW(t,e)}function eG(e){return DC(`MuiTypography`,e)}OC(`MuiTypography`,[`root`,`h1`,`h2`,`h3`,`h4`,`h5`,`h6`,`subtitle1`,`subtitle2`,`body1`,`body2`,`inherit`,`button`,`caption`,`overline`,`alignLeft`,`alignRight`,`alignCenter`,`alignJustify`,`noWrap`,`gutterBottom`]);var tG=e=>{let{align:t,gutterBottom:n,noWrap:r,variant:i,classes:a}=e;return tT({root:[`root`,i,e.align!==`inherit`&&`align${EE(t)}`,n&&`gutterBottom`,r&&`noWrap`]},eG,a)},nG=Z(`span`,{name:`MuiTypography`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],n.align!==`inherit`&&t[`align${EE(n.align)}`],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom]}})(wE(({theme:e})=>({margin:0,variants:[{props:{variant:`inherit`},style:{font:`inherit`,lineHeight:`inherit`,letterSpacing:`inherit`}},...Object.entries(e.typography).filter(([e,t])=>e!==`inherit`&&t&&typeof t==`object`).map(([e,t])=>({props:{variant:e},style:t})),...Object.entries(e.palette).filter($W()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}})),...Object.entries(e.palette?.text||{}).filter(([,e])=>typeof e==`string`).map(([t])=>({props:{color:`text${EE(t)}`},style:{color:(e.vars||e).palette.text[t]}})),{props:({ownerState:e})=>e.align!==`inherit`,style:{textAlign:`var(--Typography-textAlign)`}},{props:({ownerState:e})=>e.noWrap,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`}},{props:({ownerState:e})=>e.gutterBottom,style:{marginBottom:`0.35em`}}]}))),rG={h1:`h1`,h2:`h2`,h3:`h3`,h4:`h4`,h5:`h5`,h6:`h6`,subtitle1:`h6`,subtitle2:`h6`,body1:`p`,body2:`p`,inherit:`p`},iG=b.forwardRef(function(e,t){let n=TE({props:e,name:`MuiTypography`}),{color:r,align:i=`inherit`,className:a,component:o,gutterBottom:s=!1,noWrap:c=!1,variant:l=`body1`,variantMapping:u=rG,...d}=n,f={...n,align:i,color:r,className:a,component:o,gutterBottom:s,noWrap:c,variant:l,variantMapping:u},p=o||u[l]||rG[l]||`span`,m=tG(f);return(0,J.jsx)(nG,{as:p,ref:t,className:Y(m.root,a),...d,ownerState:f,style:{...i!==`inherit`&&{"--Typography-textAlign":i},...d.style}})});function aG(e){return DC(`MuiChartsTooltip`,e)}var oG=OC(`MuiChartsTooltip`,[`root`,`paper`,`table`,`row`,`cell`,`mark`,`markContainer`,`labelCell`,`valueCell`,`axisValueCell`]),sG=e=>tT({root:[`root`],paper:[`paper`],table:[`table`],row:[`row`],cell:[`cell`],mark:[`mark`],markContainer:[`markContainer`],labelCell:[`labelCell`],valueCell:[`valueCell`],axisValueCell:[`axisValueCell`]},aG,e);function cG(){let e=ZR(),t=e.use(UR),n=e.use(HN),r=KB(),{xAxis:i,xAxisIds:a}=IB(),{yAxis:o,yAxisIds:s}=LB(),{zAxis:c,zAxisIds:l}=WB(),{rotationAxis:u,rotationAxisIds:d}=BB(),{radiusAxis:f,radiusAxisIds:p}=VB();if(!t)return null;let m=r[t.type]?.series[t.seriesId];if(!m)return null;let h=hP(m)?m.xAxisId??a[0]:void 0,g=hP(m)?m.yAxisId??s[0]:void 0,_=tB(m)?(`radiusAxisId`in m?m.radiusAxisId:void 0)??p[0]:void 0,v=tB(m)?(`rotationAxisId`in m?m.rotationAxisId:void 0)??d[0]:void 0,y=(`colorAxisId`in m?m.colorAxisId:void 0)??(`zAxisId`in m?m.zAxisId:void 0)??l[0],b=v===void 0?h===void 0?void 0:i[h]:u[v],x=_===void 0?g===void 0?void 0:o[g]:f[_],S=n[m.type].colorProcessor(m,b,x,y===void 0?void 0:c[y]),C={};return h!==void 0&&(C.x=i[h]),g!==void 0&&(C.y=o[g]),v!==void 0&&(C.rotation=u[v]),_!==void 0&&(C.radius=f[_]),n[m.type].tooltipGetter({series:m,axesConfig:C,getColor:S,identifier:t})}var lG=Z(`div`,{name:`MuiChartsTooltip`,slot:`Container`,overridesResolver:(e,t)=>t.paper})(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,borderRadius:(e.vars||e).shape?.borderRadius,border:`solid ${(e.vars||e).palette.divider} 1px`})),uG=Z(`table`,{name:`MuiChartsTooltip`,slot:`Table`})(({theme:e})=>({borderSpacing:0,[`& .${oG.markContainer}`]:{display:`inline-block`,width:`calc(20px + ${e.spacing(1.5)})`,verticalAlign:`middle`},"& caption":{borderBottom:`solid ${(e.vars||e).palette.divider} 1px`,padding:e.spacing(.5,1.5),textAlign:`start`,whiteSpace:`nowrap`,"& span":{marginRight:e.spacing(1.5)}}})),dG=Z(`tr`,{name:`MuiChartsTooltip`,slot:`Row`})(({theme:e})=>({"tr:first-of-type& td":{paddingTop:e.spacing(.5)},"tr:last-of-type& td":{paddingBottom:e.spacing(.5)}})),fG=Z(iG,{name:`MuiChartsTooltip`,slot:`Cell`})(({theme:e})=>({verticalAlign:`middle`,color:(e.vars||e).palette.text.secondary,textAlign:`start`,[`&.${oG.cell}`]:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)},[`&.${oG.labelCell}`]:{whiteSpace:`nowrap`,fontWeight:e.typography.fontWeightRegular},[`&.${oG.valueCell}, &.${oG.axisValueCell}`]:{color:(e.vars||e).palette.text.primary,fontWeight:e.typography.fontWeightMedium},[`&.${oG.valueCell}`]:{paddingLeft:e.spacing(1.5),paddingRight:e.spacing(1.5)},"td:first-of-type&, th:first-of-type&":{paddingLeft:e.spacing(1.5)},"td:last-of-type&, th:last-of-type&":{paddingRight:e.spacing(1.5)}}));function pG(e){return DC(`MuiChartsLabelMark`,e)}var mG=OC(`MuiChartsLabelMark`,[`root`,`line`,`lineAndMark`,`square`,`circle`,`fill`]),hG=e=>{let{type:t}=e;return tT({root:typeof t==`function`?[`root`]:[`root`,t===`line+mark`?`lineAndMark`:t],fill:[`fill`]},pG,e.classes)},gG=(e,t,n)=>b.forwardRef(function(r,i){let a=RE({props:r,name:e}),o=BC(typeof t.defaultProps==`function`?t.defaultProps(a):t.defaultProps??{},a),s=xE(),c=t.classesResolver?.(o,s);return(0,J.jsx)(b.forwardRef(n),q({},o,{classes:c,ref:i}))}),_G=[`type`,`markShape`,`color`,`className`,`classes`],vG=Z(`div`,{name:`MuiChartsLabelMark`,slot:`Root`})(()=>({display:`flex`,width:14,height:14,"& > *":{width:`100%`,height:`100%`},[`&.${mG.line}`]:{width:16,height:8,alignItems:`center`},[`&.${mG.lineAndMark}`]:{alignItems:`center`},[`&.${mG.square}`]:{height:13,width:13,borderRadius:2,overflow:`hidden`},[`&.${mG.circle}`]:{height:15,width:15},svg:{display:`block`}})),yG=gG(`MuiChartsLabelMark`,{defaultProps:{type:`square`},classesResolver:hG},function(e,t){let{type:n,markShape:r,color:i,className:a,classes:o}=e,s=KE(e,_G),c=n,l=xE();return(0,J.jsx)(vG,q({className:Y(o?.root,a),ownerState:e,"aria-hidden":`true`,ref:t},s,{children:typeof c==`function`?(0,J.jsx)(c,{className:o?.fill,color:i}):(0,J.jsxs)(b.Fragment,{children:[n===`circle`&&(0,J.jsx)(`svg`,{viewBox:`0 0 15 15`,children:(0,J.jsx)(`circle`,{className:o?.fill,r:`7.5`,cx:`7.5`,cy:`7.5`,fill:i})}),n===`line`&&(0,J.jsx)(`svg`,{viewBox:`0 0 16 8`,preserveAspectRatio:`none`,children:(0,J.jsx)(`path`,{className:o?.fill,d:`M 2 4 L 14 4`,stroke:i,strokeWidth:`4`,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`})}),n===`line+mark`&&(0,J.jsxs)(`svg`,{viewBox:`0 0 16 16`,preserveAspectRatio:`none`,children:[(0,J.jsx)(`path`,{className:o?.fill,d:`M 1 8 L 15 8`,stroke:i,strokeWidth:2,strokeLinecap:`round`,vectorEffect:`non-scaling-stroke`}),r&&(0,J.jsx)(`path`,{d:qV(KV[BU(r)],32)(),transform:`translate(8, 8) `,stroke:i,strokeWidth:2,fill:(l.vars||l).palette.background.paper})]}),n!==`line`&&n!==`circle`&&n!==`line+mark`&&(0,J.jsx)(`svg`,{viewBox:`0 0 13 13`,children:(0,J.jsx)(`rect`,{className:o?.fill,width:`13`,height:`13`,fill:i})})]})}))});function bG(e){let{classes:t,sx:n}=e,r=cG(),i=ZR().use(HN),a=sG(t);if(!r)return null;let o=i[r.identifier.type],s=o&&`ItemTooltipContent`in o?o.ItemTooltipContent:null;if(`values`in r){let{label:e,color:i,markType:o,markShape:c}=r,l=s??xG;return(0,J.jsx)(lG,{sx:n,className:a.paper,children:(0,J.jsxs)(uG,{className:a.table,children:[(0,J.jsxs)(iG,{component:`caption`,children:[(0,J.jsx)(`div`,{className:a.markContainer,children:(0,J.jsx)(yG,{type:o,markShape:c,color:i,className:a.mark})}),e]}),(0,J.jsx)(`tbody`,{children:(0,J.jsx)(l,{classes:t,item:r})})]})})}let c=s??SG;return(0,J.jsx)(lG,{sx:n,className:a.paper,children:(0,J.jsx)(uG,{className:a.table,children:(0,J.jsx)(`tbody`,{children:(0,J.jsx)(c,{classes:t,item:r})})})})}function xG({classes:e,item:t}){let n=sG(e);return(0,J.jsx)(b.Fragment,{children:t.values.map(e=>(0,J.jsxs)(dG,{className:n.row,"data-series":t.identifier.seriesId,"data-index":t.identifier.dataIndex,children:[(0,J.jsx)(fG,{className:Y(n.labelCell,n.cell),component:`th`,children:e.label}),(0,J.jsx)(fG,{className:Y(n.valueCell,n.cell),component:`td`,children:e.formattedValue})]},e.label))})}function SG({classes:e,item:t}){let{color:n,label:r,formattedValue:i,markType:a,markShape:o}=t,s=sG(e);return i==null||typeof i!=`string`?null:(0,J.jsxs)(dG,{className:s.row,"data-series":t.identifier.seriesId,"data-index":`dataIndex`in t.identifier?t.identifier.dataIndex:void 0,children:[(0,J.jsxs)(fG,{className:Y(s.labelCell,s.cell),component:`th`,children:[(0,J.jsx)(`div`,{className:s.markContainer,children:(0,J.jsx)(yG,{type:a,markShape:o,color:n,className:s.mark})}),r]}),(0,J.jsx)(fG,{className:Y(s.valueCell,s.cell),component:`td`,children:i})]})}function CG(e){let t=ZR().use(HN),n=b.useMemo(()=>{let e={};return Object.keys(t).forEach(n=>{e[n]=t[n].colorProcessor}),e},[t]);return e?n[e]:n}function wG(e,t){return typeof e==`function`?e(t):e}var TG=qC({themeId:by});function EG(e){return e instanceof Date?e.toUTCString():e.toLocaleString()}var DG=`@media (pointer: fine)`,OG=()=>TG(DG,{defaultMatches:!0}),kG=new Set([`bar`,`line`,`scatter`,`rangeBar`,`ohlc`]);function AG(e,t,n){let r=e.data?.[t]??null,i=(e.valueFormatter??(t=>e.scaleType===`utc`?EG(t):t.toLocaleString()))(r,{location:`tooltip`,scale:e.scale});return{axisDirection:n,axisId:e.id,mainAxis:e,dataIndex:t,axisValue:r,axisFormattedValue:i,seriesItems:[]}}function jG(e){if(!(!(`showMark`in e)||!e.showMark))return`shape`in e&&e.shape?e.shape:`circle`}function MG(e){let{directions:t}=e??{},n=RB(),r=zB(),i=HB(),a=UB(),o=ZR(),s=o.use(TR),c=o.use(ER),l=o.use(AB),u=o.use(PB),d=KB(),{xAxis:f}=IB(),{yAxis:p}=LB(),{zAxis:m,zAxisIds:h}=WB(),{rotationAxis:g}=BB(),{radiusAxis:_}=VB(),v=CG(),y=o.use(GN);if(s.length===0&&c.length===0&&l.length===0&&u.length===0)return null;let b=[];return(t===void 0||t.includes(`x`))&&s.forEach(({axisId:e,dataIndex:t})=>{b.push(AG(f[e],t,`x`))}),(t===void 0||t.includes(`y`))&&c.forEach(({axisId:e,dataIndex:t})=>{b.push(AG(p[e],t,`y`))}),(t===void 0||t.includes(`rotation`))&&l.forEach(({axisId:e,dataIndex:t})=>{b.push(AG(g[e],t,`rotation`))}),(t===void 0||t.includes(`radius`))&&u.forEach(({axisId:e,dataIndex:t})=>{b.push(AG(_[e],t,`radius`))}),Object.keys(d).filter(e=>kG.has(e)).forEach(e=>{let t=d[e];return t?t.seriesOrder.forEach(i=>{let a=t.series[i];if(y&&!y({type:e,seriesId:i}))return;let o=a.xAxisId??n.id,s=a.yAxisId??r.id,c=b.findIndex(({axisDirection:e,axisId:t})=>e===`x`&&t===o||e===`y`&&t===s);if(c>=0){let t=`colorAxisId`in a&&a.colorAxisId||`zAxisId`in a&&a.zAxisId||h[0],{dataIndex:n}=b[c],r=v[e]?.(a,f[o],p[s],t?m[t]:void 0)(n)??``,l=a.data[n]??null,u=wG(a.label,`tooltip`)??null,d,g;if(e===`ohlc`&&Array.isArray(l)){let[e,t,r,i]=l,o=a.valueFormatter;d={open:e,high:t,low:r,close:i},g={open:o(e,{dataIndex:n,field:`open`}),high:o(t,{dataIndex:n,field:`high`}),low:o(r,{dataIndex:n,field:`low`}),close:o(i,{dataIndex:n,field:`close`})}}else d=l,g=a.valueFormatter(l,{dataIndex:n});b[c].seriesItems.push({seriesId:i,color:r,value:d,formattedValue:g,formattedLabel:u,markType:a.labelMarkType,markShape:jG(a)})}}):[]}),Object.keys(d).filter(eB).forEach(e=>{let t=d[e];return t?t.seriesOrder.forEach(n=>{let r=t.series[n];if(y&&!y({type:e,seriesId:n}))return;let o=(`rotationAxisId`in r?r.rotationAxisId:void 0)??i?.id,s=(`radiusAxisId`in r?r.radiusAxisId:void 0)??a?.id,c=b.findIndex(({axisDirection:e,axisId:t})=>e===`rotation`&&t===o||e===`radius`&&t===s);if(c>=0){let{dataIndex:t}=b[c],i=v[e]?.(r,o===void 0?void 0:g[o],s===void 0?void 0:_[s])(t)??``,a=r.data[t]??null,l=r.valueFormatter(a,{dataIndex:t}),u=wG(r.label,`tooltip`)??null;b[c].seriesItems.push({seriesId:n,color:i,value:a,formattedValue:l,formattedLabel:u,markType:r.labelMarkType,markShape:jG(r)})}}):[]}),b}function NG(e){let{sort:t}=e,n=sG(e.classes),r=ZR().use(rP),i=MG();return i===null?null:(0,J.jsx)(lG,{sx:e.sx,className:n.paper,children:i.map(({axisId:i,mainAxis:a,axisValue:o,axisFormattedValue:s,seriesItems:c})=>{let l=t&&t!==`none`?[...c].sort((e,n)=>{let r=e.value?.valueOf(),i=n.value?.valueOf();return typeof r==`number`?typeof i==`number`?t===`asc`?r-i:i-r:-1:1}):c;return(0,J.jsxs)(uG,{className:n.table,children:[o!=null&&!a.hideTooltip&&(0,J.jsx)(iG,{component:`caption`,children:s}),(0,J.jsx)(`tbody`,{children:l.map(t=>{let n=r(t.seriesId),i=n&&`AxisTooltipContent`in n?n.AxisTooltipContent??PG:PG;return(0,J.jsx)(i,{classes:e.classes,item:t},t.seriesId)})})]},i)})})}function PG(e){let t=sG(e.classes),{item:n}=e;return n.formattedValue==null||typeof n.formattedValue!=`string`?null:(0,J.jsxs)(dG,{className:t.row,"data-series":n.seriesId,"data-index":`dataIndex`in n?n.dataIndex:void 0,children:[(0,J.jsxs)(fG,{className:Y(t.labelCell,t.cell),component:`th`,children:[(0,J.jsx)(`div`,{className:t.markContainer,children:(0,J.jsx)(yG,{type:n.markType,markShape:n.markShape,color:n.color,className:t.mark})}),n.formattedLabel||null]}),(0,J.jsx)(fG,{className:Y(t.valueCell,t.cell),component:`td`,children:n.formattedValue})]})}var FG=`bottom`,IG=`right`,LG=`left`,RG=`auto`,zG=[`top`,FG,IG,LG],BG=`start`,VG=`clippingParents`,HG=`viewport`,UG=`popper`,WG=`reference`,GG=zG.reduce(function(e,t){return e.concat([t+`-`+BG,t+`-end`])},[]),KG=[].concat(zG,[RG]).reduce(function(e,t){return e.concat([t,t+`-`+BG,t+`-end`])},[]),qG=[`beforeRead`,`read`,`afterRead`,`beforeMain`,`main`,`afterMain`,`beforeWrite`,`write`,`afterWrite`];function JG(e){return e?(e.nodeName||``).toLowerCase():null}function YG(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function XG(e){return e instanceof YG(e).Element||e instanceof Element}function ZG(e){return e instanceof YG(e).HTMLElement||e instanceof HTMLElement}function QG(e){return typeof ShadowRoot>`u`?!1:e instanceof YG(e).ShadowRoot||e instanceof ShadowRoot}function $G(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!ZG(i)||!JG(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function eK(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!ZG(r)||!JG(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var tK={name:`applyStyles`,enabled:!0,phase:`write`,fn:$G,effect:eK,requires:[`computeStyles`]};function nK(e){return e.split(`-`)[0]}var rK=Math.max,iK=Math.min,aK=Math.round;function oK(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function sK(){return!/^((?!chrome|android).)*safari/i.test(oK())}function cK(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&ZG(e)&&(i=e.offsetWidth>0&&aK(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&aK(r.height)/e.offsetHeight||1);var o=(XG(e)?YG(e):window).visualViewport,s=!sK()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function lK(e){var t=cK(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function uK(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&QG(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function dK(e){return YG(e).getComputedStyle(e)}function fK(e){return[`table`,`td`,`th`].indexOf(JG(e))>=0}function pK(e){return((XG(e)?e.ownerDocument:e.document)||window.document).documentElement}function mK(e){return JG(e)===`html`?e:e.assignedSlot||e.parentNode||(QG(e)?e.host:null)||pK(e)}function hK(e){return!ZG(e)||dK(e).position===`fixed`?null:e.offsetParent}function gK(e){var t=/firefox/i.test(oK());if(/Trident/i.test(oK())&&ZG(e)&&dK(e).position===`fixed`)return null;var n=mK(e);for(QG(n)&&(n=n.host);ZG(n)&&[`html`,`body`].indexOf(JG(n))<0;){var r=dK(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function _K(e){for(var t=YG(e),n=hK(e);n&&fK(n)&&dK(n).position===`static`;)n=hK(n);return n&&(JG(n)===`html`||JG(n)===`body`&&dK(n).position===`static`)?t:n||gK(e)||t}function vK(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function yK(e,t,n){return rK(e,iK(t,n))}function bK(e,t,n){var r=yK(e,t,n);return r>n?n:r}function xK(){return{top:0,right:0,bottom:0,left:0}}function SK(e){return Object.assign({},xK(),e)}function CK(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var wK=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,SK(typeof e==`number`?CK(e,zG):e)};function TK(e){var t,n=e.state,r=e.name,i=e.options,a=n.elements.arrow,o=n.modifiersData.popperOffsets,s=nK(n.placement),c=vK(s),l=[`left`,`right`].indexOf(s)>=0?`height`:`width`;if(!(!a||!o)){var u=wK(i.padding,n),d=lK(a),f=c===`y`?`top`:LG,p=c===`y`?FG:IG,m=n.rects.reference[l]+n.rects.reference[c]-o[c]-n.rects.popper[l],h=o[c]-n.rects.reference[c],g=_K(a),_=g?c===`y`?g.clientHeight||0:g.clientWidth||0:0,v=m/2-h/2,y=u[f],b=_-d[l]-u[p],x=_/2-d[l]/2+v,S=yK(y,x,b),C=c;n.modifiersData[r]=(t={},t[C]=S,t.centerOffset=S-x,t)}}function EK(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||uK(t.elements.popper,r)&&(t.elements.arrow=r))}var DK={name:`arrow`,enabled:!0,phase:`main`,fn:TK,effect:EK,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function OK(e){return e.split(`-`)[1]}var kK={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function AK(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:aK(n*i)/i||0,y:aK(r*i)/i||0}}function jK(e){var t,n=e.popper,r=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,l=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=o.x,p=f===void 0?0:f,m=o.y,h=m===void 0?0:m,g=typeof u==`function`?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var _=o.hasOwnProperty(`x`),v=o.hasOwnProperty(`y`),y=LG,b=`top`,x=window;if(l){var S=_K(n),C=`clientHeight`,w=`clientWidth`;if(S===YG(n)&&(S=pK(n),dK(S).position!==`static`&&s===`absolute`&&(C=`scrollHeight`,w=`scrollWidth`)),S=S,i===`top`||(i===`left`||i===`right`)&&a===`end`){b=FG;var T=d&&S===x&&x.visualViewport?x.visualViewport.height:S[C];h-=T-r.height,h*=c?1:-1}if(i===`left`||(i===`top`||i===`bottom`)&&a===`end`){y=IG;var E=d&&S===x&&x.visualViewport?x.visualViewport.width:S[w];p-=E-r.width,p*=c?1:-1}}var D=Object.assign({position:s},l&&kK),O=u===!0?AK({x:p,y:h},YG(n)):{x:p,y:h};if(p=O.x,h=O.y,c){var k;return Object.assign({},D,(k={},k[b]=v?`0`:``,k[y]=_?`0`:``,k.transform=(x.devicePixelRatio||1)<=1?`translate(`+p+`px, `+h+`px)`:`translate3d(`+p+`px, `+h+`px, 0)`,k))}return Object.assign({},D,(t={},t[b]=v?h+`px`:``,t[y]=_?p+`px`:``,t.transform=``,t))}function MK(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0||r,a=n.adaptive,o=a===void 0||a,s=n.roundOffsets,c=s===void 0||s,l={placement:nK(t.placement),variation:OK(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,jK(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,jK(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var NK={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:MK,data:{}},PK={passive:!0};function FK(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0||i,o=r.resize,s=o===void 0||o,c=YG(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,PK)}),s&&c.addEventListener(`resize`,n.update,PK),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,PK)}),s&&c.removeEventListener(`resize`,n.update,PK)}}var IK={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:FK,data:{}},LK={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function RK(e){return e.replace(/left|right|bottom|top/g,function(e){return LK[e]})}var zK={start:`end`,end:`start`};function BK(e){return e.replace(/start|end/g,function(e){return zK[e]})}function VK(e){var t=YG(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function HK(e){return cK(pK(e)).left+VK(e).scrollLeft}function UK(e,t){var n=YG(e),r=pK(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=sK();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+HK(e),y:c}}function WK(e){var t=pK(e),n=VK(e),r=e.ownerDocument?.body,i=rK(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=rK(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+HK(e),s=-n.scrollTop;return dK(r||t).direction===`rtl`&&(o+=rK(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function GK(e){var t=dK(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function KK(e){return[`html`,`body`,`#document`].indexOf(JG(e))>=0?e.ownerDocument.body:ZG(e)&&GK(e)?e:KK(mK(e))}function qK(e,t){t===void 0&&(t=[]);var n=KK(e),r=n===e.ownerDocument?.body,i=YG(n),a=r?[i].concat(i.visualViewport||[],GK(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(qK(mK(a)))}function JK(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function YK(e,t){var n=cK(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function XK(e,t,n){return t===`viewport`?JK(UK(e,n)):XG(t)?YK(t,n):JK(WK(pK(e)))}function ZK(e){var t=qK(mK(e)),n=[`absolute`,`fixed`].indexOf(dK(e).position)>=0&&ZG(e)?_K(e):e;return XG(n)?t.filter(function(e){return XG(e)&&uK(e,n)&&JG(e)!==`body`}):[]}function QK(e,t,n,r){var i=t===`clippingParents`?ZK(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=XK(e,n,r);return t.top=rK(i.top,t.top),t.right=iK(i.right,t.right),t.bottom=iK(i.bottom,t.bottom),t.left=rK(i.left,t.left),t},XK(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function $K(e){var t=e.reference,n=e.element,r=e.placement,i=r?nK(r):null,a=r?OK(r):null,o=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,c;switch(i){case`top`:c={x:o,y:t.y-n.height};break;case FG:c={x:o,y:t.y+t.height};break;case IG:c={x:t.x+t.width,y:s};break;case LG:c={x:t.x-n.width,y:s};break;default:c={x:t.x,y:t.y}}var l=i?vK(i):null;if(l!=null){var u=l===`y`?`height`:`width`;switch(a){case BG:c[l]=c[l]-(t[u]/2-n[u]/2);break;case`end`:c[l]=c[l]+(t[u]/2-n[u]/2)}}return c}function eq(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,o=a===void 0?e.strategy:a,s=n.boundary,c=s===void 0?VG:s,l=n.rootBoundary,u=l===void 0?HG:l,d=n.elementContext,f=d===void 0?UG:d,p=n.altBoundary,m=p!==void 0&&p,h=n.padding,g=h===void 0?0:h,_=SK(typeof g==`number`?CK(g,zG):g),v=f===`popper`?WG:UG,y=e.rects.popper,b=e.elements[m?v:f],x=QK(XG(b)?b:b.contextElement||pK(e.elements.popper),c,u,o),S=cK(e.elements.reference),C=$K({reference:S,element:y,strategy:`absolute`,placement:i}),w=JK(Object.assign({},y,C)),T=f===`popper`?w:S,E={top:x.top-T.top+_.top,bottom:T.bottom-x.bottom+_.bottom,left:x.left-T.left+_.left,right:T.right-x.right+_.right},D=e.modifiersData.offset;if(f===`popper`&&D){var O=D[i];Object.keys(E).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;E[e]+=O[n]*t})}return E}function tq(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,o=n.padding,s=n.flipVariations,c=n.allowedAutoPlacements,l=c===void 0?KG:c,u=OK(r),d=u?s?GG:GG.filter(function(e){return OK(e)===u}):zG,f=d.filter(function(e){return l.indexOf(e)>=0});f.length===0&&(f=d);var p=f.reduce(function(t,n){return t[n]=eq(e,{placement:n,boundary:i,rootBoundary:a,padding:o})[nK(n)],t},{});return Object.keys(p).sort(function(e,t){return p[e]-p[t]})}function nq(e){if(nK(e)===`auto`)return[];var t=RK(e);return[BK(e),t,BK(t)]}function rq(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o===void 0||o,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0||p,h=n.allowedAutoPlacements,g=t.options.placement,_=nK(g)===g,v=c||(_||!m?[RK(g)]:nq(g)),y=[g].concat(v).reduce(function(e,n){return e.concat(nK(n)===`auto`?tq(t,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:h}):n)},[]),b=t.rects.reference,x=t.rects.popper,S=new Map,C=!0,w=y[0],T=0;T=0,ee=k?`width`:`height`,te=eq(t,{placement:E,boundary:u,rootBoundary:d,altBoundary:f,padding:l}),A=k?O?IG:LG:O?FG:`top`;b[ee]>x[ee]&&(A=RK(A));var ne=RK(A),re=[];if(a&&re.push(te[D]<=0),s&&re.push(te[A]<=0,te[ne]<=0),re.every(function(e){return e})){w=E,C=!1;break}S.set(E,re)}if(C)for(var ie=m?3:1,j=function(e){var t=y.find(function(t){var n=S.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return w=t,`break`},M=ie;M>0&&j(M)!==`break`;M--);t.placement!==w&&(t.modifiersData[r]._skip=!0,t.placement=w,t.reset=!0)}}var iq={name:`flip`,enabled:!0,phase:`main`,fn:rq,requiresIfExists:[`offset`],data:{_skip:!1}};function aq(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function oq(e){return[`top`,IG,FG,LG].some(function(t){return e[t]>=0})}function sq(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=eq(t,{elementContext:`reference`}),s=eq(t,{altBoundary:!0}),c=aq(o,r),l=aq(s,i,a),u=oq(c),d=oq(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var cq={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:sq};function lq(e,t,n){var r=nK(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function uq(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=KG.reduce(function(e,n){return e[n]=lq(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var dq={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:uq};function fq(e){var t=e.state,n=e.name;t.modifiersData[n]=$K({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var pq={name:`popperOffsets`,enabled:!0,phase:`read`,fn:fq,data:{}};function mq(e){return e===`x`?`y`:`x`}function hq(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,a=i===void 0||i,o=n.altAxis,s=o!==void 0&&o,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0||f,m=n.tetherOffset,h=m===void 0?0:m,g=eq(t,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),_=nK(t.placement),v=OK(t.placement),y=!v,b=vK(_),x=mq(b),S=t.modifiersData.popperOffsets,C=t.rects.reference,w=t.rects.popper,T=typeof h==`function`?h(Object.assign({},t.rects,{placement:t.placement})):h,E=typeof T==`number`?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),D=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(a){var k=b===`y`?`top`:LG,ee=b===`y`?FG:IG,te=b===`y`?`height`:`width`,A=S[b],ne=A+g[k],re=A-g[ee],ie=p?-w[te]/2:0,j=v===`start`?C[te]:w[te],M=v===`start`?-w[te]:-C[te],N=t.elements.arrow,ae=p&&N?lK(N):{width:0,height:0},oe=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:xK(),se=oe[k],ce=oe[ee],P=yK(0,C[te],ae[te]),F=y?C[te]/2-ie-P-se-E.mainAxis:j-P-se-E.mainAxis,le=y?-C[te]/2+ie+P+ce+E.mainAxis:M+P+ce+E.mainAxis,ue=t.elements.arrow&&_K(t.elements.arrow),de=ue?b===`y`?ue.clientTop||0:ue.clientLeft||0:0,fe=D?.[b]??0,pe=A+F-fe-de,me=A+le-fe,he=yK(p?iK(ne,pe):ne,A,p?rK(re,me):re);S[b]=he,O[b]=he-A}if(s){var ge=b===`x`?`top`:LG,_e=b===`x`?FG:IG,ve=S[x],ye=x===`y`?`height`:`width`,be=ve+g[ge],xe=ve-g[_e],Se=[`top`,LG].indexOf(_)!==-1,Ce=D?.[x]??0,I=Se?be:ve-C[ye]-w[ye]-Ce+E.altAxis,we=Se?ve+C[ye]+w[ye]-Ce-E.altAxis:xe,L=p&&Se?bK(I,ve,we):yK(p?I:be,ve,p?we:xe);S[x]=L,O[x]=L-ve}t.modifiersData[r]=O}}var gq={name:`preventOverflow`,enabled:!0,phase:`main`,fn:hq,requiresIfExists:[`offset`]};function _q(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function vq(e){return e===YG(e)||!ZG(e)?VK(e):_q(e)}function yq(e){var t=e.getBoundingClientRect(),n=aK(t.width)/e.offsetWidth||1,r=aK(t.height)/e.offsetHeight||1;return n!==1||r!==1}function bq(e,t,n){n===void 0&&(n=!1);var r=ZG(t),i=ZG(t)&&yq(t),a=pK(t),o=cK(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((JG(t)!==`body`||GK(a))&&(s=vq(t)),ZG(t)?(c=cK(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=HK(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function xq(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function Sq(e){var t=xq(e);return qG.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function Cq(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function wq(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var Tq={placement:`bottom`,modifiers:[],strategy:`absolute`};function Eq(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function Dq(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?Tq:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},Tq,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:XG(e)?qK(e):e.contextElement?qK(e.contextElement):[],popper:qK(t)};var s=Sq(wq([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(Eq(t,n)){i.rects={reference:bq(t,_K(n),i.options.strategy===`fixed`),popper:lK(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r{i||o(Mq(r)||document.body)},[r,i]),UC(()=>{if(a&&!i)return kq(t,a),()=>{kq(t,null)}},[t,a,i]),i){if(b.isValidElement(n)){let e={ref:s};return b.cloneElement(n,e)}return n}return a&&jq.createPortal(n,a)});function Pq(e){return DC(`MuiPopper`,e)}OC(`MuiPopper`,[`root`]);function Fq(e,t){if(t===`ltr`)return e;switch(e){case`bottom-end`:return`bottom-start`;case`bottom-start`:return`bottom-end`;case`top-end`:return`top-start`;case`top-start`:return`top-end`;default:return e}}function Iq(e){return typeof e==`function`?e():e}function Lq(e){return e.nodeType!==void 0}var Rq=e=>{let{classes:t}=e;return tT({root:[`root`]},Pq,t)},zq={},Bq=b.forwardRef(function(e,t){let{anchorEl:n,children:r,direction:i,disablePortal:a,modifiers:o,open:s,placement:c,popperOptions:l,popperRef:u,slotProps:d={},slots:f={},TransitionProps:p,ownerState:m,...h}=e,g=b.useRef(null),_=gE(g,t),v=b.useRef(null),y=gE(v,u),x=b.useRef(y);UC(()=>{x.current=y},[y]),b.useImperativeHandle(u,()=>v.current,[]);let S=Fq(c,i),[C,w]=b.useState(S),T=b.useMemo(()=>Iq(n),[n]);b.useEffect(()=>{v.current&&v.current.forceUpdate()}),UC(()=>{if(!T||!s)return;let e=e=>{w(e.placement)},t=[{name:`preventOverflow`,options:{altBoundary:a}},{name:`flip`,options:{altBoundary:a}},{name:`onUpdate`,enabled:!0,phase:`afterWrite`,fn:({state:t})=>{e(t)}}];o!=null&&(t=t.concat(o)),l&&l.modifiers!=null&&(t=t.concat(l.modifiers));let n=Oq(T,g.current,{placement:S,...l,modifiers:t});x.current(n);let r=g.current;return()=>{if(r){let{style:e}=r,t=e.position,i=e.top,a=e.left,o=e.transform;n.destroy(),e.position=t,e.top=i,e.left=a,e.transform=o}else n.destroy();x.current(null)}},[T,a,o,s,l,S]);let E={placement:C};p!==null&&(E.TransitionProps=p);let D=Rq(e),O=f.root??`div`,k=$E({elementType:O,externalSlotProps:d.root,externalForwardedProps:h,additionalProps:{role:`tooltip`,ref:_},ownerState:e,className:D.root});return(0,J.jsx)(O,{...k,children:typeof r==`function`?r(E):r})}),Vq=Z(b.forwardRef(function(e,t){let{anchorEl:n,children:r,container:i,direction:a=`ltr`,disablePortal:o=!1,keepMounted:s=!1,modifiers:c,open:l,placement:u=`bottom`,popperOptions:d=zq,popperRef:f,style:p,transition:m=!1,slotProps:h={},slots:g={},..._}=e,[v,y]=b.useState(!0),x=()=>{y(!1)},S=()=>{y(!0)};if(!s&&!l&&(!m||v))return null;let C;if(i)C=i;else if(n){let e=Iq(n);C=e&&Lq(e)?vE(e).body:vE(null).body}let w=!l&&s&&(!m||v)?`none`:void 0,T=m?{in:l,onEnter:x,onExited:S}:void 0;return(0,J.jsx)(Nq,{disablePortal:o,container:C,children:(0,J.jsx)(Bq,{anchorEl:n,direction:a,disablePortal:o,modifiers:c,ref:t,open:m?!v:l,placement:u,popperOptions:d,popperRef:f,slotProps:h,slots:g,..._,style:{position:`fixed`,top:0,left:0,display:w,...p},TransitionProps:T,children:r})})}),{name:`MuiPopper`,slot:`Root`})({}),Hq=b.forwardRef(function(e,t){let n=yw(),{anchorEl:r,component:i,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,slots:m,slotProps:h,...g}=TE({props:e,name:`MuiPopper`}),_={anchorEl:r,container:a,disablePortal:o,keepMounted:s,modifiers:c,open:l,placement:u,popperOptions:d,popperRef:f,transition:p,...g};return(0,J.jsx)(Vq,{as:i,direction:n?`rtl`:`ltr`,slots:m,slotProps:h,..._,ref:t})});function Uq(e){let{children:t,defer:n=!1,fallback:r=null}=e,[i,a]=b.useState(!1);return UC(()=>{n||a(!0)},[n]),b.useEffect(()=>{n&&a(!0)},[n]),i?t:r}function Wq(e){let t,n,r=()=>{n=null,e(...t)};function i(...e){t=e,n||=requestAnimationFrame(r)}return i.clear=()=>{n&&=(cancelAnimationFrame(n),null)},i}function Gq(){let e=ZR(),t=e.use(fB),n=e.use(qD);return t===void 0?n===void 0?`none`:`cartesian`:`polar`}var Kq=[`trigger`,`position`,`anchor`,`classes`,`children`],qq=()=>!1,Jq=()=>null;function Yq(e,t,n){return n?qq:e===`item`?WR:t===`polar`?FB:t===`cartesian`?DR:qq}var Xq={item:`node`,axis:`chart`,none:`pointer`},Zq=(e,t)=>{switch(e){case`node`:return t;case`chart`:return kR;default:return Jq}},Qq=Z(Hq,{name:`MuiChartsTooltip`,slot:`Root`})(({theme:e})=>({pointerEvents:`none`,zIndex:e.zIndex.modal}));function $q(e){let t=RE({props:e,name:`MuiChartsTooltipContainer`}),{trigger:n=`axis`,position:r,anchor:i=`pointer`,classes:a,children:o}=t,s=KE(t,Kq),c=ZR(),l=GB(),[u,d]=b.useState(null),f=sG(a),p=c.use(jL),m=OG(),h=b.useRef(null),g=PD(()=>({x:0,y:0})),_=Gq(),v=c.use(oR),y=c.use(Yq(n,_,v)),x=c.use(AL)===`keyboard`||p===null?Xq[n]:i,S=c.use(UR),C=c.use(HN),w=S&&C[S.type]?.selectorTooltipItemPosition||Jq,T=c.use(Zq(x,w),t.position),E=T!==null;b.useEffect(()=>{let e=l.current;if(e===null)return()=>{};if(E)return;let t=Wq((e,t)=>{g.current={x:e,y:t},h.current?.update()}),n=e=>{t(e.clientX,e.clientY)};return e.addEventListener(`pointermove`,n),e.addEventListener(`pointerenter`,n),()=>{e.removeEventListener(`pointermove`,n),e.removeEventListener(`pointerenter`,n),t.clear()}},[l,g,E]),UC(()=>{E&&h.current?.update()},[E,T?.x,T?.y]);let D=b.useMemo(()=>({getBoundingClientRect:()=>({x:g.current.x,y:g.current.y,top:g.current.y,left:g.current.x,right:g.current.x,bottom:g.current.y,width:0,height:0,toJSON:()=>``})}),[g]),O=p===`mouse`||m,k=p===`touch`||!m,ee=b.useMemo(()=>[{name:`offset`,options:{offset:()=>k&&!E?[0,64]:[0,8]}},...O?[]:[{name:`flip`,options:{fallbackPlacements:[`top-end`,`top-start`,`bottom-end`,`bottom`]}}],{name:`preventOverflow`,options:{altAxis:!0}}],[O,E,k]);return n===`none`?null:(0,J.jsxs)(b.Fragment,{children:[l.current&&jq.createPortal((0,J.jsx)(`div`,{ref:d,style:{position:`absolute`,display:`hidden`,left:T?.x??0,top:T?.y??0,pointerEvents:`none`,opacity:0,width:1,height:1}}),l.current),(0,J.jsx)(Uq,{children:y&&(0,b.createElement)(Qq,q({},s,{key:T?`charts-anchored`:`charts-pointer`,className:f?.root,open:y,placement:s.placement??r??(!E&&O?`right-start`:`top`),popperRef:h,anchorEl:T?u:D,modifiers:ee,container:s.container??l.current,popperOptions:q({},s.popperOptions,{strategy:`fixed`})}),o)})]})}var eJ=[`classes`,`trigger`,`sort`];function tJ(e){let{classes:t,trigger:n=`axis`,sort:r}=e,i=KE(e,eJ),a=sG(t);return(0,J.jsx)($q,q({},i,{trigger:n,classes:t,children:n===`axis`?(0,J.jsx)(NG,{classes:a,sort:r}):(0,J.jsx)(bG,{classes:a})}))}var nJ=e=>({type:`series`,color:e.color,label:e.label,seriesId:e.seriesId,dataIndex:e.dataIndex});function rJ(e){return DC(`MuiChartsLegend`,e)}var iJ=e=>{let{classes:t,direction:n}=e;return tT({root:[`root`,n],item:[`item`],mark:[`mark`],label:[`label`],series:[`series`],hidden:[`hidden`]},rJ,t)},aJ=OC(`MuiChartsLegend`,[`root`,`item`,`series`,`mark`,`label`,`vertical`,`horizontal`,`hidden`]),oJ=[`slots`,`slotProps`],sJ=[`ownerState`],cJ=(e,t,n,r)=>{function i(i,a){let o=RE({props:i,name:e}),s=BC(typeof n.defaultProps==`function`?n.defaultProps(o):n.defaultProps??{},o),c=s,{slots:l,slotProps:u}=c,d=KE(c,oJ),f=xE(),p=n.classesResolver?.(s,f),m=l?.[t]??r,h=n.propagateSlots&&!l?.[t],g=KE($E({elementType:m,externalSlotProps:u?.[t],additionalProps:q({},d,{classes:p},h&&{slots:l,slotProps:u}),ownerState:{}}),sJ),_=q({},g);for(let e of n.omitProps??[])delete _[e];return(0,J.jsx)(m,q({},_,{ref:a}))}return b.forwardRef(i)};function lJ(e){return DC(`MuiChartsLabel`,e)}OC(`MuiChartsLabel`,[`root`]);var uJ=e=>tT({root:[`root`]},lJ,e.classes),dJ=[`children`,`className`,`classes`],fJ=gG(`MuiChartsLabel`,{classesResolver:uJ},function(e,t){let{children:n,className:r,classes:i}=e,a=KE(e,dJ);return(0,J.jsx)(`span`,q({className:Y(i?.root,r),ref:t},a,{children:n}))}),pJ=[`direction`,`onItemClick`,`className`,`classes`,`toggleVisibilityOnClick`],mJ=Z(`ul`,{name:`MuiChartsLegend`,slot:`Root`})(({ownerState:e,theme:t})=>q({},t.typography.caption,{color:(t.vars||t).palette.text.primary,lineHeight:`100%`,display:`flex`,flexDirection:e.direction===`vertical`?`column`:`row`,alignItems:e.direction===`vertical`?void 0:`center`,flexShrink:0,gap:t.spacing(2),listStyleType:`none`,paddingInlineStart:0,marginBlock:t.spacing(1),marginInline:t.spacing(1),flexWrap:`wrap`,li:{display:e.direction===`horizontal`?`inline-flex`:void 0},[`button.${aJ.series}`]:{background:`none`,border:`none`,padding:0,fontFamily:`inherit`,fontWeight:`inherit`,fontSize:`inherit`,letterSpacing:`inherit`,color:`inherit`},[`& .${aJ.series}`]:{display:e.direction===`vertical`?`flex`:`inline-flex`,alignItems:`center`,gap:t.spacing(1),cursor:e.onItemClick||e.toggleVisibilityOnClick?`pointer`:`default`,[`&.${aJ.hidden}`]:{opacity:.5}},gridArea:`legend`})),hJ=cJ(`MuiChartsLegend`,`legend`,{defaultProps:{direction:`horizontal`},omitProps:[`position`],classesResolver:iJ},b.forwardRef(function(e,t){let n=QB(),{instance:r}=JR(),i=ZR().use(GN),{onItemClick:a,className:o,classes:s,toggleVisibilityOnClick:c}=e,l=KE(e,pJ),u=!!(a||c),d=_E((e,t)=>n=>{a&&e&&a(n,nJ(e),t),c&&r.toggleItemVisibility({type:e.type,seriesId:e.seriesId,dataIndex:e.dataIndex})});return n.items.length===0?null:(0,J.jsx)(mJ,q({className:Y(s?.root,o),ref:t},l,{ownerState:e,children:n.items.map((e,t)=>{let n=i({type:e.type,seriesId:e.seriesId,dataIndex:e.dataIndex});return(0,J.jsx)(`li`,{className:s?.item,"data-series":e.seriesId,"data-index":e.dataIndex,children:u?(0,J.jsxs)(`button`,{className:Y(s?.series,!n&&s?.hidden),onClick:d(e,t),type:`button`,children:[(0,J.jsx)(yG,{className:s?.mark,color:e.color,type:e.markType,markShape:e.markShape}),(0,J.jsx)(fJ,{className:s?.label,children:e.label})]}):(0,J.jsxs)(`div`,{className:Y(s?.series,!n&&s?.hidden),children:[(0,J.jsx)(yG,{className:s?.mark,color:e.color,type:e.markType,markShape:e.markShape}),(0,J.jsx)(fJ,{className:s?.label,children:e.label})]})},`${e.seriesId}-${e.dataIndex}`)})}))}));function gJ(e){return DC(`MuiChartsAxisHighlight`,e)}OC(`MuiChartsAxisHighlight`,[`root`]);var _J=Z(`path`,{name:`MuiChartsAxisHighlight`,slot:`Root`})(({theme:e})=>({pointerEvents:`none`,variants:[{props:{axisHighlight:`band`},style:q({fill:`white`,fillOpacity:.1},e.applyStyles(`light`,{fill:`gray`}))},{props:{axisHighlight:`line`},style:q({strokeDasharray:`5 2`,stroke:`#ffffff`},e.applyStyles(`light`,{stroke:`#000000`}))}]}));function vJ(e,t,n,r){let i=e.step(),a=(i-e.bandwidth())/2,o=e(t[n]),s=e(t[r]);return{regionStart:Math.min(o,s)-a,regionSize:(r-n+1)*i}}function yJ(e,t){if(t instanceof Date){let n=t.getTime();return e.findIndex(e=>e instanceof Date&&e.getTime()===n)}return e.indexOf(t)}function bJ({scale:e,value:t,dataIndex:n,data:r,bucketSize:i}){let a=e.step(),o=(a-e.bandwidth())/2,s=e(t)-o,c=a;if(i>1&&r){let a=n??yJ(r,t);if(a>=0){let t=Math.floor(a/i)*i,{regionStart:n,regionSize:o}=vJ(e,r,t,Math.min(t+i-1,r.length-1));s=n,c=o}}return{bandStart:s,bandSize:c}}function xJ(e){let{type:t,classes:n}=e,{left:r,width:i}=Qz(),a=ZR(),o=a.use(mR),s=a.use(pL),c=a.use(FR);return o.length===0?null:o.map(e=>{let{axisId:a,value:o}=e,l=s.axis[a],u=l.scale,d=xR(u),f=t===`band`&&o!==null&&cI(u),p=0,m=0;return f&&({bandStart:p,bandSize:m}=bJ({scale:u,value:o,dataIndex:e.dataIndex,data:l.data,bucketSize:c.get(a)??1})),(0,J.jsxs)(b.Fragment,{children:[f&&u(o)!==void 0&&(0,J.jsx)(_J,{d:`M ${r} ${p} l 0 ${m} l ${i} 0 l 0 ${-m} Z`,className:n.root,ownerState:{axisHighlight:`band`}}),t===`line`&&o!==null&&(0,J.jsx)(_J,{d:`M ${r} ${d(o)} L ${r+i} ${d(o)}`,className:n.root,ownerState:{axisHighlight:`line`}})]},`${a}-${o}`)})}function SJ(e){let{type:t,classes:n}=e,{top:r,height:i}=Qz(),a=ZR(),o=a.use(pR),s=a.use(fL),c=a.use(FR);return o.length===0?null:o.map(e=>{let{axisId:a,value:o}=e,l=s.axis[a],u=l.scale,d=xR(u),f=t===`band`&&o!==null&&cI(u),p=0,m=0;return f&&({bandStart:p,bandSize:m}=bJ({scale:u,value:o,dataIndex:e.dataIndex,data:l.data,bucketSize:c.get(a)??1})),(0,J.jsxs)(b.Fragment,{children:[f&&u(o)!==void 0&&(0,J.jsx)(_J,{d:`M ${p} ${r} l ${m} 0 l 0 ${i} l ${-m} 0 Z`,className:n.root,ownerState:{axisHighlight:`band`}}),t===`line`&&o!==null&&(0,J.jsx)(_J,{d:`M ${d(o)} ${r} L ${d(o)} ${r+i}`,className:n.root,ownerState:{axisHighlight:`line`}})]},`${a}-${o}`)})}var CJ=()=>tT({root:[`root`]},gJ);function wJ(e){let{x:t,y:n}=e,r=CJ();return(0,J.jsxs)(b.Fragment,{children:[t&&t!==`none`&&(0,J.jsx)(SJ,{type:t,classes:r}),n&&n!==`none`&&(0,J.jsx)(xJ,{type:n,classes:r})]})}function TJ(e){let{id:t,offset:n}=e,{left:r,top:i,width:a,height:o}=Qz(),s=q({top:0,right:0,bottom:0,left:0},n);return(0,J.jsx)(`clipPath`,{id:t,children:(0,J.jsx)(`rect`,{x:r-s.left,y:i-s.top,width:a+s.left+s.right,height:o+s.top+s.bottom})})}var EJ=[`x`,`y`,`seriesId`,`color`,`shape`];function DJ(e){let{x:t,y:n,color:r,shape:i}=e,a=KE(e,EJ),o=pU(),s=i===`circle`?`circle`:`path`,c=i===`circle`?{cx:0,cy:0,r:a.r===void 0?5:a.r}:{d:qV(KV[BU(i)])()},l=ED>18?{transformOrigin:`${t} ${n}`}:{"transform-origin":`${t} ${n}`};return(0,J.jsx)(s,q({pointerEvents:`none`,className:o.highlight,transform:`translate(${t} ${n})`,fill:r},l,c,a))}var OJ=[`slots`,`slotProps`];function kJ(e){let{slots:t,slotProps:n}=e,r=KE(e,OJ),i=YB(),{xAxis:a,xAxisIds:o}=IB(),{yAxis:s,yAxisIds:c}=LB(),{instance:l}=JR(),u=ZR().use(dR);if(i===void 0)return null;let{series:d,stackingGroups:f}=i,p=o[0],m=c[0],h=f.some(({ids:e})=>e.some(e=>d[e].showMark===`start`||d[e].showMark===`end`));if(u.length===0&&!h)return null;let g=new Map;u.forEach(({axisId:e,dataIndex:t})=>{g.set(e,t)});let _=t?.lineHighlight??DJ;return(0,J.jsx)(`g`,q({},r,{children:f.flatMap(({ids:e})=>e.flatMap(e=>{let{xAxisId:t=p,yAxisId:r=m,visibleStackedData:i,data:o,disableHighlight:c,showMark:u,shape:f=`circle`,hidden:h}=d[e];if(h)return null;let v=c?void 0:g.get(t),y=u===`start`||u===`end`?AJ(o,u):void 0,b=v??y;if(b===void 0||o[b]==null)return null;let x=xR(a[t].scale),S=s[r].scale,C=a[t].data;if(C===void 0)throw Error(eD(10,t===`DEFAULT_X_AXIS_KEY`?"The first `xAxis`":`The x-axis with id "${t}"`));let w=x(C[b]),T=S(i[b][1]);if(!l.isPointInside(w,T))return null;let E=KU(d[e],a[t],s[r]);return(0,J.jsx)(_,q({seriesId:e,color:E(b),x:w,y:T,shape:f},n?.lineHighlight),`${e}`)}))}))}function AJ(e,t){if(t===`start`){let t=e.findIndex(e=>e!=null);return t<0?void 0:t}let n=e.findLastIndex(e=>e!=null);return n<0?void 0:n}function jJ(e){return DC(`MuiChartsGrid`,e)}var MJ=OC(`MuiChartsGrid`,[`root`,`line`,`horizontalLine`,`verticalLine`]),NJ=Z(`g`,{name:`MuiChartsGrid`,slot:`Root`,overridesResolver:(e,t)=>[{[`& .${MJ.verticalLine}`]:t.verticalLine},{[`& .${MJ.horizontalLine}`]:t.horizontalLine},t.root]})({}),PJ=Z(`line`,{name:`MuiChartsGrid`,slot:`Line`})(({theme:e})=>({stroke:(e.vars||e).palette.divider,shapeRendering:`crispEdges`,strokeWidth:1}));function FJ(e){let{instance:t}=JR(),{axis:n,start:r,end:i,classes:a}=e,{scale:o,tickNumber:s,tickInterval:c,tickSpacing:l}=n,u=aU({scale:o,tickNumber:s,tickInterval:c,tickSpacing:l,direction:`x`,ordinalTimeTicks:`ordinalTimeTicks`in n?n.ordinalTimeTicks:void 0});return(0,J.jsx)(b.Fragment,{children:u.map(({value:e,offset:n})=>t.isXInside(n)?(0,J.jsx)(PJ,{y1:r,y2:i,x1:n,x2:n,className:a.verticalLine},`vertical-${e?.getTime?.()??e}`):null)})}function IJ(e){let{instance:t}=JR(),{axis:n,start:r,end:i,classes:a}=e,{scale:o,tickNumber:s,tickInterval:c,tickSpacing:l}=n,u=aU({scale:o,tickNumber:s,tickInterval:c,tickSpacing:l,direction:`y`,ordinalTimeTicks:`ordinalTimeTicks`in n?n.ordinalTimeTicks:void 0});return(0,J.jsx)(b.Fragment,{children:u.map(({value:e,offset:n})=>t.isYInside(n)?(0,J.jsx)(PJ,{y1:n,y2:n,x1:r,x2:i,className:a.horizontalLine},`horizontal-${e?.getTime?.()??e}`):null)})}var LJ=[`className`,`vertical`,`horizontal`],RJ=({classes:e})=>tT({root:[`root`],verticalLine:[`line`,`verticalLine`],horizontalLine:[`line`,`horizontalLine`]},jJ,e);function zJ(e){let t=RE({props:e,name:`MuiChartsGrid`}),n=Qz(),{className:r,vertical:i,horizontal:a}=t,o=KE(t,LJ),{xAxis:s,xAxisIds:c}=IB(),{yAxis:l,yAxisIds:u}=LB(),d=RJ(t),f=l[u[0]],p=s[c[0]];return(0,J.jsxs)(NJ,q({},o,{className:Y(d.root,r),children:[i&&(0,J.jsx)(FJ,{axis:p,start:n.top,end:n.height+n.top,classes:d}),a&&(0,J.jsx)(IJ,{axis:f,start:n.left,end:n.width+n.left,classes:d})]}))}var BJ=Z(`text`,{slot:`internal`,shouldForwardProp:void 0})(({theme:e})=>q({},e.typography.body2,{stroke:`none`,fill:(e.vars||e).palette.text.primary,shapeRendering:`crispEdges`,textAnchor:`middle`,dominantBaseline:`middle`}));function VJ(e){let{top:t,left:n,height:r,width:i}=Qz(),{localeText:a}=RH();return(0,J.jsx)(BJ,q({x:n+i/2,y:t+r/2},e,{children:a.loading}))}function HJ(e){let{top:t,left:n,height:r,width:i}=Qz(),{localeText:a}=RH();return(0,J.jsx)(BJ,q({x:n+i/2,y:t+r/2},e,{children:a.noData}))}function UJ(){let e=KB();return Object.values(e).every(e=>{if(!e)return!0;let{series:t,seriesOrder:n}=e;return n.every(e=>{let n=t[e];return n.type===`sankey`?n.data.links.length===0:n.data.length===0})})}function WJ(e){let t=UJ();if(e.loading){let t=e.slots?.loadingOverlay??VJ;return(0,J.jsx)(t,q({},e.slotProps?.loadingOverlay))}if(t){let t=e.slots?.noDataOverlay??HJ;return(0,J.jsx)(t,q({},e.slotProps?.noDataOverlay))}return null}var GJ=[KI,sR,IR,wL,UL,GR,$N,BR],KJ=`xAxis.yAxis.series.width.height.margin.colors.dataset.sx.onAreaClick.onLineClick.onMarkClick.axisHighlight.disableLineItemHighlight.hideLegend.grid.children.slots.slotProps.skipAnimation.loading.highlightedItem.onHighlightChange.className.showToolbar.brushConfig`.split(`.`),qJ=e=>{let{xAxis:t,yAxis:n,series:r,width:i,height:a,margin:o,colors:s,dataset:c,sx:l,onAreaClick:u,onLineClick:d,onMarkClick:f,axisHighlight:p,disableLineItemHighlight:m,grid:h,children:g,slots:_,slotProps:v,skipAnimation:y,loading:x,highlightedItem:S,onHighlightChange:C,className:w,brushConfig:T}=e,E=KE(e,KJ),D=`${Dw()}-clip-path`,O=b.useMemo(()=>r.map(e=>q({disableHighlight:!!m,type:`line`},e)),[m,r]),k=q({},E,{series:O,width:i,height:a,margin:o,colors:s,dataset:c,xAxis:t??[{id:`DEFAULT_X_AXIS_KEY`,scaleType:`point`,data:Array.from({length:Math.max(...r.map(e=>(e.data??c??[]).length))},(e,t)=>t)}],yAxis:n,highlightedItem:S,onHighlightChange:C,disableAxisListener:v?.tooltip?.trigger!==`axis`&&p?.x===`none`&&p?.y===`none`,skipAnimation:y,brushConfig:T,plugins:GJ}),ee={vertical:h?.vertical,horizontal:h?.horizontal},te={clipPath:`url(#${D})`},A={id:D},ne={slots:_,slotProps:v,onItemClick:u},re={slots:_,slotProps:v,onItemClick:d},ie={slots:_,slotProps:v,onItemClick:f,skipAnimation:y},j={slots:_,slotProps:v,loading:x},M={slots:_,slotProps:v},N=q({x:`line`},p),ae={slots:_,slotProps:v},oe={slots:_,slotProps:v};return{chartsWrapperProps:{sx:l,legendPosition:e.slotProps?.legend?.position,legendDirection:e.slotProps?.legend?.direction,hideLegend:e.hideLegend??!1,className:w},chartsContainerProps:k,gridProps:ee,clipPathProps:A,clipPathGroupProps:te,areaPlotProps:ne,linePlotProps:re,markPlotProps:ie,overlayProps:j,chartsAxisProps:M,axisHighlightProps:N,lineHighlightPlotProps:ae,legendProps:oe,children:g}},JJ=50;function YJ(e,t,n,r,i,a,o,s,c,l,u=1/0,d=1,f=0){let p=n.copy(),m=r.copy();p.range([0,1]),m.range([0,1]);let h=function(e){let n=p(t[e].x),r=m(t[e].y);return n>=i&&n<=a&&r>=o&&r<=s},g=n.range()[1]-n.range()[0],_=r.range()[1]-r.range()[0],v=g*g,y=_*_;function b(e,t){return v*e*e+y*t*t}let x=p(XJ(n,c,e=>t[e]?.x)),S=m(XJ(r,l,e=>t[e]?.y));if(x===void 0||S===void 0)return[];let C=typeof f==`number`,w=Number.isFinite(u)?u*u:1/0,T=e.neighbors(x,S,C?d:JJ,w,h,b);if(C)return T;let E=[];for(let e of T){let n=p(t[e].x),r=m(t[e].y),i=b(n-x,r-S);if(i>w)continue;let a=Math.sqrt(i)-f(e);E.push({index:e,edge:a,centerDistSq:i})}E.sort((e,t)=>e.edge-t.edge);let D=E.findLastIndex(e=>e.edge<0);return D!==-1&&(E=[...E.slice(0,D+1).sort((e,t)=>e.centerDistSq-t.centerDistSq),...E.slice(D+1)]),E.slice(0,Math.min(E.length,d)).map(e=>e.index)}function XJ(e,t,n){return cI(e)?n(e.bandwidth()===0?Math.floor((t-Math.min(...e.range())+e.step()/2)/e.step()):Math.floor((t-Math.min(...e.range()))/e.step())):e.invert(t)}function ZJ(e,t){return t===void 0?!0:e.edgeDistance<=0?t.edgeDistance>0||e.edgeDistance+e.radius{let{chartsLayerContainerRef:r}=n,{disableHitArea:i,hitAreaRadius:a,onItemClick:o}=e,s=i,c=a,{axis:l,axisIds:u}=t.use(fL),{axis:d,axisIds:f}=t.use(pL),p=t.use(ZI),{series:m,seriesOrder:h}=t.use(nP)?.scatter??{},g=t.use(p?_L:vL),_=u[0],v=f[0];return UC(()=>{t.set(`voronoi`,{isVoronoiEnabled:!s})},[t,s]),b.useEffect(()=>{if(r.current===null||s)return;let e=r.current;function i(r){let i=CL(e,r);if(!n.isPointInside(i.x,i.y))return`outside-chart`;let a;for(let e of h??[]){let n=(m??{})[e],r=g.get(e);if(!r||n.hidden)continue;let{flatbush:o,getItemRadius:s,maxItemRadius:u}=r,f=n.xAxisId??_,p=n.yAxisId??v,h=$I(t.state,f),y=$I(t.state,p),b=c===`item`?u:c,x=(h?.start??0)/100,S=(h?.end??100)/100,C=(y?.start??0)/100,w=(y?.end??100)/100,T=l[f].scale,E=d[p].scale,D=YJ(o,n.data,T,E,x,S,C,w,i.x,i.y,b,1,s)[0];if(D===void 0)continue;let O=n.data[D],k=T(O.x),ee=E(O.y),te=Math.hypot(k-i.x,ee-i.y),A=typeof s==`number`?s:s(D),ne=te-A;if(c===`item`&&ne>0)continue;let re={dataIndex:D,seriesId:e,edgeDistance:ne,radius:A};ZJ(re,a)&&(a=re)}return a===void 0?`no-point-found`:{seriesId:a.seriesId,dataIndex:a.dataIndex}}let a=n.addInteractionListener(`moveEnd`,e=>{e.detail.activeGestures.pan||(n.cleanInteraction?.(),n.clearHighlight?.(),n.removeTooltipItem?.())}),u=n.addInteractionListener(`panEnd`,e=>{e.detail.activeGestures.move||(n.cleanInteraction?.(),n.clearHighlight?.(),n.removeTooltipItem?.())}),f=n.addInteractionListener(`quickPressEnd`,e=>{!e.detail.activeGestures.move&&!e.detail.activeGestures.pan&&(n.cleanInteraction?.(),n.clearHighlight?.(),n.removeTooltipItem?.())}),p=e=>{let t=i(e.detail.srcEvent);if(t===`outside-chart`){n.cleanInteraction?.(),n.clearHighlight?.(),n.removeTooltipItem?.();return}if(t===`outside-voronoi-max-radius`||t===`no-point-found`){n.removeTooltipItem?.(),n.clearHighlight?.(),n.removeTooltipItem?.();return}let{seriesId:r,dataIndex:a}=t;n.setTooltipItem?.({type:`scatter`,seriesId:r,dataIndex:a}),n.setLastUpdateSource?.(`pointer`),n.setHighlight?.({type:`scatter`,seriesId:r,dataIndex:a})},y=n.addInteractionListener(`tap`,e=>{let t=i(e.detail.srcEvent);if(typeof t!=`string`&&o){let{seriesId:n,dataIndex:r}=t;o(e.detail.srcEvent,{type:`scatter`,seriesId:n,dataIndex:r})}}),b=n.addInteractionListener(`move`,p),x=n.addInteractionListener(`pan`,p),S=n.addInteractionListener(`quickPress`,p);return()=>{y.cleanup(),b.cleanup(),a.cleanup(),x.cleanup(),u.cleanup(),S.cleanup(),f.cleanup()}},[r,d,l,c,o,s,n,h,m,g,_,v,t]),b.useEffect(()=>{if(!(!o||!n.registerItemActivationHandler))return n.registerItemActivationHandler({type:`scatter`},(e,t)=>{t.type===`scatter`&&o(e,{type:`scatter`,seriesId:t.seriesId,dataIndex:t.dataIndex})})},[n,o]),{instance:{enableVoronoi:_E(()=>{t.set(`voronoi`,{isVoronoiEnabled:!0})}),disableVoronoi:_E(()=>{t.set(`voronoi`,{isVoronoiEnabled:!1})})}}};QJ.getDefaultizedParams=({params:e})=>q({},e,{disableHitArea:e.disableHitArea??!e.series.some(e=>e.type===`scatter`)}),QJ.getInitialState=e=>({voronoi:{isVoronoiEnabled:!e.disableHitArea}}),QJ.params={disableHitArea:!0,hitAreaRadius:!0,onItemClick:!0};var $J=2e4,eY=5,tY=1e3,nY=1e4,rY=(e,t)=>{let n=Math.max(1,e),r=Math.min(nY,Math.max(tY,Math.ceil(Math.max(1,t)/eY)));return Math.max(1,Math.floor(r/n))},iY=e=>e.progressiveRendering,aY=Q(iY,e=>e?.plans),oY=Q(iY,e=>e?.revealedRounds??0);function sY(e,t){for(let n in e){if(!Object.hasOwn(e,n))continue;let r=e[n]?.series[t];if(r)return Array.isArray(r.data)?r.data.length:0}return 0}var cY=$(aY,nP,function(e,t){let n=new Map;if(!e||e.size===0)return{nBatchesBySeries:n,totalRounds:0,batchSize:tY};let r=0,i=0,a=new Map;e.forEach(e=>{e.forEach(e=>{let n=sY(t,e);a.set(e,n),r+=1,i+=n})});let o=rY(r,i),s=0;return a.forEach((e,t)=>{let r=Math.max(1,Math.ceil(e/o));n.set(t,r),r>s&&(s=r)}),{nBatchesBySeries:n,totalRounds:s,batchSize:o}});Q(cY,e=>e.batchSize);var lY=Q(cY,e=>e.totalRounds);function uY(e,t,n){return Math.min(n?1:t,e)}Q(cY,oY,ZI,function(e,t,n,r){return uY(e.nBatchesBySeries.get(r)??0,t,n)});var dY=Q(nP,e=>rF(e,`progressiveRendering`),(e,t,n,r)=>{if(r===`svg-single`||r===`svg-batch`)return!1;if(r===`svg-progressive`)return!0;if(!t)return!1;let i=0;for(let t of n)i+=sY(e,t);return i>$J});function fY(e,t){if(!e||e.length!==t.length)return!1;for(let n=0;n{let t=_E((t,n,r)=>{if(dY(e.state,n,r)){if(!fY(e.state.progressiveRendering.plans.get(t),n)){let r=new Map(e.state.progressiveRendering.plans);r.set(t,n),e.set(`progressiveRendering`,{plans:r,revealedRounds:0})}return()=>{if(!e.state.progressiveRendering.plans.has(t))return;let n=new Map(e.state.progressiveRendering.plans);n.delete(t),e.set(`progressiveRendering`,q({},e.state.progressiveRendering,{plans:n}))}}}),n=e.use(aY)??pY,r=e.use(ZI);return b.useEffect(()=>{let t=lY(e.state);if(t===0)return;if(r){let n=Math.min(gY,t);oY(e.state)!==n&&e.set(`progressiveRendering`,q({},e.state.progressiveRendering,{revealedRounds:n}));return}if(typeof requestAnimationFrame!=`function`){e.set(`progressiveRendering`,q({},e.state.progressiveRendering,{revealedRounds:t}));return}let n=0,i,a=!1,o=oY(e.state);function s(){let e=hY,t=()=>{if(!a){if(e>0){--e,n=requestAnimationFrame(t);return}c()}};n=requestAnimationFrame(t)}function c(){if(a)return;let t=lY(e.state);o=Math.min(t,o+mY),e.set(`progressiveRendering`,q({},e.state.progressiveRendering,{revealedRounds:o})),o=t))return o>0?i=setTimeout(()=>{n=requestAnimationFrame(c)},_Y):n=requestAnimationFrame(c),()=>{a=!0,cancelAnimationFrame(n),i!==void 0&&clearTimeout(i)}},[n,r,e]),{instance:{registerProgressivePlan:t}}};vY.params={},vY.getInitialState=()=>({progressiveRendering:{plans:pY,revealedRounds:0}});var yY=[KI,sR,IR,wL,UL,GR,$N,QJ,BR,vY],bY=`width.height.margin.children.series.colors.dataset.desc.onAxisClick.highlightedAxis.onHighlightedAxisChange.tooltipAxis.onTooltipAxisChange.tooltipItem.onTooltipItemChange.disableHitArea.hitAreaRadius.onItemClick.disableAxisListener.highlightedItem.onHighlightChange.sx.title.axesGap.xAxis.yAxis.zAxis.rotationAxis.radiusAxis.skipAnimation.seriesConfig.experimentalFeatures.plugins.localeText.slots.slotProps.disableKeyboardNavigation.brushConfig.onHiddenItemsChange.hiddenItems.initialHiddenItems`.split(`.`),xY=e=>{let t=e,{width:n,height:r,margin:i,children:a,series:o,colors:s,dataset:c,desc:l,onAxisClick:u,highlightedAxis:d,onHighlightedAxisChange:f,tooltipAxis:p,onTooltipAxisChange:m,tooltipItem:h,onTooltipItemChange:g,disableHitArea:_,hitAreaRadius:v,onItemClick:y,disableAxisListener:b,highlightedItem:x,onHighlightChange:S,sx:C,title:w,axesGap:T,xAxis:E,yAxis:D,zAxis:O,rotationAxis:k,radiusAxis:ee,skipAnimation:te,seriesConfig:A,experimentalFeatures:ne,plugins:re,localeText:ie,slots:j,slotProps:M,disableKeyboardNavigation:N,brushConfig:ae,onHiddenItemsChange:oe,hiddenItems:se,initialHiddenItems:ce}=t,P=KE(t,bY),F=q({title:w,desc:l,sx:C},P);return{chartsDataProviderProps:{margin:i,series:o,colors:s,dataset:c,disableAxisListener:b,highlightedItem:x,onHighlightChange:S,onAxisClick:u,highlightedAxis:d,onHighlightedAxisChange:f,tooltipAxis:p,onTooltipAxisChange:m,tooltipItem:h,onTooltipItemChange:g,disableHitArea:_,hitAreaRadius:v,onItemClick:y,axesGap:T,xAxis:E,yAxis:D,zAxis:O,rotationAxis:k,radiusAxis:ee,skipAnimation:te,width:n,height:r,localeText:ie,seriesConfig:A,experimentalFeatures:ne,disableKeyboardNavigation:N,brushConfig:ae,onHiddenItemsChange:oe,hiddenItems:se,initialHiddenItems:ce,plugins:re??yY,slots:j,slotProps:M},chartsSurfaceProps:F,children:a}};function SY(e){return DC(`MuiSvgIcon`,e)}OC(`MuiSvgIcon`,[`root`,`colorPrimary`,`colorSecondary`,`colorAction`,`colorError`,`colorDisabled`,`fontSizeInherit`,`fontSizeSmall`,`fontSizeMedium`,`fontSizeLarge`]);var CY=e=>{let{color:t,fontSize:n,classes:r}=e;return tT({root:[`root`,t!==`inherit`&&`color${EE(t)}`,`fontSize${EE(n)}`]},SY,r)},wY=Z(`svg`,{name:`MuiSvgIcon`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.color!==`inherit`&&t[`color${EE(n.color)}`],t[`fontSize${EE(n.fontSize)}`]]}})(wE(({theme:e})=>({userSelect:`none`,width:`1em`,height:`1em`,display:`inline-block`,flexShrink:0,...FE(e,`fill`,{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:e=>!e.hasSvgAsChild,style:{fill:`currentColor`}},{props:{fontSize:`inherit`},style:{fontSize:`inherit`}},{props:{fontSize:`small`},style:{fontSize:e.typography?.pxToRem?.(20)||`1.25rem`}},{props:{fontSize:`medium`},style:{fontSize:e.typography?.pxToRem?.(24)||`1.5rem`}},{props:{fontSize:`large`},style:{fontSize:e.typography?.pxToRem?.(35)||`2.1875rem`}},...Object.entries((e.vars??e).palette).filter(([,e])=>e&&e.main).map(([t])=>({props:{color:t},style:{color:(e.vars??e).palette?.[t]?.main}})),{props:{color:`action`},style:{color:(e.vars??e).palette?.action?.active}},{props:{color:`disabled`},style:{color:(e.vars??e).palette?.action?.disabled}},{props:{color:`inherit`},style:{color:void 0}}]}))),TY=b.forwardRef(function(e,t){let n=TE({props:e,name:`MuiSvgIcon`}),{children:r,className:i,color:a=`inherit`,component:o=`svg`,fontSize:s=`medium`,htmlColor:c,inheritViewBox:l=!1,titleAccess:u,viewBox:d=`0 0 24 24`,...f}=n,p=b.isValidElement(r)&&r.type===`svg`,m={...n,color:a,component:o,fontSize:s,instanceFontSize:e.fontSize,inheritViewBox:l,viewBox:d,hasSvgAsChild:p},h={};l||(h.viewBox=d);let g=CY(m);return(0,J.jsxs)(wY,{as:o,className:Y(g.root,i),focusable:`false`,color:c,"aria-hidden":!u||void 0,role:u?`img`:void 0,ref:t,...h,...f,...p&&r.props,ownerState:m,children:[p?r.props.children:r,u?(0,J.jsx)(`title`,{children:u}):null]})});TY.muiName=`SvgIcon`;function EY(e,t){function n(t,n){return(0,J.jsx)(TY,{"data-testid":void 0,ref:n,...t,children:e})}return n.muiName=TY.muiName,b.memo(b.forwardRef(n))}var DY=Dw,OY=_E;function kY(e){try{return e.matches(`:focus-visible`)}catch{}return!1}function AY(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return b.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}var jY={};function MY(e){let{nativeButton:t,nativeButtonProp:n,internalNativeButton:r=t,allowInferredHostMismatch:i=!1,disabled:a,type:o,hasFormAction:s=!1,tabIndex:c=0,focusableWhenDisabled:l,stopEventPropagation:u=!1,onBeforeKeyDown:d,onBeforeKeyUp:f}=e,p=b.useRef(null),m=l===!0,h=AY({focusableWhenDisabled:m,disabled:a,isNativeButton:t,tabIndex:c}),g=b.useCallback(()=>{let e=p.current;return e==null?t:e.tagName===`BUTTON`||!!(e.tagName===`A`&&e.href)},[t]),_=b.useMemo(()=>{let e=m?{}:{tabIndex:a?-1:c};return t?(e.type=o===void 0&&!s?`button`:o,m||(e.disabled=a)):(e.role=`button`,!m&&a&&(e[`aria-disabled`]=a)),m?{...e,...h}:e},[a,m,h,s,t,c,o]);return{getButtonProps:b.useCallback((e=jY)=>{let{onClick:t,onKeyDown:n,onKeyUp:r,...i}=e,o=e=>{if(u&&e.stopPropagation(),a){e.preventDefault();return}t?.(e)},s=e=>{if(m&&h.onKeyDown(e),!a&&(d?.(e),n?.(e),!(e.target!==e.currentTarget||g()))){if(e.key===` `){e.preventDefault();return}e.key===`Enter`&&(e.preventDefault(),e.currentTarget.click())}},c=e=>{a||(f?.(e),r?.(e),e.target===e.currentTarget&&!g()&&e.key===` `&&!e.defaultPrevented&&e.currentTarget.click())};return{..._,...i,onClick:o,onKeyDown:s,onKeyUp:c}},[_,a,m,h,g,d,f,u]),rootRef:p}}var NY=class e{static create(){return new e}static use(){let t=PD(e.create).current,[n,r]=b.useState(!1);return t.shouldMount=n,t.setShouldMount=r,b.useEffect(t.mountEffect,[n]),t}constructor(){this.ref={current:null},this.mounted=null,this.didMount=!1,this.shouldMount=!1,this.setShouldMount=null}mount(){return this.mounted||(this.mounted=FY(),this.shouldMount=!0,this.setShouldMount(this.shouldMount)),this.mounted}mountEffect=()=>{this.shouldMount&&!this.didMount&&this.ref.current!==null&&(this.didMount=!0,this.mounted.resolve())};start(...e){this.mount().then(()=>this.ref.current?.start(...e))}stop(...e){this.mount().then(()=>this.ref.current?.stop(...e))}pulsate(...e){this.mount().then(()=>this.ref.current?.pulsate(...e))}};function PY(){return NY.use()}function FY(){let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n}var IY=class e{static create(){return new e}currentId=null;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,t()},e)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear};function LY(){let e=PD(IY.create).current;return ID(e.disposeEffect),e}function RY(e){let{className:t,classes:n,pulsate:r=!1,rippleX:i,rippleY:a,rippleSize:o,in:s,onExited:c,timeout:l}=e,[u,d]=b.useState(!1),f=LY(),p=b.useRef(!1),m=b.useRef(c);m.current=c;let h=c!=null,g=Y(t,n.ripple,n.rippleVisible,r&&n.ripplePulsate),_={width:o,height:o,top:-(o/2)+a,left:-(o/2)+i},v=Y(n.child,u&&n.childLeaving,r&&n.childPulsate);return!s&&!u&&d(!0),b.useEffect(()=>{!s&&h?p.current||(p.current=!0,f.start(l,()=>{p.current=!1,m.current?.()})):(p.current=!1,f.clear())},[f,h,s,l]),(0,J.jsx)(`span`,{className:g,style:_,children:(0,J.jsx)(`span`,{className:v})})}var zY=OC(`MuiTouchRipple`,[`root`,`ripple`,`rippleVisible`,`ripplePulsate`,`child`,`childLeaving`,`childPulsate`]),BY=`(prefers-reduced-motion: reduce)`,VY=0,HY=`0ms`,UY=()=>{},WY=()=>!1,GY=()=>!0,KY=()=>UY;function qY(e){let[t,n]=b.useState(()=>({enabled:e,matches:e?null:!1})),r=t.matches;return t.enabled!==e&&(r=null,e||(r=!1)),UC(()=>{let r=t=>{n(n=>n.enabled===e&&n.matches===t?n:{enabled:e,matches:t})};if(!e){t.enabled&&r(!1);return}if(typeof window>`u`||typeof window.matchMedia!=`function`){r(!1);return}let i=window.matchMedia(BY),a=()=>{r(i.matches)};return a(),i.addEventListener(`change`,a),()=>{i.removeEventListener(`change`,a)}},[e,t.enabled]),r}var JY={...b}.useSyncExternalStore;function YY(e){let t=e?GY:WY,[n,r]=b.useMemo(()=>{if(!e||typeof window>`u`||typeof window.matchMedia!=`function`)return[WY,KY];let t=window.matchMedia(BY);return[()=>t.matches,e=>(t.addEventListener(`change`,e),()=>{t.removeEventListener(`change`,e)})]},[e]);return JY(r,n,t)}var XY=JY===void 0?qY:YY;function ZY(e,t){let n=XY(!t&&e===`system`),r=!t&&(e===`always`||e===`system`&&n!==!1);return b.useMemo(()=>({shouldReduceMotion:r,getTransitionTiming(e){return r?{duration:VY,delay:HY}:e}}),[r])}var QY=550,$Y={},eX=[],tX=()=>{};function nX(e,t){let n=new Set(t),r=new Map,i=[];for(let t of e)n.has(t)?i.length>0&&(r.set(t,i),i=[]):i.push(t);let a=[];for(let e of t){let t=r.get(e);t&&a.push(...t),a.push(e)}return a.push(...i),a}function rX({event:e,element:t,center:n}){let r=t?t.getBoundingClientRect():{width:0,height:0,left:0,top:0},i,a;if(n||e===void 0||e.clientX===0&&e.clientY===0||!e.clientX&&!e.touches)i=Math.round(r.width/2),a=Math.round(r.height/2);else{let{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;i=Math.round(t-r.left),a=Math.round(n-r.top)}let o;if(n)o=Math.sqrt((2*r.width**2+r.height**2)/3),o%2==0&&(o+=1);else{let e=Math.max(Math.abs((t?t.clientWidth:0)-i),i)*2+2,n=Math.max(Math.abs((t?t.clientHeight:0)-a),a)*2+2;o=Math.sqrt(e**2+n**2)}return{rippleX:i,rippleY:a,rippleSize:o}}var iX=hx`
0% {
transform: scale(0);
opacity: 0.1;
@@ -177,7 +177,7 @@
transform: scale(1);
opacity: 0.3;
}
-`,YY=mx`
+`,aX=hx`
0% {
opacity: 1;
}
@@ -185,7 +185,7 @@
100% {
opacity: 0;
}
-`,XY=mx`
+`,oX=hx`
0% {
transform: scale(1);
}
@@ -197,39 +197,39 @@
100% {
transform: scale(1);
}
-`;function ZY(e){if(e.motion.reducedMotion===`always`)return null;let t=px`
- &.${kY.rippleVisible} {
- animation-name: ${JY};
- animation-duration: ${HY}ms;
+`;function sX(e){if(e.motion.reducedMotion===`always`)return null;let t=mx`
+ &.${zY.rippleVisible} {
+ animation-name: ${iX};
+ animation-duration: ${QY}ms;
animation-timing-function: ${e.transitions.easing.easeInOut};
}
- &.${kY.ripplePulsate} {
+ &.${zY.ripplePulsate} {
animation-duration: ${e.transitions.duration.shorter}ms;
}
- & .${kY.childLeaving} {
- animation-name: ${YY};
- animation-duration: ${HY}ms;
+ & .${zY.childLeaving} {
+ animation-name: ${aX};
+ animation-duration: ${QY}ms;
animation-timing-function: ${e.transitions.easing.easeInOut};
}
- & .${kY.childPulsate} {
- animation-name: ${XY};
+ & .${zY.childPulsate} {
+ animation-name: ${oX};
animation-duration: 2500ms;
animation-timing-function: ${e.transitions.easing.easeInOut};
animation-iteration-count: infinite;
animation-delay: 200ms;
}
- `;return e.motion.reducedMotion===`system`?px`
+ `;return e.motion.reducedMotion===`system`?mx`
@media (prefers-reduced-motion: no-preference) {
${t}
}
- `:t}var QY=Z(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),$Y=Z(OY,{name:`MuiTouchRipple`,slot:`Ripple`})`
+ `:t}var cX=Z(`span`,{name:`MuiTouchRipple`,slot:`Root`})({overflow:`hidden`,pointerEvents:`none`,position:`absolute`,zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:`inherit`}),lX=Z(RY,{name:`MuiTouchRipple`,slot:`Ripple`})`
opacity: 0;
position: absolute;
- &.${kY.rippleVisible} {
+ &.${zY.rippleVisible} {
opacity: 0.3;
transform: scale(1);
}
@@ -242,7 +242,7 @@
* it relies on this static 'opacity: 0' to disappear on blur instead of
* lingering until removal.
*/
- & .${kY.child} {
+ & .${zY.child} {
opacity: 1;
display: block;
width: 100%;
@@ -251,19 +251,19 @@
background-color: currentColor;
}
- & .${kY.childLeaving} {
+ & .${zY.childLeaving} {
opacity: 0;
}
- & .${kY.childPulsate} {
+ & .${zY.childPulsate} {
position: absolute;
/* @noflip */
left: 0px;
top: 0;
}
- ${({theme:e})=>ZY(e)}
-`,eX=b.forwardRef(function(e,t){let n=wE({props:e,name:`MuiTouchRipple`}),r=VY(bE().motion.reducedMotion,!1),{center:i=!1,classes:a=UY,className:o,...s}=n,[c,l]=b.useState({items:WY,order:WY}),u=c.items,d=b.useRef(0),f=b.useRef(null),p=b.useRef(!1);PD(()=>(p.current=!0,()=>{p.current=!1})),b.useEffect(()=>{f.current&&=(f.current(),null)},[u]);let m=b.useRef(!1),h=DY(),g=b.useRef(null),_=b.useRef(null),v=vY(e=>{p.current&&l(t=>{let n=t.items.filter(t=>t.key!==e);return{items:n,order:KY(t.order.filter(t=>t!==e),n.filter(e=>!e.exiting).map(e=>e.key))}})}),y=vY(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e,o=d.current;d.current+=1,l(e=>{let a=[...e.items,{key:o,pulsate:t,rippleX:n,rippleY:r,rippleSize:i,exiting:!1}];return{items:a,order:KY(e.order,a.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=a}),x=vY((e=UY,t=UY,n=GY)=>{let{pulsate:r=!1,center:a=i||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&m.current){m.current=!1;return}e?.type===`touchstart`&&(m.current=!0);let{rippleX:s,rippleY:c,rippleSize:l}=qY({event:e,element:o?null:_.current,center:a});e?.touches?g.current===null&&(g.current=()=>{y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})},h.start(80,()=>{g.current&&=(g.current(),null)})):y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})}),S=vY(()=>{x(UY,{pulsate:!0})}),C=vY((e,t)=>{if(h.clear(),e?.type===`touchend`&&g.current){g.current(),g.current=null,h.start(0,()=>{C(e,t)});return}g.current=null,l(e=>{let t=e.items.findIndex(e=>!e.exiting);if(t===-1)return e;let n=e.items.slice();return n[t]={...n[t],exiting:!0},{items:n,order:KY(e.order,n.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=t});b.useImperativeHandle(t,()=>({pulsate:S,start:x,stop:C}),[S,x,C]);let w=new Map(u.map(e=>[e.key,e])),T=c.order.map(e=>w.get(e)).filter(Boolean);return(0,Y.jsx)(QY,{className:wC(kY.root,a.root,o),ref:_,...s,children:T.map(e=>(0,Y.jsx)($Y,{classes:{ripple:wC(a.ripple,kY.ripple),rippleVisible:wC(a.rippleVisible,kY.rippleVisible),ripplePulsate:wC(a.ripplePulsate,kY.ripplePulsate),child:wC(a.child,kY.child),childLeaving:wC(a.childLeaving,kY.childLeaving),childPulsate:wC(a.childPulsate,kY.childPulsate)},timeout:r.shouldReduceMotion?0:HY,pulsate:e.pulsate,rippleX:e.rippleX,rippleY:e.rippleY,rippleSize:e.rippleSize,in:!e.exiting,onExited:()=>v(e.key)},e.key))})});function tX(e){return DC(`MuiButtonBase`,e)}var nX=OC(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),rX=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=eT({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},tX,a);return n&&!i&&r&&(o.root+=` ${r}`),o},iX=Z(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${nX.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),aX=b.forwardRef(function(e,t){let n=wE({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,focusableWhenDisabled:p,suppressFocusVisible:m=!1,internalNativeButton:h,LinkComponent:g=`a`,nativeButton:_,onBlur:v,onClick:y,onContextMenu:x,onDragLeave:S,onFocus:C,onFocusVisible:w,onKeyDown:T,onKeyUp:E,onMouseDown:D,onMouseLeave:O,onMouseUp:k,onTouchEnd:ee,onTouchMove:te,onTouchStart:A,tabIndex:ne=0,TouchRippleProps:re,touchRippleRef:ie,type:j,...M}=n,N=!!(M.href||M.to),ae=!!M.formAction,oe=s;oe===`button`&&N&&(oe=g);let se=typeof oe==`string`?oe===`button`:h??!1,ce=_??se,P=wY(),F=EE(P.ref,ie),[le,ue]=b.useState(!1);(c||m)&&le&&ue(!1);let de=vY(e=>{d&&!e.repeat&&le&&e.key===` `&&P.stop(e,()=>{P.start(e)})}),fe=vY(e=>{d&&e.key===` `&&le&&!e.defaultPrevented&&P.stop(e,()=>{P.pulsate(e)})}),{getButtonProps:pe,rootRef:me}=SY({nativeButton:ce,nativeButtonProp:_,internalNativeButton:se,allowInferredHostMismatch:N||typeof oe==`string`,disabled:c,type:j,hasFormAction:ae,tabIndex:ne,onBeforeKeyDown:de,onBeforeKeyUp:fe}),{onClick:he,onKeyDown:ge,onKeyUp:_e,...ve}=pe({onClick:y,onKeyDown:T,onKeyUp:E});b.useImperativeHandle(r,()=>({focusVisible:()=>{ue(!0),me.current.focus()}}),[me]);let ye=P.shouldMount&&!l&&!c;b.useEffect(()=>{le&&d&&!l&&P.pulsate()},[l,d,le,P]);let be=oX(P,`start`,D,u),xe=oX(P,`stop`,x,u),Se=oX(P,`stop`,S,u),Ce=oX(P,`stop`,k,u),I=oX(P,`stop`,e=>{le&&e.preventDefault(),O&&O(e)},u),we=oX(P,`start`,A,u),L=oX(P,`stop`,ee,u),Te=oX(P,`stop`,te,u),Ee=oX(P,`stop`,e=>{yY(e.target)||ue(!1),v&&v(e)},!1),De=vY(e=>{me.current||=e.currentTarget,!m&&yY(e.target)&&(ue(!0),w&&w(e)),C&&C(e)}),Oe={};N&&(Oe.tabIndex=c?-1:ne,c&&(Oe[`aria-disabled`]=c),Oe.type=j);let ke=EE(t,me),Ae={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,suppressFocusVisible:m,tabIndex:ne,focusVisible:le},je=rX(Ae);return(0,Y.jsxs)(iX,{as:oe,className:wC(je.root,o),ownerState:Ae,onBlur:Ee,onClick:he,onContextMenu:xe,onFocus:De,onKeyDown:ge,onKeyUp:_e,onMouseDown:be,onMouseLeave:I,onMouseUp:Ce,onDragLeave:Se,onTouchEnd:L,onTouchMove:Te,onTouchStart:we,ref:ke,...N?Oe:ve,...M,children:[a,ye?(0,Y.jsx)(eX,{ref:F,center:i,...re}):null]})});function oX(e,t,n,r=!1){return vY(i=>(n&&n(i),r||e[t](i),!0))}function sX(e){return DC(`MuiCircularProgress`,e)}OC(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var cX=44,lX=mx`
+ ${({theme:e})=>sX(e)}
+`,uX=b.forwardRef(function(e,t){let n=TE({props:e,name:`MuiTouchRipple`}),r=ZY(xE().motion.reducedMotion,!1),{center:i=!1,classes:a=$Y,className:o,...s}=n,[c,l]=b.useState({items:eX,order:eX}),u=c.items,d=b.useRef(0),f=b.useRef(null),p=b.useRef(!1);ID(()=>(p.current=!0,()=>{p.current=!1})),b.useEffect(()=>{f.current&&=(f.current(),null)},[u]);let m=b.useRef(!1),h=LY(),g=b.useRef(null),_=b.useRef(null),v=OY(e=>{p.current&&l(t=>{let n=t.items.filter(t=>t.key!==e);return{items:n,order:nX(t.order.filter(t=>t!==e),n.filter(e=>!e.exiting).map(e=>e.key))}})}),y=OY(e=>{let{pulsate:t,rippleX:n,rippleY:r,rippleSize:i,cb:a}=e,o=d.current;d.current+=1,l(e=>{let a=[...e.items,{key:o,pulsate:t,rippleX:n,rippleY:r,rippleSize:i,exiting:!1}];return{items:a,order:nX(e.order,a.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=a}),x=OY((e=$Y,t=$Y,n=tX)=>{let{pulsate:r=!1,center:a=i||t.pulsate,fakeElement:o=!1}=t;if(e?.type===`mousedown`&&m.current){m.current=!1;return}e?.type===`touchstart`&&(m.current=!0);let{rippleX:s,rippleY:c,rippleSize:l}=rX({event:e,element:o?null:_.current,center:a});e?.touches?g.current===null&&(g.current=()=>{y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})},h.start(80,()=>{g.current&&=(g.current(),null)})):y({pulsate:r,rippleX:s,rippleY:c,rippleSize:l,cb:n})}),S=OY(()=>{x($Y,{pulsate:!0})}),C=OY((e,t)=>{if(h.clear(),e?.type===`touchend`&&g.current){g.current(),g.current=null,h.start(0,()=>{C(e,t)});return}g.current=null,l(e=>{let t=e.items.findIndex(e=>!e.exiting);if(t===-1)return e;let n=e.items.slice();return n[t]={...n[t],exiting:!0},{items:n,order:nX(e.order,n.filter(e=>!e.exiting).map(e=>e.key))}}),f.current=t});b.useImperativeHandle(t,()=>({pulsate:S,start:x,stop:C}),[S,x,C]);let w=new Map(u.map(e=>[e.key,e])),T=c.order.map(e=>w.get(e)).filter(Boolean);return(0,J.jsx)(cX,{className:Y(zY.root,a.root,o),ref:_,...s,children:T.map(e=>(0,J.jsx)(lX,{classes:{ripple:Y(a.ripple,zY.ripple),rippleVisible:Y(a.rippleVisible,zY.rippleVisible),ripplePulsate:Y(a.ripplePulsate,zY.ripplePulsate),child:Y(a.child,zY.child),childLeaving:Y(a.childLeaving,zY.childLeaving),childPulsate:Y(a.childPulsate,zY.childPulsate)},timeout:r.shouldReduceMotion?0:QY,pulsate:e.pulsate,rippleX:e.rippleX,rippleY:e.rippleY,rippleSize:e.rippleSize,in:!e.exiting,onExited:()=>v(e.key)},e.key))})});function dX(e){return DC(`MuiButtonBase`,e)}var fX=OC(`MuiButtonBase`,[`root`,`disabled`,`focusVisible`]),pX=e=>{let{disabled:t,focusVisible:n,focusVisibleClassName:r,suppressFocusVisible:i,classes:a}=e,o=tT({root:[`root`,t&&`disabled`,n&&!i&&`focusVisible`]},dX,a);return n&&!i&&r&&(o.root+=` ${r}`),o},mX=Z(`button`,{name:`MuiButtonBase`,slot:`Root`})({display:`inline-flex`,alignItems:`center`,justifyContent:`center`,position:`relative`,boxSizing:`border-box`,WebkitTapHighlightColor:`transparent`,backgroundColor:`transparent`,outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:`pointer`,userSelect:`none`,verticalAlign:`middle`,MozAppearance:`none`,WebkitAppearance:`none`,textDecoration:`none`,color:`inherit`,"&::-moz-focus-inner":{borderStyle:`none`},[`&.${fX.disabled}`]:{pointerEvents:`none`,cursor:`default`},"@media print":{colorAdjust:`exact`}}),hX=b.forwardRef(function(e,t){let n=TE({props:e,name:`MuiButtonBase`}),{action:r,centerRipple:i=!1,children:a,className:o,component:s=`button`,disabled:c=!1,disableRipple:l=!1,disableTouchRipple:u=!1,focusRipple:d=!1,focusVisibleClassName:f,focusableWhenDisabled:p,suppressFocusVisible:m=!1,internalNativeButton:h,LinkComponent:g=`a`,nativeButton:_,onBlur:v,onClick:y,onContextMenu:x,onDragLeave:S,onFocus:C,onFocusVisible:w,onKeyDown:T,onKeyUp:E,onMouseDown:D,onMouseLeave:O,onMouseUp:k,onTouchEnd:ee,onTouchMove:te,onTouchStart:A,tabIndex:ne=0,TouchRippleProps:re,touchRippleRef:ie,type:j,...M}=n,N=!!(M.href||M.to),ae=!!M.formAction,oe=s;oe===`button`&&N&&(oe=g);let se=typeof oe==`string`?oe===`button`:h??!1,ce=_??se,P=PY(),F=DE(P.ref,ie),[le,ue]=b.useState(!1);(c||m)&&le&&ue(!1);let de=OY(e=>{d&&!e.repeat&&le&&e.key===` `&&P.stop(e,()=>{P.start(e)})}),fe=OY(e=>{d&&e.key===` `&&le&&!e.defaultPrevented&&P.stop(e,()=>{P.pulsate(e)})}),{getButtonProps:pe,rootRef:me}=MY({nativeButton:ce,nativeButtonProp:_,internalNativeButton:se,allowInferredHostMismatch:N||typeof oe==`string`,disabled:c,type:j,hasFormAction:ae,tabIndex:ne,onBeforeKeyDown:de,onBeforeKeyUp:fe}),{onClick:he,onKeyDown:ge,onKeyUp:_e,...ve}=pe({onClick:y,onKeyDown:T,onKeyUp:E});b.useImperativeHandle(r,()=>({focusVisible:()=>{ue(!0),me.current.focus()}}),[me]);let ye=P.shouldMount&&!l&&!c;b.useEffect(()=>{le&&d&&!l&&P.pulsate()},[l,d,le,P]);let be=gX(P,`start`,D,u),xe=gX(P,`stop`,x,u),Se=gX(P,`stop`,S,u),Ce=gX(P,`stop`,k,u),I=gX(P,`stop`,e=>{le&&e.preventDefault(),O&&O(e)},u),we=gX(P,`start`,A,u),L=gX(P,`stop`,ee,u),Te=gX(P,`stop`,te,u),Ee=gX(P,`stop`,e=>{kY(e.target)||ue(!1),v&&v(e)},!1),De=OY(e=>{me.current||=e.currentTarget,!m&&kY(e.target)&&(ue(!0),w&&w(e)),C&&C(e)}),Oe={};N&&(Oe.tabIndex=c?-1:ne,c&&(Oe[`aria-disabled`]=c),Oe.type=j);let ke=DE(t,me),Ae={...n,centerRipple:i,component:s,disabled:c,disableRipple:l,disableTouchRipple:u,focusRipple:d,suppressFocusVisible:m,tabIndex:ne,focusVisible:le},je=pX(Ae);return(0,J.jsxs)(mX,{as:oe,className:Y(je.root,o),ownerState:Ae,onBlur:Ee,onClick:he,onContextMenu:xe,onFocus:De,onKeyDown:ge,onKeyUp:_e,onMouseDown:be,onMouseLeave:I,onMouseUp:Ce,onDragLeave:Se,onTouchEnd:L,onTouchMove:Te,onTouchStart:we,ref:ke,...N?Oe:ve,...M,children:[a,ye?(0,J.jsx)(uX,{ref:F,center:i,...re}):null]})});function gX(e,t,n,r=!1){return OY(i=>(n&&n(i),r||e[t](i),!0))}function _X(e){return DC(`MuiCircularProgress`,e)}OC(`MuiCircularProgress`,[`root`,`determinate`,`indeterminate`,`colorPrimary`,`colorSecondary`,`svg`,`track`,`circle`,`circleDisableShrink`]);var vX=44,yX=hx`
0% {
transform: rotate(0deg);
}
@@ -271,7 +271,7 @@
100% {
transform: rotate(360deg);
}
-`,uX=mx`
+`,bX=hx`
0% {
stroke-dasharray: 1px, 200px;
stroke-dashoffset: 0;
@@ -286,14 +286,14 @@
stroke-dasharray: 1px, 200px;
stroke-dashoffset: -126px;
}
-`,dX=typeof lX==`string`?null:px`
- animation: ${lX} 1.4s linear infinite;
- `,fX=typeof uX==`string`?null:px`
- animation: ${uX} 1.4s ease-in-out infinite;
- `,pX=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return eT({root:[`root`,n,`color${TE(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},sX,t)},mX=Z(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${TE(n.color)}`]]}})(CE(({theme:e})=>{let t=ME(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...NE(e,`transform`)}},{props:{variant:`indeterminate`},style:dX||{animation:`${lX} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter(UW()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),hX=Z(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),gX=Z(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(CE(({theme:e})=>{let t=ME(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...NE(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:fX||{animation:`${uX} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),_X=Z(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(CE(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),vX=b.forwardRef(function(e,t){let n=wE({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...m}=n,h=s??0,g=c??100,_={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},v=pX(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((cX-d)/2),t=g-h;y.strokeDasharray=e.toFixed(3),y.strokeDashoffset=t>0?`${((g-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,b.transform=`rotate(-90deg)`,x[`aria-valuenow`]=f,x[`aria-valuemin`]=h,x[`aria-valuemax`]=g}return(0,Y.jsx)(mX,{className:wC(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,Y.jsxs)(hX,{className:v.svg,ownerState:_,viewBox:`${cX/2} ${cX/2} ${cX} ${cX}`,children:[o?(0,Y.jsx)(_X,{className:v.track,ownerState:_,cx:cX,cy:cX,r:(cX-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,Y.jsx)(gX,{className:v.circle,style:y,ownerState:_,cx:cX,cy:cX,r:(cX-d)/2,fill:`none`,strokeWidth:d})]})})});function yX(e){return DC(`MuiIconButton`,e)}var bX=OC(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),xX=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return eT({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${TE(r)}`,i&&`edge${TE(i)}`,`size${TE(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},yX,t)},SX=Z(aX,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${TE(n.color)}`],n.edge&&t[`edge${TE(n.edge)}`],t[`size${TE(n.size)}`]]}})(CE(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...NE(e,`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),CE(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter(UW()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${bX.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${bX.loading}`]:{color:`transparent`}}))),CX=Z(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),wX=b.forwardRef(function(e,t){let n=wE({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=_Y(u),h=f??(0,Y.jsx)(vX,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=xX(g);return(0,Y.jsxs)(SX,{id:d?m:u,className:wC(_.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,Y.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,Y.jsx)(CX,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})});function TX(e){return DC(`MuiButton`,e)}var EX=OC(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),DX=b.createContext({}),OX=b.createContext(void 0),kX=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=eT({root:[`root`,o&&`loading`,a,`size${TE(i)}`,`color${TE(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${TE(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},TX,c);return{...c,...l}},AX=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],jX=Z(aX,{shouldForwardProp:e=>SE(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${TE(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(CE(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...NE(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${EX.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${EX.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${EX.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${EX.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter(UW()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${EX.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${EX.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{...NE(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${EX.loading}`]:{color:`transparent`}}}]}})),MX=Z(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...NE(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...AX]})),NX=Z(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...NE(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...AX]})),PX=Z(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),FX=Z(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),IX=b.forwardRef(function(e,t){let n=b.useContext(DX),r=b.useContext(OX),i=wE({props:BC(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:x,type:S,variant:C=`text`,...w}=i,T=_Y(h),E=_??(0,Y.jsx)(vX,{"aria-labelledby":T,color:`inherit`,size:16}),D={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:E,loadingPosition:v,size:y,type:S,variant:C},O=kX(D),k=(x||g&&v===`start`)&&(0,Y.jsx)(MX,{className:O.startIcon,ownerState:D,children:x||(0,Y.jsx)(FX,{className:O.loadingIconPlaceholder,ownerState:D})}),ee=(f||g&&v===`end`)&&(0,Y.jsx)(NX,{className:O.endIcon,ownerState:D,children:f||(0,Y.jsx)(FX,{className:O.loadingIconPlaceholder,ownerState:D})}),te=r||``,A=typeof g==`boolean`?(0,Y.jsx)(`span`,{className:O.loadingWrapper,style:{display:`contents`},children:g&&(0,Y.jsx)(PX,{className:O.loadingIndicator,ownerState:D,children:E})}):null,{root:ne,...re}=O;return(0,Y.jsxs)(jX,{ownerState:D,className:wC(n.className,O.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:wC(O.focusVisible,p),ref:t,internalNativeButton:!0,type:S,id:g?T:h,...w,classes:re,children:[k,v!==`end`&&A,a,v===`end`&&A,ee]})}),LX=b.createContext({}),RX=b.createContext(void 0);function zX(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}var BX=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e;return eT({root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${TE(a)}`,o]},PE,t)},VX=Z(aX,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${TE(n.size)}`]]}})(CE(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${FE.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:`none`,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[{props:{color:`standard`},style:{[`&.${FE.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter(UW()).map(([t])=>({props:{color:t},style:{[`&.${FE.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),HX=b.forwardRef(function(e,t){let{value:n,...r}=b.useContext(LX),i=b.useContext(RX),a=wE({props:BC({...r,selected:zX(e.value,n)},e),name:`MuiToggleButton`}),{children:o,className:s,color:c=`standard`,disabled:l=!1,disableFocusRipple:u=!1,fullWidth:d=!1,onChange:f,onClick:p,selected:m,size:h=`medium`,value:g,..._}=a,v={...a,color:c,disabled:l,disableFocusRipple:u,fullWidth:d,size:h},y=BX(v),x=e=>{p&&(p(e,g),e.defaultPrevented)||f&&f(e,g)},S=i||``;return(0,Y.jsx)(VX,{className:wC(r.className,y.root,s,S),internalNativeButton:!0,disabled:l,focusRipple:!u,ref:t,onClick:x,onChange:f,value:g,ownerState:v,"aria-pressed":m,..._,children:o})});function UX(e){return b.Children.toArray(e).filter(e=>b.isValidElement(e))}function WX(e){return DC(`MuiToggleButtonGroup`,e)}var GX=OC(`MuiToggleButtonGroup`,[`root`,`selected`,`horizontal`,`vertical`,`disabled`,`grouped`,`fullWidth`,`firstButton`,`lastButton`,`middleButton`]),KX=e=>{let{classes:t,orientation:n,fullWidth:r,disabled:i}=e;return eT({root:[`root`,n,r&&`fullWidth`],grouped:[`grouped`,i&&`disabled`],firstButton:[`firstButton`],lastButton:[`lastButton`],middleButton:[`middleButton`]},WX,t)},qX=Z(`div`,{name:`MuiToggleButtonGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${GX.grouped}`]:t.grouped},{[`& .${GX.firstButton}`]:t.firstButton},{[`& .${GX.lastButton}`]:t.lastButton},{[`& .${GX.middleButton}`]:t.middleButton},t.root,n.orientation===`vertical`&&t.vertical,n.fullWidth&&t.fullWidth]}})(CE(({theme:e})=>({display:`inline-flex`,borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:`vertical`},style:{flexDirection:`column`,[`& .${GX.grouped}`]:{[`&.${GX.selected} + .${GX.grouped}.${GX.selected}`]:{borderTop:0,marginTop:0}},[`& .${GX.firstButton},& .${GX.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${GX.lastButton},& .${GX.middleButton}`]:{marginTop:-1,borderTop:`1px solid transparent`,borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${GX.lastButton}.${FE.disabled},& .${GX.middleButton}.${FE.disabled}`]:{borderTop:`1px solid transparent`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{orientation:`horizontal`},style:{[`& .${GX.grouped}`]:{[`&.${GX.selected} + .${GX.grouped}.${GX.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${GX.firstButton},& .${GX.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${GX.lastButton},& .${GX.middleButton}`]:{marginLeft:-1,borderLeft:`1px solid transparent`,borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${GX.lastButton}.${FE.disabled},& .${GX.middleButton}.${FE.disabled}`]:{borderLeft:`1px solid transparent`}}}]}))),JX=J({},{baseButton:IX,baseIconButton:wX,baseToggleButton:HX,baseToggleButtonGroup:b.forwardRef(function(e,t){let n=wE({props:e,name:`MuiToggleButtonGroup`}),{children:r,className:i,color:a=`standard`,disabled:o=!1,exclusive:s=!1,fullWidth:c=!1,onChange:l,orientation:u=`horizontal`,size:d=`medium`,value:f,...p}=n,m={...n,disabled:o,fullWidth:c,orientation:u,size:d},h=KX(m),g=b.useCallback((e,t)=>{if(!l)return;let n=f&&f.indexOf(t),r;f&&n>=0?(r=f.slice(),r.splice(n,1)):r=f?f.concat(t):[t],l(e,r)},[l,f]),_=b.useCallback((e,t)=>{l&&l(e,f===t?null:t)},[l,f]),v=b.useMemo(()=>({className:h.grouped,onChange:s?_:g,value:f,size:d,fullWidth:c,color:a,disabled:o}),[h.grouped,s,_,g,f,d,c,a,o]),y=UX(r),x=y.length,S=e=>{let t=e===0,n=e===x-1;return t&&n?``:t?h.firstButton:n?h.lastButton:h.middleButton};return(0,Y.jsx)(qX,{role:`group`,className:wC(h.root,i),ref:t,ownerState:m,...p,children:(0,Y.jsx)(LX.Provider,{value:v,children:y.map((e,t)=>(0,Y.jsx)(RX.Provider,{value:S(t),children:e},t))})})})},{}),YX=b.createContext(null);function XX(e){let{slots:t,slotProps:n={},defaultSlots:r,children:i}=e,a=b.useMemo(()=>({slots:J({},r,t),slotProps:n}),[r,t,n]);return(0,Y.jsx)(YX.Provider,{value:a,children:i})}function ZX(e){let t=1/0,n=-1/0;for(let r of e??[])rn&&(n=r);return[t,n]}var QX=(e,t)=>t===`x`?{x:e,y:null}:{x:null,y:e},$X=e=>{let{axis:t,getFilters:n,isDefaultAxis:r}=e,i=n?.({currentAxisId:t.id,isDefaultAxis:r});return ZX((i?t.data?.filter((e,t)=>i({x:null,y:null},t)):t.data)??[])},eZ=e=>t=>{let{series:n,axis:r,getFilters:i,isDefaultAxis:a}=t;return Object.keys(n).filter(t=>{let i=e===`x`?n[t].xAxisId:n[t].yAxisId;return r.domainSeries===`visible`&&n[t].hidden?!1:i===r.id||a&&i===void 0}).reduce((t,o)=>{let{stackedData:s,visibleStackedData:c}=n[o],l=i?.({currentAxisId:r.id,isDefaultAxis:a,seriesXAxisId:n[o].xAxisId,seriesYAxisId:n[o].yAxisId}),[u,d]=(r.domainSeries===`visible`?c:s)?.reduce((t,n,r)=>l&&(!l(QX(n[0],e),r)||!l(QX(n[1],e),r))?t:[Math.min(...n,t[0]),Math.max(...n,t[1])],[1/0,-1/0])??[1/0,-1/0];return[Math.min(u,t[0]),Math.max(d,t[1])]},[1/0,-1/0])},tZ=e=>Object.keys(e.series).some(t=>e.series[t].layout===`horizontal`)?eZ(`x`)(e):$X(e),nZ=e=>Object.keys(e.series).some(t=>e.series[t].layout===`horizontal`)?$X(e):eZ(`y`)(e);function rZ(e,t){if(e.length===0)return;let n=e.length,r=t,i=e[r[0]].length;for(let t=0;t0?(s[0]=i,i+=c,s[1]=i):c<0?(s[1]=a,a+=c,s[0]=a):s.data[n.key]>0?(s[0]=i,s[1]=i):s.data[n.key]<0?(s[1]=a,s[0]=a):(s[0]=0,s[1]=0)}}}var iZ={appearance:gH,ascending:vH,descending:bH,insideOut:xH,none:lH,reverse:SH},aZ={expand:pH,diverging:rZ,none:cH,silhouette:mH,wiggle:hH},oZ=e=>{let{series:t,seriesOrder:n,defaultStrategy:r}=e,i=[],a={};return n.forEach(e=>{let{stack:n,stackOrder:o,stackOffset:s}=t[e];n===void 0?i.push({ids:[e],stackingOrder:iZ.none,stackingOffset:aZ.none}):a[n]===void 0?(a[n]=i.length,i.push({ids:[e],stackingOrder:iZ[o??r?.stackOrder??`none`],stackingOffset:aZ[s??r?.stackOffset??`diverging`]})):(i[a[n]].ids.push(e),o!==void 0&&(i[a[n]].stackingOrder=iZ[o]),s!==void 0&&(i[a[n]].stackingOffset=aZ[s]))}),i},sZ=e=>e==null?``:e.toLocaleString(),cZ=(e,t,n)=>{let{seriesOrder:r,series:i}=e,a=oZ(e),o=t??[];r.forEach(e=>{let n=i[e].data;n===void 0?i[e].valueGetter&&t&&t.forEach((t,n)=>{let r=i[e].valueGetter(t);o.length<=n?o.push({[e]:r}):o[n][e]=r}):n.forEach((t,n)=>{o.length<=n?o.push({[e]:t}):o[n][e]=t})});let s={};return a.forEach(e=>{let{ids:r,stackingOffset:a,stackingOrder:c}=e,l=r.map(e=>{let t=i[e].dataKey;return i[e].data===void 0&&t!==void 0?t:e}),u=fH().keys(l).value((e,t)=>e[t]??0).order(c).offset(a)(o),d=u.map(e=>e.index),f=fH().keys(l).value((e,t)=>{let i=l.indexOf(t),a=r[i];return n?.({type:`bar`,seriesId:a})?e[t]??0:0}).order(()=>d).offset(a)(o);r.forEach((e,r)=>{let{dataKey:a,valueGetter:o}=i[e],c;c=o?t.map(e=>o(e)):a?t.map(e=>{let t=e[a];return typeof t==`number`?t:null}):i[e].data;let l=!n?.({type:`bar`,seriesId:e});s[e]=J({layout:`vertical`,labelMarkType:`square`,minBarSize:0,valueFormatter:i[e].valueFormatter??sZ},i[e],{data:c,hidden:l,stackedData:u[r],visibleStackedData:f[r]})})}),{seriesOrder:r,stackingGroups:a,series:s}};function lZ(e,t,n){let{seriesOrder:r,series:i}=t;return r.reduce((t,r)=>{let a=mG(i[r].label,`legend`);return a===void 0||t.push({type:e,markType:i[r].labelMarkType??n,seriesId:r,color:i[r].color,label:a}),t},[])}var uZ=e=>lZ(`bar`,e),dZ=(e,t,n)=>{let r=e.layout===`vertical`;return FU({series:e,valueColorScale:r?n?.colorScale:t?.colorScale,categoryColorScale:r?t?.colorScale:n?.colorScale,categoryValues:r?t?.data:n?.data})};function fZ(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{let n=e[t];return n.seriesOrder.filter(e=>{let t=n.series[e];return`hidden`in t&&t.hidden?!1:t.data.length>0&&t.data.some(e=>e!=null)}).map(e=>({type:t,seriesId:e}))})}function pZ(e,t,n,r){let i=fZ(e,t);if(i.length===0)return null;let a=n!==void 0&&r!==void 0?i.findIndex(e=>e.type===n&&e.seriesId===r):-1;return a<=0?i[i.length-1]:i[(a-1+i.length)%i.length]}function mZ(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{let n=e[t];return n.seriesOrder.filter(e=>{let t=n.series[e];return`hidden`in t&&t.hidden?!1:t.data.length>0&&t.data.some(e=>e!=null&&!(typeof e==`object`&&`hidden`in e&&e.hidden))}).map(e=>n.series[e].data.length)}).reduce((e,t)=>Math.max(e,t),0)}function hZ(e,t,n,r){let i=fZ(e,t);return i.length===0?null:i[((n!==void 0&&r!==void 0?i.findIndex(e=>e.type===n&&e.seriesId===r):-1)+1)%i.length]}function gZ({processedSeries:e,type:t,seriesId:n,startIndex:r,dataLength:i,direction:a,allowCycles:o}){if(i<=0)return null;let s=e[t]?.series[n];if(s&&`hidden`in s&&s.hidden)return null;let c=s?.data,l=e=>{if(!c)return!1;let t=c[e];return typeof t==`object`&&!!t&&`hidden`in t&&!!t.hidden},u=r;for(let e=0;e=0&&u=i)return null;u=e}}return null}function _Z(e,t,n){if(t===`sankey`)return!1;let r=e[t]?.series[n]?.data;return r!=null&&r.length>0}function vZ(e,t,n){let r=e[t]?.series[n];return!!(r&&`hidden`in r&&r.hidden)}function yZ(e,t=!1,n=!0){return function(r,i){let a=eP(i),o=r?.seriesId,s=r?.type;if(!s||o==null||!_Z(a,s,o)||vZ(a,s,o)){let t=hZ(a,e,s,o);if(t===null)return null;s=t.type,o=t.seriesId}let c=n?a[s]?.series[o]?.data.length??0:mZ(a,e),l=r?.dataIndex==null?0:r.dataIndex+1;t?l%=c:l=Math.min(c-1,l);let u=gZ({processedSeries:a,type:s,seriesId:o,startIndex:l,dataLength:c,direction:1,allowCycles:t});return u===null?null:{type:s,seriesId:o,dataIndex:u}}}function bZ(e,t=!1,n=!0){return function(r,i){let a=eP(i),o=r?.seriesId,s=r?.type;if(!s||o==null||!_Z(a,s,o)||vZ(a,s,o)){let t=pZ(a,e,s,o);if(t===null)return null;s=t.type,o=t.seriesId}let c=n?a[s]?.series[o]?.data.length??0:mZ(a,e),l=r?.dataIndex==null?c-1:r.dataIndex-1;l=t?(c+l)%c:Math.max(0,l);let u=gZ({processedSeries:a,type:s,seriesId:o,startIndex:l,dataLength:c,direction:-1,allowCycles:t});return u===null?null:{type:s,seriesId:o,dataIndex:u}}}function xZ(e){return function(t,n){let r=eP(n),i=t?.seriesId,a=t?.type,o=hZ(r,e,a,i);if(o===null)return null;a=o.type,i=o.seriesId;let s=r[a].series[i].data,c=t?.dataIndex==null?0:Math.min(t.dataIndex,s.length-1),l=gZ({processedSeries:r,type:a,seriesId:i,startIndex:c,dataLength:s.length,direction:1,allowCycles:!0});return l===null?null:{type:a,seriesId:i,dataIndex:l}}}function SZ(e){return function(t,n){let r=eP(n),i=t?.seriesId,a=t?.type,o=pZ(r,e,a,i);if(o===null)return null;a=o.type,i=o.seriesId;let s=r[a].series[i].data,c=t?.dataIndex==null?s.length-1:Math.min(t.dataIndex,s.length-1),l=gZ({processedSeries:r,type:a,seriesId:i,startIndex:c,dataLength:s.length,direction:-1,allowCycles:!0});return l===null?null:{type:a,seriesId:i,dataIndex:l}}}function CZ(e,t,n){return r=>{switch(r.key){case`ArrowRight`:return yZ(e,t,n);case`ArrowLeft`:return bZ(e,t,n);case`ArrowDown`:return SZ(e);case`ArrowUp`:return xZ(e);default:return null}}}var wZ=CZ(yG,!1,!1);function TZ(e,t={}){let{series:n,getColor:r,identifier:i}=e;if(!i||i.dataIndex===void 0)return null;let a=mG(n.label,`tooltip`),o=n.data[i.dataIndex];if(t.skipNullValues&&o==null)return null;let s=n.valueFormatter(o,{dataIndex:i.dataIndex});return J({identifier:i,color:r(i.dataIndex),label:a,value:o,formattedValue:s,markType:n.labelMarkType},t.includeMarkShape&&`showMark`in n&&{markShape:n.showMark?n.shape:void 0})}var EZ=e=>TZ(e,{skipNullValues:!0}),DZ=e=>Object.values(e).map(e=>e.layout===`horizontal`?{direction:`y`,axisId:e.yAxisId}:{direction:`x`,axisId:e.xAxisId});function OZ(e,t,n){let r=e&&t>0||!e&&t<0;return n?!r:r}function kZ(e){let{verticalLayout:t,xAxisConfig:n,yAxisConfig:r,series:i,numberOfGroups:a}=e,o=t?n:r,s=(t?r.reverse:n.reverse)??!1,{barWidth:c,offset:l}=fR(o.scale.bandwidth(),a,o.barGapRatio),u=n.scale,d=r.scale;return function(e,n){let r=n*(c+l),a=o.data[e],f=i.data[e];if(f==null)return null;let[p,m]=ZX(i.visibleStackedData[e].map(e=>t?d(e):u(e))).map(e=>Math.round(e)),h=0;f!==0&&(i.hidden||(h=Math.max(i.minBarSize,m-p)));let g=OZ(t,f,s),_=0;return _=g?m-h:p,{x:t?u(a)+r:_,y:t?_:d(a)+r,height:t?h:c,width:t?c:h}}}var AZ=$(IR,eP,uL,dL,function(e,t,n,r,i){if(!e||e.type!==`bar`||e.dataIndex===void 0)return null;let a=t.bar?.series[e.seriesId];if(!t.bar||!a)return null;let o=n.axis[a.xAxisId??n.axisIds[0]],s=r.axis[a.yAxisId??r.axisIds[0]];if(!o||!s)return null;let c=t.bar.stackingGroups.findIndex(e=>e.ids.includes(a.id)),l=kZ({verticalLayout:a.layout===`vertical`,xAxisConfig:o,yAxisConfig:s,series:a,numberOfGroups:t.bar.stackingGroups.length})(e.dataIndex,c);if(l==null)return null;let{x:u,y:d,width:f,height:p}=l;switch(i){case`right`:return{x:u+f,y:d+p/2};case`bottom`:return{x:u+f/2,y:d+p};case`left`:return{x:u,y:d+p/2};default:return{x:u+f/2,y:d}}});function jZ(e,t,n){return J({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]})}var MZ=e=>`Type(${e})`,NZ=e=>`Series(${e})`,PZ=e=>e===void 0?``:`Index(${e})`,FZ=e=>`${MZ(e.type)}${NZ(e.seriesId)}${PZ(e.dataIndex)}`,IZ=e=>({type:e.type,seriesId:e.seriesId,dataIndex:e.dataIndex}),LZ={seriesProcessor:cZ,colorProcessor:dZ,legendGetter:uZ,tooltipGetter:EZ,selectorTooltipItemPosition:AZ,axisTooltipGetter:DZ,xExtremumGetter:tZ,yExtremumGetter:nZ,getSeriesWithDefaultValues:jZ,getItemAtPosition:hR,identifierSerializer:FZ,identifierCleaner:IZ,descriptionGetter:e=>{let{identifier:t,series:n,xAxis:r,yAxis:i,localeText:a}=e,o=mG(n.label,`tooltip`),s=n.data[t.dataIndex]??null,c=n.layout===`horizontal`?i:r,l=c.data?.[t.dataIndex]??null,u=n.valueFormatter(s,{dataIndex:t.dataIndex}),d=c.valueFormatter?.(l,{location:`tooltip`,scale:c.scale});return a.barDescription({value:s,formattedValue:u??``,categoryValue:l,formattedCategoryValue:d??``,seriesLabel:o})},keyboardFocusHandler:wZ,isHighlightedCreator:az,isFadedCreator:sz},RZ=e=>{let{axis:t}=e;return ZX(t.data??[])};function zZ(e,t,n,r){return n.reduce((n,i,a)=>{if(t[a]===null)return n;let[o,s]=e(i);return r&&(!r({y:o,x:null},a)||!r({y:s,x:null},a))?n:[Math.min(o,s,n[0]),Math.max(o,s,n[1])]},[1/0,-1/0])}var BZ=e=>{let{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(e=>{if(n.domainSeries===`visible`&&t[e].hidden)return!1;let i=t[e].yAxisId;return i===n.id||r&&i===void 0}).reduce((e,a)=>{let{area:o,stackedData:s,visibleStackedData:c,data:l}=t[a],u=o!==void 0,d=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),[f,p]=zZ(u&&n.scaleType!==`log`&&typeof t[a].baseline!=`string`?e=>e:e=>[e[1],e[1]],l,n.domainSeries===`visible`?c:s,d);return[Math.min(f,e[0]),Math.max(p,e[1])]},[1/0,-1/0])},VZ=[`circle`,`square`,`diamond`,`cross`,`star`,`triangle`,`wye`],HZ=e=>e==null?``:e.toLocaleString();function UZ(e,t,n,r){let{seriesOrder:i,series:a}=e,o=oZ(J({},e,{defaultStrategy:{stackOffset:`none`}})),s=new Map,c=t??[];i.forEach((e,n)=>{s.set(e,n);let r=a[e].data;r===void 0?a[e].valueGetter&&t&&t.forEach((t,n)=>{let r=a[e].valueGetter(t);c.length<=n?c.push({[e]:r}):c[n][e]=r}):r.forEach((t,n)=>{c.length<=n?c.push({[e]:t}):c[n][e]=t})});let l={};return o.forEach(e=>{let{ids:i,stackingOffset:o,stackingOrder:u}=e,d=i.map(e=>{let t=a[e].dataKey;return a[e].data===void 0&&t!==void 0?t:e}),f=fH().keys(d).value((e,t)=>e[t]??0).order(u).offset(o)(c),p=f.map(e=>e.index),m=fH().keys(d).value((e,t)=>{let a=d.indexOf(t),o=i[a];return n?.({type:r,seriesId:o})?e[t]??0:0}).order(()=>p).offset(o)(c);i.forEach((e,i)=>{let{dataKey:o,valueGetter:c}=a[e],u;u=c?t.map(e=>c(e)):o?t.map(e=>{let t=e[o];return typeof t==`number`?t:null}):a[e].data;let d=!n?.({type:r,seriesId:e});l[e]=J({labelMarkType:`line+mark`},a[e],{shape:a[e].shape??VZ[(s.get(e)??0)%VZ.length],data:u,valueFormatter:a[e].valueFormatter??HZ,hidden:d,stackedData:f[i],visibleStackedData:m[i]})})}),{seriesOrder:i,stackingGroups:o,series:l}}var WZ=(e,t,n)=>UZ(e,t,n,`line`),GZ=e=>{let{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{let r=mG(n[t].label,`legend`);return r===void 0||e.push({type:`line`,markType:n[t].labelMarkType,markShape:n[t].showMark?n[t].shape??`circle`:void 0,seriesId:t,color:n[t].color,label:r}),e},[])},KZ=e=>TZ(e,{includeMarkShape:!0}),qZ=e=>Object.values(e).map(e=>({direction:`x`,axisId:e.xAxisId})),JZ=(e,t,n)=>J({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length],curve:e.curve??`monotoneX`}),YZ=$(IR,eP,uL,dL,function(e,t,n,r){if(!e||e.type!==`line`||e.dataIndex===void 0)return null;let i=t.line?.series[e.seriesId];if(i==null)return null;let a=n.axis[i.xAxisId??n.axisIds[0]],o=r.axis[i.yAxisId??r.axisIds[0]];if(a===void 0||o===void 0)return null;let s=a.data?.[e.dataIndex],c=i.data[e.dataIndex]==null?null:i.visibleStackedData[e.dataIndex][1];return s==null||c==null?null:{x:a.scale(s),y:o.scale(c)}});function XZ(e){return`cpx1`in e}var ZZ=class{segments=[];cx=0;cy=0;moveTo(e,t){this.cx=e,this.cy=t}lineTo(e,t){this.segments.push({x0:this.cx,y0:this.cy,x1:e,y1:t}),this.cx=e,this.cy=t}bezierCurveTo(e,t,n,r,i,a){this.segments.push({x0:this.cx,y0:this.cy,cpx1:e,cpy1:t,cpx2:n,cpy2:r,x1:i,y1:a}),this.cx=i,this.cy=a}closePath(){}};function QZ(e,t){let n=e.x1-e.x0;if(n===0)return e.y0;let r=e.y1-e.y0;if(!XZ(e))return e.y0+r*(t-e.x0)/n;let i=(e.cpx1-e.x0)/n,a=(e.cpx2-e.x0)/n,o=hz(i,r===0?0:(e.cpy1-e.y0)/r,a,r===0?0:(e.cpy2-e.y0)/r),s=(t-e.x0)/n;return e.y0+r*o(s)}function $Z(e,t,n){if(e.length===0)return null;if(e.length===1)return e[0].y;let r=new ZZ,i=dU(n)(r),a=e[0].x>t,o=0,s=!1;i.lineStart();for(let n of e)!s&&n.x>t!==a&&(o=Math.max(0,r.segments.length-1),s=!0),i.point(n.x,n.y);i.lineEnd();for(let e=o;en.x0-.5)return n.y0;if(tn.x1-.5)return n.y1;let i=Math.min(n.x0,n.x1),a=Math.max(n.x0,n.x1);if(t>=i&&t<=a)return QZ(n,t)}return null}function eQ(e,t){let{scale:n,data:r}=e;if(!r||r.length===0)return null;if(oI(n)){let n=yL(e,t);return n===-1?null:_R(e.scale)(r[n])<=t?n===r.length-1?null:{left:n,right:n+1}:n===0?null:{left:n-1,right:n}}let i=_L(n.invert(t)),a=-1;for(let e=0;e0&&e[s-1]!=null;)--s;let c=i;for(;cC(S[e]),e=>{let t=_[e];return t?p.scale(t[1]):null},h,g,y);if(w.length<2)continue;let T=$Z(w,t.x,b);if(T==null)continue;let E=Math.abs(t.y-T);E=0;--e){let r=d[e].ids;for(let e=0;ew(T[e]),D=nQ(v,E,e=>{let t=_[e];return t?C(t[1]):null},h,g,y),O=nQ(v,E,e=>{let t=_[e];return t?tQ(b,C,t[0]):null},h,g,y);if(D.length<2||O.length<2)continue;let k=$Z(D,t.x,x),ee=$Z(O,t.x,x);if(k==null||ee==null)continue;let te=Math.min(ee,k),A=Math.max(ee,k);if(t.y>=te&&t.y<=A){let e=yL(f,t.x);return{type:`line`,seriesId:a,dataIndex:e===-1?h:e}}}}return u}var aQ={colorProcessor:IU,seriesProcessor:WZ,legendGetter:GZ,tooltipGetter:KZ,selectorTooltipItemPosition:YZ,axisTooltipGetter:qZ,xExtremumGetter:RZ,yExtremumGetter:BZ,getSeriesWithDefaultValues:JZ,getItemAtPosition:iQ,keyboardFocusHandler:CZ(yG,!1,!1),identifierSerializer:FZ,identifierCleaner:IZ,descriptionGetter:e=>{let{identifier:t,series:n,xAxis:r,localeText:i}=e,a=mG(n.label,`tooltip`),o=t.dataIndex;if(o===void 0)return``;let s=r.data?.[o]??null,c=n.data[o]??null,l=r.valueFormatter?.(s,{location:`tooltip`,scale:r.scale}),u=n.valueFormatter(c,{dataIndex:o});return i.lineDescription({x:s,y:c,formattedXValue:l??``,formattedYValue:u??``,seriesLabel:a})},isHighlightedCreator:az,isFadedCreator:sz},oQ=(e=`none`)=>{if(typeof e==`function`)return e;switch(e){case`none`:return null;case`desc`:return(e,t)=>t-e;case`asc`:return(e,t)=>e-t;default:return null}},sQ=(e,t,n)=>{let{seriesOrder:r,series:i}=e,a={};return r.forEach(e=>{let t=i[e].data.filter((t,r)=>n?.({type:`pie`,seriesId:e,dataIndex:r})),r=vV().startAngle(sO(i[e].startAngle??0)).endAngle(sO(i[e].endAngle??360)).padAngle(sO(i[e].paddingAngle??0)).sortValues(oQ(i[e].sortingValues??`none`))(t.map(e=>e.value)),o=0;a[e]=J({labelMarkType:`circle`,valueFormatter:e=>e.value.toLocaleString()},i[e],{data:i[e].data.map((t,a)=>{let s=t.id??`auto-generated-pie-id-${e}-${a}`,c=!n?.({type:`pie`,seriesId:e,dataIndex:a}),l;if(c){let n=o>0?r[o-1].endAngle:sO(i[e].startAngle??0);l={startAngle:n,endAngle:n,padAngle:0,value:t.value,index:a}}else l=r[o],o+=1;let u=J({},t,{id:s,hidden:c},l);return J({labelMarkType:`circle`},u,{formattedValue:i[e].valueFormatter?.(J({},u,{label:mG(u.label,`arc`)}),{dataIndex:a})??u.value.toLocaleString()})})})}),{seriesOrder:r,series:a}},cQ=e=>t=>e.data[t].color,lQ=e=>{let{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>(n[t].data.forEach((r,i)=>{let a=mG(r.label,`legend`);a!==void 0&&e.push({type:`pie`,markType:r.labelMarkType??n[t].labelMarkType,seriesId:t,dataIndex:i,color:r.color,label:a})}),e),[])},uQ=e=>{let{series:t,getColor:n,identifier:r}=e;if(!r||r.dataIndex===void 0)return null;let i=t.data[r.dataIndex];if(i==null)return null;let a=mG(i.label,`tooltip`),o=J({},i,{label:a}),s=t.valueFormatter(o,{dataIndex:r.dataIndex});return{identifier:r,color:n(r.dataIndex),label:a,value:o,formattedValue:s,markType:i.labelMarkType??t.labelMarkType}};function dQ(e,t){let{height:n,width:r}=t,{cx:i,cy:a}=e,o=Math.min(r,n)/2;return{cx:Qz(i??`50%`,r),cy:Qz(a??`50%`,n),availableRadius:o}}var fQ={colorProcessor:cQ,seriesProcessor:sQ,seriesLayout:(e,t)=>{let n={};for(let r of e.seriesOrder){let{innerRadius:i,outerRadius:a,arcLabelRadius:o,cx:s,cy:c}=e.series[r],{cx:l,cy:u,availableRadius:d}=dQ({cx:s,cy:c},{width:t.width,height:t.height}),f=Qz(a??d,d),p=Qz(i??0,d);n[r]={radius:{available:d,inner:p,outer:f,label:o===void 0?(p+f)/2:Qz(o,d)},center:{x:t.left+l,y:t.top+u}}}return n},legendGetter:lQ,tooltipGetter:uQ,selectorTooltipItemPosition:$(IR,eP,oF,function(e,t,n,r){if(!e||e.type!==`pie`||e.dataIndex===void 0)return null;let i=t.pie?.series[e.seriesId],a=n.pie?.[e.seriesId];if(i==null||a==null)return null;let{center:o,radius:s}=a,{data:c}=i,l=c[e.dataIndex];if(!l)return null;let u=[[s.inner,l.startAngle],[s.inner,l.endAngle],[s.outer,l.startAngle],[s.outer,l.endAngle]].map(([e,t])=>({x:o.x+e*Math.sin(t),y:o.y-e*Math.cos(t)})),[d,f]=ZX(u.map(e=>e.x)),[p,m]=ZX(u.map(e=>e.y));switch(r){case`bottom`:return{x:(f+d)/2,y:m};case`left`:return{x:d,y:(m+p)/2};case`right`:return{x:f,y:(m+p)/2};default:return{x:(f+d)/2,y:p}}}),getSeriesWithDefaultValues:(e,t,n)=>J({},e,{id:e.id??`auto-generated-id-${t}`,data:e.data.map((e,t)=>J({},e,{color:e.color??n[t%n.length]}))}),keyboardFocusHandler:CZ(new Set([`pie`])),identifierSerializer:FZ,identifierCleaner:IZ,descriptionGetter:e=>{let{identifier:t,series:n,localeText:r}=e,i=n.data[t.dataIndex],a=mG(i?.label,`tooltip`),o=i?.value??null,s=i?.formattedValue??``,c=n.data.reduce((e,t)=>e+(t?.value??0),0);return r.pieDescription({value:o,totalValue:c,formattedValue:s,seriesLabel:a})},isHighlightedCreator:az,isFadedCreator:sz},pQ=e=>{let{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e,a=1/0,o=-1/0;for(let e in t){if(!Object.hasOwn(t,e)||n.domainSeries===`visible`&&t[e].hidden)continue;let s=t[e].xAxisId;if(!(s===n.id||s===void 0&&r))continue;let c=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[e].xAxisId,seriesYAxisId:t[e].yAxisId}),l=t[e].data??[];for(let e=0;eo&&(o=t.x))}}return[a,o]},mQ=e=>{let{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e,a=1/0,o=-1/0;for(let e in t){if(!Object.hasOwn(t,e)||n.domainSeries===`visible`&&t[e].hidden)continue;let s=t[e].yAxisId;if(!(s===n.id||s===void 0&&r))continue;let c=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[e].xAxisId,seriesYAxisId:t[e].yAxisId}),l=t[e].data??[];for(let e=0;eo&&(o=t.y))}}return[a,o]};function hQ(e,t,n){throw Error(QE(279,e,t,n.map(e=>`"${e}"`).join(`, `)))}var gQ={bar:LZ,scatter:{seriesProcessor:({series:e,seriesOrder:t},n,r)=>({series:Object.fromEntries(Object.entries(e).map(([e,t])=>{let i=t?.datasetKeys,a=[`x`,`y`].filter(e=>typeof i?.[e]!=`string`);t?.datasetKeys&&a.length>0&&hQ(`Scatter`,e,a);let o;return o=t.valueGetter?n?.map(t.valueGetter)??[]:i?n?.map(e=>{let t={x:e[i.x],y:e[i.y]};return i.colorValue!==void 0&&(t.colorValue=e[i.colorValue]),i.sizeValue!==void 0&&(t.sizeValue=e[i.sizeValue]),i.z!==void 0&&(t.z=e[i.z]),i.id!==void 0&&(t.id=e[i.id]),t})??[]:t.data??[],[e,J({labelMarkType:`circle`,markerSize:4},t,{preview:J({markerSize:1},t?.preview),data:o,hidden:!r?.({type:`scatter`,seriesId:e}),valueFormatter:t.valueFormatter??(e=>e&&`(${e.x}, ${e.y})`)})]})),seriesOrder:t}),colorProcessor:(e,t,n,r)=>{let i=r?.colorScale,a=n?.colorScale,o=t?.colorScale,s=PU(e);return i?t=>{if(t===void 0)return e.color;if(r?.data?.[t]!==void 0){let e=i(r?.data?.[t]);if(e!==null)return e}let n=e.data[t],a=i(n.colorValue??n.z);return typeof a==`string`?a:s({value:n,dataIndex:t})}:a?t=>{if(t===void 0)return e.color;let n=e.data[t],r=a(n.y);return typeof r==`string`?r:s({value:n,dataIndex:t})}:o?t=>{if(t===void 0)return e.color;let n=e.data[t],r=o(n.x);return typeof r==`string`?r:s({value:n,dataIndex:t})}:t=>{if(t===void 0)return e.color;let n=e.data[t];return s({value:n,dataIndex:t})}},legendGetter:e=>lZ(`scatter`,e),tooltipGetter:e=>TZ(e),selectorTooltipItemPosition:$(IR,eP,uL,dL,function(e,t,n,r){if(!e||e.type!==`scatter`||e.dataIndex===void 0)return null;let i=t.scatter?.series[e.seriesId];if(i==null)return null;let a=n.axis[i.xAxisId??n.axisIds[0]],o=r.axis[i.yAxisId??r.axisIds[0]];if(a===void 0||o===void 0)return null;let s=i.data?.[e.dataIndex].x,c=i.data?.[e.dataIndex].y;return s==null||c==null?null:{x:a.scale(s),y:o.scale(c)}}),xExtremumGetter:pQ,yExtremumGetter:mQ,getSeriesWithDefaultValues:(e,t,n)=>J({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]}),keyboardFocusHandler:CZ(yG),identifierSerializer:FZ,identifierCleaner:IZ,descriptionGetter:e=>{let{identifier:t,series:n,xAxis:r,yAxis:i,localeText:a}=e,o=mG(n.label,`tooltip`),s=n.data[t.dataIndex],c=r.valueFormatter?.(s?.x,{location:`tooltip`,scale:r.scale})??``,l=i.valueFormatter?.(s?.y,{location:`tooltip`,scale:i.scale})??``;return a.scatterDescription({x:s?.x??null,y:s?.y??null,formattedXValue:c,formattedYValue:l,seriesLabel:o})},isHighlightedCreator:az,isFadedCreator:sz},line:aQ,pie:fQ},_Q=[`children`,`localeText`,`plugins`,`slots`,`slotProps`,`seriesConfig`],vQ=e=>{let t=IE({props:e,name:`MuiChartsDataProvider`}),{children:n,localeText:r,plugins:i=lY,slots:a,slotProps:o,seriesConfig:s=gQ}=t,c=WE(t,_Q),l=bE();return{children:n,localeText:r,chartProviderProps:{plugins:i,pluginParams:J({theme:l.palette.mode,seriesConfig:s},c)},slots:a,slotProps:o}};function yQ(e){let{children:t,localeText:n,chartProviderProps:r,slots:i,slotProps:a}=vQ(e);return(0,Y.jsx)(BR,J({},r,{children:(0,Y.jsx)(AH,{localeText:n,children:(0,Y.jsx)(XX,{slots:i,slotProps:a,defaultSlots:JX,children:t})})}))}function bQ(e){return DC(`MuiChartsSurface`,e)}var xQ=()=>eT({root:[`root`]},bQ);OC(`MuiChartsSurface`,[`root`]);function SQ(e){let{isReversed:t,gradientId:n,size:r,direction:i,scale:a,colorMap:o}=e;return r<=0?null:(0,Y.jsx)(`linearGradient`,{id:n,x1:`0`,x2:`0`,y1:`0`,y2:`0`,[`${i}${t?1:2}`]:`${r}px`,gradientUnits:`userSpaceOnUse`,children:o.thresholds.map((e,n)=>{let i=a(e);if(i===void 0)return null;let s=t?1-i/r:i/r;return Number.isNaN(s)?null:(0,Y.jsxs)(b.Fragment,{children:[(0,Y.jsx)(`stop`,{offset:s,stopColor:o.colors[n],stopOpacity:1}),(0,Y.jsx)(`stop`,{offset:s,stopColor:o.colors[n+1],stopOpacity:1})]},e.toString()+n)})})}var CQ=10;function wQ(e){let{gradientUnits:t,isReversed:n,gradientId:r,size:i,direction:a,scale:o,colorScale:s,colorMap:c}=e,l=[c.min??0,c.max??100],u=l.map(o).filter(e=>e!==void 0);if(u.length!==2)return null;let d=typeof l[0]==`number`?Ak(l[0],l[1]):kk(l[0],l[1]),f=Math.round((Math.max(...u)-Math.min(...u))/CQ),p=`${l[0]}-${l[1]}-`;return(0,Y.jsx)(`linearGradient`,{id:r,x1:`0`,x2:`0`,y1:`0`,y2:`0`,[`${a}${n?1:2}`]:t===`objectBoundingBox`?1:`${i}px`,gradientUnits:t??`userSpaceOnUse`,children:Array.from({length:f+1},(e,t)=>{let r=d(t/f);if(r===void 0)return null;let a=o(r);if(a===void 0)return null;let c=n?1-a/i:a/i,l=s(r);return l===null?null:(0,Y.jsx)(`stop`,{offset:c,stopColor:l,stopOpacity:1},p+t)})})}var TQ=10,EQ=e=>e?{x1:`1`,x2:`0`,y1:`0`,y2:`0`}:{x1:`0`,x2:`1`,y1:`0`,y2:`0`};function DQ(e){let{isReversed:t,gradientId:n,colorScale:r,colorMap:i}=e,a=[i.min??0,i.max??100],o=typeof a[0]==`number`?Ak(a[0],a[1]):kk(a[0],a[1]),s=TQ,c=`${a[0]}-${a[1]}-`;return(0,Y.jsx)(`linearGradient`,J({id:n},EQ(t),{gradientUnits:`objectBoundingBox`,children:Array.from({length:11},(e,t)=>{let n=t/s,i=o(n);if(i===void 0)return null;let a=r(i);return a===null?null:(0,Y.jsx)(`stop`,{offset:n,stopColor:a,stopOpacity:1},c+t)})}))}function OQ(){let{top:e,height:t,bottom:n,left:r,width:i,right:a}=Gz(),o=e+t+n,s=r+i+a,c=KB(),l=qB(),{xAxis:u,xAxisIds:d}=kB(),{yAxis:f,yAxisIds:p}=AB(),{zAxis:m,zAxisIds:h}=LB(),g=p.filter(e=>f[e].colorMap!==void 0),_=d.filter(e=>u[e].colorMap!==void 0),v=h.filter(e=>m[e].colorMap!==void 0);return g.length===0&&_.length===0&&v.length===0?null:(0,Y.jsxs)(`defs`,{children:[g.map(e=>{let t=c(e),n=l(e),{colorMap:r,scale:i,colorScale:a,reverse:s}=f[e];return r?.type===`piecewise`?(0,Y.jsx)(SQ,{isReversed:!s,scale:i,colorMap:r,size:o,gradientId:t,direction:`y`},t):r?.type===`continuous`?(0,Y.jsxs)(b.Fragment,{children:[(0,Y.jsx)(wQ,{isReversed:!s,scale:i,colorScale:a,colorMap:r,size:o,gradientId:t,direction:`y`}),(0,Y.jsx)(DQ,{isReversed:s,colorScale:a,colorMap:r,gradientId:n})]},t):null}),_.map(e=>{let t=c(e),n=l(e),{colorMap:r,scale:i,reverse:a,colorScale:o}=u[e];return r?.type===`piecewise`?(0,Y.jsx)(SQ,{isReversed:a,scale:i,colorMap:r,size:s,gradientId:t,direction:`x`},t):r?.type===`continuous`?(0,Y.jsxs)(b.Fragment,{children:[(0,Y.jsx)(wQ,{isReversed:a,scale:i,colorScale:o,colorMap:r,size:s,gradientId:t,direction:`x`}),(0,Y.jsx)(DQ,{isReversed:a,colorScale:o,colorMap:r,gradientId:n})]},t):null}),v.map(e=>{let t=l(e),{colorMap:n,colorScale:r}=m[e];return n?.type===`continuous`?(0,Y.jsx)(DQ,{colorScale:r,colorMap:n,gradientId:t},t):null})]})}function kQ(e){return DC(`MuiChartsSvgLayer`,e)}var AQ=()=>eT({root:[`root`]},kQ);OC(`MuiChartsSvgLayer`,[`root`]);var jQ=[`children`,`className`],MQ=Z(`svg`,{name:`MuiChartsSvgLayer`,slot:`Root`})({width:`100%`,height:`100%`,position:`absolute`,inset:0}),NQ=b.forwardRef(function(e,t){let{store:n}=VR(),r=n.use(KP),i=n.use(qP),a=IE({props:e,name:`MuiChartsSvgLayer`}),{children:o,className:s}=a,c=WE(a,jQ),l=AQ(),u=i>0&&r>0;return(0,Y.jsxs)(MQ,J({viewBox:`0 0 ${r} ${i}`,className:wC(l.root,s)},c,{ref:t,"aria-hidden":!0,children:[(0,Y.jsx)(OQ,{}),u&&o]}))});function PQ(){let{instance:e}=VR(),t=RB(),n=WR(),r=b.useRef(!1),i=b.useRef(void 0);b.useEffect(()=>{let a=t.current;if(!a||!Object.values(n.state.seriesConfig.config).some(e=>e.getItemAtPosition!=null))return;function o(){r.current=!0}function s(){let t=i.current;t&&(i.current=void 0,e.removeTooltipItem(t),e.clearHighlight())}function c(){r.current=!1,s()}let l=function(t){let r=xL(a,t);if(!e.isPointInside(r.x,r.y)){s();return}let o;for(let e of Object.keys(n.state.seriesConfig.config))if(o=n.state.seriesConfig.config[e].getItemAtPosition?.(n.state,{x:r.x,y:r.y}),o)break;o?(e.setLastUpdateSource(`pointer`),e.setTooltipItem(o),e.setHighlight(o),i.current=o):s()};return a.addEventListener(`pointerleave`,c),a.addEventListener(`pointermove`,l),a.addEventListener(`pointerenter`,o),()=>{a.removeEventListener(`pointerenter`,o),a.removeEventListener(`pointermove`,l),a.removeEventListener(`pointerleave`,c),r.current&&c()}},[e,n,t,n.state.seriesConfig.config])}function FQ(){let e=WR(),t=e.use(KL),n=e.use(BN),r=zB(),{localeText:i}=jH(),{xAxis:a,xAxisIds:o}=kB(),{yAxis:s,yAxisIds:c}=AB(),{rotationAxis:l,rotationAxisIds:u}=NB(),{radiusAxis:d,radiusAxisIds:f}=PB();if(t===null)return null;let{type:p,seriesId:m}=t,h=r[p]?.series[m];if(!h)return null;let g=n[p]?.descriptionGetter;if(!g)return null;let _={identifier:t,series:h,localeText:i};if(pP(h)){let e=h.xAxisId??o[0],t=h.yAxisId??c[0];_.xAxis=a[e],_.yAxis=s[t]}else qz(p)&&(_.rotationAxis=l[u[0]],_.radiusAxis=d[f[0]]);return g(_)}var IQ={borderWidth:0,width:`100%`,height:`100%`,overflow:`hidden`,position:`absolute`,inset:0,padding:0,outline:`none`,pointerEvents:`none`};function LQ(){let e=FQ(),t=Kz(),n=b.useRef(null),r=b.useRef(0),i=b.useRef(null);return b.useEffect(()=>{let a=i.current;if(a){if(a.children.length===0){for(let e=0;e<2;e+=1){let n=document.createElement(`div`);n.setAttribute(`id`,e===0?`voiceover-${t}-1`:`voiceover-${t}-2`),n.style.display=`none`,a.appendChild(n)}for(let n=0;n<2;n+=1){let i=document.createElement(`div`);n===(r.current+1)%2&&e&&i.setAttribute(`tabindex`,`0`),i.setAttribute(`role`,`img`),i.setAttribute(`aria-hidden`,`true`),i.setAttribute(`aria-labelledby`,n===0?`voiceover-${t}-1`:`voiceover-${t}-2`),i.style.width=`100%`,i.style.height=`100%`,i.style.outline=`none`,a.appendChild(i)}}if(e&&e!==n.current){n.current=e;let i=r.current;r.current=(r.current+1)%2;let o=r.current,s=a.children[2+o],c=a.children[2+i],l=a.children[o],u=a.children[i];l.textContent=e??``,u.textContent=e??``,s.setAttribute(`aria-hidden`,`false`),s.setAttribute(`aria-labelledby`,o===0?`voiceover-${t}-1`:`voiceover-${t}-2`),e&&s.setAttribute(`tabindex`,`0`),c.setAttribute(`aria-hidden`,`true`),c.setAttribute(`aria-labelledby`,o===0?`voiceover-${t}-1`:`voiceover-${t}-2`),c.removeAttribute(`tabindex`),s.focus()}}},[e,t]),(0,Y.jsx)(`div`,{role:`none`,tabIndex:e?void 0:0,ref:i,style:IQ})}var RQ=[`children`,`title`,`desc`,`className`],zQ=Z(`div`,{name:`MuiChartsLayerContainer`,slot:`Root`})(({ownerState:e})=>({width:e.width??`100%`,height:e.height??`100%`,display:`flex`,position:`relative`,flexDirection:`column`,alignItems:`center`,justifyContent:`center`,touchAction:`pan-y`,userSelect:`none`,gridArea:`chart`,"&:focus":{outline:`none`}})),BQ=b.forwardRef(function(e,t){let{store:n,instance:r}=VR(),i=n.use(JP),a=n.use(YP),o=n.use(qL);PQ();let s=IE({props:e,name:`MuiChartsLayerContainer`}),{children:c,title:l,desc:u,className:d}=s,f=WE(s,RQ),p=xQ(),m=hE(RB(),t),h=Dw();return(0,Y.jsxs)(zQ,J({ref:m,ownerState:{width:i,height:a},role:`none`,"aria-label":l,"aria-describedby":u?h:void 0,className:wC(p.root,d)},f,{onPointerEnter:e=>{f.onPointerEnter?.(e),r.handlePointerEnter?.(e)},onPointerLeave:e=>{f.onPointerLeave?.(e),r.handlePointerLeave?.(e)},onClick:e=>{f.onClick?.(e),r.handleClick?.(e)},children:[o&&(0,Y.jsx)(LQ,{}),u&&(0,Y.jsx)(`span`,{id:h,style:{display:`none`},children:u}),c]}))}),VQ=[`children`,`className`,`title`,`desc`],HQ=b.forwardRef(function(e,t){let n=IE({props:e,name:`MuiChartsSurface`}),{children:r,className:i,title:a,desc:o}=n,s=WE(n,VQ),c=xQ();return(0,Y.jsx)(BQ,{className:wC(c.root,i),ref:t,title:a,desc:o,children:(0,Y.jsx)(NQ,J({},s,{children:r}))})}),UQ=OC(`MuiChartsToolbar`,[`root`]),WQ=[`children`,`sx`,`extendVertically`,`hideLegend`,`legendDirection`,`legendPosition`],GQ=e=>e?.horizontal===`start`?`start`:e?.horizontal===`end`?`end`:`center`,KQ=e=>e?.vertical===`top`?`flex-start`:e?.vertical===`bottom`?`flex-end`:`center`,qQ=(e,t,n)=>e?`"chart"`:t===`vertical`?n?.horizontal===`start`?`"legend chart"`:`"chart legend"`:n?.vertical===`bottom`?`"chart"
+`,xX=typeof yX==`string`?null:mx`
+ animation: ${yX} 1.4s linear infinite;
+ `,SX=typeof bX==`string`?null:mx`
+ animation: ${bX} 1.4s ease-in-out infinite;
+ `,CX=e=>{let{classes:t,variant:n,color:r,disableShrink:i}=e;return tT({root:[`root`,n,`color${EE(r)}`],svg:[`svg`],track:[`track`],circle:[`circle`,i&&`circleDisableShrink`]},_X,t)},wX=Z(`span`,{name:`MuiCircularProgress`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`color${EE(n.color)}`]]}})(wE(({theme:e})=>{let t=PE(e,{animation:`none`});return{display:`inline-block`,variants:[{props:{variant:`determinate`},style:{...FE(e,`transform`)}},{props:{variant:`indeterminate`},style:xX||{animation:`${yX} 1.4s linear infinite`}},...t?[{props:{variant:`indeterminate`},style:t}]:[],...Object.entries(e.palette).filter($W()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main}}))]}})),TX=Z(`svg`,{name:`MuiCircularProgress`,slot:`Svg`})({display:`block`}),EX=Z(`circle`,{name:`MuiCircularProgress`,slot:`Circle`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.circle,n.disableShrink&&t.circleDisableShrink]}})(wE(({theme:e})=>{let t=PE(e,{animation:`none`});return{stroke:`currentColor`,variants:[{props:{variant:`determinate`},style:{...FE(e,`stroke-dashoffset`)}},{props:{variant:`indeterminate`},style:{strokeDasharray:`80px, 200px`,strokeDashoffset:0}},{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:SX||{animation:`${bX} 1.4s ease-in-out infinite`}},...t?[{props:({ownerState:e})=>e.variant===`indeterminate`&&!e.disableShrink,style:t}]:[]]}})),DX=Z(`circle`,{name:`MuiCircularProgress`,slot:`Track`})(wE(({theme:e})=>({stroke:`currentColor`,opacity:(e.vars||e).palette.action.activatedOpacity}))),OX=b.forwardRef(function(e,t){let n=TE({props:e,name:`MuiCircularProgress`}),{className:r,color:i=`primary`,disableShrink:a=!1,enableTrackSlot:o=!1,min:s,max:c,size:l=40,style:u,thickness:d=3.6,value:f=n.min??0,variant:p=`indeterminate`,...m}=n,h=s??0,g=c??100,_={...n,color:i,disableShrink:a,size:l,thickness:d,value:f,variant:p,enableTrackSlot:o},v=CX(_),y={},b={},x={};if(p===`determinate`){let e=2*Math.PI*((vX-d)/2),t=g-h;y.strokeDasharray=e.toFixed(3),y.strokeDashoffset=t>0?`${((g-f)/t*e).toFixed(3)}px`:`${e.toFixed(3)}px`,b.transform=`rotate(-90deg)`,x[`aria-valuenow`]=f,x[`aria-valuemin`]=h,x[`aria-valuemax`]=g}return(0,J.jsx)(wX,{className:Y(v.root,r),style:{width:l,height:l,...b,...u},ownerState:_,ref:t,role:`progressbar`,...x,...m,children:(0,J.jsxs)(TX,{className:v.svg,ownerState:_,viewBox:`${vX/2} ${vX/2} ${vX} ${vX}`,children:[o?(0,J.jsx)(DX,{className:v.track,ownerState:_,cx:vX,cy:vX,r:(vX-d)/2,fill:`none`,strokeWidth:d,"aria-hidden":`true`}):null,(0,J.jsx)(EX,{className:v.circle,style:y,ownerState:_,cx:vX,cy:vX,r:(vX-d)/2,fill:`none`,strokeWidth:d})]})})});function kX(e){return DC(`MuiIconButton`,e)}var AX=OC(`MuiIconButton`,[`root`,`disabled`,`colorInherit`,`colorPrimary`,`colorSecondary`,`colorError`,`colorInfo`,`colorSuccess`,`colorWarning`,`edgeStart`,`edgeEnd`,`sizeSmall`,`sizeMedium`,`sizeLarge`,`loading`,`loadingIndicator`,`loadingWrapper`]),jX=e=>{let{classes:t,disabled:n,color:r,edge:i,size:a,loading:o}=e;return tT({root:[`root`,o&&`loading`,n&&`disabled`,r!=="default"&&`color${EE(r)}`,i&&`edge${EE(i)}`,`size${EE(a)}`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},kX,t)},MX=Z(hX,{name:`MuiIconButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,n.loading&&t.loading,n.color!=="default"&&t[`color${EE(n.color)}`],n.edge&&t[`edge${EE(n.edge)}`],t[`size${EE(n.size)}`]]}})(wE(({theme:e})=>({textAlign:`center`,flex:`0 0 auto`,fontSize:e.typography.pxToRem(24),padding:8,borderRadius:`50%`,color:(e.vars||e).palette.action.active,...FE(e,`background-color`,{duration:e.transitions.duration.shortest}),variants:[{props:e=>!e.disableRipple,style:{"--IconButton-hoverBg":e.alpha((e.vars||e).palette.action.active,(e.vars||e).palette.action.hoverOpacity),"&:hover":{backgroundColor:`var(--IconButton-hoverBg)`,"@media (hover: none)":{backgroundColor:`transparent`}}}},{props:{edge:`start`},style:{marginLeft:-12}},{props:{edge:`start`,size:`small`},style:{marginLeft:-3}},{props:{edge:`end`},style:{marginRight:-12}},{props:{edge:`end`,size:`small`},style:{marginRight:-3}}]})),wE(({theme:e})=>({variants:[{props:{color:`inherit`},style:{color:`inherit`}},...Object.entries(e.palette).filter($W()).map(([t])=>({props:{color:t},style:{color:(e.vars||e).palette[t].main,"--IconButton-hoverBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}})),{props:{size:`small`},style:{padding:5,fontSize:e.typography.pxToRem(18)}},{props:{size:`large`},style:{padding:12,fontSize:e.typography.pxToRem(28)}}],[`&.${AX.disabled}`]:{backgroundColor:`transparent`,color:(e.vars||e).palette.action.disabled},[`&.${AX.loading}`]:{color:`transparent`}}))),NX=Z(`span`,{name:`MuiIconButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,top:`50%`,left:`50%`,transform:`translate(-50%, -50%)`,color:(e.vars||e).palette.action.disabled,variants:[{props:{loading:!0},style:{display:`flex`}}]})),PX=b.forwardRef(function(e,t){let n=TE({props:e,name:`MuiIconButton`}),{edge:r=!1,children:i,className:a,color:o=`default`,disabled:s=!1,disableFocusRipple:c=!1,size:l=`medium`,id:u,loading:d=null,loadingIndicator:f,...p}=n,m=DY(u),h=f??(0,J.jsx)(OX,{"aria-labelledby":m,color:`inherit`,size:16}),g={...n,edge:r,color:o,disabled:s,disableFocusRipple:c,loading:d,loadingIndicator:h,size:l},_=jX(g);return(0,J.jsxs)(MX,{id:d?m:u,className:Y(_.root,a),centerRipple:!0,internalNativeButton:!0,focusRipple:!c,disabled:s||d,ref:t,...p,ownerState:g,children:[typeof d==`boolean`&&(0,J.jsx)(`span`,{className:_.loadingWrapper,style:{display:`contents`},children:(0,J.jsx)(NX,{className:_.loadingIndicator,ownerState:g,children:d&&h})}),i]})});function FX(e){return DC(`MuiButton`,e)}var IX=OC(`MuiButton`,`root.text.outlined.contained.disableElevation.focusVisible.disabled.colorInherit.colorPrimary.colorSecondary.colorSuccess.colorError.colorInfo.colorWarning.sizeMedium.sizeSmall.sizeLarge.fullWidth.startIcon.endIcon.icon.loading.loadingWrapper.loadingIconPlaceholder.loadingIndicator.loadingPositionCenter.loadingPositionStart.loadingPositionEnd`.split(`.`)),LX=b.createContext({}),RX=b.createContext(void 0),zX=e=>{let{color:t,disableElevation:n,fullWidth:r,size:i,variant:a,loading:o,loadingPosition:s,classes:c}=e,l=tT({root:[`root`,o&&`loading`,a,`size${EE(i)}`,`color${EE(t)}`,n&&`disableElevation`,r&&`fullWidth`,o&&`loadingPosition${EE(s)}`],startIcon:[`icon`,`startIcon`],endIcon:[`icon`,`endIcon`],loadingIndicator:[`loadingIndicator`],loadingWrapper:[`loadingWrapper`]},FX,c);return{...c,...l}},BX=[{props:{size:`small`},style:{"& > *:nth-of-type(1)":{fontSize:18}}},{props:{size:`medium`},style:{"& > *:nth-of-type(1)":{fontSize:20}}},{props:{size:`large`},style:{"& > *:nth-of-type(1)":{fontSize:22}}}],VX=Z(hX,{shouldForwardProp:e=>CE(e)||e===`classes`,name:`MuiButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[n.variant],t[`size${EE(n.size)}`],n.color===`inherit`&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth,n.loading&&t.loading]}})(wE(({theme:e})=>{let t=e.palette.mode===`light`?e.palette.grey[300]:e.palette.grey[800],n=e.palette.mode===`light`?e.palette.grey.A100:e.palette.grey[700];return{...e.typography.button,minWidth:64,padding:`6px 16px`,border:0,borderRadius:(e.vars||e).shape.borderRadius,...FE(e,[`background-color`,`box-shadow`,`border-color`,`color`],{duration:e.transitions.duration.short}),"&:hover":{textDecoration:`none`},[`&.${IX.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:{variant:`contained`},style:{color:`var(--variant-containedColor)`,backgroundColor:`var(--variant-containedBg)`,boxShadow:(e.vars||e).shadows[2],"&:hover":{boxShadow:(e.vars||e).shadows[4],"@media (hover: none)":{boxShadow:(e.vars||e).shadows[2]}},"&:active":{boxShadow:(e.vars||e).shadows[8]},[`&.${IX.focusVisible}`]:{boxShadow:(e.vars||e).shadows[6]},[`&.${IX.disabled}`]:{color:(e.vars||e).palette.action.disabled,boxShadow:(e.vars||e).shadows[0],backgroundColor:(e.vars||e).palette.action.disabledBackground}}},{props:{variant:`outlined`},style:{padding:`5px 15px`,border:`1px solid currentColor`,borderColor:`var(--variant-outlinedBorder, currentColor)`,backgroundColor:`var(--variant-outlinedBg)`,color:`var(--variant-outlinedColor)`,[`&.${IX.disabled}`]:{border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`}}},{props:{variant:`text`},style:{padding:`6px 8px`,color:`var(--variant-textColor)`,backgroundColor:`var(--variant-textBg)`}},...Object.entries(e.palette).filter($W()).map(([t])=>({props:{color:t},style:{"--variant-textColor":(e.vars||e).palette[t].main,"--variant-outlinedColor":(e.vars||e).palette[t].main,"--variant-outlinedBorder":e.alpha((e.vars||e).palette[t].main,.5),"--variant-containedColor":(e.vars||e).palette[t].contrastText,"--variant-containedBg":(e.vars||e).palette[t].main,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":(e.vars||e).palette[t].dark,"--variant-textBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBorder":(e.vars||e).palette[t].main,"--variant-outlinedBg":e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.hoverOpacity)}}}})),{props:{color:`inherit`},style:{color:`inherit`,borderColor:`currentColor`,"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedBg:t,"@media (hover: hover)":{"&:hover":{"--variant-containedBg":e.vars?e.vars.palette.Button.inheritContainedHoverBg:n,"--variant-textBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"--variant-outlinedBg":e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity)}}}},{props:{size:`small`,variant:`text`},style:{padding:`4px 5px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`text`},style:{padding:`8px 11px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`outlined`},style:{padding:`3px 9px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`outlined`},style:{padding:`7px 21px`,fontSize:e.typography.pxToRem(15)}},{props:{size:`small`,variant:`contained`},style:{padding:`4px 10px`,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`,variant:`contained`},style:{padding:`8px 22px`,fontSize:e.typography.pxToRem(15)}},{props:{disableElevation:!0},style:{boxShadow:`none`,"&:hover":{boxShadow:`none`},[`&.${IX.focusVisible}`]:{boxShadow:`none`},"&:active":{boxShadow:`none`},[`&.${IX.disabled}`]:{boxShadow:`none`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{loadingPosition:`center`},style:{...FE(e,[`background-color`,`box-shadow`,`border-color`],{duration:e.transitions.duration.short}),[`&.${IX.loading}`]:{color:`transparent`}}}]}})),HX=Z(`span`,{name:`MuiButton`,slot:`StartIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.startIcon,n.loading&&t.startIconLoadingStart]}})(({theme:e})=>({display:`inherit`,alignItems:`center`,marginRight:8,marginLeft:-4,"&::before":{content:`"\\200b"`,width:0,overflow:`hidden`},variants:[{props:{size:`small`},style:{marginLeft:-2}},{props:{loadingPosition:`start`,loading:!0},style:{...FE(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`start`,loading:!0,fullWidth:!0},style:{marginRight:-8}},...BX]})),UX=Z(`span`,{name:`MuiButton`,slot:`EndIcon`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.endIcon,n.loading&&t.endIconLoadingEnd]}})(({theme:e})=>({display:`inherit`,marginRight:-4,marginLeft:8,variants:[{props:{size:`small`},style:{marginRight:-2}},{props:{loadingPosition:`end`,loading:!0},style:{...FE(e,[`opacity`],{duration:e.transitions.duration.short}),opacity:0}},{props:{loadingPosition:`end`,loading:!0,fullWidth:!0},style:{marginLeft:-8}},...BX]})),WX=Z(`span`,{name:`MuiButton`,slot:`LoadingIndicator`})(({theme:e})=>({display:`none`,position:`absolute`,visibility:`visible`,variants:[{props:{loading:!0},style:{display:`flex`}},{props:{loadingPosition:`start`},style:{left:14}},{props:{loadingPosition:`start`,size:`small`},style:{left:10}},{props:{variant:`text`,loadingPosition:`start`},style:{left:6}},{props:{loadingPosition:`center`},style:{left:`50%`,transform:`translate(-50%)`,color:(e.vars||e).palette.action.disabled}},{props:{loadingPosition:`end`},style:{right:14}},{props:{loadingPosition:`end`,size:`small`},style:{right:10}},{props:{variant:`text`,loadingPosition:`end`},style:{right:6}},{props:{loadingPosition:`start`,fullWidth:!0},style:{position:`relative`,left:-10}},{props:{loadingPosition:`end`,fullWidth:!0},style:{position:`relative`,right:-10}}]})),GX=Z(`span`,{name:`MuiButton`,slot:`LoadingIconPlaceholder`})({display:`inline-block`,width:`1em`,height:`1em`}),KX=b.forwardRef(function(e,t){let n=b.useContext(LX),r=b.useContext(RX),i=TE({props:BC(n,e),name:`MuiButton`}),{children:a,color:o=`primary`,component:s=`button`,className:c,disabled:l=!1,disableElevation:u=!1,disableFocusRipple:d=!1,endIcon:f,focusVisibleClassName:p,fullWidth:m=!1,id:h,loading:g=null,loadingIndicator:_,loadingPosition:v=`center`,size:y=`medium`,startIcon:x,type:S,variant:C=`text`,...w}=i,T=DY(h),E=_??(0,J.jsx)(OX,{"aria-labelledby":T,color:`inherit`,size:16}),D={...i,color:o,component:s,disabled:l,disableElevation:u,disableFocusRipple:d,fullWidth:m,loading:g,loadingIndicator:E,loadingPosition:v,size:y,type:S,variant:C},O=zX(D),k=(x||g&&v===`start`)&&(0,J.jsx)(HX,{className:O.startIcon,ownerState:D,children:x||(0,J.jsx)(GX,{className:O.loadingIconPlaceholder,ownerState:D})}),ee=(f||g&&v===`end`)&&(0,J.jsx)(UX,{className:O.endIcon,ownerState:D,children:f||(0,J.jsx)(GX,{className:O.loadingIconPlaceholder,ownerState:D})}),te=r||``,A=typeof g==`boolean`?(0,J.jsx)(`span`,{className:O.loadingWrapper,style:{display:`contents`},children:g&&(0,J.jsx)(WX,{className:O.loadingIndicator,ownerState:D,children:E})}):null,{root:ne,...re}=O;return(0,J.jsxs)(VX,{ownerState:D,className:Y(n.className,O.root,c,te),component:s,disabled:l||g,focusRipple:!d,focusVisibleClassName:Y(O.focusVisible,p),ref:t,internalNativeButton:!0,type:S,id:g?T:h,...w,classes:re,children:[k,v!==`end`&&A,a,v===`end`&&A,ee]})}),qX=b.createContext({}),JX=b.createContext(void 0);function YX(e,t){return t===void 0||e===void 0?!1:Array.isArray(t)?t.includes(e):e===t}var XX=b.createContext(void 0);function ZX(){let e=b.useContext(XX);if(e===void 0)throw Error(`MUI: RovingTabIndexContext is missing. Roving tab index items must be placed within a roving tab index provider.`);return e}var QX=Object.is;function $X(e,t){if(e===t)return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=0,r=0;for(let r in e)if(n+=1,!QX(e[r],t[r])||!(r in t))return!1;for(let e in t)r+=1;return n===r}var eZ=[`ArrowRight`,`ArrowLeft`,`ArrowUp`,`ArrowDown`,`Home`,`End`];function tZ(e){let{activeItemId:t,getDefaultActiveItemId:n,orientation:r,isRtl:i=!1,isItemFocusable:a=hZ,wrap:o=!0}=e,[s,c]=b.useState(t),[l,u]=b.useState(t),d=s;t!==l&&(u(t),t!==void 0&&t!==s&&(d=t,c(t)));let f=b.useRef(null),p=b.useRef(new Map),[m,h]=b.useState(0),g=b.useMemo(()=>fZ(p.current),[m]),_=rZ(d,g,a,n),v=b.useRef(_);v.current=_;let y=b.useCallback(()=>{let e=fZ(p.current);return lZ(e,rZ(v.current,e,a,n))},[n,a]),x=b.useCallback(()=>p.current,[]),S=_E(e=>{$X(p.current.get(e.id)??null,e)||(p.current.set(e.id,e),h(e=>e+1))}),C=_E(e=>{p.current.delete(e)&&h(e=>e+1)}),w=_E(e=>{c(e)}),T=b.useCallback(e=>v.current===e,[]),E=b.useCallback((e,t,n,r)=>{let i=sZ(pZ(p.current),e,t,n,r??a);return i?(i.element?.focus(),c(i.id),i):null},[a]),D=b.useCallback((e,t,n)=>({onFocus:e=>{t?.(e);let n=pZ(p.current),r=dZ(n,e.target);r!==-1&&c(n[r].id)},onKeyDown:e=>{if(n?.(e),e.defaultPrevented||e.altKey||e.shiftKey||e.ctrlKey||e.metaKey||!eZ.includes(e.key))return;let t=r===`horizontal`?`ArrowLeft`:`ArrowUp`,a=r===`horizontal`?`ArrowRight`:`ArrowDown`;r===`horizontal`&&i&&(t=`ArrowRight`,a=`ArrowLeft`);let s=pZ(p.current),c=OE(vE(f.current)),l=c===f.current,u=oZ(s,c,v.current),d=`next`;switch(e.key){case t:d=`previous`,e.preventDefault(),l&&(u=s.length);break;case a:e.preventDefault(),l&&(u=-1);break;case`Home`:e.preventDefault(),u=-1;break;case`End`:e.preventDefault(),d=`previous`,u=s.length;break;default:return}E(u,d,o)},ref:vZ(e,e=>{f.current=e})}),[E,i,r,o]),O=b.useCallback(e=>{let t=pZ(p.current),n=OE(vE(f.current)),r=n===f.current?-1:oZ(t,n,v.current);return E(r,`next`,!0,e)?.id??null},[E]);return b.useMemo(()=>({activeItemId:_,focusNext:O,getActiveItem:y,getContainerProps:D,getItemMap:x,isItemActive:T,registerItem:S,setActiveItemId:w,unregisterItem:C}),[_,O,y,D,x,T,S,w,C])}function nZ(e){let{activeItemId:t,registerItem:n,unregisterItem:r}=ZX(),i=b.useRef(null),a=b.useMemo(()=>({disabled:e.disabled??!1,element:null,focusableWhenDisabled:e.focusableWhenDisabled??!1,id:e.id,selected:e.selected??!1,textValue:e.textValue}),[e.disabled,e.focusableWhenDisabled,e.id,e.selected,e.textValue]),o=b.useRef(a);o.current=a;let s=b.useCallback(t=>{if(i.current=t,t==null){queueMicrotask(()=>{i.current??r(e.id)});return}n({...o.current,element:t})},[e.id,n,r]),c=gE(e.ref,s);return UC(()=>{i.current&&n({...a,element:i.current})},[a,n]),UC(()=>{let t=e.id;return()=>{r(t)}},[e.id,r]),{ref:c,tabIndex:t===e.id?0:-1}}function rZ(e,t,n,r){return e==null?aZ(t,n,r):iZ(e,t,n)}function iZ(e,t,n){let r=uZ(t,e);return r===-1?cZ(t,n):n(t[r])?t[r].id:sZ(t,r,`next`,!1,n)?.id??null}function aZ(e,t,n){let r=n?.(e);if(r!=null){let n=lZ(e,r);if(n&&t(n))return n.id}return cZ(e,t)}function oZ(e,t,n){if(t){let n=dZ(e,t);if(n!==-1)return n}return uZ(e,n)}function sZ(e,t,n,r,i){let a=e.length-1;if(a===-1)return null;let o=!1,s=mZ(t,a,n,r),c=s;for(;s!==-1;){if(s===c){if(o)return null;o=!0}let t=e[s];if(!t||!i(t))s=mZ(s,a,n,r);else return t}return null}function cZ(e,t){return e.find(e=>t(e))?.id??null}function lZ(e,t){return t==null?null:e.find(e=>e.id===t)??null}function uZ(e,t){return t==null?-1:e.findIndex(e=>e.id===t)}function dZ(e,t){return t?e.findIndex(e=>e.element===t||e.element?.contains(t)):-1}function fZ(e){let t=Array.from(e.values());if(t.every(e=>e.element==null))return t;let n=t.filter(gZ).sort((e,t)=>_Z(e.element,t.element)),r=t.filter(e=>!gZ(e));return[...n,...r]}function pZ(e){return fZ(e).filter(gZ)}function mZ(e,t,n,r=!0){return n===`next`?e===t?r?0:-1:e+1:e===0?r?t:-1:e-1}function hZ(e){return e.element?e.focusableWhenDisabled?!0:!e.disabled&&!e.element.hasAttribute(`disabled`)&&e.element.getAttribute(`aria-disabled`)!==`true`&&e.element.hasAttribute(`tabindex`):!1}function gZ(e){return e.element!=null&&e.element.isConnected}function _Z(e,t){if(e===t)return 0;let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}function vZ(...e){return t=>{e.forEach(e=>{kq(e??null,t)})}}function yZ(e,t){let{children:n,disabled:r=!1,selected:i=!1,value:a}=e,o=ZX(),s=nZ({id:a,ref:t,disabled:r,selected:i}),c=o.getItemMap().size===0&&i?0:s.tabIndex;return b.cloneElement(b.Children.only(n),{...s,tabIndex:n.props.tabIndex??c})}var bZ=b.forwardRef(yZ),xZ=e=>{let{classes:t,fullWidth:n,selected:r,disabled:i,size:a,color:o}=e;return tT({root:[`root`,r&&`selected`,i&&`disabled`,n&&`fullWidth`,`size${EE(a)}`,o]},IE,t)},SZ=Z(hX,{name:`MuiToggleButton`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[t.root,t[`size${EE(n.size)}`]]}})(wE(({theme:e})=>({...e.typography.button,borderRadius:(e.vars||e).shape.borderRadius,padding:11,border:`1px solid ${(e.vars||e).palette.divider}`,color:(e.vars||e).palette.action.active,[`&.${LE.disabled}`]:{color:(e.vars||e).palette.action.disabled,border:`1px solid ${(e.vars||e).palette.action.disabledBackground}`},"&:hover":{textDecoration:`none`,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:`transparent`}},variants:[{props:{color:`standard`},style:{[`&.${LE.selected}`]:{color:(e.vars||e).palette.text.primary,backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette.text.primary,(e.vars||e).palette.action.selectedOpacity)}}}}},...Object.entries(e.palette).filter($W()).map(([t])=>({props:{color:t},style:{[`&.${LE.selected}`]:{color:(e.vars||e).palette[t].main,backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity),"&:hover":{backgroundColor:e.alpha((e.vars||e).palette[t].main,`${(e.vars||e).palette.action.selectedOpacity} + ${(e.vars||e).palette.action.hoverOpacity}`),"@media (hover: none)":{backgroundColor:e.alpha((e.vars||e).palette[t].main,(e.vars||e).palette.action.selectedOpacity)}}}}})),{props:{fullWidth:!0},style:{width:`100%`}},{props:{size:`small`},style:{padding:7,fontSize:e.typography.pxToRem(13)}},{props:{size:`large`},style:{padding:15,fontSize:e.typography.pxToRem(15)}}]}))),CZ=b.forwardRef(function(e,t){let{value:n,isRovingTabIndex:r,...i}=b.useContext(qX),a=b.useContext(JX),o=TE({props:BC({...i,selected:YX(e.value,n)},e),name:`MuiToggleButton`}),{children:s,className:c,color:l=`standard`,disabled:u=!1,disableFocusRipple:d=!1,fullWidth:f=!1,onChange:p,onClick:m,selected:h,size:g=`medium`,value:_,...v}=o,y={...o,color:l,disabled:u,disableFocusRipple:d,fullWidth:f,size:g},x=xZ(y),S=e=>{m&&(m(e,_),e.defaultPrevented)||p&&p(e,_)},C=a||``,w=(0,J.jsx)(SZ,{className:Y(i.className,x.root,c,C),internalNativeButton:!0,disabled:u,focusRipple:!d,ref:r?void 0:t,onClick:S,onChange:p,value:_,ownerState:y,"aria-pressed":h,...v,children:s});return r?(0,J.jsx)(bZ,{disabled:u,selected:h,ref:t,value:_,children:w}):w});function wZ(e){return b.Children.toArray(e).filter(e=>b.isValidElement(e))}function TZ(e){return DC(`MuiToggleButtonGroup`,e)}var EZ=OC(`MuiToggleButtonGroup`,[`root`,`selected`,`horizontal`,`vertical`,`disabled`,`grouped`,`fullWidth`,`firstButton`,`lastButton`,`middleButton`]),DZ=e=>{let{classes:t,orientation:n,fullWidth:r,disabled:i}=e;return tT({root:[`root`,n,r&&`fullWidth`],grouped:[`grouped`,i&&`disabled`],firstButton:[`firstButton`],lastButton:[`lastButton`],middleButton:[`middleButton`]},TZ,t)},OZ=Z(`div`,{name:`MuiToggleButtonGroup`,slot:`Root`,overridesResolver:(e,t)=>{let{ownerState:n}=e;return[{[`& .${EZ.grouped}`]:t.grouped},{[`& .${EZ.firstButton}`]:t.firstButton},{[`& .${EZ.lastButton}`]:t.lastButton},{[`& .${EZ.middleButton}`]:t.middleButton},t.root,n.orientation===`vertical`&&t.vertical,n.fullWidth&&t.fullWidth]}})(wE(({theme:e})=>({display:`inline-flex`,borderRadius:(e.vars||e).shape.borderRadius,variants:[{props:{orientation:`vertical`},style:{flexDirection:`column`,[`& .${EZ.grouped}`]:{[`&.${EZ.selected} + .${EZ.grouped}.${EZ.selected}`]:{borderTop:0,marginTop:0}},[`& .${EZ.firstButton},& .${EZ.middleButton}`]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},[`& .${EZ.lastButton},& .${EZ.middleButton}`]:{marginTop:-1,borderTop:`1px solid transparent`,borderTopLeftRadius:0,borderTopRightRadius:0},[`& .${EZ.lastButton}.${LE.disabled},& .${EZ.middleButton}.${LE.disabled}`]:{borderTop:`1px solid transparent`}}},{props:{fullWidth:!0},style:{width:`100%`}},{props:{orientation:`horizontal`},style:{[`& .${EZ.grouped}`]:{[`&.${EZ.selected} + .${EZ.grouped}.${EZ.selected}`]:{borderLeft:0,marginLeft:0}},[`& .${EZ.firstButton},& .${EZ.middleButton}`]:{borderTopRightRadius:0,borderBottomRightRadius:0},[`& .${EZ.lastButton},& .${EZ.middleButton}`]:{marginLeft:-1,borderLeft:`1px solid transparent`,borderTopLeftRadius:0,borderBottomLeftRadius:0},[`& .${EZ.lastButton}.${LE.disabled},& .${EZ.middleButton}.${LE.disabled}`]:{borderLeft:`1px solid transparent`}}}]}))),kZ=q({},{baseButton:KX,baseIconButton:PX,baseToggleButton:CZ,baseToggleButtonGroup:b.forwardRef(function(e,t){let n=TE({props:e,name:`MuiToggleButtonGroup`}),{children:r,className:i,color:a=`standard`,disabled:o=!1,exclusive:s=!1,fullWidth:c=!1,onChange:l,orientation:u=`horizontal`,size:d=`medium`,value:f,...p}=n,m={...n,disabled:o,fullWidth:c,orientation:u,size:d},h=DZ(m),g=yw(),_=b.useCallback((e,t)=>{if(!l)return;let n=f&&f.indexOf(t),r;f&&n>=0?(r=f.slice(),r.splice(n,1)):r=f?f.concat(t):[t],l(e,r)},[l,f]),v=b.useCallback((e,t)=>{l&&l(e,f===t?null:t)},[l,f]),y=b.useMemo(()=>({className:h.grouped,onChange:s?v:_,value:f,size:d,fullWidth:c,color:a,disabled:o,isRovingTabIndex:!0}),[h.grouped,s,v,_,f,d,c,a,o]),x=wZ(r),S=x.length,C=e=>{let t=e===0,n=e===S-1;return t&&n?``:t?h.firstButton:n?h.lastButton:h.middleButton},w=tZ({orientation:u,isRtl:g}),T=w.getContainerProps(t,p.onFocus,p.onKeyDown);return(0,J.jsx)(OZ,{role:`group`,className:Y(h.root,i),ownerState:m,...p,...T,children:(0,J.jsx)(XX.Provider,{value:w,children:(0,J.jsx)(qX.Provider,{value:y,children:x.map((e,t)=>(0,J.jsx)(JX.Provider,{value:C(t),children:e},t))})})})})},{}),AZ=b.createContext(null);function jZ(e){let{slots:t,slotProps:n={},defaultSlots:r,children:i}=e,a=b.useMemo(()=>({slots:q({},r,t),slotProps:n}),[r,t,n]);return(0,J.jsx)(AZ.Provider,{value:a,children:i})}function MZ(e){let t=1/0,n=-1/0;for(let r of e??[])rn&&(n=r);return[t,n]}var NZ=(e,t)=>t===`x`?{x:e,y:null}:{x:null,y:e},PZ=e=>{let{axis:t,getFilters:n,isDefaultAxis:r}=e,i=n?.({currentAxisId:t.id,isDefaultAxis:r});return MZ((i?t.data?.filter((e,t)=>i({x:null,y:null},t)):t.data)??[])},FZ=e=>t=>{let{series:n,axis:r,getFilters:i,isDefaultAxis:a}=t;return Object.keys(n).filter(t=>{let i=e===`x`?n[t].xAxisId:n[t].yAxisId;return r.domainSeries===`visible`&&n[t].hidden?!1:i===r.id||a&&i===void 0}).reduce((t,o)=>{let{stackedData:s,visibleStackedData:c}=n[o],l=i?.({currentAxisId:r.id,isDefaultAxis:a,seriesXAxisId:n[o].xAxisId,seriesYAxisId:n[o].yAxisId}),[u,d]=(r.domainSeries===`visible`?c:s)?.reduce((t,n,r)=>l&&(!l(NZ(n[0],e),r)||!l(NZ(n[1],e),r))?t:[Math.min(...n,t[0]),Math.max(...n,t[1])],[1/0,-1/0])??[1/0,-1/0];return[Math.min(u,t[0]),Math.max(d,t[1])]},[1/0,-1/0])},IZ=e=>Object.keys(e.series).some(t=>e.series[t].layout===`horizontal`)?FZ(`x`)(e):PZ(e),LZ=e=>Object.keys(e.series).some(t=>e.series[t].layout===`horizontal`)?PZ(e):FZ(`y`)(e);function RZ(e,t){if(e.length===0)return;let n=e.length,r=t,i=e[r[0]].length;for(let t=0;t0?(s[0]=i,i+=c,s[1]=i):c<0?(s[1]=a,a+=c,s[0]=a):s.data[n.key]>0?(s[0]=i,s[1]=i):s.data[n.key]<0?(s[1]=a,s[0]=a):(s[0]=0,s[1]=0)}}}var zZ={appearance:CH,ascending:TH,descending:DH,insideOut:OH,none:gH,reverse:kH},BZ={expand:bH,diverging:RZ,none:hH,silhouette:xH,wiggle:SH},VZ=e=>{let{series:t,seriesOrder:n,defaultStrategy:r}=e,i=[],a={};return n.forEach(e=>{let{stack:n,stackOrder:o,stackOffset:s}=t[e];n===void 0?i.push({ids:[e],stackingOrder:zZ.none,stackingOffset:BZ.none}):a[n]===void 0?(a[n]=i.length,i.push({ids:[e],stackingOrder:zZ[o??r?.stackOrder??`none`],stackingOffset:BZ[s??r?.stackOffset??`diverging`]})):(i[a[n]].ids.push(e),o!==void 0&&(i[a[n]].stackingOrder=zZ[o]),s!==void 0&&(i[a[n]].stackingOffset=BZ[s]))}),i},HZ=e=>e==null?``:e.toLocaleString(),UZ=(e,t,n)=>{let{seriesOrder:r,series:i}=e,a=VZ(e),o=t??[];r.forEach(e=>{let n=i[e].data;n===void 0?i[e].valueGetter&&t&&t.forEach((t,n)=>{let r=i[e].valueGetter(t);o.length<=n?o.push({[e]:r}):o[n][e]=r}):n.forEach((t,n)=>{o.length<=n?o.push({[e]:t}):o[n][e]=t})});let s={};return a.forEach(e=>{let{ids:r,stackingOffset:a,stackingOrder:c}=e,l=r.map(e=>{let t=i[e].dataKey;return i[e].data===void 0&&t!==void 0?t:e}),u=yH().keys(l).value((e,t)=>e[t]??0).order(c).offset(a)(o),d=u.map(e=>e.index),f=yH().keys(l).value((e,t)=>{let i=l.indexOf(t),a=r[i];return n?.({type:`bar`,seriesId:a})?e[t]??0:0}).order(()=>d).offset(a)(o);r.forEach((e,r)=>{let{dataKey:a,valueGetter:o}=i[e],c;c=o?t.map(e=>o(e)):a?t.map(e=>{let t=e[a];return typeof t==`number`?t:null}):i[e].data;let l=!n?.({type:`bar`,seriesId:e});s[e]=q({layout:`vertical`,labelMarkType:`square`,minBarSize:0,valueFormatter:i[e].valueFormatter??HZ},i[e],{data:c,hidden:l,stackedData:u[r],visibleStackedData:f[r]})})}),{seriesOrder:r,stackingGroups:a,series:s}};function WZ(e,t,n){let{seriesOrder:r,series:i}=t;return r.reduce((t,r)=>{let a=wG(i[r].label,`legend`);return a===void 0||t.push({type:e,markType:i[r].labelMarkType??n,seriesId:r,color:i[r].color,label:a}),t},[])}var GZ=e=>WZ(`bar`,e),KZ=(e,t,n)=>{let r=e.layout===`vertical`;return GU({series:e,valueColorScale:r?n?.colorScale:t?.colorScale,categoryColorScale:r?t?.colorScale:n?.colorScale,categoryValues:r?t?.data:n?.data})};function qZ(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{let n=e[t];return n.seriesOrder.filter(e=>{let t=n.series[e];return`hidden`in t&&t.hidden?!1:t.data.length>0&&t.data.some(e=>e!=null)}).map(e=>({type:t,seriesId:e}))})}function JZ(e,t,n,r){let i=qZ(e,t);if(i.length===0)return null;let a=n!==void 0&&r!==void 0?i.findIndex(e=>e.type===n&&e.seriesId===r):-1;return a<=0?i[i.length-1]:i[(a-1+i.length)%i.length]}function YZ(e,t){return Object.keys(e).filter(e=>t.has(e)).flatMap(t=>{let n=e[t];return n.seriesOrder.filter(e=>{let t=n.series[e];return`hidden`in t&&t.hidden?!1:t.data.length>0&&t.data.some(e=>e!=null&&!(typeof e==`object`&&`hidden`in e&&e.hidden))}).map(e=>n.series[e].data.length)}).reduce((e,t)=>Math.max(e,t),0)}function XZ(e,t,n,r){let i=qZ(e,t);return i.length===0?null:i[((n!==void 0&&r!==void 0?i.findIndex(e=>e.type===n&&e.seriesId===r):-1)+1)%i.length]}function ZZ({processedSeries:e,type:t,seriesId:n,startIndex:r,dataLength:i,direction:a,allowCycles:o}){if(i<=0)return null;let s=e[t]?.series[n];if(s&&`hidden`in s&&s.hidden)return null;let c=s?.data,l=e=>{if(!c)return!1;let t=c[e];return typeof t==`object`&&!!t&&`hidden`in t&&!!t.hidden},u=r;for(let e=0;e=0&&u=i)return null;u=e}}return null}function QZ(e,t,n){if(t===`sankey`)return!1;let r=e[t]?.series[n]?.data;return r!=null&&r.length>0}function $Z(e,t,n){let r=e[t]?.series[n];return!!(r&&`hidden`in r&&r.hidden)}function eQ(e,t=!1,n=!0){return function(r,i){let a=nP(i),o=r?.seriesId,s=r?.type;if(!s||o==null||!QZ(a,s,o)||$Z(a,s,o)){let t=XZ(a,e,s,o);if(t===null)return null;s=t.type,o=t.seriesId}let c=n?a[s]?.series[o]?.data.length??0:YZ(a,e),l=r?.dataIndex==null?0:r.dataIndex+1;t?l%=c:l=Math.min(c-1,l);let u=ZZ({processedSeries:a,type:s,seriesId:o,startIndex:l,dataLength:c,direction:1,allowCycles:t});return u===null?null:{type:s,seriesId:o,dataIndex:u}}}function tQ(e,t=!1,n=!0){return function(r,i){let a=nP(i),o=r?.seriesId,s=r?.type;if(!s||o==null||!QZ(a,s,o)||$Z(a,s,o)){let t=JZ(a,e,s,o);if(t===null)return null;s=t.type,o=t.seriesId}let c=n?a[s]?.series[o]?.data.length??0:YZ(a,e),l=r?.dataIndex==null?c-1:r.dataIndex-1;l=t?(c+l)%c:Math.max(0,l);let u=ZZ({processedSeries:a,type:s,seriesId:o,startIndex:l,dataLength:c,direction:-1,allowCycles:t});return u===null?null:{type:s,seriesId:o,dataIndex:u}}}function nQ(e){return function(t,n){let r=nP(n),i=t?.seriesId,a=t?.type,o=XZ(r,e,a,i);if(o===null)return null;a=o.type,i=o.seriesId;let s=r[a].series[i].data,c=t?.dataIndex==null?0:Math.min(t.dataIndex,s.length-1),l=ZZ({processedSeries:r,type:a,seriesId:i,startIndex:c,dataLength:s.length,direction:1,allowCycles:!0});return l===null?null:{type:a,seriesId:i,dataIndex:l}}}function rQ(e){return function(t,n){let r=nP(n),i=t?.seriesId,a=t?.type,o=JZ(r,e,a,i);if(o===null)return null;a=o.type,i=o.seriesId;let s=r[a].series[i].data,c=t?.dataIndex==null?s.length-1:Math.min(t.dataIndex,s.length-1),l=ZZ({processedSeries:r,type:a,seriesId:i,startIndex:c,dataLength:s.length,direction:-1,allowCycles:!0});return l===null?null:{type:a,seriesId:i,dataIndex:l}}}function iQ(e,t,n){return r=>{switch(r.key){case`ArrowRight`:return eQ(e,t,n);case`ArrowLeft`:return tQ(e,t,n);case`ArrowDown`:return rQ(e);case`ArrowUp`:return nQ(e);default:return null}}}var aQ=iQ(kG,!1,!1);function oQ(e,t={}){let{series:n,getColor:r,identifier:i}=e;if(!i||i.dataIndex===void 0)return null;let a=wG(n.label,`tooltip`),o=n.data[i.dataIndex];if(t.skipNullValues&&o==null)return null;let s=n.valueFormatter(o,{dataIndex:i.dataIndex});return q({identifier:i,color:r(i.dataIndex),label:a,value:o,formattedValue:s,markType:n.labelMarkType},t.includeMarkShape&&`showMark`in n&&{markShape:n.showMark?n.shape:void 0})}var sQ=e=>oQ(e,{skipNullValues:!0}),cQ=e=>Object.values(e).map(e=>e.layout===`horizontal`?{direction:`y`,axisId:e.yAxisId}:{direction:`x`,axisId:e.xAxisId});function lQ(e,t,n){let r=e&&t>0||!e&&t<0;return n?!r:r}function uQ(e){let{verticalLayout:t,xAxisConfig:n,yAxisConfig:r,series:i,numberOfGroups:a}=e,o=t?n:r,s=(t?r.reverse:n.reverse)??!1,{barWidth:c,offset:l}=gR(o.scale.bandwidth(),a,o.barGapRatio),u=n.scale,d=r.scale;return function(e,n){let r=n*(c+l),a=o.data[e],f=i.data[e];if(f==null)return null;let[p,m]=MZ(i.visibleStackedData[e].map(e=>t?d(e):u(e))).map(e=>Math.round(e)),h=0;f!==0&&(i.hidden||(h=Math.max(i.minBarSize,m-p)));let g=lQ(t,f,s),_=0;return _=g?m-h:p,{x:t?u(a)+r:_,y:t?_:d(a)+r,height:t?h:c,width:t?c:h}}}var dQ=$(UR,nP,fL,pL,function(e,t,n,r,i){if(!e||e.type!==`bar`||e.dataIndex===void 0)return null;let a=t.bar?.series[e.seriesId];if(!t.bar||!a)return null;let o=n.axis[a.xAxisId??n.axisIds[0]],s=r.axis[a.yAxisId??r.axisIds[0]];if(!o||!s)return null;let c=t.bar.stackingGroups.findIndex(e=>e.ids.includes(a.id)),l=uQ({verticalLayout:a.layout===`vertical`,xAxisConfig:o,yAxisConfig:s,series:a,numberOfGroups:t.bar.stackingGroups.length})(e.dataIndex,c);if(l==null)return null;let{x:u,y:d,width:f,height:p}=l;switch(i){case`right`:return{x:u+f,y:d+p/2};case`bottom`:return{x:u+f/2,y:d+p};case`left`:return{x:u,y:d+p/2};default:return{x:u+f/2,y:d}}});function fQ(e,t,n){return q({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length]})}var pQ=e=>`Type(${e})`,mQ=e=>`Series(${e})`,hQ=e=>e===void 0?``:`Index(${e})`,gQ=e=>`${pQ(e.type)}${mQ(e.seriesId)}${hQ(e.dataIndex)}`,_Q=e=>({type:e.type,seriesId:e.seriesId,dataIndex:e.dataIndex}),vQ={seriesProcessor:UZ,colorProcessor:KZ,legendGetter:GZ,tooltipGetter:sQ,selectorTooltipItemPosition:dQ,axisTooltipGetter:cQ,xExtremumGetter:IZ,yExtremumGetter:LZ,getSeriesWithDefaultValues:fQ,getItemAtPosition:yR,identifierSerializer:gQ,identifierCleaner:_Q,descriptionGetter:e=>{let{identifier:t,series:n,xAxis:r,yAxis:i,localeText:a}=e,o=wG(n.label,`tooltip`),s=n.data[t.dataIndex]??null,c=n.layout===`horizontal`?i:r,l=c.data?.[t.dataIndex]??null,u=n.valueFormatter(s,{dataIndex:t.dataIndex}),d=c.valueFormatter?.(l,{location:`tooltip`,scale:c.scale});return a.barDescription({value:s,formattedValue:u??``,categoryValue:l,formattedCategoryValue:d??``,seriesLabel:o})},keyboardFocusHandler:aQ,isHighlightedCreator:fz,isFadedCreator:mz},yQ=e=>{let{axis:t}=e;return MZ(t.data??[])};function bQ(e,t,n,r){return n.reduce((n,i,a)=>{if(t[a]===null)return n;let[o,s]=e(i);return r&&(!r({y:o,x:null},a)||!r({y:s,x:null},a))?n:[Math.min(o,s,n[0]),Math.max(o,s,n[1])]},[1/0,-1/0])}var xQ=e=>{let{series:t,axis:n,isDefaultAxis:r,getFilters:i}=e;return Object.keys(t).filter(e=>{if(n.domainSeries===`visible`&&t[e].hidden)return!1;let i=t[e].yAxisId;return i===n.id||r&&i===void 0}).reduce((e,a)=>{let{area:o,stackedData:s,visibleStackedData:c,data:l}=t[a],u=o!==void 0,d=i?.({currentAxisId:n.id,isDefaultAxis:r,seriesXAxisId:t[a].xAxisId,seriesYAxisId:t[a].yAxisId}),[f,p]=bQ(u&&n.scaleType!==`log`&&typeof t[a].baseline!=`string`?e=>e:e=>[e[1],e[1]],l,n.domainSeries===`visible`?c:s,d);return[Math.min(f,e[0]),Math.max(p,e[1])]},[1/0,-1/0])},SQ=[`circle`,`square`,`diamond`,`cross`,`star`,`triangle`,`wye`],CQ=e=>e==null?``:e.toLocaleString();function wQ(e,t,n,r){let{seriesOrder:i,series:a}=e,o=VZ(q({},e,{defaultStrategy:{stackOffset:`none`}})),s=new Map,c=t??[];i.forEach((e,n)=>{s.set(e,n);let r=a[e].data;r===void 0?a[e].valueGetter&&t&&t.forEach((t,n)=>{let r=a[e].valueGetter(t);c.length<=n?c.push({[e]:r}):c[n][e]=r}):r.forEach((t,n)=>{c.length<=n?c.push({[e]:t}):c[n][e]=t})});let l={};return o.forEach(e=>{let{ids:i,stackingOffset:o,stackingOrder:u}=e,d=i.map(e=>{let t=a[e].dataKey;return a[e].data===void 0&&t!==void 0?t:e}),f=yH().keys(d).value((e,t)=>e[t]??0).order(u).offset(o)(c),p=f.map(e=>e.index),m=yH().keys(d).value((e,t)=>{let a=d.indexOf(t),o=i[a];return n?.({type:r,seriesId:o})?e[t]??0:0}).order(()=>p).offset(o)(c);i.forEach((e,i)=>{let{dataKey:o,valueGetter:c}=a[e],u;u=c?t.map(e=>c(e)):o?t.map(e=>{let t=e[o];return typeof t==`number`?t:null}):a[e].data;let d=!n?.({type:r,seriesId:e});l[e]=q({labelMarkType:`line+mark`},a[e],{shape:a[e].shape??SQ[(s.get(e)??0)%SQ.length],data:u,valueFormatter:a[e].valueFormatter??CQ,hidden:d,stackedData:f[i],visibleStackedData:m[i]})})}),{seriesOrder:i,stackingGroups:o,series:l}}var TQ=(e,t,n)=>wQ(e,t,n,`line`),EQ=e=>{let{seriesOrder:t,series:n}=e;return t.reduce((e,t)=>{let r=wG(n[t].label,`legend`);return r===void 0||e.push({type:`line`,markType:n[t].labelMarkType,markShape:n[t].showMark?n[t].shape??`circle`:void 0,seriesId:t,color:n[t].color,label:r}),e},[])},DQ=e=>oQ(e,{includeMarkShape:!0}),OQ=e=>Object.values(e).map(e=>({direction:`x`,axisId:e.xAxisId})),kQ=(e,t,n)=>q({},e,{id:e.id??`auto-generated-id-${t}`,color:e.color??n[t%n.length],curve:e.curve??`monotoneX`}),AQ=$(UR,nP,fL,pL,function(e,t,n,r){if(!e||e.type!==`line`||e.dataIndex===void 0)return null;let i=t.line?.series[e.seriesId];if(i==null)return null;let a=n.axis[i.xAxisId??n.axisIds[0]],o=r.axis[i.yAxisId??r.axisIds[0]];if(a===void 0||o===void 0)return null;let s=a.data?.[e.dataIndex],c=i.data[e.dataIndex]==null?null:i.visibleStackedData[e.dataIndex][1];return s==null||c==null?null:{x:a.scale(s),y:o.scale(c)}});function jQ(e){return`cpx1`in e}var MQ=class{segments=[];cx=0;cy=0;moveTo(e,t){this.cx=e,this.cy=t}lineTo(e,t){this.segments.push({x0:this.cx,y0:this.cy,x1:e,y1:t}),this.cx=e,this.cy=t}bezierCurveTo(e,t,n,r,i,a){this.segments.push({x0:this.cx,y0:this.cy,cpx1:e,cpy1:t,cpx2:n,cpy2:r,x1:i,y1:a}),this.cx=i,this.cy=a}closePath(){}};function NQ(e,t){let n=e.x1-e.x0;if(n===0)return e.y0;let r=e.y1-e.y0;if(!jQ(e))return e.y0+r*(t-e.x0)/n;let i=(e.cpx1-e.x0)/n,a=(e.cpx2-e.x0)/n,o=Sz(i,r===0?0:(e.cpy1-e.y0)/r,a,r===0?0:(e.cpy2-e.y0)/r),s=(t-e.x0)/n;return e.y0+r*o(s)}function PQ(e,t,n){if(e.length===0)return null;if(e.length===1)return e[0].y;let r=new MQ,i=vU(n)(r),a=e[0].x>t,o=0,s=!1;i.lineStart();for(let n of e)!s&&n.x>t!==a&&(o=Math.max(0,r.segments.length-1),s=!0),i.point(n.x,n.y);i.lineEnd();for(let e=o;en.x0-.5)return n.y0;if(t