anarock-widgets 1.0.11 → 1.0.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -27,7 +27,7 @@ Check the top-level render call using <`+q+">.")}return z}}function tA(P,z){{if(
27
27
  <%s {...props} />
28
28
  React keys must be passed directly to JSX without using spread:
29
29
  let props = %s;
30
- <%s key={someKey} {...props} />`,gm,yi,pU,yi),nA[yi+gm]=!0}}return P===n?cU(ot):lU(ot),ot}}function uU(P,z,q){return iA(P,z,q,!0)}function fU(P,z,q){return iA(P,z,q,!1)}var dU=fU,hU=uU;sa.Fragment=n,sa.jsx=dU,sa.jsxs=hU})()),sa}var bm;function cA(){return bm||(bm=1,process.env.NODE_ENV==="production"?Lo.exports=sA():Lo.exports=lA()),Lo.exports}var y=cA();const me=({title:e,icon:t,period:r,children:n,footer:i,className:a="",childrenClassName:o,titleWeight:s})=>{const l=s==="semi-bold"?600:500;return y.jsxs("div",{className:`relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-xl !shadow-[0_0_12px_0_#EAF2FF] p-4 flex flex-col gap-6 ${a}`,children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[t,y.jsx("div",{style:{fontWeight:l,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),r&&y.jsx("div",{className:"!text-xs !leading-[16px] !text-[#64748B]",children:r})]}),y.jsx("div",{className:`flex-1 min-h-0 space-y-6 ${o}`,children:n}),i&&y.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 text-xs text-[#64748B]",children:i})]})},xm=e=>e,uA=(()=>{let e=xm;return{configure(t){e=t},generate(t){return e(t)},reset(){e=xm}}})();function sn(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function Nn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":sn(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Fo={exports:{}},Bo={exports:{}},we={};/** @license React v16.13.1
30
+ <%s key={someKey} {...props} />`,gm,yi,pU,yi),nA[yi+gm]=!0}}return P===n?cU(ot):lU(ot),ot}}function uU(P,z,q){return iA(P,z,q,!0)}function fU(P,z,q){return iA(P,z,q,!1)}var dU=fU,hU=uU;sa.Fragment=n,sa.jsx=dU,sa.jsxs=hU})()),sa}var bm;function cA(){return bm||(bm=1,process.env.NODE_ENV==="production"?Lo.exports=sA():Lo.exports=lA()),Lo.exports}var y=cA();const me=({title:e,icon:t,period:r,children:n,footer:i,className:a="",childrenClassName:o,titleWeight:s})=>{const l=s==="semi-bold"?600:500;return y.jsxs("div",{className:`relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] flex flex-col gap-[24px] ${a}`,children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,y.jsx("div",{style:{fontWeight:l,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),r&&y.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:r})]}),y.jsx("div",{className:`flex-1 min-h-0 space-y-[24px] ${o}`,children:n}),i&&y.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:i})]})},xm=e=>e,uA=(()=>{let e=xm;return{configure(t){e=t},generate(t){return e(t)},reset(){e=xm}}})();function sn(e,...t){const r=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(n=>r.searchParams.append("args[]",n)),`Minified MUI error #${e}; visit ${r} for the full message.`}function Nn(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":sn(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Fo={exports:{}},Bo={exports:{}},we={};/** @license React v16.13.1
31
31
  * react-is.production.min.js
32
32
  *
33
33
  * Copyright (c) Facebook, Inc. and its affiliates.
@@ -100,7 +100,7 @@ theme.transitions = createTransitions(theme.transitions || {});
100
100
 
101
101
  export default theme;`}function Mg(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const sC=e=>{if(!Number.isNaN(+e))return+e;const t=e.match(/\d*\.?\d+/g);if(!t)return 0;let r=0;for(let n=0;n<t.length;n+=1)r+=+t[n];return r};function lC(e){Object.assign(e,{alpha(t,r){const n=this||e;return n.colorSpace?`oklch(from ${t} l c h / ${typeof r=="string"?`calc(${r})`:r})`:n.vars?`rgba(${t.replace(/var\(--([^,\s)]+)(?:,[^)]+)?\)+/g,"var(--$1Channel)")} / ${typeof r=="string"?`calc(${r})`:r})`:bg(t,sC(r))},lighten(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${Mg(r)})`:us(t,r)},darken(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${Mg(r)})`:cs(t,r)}})}function au(e={},...t){const{breakpoints:r,mixins:n={},spacing:i,palette:a={},transitions:o={},typography:s={},shape:l,colorSpace:c,...u}=e;if(e.vars&&e.generateThemeVars===void 0)throw new Error(process.env.NODE_ENV!=="production"?"MUI: `vars` is a private field used for CSS variables support.\nPlease use another name or follow the [docs](https://mui.com/material-ui/customization/css-theme-variables/usage/) to enable the feature.":sn(20));const f=iu({...a,colorSpace:c}),d=fg(e);let h=Wt(d,{mixins:YP(d.breakpoints,n),palette:f,shadows:eC.slice(),typography:XP(f,s),transitions:iC(o),zIndex:{...aC}});if(h=Wt(h,u),h=t.reduce((m,p)=>Wt(m,p),h),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],p=(g,v)=>{let b;for(b in g){const x=g[b];if(m.includes(b)&&Object.keys(x).length>0){if(process.env.NODE_ENV!=="production"){const S=Zc("",b);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${b}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${S}' syntax:`,JSON.stringify({root:{[`&.${S}`]:x}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
102
102
  `))}g[b]={}}}};Object.keys(h.components).forEach(g=>{const v=h.components[g].styleOverrides;v&&g.startsWith("Mui")&&p(v,g)})}return h.unstable_sxConfig={...Jo,...u?.unstable_sxConfig},h.unstable_sx=function(p){return xi({sx:p,theme:this})},h.toRuntimeSource=Tg,lC(h),h}function cC(e){let t;return e<1?t=5.11916*e**2:t=4.5*Math.log(e+1)+2,Math.round(t*10)/1e3}const uC=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=cC(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function jg(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function Dg(e){return e==="dark"?uC:[]}function fC(e){const{palette:t={mode:"light"},opacity:r,overlays:n,colorSpace:i,...a}=e,o=iu({...t,colorSpace:i});return{palette:o,opacity:{...jg(o.mode),...r},overlays:n||Dg(o.mode),...a}}function dC(e){return!!e[0].match(/(cssVarPrefix|colorSchemeSelector|modularCssLayers|rootSelector|typography|mixins|breakpoints|direction|transitions)/)||!!e[0].match(/sxConfig$/)||e[0]==="palette"&&!!e[1]?.match(/(mode|contrastThreshold|tonalOffset)/)}const hC=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],pC=e=>(t,r)=>{const n=e.rootSelector||":root",i=e.colorSchemeSelector;let a=i;if(i==="class"&&(a=".%s"),i==="data"&&(a="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(a=`[${i}="%s"]`),e.defaultColorScheme===t){if(t==="dark"){const o={};return hC(e.cssVarPrefix).forEach(s=>{o[s]=r[s],delete r[s]}),a==="media"?{[n]:r,"@media (prefers-color-scheme: dark)":{[n]:o}}:a?{[a.replace("%s",t)]:o,[`${n}, ${a.replace("%s",t)}`]:r}:{[n]:{...r,...o}}}if(a&&a!=="media")return`${n}, ${a.replace("%s",String(t))}`}else if(t){if(a==="media")return{[`@media (prefers-color-scheme: ${String(t)})`]:{[n]:r}};if(a)return a.replace("%s",String(t))}return n};function mC(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function R(e,t,r){!e[t]&&r&&(e[t]=r)}function xa(e){return typeof e!="string"||!e.startsWith("hsl")?e:vg(e)}function Lr(e,t){`${t}Channel`in e||(e[`${t}Channel`]=va(xa(e[t]),`MUI: Can't create \`palette.${t}Channel\` because \`palette.${t}\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().
103
- To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function gC(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Sr=e=>{try{return e()}catch{}},vC=(e="mui")=>NP(e);function ou(e,t,r,n,i){if(!r)return;r=r===!0?{}:r;const a=i==="dark"?"dark":"light";if(!n){t[i]=fC({...r,palette:{mode:a,...r?.palette},colorSpace:e});return}const{palette:o,...s}=au({...n,palette:{mode:a,...r?.palette},colorSpace:e});return t[i]={...r,palette:o,opacity:{...jg(a),...r?.opacity},overlays:r?.overlays||Dg(a)},s}function yC(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=dC,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=e,f=Object.keys(r)[0],d=n||(r.light&&f!=="light"?"light":f),h=vC(a),{[d]:m,light:p,dark:g,...v}=r,b={...v};let x=m;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(x=!0),!x)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:sn(21,d));let S;o&&(S="oklch");const w=ou(S,b,x,u,d);p&&!b.light&&ou(S,b,p,void 0,"light"),g&&!b.dark&&ou(S,b,g,void 0,"dark");let O={defaultColorScheme:d,...w,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:h,colorSchemes:b,font:{...qP(w.typography),...w.font},spacing:gC(u.spacing)};Object.keys(O.colorSchemes).forEach(j=>{const _=O.colorSchemes[j].palette,I=L=>{const W=L.split("-"),H=W[1],te=W[2];return h(L,_[H][te])};_.mode==="light"&&(R(_.common,"background","#fff"),R(_.common,"onBackground","#000")),_.mode==="dark"&&(R(_.common,"background","#000"),R(_.common,"onBackground","#fff"));function D(L,W,H){if(S){let te;return L===Rn&&(te=`transparent ${((1-H)*100).toFixed(0)}%`),L===Ae&&(te=`#000 ${(H*100).toFixed(0)}%`),L===Ee&&(te=`#fff ${(H*100).toFixed(0)}%`),`color-mix(in ${S}, ${W}, ${te})`}return L(W,H)}if(mC(_,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),_.mode==="light"){R(_.Alert,"errorColor",D(Ae,_.error.light,.6)),R(_.Alert,"infoColor",D(Ae,_.info.light,.6)),R(_.Alert,"successColor",D(Ae,_.success.light,.6)),R(_.Alert,"warningColor",D(Ae,_.warning.light,.6)),R(_.Alert,"errorFilledBg",I("palette-error-main")),R(_.Alert,"infoFilledBg",I("palette-info-main")),R(_.Alert,"successFilledBg",I("palette-success-main")),R(_.Alert,"warningFilledBg",I("palette-warning-main")),R(_.Alert,"errorFilledColor",Sr(()=>_.getContrastText(_.error.main))),R(_.Alert,"infoFilledColor",Sr(()=>_.getContrastText(_.info.main))),R(_.Alert,"successFilledColor",Sr(()=>_.getContrastText(_.success.main))),R(_.Alert,"warningFilledColor",Sr(()=>_.getContrastText(_.warning.main))),R(_.Alert,"errorStandardBg",D(Ee,_.error.light,.9)),R(_.Alert,"infoStandardBg",D(Ee,_.info.light,.9)),R(_.Alert,"successStandardBg",D(Ee,_.success.light,.9)),R(_.Alert,"warningStandardBg",D(Ee,_.warning.light,.9)),R(_.Alert,"errorIconColor",I("palette-error-main")),R(_.Alert,"infoIconColor",I("palette-info-main")),R(_.Alert,"successIconColor",I("palette-success-main")),R(_.Alert,"warningIconColor",I("palette-warning-main")),R(_.AppBar,"defaultBg",I("palette-grey-100")),R(_.Avatar,"defaultBg",I("palette-grey-400")),R(_.Button,"inheritContainedBg",I("palette-grey-300")),R(_.Button,"inheritContainedHoverBg",I("palette-grey-A100")),R(_.Chip,"defaultBorder",I("palette-grey-400")),R(_.Chip,"defaultAvatarColor",I("palette-grey-700")),R(_.Chip,"defaultIconColor",I("palette-grey-700")),R(_.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),R(_.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),R(_.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),R(_.LinearProgress,"primaryBg",D(Ee,_.primary.main,.62)),R(_.LinearProgress,"secondaryBg",D(Ee,_.secondary.main,.62)),R(_.LinearProgress,"errorBg",D(Ee,_.error.main,.62)),R(_.LinearProgress,"infoBg",D(Ee,_.info.main,.62)),R(_.LinearProgress,"successBg",D(Ee,_.success.main,.62)),R(_.LinearProgress,"warningBg",D(Ee,_.warning.main,.62)),R(_.Skeleton,"bg",S?D(Rn,_.text.primary,.11):`rgba(${I("palette-text-primaryChannel")} / 0.11)`),R(_.Slider,"primaryTrack",D(Ee,_.primary.main,.62)),R(_.Slider,"secondaryTrack",D(Ee,_.secondary.main,.62)),R(_.Slider,"errorTrack",D(Ee,_.error.main,.62)),R(_.Slider,"infoTrack",D(Ee,_.info.main,.62)),R(_.Slider,"successTrack",D(Ee,_.success.main,.62)),R(_.Slider,"warningTrack",D(Ee,_.warning.main,.62));const L=S?D(Ae,_.background.default,.6825):fs(_.background.default,.8);R(_.SnackbarContent,"bg",L),R(_.SnackbarContent,"color",Sr(()=>S?nu.text.primary:_.getContrastText(L))),R(_.SpeedDialAction,"fabHoverBg",fs(_.background.paper,.15)),R(_.StepConnector,"border",I("palette-grey-400")),R(_.StepContent,"border",I("palette-grey-400")),R(_.Switch,"defaultColor",I("palette-common-white")),R(_.Switch,"defaultDisabledColor",I("palette-grey-100")),R(_.Switch,"primaryDisabledColor",D(Ee,_.primary.main,.62)),R(_.Switch,"secondaryDisabledColor",D(Ee,_.secondary.main,.62)),R(_.Switch,"errorDisabledColor",D(Ee,_.error.main,.62)),R(_.Switch,"infoDisabledColor",D(Ee,_.info.main,.62)),R(_.Switch,"successDisabledColor",D(Ee,_.success.main,.62)),R(_.Switch,"warningDisabledColor",D(Ee,_.warning.main,.62)),R(_.TableCell,"border",D(Ee,D(Rn,_.divider,1),.88)),R(_.Tooltip,"bg",D(Rn,_.grey[700],.92))}if(_.mode==="dark"){R(_.Alert,"errorColor",D(Ee,_.error.light,.6)),R(_.Alert,"infoColor",D(Ee,_.info.light,.6)),R(_.Alert,"successColor",D(Ee,_.success.light,.6)),R(_.Alert,"warningColor",D(Ee,_.warning.light,.6)),R(_.Alert,"errorFilledBg",I("palette-error-dark")),R(_.Alert,"infoFilledBg",I("palette-info-dark")),R(_.Alert,"successFilledBg",I("palette-success-dark")),R(_.Alert,"warningFilledBg",I("palette-warning-dark")),R(_.Alert,"errorFilledColor",Sr(()=>_.getContrastText(_.error.dark))),R(_.Alert,"infoFilledColor",Sr(()=>_.getContrastText(_.info.dark))),R(_.Alert,"successFilledColor",Sr(()=>_.getContrastText(_.success.dark))),R(_.Alert,"warningFilledColor",Sr(()=>_.getContrastText(_.warning.dark))),R(_.Alert,"errorStandardBg",D(Ae,_.error.light,.9)),R(_.Alert,"infoStandardBg",D(Ae,_.info.light,.9)),R(_.Alert,"successStandardBg",D(Ae,_.success.light,.9)),R(_.Alert,"warningStandardBg",D(Ae,_.warning.light,.9)),R(_.Alert,"errorIconColor",I("palette-error-main")),R(_.Alert,"infoIconColor",I("palette-info-main")),R(_.Alert,"successIconColor",I("palette-success-main")),R(_.Alert,"warningIconColor",I("palette-warning-main")),R(_.AppBar,"defaultBg",I("palette-grey-900")),R(_.AppBar,"darkBg",I("palette-background-paper")),R(_.AppBar,"darkColor",I("palette-text-primary")),R(_.Avatar,"defaultBg",I("palette-grey-600")),R(_.Button,"inheritContainedBg",I("palette-grey-800")),R(_.Button,"inheritContainedHoverBg",I("palette-grey-700")),R(_.Chip,"defaultBorder",I("palette-grey-700")),R(_.Chip,"defaultAvatarColor",I("palette-grey-300")),R(_.Chip,"defaultIconColor",I("palette-grey-300")),R(_.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),R(_.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),R(_.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),R(_.LinearProgress,"primaryBg",D(Ae,_.primary.main,.5)),R(_.LinearProgress,"secondaryBg",D(Ae,_.secondary.main,.5)),R(_.LinearProgress,"errorBg",D(Ae,_.error.main,.5)),R(_.LinearProgress,"infoBg",D(Ae,_.info.main,.5)),R(_.LinearProgress,"successBg",D(Ae,_.success.main,.5)),R(_.LinearProgress,"warningBg",D(Ae,_.warning.main,.5)),R(_.Skeleton,"bg",S?D(Rn,_.text.primary,.13):`rgba(${I("palette-text-primaryChannel")} / 0.13)`),R(_.Slider,"primaryTrack",D(Ae,_.primary.main,.5)),R(_.Slider,"secondaryTrack",D(Ae,_.secondary.main,.5)),R(_.Slider,"errorTrack",D(Ae,_.error.main,.5)),R(_.Slider,"infoTrack",D(Ae,_.info.main,.5)),R(_.Slider,"successTrack",D(Ae,_.success.main,.5)),R(_.Slider,"warningTrack",D(Ae,_.warning.main,.5));const L=S?D(Ee,_.background.default,.985):fs(_.background.default,.98);R(_.SnackbarContent,"bg",L),R(_.SnackbarContent,"color",Sr(()=>S?Sg.text.primary:_.getContrastText(L))),R(_.SpeedDialAction,"fabHoverBg",fs(_.background.paper,.15)),R(_.StepConnector,"border",I("palette-grey-600")),R(_.StepContent,"border",I("palette-grey-600")),R(_.Switch,"defaultColor",I("palette-grey-300")),R(_.Switch,"defaultDisabledColor",I("palette-grey-600")),R(_.Switch,"primaryDisabledColor",D(Ae,_.primary.main,.55)),R(_.Switch,"secondaryDisabledColor",D(Ae,_.secondary.main,.55)),R(_.Switch,"errorDisabledColor",D(Ae,_.error.main,.55)),R(_.Switch,"infoDisabledColor",D(Ae,_.info.main,.55)),R(_.Switch,"successDisabledColor",D(Ae,_.success.main,.55)),R(_.Switch,"warningDisabledColor",D(Ae,_.warning.main,.55)),R(_.TableCell,"border",D(Ae,D(Rn,_.divider,1),.68)),R(_.Tooltip,"bg",D(Rn,_.grey[700],.92))}Lr(_.background,"default"),Lr(_.background,"paper"),Lr(_.common,"background"),Lr(_.common,"onBackground"),Lr(_,"divider"),Object.keys(_).forEach(L=>{const W=_[L];L!=="tonalOffset"&&W&&typeof W=="object"&&(W.main&&R(_[L],"mainChannel",va(xa(W.main))),W.light&&R(_[L],"lightChannel",va(xa(W.light))),W.dark&&R(_[L],"darkChannel",va(xa(W.dark))),W.contrastText&&R(_[L],"contrastTextChannel",va(xa(W.contrastText))),L==="text"&&(Lr(_[L],"primary"),Lr(_[L],"secondary")),L==="action"&&(W.active&&Lr(_[L],"active"),W.selected&&Lr(_[L],"selected")))})}),O=t.reduce((j,_)=>Wt(j,_),O);const E={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:pC(O),enableContrastVars:o},{vars:C,generateThemeVars:M,generateStyleSheets:$}=RP(O,E);return O.vars=C,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([j,_])=>{O[j]=_}),O.generateThemeVars=M,O.generateStyleSheets=$,O.generateSpacing=function(){return ug(u.spacing,zc(this))},O.getColorSchemeSelector=LP(l),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=s,O.unstable_sxConfig={...Jo,...u?.unstable_sxConfig},O.unstable_sx=function(_){return xi({sx:_,theme:this})},O.toRuntimeSource=Tg,O}function Ng(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:iu({...r===!0?{}:r.palette,mode:t})})}function bC(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r?.mode,...o}=e,s=a||"light",l=i?.[s],c={...i,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return au(e,...t);let u=r;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const f=au({...e,palette:u},...t);return f.defaultColorScheme=s,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},Ng(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},Ng(f,"light",c.light)),f}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),yC({...o,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const xC=bC(),wC="$$material";function _C(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const SC=wP({themeId:wC,defaultTheme:xC,rootShouldForwardProp:e=>_C(e)&&e!=="classes"}),OC=DP;process.env.NODE_ENV!=="production"&&(ge.node,ge.object.isRequired);function AC(e){return jP(e)}function EC(e){return Zc("MuiSvgIcon",e)}gP("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const PC=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${Nn(t)}`,`fontSize${Nn(r)}`]};return bA(i,EC,n)},CC=SC("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Nn(r.color)}`],t[`fontSize${Nn(r.fontSize)}`]]}})(OC(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.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(([,t])=>t&&t.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}}]}))),ds=A.forwardRef(function(t,r){const n=AC({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:d="0 0 24 24",...h}=n,m=A.isValidElement(i)&&i.type==="svg",p={...n,color:o,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:d,hasSvgAsChild:m},g={};u||(g.viewBox=d);const v=PC(p);return y.jsxs(CC,{as:s,className:de(v.root,a),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...g,...h,...m&&i.props,ownerState:p,children:[m?i.props.children:i,f?y.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(ds.propTypes={children:ge.node,classes:ge.object,className:ge.string,color:ge.oneOfType([ge.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ge.string]),component:ge.elementType,fontSize:ge.oneOfType([ge.oneOf(["inherit","large","medium","small"]),ge.string]),htmlColor:ge.string,inheritViewBox:ge.bool,shapeRendering:ge.string,sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object]),titleAccess:ge.string,viewBox:ge.string}),ds.muiName="SvgIcon";function hs(e,t){function r(n,i){return y.jsx(ds,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=ds.muiName,A.memo(A.forwardRef(r))}const kC=hs(y.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V10h16zm0-13H4V5h16z"}),"CalendarTodayOutlined"),wa=hs(y.jsx("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"}),"DescriptionOutlined"),TC=hs(y.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),ht=hs(y.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNewOutlined");var Ig={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},$g=k.createContext&&k.createContext(Ig),MC=["attr","size","title"];function jC(e,t){if(e==null)return{};var r=DC(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DC(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ps(){return ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ps.apply(this,arguments)}function Rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ms(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rg(Object(r),!0).forEach(function(n){NC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NC(e,t,r){return t=IC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IC(e){var t=$C(e,"string");return typeof t=="symbol"?t:t+""}function $C(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lg(e){return e&&e.map((t,r)=>k.createElement(t.tag,ms({key:r},t.attr),Lg(t.child)))}function Re(e){return t=>k.createElement(RC,ps({attr:ms({},e.attr)},t),Lg(e.child))}function RC(e){var t=r=>{var{attr:n,size:i,title:a}=e,o=jC(e,MC),s=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),k.createElement("svg",ps({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:l,style:ms(ms({color:e.color||r.color},r.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&k.createElement("title",null,a),e.children)};return $g!==void 0?k.createElement($g.Consumer,null,r=>t(r)):t(Ig)}function LC(e){return Re({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z"},child:[]}]})(e)}function FC(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"},child:[]}]})(e)}function BC(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"},child:[]}]})(e)}function zC({title:e,description:t}){return y.jsxs("div",{className:"flex items-center justify-between px-6 my-6",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-2xl text-[#121212] font-semibold",children:e}),y.jsx("div",{className:"text-gray-500 text-sm",children:t})]}),y.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3",children:[y.jsxs("div",{className:"w-full sm:w-auto flex items-center justify-center gap-2 bg-white shadow-sm px-2 md:px-6 py-1 rounded-sm text-[#64748B] text-sm hover:bg-slate-50",children:[y.jsx(kC,{fontSize:"12"}),y.jsx("div",{className:" whitespace-nowrap",children:"Last 7 Days"}),y.jsx(FC,{fontSize:"12"})]}),y.jsxs("div",{className:"w-full flex items-center justify-center gap-2 bg-white text-[#884EA7] px-2 md:px-6 py-1 rounded-sm shadow-sm hover:bg-purple-50",children:[y.jsx("div",{className:"font-medium whitespace-nowrap",children:"Export Report"}),y.jsx(TC,{fontSize:"12"})]})]})]})}function Fg(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function WC(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M192 208c0-17.67-14.33-32-32-32h-16c-35.35 0-64 28.65-64 64v48c0 35.35 28.65 64 64 64h16c17.67 0 32-14.33 32-32V208zm176 144c35.35 0 64-28.65 64-64v-48c0-35.35-28.65-64-64-64h-16c-17.67 0-32 14.33-32 32v112c0 17.67 14.33 32 32 32h16zM256 0C113.18 0 4.58 118.83 0 256v16c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-16c0-114.69 93.31-208 208-208s208 93.31 208 208h-.12c.08 2.43.12 165.72.12 165.72 0 23.35-18.93 42.28-42.28 42.28H320c0-26.51-21.49-48-48-48h-32c-26.51 0-48 21.49-48 48s21.49 48 48 48h181.72c49.86 0 90.28-40.42 90.28-90.28V256C507.42 118.83 398.82 0 256 0z"},child:[]}]})(e)}function su(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M9 22v-4h6v4"},child:[]},{tag:"path",attr:{d:"M8 6h.01"},child:[]},{tag:"path",attr:{d:"M16 6h.01"},child:[]},{tag:"path",attr:{d:"M12 6h.01"},child:[]},{tag:"path",attr:{d:"M12 10h.01"},child:[]},{tag:"path",attr:{d:"M12 14h.01"},child:[]},{tag:"path",attr:{d:"M16 10h.01"},child:[]},{tag:"path",attr:{d:"M16 14h.01"},child:[]},{tag:"path",attr:{d:"M8 10h.01"},child:[]},{tag:"path",attr:{d:"M8 14h.01"},child:[]}]})(e)}function VC(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2"},child:[]},{tag:"circle",attr:{cx:"7",cy:"17",r:"2"},child:[]},{tag:"path",attr:{d:"M9 17h6"},child:[]},{tag:"circle",attr:{cx:"17",cy:"17",r:"2"},child:[]}]})(e)}function Bg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 4h3a2 2 0 0 1 2 2v14"},child:[]},{tag:"path",attr:{d:"M2 20h3"},child:[]},{tag:"path",attr:{d:"M13 20h9"},child:[]},{tag:"path",attr:{d:"M10 12v.01"},child:[]},{tag:"path",attr:{d:"M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z"},child:[]}]})(e)}function HC(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 5h6"},child:[]},{tag:"path",attr:{d:"M19 2v6"},child:[]},{tag:"path",attr:{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5"},child:[]},{tag:"path",attr:{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"},child:[]},{tag:"circle",attr:{cx:"9",cy:"9",r:"2"},child:[]}]})(e)}function zg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Wg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z"},child:[]},{tag:"path",attr:{d:"M14 8H8"},child:[]},{tag:"path",attr:{d:"M16 12H8"},child:[]},{tag:"path",attr:{d:"M13 16H8"},child:[]}]})(e)}function Vg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"},child:[]},{tag:"path",attr:{d:"m9 12 2 2 4-4"},child:[]}]})(e)}function Hg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]},{tag:"path",attr:{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]},{tag:"path",attr:{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]}]})(e)}function UC(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"},child:[]}]})(e)}function Ug(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z"},child:[]}]})(e)}function Kg(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function qg(e){return Re({attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 2 7 L 2 24 L 30 24 L 30 7 L 2 7 z M 6 9 L 26 9 C 26 10.105 26.895 11 28 11 L 28 20 C 26.895 20 26 20.895 26 22 L 6 22 C 6 20.895 5.105 20 4 20 L 4 11 C 5.105 11 6 10.105 6 9 z M 16 11 C 13.789 11 12 13.016 12 15.5 C 12 17.984 13.789 20 16 20 C 18.211 20 20 17.984 20 15.5 C 20 13.016 18.211 11 16 11 z M 16 13 C 17.102 13 18 14.121 18 15.5 C 18 16.879 17.102 18 16 18 C 14.898 18 14 16.879 14 15.5 C 14 14.121 14.898 13 16 13 z M 8.5 14 C 7.672 14 7 14.672 7 15.5 C 7 16.328 7.672 17 8.5 17 C 9.328 17 10 16.328 10 15.5 C 10 14.672 9.328 14 8.5 14 z M 23.5 14 C 22.672 14 22 14.672 22 15.5 C 22 16.328 22.672 17 23.5 17 C 24.328 17 25 16.328 25 15.5 C 25 14.672 24.328 14 23.5 14 z"},child:[]}]})(e)}const KC=[{name:"Overview",icon:Ug},{name:"Community",icon:su},{name:"Financials",icon:qg},{name:"Facilities",icon:Bg},{name:"Gate & Security",icon:Hg},{name:"Helpdesk",icon:WC},{name:"Engagement",icon:zg}];function qC(){const[e,t]=k.useState("Overview");return y.jsx("div",{className:"flex gap-2 p-3",children:KC.map(r=>{const n=r.icon,i=e===r.name;return y.jsxs("button",{onClick:()=>t(r.name),className:`flex items-center gap-2 rounded px-4 py-3 text-sm leading-[16px] font-medium transition
103
+ To suppress this warning, you need to explicitly provide the \`palette.${t}Channel\` as a string (in rgb format, for example "12 12 12") or undefined if you want to remove the channel token.`))}function gC(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Sr=e=>{try{return e()}catch{}},vC=(e="mui")=>NP(e);function ou(e,t,r,n,i){if(!r)return;r=r===!0?{}:r;const a=i==="dark"?"dark":"light";if(!n){t[i]=fC({...r,palette:{mode:a,...r?.palette},colorSpace:e});return}const{palette:o,...s}=au({...n,palette:{mode:a,...r?.palette},colorSpace:e});return t[i]={...r,palette:o,opacity:{...jg(a),...r?.opacity},overlays:r?.overlays||Dg(a)},s}function yC(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=dC,colorSchemeSelector:l=r.light&&r.dark?"media":void 0,rootSelector:c=":root",...u}=e,f=Object.keys(r)[0],d=n||(r.light&&f!=="light"?"light":f),h=vC(a),{[d]:m,light:p,dark:g,...v}=r,b={...v};let x=m;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(x=!0),!x)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:sn(21,d));let S;o&&(S="oklch");const w=ou(S,b,x,u,d);p&&!b.light&&ou(S,b,p,void 0,"light"),g&&!b.dark&&ou(S,b,g,void 0,"dark");let O={defaultColorScheme:d,...w,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:h,colorSchemes:b,font:{...qP(w.typography),...w.font},spacing:gC(u.spacing)};Object.keys(O.colorSchemes).forEach(j=>{const _=O.colorSchemes[j].palette,I=L=>{const W=L.split("-"),H=W[1],te=W[2];return h(L,_[H][te])};_.mode==="light"&&(R(_.common,"background","#fff"),R(_.common,"onBackground","#000")),_.mode==="dark"&&(R(_.common,"background","#000"),R(_.common,"onBackground","#fff"));function D(L,W,H){if(S){let te;return L===Rn&&(te=`transparent ${((1-H)*100).toFixed(0)}%`),L===Ae&&(te=`#000 ${(H*100).toFixed(0)}%`),L===Ee&&(te=`#fff ${(H*100).toFixed(0)}%`),`color-mix(in ${S}, ${W}, ${te})`}return L(W,H)}if(mC(_,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),_.mode==="light"){R(_.Alert,"errorColor",D(Ae,_.error.light,.6)),R(_.Alert,"infoColor",D(Ae,_.info.light,.6)),R(_.Alert,"successColor",D(Ae,_.success.light,.6)),R(_.Alert,"warningColor",D(Ae,_.warning.light,.6)),R(_.Alert,"errorFilledBg",I("palette-error-main")),R(_.Alert,"infoFilledBg",I("palette-info-main")),R(_.Alert,"successFilledBg",I("palette-success-main")),R(_.Alert,"warningFilledBg",I("palette-warning-main")),R(_.Alert,"errorFilledColor",Sr(()=>_.getContrastText(_.error.main))),R(_.Alert,"infoFilledColor",Sr(()=>_.getContrastText(_.info.main))),R(_.Alert,"successFilledColor",Sr(()=>_.getContrastText(_.success.main))),R(_.Alert,"warningFilledColor",Sr(()=>_.getContrastText(_.warning.main))),R(_.Alert,"errorStandardBg",D(Ee,_.error.light,.9)),R(_.Alert,"infoStandardBg",D(Ee,_.info.light,.9)),R(_.Alert,"successStandardBg",D(Ee,_.success.light,.9)),R(_.Alert,"warningStandardBg",D(Ee,_.warning.light,.9)),R(_.Alert,"errorIconColor",I("palette-error-main")),R(_.Alert,"infoIconColor",I("palette-info-main")),R(_.Alert,"successIconColor",I("palette-success-main")),R(_.Alert,"warningIconColor",I("palette-warning-main")),R(_.AppBar,"defaultBg",I("palette-grey-100")),R(_.Avatar,"defaultBg",I("palette-grey-400")),R(_.Button,"inheritContainedBg",I("palette-grey-300")),R(_.Button,"inheritContainedHoverBg",I("palette-grey-A100")),R(_.Chip,"defaultBorder",I("palette-grey-400")),R(_.Chip,"defaultAvatarColor",I("palette-grey-700")),R(_.Chip,"defaultIconColor",I("palette-grey-700")),R(_.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),R(_.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),R(_.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),R(_.LinearProgress,"primaryBg",D(Ee,_.primary.main,.62)),R(_.LinearProgress,"secondaryBg",D(Ee,_.secondary.main,.62)),R(_.LinearProgress,"errorBg",D(Ee,_.error.main,.62)),R(_.LinearProgress,"infoBg",D(Ee,_.info.main,.62)),R(_.LinearProgress,"successBg",D(Ee,_.success.main,.62)),R(_.LinearProgress,"warningBg",D(Ee,_.warning.main,.62)),R(_.Skeleton,"bg",S?D(Rn,_.text.primary,.11):`rgba(${I("palette-text-primaryChannel")} / 0.11)`),R(_.Slider,"primaryTrack",D(Ee,_.primary.main,.62)),R(_.Slider,"secondaryTrack",D(Ee,_.secondary.main,.62)),R(_.Slider,"errorTrack",D(Ee,_.error.main,.62)),R(_.Slider,"infoTrack",D(Ee,_.info.main,.62)),R(_.Slider,"successTrack",D(Ee,_.success.main,.62)),R(_.Slider,"warningTrack",D(Ee,_.warning.main,.62));const L=S?D(Ae,_.background.default,.6825):fs(_.background.default,.8);R(_.SnackbarContent,"bg",L),R(_.SnackbarContent,"color",Sr(()=>S?nu.text.primary:_.getContrastText(L))),R(_.SpeedDialAction,"fabHoverBg",fs(_.background.paper,.15)),R(_.StepConnector,"border",I("palette-grey-400")),R(_.StepContent,"border",I("palette-grey-400")),R(_.Switch,"defaultColor",I("palette-common-white")),R(_.Switch,"defaultDisabledColor",I("palette-grey-100")),R(_.Switch,"primaryDisabledColor",D(Ee,_.primary.main,.62)),R(_.Switch,"secondaryDisabledColor",D(Ee,_.secondary.main,.62)),R(_.Switch,"errorDisabledColor",D(Ee,_.error.main,.62)),R(_.Switch,"infoDisabledColor",D(Ee,_.info.main,.62)),R(_.Switch,"successDisabledColor",D(Ee,_.success.main,.62)),R(_.Switch,"warningDisabledColor",D(Ee,_.warning.main,.62)),R(_.TableCell,"border",D(Ee,D(Rn,_.divider,1),.88)),R(_.Tooltip,"bg",D(Rn,_.grey[700],.92))}if(_.mode==="dark"){R(_.Alert,"errorColor",D(Ee,_.error.light,.6)),R(_.Alert,"infoColor",D(Ee,_.info.light,.6)),R(_.Alert,"successColor",D(Ee,_.success.light,.6)),R(_.Alert,"warningColor",D(Ee,_.warning.light,.6)),R(_.Alert,"errorFilledBg",I("palette-error-dark")),R(_.Alert,"infoFilledBg",I("palette-info-dark")),R(_.Alert,"successFilledBg",I("palette-success-dark")),R(_.Alert,"warningFilledBg",I("palette-warning-dark")),R(_.Alert,"errorFilledColor",Sr(()=>_.getContrastText(_.error.dark))),R(_.Alert,"infoFilledColor",Sr(()=>_.getContrastText(_.info.dark))),R(_.Alert,"successFilledColor",Sr(()=>_.getContrastText(_.success.dark))),R(_.Alert,"warningFilledColor",Sr(()=>_.getContrastText(_.warning.dark))),R(_.Alert,"errorStandardBg",D(Ae,_.error.light,.9)),R(_.Alert,"infoStandardBg",D(Ae,_.info.light,.9)),R(_.Alert,"successStandardBg",D(Ae,_.success.light,.9)),R(_.Alert,"warningStandardBg",D(Ae,_.warning.light,.9)),R(_.Alert,"errorIconColor",I("palette-error-main")),R(_.Alert,"infoIconColor",I("palette-info-main")),R(_.Alert,"successIconColor",I("palette-success-main")),R(_.Alert,"warningIconColor",I("palette-warning-main")),R(_.AppBar,"defaultBg",I("palette-grey-900")),R(_.AppBar,"darkBg",I("palette-background-paper")),R(_.AppBar,"darkColor",I("palette-text-primary")),R(_.Avatar,"defaultBg",I("palette-grey-600")),R(_.Button,"inheritContainedBg",I("palette-grey-800")),R(_.Button,"inheritContainedHoverBg",I("palette-grey-700")),R(_.Chip,"defaultBorder",I("palette-grey-700")),R(_.Chip,"defaultAvatarColor",I("palette-grey-300")),R(_.Chip,"defaultIconColor",I("palette-grey-300")),R(_.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),R(_.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),R(_.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),R(_.LinearProgress,"primaryBg",D(Ae,_.primary.main,.5)),R(_.LinearProgress,"secondaryBg",D(Ae,_.secondary.main,.5)),R(_.LinearProgress,"errorBg",D(Ae,_.error.main,.5)),R(_.LinearProgress,"infoBg",D(Ae,_.info.main,.5)),R(_.LinearProgress,"successBg",D(Ae,_.success.main,.5)),R(_.LinearProgress,"warningBg",D(Ae,_.warning.main,.5)),R(_.Skeleton,"bg",S?D(Rn,_.text.primary,.13):`rgba(${I("palette-text-primaryChannel")} / 0.13)`),R(_.Slider,"primaryTrack",D(Ae,_.primary.main,.5)),R(_.Slider,"secondaryTrack",D(Ae,_.secondary.main,.5)),R(_.Slider,"errorTrack",D(Ae,_.error.main,.5)),R(_.Slider,"infoTrack",D(Ae,_.info.main,.5)),R(_.Slider,"successTrack",D(Ae,_.success.main,.5)),R(_.Slider,"warningTrack",D(Ae,_.warning.main,.5));const L=S?D(Ee,_.background.default,.985):fs(_.background.default,.98);R(_.SnackbarContent,"bg",L),R(_.SnackbarContent,"color",Sr(()=>S?Sg.text.primary:_.getContrastText(L))),R(_.SpeedDialAction,"fabHoverBg",fs(_.background.paper,.15)),R(_.StepConnector,"border",I("palette-grey-600")),R(_.StepContent,"border",I("palette-grey-600")),R(_.Switch,"defaultColor",I("palette-grey-300")),R(_.Switch,"defaultDisabledColor",I("palette-grey-600")),R(_.Switch,"primaryDisabledColor",D(Ae,_.primary.main,.55)),R(_.Switch,"secondaryDisabledColor",D(Ae,_.secondary.main,.55)),R(_.Switch,"errorDisabledColor",D(Ae,_.error.main,.55)),R(_.Switch,"infoDisabledColor",D(Ae,_.info.main,.55)),R(_.Switch,"successDisabledColor",D(Ae,_.success.main,.55)),R(_.Switch,"warningDisabledColor",D(Ae,_.warning.main,.55)),R(_.TableCell,"border",D(Ae,D(Rn,_.divider,1),.68)),R(_.Tooltip,"bg",D(Rn,_.grey[700],.92))}Lr(_.background,"default"),Lr(_.background,"paper"),Lr(_.common,"background"),Lr(_.common,"onBackground"),Lr(_,"divider"),Object.keys(_).forEach(L=>{const W=_[L];L!=="tonalOffset"&&W&&typeof W=="object"&&(W.main&&R(_[L],"mainChannel",va(xa(W.main))),W.light&&R(_[L],"lightChannel",va(xa(W.light))),W.dark&&R(_[L],"darkChannel",va(xa(W.dark))),W.contrastText&&R(_[L],"contrastTextChannel",va(xa(W.contrastText))),L==="text"&&(Lr(_[L],"primary"),Lr(_[L],"secondary")),L==="action"&&(W.active&&Lr(_[L],"active"),W.selected&&Lr(_[L],"selected")))})}),O=t.reduce((j,_)=>Wt(j,_),O);const E={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:pC(O),enableContrastVars:o},{vars:C,generateThemeVars:M,generateStyleSheets:$}=RP(O,E);return O.vars=C,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([j,_])=>{O[j]=_}),O.generateThemeVars=M,O.generateStyleSheets=$,O.generateSpacing=function(){return ug(u.spacing,zc(this))},O.getColorSchemeSelector=LP(l),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=s,O.unstable_sxConfig={...Jo,...u?.unstable_sxConfig},O.unstable_sx=function(_){return xi({sx:_,theme:this})},O.toRuntimeSource=Tg,O}function Ng(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:iu({...r===!0?{}:r.palette,mode:t})})}function bC(e={},...t){const{palette:r,cssVariables:n=!1,colorSchemes:i=r?void 0:{light:!0},defaultColorScheme:a=r?.mode,...o}=e,s=a||"light",l=i?.[s],c={...i,...r?{[s]:{...typeof l!="boolean"&&l,palette:r}}:void 0};if(n===!1){if(!("colorSchemes"in e))return au(e,...t);let u=r;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const f=au({...e,palette:u},...t);return f.defaultColorScheme=s,f.colorSchemes=c,f.palette.mode==="light"&&(f.colorSchemes.light={...c.light!==!0&&c.light,palette:f.palette},Ng(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},Ng(f,"light",c.light)),f}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),yC({...o,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const xC=bC(),wC="$$material";function _C(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const SC=wP({themeId:wC,defaultTheme:xC,rootShouldForwardProp:e=>_C(e)&&e!=="classes"}),OC=DP;process.env.NODE_ENV!=="production"&&(ge.node,ge.object.isRequired);function AC(e){return jP(e)}function EC(e){return Zc("MuiSvgIcon",e)}gP("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const PC=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${Nn(t)}`,`fontSize${Nn(r)}`]};return bA(i,EC,n)},CC=SC("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Nn(r.color)}`],t[`fontSize${Nn(r.fontSize)}`]]}})(OC(({theme:e})=>({userSelect:"none",width:"1em",height:"1em",display:"inline-block",flexShrink:0,transition:e.transitions?.create?.("fill",{duration:(e.vars??e).transitions?.duration?.shorter}),variants:[{props:t=>!t.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(([,t])=>t&&t.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}}]}))),ds=A.forwardRef(function(t,r){const n=AC({props:t,name:"MuiSvgIcon"}),{children:i,className:a,color:o="inherit",component:s="svg",fontSize:l="medium",htmlColor:c,inheritViewBox:u=!1,titleAccess:f,viewBox:d="0 0 24 24",...h}=n,m=A.isValidElement(i)&&i.type==="svg",p={...n,color:o,component:s,fontSize:l,instanceFontSize:t.fontSize,inheritViewBox:u,viewBox:d,hasSvgAsChild:m},g={};u||(g.viewBox=d);const v=PC(p);return y.jsxs(CC,{as:s,className:de(v.root,a),focusable:"false",color:c,"aria-hidden":f?void 0:!0,role:f?"img":void 0,ref:r,...g,...h,...m&&i.props,ownerState:p,children:[m?i.props.children:i,f?y.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(ds.propTypes={children:ge.node,classes:ge.object,className:ge.string,color:ge.oneOfType([ge.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),ge.string]),component:ge.elementType,fontSize:ge.oneOfType([ge.oneOf(["inherit","large","medium","small"]),ge.string]),htmlColor:ge.string,inheritViewBox:ge.bool,shapeRendering:ge.string,sx:ge.oneOfType([ge.arrayOf(ge.oneOfType([ge.func,ge.object,ge.bool])),ge.func,ge.object]),titleAccess:ge.string,viewBox:ge.string}),ds.muiName="SvgIcon";function hs(e,t){function r(n,i){return y.jsx(ds,{"data-testid":process.env.NODE_ENV!=="production"?`${t}Icon`:void 0,ref:i,...n,children:e})}return process.env.NODE_ENV!=="production"&&(r.displayName=`${t}Icon`),r.muiName=ds.muiName,A.memo(A.forwardRef(r))}const kC=hs(y.jsx("path",{d:"M20 3h-1V1h-2v2H7V1H5v2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 18H4V10h16zm0-13H4V5h16z"}),"CalendarTodayOutlined"),wa=hs(y.jsx("path",{d:"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"}),"DescriptionOutlined"),TC=hs(y.jsx("path",{d:"M18 15v3H6v-3H4v3c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2v-3zm-1-4-1.41-1.41L13 12.17V4h-2v8.17L8.41 9.59 7 11l5 5z"}),"FileDownloadOutlined"),ht=hs(y.jsx("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3z"}),"OpenInNewOutlined");var Ig={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},$g=k.createContext&&k.createContext(Ig),MC=["attr","size","title"];function jC(e,t){if(e==null)return{};var r=DC(e,t),n,i;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DC(e,t){if(e==null)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}function ps(){return ps=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ps.apply(this,arguments)}function Rg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ms(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Rg(Object(r),!0).forEach(function(n){NC(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rg(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function NC(e,t,r){return t=IC(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IC(e){var t=$C(e,"string");return typeof t=="symbol"?t:t+""}function $C(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Lg(e){return e&&e.map((t,r)=>k.createElement(t.tag,ms({key:r},t.attr),Lg(t.child)))}function Re(e){return t=>k.createElement(RC,ps({attr:ms({},e.attr)},t),Lg(e.child))}function RC(e){var t=r=>{var{attr:n,size:i,title:a}=e,o=jC(e,MC),s=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),k.createElement("svg",ps({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:l,style:ms(ms({color:e.color||r.color},r.style),e.style),height:s,width:s,xmlns:"http://www.w3.org/2000/svg"}),a&&k.createElement("title",null,a),e.children)};return $g!==void 0?k.createElement($g.Consumer,null,r=>t(r)):t(Ig)}function LC(e){return Re({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M384 160c-17.7 0-32-14.3-32-32s14.3-32 32-32l160 0c17.7 0 32 14.3 32 32l0 160c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-82.7L342.6 374.6c-12.5 12.5-32.8 12.5-45.3 0L192 269.3 54.6 406.6c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l160-160c12.5-12.5 32.8-12.5 45.3 0L320 306.7 466.7 160 384 160z"},child:[]}]})(e)}function FC(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7 86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"},child:[]}]})(e)}function BC(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM232 120l0 136c0 8 4 15.5 10.7 20l96 64c11 7.4 25.9 4.4 33.3-6.7s4.4-25.9-6.7-33.3L280 243.2 280 120c0-13.3-10.7-24-24-24s-24 10.7-24 24z"},child:[]}]})(e)}function zC({title:e,description:t}){return y.jsxs("div",{className:"flex items-center justify-between px-6 my-6",children:[y.jsxs("div",{children:[y.jsx("div",{className:"!text-[24px] text-[#121212] font-semibold",children:e}),y.jsx("div",{className:"text-gray-500 text-[14px]",children:t})]}),y.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-3",children:[y.jsxs("div",{className:"w-full sm:w-auto flex items-center justify-center gap-2 bg-white shadow-sm px-2 md:px-6 py-1 rounded-sm text-[#64748B] text-sm hover:bg-slate-50",children:[y.jsx(kC,{fontSize:"12"}),y.jsx("div",{className:" whitespace-nowrap",children:"Last 7 Days"}),y.jsx(FC,{fontSize:"12"})]}),y.jsxs("div",{className:"w-full flex items-center justify-center gap-2 bg-white text-[#884EA7] px-2 md:px-6 py-1 rounded-sm shadow-sm hover:bg-purple-50",children:[y.jsx("div",{className:"font-medium whitespace-nowrap",children:"Export Report"}),y.jsx(TC,{fontSize:"12"})]})]})]})}function Fg(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8Zm92.49,313h0l-20,25a16,16,0,0,1-22.49,2.5h0l-67-49.72a40,40,0,0,1-15-31.23V112a16,16,0,0,1,16-16h32a16,16,0,0,1,16,16V256l58,42.5A16,16,0,0,1,348.49,321Z"},child:[]}]})(e)}function WC(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M192 208c0-17.67-14.33-32-32-32h-16c-35.35 0-64 28.65-64 64v48c0 35.35 28.65 64 64 64h16c17.67 0 32-14.33 32-32V208zm176 144c35.35 0 64-28.65 64-64v-48c0-35.35-28.65-64-64-64h-16c-17.67 0-32 14.33-32 32v112c0 17.67 14.33 32 32 32h16zM256 0C113.18 0 4.58 118.83 0 256v16c0 8.84 7.16 16 16 16h16c8.84 0 16-7.16 16-16v-16c0-114.69 93.31-208 208-208s208 93.31 208 208h-.12c.08 2.43.12 165.72.12 165.72 0 23.35-18.93 42.28-42.28 42.28H320c0-26.51-21.49-48-48-48h-32c-26.51 0-48 21.49-48 48s21.49 48 48 48h181.72c49.86 0 90.28-40.42 90.28-90.28V256C507.42 118.83 398.82 0 256 0z"},child:[]}]})(e)}function su(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"rect",attr:{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2"},child:[]},{tag:"path",attr:{d:"M9 22v-4h6v4"},child:[]},{tag:"path",attr:{d:"M8 6h.01"},child:[]},{tag:"path",attr:{d:"M16 6h.01"},child:[]},{tag:"path",attr:{d:"M12 6h.01"},child:[]},{tag:"path",attr:{d:"M12 10h.01"},child:[]},{tag:"path",attr:{d:"M12 14h.01"},child:[]},{tag:"path",attr:{d:"M16 10h.01"},child:[]},{tag:"path",attr:{d:"M16 14h.01"},child:[]},{tag:"path",attr:{d:"M8 10h.01"},child:[]},{tag:"path",attr:{d:"M8 14h.01"},child:[]}]})(e)}function VC(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2"},child:[]},{tag:"circle",attr:{cx:"7",cy:"17",r:"2"},child:[]},{tag:"path",attr:{d:"M9 17h6"},child:[]},{tag:"circle",attr:{cx:"17",cy:"17",r:"2"},child:[]}]})(e)}function Bg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M13 4h3a2 2 0 0 1 2 2v14"},child:[]},{tag:"path",attr:{d:"M2 20h3"},child:[]},{tag:"path",attr:{d:"M13 20h9"},child:[]},{tag:"path",attr:{d:"M10 12v.01"},child:[]},{tag:"path",attr:{d:"M13 4.562v16.157a1 1 0 0 1-1.242.97L5 20V5.562a2 2 0 0 1 1.515-1.94l4-1A2 2 0 0 1 13 4.561Z"},child:[]}]})(e)}function HC(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M16 5h6"},child:[]},{tag:"path",attr:{d:"M19 2v6"},child:[]},{tag:"path",attr:{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5"},child:[]},{tag:"path",attr:{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"},child:[]},{tag:"circle",attr:{cx:"9",cy:"9",r:"2"},child:[]}]})(e)}function zg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"},child:[]}]})(e)}function Wg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M4 2v20l2-1 2 1 2-1 2 1 2-1 2 1 2-1 2 1V2l-2 1-2-1-2 1-2-1-2 1-2-1-2 1Z"},child:[]},{tag:"path",attr:{d:"M14 8H8"},child:[]},{tag:"path",attr:{d:"M16 12H8"},child:[]},{tag:"path",attr:{d:"M13 16H8"},child:[]}]})(e)}function Vg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z"},child:[]},{tag:"path",attr:{d:"m9 12 2 2 4-4"},child:[]}]})(e)}function Hg(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M2 6c.6.5 1.2 1 2.5 1C7 7 7 5 9.5 5c2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]},{tag:"path",attr:{d:"M2 12c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]},{tag:"path",attr:{d:"M2 18c.6.5 1.2 1 2.5 1 2.5 0 2.5-2 5-2 2.6 0 2.4 2 5 2 2.5 0 2.5-2 5-2 1.3 0 1.9.5 2.5 1"},child:[]}]})(e)}function UC(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"},child:[]}]})(e)}function Ug(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M11.03 2.59a1.501 1.501 0 0 1 1.94 0l7.5 6.363a1.5 1.5 0 0 1 .53 1.144V19.5a1.5 1.5 0 0 1-1.5 1.5h-5.75a.75.75 0 0 1-.75-.75V14h-2v6.25a.75.75 0 0 1-.75.75H4.5A1.5 1.5 0 0 1 3 19.5v-9.403c0-.44.194-.859.53-1.144ZM12 3.734l-7.5 6.363V19.5h5v-6.25a.75.75 0 0 1 .75-.75h3.5a.75.75 0 0 1 .75.75v6.25h5v-9.403Z"},child:[]}]})(e)}function Kg(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function qg(e){return Re({attr:{viewBox:"0 0 32 32"},child:[{tag:"path",attr:{d:"M 2 7 L 2 24 L 30 24 L 30 7 L 2 7 z M 6 9 L 26 9 C 26 10.105 26.895 11 28 11 L 28 20 C 26.895 20 26 20.895 26 22 L 6 22 C 6 20.895 5.105 20 4 20 L 4 11 C 5.105 11 6 10.105 6 9 z M 16 11 C 13.789 11 12 13.016 12 15.5 C 12 17.984 13.789 20 16 20 C 18.211 20 20 17.984 20 15.5 C 20 13.016 18.211 11 16 11 z M 16 13 C 17.102 13 18 14.121 18 15.5 C 18 16.879 17.102 18 16 18 C 14.898 18 14 16.879 14 15.5 C 14 14.121 14.898 13 16 13 z M 8.5 14 C 7.672 14 7 14.672 7 15.5 C 7 16.328 7.672 17 8.5 17 C 9.328 17 10 16.328 10 15.5 C 10 14.672 9.328 14 8.5 14 z M 23.5 14 C 22.672 14 22 14.672 22 15.5 C 22 16.328 22.672 17 23.5 17 C 24.328 17 25 16.328 25 15.5 C 25 14.672 24.328 14 23.5 14 z"},child:[]}]})(e)}const KC=[{name:"Overview",icon:Ug},{name:"Community",icon:su},{name:"Financials",icon:qg},{name:"Facilities",icon:Bg},{name:"Gate & Security",icon:Hg},{name:"Helpdesk",icon:WC},{name:"Engagement",icon:zg}];function qC(){const[e,t]=k.useState("Overview");return y.jsx("div",{className:"flex gap-2 p-3",children:KC.map(r=>{const n=r.icon,i=e===r.name;return y.jsxs("button",{onClick:()=>t(r.name),className:`flex items-center gap-2 rounded px-4 py-3 text-[14px] leading-[16px] font-medium transition
104
104
  ${i?"bg-[#FBF5FF] text-[#884EA7]":"bg-white text-[#64748B] hover:bg-gray-50"}`,children:[y.jsx(n,{className:"h-[15px] w-[15px] font-bold"}),r.name]},r.name)})})}var lu={},cu={},Yg;function YC(){return Yg||(Yg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(cu)),cu}var uu={},Gg;function Xg(){return Gg||(Gg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){switch(typeof r){case"number":case"symbol":return!1;case"string":return r.includes(".")||r.includes("[")||r.includes("]")}}e.isDeepKey=t})(uu)),uu}var fu={},Zg;function Jg(){return Zg||(Zg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="string"||typeof r=="symbol"?r:Object.is(r?.valueOf?.(),-0)?"-0":String(r)}e.toKey=t})(fu)),fu}var du={},Qg;function hu(){return Qg||(Qg=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){const n=[],i=r.length;if(i===0)return n;let a=0,o="",s="",l=!1;for(r.charCodeAt(0)===46&&(n.push(""),a++);a<i;){const c=r[a];s?c==="\\"&&a+1<i?(a++,o+=r[a]):c===s?s="":o+=c:l?c==='"'||c==="'"?s=c:c==="]"?(l=!1,n.push(o),o=""):o+=c:c==="["?(l=!0,o&&(n.push(o),o="")):c==="."?o&&(n.push(o),o=""):o+=c,a++}return o&&n.push(o),n}e.toPath=t})(du)),du}var ev;function pu(){return ev||(ev=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=YC(),r=Xg(),n=Jg(),i=hu();function a(s,l,c){if(s==null)return c;switch(typeof l){case"string":{if(t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?r.isDeepKey(l)?a(s,i.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=n.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return o(s,l,c);if(Object.is(l?.valueOf(),-0)?l="-0":l=String(l),t.isUnsafeProperty(l))return c;const u=s[l];return u===void 0?c:u}}}function o(s,l,c){if(l.length===0)return c;let u=s;for(let f=0;f<l.length;f++){if(u==null||t.isUnsafeProperty(l[f]))return c;u=u[l[f]]}return u===void 0?c:u}e.get=a})(lu)),lu}var mu,tv;function GC(){return tv||(tv=1,mu=pu().get),mu}var XC=GC();const Ln=Ir(XC);var pt=e=>e===0?0:e>0?1:-1,Ut=e=>typeof e=="number"&&e!=+e,Fn=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,X=e=>(typeof e=="number"||e instanceof Number)&&!Ut(e),Or=e=>X(e)||typeof e=="string",ZC=0,_a=e=>{var t=++ZC;return"".concat(e||"").concat(t)},At=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!X(t)&&typeof t!="string")return n;var a;if(Fn(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return Ut(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},rv=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},n=0;n<t;n++)if(!r[e[n]])r[e[n]]=!0;else return!0;return!1};function Ye(e,t,r){return X(e)&&X(t)?e+r*(t-e):t}function nv(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Ln(n,t))===r)}var ze=e=>e===null||typeof e>"u",Sa=e=>ze(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),JC=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function gu(e){if(typeof e!="string")return!1;var t=JC;return t.includes(e)}var QC=["viewBox","children"],iv=["points","pathLength"],vu={svg:QC,polygon:iv,polyline:iv},yu=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if(k.isValidElement(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var n={};return Object.keys(r).forEach(i=>{gu(i)&&(n[i]=(a=>r[i](r,a)))}),n},ek=(e,t,r)=>n=>(e(t,r,n),null),gs=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var n=null;return Object.keys(e).forEach(i=>{var a=e[i];gu(i)&&typeof a=="function"&&(n||(n={}),n[i]=ek(a,t,r))}),n},tk=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"];function av(e){if(typeof e!="string")return!1;var t=tk;return t.includes(e)}function Ar(e){var t=Object.entries(e).filter(r=>{var[n]=r;return av(n)});return Object.fromEntries(t)}var ov=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",sv=null,bu=null,lv=e=>{if(e===sv&&Array.isArray(bu))return bu;var t=[];return k.Children.forEach(e,r=>{ze(r)||(la.isFragment(r)?t=t.concat(lv(r.props.children)):t.push(r))}),bu=t,sv=e,t};function xu(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>ov(i)):n=[ov(t)],lv(e).forEach(i=>{var a=Ln(i,"type.displayName")||Ln(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var cv=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,rk=(e,t,r,n)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var a=(i=n&&vu?.[n])!==null&&i!==void 0?i:[],o=t.startsWith("data-"),s=typeof e!="function"&&(!!n&&a.includes(t)||av(t)),l=!!r&&gu(t);return o||s||l},Ue=(e,t,r)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var n=e;if(k.isValidElement(e)&&(n=e.props),typeof n!="object"&&typeof n!="function")return null;var i={};return Object.keys(n).forEach(a=>{var o;rk((o=n)===null||o===void 0?void 0:o[a],a,t,r)&&(i[a]=n[a])}),i},nk=["children","width","height","viewBox","className","style","title","desc"];function wu(){return wu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wu.apply(null,arguments)}function ik(e,t){if(e==null)return{};var r,n,i=ak(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function ak(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var uv=k.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:l,desc:c}=e,u=ik(e,nk),f=a||{width:n,height:i,x:0,y:0},d=de("recharts-surface",o);return A.createElement("svg",wu({},Ue(u,!0,"svg"),{className:d,width:n,height:i,style:s,viewBox:"".concat(f.x," ").concat(f.y," ").concat(f.width," ").concat(f.height),ref:t}),A.createElement("title",null,l),A.createElement("desc",null,c),r)}),ok=["children","className"];function _u(){return _u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_u.apply(null,arguments)}function sk(e,t){if(e==null)return{};var r,n,i=lk(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lk(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var xt=A.forwardRef((e,t)=>{var{children:r,className:n}=e,i=sk(e,ok),a=de("recharts-layer",n);return A.createElement("g",_u({className:a},Ue(i,!0),{ref:t}),r)}),ck=k.createContext(null);function Ie(e){return function(){return e}}const fv=Math.cos,vs=Math.sin,pr=Math.sqrt,ys=Math.PI,bs=2*ys,Su=Math.PI,Ou=2*Su,Bn=1e-6,uk=Ou-Bn;function dv(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function fk(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return dv;const r=10**t;return function(n){this._+=n[0];for(let i=1,a=n.length;i<a;++i)this._+=Math.round(arguments[i]*r)/r+n[i]}}class dk{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?dv:fk(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,n,i){this._append`Q${+t},${+r},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,r,n,i,a,o){this._append`C${+t},${+r},${+n},${+i},${this._x1=+a},${this._y1=+o}`}arcTo(t,r,n,i,a){if(t=+t,r=+r,n=+n,i=+i,a=+a,a<0)throw new Error(`negative radius: ${a}`);let o=this._x1,s=this._y1,l=n-t,c=i-r,u=o-t,f=s-r,d=u*u+f*f;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(d>Bn)if(!(Math.abs(f*l-c*u)>Bn)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let h=n-o,m=i-s,p=l*l+c*c,g=h*h+m*m,v=Math.sqrt(p),b=Math.sqrt(d),x=a*Math.tan((Su-Math.acos((p+d-g)/(2*v*b)))/2),S=x/b,w=x/v;Math.abs(S-1)>Bn&&this._append`L${t+S*u},${r+S*f}`,this._append`A${a},${a},0,0,${+(f*h>u*m)},${this._x1=t+w*l},${this._y1=r+w*c}`}}arc(t,r,n,i,a,o){if(t=+t,r=+r,n=+n,o=!!o,n<0)throw new Error(`negative radius: ${n}`);let s=n*Math.cos(i),l=n*Math.sin(i),c=t+s,u=r+l,f=1^o,d=o?i-a:a-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>Bn||Math.abs(this._y1-u)>Bn)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%Ou+Ou),d>uk?this._append`A${n},${n},0,1,${f},${t-s},${r-l}A${n},${n},0,1,${f},${this._x1=c},${this._y1=u}`:d>Bn&&this._append`A${n},${n},0,${+(d>=Su)},${f},${this._x1=t+n*Math.cos(a)},${this._y1=r+n*Math.sin(a)}`)}rect(t,r,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${n=+n}v${+i}h${-n}Z`}toString(){return this._}}function Au(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{const n=Math.floor(r);if(!(n>=0))throw new RangeError(`invalid digits: ${r}`);t=n}return e},()=>new dk(t)}function Eu(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hv(e){this._context=e}hv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function xs(e){return new hv(e)}function pv(e){return e[0]}function mv(e){return e[1]}function gv(e,t){var r=Ie(!0),n=null,i=xs,a=null,o=Au(s);e=typeof e=="function"?e:e===void 0?pv:Ie(e),t=typeof t=="function"?t:t===void 0?mv:Ie(t);function s(l){var c,u=(l=Eu(l)).length,f,d=!1,h;for(n==null&&(a=i(h=o())),c=0;c<=u;++c)!(c<u&&r(f=l[c],c,l))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(f,c,l),+t(f,c,l));if(h)return a=null,h+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:Ie(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Ie(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ie(!!l),s):r},s.curve=function(l){return arguments.length?(i=l,n!=null&&(a=i(n)),s):i},s.context=function(l){return arguments.length?(l==null?n=a=null:a=i(n=l),s):n},s}function ws(e,t,r){var n=null,i=Ie(!0),a=null,o=xs,s=null,l=Au(c);e=typeof e=="function"?e:e===void 0?pv:Ie(+e),t=typeof t=="function"?t:Ie(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?mv:Ie(+r);function c(f){var d,h,m,p=(f=Eu(f)).length,g,v=!1,b,x=new Array(p),S=new Array(p);for(a==null&&(s=o(b=l())),d=0;d<=p;++d){if(!(d<p&&i(g=f[d],d,f))===v)if(v=!v)h=d,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=d-1;m>=h;--m)s.point(x[m],S[m]);s.lineEnd(),s.areaEnd()}v&&(x[d]=+e(g,d,f),S[d]=+t(g,d,f),s.point(n?+n(g,d,f):x[d],r?+r(g,d,f):S[d]))}if(b)return s=null,b+""||null}function u(){return gv().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Ie(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Ie(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Ie(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Ie(+f),c):r},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(r)},c.lineX1=function(){return u().x(n).y(t)},c.defined=function(f){return arguments.length?(i=typeof f=="function"?f:Ie(!!f),c):i},c.curve=function(f){return arguments.length?(o=f,a!=null&&(s=o(a)),c):o},c.context=function(f){return arguments.length?(f==null?a=s=null:s=o(a=f),c):a},c}class vv{constructor(t,r){this._context=t,this._x=r}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(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}}function hk(e){return new vv(e,!0)}function pk(e){return new vv(e,!1)}const Pu={draw(e,t){const r=pr(t/ys);e.moveTo(r,0),e.arc(0,0,r,0,bs)}},mk={draw(e,t){const r=pr(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},yv=pr(1/3),gk=yv*2,vk={draw(e,t){const r=pr(t/gk),n=r*yv;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},yk={draw(e,t){const r=pr(t),n=-r/2;e.rect(n,n,r,r)}},bk=.8908130915292852,bv=vs(ys/10)/vs(7*ys/10),xk=vs(bs/10)*bv,wk=-fv(bs/10)*bv,_k={draw(e,t){const r=pr(t*bk),n=xk*r,i=wk*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=bs*a/5,s=fv(o),l=vs(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},Cu=pr(3),Sk={draw(e,t){const r=-pr(t/(Cu*3));e.moveTo(0,r*2),e.lineTo(-Cu*r,-r),e.lineTo(Cu*r,-r),e.closePath()}},nr=-.5,ir=pr(3)/2,ku=1/pr(12),Ok=(ku/2+1)*3,Ak={draw(e,t){const r=pr(t/Ok),n=r/2,i=r*ku,a=n,o=r*ku+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(nr*n-ir*i,ir*n+nr*i),e.lineTo(nr*a-ir*o,ir*a+nr*o),e.lineTo(nr*s-ir*l,ir*s+nr*l),e.lineTo(nr*n+ir*i,nr*i-ir*n),e.lineTo(nr*a+ir*o,nr*o-ir*a),e.lineTo(nr*s+ir*l,nr*l-ir*s),e.closePath()}};function Ek(e,t){let r=null,n=Au(i);e=typeof e=="function"?e:Ie(e||Pu),t=typeof t=="function"?t:Ie(t===void 0?64:+t);function i(){let a;if(r||(r=a=n()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return i.type=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Ie(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function _s(){}function Ss(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function xv(e){this._context=e}xv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Ss(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(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;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Ss(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Pk(e){return new xv(e)}function wv(e){this._context=e}wv.prototype={areaStart:_s,areaEnd:_s,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Ss(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ck(e){return new wv(e)}function _v(e){this._context=e}_v.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:Ss(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function kk(e){return new _v(e)}function Sv(e){this._context=e}Sv.prototype={areaStart:_s,areaEnd:_s,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Tk(e){return new Sv(e)}function Ov(e){return e<0?-1:1}function Av(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0),s=(a*i+o*n)/(n+i);return(Ov(a)+Ov(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ev(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function Tu(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function Os(e){this._context=e}Os.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:Tu(this,this._t0,Ev(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=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,Tu(this,Ev(this,r=Av(this,e,t)),r);break;default:Tu(this,this._t0,r=Av(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function Pv(e){this._context=new Cv(e)}(Pv.prototype=Object.create(Os.prototype)).point=function(e,t){Os.prototype.point.call(this,t,e)};function Cv(e){this._context=e}Cv.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,r,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)}};function Mk(e){return new Os(e)}function jk(e){return new Pv(e)}function kv(e){this._context=e}kv.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,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var n=Tv(e),i=Tv(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Tv(e){var t,r=e.length-1,n,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)n=i[t]/a[t-1],a[t]-=n,o[t]-=n*o[t-1];for(i[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[r-1]=(e[r]+i[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function Dk(e){return new kv(e)}function As(e,t){this._context=e,this._t=t}As.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(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 r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function Nk(e){return new As(e,.5)}function Ik(e){return new As(e,0)}function $k(e){return new As(e,1)}function ki(e,t){if((o=e.length)>1)for(var r=1,n,i,a=e[t[0]],o,s=a.length;r<o;++r)for(i=a,a=e[t[r]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Mu(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function Rk(e,t){return e[t]}function Lk(e){const t=[];return t.key=e,t}function Fk(){var e=Ie([]),t=Mu,r=ki,n=Rk;function i(a){var o=Array.from(e.apply(this,arguments),Lk),s,l=o.length,c=-1,u;for(const f of a)for(s=0,++c;s<l;++s)(o[s][c]=[0,+n(f,o[s].key,c,a)]).data=f;for(s=0,u=Eu(t(o));s<l;++s)o[u[s]].index=s;return r(o,u),o}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Ie(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Ie(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?Mu:typeof a=="function"?a:Ie(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??ki,i):r},i}function Bk(e,t){if((n=e.length)>0){for(var r,n,i=0,a=e[0].length,o;i<a;++i){for(o=r=0;r<n;++r)o+=e[r][i][1]||0;if(o)for(r=0;r<n;++r)e[r][i][1]/=o}ki(e,t)}}function zk(e,t){if((i=e.length)>0){for(var r=0,n=e[t[0]],i,a=n.length;r<a;++r){for(var o=0,s=0;o<i;++o)s+=e[o][r][1]||0;n[r][1]+=n[r][0]=-s/2}ki(e,t)}}function Wk(e,t){if(!(!((o=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var r=0,n=1,i,a,o;n<a;++n){for(var s=0,l=0,c=0;s<o;++s){for(var u=e[t[s]],f=u[n][1]||0,d=u[n-1][1]||0,h=(f-d)/2,m=0;m<s;++m){var p=e[t[m]],g=p[n][1]||0,v=p[n-1][1]||0;h+=g-v}l+=f,c+=h*f}i[n-1][1]+=i[n-1][0]=r,l&&(r-=c/l)}i[n-1][1]+=i[n-1][0]=r,ki(e,t)}}var Vk=["type","size","sizeType"];function ju(){return ju=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ju.apply(null,arguments)}function Mv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function jv(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mv(Object(r),!0).forEach(function(n){Hk(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Hk(e,t,r){return(t=Uk(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Uk(e){var t=Kk(e,"string");return typeof t=="symbol"?t:t+""}function Kk(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qk(e,t){if(e==null)return{};var r,n,i=Yk(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Yk(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Dv={symbolCircle:Pu,symbolCross:mk,symbolDiamond:vk,symbolSquare:yk,symbolStar:_k,symbolTriangle:Sk,symbolWye:Ak},Gk=Math.PI/180,Xk=e=>{var t="symbol".concat(Sa(e));return Dv[t]||Pu},Zk=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var n=18*Gk;return 1.25*e*e*(Math.tan(n)-Math.tan(n*2)*Math.tan(n)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},Jk=(e,t)=>{Dv["symbol".concat(Sa(e))]=t},Nv=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=qk(e,Vk),a=jv(jv({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var s=()=>{var d=Xk(o),h=Ek().type(d).size(Zk(r,n,o));return h()},{className:l,cx:c,cy:u}=a,f=Ue(a,!0);return c===+c&&u===+u&&r===+r?A.createElement("path",ju({},f,{className:de("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};Nv.registerSymbol=Jk;var Du={},Nu={},Iv;function Qk(){return Iv||(Iv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){const i=new Map;for(let a=0;a<r.length;a++){const o=r[a],s=n(o);i.has(s)||i.set(s,o)}return Array.from(i.values())}e.uniqBy=t})(Nu)),Nu}var Iu={},$v;function Rv(){return $v||($v=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(Iu)),Iu}var $u={},Ru={},Lu={},Lv;function eT(){return Lv||(Lv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Lu)),Lu}var Fv;function Fu(){return Fv||(Fv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=eT();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(Ru)),Ru}var Bu={},Bv;function tT(){return Bv||(Bv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Bu)),Bu}var zv;function rT(){return zv||(zv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Fu(),r=tT();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})($u)),$u}var zu={},Wu={},Wv;function nT(){return Wv||(Wv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pu();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Wu)),Wu}var Vu={},Hu={},Uu={},Ku={},Vv;function Hv(){return Vv||(Vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r!==null&&(typeof r=="object"||typeof r=="function")}e.isObject=t})(Ku)),Ku}var qu={},Uv;function Kv(){return Uv||(Uv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null||typeof r!="object"&&typeof r!="function"}e.isPrimitive=t})(qu)),qu}var Yu={},qv;function Yv(){return qv||(qv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n){return r===n||Number.isNaN(r)&&Number.isNaN(n)}e.eq=t})(Yu)),Yu}var Gv;function iT(){return Gv||(Gv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gu(),r=Hv(),n=Kv(),i=Yv();function a(f,d,h){return typeof h!="function"?t.isMatch(f,d):o(f,d,function m(p,g,v,b,x,S){const w=h(p,g,v,b,x,S);return w!==void 0?!!w:o(p,g,m,S)},new Map)}function o(f,d,h,m){if(d===f)return!0;switch(typeof d){case"object":return s(f,d,h,m);case"function":return Object.keys(d).length>0?o(f,{...d},h,m):i.eq(f,d);default:return r.isObject(f)?typeof d=="string"?d==="":!0:i.eq(f,d)}}function s(f,d,h,m){if(d==null)return!0;if(Array.isArray(d))return c(f,d,h,m);if(d instanceof Map)return l(f,d,h,m);if(d instanceof Set)return u(f,d,h,m);const p=Object.keys(d);if(f==null)return p.length===0;if(p.length===0)return!0;if(m&&m.has(d))return m.get(d)===f;m&&m.set(d,f);try{for(let g=0;g<p.length;g++){const v=p[g];if(!n.isPrimitive(f)&&!(v in f)||d[v]===void 0&&f[v]!==void 0||d[v]===null&&f[v]!==null||!h(f[v],d[v],v,f,d,m))return!1}return!0}finally{m&&m.delete(d)}}function l(f,d,h,m){if(d.size===0)return!0;if(!(f instanceof Map))return!1;for(const[p,g]of d.entries()){const v=f.get(p);if(h(v,g,p,f,d,m)===!1)return!1}return!0}function c(f,d,h,m){if(d.length===0)return!0;if(!Array.isArray(f))return!1;const p=new Set;for(let g=0;g<d.length;g++){const v=d[g];let b=!1;for(let x=0;x<f.length;x++){if(p.has(x))continue;const S=f[x];let w=!1;if(h(S,v,g,f,d,m)&&(w=!0),w){p.add(x),b=!0;break}}if(!b)return!1}return!0}function u(f,d,h,m){return d.size===0?!0:f instanceof Set?c([...f],[...d],h,m):!1}e.isMatchWith=a,e.isSetMatch=u})(Uu)),Uu}var Xv;function Gu(){return Xv||(Xv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iT();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Hu)),Hu}var Xu={},Zu={},Ju={},Zv;function aT(){return Zv||(Zv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Object.getOwnPropertySymbols(r).filter(n=>Object.prototype.propertyIsEnumerable.call(r,n))}e.getSymbols=t})(Ju)),Ju}var Qu={},Jv;function Qv(){return Jv||(Jv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==null?r===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(r)}e.getTag=t})(Qu)),Qu}var ef={},ey;function ty(){return ey||(ey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",r="[object String]",n="[object Number]",i="[object Boolean]",a="[object Arguments]",o="[object Symbol]",s="[object Date]",l="[object Map]",c="[object Set]",u="[object Array]",f="[object Function]",d="[object ArrayBuffer]",h="[object Object]",m="[object Error]",p="[object DataView]",g="[object Uint8Array]",v="[object Uint8ClampedArray]",b="[object Uint16Array]",x="[object Uint32Array]",S="[object BigUint64Array]",w="[object Int8Array]",O="[object Int16Array]",E="[object Int32Array]",C="[object BigInt64Array]",M="[object Float32Array]",$="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=u,e.bigInt64ArrayTag=C,e.bigUint64ArrayTag=S,e.booleanTag=i,e.dataViewTag=p,e.dateTag=s,e.errorTag=m,e.float32ArrayTag=M,e.float64ArrayTag=$,e.functionTag=f,e.int16ArrayTag=O,e.int32ArrayTag=E,e.int8ArrayTag=w,e.mapTag=l,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=b,e.uint32ArrayTag=x,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=v})(ef)),ef}var tf={},ry;function oT(){return ry||(ry=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(tf)),tf}var ny;function iy(){return ny||(ny=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=aT(),r=Qv(),n=ty(),i=Kv(),a=oT();function o(u,f){return s(u,void 0,u,new Map,f)}function s(u,f,d,h=new Map,m=void 0){const p=m?.(u,f,d,h);if(p!==void 0)return p;if(i.isPrimitive(u))return u;if(h.has(u))return h.get(u);if(Array.isArray(u)){const g=new Array(u.length);h.set(u,g);for(let v=0;v<u.length;v++)g[v]=s(u[v],v,d,h,m);return Object.hasOwn(u,"index")&&(g.index=u.index),Object.hasOwn(u,"input")&&(g.input=u.input),g}if(u instanceof Date)return new Date(u.getTime());if(u instanceof RegExp){const g=new RegExp(u.source,u.flags);return g.lastIndex=u.lastIndex,g}if(u instanceof Map){const g=new Map;h.set(u,g);for(const[v,b]of u)g.set(v,s(b,v,d,h,m));return g}if(u instanceof Set){const g=new Set;h.set(u,g);for(const v of u)g.add(s(v,void 0,d,h,m));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(a.isTypedArray(u)){const g=new(Object.getPrototypeOf(u)).constructor(u.length);h.set(u,g);for(let v=0;v<u.length;v++)g[v]=s(u[v],v,d,h,m);return g}if(u instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&u instanceof SharedArrayBuffer)return u.slice(0);if(u instanceof DataView){const g=new DataView(u.buffer.slice(0),u.byteOffset,u.byteLength);return h.set(u,g),l(g,u,d,h,m),g}if(typeof File<"u"&&u instanceof File){const g=new File([u],u.name,{type:u.type});return h.set(u,g),l(g,u,d,h,m),g}if(u instanceof Blob){const g=new Blob([u],{type:u.type});return h.set(u,g),l(g,u,d,h,m),g}if(u instanceof Error){const g=new u.constructor;return h.set(u,g),g.message=u.message,g.name=u.name,g.stack=u.stack,g.cause=u.cause,l(g,u,d,h,m),g}if(typeof u=="object"&&c(u)){const g=Object.create(Object.getPrototypeOf(u));return h.set(u,g),l(g,u,d,h,m),g}return u}function l(u,f,d=u,h,m){const p=[...Object.keys(f),...t.getSymbols(f)];for(let g=0;g<p.length;g++){const v=p[g],b=Object.getOwnPropertyDescriptor(u,v);(b==null||b.writable)&&(u[v]=s(f[v],v,d,h,m))}}function c(u){switch(r.getTag(u)){case n.argumentsTag:case n.arrayTag:case n.arrayBufferTag:case n.dataViewTag:case n.booleanTag:case n.dateTag:case n.float32ArrayTag:case n.float64ArrayTag:case n.int8ArrayTag:case n.int16ArrayTag:case n.int32ArrayTag:case n.mapTag:case n.numberTag:case n.objectTag:case n.regexpTag:case n.setTag:case n.stringTag:case n.symbolTag:case n.uint8ArrayTag:case n.uint8ClampedArrayTag:case n.uint16ArrayTag:case n.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=o,e.cloneDeepWithImpl=s,e.copyProperties=l})(Zu)),Zu}var ay;function sT(){return ay||(ay=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iy();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Xu)),Xu}var oy;function lT(){return oy||(oy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gu(),r=sT();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(Vu)),Vu}var rf={},nf={},af={},sy;function cT(){return sy||(sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=iy(),r=ty();function n(i,a){return t.cloneDeepWith(i,(o,s,l,c)=>{const u=a?.(o,s,l,c);if(u!==void 0)return u;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case r.numberTag:case r.stringTag:case r.booleanTag:{const f=new i.constructor(i?.valueOf());return t.copyProperties(f,i),f}case r.argumentsTag:{const f={};return t.copyProperties(f,i),f.length=i.length,f[Symbol.iterator]=i[Symbol.iterator],f}default:return}})}e.cloneDeepWith=n})(af)),af}var ly;function uT(){return ly||(ly=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=cT();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(nf)),nf}var of={},sf={},cy;function uy(){return cy||(cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function r(n,i=Number.MAX_SAFE_INTEGER){switch(typeof n){case"number":return Number.isInteger(n)&&n>=0&&n<i;case"symbol":return!1;case"string":return t.test(n)}}e.isIndex=r})(sf)),sf}var lf={},fy;function fT(){return fy||(fy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Qv();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(lf)),lf}var dy;function dT(){return dy||(dy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Xg(),r=uy(),n=fT(),i=hu();function a(o,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&o?.[s]==null?l=i.toPath(s):l=[s],l.length===0)return!1;let c=o;for(let u=0;u<l.length;u++){const f=l[u];if((c==null||!Object.hasOwn(c,f))&&!((Array.isArray(c)||n.isArguments(c))&&r.isIndex(f)&&f<c.length))return!1;c=c[f]}return!0}e.has=a})(of)),of}var hy;function hT(){return hy||(hy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Gu(),r=Jg(),n=uT(),i=pu(),a=dT();function o(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=r.toKey(s);break}}return l=n.cloneDeep(l),function(c){const u=i.get(c,s);return u===void 0?a.has(c,s):l===void 0?u===void 0:t.isMatch(u,l)}}e.matchesProperty=o})(rf)),rf}var py;function pT(){return py||(py=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Rv(),r=nT(),n=lT(),i=hT();function a(o){if(o==null)return t.identity;switch(typeof o){case"function":return o;case"object":return Array.isArray(o)&&o.length===2?i.matchesProperty(o[0],o[1]):n.matches(o);case"string":case"symbol":case"number":return r.property(o)}}e.iteratee=a})(zu)),zu}var my;function mT(){return my||(my=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Qk(),r=Rv(),n=rT(),i=pT();function a(o,s=r.identity){return n.isArrayLikeObject(o)?t.uniqBy(Array.from(o),i.iteratee(s)):[]}e.uniqBy=a})(Du)),Du}var cf,gy;function gT(){return gy||(gy=1,cf=mT().uniqBy),cf}var vT=gT();const vy=Ir(vT);function yT(e,t,r){return t===!0?vy(e,r):typeof t=="function"?vy(e,t):e}var Es={exports:{}},uf={},Ps={exports:{}},ff={};/**
105
105
  * @license React
106
106
  * use-sync-external-store-shim.production.js
@@ -174,13 +174,13 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
174
174
  `);if(n>0){var{circleTangency:x,lineTangency:S,theta:w}=il({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:O,lineTangency:E,theta:C}=il({cx:t,cy:r,radius:n,angle:c,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),M=s?Math.abs(l-c):Math.abs(l-c)-w-C;if(M<0&&a===0)return"".concat(b,"L").concat(t,",").concat(r,"Z");b+="L".concat(E.x,",").concat(E.y,`
175
175
  A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(O.x,",").concat(O.y,`
176
176
  A`).concat(n,",").concat(n,",0,").concat(+(M>180),",").concat(+(u>0),",").concat(x.x,",").concat(x.y,`
177
- A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,"Z")}else b+="L".concat(t,",").concat(r,"Z");return b},eN={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xb=e=>{var t=_t(e,eN),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:f}=t;if(a<i||c===u)return null;var d=de("recharts-sector",f),h=a-i,m=At(o,h,0,!0),p;return m>0&&Math.abs(c-u)<360?p=QD({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,h/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):p=bb({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:u}),A.createElement("path",Xf({},Ue(t,!0),{className:d,d:p}))};function tN(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:f}=t,d=it(s,l,c,f),h=it(s,l,u,f);n=d.x,i=d.y,a=h.x,o=h.y}else return yb(t);return[{x:n,y:i},{x:a,y:o}]}var Zf={},Jf={},Qf={},wb;function rN(){return wb||(wb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=My();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Qf)),Qf}var _b;function nN(){return _b||(_b=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rN();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Jf)),Jf}var Sb;function iN(){return Sb||(Sb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$y(),r=nN();function n(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),o=o===void 0?i<a?1:-1:r.toFinite(o);const s=Math.max(Math.ceil((a-i)/(o||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=o;return l}e.range=n})(Zf)),Zf}var ed,Ob;function aN(){return Ob||(Ob=1,ed=iN().range),ed}var oN=aN();const Ab=Ir(oN);function hn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sN(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function td(e){let t,r,n;e.length!==2?(t=hn,r=(s,l)=>hn(e(s),l),n=(s,l)=>e(s)-l):(t=e===hn||e===sN?e:lN,r=e,n=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function o(s,l,c=0,u=s.length){const f=i(s,l,c,u-1);return f>c&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function lN(){return 0}function Eb(e){return e===null?NaN:+e}function*cN(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const La=td(hn).right;td(Eb).center;class Pb extends Map{constructor(t,r=dN){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Cb(this,t))}has(t){return super.has(Cb(this,t))}set(t,r){return super.set(uN(this,t),r)}delete(t){return super.delete(fN(this,t))}}function Cb({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function uN({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function fN({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function dN(e){return e!==null&&typeof e=="object"?e.valueOf():e}function hN(e=hn){if(e===hn)return kb;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function kb(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const pN=Math.sqrt(50),mN=Math.sqrt(10),gN=Math.sqrt(2);function al(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=pN?10:a>=mN?5:a>=gN?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?al(e,t,r*2):[s,l,c]}function rd(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?al(t,e,r):al(e,t,r);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(a-c)/-o;else for(let c=0;c<s;++c)l[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}function nd(e,t,r){return t=+t,e=+e,r=+r,al(e,t,r)[2]}function id(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?nd(t,e,r):nd(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Tb(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Mb(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function jb(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?kb:hN(i);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),h=Math.max(r,Math.floor(t-c*f/l+d)),m=Math.min(n,Math.floor(t+(l-c)*f/l+d));jb(e,t,h,m,i)}const a=e[t];let o=r,s=n;for(Fa(e,r,t),i(e[n],a)>0&&Fa(e,r,n);o<s;){for(Fa(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?Fa(e,r,s):(++s,Fa(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Fa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function vN(e,t,r){if(e=Float64Array.from(cN(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Mb(e);if(t>=1)return Tb(e);var n,i=(n-1)*t,a=Math.floor(i),o=Tb(jb(e,a).subarray(0,a+1)),s=Mb(e.subarray(a+1));return o+(s-o)*(i-a)}}function yN(e,t,r=Eb){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function bN(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function sr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Vr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ad=Symbol("implicit");function od(){var e=new Pb,t=[],r=[],n=ad;function i(a){let o=e.get(a);if(o===void 0){if(n!==ad)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Pb;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return od(t,r).unknown(n)},sr.apply(i,arguments),i}function sd(){var e=od().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,c=0,u=.5;delete e.unknown;function f(){var d=t().length,h=i<n,m=h?i:n,p=h?n:i;a=(p-m)/Math.max(1,d-l+c*2),s&&(a=Math.floor(a)),m+=(p-m-a*(d-l))*u,o=a*(1-l),s&&(m=Math.round(m),o=Math.round(o));var g=bN(d).map(function(v){return m+a*v});return r(h?g.reverse():g)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,c=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(c=+d,f()):c},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return sd(t(),[n,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},sr.apply(f(),arguments)}function Db(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Db(t())},e}function xN(){return Db(sd.apply(null,arguments).paddingInner(1))}function ld(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Nb(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ba(){}var za=.7,ol=1/za,Ni="\\s*([+-]?\\d+)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Er="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wN=/^#([0-9a-f]{3,8})$/,_N=new RegExp(`^rgb\\(${Ni},${Ni},${Ni}\\)$`),SN=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),ON=new RegExp(`^rgba\\(${Ni},${Ni},${Ni},${Wa}\\)$`),AN=new RegExp(`^rgba\\(${Er},${Er},${Er},${Wa}\\)$`),EN=new RegExp(`^hsl\\(${Wa},${Er},${Er}\\)$`),PN=new RegExp(`^hsla\\(${Wa},${Er},${Er},${Wa}\\)$`),Ib={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ld(Ba,Va,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$b,formatHex:$b,formatHex8:CN,formatHsl:kN,formatRgb:Rb,toString:Rb});function $b(){return this.rgb().formatHex()}function CN(){return this.rgb().formatHex8()}function kN(){return Wb(this).formatHsl()}function Rb(){return this.rgb().formatRgb()}function Va(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=wN.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Lb(t):r===3?new It(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?sl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?sl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_N.exec(e))?new It(t[1],t[2],t[3],1):(t=SN.exec(e))?new It(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ON.exec(e))?sl(t[1],t[2],t[3],t[4]):(t=AN.exec(e))?sl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=EN.exec(e))?zb(t[1],t[2]/100,t[3]/100,1):(t=PN.exec(e))?zb(t[1],t[2]/100,t[3]/100,t[4]):Ib.hasOwnProperty(e)?Lb(Ib[e]):e==="transparent"?new It(NaN,NaN,NaN,0):null}function Lb(e){return new It(e>>16&255,e>>8&255,e&255,1)}function sl(e,t,r,n){return n<=0&&(e=t=r=NaN),new It(e,t,r,n)}function TN(e){return e instanceof Ba||(e=Va(e)),e?(e=e.rgb(),new It(e.r,e.g,e.b,e.opacity)):new It}function cd(e,t,r,n){return arguments.length===1?TN(e):new It(e,t,r,n??1)}function It(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ld(It,cd,Nb(Ba,{brighter(e){return e=e==null?ol:Math.pow(ol,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?za:Math.pow(za,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new It(qn(this.r),qn(this.g),qn(this.b),ll(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fb,formatHex:Fb,formatHex8:MN,formatRgb:Bb,toString:Bb}));function Fb(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}`}function MN(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}${Yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bb(){const e=ll(this.opacity);return`${e===1?"rgb(":"rgba("}${qn(this.r)}, ${qn(this.g)}, ${qn(this.b)}${e===1?")":`, ${e})`}`}function ll(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yn(e){return e=qn(e),(e<16?"0":"")+e.toString(16)}function zb(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new mr(e,t,r,n)}function Wb(e){if(e instanceof mr)return new mr(e.h,e.s,e.l,e.opacity);if(e instanceof Ba||(e=Va(e)),!e)return new mr;if(e instanceof mr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new mr(o,s,l,e.opacity)}function jN(e,t,r,n){return arguments.length===1?Wb(e):new mr(e,t,r,n??1)}function mr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ld(mr,jN,Nb(Ba,{brighter(e){return e=e==null?ol:Math.pow(ol,e),new mr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?za:Math.pow(za,e),new mr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new It(ud(e>=240?e-240:e+120,i,n),ud(e,i,n),ud(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new mr(Vb(this.h),cl(this.s),cl(this.l),ll(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ll(this.opacity);return`${e===1?"hsl(":"hsla("}${Vb(this.h)}, ${cl(this.s)*100}%, ${cl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Vb(e){return e=(e||0)%360,e<0?e+360:e}function cl(e){return Math.max(0,Math.min(1,e||0))}function ud(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const fd=e=>()=>e;function DN(e,t){return function(r){return e+r*t}}function NN(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function IN(e){return(e=+e)==1?Hb:function(t,r){return r-t?NN(t,r,e):fd(isNaN(t)?r:t)}}function Hb(e,t){var r=t-e;return r?DN(e,r):fd(isNaN(e)?t:e)}const Ub=(function e(t){var r=IN(t);function n(i,a){var o=r((i=cd(i)).r,(a=cd(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),c=Hb(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n})(1);function $N(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function RN(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function LN(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Ii(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function FN(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function ul(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function BN(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Ii(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var dd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hd=new RegExp(dd.source,"g");function zN(e){return function(){return e}}function WN(e){return function(t){return e(t)+""}}function VN(e,t){var r=dd.lastIndex=hd.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=dd.exec(e))&&(i=hd.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:ul(n,i)})),r=hd.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?WN(l[0].x):zN(t):(t=l.length,function(c){for(var u=0,f;u<t;++u)s[(f=l[u]).i]=f.x(c);return s.join("")})}function Ii(e,t){var r=typeof t,n;return t==null||r==="boolean"?fd(t):(r==="number"?ul:r==="string"?(n=Va(t))?(t=n,Ub):VN:t instanceof Va?Ub:t instanceof Date?FN:RN(t)?$N:Array.isArray(t)?LN:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?BN:ul)(e,t)}function pd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function HN(e,t){t===void 0&&(t=e,e=Ii);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function UN(e){return function(){return e}}function fl(e){return+e}var Kb=[0,1];function kt(e){return e}function md(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:UN(isNaN(t)?NaN:.5)}function KN(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function qN(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=md(i,n),a=r(o,a)):(n=md(n,i),a=r(a,o)),function(s){return a(n(s))}}function YN(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=md(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=La(e,s,1,n)-1;return a[l](i[l](s))}}function Ha(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function dl(){var e=Kb,t=Kb,r=Ii,n,i,a,o=kt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==kt&&(o=KN(e[0],e[d-1])),s=d>2?YN:qN,l=c=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((c||(c=s(t,e.map(n),ul)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,fl),u()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),u()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=pd,u()},f.clamp=function(d){return arguments.length?(o=d?!0:kt,u()):o!==kt},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return n=d,i=h,u()}}function gd(){return dl()(kt,kt)}function GN(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function hl(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $i(e){return e=hl(Math.abs(e)),e?e[1]:NaN}function XN(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function ZN(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var JN=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ua(e){if(!(t=JN.exec(e)))throw new Error("invalid format: "+e);var t;return new vd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ua.prototype=vd.prototype;function vd(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}vd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function QN(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var qb;function e5(e,t){var r=hl(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(qb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+hl(e,Math.max(0,t+a-1))[0]}function Yb(e,t){var r=hl(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const Gb={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:GN,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Yb(e*100,t),r:Yb,s:e5,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Xb(e){return e}var Zb=Array.prototype.map,Jb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function t5(e){var t=e.grouping===void 0||e.thousands===void 0?Xb:XN(Zb.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Xb:ZN(Zb.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Ua(f);var d=f.fill,h=f.align,m=f.sign,p=f.symbol,g=f.zero,v=f.width,b=f.comma,x=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):Gb[w]||(x===void 0&&(x=12),S=!0,w="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=p==="$"?r:p==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E=p==="$"?n:/[%p]/.test(w)?o:"",C=Gb[w],M=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function $(j){var _=O,I=E,D,L,W;if(w==="c")I=C(j)+I,j="";else{j=+j;var H=j<0||1/j<0;if(j=isNaN(j)?l:C(Math.abs(j),x),S&&(j=QN(j)),H&&+j==0&&m!=="+"&&(H=!1),_=(H?m==="("?m:s:m==="-"||m==="("?"":m)+_,I=(w==="s"?Jb[8+qb/3]:"")+I+(H&&m==="("?")":""),M){for(D=-1,L=j.length;++D<L;)if(W=j.charCodeAt(D),48>W||W>57){I=(W===46?i+j.slice(D+1):j.slice(D))+I,j=j.slice(0,D);break}}}b&&!g&&(j=t(j,1/0));var te=_.length+j.length+I.length,Q=te<v?new Array(v-te+1).join(d):"";switch(b&&g&&(j=t(Q+j,Q.length?v-I.length:1/0),Q=""),h){case"<":j=_+j+I+Q;break;case"=":j=_+Q+j+I;break;case"^":j=Q.slice(0,te=Q.length>>1)+_+j+I+Q.slice(te);break;default:j=Q+_+j+I;break}return a(j)}return $.toString=function(){return f+""},$}function u(f,d){var h=c((f=Ua(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor($i(d)/3)))*3,p=Math.pow(10,-m),g=Jb[8+m/3];return function(v){return h(p*v)+g}}return{format:c,formatPrefix:u}}var pl,yd,Qb;r5({thousands:",",grouping:[3],currency:["$",""]});function r5(e){return pl=t5(e),yd=pl.format,Qb=pl.formatPrefix,pl}function n5(e){return Math.max(0,-$i(Math.abs(e)))}function i5(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($i(t)/3)))*3-$i(Math.abs(e)))}function a5(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$i(t)-$i(e))+1}function ex(e,t,r,n){var i=id(e,t,r),a;switch(n=Ua(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=i5(i,o))&&(n.precision=a),Qb(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=a5(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=n5(i))&&(n.precision=a-(n.type==="%")*2);break}}return yd(n)}function pn(e){var t=e.domain;return e.ticks=function(r){var n=t();return rd(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return ex(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,c,u=10;for(s<o&&(c=o,o=s,s=c,c=i,i=a,a=c);u-- >0;){if(c=nd(o,s,r),c===l)return n[i]=o,n[a]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function tx(){var e=gd();return e.copy=function(){return Ha(e,tx())},sr.apply(e,arguments),pn(e)}function rx(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,fl),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rx(e).unknown(t)},e=arguments.length?Array.from(e,fl):[0,1],pn(r)}function nx(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function ix(e){return Math.log(e)}function ax(e){return Math.exp(e)}function o5(e){return-Math.log(-e)}function s5(e){return-Math.exp(-e)}function l5(e){return isFinite(e)?+("1e"+e):e<0?0:e}function c5(e){return e===10?l5:e===Math.E?Math.exp:t=>Math.pow(e,t)}function u5(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ox(e){return(t,r)=>-e(-t,r)}function bd(e){const t=e(ix,ax),r=t.domain;let n=10,i,a;function o(){return i=u5(n),a=c5(n),r()[0]<0?(i=ox(i),a=ox(a),e(o5,s5)):e(ix,ax),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let d=i(c),h=i(u),m,p;const g=s==null?10:+s;let v=[];if(!(n%1)&&h-d<g){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(m=1;m<n;++m)if(p=d<0?m/a(-d):m*a(d),!(p<c)){if(p>u)break;v.push(p)}}else for(;d<=h;++d)for(m=n-1;m>=1;--m)if(p=d>0?m/a(-d):m*a(d),!(p<c)){if(p>u)break;v.push(p)}v.length*2<g&&(v=rd(c,u,g))}else v=rd(d,h,Math.min(h-d,g)).map(a);return f?v.reverse():v},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ua(l)).precision==null&&(l.trim=!0),l=yd(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let f=u/a(Math.round(i(u)));return f*n<n-.5&&(f*=n),f<=c?l(u):""}},t.nice=()=>r(nx(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function sx(){const e=bd(dl()).domain([1,10]);return e.copy=()=>Ha(e,sx()).base(e.base()),sr.apply(e,arguments),e}function lx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function cx(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function xd(e){var t=1,r=e(lx(t),cx(t));return r.constant=function(n){return arguments.length?e(lx(t=+n),cx(t)):t},pn(r)}function ux(){var e=xd(dl());return e.copy=function(){return Ha(e,ux()).constant(e.constant())},sr.apply(e,arguments)}function fx(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function f5(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function d5(e){return e<0?-e*e:e*e}function wd(e){var t=e(kt,kt),r=1;function n(){return r===1?e(kt,kt):r===.5?e(f5,d5):e(fx(r),fx(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},pn(t)}function _d(){var e=wd(dl());return e.copy=function(){return Ha(e,_d()).exponent(e.exponent())},sr.apply(e,arguments),e}function h5(){return _d.apply(null,arguments).exponent(.5)}function dx(e){return Math.sign(e)*e*e}function p5(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function hx(){var e=gd(),t=[0,1],r=!1,n;function i(a){var o=p5(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(dx(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,fl)).map(dx)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return hx(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sr.apply(i,arguments),pn(i)}function px(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=yN(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[La(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(hn),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return px().domain(e).range(t).unknown(n)},sr.apply(a,arguments)}function mx(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[La(n,l,0,r)]:a}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return mx().domain([e,t]).range(i).unknown(a)},sr.apply(pn(o),arguments)}function gx(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[La(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return gx().domain(e).range(t).unknown(r)},sr.apply(i,arguments)}const Sd=new Date,Od=new Date;function lt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let c;do l.push(c=new Date(+a)),t(a,s),e(a);while(c<a&&a<o);return l},i.filter=a=>lt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Sd.setTime(+a),Od.setTime(+o),e(Sd),e(Od),Math.floor(r(Sd,Od))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const ml=lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ml.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ml),ml.range;const Hr=1e3,lr=Hr*60,Ur=lr*60,Kr=Ur*24,Ad=Kr*7,vx=Kr*30,Ed=Kr*365,Gn=lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getUTCSeconds());Gn.range;const Pd=lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Hr)},(e,t)=>{e.setTime(+e+t*lr)},(e,t)=>(t-e)/lr,e=>e.getMinutes());Pd.range;const Cd=lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*lr)},(e,t)=>(t-e)/lr,e=>e.getUTCMinutes());Cd.range;const kd=lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Hr-e.getMinutes()*lr)},(e,t)=>{e.setTime(+e+t*Ur)},(e,t)=>(t-e)/Ur,e=>e.getHours());kd.range;const Td=lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ur)},(e,t)=>(t-e)/Ur,e=>e.getUTCHours());Td.range;const Ka=lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lr)/Kr,e=>e.getDate()-1);Ka.range;const gl=lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>e.getUTCDate()-1);gl.range;const yx=lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>Math.floor(e/Kr));yx.range;function Xn(e){return lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*lr)/Ad)}const vl=Xn(0),yl=Xn(1),m5=Xn(2),g5=Xn(3),Ri=Xn(4),v5=Xn(5),y5=Xn(6);vl.range,yl.range,m5.range,g5.range,Ri.range,v5.range,y5.range;function Zn(e){return lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Ad)}const bl=Zn(0),xl=Zn(1),b5=Zn(2),x5=Zn(3),Li=Zn(4),w5=Zn(5),_5=Zn(6);bl.range,xl.range,b5.range,x5.range,Li.range,w5.range,_5.range;const Md=lt(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());Md.range;const jd=lt(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());jd.range;const qr=lt(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());qr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}),qr.range;const Yr=lt(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());Yr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}),Yr.range;function bx(e,t,r,n,i,a){const o=[[Gn,1,Hr],[Gn,5,5*Hr],[Gn,15,15*Hr],[Gn,30,30*Hr],[a,1,lr],[a,5,5*lr],[a,15,15*lr],[a,30,30*lr],[i,1,Ur],[i,3,3*Ur],[i,6,6*Ur],[i,12,12*Ur],[n,1,Kr],[n,2,2*Kr],[r,1,Ad],[t,1,vx],[t,3,3*vx],[e,1,Ed]];function s(c,u,f){const d=u<c;d&&([c,u]=[u,c]);const h=f&&typeof f.range=="function"?f:l(c,u,f),m=h?h.range(c,+u+1):[];return d?m.reverse():m}function l(c,u,f){const d=Math.abs(u-c)/f,h=td(([,,g])=>g).right(o,d);if(h===o.length)return e.every(id(c/Ed,u/Ed,f));if(h===0)return ml.every(Math.max(id(c,u,f),1));const[m,p]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return m.every(p)}return[s,l]}const[S5,O5]=bx(Yr,jd,bl,yx,Td,Cd),[A5,E5]=bx(qr,Md,vl,Ka,kd,Pd);function Dd(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Nd(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qa(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function P5(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Ya(i),u=Ga(i),f=Ya(a),d=Ga(a),h=Ya(o),m=Ga(o),p=Ya(s),g=Ga(s),v=Ya(l),b=Ga(l),x={a:H,A:te,b:Q,B:F,c:null,d:Ax,e:Ax,f:X5,g:oI,G:lI,H:q5,I:Y5,j:G5,L:Ex,m:Z5,M:J5,p:U,q:V,Q:jx,s:Dx,S:Q5,u:eI,U:tI,V:rI,w:nI,W:iI,x:null,X:null,y:aI,Y:sI,Z:cI,"%":Mx},S={a:re,A:Z,b:J,B:ee,c:null,d:Cx,e:Cx,f:hI,g:SI,G:AI,H:uI,I:fI,j:dI,L:kx,m:pI,M:mI,p:oe,q:le,Q:jx,s:Dx,S:gI,u:vI,U:yI,V:bI,w:xI,W:wI,x:null,X:null,y:_I,Y:OI,Z:EI,"%":Mx},w={a:$,A:j,b:_,B:I,c:D,d:Sx,e:Sx,f:V5,g:_x,G:wx,H:Ox,I:Ox,j:F5,L:W5,m:L5,M:B5,p:M,q:R5,Q:U5,s:K5,S:z5,u:j5,U:D5,V:N5,w:M5,W:I5,x:L,X:W,y:_x,Y:wx,Z:$5,"%":H5};x.x=O(r,x),x.X=O(n,x),x.c=O(t,x),S.x=O(r,S),S.X=O(n,S),S.c=O(t,S);function O(B,K){return function(ne){var T=[],De=-1,pe=0,tt=B.length,dt,Nr,$o;for(ne instanceof Date||(ne=new Date(+ne));++De<tt;)B.charCodeAt(De)===37&&(T.push(B.slice(pe,De)),(Nr=xx[dt=B.charAt(++De)])!=null?dt=B.charAt(++De):Nr=dt==="e"?" ":"0",($o=K[dt])&&(dt=$o(ne,Nr)),T.push(dt),pe=De+1);return T.push(B.slice(pe,De)),T.join("")}}function E(B,K){return function(ne){var T=qa(1900,void 0,1),De=C(T,B,ne+="",0),pe,tt;if(De!=ne.length)return null;if("Q"in T)return new Date(T.Q);if("s"in T)return new Date(T.s*1e3+("L"in T?T.L:0));if(K&&!("Z"in T)&&(T.Z=0),"p"in T&&(T.H=T.H%12+T.p*12),T.m===void 0&&(T.m="q"in T?T.q:0),"V"in T){if(T.V<1||T.V>53)return null;"w"in T||(T.w=1),"Z"in T?(pe=Nd(qa(T.y,0,1)),tt=pe.getUTCDay(),pe=tt>4||tt===0?xl.ceil(pe):xl(pe),pe=gl.offset(pe,(T.V-1)*7),T.y=pe.getUTCFullYear(),T.m=pe.getUTCMonth(),T.d=pe.getUTCDate()+(T.w+6)%7):(pe=Dd(qa(T.y,0,1)),tt=pe.getDay(),pe=tt>4||tt===0?yl.ceil(pe):yl(pe),pe=Ka.offset(pe,(T.V-1)*7),T.y=pe.getFullYear(),T.m=pe.getMonth(),T.d=pe.getDate()+(T.w+6)%7)}else("W"in T||"U"in T)&&("w"in T||(T.w="u"in T?T.u%7:"W"in T?1:0),tt="Z"in T?Nd(qa(T.y,0,1)).getUTCDay():Dd(qa(T.y,0,1)).getDay(),T.m=0,T.d="W"in T?(T.w+6)%7+T.W*7-(tt+5)%7:T.w+T.U*7-(tt+6)%7);return"Z"in T?(T.H+=T.Z/100|0,T.M+=T.Z%100,Nd(T)):Dd(T)}}function C(B,K,ne,T){for(var De=0,pe=K.length,tt=ne.length,dt,Nr;De<pe;){if(T>=tt)return-1;if(dt=K.charCodeAt(De++),dt===37){if(dt=K.charAt(De++),Nr=w[dt in xx?K.charAt(De++):dt],!Nr||(T=Nr(B,ne,T))<0)return-1}else if(dt!=ne.charCodeAt(T++))return-1}return T}function M(B,K,ne){var T=c.exec(K.slice(ne));return T?(B.p=u.get(T[0].toLowerCase()),ne+T[0].length):-1}function $(B,K,ne){var T=h.exec(K.slice(ne));return T?(B.w=m.get(T[0].toLowerCase()),ne+T[0].length):-1}function j(B,K,ne){var T=f.exec(K.slice(ne));return T?(B.w=d.get(T[0].toLowerCase()),ne+T[0].length):-1}function _(B,K,ne){var T=v.exec(K.slice(ne));return T?(B.m=b.get(T[0].toLowerCase()),ne+T[0].length):-1}function I(B,K,ne){var T=p.exec(K.slice(ne));return T?(B.m=g.get(T[0].toLowerCase()),ne+T[0].length):-1}function D(B,K,ne){return C(B,t,K,ne)}function L(B,K,ne){return C(B,r,K,ne)}function W(B,K,ne){return C(B,n,K,ne)}function H(B){return o[B.getDay()]}function te(B){return a[B.getDay()]}function Q(B){return l[B.getMonth()]}function F(B){return s[B.getMonth()]}function U(B){return i[+(B.getHours()>=12)]}function V(B){return 1+~~(B.getMonth()/3)}function re(B){return o[B.getUTCDay()]}function Z(B){return a[B.getUTCDay()]}function J(B){return l[B.getUTCMonth()]}function ee(B){return s[B.getUTCMonth()]}function oe(B){return i[+(B.getUTCHours()>=12)]}function le(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var K=O(B+="",x);return K.toString=function(){return B},K},parse:function(B){var K=E(B+="",!1);return K.toString=function(){return B},K},utcFormat:function(B){var K=O(B+="",S);return K.toString=function(){return B},K},utcParse:function(B){var K=E(B+="",!0);return K.toString=function(){return B},K}}}var xx={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,C5=/^%/,k5=/[\\^$*+?|[\]().{}]/g;function ve(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function T5(e){return e.replace(k5,"\\$&")}function Ya(e){return new RegExp("^(?:"+e.map(T5).join("|")+")","i")}function Ga(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function M5(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function j5(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function D5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function N5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function I5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function wx(e,t,r){var n=mt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function _x(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function $5(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function R5(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function L5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Sx(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function F5(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Ox(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function B5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function z5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function W5(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function V5(e,t,r){var n=mt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function H5(e,t,r){var n=C5.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function U5(e,t,r){var n=mt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function K5(e,t,r){var n=mt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Ax(e,t){return ve(e.getDate(),t,2)}function q5(e,t){return ve(e.getHours(),t,2)}function Y5(e,t){return ve(e.getHours()%12||12,t,2)}function G5(e,t){return ve(1+Ka.count(qr(e),e),t,3)}function Ex(e,t){return ve(e.getMilliseconds(),t,3)}function X5(e,t){return Ex(e,t)+"000"}function Z5(e,t){return ve(e.getMonth()+1,t,2)}function J5(e,t){return ve(e.getMinutes(),t,2)}function Q5(e,t){return ve(e.getSeconds(),t,2)}function eI(e){var t=e.getDay();return t===0?7:t}function tI(e,t){return ve(vl.count(qr(e)-1,e),t,2)}function Px(e){var t=e.getDay();return t>=4||t===0?Ri(e):Ri.ceil(e)}function rI(e,t){return e=Px(e),ve(Ri.count(qr(e),e)+(qr(e).getDay()===4),t,2)}function nI(e){return e.getDay()}function iI(e,t){return ve(yl.count(qr(e)-1,e),t,2)}function aI(e,t){return ve(e.getFullYear()%100,t,2)}function oI(e,t){return e=Px(e),ve(e.getFullYear()%100,t,2)}function sI(e,t){return ve(e.getFullYear()%1e4,t,4)}function lI(e,t){var r=e.getDay();return e=r>=4||r===0?Ri(e):Ri.ceil(e),ve(e.getFullYear()%1e4,t,4)}function cI(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ve(t/60|0,"0",2)+ve(t%60,"0",2)}function Cx(e,t){return ve(e.getUTCDate(),t,2)}function uI(e,t){return ve(e.getUTCHours(),t,2)}function fI(e,t){return ve(e.getUTCHours()%12||12,t,2)}function dI(e,t){return ve(1+gl.count(Yr(e),e),t,3)}function kx(e,t){return ve(e.getUTCMilliseconds(),t,3)}function hI(e,t){return kx(e,t)+"000"}function pI(e,t){return ve(e.getUTCMonth()+1,t,2)}function mI(e,t){return ve(e.getUTCMinutes(),t,2)}function gI(e,t){return ve(e.getUTCSeconds(),t,2)}function vI(e){var t=e.getUTCDay();return t===0?7:t}function yI(e,t){return ve(bl.count(Yr(e)-1,e),t,2)}function Tx(e){var t=e.getUTCDay();return t>=4||t===0?Li(e):Li.ceil(e)}function bI(e,t){return e=Tx(e),ve(Li.count(Yr(e),e)+(Yr(e).getUTCDay()===4),t,2)}function xI(e){return e.getUTCDay()}function wI(e,t){return ve(xl.count(Yr(e)-1,e),t,2)}function _I(e,t){return ve(e.getUTCFullYear()%100,t,2)}function SI(e,t){return e=Tx(e),ve(e.getUTCFullYear()%100,t,2)}function OI(e,t){return ve(e.getUTCFullYear()%1e4,t,4)}function AI(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Li(e):Li.ceil(e),ve(e.getUTCFullYear()%1e4,t,4)}function EI(){return"+0000"}function Mx(){return"%"}function jx(e){return+e}function Dx(e){return Math.floor(+e/1e3)}var Fi,Nx,Ix;PI({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 PI(e){return Fi=P5(e),Nx=Fi.format,Fi.parse,Ix=Fi.utcFormat,Fi.utcParse,Fi}function CI(e){return new Date(e)}function kI(e){return e instanceof Date?+e:+new Date(+e)}function Id(e,t,r,n,i,a,o,s,l,c){var u=gd(),f=u.invert,d=u.domain,h=c(".%L"),m=c(":%S"),p=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),b=c("%b %d"),x=c("%B"),S=c("%Y");function w(O){return(l(O)<O?h:s(O)<O?m:o(O)<O?p:a(O)<O?g:n(O)<O?i(O)<O?v:b:r(O)<O?x:S)(O)}return u.invert=function(O){return new Date(f(O))},u.domain=function(O){return arguments.length?d(Array.from(O,kI)):d().map(CI)},u.ticks=function(O){var E=d();return e(E[0],E[E.length-1],O??10)},u.tickFormat=function(O,E){return E==null?w:c(E)},u.nice=function(O){var E=d();return(!O||typeof O.range!="function")&&(O=t(E[0],E[E.length-1],O??10)),O?d(nx(E,O)):u},u.copy=function(){return Ha(u,Id(e,t,r,n,i,a,o,s,l,c))},u}function TI(){return sr.apply(Id(A5,E5,qr,Md,vl,Ka,kd,Pd,Gn,Nx).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function MI(){return sr.apply(Id(S5,O5,Yr,jd,bl,gl,Td,Cd,Gn,Ix).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function wl(){var e=0,t=1,r,n,i,a,o=kt,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(o=f,c):o};function u(f){return function(d){var h,m;return arguments.length?([h,m]=d,o=f(h,m),c):[o(0),o(1)]}}return c.range=u(Ii),c.rangeRound=u(pd),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),c}}function mn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function $x(){var e=pn(wl()(kt));return e.copy=function(){return mn(e,$x())},Vr.apply(e,arguments)}function Rx(){var e=bd(wl()).domain([1,10]);return e.copy=function(){return mn(e,Rx()).base(e.base())},Vr.apply(e,arguments)}function Lx(){var e=xd(wl());return e.copy=function(){return mn(e,Lx()).constant(e.constant())},Vr.apply(e,arguments)}function $d(){var e=wd(wl());return e.copy=function(){return mn(e,$d()).exponent(e.exponent())},Vr.apply(e,arguments)}function jI(){return $d.apply(null,arguments).exponent(.5)}function Fx(){var e=[],t=kt;function r(n){if(n!=null&&!isNaN(n=+n))return t((La(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(hn),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>vN(e,a/n))},r.copy=function(){return Fx(t).domain(e)},Vr.apply(r,arguments)}function _l(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,c=kt,u,f=!1,d;function h(p){return isNaN(p=+p)?d:(p=.5+((p=+u(p))-a)*(n*p<n*a?s:l),c(f?Math.max(0,Math.min(1,p)):p))}h.domain=function(p){return arguments.length?([e,t,r]=p,i=u(e=+e),a=u(t=+t),o=u(r=+r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(p){return arguments.length?(f=!!p,h):f},h.interpolator=function(p){return arguments.length?(c=p,h):c};function m(p){return function(g){var v,b,x;return arguments.length?([v,b,x]=g,c=HN(p,[v,b,x]),h):[c(0),c(.5),c(1)]}}return h.range=m(Ii),h.rangeRound=m(pd),h.unknown=function(p){return arguments.length?(d=p,h):d},function(p){return u=p,i=p(e),a=p(t),o=p(r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function Bx(){var e=pn(_l()(kt));return e.copy=function(){return mn(e,Bx())},Vr.apply(e,arguments)}function zx(){var e=bd(_l()).domain([.1,1,10]);return e.copy=function(){return mn(e,zx()).base(e.base())},Vr.apply(e,arguments)}function Wx(){var e=xd(_l());return e.copy=function(){return mn(e,Wx()).constant(e.constant())},Vr.apply(e,arguments)}function Rd(){var e=wd(_l());return e.copy=function(){return mn(e,Rd()).exponent(e.exponent())},Vr.apply(e,arguments)}function DI(){return Rd.apply(null,arguments).exponent(.5)}const Xa=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:sd,scaleDiverging:Bx,scaleDivergingLog:zx,scaleDivergingPow:Rd,scaleDivergingSqrt:DI,scaleDivergingSymlog:Wx,scaleIdentity:rx,scaleImplicit:ad,scaleLinear:tx,scaleLog:sx,scaleOrdinal:od,scalePoint:xN,scalePow:_d,scaleQuantile:px,scaleQuantize:mx,scaleRadial:hx,scaleSequential:$x,scaleSequentialLog:Rx,scaleSequentialPow:$d,scaleSequentialQuantile:Fx,scaleSequentialSqrt:jI,scaleSequentialSymlog:Lx,scaleSqrt:h5,scaleSymlog:ux,scaleThreshold:gx,scaleTime:TI,scaleUtc:MI,tickFormat:ex},Symbol.toStringTag,{value:"Module"}));var gn=e=>e.chartData,Ld=N([gn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Sl=(e,t,r,n)=>n?Ld(e):gn(e);function Bi(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Yt(t)&&Yt(r))return!0}return!1}function Vx(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function NI(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(Yt(r))i=r;else if(typeof r=="function")return;if(Yt(n))a=n;else if(typeof n=="function")return;var o=[i,a];if(Bi(o))return o}}function II(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Bi(n))return Vx(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i==="auto")t!=null&&(o=Math.min(...t));else if(X(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i=="string"&&$0.test(i)){var l=$0.exec(i);if(l==null||t==null)o=void 0;else{var c=+l[1];o=t[0]-c}}else o=t?.[0];if(a==="auto")t!=null&&(s=Math.max(...t));else if(X(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&R0.test(a)){var u=R0.exec(a);if(u==null||t==null)s=void 0;else{var f=+u[1];s=t[1]+f}}else s=t?.[1];var d=[o,s];if(Bi(d))return t==null?d:Vx(d,t,r)}}}var zi=1e9,$I={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},zd,We=!0,cr="[DecimalError] ",Jn=cr+"Invalid argument: ",Fd=cr+"Exponent out of range: ",Wi=Math.floor,Qn=Math.pow,RI=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gt,gt=1e7,Le=7,Hx=9007199254740991,Ol=Wi(Hx/Le),Y={};Y.absoluteValue=Y.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},Y.comparedTo=Y.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1},Y.decimalPlaces=Y.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},Y.dividedBy=Y.div=function(e){return Gr(this,new this.constructor(e))},Y.dividedToIntegerBy=Y.idiv=function(e){var t=this,r=t.constructor;return Me(Gr(t,new r(e),0,1),r.precision)},Y.equals=Y.eq=function(e){return!this.cmp(e)},Y.exponent=function(){return at(this)},Y.greaterThan=Y.gt=function(e){return this.cmp(e)>0},Y.greaterThanOrEqualTo=Y.gte=function(e){return this.cmp(e)>=0},Y.isInteger=Y.isint=function(){return this.e>this.d.length-2},Y.isNegative=Y.isneg=function(){return this.s<0},Y.isPositive=Y.ispos=function(){return this.s>0},Y.isZero=function(){return this.s===0},Y.lessThan=Y.lt=function(e){return this.cmp(e)<0},Y.lessThanOrEqualTo=Y.lte=function(e){return this.cmp(e)<1},Y.logarithm=Y.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Gt))throw Error(cr+"NaN");if(r.s<1)throw Error(cr+(r.s?"NaN":"-Infinity"));return r.eq(Gt)?new n(0):(We=!1,t=Gr(Za(r,a),Za(e,a),a),We=!0,Me(t,i))},Y.minus=Y.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Yx(t,e):Ux(t,(e.s=-e.s,e))},Y.modulo=Y.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(cr+"NaN");return r.s?(We=!1,t=Gr(r,e,0,1).times(e),We=!0,r.minus(t)):Me(new n(r),i)},Y.naturalExponential=Y.exp=function(){return Kx(this)},Y.naturalLogarithm=Y.ln=function(){return Za(this)},Y.negated=Y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},Y.plus=Y.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ux(t,e):Yx(t,(e.s=-e.s,e))},Y.precision=Y.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Jn+e);if(t=at(i)+1,n=i.d.length-1,r=n*Le+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},Y.squareRoot=Y.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(cr+"NaN")}for(e=at(s),We=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Cr(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Wi((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Gr(s,a,o+2)).times(.5),Cr(a.d).slice(0,o)===(t=Cr(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Me(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return We=!0,Me(n,r)},Y.times=Y.mul=function(e){var t,r,n,i,a,o,s,l,c,u=this,f=u.constructor,d=u.d,h=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,r=u.e+e.e,l=d.length,c=h.length,l<c&&(a=d,d=h,h=a,o=l,l=c,c=o),a=[],o=l+c,n=o;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=l+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%gt|0,t=s/gt|0;a[i]=(a[i]+t)%gt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,We?Me(e,f.precision):e},Y.toDecimalPlaces=Y.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Pr(e,0,zi),t===void 0?t=n.rounding:Pr(t,0,8),Me(r,e+at(r)+1,t))},Y.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ei(n,!0):(Pr(e,0,zi),t===void 0?t=i.rounding:Pr(t,0,8),n=Me(new i(n),e+1,t),r=ei(n,!0,e+1)),r},Y.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?ei(i):(Pr(e,0,zi),t===void 0?t=a.rounding:Pr(t,0,8),n=Me(new a(i),e+at(i)+1,t),r=ei(n.abs(),!1,e+at(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)},Y.toInteger=Y.toint=function(){var e=this,t=e.constructor;return Me(new t(e),at(e)+1,t.rounding)},Y.toNumber=function(){return+this},Y.toPower=Y.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(Gt);if(s=new l(s),!s.s){if(e.s<1)throw Error(cr+"Infinity");return s}if(s.eq(Gt))return s;if(n=l.precision,e.eq(Gt))return Me(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=u<0?-u:u)<=Hx){for(i=new l(Gt),t=Math.ceil(n/Le+4),We=!1;r%2&&(i=i.times(s),Gx(i.d,t)),r=Wi(r/2),r!==0;)s=s.times(s),Gx(s.d,t);return We=!0,e.s<0?new l(Gt).div(i):Me(i,n)}}else if(a<0)throw Error(cr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,We=!1,i=e.times(Za(s,n+c)),We=!0,i=Kx(i),i.s=a,i},Y.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=at(i),n=ei(i,r<=a.toExpNeg||r>=a.toExpPos)):(Pr(e,1,zi),t===void 0?t=a.rounding:Pr(t,0,8),i=Me(new a(i),e,t),r=at(i),n=ei(i,e<=r||r<=a.toExpNeg,e)),n},Y.toSignificantDigits=Y.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Pr(e,1,zi),t===void 0?t=n.rounding:Pr(t,0,8)),Me(new n(r),e,t)},Y.toString=Y.valueOf=Y.val=Y.toJSON=Y[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=at(e),r=e.constructor;return ei(e,t<=r.toExpNeg||t>=r.toExpPos)};function Ux(e,t){var r,n,i,a,o,s,l,c,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),We?Me(t,f):t;if(l=e.d,c=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=c.length):(n=c,i=o,s=l.length),o=Math.ceil(f/Le),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,n=c,c=l,l=n),r=0;a;)r=(l[--a]=l[a]+c[a]+r)/gt|0,l[a]%=gt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,We?Me(t,f):t}function Pr(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Jn+e)}function Cr(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Le-n.length,r&&(a+=vn(r)),a+=n;o=e[t],n=o+"",r=Le-n.length,r&&(a+=vn(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Gr=(function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%gt|0,o=a/gt|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(n[s]!=i[s]){l=n[s]>i[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*gt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,l,c,u,f,d,h,m,p,g,v,b,x,S,w,O,E,C,M=n.constructor,$=n.s==i.s?1:-1,j=n.d,_=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(cr+"Division by zero");for(l=n.e-i.e,E=_.length,w=j.length,h=new M($),m=h.d=[],c=0;_[c]==(j[c]||0);)++c;if(_[c]>(j[c]||0)&&--l,a==null?b=a=M.precision:o?b=a+(at(n)-at(i))+1:b=a,b<0)return new M(0);if(b=b/Le+2|0,c=0,E==1)for(u=0,_=_[0],b++;(c<w||u)&&b--;c++)x=u*gt+(j[c]||0),m[c]=x/_|0,u=x%_|0;else{for(u=gt/(_[0]+1)|0,u>1&&(_=e(_,u),j=e(j,u),E=_.length,w=j.length),S=E,p=j.slice(0,E),g=p.length;g<E;)p[g++]=0;C=_.slice(),C.unshift(0),O=_[0],_[1]>=gt/2&&++O;do u=0,s=t(_,p,E,g),s<0?(v=p[0],E!=g&&(v=v*gt+(p[1]||0)),u=v/O|0,u>1?(u>=gt&&(u=gt-1),f=e(_,u),d=f.length,g=p.length,s=t(f,p,d,g),s==1&&(u--,r(f,E<d?C:_,d))):(u==0&&(s=u=1),f=_.slice()),d=f.length,d<g&&f.unshift(0),r(p,f,g),s==-1&&(g=p.length,s=t(_,p,E,g),s<1&&(u++,r(p,E<g?C:_,g))),g=p.length):s===0&&(u++,p=[0]),m[c++]=u,s&&p[0]?p[g++]=j[S]||0:(p=[j[S]],g=1);while((S++<w||p[0]!==void 0)&&b--)}return m[0]||m.shift(),h.e=l,Me(h,o?a+at(h)+1:a)}})();function Kx(e,t){var r,n,i,a,o,s,l=0,c=0,u=e.constructor,f=u.precision;if(at(e)>16)throw Error(Fd+at(e));if(!e.s)return new u(Gt);for(We=!1,s=f,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(Qn(2,c))/Math.LN10*2+5|0,s+=n,r=i=a=new u(Gt),u.precision=s;;){if(i=Me(i.times(e),s),r=r.times(++l),o=a.plus(Gr(i,r,s)),Cr(o.d).slice(0,s)===Cr(a.d).slice(0,s)){for(;c--;)a=Me(a.times(a),s);return u.precision=f,t==null?(We=!0,Me(a,f)):a}a=o}}function at(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function Bd(e,t,r){if(t>e.LN10.sd())throw We=!0,r&&(e.precision=r),Error(cr+"LN10 precision limit exceeded");return Me(new e(e.LN10),t)}function vn(e){for(var t="";e--;)t+="0";return t}function Za(e,t){var r,n,i,a,o,s,l,c,u,f=1,d=10,h=e,m=h.d,p=h.constructor,g=p.precision;if(h.s<1)throw Error(cr+(h.s?"NaN":"-Infinity"));if(h.eq(Gt))return new p(0);if(t==null?(We=!1,c=g):c=t,h.eq(10))return t==null&&(We=!0),Bd(p,c);if(c+=d,p.precision=c,r=Cr(m),n=r.charAt(0),a=at(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Cr(h.d),n=r.charAt(0),f++;a=at(h),n>1?(h=new p("0."+r),a++):h=new p(n+"."+r.slice(1))}else return l=Bd(p,c+2,g).times(a+""),h=Za(new p(n+"."+r.slice(1)),c-d).plus(l),p.precision=g,t==null?(We=!0,Me(h,g)):h;for(s=o=h=Gr(h.minus(Gt),h.plus(Gt),c),u=Me(h.times(h),c),i=3;;){if(o=Me(o.times(u),c),l=s.plus(Gr(o,new p(i),c)),Cr(l.d).slice(0,c)===Cr(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(Bd(p,c+2,g).times(a+""))),s=Gr(s,new p(f),c),p.precision=g,t==null?(We=!0,Me(s,g)):s;s=l,i+=2}}function qx(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Wi(r/Le),e.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Le;n<i;)e.d.push(+t.slice(n,n+=Le));t=t.slice(n),n=Le-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),We&&(e.e>Ol||e.e<-Ol))throw Error(Fd+r)}else e.s=0,e.e=0,e.d=[0];return e}function Me(e,t,r){var n,i,a,o,s,l,c,u,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Le,i=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Le),a=f.length,u>=a)return e;for(c=a=f[u],o=1;a>=10;a/=10)o++;n%=Le,i=n-Le+o}if(r!==void 0&&(a=Qn(10,o-i-1),s=c/a%10|0,l=t<0||f[u+1]!==void 0||c%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?c/Qn(10,o-i):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=at(e),f.length=1,t=t-a-1,f[0]=Qn(10,(Le-t%Le)%Le),e.e=Wi(-t/Le)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=u,a=1,u--):(f.length=u+1,a=Qn(10,Le-n),f[u]=i>0?(c/Qn(10,o-i)%Qn(10,i)|0)*a:0),l)for(;;)if(u==0){(f[0]+=a)==gt&&(f[0]=1,++e.e);break}else{if(f[u]+=a,f[u]!=gt)break;f[u--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(We&&(e.e>Ol||e.e<-Ol))throw Error(Fd+at(e));return e}function Yx(e,t){var r,n,i,a,o,s,l,c,u,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),We?Me(t,h):t;if(l=e.d,f=t.d,n=t.e,c=e.e,l=l.slice(),o=c-n,o){for(u=o<0,u?(r=l,o=-o,s=f.length):(r=f,n=c,s=l.length),i=Math.max(Math.ceil(h/Le),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=f[i]){u=l[i]<f[i];break}o=0}for(u&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,i=f.length-s;i>0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]<f[i]){for(a=i;a&&l[--a]===0;)l[a]=gt-1;--l[a],l[i]+=gt}l[i]-=f[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,We?Me(t,h):t):new d(0)}function ei(e,t,r){var n,i=at(e),a=Cr(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+vn(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+vn(-i-1)+a,r&&(n=r-o)>0&&(a+=vn(n))):i>=o?(a+=vn(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+vn(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=vn(n))),e.s<0?"-"+a:a}function Gx(e,t){if(e.length>t)return e.length=t,!0}function Xx(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Jn+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return qx(o,a.toString())}else if(typeof a!="string")throw Error(Jn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,RI.test(a))qx(o,a);else throw Error(Jn+a)}if(i.prototype=Y,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Xx,i.config=i.set=LI,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function LI(e){if(!e||typeof e!="object")throw Error(cr+"Object expected");var t,r,n,i=["precision",1,zi,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Wi(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Jn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Jn+r+": "+n);return this}var zd=Xx($I);Gt=new zd(1);const Pe=zd;var FI=e=>e,Zx={},Jx=e=>e===Zx,Qx=e=>function t(){return arguments.length===0||arguments.length===1&&Jx(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},e1=(e,t)=>e===1?t:Qx(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n.filter(o=>o!==Zx).length;return a>=e?t(...n):e1(e-a,Qx(function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];var c=n.map(u=>Jx(u)?s.shift():u);return t(...c,...s)}))}),Al=e=>e1(e.length,e),Wd=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},BI=Al((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),zI=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return FI;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce((s,l)=>l(s),a(...arguments))}},Vd=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),t1=e=>{var t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t&&i.every((o,s)=>{var l;return o===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,r=e(...i)),r}};function r1(e){var t;return e===0?t=1:t=Math.floor(new Pe(e).abs().log(10).toNumber())+1,t}function n1(e,t,r){for(var n=new Pe(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}Al((e,t,r)=>{var n=+e,i=+t;return n+r*(i-n)}),Al((e,t,r)=>{var n=t-+e;return n=n||1/0,(r-e)/n}),Al((e,t,r)=>{var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});var i1=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},a1=(e,t,r)=>{if(e.lte(0))return new Pe(0);var n=r1(e.toNumber()),i=new Pe(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Pe(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?new Pe(l.toNumber()):new Pe(Math.ceil(l.toNumber()))},WI=(e,t,r)=>{var n=new Pe(1),i=new Pe(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Pe(10).pow(r1(e)-1),i=new Pe(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Pe(Math.floor(e)))}else e===0?i=new Pe(Math.floor((t-1)/2)):r||(i=new Pe(Math.floor(e)));var o=Math.floor((t-1)/2),s=zI(BI(l=>i.add(new Pe(l-o).mul(n)).toNumber()),Wd);return s(0,t)},o1=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Pe(0),tickMin:new Pe(0),tickMax:new Pe(0)};var o=a1(new Pe(r).sub(t).div(n-1),i,a),s;t<=0&&r>=0?s=new Pe(0):(s=new Pe(t).add(r).div(2),s=s.sub(new Pe(s).mod(o)));var l=Math.ceil(s.sub(t).div(o).toNumber()),c=Math.ceil(new Pe(r).sub(s).div(o).toNumber()),u=l+c+1;return u>n?o1(t,r,n,i,a+1):(u<n&&(c=r>0?c+(n-u):c,l=r>0?l:l+(n-u)),{step:o,tickMin:s.sub(new Pe(l).mul(o)),tickMax:s.add(new Pe(c).mul(o))})};function VI(e){var[t,r]=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(n,2),[o,s]=i1([t,r]);if(o===-1/0||s===1/0){var l=s===1/0?[o,...Wd(0,n-1).map(()=>1/0)]:[...Wd(0,n-1).map(()=>-1/0),s];return t>r?Vd(l):l}if(o===s)return WI(o,n,i);var{step:c,tickMin:u,tickMax:f}=o1(o,s,a,i,0),d=n1(u,f.add(new Pe(.1).mul(c)),c);return t>r?Vd(d):d}function HI(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,o]=i1([r,n]);if(a===-1/0||o===1/0)return[r,n];if(a===o)return[a];var s=Math.max(t,2),l=a1(new Pe(o).sub(a).div(s-1),i,0),c=[...n1(new Pe(a),new Pe(o),l),o];return i===!1&&(c=c.map(u=>Math.round(u))),r>n?Vd(c):c}var UI=t1(VI),KI=t1(HI),s1=e=>e.rootProps.maxBarSize,qI=e=>e.rootProps.barGap,l1=e=>e.rootProps.barCategoryGap,YI=e=>e.rootProps.barSize,Ja=e=>e.rootProps.stackOffset,Hd=e=>e.options.chartName,Ud=e=>e.rootProps.syncId,c1=e=>e.rootProps.syncMethod,Kd=e=>e.options.eventEmitter,Xr={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Xt={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},El=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},GI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Xr.angleAxisId,includeHidden:!1,name:void 0,reversed:Xr.reversed,scale:Xr.scale,tick:Xr.tick,tickCount:void 0,ticks:void 0,type:Xr.type,unit:void 0},XI={allowDataOverflow:Xt.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Xt.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Xt.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Xt.scale,tick:Xt.tick,tickCount:Xt.tickCount,ticks:void 0,type:Xt.type,unit:void 0},ZI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Xr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Xr.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Xr.scale,tick:Xr.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},JI={allowDataOverflow:Xt.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Xt.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Xt.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Xt.scale,tick:Xt.tick,tickCount:Xt.tickCount,ticks:void 0,type:"category",unit:void 0},qd=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?ZI:GI,Yd=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?JI:XI,Pl=e=>e.polarOptions,Gd=N([zr,Wr,st],C0),u1=N([Pl,Gd],(e,t)=>{if(e!=null)return At(e.innerRadius,t,0)}),f1=N([Pl,Gd],(e,t)=>{if(e!=null)return At(e.outerRadius,t,t*.8)}),QI=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},d1=N([Pl],QI);N([qd,d1],El);var h1=N([Gd,u1,f1],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});N([Yd,h1],El);var p1=N([ue,Pl,u1,f1,zr,Wr],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:s,startAngle:l,endAngle:c}=t;return{cx:At(o,i,i/2),cy:At(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),Ve=(e,t)=>t,Qa=(e,t,r)=>r;function Xd(e){return e?.id}var ct=e=>{var t=ue(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Vi=e=>e.tooltip.settings.axisId,vt=e=>{var t=ct(e),r=Vi(e);return eo(e,t,r)},m1=N([vt],e=>e?.dataKey);function g1(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,o=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:n;if(!(c==null||c.length===0)){var u=Xd(s);c.forEach((f,d)=>{var h=a==null||i?d:String($e(f,a,null)),m=$e(f,s.dataKey,0),p;o.has(h)?p=o.get(h):p={},Object.assign(p,{[u]:m}),o.set(h,p)})}}),Array.from(o.values())}function Cl(e){return e.stackId!=null&&e.dataKey!=null}function v1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(r),!0).forEach(function(n){e$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e$(e,t,r){return(t=t$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t$(e){var t=r$(e,"string");return typeof t=="symbol"?t:t+""}function r$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zd=[0,"auto"],Zt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},y1=(e,t)=>e.cartesianAxis.xAxis[t],Zr=(e,t)=>{var r=y1(e,t);return r??Zt},Jt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Zd,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Ma},b1=(e,t)=>e.cartesianAxis.yAxis[t],Jr=(e,t)=>{var r=b1(e,t);return r??Jt},n$={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Jd=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??n$},Je=(e,t,r)=>{switch(t){case"xAxis":return Zr(e,r);case"yAxis":return Jr(e,r);case"zAxis":return Jd(e,r);case"angleAxis":return qd(e,r);case"radiusAxis":return Yd(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},i$=(e,t,r)=>{switch(t){case"xAxis":return Zr(e,r);case"yAxis":return Jr(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},eo=(e,t,r)=>{switch(t){case"xAxis":return Zr(e,r);case"yAxis":return Jr(e,r);case"angleAxis":return qd(e,r);case"radiusAxis":return Yd(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},x1=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Qd(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var Tl=e=>e.graphicalItems.cartesianItems,a$=N([Ve,Qa],Qd),eh=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),to=N([Tl,Je,a$],eh),w1=N([to],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Cl)),_1=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),S1=N([to],_1),th=e=>e.map(t=>t.data).filter(Boolean).flat(1),o$=N([to],th),rh=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},nh=N([o$,Sl],rh),ih=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:$e(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:$e(i,n)}))):e.map(n=>({value:n})),Ml=N([nh,Je,to],ih);function O1(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ti(e){return e.filter(t=>Or(t)||t instanceof Date).map(Number).filter(t=>Ut(t)===!1)}function s$(e,t,r){return!r||typeof t!="number"||Ut(t)?[]:r.length?ti(r.flatMap(n=>{var i=$e(e,n.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!Yt(a)||!Yt(o)))return[t-a,t+o]})):[]}var l$=N([w1,Sl,vt],g1),A1=(e,t,r)=>{var n={},i=t.reduce((a,o)=>(o.stackId==null||(a[o.stackId]==null&&(a[o.stackId]=[]),a[o.stackId].push(o)),a),n);return Object.fromEntries(Object.entries(i).map(a=>{var[o,s]=a,l=s.map(Xd);return[o,{stackedData:Ej(e,l,r),graphicalItems:s}]}))},ah=N([l$,w1,Ja],A1),E1=(e,t,r)=>{var{dataStartIndex:n,dataEndIndex:i}=t;if(r!=="zAxis"){var a=Mj(e,n,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},c$=N([ah,gn,Ve],E1),P1=(e,t,r,n,i)=>r.length>0?e.flatMap(a=>r.flatMap(o=>{var s,l,c=(s=n[o.id])===null||s===void 0?void 0:s.filter(f=>O1(i,f)),u=$e(a,(l=t.dataKey)!==null&&l!==void 0?l:o.dataKey);return{value:u,errorDomain:s$(a,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(a=>({value:$e(a,t.dataKey),errorDomain:[]})):e.map(a=>({value:a,errorDomain:[]})),jl=e=>e.errorBars,C1=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>O1(r,n));N([S1,jl,Ve],C1);var u$=N([nh,Je,S1,jl,Ve],P1);function f$(e){var{value:t}=e;if(Or(t)||t instanceof Date)return t}var k1=e=>{var t=e.flatMap(n=>[n.value,n.errorDomain]).flat(1),r=ti(t);if(r.length!==0)return[Math.min(...r),Math.max(...r)]},d$=(e,t,r)=>{var n=e.map(f$).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&rv(n))?Ab(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},oh=e=>{var t;if(e==null||!("domain"in e))return Zd;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=ti(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Zd},Dl=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),s=Math.max(...a);return[o,s]}},T1=e=>e.referenceElements.dots,Hi=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),h$=N([T1,Ve,Qa],Hi),M1=e=>e.referenceElements.areas,p$=N([M1,Ve,Qa],Hi),j1=e=>e.referenceElements.lines,m$=N([j1,Ve,Qa],Hi),D1=(e,t)=>{var r=ti(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},g$=N(h$,Ve,D1),N1=(e,t)=>{var r=ti(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},v$=N([p$,Ve],N1),I1=(e,t)=>{var r=ti(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},y$=N(m$,Ve,I1),b$=N(g$,y$,v$,(e,t,r)=>Dl(e,r,t)),$1=N([Je],oh),sh=(e,t,r,n,i,a,o)=>{var s=NI(t,e.allowDataOverflow);if(s!=null)return s;var l=a==="vertical"&&o==="xAxis"||a==="horizontal"&&o==="yAxis",c=l?Dl(r,i,k1(n)):Dl(i,k1(n));return II(t,c,e.allowDataOverflow)},x$=N([Je,$1,c$,u$,b$,ue,Ve],sh),w$=[0,1],lh=(e,t,r,n,i,a,o)=>{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:s,type:l}=e,c=fn(t,a);return c&&s==null?Ab(0,r.length):l==="category"?d$(n,e,c):i==="expand"?w$:o}},ch=N([Je,ue,nh,Ml,Ja,Ve,x$],lh),R1=(e,t,r,n,i)=>{if(e!=null){var{scale:a,type:o}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":o==="category"?"band":"linear";if(typeof a=="string"){var s="scale".concat(Sa(a));return s in Xa?s:"point"}}},Ui=N([Je,ue,x1,Hd,Ve],R1);function _$(e){if(e!=null){if(e in Xa)return Xa[e]();var t="scale".concat(Sa(e));if(t in Xa)return Xa[t]()}}function uh(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=_$(t);if(i!=null){var a=i.domain(r).range(n);return wj(a),a}}}var fh=(e,t,r)=>{var n=oh(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Bi(e))return UI(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Bi(e))return KI(e,t.tickCount,t.allowDecimals)}},dh=N([ch,eo,Ui],fh),hh=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&Bi(t)&&Array.isArray(r)&&r.length>0){var i=t[0],a=r[0],o=t[1],s=r[r.length-1];return[Math.min(i,a),Math.max(o,s)]}return t},S$=N([Je,ch,dh,Ve],hh),O$=N(Ml,Je,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ti(e.map(s=>s.value))).sort((s,l)=>s-l);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var a=0;a<n.length-1;a++){var o=n[a+1]-n[a];r=Math.min(r,o)}return r/i}}),L1=N(O$,ue,l1,st,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!Yt(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=At(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),A$=(e,t)=>{var r=Zr(e,t);return r==null||typeof r.padding!="string"?0:L1(e,"xAxis",t,r.padding)},E$=(e,t)=>{var r=Jr(e,t);return r==null||typeof r.padding!="string"?0:L1(e,"yAxis",t,r.padding)},P$=N(Zr,A$,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),C$=N(Jr,E$,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),k$=N([st,P$,Zs,Xs,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),T$=N([st,ue,C$,Zs,Xs,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:o}=i;return a?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),ro=(e,t,r,n)=>{var i;switch(t){case"xAxis":return k$(e,r,n);case"yAxis":return T$(e,r,n);case"zAxis":return(i=Jd(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return d1(e);case"radiusAxis":return h1(e,r);default:return}},F1=N([Je,ro],El),Ki=N([Je,Ui,S$,F1],uh);N([to,jl,Ve],C1);function B1(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Nl=(e,t)=>t,Il=(e,t,r)=>r,M$=N(qs,Nl,Il,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(B1)),j$=N(Ys,Nl,Il,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(B1)),z1=(e,t)=>({width:e.width,height:t.height}),D$=(e,t)=>{var r=typeof t.width=="number"?t.width:Ma;return{width:r,height:e.height}},W1=N(st,Zr,z1),N$=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},I$=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},$$=N(Wr,st,M$,Nl,Il,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=z1(t,s);o==null&&(o=N$(t,n,e));var c=n==="top"&&!i||n==="bottom"&&i;a[s.id]=o-Number(c)*l.height,o+=(c?-1:1)*l.height}),a}),R$=N(zr,st,j$,Nl,Il,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=D$(t,s);o==null&&(o=I$(t,n,e));var c=n==="left"&&!i||n==="right"&&i;a[s.id]=o-Number(c)*l.width,o+=(c?-1:1)*l.width}),a}),L$=(e,t)=>{var r=Zr(e,t);if(r!=null)return $$(e,r.orientation,r.mirror)},F$=N([st,Zr,L$,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),B$=(e,t)=>{var r=Jr(e,t);if(r!=null)return R$(e,r.orientation,r.mirror)},z$=N([st,Jr,B$,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),V1=N(st,Jr,(e,t)=>{var r=typeof t.width=="number"?t.width:Ma;return{width:r,height:e.height}}),H1=(e,t,r)=>{switch(t){case"xAxis":return W1(e,r).width;case"yAxis":return V1(e,r).height;default:return}},U1=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=fn(e,n),l=t.map(c=>c.value);if(o&&s&&a==="category"&&i&&rv(l))return l}},ph=N([ue,Ml,Je,Ve],U1),K1=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,o=fn(e,n);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},mh=N([ue,Ml,eo,Ve],K1),q1=N([ue,i$,Ui,Ki,ph,mh,ro,dh,Ve],(e,t,r,n,i,a,o,s,l)=>{if(t==null)return null;var c=fn(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:a,duplicateDomain:i,isCategorical:c,niceTicks:s,range:o,realScaleType:r,scale:n}}),W$=(e,t,r,n,i,a,o,s,l)=>{if(!(t==null||n==null)){var c=fn(e,l),{type:u,ticks:f,tickCount:d}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,m=u==="category"&&n.bandwidth?n.bandwidth()/h:0;m=l==="angleAxis"&&a!=null&&a.length>=2?pt(a[0]-a[1])*2*m:m;var p=f||i;if(p){var g=p.map((v,b)=>{var x=o?o.indexOf(v):v;return{index:b,coordinate:n(x)+m,value:v,offset:m}});return g.filter(v=>!Ut(v.coordinate))}return c&&s?s.map((v,b)=>({coordinate:n(v)+m,value:v,index:b,offset:m})):n.ticks?n.ticks(d).map(v=>({coordinate:n(v)+m,value:v,offset:m})):n.domain().map((v,b)=>({coordinate:n(v)+m,value:o?o[v]:v,index:b,offset:m}))}},Y1=N([ue,eo,Ui,Ki,dh,ro,ph,mh,Ve],W$),V$=(e,t,r,n,i,a,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=fn(e,o),{tickCount:l}=t,c=0;return c=o==="angleAxis"&&n?.length>=2?pt(n[0]-n[1])*2*c:c,s&&a?a.map((u,f)=>({coordinate:r(u)+c,value:u,index:f,offset:c})):r.ticks?r.ticks(l).map(u=>({coordinate:r(u)+c,value:u,offset:c})):r.domain().map((u,f)=>({coordinate:r(u)+c,value:i?i[u]:u,index:f,offset:c}))}},yn=N([ue,eo,Ki,ro,ph,mh,Ve],V$),bn=N(Je,Ki,(e,t)=>{if(!(e==null||t==null))return kl(kl({},e),{},{scale:t})}),H$=N([Je,Ui,ch,F1],uh);N((e,t,r)=>Jd(e,r),H$,(e,t)=>{if(!(e==null||t==null))return kl(kl({},e),{},{scale:t})});var U$=N([ue,qs,Ys],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),G1=e=>e.options.defaultTooltipEventType,X1=e=>e.options.validateTooltipEventTypes;function Z1(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function gh(e,t){var r=G1(e),n=X1(e);return Z1(t,r,n)}function K$(e){return G(t=>gh(t,e))}var J1=(e,t)=>{var r,n=Number(t);if(!(Ut(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},q$=e=>e.tooltip.settings,xn={active:!1,index:null,dataKey:void 0,coordinate:void 0},Y$={itemInteraction:{click:xn,hover:xn},axisInteraction:{click:xn,hover:xn},keyboardInteraction:xn,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Q1=qt({name:"tooltip",initialState:Y$,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var r=Br(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:G$,removeTooltipEntrySettings:X$,setTooltipSettingsState:Z$,setActiveMouseOverItemIndex:ew,mouseLeaveItem:J$,mouseLeaveChart:tw,setActiveClickItemIndex:Q$,setMouseOverAxisIndex:rw,setMouseClickAxisIndex:e4,setSyncInteraction:vh,setKeyboardInteraction:yh}=Q1.actions,t4=Q1.reducer;function nw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nw(Object(r),!0).forEach(function(n){r4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r4(e,t,r){return(t=n4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n4(e){var t=i4(e,"string");return typeof t=="symbol"?t:t+""}function i4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a4(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function o4(e){return e.index!=null}var iw=(e,t,r,n)=>{if(t==null)return xn;var i=a4(e,t,r);if(i==null)return xn;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(o4(i)){if(a)return $l($l({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return $l($l({},xn),{},{coordinate:i.coordinate})},bh=(e,t)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!Yt(n))return r;var i=0,a=1/0;return t.length>0&&(a=t.length-1),String(Math.max(i,Math.min(n,a)))},aw=(e,t,r,n,i,a,o,s)=>{if(!(a==null||s==null)){var l=o[0],c=l==null?void 0:s(l.positions,a);if(c!=null)return c;var u=i?.[Number(a)];if(u)switch(r){case"horizontal":return{x:u.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:u.coordinate}}}},ow=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(a=>{var o;return((o=a.settings)===null||o===void 0?void 0:o.dataKey)===i})},no=e=>e.options.tooltipPayloadSearcher,qi=e=>e.tooltip;function sw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sw(Object(r),!0).forEach(function(n){s4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s4(e,t,r){return(t=l4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l4(e){var t=c4(e,"string");return typeof t=="symbol"?t:t+""}function c4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u4(e,t){return e??t}var cw=(e,t,r,n,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=r,f=[];return e.reduce((d,h)=>{var m,{dataDefinedOnItem:p,settings:g}=h,v=u4(p,s),b=Array.isArray(v)?k0(v,c,u):v,x=(m=g?.dataKey)!==null&&m!==void 0?m:n,S=g?.nameKey,w;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&o==="axis"?w=nv(b,n,i):w=a(b,t,l,S),Array.isArray(w))w.forEach(E=>{var C=lw(lw({},g),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});d.push(L0({tooltipEntrySettings:C,dataKey:E.dataKey,payload:E.payload,value:$e(E.payload,E.dataKey),name:E.name}))});else{var O;d.push(L0({tooltipEntrySettings:g,dataKey:x,payload:w,value:$e(w,x),name:(O=$e(w,S))!==null&&O!==void 0?O:g?.name}))}return d},f)}},xh=N([vt,ue,x1,Hd,ct],R1),f4=N([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),d4=N([ct,Vi],Qd),io=N([f4,vt,d4],eh),h4=N([io],e=>e.filter(Cl)),p4=N([io],th),Yi=N([p4,gn],rh),m4=N([h4,gn,vt],g1),wh=N([Yi,vt,io],ih),g4=N([vt],oh),v4=N([io],e=>e.filter(Cl)),y4=N([m4,v4,Ja],A1),b4=N([y4,gn,ct],E1),x4=N([io],_1),w4=N([Yi,vt,x4,jl,ct],P1),_4=N([T1,ct,Vi],Hi),S4=N([_4,ct],D1),O4=N([M1,ct,Vi],Hi),A4=N([O4,ct],N1),E4=N([j1,ct,Vi],Hi),P4=N([E4,ct],I1),C4=N([S4,P4,A4],Dl),k4=N([vt,g4,b4,w4,C4,ue,ct],sh),uw=N([vt,ue,Yi,wh,Ja,ct,k4],lh),T4=N([uw,vt,xh],fh),M4=N([vt,uw,T4,ct],hh),fw=e=>{var t=ct(e),r=Vi(e),n=!1;return ro(e,t,r,n)},dw=N([vt,fw],El),hw=N([vt,xh,M4,dw],uh),j4=N([ue,wh,vt,ct],U1),D4=N([ue,wh,vt,ct],K1),N4=(e,t,r,n,i,a,o,s)=>{if(t){var{type:l}=t,c=fn(e,s);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=l==="category"&&n.bandwidth?n.bandwidth()/u:0;return f=s==="angleAxis"&&i!=null&&i?.length>=2?pt(i[0]-i[1])*2*f:f,c&&o?o.map((d,h)=>({coordinate:n(d)+f,value:d,index:h,offset:f})):n.domain().map((d,h)=>({coordinate:n(d)+f,value:a?a[d]:d,index:h,offset:f}))}}},Qr=N([ue,vt,xh,hw,fw,j4,D4,ct],N4),_h=N([G1,X1,q$],(e,t,r)=>Z1(r.shared,e,t)),pw=e=>e.tooltip.settings.trigger,Sh=e=>e.tooltip.settings.defaultIndex,Rl=N([qi,_h,pw,Sh],iw),wn=N([Rl,Yi],bh),mw=N([Qr,wn],J1),gw=N([Rl],e=>{if(e)return e.dataKey}),vw=N([qi,_h,pw,Sh],ow),I4=N([zr,Wr,ue,st,Qr,Sh,vw,no],aw),$4=N([Rl,I4],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),R4=N([Rl],e=>e.active),L4=N([vw,wn,gn,m1,mw,no,_h],cw),F4=N([L4],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function yw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yw(Object(r),!0).forEach(function(n){B4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B4(e,t,r){return(t=z4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z4(e){var t=W4(e,"string");return typeof t=="symbol"?t:t+""}function W4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V4=()=>G(vt),H4=()=>{var e=V4(),t=G(Qr),r=G(hw);return Ta(bw(bw({},e),{},{scale:r}),t)},U4=()=>G(Hd),Oh=(e,t)=>t,xw=(e,t,r)=>r,Ah=(e,t,r,n)=>n,K4=N(Qr,e=>Ts(e,t=>t.coordinate)),Eh=N([qi,Oh,xw,Ah],iw),ww=N([Eh,Yi],bh),q4=(e,t,r)=>{if(t!=null){var n=qi(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},_w=N([qi,Oh,xw,Ah],ow),Ll=N([zr,Wr,ue,st,Qr,Ah,_w,no],aw),Y4=N([Eh,Ll],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),Sw=N(Qr,ww,J1),G4=N([_w,ww,gn,m1,Sw,no,Oh],cw),X4=N([Eh],e=>({isActive:e.active,activeIndex:e.index})),Z4=(e,t,r,n,i,a,o,s)=>{if(!(!e||!t||!n||!i||!a)){var l=jj(e.chartX,e.chartY,t,r,s);if(l){var c=Nj(l,t),u=bj(c,o,a,n,i),f=Dj(t,a,u,l);return{activeIndex:String(u),activeCoordinate:f}}}};function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ph.apply(null,arguments)}function Ow(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(r),!0).forEach(function(n){J4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ow(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J4(e,t,r){return(t=Q4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q4(e){var t=eR(e,"string");return typeof t=="symbol"?t:t+""}function eR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tR(e){var{coordinate:t,payload:r,index:n,offset:i,tooltipAxisBandSize:a,layout:o,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,f=r,d=n;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var h,m;if(c==="ScatterChart")h=u,m=wD;else if(c==="BarChart")h=_D(o,u,i,a),m=vb;else if(o==="radial"){var{cx:p,cy:g,radius:v,startAngle:b,endAngle:x}=yb(u);h={cx:p,cy:g,startAngle:b,endAngle:x,innerRadius:v,outerRadius:v},m=xb}else h={points:tN(o,u,i)},m=Kf;var S=typeof s=="object"&&"className"in s?s.className:void 0,w=Fl(Fl(Fl(Fl({stroke:"#ccc",pointerEvents:"none"},i),h),Ue(s,!1)),{},{payload:f,payloadIndex:d,className:de("recharts-tooltip-cursor",S)});return k.isValidElement(s)?k.cloneElement(s,w):k.createElement(m,w)}function rR(e){var t=H4(),r=V0(),n=Js(),i=U4();return A.createElement(tR,Ph({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var Aw=k.createContext(null),nR=()=>k.useContext(Aw),Ch={exports:{}},Ew;function iR(){return Ew||(Ew=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||l,d),m=r?r+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],h]:l._events[m].push(h):(l._events[m]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,m=new Array(h);d<h;d++)m[d]=f[d].fn;return m},s.prototype.listenerCount=function(c){var u=r?r+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,d,h,m){var p=r?r+c:c;if(!this._events[p])return!1;var g=this._events[p],v=arguments.length,b,x;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),v){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,f),!0;case 4:return g.fn.call(g.context,u,f,d),!0;case 5:return g.fn.call(g.context,u,f,d,h),!0;case 6:return g.fn.call(g.context,u,f,d,h,m),!0}for(x=1,b=new Array(v-1);x<v;x++)b[x-1]=arguments[x];g.fn.apply(g.context,b)}else{var S=g.length,w;for(x=0;x<S;x++)switch(g[x].once&&this.removeListener(c,g[x].fn,void 0,!0),v){case 1:g[x].fn.call(g[x].context);break;case 2:g[x].fn.call(g[x].context,u);break;case 3:g[x].fn.call(g[x].context,u,f);break;case 4:g[x].fn.call(g[x].context,u,f,d);break;default:if(!b)for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];g[x].fn.apply(g[x].context,b)}}return!0},s.prototype.on=function(c,u,f){return a(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return a(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,d){var h=r?r+c:c;if(!this._events[h])return this;if(!u)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===u&&(!d||m.once)&&(!f||m.context===f)&&o(this,h);else{for(var p=0,g=[],v=m.length;p<v;p++)(m[p].fn!==u||d&&!m[p].once||f&&m[p].context!==f)&&g.push(m[p]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=r?r+c:c,this._events[u]&&o(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Ch)),Ch.exports}var aR=iR();const oR=Ir(aR);var ao=new oR,kh="recharts.syncEvent.tooltip",Pw="recharts.syncEvent.brush";function Th(e,t){if(t){var r=Number.parseInt(t,10);if(!Ut(r))return e?.[r]}}var sR={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},Cw=qt({name:"options",initialState:sR,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),lR=Cw.reducer,{createEventEmitter:cR}=Cw.actions;function uR(e){return e.tooltip.syncInteraction}var fR={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},kw=qt({name:"chartData",initialState:fR,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:Tw,setDataStartEndIndexes:dR,setComputedData:_U}=kw.actions,hR=kw.reducer,pR=["x","y"];function Mw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ri(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(r),!0).forEach(function(n){mR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mR(e,t,r){return(t=gR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gR(e){var t=vR(e,"string");return typeof t=="symbol"?t:t+""}function vR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yR(e,t){if(e==null)return{};var r,n,i=bR(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function bR(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var jw=()=>{};function xR(){var e=G(Ud),t=G(Kd),r=Ze(),n=G(c1),i=G(Qr),a=Js(),o=zf(),s=G(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return jw;var l=(c,u,f)=>{if(t!==f&&e===c){if(n==="index"){var d;if(o&&u!==null&&u!==void 0&&(d=u.payload)!==null&&d!==void 0&&d.coordinate){var h=u.payload.coordinate,{x:m,y:p}=h,g=yR(h,pR),v=ri(ri(ri({},g),typeof m=="number"&&{x:Math.max(o.x,Math.min(m,o.x+o.width))}),typeof p=="number"&&{y:Math.max(o.y,Math.min(p,o.y+o.height))}),b=ri(ri({},u),{},{payload:ri(ri({},u.payload),{},{coordinate:v})});r(b)}else r(u);return}if(i!=null){var x;if(typeof n=="function"){var S={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},w=n(i,S);x=i[w]}else n==="value"&&(x=i.find(I=>String(I.value)===u.payload.label));var{coordinate:O}=u.payload;if(x==null||u.payload.active===!1||O==null||o==null){r(vh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:E,y:C}=O,M=Math.min(E,o.x+o.width),$=Math.min(C,o.y+o.height),j={x:a==="horizontal"?x.coordinate:M,y:a==="horizontal"?$:x.coordinate},_=vh({active:u.payload.active,coordinate:j,dataKey:u.payload.dataKey,index:String(x.index),label:u.payload.label});r(_)}}};return ao.on(kh,l),()=>{ao.off(kh,l)}},[s,r,t,e,n,i,a,o])}function wR(){var e=G(Ud),t=G(Kd),r=Ze();k.useEffect(()=>{if(e==null)return jw;var n=(i,a,o)=>{t!==o&&e===i&&r(dR(a))};return ao.on(Pw,n),()=>{ao.off(Pw,n)}},[r,t,e])}function _R(){var e=Ze();k.useEffect(()=>{e(cR())},[e]),xR(),wR()}function SR(e,t,r,n,i,a){var o=G(d=>q4(d,e,t)),s=G(Kd),l=G(Ud),c=G(c1),u=G(uR),f=u?.active;k.useEffect(()=>{if(!f&&l!=null&&s!=null){var d=vh({active:a,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n});ao.emit(kh,l,d,s)}},[f,r,o,i,n,s,l,c,a])}function Dw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dw(Object(r),!0).forEach(function(n){OR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OR(e,t,r){return(t=AR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AR(e){var t=ER(e,"string");return typeof t=="symbol"?t:t+""}function ER(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PR(e){return e.dataKey}function CR(e,t){return A.isValidElement(e)?A.cloneElement(e,t):typeof e=="function"?A.createElement(e,t):A.createElement(Qj,t)}var Iw=[],kR={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!dn.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function ni(e){var t=_t(e,kR),{active:r,allowEscapeViewBox:n,animationDuration:i,animationEasing:a,content:o,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:f,reverseDirection:d,useTranslate3d:h,wrapperStyle:m,cursor:p,shared:g,trigger:v,defaultIndex:b,portal:x,axisId:S}=t,w=Ze(),O=typeof b=="number"?String(b):b;k.useEffect(()=>{w(Z$({shared:g,trigger:v,axisId:S,active:r,defaultIndex:O}))},[w,g,v,S,r,O]);var E=zf(),C=J0(),M=K$(g),{activeIndex:$,isActive:j}=G(J=>X4(J,M,v,O)),_=G(J=>G4(J,M,v,O)),I=G(J=>Sw(J,M,v,O)),D=G(J=>Y4(J,M,v,O)),L=_,W=nR(),H=r??j,[te,Q]=XT([L,H]),F=M==="axis"?I:void 0;SR(M,v,D,F,$,H);var U=x??W;if(U==null)return null;var V=L??Iw;H||(V=Iw),s&&V.length&&(V=yT(L.filter(J=>J.value!=null&&(J.hide!==!0||t.includeHidden)),u,PR));var re=V.length>0,Z=A.createElement(oD,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:l,active:H,coordinate:D,hasPayload:re,offset:c,position:f,reverseDirection:d,useTranslate3d:h,viewBox:E,wrapperStyle:m,lastBoundingBox:te,innerRef:Q,hasPortalFromProps:!!x},CR(o,Nw(Nw({},t),{},{payload:V,label:F,active:H,coordinate:D,accessibilityLayer:C})));return A.createElement(A.Fragment,null,aA.createPortal(Z,U),H&&A.createElement(rR,{cursor:p,tooltipEventType:M,coordinate:D,payload:L,index:$}))}var Mh={},jh={},Dh={},$w;function TR(){return $w||($w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let o,s=null;const l=a!=null&&a.includes("leading"),c=a==null||a.includes("trailing"),u=()=>{s!==null&&(r.apply(o,s),o=void 0,s=null)},f=()=>{c&&u(),p()};let d=null;const h=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},n)},m=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{m(),o=void 0,s=null},g=()=>{u()},v=function(...b){if(i?.aborted)return;o=this,s=b;const x=d==null;h(),l&&x&&u()};return v.schedule=h,v.cancel=p,v.flush=g,i?.addEventListener("abort",p,{once:!0}),v}e.debounce=t})(Dh)),Dh}var Rw;function MR(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TR();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:s=!0,maxWait:l}=a,c=Array(2);o&&(c[0]="leading"),s&&(c[1]="trailing");let u,f=null;const d=t.debounce(function(...p){u=n.apply(this,p),f=null},i,{edges:c}),h=function(...p){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(u=n.apply(this,p),f=Date.now(),d.cancel(),d.schedule(),u):(d.apply(this,p),u)},m=()=>(d.flush(),u);return h.cancel=d.cancel,h.flush=m,h}e.debounce=r})(jh)),jh}var Lw;function jR(){return Lw||(Lw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MR();function r(n,i=0,a={}){const{leading:o=!0,trailing:s=!0}=a;return t.debounce(n,i,{leading:o,maxWait:i,trailing:s})}e.throttle=r})(Mh)),Mh}var Nh,Fw;function DR(){return Fw||(Fw=1,Nh=jR().throttle),Nh}var NR=DR();const IR=Ir(NR);var $R=process.env.NODE_ENV!=="production",oo=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if($R&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}};function Bw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bw(Object(r),!0).forEach(function(n){RR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RR(e,t,r){return(t=LR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LR(e){var t=FR(e,"string");return typeof t=="symbol"?t:t+""}function FR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ii=k.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i="100%",height:a="100%",minWidth:o=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:f,className:d,onResize:h,style:m={}}=e,p=k.useRef(null),g=k.useRef();g.current=h,k.useImperativeHandle(t,()=>p.current);var[v,b]=k.useState({containerWidth:n.width,containerHeight:n.height}),x=k.useCallback((w,O)=>{b(E=>{var C=Math.round(w),M=Math.round(O);return E.containerWidth===C&&E.containerHeight===M?E:{containerWidth:C,containerHeight:M}})},[]);k.useEffect(()=>{var w=M=>{var $,{width:j,height:_}=M[0].contentRect;x(j,_),($=g.current)===null||$===void 0||$.call(g,j,_)};u>0&&(w=IR(w,u,{trailing:!0,leading:!1}));var O=new ResizeObserver(w),{width:E,height:C}=p.current.getBoundingClientRect();return x(E,C),O.observe(p.current),()=>{O.disconnect()}},[x,u]);var S=k.useMemo(()=>{var{containerWidth:w,containerHeight:O}=v;if(w<0||O<0)return null;oo(Fn(i)||Fn(a),`The width(%s) and height(%s) are both fixed numbers,
177
+ A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(S.x,",").concat(S.y,"Z")}else b+="L".concat(t,",").concat(r,"Z");return b},eN={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},xb=e=>{var t=_t(e,eN),{cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:o,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:f}=t;if(a<i||c===u)return null;var d=de("recharts-sector",f),h=a-i,m=At(o,h,0,!0),p;return m>0&&Math.abs(c-u)<360?p=QD({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,h/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):p=bb({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:u}),A.createElement("path",Xf({},Ue(t,!0),{className:d,d:p}))};function tN(e,t,r){var n,i,a,o;if(e==="horizontal")n=t.x,a=n,i=r.top,o=r.top+r.height;else if(e==="vertical")i=t.y,o=i,n=r.left,a=r.left+r.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:f}=t,d=it(s,l,c,f),h=it(s,l,u,f);n=d.x,i=d.y,a=h.x,o=h.y}else return yb(t);return[{x:n,y:i},{x:a,y:o}]}var Zf={},Jf={},Qf={},wb;function rN(){return wb||(wb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=My();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(Qf)),Qf}var _b;function nN(){return _b||(_b=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rN();function r(n){return n?(n=t.toNumber(n),n===1/0||n===-1/0?(n<0?-1:1)*Number.MAX_VALUE:n===n?n:0):n===0?n:0}e.toFinite=r})(Jf)),Jf}var Sb;function iN(){return Sb||(Sb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=$y(),r=nN();function n(i,a,o){o&&typeof o!="number"&&t.isIterateeCall(i,a,o)&&(a=o=void 0),i=r.toFinite(i),a===void 0?(a=i,i=0):a=r.toFinite(a),o=o===void 0?i<a?1:-1:r.toFinite(o);const s=Math.max(Math.ceil((a-i)/(o||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=o;return l}e.range=n})(Zf)),Zf}var ed,Ob;function aN(){return Ob||(Ob=1,ed=iN().range),ed}var oN=aN();const Ab=Ir(oN);function hn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function sN(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function td(e){let t,r,n;e.length!==2?(t=hn,r=(s,l)=>hn(e(s),l),n=(s,l)=>e(s)-l):(t=e===hn||e===sN?e:lN,r=e,n=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<0?c=f+1:u=f}while(c<u)}return c}function a(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const f=c+u>>>1;r(s[f],l)<=0?c=f+1:u=f}while(c<u)}return c}function o(s,l,c=0,u=s.length){const f=i(s,l,c,u-1);return f>c&&n(s[f-1],l)>-n(s[f],l)?f-1:f}return{left:i,center:o,right:a}}function lN(){return 0}function Eb(e){return e===null?NaN:+e}function*cN(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const La=td(hn).right;td(Eb).center;class Pb extends Map{constructor(t,r=dN){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(const[n,i]of t)this.set(n,i)}get(t){return super.get(Cb(this,t))}has(t){return super.has(Cb(this,t))}set(t,r){return super.set(uN(this,t),r)}delete(t){return super.delete(fN(this,t))}}function Cb({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function uN({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function fN({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function dN(e){return e!==null&&typeof e=="object"?e.valueOf():e}function hN(e=hn){if(e===hn)return kb;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{const n=e(t,r);return n||n===0?n:(e(r,r)===0)-(e(t,t)===0)}}function kb(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const pN=Math.sqrt(50),mN=Math.sqrt(10),gN=Math.sqrt(2);function al(e,t,r){const n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),o=a>=pN?10:a>=mN?5:a>=gN?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/o,s=Math.round(e*c),l=Math.round(t*c),s/c<e&&++s,l/c>t&&--l,c=-c):(c=Math.pow(10,i)*o,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=r&&r<2?al(e,t,r*2):[s,l,c]}function rd(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];const n=t<e,[i,a,o]=n?al(t,e,r):al(e,t,r);if(!(a>=i))return[];const s=a-i+1,l=new Array(s);if(n)if(o<0)for(let c=0;c<s;++c)l[c]=(a-c)/-o;else for(let c=0;c<s;++c)l[c]=(a-c)*o;else if(o<0)for(let c=0;c<s;++c)l[c]=(i+c)/-o;else for(let c=0;c<s;++c)l[c]=(i+c)*o;return l}function nd(e,t,r){return t=+t,e=+e,r=+r,al(e,t,r)[2]}function id(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?nd(t,e,r):nd(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function Tb(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function Mb(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function jb(e,t,r=0,n=1/0,i){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),n=Math.floor(Math.min(e.length-1,n)),!(r<=t&&t<=n))return e;for(i=i===void 0?kb:hN(i);n>r;){if(n-r>600){const l=n-r+1,c=t-r+1,u=Math.log(l),f=.5*Math.exp(2*u/3),d=.5*Math.sqrt(u*f*(l-f)/l)*(c-l/2<0?-1:1),h=Math.max(r,Math.floor(t-c*f/l+d)),m=Math.min(n,Math.floor(t+(l-c)*f/l+d));jb(e,t,h,m,i)}const a=e[t];let o=r,s=n;for(Fa(e,r,t),i(e[n],a)>0&&Fa(e,r,n);o<s;){for(Fa(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?Fa(e,r,s):(++s,Fa(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function Fa(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function vN(e,t,r){if(e=Float64Array.from(cN(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return Mb(e);if(t>=1)return Tb(e);var n,i=(n-1)*t,a=Math.floor(i),o=Tb(jb(e,a).subarray(0,a+1)),s=Mb(e.subarray(a+1));return o+(s-o)*(i-a)}}function yN(e,t,r=Eb){if(!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return o+(s-o)*(i-a)}}function bN(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(i);++n<i;)a[n]=e+n*r;return a}function sr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Vr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const ad=Symbol("implicit");function od(){var e=new Pb,t=[],r=[],n=ad;function i(a){let o=e.get(a);if(o===void 0){if(n!==ad)return n;e.set(a,o=t.push(a)-1)}return r[o%r.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Pb;for(const o of a)e.has(o)||e.set(o,t.push(o)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return od(t,r).unknown(n)},sr.apply(i,arguments),i}function sd(){var e=od().unknown(void 0),t=e.domain,r=e.range,n=0,i=1,a,o,s=!1,l=0,c=0,u=.5;delete e.unknown;function f(){var d=t().length,h=i<n,m=h?i:n,p=h?n:i;a=(p-m)/Math.max(1,d-l+c*2),s&&(a=Math.floor(a)),m+=(p-m-a*(d-l))*u,o=a*(1-l),s&&(m=Math.round(m),o=Math.round(o));var g=bN(d).map(function(v){return m+a*v});return r(h?g.reverse():g)}return e.domain=function(d){return arguments.length?(t(d),f()):t()},e.range=function(d){return arguments.length?([n,i]=d,n=+n,i=+i,f()):[n,i]},e.rangeRound=function(d){return[n,i]=d,n=+n,i=+i,s=!0,f()},e.bandwidth=function(){return o},e.step=function(){return a},e.round=function(d){return arguments.length?(s=!!d,f()):s},e.padding=function(d){return arguments.length?(l=Math.min(1,c=+d),f()):l},e.paddingInner=function(d){return arguments.length?(l=Math.min(1,d),f()):l},e.paddingOuter=function(d){return arguments.length?(c=+d,f()):c},e.align=function(d){return arguments.length?(u=Math.max(0,Math.min(1,d)),f()):u},e.copy=function(){return sd(t(),[n,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},sr.apply(f(),arguments)}function Db(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Db(t())},e}function xN(){return Db(sd.apply(null,arguments).paddingInner(1))}function ld(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function Nb(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Ba(){}var za=.7,ol=1/za,Ni="\\s*([+-]?\\d+)\\s*",Wa="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Er="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wN=/^#([0-9a-f]{3,8})$/,_N=new RegExp(`^rgb\\(${Ni},${Ni},${Ni}\\)$`),SN=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),ON=new RegExp(`^rgba\\(${Ni},${Ni},${Ni},${Wa}\\)$`),AN=new RegExp(`^rgba\\(${Er},${Er},${Er},${Wa}\\)$`),EN=new RegExp(`^hsl\\(${Wa},${Er},${Er}\\)$`),PN=new RegExp(`^hsla\\(${Wa},${Er},${Er},${Wa}\\)$`),Ib={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};ld(Ba,Va,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:$b,formatHex:$b,formatHex8:CN,formatHsl:kN,formatRgb:Rb,toString:Rb});function $b(){return this.rgb().formatHex()}function CN(){return this.rgb().formatHex8()}function kN(){return Wb(this).formatHsl()}function Rb(){return this.rgb().formatRgb()}function Va(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=wN.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?Lb(t):r===3?new It(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?sl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?sl(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=_N.exec(e))?new It(t[1],t[2],t[3],1):(t=SN.exec(e))?new It(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ON.exec(e))?sl(t[1],t[2],t[3],t[4]):(t=AN.exec(e))?sl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=EN.exec(e))?zb(t[1],t[2]/100,t[3]/100,1):(t=PN.exec(e))?zb(t[1],t[2]/100,t[3]/100,t[4]):Ib.hasOwnProperty(e)?Lb(Ib[e]):e==="transparent"?new It(NaN,NaN,NaN,0):null}function Lb(e){return new It(e>>16&255,e>>8&255,e&255,1)}function sl(e,t,r,n){return n<=0&&(e=t=r=NaN),new It(e,t,r,n)}function TN(e){return e instanceof Ba||(e=Va(e)),e?(e=e.rgb(),new It(e.r,e.g,e.b,e.opacity)):new It}function cd(e,t,r,n){return arguments.length===1?TN(e):new It(e,t,r,n??1)}function It(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}ld(It,cd,Nb(Ba,{brighter(e){return e=e==null?ol:Math.pow(ol,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?za:Math.pow(za,e),new It(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new It(qn(this.r),qn(this.g),qn(this.b),ll(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fb,formatHex:Fb,formatHex8:MN,formatRgb:Bb,toString:Bb}));function Fb(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}`}function MN(){return`#${Yn(this.r)}${Yn(this.g)}${Yn(this.b)}${Yn((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bb(){const e=ll(this.opacity);return`${e===1?"rgb(":"rgba("}${qn(this.r)}, ${qn(this.g)}, ${qn(this.b)}${e===1?")":`, ${e})`}`}function ll(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function qn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yn(e){return e=qn(e),(e<16?"0":"")+e.toString(16)}function zb(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new mr(e,t,r,n)}function Wb(e){if(e instanceof mr)return new mr(e.h,e.s,e.l,e.opacity);if(e instanceof Ba||(e=Va(e)),!e)return new mr;if(e instanceof mr)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(t===a?o=(r-n)/s+(r<n)*6:r===a?o=(n-t)/s+2:o=(t-r)/s+4,s/=l<.5?a+i:2-a-i,o*=60):s=l>0&&l<1?0:o,new mr(o,s,l,e.opacity)}function jN(e,t,r,n){return arguments.length===1?Wb(e):new mr(e,t,r,n??1)}function mr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}ld(mr,jN,Nb(Ba,{brighter(e){return e=e==null?ol:Math.pow(ol,e),new mr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?za:Math.pow(za,e),new mr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new It(ud(e>=240?e-240:e+120,i,n),ud(e,i,n),ud(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new mr(Vb(this.h),cl(this.s),cl(this.l),ll(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ll(this.opacity);return`${e===1?"hsl(":"hsla("}${Vb(this.h)}, ${cl(this.s)*100}%, ${cl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Vb(e){return e=(e||0)%360,e<0?e+360:e}function cl(e){return Math.max(0,Math.min(1,e||0))}function ud(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}const fd=e=>()=>e;function DN(e,t){return function(r){return e+r*t}}function NN(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function IN(e){return(e=+e)==1?Hb:function(t,r){return r-t?NN(t,r,e):fd(isNaN(t)?r:t)}}function Hb(e,t){var r=t-e;return r?DN(e,r):fd(isNaN(e)?t:e)}const Ub=(function e(t){var r=IN(t);function n(i,a){var o=r((i=cd(i)).r,(a=cd(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),c=Hb(i.opacity,a.opacity);return function(u){return i.r=o(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return n.gamma=e,n})(1);function $N(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=e[i]*(1-a)+t[i]*a;return n}}function RN(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function LN(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),o;for(o=0;o<n;++o)i[o]=Ii(e[o],t[o]);for(;o<r;++o)a[o]=t[o];return function(s){for(o=0;o<n;++o)a[o]=i[o](s);return a}}function FN(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function ul(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function BN(e,t){var r={},n={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?r[i]=Ii(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var dd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hd=new RegExp(dd.source,"g");function zN(e){return function(){return e}}function WN(e){return function(t){return e(t)+""}}function VN(e,t){var r=dd.lastIndex=hd.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=dd.exec(e))&&(i=hd.exec(t));)(a=i.index)>r&&(a=t.slice(r,a),s[o]?s[o]+=a:s[++o]=a),(n=n[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:ul(n,i)})),r=hd.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?WN(l[0].x):zN(t):(t=l.length,function(c){for(var u=0,f;u<t;++u)s[(f=l[u]).i]=f.x(c);return s.join("")})}function Ii(e,t){var r=typeof t,n;return t==null||r==="boolean"?fd(t):(r==="number"?ul:r==="string"?(n=Va(t))?(t=n,Ub):VN:t instanceof Va?Ub:t instanceof Date?FN:RN(t)?$N:Array.isArray(t)?LN:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?BN:ul)(e,t)}function pd(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function HN(e,t){t===void 0&&(t=e,e=Ii);for(var r=0,n=t.length-1,i=t[0],a=new Array(n<0?0:n);r<n;)a[r]=e(i,i=t[++r]);return function(o){var s=Math.max(0,Math.min(n-1,Math.floor(o*=n)));return a[s](o-s)}}function UN(e){return function(){return e}}function fl(e){return+e}var Kb=[0,1];function kt(e){return e}function md(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:UN(isNaN(t)?NaN:.5)}function KN(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function qN(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=md(i,n),a=r(o,a)):(n=md(n,i),a=r(a,o)),function(s){return a(n(s))}}function YN(e,t,r){var n=Math.min(e.length,t.length)-1,i=new Array(n),a=new Array(n),o=-1;for(e[n]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++o<n;)i[o]=md(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=La(e,s,1,n)-1;return a[l](i[l](s))}}function Ha(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function dl(){var e=Kb,t=Kb,r=Ii,n,i,a,o=kt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==kt&&(o=KN(e[0],e[d-1])),s=d>2?YN:qN,l=c=null,f}function f(d){return d==null||isNaN(d=+d)?a:(l||(l=s(e.map(n),t,r)))(n(o(d)))}return f.invert=function(d){return o(i((c||(c=s(t,e.map(n),ul)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,fl),u()):e.slice()},f.range=function(d){return arguments.length?(t=Array.from(d),u()):t.slice()},f.rangeRound=function(d){return t=Array.from(d),r=pd,u()},f.clamp=function(d){return arguments.length?(o=d?!0:kt,u()):o!==kt},f.interpolate=function(d){return arguments.length?(r=d,u()):r},f.unknown=function(d){return arguments.length?(a=d,f):a},function(d,h){return n=d,i=h,u()}}function gd(){return dl()(kt,kt)}function GN(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function hl(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function $i(e){return e=hl(Math.abs(e)),e?e[1]:NaN}function XN(e,t){return function(r,n){for(var i=r.length,a=[],o=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>n&&(s=Math.max(1,n-l)),a.push(r.substring(i-=s,i+s)),!((l+=s+1)>n));)s=e[o=(o+1)%e.length];return a.reverse().join(t)}}function ZN(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var JN=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ua(e){if(!(t=JN.exec(e)))throw new Error("invalid format: "+e);var t;return new vd({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ua.prototype=vd.prototype;function vd(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}vd.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function QN(e){e:for(var t=e.length,r=1,n=-1,i;r<t;++r)switch(e[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+e[r])break e;n>0&&(n=0);break}return n>0?e.slice(0,n)+e.slice(i+1):e}var qb;function e5(e,t){var r=hl(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(qb=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,o=n.length;return a===o?n:a>o?n+new Array(a-o+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+hl(e,Math.max(0,t+a-1))[0]}function Yb(e,t){var r=hl(e,t);if(!r)return e+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const Gb={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:GN,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>Yb(e*100,t),r:Yb,s:e5,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function Xb(e){return e}var Zb=Array.prototype.map,Jb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function t5(e){var t=e.grouping===void 0||e.thousands===void 0?Xb:XN(Zb.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",n=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?Xb:ZN(Zb.call(e.numerals,String)),o=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(f){f=Ua(f);var d=f.fill,h=f.align,m=f.sign,p=f.symbol,g=f.zero,v=f.width,b=f.comma,x=f.precision,S=f.trim,w=f.type;w==="n"?(b=!0,w="g"):Gb[w]||(x===void 0&&(x=12),S=!0,w="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=p==="$"?r:p==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",E=p==="$"?n:/[%p]/.test(w)?o:"",C=Gb[w],M=/[defgprs%]/.test(w);x=x===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,x)):Math.max(0,Math.min(20,x));function $(j){var _=O,I=E,D,L,W;if(w==="c")I=C(j)+I,j="";else{j=+j;var H=j<0||1/j<0;if(j=isNaN(j)?l:C(Math.abs(j),x),S&&(j=QN(j)),H&&+j==0&&m!=="+"&&(H=!1),_=(H?m==="("?m:s:m==="-"||m==="("?"":m)+_,I=(w==="s"?Jb[8+qb/3]:"")+I+(H&&m==="("?")":""),M){for(D=-1,L=j.length;++D<L;)if(W=j.charCodeAt(D),48>W||W>57){I=(W===46?i+j.slice(D+1):j.slice(D))+I,j=j.slice(0,D);break}}}b&&!g&&(j=t(j,1/0));var te=_.length+j.length+I.length,Q=te<v?new Array(v-te+1).join(d):"";switch(b&&g&&(j=t(Q+j,Q.length?v-I.length:1/0),Q=""),h){case"<":j=_+j+I+Q;break;case"=":j=_+Q+j+I;break;case"^":j=Q.slice(0,te=Q.length>>1)+_+j+I+Q.slice(te);break;default:j=Q+_+j+I;break}return a(j)}return $.toString=function(){return f+""},$}function u(f,d){var h=c((f=Ua(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor($i(d)/3)))*3,p=Math.pow(10,-m),g=Jb[8+m/3];return function(v){return h(p*v)+g}}return{format:c,formatPrefix:u}}var pl,yd,Qb;r5({thousands:",",grouping:[3],currency:["$",""]});function r5(e){return pl=t5(e),yd=pl.format,Qb=pl.formatPrefix,pl}function n5(e){return Math.max(0,-$i(Math.abs(e)))}function i5(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor($i(t)/3)))*3-$i(Math.abs(e)))}function a5(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,$i(t)-$i(e))+1}function ex(e,t,r,n){var i=id(e,t,r),a;switch(n=Ua(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=i5(i,o))&&(n.precision=a),Qb(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=a5(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=n5(i))&&(n.precision=a-(n.type==="%")*2);break}}return yd(n)}function pn(e){var t=e.domain;return e.ticks=function(r){var n=t();return rd(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return ex(i[0],i[i.length-1],r??10,n)},e.nice=function(r){r==null&&(r=10);var n=t(),i=0,a=n.length-1,o=n[i],s=n[a],l,c,u=10;for(s<o&&(c=o,o=s,s=c,c=i,i=a,a=c);u-- >0;){if(c=nd(o,s,r),c===l)return n[i]=o,n[a]=s,t(n);if(c>0)o=Math.floor(o/c)*c,s=Math.ceil(s/c)*c;else if(c<0)o=Math.ceil(o*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function tx(){var e=gd();return e.copy=function(){return Ha(e,tx())},sr.apply(e,arguments),pn(e)}function rx(e){var t;function r(n){return n==null||isNaN(n=+n)?t:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(e=Array.from(n,fl),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return rx(e).unknown(t)},e=arguments.length?Array.from(e,fl):[0,1],pn(r)}function nx(e,t){e=e.slice();var r=0,n=e.length-1,i=e[r],a=e[n],o;return a<i&&(o=r,r=n,n=o,o=i,i=a,a=o),e[r]=t.floor(i),e[n]=t.ceil(a),e}function ix(e){return Math.log(e)}function ax(e){return Math.exp(e)}function o5(e){return-Math.log(-e)}function s5(e){return-Math.exp(-e)}function l5(e){return isFinite(e)?+("1e"+e):e<0?0:e}function c5(e){return e===10?l5:e===Math.E?Math.exp:t=>Math.pow(e,t)}function u5(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function ox(e){return(t,r)=>-e(-t,r)}function bd(e){const t=e(ix,ax),r=t.domain;let n=10,i,a;function o(){return i=u5(n),a=c5(n),r()[0]<0?(i=ox(i),a=ox(a),e(o5,s5)):e(ix,ax),t}return t.base=function(s){return arguments.length?(n=+s,o()):n},t.domain=function(s){return arguments.length?(r(s),o()):r()},t.ticks=s=>{const l=r();let c=l[0],u=l[l.length-1];const f=u<c;f&&([c,u]=[u,c]);let d=i(c),h=i(u),m,p;const g=s==null?10:+s;let v=[];if(!(n%1)&&h-d<g){if(d=Math.floor(d),h=Math.ceil(h),c>0){for(;d<=h;++d)for(m=1;m<n;++m)if(p=d<0?m/a(-d):m*a(d),!(p<c)){if(p>u)break;v.push(p)}}else for(;d<=h;++d)for(m=n-1;m>=1;--m)if(p=d>0?m/a(-d):m*a(d),!(p<c)){if(p>u)break;v.push(p)}v.length*2<g&&(v=rd(c,u,g))}else v=rd(d,h,Math.min(h-d,g)).map(a);return f?v.reverse():v},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Ua(l)).precision==null&&(l.trim=!0),l=yd(l)),s===1/0)return l;const c=Math.max(1,n*s/t.ticks().length);return u=>{let f=u/a(Math.round(i(u)));return f*n<n-.5&&(f*=n),f<=c?l(u):""}},t.nice=()=>r(nx(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function sx(){const e=bd(dl()).domain([1,10]);return e.copy=()=>Ha(e,sx()).base(e.base()),sr.apply(e,arguments),e}function lx(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function cx(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function xd(e){var t=1,r=e(lx(t),cx(t));return r.constant=function(n){return arguments.length?e(lx(t=+n),cx(t)):t},pn(r)}function ux(){var e=xd(dl());return e.copy=function(){return Ha(e,ux()).constant(e.constant())},sr.apply(e,arguments)}function fx(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function f5(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function d5(e){return e<0?-e*e:e*e}function wd(e){var t=e(kt,kt),r=1;function n(){return r===1?e(kt,kt):r===.5?e(f5,d5):e(fx(r),fx(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},pn(t)}function _d(){var e=wd(dl());return e.copy=function(){return Ha(e,_d()).exponent(e.exponent())},sr.apply(e,arguments),e}function h5(){return _d.apply(null,arguments).exponent(.5)}function dx(e){return Math.sign(e)*e*e}function p5(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function hx(){var e=gd(),t=[0,1],r=!1,n;function i(a){var o=p5(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(dx(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,fl)).map(dx)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return hx(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},sr.apply(i,arguments),pn(i)}function px(){var e=[],t=[],r=[],n;function i(){var o=0,s=Math.max(1,t.length);for(r=new Array(s-1);++o<s;)r[o-1]=yN(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[La(r,o)]}return a.invertExtent=function(o){var s=t.indexOf(o);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let s of o)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(hn),i()},a.range=function(o){return arguments.length?(t=Array.from(o),i()):t.slice()},a.unknown=function(o){return arguments.length?(n=o,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return px().domain(e).range(t).unknown(n)},sr.apply(a,arguments)}function mx(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[La(n,l,0,r)]:a}function s(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*t-(l-r)*e)/(r+1);return o}return o.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},o.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,s()):i.slice()},o.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,n[0]]:c>=r?[n[r-1],t]:[n[c-1],n[c]]},o.unknown=function(l){return arguments.length&&(a=l),o},o.thresholds=function(){return n.slice()},o.copy=function(){return mx().domain([e,t]).range(i).unknown(a)},sr.apply(pn(o),arguments)}function gx(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[La(e,a,0,n)]:r}return i.domain=function(a){return arguments.length?(e=Array.from(a),n=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),n=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var o=t.indexOf(a);return[e[o-1],e[o]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return gx().domain(e).range(t).unknown(r)},sr.apply(i,arguments)}const Sd=new Date,Od=new Date;function lt(e,t,r,n){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const o=i(a),s=i.ceil(a);return a-o<s-a?o:s},i.offset=(a,o)=>(t(a=new Date(+a),o==null?1:Math.floor(o)),a),i.range=(a,o,s)=>{const l=[];if(a=i.ceil(a),s=s==null?1:Math.floor(s),!(a<o)||!(s>0))return l;let c;do l.push(c=new Date(+a)),t(a,s),e(a);while(c<a&&a<o);return l},i.filter=a=>lt(o=>{if(o>=o)for(;e(o),!a(o);)o.setTime(o-1)},(o,s)=>{if(o>=o)if(s<0)for(;++s<=0;)for(;t(o,-1),!a(o););else for(;--s>=0;)for(;t(o,1),!a(o););}),r&&(i.count=(a,o)=>(Sd.setTime(+a),Od.setTime(+o),e(Sd),e(Od),Math.floor(r(Sd,Od))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?o=>n(o)%a===0:o=>i.count(0,o)%a===0):i)),i}const ml=lt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);ml.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?lt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):ml),ml.range;const Hr=1e3,lr=Hr*60,Ur=lr*60,Kr=Ur*24,Ad=Kr*7,vx=Kr*30,Ed=Kr*365,Gn=lt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*Hr)},(e,t)=>(t-e)/Hr,e=>e.getUTCSeconds());Gn.range;const Pd=lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Hr)},(e,t)=>{e.setTime(+e+t*lr)},(e,t)=>(t-e)/lr,e=>e.getMinutes());Pd.range;const Cd=lt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*lr)},(e,t)=>(t-e)/lr,e=>e.getUTCMinutes());Cd.range;const kd=lt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*Hr-e.getMinutes()*lr)},(e,t)=>{e.setTime(+e+t*Ur)},(e,t)=>(t-e)/Ur,e=>e.getHours());kd.range;const Td=lt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Ur)},(e,t)=>(t-e)/Ur,e=>e.getUTCHours());Td.range;const Ka=lt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*lr)/Kr,e=>e.getDate()-1);Ka.range;const gl=lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>e.getUTCDate()-1);gl.range;const yx=lt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/Kr,e=>Math.floor(e/Kr));yx.range;function Xn(e){return lt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*lr)/Ad)}const vl=Xn(0),yl=Xn(1),m5=Xn(2),g5=Xn(3),Ri=Xn(4),v5=Xn(5),y5=Xn(6);vl.range,yl.range,m5.range,g5.range,Ri.range,v5.range,y5.range;function Zn(e){return lt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/Ad)}const bl=Zn(0),xl=Zn(1),b5=Zn(2),x5=Zn(3),Li=Zn(4),w5=Zn(5),_5=Zn(6);bl.range,xl.range,b5.range,x5.range,Li.range,w5.range,_5.range;const Md=lt(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());Md.range;const jd=lt(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());jd.range;const qr=lt(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());qr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)}),qr.range;const Yr=lt(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());Yr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:lt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)}),Yr.range;function bx(e,t,r,n,i,a){const o=[[Gn,1,Hr],[Gn,5,5*Hr],[Gn,15,15*Hr],[Gn,30,30*Hr],[a,1,lr],[a,5,5*lr],[a,15,15*lr],[a,30,30*lr],[i,1,Ur],[i,3,3*Ur],[i,6,6*Ur],[i,12,12*Ur],[n,1,Kr],[n,2,2*Kr],[r,1,Ad],[t,1,vx],[t,3,3*vx],[e,1,Ed]];function s(c,u,f){const d=u<c;d&&([c,u]=[u,c]);const h=f&&typeof f.range=="function"?f:l(c,u,f),m=h?h.range(c,+u+1):[];return d?m.reverse():m}function l(c,u,f){const d=Math.abs(u-c)/f,h=td(([,,g])=>g).right(o,d);if(h===o.length)return e.every(id(c/Ed,u/Ed,f));if(h===0)return ml.every(Math.max(id(c,u,f),1));const[m,p]=o[d/o[h-1][2]<o[h][2]/d?h-1:h];return m.every(p)}return[s,l]}const[S5,O5]=bx(Yr,jd,bl,yx,Td,Cd),[A5,E5]=bx(qr,Md,vl,Ka,kd,Pd);function Dd(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Nd(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qa(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function P5(e){var t=e.dateTime,r=e.date,n=e.time,i=e.periods,a=e.days,o=e.shortDays,s=e.months,l=e.shortMonths,c=Ya(i),u=Ga(i),f=Ya(a),d=Ga(a),h=Ya(o),m=Ga(o),p=Ya(s),g=Ga(s),v=Ya(l),b=Ga(l),x={a:H,A:te,b:Q,B:F,c:null,d:Ax,e:Ax,f:X5,g:oI,G:lI,H:q5,I:Y5,j:G5,L:Ex,m:Z5,M:J5,p:U,q:V,Q:jx,s:Dx,S:Q5,u:eI,U:tI,V:rI,w:nI,W:iI,x:null,X:null,y:aI,Y:sI,Z:cI,"%":Mx},S={a:re,A:Z,b:J,B:ee,c:null,d:Cx,e:Cx,f:hI,g:SI,G:AI,H:uI,I:fI,j:dI,L:kx,m:pI,M:mI,p:oe,q:le,Q:jx,s:Dx,S:gI,u:vI,U:yI,V:bI,w:xI,W:wI,x:null,X:null,y:_I,Y:OI,Z:EI,"%":Mx},w={a:$,A:j,b:_,B:I,c:D,d:Sx,e:Sx,f:V5,g:_x,G:wx,H:Ox,I:Ox,j:F5,L:W5,m:L5,M:B5,p:M,q:R5,Q:U5,s:K5,S:z5,u:j5,U:D5,V:N5,w:M5,W:I5,x:L,X:W,y:_x,Y:wx,Z:$5,"%":H5};x.x=O(r,x),x.X=O(n,x),x.c=O(t,x),S.x=O(r,S),S.X=O(n,S),S.c=O(t,S);function O(B,K){return function(ne){var T=[],De=-1,pe=0,tt=B.length,dt,Nr,$o;for(ne instanceof Date||(ne=new Date(+ne));++De<tt;)B.charCodeAt(De)===37&&(T.push(B.slice(pe,De)),(Nr=xx[dt=B.charAt(++De)])!=null?dt=B.charAt(++De):Nr=dt==="e"?" ":"0",($o=K[dt])&&(dt=$o(ne,Nr)),T.push(dt),pe=De+1);return T.push(B.slice(pe,De)),T.join("")}}function E(B,K){return function(ne){var T=qa(1900,void 0,1),De=C(T,B,ne+="",0),pe,tt;if(De!=ne.length)return null;if("Q"in T)return new Date(T.Q);if("s"in T)return new Date(T.s*1e3+("L"in T?T.L:0));if(K&&!("Z"in T)&&(T.Z=0),"p"in T&&(T.H=T.H%12+T.p*12),T.m===void 0&&(T.m="q"in T?T.q:0),"V"in T){if(T.V<1||T.V>53)return null;"w"in T||(T.w=1),"Z"in T?(pe=Nd(qa(T.y,0,1)),tt=pe.getUTCDay(),pe=tt>4||tt===0?xl.ceil(pe):xl(pe),pe=gl.offset(pe,(T.V-1)*7),T.y=pe.getUTCFullYear(),T.m=pe.getUTCMonth(),T.d=pe.getUTCDate()+(T.w+6)%7):(pe=Dd(qa(T.y,0,1)),tt=pe.getDay(),pe=tt>4||tt===0?yl.ceil(pe):yl(pe),pe=Ka.offset(pe,(T.V-1)*7),T.y=pe.getFullYear(),T.m=pe.getMonth(),T.d=pe.getDate()+(T.w+6)%7)}else("W"in T||"U"in T)&&("w"in T||(T.w="u"in T?T.u%7:"W"in T?1:0),tt="Z"in T?Nd(qa(T.y,0,1)).getUTCDay():Dd(qa(T.y,0,1)).getDay(),T.m=0,T.d="W"in T?(T.w+6)%7+T.W*7-(tt+5)%7:T.w+T.U*7-(tt+6)%7);return"Z"in T?(T.H+=T.Z/100|0,T.M+=T.Z%100,Nd(T)):Dd(T)}}function C(B,K,ne,T){for(var De=0,pe=K.length,tt=ne.length,dt,Nr;De<pe;){if(T>=tt)return-1;if(dt=K.charCodeAt(De++),dt===37){if(dt=K.charAt(De++),Nr=w[dt in xx?K.charAt(De++):dt],!Nr||(T=Nr(B,ne,T))<0)return-1}else if(dt!=ne.charCodeAt(T++))return-1}return T}function M(B,K,ne){var T=c.exec(K.slice(ne));return T?(B.p=u.get(T[0].toLowerCase()),ne+T[0].length):-1}function $(B,K,ne){var T=h.exec(K.slice(ne));return T?(B.w=m.get(T[0].toLowerCase()),ne+T[0].length):-1}function j(B,K,ne){var T=f.exec(K.slice(ne));return T?(B.w=d.get(T[0].toLowerCase()),ne+T[0].length):-1}function _(B,K,ne){var T=v.exec(K.slice(ne));return T?(B.m=b.get(T[0].toLowerCase()),ne+T[0].length):-1}function I(B,K,ne){var T=p.exec(K.slice(ne));return T?(B.m=g.get(T[0].toLowerCase()),ne+T[0].length):-1}function D(B,K,ne){return C(B,t,K,ne)}function L(B,K,ne){return C(B,r,K,ne)}function W(B,K,ne){return C(B,n,K,ne)}function H(B){return o[B.getDay()]}function te(B){return a[B.getDay()]}function Q(B){return l[B.getMonth()]}function F(B){return s[B.getMonth()]}function U(B){return i[+(B.getHours()>=12)]}function V(B){return 1+~~(B.getMonth()/3)}function re(B){return o[B.getUTCDay()]}function Z(B){return a[B.getUTCDay()]}function J(B){return l[B.getUTCMonth()]}function ee(B){return s[B.getUTCMonth()]}function oe(B){return i[+(B.getUTCHours()>=12)]}function le(B){return 1+~~(B.getUTCMonth()/3)}return{format:function(B){var K=O(B+="",x);return K.toString=function(){return B},K},parse:function(B){var K=E(B+="",!1);return K.toString=function(){return B},K},utcFormat:function(B){var K=O(B+="",S);return K.toString=function(){return B},K},utcParse:function(B){var K=E(B+="",!0);return K.toString=function(){return B},K}}}var xx={"-":"",_:" ",0:"0"},mt=/^\s*\d+/,C5=/^%/,k5=/[\\^$*+?|[\]().{}]/g;function ve(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(t)+i:i)}function T5(e){return e.replace(k5,"\\$&")}function Ya(e){return new RegExp("^(?:"+e.map(T5).join("|")+")","i")}function Ga(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function M5(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function j5(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function D5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function N5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function I5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function wx(e,t,r){var n=mt.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function _x(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function $5(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function R5(e,t,r){var n=mt.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function L5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function Sx(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function F5(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function Ox(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function B5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function z5(e,t,r){var n=mt.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function W5(e,t,r){var n=mt.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function V5(e,t,r){var n=mt.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function H5(e,t,r){var n=C5.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function U5(e,t,r){var n=mt.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function K5(e,t,r){var n=mt.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function Ax(e,t){return ve(e.getDate(),t,2)}function q5(e,t){return ve(e.getHours(),t,2)}function Y5(e,t){return ve(e.getHours()%12||12,t,2)}function G5(e,t){return ve(1+Ka.count(qr(e),e),t,3)}function Ex(e,t){return ve(e.getMilliseconds(),t,3)}function X5(e,t){return Ex(e,t)+"000"}function Z5(e,t){return ve(e.getMonth()+1,t,2)}function J5(e,t){return ve(e.getMinutes(),t,2)}function Q5(e,t){return ve(e.getSeconds(),t,2)}function eI(e){var t=e.getDay();return t===0?7:t}function tI(e,t){return ve(vl.count(qr(e)-1,e),t,2)}function Px(e){var t=e.getDay();return t>=4||t===0?Ri(e):Ri.ceil(e)}function rI(e,t){return e=Px(e),ve(Ri.count(qr(e),e)+(qr(e).getDay()===4),t,2)}function nI(e){return e.getDay()}function iI(e,t){return ve(yl.count(qr(e)-1,e),t,2)}function aI(e,t){return ve(e.getFullYear()%100,t,2)}function oI(e,t){return e=Px(e),ve(e.getFullYear()%100,t,2)}function sI(e,t){return ve(e.getFullYear()%1e4,t,4)}function lI(e,t){var r=e.getDay();return e=r>=4||r===0?Ri(e):Ri.ceil(e),ve(e.getFullYear()%1e4,t,4)}function cI(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ve(t/60|0,"0",2)+ve(t%60,"0",2)}function Cx(e,t){return ve(e.getUTCDate(),t,2)}function uI(e,t){return ve(e.getUTCHours(),t,2)}function fI(e,t){return ve(e.getUTCHours()%12||12,t,2)}function dI(e,t){return ve(1+gl.count(Yr(e),e),t,3)}function kx(e,t){return ve(e.getUTCMilliseconds(),t,3)}function hI(e,t){return kx(e,t)+"000"}function pI(e,t){return ve(e.getUTCMonth()+1,t,2)}function mI(e,t){return ve(e.getUTCMinutes(),t,2)}function gI(e,t){return ve(e.getUTCSeconds(),t,2)}function vI(e){var t=e.getUTCDay();return t===0?7:t}function yI(e,t){return ve(bl.count(Yr(e)-1,e),t,2)}function Tx(e){var t=e.getUTCDay();return t>=4||t===0?Li(e):Li.ceil(e)}function bI(e,t){return e=Tx(e),ve(Li.count(Yr(e),e)+(Yr(e).getUTCDay()===4),t,2)}function xI(e){return e.getUTCDay()}function wI(e,t){return ve(xl.count(Yr(e)-1,e),t,2)}function _I(e,t){return ve(e.getUTCFullYear()%100,t,2)}function SI(e,t){return e=Tx(e),ve(e.getUTCFullYear()%100,t,2)}function OI(e,t){return ve(e.getUTCFullYear()%1e4,t,4)}function AI(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Li(e):Li.ceil(e),ve(e.getUTCFullYear()%1e4,t,4)}function EI(){return"+0000"}function Mx(){return"%"}function jx(e){return+e}function Dx(e){return Math.floor(+e/1e3)}var Fi,Nx,Ix;PI({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 PI(e){return Fi=P5(e),Nx=Fi.format,Fi.parse,Ix=Fi.utcFormat,Fi.utcParse,Fi}function CI(e){return new Date(e)}function kI(e){return e instanceof Date?+e:+new Date(+e)}function Id(e,t,r,n,i,a,o,s,l,c){var u=gd(),f=u.invert,d=u.domain,h=c(".%L"),m=c(":%S"),p=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),b=c("%b %d"),x=c("%B"),S=c("%Y");function w(O){return(l(O)<O?h:s(O)<O?m:o(O)<O?p:a(O)<O?g:n(O)<O?i(O)<O?v:b:r(O)<O?x:S)(O)}return u.invert=function(O){return new Date(f(O))},u.domain=function(O){return arguments.length?d(Array.from(O,kI)):d().map(CI)},u.ticks=function(O){var E=d();return e(E[0],E[E.length-1],O??10)},u.tickFormat=function(O,E){return E==null?w:c(E)},u.nice=function(O){var E=d();return(!O||typeof O.range!="function")&&(O=t(E[0],E[E.length-1],O??10)),O?d(nx(E,O)):u},u.copy=function(){return Ha(u,Id(e,t,r,n,i,a,o,s,l,c))},u}function TI(){return sr.apply(Id(A5,E5,qr,Md,vl,Ka,kd,Pd,Gn,Nx).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function MI(){return sr.apply(Id(S5,O5,Yr,jd,bl,gl,Td,Cd,Gn,Ix).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function wl(){var e=0,t=1,r,n,i,a,o=kt,s=!1,l;function c(f){return f==null||isNaN(f=+f)?l:o(i===0?.5:(f=(a(f)-r)*i,s?Math.max(0,Math.min(1,f)):f))}c.domain=function(f){return arguments.length?([e,t]=f,r=a(e=+e),n=a(t=+t),i=r===n?0:1/(n-r),c):[e,t]},c.clamp=function(f){return arguments.length?(s=!!f,c):s},c.interpolator=function(f){return arguments.length?(o=f,c):o};function u(f){return function(d){var h,m;return arguments.length?([h,m]=d,o=f(h,m),c):[o(0),o(1)]}}return c.range=u(Ii),c.rangeRound=u(pd),c.unknown=function(f){return arguments.length?(l=f,c):l},function(f){return a=f,r=f(e),n=f(t),i=r===n?0:1/(n-r),c}}function mn(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function $x(){var e=pn(wl()(kt));return e.copy=function(){return mn(e,$x())},Vr.apply(e,arguments)}function Rx(){var e=bd(wl()).domain([1,10]);return e.copy=function(){return mn(e,Rx()).base(e.base())},Vr.apply(e,arguments)}function Lx(){var e=xd(wl());return e.copy=function(){return mn(e,Lx()).constant(e.constant())},Vr.apply(e,arguments)}function $d(){var e=wd(wl());return e.copy=function(){return mn(e,$d()).exponent(e.exponent())},Vr.apply(e,arguments)}function jI(){return $d.apply(null,arguments).exponent(.5)}function Fx(){var e=[],t=kt;function r(n){if(n!=null&&!isNaN(n=+n))return t((La(e,n,1)-1)/(e.length-1))}return r.domain=function(n){if(!arguments.length)return e.slice();e=[];for(let i of n)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(hn),r},r.interpolator=function(n){return arguments.length?(t=n,r):t},r.range=function(){return e.map((n,i)=>t(i/(e.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>vN(e,a/n))},r.copy=function(){return Fx(t).domain(e)},Vr.apply(r,arguments)}function _l(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,c=kt,u,f=!1,d;function h(p){return isNaN(p=+p)?d:(p=.5+((p=+u(p))-a)*(n*p<n*a?s:l),c(f?Math.max(0,Math.min(1,p)):p))}h.domain=function(p){return arguments.length?([e,t,r]=p,i=u(e=+e),a=u(t=+t),o=u(r=+r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,h):[e,t,r]},h.clamp=function(p){return arguments.length?(f=!!p,h):f},h.interpolator=function(p){return arguments.length?(c=p,h):c};function m(p){return function(g){var v,b,x;return arguments.length?([v,b,x]=g,c=HN(p,[v,b,x]),h):[c(0),c(.5),c(1)]}}return h.range=m(Ii),h.rangeRound=m(pd),h.unknown=function(p){return arguments.length?(d=p,h):d},function(p){return u=p,i=p(e),a=p(t),o=p(r),s=i===a?0:.5/(a-i),l=a===o?0:.5/(o-a),n=a<i?-1:1,h}}function Bx(){var e=pn(_l()(kt));return e.copy=function(){return mn(e,Bx())},Vr.apply(e,arguments)}function zx(){var e=bd(_l()).domain([.1,1,10]);return e.copy=function(){return mn(e,zx()).base(e.base())},Vr.apply(e,arguments)}function Wx(){var e=xd(_l());return e.copy=function(){return mn(e,Wx()).constant(e.constant())},Vr.apply(e,arguments)}function Rd(){var e=wd(_l());return e.copy=function(){return mn(e,Rd()).exponent(e.exponent())},Vr.apply(e,arguments)}function DI(){return Rd.apply(null,arguments).exponent(.5)}const Xa=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:sd,scaleDiverging:Bx,scaleDivergingLog:zx,scaleDivergingPow:Rd,scaleDivergingSqrt:DI,scaleDivergingSymlog:Wx,scaleIdentity:rx,scaleImplicit:ad,scaleLinear:tx,scaleLog:sx,scaleOrdinal:od,scalePoint:xN,scalePow:_d,scaleQuantile:px,scaleQuantize:mx,scaleRadial:hx,scaleSequential:$x,scaleSequentialLog:Rx,scaleSequentialPow:$d,scaleSequentialQuantile:Fx,scaleSequentialSqrt:jI,scaleSequentialSymlog:Lx,scaleSqrt:h5,scaleSymlog:ux,scaleThreshold:gx,scaleTime:TI,scaleUtc:MI,tickFormat:ex},Symbol.toStringTag,{value:"Module"}));var gn=e=>e.chartData,Ld=N([gn],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Sl=(e,t,r,n)=>n?Ld(e):gn(e);function Bi(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(Yt(t)&&Yt(r))return!0}return!1}function Vx(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function NI(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(Yt(r))i=r;else if(typeof r=="function")return;if(Yt(n))a=n;else if(typeof n=="function")return;var o=[i,a];if(Bi(o))return o}}function II(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Bi(n))return Vx(n,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[i,a]=e,o,s;if(i==="auto")t!=null&&(o=Math.min(...t));else if(X(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i=="string"&&$0.test(i)){var l=$0.exec(i);if(l==null||t==null)o=void 0;else{var c=+l[1];o=t[0]-c}}else o=t?.[0];if(a==="auto")t!=null&&(s=Math.max(...t));else if(X(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&R0.test(a)){var u=R0.exec(a);if(u==null||t==null)s=void 0;else{var f=+u[1];s=t[1]+f}}else s=t?.[1];var d=[o,s];if(Bi(d))return t==null?d:Vx(d,t,r)}}}var zi=1e9,$I={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},zd,We=!0,cr="[DecimalError] ",Jn=cr+"Invalid argument: ",Fd=cr+"Exponent out of range: ",Wi=Math.floor,Qn=Math.pow,RI=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Gt,gt=1e7,Le=7,Hx=9007199254740991,Ol=Wi(Hx/Le),Y={};Y.absoluteValue=Y.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e},Y.comparedTo=Y.cmp=function(e){var t,r,n,i,a=this;if(e=new a.constructor(e),a.s!==e.s)return a.s||-e.s;if(a.e!==e.e)return a.e>e.e^a.s<0?1:-1;for(n=a.d.length,i=e.d.length,t=0,r=n<i?n:i;t<r;++t)if(a.d[t]!==e.d[t])return a.d[t]>e.d[t]^a.s<0?1:-1;return n===i?0:n>i^a.s<0?1:-1},Y.decimalPlaces=Y.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Le;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r},Y.dividedBy=Y.div=function(e){return Gr(this,new this.constructor(e))},Y.dividedToIntegerBy=Y.idiv=function(e){var t=this,r=t.constructor;return Me(Gr(t,new r(e),0,1),r.precision)},Y.equals=Y.eq=function(e){return!this.cmp(e)},Y.exponent=function(){return at(this)},Y.greaterThan=Y.gt=function(e){return this.cmp(e)>0},Y.greaterThanOrEqualTo=Y.gte=function(e){return this.cmp(e)>=0},Y.isInteger=Y.isint=function(){return this.e>this.d.length-2},Y.isNegative=Y.isneg=function(){return this.s<0},Y.isPositive=Y.ispos=function(){return this.s>0},Y.isZero=function(){return this.s===0},Y.lessThan=Y.lt=function(e){return this.cmp(e)<0},Y.lessThanOrEqualTo=Y.lte=function(e){return this.cmp(e)<1},Y.logarithm=Y.log=function(e){var t,r=this,n=r.constructor,i=n.precision,a=i+5;if(e===void 0)e=new n(10);else if(e=new n(e),e.s<1||e.eq(Gt))throw Error(cr+"NaN");if(r.s<1)throw Error(cr+(r.s?"NaN":"-Infinity"));return r.eq(Gt)?new n(0):(We=!1,t=Gr(Za(r,a),Za(e,a),a),We=!0,Me(t,i))},Y.minus=Y.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Yx(t,e):Ux(t,(e.s=-e.s,e))},Y.modulo=Y.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(cr+"NaN");return r.s?(We=!1,t=Gr(r,e,0,1).times(e),We=!0,r.minus(t)):Me(new n(r),i)},Y.naturalExponential=Y.exp=function(){return Kx(this)},Y.naturalLogarithm=Y.ln=function(){return Za(this)},Y.negated=Y.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e},Y.plus=Y.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?Ux(t,e):Yx(t,(e.s=-e.s,e))},Y.precision=Y.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Jn+e);if(t=at(i)+1,n=i.d.length-1,r=n*Le+1,n=i.d[n],n){for(;n%10==0;n/=10)r--;for(n=i.d[0];n>=10;n/=10)r++}return e&&t>r?t:r},Y.squareRoot=Y.sqrt=function(){var e,t,r,n,i,a,o,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(cr+"NaN")}for(e=at(s),We=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Cr(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Wi((e+1)/2)-(e<0||e%2),i==1/0?t="5e"+e:(t=i.toExponential(),t=t.slice(0,t.indexOf("e")+1)+e),n=new l(t)):n=new l(i.toString()),r=l.precision,i=o=r+3;;)if(a=n,n=a.plus(Gr(s,a,o+2)).times(.5),Cr(a.d).slice(0,o)===(t=Cr(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if(Me(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return We=!0,Me(n,r)},Y.times=Y.mul=function(e){var t,r,n,i,a,o,s,l,c,u=this,f=u.constructor,d=u.d,h=(e=new f(e)).d;if(!u.s||!e.s)return new f(0);for(e.s*=u.s,r=u.e+e.e,l=d.length,c=h.length,l<c&&(a=d,d=h,h=a,o=l,l=c,c=o),a=[],o=l+c,n=o;n--;)a.push(0);for(n=c;--n>=0;){for(t=0,i=l+n;i>n;)s=a[i]+h[n]*d[i-n-1]+t,a[i--]=s%gt|0,t=s/gt|0;a[i]=(a[i]+t)%gt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,We?Me(e,f.precision):e},Y.toDecimalPlaces=Y.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Pr(e,0,zi),t===void 0?t=n.rounding:Pr(t,0,8),Me(r,e+at(r)+1,t))},Y.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=ei(n,!0):(Pr(e,0,zi),t===void 0?t=i.rounding:Pr(t,0,8),n=Me(new i(n),e+1,t),r=ei(n,!0,e+1)),r},Y.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?ei(i):(Pr(e,0,zi),t===void 0?t=a.rounding:Pr(t,0,8),n=Me(new a(i),e+at(i)+1,t),r=ei(n.abs(),!1,e+at(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)},Y.toInteger=Y.toint=function(){var e=this,t=e.constructor;return Me(new t(e),at(e)+1,t.rounding)},Y.toNumber=function(){return+this},Y.toPower=Y.pow=function(e){var t,r,n,i,a,o,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(Gt);if(s=new l(s),!s.s){if(e.s<1)throw Error(cr+"Infinity");return s}if(s.eq(Gt))return s;if(n=l.precision,e.eq(Gt))return Me(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=u<0?-u:u)<=Hx){for(i=new l(Gt),t=Math.ceil(n/Le+4),We=!1;r%2&&(i=i.times(s),Gx(i.d,t)),r=Wi(r/2),r!==0;)s=s.times(s),Gx(s.d,t);return We=!0,e.s<0?new l(Gt).div(i):Me(i,n)}}else if(a<0)throw Error(cr+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,We=!1,i=e.times(Za(s,n+c)),We=!0,i=Kx(i),i.s=a,i},Y.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=at(i),n=ei(i,r<=a.toExpNeg||r>=a.toExpPos)):(Pr(e,1,zi),t===void 0?t=a.rounding:Pr(t,0,8),i=Me(new a(i),e,t),r=at(i),n=ei(i,e<=r||r<=a.toExpNeg,e)),n},Y.toSignificantDigits=Y.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Pr(e,1,zi),t===void 0?t=n.rounding:Pr(t,0,8)),Me(new n(r),e,t)},Y.toString=Y.valueOf=Y.val=Y.toJSON=Y[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=at(e),r=e.constructor;return ei(e,t<=r.toExpNeg||t>=r.toExpPos)};function Ux(e,t){var r,n,i,a,o,s,l,c,u=e.constructor,f=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),We?Me(t,f):t;if(l=e.d,c=t.d,o=e.e,i=t.e,l=l.slice(),a=o-i,a){for(a<0?(n=l,a=-a,s=c.length):(n=c,i=o,s=l.length),o=Math.ceil(f/Le),s=o>s?o+1:s+1,a>s&&(a=s,n.length=1),n.reverse();a--;)n.push(0);n.reverse()}for(s=l.length,a=c.length,s-a<0&&(a=s,n=c,c=l,l=n),r=0;a;)r=(l[--a]=l[a]+c[a]+r)/gt|0,l[a]%=gt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,We?Me(t,f):t}function Pr(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Jn+e)}function Cr(e){var t,r,n,i=e.length-1,a="",o=e[0];if(i>0){for(a+=o,t=1;t<i;t++)n=e[t]+"",r=Le-n.length,r&&(a+=vn(r)),a+=n;o=e[t],n=o+"",r=Le-n.length,r&&(a+=vn(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var Gr=(function(){function e(n,i){var a,o=0,s=n.length;for(n=n.slice();s--;)a=n[s]*i+o,n[s]=a%gt|0,o=a/gt|0;return o&&n.unshift(o),n}function t(n,i,a,o){var s,l;if(a!=o)l=a>o?1:-1;else for(s=l=0;s<a;s++)if(n[s]!=i[s]){l=n[s]>i[s]?1:-1;break}return l}function r(n,i,a){for(var o=0;a--;)n[a]-=o,o=n[a]<i[a]?1:0,n[a]=o*gt+n[a]-i[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,a,o){var s,l,c,u,f,d,h,m,p,g,v,b,x,S,w,O,E,C,M=n.constructor,$=n.s==i.s?1:-1,j=n.d,_=i.d;if(!n.s)return new M(n);if(!i.s)throw Error(cr+"Division by zero");for(l=n.e-i.e,E=_.length,w=j.length,h=new M($),m=h.d=[],c=0;_[c]==(j[c]||0);)++c;if(_[c]>(j[c]||0)&&--l,a==null?b=a=M.precision:o?b=a+(at(n)-at(i))+1:b=a,b<0)return new M(0);if(b=b/Le+2|0,c=0,E==1)for(u=0,_=_[0],b++;(c<w||u)&&b--;c++)x=u*gt+(j[c]||0),m[c]=x/_|0,u=x%_|0;else{for(u=gt/(_[0]+1)|0,u>1&&(_=e(_,u),j=e(j,u),E=_.length,w=j.length),S=E,p=j.slice(0,E),g=p.length;g<E;)p[g++]=0;C=_.slice(),C.unshift(0),O=_[0],_[1]>=gt/2&&++O;do u=0,s=t(_,p,E,g),s<0?(v=p[0],E!=g&&(v=v*gt+(p[1]||0)),u=v/O|0,u>1?(u>=gt&&(u=gt-1),f=e(_,u),d=f.length,g=p.length,s=t(f,p,d,g),s==1&&(u--,r(f,E<d?C:_,d))):(u==0&&(s=u=1),f=_.slice()),d=f.length,d<g&&f.unshift(0),r(p,f,g),s==-1&&(g=p.length,s=t(_,p,E,g),s<1&&(u++,r(p,E<g?C:_,g))),g=p.length):s===0&&(u++,p=[0]),m[c++]=u,s&&p[0]?p[g++]=j[S]||0:(p=[j[S]],g=1);while((S++<w||p[0]!==void 0)&&b--)}return m[0]||m.shift(),h.e=l,Me(h,o?a+at(h)+1:a)}})();function Kx(e,t){var r,n,i,a,o,s,l=0,c=0,u=e.constructor,f=u.precision;if(at(e)>16)throw Error(Fd+at(e));if(!e.s)return new u(Gt);for(We=!1,s=f,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(Qn(2,c))/Math.LN10*2+5|0,s+=n,r=i=a=new u(Gt),u.precision=s;;){if(i=Me(i.times(e),s),r=r.times(++l),o=a.plus(Gr(i,r,s)),Cr(o.d).slice(0,s)===Cr(a.d).slice(0,s)){for(;c--;)a=Me(a.times(a),s);return u.precision=f,t==null?(We=!0,Me(a,f)):a}a=o}}function at(e){for(var t=e.e*Le,r=e.d[0];r>=10;r/=10)t++;return t}function Bd(e,t,r){if(t>e.LN10.sd())throw We=!0,r&&(e.precision=r),Error(cr+"LN10 precision limit exceeded");return Me(new e(e.LN10),t)}function vn(e){for(var t="";e--;)t+="0";return t}function Za(e,t){var r,n,i,a,o,s,l,c,u,f=1,d=10,h=e,m=h.d,p=h.constructor,g=p.precision;if(h.s<1)throw Error(cr+(h.s?"NaN":"-Infinity"));if(h.eq(Gt))return new p(0);if(t==null?(We=!1,c=g):c=t,h.eq(10))return t==null&&(We=!0),Bd(p,c);if(c+=d,p.precision=c,r=Cr(m),n=r.charAt(0),a=at(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Cr(h.d),n=r.charAt(0),f++;a=at(h),n>1?(h=new p("0."+r),a++):h=new p(n+"."+r.slice(1))}else return l=Bd(p,c+2,g).times(a+""),h=Za(new p(n+"."+r.slice(1)),c-d).plus(l),p.precision=g,t==null?(We=!0,Me(h,g)):h;for(s=o=h=Gr(h.minus(Gt),h.plus(Gt),c),u=Me(h.times(h),c),i=3;;){if(o=Me(o.times(u),c),l=s.plus(Gr(o,new p(i),c)),Cr(l.d).slice(0,c)===Cr(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(Bd(p,c+2,g).times(a+""))),s=Gr(s,new p(f),c),p.precision=g,t==null?(We=!0,Me(s,g)):s;s=l,i+=2}}function qx(e,t){var r,n,i;for((r=t.indexOf("."))>-1&&(t=t.replace(".","")),(n=t.search(/e/i))>0?(r<0&&(r=n),r+=+t.slice(n+1),t=t.substring(0,n)):r<0&&(r=t.length),n=0;t.charCodeAt(n)===48;)++n;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(n,i),t){if(i-=n,r=r-n-1,e.e=Wi(r/Le),e.d=[],n=(r+1)%Le,r<0&&(n+=Le),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Le;n<i;)e.d.push(+t.slice(n,n+=Le));t=t.slice(n),n=Le-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),We&&(e.e>Ol||e.e<-Ol))throw Error(Fd+r)}else e.s=0,e.e=0,e.d=[0];return e}function Me(e,t,r){var n,i,a,o,s,l,c,u,f=e.d;for(o=1,a=f[0];a>=10;a/=10)o++;if(n=t-o,n<0)n+=Le,i=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Le),a=f.length,u>=a)return e;for(c=a=f[u],o=1;a>=10;a/=10)o++;n%=Le,i=n-Le+o}if(r!==void 0&&(a=Qn(10,o-i-1),s=c/a%10|0,l=t<0||f[u+1]!==void 0||c%a,l=r<4?(s||l)&&(r==0||r==(e.s<0?3:2)):s>5||s==5&&(r==4||l||r==6&&(n>0?i>0?c/Qn(10,o-i):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=at(e),f.length=1,t=t-a-1,f[0]=Qn(10,(Le-t%Le)%Le),e.e=Wi(-t/Le)||0):(f.length=1,f[0]=e.e=e.s=0),e;if(n==0?(f.length=u,a=1,u--):(f.length=u+1,a=Qn(10,Le-n),f[u]=i>0?(c/Qn(10,o-i)%Qn(10,i)|0)*a:0),l)for(;;)if(u==0){(f[0]+=a)==gt&&(f[0]=1,++e.e);break}else{if(f[u]+=a,f[u]!=gt)break;f[u--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(We&&(e.e>Ol||e.e<-Ol))throw Error(Fd+at(e));return e}function Yx(e,t){var r,n,i,a,o,s,l,c,u,f,d=e.constructor,h=d.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new d(e),We?Me(t,h):t;if(l=e.d,f=t.d,n=t.e,c=e.e,l=l.slice(),o=c-n,o){for(u=o<0,u?(r=l,o=-o,s=f.length):(r=f,n=c,s=l.length),i=Math.max(Math.ceil(h/Le),s)+2,o>i&&(o=i,r.length=1),r.reverse(),i=o;i--;)r.push(0);r.reverse()}else{for(i=l.length,s=f.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=f[i]){u=l[i]<f[i];break}o=0}for(u&&(r=l,l=f,f=r,t.s=-t.s),s=l.length,i=f.length-s;i>0;--i)l[s++]=0;for(i=f.length;i>o;){if(l[--i]<f[i]){for(a=i;a&&l[--a]===0;)l[a]=gt-1;--l[a],l[i]+=gt}l[i]-=f[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(t.d=l,t.e=n,We?Me(t,h):t):new d(0)}function ei(e,t,r){var n,i=at(e),a=Cr(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+vn(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+vn(-i-1)+a,r&&(n=r-o)>0&&(a+=vn(n))):i>=o?(a+=vn(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+vn(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=vn(n))),e.s<0?"-"+a:a}function Gx(e,t){if(e.length>t)return e.length=t,!0}function Xx(e){var t,r,n;function i(a){var o=this;if(!(o instanceof i))return new i(a);if(o.constructor=i,a instanceof i){o.s=a.s,o.e=a.e,o.d=(a=a.d)?a.slice():a;return}if(typeof a=="number"){if(a*0!==0)throw Error(Jn+a);if(a>0)o.s=1;else if(a<0)a=-a,o.s=-1;else{o.s=0,o.e=0,o.d=[0];return}if(a===~~a&&a<1e7){o.e=0,o.d=[a];return}return qx(o,a.toString())}else if(typeof a!="string")throw Error(Jn+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,RI.test(a))qx(o,a);else throw Error(Jn+a)}if(i.prototype=Y,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.clone=Xx,i.config=i.set=LI,e===void 0&&(e={}),e)for(n=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<n.length;)e.hasOwnProperty(r=n[t++])||(e[r]=this[r]);return i.config(e),i}function LI(e){if(!e||typeof e!="object")throw Error(cr+"Object expected");var t,r,n,i=["precision",1,zi,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((n=e[r=i[t]])!==void 0)if(Wi(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Jn+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Jn+r+": "+n);return this}var zd=Xx($I);Gt=new zd(1);const Pe=zd;var FI=e=>e,Zx={},Jx=e=>e===Zx,Qx=e=>function t(){return arguments.length===0||arguments.length===1&&Jx(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},e1=(e,t)=>e===1?t:Qx(function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a=n.filter(o=>o!==Zx).length;return a>=e?t(...n):e1(e-a,Qx(function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];var c=n.map(u=>Jx(u)?s.shift():u);return t(...c,...s)}))}),Al=e=>e1(e.length,e),Wd=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},BI=Al((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),zI=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return FI;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce((s,l)=>l(s),a(...arguments))}},Vd=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),t1=e=>{var t=null,r=null;return function(){for(var n=arguments.length,i=new Array(n),a=0;a<n;a++)i[a]=arguments[a];return t&&i.every((o,s)=>{var l;return o===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,r=e(...i)),r}};function r1(e){var t;return e===0?t=1:t=Math.floor(new Pe(e).abs().log(10).toNumber())+1,t}function n1(e,t,r){for(var n=new Pe(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}Al((e,t,r)=>{var n=+e,i=+t;return n+r*(i-n)}),Al((e,t,r)=>{var n=t-+e;return n=n||1/0,(r-e)/n}),Al((e,t,r)=>{var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});var i1=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},a1=(e,t,r)=>{if(e.lte(0))return new Pe(0);var n=r1(e.toNumber()),i=new Pe(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new Pe(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?new Pe(l.toNumber()):new Pe(Math.ceil(l.toNumber()))},WI=(e,t,r)=>{var n=new Pe(1),i=new Pe(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new Pe(10).pow(r1(e)-1),i=new Pe(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new Pe(Math.floor(e)))}else e===0?i=new Pe(Math.floor((t-1)/2)):r||(i=new Pe(Math.floor(e)));var o=Math.floor((t-1)/2),s=zI(BI(l=>i.add(new Pe(l-o).mul(n)).toNumber()),Wd);return s(0,t)},o1=function(t,r,n,i){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((r-t)/(n-1)))return{step:new Pe(0),tickMin:new Pe(0),tickMax:new Pe(0)};var o=a1(new Pe(r).sub(t).div(n-1),i,a),s;t<=0&&r>=0?s=new Pe(0):(s=new Pe(t).add(r).div(2),s=s.sub(new Pe(s).mod(o)));var l=Math.ceil(s.sub(t).div(o).toNumber()),c=Math.ceil(new Pe(r).sub(s).div(o).toNumber()),u=l+c+1;return u>n?o1(t,r,n,i,a+1):(u<n&&(c=r>0?c+(n-u):c,l=r>0?l:l+(n-u)),{step:o,tickMin:s.sub(new Pe(l).mul(o)),tickMax:s.add(new Pe(c).mul(o))})};function VI(e){var[t,r]=e,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,a=Math.max(n,2),[o,s]=i1([t,r]);if(o===-1/0||s===1/0){var l=s===1/0?[o,...Wd(0,n-1).map(()=>1/0)]:[...Wd(0,n-1).map(()=>-1/0),s];return t>r?Vd(l):l}if(o===s)return WI(o,n,i);var{step:c,tickMin:u,tickMax:f}=o1(o,s,a,i,0),d=n1(u,f.add(new Pe(.1).mul(c)),c);return t>r?Vd(d):d}function HI(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,o]=i1([r,n]);if(a===-1/0||o===1/0)return[r,n];if(a===o)return[a];var s=Math.max(t,2),l=a1(new Pe(o).sub(a).div(s-1),i,0),c=[...n1(new Pe(a),new Pe(o),l),o];return i===!1&&(c=c.map(u=>Math.round(u))),r>n?Vd(c):c}var UI=t1(VI),KI=t1(HI),s1=e=>e.rootProps.maxBarSize,qI=e=>e.rootProps.barGap,l1=e=>e.rootProps.barCategoryGap,YI=e=>e.rootProps.barSize,Ja=e=>e.rootProps.stackOffset,Hd=e=>e.options.chartName,Ud=e=>e.rootProps.syncId,c1=e=>e.rootProps.syncMethod,Kd=e=>e.options.eventEmitter,Xr={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},Xt={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},El=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},GI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Xr.angleAxisId,includeHidden:!1,name:void 0,reversed:Xr.reversed,scale:Xr.scale,tick:Xr.tick,tickCount:void 0,ticks:void 0,type:Xr.type,unit:void 0},XI={allowDataOverflow:Xt.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Xt.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Xt.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Xt.scale,tick:Xt.tick,tickCount:Xt.tickCount,ticks:void 0,type:Xt.type,unit:void 0},ZI={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Xr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Xr.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Xr.scale,tick:Xr.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},JI={allowDataOverflow:Xt.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:Xt.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Xt.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Xt.scale,tick:Xt.tick,tickCount:Xt.tickCount,ticks:void 0,type:"category",unit:void 0},qd=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?ZI:GI,Yd=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?JI:XI,Pl=e=>e.polarOptions,Gd=N([zr,Wr,st],C0),u1=N([Pl,Gd],(e,t)=>{if(e!=null)return At(e.innerRadius,t,0)}),f1=N([Pl,Gd],(e,t)=>{if(e!=null)return At(e.outerRadius,t,t*.8)}),QI=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},d1=N([Pl],QI);N([qd,d1],El);var h1=N([Gd,u1,f1],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});N([Yd,h1],El);var p1=N([ue,Pl,u1,f1,zr,Wr],(e,t,r,n,i,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||n==null)){var{cx:o,cy:s,startAngle:l,endAngle:c}=t;return{cx:At(o,i,i/2),cy:At(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),Ve=(e,t)=>t,Qa=(e,t,r)=>r;function Xd(e){return e?.id}var ct=e=>{var t=ue(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},Vi=e=>e.tooltip.settings.axisId,vt=e=>{var t=ct(e),r=Vi(e);return eo(e,t,r)},m1=N([vt],e=>e?.dataKey);function g1(e,t,r){var{chartData:n=[]}=t,{allowDuplicatedCategory:i,dataKey:a}=r,o=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:n;if(!(c==null||c.length===0)){var u=Xd(s);c.forEach((f,d)=>{var h=a==null||i?d:String($e(f,a,null)),m=$e(f,s.dataKey,0),p;o.has(h)?p=o.get(h):p={},Object.assign(p,{[u]:m}),o.set(h,p)})}}),Array.from(o.values())}function Cl(e){return e.stackId!=null&&e.dataKey!=null}function v1(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v1(Object(r),!0).forEach(function(n){e4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v1(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e4(e,t,r){return(t=t4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t4(e){var t=r4(e,"string");return typeof t=="symbol"?t:t+""}function r4(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Zd=[0,"auto"],Zt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0},y1=(e,t)=>e.cartesianAxis.xAxis[t],Zr=(e,t)=>{var r=y1(e,t);return r??Zt},Jt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Zd,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,width:Ma},b1=(e,t)=>e.cartesianAxis.yAxis[t],Jr=(e,t)=>{var r=b1(e,t);return r??Jt},n4={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},Jd=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??n4},Je=(e,t,r)=>{switch(t){case"xAxis":return Zr(e,r);case"yAxis":return Jr(e,r);case"zAxis":return Jd(e,r);case"angleAxis":return qd(e,r);case"radiusAxis":return Yd(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},i4=(e,t,r)=>{switch(t){case"xAxis":return Zr(e,r);case"yAxis":return Jr(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},eo=(e,t,r)=>{switch(t){case"xAxis":return Zr(e,r);case"yAxis":return Jr(e,r);case"angleAxis":return qd(e,r);case"radiusAxis":return Yd(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},x1=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Qd(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var Tl=e=>e.graphicalItems.cartesianItems,a4=N([Ve,Qa],Qd),eh=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),to=N([Tl,Je,a4],eh),w1=N([to],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Cl)),_1=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),S1=N([to],_1),th=e=>e.map(t=>t.data).filter(Boolean).flat(1),o4=N([to],th),rh=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},nh=N([o4,Sl],rh),ih=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:$e(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:$e(i,n)}))):e.map(n=>({value:n})),Ml=N([nh,Je,to],ih);function O1(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ti(e){return e.filter(t=>Or(t)||t instanceof Date).map(Number).filter(t=>Ut(t)===!1)}function s4(e,t,r){return!r||typeof t!="number"||Ut(t)?[]:r.length?ti(r.flatMap(n=>{var i=$e(e,n.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!Yt(a)||!Yt(o)))return[t-a,t+o]})):[]}var l4=N([w1,Sl,vt],g1),A1=(e,t,r)=>{var n={},i=t.reduce((a,o)=>(o.stackId==null||(a[o.stackId]==null&&(a[o.stackId]=[]),a[o.stackId].push(o)),a),n);return Object.fromEntries(Object.entries(i).map(a=>{var[o,s]=a,l=s.map(Xd);return[o,{stackedData:Ej(e,l,r),graphicalItems:s}]}))},ah=N([l4,w1,Ja],A1),E1=(e,t,r)=>{var{dataStartIndex:n,dataEndIndex:i}=t;if(r!=="zAxis"){var a=Mj(e,n,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},c4=N([ah,gn,Ve],E1),P1=(e,t,r,n,i)=>r.length>0?e.flatMap(a=>r.flatMap(o=>{var s,l,c=(s=n[o.id])===null||s===void 0?void 0:s.filter(f=>O1(i,f)),u=$e(a,(l=t.dataKey)!==null&&l!==void 0?l:o.dataKey);return{value:u,errorDomain:s4(a,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(a=>({value:$e(a,t.dataKey),errorDomain:[]})):e.map(a=>({value:a,errorDomain:[]})),jl=e=>e.errorBars,C1=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>O1(r,n));N([S1,jl,Ve],C1);var u4=N([nh,Je,S1,jl,Ve],P1);function f4(e){var{value:t}=e;if(Or(t)||t instanceof Date)return t}var k1=e=>{var t=e.flatMap(n=>[n.value,n.errorDomain]).flat(1),r=ti(t);if(r.length!==0)return[Math.min(...r),Math.max(...r)]},d4=(e,t,r)=>{var n=e.map(f4).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&rv(n))?Ab(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},oh=e=>{var t;if(e==null||!("domain"in e))return Zd;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=ti(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:Zd},Dl=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=r.filter(Boolean);if(i.length!==0){var a=i.flat(),o=Math.min(...a),s=Math.max(...a);return[o,s]}},T1=e=>e.referenceElements.dots,Hi=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),h4=N([T1,Ve,Qa],Hi),M1=e=>e.referenceElements.areas,p4=N([M1,Ve,Qa],Hi),j1=e=>e.referenceElements.lines,m4=N([j1,Ve,Qa],Hi),D1=(e,t)=>{var r=ti(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},g4=N(h4,Ve,D1),N1=(e,t)=>{var r=ti(e.flatMap(n=>[t==="xAxis"?n.x1:n.y1,t==="xAxis"?n.x2:n.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},v4=N([p4,Ve],N1),I1=(e,t)=>{var r=ti(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},y4=N(m4,Ve,I1),b4=N(g4,y4,v4,(e,t,r)=>Dl(e,r,t)),$1=N([Je],oh),sh=(e,t,r,n,i,a,o)=>{var s=NI(t,e.allowDataOverflow);if(s!=null)return s;var l=a==="vertical"&&o==="xAxis"||a==="horizontal"&&o==="yAxis",c=l?Dl(r,i,k1(n)):Dl(i,k1(n));return II(t,c,e.allowDataOverflow)},x4=N([Je,$1,c4,u4,b4,ue,Ve],sh),w4=[0,1],lh=(e,t,r,n,i,a,o)=>{if(!((e==null||r==null||r.length===0)&&o===void 0)){var{dataKey:s,type:l}=e,c=fn(t,a);return c&&s==null?Ab(0,r.length):l==="category"?d4(n,e,c):i==="expand"?w4:o}},ch=N([Je,ue,nh,Ml,Ja,Ve,x4],lh),R1=(e,t,r,n,i)=>{if(e!=null){var{scale:a,type:o}=e;if(a==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":o==="category"&&n&&(n.indexOf("LineChart")>=0||n.indexOf("AreaChart")>=0||n.indexOf("ComposedChart")>=0&&!r)?"point":o==="category"?"band":"linear";if(typeof a=="string"){var s="scale".concat(Sa(a));return s in Xa?s:"point"}}},Ui=N([Je,ue,x1,Hd,Ve],R1);function _4(e){if(e!=null){if(e in Xa)return Xa[e]();var t="scale".concat(Sa(e));if(t in Xa)return Xa[t]()}}function uh(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=_4(t);if(i!=null){var a=i.domain(r).range(n);return wj(a),a}}}var fh=(e,t,r)=>{var n=oh(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Bi(e))return UI(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Bi(e))return KI(e,t.tickCount,t.allowDecimals)}},dh=N([ch,eo,Ui],fh),hh=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&Bi(t)&&Array.isArray(r)&&r.length>0){var i=t[0],a=r[0],o=t[1],s=r[r.length-1];return[Math.min(i,a),Math.max(o,s)]}return t},S4=N([Je,ch,dh,Ve],hh),O4=N(Ml,Je,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(ti(e.map(s=>s.value))).sort((s,l)=>s-l);if(n.length<2)return 1/0;var i=n[n.length-1]-n[0];if(i===0)return 1/0;for(var a=0;a<n.length-1;a++){var o=n[a+1]-n[a];r=Math.min(r,o)}return r/i}}),L1=N(O4,ue,l1,st,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!Yt(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=At(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),A4=(e,t)=>{var r=Zr(e,t);return r==null||typeof r.padding!="string"?0:L1(e,"xAxis",t,r.padding)},E4=(e,t)=>{var r=Jr(e,t);return r==null||typeof r.padding!="string"?0:L1(e,"yAxis",t,r.padding)},P4=N(Zr,A4,(e,t)=>{var r,n;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((r=i.left)!==null&&r!==void 0?r:0)+t,right:((n=i.right)!==null&&n!==void 0?n:0)+t}}),C4=N(Jr,E4,(e,t)=>{var r,n;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((r=i.top)!==null&&r!==void 0?r:0)+t,bottom:((n=i.bottom)!==null&&n!==void 0?n:0)+t}}),k4=N([st,P4,Zs,Xs,(e,t,r)=>r],(e,t,r,n,i)=>{var{padding:a}=n;return i?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),T4=N([st,ue,C4,Zs,Xs,(e,t,r)=>r],(e,t,r,n,i,a)=>{var{padding:o}=i;return a?[n.height-o.bottom,o.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),ro=(e,t,r,n)=>{var i;switch(t){case"xAxis":return k4(e,r,n);case"yAxis":return T4(e,r,n);case"zAxis":return(i=Jd(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return d1(e);case"radiusAxis":return h1(e,r);default:return}},F1=N([Je,ro],El),Ki=N([Je,Ui,S4,F1],uh);N([to,jl,Ve],C1);function B1(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Nl=(e,t)=>t,Il=(e,t,r)=>r,M4=N(qs,Nl,Il,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(B1)),j4=N(Ys,Nl,Il,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(B1)),z1=(e,t)=>({width:e.width,height:t.height}),D4=(e,t)=>{var r=typeof t.width=="number"?t.width:Ma;return{width:r,height:e.height}},W1=N(st,Zr,z1),N4=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},I4=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},$4=N(Wr,st,M4,Nl,Il,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=z1(t,s);o==null&&(o=N4(t,n,e));var c=n==="top"&&!i||n==="bottom"&&i;a[s.id]=o-Number(c)*l.height,o+=(c?-1:1)*l.height}),a}),R4=N(zr,st,j4,Nl,Il,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=D4(t,s);o==null&&(o=I4(t,n,e));var c=n==="left"&&!i||n==="right"&&i;a[s.id]=o-Number(c)*l.width,o+=(c?-1:1)*l.width}),a}),L4=(e,t)=>{var r=Zr(e,t);if(r!=null)return $4(e,r.orientation,r.mirror)},F4=N([st,Zr,L4,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),B4=(e,t)=>{var r=Jr(e,t);if(r!=null)return R4(e,r.orientation,r.mirror)},z4=N([st,Jr,B4,(e,t)=>t],(e,t,r,n)=>{if(t!=null){var i=r?.[n];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),V1=N(st,Jr,(e,t)=>{var r=typeof t.width=="number"?t.width:Ma;return{width:r,height:e.height}}),H1=(e,t,r)=>{switch(t){case"xAxis":return W1(e,r).width;case"yAxis":return V1(e,r).height;default:return}},U1=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=fn(e,n),l=t.map(c=>c.value);if(o&&s&&a==="category"&&i&&rv(l))return l}},ph=N([ue,Ml,Je,Ve],U1),K1=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,o=fn(e,n);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},mh=N([ue,Ml,eo,Ve],K1),q1=N([ue,i4,Ui,Ki,ph,mh,ro,dh,Ve],(e,t,r,n,i,a,o,s,l)=>{if(t==null)return null;var c=fn(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:a,duplicateDomain:i,isCategorical:c,niceTicks:s,range:o,realScaleType:r,scale:n}}),W4=(e,t,r,n,i,a,o,s,l)=>{if(!(t==null||n==null)){var c=fn(e,l),{type:u,ticks:f,tickCount:d}=t,h=r==="scaleBand"&&typeof n.bandwidth=="function"?n.bandwidth()/2:2,m=u==="category"&&n.bandwidth?n.bandwidth()/h:0;m=l==="angleAxis"&&a!=null&&a.length>=2?pt(a[0]-a[1])*2*m:m;var p=f||i;if(p){var g=p.map((v,b)=>{var x=o?o.indexOf(v):v;return{index:b,coordinate:n(x)+m,value:v,offset:m}});return g.filter(v=>!Ut(v.coordinate))}return c&&s?s.map((v,b)=>({coordinate:n(v)+m,value:v,index:b,offset:m})):n.ticks?n.ticks(d).map(v=>({coordinate:n(v)+m,value:v,offset:m})):n.domain().map((v,b)=>({coordinate:n(v)+m,value:o?o[v]:v,index:b,offset:m}))}},Y1=N([ue,eo,Ui,Ki,dh,ro,ph,mh,Ve],W4),V4=(e,t,r,n,i,a,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=fn(e,o),{tickCount:l}=t,c=0;return c=o==="angleAxis"&&n?.length>=2?pt(n[0]-n[1])*2*c:c,s&&a?a.map((u,f)=>({coordinate:r(u)+c,value:u,index:f,offset:c})):r.ticks?r.ticks(l).map(u=>({coordinate:r(u)+c,value:u,offset:c})):r.domain().map((u,f)=>({coordinate:r(u)+c,value:i?i[u]:u,index:f,offset:c}))}},yn=N([ue,eo,Ki,ro,ph,mh,Ve],V4),bn=N(Je,Ki,(e,t)=>{if(!(e==null||t==null))return kl(kl({},e),{},{scale:t})}),H4=N([Je,Ui,ch,F1],uh);N((e,t,r)=>Jd(e,r),H4,(e,t)=>{if(!(e==null||t==null))return kl(kl({},e),{},{scale:t})});var U4=N([ue,qs,Ys],(e,t,r)=>{switch(e){case"horizontal":return t.some(n=>n.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(n=>n.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),G1=e=>e.options.defaultTooltipEventType,X1=e=>e.options.validateTooltipEventTypes;function Z1(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function gh(e,t){var r=G1(e),n=X1(e);return Z1(t,r,n)}function K4(e){return G(t=>gh(t,e))}var J1=(e,t)=>{var r,n=Number(t);if(!(Ut(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},q4=e=>e.tooltip.settings,xn={active:!1,index:null,dataKey:void 0,coordinate:void 0},Y4={itemInteraction:{click:xn,hover:xn},axisInteraction:{click:xn,hover:xn},keyboardInteraction:xn,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},Q1=qt({name:"tooltip",initialState:Y4,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var r=Br(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate,e.keyboardInteraction.dataKey=t.payload.activeDataKey}}}),{addTooltipEntrySettings:G4,removeTooltipEntrySettings:X4,setTooltipSettingsState:Z4,setActiveMouseOverItemIndex:ew,mouseLeaveItem:J4,mouseLeaveChart:tw,setActiveClickItemIndex:Q4,setMouseOverAxisIndex:rw,setMouseClickAxisIndex:e$,setSyncInteraction:vh,setKeyboardInteraction:yh}=Q1.actions,t$=Q1.reducer;function nw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $l(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nw(Object(r),!0).forEach(function(n){r$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function r$(e,t,r){return(t=n$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n$(e){var t=i$(e,"string");return typeof t=="symbol"?t:t+""}function i$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a$(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function o$(e){return e.index!=null}var iw=(e,t,r,n)=>{if(t==null)return xn;var i=a$(e,t,r);if(i==null)return xn;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(o$(i)){if(a)return $l($l({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return $l($l({},xn),{},{coordinate:i.coordinate})},bh=(e,t)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!Yt(n))return r;var i=0,a=1/0;return t.length>0&&(a=t.length-1),String(Math.max(i,Math.min(n,a)))},aw=(e,t,r,n,i,a,o,s)=>{if(!(a==null||s==null)){var l=o[0],c=l==null?void 0:s(l.positions,a);if(c!=null)return c;var u=i?.[Number(a)];if(u)switch(r){case"horizontal":return{x:u.coordinate,y:(n.top+t)/2};default:return{x:(n.left+e)/2,y:u.coordinate}}}},ow=(e,t,r,n)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return r==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&n!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(a=>{var o;return((o=a.settings)===null||o===void 0?void 0:o.dataKey)===i})},no=e=>e.options.tooltipPayloadSearcher,qi=e=>e.tooltip;function sw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function lw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?sw(Object(r),!0).forEach(function(n){s$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):sw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s$(e,t,r){return(t=l$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l$(e){var t=c$(e,"string");return typeof t=="symbol"?t:t+""}function c$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u$(e,t){return e??t}var cw=(e,t,r,n,i,a,o)=>{if(!(t==null||a==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=r,f=[];return e.reduce((d,h)=>{var m,{dataDefinedOnItem:p,settings:g}=h,v=u$(p,s),b=Array.isArray(v)?k0(v,c,u):v,x=(m=g?.dataKey)!==null&&m!==void 0?m:n,S=g?.nameKey,w;if(n&&Array.isArray(b)&&!Array.isArray(b[0])&&o==="axis"?w=nv(b,n,i):w=a(b,t,l,S),Array.isArray(w))w.forEach(E=>{var C=lw(lw({},g),{},{name:E.name,unit:E.unit,color:void 0,fill:void 0});d.push(L0({tooltipEntrySettings:C,dataKey:E.dataKey,payload:E.payload,value:$e(E.payload,E.dataKey),name:E.name}))});else{var O;d.push(L0({tooltipEntrySettings:g,dataKey:x,payload:w,value:$e(w,x),name:(O=$e(w,S))!==null&&O!==void 0?O:g?.name}))}return d},f)}},xh=N([vt,ue,x1,Hd,ct],R1),f$=N([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),d$=N([ct,Vi],Qd),io=N([f$,vt,d$],eh),h$=N([io],e=>e.filter(Cl)),p$=N([io],th),Yi=N([p$,gn],rh),m$=N([h$,gn,vt],g1),wh=N([Yi,vt,io],ih),g$=N([vt],oh),v$=N([io],e=>e.filter(Cl)),y$=N([m$,v$,Ja],A1),b$=N([y$,gn,ct],E1),x$=N([io],_1),w$=N([Yi,vt,x$,jl,ct],P1),_$=N([T1,ct,Vi],Hi),S$=N([_$,ct],D1),O$=N([M1,ct,Vi],Hi),A$=N([O$,ct],N1),E$=N([j1,ct,Vi],Hi),P$=N([E$,ct],I1),C$=N([S$,P$,A$],Dl),k$=N([vt,g$,b$,w$,C$,ue,ct],sh),uw=N([vt,ue,Yi,wh,Ja,ct,k$],lh),T$=N([uw,vt,xh],fh),M$=N([vt,uw,T$,ct],hh),fw=e=>{var t=ct(e),r=Vi(e),n=!1;return ro(e,t,r,n)},dw=N([vt,fw],El),hw=N([vt,xh,M$,dw],uh),j$=N([ue,wh,vt,ct],U1),D$=N([ue,wh,vt,ct],K1),N$=(e,t,r,n,i,a,o,s)=>{if(t){var{type:l}=t,c=fn(e,s);if(n){var u=r==="scaleBand"&&n.bandwidth?n.bandwidth()/2:2,f=l==="category"&&n.bandwidth?n.bandwidth()/u:0;return f=s==="angleAxis"&&i!=null&&i?.length>=2?pt(i[0]-i[1])*2*f:f,c&&o?o.map((d,h)=>({coordinate:n(d)+f,value:d,index:h,offset:f})):n.domain().map((d,h)=>({coordinate:n(d)+f,value:a?a[d]:d,index:h,offset:f}))}}},Qr=N([ue,vt,xh,hw,fw,j$,D$,ct],N$),_h=N([G1,X1,q4],(e,t,r)=>Z1(r.shared,e,t)),pw=e=>e.tooltip.settings.trigger,Sh=e=>e.tooltip.settings.defaultIndex,Rl=N([qi,_h,pw,Sh],iw),wn=N([Rl,Yi],bh),mw=N([Qr,wn],J1),gw=N([Rl],e=>{if(e)return e.dataKey}),vw=N([qi,_h,pw,Sh],ow),I$=N([zr,Wr,ue,st,Qr,Sh,vw,no],aw),$$=N([Rl,I$],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),R$=N([Rl],e=>e.active),L$=N([vw,wn,gn,m1,mw,no,_h],cw),F$=N([L$],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function yw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function bw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yw(Object(r),!0).forEach(function(n){B$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function B$(e,t,r){return(t=z$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z$(e){var t=W$(e,"string");return typeof t=="symbol"?t:t+""}function W$(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var V$=()=>G(vt),H$=()=>{var e=V$(),t=G(Qr),r=G(hw);return Ta(bw(bw({},e),{},{scale:r}),t)},U$=()=>G(Hd),Oh=(e,t)=>t,xw=(e,t,r)=>r,Ah=(e,t,r,n)=>n,K$=N(Qr,e=>Ts(e,t=>t.coordinate)),Eh=N([qi,Oh,xw,Ah],iw),ww=N([Eh,Yi],bh),q$=(e,t,r)=>{if(t!=null){var n=qi(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},_w=N([qi,Oh,xw,Ah],ow),Ll=N([zr,Wr,ue,st,Qr,Ah,_w,no],aw),Y$=N([Eh,Ll],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),Sw=N(Qr,ww,J1),G$=N([_w,ww,gn,m1,Sw,no,Oh],cw),X$=N([Eh],e=>({isActive:e.active,activeIndex:e.index})),Z$=(e,t,r,n,i,a,o,s)=>{if(!(!e||!t||!n||!i||!a)){var l=jj(e.chartX,e.chartY,t,r,s);if(l){var c=Nj(l,t),u=bj(c,o,a,n,i),f=Dj(t,a,u,l);return{activeIndex:String(u),activeCoordinate:f}}}};function Ph(){return Ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Ph.apply(null,arguments)}function Ow(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Fl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ow(Object(r),!0).forEach(function(n){J$(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ow(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function J$(e,t,r){return(t=Q$(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Q$(e){var t=eR(e,"string");return typeof t=="symbol"?t:t+""}function eR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tR(e){var{coordinate:t,payload:r,index:n,offset:i,tooltipAxisBandSize:a,layout:o,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,f=r,d=n;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var h,m;if(c==="ScatterChart")h=u,m=wD;else if(c==="BarChart")h=_D(o,u,i,a),m=vb;else if(o==="radial"){var{cx:p,cy:g,radius:v,startAngle:b,endAngle:x}=yb(u);h={cx:p,cy:g,startAngle:b,endAngle:x,innerRadius:v,outerRadius:v},m=xb}else h={points:tN(o,u,i)},m=Kf;var S=typeof s=="object"&&"className"in s?s.className:void 0,w=Fl(Fl(Fl(Fl({stroke:"#ccc",pointerEvents:"none"},i),h),Ue(s,!1)),{},{payload:f,payloadIndex:d,className:de("recharts-tooltip-cursor",S)});return k.isValidElement(s)?k.cloneElement(s,w):k.createElement(m,w)}function rR(e){var t=H$(),r=V0(),n=Js(),i=U$();return A.createElement(tR,Ph({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var Aw=k.createContext(null),nR=()=>k.useContext(Aw),Ch={exports:{}},Ew;function iR(){return Ew||(Ew=1,(function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(r=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function a(l,c,u,f,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var h=new i(u,f||l,d),m=r?r+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],h]:l._events[m].push(h):(l._events[m]=h,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new n:delete l._events[c]}function s(){this._events=new n,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,f;if(this._eventsCount===0)return c;for(f in u=this._events)t.call(u,f)&&c.push(r?f.slice(1):f);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=r?r+c:c,f=this._events[u];if(!f)return[];if(f.fn)return[f.fn];for(var d=0,h=f.length,m=new Array(h);d<h;d++)m[d]=f[d].fn;return m},s.prototype.listenerCount=function(c){var u=r?r+c:c,f=this._events[u];return f?f.fn?1:f.length:0},s.prototype.emit=function(c,u,f,d,h,m){var p=r?r+c:c;if(!this._events[p])return!1;var g=this._events[p],v=arguments.length,b,x;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),v){case 1:return g.fn.call(g.context),!0;case 2:return g.fn.call(g.context,u),!0;case 3:return g.fn.call(g.context,u,f),!0;case 4:return g.fn.call(g.context,u,f,d),!0;case 5:return g.fn.call(g.context,u,f,d,h),!0;case 6:return g.fn.call(g.context,u,f,d,h,m),!0}for(x=1,b=new Array(v-1);x<v;x++)b[x-1]=arguments[x];g.fn.apply(g.context,b)}else{var S=g.length,w;for(x=0;x<S;x++)switch(g[x].once&&this.removeListener(c,g[x].fn,void 0,!0),v){case 1:g[x].fn.call(g[x].context);break;case 2:g[x].fn.call(g[x].context,u);break;case 3:g[x].fn.call(g[x].context,u,f);break;case 4:g[x].fn.call(g[x].context,u,f,d);break;default:if(!b)for(w=1,b=new Array(v-1);w<v;w++)b[w-1]=arguments[w];g[x].fn.apply(g[x].context,b)}}return!0},s.prototype.on=function(c,u,f){return a(this,c,u,f,!1)},s.prototype.once=function(c,u,f){return a(this,c,u,f,!0)},s.prototype.removeListener=function(c,u,f,d){var h=r?r+c:c;if(!this._events[h])return this;if(!u)return o(this,h),this;var m=this._events[h];if(m.fn)m.fn===u&&(!d||m.once)&&(!f||m.context===f)&&o(this,h);else{for(var p=0,g=[],v=m.length;p<v;p++)(m[p].fn!==u||d&&!m[p].once||f&&m[p].context!==f)&&g.push(m[p]);g.length?this._events[h]=g.length===1?g[0]:g:o(this,h)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=r?r+c:c,this._events[u]&&o(this,u)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s})(Ch)),Ch.exports}var aR=iR();const oR=Ir(aR);var ao=new oR,kh="recharts.syncEvent.tooltip",Pw="recharts.syncEvent.brush";function Th(e,t){if(t){var r=Number.parseInt(t,10);if(!Ut(r))return e?.[r]}}var sR={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},Cw=qt({name:"options",initialState:sR,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),lR=Cw.reducer,{createEventEmitter:cR}=Cw.actions;function uR(e){return e.tooltip.syncInteraction}var fR={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},kw=qt({name:"chartData",initialState:fR,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:n}=t.payload;r!=null&&(e.dataStartIndex=r),n!=null&&(e.dataEndIndex=n)}}}),{setChartData:Tw,setDataStartEndIndexes:dR,setComputedData:_U}=kw.actions,hR=kw.reducer,pR=["x","y"];function Mw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ri(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mw(Object(r),!0).forEach(function(n){mR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mR(e,t,r){return(t=gR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gR(e){var t=vR(e,"string");return typeof t=="symbol"?t:t+""}function vR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yR(e,t){if(e==null)return{};var r,n,i=bR(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function bR(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var jw=()=>{};function xR(){var e=G(Ud),t=G(Kd),r=Ze(),n=G(c1),i=G(Qr),a=Js(),o=zf(),s=G(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return jw;var l=(c,u,f)=>{if(t!==f&&e===c){if(n==="index"){var d;if(o&&u!==null&&u!==void 0&&(d=u.payload)!==null&&d!==void 0&&d.coordinate){var h=u.payload.coordinate,{x:m,y:p}=h,g=yR(h,pR),v=ri(ri(ri({},g),typeof m=="number"&&{x:Math.max(o.x,Math.min(m,o.x+o.width))}),typeof p=="number"&&{y:Math.max(o.y,Math.min(p,o.y+o.height))}),b=ri(ri({},u),{},{payload:ri(ri({},u.payload),{},{coordinate:v})});r(b)}else r(u);return}if(i!=null){var x;if(typeof n=="function"){var S={activeTooltipIndex:u.payload.index==null?void 0:Number(u.payload.index),isTooltipActive:u.payload.active,activeIndex:u.payload.index==null?void 0:Number(u.payload.index),activeLabel:u.payload.label,activeDataKey:u.payload.dataKey,activeCoordinate:u.payload.coordinate},w=n(i,S);x=i[w]}else n==="value"&&(x=i.find(I=>String(I.value)===u.payload.label));var{coordinate:O}=u.payload;if(x==null||u.payload.active===!1||O==null||o==null){r(vh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:E,y:C}=O,M=Math.min(E,o.x+o.width),$=Math.min(C,o.y+o.height),j={x:a==="horizontal"?x.coordinate:M,y:a==="horizontal"?$:x.coordinate},_=vh({active:u.payload.active,coordinate:j,dataKey:u.payload.dataKey,index:String(x.index),label:u.payload.label});r(_)}}};return ao.on(kh,l),()=>{ao.off(kh,l)}},[s,r,t,e,n,i,a,o])}function wR(){var e=G(Ud),t=G(Kd),r=Ze();k.useEffect(()=>{if(e==null)return jw;var n=(i,a,o)=>{t!==o&&e===i&&r(dR(a))};return ao.on(Pw,n),()=>{ao.off(Pw,n)}},[r,t,e])}function _R(){var e=Ze();k.useEffect(()=>{e(cR())},[e]),xR(),wR()}function SR(e,t,r,n,i,a){var o=G(d=>q$(d,e,t)),s=G(Kd),l=G(Ud),c=G(c1),u=G(uR),f=u?.active;k.useEffect(()=>{if(!f&&l!=null&&s!=null){var d=vh({active:a,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n});ao.emit(kh,l,d,s)}},[f,r,o,i,n,s,l,c,a])}function Dw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Nw(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dw(Object(r),!0).forEach(function(n){OR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function OR(e,t,r){return(t=AR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function AR(e){var t=ER(e,"string");return typeof t=="symbol"?t:t+""}function ER(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function PR(e){return e.dataKey}function CR(e,t){return A.isValidElement(e)?A.cloneElement(e,t):typeof e=="function"?A.createElement(e,t):A.createElement(Qj,t)}var Iw=[],kR={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!dn.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function ni(e){var t=_t(e,kR),{active:r,allowEscapeViewBox:n,animationDuration:i,animationEasing:a,content:o,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:f,reverseDirection:d,useTranslate3d:h,wrapperStyle:m,cursor:p,shared:g,trigger:v,defaultIndex:b,portal:x,axisId:S}=t,w=Ze(),O=typeof b=="number"?String(b):b;k.useEffect(()=>{w(Z4({shared:g,trigger:v,axisId:S,active:r,defaultIndex:O}))},[w,g,v,S,r,O]);var E=zf(),C=J0(),M=K4(g),{activeIndex:$,isActive:j}=G(J=>X$(J,M,v,O)),_=G(J=>G$(J,M,v,O)),I=G(J=>Sw(J,M,v,O)),D=G(J=>Y$(J,M,v,O)),L=_,W=nR(),H=r??j,[te,Q]=XT([L,H]),F=M==="axis"?I:void 0;SR(M,v,D,F,$,H);var U=x??W;if(U==null)return null;var V=L??Iw;H||(V=Iw),s&&V.length&&(V=yT(L.filter(J=>J.value!=null&&(J.hide!==!0||t.includeHidden)),u,PR));var re=V.length>0,Z=A.createElement(oD,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:l,active:H,coordinate:D,hasPayload:re,offset:c,position:f,reverseDirection:d,useTranslate3d:h,viewBox:E,wrapperStyle:m,lastBoundingBox:te,innerRef:Q,hasPortalFromProps:!!x},CR(o,Nw(Nw({},t),{},{payload:V,label:F,active:H,coordinate:D,accessibilityLayer:C})));return A.createElement(A.Fragment,null,aA.createPortal(Z,U),H&&A.createElement(rR,{cursor:p,tooltipEventType:M,coordinate:D,payload:L,index:$}))}var Mh={},jh={},Dh={},$w;function TR(){return $w||($w=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n,{signal:i,edges:a}={}){let o,s=null;const l=a!=null&&a.includes("leading"),c=a==null||a.includes("trailing"),u=()=>{s!==null&&(r.apply(o,s),o=void 0,s=null)},f=()=>{c&&u(),p()};let d=null;const h=()=>{d!=null&&clearTimeout(d),d=setTimeout(()=>{d=null,f()},n)},m=()=>{d!==null&&(clearTimeout(d),d=null)},p=()=>{m(),o=void 0,s=null},g=()=>{u()},v=function(...b){if(i?.aborted)return;o=this,s=b;const x=d==null;h(),l&&x&&u()};return v.schedule=h,v.cancel=p,v.flush=g,i?.addEventListener("abort",p,{once:!0}),v}e.debounce=t})(Dh)),Dh}var Rw;function MR(){return Rw||(Rw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=TR();function r(n,i=0,a={}){typeof a!="object"&&(a={});const{leading:o=!1,trailing:s=!0,maxWait:l}=a,c=Array(2);o&&(c[0]="leading"),s&&(c[1]="trailing");let u,f=null;const d=t.debounce(function(...p){u=n.apply(this,p),f=null},i,{edges:c}),h=function(...p){return l!=null&&(f===null&&(f=Date.now()),Date.now()-f>=l)?(u=n.apply(this,p),f=Date.now(),d.cancel(),d.schedule(),u):(d.apply(this,p),u)},m=()=>(d.flush(),u);return h.cancel=d.cancel,h.flush=m,h}e.debounce=r})(jh)),jh}var Lw;function jR(){return Lw||(Lw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=MR();function r(n,i=0,a={}){const{leading:o=!0,trailing:s=!0}=a;return t.debounce(n,i,{leading:o,maxWait:i,trailing:s})}e.throttle=r})(Mh)),Mh}var Nh,Fw;function DR(){return Fw||(Fw=1,Nh=jR().throttle),Nh}var NR=DR();const IR=Ir(NR);var $R=process.env.NODE_ENV!=="production",oo=function(t,r){for(var n=arguments.length,i=new Array(n>2?n-2:0),a=2;a<n;a++)i[a-2]=arguments[a];if($R&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var o=0;console.warn(r.replace(/%s/g,()=>i[o++]))}};function Bw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Ih(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bw(Object(r),!0).forEach(function(n){RR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function RR(e,t,r){return(t=LR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function LR(e){var t=FR(e,"string");return typeof t=="symbol"?t:t+""}function FR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ii=k.forwardRef((e,t)=>{var{aspect:r,initialDimension:n={width:-1,height:-1},width:i="100%",height:a="100%",minWidth:o=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:f,className:d,onResize:h,style:m={}}=e,p=k.useRef(null),g=k.useRef();g.current=h,k.useImperativeHandle(t,()=>p.current);var[v,b]=k.useState({containerWidth:n.width,containerHeight:n.height}),x=k.useCallback((w,O)=>{b(E=>{var C=Math.round(w),M=Math.round(O);return E.containerWidth===C&&E.containerHeight===M?E:{containerWidth:C,containerHeight:M}})},[]);k.useEffect(()=>{var w=M=>{var $,{width:j,height:_}=M[0].contentRect;x(j,_),($=g.current)===null||$===void 0||$.call(g,j,_)};u>0&&(w=IR(w,u,{trailing:!0,leading:!1}));var O=new ResizeObserver(w),{width:E,height:C}=p.current.getBoundingClientRect();return x(E,C),O.observe(p.current),()=>{O.disconnect()}},[x,u]);var S=k.useMemo(()=>{var{containerWidth:w,containerHeight:O}=v;if(w<0||O<0)return null;oo(Fn(i)||Fn(a),`The width(%s) and height(%s) are both fixed numbers,
178
178
  maybe you don't need to use a ResponsiveContainer.`,i,a),oo(!r||r>0,"The aspect(%s) must be greater than zero.",r);var E=Fn(i)?w:i,C=Fn(a)?O:a;return r&&r>0&&(E?C=E/r:C&&(E=C*r),l&&C>l&&(C=l)),oo(E>0||C>0,`The width(%s) and height(%s) of chart should be greater than 0,
179
179
  please check the style of container, or the props width(%s) and height(%s),
180
180
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
181
181
  height and width.`,E,C,i,a,o,s,r),A.Children.map(c,M=>k.cloneElement(M,{width:E,height:C,style:Ih({width:E,height:C},M.props.style)}))},[r,c,a,l,s,o,v,i]);return A.createElement("div",{id:f?"".concat(f):void 0,className:de("recharts-responsive-container",d),style:Ih(Ih({},m),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:l}),ref:p},A.createElement("div",{style:{width:0,height:0,overflow:"visible"}},S))}),kr=e=>null;kr.displayName="Cell";function BR(e,t,r){return(t=zR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function zR(e){var t=WR(e,"string");return typeof t=="symbol"?t:t+""}function WR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class VR{constructor(t){BR(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var n=this.cache.keys().next().value;this.cache.delete(n)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}}function zw(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function HR(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zw(Object(r),!0).forEach(function(n){UR(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zw(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function UR(e,t,r){return(t=KR(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KR(e){var t=qR(e,"string");return typeof t=="symbol"?t:t+""}function qR(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var YR={cacheSize:2e3,enableCache:!0},Ww=HR({},YR),Vw=new VR(Ww.cacheSize),GR={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Hw="recharts_measurement_span";function XR(e,t){var r=t.fontSize||"",n=t.fontFamily||"",i=t.fontWeight||"",a=t.fontStyle||"",o=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(n,"|").concat(i,"|").concat(a,"|").concat(o,"|").concat(s)}var Uw=(e,t)=>{try{var r=document.getElementById(Hw);r||(r=document.createElement("span"),r.setAttribute("id",Hw),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,GR,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},so=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||dn.isSsr)return{width:0,height:0};if(!Ww.enableCache)return Uw(t,r);var n=XR(t,r),i=Vw.get(n);if(i)return i;var a=Uw(t,r);return Vw.set(n,a),a},Kw=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,qw=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,ZR=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,JR=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,Yw={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},QR=Object.keys(Yw),Gi="NaN";function eL(e,t){return e*Yw[t]}class $t{static parse(t){var r,[,n,i]=(r=JR.exec(t))!==null&&r!==void 0?r:[];return new $t(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Ut(t)&&(this.unit=""),r!==""&&!ZR.test(r)&&(this.num=NaN,this.unit=""),QR.includes(r)&&(this.num=eL(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new $t(NaN,""):new $t(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new $t(NaN,""):new $t(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new $t(NaN,""):new $t(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new $t(NaN,""):new $t(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Ut(this.num)}}function Gw(e){if(e.includes(Gi))return Gi;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=Kw.exec(t))!==null&&r!==void 0?r:[],o=$t.parse(n??""),s=$t.parse(a??""),l=i==="*"?o.multiply(s):o.divide(s);if(l.isNaN())return Gi;t=t.replace(Kw,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,f,d]=(c=qw.exec(t))!==null&&c!==void 0?c:[],h=$t.parse(u??""),m=$t.parse(d??""),p=f==="+"?h.add(m):h.subtract(m);if(p.isNaN())return Gi;t=t.replace(qw,p.toString())}return t}var Xw=/\(([^()]*)\)/;function tL(e){for(var t=e,r;(r=Xw.exec(t))!=null;){var[,n]=r;t=t.replace(Xw,Gw(n))}return t}function rL(e){var t=e.replace(/\s+/g,"");return t=tL(t),t=Gw(t),t}function nL(e){try{return rL(e)}catch{return Gi}}function $h(e){var t=nL(e.slice(5,-1));return t===Gi?"":t}var iL=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],aL=["dx","dy","angle","className","breakAll"];function Rh(){return Rh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rh.apply(null,arguments)}function Zw(e,t){if(e==null)return{};var r,n,i=oL(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function oL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Jw=/[ \f\n\r\t\v\u2028\u2029]+/,Qw=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];ze(t)||(r?i=t.toString().split(""):i=t.toString().split(Jw));var a=i.map(s=>({word:s,width:so(s,n).width})),o=r?0:so(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}},sL=(e,t,r,n,i)=>{var{maxLines:a,children:o,style:s,breakAll:l}=e,c=X(a),u=o,f=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return j.reduce((_,I)=>{var{word:D,width:L}=I,W=_[_.length-1];if(W&&(n==null||i||W.width+L+r<Number(n)))W.words.push(D),W.width+=L+r;else{var H={words:[D],width:L};_.push(H)}return _},[])},d=f(t),h=$=>$.reduce((j,_)=>j.width>_.width?j:_);if(!c||i)return d;var m=d.length>a||h(d).width>Number(n);if(!m)return d;for(var p="…",g=$=>{var j=u.slice(0,$),_=Qw({breakAll:l,style:s,children:j+p}).wordsWithComputedWidth,I=f(_),D=I.length>a||h(I).width>Number(n);return[D,I]},v=0,b=u.length-1,x=0,S;v<=b&&x<=u.length-1;){var w=Math.floor((v+b)/2),O=w-1,[E,C]=g(O),[M]=g(w);if(!E&&!M&&(v=w+1),E&&M&&(b=w-1),!E&&M){S=C;break}x++}return S||d},e_=e=>{var t=ze(e)?[]:e.toString().split(Jw);return[{words:t}]},lL=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:o}=e;if((t||r)&&!dn.isSsr){var s,l,c=Qw({breakAll:a,children:n,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:f}=c;s=u,l=f}else return e_(n);return sL({breakAll:a,children:n,maxLines:o,style:i},s,l,t,r)}return e_(n)},t_="#808080",Bl=k.forwardRef((e,t)=>{var{x:r=0,y:n=0,lineHeight:i="1em",capHeight:a="0.71em",scaleToFit:o=!1,textAnchor:s="start",verticalAnchor:l="end",fill:c=t_}=e,u=Zw(e,iL),f=k.useMemo(()=>lL({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:o,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,o,u.style,u.width]),{dx:d,dy:h,angle:m,className:p,breakAll:g}=u,v=Zw(u,aL);if(!Or(r)||!Or(n)||f.length===0)return null;var b=r+(X(d)?d:0),x=n+(X(h)?h:0),S;switch(l){case"start":S=$h("calc(".concat(a,")"));break;case"middle":S=$h("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:S=$h("calc(".concat(f.length-1," * -").concat(i,")"));break}var w=[];if(o){var O=f[0].width,{width:E}=u;w.push("scale(".concat(X(E)?E/O:1,")"))}return m&&w.push("rotate(".concat(m,", ").concat(b,", ").concat(x,")")),w.length&&(v.transform=w.join(" ")),A.createElement("text",Rh({},Ue(v,!0),{ref:t,x:b,y:x,className:de("recharts-text",p),textAnchor:s,fill:c.includes("url")?t_:c}),f.map((C,M)=>{var $=C.words.join(g?"":" ");return A.createElement("tspan",{x:b,dy:M===0?S:i,key:"".concat($,"-").concat(M)},$)}))});Bl.displayName="Text";var cL=["labelRef"];function uL(e,t){if(e==null)return{};var r,n,i=fL(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function r_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r_(Object(r),!0).forEach(function(n){dL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dL(e,t,r){return(t=hL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hL(e){var t=pL(e,"string");return typeof t=="symbol"?t:t+""}function pL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function en(){return en=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},en.apply(null,arguments)}var n_=k.createContext(null),mL=e=>{var{x:t,y:r,width:n,height:i,children:a}=e,o=k.useMemo(()=>({x:t,y:r,width:n,height:i}),[t,r,n,i]);return A.createElement(n_.Provider,{value:o},a)},i_=()=>{var e=k.useContext(n_),t=zf();return e||t},gL=k.createContext(null),vL=()=>{var e=k.useContext(gL),t=G(p1);return e||t},yL=e=>{var{value:t,formatter:r}=e,n=ze(e.children)?t:e.children;return typeof r=="function"?r(n):n},Lh=e=>e!=null&&typeof e=="function",bL=(e,t)=>{var r=pt(t-e),n=Math.min(Math.abs(t-e),360);return r*n},xL=(e,t,r,n,i)=>{var{offset:a,className:o}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:f,endAngle:d,clockWise:h}=i,m=(c+u)/2,p=bL(f,d),g=p>=0?1:-1,v,b;switch(t){case"insideStart":v=f+g*a,b=h;break;case"insideEnd":v=d-g*a,b=!h;break;case"end":v=d+g*a,b=h;break;default:throw new Error("Unsupported position ".concat(t))}b=p<=0?b:!b;var x=it(s,l,m,v),S=it(s,l,m,v+(b?1:-1)*359),w="M".concat(x.x,",").concat(x.y,`
182
182
  A`).concat(m,",").concat(m,",0,1,").concat(b?0:1,`,
183
- `).concat(S.x,",").concat(S.y),O=ze(e.id)?_a("recharts-radial-line-"):e.id;return A.createElement("text",en({},n,{dominantBaseline:"central",className:de("recharts-radial-bar-label",o)}),A.createElement("defs",null,A.createElement("path",{id:O,d:w})),A.createElement("textPath",{xlinkHref:"#".concat(O)},r))},wL=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(r==="outside"){var{x:u,y:f}=it(n,i,o+t,c);return{x:u,y:f,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(a+o)/2,{x:h,y:m}=it(n,i,d,c);return{x:h,y:m,textAnchor:"middle",verticalAnchor:"middle"}},a_=e=>"cx"in e&&X(e.cx),_L=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!a_(r)&&(a=r);var{x:o,y:s,width:l,height:c}=t,u=c>=0?1:-1,f=u*n,d=u>0?"end":"start",h=u>0?"start":"end",m=l>=0?1:-1,p=m*n,g=m>0?"end":"start",v=m>0?"start":"end";if(i==="top"){var b={x:o+l/2,y:s-u*n,textAnchor:"middle",verticalAnchor:d};return Qe(Qe({},b),a?{height:Math.max(s-a.y,0),width:l}:{})}if(i==="bottom"){var x={x:o+l/2,y:s+c+f,textAnchor:"middle",verticalAnchor:h};return Qe(Qe({},x),a?{height:Math.max(a.y+a.height-(s+c),0),width:l}:{})}if(i==="left"){var S={x:o-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Qe(Qe({},S),a?{width:Math.max(S.x-a.x,0),height:c}:{})}if(i==="right"){var w={x:o+l+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return Qe(Qe({},w),a?{width:Math.max(a.x+a.width-w.x,0),height:c}:{})}var O=a?{width:l,height:c}:{};return i==="insideLeft"?Qe({x:o+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},O):i==="insideRight"?Qe({x:o+l-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},O):i==="insideTop"?Qe({x:o+l/2,y:s+f,textAnchor:"middle",verticalAnchor:h},O):i==="insideBottom"?Qe({x:o+l/2,y:s+c-f,textAnchor:"middle",verticalAnchor:d},O):i==="insideTopLeft"?Qe({x:o+p,y:s+f,textAnchor:v,verticalAnchor:h},O):i==="insideTopRight"?Qe({x:o+l-p,y:s+f,textAnchor:g,verticalAnchor:h},O):i==="insideBottomLeft"?Qe({x:o+p,y:s+c-f,textAnchor:v,verticalAnchor:d},O):i==="insideBottomRight"?Qe({x:o+l-p,y:s+c-f,textAnchor:g,verticalAnchor:d},O):i&&typeof i=="object"&&(X(i.x)||Fn(i.x))&&(X(i.y)||Fn(i.y))?Qe({x:o+At(i.x,l),y:s+At(i.y,c),textAnchor:"end",verticalAnchor:"end"},O):Qe({x:o+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},O)},SL={offset:5};function _n(e){var t=_t(e,SL),{viewBox:r,position:n,value:i,children:a,content:o,className:s="",textBreakAll:l,labelRef:c}=t,u=vL(),f=i_(),d=n==="center"?f:u??f,h=r||d;if(!h||ze(i)&&ze(a)&&!k.isValidElement(o)&&typeof o!="function")return null;var m=Qe(Qe({},t),{},{viewBox:h});if(k.isValidElement(o)){var{labelRef:p}=m,g=uL(m,cL);return k.cloneElement(o,g)}var v;if(typeof o=="function"){if(v=k.createElement(o,m),k.isValidElement(v))return v}else v=yL(t);var b=a_(h),x=Ue(t,!0);if(b&&(n==="insideStart"||n==="insideEnd"||n==="end"))return xL(t,n,v,x,h);var S=b?wL(h,t.offset,t.position):_L(t,h);return A.createElement(Bl,en({ref:c,className:de("recharts-label",s)},x,S,{breakAll:l}),v)}_n.displayName="Label";var OL=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?A.createElement(_n,en({key:"label-implicit"},n)):Or(e)?A.createElement(_n,en({key:"label-implicit",value:e},n)):k.isValidElement(e)?e.type===_n?k.cloneElement(e,Qe({key:"label-implicit"},n)):A.createElement(_n,en({key:"label-implicit",content:e},n)):Lh(e)?A.createElement(_n,en({key:"label-implicit",content:e},n)):e&&typeof e=="object"?A.createElement(_n,en({},e,{key:"label-implicit"},n)):null};function AL(e){var{label:t}=e,r=i_();return OL(t,r)||null}var Fh={},Bh={},o_;function EL(){return o_||(o_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Bh)),Bh}var zh={},s_;function PL(){return s_||(s_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(zh)),zh}var l_;function CL(){return l_||(l_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EL(),r=PL(),n=Fu();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Fh)),Fh}var Wh,c_;function kL(){return c_||(c_=1,Wh=CL().last),Wh}var TL=kL();const ML=Ir(TL);var jL=["valueAccessor"],DL=["dataKey","clockWise","id","textBreakAll"];function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zl.apply(null,arguments)}function u_(e,t){if(e==null)return{};var r,n,i=NL(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function NL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var IL=e=>Array.isArray(e.value)?ML(e.value):e.value,f_=k.createContext(void 0),d_=f_.Provider,h_=k.createContext(void 0),$L=h_.Provider;function RL(){return k.useContext(f_)}function LL(){return k.useContext(h_)}function Wl(e){var{valueAccessor:t=IL}=e,r=u_(e,jL),{dataKey:n,clockWise:i,id:a,textBreakAll:o}=r,s=u_(r,DL),l=RL(),c=LL(),u=l||c;return!u||!u.length?null:A.createElement(xt,{className:"recharts-label-list"},u.map((f,d)=>{var h,m=ze(n)?t(f,d):$e(f&&f.payload,n),p=ze(a)?{}:{id:"".concat(a,"-").concat(d)};return A.createElement(_n,zl({},Ue(f,!0),s,p,{fill:(h=r.fill)!==null&&h!==void 0?h:f.fill,parentViewBox:f.parentViewBox,value:m,textBreakAll:o,viewBox:f.viewBox,key:"label-".concat(d),index:d}))}))}Wl.displayName="LabelList";function Vh(e){var{label:t}=e;return t?t===!0?A.createElement(Wl,{key:"labelList-implicit"}):A.isValidElement(t)||Lh(t)?A.createElement(Wl,{key:"labelList-implicit",content:t}):typeof t=="object"?A.createElement(Wl,zl({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hh.apply(null,arguments)}var p_=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=de("recharts-dot",i);return t===+t&&r===+r&&n===+n?A.createElement("circle",Hh({},Ar(e),yu(e),{className:a,cx:t,cy:r,r:n})):null},m_=e=>e.graphicalItems.polarItems,FL=N([Ve,Qa],Qd),Uh=N([m_,Je,FL],eh),BL=N([Uh],th),Kh=N([BL,Ld],rh),zL=N([Kh,Je,Uh],ih),WL=N([Kh,Je,Uh],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,o=$e(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:o,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:$e(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]}))),g_=()=>{},VL=N([Je,$1,g_,WL,g_,ue,Ve],sh),v_=N([Je,ue,Kh,zL,Ja,Ve,VL],lh),HL=N([v_,Je,Ui],fh);N([Je,v_,HL,Ve],hh);var UL={radiusAxis:{},angleAxis:{}},y_=qt({name:"polarAxis",initialState:UL,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:SU,removeRadiusAxis:OU,addAngleAxis:AU,removeAngleAxis:EU}=y_.actions,KL=y_.reducer;function b_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function x_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b_(Object(r),!0).forEach(function(n){qL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qL(e,t,r){return(t=YL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YL(e){var t=GL(e,"string");return typeof t=="symbol"?t:t+""}function GL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XL=(e,t)=>t,qh=N([m_,XL],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),ZL=[],Yh=(e,t,r)=>r?.length===0?ZL:r,w_=N([Ld,qh,Yh],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=n,(!i||!i.length)&&r!=null&&(i=r.map(a=>x_(x_({},t.presentationProps),a.props))),i!=null)return i}}),JL=N([w_,qh,Yh],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,o=$e(n,t.nameKey,t.name),s;return r!=null&&(a=r[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?s=r[i].props.fill:typeof n=="object"&&n!=null&&"fill"in n?s=n.fill:s=t.fill,{value:ji(o,t.dataKey),color:s,payload:n,type:t.legendType}})}),QL=N([w_,qh,Yh,st],(e,t,r,n)=>{if(!(t==null||e==null))return XF({offset:n,pieSettings:t,displayedData:e,cells:r})}),Gh={},__;function eF(){return __||(__=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(Gh)),Gh}var Xh,S_;function tF(){return S_||(S_=1,Xh=eF().isPlainObject),Xh}var rF=tF();const nF=Ir(rF);function O_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function A_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O_(Object(r),!0).forEach(function(n){iF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iF(e,t,r){return(t=aF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aF(e){var t=oF(e,"string");return typeof t=="symbol"?t:t+""}function oF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vl.apply(null,arguments)}var E_=(e,t,r,n,i)=>{var a=r-n,o;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+r,",").concat(t),o+="L ".concat(e+r-a/2,",").concat(t+i),o+="L ".concat(e+r-a/2-n,",").concat(t+i),o+="L ".concat(e,",").concat(t," Z"),o},sF={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},lF=e=>{var t=_t(e,sF),{x:r,y:n,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:f}=t,d=k.useRef(),[h,m]=k.useState(-1),p=k.useRef(i),g=k.useRef(a),v=k.useRef(o),b=k.useRef(r),x=k.useRef(n),S=Ra(e,"trapezoid-");if(k.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var D=d.current.getTotalLength();D&&m(D)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var w=de("recharts-trapezoid",s);if(!f)return A.createElement("g",null,A.createElement("path",Vl({},Ue(t,!0),{className:w,d:E_(r,n,i,a,o)})));var O=p.current,E=g.current,C=v.current,M=b.current,$=x.current,j="0px ".concat(h===-1?1:h,"px"),_="".concat(h,"px 0px"),I=ob(["strokeDasharray"],c,l);return A.createElement($a,{animationId:S,key:S,canBegin:h>0,duration:c,easing:l,isActive:f,begin:u},D=>{var L=Ye(O,i,D),W=Ye(E,a,D),H=Ye(C,o,D),te=Ye(M,r,D),Q=Ye($,n,D);d.current&&(p.current=L,g.current=W,v.current=H,b.current=te,x.current=Q);var F=D>0?{transition:I,strokeDasharray:_}:{strokeDasharray:j};return A.createElement("path",Vl({},Ue(t,!0),{className:w,d:E_(te,Q,L,W,H),ref:d,style:A_(A_({},F),t.style)}))})},cF=["option","shapeType","propTransformer","activeClassName","isActive"];function uF(e,t){if(e==null)return{};var r,n,i=fF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function P_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P_(Object(r),!0).forEach(function(n){dF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dF(e,t,r){return(t=hF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hF(e){var t=pF(e,"string");return typeof t=="symbol"?t:t+""}function pF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mF(e,t){return Hl(Hl({},t),e)}function gF(e,t){return e==="symbols"}function C_(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return A.createElement(vb,r);case"trapezoid":return A.createElement(lF,r);case"sector":return A.createElement(xb,r);case"symbols":if(gF(t))return A.createElement(Nv,r);break;default:return null}}function vF(e){return k.isValidElement(e)?e.props:e}function k_(e){var{option:t,shapeType:r,propTransformer:n=mF,activeClassName:i="recharts-active-shape",isActive:a}=e,o=uF(e,cF),s;if(k.isValidElement(t))s=k.cloneElement(t,Hl(Hl({},o),vF(t)));else if(typeof t=="function")s=t(o);else if(nF(t)&&typeof t!="boolean"){var l=n(t,o);s=A.createElement(C_,{shapeType:r,elementProps:l})}else{var c=o;s=A.createElement(C_,{shapeType:r,elementProps:c})}return a?A.createElement(xt,{className:i},s):s}var Zh=(e,t)=>{var r=Ze();return(n,i)=>a=>{e?.(n,i,a),r(ew({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},Jh=e=>{var t=Ze();return(r,n)=>i=>{e?.(r,n,i),t(J$())}},Qh=(e,t)=>{var r=Ze();return(n,i)=>a=>{e?.(n,i,a),r(Q$({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function ep(e){var{fn:t,args:r}=e,n=Ze(),i=Nt();return k.useEffect(()=>{if(!i){var a=t(r);return n(G$(a)),()=>{n(X$(a))}}},[t,r,n,i]),null}var T_=()=>{};function M_(e){var{legendPayload:t}=e,r=Ze(),n=Nt();return k.useEffect(()=>n?T_:(r(q0(t)),()=>{r(Y0(t))}),[r,n,t]),null}function yF(e){var{legendPayload:t}=e,r=Ze(),n=G(ue);return k.useEffect(()=>n!=="centric"&&n!=="radial"?T_:(r(q0(t)),()=>{r(Y0(t))}),[r,n,t]),null}var tp,bF=()=>{var[e]=A.useState(()=>_a("uid-"));return e},xF=(tp=A.useId)!==null&&tp!==void 0?tp:bF;function wF(e,t){var r=xF();return t||(e?"".concat(e,"-").concat(r):r)}var _F=k.createContext(void 0),rp=e=>{var{id:t,type:r,children:n}=e,i=wF("recharts-".concat(r),t);return A.createElement(_F.Provider,{value:i},n(i))},SF={cartesianItems:[],polarItems:[]},j_=qt({name:"graphicalItems",initialState:SF,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:r,next:n}=t.payload,i=Br(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},removeCartesianGraphicalItem(e,t){var r=Br(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var r=Br(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)}}}),{addCartesianGraphicalItem:OF,replaceCartesianGraphicalItem:AF,removeCartesianGraphicalItem:EF,addPolarGraphicalItem:PF,removePolarGraphicalItem:CF}=j_.actions,kF=j_.reducer;function D_(e){var t=Ze(),r=k.useRef(null);return k.useEffect(()=>{r.current===null?t(OF(e)):r.current!==e&&t(AF({prev:r.current,next:e})),r.current=e},[t,e]),k.useEffect(()=>()=>{r.current&&(t(EF(r.current)),r.current=null)},[t]),null}function TF(e){var t=Ze();return k.useEffect(()=>(t(PF(e)),()=>{t(CF(e))}),[t,e]),null}var MF=["onMouseEnter","onClick","onMouseLeave"],jF=["id"],DF=["id"];function np(e,t){if(e==null)return{};var r,n,i=NF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function NF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function N_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N_(Object(r),!0).forEach(function(n){IF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IF(e,t,r){return(t=$F(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $F(e){var t=RF(e,"string");return typeof t=="symbol"?t:t+""}function RF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sn.apply(null,arguments)}function LF(e){var t=k.useMemo(()=>xu(e.children,kr),[e.children]),r=G(n=>JL(n,e.id,t));return r==null?null:A.createElement(yF,{legendPayload:r})}function FF(e){var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:a,fill:o,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:n.map(u=>u.tooltipPayload),positions:n.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:r,name:ji(s,t),hide:l,type:c,color:o,unit:""}}}var BF=(e,t)=>e>t?"start":e<t?"end":"middle",zF=(e,t,r)=>At(typeof t=="function"?t(e):t,r,r*.8),WF=(e,t,r)=>{var{top:n,left:i,width:a,height:o}=t,s=C0(a,o),l=i+At(e.cx,a,a/2),c=n+At(e.cy,o,o/2),u=At(e.innerRadius,s,0),f=zF(r,e.outerRadius,s),d=e.maxRadius||Math.sqrt(a*a+o*o)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}},VF=(e,t)=>{var r=pt(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function HF(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var UF=(e,t)=>{if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return e(t);var r=de("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return A.createElement(Kf,Sn({},t,{type:"linear",className:r}))},KF=(e,t,r)=>{if(A.isValidElement(e))return A.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),A.isValidElement(n)))return n;var i=de("recharts-pie-label-text",HF(e));return A.createElement(Bl,Sn({},t,{alignmentBaseline:"middle",className:i}),n)};function qF(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:o}=r;if(!n||!i||!t)return null;var s=Ar(r),l=Ue(i,!1),c=Ue(a,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,f=t.map((d,h)=>{var m=(d.startAngle+d.endAngle)/2,p=it(d.cx,d.cy,d.outerRadius+u,m),g=He(He(He(He({},s),d),{},{stroke:"none"},l),{},{index:h,textAnchor:BF(p.x,d.cx)},p),v=He(He(He(He({},s),d),{},{fill:"none",stroke:d.fill},c),{},{index:h,points:[it(d.cx,d.cy,d.outerRadius,m),p],key:"line"});return A.createElement(xt,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(h)},a&&UF(a,v),KF(i,g,$e(d,o)))});return A.createElement(xt,{className:"recharts-pie-labels"},f)}function YF(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?A.createElement(Vh,{label:i}):A.createElement(qF,{sectors:t,props:r,showLabels:n})}function GF(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=G(wn),{onMouseEnter:o,onClick:s,onMouseLeave:l}=i,c=np(i,MF),u=Zh(o,i.dataKey),f=Jh(l),d=Qh(s,i.dataKey);return t==null||t.length===0?null:A.createElement(A.Fragment,null,t.map((h,m)=>{if(h?.startAngle===0&&h?.endAngle===0&&t.length!==1)return null;var p=r&&String(m)===a,g=a?n:null,v=p?r:g,b=He(He({},h),{},{stroke:h.stroke,tabIndex:-1,[B0]:m,[z0]:i.dataKey});return A.createElement(xt,Sn({tabIndex:-1,className:"recharts-pie-sector"},gs(c,h,m),{onMouseEnter:u(h,m),onMouseLeave:f(h,m),onClick:d(h,m),key:"sector-".concat(h?.startAngle,"-").concat(h?.endAngle,"-").concat(h.midAngle,"-").concat(m)}),A.createElement(k_,Sn({option:v,isActive:p,shapeType:"sector"},b)))}))}function XF(e){var t,{pieSettings:r,displayedData:n,cells:i,offset:a}=e,{cornerRadius:o,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:f}=r,d=Math.abs(r.minAngle),h=VF(s,l),m=Math.abs(h),p=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,g=n.filter(O=>$e(O,c,0)!==0).length,v=(m>=360?g:g-1)*p,b=m-g*d-v,x=n.reduce((O,E)=>{var C=$e(E,c,0);return O+(X(C)?C:0)},0),S;if(x>0){var w;S=n.map((O,E)=>{var C=$e(O,c,0),M=$e(O,u,E),$=WF(r,a,O),j=(X(C)?C:0)/x,_,I=He(He({},O),i&&i[E]&&i[E].props);E?_=w.endAngle+pt(h)*p*(C!==0?1:0):_=s;var D=_+pt(h)*((C!==0?d:0)+j*b),L=(_+D)/2,W=($.innerRadius+$.outerRadius)/2,H=[{name:M,value:C,payload:I,dataKey:c,type:f}],te=it($.cx,$.cy,W,L);return w=He(He(He(He({},r.presentationProps),{},{percent:j,cornerRadius:o,name:M,tooltipPayload:H,midAngle:L,middleRadius:W,tooltipPosition:te},I),$),{},{value:C,startAngle:_,endAngle:D,payload:I,paddingAngle:pt(h)*p}),w})}return S}function ZF(e){var{showLabels:t,sectors:r,children:n}=e,i=k.useMemo(()=>!t||!r?[]:r.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[r,t]);return A.createElement($L,{value:t?i:void 0},n)}function JF(e){var{props:t,previousSectorsRef:r}=e,{sectors:n,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:f}=t,d=Ra(t,"recharts-pie-"),h=r.current,[m,p]=k.useState(!1),g=k.useCallback(()=>{typeof f=="function"&&f(),p(!1)},[f]),v=k.useCallback(()=>{typeof u=="function"&&u(),p(!0)},[u]);return A.createElement(ZF,{showLabels:!m,sectors:n},A.createElement($a,{animationId:d,begin:a,duration:o,isActive:i,easing:s,onAnimationStart:v,onAnimationEnd:g,key:d},b=>{var x=[],S=n&&n[0],w=S?.startAngle;return n?.forEach((O,E)=>{var C=h&&h[E],M=E>0?Ln(O,"paddingAngle",0):0;if(C){var $=Ye(C.endAngle-C.startAngle,O.endAngle-O.startAngle,b),j=He(He({},O),{},{startAngle:w+M,endAngle:w+$+M});x.push(j),w=j.endAngle}else{var{endAngle:_,startAngle:I}=O,D=Ye(0,_-I,b),L=He(He({},O),{},{startAngle:w+M,endAngle:w+D+M});x.push(L),w=L.endAngle}}),r.current=x,A.createElement(xt,null,A.createElement(GF,{sectors:x,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),A.createElement(YF,{showLabels:!m,sectors:n,props:t}),t.children)}var QF={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!dn.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function e6(e){var{id:t}=e,r=np(e,jF),{hide:n,className:i,rootTabIndex:a}=e,o=k.useMemo(()=>xu(e.children,kr),[e.children]),s=G(u=>QL(u,t,o)),l=k.useRef(null),c=de("recharts-pie",i);return n||s==null?(l.current=null,A.createElement(xt,{tabIndex:a,className:c})):A.createElement(A.Fragment,null,A.createElement(ep,{fn:FF,args:He(He({},e),{},{sectors:s})}),A.createElement(xt,{tabIndex:a,className:c},A.createElement(JF,{props:He(He({},r),{},{sectors:s}),previousSectorsRef:l})))}function lo(e){var t=_t(e,QF),{id:r}=t,n=np(t,DF),i=Ar(n);return A.createElement(rp,{id:r,type:"pie"},a=>A.createElement(A.Fragment,null,A.createElement(TF,{type:"pie",id:a,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),A.createElement(LF,Sn({},n,{id:a})),A.createElement(e6,Sn({},n,{id:a}))))}lo.displayName="Pie";function I_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I_(Object(r),!0).forEach(function(n){t6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t6(e,t,r){return(t=r6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r6(e){var t=n6(e,"string");return typeof t=="symbol"?t:t+""}function n6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i6={xAxis:{},yAxis:{},zAxis:{}},R_=qt({name:"cartesianAxis",initialState:i6,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload;e.yAxis[r]&&(e.yAxis[r]=$_($_({},e.yAxis[r]),{},{width:n}))}}}),{addXAxis:a6,removeXAxis:o6,addYAxis:s6,removeYAxis:l6,addZAxis:PU,removeZAxis:CU,updateYAxisWidth:c6}=R_.actions,u6=R_.reducer,f6=N([st],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),d6=N([f6,zr,Wr],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),ip=()=>G(d6),h6=()=>G(F4);function L_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L_(Object(r),!0).forEach(function(n){p6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p6(e,t,r){return(t=m6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m6(e){var t=g6(e,"string");return typeof t=="symbol"?t:t+""}function g6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v6=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a}=e;if(i===!1||t.x==null||t.y==null)return null;var o=F_(F_({index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},Ue(i,!1)),yu(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,o):typeof i=="function"?s=i(o):s=A.createElement(p_,o),A.createElement(xt,{className:"recharts-active-dot"},s)};function y6(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i}=e,a=G(wn),o=h6();if(t==null||o==null)return null;var s=t.find(l=>o.includes(l.payload));return ze(s)?null:v6({point:s,childIndex:Number(a),mainColor:r,dataKey:i,activeDot:n})}var b6=process.env.NODE_ENV==="production",ap="Invariant failed";function B_(e,t){if(b6)throw new Error(ap);var r=typeof t=="function"?t():t,n=r?"".concat(ap,": ").concat(r):ap;throw new Error(n)}var x6=["x","y"];function op(){return op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},op.apply(null,arguments)}function z_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z_(Object(r),!0).forEach(function(n){w6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w6(e,t,r){return(t=_6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _6(e){var t=S6(e,"string");return typeof t=="symbol"?t:t+""}function S6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O6(e,t){if(e==null)return{};var r,n,i=A6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function A6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function E6(e,t){var{x:r,y:n}=e,i=O6(e,x6),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),f="".concat(t.width||i.width),d=parseInt(f,10);return co(co(co(co(co({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:d,name:t.name,radius:t.radius})}function sp(e){return A.createElement(k_,op({shapeType:"rectangle",propTransformer:E6,activeClassName:"recharts-active-bar"},e))}var P6=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(X(t))return t;var a=X(n)||ze(n);return a?t(n,i):(a||(process.env.NODE_ENV!=="production"?B_(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")):B_()),r)}},C6={},W_=qt({name:"errorBars",initialState:C6,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:kU,replaceErrorBar:TU,removeErrorBar:MU}=W_.actions,k6=W_.reducer,T6=["children"];function M6(e,t){if(e==null)return{};var r,n,i=j6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function j6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var D6={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},N6=k.createContext(D6);function V_(e){var{children:t}=e,r=M6(e,T6);return A.createElement(N6.Provider,{value:r},t)}function lp(e,t){var r,n,i=G(c=>Zr(c,e)),a=G(c=>Jr(c,t)),o=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:Zt.allowDataOverflow,s=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:Jt.allowDataOverflow,l=o||s;return{needClip:l,needClipX:o,needClipY:s}}function H_(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=ip(),{needClipX:a,needClipY:o,needClip:s}=lp(t,r);if(!s)return null;var{x:l,y:c,width:u,height:f}=i;return A.createElement("clipPath",{id:"clipPath-".concat(n)},A.createElement("rect",{x:a?l:l-u/2,y:o?c:c-f/2,width:a?u:u*2,height:o?f:f*2}))}var I6=["onMouseEnter","onMouseLeave","onClick"],$6=["value","background","tooltipPosition"],R6=["id"],L6=["onMouseEnter","onClick","onMouseLeave"];function On(){return On=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},On.apply(null,arguments)}function U_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Tt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U_(Object(r),!0).forEach(function(n){F6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F6(e,t,r){return(t=B6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B6(e){var t=z6(e,"string");return typeof t=="symbol"?t:t+""}function z6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ul(e,t){if(e==null)return{};var r,n,i=W6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function W6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var V6=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:ji(r,t),payload:e}]};function H6(e){var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:o,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:ji(a,t),hide:o,type:e.tooltipType,color:e.fill,unit:s}}}function U6(e){var t=G(wn),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:l}=a,c=Ul(a,I6),u=Zh(o,n),f=Jh(s),d=Qh(l,n);if(!i||r==null)return null;var h=Ue(i,!1);return A.createElement(A.Fragment,null,r.map((m,p)=>{var{value:g,background:v,tooltipPosition:b}=m,x=Ul(m,$6);if(!v)return null;var S=u(m,p),w=f(m,p),O=d(m,p),E=Tt(Tt(Tt(Tt(Tt({option:i,isActive:String(p)===t},x),{},{fill:"#eee"},v),h),gs(c,m,p)),{},{onMouseEnter:S,onMouseLeave:w,onClick:O,dataKey:n,index:p,className:"recharts-bar-background-rectangle"});return A.createElement(sp,On({key:"background-bar-".concat(E.index)},E))}))}function K6(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var o={x:a.x,y:a.y,width:a.width,height:a.height};return Tt(Tt({},o),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:o,fill:a.fill})});return A.createElement(d_,{value:t?i:void 0},r)}function q6(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:o}=e,s=G(wn),l=G(gw),c=r&&String(a)===s&&(l==null||o===l),u=c?r:t;return A.createElement(sp,On({},n,i,{isActive:c,option:u,index:a,dataKey:o}))}function Y6(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return A.createElement(sp,On({},r,n,{isActive:!1,option:t,index:i,dataKey:a}))}function G6(e){var{data:t,props:r}=e,n=Ar(r),{id:i}=n,a=Ul(n,R6),{shape:o,dataKey:s,activeBar:l}=r,{onMouseEnter:c,onClick:u,onMouseLeave:f}=r,d=Ul(r,L6),h=Zh(c,s),m=Jh(f),p=Qh(u,s);return t?A.createElement(A.Fragment,null,t.map((g,v)=>A.createElement(xt,On({className:"recharts-bar-rectangle"},gs(d,g,v),{onMouseEnter:h(g,v),onMouseLeave:m(g,v),onClick:p(g,v),key:"rectangle-".concat(g?.x,"-").concat(g?.y,"-").concat(g?.value,"-").concat(v)}),l?A.createElement(q6,{shape:o,activeBar:l,baseProps:a,entry:g,index:v,dataKey:s}):A.createElement(Y6,{shape:o,baseProps:a,entry:g,index:v,dataKey:s})))):null}function X6(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,f=r.current,d=Ra(t,"recharts-bar-"),[h,m]=k.useState(!1),p=!h,g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),v=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return A.createElement(K6,{showLabels:p,rects:n},A.createElement($a,{animationId:d,begin:o,duration:s,isActive:a,easing:l,onAnimationEnd:g,onAnimationStart:v,key:d},b=>{var x=b===1?n:n?.map((S,w)=>{var O=f&&f[w];if(O)return Tt(Tt({},S),{},{x:Ye(O.x,S.x,b),y:Ye(O.y,S.y,b),width:Ye(O.width,S.width,b),height:Ye(O.height,S.height,b)});if(i==="horizontal"){var E=Ye(0,S.height,b);return Tt(Tt({},S),{},{y:S.y+S.height-E,height:E})}var C=Ye(0,S.width,b);return Tt(Tt({},S),{},{width:C})});return b>0&&(r.current=x??null),x==null?null:A.createElement(xt,null,A.createElement(G6,{props:t,data:x}))}),A.createElement(Vh,{label:t.label}),t.children)}function Z6(e){var t=k.useRef(null);return A.createElement(X6,{previousRectanglesRef:t,props:e})}var K_=0,J6=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:$e(e,t)}};class Q6 extends k.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:o,needClip:s,background:l,id:c}=this.props;if(t||r==null)return null;var u=de("recharts-bar",i),f=c;return A.createElement(xt,{className:u,id:c},s&&A.createElement("defs",null,A.createElement(H_,{clipPathId:f,xAxisId:a,yAxisId:o})),A.createElement(xt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},A.createElement(U6,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),A.createElement(Z6,this.props)))}}var eB={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!dn.isSsr,legendType:"rect",minPointSize:K_,xAxisId:0,yAxisId:0};function tB(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:f}=lp(t,r),d=Js(),h=Nt(),m=xu(e.children,kr),p=G(b=>kB(b,t,r,h,e.id,m));if(d!=="vertical"&&d!=="horizontal")return null;var g,v=p?.[0];return v==null||v.height==null||v.width==null?g=0:g=d==="vertical"?v.height/2:v.width/2,A.createElement(V_,{xAxisId:t,yAxisId:r,data:p,dataPointFormatter:J6,errorBarOffset:g},A.createElement(Q6,On({},e,{layout:d,needClip:f,data:p,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function rB(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:a,xAxis:o,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:f,offset:d,cells:h,parentViewBox:m}=e,p=t==="horizontal"?s:o,g=u?p.scale.domain():null,v=Cj({numericAxis:p});return f.map((b,x)=>{var S,w,O,E,C,M;u?S=_j(u[x],g):(S=$e(b,r),Array.isArray(S)||(S=[v,S]));var $=P6(n,K_)(S[1],x);if(t==="horizontal"){var j,[_,I]=[s.scale(S[0]),s.scale(S[1])];w=I0({axis:o,ticks:l,bandSize:a,offset:i.offset,entry:b,index:x}),O=(j=I??_)!==null&&j!==void 0?j:void 0,E=i.size;var D=_-I;if(C=Ut(D)?0:D,M={x:w,y:d.top,width:E,height:d.height},Math.abs($)>0&&Math.abs(C)<Math.abs($)){var L=pt(C||$)*(Math.abs($)-Math.abs(C));O-=L,C+=L}}else{var[W,H]=[o.scale(S[0]),o.scale(S[1])];if(w=W,O=I0({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:b,index:x}),E=H-W,C=i.size,M={x:d.left,y:O,width:d.width,height:C},Math.abs($)>0&&Math.abs(E)<Math.abs($)){var te=pt(E||$)*(Math.abs($)-Math.abs(E));E+=te}}if(w==null||O==null||E==null||C==null)return null;var Q=Tt(Tt({},b),{},{x:w,y:O,width:E,height:C,value:u?S:S[1],payload:b,background:M,tooltipPosition:{x:w+E/2,y:O+C/2},parentViewBox:m},h&&h[x]&&h[x].props);return Q}).filter(Boolean)}function nB(e){var t=_t(e,eB),r=Nt();return A.createElement(rp,{id:t.id,type:"bar"},n=>A.createElement(A.Fragment,null,A.createElement(M_,{legendPayload:V6(t)}),A.createElement(ep,{fn:H6,args:t}),A.createElement(D_,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:Pj(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),A.createElement(tB,On({},t,{id:n}))))}var q_=A.memo(nB);q_.displayName="Bar";function Y_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y_(Object(r),!0).forEach(function(n){iB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iB(e,t,r){return(t=aB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aB(e){var t=oB(e,"string");return typeof t=="symbol"?t:t+""}function oB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sB=(e,t)=>t,lB=(e,t,r)=>r,cB=(e,t,r,n)=>n,uB=(e,t,r,n,i)=>i,uo=N([Tl,uB],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),fB=N([uo],e=>e?.maxBarSize),dB=(e,t,r,n,i,a)=>a,G_=(e,t,r)=>{var n=r??e;if(!ze(n))return At(n,t,0)},hB=N([ue,Tl,sB,lB,cB],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),pB=(e,t,r,n)=>{var i=ue(e);return i==="horizontal"?ah(e,"yAxis",r,n):ah(e,"xAxis",t,n)},mB=(e,t,r)=>{var n=ue(e);return n==="horizontal"?H1(e,"xAxis",t):H1(e,"yAxis",r)},gB=(e,t,r)=>{var n={},i=e.filter(Cl),a=e.filter(c=>c.stackId==null),o=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),n),s=Object.entries(o).map(c=>{var[u,f]=c,d=f.map(m=>m.dataKey),h=G_(t,r,f[0].barSize);return{stackId:u,dataKeys:d,barSize:h}}),l=a.map(c=>{var u=[c.dataKey].filter(d=>d!=null),f=G_(t,r,c.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...s,...l]},vB=N([hB,YI,mB],gB),yB=(e,t,r,n,i)=>{var a,o,s=uo(e,t,r,n,i);if(s!=null){var l=ue(e),c=s1(e),{maxBarSize:u}=s,f=ze(u)?c:u,d,h;return l==="horizontal"?(d=bn(e,"xAxis",t,n),h=yn(e,"xAxis",t,n)):(d=bn(e,"yAxis",r,n),h=yn(e,"yAxis",r,n)),(a=(o=Ta(d,h,!0))!==null&&o!==void 0?o:f)!==null&&a!==void 0?a:0}},X_=(e,t,r,n)=>{var i=ue(e),a,o;return i==="horizontal"?(a=bn(e,"xAxis",t,n),o=yn(e,"xAxis",t,n)):(a=bn(e,"yAxis",r,n),o=yn(e,"yAxis",r,n)),Ta(a,o)};function bB(e,t,r,n,i){var a=n.length;if(!(a<1)){var o=At(e,r,0,!0),s,l=[];if(Yt(n[0].barSize)){var c=!1,u=r/a,f=n.reduce((v,b)=>v+(b.barSize||0),0);f+=(a-1)*o,f>=r&&(f-=(a-1)*o,o=0),f>=r&&u>0&&(c=!0,u*=.9,f=a*u);var d=(r-f)/2>>0,h={offset:d-o,size:0};s=n.reduce((v,b)=>{var x,S={stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:h.offset+h.size+o,size:c?u:(x=b.barSize)!==null&&x!==void 0?x:0}},w=[...v,S];return h=w[w.length-1].position,w},l)}else{var m=At(t,r,0,!0);r-2*m-(a-1)*o<=0&&(o=0);var p=(r-2*m-(a-1)*o)/a;p>1&&(p>>=0);var g=Yt(i)?Math.min(p,i):p;s=n.reduce((v,b,x)=>[...v,{stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:m+(p+o)*x+(p-g)/2,size:g}}],l)}return s}}var xB=(e,t,r,n,i,a,o)=>{var s=ze(o)?t:o,l=bB(r,n,i!==a?i:a,e,s);return i!==a&&l!=null&&(l=l.map(c=>Kl(Kl({},c),{},{position:Kl(Kl({},c.position),{},{offset:c.position.offset-i/2})}))),l},wB=N([vB,s1,qI,l1,yB,X_,fB],xB),_B=(e,t,r,n)=>bn(e,"xAxis",t,n),SB=(e,t,r,n)=>bn(e,"yAxis",r,n),OB=(e,t,r,n)=>yn(e,"xAxis",t,n),AB=(e,t,r,n)=>yn(e,"yAxis",r,n),EB=N([wB,uo],(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}}),PB=(e,t)=>{var r=Xd(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(o=>o.key===r)}}}},CB=N([pB,uo],PB),kB=N([st,Bf,_B,SB,OB,AB,EB,ue,Sl,X_,CB,uo,dB],(e,t,r,n,i,a,o,s,l,c,u,f,d)=>{var{chartData:h,dataStartIndex:m,dataEndIndex:p}=l;if(!(f==null||o==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||i==null||a==null||c==null)){var{data:g}=f,v;if(g!=null&&g.length>0?v=g:v=h?.slice(m,p+1),v!=null)return rB({layout:s,barSettings:f,pos:o,parentViewBox:t,bandSize:c,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:u,displayedData:v,offset:e,cells:d})}}),Z_=e=>{var{chartData:t}=e,r=Ze(),n=Nt();return k.useEffect(()=>n?()=>{}:(r(Tw(t)),()=>{r(Tw(void 0))}),[t,r,n]),null},J_={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Q_=qt({name:"brush",initialState:J_,reducers:{setBrushSettings(e,t){return t.payload==null?J_:t.payload}}}),{setBrushSettings:jU}=Q_.actions,TB=Q_.reducer;function MB(e,t,r){return(t=jB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jB(e){var t=DB(e,"string");return typeof t=="symbol"?t:t+""}function DB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class cp{static create(t){return new cp(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?t>=n&&t<=i:t>=i&&t<=n}}MB(cp,"EPS",1e-4);function NB(e){return(e%180+180)%180}var IB=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=NB(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},$B={dots:[],areas:[],lines:[]},eS=qt({name:"referenceElements",initialState:$B,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Br(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Br(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Br(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:DU,removeDot:NU,addArea:IU,removeArea:$U,addLine:RU,removeLine:LU}=eS.actions,RB=eS.reducer,LB=k.createContext(void 0),FB=e=>{var{children:t}=e,[r]=k.useState("".concat(_a("recharts"),"-clip")),n=ip();if(n==null)return null;var{x:i,y:a,width:o,height:s}=n;return A.createElement(LB.Provider,{value:r},A.createElement("defs",null,A.createElement("clipPath",{id:r},A.createElement("rect",{x:i,y:a,height:s,width:o}))),t)};function Xi(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function tS(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function BB(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return IB(n,r)}function zB(e,t,r){var n=r==="width",{x:i,y:a,width:o,height:s}=e;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function ql(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function WB(e,t){return tS(e,t+1)}function VB(e,t,r,n,i){for(var a=(n||[]).slice(),{start:o,end:s}=t,l=0,c=1,u=o,f=function(){var m=n?.[l];if(m===void 0)return{v:tS(n,c)};var p=l,g,v=()=>(g===void 0&&(g=r(m,p)),g),b=m.coordinate,x=l===0||ql(e,b,v,u,s);x||(l=0,u=o,c+=1),x&&(u=b+e*(v()/2+i),l+=c)},d;c<=a.length;)if(d=f(),d)return d.v;return[]}function rS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rS(Object(r),!0).forEach(function(n){HB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HB(e,t,r){return(t=UB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UB(e){var t=KB(e,"string");return typeof t=="symbol"?t:t+""}function KB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qB(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,{start:s}=t,{end:l}=t,c=function(d){var h=a[d],m,p=()=>(m===void 0&&(m=r(h,d)),m);if(d===o-1){var g=e*(h.coordinate+e*p()/2-l);a[d]=h=Et(Et({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate})}else a[d]=h=Et(Et({},h),{},{tickCoord:h.coordinate});var v=ql(e,h.tickCoord,p,s,l);v&&(l=h.tickCoord-e*(p()/2+i),a[d]=Et(Et({},h),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return a}function YB(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,{start:l,end:c}=t;if(a){var u=n[s-1],f=r(u,s-1),d=e*(u.coordinate+e*f/2-c);o[s-1]=u=Et(Et({},u),{},{tickCoord:d>0?u.coordinate-d*e:u.coordinate});var h=ql(e,u.tickCoord,()=>f,l,c);h&&(c=u.tickCoord-e*(f/2+i),o[s-1]=Et(Et({},u),{},{isShow:!0}))}for(var m=a?s-1:s,p=function(b){var x=o[b],S,w=()=>(S===void 0&&(S=r(x,b)),S);if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Et(Et({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Et(Et({},x),{},{tickCoord:x.coordinate});var E=ql(e,x.tickCoord,w,l,c);E&&(l=x.tickCoord+e*(w()/2+i),o[b]=Et(Et({},x),{},{isShow:!0}))},g=0;g<m;g++)p(g);return o}function up(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:o,orientation:s,interval:l,tickFormatter:c,unit:u,angle:f}=e;if(!i||!i.length||!n)return[];if(X(l)||dn.isSsr){var d;return(d=WB(i,X(l)?l:0))!==null&&d!==void 0?d:[]}var h=[],m=s==="top"||s==="bottom"?"width":"height",p=u&&m==="width"?so(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=(x,S)=>{var w=typeof c=="function"?c(x.value,S):x.value;return m==="width"?BB(so(w,{fontSize:t,letterSpacing:r}),p,f):so(w,{fontSize:t,letterSpacing:r})[m]},v=i.length>=2?pt(i[1].coordinate-i[0].coordinate):1,b=zB(a,v,m);return l==="equidistantPreserveStart"?VB(v,b,g,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=YB(v,b,g,i,o,l==="preserveStartEnd"):h=qB(v,b,g,i,o),h.filter(x=>x.isShow))}var GB=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){t.forEach(u=>{if(u){var f=u.getBoundingClientRect();f.width>o&&(o=f.width)}});var s=r?r.getBoundingClientRect().width:0,l=i+a,c=o+l+s+(r?n:0);return Math.round(c)}return 0},XB=["axisLine","width","height","className","hide","ticks"],ZB=["viewBox"],JB=["viewBox"];function fp(e,t){if(e==null)return{};var r,n,i=QB(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function QB(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ai.apply(null,arguments)}function nS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?nS(Object(r),!0).forEach(function(n){e3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):nS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e3(e,t,r){return(t=t3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t3(e){var t=r3(e,"string");return typeof t=="symbol"?t:t+""}function r3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dp={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};function n3(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:o,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=ut(ut(ut({},l),Ue(s,!1)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!o||a==="bottom"&&o);c=ut(ut({},c),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var f=+(a==="left"&&!o||a==="right"&&o);c=ut(ut({},c),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return A.createElement("line",ai({},c,{className:de("recharts-cartesian-axis-line",Ln(s,"className"))}))}function i3(e,t,r,n,i,a,o,s,l){var c,u,f,d,h,m,p=s?-1:1,g=e.tickSize||o,v=X(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":c=u=e.coordinate,d=r+ +!s*i,f=d-p*g,m=f-p*l,h=v;break;case"left":f=d=e.coordinate,u=t+ +!s*n,c=u-p*g,h=c-p*l,m=v;break;case"right":f=d=e.coordinate,u=t+ +s*n,c=u+p*g,h=c+p*l,m=v;break;default:c=u=e.coordinate,d=r+ +s*i,f=d+p*g,m=f+p*l,h=v;break}return{line:{x1:c,y1:f,x2:u,y2:d},tick:{x:h,y:m}}}function a3(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function o3(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function s3(e){var{option:t,tickProps:r,value:n}=e,i,a=de(r.className,"recharts-cartesian-axis-tick-value");if(A.isValidElement(t))i=A.cloneElement(t,ut(ut({},r),{},{className:a}));else if(typeof t=="function")i=t(ut(ut({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=de(o,t?.className)),i=A.createElement(Bl,ai({},r,{className:o}),n)}return i}function l3(e){var{ticks:t=[],tick:r,tickLine:n,stroke:i,tickFormatter:a,unit:o,padding:s,tickTextProps:l,orientation:c,mirror:u,x:f,y:d,width:h,height:m,tickSize:p,tickMargin:g,fontSize:v,letterSpacing:b,getTicksConfig:x,events:S}=e,w=up(ut(ut({},x),{},{ticks:t}),v,b),O=a3(c,u),E=o3(c,u),C=Ar(x),M=Ue(r,!1),$=ut(ut({},C),{},{fill:"none"},Ue(n,!1)),j=w.map((_,I)=>{var{line:D,tick:L}=i3(_,f,d,h,m,c,p,u,g),W=ut(ut(ut(ut({textAnchor:O,verticalAnchor:E},C),{},{stroke:"none",fill:i},M),L),{},{index:I,payload:_,visibleTicksCount:w.length,tickFormatter:a,padding:s},l);return A.createElement(xt,ai({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},gs(S,_,I)),n&&A.createElement("line",ai({},$,D,{className:de("recharts-cartesian-axis-tick-line",Ln(n,"className"))})),r&&A.createElement(s3,{option:r,tickProps:W,value:"".concat(typeof a=="function"?a(_.value,I):_.value).concat(o||"")}))});return j.length>0?A.createElement("g",{className:"recharts-cartesian-axis-ticks"},j):null}var c3=k.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s}=e,l=fp(e,XB),[c,u]=k.useState(""),[f,d]=k.useState(""),h=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var p;return GB({ticks:h.current,label:(p=e.labelRef)===null||p===void 0?void 0:p.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(p=>{if(p){var g=p.getElementsByClassName("recharts-cartesian-axis-tick-value");h.current=Array.from(g);var v=g[0];if(v){var b=window.getComputedStyle(v),x=b.fontSize,S=b.letterSpacing;(x!==c||S!==f)&&(u(x),d(S))}}},[c,f]);return o||n!=null&&n<=0||i!=null&&i<=0?null:A.createElement(xt,{className:de("recharts-cartesian-axis",a),ref:m},A.createElement(n3,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Ar(e)}),A.createElement(l3,{ticks:s,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:c,letterSpacing:f,getTicksConfig:e,events:l}),A.createElement(mL,{x:e.x,y:e.y,width:e.width,height:e.height},A.createElement(AL,{label:e.label}),e.children))}),u3=A.memo(c3,(e,t)=>{var{viewBox:r}=e,n=fp(e,ZB),{viewBox:i}=t,a=fp(t,JB);return Xi(r,i)&&Xi(n,a)}),hp=A.forwardRef((e,t)=>{var r=_t(e,dp);return A.createElement(u3,ai({},r,{ref:t}))});hp.displayName="CartesianAxis";var f3=["x1","y1","x2","y2","key"],d3=["offset"],h3=["xAxisId","yAxisId"],p3=["xAxisId","yAxisId"];function iS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iS(Object(r),!0).forEach(function(n){m3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m3(e,t,r){return(t=g3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g3(e){var t=v3(e,"string");return typeof t=="symbol"?t:t+""}function v3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oi(){return oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oi.apply(null,arguments)}function Yl(e,t){if(e==null)return{};var r,n,i=y3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function y3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var b3=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:o,ry:s}=e;return A.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function aS(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var{x1:n,y1:i,x2:a,y2:o,key:s}=t,l=Yl(t,f3),c=Ar(l),{offset:u}=c,f=Yl(c,d3);r=A.createElement("line",oi({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function x3(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=Yl(e,h3),l=i.map((c,u)=>{var f=Pt(Pt({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return aS(n,f)});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function w3(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=Yl(e,p3),l=i.map((c,u)=>{var f=Pt(Pt({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return aS(n,f)});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function _3(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:o,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+o-f:c[d+1]-f;if(m<=0)return null;var p=d%t.length;return A.createElement("rect",{key:"react-".concat(d),y:f,x:n,height:m,width:a,stroke:"none",fill:t[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function S3(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:o,height:s,verticalPoints:l}=e;if(!t||!r||!r.length)return null;var c=l.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+o-f:c[d+1]-f;if(m<=0)return null;var p=d%r.length;return A.createElement("rect",{key:"react-".concat(d),x:f,y:a,width:m,height:s,stroke:"none",fill:r[p],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var O3=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return M0(up(Pt(Pt(Pt({},dp),r),{},{ticks:j0(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},A3=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return M0(up(Pt(Pt(Pt({},dp),r),{},{ticks:j0(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},E3={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Gl(e){var t=H0(),r=U0(),n=V0(),i=Pt(Pt({},_t(e,E3)),{},{x:X(e.x)?e.x:n.left,y:X(e.y)?e.y:n.top,width:X(e.width)?e.width:n.width,height:X(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:o,x:s,y:l,width:c,height:u,syncWithTicks:f,horizontalValues:d,verticalValues:h}=i,m=Nt(),p=G(M=>q1(M,"xAxis",a,m)),g=G(M=>q1(M,"yAxis",o,m));if(!X(c)||c<=0||!X(u)||u<=0||!X(s)||s!==+s||!X(l)||l!==+l)return null;var v=i.verticalCoordinatesGenerator||O3,b=i.horizontalCoordinatesGenerator||A3,{horizontalPoints:x,verticalPoints:S}=i;if((!x||!x.length)&&typeof b=="function"){var w=d&&d.length,O=b({yAxis:g?Pt(Pt({},g),{},{ticks:w?d:g.ticks}):void 0,width:t,height:r,offset:n},w?!0:f);oo(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(x=O)}if((!S||!S.length)&&typeof v=="function"){var E=h&&h.length,C=v({xAxis:p?Pt(Pt({},p),{},{ticks:E?h:p.ticks}):void 0,width:t,height:r,offset:n},E?!0:f);oo(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(S=C)}return A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(b3,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),A.createElement(_3,oi({},i,{horizontalPoints:x})),A.createElement(S3,oi({},i,{verticalPoints:S})),A.createElement(x3,oi({},i,{offset:n,horizontalPoints:x,xAxis:p,yAxis:g})),A.createElement(w3,oi({},i,{offset:n,verticalPoints:S,xAxis:p,yAxis:g})))}Gl.displayName="CartesianGrid";var oS=(e,t,r,n)=>bn(e,"xAxis",t,n),sS=(e,t,r,n)=>yn(e,"xAxis",t,n),lS=(e,t,r,n)=>bn(e,"yAxis",r,n),cS=(e,t,r,n)=>yn(e,"yAxis",r,n),P3=N([ue,oS,lS,sS,cS],(e,t,r,n,i)=>fn(e,"xAxis")?Ta(t,n,!1):Ta(r,i,!1)),C3=(e,t,r,n,i)=>i;function k3(e){return e.type==="line"}var T3=N([Tl,C3],(e,t)=>e.filter(k3).find(r=>r.id===t)),M3=N([ue,oS,lS,sS,cS,T3,P3,Sl],(e,t,r,n,i,a,o,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||o==null)){var{dataKey:f,data:d}=a,h;if(d!=null&&d.length>0?h=d:h=l?.slice(c,u+1),h!=null)return Q3({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:o,displayedData:h})}}),j3=["id"],D3=["type","layout","connectNulls","needClip"],N3=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function uS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?uS(Object(r),!0).forEach(function(n){I3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):uS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I3(e,t,r){return(t=$3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $3(e){var t=R3(e,"string");return typeof t=="symbol"?t:t+""}function R3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pp(e,t){if(e==null)return{};var r,n,i=L3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function L3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(null,arguments)}var F3=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:ji(r,t),payload:e}]};function B3(e){var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,unit:l}=e;return{dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:ji(o,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var fS=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function z3(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}var W3=(e,t,r)=>{var n=r.reduce((f,d)=>f+d);if(!n)return fS(t,e);for(var i=Math.floor(e/n),a=e%n,o=t-e,s=[],l=0,c=0;l<r.length;c+=r[l],++l)if(c+r[l]>a){s=[...r.slice(0,l),a-c];break}var u=s.length%2===0?[0,o]:[o];return[...z3(r,i),...s,...u].map(f=>"".concat(f,"px")).join(", ")};function V3(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var n=de("recharts-line-dot",typeof e!="boolean"?e.className:"");r=A.createElement(p_,si({},t,{className:n}))}return r}function H3(e,t){return e==null?!1:t?!0:e.length===1}function U3(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n;if(!H3(r,i))return null;var{id:s}=n,l=pp(n,j3),c=cv(i),u=Ar(l),f=Ue(i,!0),d=r.map((m,p)=>{var g=Qt(Qt(Qt({key:"dot-".concat(p),r:3},u),f),{},{index:p,cx:m.x,cy:m.y,dataKey:a,value:m.value,payload:m.payload,points:r});return V3(i,g)}),h={clipPath:o?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return A.createElement(xt,si({className:"recharts-line-dots",key:"dots"},h),d)}function K3(e){var{showLabels:t,children:r,points:n}=e,i=k.useMemo(()=>n?.map(a=>{var o={x:a.x,y:a.y,width:0,height:0};return Qt(Qt({},o),{},{value:a.value,payload:a.payload,viewBox:o,parentViewBox:void 0,fill:void 0})}),[n]);return A.createElement(d_,{value:t?i:null},r)}function dS(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:l,needClip:c}=a,u=pp(a,D3),f=Qt(Qt({},Ue(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:s,connectNulls:l,strokeDasharray:i??a.strokeDasharray});return A.createElement(A.Fragment,null,n?.length>1&&A.createElement(Kf,si({},f,{pathRef:r})),A.createElement(U3,{points:n,clipPathId:t,props:a}))}function q3(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Y3(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:f,animateNewValues:d,width:h,height:m,onAnimationEnd:p,onAnimationStart:g}=r,v=i.current,b=Ra(r,"recharts-line-"),[x,S]=k.useState(!1),w=!x,O=k.useCallback(()=>{typeof p=="function"&&p(),S(!1)},[p]),E=k.useCallback(()=>{typeof g=="function"&&g(),S(!0)},[g]),C=q3(n.current),M=a.current;return A.createElement(K3,{points:o,showLabels:w},r.children,A.createElement($a,{animationId:b,begin:c,duration:u,isActive:l,easing:f,onAnimationEnd:O,onAnimationStart:E,key:b},$=>{var j=Ye(M,C+M,$),_=Math.min(j,C),I;if(l)if(s){var D="".concat(s).split(/[,\s]+/gim).map(H=>parseFloat(H));I=W3(_,C,D)}else I=fS(C,_);else I=s==null?void 0:String(s);if(v){var L=v.length/o.length,W=$===1?o:o.map((H,te)=>{var Q=Math.floor(te*L);if(v[Q]){var F=v[Q];return Qt(Qt({},H),{},{x:Ye(F.x,H.x,$),y:Ye(F.y,H.y,$)})}return d?Qt(Qt({},H),{},{x:Ye(h*2,H.x,$),y:Ye(m/2,H.y,$)}):Qt(Qt({},H),{},{x:H.x,y:H.y})});return i.current=W,A.createElement(dS,{props:r,points:W,clipPathId:t,pathRef:n,strokeDasharray:I})}return $>0&&C>0&&(i.current=o,a.current=_),A.createElement(dS,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:I})}),A.createElement(Vh,{label:r.label}))}function G3(e){var{clipPathId:t,props:r}=e,n=k.useRef(null),i=k.useRef(0),a=k.useRef(null);return A.createElement(Y3,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var X3=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:$e(e.payload,t)});class Z3 extends k.Component{render(){var t,{hide:r,dot:n,points:i,className:a,xAxisId:o,yAxisId:s,top:l,left:c,width:u,height:f,id:d,needClip:h}=this.props;if(r)return null;var m=de("recharts-line",a),p=d,{r:g=3,strokeWidth:v=2}=(t=Ue(n,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},b=cv(n),x=g*2+v;return A.createElement(A.Fragment,null,A.createElement(xt,{className:m},h&&A.createElement("defs",null,A.createElement(H_,{clipPathId:p,xAxisId:o,yAxisId:s}),!b&&A.createElement("clipPath",{id:"clipPath-dots-".concat(p)},A.createElement("rect",{x:c-x/2,y:l-x/2,width:u+x,height:f+x}))),A.createElement(V_,{xAxisId:o,yAxisId:s,data:i,dataPointFormatter:X3,errorBarOffset:0},A.createElement(G3,{props:this.props,clipPathId:p}))),A.createElement(y6,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var hS={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!dn.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function J3(e){var t=_t(e,hS),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:f,legendType:d,xAxisId:h,yAxisId:m,id:p}=t,g=pp(t,N3),{needClip:v}=lp(h,m),b=ip(),x=Js(),S=Nt(),w=G($=>M3($,h,m,S,p));if(x!=="horizontal"&&x!=="vertical"||w==null||b==null)return null;var{height:O,width:E,x:C,y:M}=b;return A.createElement(Z3,si({},g,{id:p,connectNulls:s,dot:l,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:c,label:f,legendType:d,xAxisId:h,yAxisId:m,points:w,layout:x,height:O,width:E,left:C,top:M,needClip:v}))}function Q3(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var f=$e(c,o);if(t==="horizontal"){var d=N0({axis:r,ticks:i,bandSize:s,entry:c,index:u}),h=ze(f)?null:n.scale(f);return{x:d,y:h,value:f,payload:c}}var m=ze(f)?null:r.scale(f),p=N0({axis:n,ticks:a,bandSize:s,entry:c,index:u});return m==null||p==null?null:{x:m,y:p,value:f,payload:c}}).filter(Boolean)}function e8(e){var t=_t(e,hS),r=Nt();return A.createElement(rp,{id:t.id,type:"line"},n=>A.createElement(A.Fragment,null,A.createElement(M_,{legendPayload:F3(t)}),A.createElement(ep,{fn:B3,args:t}),A.createElement(D_,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),A.createElement(J3,si({},t,{id:n}))))}var fo=A.memo(e8);fo.displayName="Line";var t8=["dangerouslySetInnerHTML","ticks"],r8=["id"],n8=["domain"],i8=["domain"];function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mp.apply(null,arguments)}function Xl(e,t){if(e==null)return{};var r,n,i=a8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function a8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function o8(e){var t=Ze();return k.useEffect(()=>(t(a6(e)),()=>{t(o6(e))}),[e,t]),null}var s8=e=>{var{xAxisId:t,className:r}=e,n=G(Bf),i=Nt(),a="xAxis",o=G(g=>Ki(g,a,t,i)),s=G(g=>Y1(g,a,t,i)),l=G(g=>W1(g,t)),c=G(g=>F$(g,t)),u=G(g=>y1(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:f,ticks:d}=e,h=Xl(e,t8),{id:m}=u,p=Xl(u,r8);return A.createElement(hp,mp({},h,p,{scale:o,x:c.x,y:c.y,width:l.width,height:l.height,className:de("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:s}))},l8={allowDataOverflow:Zt.allowDataOverflow,allowDecimals:Zt.allowDecimals,allowDuplicatedCategory:Zt.allowDuplicatedCategory,height:Zt.height,hide:!1,mirror:Zt.mirror,orientation:Zt.orientation,padding:Zt.padding,reversed:Zt.reversed,scale:Zt.scale,tickCount:Zt.tickCount,type:Zt.type,xAxisId:0},c8=e=>{var t,r,n,i,a,o=_t(e,l8);return A.createElement(A.Fragment,null,A.createElement(o8,{interval:(t=o.interval)!==null&&t!==void 0?t:"preserveEnd",id:o.xAxisId,scale:o.scale,type:o.type,padding:o.padding,allowDataOverflow:o.allowDataOverflow,domain:o.domain,dataKey:o.dataKey,allowDuplicatedCategory:o.allowDuplicatedCategory,allowDecimals:o.allowDecimals,tickCount:o.tickCount,includeHidden:(r=o.includeHidden)!==null&&r!==void 0?r:!1,reversed:o.reversed,ticks:o.ticks,height:o.height,orientation:o.orientation,mirror:o.mirror,hide:o.hide,unit:o.unit,name:o.name,angle:(n=o.angle)!==null&&n!==void 0?n:0,minTickGap:(i=o.minTickGap)!==null&&i!==void 0?i:5,tick:(a=o.tick)!==null&&a!==void 0?a:!0,tickFormatter:o.tickFormatter}),A.createElement(s8,o))},u8=(e,t)=>{var{domain:r}=e,n=Xl(e,n8),{domain:i}=t,a=Xl(t,i8);return Xi(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Xi({domain:r},{domain:i}):!1},Zl=A.memo(c8,u8);Zl.displayName="XAxis";var f8=["dangerouslySetInnerHTML","ticks"],d8=["id"],h8=["domain"],p8=["domain"];function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gp.apply(null,arguments)}function Jl(e,t){if(e==null)return{};var r,n,i=m8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function m8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function g8(e){var t=Ze();return k.useEffect(()=>(t(s6(e)),()=>{t(l6(e))}),[e,t]),null}var v8=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=k.useRef(null),o=k.useRef(null),s=G(Bf),l=Nt(),c=Ze(),u="yAxis",f=G(w=>Ki(w,u,t,l)),d=G(w=>V1(w,t)),h=G(w=>z$(w,t)),m=G(w=>Y1(w,u,t,l)),p=G(w=>b1(w,t));if(k.useLayoutEffect(()=>{if(!(n!=="auto"||!d||Lh(i)||k.isValidElement(i)||p==null)){var w=a.current;if(w){var O=w.getCalculatedWidth();Math.round(d.width)!==Math.round(O)&&c(c6({id:t,width:O}))}}},[m,d,c,i,t,n,p]),d==null||h==null||p==null)return null;var{dangerouslySetInnerHTML:g,ticks:v}=e,b=Jl(e,f8),{id:x}=p,S=Jl(p,d8);return A.createElement(hp,gp({},b,S,{ref:a,labelRef:o,scale:f,x:h.x,y:h.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:d.width,height:d.height,className:de("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:m}))},y8={allowDataOverflow:Jt.allowDataOverflow,allowDecimals:Jt.allowDecimals,allowDuplicatedCategory:Jt.allowDuplicatedCategory,hide:!1,mirror:Jt.mirror,orientation:Jt.orientation,padding:Jt.padding,reversed:Jt.reversed,scale:Jt.scale,tickCount:Jt.tickCount,type:Jt.type,width:Jt.width,yAxisId:0},b8=e=>{var t,r,n,i,a,o=_t(e,y8);return A.createElement(A.Fragment,null,A.createElement(g8,{interval:(t=o.interval)!==null&&t!==void 0?t:"preserveEnd",id:o.yAxisId,scale:o.scale,type:o.type,domain:o.domain,allowDataOverflow:o.allowDataOverflow,dataKey:o.dataKey,allowDuplicatedCategory:o.allowDuplicatedCategory,allowDecimals:o.allowDecimals,tickCount:o.tickCount,padding:o.padding,includeHidden:(r=o.includeHidden)!==null&&r!==void 0?r:!1,reversed:o.reversed,ticks:o.ticks,width:o.width,orientation:o.orientation,mirror:o.mirror,hide:o.hide,unit:o.unit,name:o.name,angle:(n=o.angle)!==null&&n!==void 0?n:0,minTickGap:(i=o.minTickGap)!==null&&i!==void 0?i:5,tick:(a=o.tick)!==null&&a!==void 0?a:!0,tickFormatter:o.tickFormatter}),A.createElement(v8,o))},x8=(e,t)=>{var{domain:r}=e,n=Jl(e,h8),{domain:i}=t,a=Jl(t,p8);return Xi(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Xi({domain:r},{domain:i}):!1},Ql=A.memo(b8,x8);Ql.displayName="YAxis";var ec={exports:{}},vp={};/**
183
+ `).concat(S.x,",").concat(S.y),O=ze(e.id)?_a("recharts-radial-line-"):e.id;return A.createElement("text",en({},n,{dominantBaseline:"central",className:de("recharts-radial-bar-label",o)}),A.createElement("defs",null,A.createElement("path",{id:O,d:w})),A.createElement("textPath",{xlinkHref:"#".concat(O)},r))},wL=(e,t,r)=>{var{cx:n,cy:i,innerRadius:a,outerRadius:o,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(r==="outside"){var{x:u,y:f}=it(n,i,o+t,c);return{x:u,y:f,textAnchor:u>=n?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:n,y:i,textAnchor:"middle",verticalAnchor:"end"};var d=(a+o)/2,{x:h,y:m}=it(n,i,d,c);return{x:h,y:m,textAnchor:"middle",verticalAnchor:"middle"}},a_=e=>"cx"in e&&X(e.cx),_L=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!a_(r)&&(a=r);var{x:o,y:s,width:l,height:c}=t,u=c>=0?1:-1,f=u*n,d=u>0?"end":"start",h=u>0?"start":"end",m=l>=0?1:-1,p=m*n,g=m>0?"end":"start",v=m>0?"start":"end";if(i==="top"){var b={x:o+l/2,y:s-u*n,textAnchor:"middle",verticalAnchor:d};return Qe(Qe({},b),a?{height:Math.max(s-a.y,0),width:l}:{})}if(i==="bottom"){var x={x:o+l/2,y:s+c+f,textAnchor:"middle",verticalAnchor:h};return Qe(Qe({},x),a?{height:Math.max(a.y+a.height-(s+c),0),width:l}:{})}if(i==="left"){var S={x:o-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Qe(Qe({},S),a?{width:Math.max(S.x-a.x,0),height:c}:{})}if(i==="right"){var w={x:o+l+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return Qe(Qe({},w),a?{width:Math.max(a.x+a.width-w.x,0),height:c}:{})}var O=a?{width:l,height:c}:{};return i==="insideLeft"?Qe({x:o+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},O):i==="insideRight"?Qe({x:o+l-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},O):i==="insideTop"?Qe({x:o+l/2,y:s+f,textAnchor:"middle",verticalAnchor:h},O):i==="insideBottom"?Qe({x:o+l/2,y:s+c-f,textAnchor:"middle",verticalAnchor:d},O):i==="insideTopLeft"?Qe({x:o+p,y:s+f,textAnchor:v,verticalAnchor:h},O):i==="insideTopRight"?Qe({x:o+l-p,y:s+f,textAnchor:g,verticalAnchor:h},O):i==="insideBottomLeft"?Qe({x:o+p,y:s+c-f,textAnchor:v,verticalAnchor:d},O):i==="insideBottomRight"?Qe({x:o+l-p,y:s+c-f,textAnchor:g,verticalAnchor:d},O):i&&typeof i=="object"&&(X(i.x)||Fn(i.x))&&(X(i.y)||Fn(i.y))?Qe({x:o+At(i.x,l),y:s+At(i.y,c),textAnchor:"end",verticalAnchor:"end"},O):Qe({x:o+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},O)},SL={offset:5};function _n(e){var t=_t(e,SL),{viewBox:r,position:n,value:i,children:a,content:o,className:s="",textBreakAll:l,labelRef:c}=t,u=vL(),f=i_(),d=n==="center"?f:u??f,h=r||d;if(!h||ze(i)&&ze(a)&&!k.isValidElement(o)&&typeof o!="function")return null;var m=Qe(Qe({},t),{},{viewBox:h});if(k.isValidElement(o)){var{labelRef:p}=m,g=uL(m,cL);return k.cloneElement(o,g)}var v;if(typeof o=="function"){if(v=k.createElement(o,m),k.isValidElement(v))return v}else v=yL(t);var b=a_(h),x=Ue(t,!0);if(b&&(n==="insideStart"||n==="insideEnd"||n==="end"))return xL(t,n,v,x,h);var S=b?wL(h,t.offset,t.position):_L(t,h);return A.createElement(Bl,en({ref:c,className:de("recharts-label",s)},x,S,{breakAll:l}),v)}_n.displayName="Label";var OL=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?A.createElement(_n,en({key:"label-implicit"},n)):Or(e)?A.createElement(_n,en({key:"label-implicit",value:e},n)):k.isValidElement(e)?e.type===_n?k.cloneElement(e,Qe({key:"label-implicit"},n)):A.createElement(_n,en({key:"label-implicit",content:e},n)):Lh(e)?A.createElement(_n,en({key:"label-implicit",content:e},n)):e&&typeof e=="object"?A.createElement(_n,en({},e,{key:"label-implicit"},n)):null};function AL(e){var{label:t}=e,r=i_();return OL(t,r)||null}var Fh={},Bh={},o_;function EL(){return o_||(o_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(Bh)),Bh}var zh={},s_;function PL(){return s_||(s_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(zh)),zh}var l_;function CL(){return l_||(l_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=EL(),r=PL(),n=Fu();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Fh)),Fh}var Wh,c_;function kL(){return c_||(c_=1,Wh=CL().last),Wh}var TL=kL();const ML=Ir(TL);var jL=["valueAccessor"],DL=["dataKey","clockWise","id","textBreakAll"];function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},zl.apply(null,arguments)}function u_(e,t){if(e==null)return{};var r,n,i=NL(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function NL(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var IL=e=>Array.isArray(e.value)?ML(e.value):e.value,f_=k.createContext(void 0),d_=f_.Provider,h_=k.createContext(void 0),$L=h_.Provider;function RL(){return k.useContext(f_)}function LL(){return k.useContext(h_)}function Wl(e){var{valueAccessor:t=IL}=e,r=u_(e,jL),{dataKey:n,clockWise:i,id:a,textBreakAll:o}=r,s=u_(r,DL),l=RL(),c=LL(),u=l||c;return!u||!u.length?null:A.createElement(xt,{className:"recharts-label-list"},u.map((f,d)=>{var h,m=ze(n)?t(f,d):$e(f&&f.payload,n),p=ze(a)?{}:{id:"".concat(a,"-").concat(d)};return A.createElement(_n,zl({},Ue(f,!0),s,p,{fill:(h=r.fill)!==null&&h!==void 0?h:f.fill,parentViewBox:f.parentViewBox,value:m,textBreakAll:o,viewBox:f.viewBox,key:"label-".concat(d),index:d}))}))}Wl.displayName="LabelList";function Vh(e){var{label:t}=e;return t?t===!0?A.createElement(Wl,{key:"labelList-implicit"}):A.isValidElement(t)||Lh(t)?A.createElement(Wl,{key:"labelList-implicit",content:t}):typeof t=="object"?A.createElement(Wl,zl({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function Hh(){return Hh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Hh.apply(null,arguments)}var p_=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=de("recharts-dot",i);return t===+t&&r===+r&&n===+n?A.createElement("circle",Hh({},Ar(e),yu(e),{className:a,cx:t,cy:r,r:n})):null},m_=e=>e.graphicalItems.polarItems,FL=N([Ve,Qa],Qd),Uh=N([m_,Je,FL],eh),BL=N([Uh],th),Kh=N([BL,Ld],rh),zL=N([Kh,Je,Uh],ih),WL=N([Kh,Je,Uh],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,o=$e(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:o,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:$e(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]}))),g_=()=>{},VL=N([Je,$1,g_,WL,g_,ue,Ve],sh),v_=N([Je,ue,Kh,zL,Ja,Ve,VL],lh),HL=N([v_,Je,Ui],fh);N([Je,v_,HL,Ve],hh);var UL={radiusAxis:{},angleAxis:{}},y_=qt({name:"polarAxis",initialState:UL,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:SU,removeRadiusAxis:OU,addAngleAxis:AU,removeAngleAxis:EU}=y_.actions,KL=y_.reducer;function b_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function x_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?b_(Object(r),!0).forEach(function(n){qL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):b_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function qL(e,t,r){return(t=YL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YL(e){var t=GL(e,"string");return typeof t=="symbol"?t:t+""}function GL(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var XL=(e,t)=>t,qh=N([m_,XL],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),ZL=[],Yh=(e,t,r)=>r?.length===0?ZL:r,w_=N([Ld,qh,Yh],(e,t,r)=>{var{chartData:n}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=n,(!i||!i.length)&&r!=null&&(i=r.map(a=>x_(x_({},t.presentationProps),a.props))),i!=null)return i}}),JL=N([w_,qh,Yh],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,o=$e(n,t.nameKey,t.name),s;return r!=null&&(a=r[i])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?s=r[i].props.fill:typeof n=="object"&&n!=null&&"fill"in n?s=n.fill:s=t.fill,{value:ji(o,t.dataKey),color:s,payload:n,type:t.legendType}})}),QL=N([w_,qh,Yh,st],(e,t,r,n)=>{if(!(t==null||e==null))return XF({offset:n,pieSettings:t,displayedData:e,cells:r})}),Gh={},__;function eF(){return __||(__=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){if(typeof r!="object"||r==null)return!1;if(Object.getPrototypeOf(r)===null)return!0;if(Object.prototype.toString.call(r)!=="[object Object]"){const i=r[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(r,Symbol.toStringTag)?.writable?!1:r.toString()===`[object ${i}]`}let n=r;for(;Object.getPrototypeOf(n)!==null;)n=Object.getPrototypeOf(n);return Object.getPrototypeOf(r)===n}e.isPlainObject=t})(Gh)),Gh}var Xh,S_;function tF(){return S_||(S_=1,Xh=eF().isPlainObject),Xh}var rF=tF();const nF=Ir(rF);function O_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function A_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?O_(Object(r),!0).forEach(function(n){iF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):O_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iF(e,t,r){return(t=aF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aF(e){var t=oF(e,"string");return typeof t=="symbol"?t:t+""}function oF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Vl(){return Vl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Vl.apply(null,arguments)}var E_=(e,t,r,n,i)=>{var a=r-n,o;return o="M ".concat(e,",").concat(t),o+="L ".concat(e+r,",").concat(t),o+="L ".concat(e+r-a/2,",").concat(t+i),o+="L ".concat(e+r-a/2-n,",").concat(t+i),o+="L ".concat(e,",").concat(t," Z"),o},sF={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},lF=e=>{var t=_t(e,sF),{x:r,y:n,upperWidth:i,lowerWidth:a,height:o,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:f}=t,d=k.useRef(),[h,m]=k.useState(-1),p=k.useRef(i),g=k.useRef(a),v=k.useRef(o),b=k.useRef(r),x=k.useRef(n),S=Ra(e,"trapezoid-");if(k.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var D=d.current.getTotalLength();D&&m(D)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var w=de("recharts-trapezoid",s);if(!f)return A.createElement("g",null,A.createElement("path",Vl({},Ue(t,!0),{className:w,d:E_(r,n,i,a,o)})));var O=p.current,E=g.current,C=v.current,M=b.current,$=x.current,j="0px ".concat(h===-1?1:h,"px"),_="".concat(h,"px 0px"),I=ob(["strokeDasharray"],c,l);return A.createElement($a,{animationId:S,key:S,canBegin:h>0,duration:c,easing:l,isActive:f,begin:u},D=>{var L=Ye(O,i,D),W=Ye(E,a,D),H=Ye(C,o,D),te=Ye(M,r,D),Q=Ye($,n,D);d.current&&(p.current=L,g.current=W,v.current=H,b.current=te,x.current=Q);var F=D>0?{transition:I,strokeDasharray:_}:{strokeDasharray:j};return A.createElement("path",Vl({},Ue(t,!0),{className:w,d:E_(te,Q,L,W,H),ref:d,style:A_(A_({},F),t.style)}))})},cF=["option","shapeType","propTransformer","activeClassName","isActive"];function uF(e,t){if(e==null)return{};var r,n,i=fF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function P_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Hl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?P_(Object(r),!0).forEach(function(n){dF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dF(e,t,r){return(t=hF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hF(e){var t=pF(e,"string");return typeof t=="symbol"?t:t+""}function pF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mF(e,t){return Hl(Hl({},t),e)}function gF(e,t){return e==="symbols"}function C_(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return A.createElement(vb,r);case"trapezoid":return A.createElement(lF,r);case"sector":return A.createElement(xb,r);case"symbols":if(gF(t))return A.createElement(Nv,r);break;default:return null}}function vF(e){return k.isValidElement(e)?e.props:e}function k_(e){var{option:t,shapeType:r,propTransformer:n=mF,activeClassName:i="recharts-active-shape",isActive:a}=e,o=uF(e,cF),s;if(k.isValidElement(t))s=k.cloneElement(t,Hl(Hl({},o),vF(t)));else if(typeof t=="function")s=t(o);else if(nF(t)&&typeof t!="boolean"){var l=n(t,o);s=A.createElement(C_,{shapeType:r,elementProps:l})}else{var c=o;s=A.createElement(C_,{shapeType:r,elementProps:c})}return a?A.createElement(xt,{className:i},s):s}var Zh=(e,t)=>{var r=Ze();return(n,i)=>a=>{e?.(n,i,a),r(ew({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},Jh=e=>{var t=Ze();return(r,n)=>i=>{e?.(r,n,i),t(J4())}},Qh=(e,t)=>{var r=Ze();return(n,i)=>a=>{e?.(n,i,a),r(Q4({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function ep(e){var{fn:t,args:r}=e,n=Ze(),i=Nt();return k.useEffect(()=>{if(!i){var a=t(r);return n(G4(a)),()=>{n(X4(a))}}},[t,r,n,i]),null}var T_=()=>{};function M_(e){var{legendPayload:t}=e,r=Ze(),n=Nt();return k.useEffect(()=>n?T_:(r(q0(t)),()=>{r(Y0(t))}),[r,n,t]),null}function yF(e){var{legendPayload:t}=e,r=Ze(),n=G(ue);return k.useEffect(()=>n!=="centric"&&n!=="radial"?T_:(r(q0(t)),()=>{r(Y0(t))}),[r,n,t]),null}var tp,bF=()=>{var[e]=A.useState(()=>_a("uid-"));return e},xF=(tp=A.useId)!==null&&tp!==void 0?tp:bF;function wF(e,t){var r=xF();return t||(e?"".concat(e,"-").concat(r):r)}var _F=k.createContext(void 0),rp=e=>{var{id:t,type:r,children:n}=e,i=wF("recharts-".concat(r),t);return A.createElement(_F.Provider,{value:i},n(i))},SF={cartesianItems:[],polarItems:[]},j_=qt({name:"graphicalItems",initialState:SF,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:r,next:n}=t.payload,i=Br(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},removeCartesianGraphicalItem(e,t){var r=Br(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var r=Br(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)}}}),{addCartesianGraphicalItem:OF,replaceCartesianGraphicalItem:AF,removeCartesianGraphicalItem:EF,addPolarGraphicalItem:PF,removePolarGraphicalItem:CF}=j_.actions,kF=j_.reducer;function D_(e){var t=Ze(),r=k.useRef(null);return k.useEffect(()=>{r.current===null?t(OF(e)):r.current!==e&&t(AF({prev:r.current,next:e})),r.current=e},[t,e]),k.useEffect(()=>()=>{r.current&&(t(EF(r.current)),r.current=null)},[t]),null}function TF(e){var t=Ze();return k.useEffect(()=>(t(PF(e)),()=>{t(CF(e))}),[t,e]),null}var MF=["onMouseEnter","onClick","onMouseLeave"],jF=["id"],DF=["id"];function np(e,t){if(e==null)return{};var r,n,i=NF(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function NF(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function N_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function He(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?N_(Object(r),!0).forEach(function(n){IF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):N_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function IF(e,t,r){return(t=$F(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $F(e){var t=RF(e,"string");return typeof t=="symbol"?t:t+""}function RF(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Sn(){return Sn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sn.apply(null,arguments)}function LF(e){var t=k.useMemo(()=>xu(e.children,kr),[e.children]),r=G(n=>JL(n,e.id,t));return r==null?null:A.createElement(yF,{legendPayload:r})}function FF(e){var{dataKey:t,nameKey:r,sectors:n,stroke:i,strokeWidth:a,fill:o,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:n.map(u=>u.tooltipPayload),positions:n.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:a,fill:o,dataKey:t,nameKey:r,name:ji(s,t),hide:l,type:c,color:o,unit:""}}}var BF=(e,t)=>e>t?"start":e<t?"end":"middle",zF=(e,t,r)=>At(typeof t=="function"?t(e):t,r,r*.8),WF=(e,t,r)=>{var{top:n,left:i,width:a,height:o}=t,s=C0(a,o),l=i+At(e.cx,a,a/2),c=n+At(e.cy,o,o/2),u=At(e.innerRadius,s,0),f=zF(r,e.outerRadius,s),d=e.maxRadius||Math.sqrt(a*a+o*o)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:f,maxRadius:d}},VF=(e,t)=>{var r=pt(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function HF(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var UF=(e,t)=>{if(A.isValidElement(e))return A.cloneElement(e,t);if(typeof e=="function")return e(t);var r=de("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return A.createElement(Kf,Sn({},t,{type:"linear",className:r}))},KF=(e,t,r)=>{if(A.isValidElement(e))return A.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),A.isValidElement(n)))return n;var i=de("recharts-pie-label-text",HF(e));return A.createElement(Bl,Sn({},t,{alignmentBaseline:"middle",className:i}),n)};function qF(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:o}=r;if(!n||!i||!t)return null;var s=Ar(r),l=Ue(i,!1),c=Ue(a,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,f=t.map((d,h)=>{var m=(d.startAngle+d.endAngle)/2,p=it(d.cx,d.cy,d.outerRadius+u,m),g=He(He(He(He({},s),d),{},{stroke:"none"},l),{},{index:h,textAnchor:BF(p.x,d.cx)},p),v=He(He(He(He({},s),d),{},{fill:"none",stroke:d.fill},c),{},{index:h,points:[it(d.cx,d.cy,d.outerRadius,m),p],key:"line"});return A.createElement(xt,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(h)},a&&UF(a,v),KF(i,g,$e(d,o)))});return A.createElement(xt,{className:"recharts-pie-labels"},f)}function YF(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?A.createElement(Vh,{label:i}):A.createElement(qF,{sectors:t,props:r,showLabels:n})}function GF(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=G(wn),{onMouseEnter:o,onClick:s,onMouseLeave:l}=i,c=np(i,MF),u=Zh(o,i.dataKey),f=Jh(l),d=Qh(s,i.dataKey);return t==null||t.length===0?null:A.createElement(A.Fragment,null,t.map((h,m)=>{if(h?.startAngle===0&&h?.endAngle===0&&t.length!==1)return null;var p=r&&String(m)===a,g=a?n:null,v=p?r:g,b=He(He({},h),{},{stroke:h.stroke,tabIndex:-1,[B0]:m,[z0]:i.dataKey});return A.createElement(xt,Sn({tabIndex:-1,className:"recharts-pie-sector"},gs(c,h,m),{onMouseEnter:u(h,m),onMouseLeave:f(h,m),onClick:d(h,m),key:"sector-".concat(h?.startAngle,"-").concat(h?.endAngle,"-").concat(h.midAngle,"-").concat(m)}),A.createElement(k_,Sn({option:v,isActive:p,shapeType:"sector"},b)))}))}function XF(e){var t,{pieSettings:r,displayedData:n,cells:i,offset:a}=e,{cornerRadius:o,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:f}=r,d=Math.abs(r.minAngle),h=VF(s,l),m=Math.abs(h),p=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,g=n.filter(O=>$e(O,c,0)!==0).length,v=(m>=360?g:g-1)*p,b=m-g*d-v,x=n.reduce((O,E)=>{var C=$e(E,c,0);return O+(X(C)?C:0)},0),S;if(x>0){var w;S=n.map((O,E)=>{var C=$e(O,c,0),M=$e(O,u,E),$=WF(r,a,O),j=(X(C)?C:0)/x,_,I=He(He({},O),i&&i[E]&&i[E].props);E?_=w.endAngle+pt(h)*p*(C!==0?1:0):_=s;var D=_+pt(h)*((C!==0?d:0)+j*b),L=(_+D)/2,W=($.innerRadius+$.outerRadius)/2,H=[{name:M,value:C,payload:I,dataKey:c,type:f}],te=it($.cx,$.cy,W,L);return w=He(He(He(He({},r.presentationProps),{},{percent:j,cornerRadius:o,name:M,tooltipPayload:H,midAngle:L,middleRadius:W,tooltipPosition:te},I),$),{},{value:C,startAngle:_,endAngle:D,payload:I,paddingAngle:pt(h)*p}),w})}return S}function ZF(e){var{showLabels:t,sectors:r,children:n}=e,i=k.useMemo(()=>!t||!r?[]:r.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[r,t]);return A.createElement($L,{value:t?i:void 0},n)}function JF(e){var{props:t,previousSectorsRef:r}=e,{sectors:n,isAnimationActive:i,animationBegin:a,animationDuration:o,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:f}=t,d=Ra(t,"recharts-pie-"),h=r.current,[m,p]=k.useState(!1),g=k.useCallback(()=>{typeof f=="function"&&f(),p(!1)},[f]),v=k.useCallback(()=>{typeof u=="function"&&u(),p(!0)},[u]);return A.createElement(ZF,{showLabels:!m,sectors:n},A.createElement($a,{animationId:d,begin:a,duration:o,isActive:i,easing:s,onAnimationStart:v,onAnimationEnd:g,key:d},b=>{var x=[],S=n&&n[0],w=S?.startAngle;return n?.forEach((O,E)=>{var C=h&&h[E],M=E>0?Ln(O,"paddingAngle",0):0;if(C){var $=Ye(C.endAngle-C.startAngle,O.endAngle-O.startAngle,b),j=He(He({},O),{},{startAngle:w+M,endAngle:w+$+M});x.push(j),w=j.endAngle}else{var{endAngle:_,startAngle:I}=O,D=Ye(0,_-I,b),L=He(He({},O),{},{startAngle:w+M,endAngle:w+D+M});x.push(L),w=L.endAngle}}),r.current=x,A.createElement(xt,null,A.createElement(GF,{sectors:x,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),A.createElement(YF,{showLabels:!m,sectors:n,props:t}),t.children)}var QF={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!dn.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function e6(e){var{id:t}=e,r=np(e,jF),{hide:n,className:i,rootTabIndex:a}=e,o=k.useMemo(()=>xu(e.children,kr),[e.children]),s=G(u=>QL(u,t,o)),l=k.useRef(null),c=de("recharts-pie",i);return n||s==null?(l.current=null,A.createElement(xt,{tabIndex:a,className:c})):A.createElement(A.Fragment,null,A.createElement(ep,{fn:FF,args:He(He({},e),{},{sectors:s})}),A.createElement(xt,{tabIndex:a,className:c},A.createElement(JF,{props:He(He({},r),{},{sectors:s}),previousSectorsRef:l})))}function lo(e){var t=_t(e,QF),{id:r}=t,n=np(t,DF),i=Ar(n);return A.createElement(rp,{id:r,type:"pie"},a=>A.createElement(A.Fragment,null,A.createElement(TF,{type:"pie",id:a,data:n.data,dataKey:n.dataKey,hide:n.hide,angleAxisId:0,radiusAxisId:0,name:n.name,nameKey:n.nameKey,tooltipType:n.tooltipType,legendType:n.legendType,fill:n.fill,cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,paddingAngle:n.paddingAngle,minAngle:n.minAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius,cornerRadius:n.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),A.createElement(LF,Sn({},n,{id:a})),A.createElement(e6,Sn({},n,{id:a}))))}lo.displayName="Pie";function I_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function $_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?I_(Object(r),!0).forEach(function(n){t6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function t6(e,t,r){return(t=r6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r6(e){var t=n6(e,"string");return typeof t=="symbol"?t:t+""}function n6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var i6={xAxis:{},yAxis:{},zAxis:{}},R_=qt({name:"cartesianAxis",initialState:i6,reducers:{addXAxis(e,t){e.xAxis[t.payload.id]=t.payload},removeXAxis(e,t){delete e.xAxis[t.payload.id]},addYAxis(e,t){e.yAxis[t.payload.id]=t.payload},removeYAxis(e,t){delete e.yAxis[t.payload.id]},addZAxis(e,t){e.zAxis[t.payload.id]=t.payload},removeZAxis(e,t){delete e.zAxis[t.payload.id]},updateYAxisWidth(e,t){var{id:r,width:n}=t.payload;e.yAxis[r]&&(e.yAxis[r]=$_($_({},e.yAxis[r]),{},{width:n}))}}}),{addXAxis:a6,removeXAxis:o6,addYAxis:s6,removeYAxis:l6,addZAxis:PU,removeZAxis:CU,updateYAxisWidth:c6}=R_.actions,u6=R_.reducer,f6=N([st],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),d6=N([f6,zr,Wr],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}}),ip=()=>G(d6),h6=()=>G(F$);function L_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function F_(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?L_(Object(r),!0).forEach(function(n){p6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):L_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function p6(e,t,r){return(t=m6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m6(e){var t=g6(e,"string");return typeof t=="symbol"?t:t+""}function g6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var v6=e=>{var{point:t,childIndex:r,mainColor:n,activeDot:i,dataKey:a}=e;if(i===!1||t.x==null||t.y==null)return null;var o=F_(F_({index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:n??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},Ue(i,!1)),yu(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,o):typeof i=="function"?s=i(o):s=A.createElement(p_,o),A.createElement(xt,{className:"recharts-active-dot"},s)};function y6(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i}=e,a=G(wn),o=h6();if(t==null||o==null)return null;var s=t.find(l=>o.includes(l.payload));return ze(s)?null:v6({point:s,childIndex:Number(a),mainColor:r,dataKey:i,activeDot:n})}var b6=process.env.NODE_ENV==="production",ap="Invariant failed";function B_(e,t){if(b6)throw new Error(ap);var r=typeof t=="function"?t():t,n=r?"".concat(ap,": ").concat(r):ap;throw new Error(n)}var x6=["x","y"];function op(){return op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},op.apply(null,arguments)}function z_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function co(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?z_(Object(r),!0).forEach(function(n){w6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):z_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function w6(e,t,r){return(t=_6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _6(e){var t=S6(e,"string");return typeof t=="symbol"?t:t+""}function S6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function O6(e,t){if(e==null)return{};var r,n,i=A6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function A6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function E6(e,t){var{x:r,y:n}=e,i=O6(e,x6),a="".concat(r),o=parseInt(a,10),s="".concat(n),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),f="".concat(t.width||i.width),d=parseInt(f,10);return co(co(co(co(co({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:d,name:t.name,radius:t.radius})}function sp(e){return A.createElement(k_,op({shapeType:"rectangle",propTransformer:E6,activeClassName:"recharts-active-bar"},e))}var P6=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(X(t))return t;var a=X(n)||ze(n);return a?t(n,i):(a||(process.env.NODE_ENV!=="production"?B_(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")):B_()),r)}},C6={},W_=qt({name:"errorBars",initialState:C6,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]||(e[r]=[]),e[r].push(n)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:n,next:i}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===n.dataKey&&a.direction===n.direction?i:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:n}=t.payload;e[r]&&(e[r]=e[r].filter(i=>i.dataKey!==n.dataKey||i.direction!==n.direction))}}}),{addErrorBar:kU,replaceErrorBar:TU,removeErrorBar:MU}=W_.actions,k6=W_.reducer,T6=["children"];function M6(e,t){if(e==null)return{};var r,n,i=j6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function j6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var D6={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},N6=k.createContext(D6);function V_(e){var{children:t}=e,r=M6(e,T6);return A.createElement(N6.Provider,{value:r},t)}function lp(e,t){var r,n,i=G(c=>Zr(c,e)),a=G(c=>Jr(c,t)),o=(r=i?.allowDataOverflow)!==null&&r!==void 0?r:Zt.allowDataOverflow,s=(n=a?.allowDataOverflow)!==null&&n!==void 0?n:Jt.allowDataOverflow,l=o||s;return{needClip:l,needClipX:o,needClipY:s}}function H_(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=ip(),{needClipX:a,needClipY:o,needClip:s}=lp(t,r);if(!s)return null;var{x:l,y:c,width:u,height:f}=i;return A.createElement("clipPath",{id:"clipPath-".concat(n)},A.createElement("rect",{x:a?l:l-u/2,y:o?c:c-f/2,width:a?u:u*2,height:o?f:f*2}))}var I6=["onMouseEnter","onMouseLeave","onClick"],$6=["value","background","tooltipPosition"],R6=["id"],L6=["onMouseEnter","onClick","onMouseLeave"];function On(){return On=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},On.apply(null,arguments)}function U_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Tt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?U_(Object(r),!0).forEach(function(n){F6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):U_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F6(e,t,r){return(t=B6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B6(e){var t=z6(e,"string");return typeof t=="symbol"?t:t+""}function z6(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ul(e,t){if(e==null)return{};var r,n,i=W6(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function W6(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var V6=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:ji(r,t),payload:e}]};function H6(e){var{dataKey:t,stroke:r,strokeWidth:n,fill:i,name:a,hide:o,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:r,strokeWidth:n,fill:i,dataKey:t,nameKey:void 0,name:ji(a,t),hide:o,type:e.tooltipType,color:e.fill,unit:s}}}function U6(e){var t=G(wn),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:l}=a,c=Ul(a,I6),u=Zh(o,n),f=Jh(s),d=Qh(l,n);if(!i||r==null)return null;var h=Ue(i,!1);return A.createElement(A.Fragment,null,r.map((m,p)=>{var{value:g,background:v,tooltipPosition:b}=m,x=Ul(m,$6);if(!v)return null;var S=u(m,p),w=f(m,p),O=d(m,p),E=Tt(Tt(Tt(Tt(Tt({option:i,isActive:String(p)===t},x),{},{fill:"#eee"},v),h),gs(c,m,p)),{},{onMouseEnter:S,onMouseLeave:w,onClick:O,dataKey:n,index:p,className:"recharts-bar-background-rectangle"});return A.createElement(sp,On({key:"background-bar-".concat(E.index)},E))}))}function K6(e){var{showLabels:t,children:r,rects:n}=e,i=n?.map(a=>{var o={x:a.x,y:a.y,width:a.width,height:a.height};return Tt(Tt({},o),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:o,fill:a.fill})});return A.createElement(d_,{value:t?i:void 0},r)}function q6(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:o}=e,s=G(wn),l=G(gw),c=r&&String(a)===s&&(l==null||o===l),u=c?r:t;return A.createElement(sp,On({},n,i,{isActive:c,option:u,index:a,dataKey:o}))}function Y6(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return A.createElement(sp,On({},r,n,{isActive:!1,option:t,index:i,dataKey:a}))}function G6(e){var{data:t,props:r}=e,n=Ar(r),{id:i}=n,a=Ul(n,R6),{shape:o,dataKey:s,activeBar:l}=r,{onMouseEnter:c,onClick:u,onMouseLeave:f}=r,d=Ul(r,L6),h=Zh(c,s),m=Jh(f),p=Qh(u,s);return t?A.createElement(A.Fragment,null,t.map((g,v)=>A.createElement(xt,On({className:"recharts-bar-rectangle"},gs(d,g,v),{onMouseEnter:h(g,v),onMouseLeave:m(g,v),onClick:p(g,v),key:"rectangle-".concat(g?.x,"-").concat(g?.y,"-").concat(g?.value,"-").concat(v)}),l?A.createElement(q6,{shape:o,activeBar:l,baseProps:a,entry:g,index:v,dataKey:s}):A.createElement(Y6,{shape:o,baseProps:a,entry:g,index:v,dataKey:s})))):null}function X6(e){var{props:t,previousRectanglesRef:r}=e,{data:n,layout:i,isAnimationActive:a,animationBegin:o,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,f=r.current,d=Ra(t,"recharts-bar-"),[h,m]=k.useState(!1),p=!h,g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),v=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return A.createElement(K6,{showLabels:p,rects:n},A.createElement($a,{animationId:d,begin:o,duration:s,isActive:a,easing:l,onAnimationEnd:g,onAnimationStart:v,key:d},b=>{var x=b===1?n:n?.map((S,w)=>{var O=f&&f[w];if(O)return Tt(Tt({},S),{},{x:Ye(O.x,S.x,b),y:Ye(O.y,S.y,b),width:Ye(O.width,S.width,b),height:Ye(O.height,S.height,b)});if(i==="horizontal"){var E=Ye(0,S.height,b);return Tt(Tt({},S),{},{y:S.y+S.height-E,height:E})}var C=Ye(0,S.width,b);return Tt(Tt({},S),{},{width:C})});return b>0&&(r.current=x??null),x==null?null:A.createElement(xt,null,A.createElement(G6,{props:t,data:x}))}),A.createElement(Vh,{label:t.label}),t.children)}function Z6(e){var t=k.useRef(null);return A.createElement(X6,{previousRectanglesRef:t,props:e})}var K_=0,J6=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:$e(e,t)}};class Q6 extends k.PureComponent{render(){var{hide:t,data:r,dataKey:n,className:i,xAxisId:a,yAxisId:o,needClip:s,background:l,id:c}=this.props;if(t||r==null)return null;var u=de("recharts-bar",i),f=c;return A.createElement(xt,{className:u,id:c},s&&A.createElement("defs",null,A.createElement(H_,{clipPathId:f,xAxisId:a,yAxisId:o})),A.createElement(xt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},A.createElement(U6,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),A.createElement(Z6,this.props)))}}var eB={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!dn.isSsr,legendType:"rect",minPointSize:K_,xAxisId:0,yAxisId:0};function tB(e){var{xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:f}=lp(t,r),d=Js(),h=Nt(),m=xu(e.children,kr),p=G(b=>kB(b,t,r,h,e.id,m));if(d!=="vertical"&&d!=="horizontal")return null;var g,v=p?.[0];return v==null||v.height==null||v.width==null?g=0:g=d==="vertical"?v.height/2:v.width/2,A.createElement(V_,{xAxisId:t,yAxisId:r,data:p,dataPointFormatter:J6,errorBarOffset:g},A.createElement(Q6,On({},e,{layout:d,needClip:f,data:p,xAxisId:t,yAxisId:r,hide:n,legendType:i,minPointSize:a,activeBar:o,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function rB(e){var{layout:t,barSettings:{dataKey:r,minPointSize:n},pos:i,bandSize:a,xAxis:o,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:f,offset:d,cells:h,parentViewBox:m}=e,p=t==="horizontal"?s:o,g=u?p.scale.domain():null,v=Cj({numericAxis:p});return f.map((b,x)=>{var S,w,O,E,C,M;u?S=_j(u[x],g):(S=$e(b,r),Array.isArray(S)||(S=[v,S]));var $=P6(n,K_)(S[1],x);if(t==="horizontal"){var j,[_,I]=[s.scale(S[0]),s.scale(S[1])];w=I0({axis:o,ticks:l,bandSize:a,offset:i.offset,entry:b,index:x}),O=(j=I??_)!==null&&j!==void 0?j:void 0,E=i.size;var D=_-I;if(C=Ut(D)?0:D,M={x:w,y:d.top,width:E,height:d.height},Math.abs($)>0&&Math.abs(C)<Math.abs($)){var L=pt(C||$)*(Math.abs($)-Math.abs(C));O-=L,C+=L}}else{var[W,H]=[o.scale(S[0]),o.scale(S[1])];if(w=W,O=I0({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:b,index:x}),E=H-W,C=i.size,M={x:d.left,y:O,width:d.width,height:C},Math.abs($)>0&&Math.abs(E)<Math.abs($)){var te=pt(E||$)*(Math.abs($)-Math.abs(E));E+=te}}if(w==null||O==null||E==null||C==null)return null;var Q=Tt(Tt({},b),{},{x:w,y:O,width:E,height:C,value:u?S:S[1],payload:b,background:M,tooltipPosition:{x:w+E/2,y:O+C/2},parentViewBox:m},h&&h[x]&&h[x].props);return Q}).filter(Boolean)}function nB(e){var t=_t(e,eB),r=Nt();return A.createElement(rp,{id:t.id,type:"bar"},n=>A.createElement(A.Fragment,null,A.createElement(M_,{legendPayload:V6(t)}),A.createElement(ep,{fn:H6,args:t}),A.createElement(D_,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:Pj(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),A.createElement(tB,On({},t,{id:n}))))}var q_=A.memo(nB);q_.displayName="Bar";function Y_(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Kl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Y_(Object(r),!0).forEach(function(n){iB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Y_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iB(e,t,r){return(t=aB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aB(e){var t=oB(e,"string");return typeof t=="symbol"?t:t+""}function oB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var sB=(e,t)=>t,lB=(e,t,r)=>r,cB=(e,t,r,n)=>n,uB=(e,t,r,n,i)=>i,uo=N([Tl,uB],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),fB=N([uo],e=>e?.maxBarSize),dB=(e,t,r,n,i,a)=>a,G_=(e,t,r)=>{var n=r??e;if(!ze(n))return At(n,t,0)},hB=N([ue,Tl,sB,lB,cB],(e,t,r,n,i)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===n).filter(a=>a.isPanorama===i).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),pB=(e,t,r,n)=>{var i=ue(e);return i==="horizontal"?ah(e,"yAxis",r,n):ah(e,"xAxis",t,n)},mB=(e,t,r)=>{var n=ue(e);return n==="horizontal"?H1(e,"xAxis",t):H1(e,"yAxis",r)},gB=(e,t,r)=>{var n={},i=e.filter(Cl),a=e.filter(c=>c.stackId==null),o=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),n),s=Object.entries(o).map(c=>{var[u,f]=c,d=f.map(m=>m.dataKey),h=G_(t,r,f[0].barSize);return{stackId:u,dataKeys:d,barSize:h}}),l=a.map(c=>{var u=[c.dataKey].filter(d=>d!=null),f=G_(t,r,c.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...s,...l]},vB=N([hB,YI,mB],gB),yB=(e,t,r,n,i)=>{var a,o,s=uo(e,t,r,n,i);if(s!=null){var l=ue(e),c=s1(e),{maxBarSize:u}=s,f=ze(u)?c:u,d,h;return l==="horizontal"?(d=bn(e,"xAxis",t,n),h=yn(e,"xAxis",t,n)):(d=bn(e,"yAxis",r,n),h=yn(e,"yAxis",r,n)),(a=(o=Ta(d,h,!0))!==null&&o!==void 0?o:f)!==null&&a!==void 0?a:0}},X_=(e,t,r,n)=>{var i=ue(e),a,o;return i==="horizontal"?(a=bn(e,"xAxis",t,n),o=yn(e,"xAxis",t,n)):(a=bn(e,"yAxis",r,n),o=yn(e,"yAxis",r,n)),Ta(a,o)};function bB(e,t,r,n,i){var a=n.length;if(!(a<1)){var o=At(e,r,0,!0),s,l=[];if(Yt(n[0].barSize)){var c=!1,u=r/a,f=n.reduce((v,b)=>v+(b.barSize||0),0);f+=(a-1)*o,f>=r&&(f-=(a-1)*o,o=0),f>=r&&u>0&&(c=!0,u*=.9,f=a*u);var d=(r-f)/2>>0,h={offset:d-o,size:0};s=n.reduce((v,b)=>{var x,S={stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:h.offset+h.size+o,size:c?u:(x=b.barSize)!==null&&x!==void 0?x:0}},w=[...v,S];return h=w[w.length-1].position,w},l)}else{var m=At(t,r,0,!0);r-2*m-(a-1)*o<=0&&(o=0);var p=(r-2*m-(a-1)*o)/a;p>1&&(p>>=0);var g=Yt(i)?Math.min(p,i):p;s=n.reduce((v,b,x)=>[...v,{stackId:b.stackId,dataKeys:b.dataKeys,position:{offset:m+(p+o)*x+(p-g)/2,size:g}}],l)}return s}}var xB=(e,t,r,n,i,a,o)=>{var s=ze(o)?t:o,l=bB(r,n,i!==a?i:a,e,s);return i!==a&&l!=null&&(l=l.map(c=>Kl(Kl({},c),{},{position:Kl(Kl({},c.position),{},{offset:c.position.offset-i/2})}))),l},wB=N([vB,s1,qI,l1,yB,X_,fB],xB),_B=(e,t,r,n)=>bn(e,"xAxis",t,n),SB=(e,t,r,n)=>bn(e,"yAxis",r,n),OB=(e,t,r,n)=>yn(e,"xAxis",t,n),AB=(e,t,r,n)=>yn(e,"yAxis",r,n),EB=N([wB,uo],(e,t)=>{if(!(e==null||t==null)){var r=e.find(n=>n.stackId===t.stackId&&t.dataKey!=null&&n.dataKeys.includes(t.dataKey));if(r!=null)return r.position}}),PB=(e,t)=>{var r=Xd(t);if(!(!e||r==null||t==null)){var{stackId:n}=t;if(n!=null){var i=e[n];if(i){var{stackedData:a}=i;if(a)return a.find(o=>o.key===r)}}}},CB=N([pB,uo],PB),kB=N([st,Bf,_B,SB,OB,AB,EB,ue,Sl,X_,CB,uo,dB],(e,t,r,n,i,a,o,s,l,c,u,f,d)=>{var{chartData:h,dataStartIndex:m,dataEndIndex:p}=l;if(!(f==null||o==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||n==null||i==null||a==null||c==null)){var{data:g}=f,v;if(g!=null&&g.length>0?v=g:v=h?.slice(m,p+1),v!=null)return rB({layout:s,barSettings:f,pos:o,parentViewBox:t,bandSize:c,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,stackedData:u,displayedData:v,offset:e,cells:d})}}),Z_=e=>{var{chartData:t}=e,r=Ze(),n=Nt();return k.useEffect(()=>n?()=>{}:(r(Tw(t)),()=>{r(Tw(void 0))}),[t,r,n]),null},J_={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},Q_=qt({name:"brush",initialState:J_,reducers:{setBrushSettings(e,t){return t.payload==null?J_:t.payload}}}),{setBrushSettings:jU}=Q_.actions,TB=Q_.reducer;function MB(e,t,r){return(t=jB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function jB(e){var t=DB(e,"string");return typeof t=="symbol"?t:t+""}function DB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class cp{static create(t){return new cp(t)}constructor(t){this.scale=t}get domain(){return this.scale.domain}get range(){return this.scale.range}get rangeMin(){return this.range()[0]}get rangeMax(){return this.range()[1]}get bandwidth(){return this.scale.bandwidth}apply(t){var{bandAware:r,position:n}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(n)switch(n){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var a=this.bandwidth?this.bandwidth():0;return this.scale(t)+a}default:return this.scale(t)}if(r){var o=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+o}return this.scale(t)}}isInRange(t){var r=this.range(),n=r[0],i=r[r.length-1];return n<=i?t>=n&&t<=i:t>=i&&t<=n}}MB(cp,"EPS",1e-4);function NB(e){return(e%180+180)%180}var IB=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=NB(i),o=a*Math.PI/180,s=Math.atan(n/r),l=o>s&&o<Math.PI-s?n/Math.sin(o):r/Math.cos(o);return Math.abs(l)},$B={dots:[],areas:[],lines:[]},e2=qt({name:"referenceElements",initialState:$B,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=Br(e).dots.findIndex(n=>n===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=Br(e).areas.findIndex(n=>n===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=Br(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:DU,removeDot:NU,addArea:IU,removeArea:$U,addLine:RU,removeLine:LU}=e2.actions,RB=e2.reducer,LB=k.createContext(void 0),FB=e=>{var{children:t}=e,[r]=k.useState("".concat(_a("recharts"),"-clip")),n=ip();if(n==null)return null;var{x:i,y:a,width:o,height:s}=n;return A.createElement(LB.Provider,{value:r},A.createElement("defs",null,A.createElement("clipPath",{id:r},A.createElement("rect",{x:i,y:a,height:s,width:o}))),t)};function Xi(e,t){for(var r in e)if({}.hasOwnProperty.call(e,r)&&(!{}.hasOwnProperty.call(t,r)||e[r]!==t[r]))return!1;for(var n in t)if({}.hasOwnProperty.call(t,n)&&!{}.hasOwnProperty.call(e,n))return!1;return!0}function t2(e,t,r){if(t<1)return[];if(t===1&&r===void 0)return e;for(var n=[],i=0;i<e.length;i+=t)n.push(e[i]);return n}function BB(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return IB(n,r)}function zB(e,t,r){var n=r==="width",{x:i,y:a,width:o,height:s}=e;return t===1?{start:n?i:a,end:n?i+o:a+s}:{start:n?i+o:a+s,end:n?i:a}}function ql(e,t,r,n,i){if(e*t<e*n||e*t>e*i)return!1;var a=r();return e*(t-e*a/2-n)>=0&&e*(t+e*a/2-i)<=0}function WB(e,t){return t2(e,t+1)}function VB(e,t,r,n,i){for(var a=(n||[]).slice(),{start:o,end:s}=t,l=0,c=1,u=o,f=function(){var m=n?.[l];if(m===void 0)return{v:t2(n,c)};var p=l,g,v=()=>(g===void 0&&(g=r(m,p)),g),b=m.coordinate,x=l===0||ql(e,b,v,u,s);x||(l=0,u=o,c+=1),x&&(u=b+e*(v()/2+i),l+=c)},d;c<=a.length;)if(d=f(),d)return d.v;return[]}function r2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Et(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?r2(Object(r),!0).forEach(function(n){HB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):r2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function HB(e,t,r){return(t=UB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UB(e){var t=KB(e,"string");return typeof t=="symbol"?t:t+""}function KB(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qB(e,t,r,n,i){for(var a=(n||[]).slice(),o=a.length,{start:s}=t,{end:l}=t,c=function(d){var h=a[d],m,p=()=>(m===void 0&&(m=r(h,d)),m);if(d===o-1){var g=e*(h.coordinate+e*p()/2-l);a[d]=h=Et(Et({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate})}else a[d]=h=Et(Et({},h),{},{tickCoord:h.coordinate});var v=ql(e,h.tickCoord,p,s,l);v&&(l=h.tickCoord-e*(p()/2+i),a[d]=Et(Et({},h),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return a}function YB(e,t,r,n,i,a){var o=(n||[]).slice(),s=o.length,{start:l,end:c}=t;if(a){var u=n[s-1],f=r(u,s-1),d=e*(u.coordinate+e*f/2-c);o[s-1]=u=Et(Et({},u),{},{tickCoord:d>0?u.coordinate-d*e:u.coordinate});var h=ql(e,u.tickCoord,()=>f,l,c);h&&(c=u.tickCoord-e*(f/2+i),o[s-1]=Et(Et({},u),{},{isShow:!0}))}for(var m=a?s-1:s,p=function(b){var x=o[b],S,w=()=>(S===void 0&&(S=r(x,b)),S);if(b===0){var O=e*(x.coordinate-e*w()/2-l);o[b]=x=Et(Et({},x),{},{tickCoord:O<0?x.coordinate-O*e:x.coordinate})}else o[b]=x=Et(Et({},x),{},{tickCoord:x.coordinate});var E=ql(e,x.tickCoord,w,l,c);E&&(l=x.tickCoord+e*(w()/2+i),o[b]=Et(Et({},x),{},{isShow:!0}))},g=0;g<m;g++)p(g);return o}function up(e,t,r){var{tick:n,ticks:i,viewBox:a,minTickGap:o,orientation:s,interval:l,tickFormatter:c,unit:u,angle:f}=e;if(!i||!i.length||!n)return[];if(X(l)||dn.isSsr){var d;return(d=WB(i,X(l)?l:0))!==null&&d!==void 0?d:[]}var h=[],m=s==="top"||s==="bottom"?"width":"height",p=u&&m==="width"?so(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=(x,S)=>{var w=typeof c=="function"?c(x.value,S):x.value;return m==="width"?BB(so(w,{fontSize:t,letterSpacing:r}),p,f):so(w,{fontSize:t,letterSpacing:r})[m]},v=i.length>=2?pt(i[1].coordinate-i[0].coordinate):1,b=zB(a,v,m);return l==="equidistantPreserveStart"?VB(v,b,g,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=YB(v,b,g,i,o,l==="preserveStartEnd"):h=qB(v,b,g,i,o),h.filter(x=>x.isShow))}var GB=e=>{var{ticks:t,label:r,labelGapWithTick:n=5,tickSize:i=0,tickMargin:a=0}=e,o=0;if(t){t.forEach(u=>{if(u){var f=u.getBoundingClientRect();f.width>o&&(o=f.width)}});var s=r?r.getBoundingClientRect().width:0,l=i+a,c=o+l+s+(r?n:0);return Math.round(c)}return 0},XB=["axisLine","width","height","className","hide","ticks"],ZB=["viewBox"],JB=["viewBox"];function fp(e,t){if(e==null)return{};var r,n,i=QB(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function QB(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function ai(){return ai=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ai.apply(null,arguments)}function n2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function ut(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?n2(Object(r),!0).forEach(function(n){e3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function e3(e,t,r){return(t=t3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function t3(e){var t=r3(e,"string");return typeof t=="symbol"?t:t+""}function r3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dp={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd"};function n3(e){var{x:t,y:r,width:n,height:i,orientation:a,mirror:o,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=ut(ut(ut({},l),Ue(s,!1)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!o||a==="bottom"&&o);c=ut(ut({},c),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var f=+(a==="left"&&!o||a==="right"&&o);c=ut(ut({},c),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return A.createElement("line",ai({},c,{className:de("recharts-cartesian-axis-line",Ln(s,"className"))}))}function i3(e,t,r,n,i,a,o,s,l){var c,u,f,d,h,m,p=s?-1:1,g=e.tickSize||o,v=X(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":c=u=e.coordinate,d=r+ +!s*i,f=d-p*g,m=f-p*l,h=v;break;case"left":f=d=e.coordinate,u=t+ +!s*n,c=u-p*g,h=c-p*l,m=v;break;case"right":f=d=e.coordinate,u=t+ +s*n,c=u+p*g,h=c+p*l,m=v;break;default:c=u=e.coordinate,d=r+ +s*i,f=d+p*g,m=f+p*l,h=v;break}return{line:{x1:c,y1:f,x2:u,y2:d},tick:{x:h,y:m}}}function a3(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function o3(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function s3(e){var{option:t,tickProps:r,value:n}=e,i,a=de(r.className,"recharts-cartesian-axis-tick-value");if(A.isValidElement(t))i=A.cloneElement(t,ut(ut({},r),{},{className:a}));else if(typeof t=="function")i=t(ut(ut({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=de(o,t?.className)),i=A.createElement(Bl,ai({},r,{className:o}),n)}return i}function l3(e){var{ticks:t=[],tick:r,tickLine:n,stroke:i,tickFormatter:a,unit:o,padding:s,tickTextProps:l,orientation:c,mirror:u,x:f,y:d,width:h,height:m,tickSize:p,tickMargin:g,fontSize:v,letterSpacing:b,getTicksConfig:x,events:S}=e,w=up(ut(ut({},x),{},{ticks:t}),v,b),O=a3(c,u),E=o3(c,u),C=Ar(x),M=Ue(r,!1),$=ut(ut({},C),{},{fill:"none"},Ue(n,!1)),j=w.map((_,I)=>{var{line:D,tick:L}=i3(_,f,d,h,m,c,p,u,g),W=ut(ut(ut(ut({textAnchor:O,verticalAnchor:E},C),{},{stroke:"none",fill:i},M),L),{},{index:I,payload:_,visibleTicksCount:w.length,tickFormatter:a,padding:s},l);return A.createElement(xt,ai({className:"recharts-cartesian-axis-tick",key:"tick-".concat(_.value,"-").concat(_.coordinate,"-").concat(_.tickCoord)},gs(S,_,I)),n&&A.createElement("line",ai({},$,D,{className:de("recharts-cartesian-axis-tick-line",Ln(n,"className"))})),r&&A.createElement(s3,{option:r,tickProps:W,value:"".concat(typeof a=="function"?a(_.value,I):_.value).concat(o||"")}))});return j.length>0?A.createElement("g",{className:"recharts-cartesian-axis-ticks"},j):null}var c3=k.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s}=e,l=fp(e,XB),[c,u]=k.useState(""),[f,d]=k.useState(""),h=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var p;return GB({ticks:h.current,label:(p=e.labelRef)===null||p===void 0?void 0:p.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(p=>{if(p){var g=p.getElementsByClassName("recharts-cartesian-axis-tick-value");h.current=Array.from(g);var v=g[0];if(v){var b=window.getComputedStyle(v),x=b.fontSize,S=b.letterSpacing;(x!==c||S!==f)&&(u(x),d(S))}}},[c,f]);return o||n!=null&&n<=0||i!=null&&i<=0?null:A.createElement(xt,{className:de("recharts-cartesian-axis",a),ref:m},A.createElement(n3,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Ar(e)}),A.createElement(l3,{ticks:s,tick:e.tick,tickLine:e.tickLine,stroke:e.stroke,tickFormatter:e.tickFormatter,unit:e.unit,padding:e.padding,tickTextProps:e.tickTextProps,orientation:e.orientation,mirror:e.mirror,x:e.x,y:e.y,width:e.width,height:e.height,tickSize:e.tickSize,tickMargin:e.tickMargin,fontSize:c,letterSpacing:f,getTicksConfig:e,events:l}),A.createElement(mL,{x:e.x,y:e.y,width:e.width,height:e.height},A.createElement(AL,{label:e.label}),e.children))}),u3=A.memo(c3,(e,t)=>{var{viewBox:r}=e,n=fp(e,ZB),{viewBox:i}=t,a=fp(t,JB);return Xi(r,i)&&Xi(n,a)}),hp=A.forwardRef((e,t)=>{var r=_t(e,dp);return A.createElement(u3,ai({},r,{ref:t}))});hp.displayName="CartesianAxis";var f3=["x1","y1","x2","y2","key"],d3=["offset"],h3=["xAxisId","yAxisId"],p3=["xAxisId","yAxisId"];function i2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?i2(Object(r),!0).forEach(function(n){m3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function m3(e,t,r){return(t=g3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function g3(e){var t=v3(e,"string");return typeof t=="symbol"?t:t+""}function v3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oi(){return oi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},oi.apply(null,arguments)}function Yl(e,t){if(e==null)return{};var r,n,i=y3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function y3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var b3=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:n,y:i,width:a,height:o,ry:s}=e;return A.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function a2(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var{x1:n,y1:i,x2:a,y2:o,key:s}=t,l=Yl(t,f3),c=Ar(l),{offset:u}=c,f=Yl(c,d3);r=A.createElement("line",oi({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function x3(e){var{x:t,width:r,horizontal:n=!0,horizontalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=Yl(e,h3),l=i.map((c,u)=>{var f=Pt(Pt({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return a2(n,f)});return A.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function w3(e){var{y:t,height:r,vertical:n=!0,verticalPoints:i}=e;if(!n||!i||!i.length)return null;var{xAxisId:a,yAxisId:o}=e,s=Yl(e,p3),l=i.map((c,u)=>{var f=Pt(Pt({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return a2(n,f)});return A.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function _3(e){var{horizontalFill:t,fillOpacity:r,x:n,y:i,width:a,height:o,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+o-f:c[d+1]-f;if(m<=0)return null;var p=d%t.length;return A.createElement("rect",{key:"react-".concat(d),y:f,x:n,height:m,width:a,stroke:"none",fill:t[p],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function S3(e){var{vertical:t=!0,verticalFill:r,fillOpacity:n,x:i,y:a,width:o,height:s,verticalPoints:l}=e;if(!t||!r||!r.length)return null;var c=l.map(f=>Math.round(f+i-i)).sort((f,d)=>f-d);i!==c[0]&&c.unshift(0);var u=c.map((f,d)=>{var h=!c[d+1],m=h?i+o-f:c[d+1]-f;if(m<=0)return null;var p=d%r.length;return A.createElement("rect",{key:"react-".concat(d),x:f,y:a,width:m,height:s,stroke:"none",fill:r[p],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return A.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var O3=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return M0(up(Pt(Pt(Pt({},dp),r),{},{ticks:j0(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},A3=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return M0(up(Pt(Pt(Pt({},dp),r),{},{ticks:j0(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},E3={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Gl(e){var t=H0(),r=U0(),n=V0(),i=Pt(Pt({},_t(e,E3)),{},{x:X(e.x)?e.x:n.left,y:X(e.y)?e.y:n.top,width:X(e.width)?e.width:n.width,height:X(e.height)?e.height:n.height}),{xAxisId:a,yAxisId:o,x:s,y:l,width:c,height:u,syncWithTicks:f,horizontalValues:d,verticalValues:h}=i,m=Nt(),p=G(M=>q1(M,"xAxis",a,m)),g=G(M=>q1(M,"yAxis",o,m));if(!X(c)||c<=0||!X(u)||u<=0||!X(s)||s!==+s||!X(l)||l!==+l)return null;var v=i.verticalCoordinatesGenerator||O3,b=i.horizontalCoordinatesGenerator||A3,{horizontalPoints:x,verticalPoints:S}=i;if((!x||!x.length)&&typeof b=="function"){var w=d&&d.length,O=b({yAxis:g?Pt(Pt({},g),{},{ticks:w?d:g.ticks}):void 0,width:t,height:r,offset:n},w?!0:f);oo(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(x=O)}if((!S||!S.length)&&typeof v=="function"){var E=h&&h.length,C=v({xAxis:p?Pt(Pt({},p),{},{ticks:E?h:p.ticks}):void 0,width:t,height:r,offset:n},E?!0:f);oo(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(S=C)}return A.createElement("g",{className:"recharts-cartesian-grid"},A.createElement(b3,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),A.createElement(_3,oi({},i,{horizontalPoints:x})),A.createElement(S3,oi({},i,{verticalPoints:S})),A.createElement(x3,oi({},i,{offset:n,horizontalPoints:x,xAxis:p,yAxis:g})),A.createElement(w3,oi({},i,{offset:n,verticalPoints:S,xAxis:p,yAxis:g})))}Gl.displayName="CartesianGrid";var o2=(e,t,r,n)=>bn(e,"xAxis",t,n),s2=(e,t,r,n)=>yn(e,"xAxis",t,n),l2=(e,t,r,n)=>bn(e,"yAxis",r,n),c2=(e,t,r,n)=>yn(e,"yAxis",r,n),P3=N([ue,o2,l2,s2,c2],(e,t,r,n,i)=>fn(e,"xAxis")?Ta(t,n,!1):Ta(r,i,!1)),C3=(e,t,r,n,i)=>i;function k3(e){return e.type==="line"}var T3=N([Tl,C3],(e,t)=>e.filter(k3).find(r=>r.id===t)),M3=N([ue,o2,l2,s2,c2,T3,P3,Sl],(e,t,r,n,i,a,o,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(a==null||t==null||r==null||n==null||i==null||n.length===0||i.length===0||o==null)){var{dataKey:f,data:d}=a,h;if(d!=null&&d.length>0?h=d:h=l?.slice(c,u+1),h!=null)return Q3({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:o,displayedData:h})}}),j3=["id"],D3=["type","layout","connectNulls","needClip"],N3=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function u2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function Qt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u2(Object(r),!0).forEach(function(n){I3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function I3(e,t,r){return(t=$3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function $3(e){var t=R3(e,"string");return typeof t=="symbol"?t:t+""}function R3(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pp(e,t){if(e==null)return{};var r,n,i=L3(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function L3(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},si.apply(null,arguments)}var F3=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:ji(r,t),payload:e}]};function B3(e){var{dataKey:t,data:r,stroke:n,strokeWidth:i,fill:a,name:o,hide:s,unit:l}=e;return{dataDefinedOnItem:r,positions:void 0,settings:{stroke:n,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:ji(o,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var f2=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function z3(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}var W3=(e,t,r)=>{var n=r.reduce((f,d)=>f+d);if(!n)return f2(t,e);for(var i=Math.floor(e/n),a=e%n,o=t-e,s=[],l=0,c=0;l<r.length;c+=r[l],++l)if(c+r[l]>a){s=[...r.slice(0,l),a-c];break}var u=s.length%2===0?[0,o]:[o];return[...z3(r,i),...s,...u].map(f=>"".concat(f,"px")).join(", ")};function V3(e,t){var r;if(A.isValidElement(e))r=A.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var n=de("recharts-line-dot",typeof e!="boolean"?e.className:"");r=A.createElement(p_,si({},t,{className:n}))}return r}function H3(e,t){return e==null?!1:t?!0:e.length===1}function U3(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n;if(!H3(r,i))return null;var{id:s}=n,l=pp(n,j3),c=cv(i),u=Ar(l),f=Ue(i,!0),d=r.map((m,p)=>{var g=Qt(Qt(Qt({key:"dot-".concat(p),r:3},u),f),{},{index:p,cx:m.x,cy:m.y,dataKey:a,value:m.value,payload:m.payload,points:r});return V3(i,g)}),h={clipPath:o?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return A.createElement(xt,si({className:"recharts-line-dots",key:"dots"},h),d)}function K3(e){var{showLabels:t,children:r,points:n}=e,i=k.useMemo(()=>n?.map(a=>{var o={x:a.x,y:a.y,width:0,height:0};return Qt(Qt({},o),{},{value:a.value,payload:a.payload,viewBox:o,parentViewBox:void 0,fill:void 0})}),[n]);return A.createElement(d_,{value:t?i:null},r)}function d2(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:l,needClip:c}=a,u=pp(a,D3),f=Qt(Qt({},Ue(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:n,type:o,layout:s,connectNulls:l,strokeDasharray:i??a.strokeDasharray});return A.createElement(A.Fragment,null,n?.length>1&&A.createElement(Kf,si({},f,{pathRef:r})),A.createElement(U3,{points:n,clipPathId:t,props:a}))}function q3(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function Y3(e){var{clipPathId:t,props:r,pathRef:n,previousPointsRef:i,longestAnimatedLengthRef:a}=e,{points:o,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:f,animateNewValues:d,width:h,height:m,onAnimationEnd:p,onAnimationStart:g}=r,v=i.current,b=Ra(r,"recharts-line-"),[x,S]=k.useState(!1),w=!x,O=k.useCallback(()=>{typeof p=="function"&&p(),S(!1)},[p]),E=k.useCallback(()=>{typeof g=="function"&&g(),S(!0)},[g]),C=q3(n.current),M=a.current;return A.createElement(K3,{points:o,showLabels:w},r.children,A.createElement($a,{animationId:b,begin:c,duration:u,isActive:l,easing:f,onAnimationEnd:O,onAnimationStart:E,key:b},$=>{var j=Ye(M,C+M,$),_=Math.min(j,C),I;if(l)if(s){var D="".concat(s).split(/[,\s]+/gim).map(H=>parseFloat(H));I=W3(_,C,D)}else I=f2(C,_);else I=s==null?void 0:String(s);if(v){var L=v.length/o.length,W=$===1?o:o.map((H,te)=>{var Q=Math.floor(te*L);if(v[Q]){var F=v[Q];return Qt(Qt({},H),{},{x:Ye(F.x,H.x,$),y:Ye(F.y,H.y,$)})}return d?Qt(Qt({},H),{},{x:Ye(h*2,H.x,$),y:Ye(m/2,H.y,$)}):Qt(Qt({},H),{},{x:H.x,y:H.y})});return i.current=W,A.createElement(d2,{props:r,points:W,clipPathId:t,pathRef:n,strokeDasharray:I})}return $>0&&C>0&&(i.current=o,a.current=_),A.createElement(d2,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:I})}),A.createElement(Vh,{label:r.label}))}function G3(e){var{clipPathId:t,props:r}=e,n=k.useRef(null),i=k.useRef(0),a=k.useRef(null);return A.createElement(Y3,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var X3=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:$e(e.payload,t)});class Z3 extends k.Component{render(){var t,{hide:r,dot:n,points:i,className:a,xAxisId:o,yAxisId:s,top:l,left:c,width:u,height:f,id:d,needClip:h}=this.props;if(r)return null;var m=de("recharts-line",a),p=d,{r:g=3,strokeWidth:v=2}=(t=Ue(n,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},b=cv(n),x=g*2+v;return A.createElement(A.Fragment,null,A.createElement(xt,{className:m},h&&A.createElement("defs",null,A.createElement(H_,{clipPathId:p,xAxisId:o,yAxisId:s}),!b&&A.createElement("clipPath",{id:"clipPath-dots-".concat(p)},A.createElement("rect",{x:c-x/2,y:l-x/2,width:u+x,height:f+x}))),A.createElement(V_,{xAxisId:o,yAxisId:s,data:i,dataPointFormatter:X3,errorBarOffset:0},A.createElement(G3,{props:this.props,clipPathId:p}))),A.createElement(y6,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var h2={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!dn.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function J3(e){var t=_t(e,h2),{activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:f,legendType:d,xAxisId:h,yAxisId:m,id:p}=t,g=pp(t,N3),{needClip:v}=lp(h,m),b=ip(),x=Js(),S=Nt(),w=G($=>M3($,h,m,S,p));if(x!=="horizontal"&&x!=="vertical"||w==null||b==null)return null;var{height:O,width:E,x:C,y:M}=b;return A.createElement(Z3,si({},g,{id:p,connectNulls:s,dot:l,activeDot:r,animateNewValues:n,animationBegin:i,animationDuration:a,animationEasing:o,isAnimationActive:u,hide:c,label:f,legendType:d,xAxisId:h,yAxisId:m,points:w,layout:x,height:O,width:E,left:C,top:M,needClip:v}))}function Q3(e){var{layout:t,xAxis:r,yAxis:n,xAxisTicks:i,yAxisTicks:a,dataKey:o,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var f=$e(c,o);if(t==="horizontal"){var d=N0({axis:r,ticks:i,bandSize:s,entry:c,index:u}),h=ze(f)?null:n.scale(f);return{x:d,y:h,value:f,payload:c}}var m=ze(f)?null:r.scale(f),p=N0({axis:n,ticks:a,bandSize:s,entry:c,index:u});return m==null||p==null?null:{x:m,y:p,value:f,payload:c}}).filter(Boolean)}function e8(e){var t=_t(e,h2),r=Nt();return A.createElement(rp,{id:t.id,type:"line"},n=>A.createElement(A.Fragment,null,A.createElement(M_,{legendPayload:F3(t)}),A.createElement(ep,{fn:B3,args:t}),A.createElement(D_,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),A.createElement(J3,si({},t,{id:n}))))}var fo=A.memo(e8);fo.displayName="Line";var t8=["dangerouslySetInnerHTML","ticks"],r8=["id"],n8=["domain"],i8=["domain"];function mp(){return mp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},mp.apply(null,arguments)}function Xl(e,t){if(e==null)return{};var r,n,i=a8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function a8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function o8(e){var t=Ze();return k.useEffect(()=>(t(a6(e)),()=>{t(o6(e))}),[e,t]),null}var s8=e=>{var{xAxisId:t,className:r}=e,n=G(Bf),i=Nt(),a="xAxis",o=G(g=>Ki(g,a,t,i)),s=G(g=>Y1(g,a,t,i)),l=G(g=>W1(g,t)),c=G(g=>F4(g,t)),u=G(g=>y1(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:f,ticks:d}=e,h=Xl(e,t8),{id:m}=u,p=Xl(u,r8);return A.createElement(hp,mp({},h,p,{scale:o,x:c.x,y:c.y,width:l.width,height:l.height,className:de("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:s}))},l8={allowDataOverflow:Zt.allowDataOverflow,allowDecimals:Zt.allowDecimals,allowDuplicatedCategory:Zt.allowDuplicatedCategory,height:Zt.height,hide:!1,mirror:Zt.mirror,orientation:Zt.orientation,padding:Zt.padding,reversed:Zt.reversed,scale:Zt.scale,tickCount:Zt.tickCount,type:Zt.type,xAxisId:0},c8=e=>{var t,r,n,i,a,o=_t(e,l8);return A.createElement(A.Fragment,null,A.createElement(o8,{interval:(t=o.interval)!==null&&t!==void 0?t:"preserveEnd",id:o.xAxisId,scale:o.scale,type:o.type,padding:o.padding,allowDataOverflow:o.allowDataOverflow,domain:o.domain,dataKey:o.dataKey,allowDuplicatedCategory:o.allowDuplicatedCategory,allowDecimals:o.allowDecimals,tickCount:o.tickCount,includeHidden:(r=o.includeHidden)!==null&&r!==void 0?r:!1,reversed:o.reversed,ticks:o.ticks,height:o.height,orientation:o.orientation,mirror:o.mirror,hide:o.hide,unit:o.unit,name:o.name,angle:(n=o.angle)!==null&&n!==void 0?n:0,minTickGap:(i=o.minTickGap)!==null&&i!==void 0?i:5,tick:(a=o.tick)!==null&&a!==void 0?a:!0,tickFormatter:o.tickFormatter}),A.createElement(s8,o))},u8=(e,t)=>{var{domain:r}=e,n=Xl(e,n8),{domain:i}=t,a=Xl(t,i8);return Xi(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Xi({domain:r},{domain:i}):!1},Zl=A.memo(c8,u8);Zl.displayName="XAxis";var f8=["dangerouslySetInnerHTML","ticks"],d8=["id"],h8=["domain"],p8=["domain"];function gp(){return gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},gp.apply(null,arguments)}function Jl(e,t){if(e==null)return{};var r,n,i=m8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function m8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function g8(e){var t=Ze();return k.useEffect(()=>(t(s6(e)),()=>{t(l6(e))}),[e,t]),null}var v8=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=k.useRef(null),o=k.useRef(null),s=G(Bf),l=Nt(),c=Ze(),u="yAxis",f=G(w=>Ki(w,u,t,l)),d=G(w=>V1(w,t)),h=G(w=>z4(w,t)),m=G(w=>Y1(w,u,t,l)),p=G(w=>b1(w,t));if(k.useLayoutEffect(()=>{if(!(n!=="auto"||!d||Lh(i)||k.isValidElement(i)||p==null)){var w=a.current;if(w){var O=w.getCalculatedWidth();Math.round(d.width)!==Math.round(O)&&c(c6({id:t,width:O}))}}},[m,d,c,i,t,n,p]),d==null||h==null||p==null)return null;var{dangerouslySetInnerHTML:g,ticks:v}=e,b=Jl(e,f8),{id:x}=p,S=Jl(p,d8);return A.createElement(hp,gp({},b,S,{ref:a,labelRef:o,scale:f,x:h.x,y:h.y,tickTextProps:n==="auto"?{width:void 0}:{width:n},width:d.width,height:d.height,className:de("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:m}))},y8={allowDataOverflow:Jt.allowDataOverflow,allowDecimals:Jt.allowDecimals,allowDuplicatedCategory:Jt.allowDuplicatedCategory,hide:!1,mirror:Jt.mirror,orientation:Jt.orientation,padding:Jt.padding,reversed:Jt.reversed,scale:Jt.scale,tickCount:Jt.tickCount,type:Jt.type,width:Jt.width,yAxisId:0},b8=e=>{var t,r,n,i,a,o=_t(e,y8);return A.createElement(A.Fragment,null,A.createElement(g8,{interval:(t=o.interval)!==null&&t!==void 0?t:"preserveEnd",id:o.yAxisId,scale:o.scale,type:o.type,domain:o.domain,allowDataOverflow:o.allowDataOverflow,dataKey:o.dataKey,allowDuplicatedCategory:o.allowDuplicatedCategory,allowDecimals:o.allowDecimals,tickCount:o.tickCount,padding:o.padding,includeHidden:(r=o.includeHidden)!==null&&r!==void 0?r:!1,reversed:o.reversed,ticks:o.ticks,width:o.width,orientation:o.orientation,mirror:o.mirror,hide:o.hide,unit:o.unit,name:o.name,angle:(n=o.angle)!==null&&n!==void 0?n:0,minTickGap:(i=o.minTickGap)!==null&&i!==void 0?i:5,tick:(a=o.tick)!==null&&a!==void 0?a:!0,tickFormatter:o.tickFormatter}),A.createElement(v8,o))},x8=(e,t)=>{var{domain:r}=e,n=Jl(e,h8),{domain:i}=t,a=Jl(t,p8);return Xi(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Xi({domain:r},{domain:i}):!1},Ql=A.memo(b8,x8);Ql.displayName="YAxis";var ec={exports:{}},vp={};/**
184
184
  * @license React
185
185
  * use-sync-external-store-with-selector.production.js
186
186
  *
@@ -188,7 +188,7 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
188
188
  *
189
189
  * This source code is licensed under the MIT license found in the
190
190
  * LICENSE file in the root directory of this source tree.
191
- */var pS;function w8(){if(pS)return vp;pS=1;var e=k;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;return vp.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},vp}var yp={};/**
191
+ */var p2;function w8(){if(p2)return vp;p2=1;var e=k;function t(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}var r=typeof Object.is=="function"?Object.is:t,n=e.useSyncExternalStore,i=e.useRef,a=e.useEffect,o=e.useMemo,s=e.useDebugValue;return vp.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},vp}var yp={};/**
192
192
  * @license React
193
193
  * use-sync-external-store-with-selector.development.js
194
194
  *
@@ -196,21 +196,21 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
196
196
  *
197
197
  * This source code is licensed under the MIT license found in the
198
198
  * LICENSE file in the root directory of this source tree.
199
- */var mS;function _8(){return mS||(mS=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,s=t.useDebugValue;yp.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),yp}var gS;function S8(){return gS||(gS=1,process.env.NODE_ENV==="production"?ec.exports=w8():ec.exports=_8()),ec.exports}S8();function O8(e){e()}function A8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){O8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var vS={notify(){},get:()=>[]};function E8(e,t){let r,n=vS,i=0,a=!1;function o(p){u();const g=n.subscribe(p);let v=!1;return()=>{v||(v=!0,g(),f())}}function s(){n.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return a}function u(){i++,r||(r=e.subscribe(l),n=A8())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=vS)}function d(){a||(a=!0,u())}function h(){a&&(a=!1,f())}const m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return m}var P8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",C8=P8(),k8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",T8=k8(),M8=()=>C8||T8?A.useLayoutEffect:A.useEffect,j8=M8(),D8=Symbol.for("react-redux-context"),N8=typeof globalThis<"u"?globalThis:{};function I8(){if(!A.createContext)return{};const e=N8[D8]??=new Map;let t=e.get(A.createContext);return t||(t=A.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(A.createContext,t)),t}var $8=I8();function R8(e){const{children:t,context:r,serverState:n,store:i}=e,a=A.useMemo(()=>{const l=E8(i),c={store:i,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),o=A.useMemo(()=>i.getState(),[i]);j8(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,o]);const s=r||$8;return A.createElement(s.Provider,{value:a},t)}var L8=R8,F8=(e,t)=>t,bp=N([F8,ue,p1,ct,dw,Qr,K4,st],Z4),xp=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},yS=ar("mouseClick"),bS=ka();bS.startListening({actionCreator:yS,effect:(e,t)=>{var r=e.payload,n=bp(t.getState(),xp(r));n?.activeIndex!=null&&t.dispatch(e4({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var wp=ar("mouseMove"),xS=ka();xS.startListening({actionCreator:wp,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=gh(n,n.tooltip.settings.shared),a=bp(n,xp(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(rw({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(tw()))}});var wS={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},_S=qt({name:"rootProps",initialState:wS,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:wS.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),B8=_S.reducer,{updateOptions:z8}=_S.actions,SS=qt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:W8}=SS.actions,V8=SS.reducer,OS=ar("keyDown"),AS=ar("focus"),_p=ka();_p.startListening({actionCreator:OS,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=Number(bh(i,Yi(r))),s=Qr(r);if(a==="Enter"){var l=Ll(r,"axis","hover",String(i.index));t.dispatch(yh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=U$(r),u=c==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,d=o+f*u;if(!(s==null||d>=s.length||d<0)){var h=Ll(r,"axis","hover",String(d));t.dispatch(yh({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}}),_p.startListening({actionCreator:AS,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=Ll(r,"axis","hover",String(a));t.dispatch(yh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var ur=ar("externalEvent"),ES=ka();ES.startListening({actionCreator:ur,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:$4(r),activeDataKey:gw(r),activeIndex:wn(r),activeLabel:mw(r),activeTooltipIndex:wn(r),isTooltipActive:R4(r)};e.payload.handler(n,e.payload.reactEvent)}}});var H8=N([qi],e=>e.tooltipItemPayloads),U8=N([H8,no,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(s=>s.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var o=t(a,r);return o}}}),PS=ar("touchMove"),CS=ka();CS.startListening({actionCreator:PS,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=gh(n,n.tooltip.settings.shared);if(i==="axis"){var a=bp(n,xp({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(rw({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var o,s=r.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(B0),u=(o=l.getAttribute(z0))!==null&&o!==void 0?o:void 0,f=U8(t.getState(),c,u);t.dispatch(ew({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var K8=Vy({brush:TB,cartesianAxis:u6,chartData:hR,errorBars:k6,graphicalItems:kF,layout:oj,legend:Yj,options:lR,polarAxis:KL,polarOptions:V8,referenceElements:RB,rootProps:B8,tooltip:t4}),q8=function(t){return MM({reducer:K8,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([bS.middleware,xS.middleware,_p.middleware,ES.middleware,CS.middleware]),devTools:dn.devToolsEnabled})};function kS(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Nt(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=q8(t));var o=pf;return A.createElement(L8,{context:o,store:a.current},r)}function TS(e){var{layout:t,width:r,height:n,margin:i}=e,a=Ze(),o=Nt();return k.useEffect(()=>{o||(a(nj(t)),a(ij({width:r,height:n})),a(rj(i)))},[a,o,t,r,n,i]),null}function MS(e){var t=Ze();return k.useEffect(()=>{t(z8(e))},[t,e]),null}var Y8=["children"];function G8(e,t){if(e==null)return{};var r,n,i=X8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function X8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tc.apply(null,arguments)}var Z8={width:"100%",height:"100%"},J8=k.forwardRef((e,t)=>{var r=H0(),n=U0(),i=J0();if(!Di(r)||!Di(n))return null;var{children:a,otherAttributes:o,title:s,desc:l}=e,c,u;return typeof o.tabIndex=="number"?c=o.tabIndex:c=i?0:void 0,typeof o.role=="string"?u=o.role:u=i?"application":void 0,A.createElement(uv,tc({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:Z8,ref:t}),a)}),Q8=e=>{var{children:t}=e,r=G(Zs);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return A.createElement(uv,{width:n,height:i,x:o,y:a},t)},jS=k.forwardRef((e,t)=>{var{children:r}=e,n=G8(e,Y8),i=Nt();return i?A.createElement(Q8,null,r):A.createElement(J8,tc({ref:t},n),r)});function ez(){var e=Ze(),[t,r]=k.useState(null),n=G(Ij);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Yt(a)&&a!==n&&e(aj(a))}},[t,e,n]),r}function DS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?DS(Object(r),!0).forEach(function(n){rz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):DS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rz(e,t,r){return(t=nz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nz(e){var t=iz(e,"string");return typeof t=="symbol"?t:t+""}function iz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var az=k.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:p,style:g,width:v}=e,b=Ze(),[x,S]=k.useState(null),[w,O]=k.useState(null);_R();var E=ez(),C=k.useCallback(V=>{E(V),typeof t=="function"&&t(V),S(V),O(V)},[E,t,S,O]),M=k.useCallback(V=>{b(yS(V)),b(ur({handler:a,reactEvent:V}))},[b,a]),$=k.useCallback(V=>{b(wp(V)),b(ur({handler:c,reactEvent:V}))},[b,c]),j=k.useCallback(V=>{b(tw()),b(ur({handler:u,reactEvent:V}))},[b,u]),_=k.useCallback(V=>{b(wp(V)),b(ur({handler:f,reactEvent:V}))},[b,f]),I=k.useCallback(()=>{b(AS())},[b]),D=k.useCallback(V=>{b(OS(V.key))},[b]),L=k.useCallback(V=>{b(ur({handler:o,reactEvent:V}))},[b,o]),W=k.useCallback(V=>{b(ur({handler:s,reactEvent:V}))},[b,s]),H=k.useCallback(V=>{b(ur({handler:l,reactEvent:V}))},[b,l]),te=k.useCallback(V=>{b(ur({handler:d,reactEvent:V}))},[b,d]),Q=k.useCallback(V=>{b(ur({handler:p,reactEvent:V}))},[b,p]),F=k.useCallback(V=>{b(PS(V)),b(ur({handler:m,reactEvent:V}))},[b,m]),U=k.useCallback(V=>{b(ur({handler:h,reactEvent:V}))},[b,h]);return A.createElement(Aw.Provider,{value:x},A.createElement(ck.Provider,{value:w},A.createElement("div",{className:de("recharts-wrapper",n),style:tz({position:"relative",cursor:"default",width:v,height:i},g),onClick:M,onContextMenu:L,onDoubleClick:W,onFocus:I,onKeyDown:D,onMouseDown:H,onMouseEnter:$,onMouseLeave:j,onMouseMove:_,onMouseUp:te,onTouchEnd:U,onTouchMove:F,onTouchStart:Q,ref:C},r)))}),oz=["children","className","width","height","style","compact","title","desc"];function sz(e,t){if(e==null)return{};var r,n,i=lz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var NS=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=sz(e,oz),f=Ar(u);return s?A.createElement(jS,{otherAttributes:f,title:l,desc:c},r):A.createElement(az,{className:n,style:o,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},A.createElement(jS,{otherAttributes:f,title:l,desc:c,ref:t},A.createElement(FB,null,r)))}),cz=["width","height"];function Sp(){return Sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sp.apply(null,arguments)}function uz(e,t){if(e==null)return{};var r,n,i=fz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var dz={top:5,right:5,bottom:5,left:5},hz={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:dz,reverseStackOrder:!1,syncMethod:"index"},IS=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,hz),{width:a,height:o}=i,s=uz(i,cz);if(!Di(a)||!Di(o))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=t,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return A.createElement(kS,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},A.createElement(Z_,{chartData:d.data}),A.createElement(TS,{width:a,height:o,layout:i.layout,margin:i.margin}),A.createElement(MS,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(NS,Sp({},s,{width:a,height:o,ref:r})))}),pz=["axis"],$S=k.forwardRef((e,t)=>A.createElement(IS,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:pz,tooltipPayloadSearcher:Th,categoricalChartProps:e,ref:t})),mz=["axis","item"],gz=k.forwardRef((e,t)=>A.createElement(IS,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:mz,tooltipPayloadSearcher:Th,categoricalChartProps:e,ref:t}));function vz(e){var t=Ze();return k.useEffect(()=>{t(W8(e))},[t,e]),null}var yz=["width","height","layout"];function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Op.apply(null,arguments)}function bz(e,t){if(e==null)return{};var r,n,i=xz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var wz={top:5,right:5,bottom:5,left:5},_z={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:wz,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},Sz=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,_z),{width:a,height:o,layout:s}=i,l=bz(i,yz);if(!Di(a)||!Di(o))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=t,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return A.createElement(kS,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},A.createElement(Z_,{chartData:i.data}),A.createElement(TS,{width:a,height:o,layout:s,margin:i.margin}),A.createElement(MS,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(vz,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),A.createElement(NS,Op({width:a,height:o},l,{ref:r})))}),Oz=["item"],Az={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},rc=k.forwardRef((e,t)=>{var r=_t(e,Az);return A.createElement(Sz,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Oz,tooltipPayloadSearcher:Th,categoricalChartProps:r,ref:t})});function Ez({isStatic:e,data:t}){const r=({value:u})=>{const f=u>=0;return y.jsx("div",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${f?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:f?`+${u}%`:`${u}%`})},n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),i=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),a=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),s=[{name:"Move-ins",value:n},{name:"Move-outs",value:i}],l={purple:"#8B5CF6",indigo:"#6366F1"},c=({active:u,payload:f})=>!u||!f||!f.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:f.map((d,h)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:d.color,marginRight:6}}),d.name,": ",y.jsx("div",{className:"font-semibold",children:d.value})]},h))});return y.jsx(me,{title:"Community",period:"This Month",icon:y.jsx(su,{className:"text-2xl text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),y.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+i})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1 flex items-center",children:[y.jsx(r,{value:((a+o)/2).toFixed(2)}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),y.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsxs(lo,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[y.jsx(kr,{fill:l.purple}),y.jsx(kr,{fill:l.indigo})]}),y.jsx(ni,{content:y.jsx(c,{})})]})})})]})})}function Pz({isStatic:e,data:t}){const r=[{name:"Notice",value:Number(t?.total_notices||0)},{name:"Post",value:Number(t?.total_topics||0)},{name:"Poll",value:Number(t?.total_polls||0)},{name:"Survey",value:Number(t?.total_surveys||0)}],n={Notice:"#8B5CF6",Post:"#22C55E",Poll:"#3B82F6",Survey:"#F59E0B"},i=({active:a,payload:o,label:s})=>!a||!o||!o.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[s&&y.jsx("div",{className:"font-medium mb-1",children:s}),o.map((l,c)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:l.color,marginRight:6}}),l.name,": ",y.jsx("div",{className:"font-semibold",children:l.value})]},c))]});return y.jsx(me,{title:"Engagement",period:"This Month",icon:y.jsx(zg,{className:"text-2xl text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(gz,{data:r,layout:"vertical",margin:{top:4,right:8,left:8,bottom:0},children:[y.jsx(Gl,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),y.jsx(Ql,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Zl,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),y.jsx(ni,{content:y.jsx(i,{}),cursor:{fill:"transparent"}}),y.jsx(q_,{dataKey:"value",barSize:40,isAnimationActive:!1,children:r.map(a=>y.jsx(kr,{fill:n[a.name]},a.name))})]})})})}function Cz(e){if(!e)return 0;const[t,r]=e.split(" ");let[n,i]=t.split(":").map(Number);return r==="PM"&&n!==12&&(n+=12),r==="AM"&&n===12&&(n=0),n*60+i}function kz(e){let t=Math.floor(e/60);const r=t>=12?"PM":"AM";return t=t%12||12,`${t} ${r}`}function Tz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Cz(i.slot_start_time),o=Math.floor(a/240)*240,s=o+240,l=`${o}-${s}`;r[l]||(r[l]={time:kz(s),bookings:0,total:0}),r[l].bookings+=Number(i?.slot_bookings||0),r[l].total+=Number(i?.total_slots||0)}return Object.values(r)}function Mz({isStatic:e,data:t}){const r=Number(t?.totalBookings||0),n=Number(t?.totalSlots||0),i=Number(t?.utilizationRate||0),a=k.useMemo(()=>t?.slots?.length?Tz(t.slots):[],[t]),o=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("div",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("div",{className:"font-semibold",children:f.value})]},d))]}),s=a.length>0?Math.max(...a.map(l=>l.total),5):5;return y.jsxs(me,{title:"Facilities",period:"Today",icon:y.jsx(Bg,{className:"text-2xl text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[y.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-4",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Bookings"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#8B5CF6]",children:r})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Total Slots"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#F59E0B]",children:n})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Utilisation Rate"}),y.jsxs("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium !text-[#329DFF]",children:[Number.isFinite(i)?i.toFixed(2):"0.00","%"]})]})]}),y.jsx("div",{className:"w-full h-[150px]",children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs($S,{data:a,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(Ql,{yAxisId:"left",domain:[0,s],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(ni,{content:y.jsx(o,{})}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"total",name:"Total Slots",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})}function jz({data:e}){console.log(e,"financial");const t=e?.incomeSummary||{},r=e?.expenditureSummary||{};function n(i){if(i==null||isNaN(i))return"0";const a=Number(i);return a>=1e9?(a/1e9).toFixed(a%1e9===0?0:2)+"B":a>=1e6?(a/1e6).toFixed(a%1e6===0?0:2)+"M":a>=1e3?(a/1e3).toFixed(a%1e3===0?0:2)+"K":a.toFixed(a%1===0?0:2)}return y.jsx(me,{title:"Income",period:"This Month",icon:y.jsx(Wg,{className:"!text-[24px] text-green-600"}),className:"!gap-4 break-inside-avoid h-[232px] overflow-hidden",children:y.jsxs("div",{children:[y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Income"}),y.jsx("div",{children:"Collection"}),y.jsx("div",{children:"Closing"})]}),y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[y.jsxs("div",{children:[n(t.opening_balance)," AED"]}),y.jsxs("div",{children:[n(t.income)," AED"]}),y.jsxs("div",{children:[n(t.collection)," AED"]}),y.jsxs("div",{children:[n(t.closing_balance)," AED"]})]}),y.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Wg,{className:"text-2xl text-red-600"}),y.jsx("div",{style:{fontWeight:500,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]}),y.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:"This Month"})]}),y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Expenditure"}),y.jsx("div",{children:"Payment"}),y.jsx("div",{children:"Outstanding"})]}),y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[y.jsxs("div",{children:[n(r.opening_balance)," AED"]}),y.jsxs("div",{children:[n(r.expenditure)," AED"]}),y.jsxs("div",{children:[n(r.payment)," AED"]}),y.jsxs("div",{children:[n(r.outstanding)," AED"]})]})]})})}function Dz(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function Nz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Number(i.hour??0),s=Math.floor(a/4)*4+4,l=s;r[l]||(r[l]={time:Dz(s),walkins:0,checkins:0}),r[l].walkins+=Number(i.walkins??0),r[l].checkins+=Number(i.preApproved??0)}return Object.values(r)}function Iz({isStatic:e,data:t}){const r={green:"#12B981",amber:"#F69E0A"},n=t?.summary?.activeWalkins||{},i=t?.summary?.preApprovedCheckins||{},a=t?.summary?.staffAttendance||{},o=t?.chart?.length>0?Nz(t.chart):[],s=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("div",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("div",{className:"font-semibold",children:f.value})]},d))]});return y.jsx(me,{title:"Gate Updates",period:"Today",icon:y.jsx(Hg,{className:"text-2xl text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-2 text-sm mb-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Active Walk-ins"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[a.total_in_now??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",a.total_in_today??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Pre-approved Check-ins"}),y.jsxs("div",{className:"!m-0 text-[28px] leading-[32px] font-medium text-[#E7A015] flex",children:[i.expected_pass_scanned??0,y.jsxs("div",{className:"text-[20px] leading-[32px] text-[#64748B]",children:["/",i.total_expected_pass??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Staff Attendance"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[n.visitor_in??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",n.total_pass??0]})]})]})]}),y.jsx(ii,{width:"100%",height:"60%",children:y.jsxs($S,{data:o,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Ql,{yAxisId:"left",domain:[0,30],ticks:[0,10,20,30],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1,width:25}),y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),y.jsx(ni,{content:y.jsx(s,{})}),y.jsx(fo,{type:"monotone",dataKey:"walkins",stroke:r.green,strokeWidth:2,dot:!1,name:"Walk-ins"}),y.jsx(fo,{type:"monotone",dataKey:"checkins",stroke:r.amber,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"})]})})]})})}function $z({isStatic:e,data:t}){const r=({value:c})=>{if(c==null||isNaN(c))return null;const u=c>=0;return y.jsx("div",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${u?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:u?`+${c}%`:`${c}%`})},n=[{name:"L1",value:Number(t?.today_L1||0)},{name:"L2",value:Number(t?.today_L2||0)},{name:"L3",value:Number(t?.today_L3||0)},{name:"No Level",value:Number(t?.today_NoLevel||0)}],a=n.reduce((c,u)=>c+u.value,0)===0?[{name:"No Data",value:1}]:n,o=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],s=({color:c})=>y.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:c,marginRight:"6px"}}),l=({active:c,payload:u})=>!c||!u||!u.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:u.map((f,d)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx(s,{color:f.color}),f.name,": ",y.jsx("div",{className:"font-semibold",children:f.value})]},d))});return y.jsx(me,{title:"Helpdesk",period:"Today",icon:y.jsx(UC,{className:"text-2xl text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex gap-3 h-fit",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Open Complaints"}),y.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1",children:[y.jsx(r,{value:t?.percent_change}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),y.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:a,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:a.map((c,u)=>y.jsx(kr,{fill:o[u]||"#CBD5E1"},c.name))}),y.jsx(ni,{content:y.jsx(l,{})})]})})})]})})}/*!
199
+ */var m2;function _8(){return m2||(m2=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,s=t.useDebugValue;yp.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),yp}var g2;function S8(){return g2||(g2=1,process.env.NODE_ENV==="production"?ec.exports=w8():ec.exports=_8()),ec.exports}S8();function O8(e){e()}function A8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){O8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var v2={notify(){},get:()=>[]};function E8(e,t){let r,n=v2,i=0,a=!1;function o(p){u();const g=n.subscribe(p);let v=!1;return()=>{v||(v=!0,g(),f())}}function s(){n.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return a}function u(){i++,r||(r=e.subscribe(l),n=A8())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=v2)}function d(){a||(a=!0,u())}function h(){a&&(a=!1,f())}const m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return m}var P8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",C8=P8(),k8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",T8=k8(),M8=()=>C8||T8?A.useLayoutEffect:A.useEffect,j8=M8(),D8=Symbol.for("react-redux-context"),N8=typeof globalThis<"u"?globalThis:{};function I8(){if(!A.createContext)return{};const e=N8[D8]??=new Map;let t=e.get(A.createContext);return t||(t=A.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(A.createContext,t)),t}var $8=I8();function R8(e){const{children:t,context:r,serverState:n,store:i}=e,a=A.useMemo(()=>{const l=E8(i),c={store:i,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),o=A.useMemo(()=>i.getState(),[i]);j8(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,o]);const s=r||$8;return A.createElement(s.Provider,{value:a},t)}var L8=R8,F8=(e,t)=>t,bp=N([F8,ue,p1,ct,dw,Qr,K$,st],Z$),xp=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},y2=ar("mouseClick"),b2=ka();b2.startListening({actionCreator:y2,effect:(e,t)=>{var r=e.payload,n=bp(t.getState(),xp(r));n?.activeIndex!=null&&t.dispatch(e$({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var wp=ar("mouseMove"),x2=ka();x2.startListening({actionCreator:wp,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=gh(n,n.tooltip.settings.shared),a=bp(n,xp(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(rw({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(tw()))}});var w2={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},_2=qt({name:"rootProps",initialState:w2,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:w2.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className}}}),B8=_2.reducer,{updateOptions:z8}=_2.actions,S2=qt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:W8}=S2.actions,V8=S2.reducer,O2=ar("keyDown"),A2=ar("focus"),_p=ka();_p.startListening({actionCreator:O2,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=Number(bh(i,Yi(r))),s=Qr(r);if(a==="Enter"){var l=Ll(r,"axis","hover",String(i.index));t.dispatch(yh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=U4(r),u=c==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,d=o+f*u;if(!(s==null||d>=s.length||d<0)){var h=Ll(r,"axis","hover",String(d));t.dispatch(yh({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}}),_p.startListening({actionCreator:A2,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=Ll(r,"axis","hover",String(a));t.dispatch(yh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var ur=ar("externalEvent"),E2=ka();E2.startListening({actionCreator:ur,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:$$(r),activeDataKey:gw(r),activeIndex:wn(r),activeLabel:mw(r),activeTooltipIndex:wn(r),isTooltipActive:R$(r)};e.payload.handler(n,e.payload.reactEvent)}}});var H8=N([qi],e=>e.tooltipItemPayloads),U8=N([H8,no,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(s=>s.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var o=t(a,r);return o}}}),P2=ar("touchMove"),C2=ka();C2.startListening({actionCreator:P2,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=gh(n,n.tooltip.settings.shared);if(i==="axis"){var a=bp(n,xp({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(rw({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var o,s=r.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(B0),u=(o=l.getAttribute(z0))!==null&&o!==void 0?o:void 0,f=U8(t.getState(),c,u);t.dispatch(ew({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var K8=Vy({brush:TB,cartesianAxis:u6,chartData:hR,errorBars:k6,graphicalItems:kF,layout:oj,legend:Yj,options:lR,polarAxis:KL,polarOptions:V8,referenceElements:RB,rootProps:B8,tooltip:t$}),q8=function(t){return MM({reducer:K8,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([b2.middleware,x2.middleware,_p.middleware,E2.middleware,C2.middleware]),devTools:dn.devToolsEnabled})};function k2(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Nt(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=q8(t));var o=pf;return A.createElement(L8,{context:o,store:a.current},r)}function T2(e){var{layout:t,width:r,height:n,margin:i}=e,a=Ze(),o=Nt();return k.useEffect(()=>{o||(a(nj(t)),a(ij({width:r,height:n})),a(rj(i)))},[a,o,t,r,n,i]),null}function M2(e){var t=Ze();return k.useEffect(()=>{t(z8(e))},[t,e]),null}var Y8=["children"];function G8(e,t){if(e==null)return{};var r,n,i=X8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function X8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tc.apply(null,arguments)}var Z8={width:"100%",height:"100%"},J8=k.forwardRef((e,t)=>{var r=H0(),n=U0(),i=J0();if(!Di(r)||!Di(n))return null;var{children:a,otherAttributes:o,title:s,desc:l}=e,c,u;return typeof o.tabIndex=="number"?c=o.tabIndex:c=i?0:void 0,typeof o.role=="string"?u=o.role:u=i?"application":void 0,A.createElement(uv,tc({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:Z8,ref:t}),a)}),Q8=e=>{var{children:t}=e,r=G(Zs);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return A.createElement(uv,{width:n,height:i,x:o,y:a},t)},j2=k.forwardRef((e,t)=>{var{children:r}=e,n=G8(e,Y8),i=Nt();return i?A.createElement(Q8,null,r):A.createElement(J8,tc({ref:t},n),r)});function ez(){var e=Ze(),[t,r]=k.useState(null),n=G(Ij);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Yt(a)&&a!==n&&e(aj(a))}},[t,e,n]),r}function D2(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function tz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?D2(Object(r),!0).forEach(function(n){rz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):D2(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function rz(e,t,r){return(t=nz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function nz(e){var t=iz(e,"string");return typeof t=="symbol"?t:t+""}function iz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var az=k.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:p,style:g,width:v}=e,b=Ze(),[x,S]=k.useState(null),[w,O]=k.useState(null);_R();var E=ez(),C=k.useCallback(V=>{E(V),typeof t=="function"&&t(V),S(V),O(V)},[E,t,S,O]),M=k.useCallback(V=>{b(y2(V)),b(ur({handler:a,reactEvent:V}))},[b,a]),$=k.useCallback(V=>{b(wp(V)),b(ur({handler:c,reactEvent:V}))},[b,c]),j=k.useCallback(V=>{b(tw()),b(ur({handler:u,reactEvent:V}))},[b,u]),_=k.useCallback(V=>{b(wp(V)),b(ur({handler:f,reactEvent:V}))},[b,f]),I=k.useCallback(()=>{b(A2())},[b]),D=k.useCallback(V=>{b(O2(V.key))},[b]),L=k.useCallback(V=>{b(ur({handler:o,reactEvent:V}))},[b,o]),W=k.useCallback(V=>{b(ur({handler:s,reactEvent:V}))},[b,s]),H=k.useCallback(V=>{b(ur({handler:l,reactEvent:V}))},[b,l]),te=k.useCallback(V=>{b(ur({handler:d,reactEvent:V}))},[b,d]),Q=k.useCallback(V=>{b(ur({handler:p,reactEvent:V}))},[b,p]),F=k.useCallback(V=>{b(P2(V)),b(ur({handler:m,reactEvent:V}))},[b,m]),U=k.useCallback(V=>{b(ur({handler:h,reactEvent:V}))},[b,h]);return A.createElement(Aw.Provider,{value:x},A.createElement(ck.Provider,{value:w},A.createElement("div",{className:de("recharts-wrapper",n),style:tz({position:"relative",cursor:"default",width:v,height:i},g),onClick:M,onContextMenu:L,onDoubleClick:W,onFocus:I,onKeyDown:D,onMouseDown:H,onMouseEnter:$,onMouseLeave:j,onMouseMove:_,onMouseUp:te,onTouchEnd:U,onTouchMove:F,onTouchStart:Q,ref:C},r)))}),oz=["children","className","width","height","style","compact","title","desc"];function sz(e,t){if(e==null)return{};var r,n,i=lz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function lz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var N2=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=sz(e,oz),f=Ar(u);return s?A.createElement(j2,{otherAttributes:f,title:l,desc:c},r):A.createElement(az,{className:n,style:o,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},A.createElement(j2,{otherAttributes:f,title:l,desc:c,ref:t},A.createElement(FB,null,r)))}),cz=["width","height"];function Sp(){return Sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sp.apply(null,arguments)}function uz(e,t){if(e==null)return{};var r,n,i=fz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function fz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var dz={top:5,right:5,bottom:5,left:5},hz={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:dz,reverseStackOrder:!1,syncMethod:"index"},I2=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,hz),{width:a,height:o}=i,s=uz(i,cz);if(!Di(a)||!Di(o))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=t,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return A.createElement(k2,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},A.createElement(Z_,{chartData:d.data}),A.createElement(T2,{width:a,height:o,layout:i.layout,margin:i.margin}),A.createElement(M2,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(N2,Sp({},s,{width:a,height:o,ref:r})))}),pz=["axis"],$2=k.forwardRef((e,t)=>A.createElement(I2,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:pz,tooltipPayloadSearcher:Th,categoricalChartProps:e,ref:t})),mz=["axis","item"],gz=k.forwardRef((e,t)=>A.createElement(I2,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:mz,tooltipPayloadSearcher:Th,categoricalChartProps:e,ref:t}));function vz(e){var t=Ze();return k.useEffect(()=>{t(W8(e))},[t,e]),null}var yz=["width","height","layout"];function Op(){return Op=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Op.apply(null,arguments)}function bz(e,t){if(e==null)return{};var r,n,i=xz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function xz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var wz={top:5,right:5,bottom:5,left:5},_z={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:wz,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},Sz=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,_z),{width:a,height:o,layout:s}=i,l=bz(i,yz);if(!Di(a)||!Di(o))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=t,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return A.createElement(k2,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},A.createElement(Z_,{chartData:i.data}),A.createElement(T2,{width:a,height:o,layout:s,margin:i.margin}),A.createElement(M2,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(vz,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),A.createElement(N2,Op({width:a,height:o},l,{ref:r})))}),Oz=["item"],Az={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},rc=k.forwardRef((e,t)=>{var r=_t(e,Az);return A.createElement(Sz,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Oz,tooltipPayloadSearcher:Th,categoricalChartProps:r,ref:t})});function Ez({isStatic:e,data:t}){const r=({value:u})=>{const f=u>=0;return y.jsx("div",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${f?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:f?`+${u}%`:`${u}%`})},n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),i=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),a=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),s=[{name:"Move-ins",value:n},{name:"Move-outs",value:i}],l={purple:"#8B5CF6",indigo:"#6366F1"},c=({active:u,payload:f})=>!u||!f||!f.length?null:y.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:f.map((d,h)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:d.color,marginRight:6}}),d.name,": ",y.jsx("div",{className:"font-semibold",children:d.value})]},h))});return y.jsx(me,{title:"Community",period:"This Month",icon:y.jsx(su,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),y.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+i})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1 flex items-center",children:[y.jsx(r,{value:((a+o)/2).toFixed(2)}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),y.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsxs(lo,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[y.jsx(kr,{fill:l.purple}),y.jsx(kr,{fill:l.indigo})]}),y.jsx(ni,{content:y.jsx(c,{})})]})})})]})})}function Pz({isStatic:e,data:t}){const r=[{name:"Notice",value:Number(t?.total_notices||0)},{name:"Post",value:Number(t?.total_topics||0)},{name:"Poll",value:Number(t?.total_polls||0)},{name:"Survey",value:Number(t?.total_surveys||0)}],n={Notice:"#8B5CF6",Post:"#22C55E",Poll:"#3B82F6",Survey:"#F59E0B"},i=({active:a,payload:o,label:s})=>!a||!o||!o.length?null:y.jsxs("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:[s&&y.jsx("div",{className:"font-medium mb-1",children:s}),o.map((l,c)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:l.color,marginRight:6}}),l.name,": ",y.jsx("div",{className:"font-semibold",children:l.value})]},c))]});return y.jsx(me,{title:"Engagement",period:"This Month",icon:y.jsx(zg,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(gz,{data:r,layout:"vertical",margin:{top:4,right:8,left:8,bottom:0},children:[y.jsx(Gl,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),y.jsx(Ql,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Zl,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),y.jsx(ni,{content:y.jsx(i,{}),cursor:{fill:"transparent"}}),y.jsx(q_,{dataKey:"value",barSize:40,isAnimationActive:!1,children:r.map(a=>y.jsx(kr,{fill:n[a.name]},a.name))})]})})})}function Cz(e){if(!e)return 0;const[t,r]=e.split(" ");let[n,i]=t.split(":").map(Number);return r==="PM"&&n!==12&&(n+=12),r==="AM"&&n===12&&(n=0),n*60+i}function kz(e){let t=Math.floor(e/60);const r=t>=12?"PM":"AM";return t=t%12||12,`${t} ${r}`}function Tz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Cz(i.slot_start_time),o=Math.floor(a/240)*240,s=o+240,l=`${o}-${s}`;r[l]||(r[l]={time:kz(s),bookings:0,total:0}),r[l].bookings+=Number(i?.slot_bookings||0),r[l].total+=Number(i?.total_slots||0)}return Object.values(r)}function Mz({isStatic:e,data:t}){const r=Number(t?.totalBookings||0),n=Number(t?.totalSlots||0),i=Number(t?.utilizationRate||0),a=k.useMemo(()=>t?.slots?.length?Tz(t.slots):[],[t]),o=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("div",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("div",{className:"font-semibold",children:f.value})]},d))]}),s=a.length>0?Math.max(...a.map(l=>l.total),5):5;return y.jsxs(me,{title:"Facilities",period:"Today",icon:y.jsx(Bg,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[y.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-4",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Bookings"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#8B5CF6]",children:r})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Total Slots"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#F59E0B]",children:n})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Utilisation Rate"}),y.jsxs("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium !text-[#329DFF]",children:[Number.isFinite(i)?i.toFixed(2):"0.00","%"]})]})]}),y.jsx("div",{className:"w-full h-[150px]",children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs($2,{data:a,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(Ql,{yAxisId:"left",domain:[0,s],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(ni,{content:y.jsx(o,{})}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"total",name:"Total Slots",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})}function jz({data:e}){console.log(e,"financial");const t=e?.incomeSummary||{},r=e?.expenditureSummary||{};function n(i){if(i==null||isNaN(i))return"0";const a=Number(i);return a>=1e9?(a/1e9).toFixed(a%1e9===0?0:2)+"B":a>=1e6?(a/1e6).toFixed(a%1e6===0?0:2)+"M":a>=1e3?(a/1e3).toFixed(a%1e3===0?0:2)+"K":a.toFixed(a%1===0?0:2)}return y.jsx(me,{title:"Income",period:"This Month",icon:y.jsx(Wg,{className:"!text-[24px] text-green-600"}),className:"!gap-4 break-inside-avoid h-[232px] overflow-hidden",children:y.jsxs("div",{children:[y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Income"}),y.jsx("div",{children:"Collection"}),y.jsx("div",{children:"Closing"})]}),y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[y.jsxs("div",{children:[n(t.opening_balance)," AED"]}),y.jsxs("div",{children:[n(t.income)," AED"]}),y.jsxs("div",{children:[n(t.collection)," AED"]}),y.jsxs("div",{children:[n(t.closing_balance)," AED"]})]}),y.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Wg,{className:"!text-[24px] text-red-600"}),y.jsx("div",{style:{fontWeight:500,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]}),y.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:"This Month"})]}),y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Expenditure"}),y.jsx("div",{children:"Payment"}),y.jsx("div",{children:"Outstanding"})]}),y.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[y.jsxs("div",{children:[n(r.opening_balance)," AED"]}),y.jsxs("div",{children:[n(r.expenditure)," AED"]}),y.jsxs("div",{children:[n(r.payment)," AED"]}),y.jsxs("div",{children:[n(r.outstanding)," AED"]})]})]})})}function Dz(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function Nz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Number(i.hour??0),s=Math.floor(a/4)*4+4,l=s;r[l]||(r[l]={time:Dz(s),walkins:0,checkins:0}),r[l].walkins+=Number(i.walkins??0),r[l].checkins+=Number(i.preApproved??0)}return Object.values(r)}function Iz({isStatic:e,data:t}){const r={green:"#12B981",amber:"#F69E0A"},n=t?.summary?.activeWalkins||{},i=t?.summary?.preApprovedCheckins||{},a=t?.summary?.staffAttendance||{},o=t?.chart?.length>0?Nz(t.chart):[],s=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("div",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx("div",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("div",{className:"font-semibold",children:f.value})]},d))]});return y.jsx(me,{title:"Gate Updates",period:"Today",icon:y.jsx(Hg,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-2 text-[14px] mb-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Active Walk-ins"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[a.total_in_now??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",a.total_in_today??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Pre-approved Check-ins"}),y.jsxs("div",{className:"!m-0 text-[28px] leading-[32px] font-medium text-[#E7A015] flex",children:[i.expected_pass_scanned??0,y.jsxs("div",{className:"text-[20px] leading-[32px] text-[#64748B]",children:["/",i.total_expected_pass??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Staff Attendance"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[n.visitor_in??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",n.total_pass??0]})]})]})]}),y.jsx(ii,{width:"100%",height:"60%",children:y.jsxs($2,{data:o,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Ql,{yAxisId:"left",domain:[0,30],ticks:[0,10,20,30],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1,width:25}),y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),y.jsx(ni,{content:y.jsx(s,{})}),y.jsx(fo,{type:"monotone",dataKey:"walkins",stroke:r.green,strokeWidth:2,dot:!1,name:"Walk-ins"}),y.jsx(fo,{type:"monotone",dataKey:"checkins",stroke:r.amber,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"})]})})]})})}function $z({isStatic:e,data:t}){const r=({value:c})=>{if(c==null||isNaN(c))return null;const u=c>=0;return y.jsx("div",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${u?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:u?`+${c}%`:`${c}%`})},n=[{name:"L1",value:Number(t?.today_L1||0)},{name:"L2",value:Number(t?.today_L2||0)},{name:"L3",value:Number(t?.today_L3||0)},{name:"No Level",value:Number(t?.today_NoLevel||0)}],a=n.reduce((c,u)=>c+u.value,0)===0?[{name:"No Data",value:1}]:n,o=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],s=({color:c})=>y.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:c,marginRight:"6px"}}),l=({active:c,payload:u})=>!c||!u||!u.length?null:y.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:u.map((f,d)=>y.jsxs("div",{className:"capitalize flex gap-1 items-center leading-relaxed",children:[y.jsx(s,{color:f.color}),f.name,": ",y.jsx("div",{className:"font-semibold",children:f.value})]},d))});return y.jsx(me,{title:"Helpdesk",period:"Today",icon:y.jsx(UC,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex gap-3 h-fit",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Open Complaints"}),y.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1",children:[y.jsx(r,{value:t?.percent_change}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),y.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:a,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:a.map((c,u)=>y.jsx(kr,{fill:o[u]||"#CBD5E1"},c.name))}),y.jsx(ni,{content:y.jsx(l,{})})]})})})]})})}/*!
200
200
  * @kurkle/color v0.3.4
201
201
  * https://github.com/kurkle/color#readme
202
202
  * (c) 2024 Jukka Kurkela
203
203
  * Released under the MIT License
204
- */function ho(e){return e+.5|0}const An=(e,t,r)=>Math.max(Math.min(e,r),t);function po(e){return An(ho(e*2.55),0,255)}function En(e){return An(ho(e*255),0,255)}function tn(e){return An(ho(e/2.55)/100,0,1)}function RS(e){return An(ho(e*100),0,100)}const fr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ap=[..."0123456789ABCDEF"],Rz=e=>Ap[e&15],Lz=e=>Ap[(e&240)>>4]+Ap[e&15],nc=e=>(e&240)>>4===(e&15),Fz=e=>nc(e.r)&&nc(e.g)&&nc(e.b)&&nc(e.a);function Bz(e){var t=e.length,r;return e[0]==="#"&&(t===4||t===5?r={r:255&fr[e[1]]*17,g:255&fr[e[2]]*17,b:255&fr[e[3]]*17,a:t===5?fr[e[4]]*17:255}:(t===7||t===9)&&(r={r:fr[e[1]]<<4|fr[e[2]],g:fr[e[3]]<<4|fr[e[4]],b:fr[e[5]]<<4|fr[e[6]],a:t===9?fr[e[7]]<<4|fr[e[8]]:255})),r}const zz=(e,t)=>e<255?t(e):"";function Wz(e){var t=Fz(e)?Rz:Lz;return e?"#"+t(e.r)+t(e.g)+t(e.b)+zz(e.a,t):void 0}const Vz=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function LS(e,t,r){const n=t*Math.min(r,1-r),i=(a,o=(a+e/30)%12)=>r-n*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function Hz(e,t,r){const n=(i,a=(i+e/60)%6)=>r-r*t*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function Uz(e,t,r){const n=LS(e,1,.5);let i;for(t+r>1&&(i=1/(t+r),t*=i,r*=i),i=0;i<3;i++)n[i]*=1-t-r,n[i]+=t;return n}function Kz(e,t,r,n,i){return e===i?(t-r)/n+(t<r?6:0):t===i?(r-e)/n+2:(e-t)/n+4}function Ep(e){const r=e.r/255,n=e.g/255,i=e.b/255,a=Math.max(r,n,i),o=Math.min(r,n,i),s=(a+o)/2;let l,c,u;return a!==o&&(u=a-o,c=s>.5?u/(2-a-o):u/(a+o),l=Kz(r,n,i,u,a),l=l*60+.5),[l|0,c||0,s]}function Pp(e,t,r,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,r,n)).map(En)}function Cp(e,t,r){return Pp(LS,e,t,r)}function qz(e,t,r){return Pp(Uz,e,t,r)}function Yz(e,t,r){return Pp(Hz,e,t,r)}function FS(e){return(e%360+360)%360}function Gz(e){const t=Vz.exec(e);let r=255,n;if(!t)return;t[5]!==n&&(r=t[6]?po(+t[5]):En(+t[5]));const i=FS(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?n=qz(i,a,o):t[1]==="hsv"?n=Yz(i,a,o):n=Cp(i,a,o),{r:n[0],g:n[1],b:n[2],a:r}}function Xz(e,t){var r=Ep(e);r[0]=FS(r[0]+t),r=Cp(r),e.r=r[0],e.g=r[1],e.b=r[2]}function Zz(e){if(!e)return;const t=Ep(e),r=t[0],n=RS(t[1]),i=RS(t[2]);return e.a<255?`hsla(${r}, ${n}%, ${i}%, ${tn(e.a)})`:`hsl(${r}, ${n}%, ${i}%)`}const BS={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},zS={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Jz(){const e={},t=Object.keys(zS),r=Object.keys(BS);let n,i,a,o,s;for(n=0;n<t.length;n++){for(o=s=t[n],i=0;i<r.length;i++)a=r[i],s=s.replace(a,BS[a]);a=parseInt(zS[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let ic;function Qz(e){ic||(ic=Jz(),ic.transparent=[0,0,0,0]);const t=ic[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const e7=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function t7(e){const t=e7.exec(e);let r=255,n,i,a;if(t){if(t[7]!==n){const o=+t[7];r=t[8]?po(o):An(o*255,0,255)}return n=+t[1],i=+t[3],a=+t[5],n=255&(t[2]?po(n):An(n,0,255)),i=255&(t[4]?po(i):An(i,0,255)),a=255&(t[6]?po(a):An(a,0,255)),{r:n,g:i,b:a,a:r}}}function r7(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${tn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const kp=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Zi=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function n7(e,t,r){const n=Zi(tn(e.r)),i=Zi(tn(e.g)),a=Zi(tn(e.b));return{r:En(kp(n+r*(Zi(tn(t.r))-n))),g:En(kp(i+r*(Zi(tn(t.g))-i))),b:En(kp(a+r*(Zi(tn(t.b))-a))),a:e.a+r*(t.a-e.a)}}function ac(e,t,r){if(e){let n=Ep(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*r,t===0?360:1)),n=Cp(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function WS(e,t){return e&&Object.assign(t||{},e)}function VS(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=En(e[3]))):(t=WS(e,{r:0,g:0,b:0,a:1}),t.a=En(t.a)),t}function i7(e){return e.charAt(0)==="r"?t7(e):Gz(e)}class mo{constructor(t){if(t instanceof mo)return t;const r=typeof t;let n;r==="object"?n=VS(t):r==="string"&&(n=Bz(t)||Qz(t)||i7(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=WS(this._rgb);return t&&(t.a=tn(t.a)),t}set rgb(t){this._rgb=VS(t)}rgbString(){return this._valid?r7(this._rgb):void 0}hexString(){return this._valid?Wz(this._rgb):void 0}hslString(){return this._valid?Zz(this._rgb):void 0}mix(t,r){if(t){const n=this.rgb,i=t.rgb;let a;const o=r===a?.5:r,s=2*o-1,l=n.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,n.r=255&c*n.r+a*i.r+.5,n.g=255&c*n.g+a*i.g+.5,n.b=255&c*n.b+a*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,r){return t&&(this._rgb=n7(this._rgb,t._rgb,r)),this}clone(){return new mo(this.rgb)}alpha(t){return this._rgb.a=En(t),this}clearer(t){const r=this._rgb;return r.a*=1-t,this}greyscale(){const t=this._rgb,r=ho(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=r,this}opaquer(t){const r=this._rgb;return r.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ac(this._rgb,2,t),this}darken(t){return ac(this._rgb,2,-t),this}saturate(t){return ac(this._rgb,1,t),this}desaturate(t){return ac(this._rgb,1,-t),this}rotate(t){return Xz(this._rgb,t),this}}/*!
204
+ */function ho(e){return e+.5|0}const An=(e,t,r)=>Math.max(Math.min(e,r),t);function po(e){return An(ho(e*2.55),0,255)}function En(e){return An(ho(e*255),0,255)}function tn(e){return An(ho(e/2.55)/100,0,1)}function R2(e){return An(ho(e*100),0,100)}const fr={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},Ap=[..."0123456789ABCDEF"],Rz=e=>Ap[e&15],Lz=e=>Ap[(e&240)>>4]+Ap[e&15],nc=e=>(e&240)>>4===(e&15),Fz=e=>nc(e.r)&&nc(e.g)&&nc(e.b)&&nc(e.a);function Bz(e){var t=e.length,r;return e[0]==="#"&&(t===4||t===5?r={r:255&fr[e[1]]*17,g:255&fr[e[2]]*17,b:255&fr[e[3]]*17,a:t===5?fr[e[4]]*17:255}:(t===7||t===9)&&(r={r:fr[e[1]]<<4|fr[e[2]],g:fr[e[3]]<<4|fr[e[4]],b:fr[e[5]]<<4|fr[e[6]],a:t===9?fr[e[7]]<<4|fr[e[8]]:255})),r}const zz=(e,t)=>e<255?t(e):"";function Wz(e){var t=Fz(e)?Rz:Lz;return e?"#"+t(e.r)+t(e.g)+t(e.b)+zz(e.a,t):void 0}const Vz=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function L2(e,t,r){const n=t*Math.min(r,1-r),i=(a,o=(a+e/30)%12)=>r-n*Math.max(Math.min(o-3,9-o,1),-1);return[i(0),i(8),i(4)]}function Hz(e,t,r){const n=(i,a=(i+e/60)%6)=>r-r*t*Math.max(Math.min(a,4-a,1),0);return[n(5),n(3),n(1)]}function Uz(e,t,r){const n=L2(e,1,.5);let i;for(t+r>1&&(i=1/(t+r),t*=i,r*=i),i=0;i<3;i++)n[i]*=1-t-r,n[i]+=t;return n}function Kz(e,t,r,n,i){return e===i?(t-r)/n+(t<r?6:0):t===i?(r-e)/n+2:(e-t)/n+4}function Ep(e){const r=e.r/255,n=e.g/255,i=e.b/255,a=Math.max(r,n,i),o=Math.min(r,n,i),s=(a+o)/2;let l,c,u;return a!==o&&(u=a-o,c=s>.5?u/(2-a-o):u/(a+o),l=Kz(r,n,i,u,a),l=l*60+.5),[l|0,c||0,s]}function Pp(e,t,r,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,r,n)).map(En)}function Cp(e,t,r){return Pp(L2,e,t,r)}function qz(e,t,r){return Pp(Uz,e,t,r)}function Yz(e,t,r){return Pp(Hz,e,t,r)}function F2(e){return(e%360+360)%360}function Gz(e){const t=Vz.exec(e);let r=255,n;if(!t)return;t[5]!==n&&(r=t[6]?po(+t[5]):En(+t[5]));const i=F2(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?n=qz(i,a,o):t[1]==="hsv"?n=Yz(i,a,o):n=Cp(i,a,o),{r:n[0],g:n[1],b:n[2],a:r}}function Xz(e,t){var r=Ep(e);r[0]=F2(r[0]+t),r=Cp(r),e.r=r[0],e.g=r[1],e.b=r[2]}function Zz(e){if(!e)return;const t=Ep(e),r=t[0],n=R2(t[1]),i=R2(t[2]);return e.a<255?`hsla(${r}, ${n}%, ${i}%, ${tn(e.a)})`:`hsl(${r}, ${n}%, ${i}%)`}const B2={x:"dark",Z:"light",Y:"re",X:"blu",W:"gr",V:"medium",U:"slate",A:"ee",T:"ol",S:"or",B:"ra",C:"lateg",D:"ights",R:"in",Q:"turquois",E:"hi",P:"ro",O:"al",N:"le",M:"de",L:"yello",F:"en",K:"ch",G:"arks",H:"ea",I:"ightg",J:"wh"},z2={OiceXe:"f0f8ff",antiquewEte:"faebd7",aqua:"ffff",aquamarRe:"7fffd4",azuY:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"0",blanKedOmond:"ffebcd",Xe:"ff",XeviTet:"8a2be2",bPwn:"a52a2a",burlywood:"deb887",caMtXe:"5f9ea0",KartYuse:"7fff00",KocTate:"d2691e",cSO:"ff7f50",cSnflowerXe:"6495ed",cSnsilk:"fff8dc",crimson:"dc143c",cyan:"ffff",xXe:"8b",xcyan:"8b8b",xgTMnPd:"b8860b",xWay:"a9a9a9",xgYF:"6400",xgYy:"a9a9a9",xkhaki:"bdb76b",xmagFta:"8b008b",xTivegYF:"556b2f",xSange:"ff8c00",xScEd:"9932cc",xYd:"8b0000",xsOmon:"e9967a",xsHgYF:"8fbc8f",xUXe:"483d8b",xUWay:"2f4f4f",xUgYy:"2f4f4f",xQe:"ced1",xviTet:"9400d3",dAppRk:"ff1493",dApskyXe:"bfff",dimWay:"696969",dimgYy:"696969",dodgerXe:"1e90ff",fiYbrick:"b22222",flSOwEte:"fffaf0",foYstWAn:"228b22",fuKsia:"ff00ff",gaRsbSo:"dcdcdc",ghostwEte:"f8f8ff",gTd:"ffd700",gTMnPd:"daa520",Way:"808080",gYF:"8000",gYFLw:"adff2f",gYy:"808080",honeyMw:"f0fff0",hotpRk:"ff69b4",RdianYd:"cd5c5c",Rdigo:"4b0082",ivSy:"fffff0",khaki:"f0e68c",lavFMr:"e6e6fa",lavFMrXsh:"fff0f5",lawngYF:"7cfc00",NmoncEffon:"fffacd",ZXe:"add8e6",ZcSO:"f08080",Zcyan:"e0ffff",ZgTMnPdLw:"fafad2",ZWay:"d3d3d3",ZgYF:"90ee90",ZgYy:"d3d3d3",ZpRk:"ffb6c1",ZsOmon:"ffa07a",ZsHgYF:"20b2aa",ZskyXe:"87cefa",ZUWay:"778899",ZUgYy:"778899",ZstAlXe:"b0c4de",ZLw:"ffffe0",lime:"ff00",limegYF:"32cd32",lRF:"faf0e6",magFta:"ff00ff",maPon:"800000",VaquamarRe:"66cdaa",VXe:"cd",VScEd:"ba55d3",VpurpN:"9370db",VsHgYF:"3cb371",VUXe:"7b68ee",VsprRggYF:"fa9a",VQe:"48d1cc",VviTetYd:"c71585",midnightXe:"191970",mRtcYam:"f5fffa",mistyPse:"ffe4e1",moccasR:"ffe4b5",navajowEte:"ffdead",navy:"80",Tdlace:"fdf5e6",Tive:"808000",TivedBb:"6b8e23",Sange:"ffa500",SangeYd:"ff4500",ScEd:"da70d6",pOegTMnPd:"eee8aa",pOegYF:"98fb98",pOeQe:"afeeee",pOeviTetYd:"db7093",papayawEp:"ffefd5",pHKpuff:"ffdab9",peru:"cd853f",pRk:"ffc0cb",plum:"dda0dd",powMrXe:"b0e0e6",purpN:"800080",YbeccapurpN:"663399",Yd:"ff0000",Psybrown:"bc8f8f",PyOXe:"4169e1",saddNbPwn:"8b4513",sOmon:"fa8072",sandybPwn:"f4a460",sHgYF:"2e8b57",sHshell:"fff5ee",siFna:"a0522d",silver:"c0c0c0",skyXe:"87ceeb",UXe:"6a5acd",UWay:"708090",UgYy:"708090",snow:"fffafa",sprRggYF:"ff7f",stAlXe:"4682b4",tan:"d2b48c",teO:"8080",tEstN:"d8bfd8",tomato:"ff6347",Qe:"40e0d0",viTet:"ee82ee",JHt:"f5deb3",wEte:"ffffff",wEtesmoke:"f5f5f5",Lw:"ffff00",LwgYF:"9acd32"};function Jz(){const e={},t=Object.keys(z2),r=Object.keys(B2);let n,i,a,o,s;for(n=0;n<t.length;n++){for(o=s=t[n],i=0;i<r.length;i++)a=r[i],s=s.replace(a,B2[a]);a=parseInt(z2[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let ic;function Qz(e){ic||(ic=Jz(),ic.transparent=[0,0,0,0]);const t=ic[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const e7=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function t7(e){const t=e7.exec(e);let r=255,n,i,a;if(t){if(t[7]!==n){const o=+t[7];r=t[8]?po(o):An(o*255,0,255)}return n=+t[1],i=+t[3],a=+t[5],n=255&(t[2]?po(n):An(n,0,255)),i=255&(t[4]?po(i):An(i,0,255)),a=255&(t[6]?po(a):An(a,0,255)),{r:n,g:i,b:a,a:r}}}function r7(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${tn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const kp=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,Zi=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function n7(e,t,r){const n=Zi(tn(e.r)),i=Zi(tn(e.g)),a=Zi(tn(e.b));return{r:En(kp(n+r*(Zi(tn(t.r))-n))),g:En(kp(i+r*(Zi(tn(t.g))-i))),b:En(kp(a+r*(Zi(tn(t.b))-a))),a:e.a+r*(t.a-e.a)}}function ac(e,t,r){if(e){let n=Ep(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*r,t===0?360:1)),n=Cp(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function W2(e,t){return e&&Object.assign(t||{},e)}function V2(e){var t={r:0,g:0,b:0,a:255};return Array.isArray(e)?e.length>=3&&(t={r:e[0],g:e[1],b:e[2],a:255},e.length>3&&(t.a=En(e[3]))):(t=W2(e,{r:0,g:0,b:0,a:1}),t.a=En(t.a)),t}function i7(e){return e.charAt(0)==="r"?t7(e):Gz(e)}class mo{constructor(t){if(t instanceof mo)return t;const r=typeof t;let n;r==="object"?n=V2(t):r==="string"&&(n=Bz(t)||Qz(t)||i7(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=W2(this._rgb);return t&&(t.a=tn(t.a)),t}set rgb(t){this._rgb=V2(t)}rgbString(){return this._valid?r7(this._rgb):void 0}hexString(){return this._valid?Wz(this._rgb):void 0}hslString(){return this._valid?Zz(this._rgb):void 0}mix(t,r){if(t){const n=this.rgb,i=t.rgb;let a;const o=r===a?.5:r,s=2*o-1,l=n.a-i.a,c=((s*l===-1?s:(s+l)/(1+s*l))+1)/2;a=1-c,n.r=255&c*n.r+a*i.r+.5,n.g=255&c*n.g+a*i.g+.5,n.b=255&c*n.b+a*i.b+.5,n.a=o*n.a+(1-o)*i.a,this.rgb=n}return this}interpolate(t,r){return t&&(this._rgb=n7(this._rgb,t._rgb,r)),this}clone(){return new mo(this.rgb)}alpha(t){return this._rgb.a=En(t),this}clearer(t){const r=this._rgb;return r.a*=1-t,this}greyscale(){const t=this._rgb,r=ho(t.r*.3+t.g*.59+t.b*.11);return t.r=t.g=t.b=r,this}opaquer(t){const r=this._rgb;return r.a*=1+t,this}negate(){const t=this._rgb;return t.r=255-t.r,t.g=255-t.g,t.b=255-t.b,this}lighten(t){return ac(this._rgb,2,t),this}darken(t){return ac(this._rgb,2,-t),this}saturate(t){return ac(this._rgb,1,t),this}desaturate(t){return ac(this._rgb,1,-t),this}rotate(t){return Xz(this._rgb,t),this}}/*!
205
205
  * Chart.js v4.5.0
206
206
  * https://www.chartjs.org
207
207
  * (c) 2025 Chart.js Contributors
208
208
  * Released under the MIT License
209
- */function rn(){}const a7=(()=>{let e=0;return()=>e++})();function Se(e){return e==null}function yt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function he(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function dr(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Tr(e,t){return dr(e)?e:t}function se(e,t){return typeof e>"u"?t:e}const o7=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,HS=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Fe(e,t,r){if(e&&typeof e.call=="function")return e.apply(r,t)}function Ce(e,t,r,n){let i,a,o;if(yt(e))for(a=e.length,i=0;i<a;i++)t.call(r,e[i],i);else if(he(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(r,e[o[i]],o[i])}function oc(e,t){let r,n,i,a;if(!e||!t||e.length!==t.length)return!1;for(r=0,n=e.length;r<n;++r)if(i=e[r],a=t[r],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function sc(e){if(yt(e))return e.map(sc);if(he(e)){const t=Object.create(null),r=Object.keys(e),n=r.length;let i=0;for(;i<n;++i)t[r[i]]=sc(e[r[i]]);return t}return e}function US(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function s7(e,t,r,n){if(!US(e))return;const i=t[e],a=r[e];he(i)&&he(a)?go(i,a,n):t[e]=sc(a)}function go(e,t,r){const n=yt(t)?t:[t],i=n.length;if(!he(e))return e;r=r||{};const a=r.merger||s7;let o;for(let s=0;s<i;++s){if(o=n[s],!he(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)a(l[c],e,o,r)}return e}function vo(e,t){return go(e,t,{merger:l7})}function l7(e,t,r){if(!US(e))return;const n=t[e],i=r[e];he(n)&&he(i)?vo(n,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=sc(i))}const KS={"":e=>e,x:e=>e.x,y:e=>e.y};function c7(e){const t=e.split("."),r=[];let n="";for(const i of t)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function u7(e){const t=c7(e);return r=>{for(const n of t){if(n==="")break;r=r&&r[n]}return r}}function li(e,t){return(KS[t]||(KS[t]=u7(t)))(e)}function Tp(e){return e.charAt(0).toUpperCase()+e.slice(1)}const yo=e=>typeof e<"u",Pn=e=>typeof e=="function",qS=(e,t)=>{if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0};function f7(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const je=Math.PI,Ge=2*je,d7=Ge+je,lc=Number.POSITIVE_INFINITY,h7=je/180,ft=je/2,ci=je/4,YS=je*2/3,GS=Math.log10,Mr=Math.sign;function bo(e,t,r){return Math.abs(e-t)<r}function XS(e){const t=Math.round(e);e=bo(e,t,e/1e3)?t:e;const r=Math.pow(10,Math.floor(GS(e))),n=e/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function p7(e){const t=[],r=Math.sqrt(e);let n;for(n=1;n<r;n++)e%n===0&&(t.push(n),t.push(e/n));return r===(r|0)&&t.push(r),t.sort((i,a)=>i-a).pop(),t}function m7(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function xo(e){return!m7(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function g7(e,t){const r=Math.round(e);return r-t<=e&&r+t>=e}function v7(e,t,r){let n,i,a;for(n=0,i=e.length;n<i;n++)a=e[n][r],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function nn(e){return e*(je/180)}function y7(e){return e*(180/je)}function ZS(e){if(!dr(e))return;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r++;return r}function JS(e,t){const r=t.x-e.x,n=t.y-e.y,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a<-.5*je&&(a+=Ge),{angle:a,distance:i}}function Mp(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function b7(e,t){return(e-t+d7)%Ge-je}function gr(e){return(e%Ge+Ge)%Ge}function wo(e,t,r,n){const i=gr(e),a=gr(t),o=gr(r),s=gr(a-i),l=gr(o-i),c=gr(i-a),u=gr(i-o);return i===a||i===o||n&&a===o||s>l&&c<u}function Ct(e,t,r){return Math.max(t,Math.min(r,e))}function x7(e){return Ct(e,-32768,32767)}function Cn(e,t,r,n=1e-6){return e>=Math.min(t,r)-n&&e<=Math.max(t,r)+n}function jp(e,t,r){r=r||(o=>e[o]<t);let n=e.length-1,i=0,a;for(;n-i>1;)a=i+n>>1,r(a)?i=a:n=a;return{lo:i,hi:n}}const ui=(e,t,r,n)=>jp(e,r,n?i=>{const a=e[i][t];return a<r||a===r&&e[i+1][t]===r}:i=>e[i][t]<r),w7=(e,t,r)=>jp(e,r,n=>e[n][t]>=r);function _7(e,t,r){let n=0,i=e.length;for(;n<i&&e[n]<t;)n++;for(;i>n&&e[i-1]>r;)i--;return n>0||i<e.length?e.slice(n,i):e}const QS=["push","pop","shift","splice","unshift"];function S7(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),QS.forEach(r=>{const n="_onData"+Tp(r),i=e[r];Object.defineProperty(e,r,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[n]=="function"&&s[n](...a)}),o}})})}function e2(e,t){const r=e._chartjs;if(!r)return;const n=r.listeners,i=n.indexOf(t);i!==-1&&n.splice(i,1),!(n.length>0)&&(QS.forEach(a=>{delete e[a]}),delete e._chartjs)}function t2(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const r2=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function n2(e,t){let r=[],n=!1;return function(...i){r=i,n||(n=!0,r2.call(window,()=>{n=!1,e.apply(t,r)}))}}function O7(e,t){let r;return function(...n){return t?(clearTimeout(r),r=setTimeout(e,t,n)):e.apply(this,n),t}}const i2=e=>e==="start"?"left":e==="end"?"right":"center",er=(e,t,r)=>e==="start"?t:e==="end"?r:(t+r)/2,A7=(e,t,r,n)=>e===(n?"left":"right")?r:e==="center"?(t+r)/2:t;function E7(e,t,r){const n=t.length;let i=0,a=n;if(e._sorted){const{iScale:o,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:f,max:d,minDefined:h,maxDefined:m}=o.getUserBounds();if(h){if(i=Math.min(ui(l,u,f).lo,r?n:ui(t,u,o.getPixelForValue(f)).lo),c){const p=l.slice(0,i+1).reverse().findIndex(g=>!Se(g[s.axis]));i-=Math.max(0,p)}i=Ct(i,0,n-1)}if(m){let p=Math.max(ui(l,o.axis,d,!0).hi+1,r?0:ui(t,u,o.getPixelForValue(d),!0).hi+1);if(c){const g=l.slice(p-1).findIndex(v=>!Se(v[s.axis]));p+=Math.max(0,g)}a=Ct(p,i,n)-i}else a=n-i}return{start:i,count:a}}function P7(e){const{xScale:t,yScale:r,_scaleRanges:n}=e,i={xmin:t.min,xmax:t.max,ymin:r.min,ymax:r.max};if(!n)return e._scaleRanges=i,!0;const a=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),a}const cc=e=>e===0||e===1,a2=(e,t,r)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Ge/r)),o2=(e,t,r)=>Math.pow(2,-10*e)*Math.sin((e-t)*Ge/r)+1,_o={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ft)+1,easeOutSine:e=>Math.sin(e*ft),easeInOutSine:e=>-.5*(Math.cos(je*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>cc(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>cc(e)?e:a2(e,.075,.3),easeOutElastic:e=>cc(e)?e:o2(e,.075,.3),easeInOutElastic(e){return cc(e)?e:e<.5?.5*a2(e*2,.1125,.45):.5+.5*o2(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-_o.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?_o.easeInBounce(e*2)*.5:_o.easeOutBounce(e*2-1)*.5+.5};function Dp(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function s2(e){return Dp(e)?e:new mo(e)}function Np(e){return Dp(e)?e:new mo(e).saturate(.5).darken(.1).hexString()}const C7=["x","y","borderWidth","radius","tension"],k7=["color","borderColor","backgroundColor"];function T7(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:k7},numbers:{type:"number",properties:C7}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function M7(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const l2=new Map;function j7(e,t){t=t||{};const r=e+JSON.stringify(t);let n=l2.get(r);return n||(n=new Intl.NumberFormat(e,t),l2.set(r,n)),n}function Ip(e,t,r){return j7(t,r).format(e)}const D7={values(e){return yt(e)?e:""+e},numeric(e,t,r){if(e===0)return"0";const n=this.chart.options.locale;let i,a=e;if(r.length>1){const c=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=N7(e,r)}const o=GS(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Ip(e,n,l)}};function N7(e,t){let r=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(r)>=1&&e!==Math.floor(e)&&(r=e-Math.floor(e)),r}var c2={formatters:D7};function I7(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,r)=>r.lineWidth,tickColor:(t,r)=>r.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:c2.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const fi=Object.create(null),$p=Object.create(null);function So(e,t){if(!t)return e;const r=t.split(".");for(let n=0,i=r.length;n<i;++n){const a=r[n];e=e[a]||(e[a]=Object.create(null))}return e}function Rp(e,t,r){return typeof t=="string"?go(So(e,t),r):go(So(e,""),t)}class $7{constructor(t,r){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,i)=>Np(i.backgroundColor),this.hoverBorderColor=(n,i)=>Np(i.borderColor),this.hoverColor=(n,i)=>Np(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(r)}set(t,r){return Rp(this,t,r)}get(t){return So(this,t)}describe(t,r){return Rp($p,t,r)}override(t,r){return Rp(fi,t,r)}route(t,r,n,i){const a=So(this,t),o=So(this,n),s="_"+r;Object.defineProperties(a,{[s]:{value:a[r],writable:!0},[r]:{enumerable:!0,get(){const l=this[s],c=o[i];return he(l)?Object.assign({},c,l):se(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(r=>r(this))}}var et=new $7({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[T7,M7,I7]);function R7(e){return!e||Se(e.size)||Se(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function u2(e,t,r,n,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,r.push(i)),a>n&&(n=a),n}function di(e,t,r){const n=e.currentDevicePixelRatio,i=r!==0?Math.max(r/2,.5):0;return Math.round((t-i)*n)/n+i}function f2(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Lp(e,t,r,n){d2(e,t,r,n,null)}function d2(e,t,r,n,i){let a,o,s,l,c,u,f,d;const h=t.pointStyle,m=t.rotation,p=t.radius;let g=(m||0)*h7;if(h&&typeof h=="object"&&(a=h.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(r,n),e.rotate(g),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),h){default:i?e.ellipse(r,n,i/2,p,0,0,Ge):e.arc(r,n,p,0,Ge),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=YS,e.lineTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=YS,e.lineTo(r+Math.sin(g)*u,n-Math.cos(g)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,o=Math.cos(g+ci)*l,f=Math.cos(g+ci)*(i?i/2-c:l),s=Math.sin(g+ci)*l,d=Math.sin(g+ci)*(i?i/2-c:l),e.arc(r-f,n-s,c,g-je,g-ft),e.arc(r+d,n-o,c,g-ft,g),e.arc(r+f,n+s,c,g,g+ft),e.arc(r-d,n+o,c,g+ft,g+je),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,u=i?i/2:l,e.rect(r-u,n-l,2*u,2*l);break}g+=ci;case"rectRot":f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+d,n-o),e.lineTo(r+f,n+s),e.lineTo(r-d,n+o),e.closePath();break;case"crossRot":g+=ci;case"cross":f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+f,n+s),e.moveTo(r+d,n-o),e.lineTo(r-d,n+o);break;case"star":f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+f,n+s),e.moveTo(r+d,n-o),e.lineTo(r-d,n+o),g+=ci,f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+f,n+s),e.moveTo(r+d,n-o),e.lineTo(r-d,n+o);break;case"line":o=i?i/2:Math.cos(g)*p,s=Math.sin(g)*p,e.moveTo(r-o,n-s),e.lineTo(r+o,n+s);break;case"dash":e.moveTo(r,n),e.lineTo(r+Math.cos(g)*(i?i/2:p),n+Math.sin(g)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Oo(e,t,r){return r=r||.5,!t||e&&e.x>t.left-r&&e.x<t.right+r&&e.y>t.top-r&&e.y<t.bottom+r}function Fp(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Bp(e){e.restore()}function L7(e,t,r,n,i){if(!t)return e.lineTo(r.x,r.y);if(i==="middle"){const a=(t.x+r.x)/2;e.lineTo(a,t.y),e.lineTo(a,r.y)}else i==="after"!=!!n?e.lineTo(t.x,r.y):e.lineTo(r.x,t.y);e.lineTo(r.x,r.y)}function F7(e,t,r,n){if(!t)return e.lineTo(r.x,r.y);e.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?r.cp2x:r.cp1x,n?r.cp2y:r.cp1y,r.x,r.y)}function B7(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Se(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function z7(e,t,r,n,i){if(i.strikethrough||i.underline){const a=e.measureText(n),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=r-a.actualBoundingBoxAscent,c=r+a.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function W7(e,t){const r=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=r}function uc(e,t,r,n,i,a={}){const o=yt(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,B7(e,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&W7(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Se(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,r,n,a.maxWidth)),e.fillText(c,r,n,a.maxWidth),z7(e,r,n,c,a),n+=Number(i.lineHeight);e.restore()}function fc(e,t){const{x:r,y:n,w:i,h:a,radius:o}=t;e.arc(r+o.topLeft,n+o.topLeft,o.topLeft,1.5*je,je,!0),e.lineTo(r,n+a-o.bottomLeft),e.arc(r+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,je,ft,!0),e.lineTo(r+i-o.bottomRight,n+a),e.arc(r+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,ft,0,!0),e.lineTo(r+i,n+o.topRight),e.arc(r+i-o.topRight,n+o.topRight,o.topRight,0,-ft,!0),e.lineTo(r+o.topLeft,n)}const V7=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,H7=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function U7(e,t){const r=(""+e).match(V7);if(!r||r[1]==="normal")return t*1.2;switch(e=+r[2],r[3]){case"px":return e;case"%":e/=100;break}return t*e}const K7=e=>+e||0;function zp(e,t){const r={},n=he(t),i=n?Object.keys(t):t,a=he(e)?n?o=>se(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)r[o]=K7(a(o));return r}function h2(e){return zp(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ji(e){return zp(e,["topLeft","topRight","bottomLeft","bottomRight"])}function vr(e){const t=h2(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Rt(e,t){e=e||{},t=t||et.font;let r=se(e.size,t.size);typeof r=="string"&&(r=parseInt(r,10));let n=se(e.style,t.style);n&&!(""+n).match(H7)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:se(e.family,t.family),lineHeight:U7(se(e.lineHeight,t.lineHeight),r),size:r,style:n,weight:se(e.weight,t.weight),string:""};return i.string=R7(i),i}function dc(e,t,r,n){let i,a,o;for(i=0,a=e.length;i<a;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function q7(e,t,r){const{min:n,max:i}=e,a=HS(t,(i-n)/2),o=(s,l)=>r&&s===0?0:s+l;return{min:o(n,-Math.abs(a)),max:o(i,a)}}function hi(e,t){return Object.assign(Object.create(e),t)}function Wp(e,t=[""],r,n,i=()=>e[0]){const a=r||e;typeof n>"u"&&(n=y2("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:n,_getTarget:i,override:s=>Wp([s,...e],t,a,n)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return m2(s,l,()=>tW(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return b2(s).includes(l)},ownKeys(s){return b2(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Qi(e,t,r,n){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:r,_stack:new Set,_descriptors:p2(e,n),setContext:a=>Qi(e,a,r,n),override:a=>Qi(e.override(a),t,r,n)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete e[o],!0},get(a,o,s){return m2(a,o,()=>G7(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(a,o,s){return e[o]=s,delete a[o],!0}})}function p2(e,t={scriptable:!0,indexable:!0}){const{_scriptable:r=t.scriptable,_indexable:n=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:r,indexable:n,isScriptable:Pn(r)?r:()=>r,isIndexable:Pn(n)?n:()=>n}}const Y7=(e,t)=>e?e+Tp(t):t,Vp=(e,t)=>he(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function m2(e,t,r){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const n=r();return e[t]=n,n}function G7(e,t,r){const{_proxy:n,_context:i,_subProxy:a,_descriptors:o}=e;let s=n[t];return Pn(s)&&o.isScriptable(t)&&(s=X7(t,s,e,r)),yt(s)&&s.length&&(s=Z7(t,s,e,o.isIndexable)),Vp(t,s)&&(s=Qi(s,i,a&&a[t],o)),s}function X7(e,t,r,n){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=r;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,o||n);return s.delete(e),Vp(e,l)&&(l=Hp(i._scopes,i,e,l)),l}function Z7(e,t,r,n){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=r;if(typeof a.index<"u"&&n(e))return t[a.index%t.length];if(he(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const f=Hp(c,i,e,u);t.push(Qi(f,a,o&&o[e],s))}}return t}function g2(e,t,r){return Pn(e)?e(t,r):e}const J7=(e,t)=>e===!0?t:typeof e=="string"?li(t,e):void 0;function Q7(e,t,r,n,i){for(const a of t){const o=J7(r,a);if(o){e.add(o);const s=g2(o._fallback,r,i);if(typeof s<"u"&&s!==r&&s!==n)return s}else if(o===!1&&typeof n<"u"&&r!==n)return null}return!1}function Hp(e,t,r,n){const i=t._rootScopes,a=g2(t._fallback,r,n),o=[...e,...i],s=new Set;s.add(n);let l=v2(s,o,r,a||r,n);return l===null||typeof a<"u"&&a!==r&&(l=v2(s,o,a,l,n),l===null)?!1:Wp(Array.from(s),[""],i,a,()=>eW(t,r,n))}function v2(e,t,r,n,i){for(;r;)r=Q7(e,t,r,n,i);return r}function eW(e,t,r){const n=e._getTarget();t in n||(n[t]={});const i=n[t];return yt(i)&&he(r)?r:i||{}}function tW(e,t,r,n){let i;for(const a of t)if(i=y2(Y7(a,e),r),typeof i<"u")return Vp(e,i)?Hp(r,n,e,i):i}function y2(e,t){for(const r of t){if(!r)continue;const n=r[e];if(typeof n<"u")return n}}function b2(e){let t=e._keys;return t||(t=e._keys=rW(e._scopes)),t}function rW(e){const t=new Set;for(const r of e)for(const n of Object.keys(r).filter(i=>!i.startsWith("_")))t.add(n);return Array.from(t)}const nW=Number.EPSILON||1e-14,ea=(e,t)=>t<e.length&&!e[t].skip&&e[t],x2=e=>e==="x"?"y":"x";function iW(e,t,r,n){const i=e.skip?t:e,a=t,o=r.skip?t:r,s=Mp(a,i),l=Mp(o,a);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=n*c,d=n*u;return{previous:{x:a.x-f*(o.x-i.x),y:a.y-f*(o.y-i.y)},next:{x:a.x+d*(o.x-i.x),y:a.y+d*(o.y-i.y)}}}function aW(e,t,r){const n=e.length;let i,a,o,s,l,c=ea(e,0);for(let u=0;u<n-1;++u)if(l=c,c=ea(e,u+1),!(!l||!c)){if(bo(t[u],0,nW)){r[u]=r[u+1]=0;continue}i=r[u]/t[u],a=r[u+1]/t[u],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),r[u]=i*o*t[u],r[u+1]=a*o*t[u])}}function oW(e,t,r="x"){const n=x2(r),i=e.length;let a,o,s,l=ea(e,0);for(let c=0;c<i;++c){if(o=s,s=l,l=ea(e,c+1),!s)continue;const u=s[r],f=s[n];o&&(a=(u-o[r])/3,s[`cp1${r}`]=u-a,s[`cp1${n}`]=f-a*t[c]),l&&(a=(l[r]-u)/3,s[`cp2${r}`]=u+a,s[`cp2${n}`]=f+a*t[c])}}function sW(e,t="x"){const r=x2(t),n=e.length,i=Array(n).fill(0),a=Array(n);let o,s,l,c=ea(e,0);for(o=0;o<n;++o)if(s=l,l=c,c=ea(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[r]-l[r])/u:0}a[o]=s?c?Mr(i[o-1])!==Mr(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}aW(e,i,a),oW(e,a,t)}function hc(e,t,r){return Math.max(Math.min(e,r),t)}function lW(e,t){let r,n,i,a,o,s=Oo(e[0],t);for(r=0,n=e.length;r<n;++r)o=a,a=s,s=r<n-1&&Oo(e[r+1],t),a&&(i=e[r],o&&(i.cp1x=hc(i.cp1x,t.left,t.right),i.cp1y=hc(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=hc(i.cp2x,t.left,t.right),i.cp2y=hc(i.cp2y,t.top,t.bottom)))}function cW(e,t,r,n,i){let a,o,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")sW(e,i);else{let c=n?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],l=iW(c,s,e[Math.min(a+1,o-(n?0:1))%o],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}t.capBezierPoints&&lW(e,r)}function Up(){return typeof window<"u"&&typeof document<"u"}function Kp(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function pc(e,t,r){let n;return typeof e=="string"?(n=parseInt(e,10),e.indexOf("%")!==-1&&(n=n/100*t.parentNode[r])):n=e,n}const mc=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function uW(e,t){return mc(e).getPropertyValue(t)}const fW=["top","right","bottom","left"];function pi(e,t,r){const n={};r=r?"-"+r:"";for(let i=0;i<4;i++){const a=fW[i];n[a]=parseFloat(e[t+"-"+a+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const dW=(e,t,r)=>(e>0||t>0)&&(!r||!r.shadowRoot);function hW(e,t){const r=e.touches,n=r&&r.length?r[0]:e,{offsetX:i,offsetY:a}=n;let o=!1,s,l;if(dW(i,a,e.target))s=i,l=a;else{const c=t.getBoundingClientRect();s=n.clientX-c.left,l=n.clientY-c.top,o=!0}return{x:s,y:l,box:o}}function mi(e,t){if("native"in e)return e;const{canvas:r,currentDevicePixelRatio:n}=t,i=mc(r),a=i.boxSizing==="border-box",o=pi(i,"padding"),s=pi(i,"border","width"),{x:l,y:c,box:u}=hW(e,r),f=o.left+(u&&s.left),d=o.top+(u&&s.top);let{width:h,height:m}=t;return a&&(h-=o.width+s.width,m-=o.height+s.height),{x:Math.round((l-f)/h*r.width/n),y:Math.round((c-d)/m*r.height/n)}}function pW(e,t,r){let n,i;if(t===void 0||r===void 0){const a=e&&Kp(e);if(!a)t=e.clientWidth,r=e.clientHeight;else{const o=a.getBoundingClientRect(),s=mc(a),l=pi(s,"border","width"),c=pi(s,"padding");t=o.width-c.width-l.width,r=o.height-c.height-l.height,n=pc(s.maxWidth,a,"clientWidth"),i=pc(s.maxHeight,a,"clientHeight")}}return{width:t,height:r,maxWidth:n||lc,maxHeight:i||lc}}const gc=e=>Math.round(e*10)/10;function mW(e,t,r,n){const i=mc(e),a=pi(i,"margin"),o=pc(i.maxWidth,e,"clientWidth")||lc,s=pc(i.maxHeight,e,"clientHeight")||lc,l=pW(e,t,r);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=pi(i,"border","width"),h=pi(i,"padding");c-=h.width+d.width,u-=h.height+d.height}return c=Math.max(0,c-a.width),u=Math.max(0,n?c/n:u-a.height),c=gc(Math.min(c,o,l.maxWidth)),u=gc(Math.min(u,s,l.maxHeight)),c&&!u&&(u=gc(c/2)),(t!==void 0||r!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=gc(Math.floor(u*n))),{width:c,height:u}}function w2(e,t,r){const n=t||1,i=Math.floor(e.height*n),a=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(r||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==n||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=n,o.height=i,o.width=a,e.ctx.setTransform(n,0,0,n,0,0),!0):!1}const gW=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Up()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function _2(e,t){const r=uW(e,t),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function gi(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:e.y+r*(t.y-e.y)}}function vW(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:n==="middle"?r<.5?e.y:t.y:n==="after"?r<1?e.y:t.y:r>0?t.y:e.y}}function yW(e,t,r,n){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=gi(e,i,r),s=gi(i,a,r),l=gi(a,t,r),c=gi(o,s,r),u=gi(s,l,r);return gi(c,u,r)}const bW=function(e,t){return{x(r){return e+e+t-r},setWidth(r){t=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},xW=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ta(e,t,r){return e?bW(t,r):xW()}function S2(e,t){let r,n;(t==="ltr"||t==="rtl")&&(r=e.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",t,"important"),e.prevTextDirection=n)}function O2(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function A2(e){return e==="angle"?{between:wo,compare:b7,normalize:gr}:{between:Cn,compare:(t,r)=>t-r,normalize:t=>t}}function E2({start:e,end:t,count:r,loop:n,style:i}){return{start:e%r,end:t%r,loop:n&&(t-e+1)%r===0,style:i}}function wW(e,t,r){const{property:n,start:i,end:a}=r,{between:o,normalize:s}=A2(n),l=t.length;let{start:c,end:u,loop:f}=e,d,h;if(f){for(c+=l,u+=l,d=0,h=l;d<h&&o(s(t[c%l][n]),i,a);++d)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:f,style:e.style}}function _W(e,t,r){if(!r)return[e];const{property:n,start:i,end:a}=r,o=t.length,{compare:s,between:l,normalize:c}=A2(n),{start:u,end:f,loop:d,style:h}=wW(e,t,r),m=[];let p=!1,g=null,v,b,x;const S=()=>l(i,x,v)&&s(i,x)!==0,w=()=>s(a,v)===0||l(a,x,v),O=()=>p||S(),E=()=>!p||w();for(let C=u,M=u;C<=f;++C)b=t[C%o],!b.skip&&(v=c(b[n]),v!==x&&(p=l(v,i,a),g===null&&O()&&(g=s(v,i)===0?C:M),g!==null&&E()&&(m.push(E2({start:g,end:C,loop:d,count:o,style:h})),g=null),M=C,x=v));return g!==null&&m.push(E2({start:g,end:f,loop:d,count:o,style:h})),m}function SW(e,t){const r=[],n=e.segments;for(let i=0;i<n.length;i++){const a=_W(n[i],e.points,t);a.length&&r.push(...a)}return r}function OW(e,t,r,n){let i=0,a=t-1;if(r&&!n)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,r&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function AW(e,t,r,n){const i=e.length,a=[];let o=t,s=e[t],l;for(l=t+1;l<=r;++l){const c=e[l%i];c.skip||c.stop?s.skip||(n=!1,a.push({start:t%i,end:(l-1)%i,loop:n}),t=o=c.stop?l:null):(o=l,s.skip&&(t=l)),s=c}return o!==null&&a.push({start:t%i,end:o%i,loop:n}),a}function EW(e,t){const r=e.points,n=e.options.spanGaps,i=r.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=OW(r,i,a,n);if(n===!0)return P2(e,[{start:o,end:s,loop:a}],r,t);const l=s<o?s+i:s,c=!!e._fullLoop&&o===0&&s===i-1;return P2(e,AW(r,o,l,c),r,t)}function P2(e,t,r,n){return!n||!n.setContext||!r?t:PW(e,t,r,n)}function PW(e,t,r,n){const i=e._chart.getContext(),a=C2(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,l=r.length,c=[];let u=a,f=t[0].start,d=f;function h(m,p,g,v){const b=s?-1:1;if(m!==p){for(m+=l;r[m%l].skip;)m-=b;for(;r[p%l].skip;)p+=b;m%l!==p%l&&(c.push({start:m%l,end:p%l,loop:g,style:v}),u=v,f=p%l)}}for(const m of t){f=s?f:m.start;let p=r[f%l],g;for(d=f+1;d<=m.end;d++){const v=r[d%l];g=C2(n.setContext(hi(i,{type:"segment",p0:p,p1:v,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),CW(g,u)&&h(f,d-1,m.loop,u),p=v,u=g}f<d-1&&h(f,d-1,m.loop,u)}return c}function C2(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function CW(e,t){if(!t)return!1;const r=[],n=function(i,a){return Dp(a)?(r.includes(a)||r.push(a),r.indexOf(a)):a};return JSON.stringify(e,n)!==JSON.stringify(t,n)}function vc(e,t,r){return e.options.clip?e[r]:t[r]}function kW(e,t){const{xScale:r,yScale:n}=e;return r&&n?{left:vc(r,t,"left"),right:vc(r,t,"right"),top:vc(n,t,"top"),bottom:vc(n,t,"bottom")}:t}function TW(e,t){const r=t._clip;if(r.disabled)return!1;const n=kW(t,e.chartArea);return{left:r.left===!1?0:n.left-(r.left===!0?0:r.left),right:r.right===!1?e.width:n.right+(r.right===!0?0:r.right),top:r.top===!1?0:n.top-(r.top===!0?0:r.top),bottom:r.bottom===!1?e.height:n.bottom+(r.bottom===!0?0:r.bottom)}}/*!
209
+ */function rn(){}const a7=(()=>{let e=0;return()=>e++})();function Se(e){return e==null}function yt(e){if(Array.isArray&&Array.isArray(e))return!0;const t=Object.prototype.toString.call(e);return t.slice(0,7)==="[object"&&t.slice(-6)==="Array]"}function he(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function dr(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Tr(e,t){return dr(e)?e:t}function se(e,t){return typeof e>"u"?t:e}const o7=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,H2=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function Fe(e,t,r){if(e&&typeof e.call=="function")return e.apply(r,t)}function Ce(e,t,r,n){let i,a,o;if(yt(e))for(a=e.length,i=0;i<a;i++)t.call(r,e[i],i);else if(he(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(r,e[o[i]],o[i])}function oc(e,t){let r,n,i,a;if(!e||!t||e.length!==t.length)return!1;for(r=0,n=e.length;r<n;++r)if(i=e[r],a=t[r],i.datasetIndex!==a.datasetIndex||i.index!==a.index)return!1;return!0}function sc(e){if(yt(e))return e.map(sc);if(he(e)){const t=Object.create(null),r=Object.keys(e),n=r.length;let i=0;for(;i<n;++i)t[r[i]]=sc(e[r[i]]);return t}return e}function U2(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function s7(e,t,r,n){if(!U2(e))return;const i=t[e],a=r[e];he(i)&&he(a)?go(i,a,n):t[e]=sc(a)}function go(e,t,r){const n=yt(t)?t:[t],i=n.length;if(!he(e))return e;r=r||{};const a=r.merger||s7;let o;for(let s=0;s<i;++s){if(o=n[s],!he(o))continue;const l=Object.keys(o);for(let c=0,u=l.length;c<u;++c)a(l[c],e,o,r)}return e}function vo(e,t){return go(e,t,{merger:l7})}function l7(e,t,r){if(!U2(e))return;const n=t[e],i=r[e];he(n)&&he(i)?vo(n,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=sc(i))}const K2={"":e=>e,x:e=>e.x,y:e=>e.y};function c7(e){const t=e.split("."),r=[];let n="";for(const i of t)n+=i,n.endsWith("\\")?n=n.slice(0,-1)+".":(r.push(n),n="");return r}function u7(e){const t=c7(e);return r=>{for(const n of t){if(n==="")break;r=r&&r[n]}return r}}function li(e,t){return(K2[t]||(K2[t]=u7(t)))(e)}function Tp(e){return e.charAt(0).toUpperCase()+e.slice(1)}const yo=e=>typeof e<"u",Pn=e=>typeof e=="function",q2=(e,t)=>{if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0};function f7(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const je=Math.PI,Ge=2*je,d7=Ge+je,lc=Number.POSITIVE_INFINITY,h7=je/180,ft=je/2,ci=je/4,Y2=je*2/3,G2=Math.log10,Mr=Math.sign;function bo(e,t,r){return Math.abs(e-t)<r}function X2(e){const t=Math.round(e);e=bo(e,t,e/1e3)?t:e;const r=Math.pow(10,Math.floor(G2(e))),n=e/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function p7(e){const t=[],r=Math.sqrt(e);let n;for(n=1;n<r;n++)e%n===0&&(t.push(n),t.push(e/n));return r===(r|0)&&t.push(r),t.sort((i,a)=>i-a).pop(),t}function m7(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function xo(e){return!m7(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function g7(e,t){const r=Math.round(e);return r-t<=e&&r+t>=e}function v7(e,t,r){let n,i,a;for(n=0,i=e.length;n<i;n++)a=e[n][r],isNaN(a)||(t.min=Math.min(t.min,a),t.max=Math.max(t.max,a))}function nn(e){return e*(je/180)}function y7(e){return e*(180/je)}function Z2(e){if(!dr(e))return;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r++;return r}function J2(e,t){const r=t.x-e.x,n=t.y-e.y,i=Math.sqrt(r*r+n*n);let a=Math.atan2(n,r);return a<-.5*je&&(a+=Ge),{angle:a,distance:i}}function Mp(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function b7(e,t){return(e-t+d7)%Ge-je}function gr(e){return(e%Ge+Ge)%Ge}function wo(e,t,r,n){const i=gr(e),a=gr(t),o=gr(r),s=gr(a-i),l=gr(o-i),c=gr(i-a),u=gr(i-o);return i===a||i===o||n&&a===o||s>l&&c<u}function Ct(e,t,r){return Math.max(t,Math.min(r,e))}function x7(e){return Ct(e,-32768,32767)}function Cn(e,t,r,n=1e-6){return e>=Math.min(t,r)-n&&e<=Math.max(t,r)+n}function jp(e,t,r){r=r||(o=>e[o]<t);let n=e.length-1,i=0,a;for(;n-i>1;)a=i+n>>1,r(a)?i=a:n=a;return{lo:i,hi:n}}const ui=(e,t,r,n)=>jp(e,r,n?i=>{const a=e[i][t];return a<r||a===r&&e[i+1][t]===r}:i=>e[i][t]<r),w7=(e,t,r)=>jp(e,r,n=>e[n][t]>=r);function _7(e,t,r){let n=0,i=e.length;for(;n<i&&e[n]<t;)n++;for(;i>n&&e[i-1]>r;)i--;return n>0||i<e.length?e.slice(n,i):e}const Q2=["push","pop","shift","splice","unshift"];function S7(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),Q2.forEach(r=>{const n="_onData"+Tp(r),i=e[r];Object.defineProperty(e,r,{configurable:!0,enumerable:!1,value(...a){const o=i.apply(this,a);return e._chartjs.listeners.forEach(s=>{typeof s[n]=="function"&&s[n](...a)}),o}})})}function eS(e,t){const r=e._chartjs;if(!r)return;const n=r.listeners,i=n.indexOf(t);i!==-1&&n.splice(i,1),!(n.length>0)&&(Q2.forEach(a=>{delete e[a]}),delete e._chartjs)}function tS(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const rS=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function nS(e,t){let r=[],n=!1;return function(...i){r=i,n||(n=!0,rS.call(window,()=>{n=!1,e.apply(t,r)}))}}function O7(e,t){let r;return function(...n){return t?(clearTimeout(r),r=setTimeout(e,t,n)):e.apply(this,n),t}}const iS=e=>e==="start"?"left":e==="end"?"right":"center",er=(e,t,r)=>e==="start"?t:e==="end"?r:(t+r)/2,A7=(e,t,r,n)=>e===(n?"left":"right")?r:e==="center"?(t+r)/2:t;function E7(e,t,r){const n=t.length;let i=0,a=n;if(e._sorted){const{iScale:o,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=o.axis,{min:f,max:d,minDefined:h,maxDefined:m}=o.getUserBounds();if(h){if(i=Math.min(ui(l,u,f).lo,r?n:ui(t,u,o.getPixelForValue(f)).lo),c){const p=l.slice(0,i+1).reverse().findIndex(g=>!Se(g[s.axis]));i-=Math.max(0,p)}i=Ct(i,0,n-1)}if(m){let p=Math.max(ui(l,o.axis,d,!0).hi+1,r?0:ui(t,u,o.getPixelForValue(d),!0).hi+1);if(c){const g=l.slice(p-1).findIndex(v=>!Se(v[s.axis]));p+=Math.max(0,g)}a=Ct(p,i,n)-i}else a=n-i}return{start:i,count:a}}function P7(e){const{xScale:t,yScale:r,_scaleRanges:n}=e,i={xmin:t.min,xmax:t.max,ymin:r.min,ymax:r.max};if(!n)return e._scaleRanges=i,!0;const a=n.xmin!==t.min||n.xmax!==t.max||n.ymin!==r.min||n.ymax!==r.max;return Object.assign(n,i),a}const cc=e=>e===0||e===1,aS=(e,t,r)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Ge/r)),oS=(e,t,r)=>Math.pow(2,-10*e)*Math.sin((e-t)*Ge/r)+1,_o={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>-e*(e-2),easeInOutQuad:e=>(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1),easeInCubic:e=>e*e*e,easeOutCubic:e=>(e-=1)*e*e+1,easeInOutCubic:e=>(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2),easeInQuart:e=>e*e*e*e,easeOutQuart:e=>-((e-=1)*e*e*e-1),easeInOutQuart:e=>(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2),easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>(e-=1)*e*e*e*e+1,easeInOutQuint:e=>(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2),easeInSine:e=>-Math.cos(e*ft)+1,easeOutSine:e=>Math.sin(e*ft),easeInOutSine:e=>-.5*(Math.cos(je*e)-1),easeInExpo:e=>e===0?0:Math.pow(2,10*(e-1)),easeOutExpo:e=>e===1?1:-Math.pow(2,-10*e)+1,easeInOutExpo:e=>cc(e)?e:e<.5?.5*Math.pow(2,10*(e*2-1)):.5*(-Math.pow(2,-10*(e*2-1))+2),easeInCirc:e=>e>=1?e:-(Math.sqrt(1-e*e)-1),easeOutCirc:e=>Math.sqrt(1-(e-=1)*e),easeInOutCirc:e=>(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1),easeInElastic:e=>cc(e)?e:aS(e,.075,.3),easeOutElastic:e=>cc(e)?e:oS(e,.075,.3),easeInOutElastic(e){return cc(e)?e:e<.5?.5*aS(e*2,.1125,.45):.5+.5*oS(e*2-1,.1125,.45)},easeInBack(e){return e*e*((1.70158+1)*e-1.70158)},easeOutBack(e){return(e-=1)*e*((1.70158+1)*e+1.70158)+1},easeInOutBack(e){let t=1.70158;return(e/=.5)<1?.5*(e*e*(((t*=1.525)+1)*e-t)):.5*((e-=2)*e*(((t*=1.525)+1)*e+t)+2)},easeInBounce:e=>1-_o.easeOutBounce(1-e),easeOutBounce(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:e=>e<.5?_o.easeInBounce(e*2)*.5:_o.easeOutBounce(e*2-1)*.5+.5};function Dp(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function sS(e){return Dp(e)?e:new mo(e)}function Np(e){return Dp(e)?e:new mo(e).saturate(.5).darken(.1).hexString()}const C7=["x","y","borderWidth","radius","tension"],k7=["color","borderColor","backgroundColor"];function T7(e){e.set("animation",{delay:void 0,duration:1e3,easing:"easeOutQuart",fn:void 0,from:void 0,loop:void 0,to:void 0,type:void 0}),e.describe("animation",{_fallback:!1,_indexable:!1,_scriptable:t=>t!=="onProgress"&&t!=="onComplete"&&t!=="fn"}),e.set("animations",{colors:{type:"color",properties:k7},numbers:{type:"number",properties:C7}}),e.describe("animations",{_fallback:"animation"}),e.set("transitions",{active:{animation:{duration:400}},resize:{animation:{duration:0}},show:{animations:{colors:{from:"transparent"},visible:{type:"boolean",duration:0}}},hide:{animations:{colors:{to:"transparent"},visible:{type:"boolean",easing:"linear",fn:t=>t|0}}}})}function M7(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const lS=new Map;function j7(e,t){t=t||{};const r=e+JSON.stringify(t);let n=lS.get(r);return n||(n=new Intl.NumberFormat(e,t),lS.set(r,n)),n}function Ip(e,t,r){return j7(t,r).format(e)}const D7={values(e){return yt(e)?e:""+e},numeric(e,t,r){if(e===0)return"0";const n=this.chart.options.locale;let i,a=e;if(r.length>1){const c=Math.max(Math.abs(r[0].value),Math.abs(r[r.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),a=N7(e,r)}const o=G2(Math.abs(a)),s=isNaN(o)?1:Math.max(Math.min(-1*Math.floor(o),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Ip(e,n,l)}};function N7(e,t){let r=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(r)>=1&&e!==Math.floor(e)&&(r=e-Math.floor(e)),r}var cS={formatters:D7};function I7(e){e.set("scale",{display:!0,offset:!1,reverse:!1,beginAtZero:!1,bounds:"ticks",clip:!0,grace:0,grid:{display:!0,lineWidth:1,drawOnChartArea:!0,drawTicks:!0,tickLength:8,tickWidth:(t,r)=>r.lineWidth,tickColor:(t,r)=>r.color,offset:!1},border:{display:!0,dash:[],dashOffset:0,width:1},title:{display:!1,text:"",padding:{top:4,bottom:4}},ticks:{minRotation:0,maxRotation:50,mirror:!1,textStrokeWidth:0,textStrokeColor:"",padding:3,display:!0,autoSkip:!0,autoSkipPadding:3,labelOffset:0,callback:cS.formatters.values,minor:{},major:{},align:"center",crossAlign:"near",showLabelBackdrop:!1,backdropColor:"rgba(255, 255, 255, 0.75)",backdropPadding:2}}),e.route("scale.ticks","color","","color"),e.route("scale.grid","color","","borderColor"),e.route("scale.border","color","","borderColor"),e.route("scale.title","color","","color"),e.describe("scale",{_fallback:!1,_scriptable:t=>!t.startsWith("before")&&!t.startsWith("after")&&t!=="callback"&&t!=="parser",_indexable:t=>t!=="borderDash"&&t!=="tickBorderDash"&&t!=="dash"}),e.describe("scales",{_fallback:"scale"}),e.describe("scale.ticks",{_scriptable:t=>t!=="backdropPadding"&&t!=="callback",_indexable:t=>t!=="backdropPadding"})}const fi=Object.create(null),$p=Object.create(null);function So(e,t){if(!t)return e;const r=t.split(".");for(let n=0,i=r.length;n<i;++n){const a=r[n];e=e[a]||(e[a]=Object.create(null))}return e}function Rp(e,t,r){return typeof t=="string"?go(So(e,t),r):go(So(e,""),t)}class $7{constructor(t,r){this.animation=void 0,this.backgroundColor="rgba(0,0,0,0.1)",this.borderColor="rgba(0,0,0,0.1)",this.color="#666",this.datasets={},this.devicePixelRatio=n=>n.chart.platform.getDevicePixelRatio(),this.elements={},this.events=["mousemove","mouseout","click","touchstart","touchmove"],this.font={family:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",size:12,style:"normal",lineHeight:1.2,weight:null},this.hover={},this.hoverBackgroundColor=(n,i)=>Np(i.backgroundColor),this.hoverBorderColor=(n,i)=>Np(i.borderColor),this.hoverColor=(n,i)=>Np(i.color),this.indexAxis="x",this.interaction={mode:"nearest",intersect:!0,includeInvisible:!1},this.maintainAspectRatio=!0,this.onHover=null,this.onClick=null,this.parsing=!0,this.plugins={},this.responsive=!0,this.scale=void 0,this.scales={},this.showLine=!0,this.drawActiveElementsOnTop=!0,this.describe(t),this.apply(r)}set(t,r){return Rp(this,t,r)}get(t){return So(this,t)}describe(t,r){return Rp($p,t,r)}override(t,r){return Rp(fi,t,r)}route(t,r,n,i){const a=So(this,t),o=So(this,n),s="_"+r;Object.defineProperties(a,{[s]:{value:a[r],writable:!0},[r]:{enumerable:!0,get(){const l=this[s],c=o[i];return he(l)?Object.assign({},c,l):se(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(r=>r(this))}}var et=new $7({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[T7,M7,I7]);function R7(e){return!e||Se(e.size)||Se(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function uS(e,t,r,n,i){let a=t[i];return a||(a=t[i]=e.measureText(i).width,r.push(i)),a>n&&(n=a),n}function di(e,t,r){const n=e.currentDevicePixelRatio,i=r!==0?Math.max(r/2,.5):0;return Math.round((t-i)*n)/n+i}function fS(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function Lp(e,t,r,n){dS(e,t,r,n,null)}function dS(e,t,r,n,i){let a,o,s,l,c,u,f,d;const h=t.pointStyle,m=t.rotation,p=t.radius;let g=(m||0)*h7;if(h&&typeof h=="object"&&(a=h.toString(),a==="[object HTMLImageElement]"||a==="[object HTMLCanvasElement]")){e.save(),e.translate(r,n),e.rotate(g),e.drawImage(h,-h.width/2,-h.height/2,h.width,h.height),e.restore();return}if(!(isNaN(p)||p<=0)){switch(e.beginPath(),h){default:i?e.ellipse(r,n,i/2,p,0,0,Ge):e.arc(r,n,p,0,Ge),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=Y2,e.lineTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=Y2,e.lineTo(r+Math.sin(g)*u,n-Math.cos(g)*p),e.closePath();break;case"rectRounded":c=p*.516,l=p-c,o=Math.cos(g+ci)*l,f=Math.cos(g+ci)*(i?i/2-c:l),s=Math.sin(g+ci)*l,d=Math.sin(g+ci)*(i?i/2-c:l),e.arc(r-f,n-s,c,g-je,g-ft),e.arc(r+d,n-o,c,g-ft,g),e.arc(r+f,n+s,c,g,g+ft),e.arc(r-d,n+o,c,g+ft,g+je),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*p,u=i?i/2:l,e.rect(r-u,n-l,2*u,2*l);break}g+=ci;case"rectRot":f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+d,n-o),e.lineTo(r+f,n+s),e.lineTo(r-d,n+o),e.closePath();break;case"crossRot":g+=ci;case"cross":f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+f,n+s),e.moveTo(r+d,n-o),e.lineTo(r-d,n+o);break;case"star":f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+f,n+s),e.moveTo(r+d,n-o),e.lineTo(r-d,n+o),g+=ci,f=Math.cos(g)*(i?i/2:p),o=Math.cos(g)*p,s=Math.sin(g)*p,d=Math.sin(g)*(i?i/2:p),e.moveTo(r-f,n-s),e.lineTo(r+f,n+s),e.moveTo(r+d,n-o),e.lineTo(r-d,n+o);break;case"line":o=i?i/2:Math.cos(g)*p,s=Math.sin(g)*p,e.moveTo(r-o,n-s),e.lineTo(r+o,n+s);break;case"dash":e.moveTo(r,n),e.lineTo(r+Math.cos(g)*(i?i/2:p),n+Math.sin(g)*p);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function Oo(e,t,r){return r=r||.5,!t||e&&e.x>t.left-r&&e.x<t.right+r&&e.y>t.top-r&&e.y<t.bottom+r}function Fp(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Bp(e){e.restore()}function L7(e,t,r,n,i){if(!t)return e.lineTo(r.x,r.y);if(i==="middle"){const a=(t.x+r.x)/2;e.lineTo(a,t.y),e.lineTo(a,r.y)}else i==="after"!=!!n?e.lineTo(t.x,r.y):e.lineTo(r.x,t.y);e.lineTo(r.x,r.y)}function F7(e,t,r,n){if(!t)return e.lineTo(r.x,r.y);e.bezierCurveTo(n?t.cp1x:t.cp2x,n?t.cp1y:t.cp2y,n?r.cp2x:r.cp1x,n?r.cp2y:r.cp1y,r.x,r.y)}function B7(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Se(t.rotation)||e.rotate(t.rotation),t.color&&(e.fillStyle=t.color),t.textAlign&&(e.textAlign=t.textAlign),t.textBaseline&&(e.textBaseline=t.textBaseline)}function z7(e,t,r,n,i){if(i.strikethrough||i.underline){const a=e.measureText(n),o=t-a.actualBoundingBoxLeft,s=t+a.actualBoundingBoxRight,l=r-a.actualBoundingBoxAscent,c=r+a.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(o,u),e.lineTo(s,u),e.stroke()}}function W7(e,t){const r=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=r}function uc(e,t,r,n,i,a={}){const o=yt(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,B7(e,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&W7(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Se(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,r,n,a.maxWidth)),e.fillText(c,r,n,a.maxWidth),z7(e,r,n,c,a),n+=Number(i.lineHeight);e.restore()}function fc(e,t){const{x:r,y:n,w:i,h:a,radius:o}=t;e.arc(r+o.topLeft,n+o.topLeft,o.topLeft,1.5*je,je,!0),e.lineTo(r,n+a-o.bottomLeft),e.arc(r+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,je,ft,!0),e.lineTo(r+i-o.bottomRight,n+a),e.arc(r+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,ft,0,!0),e.lineTo(r+i,n+o.topRight),e.arc(r+i-o.topRight,n+o.topRight,o.topRight,0,-ft,!0),e.lineTo(r+o.topLeft,n)}const V7=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,H7=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function U7(e,t){const r=(""+e).match(V7);if(!r||r[1]==="normal")return t*1.2;switch(e=+r[2],r[3]){case"px":return e;case"%":e/=100;break}return t*e}const K7=e=>+e||0;function zp(e,t){const r={},n=he(t),i=n?Object.keys(t):t,a=he(e)?n?o=>se(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)r[o]=K7(a(o));return r}function hS(e){return zp(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Ji(e){return zp(e,["topLeft","topRight","bottomLeft","bottomRight"])}function vr(e){const t=hS(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Rt(e,t){e=e||{},t=t||et.font;let r=se(e.size,t.size);typeof r=="string"&&(r=parseInt(r,10));let n=se(e.style,t.style);n&&!(""+n).match(H7)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:se(e.family,t.family),lineHeight:U7(se(e.lineHeight,t.lineHeight),r),size:r,style:n,weight:se(e.weight,t.weight),string:""};return i.string=R7(i),i}function dc(e,t,r,n){let i,a,o;for(i=0,a=e.length;i<a;++i)if(o=e[i],o!==void 0&&o!==void 0)return o}function q7(e,t,r){const{min:n,max:i}=e,a=H2(t,(i-n)/2),o=(s,l)=>r&&s===0?0:s+l;return{min:o(n,-Math.abs(a)),max:o(i,a)}}function hi(e,t){return Object.assign(Object.create(e),t)}function Wp(e,t=[""],r,n,i=()=>e[0]){const a=r||e;typeof n>"u"&&(n=yS("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:n,_getTarget:i,override:s=>Wp([s,...e],t,a,n)};return new Proxy(o,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return mS(s,l,()=>tW(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return bS(s).includes(l)},ownKeys(s){return bS(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Qi(e,t,r,n){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:r,_stack:new Set,_descriptors:pS(e,n),setContext:a=>Qi(e,a,r,n),override:a=>Qi(e.override(a),t,r,n)};return new Proxy(i,{deleteProperty(a,o){return delete a[o],delete e[o],!0},get(a,o,s){return mS(a,o,()=>G7(a,o,s))},getOwnPropertyDescriptor(a,o){return a._descriptors.allKeys?Reflect.has(e,o)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,o)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(a,o){return Reflect.has(e,o)},ownKeys(){return Reflect.ownKeys(e)},set(a,o,s){return e[o]=s,delete a[o],!0}})}function pS(e,t={scriptable:!0,indexable:!0}){const{_scriptable:r=t.scriptable,_indexable:n=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:r,indexable:n,isScriptable:Pn(r)?r:()=>r,isIndexable:Pn(n)?n:()=>n}}const Y7=(e,t)=>e?e+Tp(t):t,Vp=(e,t)=>he(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function mS(e,t,r){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const n=r();return e[t]=n,n}function G7(e,t,r){const{_proxy:n,_context:i,_subProxy:a,_descriptors:o}=e;let s=n[t];return Pn(s)&&o.isScriptable(t)&&(s=X7(t,s,e,r)),yt(s)&&s.length&&(s=Z7(t,s,e,o.isIndexable)),Vp(t,s)&&(s=Qi(s,i,a&&a[t],o)),s}function X7(e,t,r,n){const{_proxy:i,_context:a,_subProxy:o,_stack:s}=r;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(a,o||n);return s.delete(e),Vp(e,l)&&(l=Hp(i._scopes,i,e,l)),l}function Z7(e,t,r,n){const{_proxy:i,_context:a,_subProxy:o,_descriptors:s}=r;if(typeof a.index<"u"&&n(e))return t[a.index%t.length];if(he(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const f=Hp(c,i,e,u);t.push(Qi(f,a,o&&o[e],s))}}return t}function gS(e,t,r){return Pn(e)?e(t,r):e}const J7=(e,t)=>e===!0?t:typeof e=="string"?li(t,e):void 0;function Q7(e,t,r,n,i){for(const a of t){const o=J7(r,a);if(o){e.add(o);const s=gS(o._fallback,r,i);if(typeof s<"u"&&s!==r&&s!==n)return s}else if(o===!1&&typeof n<"u"&&r!==n)return null}return!1}function Hp(e,t,r,n){const i=t._rootScopes,a=gS(t._fallback,r,n),o=[...e,...i],s=new Set;s.add(n);let l=vS(s,o,r,a||r,n);return l===null||typeof a<"u"&&a!==r&&(l=vS(s,o,a,l,n),l===null)?!1:Wp(Array.from(s),[""],i,a,()=>eW(t,r,n))}function vS(e,t,r,n,i){for(;r;)r=Q7(e,t,r,n,i);return r}function eW(e,t,r){const n=e._getTarget();t in n||(n[t]={});const i=n[t];return yt(i)&&he(r)?r:i||{}}function tW(e,t,r,n){let i;for(const a of t)if(i=yS(Y7(a,e),r),typeof i<"u")return Vp(e,i)?Hp(r,n,e,i):i}function yS(e,t){for(const r of t){if(!r)continue;const n=r[e];if(typeof n<"u")return n}}function bS(e){let t=e._keys;return t||(t=e._keys=rW(e._scopes)),t}function rW(e){const t=new Set;for(const r of e)for(const n of Object.keys(r).filter(i=>!i.startsWith("_")))t.add(n);return Array.from(t)}const nW=Number.EPSILON||1e-14,ea=(e,t)=>t<e.length&&!e[t].skip&&e[t],xS=e=>e==="x"?"y":"x";function iW(e,t,r,n){const i=e.skip?t:e,a=t,o=r.skip?t:r,s=Mp(a,i),l=Mp(o,a);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const f=n*c,d=n*u;return{previous:{x:a.x-f*(o.x-i.x),y:a.y-f*(o.y-i.y)},next:{x:a.x+d*(o.x-i.x),y:a.y+d*(o.y-i.y)}}}function aW(e,t,r){const n=e.length;let i,a,o,s,l,c=ea(e,0);for(let u=0;u<n-1;++u)if(l=c,c=ea(e,u+1),!(!l||!c)){if(bo(t[u],0,nW)){r[u]=r[u+1]=0;continue}i=r[u]/t[u],a=r[u+1]/t[u],s=Math.pow(i,2)+Math.pow(a,2),!(s<=9)&&(o=3/Math.sqrt(s),r[u]=i*o*t[u],r[u+1]=a*o*t[u])}}function oW(e,t,r="x"){const n=xS(r),i=e.length;let a,o,s,l=ea(e,0);for(let c=0;c<i;++c){if(o=s,s=l,l=ea(e,c+1),!s)continue;const u=s[r],f=s[n];o&&(a=(u-o[r])/3,s[`cp1${r}`]=u-a,s[`cp1${n}`]=f-a*t[c]),l&&(a=(l[r]-u)/3,s[`cp2${r}`]=u+a,s[`cp2${n}`]=f+a*t[c])}}function sW(e,t="x"){const r=xS(t),n=e.length,i=Array(n).fill(0),a=Array(n);let o,s,l,c=ea(e,0);for(o=0;o<n;++o)if(s=l,l=c,c=ea(e,o+1),!!l){if(c){const u=c[t]-l[t];i[o]=u!==0?(c[r]-l[r])/u:0}a[o]=s?c?Mr(i[o-1])!==Mr(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}aW(e,i,a),oW(e,a,t)}function hc(e,t,r){return Math.max(Math.min(e,r),t)}function lW(e,t){let r,n,i,a,o,s=Oo(e[0],t);for(r=0,n=e.length;r<n;++r)o=a,a=s,s=r<n-1&&Oo(e[r+1],t),a&&(i=e[r],o&&(i.cp1x=hc(i.cp1x,t.left,t.right),i.cp1y=hc(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=hc(i.cp2x,t.left,t.right),i.cp2y=hc(i.cp2y,t.top,t.bottom)))}function cW(e,t,r,n,i){let a,o,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")sW(e,i);else{let c=n?e[e.length-1]:e[0];for(a=0,o=e.length;a<o;++a)s=e[a],l=iW(c,s,e[Math.min(a+1,o-(n?0:1))%o],t.tension),s.cp1x=l.previous.x,s.cp1y=l.previous.y,s.cp2x=l.next.x,s.cp2y=l.next.y,c=s}t.capBezierPoints&&lW(e,r)}function Up(){return typeof window<"u"&&typeof document<"u"}function Kp(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function pc(e,t,r){let n;return typeof e=="string"?(n=parseInt(e,10),e.indexOf("%")!==-1&&(n=n/100*t.parentNode[r])):n=e,n}const mc=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function uW(e,t){return mc(e).getPropertyValue(t)}const fW=["top","right","bottom","left"];function pi(e,t,r){const n={};r=r?"-"+r:"";for(let i=0;i<4;i++){const a=fW[i];n[a]=parseFloat(e[t+"-"+a+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const dW=(e,t,r)=>(e>0||t>0)&&(!r||!r.shadowRoot);function hW(e,t){const r=e.touches,n=r&&r.length?r[0]:e,{offsetX:i,offsetY:a}=n;let o=!1,s,l;if(dW(i,a,e.target))s=i,l=a;else{const c=t.getBoundingClientRect();s=n.clientX-c.left,l=n.clientY-c.top,o=!0}return{x:s,y:l,box:o}}function mi(e,t){if("native"in e)return e;const{canvas:r,currentDevicePixelRatio:n}=t,i=mc(r),a=i.boxSizing==="border-box",o=pi(i,"padding"),s=pi(i,"border","width"),{x:l,y:c,box:u}=hW(e,r),f=o.left+(u&&s.left),d=o.top+(u&&s.top);let{width:h,height:m}=t;return a&&(h-=o.width+s.width,m-=o.height+s.height),{x:Math.round((l-f)/h*r.width/n),y:Math.round((c-d)/m*r.height/n)}}function pW(e,t,r){let n,i;if(t===void 0||r===void 0){const a=e&&Kp(e);if(!a)t=e.clientWidth,r=e.clientHeight;else{const o=a.getBoundingClientRect(),s=mc(a),l=pi(s,"border","width"),c=pi(s,"padding");t=o.width-c.width-l.width,r=o.height-c.height-l.height,n=pc(s.maxWidth,a,"clientWidth"),i=pc(s.maxHeight,a,"clientHeight")}}return{width:t,height:r,maxWidth:n||lc,maxHeight:i||lc}}const gc=e=>Math.round(e*10)/10;function mW(e,t,r,n){const i=mc(e),a=pi(i,"margin"),o=pc(i.maxWidth,e,"clientWidth")||lc,s=pc(i.maxHeight,e,"clientHeight")||lc,l=pW(e,t,r);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=pi(i,"border","width"),h=pi(i,"padding");c-=h.width+d.width,u-=h.height+d.height}return c=Math.max(0,c-a.width),u=Math.max(0,n?c/n:u-a.height),c=gc(Math.min(c,o,l.maxWidth)),u=gc(Math.min(u,s,l.maxHeight)),c&&!u&&(u=gc(c/2)),(t!==void 0||r!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=gc(Math.floor(u*n))),{width:c,height:u}}function wS(e,t,r){const n=t||1,i=Math.floor(e.height*n),a=Math.floor(e.width*n);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const o=e.canvas;return o.style&&(r||!o.style.height&&!o.style.width)&&(o.style.height=`${e.height}px`,o.style.width=`${e.width}px`),e.currentDevicePixelRatio!==n||o.height!==i||o.width!==a?(e.currentDevicePixelRatio=n,o.height=i,o.width=a,e.ctx.setTransform(n,0,0,n,0,0),!0):!1}const gW=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Up()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function _S(e,t){const r=uW(e,t),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function gi(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:e.y+r*(t.y-e.y)}}function vW(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:n==="middle"?r<.5?e.y:t.y:n==="after"?r<1?e.y:t.y:r>0?t.y:e.y}}function yW(e,t,r,n){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=gi(e,i,r),s=gi(i,a,r),l=gi(a,t,r),c=gi(o,s,r),u=gi(s,l,r);return gi(c,u,r)}const bW=function(e,t){return{x(r){return e+e+t-r},setWidth(r){t=r},textAlign(r){return r==="center"?r:r==="right"?"left":"right"},xPlus(r,n){return r-n},leftForLtr(r,n){return r-n}}},xW=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function ta(e,t,r){return e?bW(t,r):xW()}function SS(e,t){let r,n;(t==="ltr"||t==="rtl")&&(r=e.canvas.style,n=[r.getPropertyValue("direction"),r.getPropertyPriority("direction")],r.setProperty("direction",t,"important"),e.prevTextDirection=n)}function OS(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function AS(e){return e==="angle"?{between:wo,compare:b7,normalize:gr}:{between:Cn,compare:(t,r)=>t-r,normalize:t=>t}}function ES({start:e,end:t,count:r,loop:n,style:i}){return{start:e%r,end:t%r,loop:n&&(t-e+1)%r===0,style:i}}function wW(e,t,r){const{property:n,start:i,end:a}=r,{between:o,normalize:s}=AS(n),l=t.length;let{start:c,end:u,loop:f}=e,d,h;if(f){for(c+=l,u+=l,d=0,h=l;d<h&&o(s(t[c%l][n]),i,a);++d)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:f,style:e.style}}function _W(e,t,r){if(!r)return[e];const{property:n,start:i,end:a}=r,o=t.length,{compare:s,between:l,normalize:c}=AS(n),{start:u,end:f,loop:d,style:h}=wW(e,t,r),m=[];let p=!1,g=null,v,b,x;const S=()=>l(i,x,v)&&s(i,x)!==0,w=()=>s(a,v)===0||l(a,x,v),O=()=>p||S(),E=()=>!p||w();for(let C=u,M=u;C<=f;++C)b=t[C%o],!b.skip&&(v=c(b[n]),v!==x&&(p=l(v,i,a),g===null&&O()&&(g=s(v,i)===0?C:M),g!==null&&E()&&(m.push(ES({start:g,end:C,loop:d,count:o,style:h})),g=null),M=C,x=v));return g!==null&&m.push(ES({start:g,end:f,loop:d,count:o,style:h})),m}function SW(e,t){const r=[],n=e.segments;for(let i=0;i<n.length;i++){const a=_W(n[i],e.points,t);a.length&&r.push(...a)}return r}function OW(e,t,r,n){let i=0,a=t-1;if(r&&!n)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,r&&(a+=i);a>i&&e[a%t].skip;)a--;return a%=t,{start:i,end:a}}function AW(e,t,r,n){const i=e.length,a=[];let o=t,s=e[t],l;for(l=t+1;l<=r;++l){const c=e[l%i];c.skip||c.stop?s.skip||(n=!1,a.push({start:t%i,end:(l-1)%i,loop:n}),t=o=c.stop?l:null):(o=l,s.skip&&(t=l)),s=c}return o!==null&&a.push({start:t%i,end:o%i,loop:n}),a}function EW(e,t){const r=e.points,n=e.options.spanGaps,i=r.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=OW(r,i,a,n);if(n===!0)return PS(e,[{start:o,end:s,loop:a}],r,t);const l=s<o?s+i:s,c=!!e._fullLoop&&o===0&&s===i-1;return PS(e,AW(r,o,l,c),r,t)}function PS(e,t,r,n){return!n||!n.setContext||!r?t:PW(e,t,r,n)}function PW(e,t,r,n){const i=e._chart.getContext(),a=CS(e.options),{_datasetIndex:o,options:{spanGaps:s}}=e,l=r.length,c=[];let u=a,f=t[0].start,d=f;function h(m,p,g,v){const b=s?-1:1;if(m!==p){for(m+=l;r[m%l].skip;)m-=b;for(;r[p%l].skip;)p+=b;m%l!==p%l&&(c.push({start:m%l,end:p%l,loop:g,style:v}),u=v,f=p%l)}}for(const m of t){f=s?f:m.start;let p=r[f%l],g;for(d=f+1;d<=m.end;d++){const v=r[d%l];g=CS(n.setContext(hi(i,{type:"segment",p0:p,p1:v,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),CW(g,u)&&h(f,d-1,m.loop,u),p=v,u=g}f<d-1&&h(f,d-1,m.loop,u)}return c}function CS(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function CW(e,t){if(!t)return!1;const r=[],n=function(i,a){return Dp(a)?(r.includes(a)||r.push(a),r.indexOf(a)):a};return JSON.stringify(e,n)!==JSON.stringify(t,n)}function vc(e,t,r){return e.options.clip?e[r]:t[r]}function kW(e,t){const{xScale:r,yScale:n}=e;return r&&n?{left:vc(r,t,"left"),right:vc(r,t,"right"),top:vc(n,t,"top"),bottom:vc(n,t,"bottom")}:t}function TW(e,t){const r=t._clip;if(r.disabled)return!1;const n=kW(t,e.chartArea);return{left:r.left===!1?0:n.left-(r.left===!0?0:r.left),right:r.right===!1?e.width:n.right+(r.right===!0?0:r.right),top:r.top===!1?0:n.top-(r.top===!0?0:r.top),bottom:r.bottom===!1?e.height:n.bottom+(r.bottom===!0?0:r.bottom)}}/*!
210
210
  * Chart.js v4.5.0
211
211
  * https://www.chartjs.org
212
212
  * (c) 2025 Chart.js Contributors
213
213
  * Released under the MIT License
214
- */class MW{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,r,n,i){const a=r.listeners[i],o=r.duration;a.forEach(s=>s({chart:t,initial:r.initial,numSteps:o,currentStep:Math.min(n-r.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=r2.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let r=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const a=n.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,n,t,"progress")),a.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),r+=a.length}),this._lastDate=t,r===0&&(this._running=!1)}_getAnims(t){const r=this._charts;let n=r.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(t,n)),n}listen(t,r,n){this._getAnims(t).listeners[r].push(n)}add(t,r){!r||!r.length||this._getAnims(t).items.push(...r)}has(t){return this._getAnims(t).items.length>0}start(t){const r=this._charts.get(t);r&&(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const r=this._charts.get(t);return!(!r||!r.running||!r.items.length)}stop(t){const r=this._charts.get(t);if(!r||!r.items.length)return;const n=r.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();r.items=[],this._notify(t,r,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var an=new MW;const k2="transparent",jW={boolean(e,t,r){return r>.5?t:e},color(e,t,r){const n=s2(e||k2),i=n.valid&&s2(t||k2);return i&&i.valid?i.mix(n,r).hexString():t},number(e,t,r){return e+(t-e)*r}};class DW{constructor(t,r,n,i){const a=r[n];i=dc([t.to,i,a,t.from]);const o=dc([t.from,a,i]);this._active=!0,this._fn=t.fn||jW[t.type||typeof o],this._easing=_o[t.easing]||_o.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=r,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,r,n){if(this._active){this._notify(!1);const i=this._target[this._prop],a=n-this._start,o=this._duration-a;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=dc([t.to,r,i,t.from]),this._from=dc([t.from,i,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const r=t-this._start,n=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||r<n),!this._active){this._target[i]=s,this._notify(!0);return}if(r<0){this._target[i]=a;return}l=r/n%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((r,n)=>{t.push({res:r,rej:n})})}_notify(t){const r=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][r]()}}class T2{constructor(t,r){this._chart=t,this._properties=new Map,this.configure(r)}configure(t){if(!he(t))return;const r=Object.keys(et.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!he(a))return;const o={};for(const s of r)o[s]=a[s];(yt(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!n.has(s))&&n.set(s,o)})})}_animateOptions(t,r){const n=r.options,i=IW(t,n);if(!i)return[];const a=this._createAnimations(i,n);return n.$shared&&NW(t.options.$animations,n).then(()=>{t.options=n},()=>{}),a}_createAnimations(t,r){const n=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(r),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,r));continue}const u=r[c];let f=a[c];const d=n.get(c);if(f)if(d&&f.active()){f.update(d,u,s);continue}else f.cancel();if(!d||!d.duration){t[c]=u;continue}a[c]=f=new DW(d,t,c,u),i.push(f)}return i}update(t,r){if(this._properties.size===0){Object.assign(t,r);return}const n=this._createAnimations(t,r);if(n.length)return an.add(this._chart,n),!0}}function NW(e,t){const r=[],n=Object.keys(t);for(let i=0;i<n.length;i++){const a=e[n[i]];a&&a.active()&&r.push(a.wait())}return Promise.all(r)}function IW(e,t){if(!t)return;let r=e.options;if(!r){e.options=t;return}return r.$shared&&(e.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}function M2(e,t){const r=e&&e.options||{},n=r.reverse,i=r.min===void 0?t:0,a=r.max===void 0?t:0;return{start:n?a:i,end:n?i:a}}function $W(e,t,r){if(r===!1)return!1;const n=M2(e,r),i=M2(t,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function RW(e){let t,r,n,i;return he(e)?(t=e.top,r=e.right,n=e.bottom,i=e.left):t=r=n=i=e,{top:t,right:r,bottom:n,left:i,disabled:e===!1}}function j2(e,t){const r=[],n=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=n.length;i<a;++i)r.push(n[i].index);return r}function D2(e,t,r,n={}){const i=e.keys,a=n.mode==="single";let o,s,l,c;if(t===null)return;let u=!1;for(o=0,s=i.length;o<s;++o){if(l=+i[o],l===r){if(u=!0,n.all)continue;break}c=e.values[l],dr(c)&&(a||t===0||Mr(t)===Mr(c))&&(t+=c)}return!u&&!n.all?0:t}function LW(e,t){const{iScale:r,vScale:n}=t,i=r.axis==="x"?"x":"y",a=n.axis==="x"?"x":"y",o=Object.keys(e),s=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],s[l]={[i]:u,[a]:e[u]};return s}function qp(e,t){const r=e&&e.options.stacked;return r||r===void 0&&t.stack!==void 0}function FW(e,t,r){return`${e.id}.${t.id}.${r.stack||r.type}`}function BW(e){const{min:t,max:r,minDefined:n,maxDefined:i}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:i?r:Number.POSITIVE_INFINITY}}function zW(e,t,r){const n=e[t]||(e[t]={});return n[r]||(n[r]={})}function N2(e,t,r,n){for(const i of t.getMatchingVisibleMetas(n).reverse()){const a=e[i.index];if(r&&a>0||!r&&a<0)return i.index}return null}function I2(e,t){const{chart:r,_cachedMeta:n}=e,i=r._stacks||(r._stacks={}),{iScale:a,vScale:o,index:s}=n,l=a.axis,c=o.axis,u=FW(a,o,n),f=t.length;let d;for(let h=0;h<f;++h){const m=t[h],{[l]:p,[c]:g}=m,v=m._stacks||(m._stacks={});d=v[c]=zW(i,u,p),d[s]=g,d._top=N2(d,o,!0,n.type),d._bottom=N2(d,o,!1,n.type);const b=d._visualValues||(d._visualValues={});b[s]=g}}function Yp(e,t){const r=e.scales;return Object.keys(r).filter(n=>r[n].axis===t).shift()}function WW(e,t){return hi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function VW(e,t,r){return hi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:r,index:t,mode:"default",type:"data"})}function Ao(e,t){const r=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[n]===void 0||a[n][r]===void 0)return;delete a[n][r],a[n]._visualValues!==void 0&&a[n]._visualValues[r]!==void 0&&delete a[n]._visualValues[r]}}}const Gp=e=>e==="reset"||e==="none",$2=(e,t)=>t?e:Object.assign({},e),HW=(e,t,r)=>e&&!t.hidden&&t._stacked&&{keys:j2(r,!0),values:null};class yc{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,r){this.chart=t,this._ctx=t.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=qp(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ao(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,r=this._cachedMeta,n=this.getDataset(),i=(f,d,h,m)=>f==="x"?d:f==="r"?m:h,a=r.xAxisID=se(n.xAxisID,Yp(t,"x")),o=r.yAxisID=se(n.yAxisID,Yp(t,"y")),s=r.rAxisID=se(n.rAxisID,Yp(t,"r")),l=r.indexAxis,c=r.iAxisID=i(l,a,o,s),u=r.vAxisID=i(l,o,a,s);r.xScale=this.getScaleForId(a),r.yScale=this.getScaleForId(o),r.rScale=this.getScaleForId(s),r.iScale=this.getScaleForId(c),r.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const r=this._cachedMeta;return t===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&e2(this._data,this),t._stacked&&Ao(t)}_dataCheck(){const t=this.getDataset(),r=t.data||(t.data=[]),n=this._data;if(he(r)){const i=this._cachedMeta;this._data=LW(r,i)}else if(n!==r){if(n){e2(n,this);const i=this._cachedMeta;Ao(i),i._parsed=[]}r&&Object.isExtensible(r)&&S7(r,this),this._syncList=[],this._data=r}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const r=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const a=r._stacked;r._stacked=qp(r.vScale,r),r.stack!==n.stack&&(i=!0,Ao(r),r.stack=n.stack),this._resyncElements(t),(i||a!==r._stacked)&&(I2(this,r._parsed),r._stacked=qp(r.vScale,r))}configure(){const t=this.chart.config,r=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),r,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,r){const{_cachedMeta:n,_data:i}=this,{iScale:a,_stacked:o}=n,s=a.axis;let l=t===0&&r===i.length?!0:n._sorted,c=t>0&&n._parsed[t-1],u,f,d;if(this._parsing===!1)n._parsed=i,n._sorted=!0,d=i;else{yt(i[t])?d=this.parseArrayData(n,i,t,r):he(i[t])?d=this.parseObjectData(n,i,t,r):d=this.parsePrimitiveData(n,i,t,r);const h=()=>f[s]===null||c&&f[s]<c[s];for(u=0;u<r;++u)n._parsed[u+t]=f=d[u],l&&(h()&&(l=!1),c=f);n._sorted=l}o&&I2(this,d)}parsePrimitiveData(t,r,n,i){const{iScale:a,vScale:o}=t,s=a.axis,l=o.axis,c=a.getLabels(),u=a===o,f=new Array(i);let d,h,m;for(d=0,h=i;d<h;++d)m=d+n,f[d]={[s]:u||a.parse(c[m],m),[l]:o.parse(r[m],m)};return f}parseArrayData(t,r,n,i){const{xScale:a,yScale:o}=t,s=new Array(i);let l,c,u,f;for(l=0,c=i;l<c;++l)u=l+n,f=r[u],s[l]={x:a.parse(f[0],u),y:o.parse(f[1],u)};return s}parseObjectData(t,r,n,i){const{xScale:a,yScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,f,d,h;for(u=0,f=i;u<f;++u)d=u+n,h=r[d],c[u]={x:a.parse(li(h,s),d),y:o.parse(li(h,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,r,n){const i=this.chart,a=this._cachedMeta,o=r[t.axis],s={keys:j2(i,!0),values:r._stacks[t.axis]._visualValues};return D2(s,o,a.index,{mode:n})}updateRangeFromParsed(t,r,n,i){const a=n[r.axis];let o=a===null?NaN:a;const s=i&&n._stacks[r.axis];i&&s&&(i.values=s,o=D2(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,r){const n=this._cachedMeta,i=n._parsed,a=n._sorted&&t===n.iScale,o=i.length,s=this._getOtherScale(t),l=HW(r,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=BW(s);let d,h;function m(){h=i[d];const p=h[s.axis];return!dr(h[t.axis])||u>p||f<p}for(d=0;d<o&&!(!m()&&(this.updateRangeFromParsed(c,t,h,l),a));++d);if(a){for(d=o-1;d>=0;--d)if(!m()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const r=this._cachedMeta._parsed,n=[];let i,a,o;for(i=0,a=r.length;i<a;++i)o=r[i][t.axis],dr(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const r=this._cachedMeta,n=r.iScale,i=r.vScale,a=this.getParsed(t);return{label:n?""+n.getLabelForValue(a[n.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const r=this._cachedMeta;this.update(t||"default"),r._clip=RW(se(this.options.clip,$W(r.xScale,r.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,r=this.chart,n=this._cachedMeta,i=n.data||[],a=r.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(n.dataset&&n.dataset.draw(t,a,s,l),u=s;u<s+l;++u){const f=i[u];f.hidden||(f.active&&c?o.push(f):f.draw(t,a))}for(u=0;u<o.length;++u)o[u].draw(t,a)}getStyle(t,r){const n=r?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,r,n){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=VW(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=WW(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!r,a.mode=n,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,r){return this._resolveElementOptions(this.dataElementType.id,r,t)}_resolveElementOptions(t,r="default",n){const i=r==="active",a=this._cachedDataOpts,o=t+"-"+r,s=a[o],l=this.enableOptionSharing&&yo(n);if(s)return $2(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),f=i?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),u),h=Object.keys(et.elements[t]),m=()=>this.getContext(n,i,r),p=c.resolveNamedOptions(d,h,m,f);return p.$shared&&(p.$shared=l,a[o]=Object.freeze($2(p,l))),p}_resolveAnimations(t,r,n){const i=this.chart,a=this._cachedDataOpts,o=`animation-${r}`,s=a[o];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,r),d=u.getOptionScopes(this.getDataset(),f);l=u.createResolver(d,this.getContext(t,n,r))}const c=new T2(i,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,r){return!r||Gp(t)||this.chart._animationsDisabled}_getSharedOptions(t,r){const n=this.resolveDataElementOptions(t,r),i=this._sharedOptions,a=this.getSharedOptions(n),o=this.includeOptions(r,a)||a!==i;return this.updateSharedOptions(a,r,n),{sharedOptions:a,includeOptions:o}}updateElement(t,r,n,i){Gp(i)?Object.assign(t,n):this._resolveAnimations(r,i).update(t,n)}updateSharedOptions(t,r,n){t&&!Gp(r)&&this._resolveAnimations(void 0,r).update(t,n)}_setStyle(t,r,n,i){t.active=i;const a=this.getStyle(r,i);this._resolveAnimations(r,n,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,r,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,r,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const r=this._data,n=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=n.length,a=r.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,r,n=!0){const i=this._cachedMeta,a=i.data,o=t+r;let s;const l=c=>{for(c.length+=r,s=c.length-1;s>=o;s--)c[s]=c[s-r]};for(l(a),s=t;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,r),n&&this.updateElements(a,t,r,"reset")}updateElements(t,r,n,i){}_removeElements(t,r){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,r);n._stacked&&Ao(n,i)}n.data.splice(t,r)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[r,n,i]=t;this[r](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,r){r&&this._sync(["_removeElements",t,r]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function UW(e,t){if(!e._cache.$bar){const r=e.getMatchingVisibleMetas(t);let n=[];for(let i=0,a=r.length;i<a;i++)n=n.concat(r[i].controller.getAllParsedValues(e));e._cache.$bar=t2(n.sort((i,a)=>i-a))}return e._cache.$bar}function KW(e){const t=e.iScale,r=UW(t,e.type);let n=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(yo(s)&&(n=Math.min(n,Math.abs(o-s)||n)),s=o)};for(i=0,a=r.length;i<a;++i)o=t.getPixelForValue(r[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),l();return n}function qW(e,t,r,n){const i=r.barThickness;let a,o;return Se(i)?(a=t.min*r.categoryPercentage,o=r.barPercentage):(a=i*n,o=1),{chunk:a/n,ratio:o,start:t.pixels[e]-a/2}}function YW(e,t,r,n){const i=t.pixels,a=i[e];let o=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=r.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);const c=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/n,ratio:r.barPercentage,start:c}}function GW(e,t,r,n){const i=r.parse(e[0],n),a=r.parse(e[1],n),o=Math.min(i,a),s=Math.max(i,a);let l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),t[r.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:o,max:s}}function R2(e,t,r,n){return yt(e)?GW(e,t,r,n):t[r.axis]=r.parse(e,n),t}function L2(e,t,r,n){const i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,l=[];let c,u,f,d;for(c=r,u=r+n;c<u;++c)d=t[c],f={},f[i.axis]=s||i.parse(o[c],c),l.push(R2(d,f,a,c));return l}function Xp(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function XW(e,t,r){return e!==0?Mr(e):(t.isHorizontal()?1:-1)*(t.min>=r?1:-1)}function ZW(e){let t,r,n,i,a;return e.horizontal?(t=e.base>e.x,r="left",n="right"):(t=e.base<e.y,r="bottom",n="top"),t?(i="end",a="start"):(i="start",a="end"),{start:r,end:n,reverse:t,top:i,bottom:a}}function JW(e,t,r,n){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:c,bottom:u}=ZW(e);i==="middle"&&r&&(e.enableBorderRadius=!0,(r._top||0)===n?i=c:(r._bottom||0)===n?i=u:(a[F2(u,o,s,l)]=!0,i=c)),a[F2(i,o,s,l)]=!0,e.borderSkipped=a}function F2(e,t,r,n){return n?(e=QW(e,t,r),e=B2(e,r,t)):e=B2(e,t,r),e}function QW(e,t,r){return e===t?r:e===r?t:e}function B2(e,t,r){return e==="start"?t:e==="end"?r:e}function eV(e,{inflateAmount:t},r){e.inflateAmount=t==="auto"?r===1?.33:0:t}class tV extends yc{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,r,n,i){return L2(t,r,n,i)}parseArrayData(t,r,n,i){return L2(t,r,n,i)}parseObjectData(t,r,n,i){const{iScale:a,vScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?s:l,u=o.axis==="x"?s:l,f=[];let d,h,m,p;for(d=n,h=n+i;d<h;++d)p=r[d],m={},m[a.axis]=a.parse(li(p,c),d),f.push(R2(li(p,u),m,o,d));return f}updateRangeFromParsed(t,r,n,i){super.updateRangeFromParsed(t,r,n,i);const a=n._custom;a&&r===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const r=this._cachedMeta,{iScale:n,vScale:i}=r,a=this.getParsed(t),o=a._custom,s=Xp(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+n.getLabelForValue(a[n.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const r=this._cachedMeta;this.updateElements(r.data,0,r.data.length,t)}updateElements(t,r,n,i){const a=i==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:d}=this._getSharedOptions(r,i);for(let h=r;h<r+n;h++){const m=this.getParsed(h),p=a||Se(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),g=this._calculateBarIndexPixels(h,u),v=(m._stacks||{})[s.axis],b={horizontal:c,base:p.base,enableBorderRadius:!v||Xp(m._custom)||o===v._top||o===v._bottom,x:c?p.head:g.center,y:c?g.center:p.head,height:c?g.size:Math.abs(p.size),width:c?Math.abs(p.size):g.size};d&&(b.options=f||this.resolveDataElementOptions(h,t[h].active?"active":i));const x=b.options||t[h].options;JW(b,x,v,o),eV(b,x,u.ratio),this.updateElement(t[h],h,b,i)}}_getStacks(t,r){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),a=n.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(r),l=s&&s[n.axis],c=u=>{const f=u._parsed.find(h=>h[n.axis]===l),d=f&&f[u.vScale.axis];if(Se(d)||isNaN(d))return!0};for(const u of i)if(!(r!==void 0&&c(u))&&((a===!1||o.indexOf(u.stack)===-1||a===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,r=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===r).shift()}_getAxis(){const t={},r=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[se(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,r)]=!0;return Object.keys(t)}_getStackIndex(t,r,n){const i=this._getStacks(t,n),a=r!==void 0?i.indexOf(r):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,r=this._cachedMeta,n=r.iScale,i=[];let a,o;for(a=0,o=r.data.length;a<o;++a)i.push(n.getPixelForValue(this.getParsed(a)[n.axis],a));const s=t.barThickness;return{min:s||KW(r),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:r,_stacked:n,index:i},options:{base:a,minBarLength:o}}=this,s=a||0,l=this.getParsed(t),c=l._custom,u=Xp(c);let f=l[r.axis],d=0,h=n?this.applyStack(r,l,n):f,m,p;h!==f&&(d=h-f,h=f),u&&(f=c.barStart,h=c.barEnd-c.barStart,f!==0&&Mr(f)!==Mr(c.barEnd)&&(d=0),d+=f);const g=!Se(a)&&!u?a:d;let v=r.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=r.getPixelForValue(d+h):m=v,p=m-v,Math.abs(p)<o){p=XW(p,r,s)*o,f===s&&(v-=p/2);const b=r.getPixelForDecimal(0),x=r.getPixelForDecimal(1),S=Math.min(b,x),w=Math.max(b,x);v=Math.max(Math.min(v,w),S),m=v+p,n&&!u&&(l._stacks[r.axis]._visualValues[i]=r.getValueForPixel(m)-r.getValueForPixel(v))}if(v===r.getPixelForValue(s)){const b=Mr(p)*r.getLineWidthForValue(s)/2;v+=b,p-=b}return{size:p,base:v,head:m,center:m+p/2}}_calculateBarIndexPixels(t,r){const n=r.scale,i=this.options,a=i.skipNull,o=se(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(r.grouped){const u=a?this._getStackCount(t):r.stackCount,f=i.barThickness==="flex"?YW(t,r,i,u*c):qW(t,r,i,u*c),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(se(d,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+h;s=f.start+f.chunk*m+f.chunk/2,l=Math.min(o,f.chunk*f.ratio)}else s=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(o,r.min*r.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,r=t.vScale,n=t.data,i=n.length;let a=0;for(;a<i;++a)this.getParsed(a)[r.axis]!==null&&!n[a].hidden&&n[a].draw(this._ctx)}}function rV(e,t,r){let n=1,i=1,a=0,o=0;if(t<Ge){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),f=Math.cos(l),d=Math.sin(l),h=(x,S,w)=>wo(x,s,l,!0)?1:Math.max(S,S*r,w,w*r),m=(x,S,w)=>wo(x,s,l,!0)?-1:Math.min(S,S*r,w,w*r),p=h(0,c,f),g=h(ft,u,d),v=m(je,c,f),b=m(je+ft,u,d);n=(p-v)/2,i=(g-b)/2,a=-(p+v)/2,o=-(g+b)/2}return{ratioX:n,ratioY:i,offsetX:a,offsetY:o}}class nV extends yc{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const r=t.data;if(r.labels.length&&r.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return r.labels.map((a,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}}};constructor(t,r){super(t,r),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,r){const n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let a=l=>+n[l];if(he(n[t])){const{key:l="value"}=this._parsing;a=c=>+li(n[c],l)}let o,s;for(o=t,s=t+r;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return nn(this.options.rotation-90)}_getCircumference(){return nn(this.options.circumference)}_getRotationExtents(){let t=Ge,r=-Ge;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,a=i._getRotation(),o=i._getCircumference();t=Math.min(t,a),r=Math.max(r,a+o)}return{rotation:t,circumference:r-t}}update(t){const r=this.chart,{chartArea:n}=r,i=this._cachedMeta,a=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(n.width,n.height)-o)/2,0),l=Math.min(o7(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:m,offsetY:p}=rV(f,u,l),g=(n.width-o)/d,v=(n.height-o)/h,b=Math.max(Math.min(g,v)/2,0),x=HS(this.options.radius,b),S=Math.max(x*l,0),w=(x-S)/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=p*x,i.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,r){const n=this.options,i=this._cachedMeta,a=this._getCircumference();return r&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/Ge)}updateElements(t,r,n,i){const a=i==="reset",o=this.chart,s=o.chartArea,c=o.options.animation,u=(s.left+s.right)/2,f=(s.top+s.bottom)/2,d=a&&c.animateScale,h=d?0:this.innerRadius,m=d?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(r,i);let v=this._getRotation(),b;for(b=0;b<r;++b)v+=this._circumference(b,a);for(b=r;b<r+n;++b){const x=this._circumference(b,a),S=t[b],w={x:u+this.offsetX,y:f+this.offsetY,startAngle:v,endAngle:v+x,circumference:x,outerRadius:m,innerRadius:h};g&&(w.options=p||this.resolveDataElementOptions(b,S.active?"active":i)),v+=x,this.updateElement(S,b,w,i)}}calculateTotal(){const t=this._cachedMeta,r=t.data;let n=0,i;for(i=0;i<r.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!r[i].hidden&&(n+=Math.abs(a))}return n}calculateCircumference(t){const r=this._cachedMeta.total;return r>0&&!isNaN(t)?Ge*(Math.abs(t)/r):0}getLabelAndValue(t){const r=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=Ip(r._parsed[t],n.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let r=0;const n=this.chart;let i,a,o,s,l;if(!t){for(i=0,a=n.data.datasets.length;i<a;++i)if(n.isDatasetVisible(i)){o=n.getDatasetMeta(i),t=o.data,s=o.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(r=Math.max(r,l.borderWidth||0,l.hoverBorderWidth||0));return r}getMaxOffset(t){let r=0;for(let n=0,i=t.length;n<i;++n){const a=this.resolveDataElementOptions(n);r=Math.max(r,a.offset||0,a.hoverOffset||0)}return r}_getRingWeightOffset(t){let r=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(r+=this._getRingWeight(n));return r}_getRingWeight(t){return Math.max(se(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class iV extends yc{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const r=this._cachedMeta,{dataset:n,data:i=[],_dataset:a}=r,o=this.chart._animationsDisabled;let{start:s,count:l}=E7(r,i,o);this._drawStart=s,this._drawCount=l,P7(r)&&(s=0,l=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,r,n,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(r,i),d=o.axis,h=s.axis,{spanGaps:m,segment:p}=this.options,g=xo(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",b=r+n,x=t.length;let S=r>0&&this.getParsed(r-1);for(let w=0;w<x;++w){const O=t[w],E=v?O:{};if(w<r||w>=b){E.skip=!0;continue}const C=this.getParsed(w),M=Se(C[h]),$=E[d]=o.getPixelForValue(C[d],w),j=E[h]=a||M?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,C,l):C[h],w);E.skip=isNaN($)||isNaN(j)||M,E.stop=w>0&&Math.abs(C[d]-S[d])>g,p&&(E.parsed=C,E.raw=c.data[w]),f&&(E.options=u||this.resolveDataElementOptions(w,O.active?"active":i)),v||this.updateElement(O,w,E,i),S=C}}getMaxOverflow(){const t=this._cachedMeta,r=t.dataset,n=r.options&&r.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function vi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Zp{static override(t){Object.assign(Zp.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return vi()}parse(){return vi()}format(){return vi()}add(){return vi()}diff(){return vi()}startOf(){return vi()}endOf(){return vi()}}var aV={_date:Zp};function oV(e,t,r,n){const{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const c=s._reversePixels?w7:ui;if(n){if(i._sharedOptions){const u=a[0],f=typeof u.getRange=="function"&&u.getRange(t);if(f){const d=c(a,t,r-f),h=c(a,t,r+f);return{lo:d.lo,hi:h.hi}}}}else{const u=c(a,t,r);if(l){const{vScale:f}=i._cachedMeta,{_parsed:d}=e,h=d.slice(0,u.lo+1).reverse().findIndex(p=>!Se(p[f.axis]));u.lo-=Math.max(0,h);const m=d.slice(u.hi).findIndex(p=>!Se(p[f.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:a.length-1}}function bc(e,t,r,n,i){const a=e.getSortedVisibleDatasetMetas(),o=r[t];for(let s=0,l=a.length;s<l;++s){const{index:c,data:u}=a[s],{lo:f,hi:d}=oV(a[s],t,o,i);for(let h=f;h<=d;++h){const m=u[h];m.skip||n(m,c,h)}}}function sV(e){const t=e.indexOf("x")!==-1,r=e.indexOf("y")!==-1;return function(n,i){const a=t?Math.abs(n.x-i.x):0,o=r?Math.abs(n.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function Jp(e,t,r,n,i){const a=[];return!i&&!e.isPointInArea(t)||bc(e,r,t,function(s,l,c){!i&&!Oo(s,e.chartArea,0)||s.inRange(t.x,t.y,n)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function lV(e,t,r,n){let i=[];function a(o,s,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],n),{angle:f}=JS(o,{x:t.x,y:t.y});wo(f,c,u)&&i.push({element:o,datasetIndex:s,index:l})}return bc(e,r,t,a),i}function cV(e,t,r,n,i,a){let o=[];const s=sV(r);let l=Number.POSITIVE_INFINITY;function c(u,f,d){const h=u.inRange(t.x,t.y,i);if(n&&!h)return;const m=u.getCenterPoint(i);if(!(!!a||e.isPointInArea(m))&&!h)return;const g=s(t,m);g<l?(o=[{element:u,datasetIndex:f,index:d}],l=g):g===l&&o.push({element:u,datasetIndex:f,index:d})}return bc(e,r,t,c),o}function Qp(e,t,r,n,i,a){return!a&&!e.isPointInArea(t)?[]:r==="r"&&!n?lV(e,t,r,i):cV(e,t,r,n,i,a)}function z2(e,t,r,n,i){const a=[],o=r==="x"?"inXRange":"inYRange";let s=!1;return bc(e,r,t,(l,c,u)=>{l[o]&&l[o](t[r],i)&&(a.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),n&&!s?[]:a}var uV={modes:{index(e,t,r,n){const i=mi(t,e),a=r.axis||"x",o=r.includeInvisible||!1,s=r.intersect?Jp(e,i,a,n,o):Qp(e,i,a,!1,n,o),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,f=c.data[u];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,r,n){const i=mi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;let s=r.intersect?Jp(e,i,a,n,o):Qp(e,i,a,!1,n,o);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,r,n){const i=mi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Jp(e,i,a,n,o)},nearest(e,t,r,n){const i=mi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Qp(e,i,a,r.intersect,n,o)},x(e,t,r,n){const i=mi(t,e);return z2(e,i,"x",r.intersect,n)},y(e,t,r,n){const i=mi(t,e);return z2(e,i,"y",r.intersect,n)}}};const W2=["left","top","right","bottom"];function Eo(e,t){return e.filter(r=>r.pos===t)}function V2(e,t){return e.filter(r=>W2.indexOf(r.pos)===-1&&r.box.axis===t)}function Po(e,t){return e.sort((r,n)=>{const i=t?n:r,a=t?r:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function fV(e){const t=[];let r,n,i,a,o,s;for(r=0,n=(e||[]).length;r<n;++r)i=e[r],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:r,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function dV(e){const t={};for(const r of e){const{stack:n,pos:i,stackWeight:a}=r;if(!n||!W2.includes(i))continue;const o=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function hV(e,t){const r=dV(e),{vBoxMaxWidth:n,hBoxMaxHeight:i}=t;let a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];const{fullSize:l}=s.box,c=r[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*n:l&&t.availableWidth,s.height=i):(s.width=n,s.height=u?u*i:l&&t.availableHeight)}return r}function pV(e){const t=fV(e),r=Po(t.filter(c=>c.box.fullSize),!0),n=Po(Eo(t,"left"),!0),i=Po(Eo(t,"right")),a=Po(Eo(t,"top"),!0),o=Po(Eo(t,"bottom")),s=V2(t,"x"),l=V2(t,"y");return{fullSize:r,leftAndTop:n.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:Eo(t,"chartArea"),vertical:n.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function H2(e,t,r,n){return Math.max(e[r],t[r])+Math.max(e[n],t[n])}function U2(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function mV(e,t,r,n){const{pos:i,box:a}=r,o=e.maxPadding;if(!he(i)){r.size&&(e[i]-=r.size);const f=n[r.stack]||{size:0,count:1};f.size=Math.max(f.size,r.horizontal?a.height:a.width),r.size=f.size/f.count,e[i]+=r.size}a.getPadding&&U2(o,a.getPadding());const s=Math.max(0,t.outerWidth-H2(o,e,"left","right")),l=Math.max(0,t.outerHeight-H2(o,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,r.horizontal?{same:c,other:u}:{same:u,other:c}}function gV(e){const t=e.maxPadding;function r(n){const i=Math.max(t[n]-e[n],0);return e[n]+=i,i}e.y+=r("top"),e.x+=r("left"),r("right"),r("bottom")}function vV(e,t){const r=t.maxPadding;function n(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(t[o],r[o])}),a}return n(e?["left","right"]:["top","bottom"])}function Co(e,t,r,n){const i=[];let a,o,s,l,c,u;for(a=0,o=e.length,c=0;a<o;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,vV(s.horizontal,t));const{same:f,other:d}=mV(t,r,s,n);c|=f&&i.length,u=u||d,l.fullSize||i.push(s)}return c&&Co(i,t,r,n)||u}function xc(e,t,r,n,i){e.top=r,e.left=t,e.right=t+n,e.bottom=r+i,e.width=n,e.height=i}function K2(e,t,r,n){const i=r.padding;let{x:a,y:o}=t;for(const s of e){const l=s.box,c=n[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const f=t.w*u,d=c.size||l.height;yo(c.start)&&(o=c.start),l.fullSize?xc(l,i.left,o,r.outerWidth-i.right-i.left,d):xc(l,t.left+c.placed,o,f,d),c.start=o,c.placed+=f,o=l.bottom}else{const f=t.h*u,d=c.size||l.width;yo(c.start)&&(a=c.start),l.fullSize?xc(l,a,i.top,d,r.outerHeight-i.bottom-i.top):xc(l,a,t.top+c.placed,d,f),c.start=a,c.placed+=f,a=l.right}}t.x=a,t.y=o}var kn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(r){t.draw(r)}}]},e.boxes.push(t)},removeBox(e,t){const r=e.boxes?e.boxes.indexOf(t):-1;r!==-1&&e.boxes.splice(r,1)},configure(e,t,r){t.fullSize=r.fullSize,t.position=r.position,t.weight=r.weight},update(e,t,r,n){if(!e)return;const i=vr(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(r-i.height,0),s=pV(e.boxes),l=s.vertical,c=s.horizontal;Ce(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:r,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},i);U2(d,vr(n));const h=Object.assign({maxPadding:d,w:a,h:o,x:i.left,y:i.top},i),m=hV(l.concat(c),f);Co(s.fullSize,h,f,m),Co(l,h,f,m),Co(c,h,f,m)&&Co(l,h,f,m),gV(h),K2(s.leftAndTop,h,f,m),h.x+=h.w,h.y+=h.h,K2(s.rightAndBottom,h,f,m),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ce(s.chartArea,p=>{const g=p.box;Object.assign(g,e.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class q2{acquireContext(t,r){}releaseContext(t){return!1}addEventListener(t,r,n){}removeEventListener(t,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,r,n,i){return r=Math.max(0,r||t.width),n=n||t.height,{width:r,height:Math.max(0,i?Math.floor(r/i):n)}}isAttached(t){return!0}updateConfig(t){}}class yV extends q2{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wc="$chartjs",bV={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},Y2=e=>e===null||e==="";function xV(e,t){const r=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[wc]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",Y2(i)){const a=_2(e,"width");a!==void 0&&(e.width=a)}if(Y2(n))if(e.style.height==="")e.height=e.width/(t||2);else{const a=_2(e,"height");a!==void 0&&(e.height=a)}return e}const G2=gW?{passive:!0}:!1;function wV(e,t,r){e&&e.addEventListener(t,r,G2)}function _V(e,t,r){e&&e.canvas&&e.canvas.removeEventListener(t,r,G2)}function SV(e,t){const r=bV[e.type]||e.type,{x:n,y:i}=mi(e,t);return{type:r,chart:t,native:e,x:n!==void 0?n:null,y:i!==void 0?i:null}}function _c(e,t){for(const r of e)if(r===t||r.contains(t))return!0}function OV(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||_c(s.addedNodes,n),o=o&&!_c(s.removedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function AV(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||_c(s.removedNodes,n),o=o&&!_c(s.addedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}const ko=new Map;let X2=0;function Z2(){const e=window.devicePixelRatio;e!==X2&&(X2=e,ko.forEach((t,r)=>{r.currentDevicePixelRatio!==e&&t()}))}function EV(e,t){ko.size||window.addEventListener("resize",Z2),ko.set(e,t)}function PV(e){ko.delete(e),ko.size||window.removeEventListener("resize",Z2)}function CV(e,t,r){const n=e.canvas,i=n&&Kp(n);if(!i)return;const a=n2((s,l)=>{const c=i.clientWidth;r(s,l),c<i.clientWidth&&r()},window),o=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return o.observe(i),EV(e,a),o}function em(e,t,r){r&&r.disconnect(),t==="resize"&&PV(e)}function kV(e,t,r){const n=e.canvas,i=n2(a=>{e.ctx!==null&&r(SV(a,e))},e);return wV(n,t,i),i}class TV extends q2{acquireContext(t,r){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(xV(t,r),n):null}releaseContext(t){const r=t.canvas;if(!r[wc])return!1;const n=r[wc].initial;["height","width"].forEach(a=>{const o=n[a];Se(o)?r.removeAttribute(a):r.setAttribute(a,o)});const i=n.style||{};return Object.keys(i).forEach(a=>{r.style[a]=i[a]}),r.width=r.width,delete r[wc],!0}addEventListener(t,r,n){this.removeEventListener(t,r);const i=t.$proxies||(t.$proxies={}),o={attach:OV,detach:AV,resize:CV}[r]||kV;i[r]=o(t,r,n)}removeEventListener(t,r){const n=t.$proxies||(t.$proxies={}),i=n[r];if(!i)return;({attach:em,detach:em,resize:em}[r]||_V)(t,r,i),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,r,n,i){return mW(t,r,n,i)}isAttached(t){const r=t&&Kp(t);return!!(r&&r.isConnected)}}function MV(e){return!Up()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?yV:TV}class Tn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:r,y:n}=this.getProps(["x","y"],t);return{x:r,y:n}}hasValue(){return xo(this.x)&&xo(this.y)}getProps(t,r){const n=this.$animations;if(!r||!n)return this;const i={};return t.forEach(a=>{i[a]=n[a]&&n[a].active()?n[a]._to:this[a]}),i}}function jV(e,t){const r=e.options.ticks,n=DV(e),i=Math.min(r.maxTicksLimit||n,n),a=r.major.enabled?IV(t):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>i)return $V(t,c,a,o/i),c;const u=NV(a,t,i);if(o>0){let f,d;const h=o>1?Math.round((l-s)/(o-1)):null;for(Sc(t,c,u,Se(h)?0:s-h,s),f=0,d=o-1;f<d;f++)Sc(t,c,u,a[f],a[f+1]);return Sc(t,c,u,l,Se(h)?t.length:l+h),c}return Sc(t,c,u),c}function DV(e){const t=e.options.offset,r=e._tickSize(),n=e._length/r+(t?0:1),i=e._maxLength/r;return Math.floor(Math.min(n,i))}function NV(e,t,r){const n=RV(e),i=t.length/r;if(!n)return Math.max(i,1);const a=p7(n);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>i)return l}return Math.max(i,1)}function IV(e){const t=[];let r,n;for(r=0,n=e.length;r<n;r++)e[r].major&&t.push(r);return t}function $V(e,t,r,n){let i=0,a=r[0],o;for(n=Math.ceil(n),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=r[i*n])}function Sc(e,t,r,n,i){const a=se(n,0),o=Math.min(se(i,e.length),e.length);let s=0,l,c,u;for(r=Math.ceil(r),i&&(l=i-n,r=l/Math.floor(l/r)),u=a;u<0;)s++,u=Math.round(a+s*r);for(c=Math.max(a,0);c<o;c++)c===u&&(t.push(e[c]),s++,u=Math.round(a+s*r))}function RV(e){const t=e.length;let r,n;if(t<2)return!1;for(n=e[0],r=1;r<t;++r)if(e[r]-e[r-1]!==n)return!1;return n}const LV=e=>e==="left"?"right":e==="right"?"left":e,J2=(e,t,r)=>t==="top"||t==="left"?e[t]+r:e[t]-r,Q2=(e,t)=>Math.min(t||e,e);function eO(e,t){const r=[],n=e.length/t,i=e.length;let a=0;for(;a<i;a+=n)r.push(e[Math.floor(a)]);return r}function FV(e,t,r){const n=e.ticks.length,i=Math.min(t,n-1),a=e._startPixel,o=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(r&&(n===1?c=Math.max(l-a,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-s||l>o+s)))return l}function BV(e,t){Ce(e,r=>{const n=r.gc,i=n.length/2;let a;if(i>t){for(a=0;a<i;++a)delete r.data[n[a]];n.splice(0,i)}})}function To(e){return e.drawTicks?e.tickLength:0}function tO(e,t){if(!e.display)return 0;const r=Rt(e.font,t),n=vr(e.padding);return(yt(e.text)?e.text.length:1)*r.lineHeight+n.height}function zV(e,t){return hi(e,{scale:t,type:"scale"})}function WV(e,t,r){return hi(e,{tick:r,index:t,type:"tick"})}function VV(e,t,r){let n=i2(e);return(r&&t!=="right"||!r&&t==="right")&&(n=LV(n)),n}function HV(e,t,r,n){const{top:i,left:a,bottom:o,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let f=0,d,h,m;const p=o-i,g=s-a;if(e.isHorizontal()){if(h=er(n,a,s),he(r)){const v=Object.keys(r)[0],b=r[v];m=u[v].getPixelForValue(b)+p-t}else r==="center"?m=(c.bottom+c.top)/2+p-t:m=J2(e,r,t);d=s-a}else{if(he(r)){const v=Object.keys(r)[0],b=r[v];h=u[v].getPixelForValue(b)-g+t}else r==="center"?h=(c.left+c.right)/2-g+t:h=J2(e,r,t);m=er(n,o,i),f=r==="left"?-ft:ft}return{titleX:h,titleY:m,maxWidth:d,rotation:f}}class ra extends Tn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,r){return t}getUserBounds(){let{_userMin:t,_userMax:r,_suggestedMin:n,_suggestedMax:i}=this;return t=Tr(t,Number.POSITIVE_INFINITY),r=Tr(r,Number.NEGATIVE_INFINITY),n=Tr(n,Number.POSITIVE_INFINITY),i=Tr(i,Number.NEGATIVE_INFINITY),{min:Tr(t,n),max:Tr(r,i),minDefined:dr(t),maxDefined:dr(r)}}getMinMax(t){let{min:r,max:n,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:r,max:n};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)o=s[l].controller.getMinMax(this,t),i||(r=Math.min(r,o.min)),a||(n=Math.max(n,o.max));return r=a&&r>n?n:r,n=i&&r>n?r:n,{min:Tr(r,Tr(n,r)),max:Tr(n,Tr(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Fe(this.options.beforeUpdate,[this])}update(t,r,n){const{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=q7(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?eO(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=jV(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,r,n;this.isHorizontal()?(r=this.left,n=this.right):(r=this.top,n=this.bottom,t=!t),this._startPixel=r,this._endPixel=n,this._reversePixels=t,this._length=n-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Fe(this.options.afterUpdate,[this])}beforeSetDimensions(){Fe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Fe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Fe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Fe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const r=this.options.ticks;let n,i,a;for(n=0,i=t.length;n<i;n++)a=t[n],a.label=Fe(r.callback,[a.value,n,t],this)}afterTickToLabelConversion(){Fe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Fe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,r=t.ticks,n=Q2(this.ticks.length,t.ticks.maxTicksLimit),i=r.minRotation||0,a=r.maxRotation;let o=i,s,l,c;if(!this._isVisible()||!r.display||i>=a||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,d=u.highest.height,h=Ct(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/n:h/(n-1),f+6>s&&(s=h/(n-(t.offset?.5:1)),l=this.maxHeight-To(t.grid)-r.padding-tO(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),o=y7(Math.min(Math.asin(Ct((u.highest.height+6)/s,-1,1)),Math.asin(Ct(l/c,-1,1))-Math.asin(Ct(d/c,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){Fe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Fe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:r,options:{ticks:n,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=tO(i,r.options.font);if(s?(t.width=this.maxWidth,t.height=To(a)+l):(t.height=this.maxHeight,t.width=To(a)+l),n.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:d}=this._getLabelSizes(),h=n.padding*2,m=nn(this.labelRotation),p=Math.cos(m),g=Math.sin(m);if(s){const v=n.mirror?0:g*f.width+p*d.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=n.mirror?0:p*f.width+g*d.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(c,u,g,p)}}this._handleMargins(),s?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,r,n,i){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;l?c?(d=i*t.width,h=n*r.height):(d=n*t.height,h=i*r.width):a==="start"?h=r.width:a==="end"?d=t.width:a!=="inner"&&(d=t.width/2,h=r.width/2),this.paddingLeft=Math.max((d-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-f+o)*this.width/(this.width-f),0)}else{let u=r.height/2,f=t.height/2;a==="start"?(u=0,f=t.height):a==="end"&&(u=r.height,f=0),this.paddingTop=u+o,this.paddingBottom=f+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Fe(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:r}=this.options;return r==="top"||r==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let r,n;for(r=0,n=t.length;r<n;r++)Se(t[r].label)&&(t.splice(r,1),n--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const r=this.options.ticks.sampleSize;let n=this.ticks;r<n.length&&(n=eO(n,r)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,r,n){const{ctx:i,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(r/Q2(r,n));let c=0,u=0,f,d,h,m,p,g,v,b,x,S,w;for(f=0;f<r;f+=l){if(m=t[f].label,p=this._resolveTickFontOptions(f),i.font=g=p.string,v=a[g]=a[g]||{data:{},gc:[]},b=p.lineHeight,x=S=0,!Se(m)&&!yt(m))x=u2(i,v.data,v.gc,x,m),S=b;else if(yt(m))for(d=0,h=m.length;d<h;++d)w=m[d],!Se(w)&&!yt(w)&&(x=u2(i,v.data,v.gc,x,w),S+=b);o.push(x),s.push(S),c=Math.max(x,c),u=Math.max(S,u)}BV(a,r);const O=o.indexOf(c),E=s.indexOf(u),C=M=>({width:o[M]||0,height:s[M]||0});return{first:C(0),last:C(r-1),widest:C(O),highest:C(E),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,r){return NaN}getValueForPixel(t){}getPixelForTick(t){const r=this.ticks;return t<0||t>r.length-1?null:this.getPixelForValue(r[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const r=this._startPixel+t*this._length;return x7(this._alignToPixels?di(this.chart,r,0):r)}getDecimalForPixel(t){const r=(t-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:r}=this;return t<0&&r<0?r:t>0&&r>0?t:0}getContext(t){const r=this.ticks||[];if(t>=0&&t<r.length){const n=r[t];return n.$context||(n.$context=WV(this.getContext(),t,n))}return this.$context||(this.$context=zV(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,r=nn(this.labelRotation),n=Math.abs(Math.cos(r)),i=Math.abs(Math.sin(r)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*n>s*i?s/n:l/i:l*i<s*n?l/n:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const r=this.axis,n=this.chart,i=this.options,{grid:a,position:o,border:s}=i,l=a.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=To(a),h=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,v=function(W){return di(n,W,p)};let b,x,S,w,O,E,C,M,$,j,_,I;if(o==="top")b=v(this.bottom),E=this.bottom-d,M=b-g,j=v(t.top)+g,I=t.bottom;else if(o==="bottom")b=v(this.top),j=t.top,I=v(t.bottom)-g,E=b+g,M=this.top+d;else if(o==="left")b=v(this.right),O=this.right-d,C=b-g,$=v(t.left)+g,_=t.right;else if(o==="right")b=v(this.left),$=t.left,_=v(t.right)-g,O=b+g,C=this.left+d;else if(r==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(he(o)){const W=Object.keys(o)[0],H=o[W];b=v(this.chart.scales[W].getPixelForValue(H))}j=t.top,I=t.bottom,E=b+g,M=E+d}else if(r==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(he(o)){const W=Object.keys(o)[0],H=o[W];b=v(this.chart.scales[W].getPixelForValue(H))}O=b-g,C=O-d,$=t.left,_=t.right}const D=se(i.ticks.maxTicksLimit,f),L=Math.max(1,Math.ceil(f/D));for(x=0;x<f;x+=L){const W=this.getContext(x),H=a.setContext(W),te=s.setContext(W),Q=H.lineWidth,F=H.color,U=te.dash||[],V=te.dashOffset,re=H.tickWidth,Z=H.tickColor,J=H.tickBorderDash||[],ee=H.tickBorderDashOffset;S=FV(this,x,l),S!==void 0&&(w=di(n,S,Q),c?O=C=$=_=w:E=M=j=I=w,h.push({tx1:O,ty1:E,tx2:C,ty2:M,x1:$,y1:j,x2:_,y2:I,width:Q,color:F,borderDash:U,borderDashOffset:V,tickWidth:re,tickColor:Z,tickBorderDash:J,tickBorderDashOffset:ee}))}return this._ticksLength=f,this._borderValue=b,h}_computeLabelItems(t){const r=this.axis,n=this.options,{position:i,ticks:a}=n,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:f}=a,d=To(n.grid),h=d+u,m=f?-u:h,p=-nn(this.labelRotation),g=[];let v,b,x,S,w,O,E,C,M,$,j,_,I="middle";if(i==="top")O=this.bottom-m,E=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+m,E=this._getXAxisLabelAlignment();else if(i==="left"){const L=this._getYAxisLabelAlignment(d);E=L.textAlign,w=L.x}else if(i==="right"){const L=this._getYAxisLabelAlignment(d);E=L.textAlign,w=L.x}else if(r==="x"){if(i==="center")O=(t.top+t.bottom)/2+h;else if(he(i)){const L=Object.keys(i)[0],W=i[L];O=this.chart.scales[L].getPixelForValue(W)+h}E=this._getXAxisLabelAlignment()}else if(r==="y"){if(i==="center")w=(t.left+t.right)/2-h;else if(he(i)){const L=Object.keys(i)[0],W=i[L];w=this.chart.scales[L].getPixelForValue(W)}E=this._getYAxisLabelAlignment(d).textAlign}r==="y"&&(l==="start"?I="top":l==="end"&&(I="bottom"));const D=this._getLabelSizes();for(v=0,b=s.length;v<b;++v){x=s[v],S=x.label;const L=a.setContext(this.getContext(v));C=this.getPixelForTick(v)+a.labelOffset,M=this._resolveTickFontOptions(v),$=M.lineHeight,j=yt(S)?S.length:1;const W=j/2,H=L.color,te=L.textStrokeColor,Q=L.textStrokeWidth;let F=E;o?(w=C,E==="inner"&&(v===b-1?F=this.options.reverse?"left":"right":v===0?F=this.options.reverse?"right":"left":F="center"),i==="top"?c==="near"||p!==0?_=-j*$+$/2:c==="center"?_=-D.highest.height/2-W*$+$:_=-D.highest.height+$/2:c==="near"||p!==0?_=$/2:c==="center"?_=D.highest.height/2-W*$:_=D.highest.height-j*$,f&&(_*=-1),p!==0&&!L.showLabelBackdrop&&(w+=$/2*Math.sin(p))):(O=C,_=(1-j)*$/2);let U;if(L.showLabelBackdrop){const V=vr(L.backdropPadding),re=D.heights[v],Z=D.widths[v];let J=_-V.top,ee=0-V.left;switch(I){case"middle":J-=re/2;break;case"bottom":J-=re;break}switch(E){case"center":ee-=Z/2;break;case"right":ee-=Z;break;case"inner":v===b-1?ee-=Z:v>0&&(ee-=Z/2);break}U={left:ee,top:J,width:Z+V.width,height:re+V.height,color:L.backdropColor}}g.push({label:S,font:M,textOffset:_,options:{rotation:p,color:H,strokeColor:te,strokeWidth:Q,textAlign:F,textBaseline:I,translation:[w,O],backdrop:U}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:r}=this.options;if(-nn(this.labelRotation))return t==="top"?"left":"right";let i="center";return r.align==="start"?i="left":r.align==="end"?i="right":r.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:r,ticks:{crossAlign:n,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let c,u;return r==="left"?i?(u=this.right+a,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u=this.left)):r==="right"?i?(u=this.left+a,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:r},left:n,top:i,width:a,height:o}=this;r&&(t.save(),t.fillStyle=r,t.fillRect(n,i,a,o),t.restore())}getLineWidthForValue(t){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?r.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const r=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,c,u)=>{!u.width||!u.color||(n.save(),n.lineWidth=u.width,n.strokeStyle=u.color,n.setLineDash(u.borderDash||[]),n.lineDashOffset=u.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(r.display)for(a=0,o=i.length;a<o;++a){const l=i[a];r.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),r.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:r,options:{border:n,grid:i}}=this,a=n.setContext(this.getContext()),o=n.display?a.width:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,f,d;this.isHorizontal()?(c=di(t,this.left,o)-o/2,u=di(t,this.right,s)+s/2,f=d=l):(f=di(t,this.top,o)-o/2,d=di(t,this.bottom,s)+s/2,c=u=l),r.save(),r.lineWidth=a.width,r.strokeStyle=a.color,r.beginPath(),r.moveTo(c,f),r.lineTo(u,d),r.stroke(),r.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,i=this._computeLabelArea();i&&Fp(n,i);const a=this.getLabelItems(t);for(const o of a){const s=o.options,l=o.font,c=o.label,u=o.textOffset;uc(n,c,0,u,l,s)}i&&Bp(n)}drawTitle(){const{ctx:t,options:{position:r,title:n,reverse:i}}=this;if(!n.display)return;const a=Rt(n.font),o=vr(n.padding),s=n.align;let l=a.lineHeight/2;r==="bottom"||r==="center"||he(r)?(l+=o.bottom,yt(n.text)&&(l+=a.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:f,rotation:d}=HV(this,l,r,s);uc(t,n.text,0,0,a,{color:n.color,maxWidth:f,rotation:d,textAlign:VV(s,r,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,r=t.ticks&&t.ticks.z||0,n=se(t.grid&&t.grid.z,-1),i=se(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ra.prototype.draw?[{z:r,draw:a=>{this.draw(a)}}]:[{z:n,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:r,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let a,o;for(a=0,o=r.length;a<o;++a){const s=r[a];s[n]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const r=this.options.ticks.setContext(this.getContext(t));return Rt(r.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Oc{constructor(t,r,n){this.type=t,this.scope=r,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const r=Object.getPrototypeOf(t);let n;qV(r)&&(n=this.register(r));const i=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,UV(t,o,n),this.override&&et.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const r=this.items,n=t.id,i=this.scope;n in r&&delete r[n],i&&n in et[i]&&(delete et[i][n],this.override&&delete fi[n])}}function UV(e,t,r){const n=go(Object.create(null),[r?et.get(r):{},et.get(t),e.defaults]);et.set(t,n),e.defaultRoutes&&KV(t,e.defaultRoutes),e.descriptors&&et.describe(t,e.descriptors)}function KV(e,t){Object.keys(t).forEach(r=>{const n=r.split("."),i=n.pop(),a=[e].concat(n).join("."),o=t[r].split("."),s=o.pop(),l=o.join(".");et.route(a,i,l,s)})}function qV(e){return"id"in e&&"defaults"in e}class YV{constructor(){this.controllers=new Oc(yc,"datasets",!0),this.elements=new Oc(Tn,"elements"),this.plugins=new Oc(Object,"plugins"),this.scales=new Oc(ra,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,r,n){[...r].forEach(i=>{const a=n||this._getRegistryForType(i);n||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):Ce(i,o=>{const s=n||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,r,n){const i=Tp(t);Fe(n["before"+i],[],n),r[t](n),Fe(n["after"+i],[],n)}_getRegistryForType(t){for(let r=0;r<this._typedRegistries.length;r++){const n=this._typedRegistries[r];if(n.isForType(t))return n}return this.plugins}_get(t,r,n){const i=r.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var jr=new YV;class GV{constructor(){this._init=[]}notify(t,r,n,i){r==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(a,t,r,n);return r==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,r,n,i){i=i||{};for(const a of t){const o=a.plugin,s=o[n],l=[r,i,a.options];if(Fe(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Se(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const r=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),r}_createDescriptors(t,r){const n=t&&t.config,i=se(n.options&&n.options.plugins,{}),a=XV(n);return i===!1&&!r?[]:JV(t,a,i,r)}_notifyStateChanges(t){const r=this._oldCache||[],n=this._cache,i=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(i(r,n),t,"stop"),this._notify(i(n,r),t,"start")}}function XV(e){const t={},r=[],n=Object.keys(jr.plugins.items);for(let a=0;a<n.length;a++)r.push(jr.getPlugin(n[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];r.indexOf(o)===-1&&(r.push(o),t[o.id]=!0)}return{plugins:r,localIds:t}}function ZV(e,t){return!t&&e===!1?null:e===!0?{}:e}function JV(e,{plugins:t,localIds:r},n,i){const a=[],o=e.getContext();for(const s of t){const l=s.id,c=ZV(n[l],i);c!==null&&a.push({plugin:s,options:QV(e.config,{plugin:s,local:r[l]},c,o)})}return a}function QV(e,{plugin:t,local:r},n,i){const a=e.pluginScopeKeys(t),o=e.getOptionScopes(n,a);return r&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function tm(e,t){const r=et.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||r.indexAxis||"x"}function e9(e,t){let r=e;return e==="_index_"?r=t:e==="_value_"&&(r=t==="x"?"y":"x"),r}function t9(e,t){return e===t?"_index_":"_value_"}function rO(e){if(e==="x"||e==="y"||e==="r")return e}function r9(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function rm(e,...t){if(rO(e))return e;for(const r of t){const n=r.axis||r9(r.position)||e.length>1&&rO(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function nO(e,t,r){if(r[t+"AxisID"]===e)return{axis:t}}function n9(e,t){if(t.data&&t.data.datasets){const r=t.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(r.length)return nO(e,"x",r[0])||nO(e,"y",r[0])}return{}}function i9(e,t){const r=fi[e.type]||{scales:{}},n=t.scales||{},i=tm(e.type,t),a=Object.create(null);return Object.keys(n).forEach(o=>{const s=n[o];if(!he(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=rm(o,s,n9(o,e),et.scales[s.type]),c=t9(l,i),u=r.scales||{};a[o]=vo(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(o=>{const s=o.type||e.type,l=o.indexAxis||tm(s,t),u=(fi[s]||{}).scales||{};Object.keys(u).forEach(f=>{const d=e9(f,l),h=o[d+"AxisID"]||d;a[h]=a[h]||Object.create(null),vo(a[h],[{axis:d},n[h],u[f]])})}),Object.keys(a).forEach(o=>{const s=a[o];vo(s,[et.scales[s.type],et.scale])}),a}function iO(e){const t=e.options||(e.options={});t.plugins=se(t.plugins,{}),t.scales=i9(e,t)}function aO(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function a9(e){return e=e||{},e.data=aO(e.data),iO(e),e}const oO=new Map,sO=new Set;function Ac(e,t){let r=oO.get(e);return r||(r=t(),oO.set(e,r),sO.add(r)),r}const Mo=(e,t,r)=>{const n=li(t,r);n!==void 0&&e.add(n)};class o9{constructor(t){this._config=a9(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=aO(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),iO(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ac(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,r){return Ac(`${t}.transition.${r}`,()=>[[`datasets.${t}.transitions.${r}`,`transitions.${r}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,r){return Ac(`${t}-${r}`,()=>[[`datasets.${t}.elements.${r}`,`datasets.${t}`,`elements.${r}`,""]])}pluginScopeKeys(t){const r=t.id,n=this.type;return Ac(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,r){const n=this._scopeCache;let i=n.get(t);return(!i||r)&&(i=new Map,n.set(t,i)),i}getOptionScopes(t,r,n){const{options:i,type:a}=this,o=this._cachedScopes(t,n),s=o.get(r);if(s)return s;const l=new Set;r.forEach(u=>{t&&(l.add(t),u.forEach(f=>Mo(l,t,f))),u.forEach(f=>Mo(l,i,f)),u.forEach(f=>Mo(l,fi[a]||{},f)),u.forEach(f=>Mo(l,et,f)),u.forEach(f=>Mo(l,$p,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),sO.has(r)&&o.set(r,c),c}chartOptionScopes(){const{options:t,type:r}=this;return[t,fi[r]||{},et.datasets[r]||{},{type:r},et,$p]}resolveNamedOptions(t,r,n,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=lO(this._resolverCache,t,i);let l=o;if(l9(o,r)){a.$shared=!1,n=Pn(n)?n():n;const c=this.createResolver(t,n,s);l=Qi(o,n,c)}for(const c of r)a[c]=l[c];return a}createResolver(t,r,n=[""],i){const{resolver:a}=lO(this._resolverCache,t,n);return he(r)?Qi(a,r,void 0,i):a}}function lO(e,t,r){let n=e.get(t);n||(n=new Map,e.set(t,n));const i=r.join();let a=n.get(i);return a||(a={resolver:Wp(t,r),subPrefixes:r.filter(s=>!s.toLowerCase().includes("hover"))},n.set(i,a)),a}const s9=e=>he(e)&&Object.getOwnPropertyNames(e).some(t=>Pn(e[t]));function l9(e,t){const{isScriptable:r,isIndexable:n}=p2(e);for(const i of t){const a=r(i),o=n(i),s=(o||a)&&e[i];if(a&&(Pn(s)||s9(s))||o&&yt(s))return!0}return!1}var c9="4.5.0";const u9=["top","bottom","left","right","chartArea"];function cO(e,t){return e==="top"||e==="bottom"||u9.indexOf(e)===-1&&t==="x"}function uO(e,t){return function(r,n){return r[e]===n[e]?r[t]-n[t]:r[e]-n[e]}}function fO(e){const t=e.chart,r=t.options.animation;t.notifyPlugins("afterRender"),Fe(r&&r.onComplete,[e],t)}function f9(e){const t=e.chart,r=t.options.animation;Fe(r&&r.onProgress,[e],t)}function dO(e){return Up()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Ec={},hO=e=>{const t=dO(e);return Object.values(Ec).filter(r=>r.canvas===t).pop()};function d9(e,t,r){const n=Object.keys(e);for(const i of n){const a=+i;if(a>=t){const o=e[i];delete e[i],(r>0||a>t)&&(e[a+r]=o)}}}function h9(e,t,r,n){return!r||e.type==="mouseout"?null:n?t:e}let Lt=class{static defaults=et;static instances=Ec;static overrides=fi;static registry=jr;static version=c9;static getChart=hO;static register(...t){jr.add(...t),pO()}static unregister(...t){jr.remove(...t),pO()}constructor(t,r){const n=this.config=new o9(r),i=dO(t),a=hO(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||MV(i)),this.platform.updateConfig(n);const s=this.platform.acquireContext(i,o.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=a7(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new GV,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=O7(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],Ec[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}an.listen(this,"complete",fO),an.listen(this,"progress",f9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:r},width:n,height:i,_aspectRatio:a}=this;return Se(t)?r&&a?a:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return jr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():w2(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return f2(this.canvas,this.ctx),this}stop(){return an.stop(this),this}resize(t,r){an.running(this)?this._resizeBeforeDraw={width:t,height:r}:this._resize(t,r)}_resize(t,r){const n=this.options,i=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,r,a),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,w2(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),Fe(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};Ce(r,(n,i)=>{n.id=i})}buildOrUpdateScales(){const t=this.options,r=t.scales,n=this.scales,i=Object.keys(n).reduce((o,s)=>(o[s]=!1,o),{});let a=[];r&&(a=a.concat(Object.keys(r).map(o=>{const s=r[o],l=rm(o,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ce(a,o=>{const s=o.options,l=s.id,c=rm(l,s),u=se(s.type,o.dtype);(s.position===void 0||cO(s.position,c)!==cO(o.dposition))&&(s.position=o.dposition),i[l]=!0;let f=null;if(l in n&&n[l].type===u)f=n[l];else{const d=jr.getScale(u);f=new d({id:l,type:u,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(s,t)}),Ce(i,(o,s)=>{o||delete n[s]}),Ce(n,o=>{kn.configure(this,o,o.options),kn.addBox(this,o)})}_updateMetasets(){const t=this._metasets,r=this.data.datasets.length,n=t.length;if(t.sort((i,a)=>i.index-a.index),n>r){for(let i=r;i<n;++i)this._destroyDatasetMeta(i);t.splice(r,n-r)}this._sortedMetasets=t.slice(0).sort(uO("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:r}}=this;t.length>r.length&&delete this._stacks,t.forEach((n,i)=>{r.filter(a=>a===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],r=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=r.length;n<i;n++){const a=r[n];let o=this.getDatasetMeta(n);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=s,o.indexAxis=a.indexAxis||tm(s,this.options),o.order=a.order||0,o.index=n,o.label=""+a.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const l=jr.getController(s),{datasetElementType:c,dataElementType:u}=et.datasets[s];Object.assign(l,{dataElementType:jr.getElement(u),datasetElementType:c&&jr.getElement(c)}),o.controller=new l(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Ce(this.data.datasets,(t,r)=>{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const r=this.config;r.update();const n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),d=!i&&a.indexOf(f)===-1;f.buildOrUpdateElements(d),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),i||Ce(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(uO("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ce(this.scales,t=>{kn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!qS(r,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,r=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:a}of r){const o=n==="_removeElements"?-a:a;d9(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const r=this.data.datasets.length,n=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),i=n(0);for(let a=1;a<r;a++)if(!qS(i,n(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;kn.update(this,this.width,this.height,t);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],Ce(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r<n;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,n=this.data.datasets.length;r<n;++r)this._updateDataset(r,Pn(t)?t({datasetIndex:r}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,r){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(n.controller._update(r),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(an.has(this)?this.attached&&!an.running(this)&&an.start(this):(this.draw(),fO({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const r=this._layers;for(t=0;t<r.length&&r[t].z<=0;++t)r[t].draw(this.chartArea);for(this._drawDatasets();t<r.length;++t)r[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const r=this._sortedMetasets,n=[];let i,a;for(i=0,a=r.length;i<a;++i){const o=r[i];(!t||o.visible)&&n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let r=t.length-1;r>=0;--r)this._drawDataset(t[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const r=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=TW(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(i&&Fp(r,i),t.controller.draw(),i&&Bp(r),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Oo(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,r,n,i){const a=uV.modes[r];return typeof a=="function"?a(this,t,n,i):[]}getDatasetMeta(t){const r=this.data.datasets[t],n=this._metasets;let i=n.filter(a=>a&&a._dataset===r).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:t,_dataset:r,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=hi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const r=this.data.datasets[t];if(!r)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(t,r){const n=this.getDatasetMeta(t);n.hidden=!r}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,r,n){const i=n?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,i);yo(r)?(a.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(a,{visible:n}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,r){this._updateVisibility(t,r,!1)}show(t,r){this._updateVisibility(t,r,!0)}_destroyDatasetMeta(t){const r=this._metasets[t];r&&r.controller&&r.controller._destroy(),delete this._metasets[t]}_stop(){let t,r;for(this.stop(),an.remove(this),t=0,r=this.data.datasets.length;t<r;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:r}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),f2(t,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete Ec[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,r=this.platform,n=(a,o)=>{r.addEventListener(this,a,o),t[a]=o},i=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};Ce(this.options.events,a=>n(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,r=this.platform,n=(l,c)=>{r.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(r.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",a),n("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),n("attach",s)},r.isAttached(this.canvas)?s():o()}unbindEvents(){Ce(this._listeners,(t,r)=>{this.platform.removeEventListener(this,r,t)}),this._listeners={},Ce(this._responsiveListeners,(t,r)=>{this.platform.removeEventListener(this,r,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,r,n){const i=n?"set":"remove";let a,o,s,l;for(r==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){o=t[s];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const r=this._active||[],n=t.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!oc(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(t,r,n){return this._plugins.notify(this,t,r,n)}isPluginEnabled(t){return this._plugins._cache.filter(r=>r.plugin.id===t).length===1}_updateHoverStyles(t,r,n){const i=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),o=a(r,t),s=n?t:a(t,r);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,r){const n={event:t,replay:r,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const a=this._handleEvent(t,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(a||n.changed)&&this.render(),this}_handleEvent(t,r,n){const{_active:i=[],options:a}=this,o=r,s=this._getActiveElements(t,i,n,o),l=f7(t),c=h9(t,this._lastEvent,n,l);n&&(this._lastEvent=null,Fe(a.onHover,[t,s,this],this),l&&Fe(a.onClick,[t,s,this],this));const u=!oc(s,i);return(u||r)&&(this._active=s,this._updateHoverStyles(s,i,r)),this._lastEvent=c,u}_getActiveElements(t,r,n,i){if(t.type==="mouseout")return[];if(!n)return r;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}};function pO(){return Ce(Lt.instances,e=>e._plugins.invalidate())}function p9(e,t,r){const{startAngle:n,x:i,y:a,outerRadius:o,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,f=Math.min(c/o,gr(n-r));if(e.beginPath(),e.arc(i,a,o-c/2,n+f/2,r-f/2),s>0){const d=Math.min(c/s,gr(n-r));e.arc(i,a,s+c/2,r-d/2,n+d/2,!0)}else{const d=Math.min(c/2,o*gr(n-r));if(u==="round")e.arc(i,a,d,r-je/2,n+je/2,!0);else if(u==="bevel"){const h=2*d*d,m=-h*Math.cos(r+je/2)+i,p=-h*Math.sin(r+je/2)+a,g=h*Math.cos(n+je/2)+i,v=h*Math.sin(n+je/2)+a;e.lineTo(m,p),e.lineTo(g,v)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function m9(e,t,r){const{startAngle:n,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(a,o,s,n-c,r+c),l>i?(c=i/l,e.arc(a,o,l,r+c,n-c,!0)):e.arc(a,o,i,r+ft,n-ft),e.closePath(),e.clip()}function g9(e){return zp(e,["outerStart","outerEnd","innerStart","innerEnd"])}function v9(e,t,r,n){const i=g9(e.options.borderRadius),a=(r-t)/2,o=Math.min(a,n*t/2),s=l=>{const c=(r-Math.min(a,l))*n/2;return Ct(l,0,Math.min(a,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Ct(i.innerStart,0,o),innerEnd:Ct(i.innerEnd,0,o)}}function na(e,t,r,n){return{x:r+e*Math.cos(t),y:n+e*Math.sin(t)}}function Pc(e,t,r,n,i,a){const{x:o,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,f=Math.max(t.outerRadius+n+r-c,0),d=u>0?u+n+r+c:0;let h=0;const m=i-l;if(n){const L=u>0?u-n:0,W=f>0?f-n:0,H=(L+W)/2,te=H!==0?m*H/(H+n):m;h=(m-te)/2}const p=Math.max(.001,m*f-r/je)/f,g=(m-p)/2,v=l+g+h,b=i-g-h,{outerStart:x,outerEnd:S,innerStart:w,innerEnd:O}=v9(t,d,f,b-v),E=f-x,C=f-S,M=v+x/E,$=b-S/C,j=d+w,_=d+O,I=v+w/j,D=b-O/_;if(e.beginPath(),a){const L=(M+$)/2;if(e.arc(o,s,f,M,L),e.arc(o,s,f,L,$),S>0){const Q=na(C,$,o,s);e.arc(Q.x,Q.y,S,$,b+ft)}const W=na(_,b,o,s);if(e.lineTo(W.x,W.y),O>0){const Q=na(_,D,o,s);e.arc(Q.x,Q.y,O,b+ft,D+Math.PI)}const H=(b-O/d+(v+w/d))/2;if(e.arc(o,s,d,b-O/d,H,!0),e.arc(o,s,d,H,v+w/d,!0),w>0){const Q=na(j,I,o,s);e.arc(Q.x,Q.y,w,I+Math.PI,v-ft)}const te=na(E,v,o,s);if(e.lineTo(te.x,te.y),x>0){const Q=na(E,M,o,s);e.arc(Q.x,Q.y,x,v-ft,M)}}else{e.moveTo(o,s);const L=Math.cos(M)*f+o,W=Math.sin(M)*f+s;e.lineTo(L,W);const H=Math.cos($)*f+o,te=Math.sin($)*f+s;e.lineTo(H,te)}e.closePath()}function y9(e,t,r,n,i){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){Pc(e,t,r,n,l,i);for(let c=0;c<a;++c)e.fill();isNaN(s)||(l=o+(s%Ge||Ge))}return Pc(e,t,r,n,l,i),e.fill(),l}function b9(e,t,r,n,i){const{fullCircles:a,startAngle:o,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:d,borderRadius:h}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(f||[]),e.lineDashOffset=d,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(a){Pc(e,t,r,n,p,i);for(let g=0;g<a;++g)e.stroke();isNaN(s)||(p=o+(s%Ge||Ge))}m&&m9(e,t,p),l.selfJoin&&p-o>=je&&h===0&&u!=="miter"&&p9(e,t,p),a||(Pc(e,t,r,n,p,i),e.stroke())}class nm extends Tn{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,r,n){const i=this.getProps(["x","y"],n),{angle:a,distance:o}=JS(i,{x:t,y:r}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,h=se(f,l-s),m=wo(a,s,l)&&s!==l,p=h>=Ge||m,g=Cn(o,c+d,u+d);return p&&g}getCenterPoint(t){const{x:r,y:n,startAngle:i,endAngle:a,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+a)/2,f=(o+s+c+l)/2;return{x:r+Math.cos(u)*f,y:n+Math.sin(u)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:r,circumference:n}=this,i=(r.offset||0)/4,a=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>Ge?Math.floor(n/Ge):0,n===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(je,n||0)),c=i*l;t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,y9(t,this,c,a,o),b9(t,this,c,a,o),t.restore()}}function mO(e,t,r=t){e.lineCap=se(r.borderCapStyle,t.borderCapStyle),e.setLineDash(se(r.borderDash,t.borderDash)),e.lineDashOffset=se(r.borderDashOffset,t.borderDashOffset),e.lineJoin=se(r.borderJoinStyle,t.borderJoinStyle),e.lineWidth=se(r.borderWidth,t.borderWidth),e.strokeStyle=se(r.borderColor,t.borderColor)}function x9(e,t,r){e.lineTo(r.x,r.y)}function w9(e){return e.stepped?L7:e.tension||e.cubicInterpolationMode==="monotone"?F7:x9}function gO(e,t,r={}){const n=e.length,{start:i=0,end:a=n-1}=r,{start:o,end:s}=t,l=Math.max(i,o),c=Math.min(a,s),u=i<o&&a<o||i>s&&a>s;return{count:n,start:l,loop:t.loop,ilen:c<l&&!u?n+c-l:c-l}}function _9(e,t,r,n){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:c}=gO(i,r,n),u=w9(a);let{move:f=!0,reverse:d}=n||{},h,m,p;for(h=0;h<=c;++h)m=i[(s+(d?c-h:h))%o],!m.skip&&(f?(e.moveTo(m.x,m.y),f=!1):u(e,p,m,d,a.stepped),p=m);return l&&(m=i[(s+(d?c:0))%o],u(e,p,m,d,a.stepped)),!!l}function S9(e,t,r,n){const i=t.points,{count:a,start:o,ilen:s}=gO(i,r,n),{move:l=!0,reverse:c}=n||{};let u=0,f=0,d,h,m,p,g,v;const b=S=>(o+(c?s-S:S))%a,x=()=>{p!==g&&(e.lineTo(u,g),e.lineTo(u,p),e.lineTo(u,v))};for(l&&(h=i[b(0)],e.moveTo(h.x,h.y)),d=0;d<=s;++d){if(h=i[b(d)],h.skip)continue;const S=h.x,w=h.y,O=S|0;O===m?(w<p?p=w:w>g&&(g=w),u=(f*u+S)/++f):(x(),e.lineTo(S,w),m=O,f=0,p=g=w),v=w}x()}function im(e){const t=e.options,r=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!r?S9:_9}function O9(e){return e.stepped?vW:e.tension||e.cubicInterpolationMode==="monotone"?yW:gi}function A9(e,t,r,n){let i=t._path;i||(i=t._path=new Path2D,t.path(i,r,n)&&i.closePath()),mO(e,t.options),e.stroke(i)}function E9(e,t,r,n){const{segments:i,options:a}=t,o=im(t);for(const s of i)mO(e,a,s.style),e.beginPath(),o(e,t,s,{start:r,end:r+n-1})&&e.closePath(),e.stroke()}const P9=typeof Path2D=="function";function C9(e,t,r,n){P9&&!t.options.segment?A9(e,t,r,n):E9(e,t,r,n)}class am extends Tn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,r){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;cW(this._points,n,t,i,r),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=EW(this,this.options.segment))}first(){const t=this.segments,r=this.points;return t.length&&r[t[0].start]}last(){const t=this.segments,r=this.points,n=t.length;return n&&r[t[n-1].end]}interpolate(t,r){const n=this.options,i=t[r],a=this.points,o=SW(this,{property:r,start:i,end:i});if(!o.length)return;const s=[],l=O9(n);let c,u;for(c=0,u=o.length;c<u;++c){const{start:f,end:d}=o[c],h=a[f],m=a[d];if(h===m){s.push(h);continue}const p=Math.abs((i-h[r])/(m[r]-h[r])),g=l(h,m,p,n.stepped);g[r]=t[r],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,r,n){return im(this)(t,this,r,n)}path(t,r,n){const i=this.segments,a=im(this);let o=this._loop;r=r||0,n=n||this.points.length-r;for(const s of i)o&=a(t,this,s,{start:r,end:r+n-1});return!!o}draw(t,r,n,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),C9(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function vO(e,t,r,n){const i=e.options,{[r]:a}=e.getProps([r],n);return Math.abs(t-a)<i.radius+i.hitRadius}class om extends Tn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,r,n){const i=this.options,{x:a,y:o}=this.getProps(["x","y"],n);return Math.pow(t-a,2)+Math.pow(r-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,r){return vO(this,t,"x",r)}inYRange(t,r){return vO(this,t,"y",r)}getCenterPoint(t){const{x:r,y:n}=this.getProps(["x","y"],t);return{x:r,y:n}}size(t){t=t||this.options||{};let r=t.radius||0;r=Math.max(r,r&&t.hoverRadius||0);const n=r&&t.borderWidth||0;return(r+n)*2}draw(t,r){const n=this.options;this.skip||n.radius<.1||!Oo(this,r,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Lp(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function yO(e,t){const{x:r,y:n,base:i,width:a,height:o}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,f;return e.horizontal?(f=o/2,s=Math.min(r,i),l=Math.max(r,i),c=n-f,u=n+f):(f=a/2,s=r-f,l=r+f,c=Math.min(n,i),u=Math.max(n,i)),{left:s,top:c,right:l,bottom:u}}function Mn(e,t,r,n){return e?0:Ct(t,r,n)}function k9(e,t,r){const n=e.options.borderWidth,i=e.borderSkipped,a=h2(n);return{t:Mn(i.top,a.top,0,r),r:Mn(i.right,a.right,0,t),b:Mn(i.bottom,a.bottom,0,r),l:Mn(i.left,a.left,0,t)}}function T9(e,t,r){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=Ji(i),o=Math.min(t,r),s=e.borderSkipped,l=n||he(i);return{topLeft:Mn(!l||s.top||s.left,a.topLeft,0,o),topRight:Mn(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Mn(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Mn(!l||s.bottom||s.right,a.bottomRight,0,o)}}function M9(e){const t=yO(e),r=t.right-t.left,n=t.bottom-t.top,i=k9(e,r/2,n/2),a=T9(e,r/2,n/2);return{outer:{x:t.left,y:t.top,w:r,h:n,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:r-i.l-i.r,h:n-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function sm(e,t,r,n){const i=t===null,a=r===null,s=e&&!(i&&a)&&yO(e,n);return s&&(i||Cn(t,s.left,s.right))&&(a||Cn(r,s.top,s.bottom))}function j9(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function D9(e,t){e.rect(t.x,t.y,t.w,t.h)}function lm(e,t,r={}){const n=e.x!==r.x?-t:0,i=e.y!==r.y?-t:0,a=(e.x+e.w!==r.x+r.w?t:0)-n,o=(e.y+e.h!==r.y+r.h?t:0)-i;return{x:e.x+n,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}class jo extends Tn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:r,options:{borderColor:n,backgroundColor:i}}=this,{inner:a,outer:o}=M9(this),s=j9(o.radius)?fc:D9;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,lm(o,r,a)),t.clip(),s(t,lm(a,-r,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),s(t,lm(a,r)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,r,n){return sm(this,t,r,n)}inXRange(t,r){return sm(this,t,null,r)}inYRange(t,r){return sm(this,null,t,r)}getCenterPoint(t){const{x:r,y:n,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(r+i)/2:r,y:a?n:(n+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const bO=(e,t)=>{let{boxHeight:r=t,boxWidth:n=t}=e;return e.usePointStyle&&(r=Math.min(r,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(t,r)}},N9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class xO extends Tn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,r,n){this.maxWidth=t,this.maxHeight=r,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let r=Fe(t.generateLabels,[this.chart],this)||[];t.filter&&(r=r.filter(n=>t.filter(n,this.chart.data))),t.sort&&(r=r.sort((n,i)=>t.sort(n,i,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){const{options:t,ctx:r}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,i=Rt(n.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=bO(n,a);let c,u;r.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,a,s,l)+10):(u=this.maxHeight,c=this._fitCols(o,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,r,n,i){const{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let f=t;a.textAlign="left",a.textBaseline="middle";let d=-1,h=-u;return this.legendItems.forEach((m,p)=>{const g=n+r/2+a.measureText(m.text).width;(p===0||c[c.length-1]+g+2*s>o)&&(f+=u,c[c.length-(p>0?0:1)]=0,h+=u,d++),l[p]={left:0,top:h,row:d,width:g,height:i},c[c.length-1]+=g+s}),f}_fitCols(t,r,n,i){const{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let f=s,d=0,h=0,m=0,p=0;return this.legendItems.forEach((g,v)=>{const{itemWidth:b,itemHeight:x}=I9(n,r,a,g,i);v>0&&h+x+2*s>u&&(f+=d+s,c.push({width:d,height:h}),m+=d+s,p++,d=h=0),l[v]={left:m,top:h,col:p,width:b,height:x},d=Math.max(d,b),h+=x+s}),f+=d,c.push({width:d,height:h}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:i},rtl:a}}=this,o=ta(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=er(n,this.left+i,this.right-this.lineWidths[s]);for(const c of r)s!==c.row&&(s=c.row,l=er(n,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let s=0,l=er(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of r)c.col!==s&&(s=c.col,l=er(n,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Fp(t,this),this._draw(),Bp(t)}}_draw(){const{options:t,columnSizes:r,lineWidths:n,ctx:i}=this,{align:a,labels:o}=t,s=et.color,l=ta(t.rtl,this.left,this.width),c=Rt(o.font),{padding:u}=o,f=c.size,d=f/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:p,itemHeight:g}=bO(o,f),v=function(O,E,C){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;i.save();const M=se(C.lineWidth,1);if(i.fillStyle=se(C.fillStyle,s),i.lineCap=se(C.lineCap,"butt"),i.lineDashOffset=se(C.lineDashOffset,0),i.lineJoin=se(C.lineJoin,"miter"),i.lineWidth=M,i.strokeStyle=se(C.strokeStyle,s),i.setLineDash(se(C.lineDash,[])),o.usePointStyle){const $={radius:p*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:M},j=l.xPlus(O,m/2),_=E+d;d2(i,$,j,_,o.pointStyleWidth&&m)}else{const $=E+Math.max((f-p)/2,0),j=l.leftForLtr(O,m),_=Ji(C.borderRadius);i.beginPath(),Object.values(_).some(I=>I!==0)?fc(i,{x:j,y:$,w:m,h:p,radius:_}):i.rect(j,$,m,p),i.fill(),M!==0&&i.stroke()}i.restore()},b=function(O,E,C){uc(i,C.text,O,E+g/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},x=this.isHorizontal(),S=this._computeTitleHeight();x?h={x:er(a,this.left+u,this.right-n[0]),y:this.top+u+S,line:0}:h={x:this.left+u,y:er(a,this.top+S+u,this.bottom-r[0].height),line:0},S2(this.ctx,t.textDirection);const w=g+u;this.legendItems.forEach((O,E)=>{i.strokeStyle=O.fontColor,i.fillStyle=O.fontColor;const C=i.measureText(O.text).width,M=l.textAlign(O.textAlign||(O.textAlign=o.textAlign)),$=m+d+C;let j=h.x,_=h.y;l.setWidth(this.width),x?E>0&&j+$+u>this.right&&(_=h.y+=w,h.line++,j=h.x=er(a,this.left+u,this.right-n[h.line])):E>0&&_+w>this.bottom&&(j=h.x=j+r[h.line].width+u,h.line++,_=h.y=er(a,this.top+S+u,this.bottom-r[h.line].height));const I=l.x(j);if(v(I,_,O),j=A7(M,j+m+d,x?j+$:this.right,t.rtl),b(l.x(j),_,O),x)h.x+=$+u;else if(typeof O.text!="string"){const D=c.lineHeight;h.y+=wO(O,D)+u}else h.y+=w}),O2(this.ctx,t.textDirection)}drawTitle(){const t=this.options,r=t.title,n=Rt(r.font),i=vr(r.padding);if(!r.display)return;const a=ta(t.rtl,this.left,this.width),o=this.ctx,s=r.position,l=n.size/2,c=i.top+l;let u,f=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+c,f=er(t.align,f,this.right-d);else{const m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);u=c+er(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const h=er(s,f,f+d);o.textAlign=a.textAlign(i2(s)),o.textBaseline="middle",o.strokeStyle=r.color,o.fillStyle=r.color,o.font=n.string,uc(o,r.text,h,u,n)}_computeTitleHeight(){const t=this.options.title,r=Rt(t.font),n=vr(t.padding);return t.display?r.lineHeight+n.height:0}_getLegendItemAt(t,r){let n,i,a;if(Cn(t,this.left,this.right)&&Cn(r,this.top,this.bottom)){for(a=this.legendHitBoxes,n=0;n<a.length;++n)if(i=a[n],Cn(t,i.left,i.left+i.width)&&Cn(r,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(t){const r=this.options;if(!L9(t.type,r))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=N9(i,n);i&&!a&&Fe(r.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!a&&Fe(r.onHover,[t,n,this],this)}else n&&Fe(r.onClick,[t,n,this],this)}}function I9(e,t,r,n,i){const a=$9(n,e,t,r),o=R9(i,n,t.lineHeight);return{itemWidth:a,itemHeight:o}}function $9(e,t,r,n){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((a,o)=>a.length>o.length?a:o)),t+r.size/2+n.measureText(i).width}function R9(e,t,r){let n=e;return typeof t.text!="string"&&(n=wO(t,r)),n}function wO(e,t){const r=e.text?e.text.length:0;return t*r}function L9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var yr={id:"legend",_element:xO,start(e,t,r){const n=e.legend=new xO({ctx:e.ctx,options:r,chart:e});kn.configure(e,n,r),kn.addBox(e,n)},stop(e){kn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,r){const n=e.legend;kn.configure(e,n,r),n.options=r},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,r){const n=t.datasetIndex,i=r.chart;i.isDatasetVisible(n)?(i.hide(n),t.hidden=!0):(i.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(r?0:void 0),u=vr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const Do={average(e){if(!e.length)return!1;let t,r,n=new Set,i=0,a=0;for(t=0,r=e.length;t<r;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();n.add(l.x),i+=l.y,++a}}return a===0||n.size===0?!1:{x:[...n].reduce((s,l)=>s+l)/n.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let r=t.x,n=t.y,i=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=e.length;a<o;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Mp(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();r=l.x,n=l.y}return{x:r,y:n}}};function Dr(e,t){return t&&(yt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function on(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
214
+ */class MW{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,r,n,i){const a=r.listeners[i],o=r.duration;a.forEach(s=>s({chart:t,initial:r.initial,numSteps:o,currentStep:Math.min(n-r.start,o)}))}_refresh(){this._request||(this._running=!0,this._request=rS.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let r=0;this._charts.forEach((n,i)=>{if(!n.running||!n.items.length)return;const a=n.items;let o=a.length-1,s=!1,l;for(;o>=0;--o)l=a[o],l._active?(l._total>n.duration&&(n.duration=l._total),l.tick(t),s=!0):(a[o]=a[a.length-1],a.pop());s&&(i.draw(),this._notify(i,n,t,"progress")),a.length||(n.running=!1,this._notify(i,n,t,"complete"),n.initial=!1),r+=a.length}),this._lastDate=t,r===0&&(this._running=!1)}_getAnims(t){const r=this._charts;let n=r.get(t);return n||(n={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},r.set(t,n)),n}listen(t,r,n){this._getAnims(t).listeners[r].push(n)}add(t,r){!r||!r.length||this._getAnims(t).items.push(...r)}has(t){return this._getAnims(t).items.length>0}start(t){const r=this._charts.get(t);r&&(r.running=!0,r.start=Date.now(),r.duration=r.items.reduce((n,i)=>Math.max(n,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const r=this._charts.get(t);return!(!r||!r.running||!r.items.length)}stop(t){const r=this._charts.get(t);if(!r||!r.items.length)return;const n=r.items;let i=n.length-1;for(;i>=0;--i)n[i].cancel();r.items=[],this._notify(t,r,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var an=new MW;const kS="transparent",jW={boolean(e,t,r){return r>.5?t:e},color(e,t,r){const n=sS(e||kS),i=n.valid&&sS(t||kS);return i&&i.valid?i.mix(n,r).hexString():t},number(e,t,r){return e+(t-e)*r}};class DW{constructor(t,r,n,i){const a=r[n];i=dc([t.to,i,a,t.from]);const o=dc([t.from,a,i]);this._active=!0,this._fn=t.fn||jW[t.type||typeof o],this._easing=_o[t.easing]||_o.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=r,this._prop=n,this._from=o,this._to=i,this._promises=void 0}active(){return this._active}update(t,r,n){if(this._active){this._notify(!1);const i=this._target[this._prop],a=n-this._start,o=this._duration-a;this._start=n,this._duration=Math.floor(Math.max(o,t.duration)),this._total+=a,this._loop=!!t.loop,this._to=dc([t.to,r,i,t.from]),this._from=dc([t.from,i,r])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const r=t-this._start,n=this._duration,i=this._prop,a=this._from,o=this._loop,s=this._to;let l;if(this._active=a!==s&&(o||r<n),!this._active){this._target[i]=s,this._notify(!0);return}if(r<0){this._target[i]=a;return}l=r/n%2,l=o&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(a,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((r,n)=>{t.push({res:r,rej:n})})}_notify(t){const r=t?"res":"rej",n=this._promises||[];for(let i=0;i<n.length;i++)n[i][r]()}}class TS{constructor(t,r){this._chart=t,this._properties=new Map,this.configure(r)}configure(t){if(!he(t))return;const r=Object.keys(et.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!he(a))return;const o={};for(const s of r)o[s]=a[s];(yt(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!n.has(s))&&n.set(s,o)})})}_animateOptions(t,r){const n=r.options,i=IW(t,n);if(!i)return[];const a=this._createAnimations(i,n);return n.$shared&&NW(t.options.$animations,n).then(()=>{t.options=n},()=>{}),a}_createAnimations(t,r){const n=this._properties,i=[],a=t.$animations||(t.$animations={}),o=Object.keys(r),s=Date.now();let l;for(l=o.length-1;l>=0;--l){const c=o[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,r));continue}const u=r[c];let f=a[c];const d=n.get(c);if(f)if(d&&f.active()){f.update(d,u,s);continue}else f.cancel();if(!d||!d.duration){t[c]=u;continue}a[c]=f=new DW(d,t,c,u),i.push(f)}return i}update(t,r){if(this._properties.size===0){Object.assign(t,r);return}const n=this._createAnimations(t,r);if(n.length)return an.add(this._chart,n),!0}}function NW(e,t){const r=[],n=Object.keys(t);for(let i=0;i<n.length;i++){const a=e[n[i]];a&&a.active()&&r.push(a.wait())}return Promise.all(r)}function IW(e,t){if(!t)return;let r=e.options;if(!r){e.options=t;return}return r.$shared&&(e.options=r=Object.assign({},r,{$shared:!1,$animations:{}})),r}function MS(e,t){const r=e&&e.options||{},n=r.reverse,i=r.min===void 0?t:0,a=r.max===void 0?t:0;return{start:n?a:i,end:n?i:a}}function $W(e,t,r){if(r===!1)return!1;const n=MS(e,r),i=MS(t,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function RW(e){let t,r,n,i;return he(e)?(t=e.top,r=e.right,n=e.bottom,i=e.left):t=r=n=i=e,{top:t,right:r,bottom:n,left:i,disabled:e===!1}}function jS(e,t){const r=[],n=e._getSortedDatasetMetas(t);let i,a;for(i=0,a=n.length;i<a;++i)r.push(n[i].index);return r}function DS(e,t,r,n={}){const i=e.keys,a=n.mode==="single";let o,s,l,c;if(t===null)return;let u=!1;for(o=0,s=i.length;o<s;++o){if(l=+i[o],l===r){if(u=!0,n.all)continue;break}c=e.values[l],dr(c)&&(a||t===0||Mr(t)===Mr(c))&&(t+=c)}return!u&&!n.all?0:t}function LW(e,t){const{iScale:r,vScale:n}=t,i=r.axis==="x"?"x":"y",a=n.axis==="x"?"x":"y",o=Object.keys(e),s=new Array(o.length);let l,c,u;for(l=0,c=o.length;l<c;++l)u=o[l],s[l]={[i]:u,[a]:e[u]};return s}function qp(e,t){const r=e&&e.options.stacked;return r||r===void 0&&t.stack!==void 0}function FW(e,t,r){return`${e.id}.${t.id}.${r.stack||r.type}`}function BW(e){const{min:t,max:r,minDefined:n,maxDefined:i}=e.getUserBounds();return{min:n?t:Number.NEGATIVE_INFINITY,max:i?r:Number.POSITIVE_INFINITY}}function zW(e,t,r){const n=e[t]||(e[t]={});return n[r]||(n[r]={})}function NS(e,t,r,n){for(const i of t.getMatchingVisibleMetas(n).reverse()){const a=e[i.index];if(r&&a>0||!r&&a<0)return i.index}return null}function IS(e,t){const{chart:r,_cachedMeta:n}=e,i=r._stacks||(r._stacks={}),{iScale:a,vScale:o,index:s}=n,l=a.axis,c=o.axis,u=FW(a,o,n),f=t.length;let d;for(let h=0;h<f;++h){const m=t[h],{[l]:p,[c]:g}=m,v=m._stacks||(m._stacks={});d=v[c]=zW(i,u,p),d[s]=g,d._top=NS(d,o,!0,n.type),d._bottom=NS(d,o,!1,n.type);const b=d._visualValues||(d._visualValues={});b[s]=g}}function Yp(e,t){const r=e.scales;return Object.keys(r).filter(n=>r[n].axis===t).shift()}function WW(e,t){return hi(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function VW(e,t,r){return hi(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:r,index:t,mode:"default",type:"data"})}function Ao(e,t){const r=e.controller.index,n=e.vScale&&e.vScale.axis;if(n){t=t||e._parsed;for(const i of t){const a=i._stacks;if(!a||a[n]===void 0||a[n][r]===void 0)return;delete a[n][r],a[n]._visualValues!==void 0&&a[n]._visualValues[r]!==void 0&&delete a[n]._visualValues[r]}}}const Gp=e=>e==="reset"||e==="none",$S=(e,t)=>t?e:Object.assign({},e),HW=(e,t,r)=>e&&!t.hidden&&t._stacked&&{keys:jS(r,!0),values:null};class yc{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,r){this.chart=t,this._ctx=t.ctx,this.index=r,this._cachedDataOpts={},this._cachedMeta=this.getMeta(),this._type=this._cachedMeta.type,this.options=void 0,this._parsing=!1,this._data=void 0,this._objectData=void 0,this._sharedOptions=void 0,this._drawStart=void 0,this._drawCount=void 0,this.enableOptionSharing=!1,this.supportsDecimation=!1,this.$context=void 0,this._syncList=[],this.datasetElementType=new.target.datasetElementType,this.dataElementType=new.target.dataElementType,this.initialize()}initialize(){const t=this._cachedMeta;this.configure(),this.linkScales(),t._stacked=qp(t.vScale,t),this.addElements(),this.options.fill&&!this.chart.isPluginEnabled("filler")&&console.warn("Tried to use the 'fill' option without the 'Filler' plugin enabled. Please import and register the 'Filler' plugin and make sure it is not disabled in the options")}updateIndex(t){this.index!==t&&Ao(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,r=this._cachedMeta,n=this.getDataset(),i=(f,d,h,m)=>f==="x"?d:f==="r"?m:h,a=r.xAxisID=se(n.xAxisID,Yp(t,"x")),o=r.yAxisID=se(n.yAxisID,Yp(t,"y")),s=r.rAxisID=se(n.rAxisID,Yp(t,"r")),l=r.indexAxis,c=r.iAxisID=i(l,a,o,s),u=r.vAxisID=i(l,o,a,s);r.xScale=this.getScaleForId(a),r.yScale=this.getScaleForId(o),r.rScale=this.getScaleForId(s),r.iScale=this.getScaleForId(c),r.vScale=this.getScaleForId(u)}getDataset(){return this.chart.data.datasets[this.index]}getMeta(){return this.chart.getDatasetMeta(this.index)}getScaleForId(t){return this.chart.scales[t]}_getOtherScale(t){const r=this._cachedMeta;return t===r.iScale?r.vScale:r.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&eS(this._data,this),t._stacked&&Ao(t)}_dataCheck(){const t=this.getDataset(),r=t.data||(t.data=[]),n=this._data;if(he(r)){const i=this._cachedMeta;this._data=LW(r,i)}else if(n!==r){if(n){eS(n,this);const i=this._cachedMeta;Ao(i),i._parsed=[]}r&&Object.isExtensible(r)&&S7(r,this),this._syncList=[],this._data=r}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const r=this._cachedMeta,n=this.getDataset();let i=!1;this._dataCheck();const a=r._stacked;r._stacked=qp(r.vScale,r),r.stack!==n.stack&&(i=!0,Ao(r),r.stack=n.stack),this._resyncElements(t),(i||a!==r._stacked)&&(IS(this,r._parsed),r._stacked=qp(r.vScale,r))}configure(){const t=this.chart.config,r=t.datasetScopeKeys(this._type),n=t.getOptionScopes(this.getDataset(),r,!0);this.options=t.createResolver(n,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,r){const{_cachedMeta:n,_data:i}=this,{iScale:a,_stacked:o}=n,s=a.axis;let l=t===0&&r===i.length?!0:n._sorted,c=t>0&&n._parsed[t-1],u,f,d;if(this._parsing===!1)n._parsed=i,n._sorted=!0,d=i;else{yt(i[t])?d=this.parseArrayData(n,i,t,r):he(i[t])?d=this.parseObjectData(n,i,t,r):d=this.parsePrimitiveData(n,i,t,r);const h=()=>f[s]===null||c&&f[s]<c[s];for(u=0;u<r;++u)n._parsed[u+t]=f=d[u],l&&(h()&&(l=!1),c=f);n._sorted=l}o&&IS(this,d)}parsePrimitiveData(t,r,n,i){const{iScale:a,vScale:o}=t,s=a.axis,l=o.axis,c=a.getLabels(),u=a===o,f=new Array(i);let d,h,m;for(d=0,h=i;d<h;++d)m=d+n,f[d]={[s]:u||a.parse(c[m],m),[l]:o.parse(r[m],m)};return f}parseArrayData(t,r,n,i){const{xScale:a,yScale:o}=t,s=new Array(i);let l,c,u,f;for(l=0,c=i;l<c;++l)u=l+n,f=r[u],s[l]={x:a.parse(f[0],u),y:o.parse(f[1],u)};return s}parseObjectData(t,r,n,i){const{xScale:a,yScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,f,d,h;for(u=0,f=i;u<f;++u)d=u+n,h=r[d],c[u]={x:a.parse(li(h,s),d),y:o.parse(li(h,l),d)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,r,n){const i=this.chart,a=this._cachedMeta,o=r[t.axis],s={keys:jS(i,!0),values:r._stacks[t.axis]._visualValues};return DS(s,o,a.index,{mode:n})}updateRangeFromParsed(t,r,n,i){const a=n[r.axis];let o=a===null?NaN:a;const s=i&&n._stacks[r.axis];i&&s&&(i.values=s,o=DS(i,a,this._cachedMeta.index)),t.min=Math.min(t.min,o),t.max=Math.max(t.max,o)}getMinMax(t,r){const n=this._cachedMeta,i=n._parsed,a=n._sorted&&t===n.iScale,o=i.length,s=this._getOtherScale(t),l=HW(r,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=BW(s);let d,h;function m(){h=i[d];const p=h[s.axis];return!dr(h[t.axis])||u>p||f<p}for(d=0;d<o&&!(!m()&&(this.updateRangeFromParsed(c,t,h,l),a));++d);if(a){for(d=o-1;d>=0;--d)if(!m()){this.updateRangeFromParsed(c,t,h,l);break}}return c}getAllParsedValues(t){const r=this._cachedMeta._parsed,n=[];let i,a,o;for(i=0,a=r.length;i<a;++i)o=r[i][t.axis],dr(o)&&n.push(o);return n}getMaxOverflow(){return!1}getLabelAndValue(t){const r=this._cachedMeta,n=r.iScale,i=r.vScale,a=this.getParsed(t);return{label:n?""+n.getLabelForValue(a[n.axis]):"",value:i?""+i.getLabelForValue(a[i.axis]):""}}_update(t){const r=this._cachedMeta;this.update(t||"default"),r._clip=RW(se(this.options.clip,$W(r.xScale,r.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,r=this.chart,n=this._cachedMeta,i=n.data||[],a=r.chartArea,o=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(n.dataset&&n.dataset.draw(t,a,s,l),u=s;u<s+l;++u){const f=i[u];f.hidden||(f.active&&c?o.push(f):f.draw(t,a))}for(u=0;u<o.length;++u)o[u].draw(t,a)}getStyle(t,r){const n=r?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(n):this.resolveDataElementOptions(t||0,n)}getContext(t,r,n){const i=this.getDataset();let a;if(t>=0&&t<this._cachedMeta.data.length){const o=this._cachedMeta.data[t];a=o.$context||(o.$context=VW(this.getContext(),t,o)),a.parsed=this.getParsed(t),a.raw=i.data[t],a.index=a.dataIndex=t}else a=this.$context||(this.$context=WW(this.chart.getContext(),this.index)),a.dataset=i,a.index=a.datasetIndex=this.index;return a.active=!!r,a.mode=n,a}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,r){return this._resolveElementOptions(this.dataElementType.id,r,t)}_resolveElementOptions(t,r="default",n){const i=r==="active",a=this._cachedDataOpts,o=t+"-"+r,s=a[o],l=this.enableOptionSharing&&yo(n);if(s)return $S(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),f=i?[`${t}Hover`,"hover",t,""]:[t,""],d=c.getOptionScopes(this.getDataset(),u),h=Object.keys(et.elements[t]),m=()=>this.getContext(n,i,r),p=c.resolveNamedOptions(d,h,m,f);return p.$shared&&(p.$shared=l,a[o]=Object.freeze($S(p,l))),p}_resolveAnimations(t,r,n){const i=this.chart,a=this._cachedDataOpts,o=`animation-${r}`,s=a[o];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,f=u.datasetAnimationScopeKeys(this._type,r),d=u.getOptionScopes(this.getDataset(),f);l=u.createResolver(d,this.getContext(t,n,r))}const c=new TS(i,l&&l.animations);return l&&l._cacheable&&(a[o]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,r){return!r||Gp(t)||this.chart._animationsDisabled}_getSharedOptions(t,r){const n=this.resolveDataElementOptions(t,r),i=this._sharedOptions,a=this.getSharedOptions(n),o=this.includeOptions(r,a)||a!==i;return this.updateSharedOptions(a,r,n),{sharedOptions:a,includeOptions:o}}updateElement(t,r,n,i){Gp(i)?Object.assign(t,n):this._resolveAnimations(r,i).update(t,n)}updateSharedOptions(t,r,n){t&&!Gp(r)&&this._resolveAnimations(void 0,r).update(t,n)}_setStyle(t,r,n,i){t.active=i;const a=this.getStyle(r,i);this._resolveAnimations(r,n,i).update(t,{options:!i&&this.getSharedOptions(a)||a})}removeHoverStyle(t,r,n){this._setStyle(t,n,"active",!1)}setHoverStyle(t,r,n){this._setStyle(t,n,"active",!0)}_removeDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!1)}_setDatasetHoverStyle(){const t=this._cachedMeta.dataset;t&&this._setStyle(t,void 0,"active",!0)}_resyncElements(t){const r=this._data,n=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=n.length,a=r.length,o=Math.min(a,i);o&&this.parse(0,o),a>i?this._insertElements(i,a-i,t):a<i&&this._removeElements(a,i-a)}_insertElements(t,r,n=!0){const i=this._cachedMeta,a=i.data,o=t+r;let s;const l=c=>{for(c.length+=r,s=c.length-1;s>=o;s--)c[s]=c[s-r]};for(l(a),s=t;s<o;++s)a[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,r),n&&this.updateElements(a,t,r,"reset")}updateElements(t,r,n,i){}_removeElements(t,r){const n=this._cachedMeta;if(this._parsing){const i=n._parsed.splice(t,r);n._stacked&&Ao(n,i)}n.data.splice(t,r)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[r,n,i]=t;this[r](n,i)}this.chart._dataChanges.push([this.index,...t])}_onDataPush(){const t=arguments.length;this._sync(["_insertElements",this.getDataset().data.length-t,t])}_onDataPop(){this._sync(["_removeElements",this._cachedMeta.data.length-1,1])}_onDataShift(){this._sync(["_removeElements",0,1])}_onDataSplice(t,r){r&&this._sync(["_removeElements",t,r]);const n=arguments.length-2;n&&this._sync(["_insertElements",t,n])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function UW(e,t){if(!e._cache.$bar){const r=e.getMatchingVisibleMetas(t);let n=[];for(let i=0,a=r.length;i<a;i++)n=n.concat(r[i].controller.getAllParsedValues(e));e._cache.$bar=tS(n.sort((i,a)=>i-a))}return e._cache.$bar}function KW(e){const t=e.iScale,r=UW(t,e.type);let n=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(yo(s)&&(n=Math.min(n,Math.abs(o-s)||n)),s=o)};for(i=0,a=r.length;i<a;++i)o=t.getPixelForValue(r[i]),l();for(s=void 0,i=0,a=t.ticks.length;i<a;++i)o=t.getPixelForTick(i),l();return n}function qW(e,t,r,n){const i=r.barThickness;let a,o;return Se(i)?(a=t.min*r.categoryPercentage,o=r.barPercentage):(a=i*n,o=1),{chunk:a/n,ratio:o,start:t.pixels[e]-a/2}}function YW(e,t,r,n){const i=t.pixels,a=i[e];let o=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=r.categoryPercentage;o===null&&(o=a-(s===null?t.end-t.start:s-a)),s===null&&(s=a+a-o);const c=a-(a-Math.min(o,s))/2*l;return{chunk:Math.abs(s-o)/2*l/n,ratio:r.barPercentage,start:c}}function GW(e,t,r,n){const i=r.parse(e[0],n),a=r.parse(e[1],n),o=Math.min(i,a),s=Math.max(i,a);let l=o,c=s;Math.abs(o)>Math.abs(s)&&(l=s,c=o),t[r.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:a,min:o,max:s}}function RS(e,t,r,n){return yt(e)?GW(e,t,r,n):t[r.axis]=r.parse(e,n),t}function LS(e,t,r,n){const i=e.iScale,a=e.vScale,o=i.getLabels(),s=i===a,l=[];let c,u,f,d;for(c=r,u=r+n;c<u;++c)d=t[c],f={},f[i.axis]=s||i.parse(o[c],c),l.push(RS(d,f,a,c));return l}function Xp(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function XW(e,t,r){return e!==0?Mr(e):(t.isHorizontal()?1:-1)*(t.min>=r?1:-1)}function ZW(e){let t,r,n,i,a;return e.horizontal?(t=e.base>e.x,r="left",n="right"):(t=e.base<e.y,r="bottom",n="top"),t?(i="end",a="start"):(i="start",a="end"),{start:r,end:n,reverse:t,top:i,bottom:a}}function JW(e,t,r,n){let i=t.borderSkipped;const a={};if(!i){e.borderSkipped=a;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:o,end:s,reverse:l,top:c,bottom:u}=ZW(e);i==="middle"&&r&&(e.enableBorderRadius=!0,(r._top||0)===n?i=c:(r._bottom||0)===n?i=u:(a[FS(u,o,s,l)]=!0,i=c)),a[FS(i,o,s,l)]=!0,e.borderSkipped=a}function FS(e,t,r,n){return n?(e=QW(e,t,r),e=BS(e,r,t)):e=BS(e,t,r),e}function QW(e,t,r){return e===t?r:e===r?t:e}function BS(e,t,r){return e==="start"?t:e==="end"?r:e}function eV(e,{inflateAmount:t},r){e.inflateAmount=t==="auto"?r===1?.33:0:t}class tV extends yc{static id="bar";static defaults={datasetElementType:!1,dataElementType:"bar",categoryPercentage:.8,barPercentage:.9,grouped:!0,animations:{numbers:{type:"number",properties:["x","y","base","width","height"]}}};static overrides={scales:{_index_:{type:"category",offset:!0,grid:{offset:!0}},_value_:{type:"linear",beginAtZero:!0}}};parsePrimitiveData(t,r,n,i){return LS(t,r,n,i)}parseArrayData(t,r,n,i){return LS(t,r,n,i)}parseObjectData(t,r,n,i){const{iScale:a,vScale:o}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=a.axis==="x"?s:l,u=o.axis==="x"?s:l,f=[];let d,h,m,p;for(d=n,h=n+i;d<h;++d)p=r[d],m={},m[a.axis]=a.parse(li(p,c),d),f.push(RS(li(p,u),m,o,d));return f}updateRangeFromParsed(t,r,n,i){super.updateRangeFromParsed(t,r,n,i);const a=n._custom;a&&r===this._cachedMeta.vScale&&(t.min=Math.min(t.min,a.min),t.max=Math.max(t.max,a.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const r=this._cachedMeta,{iScale:n,vScale:i}=r,a=this.getParsed(t),o=a._custom,s=Xp(o)?"["+o.start+", "+o.end+"]":""+i.getLabelForValue(a[i.axis]);return{label:""+n.getLabelForValue(a[n.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const r=this._cachedMeta;this.updateElements(r.data,0,r.data.length,t)}updateElements(t,r,n,i){const a=i==="reset",{index:o,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:f,includeOptions:d}=this._getSharedOptions(r,i);for(let h=r;h<r+n;h++){const m=this.getParsed(h),p=a||Se(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),g=this._calculateBarIndexPixels(h,u),v=(m._stacks||{})[s.axis],b={horizontal:c,base:p.base,enableBorderRadius:!v||Xp(m._custom)||o===v._top||o===v._bottom,x:c?p.head:g.center,y:c?g.center:p.head,height:c?g.size:Math.abs(p.size),width:c?Math.abs(p.size):g.size};d&&(b.options=f||this.resolveDataElementOptions(h,t[h].active?"active":i));const x=b.options||t[h].options;JW(b,x,v,o),eV(b,x,u.ratio),this.updateElement(t[h],h,b,i)}}_getStacks(t,r){const{iScale:n}=this._cachedMeta,i=n.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),a=n.options.stacked,o=[],s=this._cachedMeta.controller.getParsed(r),l=s&&s[n.axis],c=u=>{const f=u._parsed.find(h=>h[n.axis]===l),d=f&&f[u.vScale.axis];if(Se(d)||isNaN(d))return!0};for(const u of i)if(!(r!==void 0&&c(u))&&((a===!1||o.indexOf(u.stack)===-1||a===void 0&&u.stack===void 0)&&o.push(u.stack),u.index===t))break;return o.length||o.push(void 0),o}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,r=this.chart.options.indexAxis;return Object.keys(t).filter(n=>t[n].axis===r).shift()}_getAxis(){const t={},r=this.getFirstScaleIdForIndexAxis();for(const n of this.chart.data.datasets)t[se(this.chart.options.indexAxis==="x"?n.xAxisID:n.yAxisID,r)]=!0;return Object.keys(t)}_getStackIndex(t,r,n){const i=this._getStacks(t,n),a=r!==void 0?i.indexOf(r):-1;return a===-1?i.length-1:a}_getRuler(){const t=this.options,r=this._cachedMeta,n=r.iScale,i=[];let a,o;for(a=0,o=r.data.length;a<o;++a)i.push(n.getPixelForValue(this.getParsed(a)[n.axis],a));const s=t.barThickness;return{min:s||KW(r),pixels:i,start:n._startPixel,end:n._endPixel,stackCount:this._getStackCount(),scale:n,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:r,_stacked:n,index:i},options:{base:a,minBarLength:o}}=this,s=a||0,l=this.getParsed(t),c=l._custom,u=Xp(c);let f=l[r.axis],d=0,h=n?this.applyStack(r,l,n):f,m,p;h!==f&&(d=h-f,h=f),u&&(f=c.barStart,h=c.barEnd-c.barStart,f!==0&&Mr(f)!==Mr(c.barEnd)&&(d=0),d+=f);const g=!Se(a)&&!u?a:d;let v=r.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=r.getPixelForValue(d+h):m=v,p=m-v,Math.abs(p)<o){p=XW(p,r,s)*o,f===s&&(v-=p/2);const b=r.getPixelForDecimal(0),x=r.getPixelForDecimal(1),S=Math.min(b,x),w=Math.max(b,x);v=Math.max(Math.min(v,w),S),m=v+p,n&&!u&&(l._stacks[r.axis]._visualValues[i]=r.getValueForPixel(m)-r.getValueForPixel(v))}if(v===r.getPixelForValue(s)){const b=Mr(p)*r.getLineWidthForValue(s)/2;v+=b,p-=b}return{size:p,base:v,head:m,center:m+p/2}}_calculateBarIndexPixels(t,r){const n=r.scale,i=this.options,a=i.skipNull,o=se(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(r.grouped){const u=a?this._getStackCount(t):r.stackCount,f=i.barThickness==="flex"?YW(t,r,i,u*c):qW(t,r,i,u*c),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(se(d,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,a?t:void 0)+h;s=f.start+f.chunk*m+f.chunk/2,l=Math.min(o,f.chunk*f.ratio)}else s=n.getPixelForValue(this.getParsed(t)[n.axis],t),l=Math.min(o,r.min*r.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,r=t.vScale,n=t.data,i=n.length;let a=0;for(;a<i;++a)this.getParsed(a)[r.axis]!==null&&!n[a].hidden&&n[a].draw(this._ctx)}}function rV(e,t,r){let n=1,i=1,a=0,o=0;if(t<Ge){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),f=Math.cos(l),d=Math.sin(l),h=(x,S,w)=>wo(x,s,l,!0)?1:Math.max(S,S*r,w,w*r),m=(x,S,w)=>wo(x,s,l,!0)?-1:Math.min(S,S*r,w,w*r),p=h(0,c,f),g=h(ft,u,d),v=m(je,c,f),b=m(je+ft,u,d);n=(p-v)/2,i=(g-b)/2,a=-(p+v)/2,o=-(g+b)/2}return{ratioX:n,ratioY:i,offsetX:a,offsetY:o}}class nV extends yc{static id="doughnut";static defaults={datasetElementType:!1,dataElementType:"arc",animation:{animateRotate:!0,animateScale:!1},animations:{numbers:{type:"number",properties:["circumference","endAngle","innerRadius","outerRadius","startAngle","x","y","offset","borderWidth","spacing"]}},cutout:"50%",rotation:0,circumference:360,radius:"100%",spacing:0,indexAxis:"r"};static descriptors={_scriptable:t=>t!=="spacing",_indexable:t=>t!=="spacing"&&!t.startsWith("borderDash")&&!t.startsWith("hoverBorderDash")};static overrides={aspectRatio:1,plugins:{legend:{labels:{generateLabels(t){const r=t.data;if(r.labels.length&&r.datasets.length){const{labels:{pointStyle:n,color:i}}=t.legend.options;return r.labels.map((a,o)=>{const l=t.getDatasetMeta(0).controller.getStyle(o);return{text:a,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:n,hidden:!t.getDataVisibility(o),index:o}})}return[]}},onClick(t,r,n){n.chart.toggleDataVisibility(r.index),n.chart.update()}}}};constructor(t,r){super(t,r),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,r){const n=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=n;else{let a=l=>+n[l];if(he(n[t])){const{key:l="value"}=this._parsing;a=c=>+li(n[c],l)}let o,s;for(o=t,s=t+r;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return nn(this.options.rotation-90)}_getCircumference(){return nn(this.options.circumference)}_getRotationExtents(){let t=Ge,r=-Ge;for(let n=0;n<this.chart.data.datasets.length;++n)if(this.chart.isDatasetVisible(n)&&this.chart.getDatasetMeta(n).type===this._type){const i=this.chart.getDatasetMeta(n).controller,a=i._getRotation(),o=i._getCircumference();t=Math.min(t,a),r=Math.max(r,a+o)}return{rotation:t,circumference:r-t}}update(t){const r=this.chart,{chartArea:n}=r,i=this._cachedMeta,a=i.data,o=this.getMaxBorderWidth()+this.getMaxOffset(a)+this.options.spacing,s=Math.max((Math.min(n.width,n.height)-o)/2,0),l=Math.min(o7(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:m,offsetY:p}=rV(f,u,l),g=(n.width-o)/d,v=(n.height-o)/h,b=Math.max(Math.min(g,v)/2,0),x=H2(this.options.radius,b),S=Math.max(x*l,0),w=(x-S)/this._getVisibleDatasetWeightTotal();this.offsetX=m*x,this.offsetY=p*x,i.total=this.calculateTotal(),this.outerRadius=x-w*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-w*c,0),this.updateElements(a,0,a.length,t)}_circumference(t,r){const n=this.options,i=this._cachedMeta,a=this._getCircumference();return r&&n.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*a/Ge)}updateElements(t,r,n,i){const a=i==="reset",o=this.chart,s=o.chartArea,c=o.options.animation,u=(s.left+s.right)/2,f=(s.top+s.bottom)/2,d=a&&c.animateScale,h=d?0:this.innerRadius,m=d?0:this.outerRadius,{sharedOptions:p,includeOptions:g}=this._getSharedOptions(r,i);let v=this._getRotation(),b;for(b=0;b<r;++b)v+=this._circumference(b,a);for(b=r;b<r+n;++b){const x=this._circumference(b,a),S=t[b],w={x:u+this.offsetX,y:f+this.offsetY,startAngle:v,endAngle:v+x,circumference:x,outerRadius:m,innerRadius:h};g&&(w.options=p||this.resolveDataElementOptions(b,S.active?"active":i)),v+=x,this.updateElement(S,b,w,i)}}calculateTotal(){const t=this._cachedMeta,r=t.data;let n=0,i;for(i=0;i<r.length;i++){const a=t._parsed[i];a!==null&&!isNaN(a)&&this.chart.getDataVisibility(i)&&!r[i].hidden&&(n+=Math.abs(a))}return n}calculateCircumference(t){const r=this._cachedMeta.total;return r>0&&!isNaN(t)?Ge*(Math.abs(t)/r):0}getLabelAndValue(t){const r=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=Ip(r._parsed[t],n.options.locale);return{label:i[t]||"",value:a}}getMaxBorderWidth(t){let r=0;const n=this.chart;let i,a,o,s,l;if(!t){for(i=0,a=n.data.datasets.length;i<a;++i)if(n.isDatasetVisible(i)){o=n.getDatasetMeta(i),t=o.data,s=o.controller;break}}if(!t)return 0;for(i=0,a=t.length;i<a;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(r=Math.max(r,l.borderWidth||0,l.hoverBorderWidth||0));return r}getMaxOffset(t){let r=0;for(let n=0,i=t.length;n<i;++n){const a=this.resolveDataElementOptions(n);r=Math.max(r,a.offset||0,a.hoverOffset||0)}return r}_getRingWeightOffset(t){let r=0;for(let n=0;n<t;++n)this.chart.isDatasetVisible(n)&&(r+=this._getRingWeight(n));return r}_getRingWeight(t){return Math.max(se(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class iV extends yc{static id="line";static defaults={datasetElementType:"line",dataElementType:"point",showLine:!0,spanGaps:!1};static overrides={scales:{_index_:{type:"category"},_value_:{type:"linear"}}};initialize(){this.enableOptionSharing=!0,this.supportsDecimation=!0,super.initialize()}update(t){const r=this._cachedMeta,{dataset:n,data:i=[],_dataset:a}=r,o=this.chart._animationsDisabled;let{start:s,count:l}=E7(r,i,o);this._drawStart=s,this._drawCount=l,P7(r)&&(s=0,l=i.length),n._chart=this.chart,n._datasetIndex=this.index,n._decimated=!!a._decimated,n.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(n,void 0,{animated:!o,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,r,n,i){const a=i==="reset",{iScale:o,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:f}=this._getSharedOptions(r,i),d=o.axis,h=s.axis,{spanGaps:m,segment:p}=this.options,g=xo(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",b=r+n,x=t.length;let S=r>0&&this.getParsed(r-1);for(let w=0;w<x;++w){const O=t[w],E=v?O:{};if(w<r||w>=b){E.skip=!0;continue}const C=this.getParsed(w),M=Se(C[h]),$=E[d]=o.getPixelForValue(C[d],w),j=E[h]=a||M?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,C,l):C[h],w);E.skip=isNaN($)||isNaN(j)||M,E.stop=w>0&&Math.abs(C[d]-S[d])>g,p&&(E.parsed=C,E.raw=c.data[w]),f&&(E.options=u||this.resolveDataElementOptions(w,O.active?"active":i)),v||this.updateElement(O,w,E,i),S=C}}getMaxOverflow(){const t=this._cachedMeta,r=t.dataset,n=r.options&&r.options.borderWidth||0,i=t.data||[];if(!i.length)return n;const a=i[0].size(this.resolveDataElementOptions(0)),o=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(n,a,o)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function vi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Zp{static override(t){Object.assign(Zp.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return vi()}parse(){return vi()}format(){return vi()}add(){return vi()}diff(){return vi()}startOf(){return vi()}endOf(){return vi()}}var aV={_date:Zp};function oV(e,t,r,n){const{controller:i,data:a,_sorted:o}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&o&&a.length){const c=s._reversePixels?w7:ui;if(n){if(i._sharedOptions){const u=a[0],f=typeof u.getRange=="function"&&u.getRange(t);if(f){const d=c(a,t,r-f),h=c(a,t,r+f);return{lo:d.lo,hi:h.hi}}}}else{const u=c(a,t,r);if(l){const{vScale:f}=i._cachedMeta,{_parsed:d}=e,h=d.slice(0,u.lo+1).reverse().findIndex(p=>!Se(p[f.axis]));u.lo-=Math.max(0,h);const m=d.slice(u.hi).findIndex(p=>!Se(p[f.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:a.length-1}}function bc(e,t,r,n,i){const a=e.getSortedVisibleDatasetMetas(),o=r[t];for(let s=0,l=a.length;s<l;++s){const{index:c,data:u}=a[s],{lo:f,hi:d}=oV(a[s],t,o,i);for(let h=f;h<=d;++h){const m=u[h];m.skip||n(m,c,h)}}}function sV(e){const t=e.indexOf("x")!==-1,r=e.indexOf("y")!==-1;return function(n,i){const a=t?Math.abs(n.x-i.x):0,o=r?Math.abs(n.y-i.y):0;return Math.sqrt(Math.pow(a,2)+Math.pow(o,2))}}function Jp(e,t,r,n,i){const a=[];return!i&&!e.isPointInArea(t)||bc(e,r,t,function(s,l,c){!i&&!Oo(s,e.chartArea,0)||s.inRange(t.x,t.y,n)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function lV(e,t,r,n){let i=[];function a(o,s,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],n),{angle:f}=J2(o,{x:t.x,y:t.y});wo(f,c,u)&&i.push({element:o,datasetIndex:s,index:l})}return bc(e,r,t,a),i}function cV(e,t,r,n,i,a){let o=[];const s=sV(r);let l=Number.POSITIVE_INFINITY;function c(u,f,d){const h=u.inRange(t.x,t.y,i);if(n&&!h)return;const m=u.getCenterPoint(i);if(!(!!a||e.isPointInArea(m))&&!h)return;const g=s(t,m);g<l?(o=[{element:u,datasetIndex:f,index:d}],l=g):g===l&&o.push({element:u,datasetIndex:f,index:d})}return bc(e,r,t,c),o}function Qp(e,t,r,n,i,a){return!a&&!e.isPointInArea(t)?[]:r==="r"&&!n?lV(e,t,r,i):cV(e,t,r,n,i,a)}function zS(e,t,r,n,i){const a=[],o=r==="x"?"inXRange":"inYRange";let s=!1;return bc(e,r,t,(l,c,u)=>{l[o]&&l[o](t[r],i)&&(a.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),n&&!s?[]:a}var uV={modes:{index(e,t,r,n){const i=mi(t,e),a=r.axis||"x",o=r.includeInvisible||!1,s=r.intersect?Jp(e,i,a,n,o):Qp(e,i,a,!1,n,o),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,f=c.data[u];f&&!f.skip&&l.push({element:f,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,r,n){const i=mi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;let s=r.intersect?Jp(e,i,a,n,o):Qp(e,i,a,!1,n,o);if(s.length>0){const l=s[0].datasetIndex,c=e.getDatasetMeta(l).data;s=[];for(let u=0;u<c.length;++u)s.push({element:c[u],datasetIndex:l,index:u})}return s},point(e,t,r,n){const i=mi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Jp(e,i,a,n,o)},nearest(e,t,r,n){const i=mi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Qp(e,i,a,r.intersect,n,o)},x(e,t,r,n){const i=mi(t,e);return zS(e,i,"x",r.intersect,n)},y(e,t,r,n){const i=mi(t,e);return zS(e,i,"y",r.intersect,n)}}};const WS=["left","top","right","bottom"];function Eo(e,t){return e.filter(r=>r.pos===t)}function VS(e,t){return e.filter(r=>WS.indexOf(r.pos)===-1&&r.box.axis===t)}function Po(e,t){return e.sort((r,n)=>{const i=t?n:r,a=t?r:n;return i.weight===a.weight?i.index-a.index:i.weight-a.weight})}function fV(e){const t=[];let r,n,i,a,o,s;for(r=0,n=(e||[]).length;r<n;++r)i=e[r],{position:a,options:{stack:o,stackWeight:s=1}}=i,t.push({index:r,box:i,pos:a,horizontal:i.isHorizontal(),weight:i.weight,stack:o&&a+o,stackWeight:s});return t}function dV(e){const t={};for(const r of e){const{stack:n,pos:i,stackWeight:a}=r;if(!n||!WS.includes(i))continue;const o=t[n]||(t[n]={count:0,placed:0,weight:0,size:0});o.count++,o.weight+=a}return t}function hV(e,t){const r=dV(e),{vBoxMaxWidth:n,hBoxMaxHeight:i}=t;let a,o,s;for(a=0,o=e.length;a<o;++a){s=e[a];const{fullSize:l}=s.box,c=r[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*n:l&&t.availableWidth,s.height=i):(s.width=n,s.height=u?u*i:l&&t.availableHeight)}return r}function pV(e){const t=fV(e),r=Po(t.filter(c=>c.box.fullSize),!0),n=Po(Eo(t,"left"),!0),i=Po(Eo(t,"right")),a=Po(Eo(t,"top"),!0),o=Po(Eo(t,"bottom")),s=VS(t,"x"),l=VS(t,"y");return{fullSize:r,leftAndTop:n.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:Eo(t,"chartArea"),vertical:n.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function HS(e,t,r,n){return Math.max(e[r],t[r])+Math.max(e[n],t[n])}function US(e,t){e.top=Math.max(e.top,t.top),e.left=Math.max(e.left,t.left),e.bottom=Math.max(e.bottom,t.bottom),e.right=Math.max(e.right,t.right)}function mV(e,t,r,n){const{pos:i,box:a}=r,o=e.maxPadding;if(!he(i)){r.size&&(e[i]-=r.size);const f=n[r.stack]||{size:0,count:1};f.size=Math.max(f.size,r.horizontal?a.height:a.width),r.size=f.size/f.count,e[i]+=r.size}a.getPadding&&US(o,a.getPadding());const s=Math.max(0,t.outerWidth-HS(o,e,"left","right")),l=Math.max(0,t.outerHeight-HS(o,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,r.horizontal?{same:c,other:u}:{same:u,other:c}}function gV(e){const t=e.maxPadding;function r(n){const i=Math.max(t[n]-e[n],0);return e[n]+=i,i}e.y+=r("top"),e.x+=r("left"),r("right"),r("bottom")}function vV(e,t){const r=t.maxPadding;function n(i){const a={left:0,top:0,right:0,bottom:0};return i.forEach(o=>{a[o]=Math.max(t[o],r[o])}),a}return n(e?["left","right"]:["top","bottom"])}function Co(e,t,r,n){const i=[];let a,o,s,l,c,u;for(a=0,o=e.length,c=0;a<o;++a){s=e[a],l=s.box,l.update(s.width||t.w,s.height||t.h,vV(s.horizontal,t));const{same:f,other:d}=mV(t,r,s,n);c|=f&&i.length,u=u||d,l.fullSize||i.push(s)}return c&&Co(i,t,r,n)||u}function xc(e,t,r,n,i){e.top=r,e.left=t,e.right=t+n,e.bottom=r+i,e.width=n,e.height=i}function KS(e,t,r,n){const i=r.padding;let{x:a,y:o}=t;for(const s of e){const l=s.box,c=n[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const f=t.w*u,d=c.size||l.height;yo(c.start)&&(o=c.start),l.fullSize?xc(l,i.left,o,r.outerWidth-i.right-i.left,d):xc(l,t.left+c.placed,o,f,d),c.start=o,c.placed+=f,o=l.bottom}else{const f=t.h*u,d=c.size||l.width;yo(c.start)&&(a=c.start),l.fullSize?xc(l,a,i.top,d,r.outerHeight-i.bottom-i.top):xc(l,a,t.top+c.placed,d,f),c.start=a,c.placed+=f,a=l.right}}t.x=a,t.y=o}var kn={addBox(e,t){e.boxes||(e.boxes=[]),t.fullSize=t.fullSize||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw(r){t.draw(r)}}]},e.boxes.push(t)},removeBox(e,t){const r=e.boxes?e.boxes.indexOf(t):-1;r!==-1&&e.boxes.splice(r,1)},configure(e,t,r){t.fullSize=r.fullSize,t.position=r.position,t.weight=r.weight},update(e,t,r,n){if(!e)return;const i=vr(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(r-i.height,0),s=pV(e.boxes),l=s.vertical,c=s.horizontal;Ce(e.boxes,p=>{typeof p.beforeLayout=="function"&&p.beforeLayout()});const u=l.reduce((p,g)=>g.box.options&&g.box.options.display===!1?p:p+1,0)||1,f=Object.freeze({outerWidth:t,outerHeight:r,padding:i,availableWidth:a,availableHeight:o,vBoxMaxWidth:a/2/u,hBoxMaxHeight:o/2}),d=Object.assign({},i);US(d,vr(n));const h=Object.assign({maxPadding:d,w:a,h:o,x:i.left,y:i.top},i),m=hV(l.concat(c),f);Co(s.fullSize,h,f,m),Co(l,h,f,m),Co(c,h,f,m)&&Co(l,h,f,m),gV(h),KS(s.leftAndTop,h,f,m),h.x+=h.w,h.y+=h.h,KS(s.rightAndBottom,h,f,m),e.chartArea={left:h.left,top:h.top,right:h.left+h.w,bottom:h.top+h.h,height:h.h,width:h.w},Ce(s.chartArea,p=>{const g=p.box;Object.assign(g,e.chartArea),g.update(h.w,h.h,{left:0,top:0,right:0,bottom:0})})}};class qS{acquireContext(t,r){}releaseContext(t){return!1}addEventListener(t,r,n){}removeEventListener(t,r,n){}getDevicePixelRatio(){return 1}getMaximumSize(t,r,n,i){return r=Math.max(0,r||t.width),n=n||t.height,{width:r,height:Math.max(0,i?Math.floor(r/i):n)}}isAttached(t){return!0}updateConfig(t){}}class yV extends qS{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const wc="$chartjs",bV={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},YS=e=>e===null||e==="";function xV(e,t){const r=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[wc]={initial:{height:n,width:i,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",r.boxSizing=r.boxSizing||"border-box",YS(i)){const a=_S(e,"width");a!==void 0&&(e.width=a)}if(YS(n))if(e.style.height==="")e.height=e.width/(t||2);else{const a=_S(e,"height");a!==void 0&&(e.height=a)}return e}const GS=gW?{passive:!0}:!1;function wV(e,t,r){e&&e.addEventListener(t,r,GS)}function _V(e,t,r){e&&e.canvas&&e.canvas.removeEventListener(t,r,GS)}function SV(e,t){const r=bV[e.type]||e.type,{x:n,y:i}=mi(e,t);return{type:r,chart:t,native:e,x:n!==void 0?n:null,y:i!==void 0?i:null}}function _c(e,t){for(const r of e)if(r===t||r.contains(t))return!0}function OV(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||_c(s.addedNodes,n),o=o&&!_c(s.removedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function AV(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||_c(s.removedNodes,n),o=o&&!_c(s.addedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}const ko=new Map;let XS=0;function ZS(){const e=window.devicePixelRatio;e!==XS&&(XS=e,ko.forEach((t,r)=>{r.currentDevicePixelRatio!==e&&t()}))}function EV(e,t){ko.size||window.addEventListener("resize",ZS),ko.set(e,t)}function PV(e){ko.delete(e),ko.size||window.removeEventListener("resize",ZS)}function CV(e,t,r){const n=e.canvas,i=n&&Kp(n);if(!i)return;const a=nS((s,l)=>{const c=i.clientWidth;r(s,l),c<i.clientWidth&&r()},window),o=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||a(c,u)});return o.observe(i),EV(e,a),o}function em(e,t,r){r&&r.disconnect(),t==="resize"&&PV(e)}function kV(e,t,r){const n=e.canvas,i=nS(a=>{e.ctx!==null&&r(SV(a,e))},e);return wV(n,t,i),i}class TV extends qS{acquireContext(t,r){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(xV(t,r),n):null}releaseContext(t){const r=t.canvas;if(!r[wc])return!1;const n=r[wc].initial;["height","width"].forEach(a=>{const o=n[a];Se(o)?r.removeAttribute(a):r.setAttribute(a,o)});const i=n.style||{};return Object.keys(i).forEach(a=>{r.style[a]=i[a]}),r.width=r.width,delete r[wc],!0}addEventListener(t,r,n){this.removeEventListener(t,r);const i=t.$proxies||(t.$proxies={}),o={attach:OV,detach:AV,resize:CV}[r]||kV;i[r]=o(t,r,n)}removeEventListener(t,r){const n=t.$proxies||(t.$proxies={}),i=n[r];if(!i)return;({attach:em,detach:em,resize:em}[r]||_V)(t,r,i),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,r,n,i){return mW(t,r,n,i)}isAttached(t){const r=t&&Kp(t);return!!(r&&r.isConnected)}}function MV(e){return!Up()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?yV:TV}class Tn{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:r,y:n}=this.getProps(["x","y"],t);return{x:r,y:n}}hasValue(){return xo(this.x)&&xo(this.y)}getProps(t,r){const n=this.$animations;if(!r||!n)return this;const i={};return t.forEach(a=>{i[a]=n[a]&&n[a].active()?n[a]._to:this[a]}),i}}function jV(e,t){const r=e.options.ticks,n=DV(e),i=Math.min(r.maxTicksLimit||n,n),a=r.major.enabled?IV(t):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>i)return $V(t,c,a,o/i),c;const u=NV(a,t,i);if(o>0){let f,d;const h=o>1?Math.round((l-s)/(o-1)):null;for(Sc(t,c,u,Se(h)?0:s-h,s),f=0,d=o-1;f<d;f++)Sc(t,c,u,a[f],a[f+1]);return Sc(t,c,u,l,Se(h)?t.length:l+h),c}return Sc(t,c,u),c}function DV(e){const t=e.options.offset,r=e._tickSize(),n=e._length/r+(t?0:1),i=e._maxLength/r;return Math.floor(Math.min(n,i))}function NV(e,t,r){const n=RV(e),i=t.length/r;if(!n)return Math.max(i,1);const a=p7(n);for(let o=0,s=a.length-1;o<s;o++){const l=a[o];if(l>i)return l}return Math.max(i,1)}function IV(e){const t=[];let r,n;for(r=0,n=e.length;r<n;r++)e[r].major&&t.push(r);return t}function $V(e,t,r,n){let i=0,a=r[0],o;for(n=Math.ceil(n),o=0;o<e.length;o++)o===a&&(t.push(e[o]),i++,a=r[i*n])}function Sc(e,t,r,n,i){const a=se(n,0),o=Math.min(se(i,e.length),e.length);let s=0,l,c,u;for(r=Math.ceil(r),i&&(l=i-n,r=l/Math.floor(l/r)),u=a;u<0;)s++,u=Math.round(a+s*r);for(c=Math.max(a,0);c<o;c++)c===u&&(t.push(e[c]),s++,u=Math.round(a+s*r))}function RV(e){const t=e.length;let r,n;if(t<2)return!1;for(n=e[0],r=1;r<t;++r)if(e[r]-e[r-1]!==n)return!1;return n}const LV=e=>e==="left"?"right":e==="right"?"left":e,JS=(e,t,r)=>t==="top"||t==="left"?e[t]+r:e[t]-r,QS=(e,t)=>Math.min(t||e,e);function eO(e,t){const r=[],n=e.length/t,i=e.length;let a=0;for(;a<i;a+=n)r.push(e[Math.floor(a)]);return r}function FV(e,t,r){const n=e.ticks.length,i=Math.min(t,n-1),a=e._startPixel,o=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(r&&(n===1?c=Math.max(l-a,o-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<a-s||l>o+s)))return l}function BV(e,t){Ce(e,r=>{const n=r.gc,i=n.length/2;let a;if(i>t){for(a=0;a<i;++a)delete r.data[n[a]];n.splice(0,i)}})}function To(e){return e.drawTicks?e.tickLength:0}function tO(e,t){if(!e.display)return 0;const r=Rt(e.font,t),n=vr(e.padding);return(yt(e.text)?e.text.length:1)*r.lineHeight+n.height}function zV(e,t){return hi(e,{scale:t,type:"scale"})}function WV(e,t,r){return hi(e,{tick:r,index:t,type:"tick"})}function VV(e,t,r){let n=iS(e);return(r&&t!=="right"||!r&&t==="right")&&(n=LV(n)),n}function HV(e,t,r,n){const{top:i,left:a,bottom:o,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let f=0,d,h,m;const p=o-i,g=s-a;if(e.isHorizontal()){if(h=er(n,a,s),he(r)){const v=Object.keys(r)[0],b=r[v];m=u[v].getPixelForValue(b)+p-t}else r==="center"?m=(c.bottom+c.top)/2+p-t:m=JS(e,r,t);d=s-a}else{if(he(r)){const v=Object.keys(r)[0],b=r[v];h=u[v].getPixelForValue(b)-g+t}else r==="center"?h=(c.left+c.right)/2-g+t:h=JS(e,r,t);m=er(n,o,i),f=r==="left"?-ft:ft}return{titleX:h,titleY:m,maxWidth:d,rotation:f}}class ra extends Tn{constructor(t){super(),this.id=t.id,this.type=t.type,this.options=void 0,this.ctx=t.ctx,this.chart=t.chart,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.width=void 0,this.height=void 0,this._margins={left:0,right:0,top:0,bottom:0},this.maxWidth=void 0,this.maxHeight=void 0,this.paddingTop=void 0,this.paddingBottom=void 0,this.paddingLeft=void 0,this.paddingRight=void 0,this.axis=void 0,this.labelRotation=void 0,this.min=void 0,this.max=void 0,this._range=void 0,this.ticks=[],this._gridLineItems=null,this._labelItems=null,this._labelSizes=null,this._length=0,this._maxLength=0,this._longestTextCache={},this._startPixel=void 0,this._endPixel=void 0,this._reversePixels=!1,this._userMax=void 0,this._userMin=void 0,this._suggestedMax=void 0,this._suggestedMin=void 0,this._ticksLength=0,this._borderValue=0,this._cache={},this._dataLimitsCached=!1,this.$context=void 0}init(t){this.options=t.setContext(this.getContext()),this.axis=t.axis,this._userMin=this.parse(t.min),this._userMax=this.parse(t.max),this._suggestedMin=this.parse(t.suggestedMin),this._suggestedMax=this.parse(t.suggestedMax)}parse(t,r){return t}getUserBounds(){let{_userMin:t,_userMax:r,_suggestedMin:n,_suggestedMax:i}=this;return t=Tr(t,Number.POSITIVE_INFINITY),r=Tr(r,Number.NEGATIVE_INFINITY),n=Tr(n,Number.POSITIVE_INFINITY),i=Tr(i,Number.NEGATIVE_INFINITY),{min:Tr(t,n),max:Tr(r,i),minDefined:dr(t),maxDefined:dr(r)}}getMinMax(t){let{min:r,max:n,minDefined:i,maxDefined:a}=this.getUserBounds(),o;if(i&&a)return{min:r,max:n};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)o=s[l].controller.getMinMax(this,t),i||(r=Math.min(r,o.min)),a||(n=Math.max(n,o.max));return r=a&&r>n?n:r,n=i&&r>n?r:n,{min:Tr(r,Tr(n,r)),max:Tr(n,Tr(r,n))}}getPadding(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}}getTicks(){return this.ticks}getLabels(){const t=this.chart.data;return this.options.labels||(this.isHorizontal()?t.xLabels:t.yLabels)||t.labels||[]}getLabelItems(t=this.chart.chartArea){return this._labelItems||(this._labelItems=this._computeLabelItems(t))}beforeLayout(){this._cache={},this._dataLimitsCached=!1}beforeUpdate(){Fe(this.options.beforeUpdate,[this])}update(t,r,n){const{beginAtZero:i,grace:a,ticks:o}=this.options,s=o.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=r,this._margins=n=Object.assign({left:0,right:0,top:0,bottom:0},n),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+n.left+n.right:this.height+n.top+n.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=q7(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?eO(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=jV(this,this.ticks),this._labelSizes=null,this.afterAutoSkip()),l&&this._convertTicksToLabels(this.ticks),this.beforeFit(),this.fit(),this.afterFit(),this.afterUpdate()}configure(){let t=this.options.reverse,r,n;this.isHorizontal()?(r=this.left,n=this.right):(r=this.top,n=this.bottom,t=!t),this._startPixel=r,this._endPixel=n,this._reversePixels=t,this._length=n-r,this._alignToPixels=this.options.alignToPixels}afterUpdate(){Fe(this.options.afterUpdate,[this])}beforeSetDimensions(){Fe(this.options.beforeSetDimensions,[this])}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=0,this.right=this.width):(this.height=this.maxHeight,this.top=0,this.bottom=this.height),this.paddingLeft=0,this.paddingTop=0,this.paddingRight=0,this.paddingBottom=0}afterSetDimensions(){Fe(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),Fe(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){Fe(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const r=this.options.ticks;let n,i,a;for(n=0,i=t.length;n<i;n++)a=t[n],a.label=Fe(r.callback,[a.value,n,t],this)}afterTickToLabelConversion(){Fe(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){Fe(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,r=t.ticks,n=QS(this.ticks.length,t.ticks.maxTicksLimit),i=r.minRotation||0,a=r.maxRotation;let o=i,s,l,c;if(!this._isVisible()||!r.display||i>=a||n<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),f=u.widest.width,d=u.highest.height,h=Ct(this.chart.width-f,0,this.maxWidth);s=t.offset?this.maxWidth/n:h/(n-1),f+6>s&&(s=h/(n-(t.offset?.5:1)),l=this.maxHeight-To(t.grid)-r.padding-tO(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),o=y7(Math.min(Math.asin(Ct((u.highest.height+6)/s,-1,1)),Math.asin(Ct(l/c,-1,1))-Math.asin(Ct(d/c,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){Fe(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){Fe(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:r,options:{ticks:n,title:i,grid:a}}=this,o=this._isVisible(),s=this.isHorizontal();if(o){const l=tO(i,r.options.font);if(s?(t.width=this.maxWidth,t.height=To(a)+l):(t.height=this.maxHeight,t.width=To(a)+l),n.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:d}=this._getLabelSizes(),h=n.padding*2,m=nn(this.labelRotation),p=Math.cos(m),g=Math.sin(m);if(s){const v=n.mirror?0:g*f.width+p*d.height;t.height=Math.min(this.maxHeight,t.height+v+h)}else{const v=n.mirror?0:p*f.width+g*d.height;t.width=Math.min(this.maxWidth,t.width+v+h)}this._calculatePadding(c,u,g,p)}}this._handleMargins(),s?(this.width=this._length=r.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=r.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,r,n,i){const{ticks:{align:a,padding:o},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,f=this.right-this.getPixelForTick(this.ticks.length-1);let d=0,h=0;l?c?(d=i*t.width,h=n*r.height):(d=n*t.height,h=i*r.width):a==="start"?h=r.width:a==="end"?d=t.width:a!=="inner"&&(d=t.width/2,h=r.width/2),this.paddingLeft=Math.max((d-u+o)*this.width/(this.width-u),0),this.paddingRight=Math.max((h-f+o)*this.width/(this.width-f),0)}else{let u=r.height/2,f=t.height/2;a==="start"?(u=0,f=t.height):a==="end"&&(u=r.height,f=0),this.paddingTop=u+o,this.paddingBottom=f+o}}_handleMargins(){this._margins&&(this._margins.left=Math.max(this.paddingLeft,this._margins.left),this._margins.top=Math.max(this.paddingTop,this._margins.top),this._margins.right=Math.max(this.paddingRight,this._margins.right),this._margins.bottom=Math.max(this.paddingBottom,this._margins.bottom))}afterFit(){Fe(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:r}=this.options;return r==="top"||r==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let r,n;for(r=0,n=t.length;r<n;r++)Se(t[r].label)&&(t.splice(r,1),n--,r--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const r=this.options.ticks.sampleSize;let n=this.ticks;r<n.length&&(n=eO(n,r)),this._labelSizes=t=this._computeLabelSizes(n,n.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,r,n){const{ctx:i,_longestTextCache:a}=this,o=[],s=[],l=Math.floor(r/QS(r,n));let c=0,u=0,f,d,h,m,p,g,v,b,x,S,w;for(f=0;f<r;f+=l){if(m=t[f].label,p=this._resolveTickFontOptions(f),i.font=g=p.string,v=a[g]=a[g]||{data:{},gc:[]},b=p.lineHeight,x=S=0,!Se(m)&&!yt(m))x=uS(i,v.data,v.gc,x,m),S=b;else if(yt(m))for(d=0,h=m.length;d<h;++d)w=m[d],!Se(w)&&!yt(w)&&(x=uS(i,v.data,v.gc,x,w),S+=b);o.push(x),s.push(S),c=Math.max(x,c),u=Math.max(S,u)}BV(a,r);const O=o.indexOf(c),E=s.indexOf(u),C=M=>({width:o[M]||0,height:s[M]||0});return{first:C(0),last:C(r-1),widest:C(O),highest:C(E),widths:o,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,r){return NaN}getValueForPixel(t){}getPixelForTick(t){const r=this.ticks;return t<0||t>r.length-1?null:this.getPixelForValue(r[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const r=this._startPixel+t*this._length;return x7(this._alignToPixels?di(this.chart,r,0):r)}getDecimalForPixel(t){const r=(t-this._startPixel)/this._length;return this._reversePixels?1-r:r}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:r}=this;return t<0&&r<0?r:t>0&&r>0?t:0}getContext(t){const r=this.ticks||[];if(t>=0&&t<r.length){const n=r[t];return n.$context||(n.$context=WV(this.getContext(),t,n))}return this.$context||(this.$context=zV(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,r=nn(this.labelRotation),n=Math.abs(Math.cos(r)),i=Math.abs(Math.sin(r)),a=this._getLabelSizes(),o=t.autoSkipPadding||0,s=a?a.widest.width+o:0,l=a?a.highest.height+o:0;return this.isHorizontal()?l*n>s*i?s/n:l/i:l*i<s*n?l/n:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const r=this.axis,n=this.chart,i=this.options,{grid:a,position:o,border:s}=i,l=a.offset,c=this.isHorizontal(),f=this.ticks.length+(l?1:0),d=To(a),h=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,v=function(W){return di(n,W,p)};let b,x,S,w,O,E,C,M,$,j,_,I;if(o==="top")b=v(this.bottom),E=this.bottom-d,M=b-g,j=v(t.top)+g,I=t.bottom;else if(o==="bottom")b=v(this.top),j=t.top,I=v(t.bottom)-g,E=b+g,M=this.top+d;else if(o==="left")b=v(this.right),O=this.right-d,C=b-g,$=v(t.left)+g,_=t.right;else if(o==="right")b=v(this.left),$=t.left,_=v(t.right)-g,O=b+g,C=this.left+d;else if(r==="x"){if(o==="center")b=v((t.top+t.bottom)/2+.5);else if(he(o)){const W=Object.keys(o)[0],H=o[W];b=v(this.chart.scales[W].getPixelForValue(H))}j=t.top,I=t.bottom,E=b+g,M=E+d}else if(r==="y"){if(o==="center")b=v((t.left+t.right)/2);else if(he(o)){const W=Object.keys(o)[0],H=o[W];b=v(this.chart.scales[W].getPixelForValue(H))}O=b-g,C=O-d,$=t.left,_=t.right}const D=se(i.ticks.maxTicksLimit,f),L=Math.max(1,Math.ceil(f/D));for(x=0;x<f;x+=L){const W=this.getContext(x),H=a.setContext(W),te=s.setContext(W),Q=H.lineWidth,F=H.color,U=te.dash||[],V=te.dashOffset,re=H.tickWidth,Z=H.tickColor,J=H.tickBorderDash||[],ee=H.tickBorderDashOffset;S=FV(this,x,l),S!==void 0&&(w=di(n,S,Q),c?O=C=$=_=w:E=M=j=I=w,h.push({tx1:O,ty1:E,tx2:C,ty2:M,x1:$,y1:j,x2:_,y2:I,width:Q,color:F,borderDash:U,borderDashOffset:V,tickWidth:re,tickColor:Z,tickBorderDash:J,tickBorderDashOffset:ee}))}return this._ticksLength=f,this._borderValue=b,h}_computeLabelItems(t){const r=this.axis,n=this.options,{position:i,ticks:a}=n,o=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:f}=a,d=To(n.grid),h=d+u,m=f?-u:h,p=-nn(this.labelRotation),g=[];let v,b,x,S,w,O,E,C,M,$,j,_,I="middle";if(i==="top")O=this.bottom-m,E=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+m,E=this._getXAxisLabelAlignment();else if(i==="left"){const L=this._getYAxisLabelAlignment(d);E=L.textAlign,w=L.x}else if(i==="right"){const L=this._getYAxisLabelAlignment(d);E=L.textAlign,w=L.x}else if(r==="x"){if(i==="center")O=(t.top+t.bottom)/2+h;else if(he(i)){const L=Object.keys(i)[0],W=i[L];O=this.chart.scales[L].getPixelForValue(W)+h}E=this._getXAxisLabelAlignment()}else if(r==="y"){if(i==="center")w=(t.left+t.right)/2-h;else if(he(i)){const L=Object.keys(i)[0],W=i[L];w=this.chart.scales[L].getPixelForValue(W)}E=this._getYAxisLabelAlignment(d).textAlign}r==="y"&&(l==="start"?I="top":l==="end"&&(I="bottom"));const D=this._getLabelSizes();for(v=0,b=s.length;v<b;++v){x=s[v],S=x.label;const L=a.setContext(this.getContext(v));C=this.getPixelForTick(v)+a.labelOffset,M=this._resolveTickFontOptions(v),$=M.lineHeight,j=yt(S)?S.length:1;const W=j/2,H=L.color,te=L.textStrokeColor,Q=L.textStrokeWidth;let F=E;o?(w=C,E==="inner"&&(v===b-1?F=this.options.reverse?"left":"right":v===0?F=this.options.reverse?"right":"left":F="center"),i==="top"?c==="near"||p!==0?_=-j*$+$/2:c==="center"?_=-D.highest.height/2-W*$+$:_=-D.highest.height+$/2:c==="near"||p!==0?_=$/2:c==="center"?_=D.highest.height/2-W*$:_=D.highest.height-j*$,f&&(_*=-1),p!==0&&!L.showLabelBackdrop&&(w+=$/2*Math.sin(p))):(O=C,_=(1-j)*$/2);let U;if(L.showLabelBackdrop){const V=vr(L.backdropPadding),re=D.heights[v],Z=D.widths[v];let J=_-V.top,ee=0-V.left;switch(I){case"middle":J-=re/2;break;case"bottom":J-=re;break}switch(E){case"center":ee-=Z/2;break;case"right":ee-=Z;break;case"inner":v===b-1?ee-=Z:v>0&&(ee-=Z/2);break}U={left:ee,top:J,width:Z+V.width,height:re+V.height,color:L.backdropColor}}g.push({label:S,font:M,textOffset:_,options:{rotation:p,color:H,strokeColor:te,strokeWidth:Q,textAlign:F,textBaseline:I,translation:[w,O],backdrop:U}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:r}=this.options;if(-nn(this.labelRotation))return t==="top"?"left":"right";let i="center";return r.align==="start"?i="left":r.align==="end"?i="right":r.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:r,ticks:{crossAlign:n,mirror:i,padding:a}}=this.options,o=this._getLabelSizes(),s=t+a,l=o.widest.width;let c,u;return r==="left"?i?(u=this.right+a,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u=this.left)):r==="right"?i?(u=this.left+a,n==="near"?c="right":n==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,n==="near"?c="left":n==="center"?(c="center",u+=l/2):(c="right",u=this.right)):c="right",{textAlign:c,x:u}}_computeLabelArea(){if(this.options.ticks.mirror)return;const t=this.chart,r=this.options.position;if(r==="left"||r==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(r==="top"||r==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:r},left:n,top:i,width:a,height:o}=this;r&&(t.save(),t.fillStyle=r,t.fillRect(n,i,a,o),t.restore())}getLineWidthForValue(t){const r=this.options.grid;if(!this._isVisible()||!r.display)return 0;const i=this.ticks.findIndex(a=>a.value===t);return i>=0?r.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const r=this.options.grid,n=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let a,o;const s=(l,c,u)=>{!u.width||!u.color||(n.save(),n.lineWidth=u.width,n.strokeStyle=u.color,n.setLineDash(u.borderDash||[]),n.lineDashOffset=u.borderDashOffset,n.beginPath(),n.moveTo(l.x,l.y),n.lineTo(c.x,c.y),n.stroke(),n.restore())};if(r.display)for(a=0,o=i.length;a<o;++a){const l=i[a];r.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),r.drawTicks&&s({x:l.tx1,y:l.ty1},{x:l.tx2,y:l.ty2},{color:l.tickColor,width:l.tickWidth,borderDash:l.tickBorderDash,borderDashOffset:l.tickBorderDashOffset})}}drawBorder(){const{chart:t,ctx:r,options:{border:n,grid:i}}=this,a=n.setContext(this.getContext()),o=n.display?a.width:0;if(!o)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,f,d;this.isHorizontal()?(c=di(t,this.left,o)-o/2,u=di(t,this.right,s)+s/2,f=d=l):(f=di(t,this.top,o)-o/2,d=di(t,this.bottom,s)+s/2,c=u=l),r.save(),r.lineWidth=a.width,r.strokeStyle=a.color,r.beginPath(),r.moveTo(c,f),r.lineTo(u,d),r.stroke(),r.restore()}drawLabels(t){if(!this.options.ticks.display)return;const n=this.ctx,i=this._computeLabelArea();i&&Fp(n,i);const a=this.getLabelItems(t);for(const o of a){const s=o.options,l=o.font,c=o.label,u=o.textOffset;uc(n,c,0,u,l,s)}i&&Bp(n)}drawTitle(){const{ctx:t,options:{position:r,title:n,reverse:i}}=this;if(!n.display)return;const a=Rt(n.font),o=vr(n.padding),s=n.align;let l=a.lineHeight/2;r==="bottom"||r==="center"||he(r)?(l+=o.bottom,yt(n.text)&&(l+=a.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:f,rotation:d}=HV(this,l,r,s);uc(t,n.text,0,0,a,{color:n.color,maxWidth:f,rotation:d,textAlign:VV(s,r,i),textBaseline:"middle",translation:[c,u]})}draw(t){this._isVisible()&&(this.drawBackground(),this.drawGrid(t),this.drawBorder(),this.drawTitle(),this.drawLabels(t))}_layers(){const t=this.options,r=t.ticks&&t.ticks.z||0,n=se(t.grid&&t.grid.z,-1),i=se(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==ra.prototype.draw?[{z:r,draw:a=>{this.draw(a)}}]:[{z:n,draw:a=>{this.drawBackground(),this.drawGrid(a),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:r,draw:a=>{this.drawLabels(a)}}]}getMatchingVisibleMetas(t){const r=this.chart.getSortedVisibleDatasetMetas(),n=this.axis+"AxisID",i=[];let a,o;for(a=0,o=r.length;a<o;++a){const s=r[a];s[n]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const r=this.options.ticks.setContext(this.getContext(t));return Rt(r.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Oc{constructor(t,r,n){this.type=t,this.scope=r,this.override=n,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const r=Object.getPrototypeOf(t);let n;qV(r)&&(n=this.register(r));const i=this.items,a=t.id,o=this.scope+"."+a;if(!a)throw new Error("class does not have id: "+t);return a in i||(i[a]=t,UV(t,o,n),this.override&&et.override(t.id,t.overrides)),o}get(t){return this.items[t]}unregister(t){const r=this.items,n=t.id,i=this.scope;n in r&&delete r[n],i&&n in et[i]&&(delete et[i][n],this.override&&delete fi[n])}}function UV(e,t,r){const n=go(Object.create(null),[r?et.get(r):{},et.get(t),e.defaults]);et.set(t,n),e.defaultRoutes&&KV(t,e.defaultRoutes),e.descriptors&&et.describe(t,e.descriptors)}function KV(e,t){Object.keys(t).forEach(r=>{const n=r.split("."),i=n.pop(),a=[e].concat(n).join("."),o=t[r].split("."),s=o.pop(),l=o.join(".");et.route(a,i,l,s)})}function qV(e){return"id"in e&&"defaults"in e}class YV{constructor(){this.controllers=new Oc(yc,"datasets",!0),this.elements=new Oc(Tn,"elements"),this.plugins=new Oc(Object,"plugins"),this.scales=new Oc(ra,"scales"),this._typedRegistries=[this.controllers,this.scales,this.elements]}add(...t){this._each("register",t)}remove(...t){this._each("unregister",t)}addControllers(...t){this._each("register",t,this.controllers)}addElements(...t){this._each("register",t,this.elements)}addPlugins(...t){this._each("register",t,this.plugins)}addScales(...t){this._each("register",t,this.scales)}getController(t){return this._get(t,this.controllers,"controller")}getElement(t){return this._get(t,this.elements,"element")}getPlugin(t){return this._get(t,this.plugins,"plugin")}getScale(t){return this._get(t,this.scales,"scale")}removeControllers(...t){this._each("unregister",t,this.controllers)}removeElements(...t){this._each("unregister",t,this.elements)}removePlugins(...t){this._each("unregister",t,this.plugins)}removeScales(...t){this._each("unregister",t,this.scales)}_each(t,r,n){[...r].forEach(i=>{const a=n||this._getRegistryForType(i);n||a.isForType(i)||a===this.plugins&&i.id?this._exec(t,a,i):Ce(i,o=>{const s=n||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,r,n){const i=Tp(t);Fe(n["before"+i],[],n),r[t](n),Fe(n["after"+i],[],n)}_getRegistryForType(t){for(let r=0;r<this._typedRegistries.length;r++){const n=this._typedRegistries[r];if(n.isForType(t))return n}return this.plugins}_get(t,r,n){const i=r.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+n+".");return i}}var jr=new YV;class GV{constructor(){this._init=[]}notify(t,r,n,i){r==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const a=i?this._descriptors(t).filter(i):this._descriptors(t),o=this._notify(a,t,r,n);return r==="afterDestroy"&&(this._notify(a,t,"stop"),this._notify(this._init,t,"uninstall")),o}_notify(t,r,n,i){i=i||{};for(const a of t){const o=a.plugin,s=o[n],l=[r,i,a.options];if(Fe(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Se(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const r=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),r}_createDescriptors(t,r){const n=t&&t.config,i=se(n.options&&n.options.plugins,{}),a=XV(n);return i===!1&&!r?[]:JV(t,a,i,r)}_notifyStateChanges(t){const r=this._oldCache||[],n=this._cache,i=(a,o)=>a.filter(s=>!o.some(l=>s.plugin.id===l.plugin.id));this._notify(i(r,n),t,"stop"),this._notify(i(n,r),t,"start")}}function XV(e){const t={},r=[],n=Object.keys(jr.plugins.items);for(let a=0;a<n.length;a++)r.push(jr.getPlugin(n[a]));const i=e.plugins||[];for(let a=0;a<i.length;a++){const o=i[a];r.indexOf(o)===-1&&(r.push(o),t[o.id]=!0)}return{plugins:r,localIds:t}}function ZV(e,t){return!t&&e===!1?null:e===!0?{}:e}function JV(e,{plugins:t,localIds:r},n,i){const a=[],o=e.getContext();for(const s of t){const l=s.id,c=ZV(n[l],i);c!==null&&a.push({plugin:s,options:QV(e.config,{plugin:s,local:r[l]},c,o)})}return a}function QV(e,{plugin:t,local:r},n,i){const a=e.pluginScopeKeys(t),o=e.getOptionScopes(n,a);return r&&t.defaults&&o.push(t.defaults),e.createResolver(o,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function tm(e,t){const r=et.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||r.indexAxis||"x"}function e9(e,t){let r=e;return e==="_index_"?r=t:e==="_value_"&&(r=t==="x"?"y":"x"),r}function t9(e,t){return e===t?"_index_":"_value_"}function rO(e){if(e==="x"||e==="y"||e==="r")return e}function r9(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function rm(e,...t){if(rO(e))return e;for(const r of t){const n=r.axis||r9(r.position)||e.length>1&&rO(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function nO(e,t,r){if(r[t+"AxisID"]===e)return{axis:t}}function n9(e,t){if(t.data&&t.data.datasets){const r=t.data.datasets.filter(n=>n.xAxisID===e||n.yAxisID===e);if(r.length)return nO(e,"x",r[0])||nO(e,"y",r[0])}return{}}function i9(e,t){const r=fi[e.type]||{scales:{}},n=t.scales||{},i=tm(e.type,t),a=Object.create(null);return Object.keys(n).forEach(o=>{const s=n[o];if(!he(s))return console.error(`Invalid scale configuration for scale: ${o}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${o}`);const l=rm(o,s,n9(o,e),et.scales[s.type]),c=t9(l,i),u=r.scales||{};a[o]=vo(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(o=>{const s=o.type||e.type,l=o.indexAxis||tm(s,t),u=(fi[s]||{}).scales||{};Object.keys(u).forEach(f=>{const d=e9(f,l),h=o[d+"AxisID"]||d;a[h]=a[h]||Object.create(null),vo(a[h],[{axis:d},n[h],u[f]])})}),Object.keys(a).forEach(o=>{const s=a[o];vo(s,[et.scales[s.type],et.scale])}),a}function iO(e){const t=e.options||(e.options={});t.plugins=se(t.plugins,{}),t.scales=i9(e,t)}function aO(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function a9(e){return e=e||{},e.data=aO(e.data),iO(e),e}const oO=new Map,sO=new Set;function Ac(e,t){let r=oO.get(e);return r||(r=t(),oO.set(e,r),sO.add(r)),r}const Mo=(e,t,r)=>{const n=li(t,r);n!==void 0&&e.add(n)};class o9{constructor(t){this._config=a9(t),this._scopeCache=new Map,this._resolverCache=new Map}get platform(){return this._config.platform}get type(){return this._config.type}set type(t){this._config.type=t}get data(){return this._config.data}set data(t){this._config.data=aO(t)}get options(){return this._config.options}set options(t){this._config.options=t}get plugins(){return this._config.plugins}update(){const t=this._config;this.clearCache(),iO(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Ac(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,r){return Ac(`${t}.transition.${r}`,()=>[[`datasets.${t}.transitions.${r}`,`transitions.${r}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,r){return Ac(`${t}-${r}`,()=>[[`datasets.${t}.elements.${r}`,`datasets.${t}`,`elements.${r}`,""]])}pluginScopeKeys(t){const r=t.id,n=this.type;return Ac(`${n}-plugin-${r}`,()=>[[`plugins.${r}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,r){const n=this._scopeCache;let i=n.get(t);return(!i||r)&&(i=new Map,n.set(t,i)),i}getOptionScopes(t,r,n){const{options:i,type:a}=this,o=this._cachedScopes(t,n),s=o.get(r);if(s)return s;const l=new Set;r.forEach(u=>{t&&(l.add(t),u.forEach(f=>Mo(l,t,f))),u.forEach(f=>Mo(l,i,f)),u.forEach(f=>Mo(l,fi[a]||{},f)),u.forEach(f=>Mo(l,et,f)),u.forEach(f=>Mo(l,$p,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),sO.has(r)&&o.set(r,c),c}chartOptionScopes(){const{options:t,type:r}=this;return[t,fi[r]||{},et.datasets[r]||{},{type:r},et,$p]}resolveNamedOptions(t,r,n,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=lO(this._resolverCache,t,i);let l=o;if(l9(o,r)){a.$shared=!1,n=Pn(n)?n():n;const c=this.createResolver(t,n,s);l=Qi(o,n,c)}for(const c of r)a[c]=l[c];return a}createResolver(t,r,n=[""],i){const{resolver:a}=lO(this._resolverCache,t,n);return he(r)?Qi(a,r,void 0,i):a}}function lO(e,t,r){let n=e.get(t);n||(n=new Map,e.set(t,n));const i=r.join();let a=n.get(i);return a||(a={resolver:Wp(t,r),subPrefixes:r.filter(s=>!s.toLowerCase().includes("hover"))},n.set(i,a)),a}const s9=e=>he(e)&&Object.getOwnPropertyNames(e).some(t=>Pn(e[t]));function l9(e,t){const{isScriptable:r,isIndexable:n}=pS(e);for(const i of t){const a=r(i),o=n(i),s=(o||a)&&e[i];if(a&&(Pn(s)||s9(s))||o&&yt(s))return!0}return!1}var c9="4.5.0";const u9=["top","bottom","left","right","chartArea"];function cO(e,t){return e==="top"||e==="bottom"||u9.indexOf(e)===-1&&t==="x"}function uO(e,t){return function(r,n){return r[e]===n[e]?r[t]-n[t]:r[e]-n[e]}}function fO(e){const t=e.chart,r=t.options.animation;t.notifyPlugins("afterRender"),Fe(r&&r.onComplete,[e],t)}function f9(e){const t=e.chart,r=t.options.animation;Fe(r&&r.onProgress,[e],t)}function dO(e){return Up()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Ec={},hO=e=>{const t=dO(e);return Object.values(Ec).filter(r=>r.canvas===t).pop()};function d9(e,t,r){const n=Object.keys(e);for(const i of n){const a=+i;if(a>=t){const o=e[i];delete e[i],(r>0||a>t)&&(e[a+r]=o)}}}function h9(e,t,r,n){return!r||e.type==="mouseout"?null:n?t:e}let Lt=class{static defaults=et;static instances=Ec;static overrides=fi;static registry=jr;static version=c9;static getChart=hO;static register(...t){jr.add(...t),pO()}static unregister(...t){jr.remove(...t),pO()}constructor(t,r){const n=this.config=new o9(r),i=dO(t),a=hO(i);if(a)throw new Error("Canvas is already in use. Chart with ID '"+a.id+"' must be destroyed before the canvas with ID '"+a.canvas.id+"' can be reused.");const o=n.createResolver(n.chartOptionScopes(),this.getContext());this.platform=new(n.platform||MV(i)),this.platform.updateConfig(n);const s=this.platform.acquireContext(i,o.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=a7(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=o,this._aspectRatio=this.aspectRatio,this._layers=[],this._metasets=[],this._stacks=void 0,this.boxes=[],this.currentDevicePixelRatio=void 0,this.chartArea=void 0,this._active=[],this._lastEvent=void 0,this._listeners={},this._responsiveListeners=void 0,this._sortedMetasets=[],this.scales={},this._plugins=new GV,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=O7(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],Ec[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}an.listen(this,"complete",fO),an.listen(this,"progress",f9),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:r},width:n,height:i,_aspectRatio:a}=this;return Se(t)?r&&a?a:i?n/i:null:t}get data(){return this.config.data}set data(t){this.config.data=t}get options(){return this._options}set options(t){this.config.options=t}get registry(){return jr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():wS(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return fS(this.canvas,this.ctx),this}stop(){return an.stop(this),this}resize(t,r){an.running(this)?this._resizeBeforeDraw={width:t,height:r}:this._resize(t,r)}_resize(t,r){const n=this.options,i=this.canvas,a=n.maintainAspectRatio&&this.aspectRatio,o=this.platform.getMaximumSize(i,t,r,a),s=n.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=o.width,this.height=o.height,this._aspectRatio=this.aspectRatio,wS(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),Fe(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};Ce(r,(n,i)=>{n.id=i})}buildOrUpdateScales(){const t=this.options,r=t.scales,n=this.scales,i=Object.keys(n).reduce((o,s)=>(o[s]=!1,o),{});let a=[];r&&(a=a.concat(Object.keys(r).map(o=>{const s=r[o],l=rm(o,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ce(a,o=>{const s=o.options,l=s.id,c=rm(l,s),u=se(s.type,o.dtype);(s.position===void 0||cO(s.position,c)!==cO(o.dposition))&&(s.position=o.dposition),i[l]=!0;let f=null;if(l in n&&n[l].type===u)f=n[l];else{const d=jr.getScale(u);f=new d({id:l,type:u,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(s,t)}),Ce(i,(o,s)=>{o||delete n[s]}),Ce(n,o=>{kn.configure(this,o,o.options),kn.addBox(this,o)})}_updateMetasets(){const t=this._metasets,r=this.data.datasets.length,n=t.length;if(t.sort((i,a)=>i.index-a.index),n>r){for(let i=r;i<n;++i)this._destroyDatasetMeta(i);t.splice(r,n-r)}this._sortedMetasets=t.slice(0).sort(uO("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:r}}=this;t.length>r.length&&delete this._stacks,t.forEach((n,i)=>{r.filter(a=>a===n._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],r=this.data.datasets;let n,i;for(this._removeUnreferencedMetasets(),n=0,i=r.length;n<i;n++){const a=r[n];let o=this.getDatasetMeta(n);const s=a.type||this.config.type;if(o.type&&o.type!==s&&(this._destroyDatasetMeta(n),o=this.getDatasetMeta(n)),o.type=s,o.indexAxis=a.indexAxis||tm(s,this.options),o.order=a.order||0,o.index=n,o.label=""+a.label,o.visible=this.isDatasetVisible(n),o.controller)o.controller.updateIndex(n),o.controller.linkScales();else{const l=jr.getController(s),{datasetElementType:c,dataElementType:u}=et.datasets[s];Object.assign(l,{dataElementType:jr.getElement(u),datasetElementType:c&&jr.getElement(c)}),o.controller=new l(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Ce(this.data.datasets,(t,r)=>{this.getDatasetMeta(r).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const r=this.config;r.update();const n=this._options=r.createResolver(r.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!n.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const a=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let o=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:f}=this.getDatasetMeta(c),d=!i&&a.indexOf(f)===-1;f.buildOrUpdateElements(d),o=Math.max(+f.getMaxOverflow(),o)}o=this._minPadding=n.layout.autoPadding?o:0,this._updateLayout(o),i||Ce(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(uO("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ce(this.scales,t=>{kn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!q2(r,n)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,r=this._getUniformDataChanges()||[];for(const{method:n,start:i,count:a}of r){const o=n==="_removeElements"?-a:a;d9(t,i,o)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const r=this.data.datasets.length,n=a=>new Set(t.filter(o=>o[0]===a).map((o,s)=>s+","+o.splice(1).join(","))),i=n(0);for(let a=1;a<r;a++)if(!q2(i,n(a)))return;return Array.from(i).map(a=>a.split(",")).map(a=>({method:a[1],start:+a[2],count:+a[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;kn.update(this,this.width,this.height,t);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],Ce(this.boxes,i=>{n&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,a)=>{i._idx=a}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let r=0,n=this.data.datasets.length;r<n;++r)this.getDatasetMeta(r).controller.configure();for(let r=0,n=this.data.datasets.length;r<n;++r)this._updateDataset(r,Pn(t)?t({datasetIndex:r}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,r){const n=this.getDatasetMeta(t),i={meta:n,index:t,mode:r,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(n.controller._update(r),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&(an.has(this)?this.attached&&!an.running(this)&&an.start(this):(this.draw(),fO({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:n,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(n,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const r=this._layers;for(t=0;t<r.length&&r[t].z<=0;++t)r[t].draw(this.chartArea);for(this._drawDatasets();t<r.length;++t)r[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const r=this._sortedMetasets,n=[];let i,a;for(i=0,a=r.length;i<a;++i){const o=r[i];(!t||o.visible)&&n.push(o)}return n}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let r=t.length-1;r>=0;--r)this._drawDataset(t[r]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const r=this.ctx,n={meta:t,index:t.index,cancelable:!0},i=TW(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(i&&Fp(r,i),t.controller.draw(),i&&Bp(r),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return Oo(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,r,n,i){const a=uV.modes[r];return typeof a=="function"?a(this,t,n,i):[]}getDatasetMeta(t){const r=this.data.datasets[t],n=this._metasets;let i=n.filter(a=>a&&a._dataset===r).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:r&&r.order||0,index:t,_dataset:r,_parsed:[],_sorted:!1},n.push(i)),i}getContext(){return this.$context||(this.$context=hi(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const r=this.data.datasets[t];if(!r)return!1;const n=this.getDatasetMeta(t);return typeof n.hidden=="boolean"?!n.hidden:!r.hidden}setDatasetVisibility(t,r){const n=this.getDatasetMeta(t);n.hidden=!r}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,r,n){const i=n?"show":"hide",a=this.getDatasetMeta(t),o=a.controller._resolveAnimations(void 0,i);yo(r)?(a.data[r].hidden=!n,this.update()):(this.setDatasetVisibility(t,n),o.update(a,{visible:n}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,r){this._updateVisibility(t,r,!1)}show(t,r){this._updateVisibility(t,r,!0)}_destroyDatasetMeta(t){const r=this._metasets[t];r&&r.controller&&r.controller._destroy(),delete this._metasets[t]}_stop(){let t,r;for(this.stop(),an.remove(this),t=0,r=this.data.datasets.length;t<r;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:r}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),fS(t,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete Ec[this.id],this.notifyPlugins("afterDestroy")}toBase64Image(...t){return this.canvas.toDataURL(...t)}bindEvents(){this.bindUserEvents(),this.options.responsive?this.bindResponsiveEvents():this.attached=!0}bindUserEvents(){const t=this._listeners,r=this.platform,n=(a,o)=>{r.addEventListener(this,a,o),t[a]=o},i=(a,o,s)=>{a.offsetX=o,a.offsetY=s,this._eventHandler(a)};Ce(this.options.events,a=>n(a,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,r=this.platform,n=(l,c)=>{r.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(r.removeEventListener(this,l,c),delete t[l])},a=(l,c)=>{this.canvas&&this.resize(l,c)};let o;const s=()=>{i("attach",s),this.attached=!0,this.resize(),n("resize",a),n("detach",o)};o=()=>{this.attached=!1,i("resize",a),this._stop(),this._resize(0,0),n("attach",s)},r.isAttached(this.canvas)?s():o()}unbindEvents(){Ce(this._listeners,(t,r)=>{this.platform.removeEventListener(this,r,t)}),this._listeners={},Ce(this._responsiveListeners,(t,r)=>{this.platform.removeEventListener(this,r,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,r,n){const i=n?"set":"remove";let a,o,s,l;for(r==="dataset"&&(a=this.getDatasetMeta(t[0].datasetIndex),a.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){o=t[s];const c=o&&this.getDatasetMeta(o.datasetIndex).controller;c&&c[i+"HoverStyle"](o.element,o.datasetIndex,o.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const r=this._active||[],n=t.map(({datasetIndex:a,index:o})=>{const s=this.getDatasetMeta(a);if(!s)throw new Error("No dataset found at index "+a);return{datasetIndex:a,element:s.data[o],index:o}});!oc(n,r)&&(this._active=n,this._lastEvent=null,this._updateHoverStyles(n,r))}notifyPlugins(t,r,n){return this._plugins.notify(this,t,r,n)}isPluginEnabled(t){return this._plugins._cache.filter(r=>r.plugin.id===t).length===1}_updateHoverStyles(t,r,n){const i=this.options.hover,a=(l,c)=>l.filter(u=>!c.some(f=>u.datasetIndex===f.datasetIndex&&u.index===f.index)),o=a(r,t),s=n?t:a(t,r);o.length&&this.updateHoverStyle(o,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,r){const n={event:t,replay:r,cancelable:!0,inChartArea:this.isPointInArea(t)},i=o=>(o.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",n,i)===!1)return;const a=this._handleEvent(t,r,n.inChartArea);return n.cancelable=!1,this.notifyPlugins("afterEvent",n,i),(a||n.changed)&&this.render(),this}_handleEvent(t,r,n){const{_active:i=[],options:a}=this,o=r,s=this._getActiveElements(t,i,n,o),l=f7(t),c=h9(t,this._lastEvent,n,l);n&&(this._lastEvent=null,Fe(a.onHover,[t,s,this],this),l&&Fe(a.onClick,[t,s,this],this));const u=!oc(s,i);return(u||r)&&(this._active=s,this._updateHoverStyles(s,i,r)),this._lastEvent=c,u}_getActiveElements(t,r,n,i){if(t.type==="mouseout")return[];if(!n)return r;const a=this.options.hover;return this.getElementsAtEventForMode(t,a.mode,a,i)}};function pO(){return Ce(Lt.instances,e=>e._plugins.invalidate())}function p9(e,t,r){const{startAngle:n,x:i,y:a,outerRadius:o,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,f=Math.min(c/o,gr(n-r));if(e.beginPath(),e.arc(i,a,o-c/2,n+f/2,r-f/2),s>0){const d=Math.min(c/s,gr(n-r));e.arc(i,a,s+c/2,r-d/2,n+d/2,!0)}else{const d=Math.min(c/2,o*gr(n-r));if(u==="round")e.arc(i,a,d,r-je/2,n+je/2,!0);else if(u==="bevel"){const h=2*d*d,m=-h*Math.cos(r+je/2)+i,p=-h*Math.sin(r+je/2)+a,g=h*Math.cos(n+je/2)+i,v=h*Math.sin(n+je/2)+a;e.lineTo(m,p),e.lineTo(g,v)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function m9(e,t,r){const{startAngle:n,pixelMargin:i,x:a,y:o,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(a,o,s,n-c,r+c),l>i?(c=i/l,e.arc(a,o,l,r+c,n-c,!0)):e.arc(a,o,i,r+ft,n-ft),e.closePath(),e.clip()}function g9(e){return zp(e,["outerStart","outerEnd","innerStart","innerEnd"])}function v9(e,t,r,n){const i=g9(e.options.borderRadius),a=(r-t)/2,o=Math.min(a,n*t/2),s=l=>{const c=(r-Math.min(a,l))*n/2;return Ct(l,0,Math.min(a,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Ct(i.innerStart,0,o),innerEnd:Ct(i.innerEnd,0,o)}}function na(e,t,r,n){return{x:r+e*Math.cos(t),y:n+e*Math.sin(t)}}function Pc(e,t,r,n,i,a){const{x:o,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,f=Math.max(t.outerRadius+n+r-c,0),d=u>0?u+n+r+c:0;let h=0;const m=i-l;if(n){const L=u>0?u-n:0,W=f>0?f-n:0,H=(L+W)/2,te=H!==0?m*H/(H+n):m;h=(m-te)/2}const p=Math.max(.001,m*f-r/je)/f,g=(m-p)/2,v=l+g+h,b=i-g-h,{outerStart:x,outerEnd:S,innerStart:w,innerEnd:O}=v9(t,d,f,b-v),E=f-x,C=f-S,M=v+x/E,$=b-S/C,j=d+w,_=d+O,I=v+w/j,D=b-O/_;if(e.beginPath(),a){const L=(M+$)/2;if(e.arc(o,s,f,M,L),e.arc(o,s,f,L,$),S>0){const Q=na(C,$,o,s);e.arc(Q.x,Q.y,S,$,b+ft)}const W=na(_,b,o,s);if(e.lineTo(W.x,W.y),O>0){const Q=na(_,D,o,s);e.arc(Q.x,Q.y,O,b+ft,D+Math.PI)}const H=(b-O/d+(v+w/d))/2;if(e.arc(o,s,d,b-O/d,H,!0),e.arc(o,s,d,H,v+w/d,!0),w>0){const Q=na(j,I,o,s);e.arc(Q.x,Q.y,w,I+Math.PI,v-ft)}const te=na(E,v,o,s);if(e.lineTo(te.x,te.y),x>0){const Q=na(E,M,o,s);e.arc(Q.x,Q.y,x,v-ft,M)}}else{e.moveTo(o,s);const L=Math.cos(M)*f+o,W=Math.sin(M)*f+s;e.lineTo(L,W);const H=Math.cos($)*f+o,te=Math.sin($)*f+s;e.lineTo(H,te)}e.closePath()}function y9(e,t,r,n,i){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){Pc(e,t,r,n,l,i);for(let c=0;c<a;++c)e.fill();isNaN(s)||(l=o+(s%Ge||Ge))}return Pc(e,t,r,n,l,i),e.fill(),l}function b9(e,t,r,n,i){const{fullCircles:a,startAngle:o,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:f,borderDashOffset:d,borderRadius:h}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(f||[]),e.lineDashOffset=d,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let p=t.endAngle;if(a){Pc(e,t,r,n,p,i);for(let g=0;g<a;++g)e.stroke();isNaN(s)||(p=o+(s%Ge||Ge))}m&&m9(e,t,p),l.selfJoin&&p-o>=je&&h===0&&u!=="miter"&&p9(e,t,p),a||(Pc(e,t,r,n,p,i),e.stroke())}class nm extends Tn{static id="arc";static defaults={borderAlign:"center",borderColor:"#fff",borderDash:[],borderDashOffset:0,borderJoinStyle:void 0,borderRadius:0,borderWidth:2,offset:0,spacing:0,angle:void 0,circular:!0,selfJoin:!1};static defaultRoutes={backgroundColor:"backgroundColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"};circumference;endAngle;fullCircles;innerRadius;outerRadius;pixelMargin;startAngle;constructor(t){super(),this.options=void 0,this.circumference=void 0,this.startAngle=void 0,this.endAngle=void 0,this.innerRadius=void 0,this.outerRadius=void 0,this.pixelMargin=0,this.fullCircles=0,t&&Object.assign(this,t)}inRange(t,r,n){const i=this.getProps(["x","y"],n),{angle:a,distance:o}=J2(i,{x:t,y:r}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:f}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],n),d=(this.options.spacing+this.options.borderWidth)/2,h=se(f,l-s),m=wo(a,s,l)&&s!==l,p=h>=Ge||m,g=Cn(o,c+d,u+d);return p&&g}getCenterPoint(t){const{x:r,y:n,startAngle:i,endAngle:a,innerRadius:o,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+a)/2,f=(o+s+c+l)/2;return{x:r+Math.cos(u)*f,y:n+Math.sin(u)*f}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:r,circumference:n}=this,i=(r.offset||0)/4,a=(r.spacing||0)/2,o=r.circular;if(this.pixelMargin=r.borderAlign==="inner"?.33:0,this.fullCircles=n>Ge?Math.floor(n/Ge):0,n===0||this.innerRadius<0||this.outerRadius<0)return;t.save();const s=(this.startAngle+this.endAngle)/2;t.translate(Math.cos(s)*i,Math.sin(s)*i);const l=1-Math.sin(Math.min(je,n||0)),c=i*l;t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,y9(t,this,c,a,o),b9(t,this,c,a,o),t.restore()}}function mO(e,t,r=t){e.lineCap=se(r.borderCapStyle,t.borderCapStyle),e.setLineDash(se(r.borderDash,t.borderDash)),e.lineDashOffset=se(r.borderDashOffset,t.borderDashOffset),e.lineJoin=se(r.borderJoinStyle,t.borderJoinStyle),e.lineWidth=se(r.borderWidth,t.borderWidth),e.strokeStyle=se(r.borderColor,t.borderColor)}function x9(e,t,r){e.lineTo(r.x,r.y)}function w9(e){return e.stepped?L7:e.tension||e.cubicInterpolationMode==="monotone"?F7:x9}function gO(e,t,r={}){const n=e.length,{start:i=0,end:a=n-1}=r,{start:o,end:s}=t,l=Math.max(i,o),c=Math.min(a,s),u=i<o&&a<o||i>s&&a>s;return{count:n,start:l,loop:t.loop,ilen:c<l&&!u?n+c-l:c-l}}function _9(e,t,r,n){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:c}=gO(i,r,n),u=w9(a);let{move:f=!0,reverse:d}=n||{},h,m,p;for(h=0;h<=c;++h)m=i[(s+(d?c-h:h))%o],!m.skip&&(f?(e.moveTo(m.x,m.y),f=!1):u(e,p,m,d,a.stepped),p=m);return l&&(m=i[(s+(d?c:0))%o],u(e,p,m,d,a.stepped)),!!l}function S9(e,t,r,n){const i=t.points,{count:a,start:o,ilen:s}=gO(i,r,n),{move:l=!0,reverse:c}=n||{};let u=0,f=0,d,h,m,p,g,v;const b=S=>(o+(c?s-S:S))%a,x=()=>{p!==g&&(e.lineTo(u,g),e.lineTo(u,p),e.lineTo(u,v))};for(l&&(h=i[b(0)],e.moveTo(h.x,h.y)),d=0;d<=s;++d){if(h=i[b(d)],h.skip)continue;const S=h.x,w=h.y,O=S|0;O===m?(w<p?p=w:w>g&&(g=w),u=(f*u+S)/++f):(x(),e.lineTo(S,w),m=O,f=0,p=g=w),v=w}x()}function im(e){const t=e.options,r=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!r?S9:_9}function O9(e){return e.stepped?vW:e.tension||e.cubicInterpolationMode==="monotone"?yW:gi}function A9(e,t,r,n){let i=t._path;i||(i=t._path=new Path2D,t.path(i,r,n)&&i.closePath()),mO(e,t.options),e.stroke(i)}function E9(e,t,r,n){const{segments:i,options:a}=t,o=im(t);for(const s of i)mO(e,a,s.style),e.beginPath(),o(e,t,s,{start:r,end:r+n-1})&&e.closePath(),e.stroke()}const P9=typeof Path2D=="function";function C9(e,t,r,n){P9&&!t.options.segment?A9(e,t,r,n):E9(e,t,r,n)}class am extends Tn{static id="line";static defaults={borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",borderWidth:3,capBezierPoints:!0,cubicInterpolationMode:"default",fill:!1,spanGaps:!1,stepped:!1,tension:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};static descriptors={_scriptable:!0,_indexable:t=>t!=="borderDash"&&t!=="fill"};constructor(t){super(),this.animated=!0,this.options=void 0,this._chart=void 0,this._loop=void 0,this._fullLoop=void 0,this._path=void 0,this._points=void 0,this._segments=void 0,this._decimated=!1,this._pointsUpdated=!1,this._datasetIndex=void 0,t&&Object.assign(this,t)}updateControlPoints(t,r){const n=this.options;if((n.tension||n.cubicInterpolationMode==="monotone")&&!n.stepped&&!this._pointsUpdated){const i=n.spanGaps?this._loop:this._fullLoop;cW(this._points,n,t,i,r),this._pointsUpdated=!0}}set points(t){this._points=t,delete this._segments,delete this._path,this._pointsUpdated=!1}get points(){return this._points}get segments(){return this._segments||(this._segments=EW(this,this.options.segment))}first(){const t=this.segments,r=this.points;return t.length&&r[t[0].start]}last(){const t=this.segments,r=this.points,n=t.length;return n&&r[t[n-1].end]}interpolate(t,r){const n=this.options,i=t[r],a=this.points,o=SW(this,{property:r,start:i,end:i});if(!o.length)return;const s=[],l=O9(n);let c,u;for(c=0,u=o.length;c<u;++c){const{start:f,end:d}=o[c],h=a[f],m=a[d];if(h===m){s.push(h);continue}const p=Math.abs((i-h[r])/(m[r]-h[r])),g=l(h,m,p,n.stepped);g[r]=t[r],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,r,n){return im(this)(t,this,r,n)}path(t,r,n){const i=this.segments,a=im(this);let o=this._loop;r=r||0,n=n||this.points.length-r;for(const s of i)o&=a(t,this,s,{start:r,end:r+n-1});return!!o}draw(t,r,n,i){const a=this.options||{};(this.points||[]).length&&a.borderWidth&&(t.save(),C9(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function vO(e,t,r,n){const i=e.options,{[r]:a}=e.getProps([r],n);return Math.abs(t-a)<i.radius+i.hitRadius}class om extends Tn{static id="point";parsed;skip;stop;static defaults={borderWidth:1,hitRadius:1,hoverBorderWidth:1,hoverRadius:4,pointStyle:"circle",radius:3,rotation:0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.parsed=void 0,this.skip=void 0,this.stop=void 0,t&&Object.assign(this,t)}inRange(t,r,n){const i=this.options,{x:a,y:o}=this.getProps(["x","y"],n);return Math.pow(t-a,2)+Math.pow(r-o,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,r){return vO(this,t,"x",r)}inYRange(t,r){return vO(this,t,"y",r)}getCenterPoint(t){const{x:r,y:n}=this.getProps(["x","y"],t);return{x:r,y:n}}size(t){t=t||this.options||{};let r=t.radius||0;r=Math.max(r,r&&t.hoverRadius||0);const n=r&&t.borderWidth||0;return(r+n)*2}draw(t,r){const n=this.options;this.skip||n.radius<.1||!Oo(this,r,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,Lp(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function yO(e,t){const{x:r,y:n,base:i,width:a,height:o}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,f;return e.horizontal?(f=o/2,s=Math.min(r,i),l=Math.max(r,i),c=n-f,u=n+f):(f=a/2,s=r-f,l=r+f,c=Math.min(n,i),u=Math.max(n,i)),{left:s,top:c,right:l,bottom:u}}function Mn(e,t,r,n){return e?0:Ct(t,r,n)}function k9(e,t,r){const n=e.options.borderWidth,i=e.borderSkipped,a=hS(n);return{t:Mn(i.top,a.top,0,r),r:Mn(i.right,a.right,0,t),b:Mn(i.bottom,a.bottom,0,r),l:Mn(i.left,a.left,0,t)}}function T9(e,t,r){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=Ji(i),o=Math.min(t,r),s=e.borderSkipped,l=n||he(i);return{topLeft:Mn(!l||s.top||s.left,a.topLeft,0,o),topRight:Mn(!l||s.top||s.right,a.topRight,0,o),bottomLeft:Mn(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:Mn(!l||s.bottom||s.right,a.bottomRight,0,o)}}function M9(e){const t=yO(e),r=t.right-t.left,n=t.bottom-t.top,i=k9(e,r/2,n/2),a=T9(e,r/2,n/2);return{outer:{x:t.left,y:t.top,w:r,h:n,radius:a},inner:{x:t.left+i.l,y:t.top+i.t,w:r-i.l-i.r,h:n-i.t-i.b,radius:{topLeft:Math.max(0,a.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,a.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,a.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,a.bottomRight-Math.max(i.b,i.r))}}}}function sm(e,t,r,n){const i=t===null,a=r===null,s=e&&!(i&&a)&&yO(e,n);return s&&(i||Cn(t,s.left,s.right))&&(a||Cn(r,s.top,s.bottom))}function j9(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function D9(e,t){e.rect(t.x,t.y,t.w,t.h)}function lm(e,t,r={}){const n=e.x!==r.x?-t:0,i=e.y!==r.y?-t:0,a=(e.x+e.w!==r.x+r.w?t:0)-n,o=(e.y+e.h!==r.y+r.h?t:0)-i;return{x:e.x+n,y:e.y+i,w:e.w+a,h:e.h+o,radius:e.radius}}class jo extends Tn{static id="bar";static defaults={borderSkipped:"start",borderWidth:0,borderRadius:0,inflateAmount:"auto",pointStyle:void 0};static defaultRoutes={backgroundColor:"backgroundColor",borderColor:"borderColor"};constructor(t){super(),this.options=void 0,this.horizontal=void 0,this.base=void 0,this.width=void 0,this.height=void 0,this.inflateAmount=void 0,t&&Object.assign(this,t)}draw(t){const{inflateAmount:r,options:{borderColor:n,backgroundColor:i}}=this,{inner:a,outer:o}=M9(this),s=j9(o.radius)?fc:D9;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,lm(o,r,a)),t.clip(),s(t,lm(a,-r,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),s(t,lm(a,r)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,r,n){return sm(this,t,r,n)}inXRange(t,r){return sm(this,t,null,r)}inYRange(t,r){return sm(this,null,t,r)}getCenterPoint(t){const{x:r,y:n,base:i,horizontal:a}=this.getProps(["x","y","base","horizontal"],t);return{x:a?(r+i)/2:r,y:a?n:(n+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const bO=(e,t)=>{let{boxHeight:r=t,boxWidth:n=t}=e;return e.usePointStyle&&(r=Math.min(r,t),n=e.pointStyleWidth||Math.min(n,t)),{boxWidth:n,boxHeight:r,itemHeight:Math.max(t,r)}},N9=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class xO extends Tn{constructor(t){super(),this._added=!1,this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1,this.chart=t.chart,this.options=t.options,this.ctx=t.ctx,this.legendItems=void 0,this.columnSizes=void 0,this.lineWidths=void 0,this.maxHeight=void 0,this.maxWidth=void 0,this.top=void 0,this.bottom=void 0,this.left=void 0,this.right=void 0,this.height=void 0,this.width=void 0,this._margins=void 0,this.position=void 0,this.weight=void 0,this.fullSize=void 0}update(t,r,n){this.maxWidth=t,this.maxHeight=r,this._margins=n,this.setDimensions(),this.buildLabels(),this.fit()}setDimensions(){this.isHorizontal()?(this.width=this.maxWidth,this.left=this._margins.left,this.right=this.width):(this.height=this.maxHeight,this.top=this._margins.top,this.bottom=this.height)}buildLabels(){const t=this.options.labels||{};let r=Fe(t.generateLabels,[this.chart],this)||[];t.filter&&(r=r.filter(n=>t.filter(n,this.chart.data))),t.sort&&(r=r.sort((n,i)=>t.sort(n,i,this.chart.data))),this.options.reverse&&r.reverse(),this.legendItems=r}fit(){const{options:t,ctx:r}=this;if(!t.display){this.width=this.height=0;return}const n=t.labels,i=Rt(n.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=bO(n,a);let c,u;r.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(o,a,s,l)+10):(u=this.maxHeight,c=this._fitCols(o,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,r,n,i){const{ctx:a,maxWidth:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let f=t;a.textAlign="left",a.textBaseline="middle";let d=-1,h=-u;return this.legendItems.forEach((m,p)=>{const g=n+r/2+a.measureText(m.text).width;(p===0||c[c.length-1]+g+2*s>o)&&(f+=u,c[c.length-(p>0?0:1)]=0,h+=u,d++),l[p]={left:0,top:h,row:d,width:g,height:i},c[c.length-1]+=g+s}),f}_fitCols(t,r,n,i){const{ctx:a,maxHeight:o,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=o-t;let f=s,d=0,h=0,m=0,p=0;return this.legendItems.forEach((g,v)=>{const{itemWidth:b,itemHeight:x}=I9(n,r,a,g,i);v>0&&h+x+2*s>u&&(f+=d+s,c.push({width:d,height:h}),m+=d+s,p++,d=h=0),l[v]={left:m,top:h,col:p,width:b,height:x},d=Math.max(d,b),h+=x+s}),f+=d,c.push({width:d,height:h}),f}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:r,options:{align:n,labels:{padding:i},rtl:a}}=this,o=ta(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=er(n,this.left+i,this.right-this.lineWidths[s]);for(const c of r)s!==c.row&&(s=c.row,l=er(n,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=o.leftForLtr(o.x(l),c.width),l+=c.width+i}else{let s=0,l=er(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of r)c.col!==s&&(s=c.col,l=er(n,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=o.leftForLtr(o.x(c.left),c.width),l+=c.height+i}}isHorizontal(){return this.options.position==="top"||this.options.position==="bottom"}draw(){if(this.options.display){const t=this.ctx;Fp(t,this),this._draw(),Bp(t)}}_draw(){const{options:t,columnSizes:r,lineWidths:n,ctx:i}=this,{align:a,labels:o}=t,s=et.color,l=ta(t.rtl,this.left,this.width),c=Rt(o.font),{padding:u}=o,f=c.size,d=f/2;let h;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:p,itemHeight:g}=bO(o,f),v=function(O,E,C){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;i.save();const M=se(C.lineWidth,1);if(i.fillStyle=se(C.fillStyle,s),i.lineCap=se(C.lineCap,"butt"),i.lineDashOffset=se(C.lineDashOffset,0),i.lineJoin=se(C.lineJoin,"miter"),i.lineWidth=M,i.strokeStyle=se(C.strokeStyle,s),i.setLineDash(se(C.lineDash,[])),o.usePointStyle){const $={radius:p*Math.SQRT2/2,pointStyle:C.pointStyle,rotation:C.rotation,borderWidth:M},j=l.xPlus(O,m/2),_=E+d;dS(i,$,j,_,o.pointStyleWidth&&m)}else{const $=E+Math.max((f-p)/2,0),j=l.leftForLtr(O,m),_=Ji(C.borderRadius);i.beginPath(),Object.values(_).some(I=>I!==0)?fc(i,{x:j,y:$,w:m,h:p,radius:_}):i.rect(j,$,m,p),i.fill(),M!==0&&i.stroke()}i.restore()},b=function(O,E,C){uc(i,C.text,O,E+g/2,c,{strikethrough:C.hidden,textAlign:l.textAlign(C.textAlign)})},x=this.isHorizontal(),S=this._computeTitleHeight();x?h={x:er(a,this.left+u,this.right-n[0]),y:this.top+u+S,line:0}:h={x:this.left+u,y:er(a,this.top+S+u,this.bottom-r[0].height),line:0},SS(this.ctx,t.textDirection);const w=g+u;this.legendItems.forEach((O,E)=>{i.strokeStyle=O.fontColor,i.fillStyle=O.fontColor;const C=i.measureText(O.text).width,M=l.textAlign(O.textAlign||(O.textAlign=o.textAlign)),$=m+d+C;let j=h.x,_=h.y;l.setWidth(this.width),x?E>0&&j+$+u>this.right&&(_=h.y+=w,h.line++,j=h.x=er(a,this.left+u,this.right-n[h.line])):E>0&&_+w>this.bottom&&(j=h.x=j+r[h.line].width+u,h.line++,_=h.y=er(a,this.top+S+u,this.bottom-r[h.line].height));const I=l.x(j);if(v(I,_,O),j=A7(M,j+m+d,x?j+$:this.right,t.rtl),b(l.x(j),_,O),x)h.x+=$+u;else if(typeof O.text!="string"){const D=c.lineHeight;h.y+=wO(O,D)+u}else h.y+=w}),OS(this.ctx,t.textDirection)}drawTitle(){const t=this.options,r=t.title,n=Rt(r.font),i=vr(r.padding);if(!r.display)return;const a=ta(t.rtl,this.left,this.width),o=this.ctx,s=r.position,l=n.size/2,c=i.top+l;let u,f=this.left,d=this.width;if(this.isHorizontal())d=Math.max(...this.lineWidths),u=this.top+c,f=er(t.align,f,this.right-d);else{const m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);u=c+er(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const h=er(s,f,f+d);o.textAlign=a.textAlign(iS(s)),o.textBaseline="middle",o.strokeStyle=r.color,o.fillStyle=r.color,o.font=n.string,uc(o,r.text,h,u,n)}_computeTitleHeight(){const t=this.options.title,r=Rt(t.font),n=vr(t.padding);return t.display?r.lineHeight+n.height:0}_getLegendItemAt(t,r){let n,i,a;if(Cn(t,this.left,this.right)&&Cn(r,this.top,this.bottom)){for(a=this.legendHitBoxes,n=0;n<a.length;++n)if(i=a[n],Cn(t,i.left,i.left+i.width)&&Cn(r,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(t){const r=this.options;if(!L9(t.type,r))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=N9(i,n);i&&!a&&Fe(r.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!a&&Fe(r.onHover,[t,n,this],this)}else n&&Fe(r.onClick,[t,n,this],this)}}function I9(e,t,r,n,i){const a=$9(n,e,t,r),o=R9(i,n,t.lineHeight);return{itemWidth:a,itemHeight:o}}function $9(e,t,r,n){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((a,o)=>a.length>o.length?a:o)),t+r.size/2+n.measureText(i).width}function R9(e,t,r){let n=e;return typeof t.text!="string"&&(n=wO(t,r)),n}function wO(e,t){const r=e.text?e.text.length:0;return t*r}function L9(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var yr={id:"legend",_element:xO,start(e,t,r){const n=e.legend=new xO({ctx:e.ctx,options:r,chart:e});kn.configure(e,n,r),kn.addBox(e,n)},stop(e){kn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,r){const n=e.legend;kn.configure(e,n,r),n.options=r},afterUpdate(e){const t=e.legend;t.buildLabels(),t.adjustHitBoxes()},afterEvent(e,t){t.replay||e.legend.handleEvent(t.event)},defaults:{display:!0,position:"top",align:"center",fullSize:!0,reverse:!1,weight:1e3,onClick(e,t,r){const n=t.datasetIndex,i=r.chart;i.isDatasetVisible(n)?(i.hide(n),t.hidden=!0):(i.show(n),t.hidden=!1)},onHover:null,onLeave:null,labels:{color:e=>e.chart.options.color,boxWidth:40,padding:10,generateLabels(e){const t=e.data.datasets,{labels:{usePointStyle:r,pointStyle:n,textAlign:i,color:a,useBorderRadius:o,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(r?0:void 0),u=vr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:a,hidden:!l.visible,lineCap:c.borderCapStyle,lineDash:c.borderDash,lineDashOffset:c.borderDashOffset,lineJoin:c.borderJoinStyle,lineWidth:(u.width+u.height)/4,strokeStyle:c.borderColor,pointStyle:n||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:o&&(s||c.borderRadius),datasetIndex:l.index}},this)}},title:{color:e=>e.chart.options.color,display:!1,position:"center",text:""}},descriptors:{_scriptable:e=>!e.startsWith("on"),labels:{_scriptable:e=>!["generateLabels","filter","sort"].includes(e)}}};const Do={average(e){if(!e.length)return!1;let t,r,n=new Set,i=0,a=0;for(t=0,r=e.length;t<r;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();n.add(l.x),i+=l.y,++a}}return a===0||n.size===0?!1:{x:[...n].reduce((s,l)=>s+l)/n.size,y:i/a}},nearest(e,t){if(!e.length)return!1;let r=t.x,n=t.y,i=Number.POSITIVE_INFINITY,a,o,s;for(a=0,o=e.length;a<o;++a){const l=e[a].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Mp(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();r=l.x,n=l.y}return{x:r,y:n}}};function Dr(e,t){return t&&(yt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function on(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
215
215
  `)>-1?e.split(`
216
- `):e}function F9(e,t){const{element:r,datasetIndex:n,index:i}=t,a=e.getDatasetMeta(n).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:n,element:r}}function _O(e,t){const r=e.chart.ctx,{body:n,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),u=Rt(t.footerFont),f=a.length,d=i.length,h=n.length,m=vr(t.padding);let p=m.height,g=0,v=n.reduce((S,w)=>S+w.before.length+w.lines.length+w.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(p+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const S=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=h*S+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}d&&(p+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let b=0;const x=function(S){g=Math.max(g,r.measureText(S).width+b)};return r.save(),r.font=c.string,Ce(e.title,x),r.font=l.string,Ce(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?o+2+t.boxPadding:0,Ce(n,S=>{Ce(S.before,x),Ce(S.lines,x),Ce(S.after,x)}),b=0,r.font=u.string,Ce(e.footer,x),r.restore(),g+=m.width,{width:g,height:p}}function B9(e,t){const{y:r,height:n}=t;return r<n/2?"top":r>e.height-n/2?"bottom":"center"}function z9(e,t,r,n){const{x:i,width:a}=n,o=r.caretSize+r.caretPadding;if(e==="left"&&i+a+o>t.width||e==="right"&&i-a-o<0)return!0}function W9(e,t,r,n){const{x:i,width:a}=r,{width:o,chartArea:{left:s,right:l}}=e;let c="center";return n==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=o-a/2&&(c="right"),z9(c,e,t,r)&&(c="center"),c}function SO(e,t,r){const n=r.yAlign||t.yAlign||B9(e,r);return{xAlign:r.xAlign||t.xAlign||W9(e,t,r,n),yAlign:n}}function V9(e,t){let{x:r,width:n}=e;return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function H9(e,t,r){let{y:n,height:i}=e;return t==="top"?n+=r:t==="bottom"?n-=i+r:n-=i/2,n}function OO(e,t,r,n){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:l}=r,c=i+a,{topLeft:u,topRight:f,bottomLeft:d,bottomRight:h}=Ji(o);let m=V9(t,s);const p=H9(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,d)+i:s==="right"&&(m+=Math.max(f,h)+i),{x:Ct(m,0,n.width-t.width),y:Ct(p,0,n.height-t.height)}}function Cc(e,t,r){const n=vr(r.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function AO(e){return Dr([],on(e))}function U9(e,t,r){return hi(e,{tooltip:t,tooltipItems:r,type:"tooltip"})}function EO(e,t){const r=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return r?e.override(r):e}const PO={beforeTitle:rn,title(e){if(e.length>0){const t=e[0],r=t.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return r[t.dataIndex]}return""},afterTitle:rn,beforeBody:rn,beforeLabel:rn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const r=e.formattedValue;return Se(r)||(t+=r),t},labelColor(e){const r=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:r.borderColor,backgroundColor:r.backgroundColor,borderWidth:r.borderWidth,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const r=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:r.pointStyle,rotation:r.rotation}},afterLabel:rn,afterBody:rn,beforeFooter:rn,footer:rn,afterFooter:rn};function Ft(e,t,r,n){const i=e[t].call(r,n);return typeof i>"u"?PO[t].call(r,n):i}class CO extends Tn{static positioners=Do;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const r=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&r.options.animation&&n.animations,a=new T2(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=U9(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,r){const{callbacks:n}=r,i=Ft(n,"beforeTitle",this,t),a=Ft(n,"title",this,t),o=Ft(n,"afterTitle",this,t);let s=[];return s=Dr(s,on(i)),s=Dr(s,on(a)),s=Dr(s,on(o)),s}getBeforeBody(t,r){return AO(Ft(r.callbacks,"beforeBody",this,t))}getBody(t,r){const{callbacks:n}=r,i=[];return Ce(t,a=>{const o={before:[],lines:[],after:[]},s=EO(n,a);Dr(o.before,on(Ft(s,"beforeLabel",this,a))),Dr(o.lines,Ft(s,"label",this,a)),Dr(o.after,on(Ft(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,r){return AO(Ft(r.callbacks,"afterBody",this,t))}getFooter(t,r){const{callbacks:n}=r,i=Ft(n,"beforeFooter",this,t),a=Ft(n,"footer",this,t),o=Ft(n,"afterFooter",this,t);let s=[];return s=Dr(s,on(i)),s=Dr(s,on(a)),s=Dr(s,on(o)),s}_createItems(t){const r=this._active,n=this.chart.data,i=[],a=[],o=[];let s=[],l,c;for(l=0,c=r.length;l<c;++l)s.push(F9(this.chart,r[l]));return t.filter&&(s=s.filter((u,f,d)=>t.filter(u,f,d,n))),t.itemSort&&(s=s.sort((u,f)=>t.itemSort(u,f,n))),Ce(s,u=>{const f=EO(t.callbacks,u);i.push(Ft(f,"labelColor",this,u)),a.push(Ft(f,"labelPointStyle",this,u)),o.push(Ft(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,r){const n=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=Do[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const l=this._size=_O(this,n),c=Object.assign({},s,l),u=SO(this.chart,n,c),f=OO(n,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(t,r,n,i){const a=this.getCaretPosition(t,n,i);r.lineTo(a.x1,a.y1),r.lineTo(a.x2,a.y2),r.lineTo(a.x3,a.y3)}getCaretPosition(t,r,n){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=Ji(s),{x:d,y:h}=t,{width:m,height:p}=r;let g,v,b,x,S,w;return a==="center"?(S=h+p/2,i==="left"?(g=d,v=g-o,x=S+o,w=S-o):(g=d+m,v=g+o,x=S-o,w=S+o),b=g):(i==="left"?v=d+Math.max(l,u)+o:i==="right"?v=d+m-Math.max(c,f)-o:v=this.caretX,a==="top"?(x=h,S=x-o,g=v-o,b=v+o):(x=h+p,S=x+o,g=v+o,b=v-o),w=x),{x1:g,x2:v,x3:b,y1:x,y2:S,y3:w}}drawTitle(t,r,n){const i=this.title,a=i.length;let o,s,l;if(a){const c=ta(n.rtl,this.x,this.width);for(t.x=Cc(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",o=Rt(n.titleFont),s=n.titleSpacing,r.fillStyle=n.titleColor,r.font=o.string,l=0;l<a;++l)r.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=n.titleMarginBottom-s)}}_drawColorBox(t,r,n,i,a){const o=this.labelColors[n],s=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=a,u=Rt(a.bodyFont),f=Cc(this,"left",a),d=i.x(f),h=l<u.lineHeight?(u.lineHeight-l)/2:0,m=r.y+h;if(a.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(d,c)+c/2,v=m+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Lp(t,p,g,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Lp(t,p,g,v)}else{t.lineWidth=he(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const p=i.leftForLtr(d,c),g=i.leftForLtr(i.xPlus(d,1),c-2),v=Ji(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,fc(t,{x:p,y:m,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fc(t,{x:g,y:m+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(p,m,c,l),t.strokeRect(p,m,c,l),t.fillStyle=o.backgroundColor,t.fillRect(g,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,r,n){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=n,f=Rt(n.bodyFont);let d=f.lineHeight,h=0;const m=ta(n.rtl,this.x,this.width),p=function(C){r.fillText(C,m.x(t.x+h),t.y+d/2),t.y+=d+a},g=m.textAlign(o);let v,b,x,S,w,O,E;for(r.textAlign=o,r.textBaseline="middle",r.font=f.string,t.x=Cc(this,g,n),r.fillStyle=n.bodyColor,Ce(this.beforeBody,p),h=s&&g!=="right"?o==="center"?c/2+u:c+2+u:0,S=0,O=i.length;S<O;++S){for(v=i[S],b=this.labelTextColors[S],r.fillStyle=b,Ce(v.before,p),x=v.lines,s&&x.length&&(this._drawColorBox(r,t,S,m,n),d=Math.max(f.lineHeight,l)),w=0,E=x.length;w<E;++w)p(x[w]),d=f.lineHeight;Ce(v.after,p)}h=0,d=f.lineHeight,Ce(this.afterBody,p),t.y-=a}drawFooter(t,r,n){const i=this.footer,a=i.length;let o,s;if(a){const l=ta(n.rtl,this.x,this.width);for(t.x=Cc(this,n.footerAlign,n),t.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",o=Rt(n.footerFont),r.fillStyle=n.footerColor,r.font=o.string,s=0;s<a;++s)r.fillText(i[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,r,n,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:c,height:u}=n,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:m}=Ji(i.cornerRadius);r.fillStyle=i.backgroundColor,r.strokeStyle=i.borderColor,r.lineWidth=i.borderWidth,r.beginPath(),r.moveTo(s+f,l),o==="top"&&this.drawCaret(t,r,n,i),r.lineTo(s+c-d,l),r.quadraticCurveTo(s+c,l,s+c,l+d),o==="center"&&a==="right"&&this.drawCaret(t,r,n,i),r.lineTo(s+c,l+u-m),r.quadraticCurveTo(s+c,l+u,s+c-m,l+u),o==="bottom"&&this.drawCaret(t,r,n,i),r.lineTo(s+h,l+u),r.quadraticCurveTo(s,l+u,s,l+u-h),o==="center"&&a==="left"&&this.drawCaret(t,r,n,i),r.lineTo(s,l+f),r.quadraticCurveTo(s,l,s+f,l),r.closePath(),r.fill(),i.borderWidth>0&&r.stroke()}_updateAnimationTarget(t){const r=this.chart,n=this.$animations,i=n&&n.x,a=n&&n.y;if(i||a){const o=Do[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=_O(this,t),l=Object.assign({},o,this._size),c=SO(r,t,l),u=OO(t,l,c,r);(i._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const r=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(r);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=vr(r.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&s&&(t.save(),t.globalAlpha=n,this.drawBackground(a,t,i,r),S2(t,r.textDirection),a.y+=o.top,this.drawTitle(a,t,r),this.drawBody(a,t,r),this.drawFooter(a,t,r),O2(t,r.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,r){const n=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!oc(n,i),o=this._positionChanged(i,r);(a||o)&&(this._active=i,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,r,n),s=this._positionChanged(o,t),l=r||!oc(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,r))),l}_getActiveElements(t,r,n,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return r.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,n);return a.reverse&&o.reverse(),o}_positionChanged(t,r){const{caretX:n,caretY:i,options:a}=this,o=Do[a.position].call(this,t,r);return o!==!1&&(n!==o.x||i!==o.y)}}var br={id:"tooltip",_element:CO,positioners:Do,afterInit(e,t,r){r&&(e.tooltip=new CO({chart:e,options:r}))},beforeUpdate(e,t,r){e.tooltip&&e.tooltip.initialize(r)},reset(e,t,r){e.tooltip&&e.tooltip.initialize(r)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const r={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",r)}},afterEvent(e,t){if(e.tooltip){const r=t.replay;e.tooltip.handleEvent(t.event,r,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:PO},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const K9=(e,t,r,n)=>(typeof t=="string"?(r=e.push(t)-1,n.unshift({index:r,label:t})):isNaN(t)&&(r=null),r);function q9(e,t,r,n){const i=e.indexOf(t);if(i===-1)return K9(e,t,r,n);const a=e.lastIndexOf(t);return i!==a?r:i}const Y9=(e,t)=>e===null?null:Ct(Math.round(e),0,t);function kO(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class jn extends ra{static id="category";static defaults={ticks:{callback:kO}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const r=this._addedLabels;if(r.length){const n=this.getLabels();for(const{index:i,label:a}of r)n[i]===a&&n.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,r){if(Se(t))return null;const n=this.getLabels();return r=isFinite(r)&&n[r]===t?r:q9(n,t,se(r,t),this._addedLabels),Y9(r,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:r}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),r||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,r=this.max,n=this.options.offset,i=[];let a=this.getLabels();a=t===0&&r===a.length-1?a:a.slice(t,r+1),this._valueRange=Math.max(a.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=t;o<=r;o++)i.push({value:o});return i}getLabelForValue(t){return kO.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const r=this.ticks;return t<0||t>r.length-1?null:this.getPixelForValue(r[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function G9(e,t){const r=[],{bounds:i,step:a,min:o,max:s,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:d}=e,h=a||1,m=u-1,{min:p,max:g}=t,v=!Se(o),b=!Se(s),x=!Se(c),S=(g-p)/(f+1);let w=XS((g-p)/m/h)*h,O,E,C,M;if(w<1e-14&&!v&&!b)return[{value:p},{value:g}];M=Math.ceil(g/w)-Math.floor(p/w),M>m&&(w=XS(M*w/m/h)*h),Se(l)||(O=Math.pow(10,l),w=Math.ceil(w*O)/O),i==="ticks"?(E=Math.floor(p/w)*w,C=Math.ceil(g/w)*w):(E=p,C=g),v&&b&&a&&g7((s-o)/a,w/1e3)?(M=Math.round(Math.min((s-o)/w,u)),w=(s-o)/M,E=o,C=s):x?(E=v?o:E,C=b?s:C,M=c-1,w=(C-E)/M):(M=(C-E)/w,bo(M,Math.round(M),w/1e3)?M=Math.round(M):M=Math.ceil(M));const $=Math.max(ZS(w),ZS(E));O=Math.pow(10,Se(l)?$:l),E=Math.round(E*O)/O,C=Math.round(C*O)/O;let j=0;for(v&&(d&&E!==o?(r.push({value:o}),E<o&&j++,bo(Math.round((E+j*w)*O)/O,o,TO(o,S,e))&&j++):E<o&&j++);j<M;++j){const _=Math.round((E+j*w)*O)/O;if(b&&_>s)break;r.push({value:_})}return b&&d&&C!==s?r.length&&bo(r[r.length-1].value,s,TO(s,S,e))?r[r.length-1].value=s:r.push({value:s}):(!b||C===s)&&r.push({value:C}),r}function TO(e,t,{horizontal:r,minRotation:n}){const i=nn(n),a=(r?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class X9 extends ra{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,r){return Se(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:r,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=r?i:l,s=l=>a=n?a:l;if(t){const l=Mr(i),c=Mr(a);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:r,stepSize:n}=t,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),r=r||11),r&&(i=Math.min(r,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,r=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:r.precision,step:r.stepSize,count:r.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:r.minRotation||0,includeBounds:r.includeBounds!==!1},a=this._range||this,o=G9(i,a);return t.bounds==="ticks"&&v7(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let r=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-r)/Math.max(t.length-1,1)/2;r-=i,n+=i}this._startValue=r,this._endValue=n,this._valueRange=n-r}getLabelForValue(t){return Ip(t,this.chart.options.locale,this.options.ticks.format)}}class Dn extends X9{static id="linear";static defaults={ticks:{callback:c2.formatters.numeric}};determineDataLimits(){const{min:t,max:r}=this.getMinMax(!0);this.min=dr(t)?t:0,this.max=dr(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),r=t?this.width:this.height,n=nn(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(r/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const kc={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Bt=Object.keys(kc);function MO(e,t){return e-t}function jO(e,t){if(Se(t))return null;const r=e._adapter,{parser:n,round:i,isoWeekday:a}=e._parseOpts;let o=t;return typeof n=="function"&&(o=n(o)),dr(o)||(o=typeof n=="string"?r.parse(o,n):r.parse(o)),o===null?null:(i&&(o=i==="week"&&(xo(a)||a===!0)?r.startOf(o,"isoWeek",a):r.startOf(o,i)),+o)}function DO(e,t,r,n){const i=Bt.length;for(let a=Bt.indexOf(e);a<i-1;++a){const o=kc[Bt[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((r-t)/(s*o.size))<=n)return Bt[a]}return Bt[i-1]}function Z9(e,t,r,n,i){for(let a=Bt.length-1;a>=Bt.indexOf(r);a--){const o=Bt[a];if(kc[o].common&&e._adapter.diff(i,n,o)>=t-1)return o}return Bt[r?Bt.indexOf(r):0]}function J9(e){for(let t=Bt.indexOf(e)+1,r=Bt.length;t<r;++t)if(kc[Bt[t]].common)return Bt[t]}function NO(e,t,r){if(!r)e[t]=!0;else if(r.length){const{lo:n,hi:i}=jp(r,t),a=r[n]>=t?r[n]:r[i];e[a]=!0}}function Q9(e,t,r,n){const i=e._adapter,a=+i.startOf(t[0].value,n),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,n))l=r[s],l>=0&&(t[l].major=!0);return t}function IO(e,t,r){const n=[],i={},a=t.length;let o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,n.push({value:s,major:!1});return a===0||!r?n:Q9(e,n,i,r)}class $O extends ra{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,r={}){const n=t.time||(t.time={}),i=this._adapter=new aV._date(t.adapters.date);i.init(r),vo(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=r.normalized}parse(t,r){return t===void 0?null:jO(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,r=this._adapter,n=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=dr(i)&&!isNaN(i)?i:+r.startOf(Date.now(),n),a=dr(a)&&!isNaN(a)?a:+r.endOf(Date.now(),n)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(r=t[0],n=t[t.length-1]),{min:r,max:n}}buildTicks(){const t=this.options,r=t.time,n=t.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=_7(i,a,o);return this._unit=r.unit||(n.autoSkip?DO(r.minUnit,this.min,this.max,this._getLabelCapacity(a)):Z9(this,s.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:J9(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),IO(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let r=0,n=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?r=1-i:r=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?n=a:n=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;r=Ct(r,0,o),n=Ct(n,0,o),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const t=this._adapter,r=this.min,n=this.max,i=this.options,a=i.time,o=a.unit||DO(a.minUnit,r,n,this._getLabelCapacity(r)),s=se(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,c=xo(l)||l===!0,u={};let f=r,d,h;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":o),t.diff(n,r,o)>1e5*s)throw new Error(r+" and "+n+" are too far apart with stepSize of "+s+" "+o);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(d=f,h=0;d<n;d=+t.add(d,s,o),h++)NO(u,d,m);return(d===n||i.bounds==="ticks"||h===1)&&NO(u,d,m),Object.keys(u).sort(MO).map(p=>+p)}getLabelForValue(t){const r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(t,n.tooltipFormat):r.format(t,n.displayFormats.datetime)}format(t,r){const i=this.options.time.displayFormats,a=this._unit,o=r||i[a];return this._adapter.format(t,o)}_tickFormatFunction(t,r,n,i){const a=this.options,o=a.ticks.callback;if(o)return Fe(o,[t,r,n],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],f=c&&s[c],d=n[r],h=c&&f&&d&&d.major;return this._adapter.format(t,i||(h?f:u))}generateTickLabels(t){let r,n,i;for(r=0,n=t.length;r<n;++r)i=t[r],i.label=this._tickFormatFunction(i.value,r,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const r=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((r.start+n)*r.factor)}getValueForPixel(t){const r=this._offsets,n=this.getDecimalForPixel(t)/r.factor-r.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const r=this.options.ticks,n=this.ctx.measureText(t).width,i=nn(this.isHorizontal()?r.maxRotation:r.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:n*a+s*o,h:n*o+s*a}}_getLabelCapacity(t){const r=this.options.time,n=r.displayFormats,i=n[r.unit]||n.millisecond,a=this._tickFormatFunction(t,0,IO(this,[t],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],r,n;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(r=0,n=i.length;r<n;++r)t=t.concat(i[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let r,n;if(t.length)return t;const i=this.getLabels();for(r=0,n=i.length;r<n;++r)t.push(jO(this,i[r]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return t2(t.sort(MO))}}function Tc(e,t,r){let n=0,i=e.length-1,a,o,s,l;r?(t>=e[n].pos&&t<=e[i].pos&&({lo:n,hi:i}=ui(e,"pos",t)),{pos:a,time:s}=e[n],{pos:o,time:l}=e[i]):(t>=e[n].time&&t<=e[i].time&&({lo:n,hi:i}=ui(e,"time",t)),{time:a,pos:s}=e[n],{time:o,pos:l}=e[i]);const c=o-a;return c?s+(l-s)*(t-a)/c:s}class FU extends $O{static id="timeseries";static defaults=$O.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(t);this._minPos=Tc(r,this.min),this._tableRange=Tc(r,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:r,max:n}=this,i=[],a=[];let o,s,l,c,u;for(o=0,s=t.length;o<s;++o)c=t[o],c>=r&&c<=n&&i.push(c);if(i.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(o=0,s=i.length;o<s;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&a.push({time:c,pos:o/(s-1)});return a}_generate(){const t=this.min,r=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(r)||n.length===1)&&n.push(r),n.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?t=this.normalize(r.concat(n)):t=r.length?r:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Tc(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const r=this._offsets,n=this.getDecimalForPixel(t)/r.factor-r.end;return Tc(this._table,n*this._tableRange+this._minPos,!0)}}const RO="label";function LO(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function eH(e,t){const r=e.options;r&&t&&Object.assign(r,t)}function FO(e,t){e.labels=t}function BO(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:RO;const n=[];e.datasets=t.map(i=>{const a=e.datasets.find(o=>o[r]===i[r]);return!a||!i.data||n.includes(a)?{...i}:(n.push(a),Object.assign(a,i),a)})}function tH(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:RO;const r={labels:[],datasets:[]};return FO(r,e.labels),BO(r,e.datasets,t),r}function rH(e,t){const{height:r=150,width:n=300,redraw:i=!1,datasetIdKey:a,type:o,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:f,...d}=e,h=k.useRef(null),m=k.useRef(null),p=()=>{h.current&&(m.current=new Lt(h.current,{type:o,data:tH(s,a),options:l&&{...l},plugins:c}),LO(t,m.current))},g=()=>{LO(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&eH(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&FO(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&BO(m.current.config.data,s.datasets,a)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(p)):m.current.update(f))},[i,l,s.labels,s.datasets,f]),k.useEffect(()=>{m.current&&(g(),setTimeout(p))},[o]),k.useEffect(()=>(p(),()=>g()),[]),k.createElement("canvas",{ref:h,role:"img",height:r,width:n,...d},u)}const nH=k.forwardRef(rH);function cm(e,t){return Lt.register(t),k.forwardRef((r,n)=>k.createElement(nH,{...r,ref:n,type:e}))}const um=cm("line",iV),No=cm("bar",tV),fm=cm("doughnut",nV);Lt.register(nm,br,yr);const iH={id:"centerText",afterDraw(e,t,r){const{ctx:n}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:a,y:o}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:f="#0F172A",bottomColor:d="#64748B"}=r||{};n.save(),n.textAlign="center",n.textBaseline="middle",n.fillStyle=f,n.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(s,a,o-5),n.fillStyle=d,n.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(l,a,o+12),n.restore()}},aH=({sold:e=847,unsold:t=73,growthPct:r="+9.1%"})=>{const n=e+t,i={labels:["Sold","Unsold"],datasets:[{data:[e,t],backgroundColor:["#12B981","#EF4444"],borderWidth:2,hoverOffset:4}]},a={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:o=>`${o.label}: ${o.parsed}`},displayColors:!1},centerText:{top:`${n}`,bottom:"Total Units",topSize:20,bottomSize:10}}};return y.jsx(me,{title:"Unit Status",period:"This Month",icon:y.jsx(su,{className:"h-6 w-6 text-green-600"}),className:"h-[238px]",children:y.jsxs("div",{className:"grid grid-cols-12 gap-4 items-center",children:[y.jsxs("div",{className:"col-span-5 space-y-3",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-xs lending-[16px] text-[#64748B]",children:"Sold"}),y.jsx("div",{className:"text-[28px] leading-[32px] text-[#1FA05B]",children:e})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-xs lending-[16px] text-[#64748B]",children:"Unsold"}),y.jsx("div",{className:"text-[28px] leading-[32px] text-[#EF4444]",children:t})]}),y.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center ",children:[r," ",y.jsx("div",{className:"text-[#64748B] text-[10px]",children:"Compared to last month"})]})]}),y.jsx("div",{className:"col-span-7",children:y.jsx("div",{className:"h-[158px] w-[158px] ml-auto mr-2",children:y.jsx(fm,{data:i,options:a,plugins:[iH]})})})]})})},zO=({value:e=0,total:t=1,colorClass:r="",label:n=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),a=r==="bg-[#8B5CF6]"?"text-[#8B5CF6]":r==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return y.jsxs("div",{className:"flex flex-col items-start",children:[y.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:y.jsx("div",{className:`h-3 rounded-full ${r}`,style:{width:`${i}%`}})}),y.jsx("div",{className:`${a} text-xs font-bold mt-1`,children:e}),y.jsx("div",{className:"text-xs text-[#64748B] mt-1",children:n})]})},WO=({title:e,value:t,suffix:r,valueClass:n=""})=>y.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[y.jsx("div",{className:"text-xs leading-[16px] text-[#121212] mb-1",children:e}),y.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-1 font-medium ${n}`,children:[t," ",r&&y.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:r})]})]}),oH=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:r=700,tenantCount:n=56,avgResidents:i=4.4,avgLeaseMonths:a=18})=>{const o=r+n;return y.jsxs("div",{children:[y.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[y.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[y.jsx(Kg,{className:"h-6 w-6 text-[#329DFF]"}),y.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),y.jsxs("div",{className:"flex items-center justify-between gap-",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"text-[#64748B] text-xl leading-[32px]",children:["/",e]})]})]}),y.jsxs("div",{className:"flex items-end",children:[y.jsx(zO,{value:r,total:o,colorClass:"bg-[#8B5CF6]",label:"Owner"}),y.jsx(zO,{value:n,total:o,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),y.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-3",children:[y.jsx(WO,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),y.jsx(WO,{title:"Avg Lease Period",value:a,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Lt.register(nm,br,yr);const sH={id:"centerText",afterDraw(e,t,r){const{ctx:n}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:a,y:o}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:f="#0F172A",bottomColor:d="#64748B"}=r||{};n.save(),n.textAlign="center",n.textBaseline="middle",n.fillStyle=f,n.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(s,a,o-5),n.fillStyle=d,n.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(l,a,o+12),n.restore()}},lH=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:r=26,growthPct:n="+9.1%"})=>{const i=Math.max(e-r,0),a=e+t,o={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,r],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${a}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return y.jsx(me,{title:"Resident Overview",icon:y.jsx(Ug,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:y.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-4 items-center",children:[y.jsxs("div",{className:"col-span-5",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),y.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),y.jsxs("div",{children:[y.jsx("div",{className:"text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),y.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),y.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[n," ",y.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),y.jsx("div",{className:"col-span-7",children:y.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:y.jsx(fm,{data:o,options:s,plugins:[sH]})})})]})})};Lt.register(jn,Dn,jo,br,yr);const cH=({blocks:e=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),r=e.map(s=>s.owner),n=e.map(s=>s.rented),i=e.map(s=>s.vacant),a={labels:t,datasets:[{label:"Owner",data:r,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:n,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},o={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return y.jsx(me,{title:"Block-wise Occupancy",period:y.jsx(ht,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:y.jsx(No,{data:a,options:o})})};Lt.register(jn,Dn,om,am,br,yr);const uH=e=>{const[t,r]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${r}`},fH=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:r=[12,17,8,5,16]})=>{const n={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:r,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:a=>uH(a[0].label),label:a=>`${a.dataset.label}: ${a.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return y.jsx(me,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:y.jsx(ht,{className:"text-xl text-[#884EA7]"}),titleWeight:"semi-bold",children:y.jsx(um,{data:n,options:i})})};Lt.register(jn,Dn,om,am,br,yr);const dH=e=>{const[t,r]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${r}`},VO=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:r=[4,17,8,5,16,4,7]})=>{const n={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:r,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:a=>dH(a[0].label),label:a=>`${a.dataset.label}: ${a.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return y.jsx(um,{data:n,options:i})};function HO({label:e,value:t,positive:r,bgColor:n,delta:i,deltaLabel:a,textColor:o}){return y.jsxs("div",{className:`rounded-lg p-4 ${n} border border-[#EBEBEB] h-[126px]`,children:[y.jsx("div",{className:`text-base leading-[20px] ${o}`,children:e}),y.jsx("div",{className:"mt-[16px] leading-[28px] text-2xl font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"mt-[8px] flex items-center gap-2 leading-[14px] text-[10px]",children:[y.jsx("div",{className:r?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),y.jsx("div",{className:"text-[#64748B] ",children:a})]})]})}function hH(){return y.jsxs(me,{title:"Accounting",className:"w-full h-[523px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(HO,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),y.jsx(HO,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),y.jsx("div",{className:"h-[254px] mt-[35.5px]",children:y.jsx(VO,{})})]})}Lt.register(jn,Dn,jo,br,yr);const pH=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],n={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:a=>e[a[0].dataIndex],label:a=>{const o=a.parsed.y;return`${a.dataset.label}: AED ${(o/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:a=>`${a/1e3}K`}}}};return y.jsx(me,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:y.jsx(No,{data:n,options:i})})},mH=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((n,i)=>n+i.amount,0),r=n=>n>=1e6?`AED ${(n/1e6).toFixed(2)}M`:n>=1e3?`AED ${(n/1e3).toFixed(1)}K`:`AED ${n}`;return y.jsxs(me,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[y.jsx("div",{className:"flex flex-col gap-3",children:e.map((n,i)=>y.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("div",{className:"text-sm font-medium text-[#121212]",children:n.title}),y.jsx("div",{className:"text-xs text-[#64748B]",children:n?.subtitle})]}),y.jsx("div",{className:"flex flex-col items-end",children:y.jsx("div",{className:"text-sm text-[#1FA05B] font-semibold",children:r(n.amount)})})]},i))}),y.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[y.jsx("div",{className:"text-sm font-medium text-[#121212]",children:"Total"}),y.jsx("div",{className:"text-base text-[#1FA05B] font-bold",children:r(t)})]})]})};Lt.register(jn,Dn,jo,br,yr);const gH=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],r=[18,12,18,6],n={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:a=>e[a[0].dataIndex],label:a=>`Due: AED ${(a.parsed.y/1e3).toFixed(1)}K`,afterLabel:a=>`Units Count: ${r[a.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:a=>`${a/1e3}K`}}}};return y.jsxs(me,{title:"Dues Ageing",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[y.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-3 h-[48px]",children:e.map((a,o)=>y.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:y.jsxs("div",{className:"flex justify-between items-start",children:[y.jsx("div",{className:"font-medium leading-[16px] text-xs rounded",children:a}),y.jsxs("div",{className:"text-right",children:[y.jsxs("div",{className:"text-red-600 font-medium leading-[16px] text-xs",children:["AED ",(t[o]/1e3).toFixed(1),"K"]}),y.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[r[o]," Units"]})]})]})},a))}),y.jsx("div",{className:"h-[192px]",children:y.jsx(No,{data:n,options:i})})]})};Lt.register(nm,br,yr);const vH=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],r={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},n=t.reduce((a,o)=>a+o,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:a=>`${a.label}: AED ${a.formattedValue}`}}}};return y.jsxs(me,{title:"Expense Categories",className:"w-full h-[523px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[y.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[y.jsx(fm,{data:r,options:i}),y.jsxs("div",{className:"absolute text-center",children:[y.jsxs("div",{className:"text-2xl font-medium leading-[28px] text-[#121212]",children:["AED ",(n/1e6).toFixed(2),"M"]}),y.jsx("div",{className:"text-[#121212] leading-[18px] text-sm",children:"Total Expenses"})]})]}),y.jsx("div",{className:"space-y-2",children:e.map((a,o)=>y.jsxs("div",{className:"flex justify-between items-center text-sm pb-2",children:[y.jsxs("div",{className:"flex items-center gap-2 text-xs leading-[16px] text-[#64748B]",children:[y.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.datasets[0].backgroundColor[o]}}),a]}),y.jsxs("div",{className:"leading-[16px] text-xs text-[#64748B]",children:["AED ",(t[o]/1e3).toFixed(0),"K"]})]},a))})]})},Io=[{name:"Gym Equipment",value:1e6,color:"#08B6D4"},{name:"Security",value:8e5,color:"#EF4444"},{name:"Others",value:6e5,color:"#F59E0B"},{name:"Pool Maintenance",value:7e5,color:"#8B5CF6"},{name:"Administration",value:52e4,color:"#10B981"}];function yH(){const e=Io.reduce((t,r)=>t+r.value,0);return y.jsx(me,{title:"Asset Value Breakdown",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:y.jsxs("div",{className:"flex flex-col items-center justify-center",children:[y.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:Io,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Io.map((t,r)=>y.jsx(kr,{fill:t.color},`cell-${r}`))}),y.jsx(ni,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),y.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[y.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),y.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),y.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-sm",children:[y.jsx("div",{className:"flex flex-col gap-2",children:Io.slice(0,3).map(t=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),y.jsx("div",{className:"text-[#64748B] leading-[16px] text-xs",children:t.name})]},t.name))}),y.jsx("div",{className:"flex flex-col gap-2 items-start",children:Io.slice(3).map(t=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),y.jsx("div",{className:"text-[#64748B] leading-[16px] text-xs",children:t.name})]},t.name))})]})]})})}Lt.register(jn,Dn,jo,br,yr);const bH=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],r=[18,12,18,6],n={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:a=>e[a[0].dataIndex],label:a=>`Due: AED ${(a.parsed.y/1e3).toFixed(1)}K`,afterLabel:a=>`Units Count: ${r[a.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:a=>`${a/1e3}K`}}}};return y.jsx(me,{title:"Revenue by Category",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:y.jsx(No,{data:n,options:i})})};function xH(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function wH(e){return Re({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z"},child:[]}]})(e)}function _H({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsxs(me,{title:e,icon:y.jsx("div",{className:"h-6 w-6 grid place-items-center",children:y.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[y.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[y.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-slate-500",children:n})]})]})}function SH(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Vg,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:wH,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:xH,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:qg,iconColor:"text-[#DBB467]"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(_H,{...t},r))})}const Mc=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function OH(){const t=Mc.find(r=>r.name==="Completed")?.value||0;return y.jsx(me,{title:"Guard Patrols",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:y.jsxs("div",{className:"flex flex-col items-center justify-center",children:[y.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:Mc,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Mc.map((r,n)=>y.jsx(kr,{fill:r.color},`cell-${n}`))}),y.jsx(ni,{formatter:r=>r.toLocaleString()})]})}),y.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[y.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),y.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),y.jsx("div",{className:"flex flex-col gap-2 mt-3 w-full px-6 text-sm",children:Mc.map(r=>y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.color}}),y.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.name})]}),y.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.value})]},r.name))})]})})}Lt.register(jn,Dn,om,am,br,yr);const AH=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},r={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:n=>n[0].label,label:n=>`${n.dataset.label} ${n.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return y.jsx(me,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:y.jsx(ht,{className:"text-xl text-[#884EA7]"}),children:y.jsx(um,{data:t,options:r})})};function EH(){return y.jsx(me,{title:"Incident Reports",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex w-full text-center gap-6",children:[y.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[y.jsx("div",{className:"text-2xl leading-[28px] font-medium text-[#AB0000]",children:"3"}),y.jsx("div",{className:"text-xs leading-[16px] text-[#AB0000]",children:"Open"})]}),y.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[y.jsx("div",{className:"text-2xl leading-[28px] font-medium text-[#E7A015]",children:"5"}),y.jsx("div",{className:"text-xs leading-[16px] text-[#E7A015]",children:"In-progress"})]}),y.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[y.jsx("div",{className:"text-2xl leading-[28px] font-medium text-[#1FA05B]",children:"12"}),y.jsx("div",{className:"text-xs leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),y.jsxs("div",{className:"mt-4 ",children:[y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:y.jsx("div",{className:"text-white text-xs font-bold",children:"!"})}),y.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),y.jsxs("div",{className:"px-3 py-1 rounded-full text-xs font-semibold flex items-center gap-1 text-[#AB0000] bg-red-50",children:[y.jsx("div",{children:"4 - Danger"}),y.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:y.jsx(Fg,{className:"text-white text-[10px]"})}),y.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),y.jsxs("div",{className:"px-3 py-1 rounded-full text-xs font-semibold flex items-center gap-1 text-[#E7A015] bg-yellow-50",children:[y.jsx("div",{children:"3 - High"}),y.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:y.jsx(Fg,{className:"text-white text-[10px]"})}),y.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),y.jsxs("div",{className:"px-3 py-1 rounded-full text-xs font-semibold flex items-center gap-1 text-[#1FA05B] bg-green-50",children:[y.jsx("div",{children:"1 - Low"}),y.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function PH(){return y.jsx(me,{title:"Staff Attendance",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex w-full text-center h-[76px] gap-4 mb-2",children:[y.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[y.jsx("div",{className:"text-2xl leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),y.jsx("div",{className:"text-xs leading-[16px] text-[#1FA05B]",children:"Present"})]}),y.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[y.jsx("div",{className:"text-2xl leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),y.jsx("div",{className:"text-xs leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),y.jsxs("div",{className:"mt-[24px] ",children:[y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium text-xs leading-[18px]",children:"Security guards"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-sm",children:"12/12 Present"})]}),y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium text-xs leading-[18px]",children:"Housekeeping"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-sm",children:"7/8 Present"})]}),y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium text-xs leading-[18px]",children:"Maintenance"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-sm",children:"4/4 Present"})]}),y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium text-xs leading-[18px]",children:"Gardening"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-sm",children:"2/2 Present"})]})]})]})})}function CH(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function kH(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}function TH(e){return Re({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"},child:[]}]})(e)}function MH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsxs(me,{title:e,icon:y.jsx("div",{className:"h-6 w-6 grid place-items-center",children:y.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[y.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[y.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-slate-500",children:n})]})]})}function jH(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Kg,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:kH,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:TH,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:VC,iconColor:"text-[#36AB6C]"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(MH,{...t},r))})}const DH=[{title:"Maintenance",total:25,pending:8},{title:"Security",total:15,pending:3},{title:"Housekeeping",total:12,pending:4},{title:"Utilities",total:10,pending:2}];function NH(){return y.jsx(me,{title:"Complaints",period:y.jsx(ht,{className:"text-xl text-[#884EA7]"}),className:"h-[362px]",children:y.jsx("div",{className:"flex flex-col gap-3",children:DH.map((e,t)=>y.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("div",{className:"text-sm leading-[18px] font-medium text-[#121212]",children:e.title}),y.jsxs("div",{className:"text-xs leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),y.jsxs("div",{className:"flex flex-col items-end",children:[y.jsx("div",{className:"text-sm leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),y.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}Lt.register(jn,Dn,jo,br,yr);const IH=({blocks:e=[{name:"Level 1",owner:110,rented:24,vacant:8},{name:"Level 2",owner:95,rented:18,vacant:6},{name:"Level 3",owner:65,rented:12,vacant:18},{name:"Level 4",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),r=e.map(s=>s.owner),n=e.map(s=>s.rented),i=e.map(s=>s.vacant),a={labels:t,datasets:[{label:"Closed",data:r,backgroundColor:"#12B981",barThickness:44},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:44},{label:"In Progress",data:n,backgroundColor:"#F59D0D",barThickness:44},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:44},{label:"Open",data:i,backgroundColor:"#EF4444",barThickness:44}]},o={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return y.jsx(me,{title:"Complaints by Level",className:"w-full h-[362px]",period:y.jsx(ht,{className:"text-xl text-[#884EA7]"}),children:y.jsx(No,{data:a,options:o})})},$H=[{title:"Access Card",total:45,pending:11},{title:"NOC Request",total:12,pending:7},{title:"Parking Allocation",total:8,pending:6},{title:"Document Request",total:25,pending:2}];function RH(){return y.jsx(me,{title:"Request Box",period:y.jsx(ht,{className:"text-xl text-[#884EA7]"}),className:"h-[362px]",children:y.jsx("div",{className:"flex flex-col gap-3",children:$H.map((e,t)=>y.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("div",{className:"text-sm leading-[18px] font-medium text-[#121212]",children:e.title}),y.jsxs("div",{className:"text-xs leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),y.jsxs("div",{className:"flex flex-col items-end",children:[y.jsx("div",{className:"text-sm leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),y.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}function LH(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}function FH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsxs(me,{title:e,icon:y.jsx("div",{className:"h-6 w-6 grid place-items-center",children:y.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[y.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[y.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-slate-500",children:n})]})]})}function BH(){const e=[{title:"Open Complaints",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Vg,iconColor:"text-[#AB0000]"},{title:"Pending Requests",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:LH,iconColor:"text-[#E7A015]"},{title:"Avg Response Time",value:"3h",delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:BC,iconColor:"text-[#1FA05B]"},{title:"Resolution Rate",value:"93%",delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:LC,iconColor:"text-[#329DFF]"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(FH,{...t},r))})}function UO({title:e,date:t,rsvp:r,utilisation:n,status:i}){return y.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("div",{className:"text-base leading-[20px] font-semibold text-[#121212]",children:e}),y.jsx("div",{className:`text-xs font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),y.jsx("div",{className:"text-sm leading-[18px] text-[#64748B]",children:t}),y.jsxs("div",{className:"flex justify-between items-center mt-2",children:[y.jsxs("div",{className:"text-sm leading-[18px] text-[#64748B]",children:[r," RSVP"]}),y.jsxs("div",{className:"text-[#3C82F6] text-sm leading-[18px] font-medium",children:[n,"% utilisation"]})]}),y.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:y.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${n}%`}})})]})}function zH(){return y.jsx(me,{title:"Events Utilisation",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:y.jsxs("div",{children:[y.jsx(UO,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),y.jsx(UO,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function jc({label:e,value:t,subLabel:r,bgColor:n,textColor:i}){return y.jsxs("div",{className:`rounded-lg p-4 ${n} h-[124px]`,children:[y.jsx("div",{className:`text-base font-medium ${i} leading-[20px]`,children:e}),y.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),y.jsx("div",{className:"text-xs leading-[16px] text-[#64748B] mt-2",children:r})]})}function WH(){return y.jsx(me,{title:"Notice Board Status",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(jc,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),y.jsx(jc,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),y.jsx(jc,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),y.jsx(jc,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function KO(e){return Re({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function VH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsx(me,{title:e,icon:y.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:y.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:y.jsxs("div",{children:[y.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 pt-[8px] text-xs leading-[16px]",children:[y.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function HH({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:KO,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return y.jsx("div",{className:"h-full",children:t.map((r,n)=>y.jsx(VH,{...r},n))})}function UH(e){return Re({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function KH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsx(me,{title:e,icon:y.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:y.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:y.jsxs("div",{children:[y.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 pt-[8px] text-xs leading-[16px]",children:[y.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function qH(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:KO,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:HC,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:CH,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:UH,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(KH,{...t},r))})}ae.Accounting=hH,ae.AssetValueBreakdown=yH,ae.BlockWiseOccupancy=cH,ae.Budgets=pH,ae.Card=me,ae.CashBankBalance=mH,ae.Community=Ez,ae.Complaints=NH,ae.ComplaintsByLevel=IH,ae.DuesAgeing=gH,ae.Engagement=Pz,ae.EngagementStatsGrid=qH,ae.EventsUtilisation=zH,ae.ExpenseCategories=vH,ae.Facilities=Mz,ae.FinanceSummary=jz,ae.GateAndSecurityStatsGrid=jH,ae.GateUpdates=Iz,ae.GuardPatrols=OH,ae.Header=zC,ae.Helpdesk=$z,ae.HelpdeskStatsGrid=BH,ae.HourlyTrafficFlow=AH,ae.IncidentReports=EH,ae.IncomeExpenditure=VO,ae.MainHeader=qC,ae.MoveInOutTrends=fH,ae.NoticeBoardStatus=WH,ae.OccupancyOverview=oH,ae.RequestBox=RH,ae.ResidentOverview=lH,ae.RevenuebyCategory=bH,ae.SingleStats=HH,ae.StaffAttendance=PH,ae.StatsGrid=SH,ae.UnitStatus=aH,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));
216
+ `):e}function F9(e,t){const{element:r,datasetIndex:n,index:i}=t,a=e.getDatasetMeta(n).controller,{label:o,value:s}=a.getLabelAndValue(i);return{chart:e,label:o,parsed:a.getParsed(i),raw:e.data.datasets[n].data[i],formattedValue:s,dataset:a.getDataset(),dataIndex:i,datasetIndex:n,element:r}}function _O(e,t){const r=e.chart.ctx,{body:n,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=Rt(t.bodyFont),c=Rt(t.titleFont),u=Rt(t.footerFont),f=a.length,d=i.length,h=n.length,m=vr(t.padding);let p=m.height,g=0,v=n.reduce((S,w)=>S+w.before.length+w.lines.length+w.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(p+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const S=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=h*S+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}d&&(p+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let b=0;const x=function(S){g=Math.max(g,r.measureText(S).width+b)};return r.save(),r.font=c.string,Ce(e.title,x),r.font=l.string,Ce(e.beforeBody.concat(e.afterBody),x),b=t.displayColors?o+2+t.boxPadding:0,Ce(n,S=>{Ce(S.before,x),Ce(S.lines,x),Ce(S.after,x)}),b=0,r.font=u.string,Ce(e.footer,x),r.restore(),g+=m.width,{width:g,height:p}}function B9(e,t){const{y:r,height:n}=t;return r<n/2?"top":r>e.height-n/2?"bottom":"center"}function z9(e,t,r,n){const{x:i,width:a}=n,o=r.caretSize+r.caretPadding;if(e==="left"&&i+a+o>t.width||e==="right"&&i-a-o<0)return!0}function W9(e,t,r,n){const{x:i,width:a}=r,{width:o,chartArea:{left:s,right:l}}=e;let c="center";return n==="center"?c=i<=(s+l)/2?"left":"right":i<=a/2?c="left":i>=o-a/2&&(c="right"),z9(c,e,t,r)&&(c="center"),c}function SO(e,t,r){const n=r.yAlign||t.yAlign||B9(e,r);return{xAlign:r.xAlign||t.xAlign||W9(e,t,r,n),yAlign:n}}function V9(e,t){let{x:r,width:n}=e;return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function H9(e,t,r){let{y:n,height:i}=e;return t==="top"?n+=r:t==="bottom"?n-=i+r:n-=i/2,n}function OO(e,t,r,n){const{caretSize:i,caretPadding:a,cornerRadius:o}=e,{xAlign:s,yAlign:l}=r,c=i+a,{topLeft:u,topRight:f,bottomLeft:d,bottomRight:h}=Ji(o);let m=V9(t,s);const p=H9(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,d)+i:s==="right"&&(m+=Math.max(f,h)+i),{x:Ct(m,0,n.width-t.width),y:Ct(p,0,n.height-t.height)}}function Cc(e,t,r){const n=vr(r.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function AO(e){return Dr([],on(e))}function U9(e,t,r){return hi(e,{tooltip:t,tooltipItems:r,type:"tooltip"})}function EO(e,t){const r=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return r?e.override(r):e}const PO={beforeTitle:rn,title(e){if(e.length>0){const t=e[0],r=t.chart.data.labels,n=r?r.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(n>0&&t.dataIndex<n)return r[t.dataIndex]}return""},afterTitle:rn,beforeBody:rn,beforeLabel:rn,label(e){if(this&&this.options&&this.options.mode==="dataset")return e.label+": "+e.formattedValue||e.formattedValue;let t=e.dataset.label||"";t&&(t+=": ");const r=e.formattedValue;return Se(r)||(t+=r),t},labelColor(e){const r=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:r.borderColor,backgroundColor:r.backgroundColor,borderWidth:r.borderWidth,borderDash:r.borderDash,borderDashOffset:r.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const r=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:r.pointStyle,rotation:r.rotation}},afterLabel:rn,afterBody:rn,beforeFooter:rn,footer:rn,afterFooter:rn};function Ft(e,t,r,n){const i=e[t].call(r,n);return typeof i>"u"?PO[t].call(r,n):i}class CO extends Tn{static positioners=Do;constructor(t){super(),this.opacity=0,this._active=[],this._eventPosition=void 0,this._size=void 0,this._cachedAnimations=void 0,this._tooltipItems=[],this.$animations=void 0,this.$context=void 0,this.chart=t.chart,this.options=t.options,this.dataPoints=void 0,this.title=void 0,this.beforeBody=void 0,this.body=void 0,this.afterBody=void 0,this.footer=void 0,this.xAlign=void 0,this.yAlign=void 0,this.x=void 0,this.y=void 0,this.height=void 0,this.width=void 0,this.caretX=void 0,this.caretY=void 0,this.labelColors=void 0,this.labelPointStyles=void 0,this.labelTextColors=void 0}initialize(t){this.options=t,this._cachedAnimations=void 0,this.$context=void 0}_resolveAnimations(){const t=this._cachedAnimations;if(t)return t;const r=this.chart,n=this.options.setContext(this.getContext()),i=n.enabled&&r.options.animation&&n.animations,a=new TS(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=U9(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,r){const{callbacks:n}=r,i=Ft(n,"beforeTitle",this,t),a=Ft(n,"title",this,t),o=Ft(n,"afterTitle",this,t);let s=[];return s=Dr(s,on(i)),s=Dr(s,on(a)),s=Dr(s,on(o)),s}getBeforeBody(t,r){return AO(Ft(r.callbacks,"beforeBody",this,t))}getBody(t,r){const{callbacks:n}=r,i=[];return Ce(t,a=>{const o={before:[],lines:[],after:[]},s=EO(n,a);Dr(o.before,on(Ft(s,"beforeLabel",this,a))),Dr(o.lines,Ft(s,"label",this,a)),Dr(o.after,on(Ft(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,r){return AO(Ft(r.callbacks,"afterBody",this,t))}getFooter(t,r){const{callbacks:n}=r,i=Ft(n,"beforeFooter",this,t),a=Ft(n,"footer",this,t),o=Ft(n,"afterFooter",this,t);let s=[];return s=Dr(s,on(i)),s=Dr(s,on(a)),s=Dr(s,on(o)),s}_createItems(t){const r=this._active,n=this.chart.data,i=[],a=[],o=[];let s=[],l,c;for(l=0,c=r.length;l<c;++l)s.push(F9(this.chart,r[l]));return t.filter&&(s=s.filter((u,f,d)=>t.filter(u,f,d,n))),t.itemSort&&(s=s.sort((u,f)=>t.itemSort(u,f,n))),Ce(s,u=>{const f=EO(t.callbacks,u);i.push(Ft(f,"labelColor",this,u)),a.push(Ft(f,"labelPointStyle",this,u)),o.push(Ft(f,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=a,this.labelTextColors=o,this.dataPoints=s,s}update(t,r){const n=this.options.setContext(this.getContext()),i=this._active;let a,o=[];if(!i.length)this.opacity!==0&&(a={opacity:0});else{const s=Do[n.position].call(this,i,this._eventPosition);o=this._createItems(n),this.title=this.getTitle(o,n),this.beforeBody=this.getBeforeBody(o,n),this.body=this.getBody(o,n),this.afterBody=this.getAfterBody(o,n),this.footer=this.getFooter(o,n);const l=this._size=_O(this,n),c=Object.assign({},s,l),u=SO(this.chart,n,c),f=OO(n,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,a={opacity:1,x:f.x,y:f.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=o,this.$context=void 0,a&&this._resolveAnimations().update(this,a),t&&n.external&&n.external.call(this,{chart:this.chart,tooltip:this,replay:r})}drawCaret(t,r,n,i){const a=this.getCaretPosition(t,n,i);r.lineTo(a.x1,a.y1),r.lineTo(a.x2,a.y2),r.lineTo(a.x3,a.y3)}getCaretPosition(t,r,n){const{xAlign:i,yAlign:a}=this,{caretSize:o,cornerRadius:s}=n,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:f}=Ji(s),{x:d,y:h}=t,{width:m,height:p}=r;let g,v,b,x,S,w;return a==="center"?(S=h+p/2,i==="left"?(g=d,v=g-o,x=S+o,w=S-o):(g=d+m,v=g+o,x=S-o,w=S+o),b=g):(i==="left"?v=d+Math.max(l,u)+o:i==="right"?v=d+m-Math.max(c,f)-o:v=this.caretX,a==="top"?(x=h,S=x-o,g=v-o,b=v+o):(x=h+p,S=x+o,g=v+o,b=v-o),w=x),{x1:g,x2:v,x3:b,y1:x,y2:S,y3:w}}drawTitle(t,r,n){const i=this.title,a=i.length;let o,s,l;if(a){const c=ta(n.rtl,this.x,this.width);for(t.x=Cc(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",o=Rt(n.titleFont),s=n.titleSpacing,r.fillStyle=n.titleColor,r.font=o.string,l=0;l<a;++l)r.fillText(i[l],c.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+s,l+1===a&&(t.y+=n.titleMarginBottom-s)}}_drawColorBox(t,r,n,i,a){const o=this.labelColors[n],s=this.labelPointStyles[n],{boxHeight:l,boxWidth:c}=a,u=Rt(a.bodyFont),f=Cc(this,"left",a),d=i.x(f),h=l<u.lineHeight?(u.lineHeight-l)/2:0,m=r.y+h;if(a.usePointStyle){const p={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(d,c)+c/2,v=m+l/2;t.strokeStyle=a.multiKeyBackground,t.fillStyle=a.multiKeyBackground,Lp(t,p,g,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,Lp(t,p,g,v)}else{t.lineWidth=he(o.borderWidth)?Math.max(...Object.values(o.borderWidth)):o.borderWidth||1,t.strokeStyle=o.borderColor,t.setLineDash(o.borderDash||[]),t.lineDashOffset=o.borderDashOffset||0;const p=i.leftForLtr(d,c),g=i.leftForLtr(i.xPlus(d,1),c-2),v=Ji(o.borderRadius);Object.values(v).some(b=>b!==0)?(t.beginPath(),t.fillStyle=a.multiKeyBackground,fc(t,{x:p,y:m,w:c,h:l,radius:v}),t.fill(),t.stroke(),t.fillStyle=o.backgroundColor,t.beginPath(),fc(t,{x:g,y:m+1,w:c-2,h:l-2,radius:v}),t.fill()):(t.fillStyle=a.multiKeyBackground,t.fillRect(p,m,c,l),t.strokeRect(p,m,c,l),t.fillStyle=o.backgroundColor,t.fillRect(g,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[n]}drawBody(t,r,n){const{body:i}=this,{bodySpacing:a,bodyAlign:o,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=n,f=Rt(n.bodyFont);let d=f.lineHeight,h=0;const m=ta(n.rtl,this.x,this.width),p=function(C){r.fillText(C,m.x(t.x+h),t.y+d/2),t.y+=d+a},g=m.textAlign(o);let v,b,x,S,w,O,E;for(r.textAlign=o,r.textBaseline="middle",r.font=f.string,t.x=Cc(this,g,n),r.fillStyle=n.bodyColor,Ce(this.beforeBody,p),h=s&&g!=="right"?o==="center"?c/2+u:c+2+u:0,S=0,O=i.length;S<O;++S){for(v=i[S],b=this.labelTextColors[S],r.fillStyle=b,Ce(v.before,p),x=v.lines,s&&x.length&&(this._drawColorBox(r,t,S,m,n),d=Math.max(f.lineHeight,l)),w=0,E=x.length;w<E;++w)p(x[w]),d=f.lineHeight;Ce(v.after,p)}h=0,d=f.lineHeight,Ce(this.afterBody,p),t.y-=a}drawFooter(t,r,n){const i=this.footer,a=i.length;let o,s;if(a){const l=ta(n.rtl,this.x,this.width);for(t.x=Cc(this,n.footerAlign,n),t.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",o=Rt(n.footerFont),r.fillStyle=n.footerColor,r.font=o.string,s=0;s<a;++s)r.fillText(i[s],l.x(t.x),t.y+o.lineHeight/2),t.y+=o.lineHeight+n.footerSpacing}}drawBackground(t,r,n,i){const{xAlign:a,yAlign:o}=this,{x:s,y:l}=t,{width:c,height:u}=n,{topLeft:f,topRight:d,bottomLeft:h,bottomRight:m}=Ji(i.cornerRadius);r.fillStyle=i.backgroundColor,r.strokeStyle=i.borderColor,r.lineWidth=i.borderWidth,r.beginPath(),r.moveTo(s+f,l),o==="top"&&this.drawCaret(t,r,n,i),r.lineTo(s+c-d,l),r.quadraticCurveTo(s+c,l,s+c,l+d),o==="center"&&a==="right"&&this.drawCaret(t,r,n,i),r.lineTo(s+c,l+u-m),r.quadraticCurveTo(s+c,l+u,s+c-m,l+u),o==="bottom"&&this.drawCaret(t,r,n,i),r.lineTo(s+h,l+u),r.quadraticCurveTo(s,l+u,s,l+u-h),o==="center"&&a==="left"&&this.drawCaret(t,r,n,i),r.lineTo(s,l+f),r.quadraticCurveTo(s,l,s+f,l),r.closePath(),r.fill(),i.borderWidth>0&&r.stroke()}_updateAnimationTarget(t){const r=this.chart,n=this.$animations,i=n&&n.x,a=n&&n.y;if(i||a){const o=Do[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=_O(this,t),l=Object.assign({},o,this._size),c=SO(r,t,l),u=OO(t,l,c,r);(i._to!==u.x||a._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=o.x,this.caretY=o.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const r=this.options.setContext(this.getContext());let n=this.opacity;if(!n)return;this._updateAnimationTarget(r);const i={width:this.width,height:this.height},a={x:this.x,y:this.y};n=Math.abs(n)<.001?0:n;const o=vr(r.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;r.enabled&&s&&(t.save(),t.globalAlpha=n,this.drawBackground(a,t,i,r),SS(t,r.textDirection),a.y+=o.top,this.drawTitle(a,t,r),this.drawBody(a,t,r),this.drawFooter(a,t,r),OS(t,r.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,r){const n=this._active,i=t.map(({datasetIndex:s,index:l})=>{const c=this.chart.getDatasetMeta(s);if(!c)throw new Error("Cannot find a dataset at index "+s);return{datasetIndex:s,element:c.data[l],index:l}}),a=!oc(n,i),o=this._positionChanged(i,r);(a||o)&&(this._active=i,this._eventPosition=r,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,r,n=!0){if(r&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,a=this._active||[],o=this._getActiveElements(t,a,r,n),s=this._positionChanged(o,t),l=r||!oc(o,a)||s;return l&&(this._active=o,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,r))),l}_getActiveElements(t,r,n,i){const a=this.options;if(t.type==="mouseout")return[];if(!i)return r.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const o=this.chart.getElementsAtEventForMode(t,a.mode,a,n);return a.reverse&&o.reverse(),o}_positionChanged(t,r){const{caretX:n,caretY:i,options:a}=this,o=Do[a.position].call(this,t,r);return o!==!1&&(n!==o.x||i!==o.y)}}var br={id:"tooltip",_element:CO,positioners:Do,afterInit(e,t,r){r&&(e.tooltip=new CO({chart:e,options:r}))},beforeUpdate(e,t,r){e.tooltip&&e.tooltip.initialize(r)},reset(e,t,r){e.tooltip&&e.tooltip.initialize(r)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const r={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...r,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",r)}},afterEvent(e,t){if(e.tooltip){const r=t.replay;e.tooltip.handleEvent(t.event,r,t.inChartArea)&&(t.changed=!0)}},defaults:{enabled:!0,external:null,position:"average",backgroundColor:"rgba(0,0,0,0.8)",titleColor:"#fff",titleFont:{weight:"bold"},titleSpacing:2,titleMarginBottom:6,titleAlign:"left",bodyColor:"#fff",bodySpacing:2,bodyFont:{},bodyAlign:"left",footerColor:"#fff",footerSpacing:2,footerMarginTop:6,footerFont:{weight:"bold"},footerAlign:"left",padding:6,caretPadding:2,caretSize:5,cornerRadius:6,boxHeight:(e,t)=>t.bodyFont.size,boxWidth:(e,t)=>t.bodyFont.size,multiKeyBackground:"#fff",displayColors:!0,boxPadding:0,borderColor:"rgba(0,0,0,0)",borderWidth:0,animation:{duration:400,easing:"easeOutQuart"},animations:{numbers:{type:"number",properties:["x","y","width","height","caretX","caretY"]},opacity:{easing:"linear",duration:200}},callbacks:PO},defaultRoutes:{bodyFont:"font",footerFont:"font",titleFont:"font"},descriptors:{_scriptable:e=>e!=="filter"&&e!=="itemSort"&&e!=="external",_indexable:!1,callbacks:{_scriptable:!1,_indexable:!1},animation:{_fallback:!1},animations:{_fallback:"animation"}},additionalOptionScopes:["interaction"]};const K9=(e,t,r,n)=>(typeof t=="string"?(r=e.push(t)-1,n.unshift({index:r,label:t})):isNaN(t)&&(r=null),r);function q9(e,t,r,n){const i=e.indexOf(t);if(i===-1)return K9(e,t,r,n);const a=e.lastIndexOf(t);return i!==a?r:i}const Y9=(e,t)=>e===null?null:Ct(Math.round(e),0,t);function kO(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class jn extends ra{static id="category";static defaults={ticks:{callback:kO}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const r=this._addedLabels;if(r.length){const n=this.getLabels();for(const{index:i,label:a}of r)n[i]===a&&n.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,r){if(Se(t))return null;const n=this.getLabels();return r=isFinite(r)&&n[r]===t?r:q9(n,t,se(r,t),this._addedLabels),Y9(r,n.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:r}=this.getUserBounds();let{min:n,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(n=0),r||(i=this.getLabels().length-1)),this.min=n,this.max=i}buildTicks(){const t=this.min,r=this.max,n=this.options.offset,i=[];let a=this.getLabels();a=t===0&&r===a.length-1?a:a.slice(t,r+1),this._valueRange=Math.max(a.length-(n?0:1),1),this._startValue=this.min-(n?.5:0);for(let o=t;o<=r;o++)i.push({value:o});return i}getLabelForValue(t){return kO.call(this,t)}configure(){super.configure(),this.isHorizontal()||(this._reversePixels=!this._reversePixels)}getPixelForValue(t){return typeof t!="number"&&(t=this.parse(t)),t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getPixelForTick(t){const r=this.ticks;return t<0||t>r.length-1?null:this.getPixelForValue(r[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function G9(e,t){const r=[],{bounds:i,step:a,min:o,max:s,precision:l,count:c,maxTicks:u,maxDigits:f,includeBounds:d}=e,h=a||1,m=u-1,{min:p,max:g}=t,v=!Se(o),b=!Se(s),x=!Se(c),S=(g-p)/(f+1);let w=X2((g-p)/m/h)*h,O,E,C,M;if(w<1e-14&&!v&&!b)return[{value:p},{value:g}];M=Math.ceil(g/w)-Math.floor(p/w),M>m&&(w=X2(M*w/m/h)*h),Se(l)||(O=Math.pow(10,l),w=Math.ceil(w*O)/O),i==="ticks"?(E=Math.floor(p/w)*w,C=Math.ceil(g/w)*w):(E=p,C=g),v&&b&&a&&g7((s-o)/a,w/1e3)?(M=Math.round(Math.min((s-o)/w,u)),w=(s-o)/M,E=o,C=s):x?(E=v?o:E,C=b?s:C,M=c-1,w=(C-E)/M):(M=(C-E)/w,bo(M,Math.round(M),w/1e3)?M=Math.round(M):M=Math.ceil(M));const $=Math.max(Z2(w),Z2(E));O=Math.pow(10,Se(l)?$:l),E=Math.round(E*O)/O,C=Math.round(C*O)/O;let j=0;for(v&&(d&&E!==o?(r.push({value:o}),E<o&&j++,bo(Math.round((E+j*w)*O)/O,o,TO(o,S,e))&&j++):E<o&&j++);j<M;++j){const _=Math.round((E+j*w)*O)/O;if(b&&_>s)break;r.push({value:_})}return b&&d&&C!==s?r.length&&bo(r[r.length-1].value,s,TO(s,S,e))?r[r.length-1].value=s:r.push({value:s}):(!b||C===s)&&r.push({value:C}),r}function TO(e,t,{horizontal:r,minRotation:n}){const i=nn(n),a=(r?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class X9 extends ra{constructor(t){super(t),this.start=void 0,this.end=void 0,this._startValue=void 0,this._endValue=void 0,this._valueRange=0}parse(t,r){return Se(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:r,maxDefined:n}=this.getUserBounds();let{min:i,max:a}=this;const o=l=>i=r?i:l,s=l=>a=n?a:l;if(t){const l=Mr(i),c=Mr(a);l<0&&c<0?s(0):l>0&&c>0&&o(0)}if(i===a){let l=a===0?1:Math.abs(a*.05);s(a+l),t||o(i-l)}this.min=i,this.max=a}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:r,stepSize:n}=t,i;return n?(i=Math.ceil(this.max/n)-Math.floor(this.min/n)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${n} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),r=r||11),r&&(i=Math.min(r,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,r=t.ticks;let n=this.getTickLimit();n=Math.max(2,n);const i={maxTicks:n,bounds:t.bounds,min:t.min,max:t.max,precision:r.precision,step:r.stepSize,count:r.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:r.minRotation||0,includeBounds:r.includeBounds!==!1},a=this._range||this,o=G9(i,a);return t.bounds==="ticks"&&v7(o,this,"value"),t.reverse?(o.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),o}configure(){const t=this.ticks;let r=this.min,n=this.max;if(super.configure(),this.options.offset&&t.length){const i=(n-r)/Math.max(t.length-1,1)/2;r-=i,n+=i}this._startValue=r,this._endValue=n,this._valueRange=n-r}getLabelForValue(t){return Ip(t,this.chart.options.locale,this.options.ticks.format)}}class Dn extends X9{static id="linear";static defaults={ticks:{callback:cS.formatters.numeric}};determineDataLimits(){const{min:t,max:r}=this.getMinMax(!0);this.min=dr(t)?t:0,this.max=dr(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),r=t?this.width:this.height,n=nn(this.options.ticks.minRotation),i=(t?Math.sin(n):Math.cos(n))||.001,a=this._resolveTickFontOptions(0);return Math.ceil(r/Math.min(40,a.lineHeight/i))}getPixelForValue(t){return t===null?NaN:this.getPixelForDecimal((t-this._startValue)/this._valueRange)}getValueForPixel(t){return this._startValue+this.getDecimalForPixel(t)*this._valueRange}}const kc={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Bt=Object.keys(kc);function MO(e,t){return e-t}function jO(e,t){if(Se(t))return null;const r=e._adapter,{parser:n,round:i,isoWeekday:a}=e._parseOpts;let o=t;return typeof n=="function"&&(o=n(o)),dr(o)||(o=typeof n=="string"?r.parse(o,n):r.parse(o)),o===null?null:(i&&(o=i==="week"&&(xo(a)||a===!0)?r.startOf(o,"isoWeek",a):r.startOf(o,i)),+o)}function DO(e,t,r,n){const i=Bt.length;for(let a=Bt.indexOf(e);a<i-1;++a){const o=kc[Bt[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((r-t)/(s*o.size))<=n)return Bt[a]}return Bt[i-1]}function Z9(e,t,r,n,i){for(let a=Bt.length-1;a>=Bt.indexOf(r);a--){const o=Bt[a];if(kc[o].common&&e._adapter.diff(i,n,o)>=t-1)return o}return Bt[r?Bt.indexOf(r):0]}function J9(e){for(let t=Bt.indexOf(e)+1,r=Bt.length;t<r;++t)if(kc[Bt[t]].common)return Bt[t]}function NO(e,t,r){if(!r)e[t]=!0;else if(r.length){const{lo:n,hi:i}=jp(r,t),a=r[n]>=t?r[n]:r[i];e[a]=!0}}function Q9(e,t,r,n){const i=e._adapter,a=+i.startOf(t[0].value,n),o=t[t.length-1].value;let s,l;for(s=a;s<=o;s=+i.add(s,1,n))l=r[s],l>=0&&(t[l].major=!0);return t}function IO(e,t,r){const n=[],i={},a=t.length;let o,s;for(o=0;o<a;++o)s=t[o],i[s]=o,n.push({value:s,major:!1});return a===0||!r?n:Q9(e,n,i,r)}class $O extends ra{static id="time";static defaults={bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{source:"auto",callback:!1,major:{enabled:!1}}};constructor(t){super(t),this._cache={data:[],labels:[],all:[]},this._unit="day",this._majorUnit=void 0,this._offsets={},this._normalized=!1,this._parseOpts=void 0}init(t,r={}){const n=t.time||(t.time={}),i=this._adapter=new aV._date(t.adapters.date);i.init(r),vo(n.displayFormats,i.formats()),this._parseOpts={parser:n.parser,round:n.round,isoWeekday:n.isoWeekday},super.init(t),this._normalized=r.normalized}parse(t,r){return t===void 0?null:jO(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,r=this._adapter,n=t.time.unit||"day";let{min:i,max:a,minDefined:o,maxDefined:s}=this.getUserBounds();function l(c){!o&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(a=Math.max(a,c.max))}(!o||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=dr(i)&&!isNaN(i)?i:+r.startOf(Date.now(),n),a=dr(a)&&!isNaN(a)?a:+r.endOf(Date.now(),n)+1,this.min=Math.min(i,a-1),this.max=Math.max(i+1,a)}_getLabelBounds(){const t=this.getLabelTimestamps();let r=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY;return t.length&&(r=t[0],n=t[t.length-1]),{min:r,max:n}}buildTicks(){const t=this.options,r=t.time,n=t.ticks,i=n.source==="labels"?this.getLabelTimestamps():this._generate();t.bounds==="ticks"&&i.length&&(this.min=this._userMin||i[0],this.max=this._userMax||i[i.length-1]);const a=this.min,o=this.max,s=_7(i,a,o);return this._unit=r.unit||(n.autoSkip?DO(r.minUnit,this.min,this.max,this._getLabelCapacity(a)):Z9(this,s.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:J9(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),IO(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let r=0,n=0,i,a;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?r=1-i:r=(this.getDecimalForValue(t[1])-i)/2,a=this.getDecimalForValue(t[t.length-1]),t.length===1?n=a:n=(a-this.getDecimalForValue(t[t.length-2]))/2);const o=t.length<3?.5:.25;r=Ct(r,0,o),n=Ct(n,0,o),this._offsets={start:r,end:n,factor:1/(r+1+n)}}_generate(){const t=this._adapter,r=this.min,n=this.max,i=this.options,a=i.time,o=a.unit||DO(a.minUnit,r,n,this._getLabelCapacity(r)),s=se(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,c=xo(l)||l===!0,u={};let f=r,d,h;if(c&&(f=+t.startOf(f,"isoWeek",l)),f=+t.startOf(f,c?"day":o),t.diff(n,r,o)>1e5*s)throw new Error(r+" and "+n+" are too far apart with stepSize of "+s+" "+o);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(d=f,h=0;d<n;d=+t.add(d,s,o),h++)NO(u,d,m);return(d===n||i.bounds==="ticks"||h===1)&&NO(u,d,m),Object.keys(u).sort(MO).map(p=>+p)}getLabelForValue(t){const r=this._adapter,n=this.options.time;return n.tooltipFormat?r.format(t,n.tooltipFormat):r.format(t,n.displayFormats.datetime)}format(t,r){const i=this.options.time.displayFormats,a=this._unit,o=r||i[a];return this._adapter.format(t,o)}_tickFormatFunction(t,r,n,i){const a=this.options,o=a.ticks.callback;if(o)return Fe(o,[t,r,n],this);const s=a.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],f=c&&s[c],d=n[r],h=c&&f&&d&&d.major;return this._adapter.format(t,i||(h?f:u))}generateTickLabels(t){let r,n,i;for(r=0,n=t.length;r<n;++r)i=t[r],i.label=this._tickFormatFunction(i.value,r,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const r=this._offsets,n=this.getDecimalForValue(t);return this.getPixelForDecimal((r.start+n)*r.factor)}getValueForPixel(t){const r=this._offsets,n=this.getDecimalForPixel(t)/r.factor-r.end;return this.min+n*(this.max-this.min)}_getLabelSize(t){const r=this.options.ticks,n=this.ctx.measureText(t).width,i=nn(this.isHorizontal()?r.maxRotation:r.minRotation),a=Math.cos(i),o=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:n*a+s*o,h:n*o+s*a}}_getLabelCapacity(t){const r=this.options.time,n=r.displayFormats,i=n[r.unit]||n.millisecond,a=this._tickFormatFunction(t,0,IO(this,[t],this._majorUnit),i),o=this._getLabelSize(a),s=Math.floor(this.isHorizontal()?this.width/o.w:this.height/o.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],r,n;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(r=0,n=i.length;r<n;++r)t=t.concat(i[r].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let r,n;if(t.length)return t;const i=this.getLabels();for(r=0,n=i.length;r<n;++r)t.push(jO(this,i[r]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return tS(t.sort(MO))}}function Tc(e,t,r){let n=0,i=e.length-1,a,o,s,l;r?(t>=e[n].pos&&t<=e[i].pos&&({lo:n,hi:i}=ui(e,"pos",t)),{pos:a,time:s}=e[n],{pos:o,time:l}=e[i]):(t>=e[n].time&&t<=e[i].time&&({lo:n,hi:i}=ui(e,"time",t)),{time:a,pos:s}=e[n],{time:o,pos:l}=e[i]);const c=o-a;return c?s+(l-s)*(t-a)/c:s}class FU extends $O{static id="timeseries";static defaults=$O.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),r=this._table=this.buildLookupTable(t);this._minPos=Tc(r,this.min),this._tableRange=Tc(r,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:r,max:n}=this,i=[],a=[];let o,s,l,c,u;for(o=0,s=t.length;o<s;++o)c=t[o],c>=r&&c<=n&&i.push(c);if(i.length<2)return[{time:r,pos:0},{time:n,pos:1}];for(o=0,s=i.length;o<s;++o)u=i[o+1],l=i[o-1],c=i[o],Math.round((u+l)/2)!==c&&a.push({time:c,pos:o/(s-1)});return a}_generate(){const t=this.min,r=this.max;let n=super.getDataTimestamps();return(!n.includes(t)||!n.length)&&n.splice(0,0,t),(!n.includes(r)||n.length===1)&&n.push(r),n.sort((i,a)=>i-a)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const r=this.getDataTimestamps(),n=this.getLabelTimestamps();return r.length&&n.length?t=this.normalize(r.concat(n)):t=r.length?r:n,t=this._cache.all=t,t}getDecimalForValue(t){return(Tc(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const r=this._offsets,n=this.getDecimalForPixel(t)/r.factor-r.end;return Tc(this._table,n*this._tableRange+this._minPos,!0)}}const RO="label";function LO(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function eH(e,t){const r=e.options;r&&t&&Object.assign(r,t)}function FO(e,t){e.labels=t}function BO(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:RO;const n=[];e.datasets=t.map(i=>{const a=e.datasets.find(o=>o[r]===i[r]);return!a||!i.data||n.includes(a)?{...i}:(n.push(a),Object.assign(a,i),a)})}function tH(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:RO;const r={labels:[],datasets:[]};return FO(r,e.labels),BO(r,e.datasets,t),r}function rH(e,t){const{height:r=150,width:n=300,redraw:i=!1,datasetIdKey:a,type:o,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:f,...d}=e,h=k.useRef(null),m=k.useRef(null),p=()=>{h.current&&(m.current=new Lt(h.current,{type:o,data:tH(s,a),options:l&&{...l},plugins:c}),LO(t,m.current))},g=()=>{LO(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&eH(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&FO(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&BO(m.current.config.data,s.datasets,a)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(p)):m.current.update(f))},[i,l,s.labels,s.datasets,f]),k.useEffect(()=>{m.current&&(g(),setTimeout(p))},[o]),k.useEffect(()=>(p(),()=>g()),[]),k.createElement("canvas",{ref:h,role:"img",height:r,width:n,...d},u)}const nH=k.forwardRef(rH);function cm(e,t){return Lt.register(t),k.forwardRef((r,n)=>k.createElement(nH,{...r,ref:n,type:e}))}const um=cm("line",iV),No=cm("bar",tV),fm=cm("doughnut",nV);Lt.register(nm,br,yr);const iH={id:"centerText",afterDraw(e,t,r){const{ctx:n}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:a,y:o}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:f="#0F172A",bottomColor:d="#64748B"}=r||{};n.save(),n.textAlign="center",n.textBaseline="middle",n.fillStyle=f,n.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(s,a,o-5),n.fillStyle=d,n.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(l,a,o+12),n.restore()}},aH=({sold:e=847,unsold:t=73,growthPct:r="+9.1%"})=>{const n=e+t,i={labels:["Sold","Unsold"],datasets:[{data:[e,t],backgroundColor:["#12B981","#EF4444"],borderWidth:2,hoverOffset:4}]},a={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:o=>`${o.label}: ${o.parsed}`},displayColors:!1},centerText:{top:`${n}`,bottom:"Total Units",topSize:20,bottomSize:10}}};return y.jsx(me,{title:"Unit Status",period:"This Month",icon:y.jsx(su,{className:"h-6 w-6 text-green-600"}),className:"h-[238px]",children:y.jsxs("div",{className:"grid grid-cols-12 gap-4 items-center",children:[y.jsxs("div",{className:"col-span-5 space-y-3",children:[y.jsxs("div",{children:[y.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Sold"}),y.jsx("div",{className:"text-[28px] leading-[32px] text-[#1FA05B]",children:e})]}),y.jsxs("div",{children:[y.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Unsold"}),y.jsx("div",{className:"text-[28px] leading-[32px] text-[#EF4444]",children:t})]}),y.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center ",children:[r," ",y.jsx("div",{className:"text-[#64748B] text-[10px]",children:"Compared to last month"})]})]}),y.jsx("div",{className:"col-span-7",children:y.jsx("div",{className:"h-[158px] w-[158px] ml-auto mr-2",children:y.jsx(fm,{data:i,options:a,plugins:[iH]})})})]})})},zO=({value:e=0,total:t=1,colorClass:r="",label:n=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),a=r==="bg-[#8B5CF6]"?"text-[#8B5CF6]":r==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return y.jsxs("div",{className:"flex flex-col items-start",children:[y.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:y.jsx("div",{className:`h-3 rounded-full ${r}`,style:{width:`${i}%`}})}),y.jsx("div",{className:`${a} !text-[12px] font-bold mt-1`,children:e}),y.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:n})]})},WO=({title:e,value:t,suffix:r,valueClass:n=""})=>y.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] h-[98px] p-4 flex flex-col justify-center",children:[y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),y.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-1 font-medium ${n}`,children:[t," ",r&&y.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:r})]})]}),oH=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:r=700,tenantCount:n=56,avgResidents:i=4.4,avgLeaseMonths:a=18})=>{const o=r+n;return y.jsxs("div",{children:[y.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[y.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[y.jsx(Kg,{className:"h-6 w-6 text-[#329DFF]"}),y.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),y.jsxs("div",{className:"flex items-center justify-between gap-",children:[y.jsxs("div",{children:[y.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),y.jsxs("div",{className:"flex items-center gap-1",children:[y.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),y.jsxs("div",{className:"flex items-end",children:[y.jsx(zO,{value:r,total:o,colorClass:"bg-[#8B5CF6]",label:"Owner"}),y.jsx(zO,{value:n,total:o,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),y.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-3",children:[y.jsx(WO,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),y.jsx(WO,{title:"Avg Lease Period",value:a,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Lt.register(nm,br,yr);const sH={id:"centerText",afterDraw(e,t,r){const{ctx:n}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:a,y:o}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:f="#0F172A",bottomColor:d="#64748B"}=r||{};n.save(),n.textAlign="center",n.textBaseline="middle",n.fillStyle=f,n.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(s,a,o-5),n.fillStyle=d,n.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,n.fillText(l,a,o+12),n.restore()}},lH=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:r=26,growthPct:n="+9.1%"})=>{const i=Math.max(e-r,0),a=e+t,o={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,r],backgroundColor:["#3C81F6","#08B6D4","#8B5CF6"],borderWidth:2,hoverOffset:4}]},s={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:l=>`${l.label}: ${l.parsed}`},displayColors:!1},centerText:{top:`${a}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return y.jsx(me,{title:"Resident Overview",icon:y.jsx(Ug,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:y.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-4 items-center",children:[y.jsxs("div",{className:"col-span-5",children:[y.jsxs("div",{children:[y.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),y.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),y.jsxs("div",{children:[y.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),y.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),y.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[n," ",y.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),y.jsx("div",{className:"col-span-7",children:y.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:y.jsx(fm,{data:o,options:s,plugins:[sH]})})})]})})};Lt.register(jn,Dn,jo,br,yr);const cH=({blocks:e=[{name:"Block A",owner:110,rented:24,vacant:8},{name:"Block B",owner:95,rented:18,vacant:6},{name:"Block C",owner:65,rented:12,vacant:18},{name:"Block D",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),r=e.map(s=>s.owner),n=e.map(s=>s.rented),i=e.map(s=>s.vacant),a={labels:t,datasets:[{label:"Owner",data:r,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:n,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},o={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return y.jsx(me,{title:"Block-wise Occupancy",period:y.jsx(ht,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:y.jsx(No,{data:a,options:o})})};Lt.register(jn,Dn,om,am,br,yr);const uH=e=>{const[t,r]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${r}`},fH=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:r=[12,17,8,5,16]})=>{const n={labels:e,datasets:[{label:"Move-in",data:t,borderColor:"#12B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#12B981",pointStyle:"rectRot",fill:!1},{label:"Move-out",data:r,borderColor:"#8B5CF6",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#8B5CF6",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:a=>uH(a[0].label),label:a=>`${a.dataset.label}: ${a.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return y.jsx(me,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:y.jsx(ht,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:y.jsx(um,{data:n,options:i})})};Lt.register(jn,Dn,om,am,br,yr);const dH=e=>{const[t,r]=String(e).split(" ");return`${{Jan:"January",Feb:"February",Mar:"March",Apr:"April",May:"May",Jun:"June",Jul:"July",Aug:"August",Sep:"September",Oct:"October",Nov:"November",Dec:"December"}[t]||t} 20${r}`},VO=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:r=[4,17,8,5,16,4,7]})=>{const n={labels:e,datasets:[{label:"Income",data:t,borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Expenditure",data:r,borderColor:"#AB0000",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#AB0000",pointStyle:"rectRot",fill:!1}]},i={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:a=>dH(a[0].label),label:a=>`${a.dataset.label}: ${a.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return y.jsx(um,{data:n,options:i})};function HO({label:e,value:t,positive:r,bgColor:n,delta:i,deltaLabel:a,textColor:o}){return y.jsxs("div",{className:`rounded-lg p-4 ${n} border border-[#EBEBEB] h-[126px]`,children:[y.jsx("div",{className:`text-[16px] leading-[20px] ${o}`,children:e}),y.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"mt-[8px] flex items-center gap-2 leading-[14px] text-[10px]",children:[y.jsx("div",{className:r?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),y.jsx("div",{className:"text-[#64748B] ",children:a})]})]})}function hH(){return y.jsxs(me,{title:"Accounting",className:"w-full h-[523px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(HO,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),y.jsx(HO,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),y.jsx("div",{className:"h-[254px] mt-[35.5px]",children:y.jsx(VO,{})})]})}Lt.register(jn,Dn,jo,br,yr);const pH=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],n={labels:e,datasets:[{label:"Budget",data:[55e3,56e3,64e3,38e3,54e3,65e3],backgroundColor:"#93C5FD",barThickness:60},{label:"Actual",data:[63e3,48e3,51300,28e3,42e3,35e3],backgroundColor:"#3B82F6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:a=>e[a[0].dataIndex],label:a=>{const o=a.parsed.y;return`${a.dataset.label}: AED ${(o/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:a=>`${a/1e3}K`}}}};return y.jsx(me,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:y.jsx(No,{data:n,options:i})})},mH=()=>{const e=[{title:"Primary Account",amount:285e4,subtitle:"Savings"},{title:"Emergency Fund",amount:12e5,subtitle:"Fixed deposit"},{title:"Maintenance Fund",amount:68e4,subtitle:"Current"}],t=e.reduce((n,i)=>n+i.amount,0),r=n=>n>=1e6?`AED ${(n/1e6).toFixed(2)}M`:n>=1e3?`AED ${(n/1e3).toFixed(1)}K`:`AED ${n}`;return y.jsxs(me,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[y.jsx("div",{className:"flex flex-col gap-3",children:e.map((n,i)=>y.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:n.title}),y.jsx("div",{className:"!text-[12px] text-[#64748B]",children:n?.subtitle})]}),y.jsx("div",{className:"flex flex-col items-end",children:y.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:r(n.amount)})})]},i))}),y.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[y.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),y.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:r(t)})]})]})};Lt.register(jn,Dn,jo,br,yr);const gH=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],r=[18,12,18,6],n={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#EF4444",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:a=>e[a[0].dataIndex],label:a=>`Due: AED ${(a.parsed.y/1e3).toFixed(1)}K`,afterLabel:a=>`Units Count: ${r[a.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:a=>`${a/1e3}K`}}}};return y.jsxs(me,{title:"Dues Ageing",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[y.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-3 h-[48px]",children:e.map((a,o)=>y.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:y.jsxs("div",{className:"flex justify-between items-start",children:[y.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:a}),y.jsxs("div",{className:"text-right",children:[y.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[o]/1e3).toFixed(1),"K"]}),y.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[r[o]," Units"]})]})]})},a))}),y.jsx("div",{className:"h-[192px]",children:y.jsx(No,{data:n,options:i})})]})};Lt.register(nm,br,yr);const vH=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],r={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},n=t.reduce((a,o)=>a+o,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:a=>`${a.label}: AED ${a.formattedValue}`}}}};return y.jsxs(me,{title:"Expense Categories",className:"w-full h-[523px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[y.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[y.jsx(fm,{data:r,options:i}),y.jsxs("div",{className:"absolute text-center",children:[y.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(n/1e6).toFixed(2),"M"]}),y.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),y.jsx("div",{className:"space-y-2",children:e.map((a,o)=>y.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[y.jsxs("div",{className:"flex items-center gap-2 !text-[12px] leading-[16px] text-[#64748B]",children:[y.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.datasets[0].backgroundColor[o]}}),a]}),y.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[o]/1e3).toFixed(0),"K"]})]},a))})]})},Io=[{name:"Gym Equipment",value:1e6,color:"#08B6D4"},{name:"Security",value:8e5,color:"#EF4444"},{name:"Others",value:6e5,color:"#F59E0B"},{name:"Pool Maintenance",value:7e5,color:"#8B5CF6"},{name:"Administration",value:52e4,color:"#10B981"}];function yH(){const e=Io.reduce((t,r)=>t+r.value,0);return y.jsx(me,{title:"Asset Value Breakdown",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:y.jsxs("div",{className:"flex flex-col items-center justify-center",children:[y.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:Io,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Io.map((t,r)=>y.jsx(kr,{fill:t.color},`cell-${r}`))}),y.jsx(ni,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),y.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[y.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),y.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),y.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[y.jsx("div",{className:"flex flex-col gap-2",children:Io.slice(0,3).map(t=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),y.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),y.jsx("div",{className:"flex flex-col gap-2 items-start",children:Io.slice(3).map(t=>y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),y.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}Lt.register(jn,Dn,jo,br,yr);const bH=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],r=[18,12,18,6],n={labels:e,datasets:[{label:"Due",data:t,backgroundColor:"#8B5CF6",barThickness:60}]},i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:6,callbacks:{title:a=>e[a[0].dataIndex],label:a=>`Due: AED ${(a.parsed.y/1e3).toFixed(1)}K`,afterLabel:a=>`Units Count: ${r[a.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:a=>`${a/1e3}K`}}}};return y.jsx(me,{title:"Revenue by Category",className:"w-full h-[362px]",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:y.jsx(No,{data:n,options:i})})};function xH(e){return Re({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M15 5l0 2"},child:[]},{tag:"path",attr:{d:"M15 11l0 2"},child:[]},{tag:"path",attr:{d:"M15 17l0 2"},child:[]},{tag:"path",attr:{d:"M5 5h14a2 2 0 0 1 2 2v3a2 2 0 0 0 0 4v3a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-3a2 2 0 0 0 0 -4v-3a2 2 0 0 1 2 -2"},child:[]}]})(e)}function wH(e){return Re({attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M855.7 210.8l-42.4-42.4a8.03 8.03 0 0 0-11.3 0L168.3 801.9a8.03 8.03 0 0 0 0 11.3l42.4 42.4c3.1 3.1 8.2 3.1 11.3 0L855.6 222c3.2-3 3.2-8.1.1-11.2zM304 448c79.4 0 144-64.6 144-144s-64.6-144-144-144-144 64.6-144 144 64.6 144 144 144zm0-216c39.7 0 72 32.3 72 72s-32.3 72-72 72-72-32.3-72-72 32.3-72 72-72zm416 344c-79.4 0-144 64.6-144 144s64.6 144 144 144 144-64.6 144-144-64.6-144-144-144zm0 216c-39.7 0-72-32.3-72-72s32.3-72 72-72 72 32.3 72 72-32.3 72-72 72z"},child:[]}]})(e)}function _H({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsxs(me,{title:e,icon:y.jsx("div",{className:"h-6 w-6 grid place-items-center",children:y.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[y.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 text-[14px]",children:[y.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-slate-500",children:n})]})]})}function SH(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Vg,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:wH,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:xH,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:qg,iconColor:"text-[#DBB467]"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(_H,{...t},r))})}const Mc=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function OH(){const t=Mc.find(r=>r.name==="Completed")?.value||0;return y.jsx(me,{title:"Guard Patrols",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:y.jsxs("div",{className:"flex flex-col items-center justify-center",children:[y.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:Mc,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Mc.map((r,n)=>y.jsx(kr,{fill:r.color},`cell-${n}`))}),y.jsx(ni,{formatter:r=>r.toLocaleString()})]})}),y.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[y.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),y.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),y.jsx("div",{className:"flex flex-col gap-2 mt-3 w-full px-6 text-[14px]",children:Mc.map(r=>y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.color}}),y.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.name})]}),y.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.value})]},r.name))})]})})}Lt.register(jn,Dn,om,am,br,yr);const AH=()=>{const t={labels:["10 AM","12 PM","2 PM","4 PM","6 PM","8 PM","10 PM"],datasets:[{label:"Guest",data:[9,5,12,7,3,6,4],borderColor:"#EF4444",backgroundColor:"rgba(239,68,68,0.15)",pointBackgroundColor:"#EF4444",pointStyle:"rectRot",fill:!1},{label:"Cab",data:[15,12,10,14,7,12,8],borderColor:"#7C3AED",backgroundColor:"rgba(124,58,237,0.15)",pointBackgroundColor:"#7C3AED",pointStyle:"rectRot",fill:!1},{label:"Delivery",data:[22,18,16,20,22,14,17],borderColor:"#10B981",backgroundColor:"rgba(16,185,129,0.15)",pointBackgroundColor:"#10B981",pointStyle:"rectRot",fill:!1},{label:"Service",data:[13,12,8,9,5,10,7],borderColor:"#F59E0B",backgroundColor:"rgba(245,158,11,0.15)",pointBackgroundColor:"#F59E0B",pointStyle:"rectRot",fill:!1}]},r={responsive:!0,maintainAspectRatio:!1,interaction:{mode:"index",intersect:!1},plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,padding:20}},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:12,caretSize:0,callbacks:{title:n=>n[0].label,label:n=>`${n.dataset.label} ${n.parsed.y}`}}},scales:{x:{grid:{color:"#F1F5F9"},ticks:{color:"#64748B"}},y:{beginAtZero:!0,suggestedMax:28,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:4,precision:0}}},elements:{line:{borderWidth:2,tension:0},point:{radius:0,hoverRadius:3,hitRadius:10}}};return y.jsx(me,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:y.jsx(ht,{className:"text-[20px] text-[#884EA7]"}),children:y.jsx(um,{data:t,options:r})})};function EH(){return y.jsx(me,{title:"Incident Reports",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex w-full text-center gap-6",children:[y.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[y.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),y.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[y.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),y.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[y.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),y.jsxs("div",{className:"mt-4 ",children:[y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:y.jsx("div",{className:"text-white !text-[12px] font-bold",children:"!"})}),y.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),y.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-1 text-[#AB0000] bg-red-50",children:[y.jsx("div",{children:"4 - Danger"}),y.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:y.jsx(Fg,{className:"text-white text-[10px]"})}),y.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),y.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-1 text-[#E7A015] bg-yellow-50",children:[y.jsx("div",{children:"3 - High"}),y.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),y.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[y.jsxs("div",{className:"flex items-center gap-2",children:[y.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:y.jsx(Fg,{className:"text-white text-[10px]"})}),y.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),y.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-1 text-[#1FA05B] bg-green-50",children:[y.jsx("div",{children:"1 - Low"}),y.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function PH(){return y.jsx(me,{title:"Staff Attendance",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex w-full text-center h-[76px] gap-4 mb-2",children:[y.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[y.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),y.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[y.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),y.jsxs("div",{className:"mt-[24px] ",children:[y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Security guards"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"12/12 Present"})]}),y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Housekeeping"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"7/8 Present"})]}),y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Maintenance"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"4/4 Present"})]}),y.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[y.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Gardening"}),y.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"2/2 Present"})]})]})]})})}function CH(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function kH(e){return Re({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}function TH(e){return Re({attr:{viewBox:"0 0 256 256",fill:"currentColor"},child:[{tag:"path",attr:{d:"M116,132V96a12,12,0,0,1,24,0v36a12,12,0,0,1-24,0Zm12,56a16,16,0,1,0-16-16A16,16,0,0,0,128,188ZM228,56v56c0,54.29-26.32,87.22-48.4,105.29-23.71,19.39-47.44,26-48.44,26.29a12.1,12.1,0,0,1-6.32,0c-1-.28-24.73-6.9-48.44-26.29C54.32,199.22,28,166.29,28,112V56A20,20,0,0,1,48,36H208A20,20,0,0,1,228,56Zm-24,4H52v52c0,35.71,13.09,64.69,38.91,86.15A126.14,126.14,0,0,0,128,219.38a126.28,126.28,0,0,0,37.09-21.23C190.91,176.69,204,147.71,204,112Z"},child:[]}]})(e)}function MH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsxs(me,{title:e,icon:y.jsx("div",{className:"h-6 w-6 grid place-items-center",children:y.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[y.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 text-[14px]",children:[y.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-slate-500",children:n})]})]})}function jH(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Kg,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:kH,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:TH,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:VC,iconColor:"text-[#36AB6C]"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(MH,{...t},r))})}const DH=[{title:"Maintenance",total:25,pending:8},{title:"Security",total:15,pending:3},{title:"Housekeeping",total:12,pending:4},{title:"Utilities",total:10,pending:2}];function NH(){return y.jsx(me,{title:"Complaints",period:y.jsx(ht,{className:"text-[20px] text-[#884EA7]"}),className:"h-[362px]",children:y.jsx("div",{className:"flex flex-col gap-3",children:DH.map((e,t)=>y.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212]",children:e.title}),y.jsxs("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),y.jsxs("div",{className:"flex flex-col items-end",children:[y.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}Lt.register(jn,Dn,jo,br,yr);const IH=({blocks:e=[{name:"Level 1",owner:110,rented:24,vacant:8},{name:"Level 2",owner:95,rented:18,vacant:6},{name:"Level 3",owner:65,rented:12,vacant:18},{name:"Level 4",owner:78,rented:16,vacant:30}]})=>{const t=e.map(s=>s.name),r=e.map(s=>s.owner),n=e.map(s=>s.rented),i=e.map(s=>s.vacant),a={labels:t,datasets:[{label:"Closed",data:r,backgroundColor:"#12B981",barThickness:44},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:44},{label:"In Progress",data:n,backgroundColor:"#F59D0D",barThickness:44},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:44},{label:"Open",data:i,backgroundColor:"#EF4444",barThickness:44}]},o={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,boxWidth:10,boxHeight:10,pointStyle:"rectRot",padding:20}},tooltip:{callbacks:{label:s=>`${s.dataset.label}: ${s.parsed.y}`}}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,suggestedMax:180,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",stepSize:20}}}};return y.jsx(me,{title:"Complaints by Level",className:"w-full h-[362px]",period:y.jsx(ht,{className:"text-[20px] text-[#884EA7]"}),children:y.jsx(No,{data:a,options:o})})},$H=[{title:"Access Card",total:45,pending:11},{title:"NOC Request",total:12,pending:7},{title:"Parking Allocation",total:8,pending:6},{title:"Document Request",total:25,pending:2}];function RH(){return y.jsx(me,{title:"Request Box",period:y.jsx(ht,{className:"text-[20px] text-[#884EA7]"}),className:"h-[362px]",children:y.jsx("div",{className:"flex flex-col gap-3",children:$H.map((e,t)=>y.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[y.jsxs("div",{className:"flex flex-col",children:[y.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212]",children:e.title}),y.jsxs("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),y.jsxs("div",{className:"flex flex-col items-end",children:[y.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}function LH(e){return Re({attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinejoin:"round",strokeWidth:"32",d:"M416 221.25V416a48 48 0 0 1-48 48H144a48 48 0 0 1-48-48V96a48 48 0 0 1 48-48h98.75a32 32 0 0 1 22.62 9.37l141.26 141.26a32 32 0 0 1 9.37 22.62z"},child:[]},{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M256 56v120a32 32 0 0 0 32 32h120m-232 80h160m-160 80h160"},child:[]}]})(e)}function FH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsxs(me,{title:e,icon:y.jsx("div",{className:"h-6 w-6 grid place-items-center",children:y.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[y.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 text-[14px]",children:[y.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-slate-500",children:n})]})]})}function BH(){const e=[{title:"Open Complaints",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Vg,iconColor:"text-[#AB0000]"},{title:"Pending Requests",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:LH,iconColor:"text-[#E7A015]"},{title:"Avg Response Time",value:"3h",delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:BC,iconColor:"text-[#1FA05B]"},{title:"Resolution Rate",value:"93%",delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:LC,iconColor:"text-[#329DFF]"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(FH,{...t},r))})}function UO({title:e,date:t,rsvp:r,utilisation:n,status:i}){return y.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),y.jsx("div",{className:`!text-[12px] font-medium leading-[16px] px-2 py-1 ${i==="Completed"?"text-[#36AB6C] bg-[#E6F7EE]":i==="Upcoming"?"text-[#329DFF] bg-[#E6F2FF]":"text-slate-500 bg-slate-100"}`,children:i})]}),y.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),y.jsxs("div",{className:"flex justify-between items-center mt-2",children:[y.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[r," RSVP"]}),y.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[n,"% utilisation"]})]}),y.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:y.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${n}%`}})})]})}function zH(){return y.jsx(me,{title:"Events Utilisation",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:y.jsxs("div",{children:[y.jsx(UO,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),y.jsx(UO,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function jc({label:e,value:t,subLabel:r,bgColor:n,textColor:i}){return y.jsxs("div",{className:`rounded-lg p-4 ${n} h-[124px]`,children:[y.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),y.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),y.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:r})]})}function WH(){return y.jsx(me,{title:"Notice Board Status",period:y.jsx(ht,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:y.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[y.jsx(jc,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),y.jsx(jc,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),y.jsx(jc,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),y.jsx(jc,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function KO(e){return Re({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M20 22H4C3.44772 22 3 21.5523 3 21V3C3 2.44772 3.44772 2 4 2H20C20.5523 2 21 2.44772 21 3V21C21 21.5523 20.5523 22 20 22ZM19 20V4H5V20H19ZM8 9H16V11H8V9ZM8 13H16V15H8V13Z"},child:[]}]})(e)}function VH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsx(me,{title:e,icon:y.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:y.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:y.jsxs("div",{children:[y.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 pt-[8px] !text-[12px] leading-[16px]",children:[y.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function HH({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:KO,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return y.jsx("div",{className:"h-full",children:t.map((r,n)=>y.jsx(VH,{...r},n))})}function UH(e){return Re({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"2",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-3 7h3m-3 4h3m-6-4h.01M9 16h.01"},child:[]}]})(e)}function KH({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=wa,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return y.jsx(me,{title:e,icon:y.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:y.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:y.jsxs("div",{children:[y.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),y.jsxs("div",{className:"flex items-center gap-2 pt-[8px] !text-[12px] leading-[16px]",children:[y.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),y.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function qH(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:KO,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:HC,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:CH,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:UH,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return y.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-6",children:e.map((t,r)=>y.jsx(KH,{...t},r))})}ae.Accounting=hH,ae.AssetValueBreakdown=yH,ae.BlockWiseOccupancy=cH,ae.Budgets=pH,ae.Card=me,ae.CashBankBalance=mH,ae.Community=Ez,ae.Complaints=NH,ae.ComplaintsByLevel=IH,ae.DuesAgeing=gH,ae.Engagement=Pz,ae.EngagementStatsGrid=qH,ae.EventsUtilisation=zH,ae.ExpenseCategories=vH,ae.Facilities=Mz,ae.FinanceSummary=jz,ae.GateAndSecurityStatsGrid=jH,ae.GateUpdates=Iz,ae.GuardPatrols=OH,ae.Header=zC,ae.Helpdesk=$z,ae.HelpdeskStatsGrid=BH,ae.HourlyTrafficFlow=AH,ae.IncidentReports=EH,ae.IncomeExpenditure=VO,ae.MainHeader=qC,ae.MoveInOutTrends=fH,ae.NoticeBoardStatus=WH,ae.OccupancyOverview=oH,ae.RequestBox=RH,ae.ResidentOverview=lH,ae.RevenuebyCategory=bH,ae.SingleStats=HH,ae.StaffAttendance=PH,ae.StatsGrid=SH,ae.UnitStatus=aH,Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"})}));