anarock-widgets 1.0.37 → 1.0.39
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/anarock-widgets.css +1 -1
- package/dist/index.cjs.js +23 -23
- package/dist/index.es.js +1120 -1151
- package/dist/index.umd.js +24 -24
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
`+oe+C}}var V=!1,q;{var ie=typeof WeakMap=="function"?WeakMap:Map;q=new ie}function N(C,U){if(!C||V)return"";{var X=q.get(C);if(X!==void 0)return X}var ce;V=!0;var Ae=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ie;Ie=te.current,te.current=null,Q();try{if(U){var pe=function(){throw Error()};if(Object.defineProperty(pe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(pe,[])}catch(Bt){ce=Bt}Reflect.construct(C,[],pe)}else{try{pe.call()}catch(Bt){ce=Bt}C.call(pe.prototype)}}else{try{throw Error()}catch(Bt){ce=Bt}C()}}catch(Bt){if(Bt&&ce&&typeof Bt.stack=="string"){for(var he=Bt.stack.split(`
|
|
19
19
|
`),Rt=ce.stack.split(`
|
|
20
20
|
`),rt=he.length-1,lt=Rt.length-1;rt>=1&<>=0&&he[rt]!==Rt[lt];)lt--;for(;rt>=1&<>=0;rt--,lt--)if(he[rt]!==Rt[lt]){if(rt!==1||lt!==1)do if(rt--,lt--,lt<0||he[rt]!==Rt[lt]){var dr=`
|
|
21
|
-
`+he[rt].replace(" at new "," at ");return C.displayName&&dr.includes("<anonymous>")&&(dr=dr.replace("<anonymous>",C.displayName)),typeof C=="function"&&q.set(C,dr),dr}while(rt>=1&<>=0);break}}}finally{V=!1,te.current=Ie,J(),Error.prepareStackTrace=Ae}var
|
|
21
|
+
`+he[rt].replace(" at new "," at ");return C.displayName&&dr.includes("<anonymous>")&&(dr=dr.replace("<anonymous>",C.displayName)),typeof C=="function"&&q.set(C,dr),dr}while(rt>=1&<>=0);break}}}finally{V=!1,te.current=Ie,J(),Error.prepareStackTrace=Ae}var oa=C?C.displayName||C.name:"",hi=oa?se(oa):"";return typeof C=="function"&&q.set(C,hi),hi}function ge(C,U,X){return N(C,!1)}function fe(C){var U=C.prototype;return!!(U&&U.isReactComponent)}function Be(C,U,X){if(C==null)return"";if(typeof C=="function")return N(C,fe(C));if(typeof C=="string")return se(C);switch(C){case c:return se("Suspense");case u:return se("SuspenseList")}if(typeof C=="object")switch(C.$$typeof){case l:return ge(C.render);case f:return Be(C.type,U,X);case d:{var ce=C,Ae=ce._payload,Ie=ce._init;try{return Be(Ie(Ae),U,X)}catch{}}}return""}var Ve=Object.prototype.hasOwnProperty,Tt={},Ir=v.ReactDebugCurrentFrame;function rn(C){if(C){var U=C._owner,X=Be(C.type,C._source,U?U.type:null);Ir.setExtraStackFrame(X)}else Ir.setExtraStackFrame(null)}function Cr(C,U,X,ce,Ae){{var Ie=Function.call.bind(Ve);for(var pe in C)if(Ie(C,pe)){var he=void 0;try{if(typeof C[pe]!="function"){var Rt=Error((ce||"React class")+": "+X+" type `"+pe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof C[pe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Rt.name="Invariant Violation",Rt}he=C[pe](U,pe,ce,X,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(rt){he=rt}he&&!(he instanceof Error)&&(rn(Ae),x("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ce||"React class",X,pe,typeof he),rn(null)),he instanceof Error&&!(he.message in Tt)&&(Tt[he.message]=!0,rn(Ae),x("Failed %s type: %s",X,he.message),rn(null))}}}var Rr=Array.isArray;function nn(C){return Rr(C)}function an(C){{var U=typeof Symbol=="function"&&Symbol.toStringTag,X=U&&C[Symbol.toStringTag]||C.constructor.name||"Object";return X}}function li(C){try{return ci(C),!1}catch{return!0}}function ci(C){return""+C}function ui(C){if(li(C))return x("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",an(C)),ci(C)}var fi=v.ReactCurrentOwner,ra={key:!0,ref:!0,__self:!0,__source:!0},Hs,Us;function qu(C){if(Ve.call(C,"ref")){var U=Object.getOwnPropertyDescriptor(C,"ref").get;if(U&&U.isReactWarning)return!1}return C.ref!==void 0}function Yu(C){if(Ve.call(C,"key")){var U=Object.getOwnPropertyDescriptor(C,"key").get;if(U&&U.isReactWarning)return!1}return C.key!==void 0}function Gu(C,U){typeof C.ref=="string"&&fi.current}function F(C,U){{var X=function(){Hs||(Hs=!0,x("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};X.isReactWarning=!0,Object.defineProperty(C,"key",{get:X,configurable:!0})}}function ee(C,U){{var X=function(){Us||(Us=!0,x("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",U))};X.isReactWarning=!0,Object.defineProperty(C,"ref",{get:X,configurable:!0})}}var le=function(C,U,X,ce,Ae,Ie,pe){var he={$$typeof:t,type:C,key:U,ref:X,props:pe,_owner:Ie};return he._store={},Object.defineProperty(he._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(he,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ce}),Object.defineProperty(he,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Ae}),Object.freeze&&(Object.freeze(he.props),Object.freeze(he)),he};function we(C,U,X,ce,Ae){{var Ie,pe={},he=null,Rt=null;X!==void 0&&(ui(X),he=""+X),Yu(U)&&(ui(U.key),he=""+U.key),qu(U)&&(Rt=U.ref,Gu(U,Ae));for(Ie in U)Ve.call(U,Ie)&&!ra.hasOwnProperty(Ie)&&(pe[Ie]=U[Ie]);if(C&&C.defaultProps){var rt=C.defaultProps;for(Ie in rt)pe[Ie]===void 0&&(pe[Ie]=rt[Ie])}if(he||Rt){var lt=typeof C=="function"?C.displayName||C.name||"Unknown":C;he&&F(pe,lt),Rt&&ee(pe,lt)}return le(C,he,Rt,Ae,ce,fi.current,pe)}}var de=v.ReactCurrentOwner,yt=v.ReactDebugCurrentFrame;function dt(C){if(C){var U=C._owner,X=Be(C.type,C._source,U?U.type:null);yt.setExtraStackFrame(X)}else yt.setExtraStackFrame(null)}var $r;$r=!1;function na(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function Lr(){{if(de.current){var C=D(de.current.type);if(C)return`
|
|
22
22
|
|
|
23
23
|
Check the render method of \``+C+"`."}return""}}function eo(C){return""}var di={};function Dn(C){{var U=Lr();if(!U){var X=typeof C=="string"?C:C.displayName||C.name;X&&(U=`
|
|
24
24
|
|
|
25
|
-
Check the top-level render call using <`+X+">.")}return U}}function Ks(C,U){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var X=Dn(U);if(di[X])return;di[X]=!0;var ce="";C&&C._owner&&C._owner!==de.current&&(ce=" It was passed a child from "+D(C._owner.type)+"."),dt(C),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,ce),dt(null)}}function
|
|
25
|
+
Check the top-level render call using <`+X+">.")}return U}}function Ks(C,U){{if(!C._store||C._store.validated||C.key!=null)return;C._store.validated=!0;var X=Dn(U);if(di[X])return;di[X]=!0;var ce="";C&&C._owner&&C._owner!==de.current&&(ce=" It was passed a child from "+D(C._owner.type)+"."),dt(C),x('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',X,ce),dt(null)}}function ia(C,U){{if(typeof C!="object")return;if(nn(C))for(var X=0;X<C.length;X++){var ce=C[X];na(ce)&&Ks(ce,U)}else if(na(C))C._store&&(C._store.validated=!0);else if(C){var Ae=g(C);if(typeof Ae=="function"&&Ae!==C.entries)for(var Ie=Ae.call(C),pe;!(pe=Ie.next()).done;)na(pe.value)&&Ks(pe.value,U)}}}function aa(C){{var U=C.type;if(U==null||typeof U=="string")return;var X;if(typeof U=="function")X=U.propTypes;else if(typeof U=="object"&&(U.$$typeof===l||U.$$typeof===f))X=U.propTypes;else return;if(X){var ce=D(U);Cr(X,C.props,"prop",ce,C)}else if(U.PropTypes!==void 0&&!$r){$r=!0;var Ae=D(U);x("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Ae||"Unknown")}typeof U.getDefaultProps=="function"&&!U.getDefaultProps.isReactClassApproved&&x("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function xP(C){{for(var U=Object.keys(C.props),X=0;X<U.length;X++){var ce=U[X];if(ce!=="children"&&ce!=="key"){dt(C),x("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ce),dt(null);break}}C.ref!==null&&(dt(C),x("Invalid attribute `ref` supplied to `React.Fragment`."),dt(null))}}var Gg={};function Xg(C,U,X,ce,Ae,Ie){{var pe=I(C);if(!pe){var he="";(C===void 0||typeof C=="object"&&C!==null&&Object.keys(C).length===0)&&(he+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Rt=eo();Rt?he+=Rt:he+=Lr();var rt;C===null?rt="null":nn(C)?rt="array":C!==void 0&&C.$$typeof===t?(rt="<"+(D(C.type)||"Unknown")+" />",he=" Did you accidentally export a JSX literal instead of a component?"):rt=typeof C,x("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",rt,he)}var lt=we(C,U,X,Ae,Ie);if(lt==null)return lt;if(pe){var dr=U.children;if(dr!==void 0)if(ce)if(nn(dr)){for(var oa=0;oa<dr.length;oa++)ia(dr[oa],C);Object.freeze&&Object.freeze(dr)}else x("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ia(dr,C)}if(Ve.call(U,"key")){var hi=D(C),Bt=Object.keys(U).filter(function(EP){return EP!=="key"}),Xu=Bt.length>0?"{key: someKey, "+Bt.join(": ..., ")+": ...}":"{key: someKey}";if(!Gg[hi+Xu]){var AP=Bt.length>0?"{"+Bt.join(": ..., ")+": ...}":"{}";x(`A props object containing a "key" prop is being spread into JSX:
|
|
26
26
|
let props = %s;
|
|
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} />`,Xu,hi,AP,hi),Gg[hi+Xu]=!0}}return C===n?xP(lt):
|
|
30
|
+
<%s key={someKey} {...props} />`,Xu,hi,AP,hi),Gg[hi+Xu]=!0}}return C===n?xP(lt):aa(lt),lt}}function wP(C,U,X){return Xg(C,U,X,!0)}function _P(C,U,X){return Xg(C,U,X,!1)}var OP=_P,SP=wP;ro.Fragment=n,ro.jsx=OP,ro.jsxs=SP})()),ro}var Qg;function TP(){return Qg||(Qg=1,process.env.NODE_ENV==="production"?qs.exports=CP():qs.exports=kP()),qs.exports}var b=TP();const We=({title:e,icon:t,period:r,children:n,footer:i,className:a="",childrenClassName:o,titleWeight:s})=>{const l=s==="semi-bold"?600:500;return b.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:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,b.jsx("div",{style:{fontWeight:l,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),r&&b.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:r})]}),b.jsx("div",{className:`flex-1 min-h-0 space-y-[24px] ${o}`,children:n}),i&&b.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:i})]})},ev=e=>e,MP=()=>{let e=ev;return{configure(t){e=t},generate(t){return e(t)},reset(){e=ev}}},jP=MP();function Hn(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 Bi(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":Hn(7));return e.charAt(0).toUpperCase()+e.slice(1)}var Ys={exports:{}},Gs={exports:{}},Ee={};/** @license React v16.13.1
|
|
31
31
|
* react-is.production.min.js
|
|
32
32
|
*
|
|
33
33
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
@@ -63,19 +63,19 @@ Valid keys: `+JSON.stringify(Object.keys(L),null," "));var N=ie(oe,q,Q,J,te+"."
|
|
|
63
63
|
* This source code is licensed under the MIT license found in the
|
|
64
64
|
* LICENSE file in the root directory of this source tree.
|
|
65
65
|
*/var dv;function VP(){return dv||(dv=1,process.env.NODE_ENV!=="production"&&(function(){function e(p){if(typeof p=="object"&&p!==null){var g=p.$$typeof;switch(g){case t:switch(p=p.type,p){case n:case a:case i:case c:case u:case h:return p;default:switch(p=p&&p.$$typeof,p){case s:case l:case d:case f:return p;case o:return p;default:return g}}case r:return g}}}var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),h=Symbol.for("react.view_transition"),m=Symbol.for("react.client.reference");Ne.ContextConsumer=o,Ne.ContextProvider=s,Ne.Element=t,Ne.ForwardRef=l,Ne.Fragment=n,Ne.Lazy=d,Ne.Memo=f,Ne.Portal=r,Ne.Profiler=a,Ne.StrictMode=i,Ne.Suspense=c,Ne.SuspenseList=u,Ne.isContextConsumer=function(p){return e(p)===o},Ne.isContextProvider=function(p){return e(p)===s},Ne.isElement=function(p){return typeof p=="object"&&p!==null&&p.$$typeof===t},Ne.isForwardRef=function(p){return e(p)===l},Ne.isFragment=function(p){return e(p)===n},Ne.isLazy=function(p){return e(p)===d},Ne.isMemo=function(p){return e(p)===f},Ne.isPortal=function(p){return e(p)===r},Ne.isProfiler=function(p){return e(p)===a},Ne.isStrictMode=function(p){return e(p)===i},Ne.isSuspense=function(p){return e(p)===c},Ne.isSuspenseList=function(p){return e(p)===u},Ne.isValidElementType=function(p){return typeof p=="string"||typeof p=="function"||p===n||p===a||p===i||p===c||p===u||typeof p=="object"&&p!==null&&(p.$$typeof===d||p.$$typeof===f||p.$$typeof===s||p.$$typeof===o||p.$$typeof===l||p.$$typeof===m||p.getModuleId!==void 0)},Ne.typeOf=e})()),Ne}var hv;function HP(){return hv||(hv=1,process.env.NODE_ENV==="production"?Xs.exports=WP():Xs.exports=VP()),Xs.exports}var Lo=HP();function dn(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Dw(e){if(E.isValidElement(e)||Lo.isValidElementType(e)||!dn(e))return e;const t={};return Object.keys(e).forEach(r=>{t[r]=Dw(e[r])}),t}function ar(e,t,r={clone:!0}){const n=r.clone?{...e}:e;return dn(e)&&dn(t)&&Object.keys(t).forEach(i=>{E.isValidElement(t[i])||Lo.isValidElementType(t[i])?n[i]=t[i]:dn(t[i])&&Object.prototype.hasOwnProperty.call(e,i)&&dn(e[i])?n[i]=ar(e[i],t[i],r):r.clone?n[i]=dn(t[i])?Dw(t[i]):t[i]:n[i]=t[i]}),n}function Co(e,t){return t?ar(e,t,{clone:!1}):e}const Jn=process.env.NODE_ENV!=="production"?be.oneOfType([be.number,be.string,be.object,be.array]):{};function pv(e,t){if(!e.containerQueries)return t;const r=Object.keys(t).filter(n=>n.startsWith("@container")).sort((n,i)=>{const a=/min-width:\s*([0-9.]+)/;return+(n.match(a)?.[1]||0)-+(i.match(a)?.[1]||0)});return r.length?r.reduce((n,i)=>{const a=t[i];return delete n[i],n[i]=a,n},{...t}):t}function UP(e,t){return t==="@"||t.startsWith("@")&&(e.some(r=>t.startsWith(`@${r}`))||!!t.match(/^@\d/))}function KP(e,t){const r=t.match(/^@([^/]+)?\/?(.+)?$/);if(!r){if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The provided shorthand ${`(${t})`} is invalid. The format should be \`@<breakpoint | number>\` or \`@<breakpoint | number>/<container>\`.
|
|
66
|
-
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Hn(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function qP(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function r(a,o){a.up=(...s)=>t(e.breakpoints.up(...s),o),a.down=(...s)=>t(e.breakpoints.down(...s),o),a.between=(...s)=>t(e.breakpoints.between(...s),o),a.only=(...s)=>t(e.breakpoints.only(...s),o),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),o);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Hc={xs:0,sm:600,md:900,lg:1200,xl:1536},mv={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Hc[e]}px)`},YP={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Hc[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function xn(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||mv;return t.reduce((o,s,l)=>(o[a.up(a.keys[l])]=r(t[l]),o),{})}if(typeof t=="object"){const a=n.breakpoints||mv;return Object.keys(t).reduce((o,s)=>{if(UP(a.keys,s)){const l=KP(n.containerQueries?n:YP,s);l&&(o[l]=r(t[s],s))}else if(Object.keys(a.values||Hc).includes(s)){const l=a.up(s);o[l]=r(t[s],s)}else{const l=s;o[l]=t[l]}return o},{})}return r(t)}function GP(e={}){return e.keys?.reduce((r,n)=>{const i=e.up(n);return r[i]={},r},{})||{}}function gv(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Uc(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function Kl(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Uc(e,r)||n,t&&(i=t(i,n,e)),i}function at(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=o=>{if(o[t]==null)return null;const s=o[t],l=o.theme,c=Uc(l,n)||{};return xn(o,s,f=>{let d=Kl(c,i,f);return f===d&&typeof f=="string"&&(d=Kl(c,i,`${t}${f==="default"?"":
|
|
66
|
+
For example, \`@sm\` or \`@600\` or \`@40rem/sidebar\`.`:Hn(18,`(${t})`));return null}const[,n,i]=r,a=Number.isNaN(+n)?n||0:+n;return e.containerQueries(i).up(a)}function qP(e){const t=(a,o)=>a.replace("@media",o?`@container ${o}`:"@container");function r(a,o){a.up=(...s)=>t(e.breakpoints.up(...s),o),a.down=(...s)=>t(e.breakpoints.down(...s),o),a.between=(...s)=>t(e.breakpoints.between(...s),o),a.only=(...s)=>t(e.breakpoints.only(...s),o),a.not=(...s)=>{const l=t(e.breakpoints.not(...s),o);return l.includes("not all and")?l.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):l}}const n={},i=a=>(r(n,a),n);return r(i),{...e,containerQueries:i}}const Hc={xs:0,sm:600,md:900,lg:1200,xl:1536},mv={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${Hc[e]}px)`},YP={containerQueries:e=>({up:t=>{let r=typeof t=="number"?t:Hc[t]||t;return typeof r=="number"&&(r=`${r}px`),e?`@container ${e} (min-width:${r})`:`@container (min-width:${r})`}})};function xn(e,t,r){const n=e.theme||{};if(Array.isArray(t)){const a=n.breakpoints||mv;return t.reduce((o,s,l)=>(o[a.up(a.keys[l])]=r(t[l]),o),{})}if(typeof t=="object"){const a=n.breakpoints||mv;return Object.keys(t).reduce((o,s)=>{if(UP(a.keys,s)){const l=KP(n.containerQueries?n:YP,s);l&&(o[l]=r(t[s],s))}else if(Object.keys(a.values||Hc).includes(s)){const l=a.up(s);o[l]=r(t[s],s)}else{const l=s;o[l]=t[l]}return o},{})}return r(t)}function GP(e={}){return e.keys?.reduce((r,n)=>{const i=e.up(n);return r[i]={},r},{})||{}}function gv(e,t){return e.reduce((r,n)=>{const i=r[n];return(!i||Object.keys(i).length===0)&&delete r[n],r},t)}function Uc(e,t,r=!0){if(!t||typeof t!="string")return null;if(e&&e.vars&&r){const n=`vars.${t}`.split(".").reduce((i,a)=>i&&i[a]?i[a]:null,e);if(n!=null)return n}return t.split(".").reduce((n,i)=>n&&n[i]!=null?n[i]:null,e)}function Kl(e,t,r,n=r){let i;return typeof e=="function"?i=e(r):Array.isArray(e)?i=e[r]||n:i=Uc(e,r)||n,t&&(i=t(i,n,e)),i}function at(e){const{prop:t,cssProperty:r=e.prop,themeKey:n,transform:i}=e,a=o=>{if(o[t]==null)return null;const s=o[t],l=o.theme,c=Uc(l,n)||{};return xn(o,s,f=>{let d=Kl(c,i,f);return f===d&&typeof f=="string"&&(d=Kl(c,i,`${t}${f==="default"?"":Bi(f)}`,f)),r===!1?d:{[r]:d}})};return a.propTypes=process.env.NODE_ENV!=="production"?{[t]:Jn}:{},a.filterProps=[t],a}function XP(e){const t={};return r=>(t[r]===void 0&&(t[r]=e(r)),t[r])}const ZP={m:"margin",p:"padding"},JP={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},vv={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},QP=XP(e=>{if(e.length>2)if(vv[e])e=vv[e];else return[e];const[t,r]=e.split(""),n=ZP[t],i=JP[r]||"";return Array.isArray(i)?i.map(a=>n+a):[n+i]}),Kc=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],qc=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],eC=[...Kc,...qc];function ds(e,t,r,n){const i=Uc(e,t,!0)??r;return typeof i=="number"||typeof i=="string"?a=>typeof a=="string"?a:(process.env.NODE_ENV!=="production"&&typeof a!="number"&&console.error(`MUI: Expected ${n} argument to be a number or a string, got ${a}.`),typeof i=="string"?i.startsWith("var(")&&a===0?0:i.startsWith("var(")&&a===1?i:`calc(${a} * ${i})`:i*a):Array.isArray(i)?a=>{if(typeof a=="string")return a;const o=Math.abs(a);process.env.NODE_ENV!=="production"&&(Number.isInteger(o)?o>i.length-1&&console.error([`MUI: The value provided (${o}) overflows.`,`The supported values are: ${JSON.stringify(i)}.`,`${o} > ${i.length-1}, you need to add the missing values.`].join(`
|
|
67
67
|
`)):console.error([`MUI: The \`theme.${t}\` array type cannot be combined with non integer values.You should either use an integer value that can be used as index, or define the \`theme.${t}\` as a number.`].join(`
|
|
68
68
|
`)));const s=i[o];return a>=0?s:typeof s=="number"?-s:typeof s=="string"&&s.startsWith("var(")?`calc(-1 * ${s})`:`-${s}`}:typeof i=="function"?i:(process.env.NODE_ENV!=="production"&&console.error([`MUI: The \`theme.${t}\` value (${i}) is invalid.`,"It should be a number, an array or a function."].join(`
|
|
69
|
-
`)),()=>{})}function mp(e){return ds(e,"spacing",8,"spacing")}function hs(e,t){return typeof t=="string"||t==null?t:e(t)}function tC(e,t){return r=>e.reduce((n,i)=>(n[i]=hs(t,r),n),{})}function rC(e,t,r,n){if(!t.includes(r))return null;const i=QP(r),a=tC(i,n),o=e[r];return xn(e,o,a)}function Nw(e,t){const r=mp(e.theme);return Object.keys(e).map(n=>rC(e,t,n,r)).reduce(Co,{})}function Je(e){return Nw(e,Kc)}Je.propTypes=process.env.NODE_ENV!=="production"?Kc.reduce((e,t)=>(e[t]=Jn,e),{}):{};Je.filterProps=Kc;function Qe(e){return Nw(e,qc)}Qe.propTypes=process.env.NODE_ENV!=="production"?qc.reduce((e,t)=>(e[t]=Jn,e),{}):{};Qe.filterProps=qc;process.env.NODE_ENV!=="production"&&eC.reduce((e,t)=>(e[t]=Jn,e),{});function Yc(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?Co(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function vr(e){return typeof e!="number"?e:`${e}px solid`}function Er(e,t){return at({prop:e,themeKey:"borders",transform:t})}const nC=Er("border",vr),iC=Er("borderTop",vr),aC=Er("borderRight",vr),oC=Er("borderBottom",vr),sC=Er("borderLeft",vr),lC=Er("borderColor"),cC=Er("borderTopColor"),uC=Er("borderRightColor"),fC=Er("borderBottomColor"),dC=Er("borderLeftColor"),hC=Er("outline",vr),pC=Er("outlineColor"),Gc=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ds(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:hs(t,n)});return xn(e,e.borderRadius,r)}return null};Gc.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Jn}:{};Gc.filterProps=["borderRadius"];Yc(nC,iC,aC,oC,sC,lC,cC,uC,fC,dC,Gc,hC,pC);const Xc=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ds(e.theme,"spacing",8,"gap"),r=n=>({gap:hs(t,n)});return xn(e,e.gap,r)}return null};Xc.propTypes=process.env.NODE_ENV!=="production"?{gap:Jn}:{};Xc.filterProps=["gap"];const Zc=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ds(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:hs(t,n)});return xn(e,e.columnGap,r)}return null};Zc.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Jn}:{};Zc.filterProps=["columnGap"];const Jc=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ds(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:hs(t,n)});return xn(e,e.rowGap,r)}return null};Jc.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Jn}:{};Jc.filterProps=["rowGap"];const mC=at({prop:"gridColumn"}),gC=at({prop:"gridRow"}),vC=at({prop:"gridAutoFlow"}),yC=at({prop:"gridAutoColumns"}),bC=at({prop:"gridAutoRows"}),xC=at({prop:"gridTemplateColumns"}),wC=at({prop:"gridTemplateRows"}),_C=at({prop:"gridTemplateAreas"}),OC=at({prop:"gridArea"});Yc(Xc,Zc,Jc,mC,gC,vC,yC,bC,xC,wC,_C,OC);function xa(e,t){return t==="grey"?t:e}const SC=at({prop:"color",themeKey:"palette",transform:xa}),AC=at({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:xa}),EC=at({prop:"backgroundColor",themeKey:"palette",transform:xa});Yc(SC,AC,EC);function rr(e){return e<=1&&e!==0?`${e*100}%`:e}const PC=at({prop:"width",transform:rr}),gp=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||Hc[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:rr(r)}};return xn(e,e.maxWidth,t)}return null};gp.filterProps=["maxWidth"];const CC=at({prop:"minWidth",transform:rr}),kC=at({prop:"height",transform:rr}),TC=at({prop:"maxHeight",transform:rr}),MC=at({prop:"minHeight",transform:rr});at({prop:"size",cssProperty:"width",transform:rr});at({prop:"size",cssProperty:"height",transform:rr});const jC=at({prop:"boxSizing"});Yc(PC,gp,CC,kC,TC,MC,jC);const Qc={border:{themeKey:"borders",transform:vr},borderTop:{themeKey:"borders",transform:vr},borderRight:{themeKey:"borders",transform:vr},borderBottom:{themeKey:"borders",transform:vr},borderLeft:{themeKey:"borders",transform:vr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:vr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Gc},color:{themeKey:"palette",transform:xa},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:xa},backgroundColor:{themeKey:"palette",transform:xa},p:{style:Qe},pt:{style:Qe},pr:{style:Qe},pb:{style:Qe},pl:{style:Qe},px:{style:Qe},py:{style:Qe},padding:{style:Qe},paddingTop:{style:Qe},paddingRight:{style:Qe},paddingBottom:{style:Qe},paddingLeft:{style:Qe},paddingX:{style:Qe},paddingY:{style:Qe},paddingInline:{style:Qe},paddingInlineStart:{style:Qe},paddingInlineEnd:{style:Qe},paddingBlock:{style:Qe},paddingBlockStart:{style:Qe},paddingBlockEnd:{style:Qe},m:{style:Je},mt:{style:Je},mr:{style:Je},mb:{style:Je},ml:{style:Je},mx:{style:Je},my:{style:Je},margin:{style:Je},marginTop:{style:Je},marginRight:{style:Je},marginBottom:{style:Je},marginLeft:{style:Je},marginX:{style:Je},marginY:{style:Je},marginInline:{style:Je},marginInlineStart:{style:Je},marginInlineEnd:{style:Je},marginBlock:{style:Je},marginBlockStart:{style:Je},marginBlockEnd:{style:Je},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Xc},rowGap:{style:Jc},columnGap:{style:Zc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:rr},maxWidth:{style:gp},minWidth:{transform:rr},height:{transform:rr},maxHeight:{transform:rr},minHeight:{transform:rr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function DC(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function NC(e,t){return typeof e=="function"?e(t):e}function IC(){function e(r,n,i,a){const o={[r]:n,theme:i},s=a[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:f}=s;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const d=Uc(i,c)||{};return f?f(o):xn(o,n,m=>{let p=Kl(d,u,m);return m===p&&typeof m=="string"&&(p=Kl(d,u,`${r}${m==="default"?"":Fi(m)}`,m)),l===!1?p:{[l]:p}})}function t(r){const{sx:n,theme:i={},nested:a}=r||{};if(!n)return null;const o=i.unstable_sxConfig??Qc;function s(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=GP(i.breakpoints),f=Object.keys(u);let d=u;return Object.keys(c).forEach(h=>{const m=NC(c[h],i);if(m!=null)if(typeof m=="object")if(o[h])d=Co(d,e(h,m,i,o));else{const p=xn({theme:i},m,g=>({[h]:g}));DC(p,m)?d[h]=t({sx:m,theme:i,nested:!0}):d=Co(d,p)}else d=Co(d,e(h,m,i,o))}),!a&&i.modularCssLayers?{"@layer sx":pv(i,gv(f,d))}:pv(i,gv(f,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const Ea=IC();Ea.filterProps=["sx"];function th(){return th=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},th.apply(null,arguments)}function RC(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function $C(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var LC=(function(){function e(r){var n=this;this._insertTag=function(i){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,a),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag($C(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=RC(i);try{a.insertRule(n,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e})(),Mt="-ms-",ql="-moz-",_e="-webkit-",Iw="comm",vp="rule",yp="decl",BC="@import",Rw="@keyframes",FC="@layer",zC=Math.abs,eu=String.fromCharCode,WC=Object.assign;function VC(e,t){return Pt(e,0)^45?(((t<<2^Pt(e,0))<<2^Pt(e,1))<<2^Pt(e,2))<<2^Pt(e,3):0}function $w(e){return e.trim()}function HC(e,t){return(e=t.exec(e))?e[0]:e}function Oe(e,t,r){return e.replace(t,r)}function rh(e,t){return e.indexOf(t)}function Pt(e,t){return e.charCodeAt(t)|0}function Bo(e,t,r){return e.slice(t,r)}function Vr(e){return e.length}function bp(e){return e.length}function Zs(e,t){return t.push(e),e}function UC(e,t){return e.map(t).join("")}var tu=1,Pa=1,Lw=0,Yt=0,ct=0,Wa="";function ru(e,t,r,n,i,a,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:tu,column:Pa,length:o,return:""}}function no(e,t){return WC(ru("",null,null,"",null,null,0),e,{length:-e.length},t)}function KC(){return ct}function qC(){return ct=Yt>0?Pt(Wa,--Yt):0,Pa--,ct===10&&(Pa=1,tu--),ct}function or(){return ct=Yt<Lw?Pt(Wa,Yt++):0,Pa++,ct===10&&(Pa=1,tu++),ct}function qr(){return Pt(Wa,Yt)}function $l(){return Yt}function ps(e,t){return Bo(Wa,e,t)}function Fo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Bw(e){return tu=Pa=1,Lw=Vr(Wa=e),Yt=0,[]}function Fw(e){return Wa="",e}function Ll(e){return $w(ps(Yt-1,nh(e===91?e+2:e===40?e+1:e)))}function YC(e){for(;(ct=qr())&&ct<33;)or();return Fo(e)>2||Fo(ct)>3?"":" "}function GC(e,t){for(;--t&&or()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return ps(e,$l()+(t<6&&qr()==32&&or()==32))}function nh(e){for(;or();)switch(ct){case e:return Yt;case 34:case 39:e!==34&&e!==39&&nh(ct);break;case 40:e===41&&nh(e);break;case 92:or();break}return Yt}function XC(e,t){for(;or()&&e+ct!==57;)if(e+ct===84&&qr()===47)break;return"/*"+ps(t,Yt-1)+"*"+eu(e===47?e:or())}function ZC(e){for(;!Fo(qr());)or();return ps(e,Yt)}function JC(e){return Fw(Bl("",null,null,null,[""],e=Bw(e),0,[0],e))}function Bl(e,t,r,n,i,a,o,s,l){for(var c=0,u=0,f=o,d=0,h=0,m=0,p=1,g=1,v=1,x=0,w="",y=i,_=a,O=n,A=w;g;)switch(m=x,x=or()){case 40:if(m!=108&&Pt(A,f-1)==58){rh(A+=Oe(Ll(x),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:A+=Ll(x);break;case 9:case 10:case 13:case 32:A+=YC(m);break;case 92:A+=GC($l()-1,7);continue;case 47:switch(qr()){case 42:case 47:Zs(QC(XC(or(),$l()),t,r),l);break;default:A+="/"}break;case 123*p:s[c++]=Vr(A)*v;case 125*p:case 59:case 0:switch(x){case 0:case 125:g=0;case 59+u:v==-1&&(A=Oe(A,/\f/g,"")),h>0&&Vr(A)-f&&Zs(h>32?bv(A+";",n,r,f-1):bv(Oe(A," ","")+";",n,r,f-2),l);break;case 59:A+=";";default:if(Zs(O=yv(A,t,r,c,u,i,s,w,y=[],_=[],f),a),x===123)if(u===0)Bl(A,t,O,O,y,a,f,s,_);else switch(d===99&&Pt(A,3)===110?100:d){case 100:case 108:case 109:case 115:Bl(e,O,O,n&&Zs(yv(e,O,O,0,0,i,s,w,i,y=[],f),_),i,_,f,s,n?y:_);break;default:Bl(A,O,O,O,[""],_,0,s,_)}}c=u=h=0,p=v=1,w=A="",f=o;break;case 58:f=1+Vr(A),h=m;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&qC()==125)continue}switch(A+=eu(x),x*p){case 38:v=u>0?1:(A+="\f",-1);break;case 44:s[c++]=(Vr(A)-1)*v,v=1;break;case 64:qr()===45&&(A+=Ll(or())),d=qr(),u=f=Vr(w=A+=ZC($l())),x++;break;case 45:m===45&&Vr(A)==2&&(p=0)}}return a}function yv(e,t,r,n,i,a,o,s,l,c,u){for(var f=i-1,d=i===0?a:[""],h=bp(d),m=0,p=0,g=0;m<n;++m)for(var v=0,x=Bo(e,f+1,f=zC(p=o[m])),w=e;v<h;++v)(w=$w(p>0?d[v]+" "+x:Oe(x,/&\f/g,d[v])))&&(l[g++]=w);return ru(e,t,r,i===0?vp:s,l,c,u)}function QC(e,t,r){return ru(e,t,r,Iw,eu(KC()),Bo(e,2,-2),0)}function bv(e,t,r,n){return ru(e,t,r,yp,Bo(e,0,n),Bo(e,n+1,-1),n)}function wa(e,t){for(var r="",n=bp(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function ek(e,t,r,n){switch(e.type){case FC:if(e.children.length)break;case BC:case yp:return e.return=e.return||e.value;case Iw:return"";case Rw:return e.return=e.value+"{"+wa(e.children,n)+"}";case vp:e.value=e.props.join(",")}return Vr(r=wa(e.children,n))?e.return=e.value+"{"+r+"}":""}function tk(e){var t=bp(e);return function(r,n,i,a){for(var o="",s=0;s<t;s++)o+=e[s](r,n,i,a)||"";return o}}function rk(e){return function(t){t.root||(t=t.return)&&e(t)}}function zw(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var nk=function(t,r,n){for(var i=0,a=0;i=a,a=qr(),i===38&&a===12&&(r[n]=1),!Fo(a);)or();return ps(t,Yt)},ik=function(t,r){var n=-1,i=44;do switch(Fo(i)){case 0:i===38&&qr()===12&&(r[n]=1),t[n]+=nk(Yt-1,r,n);break;case 2:t[n]+=Ll(i);break;case 4:if(i===44){t[++n]=qr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=eu(i)}while(i=or());return t},ak=function(t,r){return Fw(ik(Bw(t),r))},xv=new WeakMap,ok=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!xv.get(n))&&!i){xv.set(t,!0);for(var a=[],o=ak(r,a),s=n.props,l=0,c=0;l<o.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=a[l]?o[l].replace(/&\f/g,s[u]):s[u]+" "+o[l]}}},sk=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ww(e,t){switch(VC(e,t)){case 5103:return _e+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return _e+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return _e+e+ql+e+Mt+e+e;case 6828:case 4268:return _e+e+Mt+e+e;case 6165:return _e+e+Mt+"flex-"+e+e;case 5187:return _e+e+Oe(e,/(\w+).+(:[^]+)/,_e+"box-$1$2"+Mt+"flex-$1$2")+e;case 5443:return _e+e+Mt+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return _e+e+Mt+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return _e+e+Mt+Oe(e,"shrink","negative")+e;case 5292:return _e+e+Mt+Oe(e,"basis","preferred-size")+e;case 6060:return _e+"box-"+Oe(e,"-grow","")+_e+e+Mt+Oe(e,"grow","positive")+e;case 4554:return _e+Oe(e,/([^-])(transform)/g,"$1"+_e+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,_e+"$1"),/(image-set)/,_e+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,_e+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,_e+"box-pack:$3"+Mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+_e+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,_e+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vr(e)-1-t>6)switch(Pt(e,t+1)){case 109:if(Pt(e,t+4)!==45)break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+_e+"$2-$3$1"+ql+(Pt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~rh(e,"stretch")?Ww(Oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pt(e,t+1)!==115)break;case 6444:switch(Pt(e,Vr(e)-3-(~rh(e,"!important")&&10))){case 107:return Oe(e,":",":"+_e)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+_e+(Pt(e,14)===45?"inline-":"")+"box$3$1"+_e+"$2$3$1"+Mt+"$2box$3")+e}break;case 5936:switch(Pt(e,t+11)){case 114:return _e+e+Mt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return _e+e+Mt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return _e+e+Mt+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return _e+e+Mt+e+e}return e}var lk=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case yp:t.return=Ww(t.value,t.length);break;case Rw:return wa([no(t,{value:Oe(t.value,"@","@"+_e)})],i);case vp:if(t.length)return UC(t.props,function(a){switch(HC(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return wa([no(t,{props:[Oe(a,/:(read-\w+)/,":"+ql+"$1")]})],i);case"::placeholder":return wa([no(t,{props:[Oe(a,/:(plac\w+)/,":"+_e+"input-$1")]}),no(t,{props:[Oe(a,/:(plac\w+)/,":"+ql+"$1")]}),no(t,{props:[Oe(a,/:(plac\w+)/,Mt+"input-$1")]})],i)}return""})}},ck=[lk],uk=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(p){var g=p.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var i=t.stylisPlugins||ck,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(p){for(var g=p.getAttribute("data-emotion").split(" "),v=1;v<g.length;v++)a[g[v]]=!0;s.push(p)});var l,c=[ok,sk];{var u,f=[ek,rk(function(p){u.insert(p)})],d=tk(c.concat(i,f)),h=function(g){return wa(JC(g),d)};l=function(g,v,x,w){u=x,h(g?g+"{"+v.styles+"}":v.styles),w&&(m.inserted[v.name]=!0)}}var m={key:r,sheet:new LC({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return m.sheet.hydrate(s),m},fk=!0;function dk(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var Vw=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||fk===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},hk=function(t,r,n){Vw(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function pk(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mk={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},gk=/[A-Z]|^ms/g,vk=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hw=function(t){return t.charCodeAt(1)===45},wv=function(t){return t!=null&&typeof t!="boolean"},nf=zw(function(e){return Hw(e)?e:e.replace(gk,"-$&").toLowerCase()}),_v=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(vk,function(n,i,a){return Hr={name:i,styles:a,next:Hr},i})}return mk[t]!==1&&!Hw(t)&&typeof r=="number"&&r!==0?r+"px":r};function zo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Hr={name:i.name,styles:i.styles,next:Hr},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Hr={name:o.name,styles:o.styles,next:Hr},o=o.next;var s=a.styles+";";return s}return yk(e,t,r)}case"function":{if(e!==void 0){var l=Hr,c=r(e);return Hr=l,zo(e,t,c)}break}}var u=r;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function yk(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=zo(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?n+=a+"{"+t[s]+"}":wv(s)&&(n+=nf(a)+":"+_v(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var l=0;l<o.length;l++)wv(o[l])&&(n+=nf(a)+":"+_v(a,o[l])+";");else{var c=zo(e,t,o);switch(a){case"animation":case"animationName":{n+=nf(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var Ov=/label:\s*([^\s;{]+)\s*(;|$)/g,Hr;function Uw(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Hr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=zo(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=zo(r,t,e[s]),n){var l=a;i+=l[s]}Ov.lastIndex=0;for(var c="",u;(u=Ov.exec(i))!==null;)c+="-"+u[1];var f=pk(i)+c;return{name:f,styles:i,next:Hr}}var bk=function(t){return t()},xk=E.useInsertionEffect?E.useInsertionEffect:!1,wk=xk||bk,Kw=E.createContext(typeof HTMLElement<"u"?uk({key:"css"}):null);Kw.Provider;var _k=function(t){return k.forwardRef(function(r,n){var i=k.useContext(Kw);return t(r,i,n)})},Ok=E.createContext({}),Sk=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|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|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|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|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ak=zw(function(e){return Sk.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ek=Ak,Pk=function(t){return t!=="theme"},Sv=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ek:Pk},Av=function(t,r,n){var i;if(r){var a=r.shouldForwardProp;i=t.__emotion_forwardProp&&a?function(o){return t.__emotion_forwardProp(o)&&a(o)}:a}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i},Ck=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return Vw(r,n,i),wk(function(){return hk(r,n,i)}),null},kk=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,a,o;r!==void 0&&(a=r.label,o=r.target);var s=Av(t,r,n),l=s||Sv(i),c=!l("as");return function(){var u=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&f.push("label:"+a+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var d=u[0];f.push(d[0]);for(var h=u.length,m=1;m<h;m++)f.push(u[m],d[m])}var p=_k(function(g,v,x){var w=c&&g.as||i,y="",_=[],O=g;if(g.theme==null){O={};for(var A in g)O[A]=g[A];O.theme=E.useContext(Ok)}typeof g.className=="string"?y=dk(v.registered,_,g.className):g.className!=null&&(y=g.className+" ");var P=Uw(f.concat(_),v.registered,O);y+=v.key+"-"+P.name,o!==void 0&&(y+=" "+o);var T=c&&s===void 0?Sv(w):l,I={};for(var j in g)c&&j==="as"||T(j)&&(I[j]=g[j]);return I.className=y,x&&(I.ref=x),E.createElement(E.Fragment,null,E.createElement(Ck,{cache:v,serialized:P,isStringTag:typeof w=="string"}),E.createElement(w,I))});return p.displayName=a!==void 0?a:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=f,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return"."+o}}),p.withComponent=function(g,v){var x=e(g,th({},r,v,{shouldForwardProp:Av(p,v,!0)}));return x.apply(void 0,f)},p}},Tk=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ih=kk.bind(null);Tk.forEach(function(e){ih[e]=ih(e)});/**
|
|
69
|
+
`)),()=>{})}function mp(e){return ds(e,"spacing",8,"spacing")}function hs(e,t){return typeof t=="string"||t==null?t:e(t)}function tC(e,t){return r=>e.reduce((n,i)=>(n[i]=hs(t,r),n),{})}function rC(e,t,r,n){if(!t.includes(r))return null;const i=QP(r),a=tC(i,n),o=e[r];return xn(e,o,a)}function Nw(e,t){const r=mp(e.theme);return Object.keys(e).map(n=>rC(e,t,n,r)).reduce(Co,{})}function Je(e){return Nw(e,Kc)}Je.propTypes=process.env.NODE_ENV!=="production"?Kc.reduce((e,t)=>(e[t]=Jn,e),{}):{};Je.filterProps=Kc;function Qe(e){return Nw(e,qc)}Qe.propTypes=process.env.NODE_ENV!=="production"?qc.reduce((e,t)=>(e[t]=Jn,e),{}):{};Qe.filterProps=qc;process.env.NODE_ENV!=="production"&&eC.reduce((e,t)=>(e[t]=Jn,e),{});function Yc(...e){const t=e.reduce((n,i)=>(i.filterProps.forEach(a=>{n[a]=i}),n),{}),r=n=>Object.keys(n).reduce((i,a)=>t[a]?Co(i,t[a](n)):i,{});return r.propTypes=process.env.NODE_ENV!=="production"?e.reduce((n,i)=>Object.assign(n,i.propTypes),{}):{},r.filterProps=e.reduce((n,i)=>n.concat(i.filterProps),[]),r}function vr(e){return typeof e!="number"?e:`${e}px solid`}function Er(e,t){return at({prop:e,themeKey:"borders",transform:t})}const nC=Er("border",vr),iC=Er("borderTop",vr),aC=Er("borderRight",vr),oC=Er("borderBottom",vr),sC=Er("borderLeft",vr),lC=Er("borderColor"),cC=Er("borderTopColor"),uC=Er("borderRightColor"),fC=Er("borderBottomColor"),dC=Er("borderLeftColor"),hC=Er("outline",vr),pC=Er("outlineColor"),Gc=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const t=ds(e.theme,"shape.borderRadius",4,"borderRadius"),r=n=>({borderRadius:hs(t,n)});return xn(e,e.borderRadius,r)}return null};Gc.propTypes=process.env.NODE_ENV!=="production"?{borderRadius:Jn}:{};Gc.filterProps=["borderRadius"];Yc(nC,iC,aC,oC,sC,lC,cC,uC,fC,dC,Gc,hC,pC);const Xc=e=>{if(e.gap!==void 0&&e.gap!==null){const t=ds(e.theme,"spacing",8,"gap"),r=n=>({gap:hs(t,n)});return xn(e,e.gap,r)}return null};Xc.propTypes=process.env.NODE_ENV!=="production"?{gap:Jn}:{};Xc.filterProps=["gap"];const Zc=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const t=ds(e.theme,"spacing",8,"columnGap"),r=n=>({columnGap:hs(t,n)});return xn(e,e.columnGap,r)}return null};Zc.propTypes=process.env.NODE_ENV!=="production"?{columnGap:Jn}:{};Zc.filterProps=["columnGap"];const Jc=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const t=ds(e.theme,"spacing",8,"rowGap"),r=n=>({rowGap:hs(t,n)});return xn(e,e.rowGap,r)}return null};Jc.propTypes=process.env.NODE_ENV!=="production"?{rowGap:Jn}:{};Jc.filterProps=["rowGap"];const mC=at({prop:"gridColumn"}),gC=at({prop:"gridRow"}),vC=at({prop:"gridAutoFlow"}),yC=at({prop:"gridAutoColumns"}),bC=at({prop:"gridAutoRows"}),xC=at({prop:"gridTemplateColumns"}),wC=at({prop:"gridTemplateRows"}),_C=at({prop:"gridTemplateAreas"}),OC=at({prop:"gridArea"});Yc(Xc,Zc,Jc,mC,gC,vC,yC,bC,xC,wC,_C,OC);function ba(e,t){return t==="grey"?t:e}const SC=at({prop:"color",themeKey:"palette",transform:ba}),AC=at({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:ba}),EC=at({prop:"backgroundColor",themeKey:"palette",transform:ba});Yc(SC,AC,EC);function rr(e){return e<=1&&e!==0?`${e*100}%`:e}const PC=at({prop:"width",transform:rr}),gp=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const t=r=>{const n=e.theme?.breakpoints?.values?.[r]||Hc[r];return n?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${n}${e.theme.breakpoints.unit}`}:{maxWidth:n}:{maxWidth:rr(r)}};return xn(e,e.maxWidth,t)}return null};gp.filterProps=["maxWidth"];const CC=at({prop:"minWidth",transform:rr}),kC=at({prop:"height",transform:rr}),TC=at({prop:"maxHeight",transform:rr}),MC=at({prop:"minHeight",transform:rr});at({prop:"size",cssProperty:"width",transform:rr});at({prop:"size",cssProperty:"height",transform:rr});const jC=at({prop:"boxSizing"});Yc(PC,gp,CC,kC,TC,MC,jC);const Qc={border:{themeKey:"borders",transform:vr},borderTop:{themeKey:"borders",transform:vr},borderRight:{themeKey:"borders",transform:vr},borderBottom:{themeKey:"borders",transform:vr},borderLeft:{themeKey:"borders",transform:vr},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:vr},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:Gc},color:{themeKey:"palette",transform:ba},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:ba},backgroundColor:{themeKey:"palette",transform:ba},p:{style:Qe},pt:{style:Qe},pr:{style:Qe},pb:{style:Qe},pl:{style:Qe},px:{style:Qe},py:{style:Qe},padding:{style:Qe},paddingTop:{style:Qe},paddingRight:{style:Qe},paddingBottom:{style:Qe},paddingLeft:{style:Qe},paddingX:{style:Qe},paddingY:{style:Qe},paddingInline:{style:Qe},paddingInlineStart:{style:Qe},paddingInlineEnd:{style:Qe},paddingBlock:{style:Qe},paddingBlockStart:{style:Qe},paddingBlockEnd:{style:Qe},m:{style:Je},mt:{style:Je},mr:{style:Je},mb:{style:Je},ml:{style:Je},mx:{style:Je},my:{style:Je},margin:{style:Je},marginTop:{style:Je},marginRight:{style:Je},marginBottom:{style:Je},marginLeft:{style:Je},marginX:{style:Je},marginY:{style:Je},marginInline:{style:Je},marginInlineStart:{style:Je},marginInlineEnd:{style:Je},marginBlock:{style:Je},marginBlockStart:{style:Je},marginBlockEnd:{style:Je},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:Xc},rowGap:{style:Jc},columnGap:{style:Zc},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:rr},maxWidth:{style:gp},minWidth:{transform:rr},height:{transform:rr},maxHeight:{transform:rr},minHeight:{transform:rr},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}};function DC(...e){const t=e.reduce((n,i)=>n.concat(Object.keys(i)),[]),r=new Set(t);return e.every(n=>r.size===Object.keys(n).length)}function NC(e,t){return typeof e=="function"?e(t):e}function IC(){function e(r,n,i,a){const o={[r]:n,theme:i},s=a[r];if(!s)return{[r]:n};const{cssProperty:l=r,themeKey:c,transform:u,style:f}=s;if(n==null)return null;if(c==="typography"&&n==="inherit")return{[r]:n};const d=Uc(i,c)||{};return f?f(o):xn(o,n,m=>{let p=Kl(d,u,m);return m===p&&typeof m=="string"&&(p=Kl(d,u,`${r}${m==="default"?"":Bi(m)}`,m)),l===!1?p:{[l]:p}})}function t(r){const{sx:n,theme:i={},nested:a}=r||{};if(!n)return null;const o=i.unstable_sxConfig??Qc;function s(l){let c=l;if(typeof l=="function")c=l(i);else if(typeof l!="object")return l;if(!c)return null;const u=GP(i.breakpoints),f=Object.keys(u);let d=u;return Object.keys(c).forEach(h=>{const m=NC(c[h],i);if(m!=null)if(typeof m=="object")if(o[h])d=Co(d,e(h,m,i,o));else{const p=xn({theme:i},m,g=>({[h]:g}));DC(p,m)?d[h]=t({sx:m,theme:i,nested:!0}):d=Co(d,p)}else d=Co(d,e(h,m,i,o))}),!a&&i.modularCssLayers?{"@layer sx":pv(i,gv(f,d))}:pv(i,gv(f,d))}return Array.isArray(n)?n.map(s):s(n)}return t}const Ea=IC();Ea.filterProps=["sx"];function th(){return th=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},th.apply(null,arguments)}function RC(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function $C(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var LC=(function(){function e(r){var n=this;this._insertTag=function(i){var a;n.tags.length===0?n.insertionPoint?a=n.insertionPoint.nextSibling:n.prepend?a=n.container.firstChild:a=n.before:a=n.tags[n.tags.length-1].nextSibling,n.container.insertBefore(i,a),n.tags.push(i)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(n){n.forEach(this._insertTag)},t.insert=function(n){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag($C(this));var i=this.tags[this.tags.length-1];if(this.isSpeedy){var a=RC(i);try{a.insertRule(n,a.cssRules.length)}catch{}}else i.appendChild(document.createTextNode(n));this.ctr++},t.flush=function(){this.tags.forEach(function(n){var i;return(i=n.parentNode)==null?void 0:i.removeChild(n)}),this.tags=[],this.ctr=0},e})(),Mt="-ms-",ql="-moz-",_e="-webkit-",Iw="comm",vp="rule",yp="decl",BC="@import",Rw="@keyframes",FC="@layer",zC=Math.abs,eu=String.fromCharCode,WC=Object.assign;function VC(e,t){return Pt(e,0)^45?(((t<<2^Pt(e,0))<<2^Pt(e,1))<<2^Pt(e,2))<<2^Pt(e,3):0}function $w(e){return e.trim()}function HC(e,t){return(e=t.exec(e))?e[0]:e}function Oe(e,t,r){return e.replace(t,r)}function rh(e,t){return e.indexOf(t)}function Pt(e,t){return e.charCodeAt(t)|0}function Bo(e,t,r){return e.slice(t,r)}function Vr(e){return e.length}function bp(e){return e.length}function Zs(e,t){return t.push(e),e}function UC(e,t){return e.map(t).join("")}var tu=1,Pa=1,Lw=0,Yt=0,ct=0,Wa="";function ru(e,t,r,n,i,a,o){return{value:e,root:t,parent:r,type:n,props:i,children:a,line:tu,column:Pa,length:o,return:""}}function no(e,t){return WC(ru("",null,null,"",null,null,0),e,{length:-e.length},t)}function KC(){return ct}function qC(){return ct=Yt>0?Pt(Wa,--Yt):0,Pa--,ct===10&&(Pa=1,tu--),ct}function or(){return ct=Yt<Lw?Pt(Wa,Yt++):0,Pa++,ct===10&&(Pa=1,tu++),ct}function qr(){return Pt(Wa,Yt)}function $l(){return Yt}function ps(e,t){return Bo(Wa,e,t)}function Fo(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Bw(e){return tu=Pa=1,Lw=Vr(Wa=e),Yt=0,[]}function Fw(e){return Wa="",e}function Ll(e){return $w(ps(Yt-1,nh(e===91?e+2:e===40?e+1:e)))}function YC(e){for(;(ct=qr())&&ct<33;)or();return Fo(e)>2||Fo(ct)>3?"":" "}function GC(e,t){for(;--t&&or()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return ps(e,$l()+(t<6&&qr()==32&&or()==32))}function nh(e){for(;or();)switch(ct){case e:return Yt;case 34:case 39:e!==34&&e!==39&&nh(ct);break;case 40:e===41&&nh(e);break;case 92:or();break}return Yt}function XC(e,t){for(;or()&&e+ct!==57;)if(e+ct===84&&qr()===47)break;return"/*"+ps(t,Yt-1)+"*"+eu(e===47?e:or())}function ZC(e){for(;!Fo(qr());)or();return ps(e,Yt)}function JC(e){return Fw(Bl("",null,null,null,[""],e=Bw(e),0,[0],e))}function Bl(e,t,r,n,i,a,o,s,l){for(var c=0,u=0,f=o,d=0,h=0,m=0,p=1,g=1,v=1,x=0,w="",y=i,_=a,O=n,A=w;g;)switch(m=x,x=or()){case 40:if(m!=108&&Pt(A,f-1)==58){rh(A+=Oe(Ll(x),"&","&\f"),"&\f")!=-1&&(v=-1);break}case 34:case 39:case 91:A+=Ll(x);break;case 9:case 10:case 13:case 32:A+=YC(m);break;case 92:A+=GC($l()-1,7);continue;case 47:switch(qr()){case 42:case 47:Zs(QC(XC(or(),$l()),t,r),l);break;default:A+="/"}break;case 123*p:s[c++]=Vr(A)*v;case 125*p:case 59:case 0:switch(x){case 0:case 125:g=0;case 59+u:v==-1&&(A=Oe(A,/\f/g,"")),h>0&&Vr(A)-f&&Zs(h>32?bv(A+";",n,r,f-1):bv(Oe(A," ","")+";",n,r,f-2),l);break;case 59:A+=";";default:if(Zs(O=yv(A,t,r,c,u,i,s,w,y=[],_=[],f),a),x===123)if(u===0)Bl(A,t,O,O,y,a,f,s,_);else switch(d===99&&Pt(A,3)===110?100:d){case 100:case 108:case 109:case 115:Bl(e,O,O,n&&Zs(yv(e,O,O,0,0,i,s,w,i,y=[],f),_),i,_,f,s,n?y:_);break;default:Bl(A,O,O,O,[""],_,0,s,_)}}c=u=h=0,p=v=1,w=A="",f=o;break;case 58:f=1+Vr(A),h=m;default:if(p<1){if(x==123)--p;else if(x==125&&p++==0&&qC()==125)continue}switch(A+=eu(x),x*p){case 38:v=u>0?1:(A+="\f",-1);break;case 44:s[c++]=(Vr(A)-1)*v,v=1;break;case 64:qr()===45&&(A+=Ll(or())),d=qr(),u=f=Vr(w=A+=ZC($l())),x++;break;case 45:m===45&&Vr(A)==2&&(p=0)}}return a}function yv(e,t,r,n,i,a,o,s,l,c,u){for(var f=i-1,d=i===0?a:[""],h=bp(d),m=0,p=0,g=0;m<n;++m)for(var v=0,x=Bo(e,f+1,f=zC(p=o[m])),w=e;v<h;++v)(w=$w(p>0?d[v]+" "+x:Oe(x,/&\f/g,d[v])))&&(l[g++]=w);return ru(e,t,r,i===0?vp:s,l,c,u)}function QC(e,t,r){return ru(e,t,r,Iw,eu(KC()),Bo(e,2,-2),0)}function bv(e,t,r,n){return ru(e,t,r,yp,Bo(e,0,n),Bo(e,n+1,-1),n)}function xa(e,t){for(var r="",n=bp(e),i=0;i<n;i++)r+=t(e[i],i,e,t)||"";return r}function ek(e,t,r,n){switch(e.type){case FC:if(e.children.length)break;case BC:case yp:return e.return=e.return||e.value;case Iw:return"";case Rw:return e.return=e.value+"{"+xa(e.children,n)+"}";case vp:e.value=e.props.join(",")}return Vr(r=xa(e.children,n))?e.return=e.value+"{"+r+"}":""}function tk(e){var t=bp(e);return function(r,n,i,a){for(var o="",s=0;s<t;s++)o+=e[s](r,n,i,a)||"";return o}}function rk(e){return function(t){t.root||(t=t.return)&&e(t)}}function zw(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var nk=function(t,r,n){for(var i=0,a=0;i=a,a=qr(),i===38&&a===12&&(r[n]=1),!Fo(a);)or();return ps(t,Yt)},ik=function(t,r){var n=-1,i=44;do switch(Fo(i)){case 0:i===38&&qr()===12&&(r[n]=1),t[n]+=nk(Yt-1,r,n);break;case 2:t[n]+=Ll(i);break;case 4:if(i===44){t[++n]=qr()===58?"&\f":"",r[n]=t[n].length;break}default:t[n]+=eu(i)}while(i=or());return t},ak=function(t,r){return Fw(ik(Bw(t),r))},xv=new WeakMap,ok=function(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,n=t.parent,i=t.column===n.column&&t.line===n.line;n.type!=="rule";)if(n=n.parent,!n)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!xv.get(n))&&!i){xv.set(t,!0);for(var a=[],o=ak(r,a),s=n.props,l=0,c=0;l<o.length;l++)for(var u=0;u<s.length;u++,c++)t.props[c]=a[l]?o[l].replace(/&\f/g,s[u]):s[u]+" "+o[l]}}},sk=function(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function Ww(e,t){switch(VC(e,t)){case 5103:return _e+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return _e+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return _e+e+ql+e+Mt+e+e;case 6828:case 4268:return _e+e+Mt+e+e;case 6165:return _e+e+Mt+"flex-"+e+e;case 5187:return _e+e+Oe(e,/(\w+).+(:[^]+)/,_e+"box-$1$2"+Mt+"flex-$1$2")+e;case 5443:return _e+e+Mt+"flex-item-"+Oe(e,/flex-|-self/,"")+e;case 4675:return _e+e+Mt+"flex-line-pack"+Oe(e,/align-content|flex-|-self/,"")+e;case 5548:return _e+e+Mt+Oe(e,"shrink","negative")+e;case 5292:return _e+e+Mt+Oe(e,"basis","preferred-size")+e;case 6060:return _e+"box-"+Oe(e,"-grow","")+_e+e+Mt+Oe(e,"grow","positive")+e;case 4554:return _e+Oe(e,/([^-])(transform)/g,"$1"+_e+"$2")+e;case 6187:return Oe(Oe(Oe(e,/(zoom-|grab)/,_e+"$1"),/(image-set)/,_e+"$1"),e,"")+e;case 5495:case 3959:return Oe(e,/(image-set\([^]*)/,_e+"$1$`$1");case 4968:return Oe(Oe(e,/(.+:)(flex-)?(.*)/,_e+"box-pack:$3"+Mt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+_e+e+e;case 4095:case 3583:case 4068:case 2532:return Oe(e,/(.+)-inline(.+)/,_e+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Vr(e)-1-t>6)switch(Pt(e,t+1)){case 109:if(Pt(e,t+4)!==45)break;case 102:return Oe(e,/(.+:)(.+)-([^]+)/,"$1"+_e+"$2-$3$1"+ql+(Pt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~rh(e,"stretch")?Ww(Oe(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(Pt(e,t+1)!==115)break;case 6444:switch(Pt(e,Vr(e)-3-(~rh(e,"!important")&&10))){case 107:return Oe(e,":",":"+_e)+e;case 101:return Oe(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+_e+(Pt(e,14)===45?"inline-":"")+"box$3$1"+_e+"$2$3$1"+Mt+"$2box$3")+e}break;case 5936:switch(Pt(e,t+11)){case 114:return _e+e+Mt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return _e+e+Mt+Oe(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return _e+e+Mt+Oe(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return _e+e+Mt+e+e}return e}var lk=function(t,r,n,i){if(t.length>-1&&!t.return)switch(t.type){case yp:t.return=Ww(t.value,t.length);break;case Rw:return xa([no(t,{value:Oe(t.value,"@","@"+_e)})],i);case vp:if(t.length)return UC(t.props,function(a){switch(HC(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return xa([no(t,{props:[Oe(a,/:(read-\w+)/,":"+ql+"$1")]})],i);case"::placeholder":return xa([no(t,{props:[Oe(a,/:(plac\w+)/,":"+_e+"input-$1")]}),no(t,{props:[Oe(a,/:(plac\w+)/,":"+ql+"$1")]}),no(t,{props:[Oe(a,/:(plac\w+)/,Mt+"input-$1")]})],i)}return""})}},ck=[lk],uk=function(t){var r=t.key;if(r==="css"){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(p){var g=p.getAttribute("data-emotion");g.indexOf(" ")!==-1&&(document.head.appendChild(p),p.setAttribute("data-s",""))})}var i=t.stylisPlugins||ck,a={},o,s=[];o=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(p){for(var g=p.getAttribute("data-emotion").split(" "),v=1;v<g.length;v++)a[g[v]]=!0;s.push(p)});var l,c=[ok,sk];{var u,f=[ek,rk(function(p){u.insert(p)})],d=tk(c.concat(i,f)),h=function(g){return xa(JC(g),d)};l=function(g,v,x,w){u=x,h(g?g+"{"+v.styles+"}":v.styles),w&&(m.inserted[v.name]=!0)}}var m={key:r,sheet:new LC({key:r,container:o,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:a,registered:{},insert:l};return m.sheet.hydrate(s),m},fk=!0;function dk(e,t,r){var n="";return r.split(" ").forEach(function(i){e[i]!==void 0?t.push(e[i]+";"):i&&(n+=i+" ")}),n}var Vw=function(t,r,n){var i=t.key+"-"+r.name;(n===!1||fk===!1)&&t.registered[i]===void 0&&(t.registered[i]=r.styles)},hk=function(t,r,n){Vw(t,r,n);var i=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var a=r;do t.insert(r===a?"."+i:"",a,t.sheet,!0),a=a.next;while(a!==void 0)}};function pk(e){for(var t=0,r,n=0,i=e.length;i>=4;++n,i-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var mk={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},gk=/[A-Z]|^ms/g,vk=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hw=function(t){return t.charCodeAt(1)===45},wv=function(t){return t!=null&&typeof t!="boolean"},nf=zw(function(e){return Hw(e)?e:e.replace(gk,"-$&").toLowerCase()}),_v=function(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(vk,function(n,i,a){return Hr={name:i,styles:a,next:Hr},i})}return mk[t]!==1&&!Hw(t)&&typeof r=="number"&&r!==0?r+"px":r};function zo(e,t,r){if(r==null)return"";var n=r;if(n.__emotion_styles!==void 0)return n;switch(typeof r){case"boolean":return"";case"object":{var i=r;if(i.anim===1)return Hr={name:i.name,styles:i.styles,next:Hr},i.name;var a=r;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)Hr={name:o.name,styles:o.styles,next:Hr},o=o.next;var s=a.styles+";";return s}return yk(e,t,r)}case"function":{if(e!==void 0){var l=Hr,c=r(e);return Hr=l,zo(e,t,c)}break}}var u=r;if(t==null)return u;var f=t[u];return f!==void 0?f:u}function yk(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=zo(e,t,r[i])+";";else for(var a in r){var o=r[a];if(typeof o!="object"){var s=o;t!=null&&t[s]!==void 0?n+=a+"{"+t[s]+"}":wv(s)&&(n+=nf(a)+":"+_v(a,s)+";")}else if(Array.isArray(o)&&typeof o[0]=="string"&&(t==null||t[o[0]]===void 0))for(var l=0;l<o.length;l++)wv(o[l])&&(n+=nf(a)+":"+_v(a,o[l])+";");else{var c=zo(e,t,o);switch(a){case"animation":case"animationName":{n+=nf(a)+":"+c+";";break}default:n+=a+"{"+c+"}"}}}return n}var Ov=/label:\s*([^\s;{]+)\s*(;|$)/g,Hr;function Uw(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var n=!0,i="";Hr=void 0;var a=e[0];if(a==null||a.raw===void 0)n=!1,i+=zo(r,t,a);else{var o=a;i+=o[0]}for(var s=1;s<e.length;s++)if(i+=zo(r,t,e[s]),n){var l=a;i+=l[s]}Ov.lastIndex=0;for(var c="",u;(u=Ov.exec(i))!==null;)c+="-"+u[1];var f=pk(i)+c;return{name:f,styles:i,next:Hr}}var bk=function(t){return t()},xk=E.useInsertionEffect?E.useInsertionEffect:!1,wk=xk||bk,Kw=E.createContext(typeof HTMLElement<"u"?uk({key:"css"}):null);Kw.Provider;var _k=function(t){return k.forwardRef(function(r,n){var i=k.useContext(Kw);return t(r,i,n)})},Ok=E.createContext({}),Sk=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|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|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|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|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,Ak=zw(function(e){return Sk.test(e)||e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)<91}),Ek=Ak,Pk=function(t){return t!=="theme"},Sv=function(t){return typeof t=="string"&&t.charCodeAt(0)>96?Ek:Pk},Av=function(t,r,n){var i;if(r){var a=r.shouldForwardProp;i=t.__emotion_forwardProp&&a?function(o){return t.__emotion_forwardProp(o)&&a(o)}:a}return typeof i!="function"&&n&&(i=t.__emotion_forwardProp),i},Ck=function(t){var r=t.cache,n=t.serialized,i=t.isStringTag;return Vw(r,n,i),wk(function(){return hk(r,n,i)}),null},kk=function e(t,r){var n=t.__emotion_real===t,i=n&&t.__emotion_base||t,a,o;r!==void 0&&(a=r.label,o=r.target);var s=Av(t,r,n),l=s||Sv(i),c=!l("as");return function(){var u=arguments,f=n&&t.__emotion_styles!==void 0?t.__emotion_styles.slice(0):[];if(a!==void 0&&f.push("label:"+a+";"),u[0]==null||u[0].raw===void 0)f.push.apply(f,u);else{var d=u[0];f.push(d[0]);for(var h=u.length,m=1;m<h;m++)f.push(u[m],d[m])}var p=_k(function(g,v,x){var w=c&&g.as||i,y="",_=[],O=g;if(g.theme==null){O={};for(var A in g)O[A]=g[A];O.theme=E.useContext(Ok)}typeof g.className=="string"?y=dk(v.registered,_,g.className):g.className!=null&&(y=g.className+" ");var P=Uw(f.concat(_),v.registered,O);y+=v.key+"-"+P.name,o!==void 0&&(y+=" "+o);var T=c&&s===void 0?Sv(w):l,I={};for(var j in g)c&&j==="as"||T(j)&&(I[j]=g[j]);return I.className=y,x&&(I.ref=x),E.createElement(E.Fragment,null,E.createElement(Ck,{cache:v,serialized:P,isStringTag:typeof w=="string"}),E.createElement(w,I))});return p.displayName=a!==void 0?a:"Styled("+(typeof i=="string"?i:i.displayName||i.name||"Component")+")",p.defaultProps=t.defaultProps,p.__emotion_real=p,p.__emotion_base=i,p.__emotion_styles=f,p.__emotion_forwardProp=s,Object.defineProperty(p,"toString",{value:function(){return"."+o}}),p.withComponent=function(g,v){var x=e(g,th({},r,v,{shouldForwardProp:Av(p,v,!0)}));return x.apply(void 0,f)},p}},Tk=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"],ih=kk.bind(null);Tk.forEach(function(e){ih[e]=ih(e)});/**
|
|
70
70
|
* @mui/styled-engine v7.3.2
|
|
71
71
|
*
|
|
72
72
|
* @license MIT
|
|
73
73
|
* This source code is licensed under the MIT license found in the
|
|
74
74
|
* LICENSE file in the root directory of this source tree.
|
|
75
75
|
*/function Mk(e,t){const r=ih(e,t);return process.env.NODE_ENV!=="production"?(...n)=>{const i=typeof e=="string"?`"${e}"`:"component";return n.length===0?console.error([`MUI: Seems like you called \`styled(${i})()\` without a \`style\` argument.`,'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'].join(`
|
|
76
|
-
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function jk(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ev=[];function Mi(e){return Ev[0]=e,Uw(Ev)}const Dk=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Nk(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=Dk(t),o=Object.keys(a);function s(d){return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r})`}function l(d){return`@media (max-width:${(typeof t[d]=="number"?t[d]:d)-n/100}${r})`}function c(d,h){const m=o.indexOf(h);return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r}) and (max-width:${(m!==-1&&typeof t[o[m]]=="number"?t[o[m]]:h)-n/100}${r})`}function u(d){return o.indexOf(d)+1<o.length?c(d,o[o.indexOf(d)+1]):s(d)}function f(d){const h=o.indexOf(d);return h===0?s(o[1]):h===o.length-1?l(o[h]):c(d,o[o.indexOf(d)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:l,between:c,only:u,not:f,unit:r,...i}}const Ik={borderRadius:4};function qw(e=8,t=mp({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const o=t(a);return typeof o=="number"?`${o}px`:o}).join(" "));return r.mui=!0,r}function Rk(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function Yw(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...o}=e,s=Nk(r),l=qw(i);let c=ar({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Ik,...a}},o);return c=qP(c),c.applyStyles=Rk,c=t.reduce((u,f)=>ar(u,f),c),c.unstable_sxConfig={...Qc,...o?.unstable_sxConfig},c.unstable_sx=function(f){return Ea({sx:f,theme:this})},c}const $k={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function xp(e,t,r="Mui"){const n=$k[t];return n?`${r}-${n}`:`${jP.generate(e)}-${t}`}function Lk(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=xp(e,i,r)}),n}function Gw(e,t=""){return e.displayName||e.name||t}function Pv(e,t,r){const n=Gw(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Bk(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Gw(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Lo.ForwardRef:return Pv(e,e.render,"ForwardRef");case Lo.Memo:return Pv(e,e.type,"memo");default:return}}}function Xw(e){const{variants:t,...r}=e,n={variants:t,style:Mi(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Mi(i.style))}),n}const Fk=Yw();function af(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ai(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function zk(e){return e?(t,r)=>r[e]:null}function Wk(e,t,r){e.theme=Kk(e.theme)?r:e.theme[t]||e.theme}function Fl(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Fl(e,i,r));if(Array.isArray(n?.variants)){let i;if(n.isProcessed)i=r?Ai(n.style,r):n.style;else{const{variants:a,...o}=n;i=r?Ai(Mi(o),r):o}return Zw(e,n.variants,[i],r)}return n?.isProcessed?r?Ai(Mi(n.style),r):n.style:r?Ai(Mi(n),r):n}function Zw(e,t,r=[],n=void 0){let i;e:for(let a=0;a<t.length;a+=1){const o=t[a];if(typeof o.props=="function"){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(const s in o.props)if(e[s]!==o.props[s]&&e.ownerState?.[s]!==o.props[s])continue e;typeof o.style=="function"?(i??={...e,...e.ownerState,ownerState:e.ownerState},r.push(n?Ai(Mi(o.style(i)),n):o.style(i))):r.push(n?Ai(Mi(o.style),n):o.style)}return r}function Vk(e={}){const{themeId:t,defaultTheme:r=Fk,rootShouldForwardProp:n=af,slotShouldForwardProp:i=af}=e;function a(s){Wk(s,t,r)}return(s,l={})=>{jk(s,O=>O.filter(A=>A!==Ea));const{name:c,slot:u,skipVariantsResolver:f,skipSx:d,overridesResolver:h=zk(Jw(u)),...m}=l,p=c&&c.startsWith("Mui")||u?"components":"custom",g=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,v=d||!1;let x=af;u==="Root"||u==="root"?x=n:u?x=i:qk(s)&&(x=void 0);const w=Mk(s,{shouldForwardProp:x,label:Uk(c,u),...m}),y=O=>{if(O.__emotion_real===O)return O;if(typeof O=="function")return function(P){return Fl(P,O,P.theme.modularCssLayers?p:void 0)};if(dn(O)){const A=Xw(O);return function(T){return A.variants?Fl(T,A,T.theme.modularCssLayers?p:void 0):T.theme.modularCssLayers?Ai(A.style,p):A.style}}return O},_=(...O)=>{const A=[],P=O.map(y),T=[];if(A.push(a),c&&h&&T.push(function(D){const R=D.theme.components?.[c]?.styleOverrides;if(!R)return null;const z={};for(const W in R)z[W]=Fl(D,R[W],D.theme.modularCssLayers?"theme":void 0);return h(D,z)}),c&&!g&&T.push(function(D){const R=D.theme?.components?.[c]?.variants;return R?Zw(D,R,[],D.theme.modularCssLayers?"theme":void 0):null}),v||T.push(Ea),Array.isArray(P[0])){const S=P.shift(),D=new Array(A.length).fill(""),M=new Array(T.length).fill("");let R;R=[...D,...S,...M],R.raw=[...D,...S.raw,...M],A.unshift(R)}const I=[...A,...P,...T],j=w(...I);return s.muiName&&(j.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(j.displayName=Hk(c,u,s)),j};return w.withConfig&&(_.withConfig=w.withConfig),_}}function Hk(e,t,r){return e?`${e}${
|
|
76
|
+
`)):n.some(a=>a===void 0)&&console.error(`MUI: the styled(${i})(...args) API requires all its args to be defined.`),r(...n)}:r}function jk(e,t){Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}const Ev=[];function Mi(e){return Ev[0]=e,Uw(Ev)}const Dk=e=>{const t=Object.keys(e).map(r=>({key:r,val:e[r]}))||[];return t.sort((r,n)=>r.val-n.val),t.reduce((r,n)=>({...r,[n.key]:n.val}),{})};function Nk(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:r="px",step:n=5,...i}=e,a=Dk(t),o=Object.keys(a);function s(d){return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r})`}function l(d){return`@media (max-width:${(typeof t[d]=="number"?t[d]:d)-n/100}${r})`}function c(d,h){const m=o.indexOf(h);return`@media (min-width:${typeof t[d]=="number"?t[d]:d}${r}) and (max-width:${(m!==-1&&typeof t[o[m]]=="number"?t[o[m]]:h)-n/100}${r})`}function u(d){return o.indexOf(d)+1<o.length?c(d,o[o.indexOf(d)+1]):s(d)}function f(d){const h=o.indexOf(d);return h===0?s(o[1]):h===o.length-1?l(o[h]):c(d,o[o.indexOf(d)+1]).replace("@media","@media not all and")}return{keys:o,values:a,up:s,down:l,between:c,only:u,not:f,unit:r,...i}}const Ik={borderRadius:4};function qw(e=8,t=mp({spacing:e})){if(e.mui)return e;const r=(...n)=>(process.env.NODE_ENV!=="production"&&(n.length<=4||console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${n.length}`)),(n.length===0?[1]:n).map(a=>{const o=t(a);return typeof o=="number"?`${o}px`:o}).join(" "));return r.mui=!0,r}function Rk(e,t){const r=this;if(r.vars){if(!r.colorSchemes?.[e]||typeof r.getColorSchemeSelector!="function")return{};let n=r.getColorSchemeSelector(e);return n==="&"?t:((n.includes("data-")||n.includes("."))&&(n=`*:where(${n.replace(/\s*&$/,"")}) &`),{[n]:t})}return r.palette.mode===e?t:{}}function Yw(e={},...t){const{breakpoints:r={},palette:n={},spacing:i,shape:a={},...o}=e,s=Nk(r),l=qw(i);let c=ar({breakpoints:s,direction:"ltr",components:{},palette:{mode:"light",...n},spacing:l,shape:{...Ik,...a}},o);return c=qP(c),c.applyStyles=Rk,c=t.reduce((u,f)=>ar(u,f),c),c.unstable_sxConfig={...Qc,...o?.unstable_sxConfig},c.unstable_sx=function(f){return Ea({sx:f,theme:this})},c}const $k={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function xp(e,t,r="Mui"){const n=$k[t];return n?`${r}-${n}`:`${jP.generate(e)}-${t}`}function Lk(e,t,r="Mui"){const n={};return t.forEach(i=>{n[i]=xp(e,i,r)}),n}function Gw(e,t=""){return e.displayName||e.name||t}function Pv(e,t,r){const n=Gw(t);return e.displayName||(n!==""?`${r}(${n})`:r)}function Bk(e){if(e!=null){if(typeof e=="string")return e;if(typeof e=="function")return Gw(e,"Component");if(typeof e=="object")switch(e.$$typeof){case Lo.ForwardRef:return Pv(e,e.render,"ForwardRef");case Lo.Memo:return Pv(e,e.type,"memo");default:return}}}function Xw(e){const{variants:t,...r}=e,n={variants:t,style:Mi(r),isProcessed:!0};return n.style===r||t&&t.forEach(i=>{typeof i.style!="function"&&(i.style=Mi(i.style))}),n}const Fk=Yw();function af(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function Ai(e,t){return t&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${t}{${String(e.styles)}}`),e}function zk(e){return e?(t,r)=>r[e]:null}function Wk(e,t,r){e.theme=Kk(e.theme)?r:e.theme[t]||e.theme}function Fl(e,t,r){const n=typeof t=="function"?t(e):t;if(Array.isArray(n))return n.flatMap(i=>Fl(e,i,r));if(Array.isArray(n?.variants)){let i;if(n.isProcessed)i=r?Ai(n.style,r):n.style;else{const{variants:a,...o}=n;i=r?Ai(Mi(o),r):o}return Zw(e,n.variants,[i],r)}return n?.isProcessed?r?Ai(Mi(n.style),r):n.style:r?Ai(Mi(n),r):n}function Zw(e,t,r=[],n=void 0){let i;e:for(let a=0;a<t.length;a+=1){const o=t[a];if(typeof o.props=="function"){if(i??={...e,...e.ownerState,ownerState:e.ownerState},!o.props(i))continue}else for(const s in o.props)if(e[s]!==o.props[s]&&e.ownerState?.[s]!==o.props[s])continue e;typeof o.style=="function"?(i??={...e,...e.ownerState,ownerState:e.ownerState},r.push(n?Ai(Mi(o.style(i)),n):o.style(i))):r.push(n?Ai(Mi(o.style),n):o.style)}return r}function Vk(e={}){const{themeId:t,defaultTheme:r=Fk,rootShouldForwardProp:n=af,slotShouldForwardProp:i=af}=e;function a(s){Wk(s,t,r)}return(s,l={})=>{jk(s,O=>O.filter(A=>A!==Ea));const{name:c,slot:u,skipVariantsResolver:f,skipSx:d,overridesResolver:h=zk(Jw(u)),...m}=l,p=c&&c.startsWith("Mui")||u?"components":"custom",g=f!==void 0?f:u&&u!=="Root"&&u!=="root"||!1,v=d||!1;let x=af;u==="Root"||u==="root"?x=n:u?x=i:qk(s)&&(x=void 0);const w=Mk(s,{shouldForwardProp:x,label:Uk(c,u),...m}),y=O=>{if(O.__emotion_real===O)return O;if(typeof O=="function")return function(P){return Fl(P,O,P.theme.modularCssLayers?p:void 0)};if(dn(O)){const A=Xw(O);return function(T){return A.variants?Fl(T,A,T.theme.modularCssLayers?p:void 0):T.theme.modularCssLayers?Ai(A.style,p):A.style}}return O},_=(...O)=>{const A=[],P=O.map(y),T=[];if(A.push(a),c&&h&&T.push(function(D){const R=D.theme.components?.[c]?.styleOverrides;if(!R)return null;const z={};for(const W in R)z[W]=Fl(D,R[W],D.theme.modularCssLayers?"theme":void 0);return h(D,z)}),c&&!g&&T.push(function(D){const R=D.theme?.components?.[c]?.variants;return R?Zw(D,R,[],D.theme.modularCssLayers?"theme":void 0):null}),v||T.push(Ea),Array.isArray(P[0])){const S=P.shift(),D=new Array(A.length).fill(""),M=new Array(T.length).fill("");let R;R=[...D,...S,...M],R.raw=[...D,...S.raw,...M],A.unshift(R)}const I=[...A,...P,...T],j=w(...I);return s.muiName&&(j.muiName=s.muiName),process.env.NODE_ENV!=="production"&&(j.displayName=Hk(c,u,s)),j};return w.withConfig&&(_.withConfig=w.withConfig),_}}function Hk(e,t,r){return e?`${e}${Bi(t||"")}`:`Styled(${Bk(r)})`}function Uk(e,t){let r;return process.env.NODE_ENV!=="production"&&e&&(r=`${e}-${Jw(t||"Root")}`),r}function Kk(e){for(const t in e)return!1;return!0}function qk(e){return typeof e=="string"&&e.charCodeAt(0)>96}function Jw(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function ah(e,t,r=!1){const n={...t};for(const i in e)if(Object.prototype.hasOwnProperty.call(e,i)){const a=i;if(a==="components"||a==="slots")n[a]={...e[a],...n[a]};else if(a==="componentsProps"||a==="slotProps"){const o=e[a],s=t[a];if(!s)n[a]=o||{};else if(!o)n[a]=s;else{n[a]={...s};for(const l in o)if(Object.prototype.hasOwnProperty.call(o,l)){const c=l;n[a][c]=ah(o[c],s[c],r)}}}else a==="className"&&r&&t.className?n.className=ye(e?.className,t?.className):a==="style"&&r&&t.style?n.style={...e?.style,...t?.style}:n[a]===void 0&&(n[a]=e[a])}return n}function Yk(e,t=Number.MIN_SAFE_INTEGER,r=Number.MAX_SAFE_INTEGER){return Math.max(t,Math.min(e,r))}function wp(e,t=0,r=1){return process.env.NODE_ENV!=="production"&&(e<t||e>r)&&console.error(`MUI: The value provided ${e} is out of range [${t}, ${r}].`),Yk(e,t,r)}function Gk(e){e=e.slice(1);const t=new RegExp(`.{1,${e.length>=6?2:1}}`,"g");let r=e.match(t);return r&&r[0].length===1&&(r=r.map(n=>n+n)),process.env.NODE_ENV!=="production"&&e.length!==e.trim().length&&console.error(`MUI: The color: "${e}" is invalid. Make sure the color input doesn't contain leading/trailing space.`),r?`rgb${r.length===4?"a":""}(${r.map((n,i)=>i<3?parseInt(n,16):Math.round(parseInt(n,16)/255*1e3)/1e3).join(", ")})`:""}function Un(e){if(e.type)return e;if(e.charAt(0)==="#")return Un(Gk(e));const t=e.indexOf("("),r=e.substring(0,t);if(!["rgb","rgba","hsl","hsla","color"].includes(r))throw new Error(process.env.NODE_ENV!=="production"?`MUI: Unsupported \`${e}\` color.
|
|
77
77
|
The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().`:Hn(9,e));let n=e.substring(t+1,e.length-1),i;if(r==="color"){if(n=n.split(" "),i=n.shift(),n.length===4&&n[3].charAt(0)==="/"&&(n[3]=n[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(i))throw new Error(process.env.NODE_ENV!=="production"?`MUI: unsupported \`${i}\` color space.
|
|
78
|
-
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Hn(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Xk=e=>{const t=Un(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},wo=(e,t)=>{try{return Xk(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function nu(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Qw(e){e=Un(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),o=(c,u=(c+r/30)%12)=>i-a*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),nu({type:s,values:l})}function oh(e){e=Un(e);let t=e.type==="hsl"||e.type==="hsla"?Un(Qw(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Cv(e,t){const r=oh(e),n=oh(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function e_(e,t){return e=Un(e),t=wp(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,nu(e)}function pi(e,t,r){try{return e_(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function iu(e,t){if(e=Un(e),t=wp(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return nu(e)}function ke(e,t,r){try{return iu(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function au(e,t){if(e=Un(e),t=wp(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return nu(e)}function Te(e,t,r){try{return au(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function Zk(e,t=.15){return oh(e)>.5?iu(e,t):au(e,t)}function Js(e,t,r){try{return Zk(e,t)}catch{return e}}const Jk=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(be.node,be.object);function Qk(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?ah(i.defaultProps,n,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?ah(i,n,t.components.mergeClassNameAndStyle):n}function eT({props:e,name:t}){const r=E.useContext(Jk);return Qk({props:e,name:t,theme:{components:r}})}const kv={theme:void 0};function tT(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(kv.theme=i.theme,a=Xw(e(kv)),t=a,r=i.theme),a}}function rT(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const Tv=(e,t,r,n=[])=>{let i=e;t.forEach((a,o)=>{o===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},nT=(e,t,r)=>{function n(i,a=[],o=[]){Object.entries(i).forEach(([s,l])=>{(!r||r&&!r([...a,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,s],Array.isArray(l)?[...o,s]:o):t([...a,s],l,o))})}n(e)},iT=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function of(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},o={};return nT(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(s,l))){const u=`--${r?`${r}-`:""}${s.join("-")}`,f=iT(s,l);Object.assign(i,{[u]:f}),Tv(a,s,`var(${u})`,c),Tv(o,s,`var(${u}, ${f})`,c)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function aT(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:l="light",...c}=e,{vars:u,css:f,varsWithDefaults:d}=of(c,t);let h=d;const m={},{[l]:p,...g}=o;if(Object.entries(g||{}).forEach(([y,_])=>{const{vars:O,css:A,varsWithDefaults:P}=of(_,t);h=ar(h,P),m[y]={css:A,vars:O}}),p){const{css:y,vars:_,varsWithDefaults:O}=of(p,t);h=ar(h,O),m[l]={css:y,vars:_}}function v(y,_){let O=i;if(i==="class"&&(O=".%s"),i==="data"&&(O="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(O=`[${i}="%s"]`),y){if(O==="media")return e.defaultColorScheme===y?":root":{[`@media (prefers-color-scheme: ${o[y]?.palette?.mode||y})`]:{":root":_}};if(O)return e.defaultColorScheme===y?`:root, ${O.replace("%s",String(y))}`:O.replace("%s",String(y))}return":root"}return{vars:h,generateThemeVars:()=>{let y={...u};return Object.entries(m).forEach(([,{vars:_}])=>{y=ar(y,_)}),y},generateStyleSheets:()=>{const y=[],_=e.defaultColorScheme||"light";function O(T,I){Object.keys(I).length&&y.push(typeof T=="string"?{[T]:{...I}}:T)}O(r(void 0,{...f}),f);const{[_]:A,...P}=m;if(A){const{css:T}=A,I=o[_]?.palette?.mode,j=!n&&I?{colorScheme:I,...T}:{...T};O(r(_,{...j}),j)}return Object.entries(P).forEach(([T,{css:I}])=>{const j=o[T]?.palette?.mode,S=!n&&j?{colorScheme:j,...I}:{...I};O(r(T,{...S}),S)}),a&&y.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),y}}}function oT(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Wo={black:"#000",white:"#fff"},sT={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},
|
|
78
|
+
The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.`:Hn(10,i))}else n=n.split(",");return n=n.map(a=>parseFloat(a)),{type:r,values:n,colorSpace:i}}const Xk=e=>{const t=Un(e);return t.values.slice(0,3).map((r,n)=>t.type.includes("hsl")&&n!==0?`${r}%`:r).join(" ")},wo=(e,t)=>{try{return Xk(e)}catch{return t&&process.env.NODE_ENV!=="production"&&console.warn(t),e}};function nu(e){const{type:t,colorSpace:r}=e;let{values:n}=e;return t.includes("rgb")?n=n.map((i,a)=>a<3?parseInt(i,10):i):t.includes("hsl")&&(n[1]=`${n[1]}%`,n[2]=`${n[2]}%`),t.includes("color")?n=`${r} ${n.join(" ")}`:n=`${n.join(", ")}`,`${t}(${n})`}function Qw(e){e=Un(e);const{values:t}=e,r=t[0],n=t[1]/100,i=t[2]/100,a=n*Math.min(i,1-i),o=(c,u=(c+r/30)%12)=>i-a*Math.max(Math.min(u-3,9-u,1),-1);let s="rgb";const l=[Math.round(o(0)*255),Math.round(o(8)*255),Math.round(o(4)*255)];return e.type==="hsla"&&(s+="a",l.push(t[3])),nu({type:s,values:l})}function oh(e){e=Un(e);let t=e.type==="hsl"||e.type==="hsla"?Un(Qw(e)).values:e.values;return t=t.map(r=>(e.type!=="color"&&(r/=255),r<=.03928?r/12.92:((r+.055)/1.055)**2.4)),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function Cv(e,t){const r=oh(e),n=oh(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}function e_(e,t){return e=Un(e),t=wp(t),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${t}`:e.values[3]=t,nu(e)}function pi(e,t,r){try{return e_(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function iu(e,t){if(e=Un(e),t=wp(t),e.type.includes("hsl"))e.values[2]*=1-t;else if(e.type.includes("rgb")||e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]*=1-t;return nu(e)}function ke(e,t,r){try{return iu(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function au(e,t){if(e=Un(e),t=wp(t),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*t;else if(e.type.includes("rgb"))for(let r=0;r<3;r+=1)e.values[r]+=(255-e.values[r])*t;else if(e.type.includes("color"))for(let r=0;r<3;r+=1)e.values[r]+=(1-e.values[r])*t;return nu(e)}function Te(e,t,r){try{return au(e,t)}catch{return r&&process.env.NODE_ENV!=="production"&&console.warn(r),e}}function Zk(e,t=.15){return oh(e)>.5?iu(e,t):au(e,t)}function Js(e,t,r){try{return Zk(e,t)}catch{return e}}const Jk=E.createContext(void 0);process.env.NODE_ENV!=="production"&&(be.node,be.object);function Qk(e){const{theme:t,name:r,props:n}=e;if(!t||!t.components||!t.components[r])return n;const i=t.components[r];return i.defaultProps?ah(i.defaultProps,n,t.components.mergeClassNameAndStyle):!i.styleOverrides&&!i.variants?ah(i,n,t.components.mergeClassNameAndStyle):n}function eT({props:e,name:t}){const r=E.useContext(Jk);return Qk({props:e,name:t,theme:{components:r}})}const kv={theme:void 0};function tT(e){let t,r;return function(i){let a=t;return(a===void 0||i.theme!==r)&&(kv.theme=i.theme,a=Xw(e(kv)),t=a,r=i.theme),a}}function rT(e=""){function t(...n){if(!n.length)return"";const i=n[0];return typeof i=="string"&&!i.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, var(--${e?`${e}-`:""}${i}${t(...n.slice(1))})`:`, ${i}`}return(n,...i)=>`var(--${e?`${e}-`:""}${n}${t(...i)})`}const Tv=(e,t,r,n=[])=>{let i=e;t.forEach((a,o)=>{o===t.length-1?Array.isArray(i)?i[Number(a)]=r:i&&typeof i=="object"&&(i[a]=r):i&&typeof i=="object"&&(i[a]||(i[a]=n.includes(a)?[]:{}),i=i[a])})},nT=(e,t,r)=>{function n(i,a=[],o=[]){Object.entries(i).forEach(([s,l])=>{(!r||r&&!r([...a,s]))&&l!=null&&(typeof l=="object"&&Object.keys(l).length>0?n(l,[...a,s],Array.isArray(l)?[...o,s]:o):t([...a,s],l,o))})}n(e)},iT=(e,t)=>typeof t=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(n=>e.includes(n))||e[e.length-1].toLowerCase().includes("opacity")?t:`${t}px`:t;function of(e,t){const{prefix:r,shouldSkipGeneratingVar:n}=t||{},i={},a={},o={};return nT(e,(s,l,c)=>{if((typeof l=="string"||typeof l=="number")&&(!n||!n(s,l))){const u=`--${r?`${r}-`:""}${s.join("-")}`,f=iT(s,l);Object.assign(i,{[u]:f}),Tv(a,s,`var(${u})`,c),Tv(o,s,`var(${u}, ${f})`,c)}},s=>s[0]==="vars"),{css:i,vars:a,varsWithDefaults:o}}function aT(e,t={}){const{getSelector:r=v,disableCssColorScheme:n,colorSchemeSelector:i,enableContrastVars:a}=t,{colorSchemes:o={},components:s,defaultColorScheme:l="light",...c}=e,{vars:u,css:f,varsWithDefaults:d}=of(c,t);let h=d;const m={},{[l]:p,...g}=o;if(Object.entries(g||{}).forEach(([y,_])=>{const{vars:O,css:A,varsWithDefaults:P}=of(_,t);h=ar(h,P),m[y]={css:A,vars:O}}),p){const{css:y,vars:_,varsWithDefaults:O}=of(p,t);h=ar(h,O),m[l]={css:y,vars:_}}function v(y,_){let O=i;if(i==="class"&&(O=".%s"),i==="data"&&(O="[data-%s]"),i?.startsWith("data-")&&!i.includes("%s")&&(O=`[${i}="%s"]`),y){if(O==="media")return e.defaultColorScheme===y?":root":{[`@media (prefers-color-scheme: ${o[y]?.palette?.mode||y})`]:{":root":_}};if(O)return e.defaultColorScheme===y?`:root, ${O.replace("%s",String(y))}`:O.replace("%s",String(y))}return":root"}return{vars:h,generateThemeVars:()=>{let y={...u};return Object.entries(m).forEach(([,{vars:_}])=>{y=ar(y,_)}),y},generateStyleSheets:()=>{const y=[],_=e.defaultColorScheme||"light";function O(T,I){Object.keys(I).length&&y.push(typeof T=="string"?{[T]:{...I}}:T)}O(r(void 0,{...f}),f);const{[_]:A,...P}=m;if(A){const{css:T}=A,I=o[_]?.palette?.mode,j=!n&&I?{colorScheme:I,...T}:{...T};O(r(_,{...j}),j)}return Object.entries(P).forEach(([T,{css:I}])=>{const j=o[T]?.palette?.mode,S=!n&&j?{colorScheme:j,...I}:{...I};O(r(T,{...S}),S)}),a&&y.push({":root":{"--__l-threshold":"0.7","--__l":"clamp(0, (l / var(--__l-threshold) - 1) * -infinity, 1)","--__a":"clamp(0.87, (l / var(--__l-threshold) - 1) * -infinity, 1)"}}),y}}}function oT(e){return function(r){return e==="media"?(process.env.NODE_ENV!=="production"&&r!=="light"&&r!=="dark"&&console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${r}'.`),`@media (prefers-color-scheme: ${r})`):e?e.startsWith("data-")&&!e.includes("%s")?`[${e}="${r}"] &`:e==="class"?`.${r} &`:e==="data"?`[data-${r}] &`:`${e.replace("%s",r)} &`:"&"}}const Wo={black:"#000",white:"#fff"},sT={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},sa={50:"#f3e5f5",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",700:"#7b1fa2"},la={300:"#e57373",400:"#ef5350",500:"#f44336",700:"#d32f2f",800:"#c62828"},io={300:"#ffb74d",400:"#ffa726",500:"#ff9800",700:"#f57c00",900:"#e65100"},ca={50:"#e3f2fd",200:"#90caf9",400:"#42a5f5",700:"#1976d2",800:"#1565c0"},ua={300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",700:"#0288d1",900:"#01579b"},fa={300:"#81c784",400:"#66bb6a",500:"#4caf50",700:"#388e3c",800:"#2e7d32",900:"#1b5e20"};function t_(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:Wo.white,default:Wo.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const r_=t_();function n_(){return{text:{primary:Wo.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:Wo.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const sh=n_();function Mv(e,t,r,n){const i=n.light||n,a=n.dark||n*1.5;e[t]||(e.hasOwnProperty(r)?e[t]=e[r]:t==="light"?e.light=au(e.main,i):t==="dark"&&(e.dark=iu(e.main,a)))}function jv(e,t,r,n,i){const a=i.light||i,o=i.dark||i*1.5;t[r]||(t.hasOwnProperty(n)?t[r]=t[n]:r==="light"?t.light=`color-mix(in ${e}, ${t.main}, #fff ${(a*100).toFixed(0)}%)`:r==="dark"&&(t.dark=`color-mix(in ${e}, ${t.main}, #000 ${(o*100).toFixed(0)}%)`))}function lT(e="light"){return e==="dark"?{main:ca[200],light:ca[50],dark:ca[400]}:{main:ca[700],light:ca[400],dark:ca[800]}}function cT(e="light"){return e==="dark"?{main:sa[200],light:sa[50],dark:sa[400]}:{main:sa[500],light:sa[300],dark:sa[700]}}function uT(e="light"){return e==="dark"?{main:la[500],light:la[300],dark:la[700]}:{main:la[700],light:la[400],dark:la[800]}}function fT(e="light"){return e==="dark"?{main:ua[400],light:ua[300],dark:ua[700]}:{main:ua[700],light:ua[500],dark:ua[900]}}function dT(e="light"){return e==="dark"?{main:fa[400],light:fa[300],dark:fa[700]}:{main:fa[800],light:fa[500],dark:fa[900]}}function hT(e="light"){return e==="dark"?{main:io[400],light:io[300],dark:io[700]}:{main:"#ed6c02",light:io[500],dark:io[900]}}function pT(e){return`oklch(from ${e} var(--__l) 0 h / var(--__a))`}function _p(e){const{mode:t="light",contrastThreshold:r=3,tonalOffset:n=.2,colorSpace:i,...a}=e,o=e.primary||lT(t),s=e.secondary||cT(t),l=e.error||uT(t),c=e.info||fT(t),u=e.success||dT(t),f=e.warning||hT(t);function d(g){if(i)return pT(g);const v=Cv(g,sh.text.primary)>=r?sh.text.primary:r_.text.primary;if(process.env.NODE_ENV!=="production"){const x=Cv(g,v);x<3&&console.error([`MUI: The contrast ratio of ${x}:1 for ${v} on ${g}`,"falls below the WCAG recommended absolute minimum contrast ratio of 3:1.","https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast"].join(`
|
|
79
79
|
`))}return v}const h=({color:g,name:v,mainShade:x=500,lightShade:w=300,darkShade:y=700})=>{if(g={...g},!g.main&&g[x]&&(g.main=g[x]),!g.hasOwnProperty("main"))throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
|
|
80
80
|
The color object needs to have a \`main\` property or a \`${x}\` property.`:Hn(11,v?` (${v})`:"",x));if(typeof g.main!="string")throw new Error(process.env.NODE_ENV!=="production"?`MUI: The color${v?` (${v})`:""} provided to augmentColor(color) is invalid.
|
|
81
81
|
\`color.main\` should be a string, but \`${JSON.stringify(g.main)}\` was provided instead.
|
|
@@ -100,8 +100,8 @@ theme.transitions = createTransitions(theme.transitions || {});
|
|
|
100
100
|
|
|
101
101
|
export default theme;`}function Rv(e){return typeof e=="number"?`${(e*100).toFixed(0)}%`:`calc((${e}) * 100%)`}const kT=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 TT(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})`:e_(t,kT(r))},lighten(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #fff ${Rv(r)})`:au(t,r)},darken(t,r){const n=this||e;return n.colorSpace?`color-mix(in ${n.colorSpace}, ${t}, #000 ${Rv(r)})`:iu(t,r)}})}function lh(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.":Hn(20));const f=_p({...a,colorSpace:c}),d=Yw(e);let h=ar(d,{mixins:gT(d.breakpoints,n),palette:f,shadows:_T.slice(),typography:yT(f,s),transitions:ET(o),zIndex:{...PT}});if(h=ar(h,u),h=t.reduce((m,p)=>ar(m,p),h),process.env.NODE_ENV!=="production"){const m=["active","checked","completed","disabled","error","expanded","focused","focusVisible","required","selected"],p=(g,v)=>{let x;for(x in g){const w=g[x];if(m.includes(x)&&Object.keys(w).length>0){if(process.env.NODE_ENV!=="production"){const y=xp("",x);console.error([`MUI: The \`${v}\` component increases the CSS specificity of the \`${x}\` internal state.`,"You can not override it like this: ",JSON.stringify(g,null,2),"",`Instead, you need to use the '&.${y}' syntax:`,JSON.stringify({root:{[`&.${y}`]:w}},null,2),"","https://mui.com/r/state-classes-guide"].join(`
|
|
102
102
|
`))}g[x]={}}}};Object.keys(h.components).forEach(g=>{const v=h.components[g].styleOverrides;v&&g.startsWith("Mui")&&p(v,g)})}return h.unstable_sxConfig={...Qc,...u?.unstable_sxConfig},h.unstable_sx=function(p){return Ea({sx:p,theme:this})},h.toRuntimeSource=i_,TT(h),h}function MT(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 jT=[...Array(25)].map((e,t)=>{if(t===0)return"none";const r=MT(t);return`linear-gradient(rgba(255 255 255 / ${r}), rgba(255 255 255 / ${r}))`});function a_(e){return{inputPlaceholder:e==="dark"?.5:.42,inputUnderline:e==="dark"?.7:.42,switchTrackDisabled:e==="dark"?.2:.12,switchTrack:e==="dark"?.3:.38}}function o_(e){return e==="dark"?jT:[]}function DT(e){const{palette:t={mode:"light"},opacity:r,overlays:n,colorSpace:i,...a}=e,o=_p({...t,colorSpace:i});return{palette:o,opacity:{...a_(o.mode),...r},overlays:n||o_(o.mode),...a}}function NT(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 IT=e=>[...[...Array(25)].map((t,r)=>`--${e?`${e}-`:""}overlays-${r}`),`--${e?`${e}-`:""}palette-AppBar-darkBg`,`--${e?`${e}-`:""}palette-AppBar-darkColor`],RT=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 IT(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 $T(e,t){t.forEach(r=>{e[r]||(e[r]={})})}function B(e,t,r){!e[t]&&r&&(e[t]=r)}function _o(e){return typeof e!="string"||!e.startsWith("hsl")?e:Qw(e)}function on(e,t){`${t}Channel`in e||(e[`${t}Channel`]=wo(_o(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 LT(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Br=e=>{try{return e()}catch{}},BT=(e="mui")=>rT(e);function sf(e,t,r,n,i){if(!r)return;r=r===!0?{}:r;const a=i==="dark"?"dark":"light";if(!n){t[i]=DT({...r,palette:{mode:a,...r?.palette},colorSpace:e});return}const{palette:o,...s}=lh({...n,palette:{mode:a,...r?.palette},colorSpace:e});return t[i]={...r,palette:o,opacity:{...a_(a),...r?.opacity},overlays:r?.overlays||o_(a)},s}function FT(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=NT,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=BT(a),{[d]:m,light:p,dark:g,...v}=r,x={...v};let w=m;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:Hn(21,d));let y;o&&(y="oklch");const _=sf(y,x,w,u,d);p&&!x.light&&sf(y,x,p,void 0,"light"),g&&!x.dark&&sf(y,x,g,void 0,"dark");let O={defaultColorScheme:d,..._,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:h,colorSchemes:x,font:{...mT(_.typography),..._.font},spacing:LT(u.spacing)};Object.keys(O.colorSchemes).forEach(j=>{const S=O.colorSchemes[j].palette,D=R=>{const z=R.split("-"),W=z[1],Y=z[2];return h(R,S[W][Y])};S.mode==="light"&&(B(S.common,"background","#fff"),B(S.common,"onBackground","#000")),S.mode==="dark"&&(B(S.common,"background","#000"),B(S.common,"onBackground","#fff"));function M(R,z,W){if(y){let Y;return R===pi&&(Y=`transparent ${((1-W)*100).toFixed(0)}%`),R===ke&&(Y=`#000 ${(W*100).toFixed(0)}%`),R===Te&&(Y=`#fff ${(W*100).toFixed(0)}%`),`color-mix(in ${y}, ${z}, ${Y})`}return R(z,W)}if($T(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){B(S.Alert,"errorColor",M(ke,S.error.light,.6)),B(S.Alert,"infoColor",M(ke,S.info.light,.6)),B(S.Alert,"successColor",M(ke,S.success.light,.6)),B(S.Alert,"warningColor",M(ke,S.warning.light,.6)),B(S.Alert,"errorFilledBg",D("palette-error-main")),B(S.Alert,"infoFilledBg",D("palette-info-main")),B(S.Alert,"successFilledBg",D("palette-success-main")),B(S.Alert,"warningFilledBg",D("palette-warning-main")),B(S.Alert,"errorFilledColor",Br(()=>S.getContrastText(S.error.main))),B(S.Alert,"infoFilledColor",Br(()=>S.getContrastText(S.info.main))),B(S.Alert,"successFilledColor",Br(()=>S.getContrastText(S.success.main))),B(S.Alert,"warningFilledColor",Br(()=>S.getContrastText(S.warning.main))),B(S.Alert,"errorStandardBg",M(Te,S.error.light,.9)),B(S.Alert,"infoStandardBg",M(Te,S.info.light,.9)),B(S.Alert,"successStandardBg",M(Te,S.success.light,.9)),B(S.Alert,"warningStandardBg",M(Te,S.warning.light,.9)),B(S.Alert,"errorIconColor",D("palette-error-main")),B(S.Alert,"infoIconColor",D("palette-info-main")),B(S.Alert,"successIconColor",D("palette-success-main")),B(S.Alert,"warningIconColor",D("palette-warning-main")),B(S.AppBar,"defaultBg",D("palette-grey-100")),B(S.Avatar,"defaultBg",D("palette-grey-400")),B(S.Button,"inheritContainedBg",D("palette-grey-300")),B(S.Button,"inheritContainedHoverBg",D("palette-grey-A100")),B(S.Chip,"defaultBorder",D("palette-grey-400")),B(S.Chip,"defaultAvatarColor",D("palette-grey-700")),B(S.Chip,"defaultIconColor",D("palette-grey-700")),B(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),B(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),B(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),B(S.LinearProgress,"primaryBg",M(Te,S.primary.main,.62)),B(S.LinearProgress,"secondaryBg",M(Te,S.secondary.main,.62)),B(S.LinearProgress,"errorBg",M(Te,S.error.main,.62)),B(S.LinearProgress,"infoBg",M(Te,S.info.main,.62)),B(S.LinearProgress,"successBg",M(Te,S.success.main,.62)),B(S.LinearProgress,"warningBg",M(Te,S.warning.main,.62)),B(S.Skeleton,"bg",y?M(pi,S.text.primary,.11):`rgba(${D("palette-text-primaryChannel")} / 0.11)`),B(S.Slider,"primaryTrack",M(Te,S.primary.main,.62)),B(S.Slider,"secondaryTrack",M(Te,S.secondary.main,.62)),B(S.Slider,"errorTrack",M(Te,S.error.main,.62)),B(S.Slider,"infoTrack",M(Te,S.info.main,.62)),B(S.Slider,"successTrack",M(Te,S.success.main,.62)),B(S.Slider,"warningTrack",M(Te,S.warning.main,.62));const R=y?M(ke,S.background.default,.6825):Js(S.background.default,.8);B(S.SnackbarContent,"bg",R),B(S.SnackbarContent,"color",Br(()=>y?sh.text.primary:S.getContrastText(R))),B(S.SpeedDialAction,"fabHoverBg",Js(S.background.paper,.15)),B(S.StepConnector,"border",D("palette-grey-400")),B(S.StepContent,"border",D("palette-grey-400")),B(S.Switch,"defaultColor",D("palette-common-white")),B(S.Switch,"defaultDisabledColor",D("palette-grey-100")),B(S.Switch,"primaryDisabledColor",M(Te,S.primary.main,.62)),B(S.Switch,"secondaryDisabledColor",M(Te,S.secondary.main,.62)),B(S.Switch,"errorDisabledColor",M(Te,S.error.main,.62)),B(S.Switch,"infoDisabledColor",M(Te,S.info.main,.62)),B(S.Switch,"successDisabledColor",M(Te,S.success.main,.62)),B(S.Switch,"warningDisabledColor",M(Te,S.warning.main,.62)),B(S.TableCell,"border",M(Te,M(pi,S.divider,1),.88)),B(S.Tooltip,"bg",M(pi,S.grey[700],.92))}if(S.mode==="dark"){B(S.Alert,"errorColor",M(Te,S.error.light,.6)),B(S.Alert,"infoColor",M(Te,S.info.light,.6)),B(S.Alert,"successColor",M(Te,S.success.light,.6)),B(S.Alert,"warningColor",M(Te,S.warning.light,.6)),B(S.Alert,"errorFilledBg",D("palette-error-dark")),B(S.Alert,"infoFilledBg",D("palette-info-dark")),B(S.Alert,"successFilledBg",D("palette-success-dark")),B(S.Alert,"warningFilledBg",D("palette-warning-dark")),B(S.Alert,"errorFilledColor",Br(()=>S.getContrastText(S.error.dark))),B(S.Alert,"infoFilledColor",Br(()=>S.getContrastText(S.info.dark))),B(S.Alert,"successFilledColor",Br(()=>S.getContrastText(S.success.dark))),B(S.Alert,"warningFilledColor",Br(()=>S.getContrastText(S.warning.dark))),B(S.Alert,"errorStandardBg",M(ke,S.error.light,.9)),B(S.Alert,"infoStandardBg",M(ke,S.info.light,.9)),B(S.Alert,"successStandardBg",M(ke,S.success.light,.9)),B(S.Alert,"warningStandardBg",M(ke,S.warning.light,.9)),B(S.Alert,"errorIconColor",D("palette-error-main")),B(S.Alert,"infoIconColor",D("palette-info-main")),B(S.Alert,"successIconColor",D("palette-success-main")),B(S.Alert,"warningIconColor",D("palette-warning-main")),B(S.AppBar,"defaultBg",D("palette-grey-900")),B(S.AppBar,"darkBg",D("palette-background-paper")),B(S.AppBar,"darkColor",D("palette-text-primary")),B(S.Avatar,"defaultBg",D("palette-grey-600")),B(S.Button,"inheritContainedBg",D("palette-grey-800")),B(S.Button,"inheritContainedHoverBg",D("palette-grey-700")),B(S.Chip,"defaultBorder",D("palette-grey-700")),B(S.Chip,"defaultAvatarColor",D("palette-grey-300")),B(S.Chip,"defaultIconColor",D("palette-grey-300")),B(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),B(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),B(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),B(S.LinearProgress,"primaryBg",M(ke,S.primary.main,.5)),B(S.LinearProgress,"secondaryBg",M(ke,S.secondary.main,.5)),B(S.LinearProgress,"errorBg",M(ke,S.error.main,.5)),B(S.LinearProgress,"infoBg",M(ke,S.info.main,.5)),B(S.LinearProgress,"successBg",M(ke,S.success.main,.5)),B(S.LinearProgress,"warningBg",M(ke,S.warning.main,.5)),B(S.Skeleton,"bg",y?M(pi,S.text.primary,.13):`rgba(${D("palette-text-primaryChannel")} / 0.13)`),B(S.Slider,"primaryTrack",M(ke,S.primary.main,.5)),B(S.Slider,"secondaryTrack",M(ke,S.secondary.main,.5)),B(S.Slider,"errorTrack",M(ke,S.error.main,.5)),B(S.Slider,"infoTrack",M(ke,S.info.main,.5)),B(S.Slider,"successTrack",M(ke,S.success.main,.5)),B(S.Slider,"warningTrack",M(ke,S.warning.main,.5));const R=y?M(Te,S.background.default,.985):Js(S.background.default,.98);B(S.SnackbarContent,"bg",R),B(S.SnackbarContent,"color",Br(()=>y?r_.text.primary:S.getContrastText(R))),B(S.SpeedDialAction,"fabHoverBg",Js(S.background.paper,.15)),B(S.StepConnector,"border",D("palette-grey-600")),B(S.StepContent,"border",D("palette-grey-600")),B(S.Switch,"defaultColor",D("palette-grey-300")),B(S.Switch,"defaultDisabledColor",D("palette-grey-600")),B(S.Switch,"primaryDisabledColor",M(ke,S.primary.main,.55)),B(S.Switch,"secondaryDisabledColor",M(ke,S.secondary.main,.55)),B(S.Switch,"errorDisabledColor",M(ke,S.error.main,.55)),B(S.Switch,"infoDisabledColor",M(ke,S.info.main,.55)),B(S.Switch,"successDisabledColor",M(ke,S.success.main,.55)),B(S.Switch,"warningDisabledColor",M(ke,S.warning.main,.55)),B(S.TableCell,"border",M(ke,M(pi,S.divider,1),.68)),B(S.Tooltip,"bg",M(pi,S.grey[700],.92))}on(S.background,"default"),on(S.background,"paper"),on(S.common,"background"),on(S.common,"onBackground"),on(S,"divider"),Object.keys(S).forEach(R=>{const z=S[R];R!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&B(S[R],"mainChannel",wo(_o(z.main))),z.light&&B(S[R],"lightChannel",wo(_o(z.light))),z.dark&&B(S[R],"darkChannel",wo(_o(z.dark))),z.contrastText&&B(S[R],"contrastTextChannel",wo(_o(z.contrastText))),R==="text"&&(on(S[R],"primary"),on(S[R],"secondary")),R==="action"&&(z.active&&on(S[R],"active"),z.selected&&on(S[R],"selected")))})}),O=t.reduce((j,S)=>ar(j,S),O);const A={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:RT(O),enableContrastVars:o},{vars:P,generateThemeVars:T,generateStyleSheets:I}=aT(O,A);return O.vars=P,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([j,S])=>{O[j]=S}),O.generateThemeVars=T,O.generateStyleSheets=I,O.generateSpacing=function(){return qw(u.spacing,mp(this))},O.getColorSchemeSelector=oT(l),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=s,O.unstable_sxConfig={...Qc,...u?.unstable_sxConfig},O.unstable_sx=function(S){return Ea({sx:S,theme:this})},O.toRuntimeSource=i_,O}function $v(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:_p({...r===!0?{}:r.palette,mode:t})})}function zT(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 lh(e,...t);let u=r;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const f=lh({...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},$v(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},$v(f,"light",c.light)),f}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),FT({...o,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const WT=zT(),VT="$$material";function HT(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const UT=e=>HT(e)&&e!=="classes",KT=Vk({themeId:VT,defaultTheme:WT,rootShouldForwardProp:UT}),qT=tT;process.env.NODE_ENV!=="production"&&(be.node,be.object.isRequired);function YT(e){return eT(e)}function GT(e){return xp("MuiSvgIcon",e)}Lk("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const XT=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${Fi(t)}`,`fontSize${Fi(r)}`]};return zP(i,GT,n)},ZT=KT("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Fi(r.color)}`],t[`fontSize${Fi(r.fontSize)}`]]}})(qT(({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}}]}))),Yl=E.forwardRef(function(t,r){const n=YT({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=E.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=XT(p);return b.jsxs(ZT,{as:s,className:ye(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?b.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(Yl.propTypes={children:be.node,classes:be.object,className:be.string,color:be.oneOfType([be.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),be.string]),component:be.elementType,fontSize:be.oneOfType([be.oneOf(["inherit","large","medium","small"]),be.string]),htmlColor:be.string,inheritViewBox:be.bool,shapeRendering:be.string,sx:be.oneOfType([be.arrayOf(be.oneOfType([be.func,be.object,be.bool])),be.func,be.object]),titleAccess:be.string,viewBox:be.string});Yl.muiName="SvgIcon";function ou(e,t){function r(n,i){return b.jsx(Yl,{"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=Yl.muiName,E.memo(E.forwardRef(r))}const JT=ou(b.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"),ms=ou(b.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"),QT=ou(b.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"),_t=ou(b.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 s_={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Lv=k.createContext&&k.createContext(s_),eM=["attr","size","title"];function tM(e,t){if(e==null)return{};var r=rM(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 rM(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 Gl(){return Gl=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},Gl.apply(this,arguments)}function Bv(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 Xl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bv(Object(r),!0).forEach(function(n){nM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nM(e,t,r){return t=iM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iM(e){var t=aM(e,"string");return typeof t=="symbol"?t:t+""}function aM(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 l_(e){return e&&e.map((t,r)=>k.createElement(t.tag,Xl({key:r},t.attr),l_(t.child)))}function Le(e){return t=>k.createElement(oM,Gl({attr:Xl({},e.attr)},t),l_(e.child))}function oM(e){var t=r=>{var{attr:n,size:i,title:a}=e,o=tM(e,eM),s=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),k.createElement("svg",Gl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:l,style:Xl(Xl({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 Lv!==void 0?k.createElement(Lv.Consumer,null,r=>t(r)):t(s_)}function sM(e){return Le({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 lM(e){return Le({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"},child:[]}]})(e)}function cM(e){return Le({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"},child:[]}]})(e)}function uM(e){return Le({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 fM(e){return Le({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 dM({title:e,description:t}){return b.jsxs("div",{className:"flex items-center justify-between px-6 my-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[24px] text-[#121212] font-semibold",children:e}),b.jsx("div",{className:"text-gray-500 text-[14px]",children:t})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-[12px]",children:[b.jsxs("div",{className:"w-full sm:w-auto flex items-center justify-center gap-[8px] bg-white shadow-sm px-2 md:px-6 py-1 rounded-sm text-[#64748B] text-sm hover:bg-slate-50",children:[b.jsx(JT,{fontSize:"12"}),b.jsx("div",{className:" whitespace-nowrap",children:"Last 7 Days"}),b.jsx(uM,{fontSize:"12"})]}),b.jsxs("div",{className:"w-full flex items-center justify-center gap-[8px] bg-white text-[#884EA7] px-2 md:px-6 py-1 rounded-sm shadow-sm hover:bg-purple-50",children:[b.jsx("div",{className:"font-medium whitespace-nowrap",children:"Export Report"}),b.jsx(QT,{fontSize:"12"})]})]})]})}function Fv(e){return Le({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 hM(e){return Le({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 Op(e){return Le({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 pM(e){return Le({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 c_(e){return Le({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 mM(e){return Le({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 u_(e){return Le({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 zv(e){return Le({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 f_(e){return Le({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 Sp(e){return Le({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 gM(e){return Le({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 d_(e){return Le({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 h_(e){return Le({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 p_(e){return Le({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 vM=[{name:"Overview",icon:d_},{name:"Community",icon:Op},{name:"Financials",icon:p_},{name:"Facilities",icon:c_},{name:"Gate & Security",icon:Sp},{name:"Helpdesk",icon:hM},{name:"Engagement",icon:u_}];function yM(){const[e,t]=k.useState("Overview");return b.jsx("div",{className:"flex gap-[8px] p-3",children:vM.map(r=>{const n=r.icon,i=e===r.name;return b.jsxs("button",{onClick:()=>t(r.name),className:`flex items-center gap-[8px] rounded px-4 py-3 text-[14px] leading-[16px] font-medium transition
|
|
104
|
-
${i?"bg-[#FBF5FF] text-[#884EA7]":"bg-white text-[#64748B] hover:bg-gray-50"}`,children:[b.jsx(n,{className:"h-[15px] w-[15px] font-bold"}),r.name]},r.name)})})}const Wv=({color:e})=>b.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),gs=({active:e,payload:t})=>!e||!t||!t.length?null:b.jsx("div",{className:"bg-[#121212] text-white !text-[12px] p-3 rounded-lg shadow-lg",children:t.map((r,n)=>b.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[r.color&&b.jsx(Wv,{color:r.color}),r.payload.color&&b.jsx(Wv,{color:r.payload.color}),b.jsx("div",{className:"min-w-[84px] text-[#D1D3D4]",children:r.name}),b.jsx("div",{className:"font-semibold",children:r.value})]},n))}),m_=({value:e})=>{const t=typeof e=="string"?parseFloat(e.replace("%","")):e??0,r=t>=0;return b.jsxs("div",{className:`w-fit p-1 rounded text-[10px] leading-[14px] font-medium flex items-center gap-1 ${r?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:[r?b.jsx(cM,{}):b.jsx(lM,{}),Math.abs(t).toFixed(1),"%"]})},Xi=({title:e,icon:t,period:r,children:n,footer:i,className:a="",childrenClassName:o,titleWeight:s})=>{const l=s==="semi-bold"?600:500;return b.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:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,b.jsx("div",{style:{fontWeight:l,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),r&&b.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:r})]}),b.jsx("div",{className:`flex-1 min-h-0 space-y-[24px] ${o}`,children:n}),i&&b.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:i})]})};var lf={},cf={},Vv;function bM(){return Vv||(Vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(cf)),cf}var uf={},Hv;function g_(){return Hv||(Hv=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})(uf)),uf}var ff={},Uv;function v_(){return Uv||(Uv=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})(ff)),ff}var df={},Kv;function Ap(){return Kv||(Kv=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})(df)),df}var qv;function Ep(){return qv||(qv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bM(),r=g_(),n=v_(),i=Ap();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})(lf)),lf}var hf,Yv;function xM(){return Yv||(Yv=1,hf=Ep().get),hf}var wM=xM();const zi=En(wM);var wt=e=>e===0?0:e>0?1:-1,sr=e=>typeof e=="number"&&e!=+e,Ei=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ae=e=>(typeof e=="number"||e instanceof Number)&&!sr(e),Zr=e=>ae(e)||typeof e=="string",_M=0,Vo=e=>{var t=++_M;return"".concat(e||"").concat(t)},It=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(!ae(t)&&typeof t!="string")return n;var a;if(Ei(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return sr(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},y_=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 et(e,t,r){return ae(e)&&ae(t)?e+r*(t-e):t}function b_(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):zi(n,t))===r)}var Ge=e=>e===null||typeof e>"u",vs=e=>Ge(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),OM=["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 Pp(e){if(typeof e!="string")return!1;var t=OM;return t.includes(e)}var SM=["viewBox","children"],Gv=["points","pathLength"],pf={svg:SM,polygon:Gv,polyline:Gv},Cp=(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=>{Pp(i)&&(n[i]=(a=>r[i](r,a)))}),n},AM=(e,t,r)=>n=>(e(t,r,n),null),su=(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];Pp(i)&&typeof a=="function"&&(n||(n={}),n[i]=AM(a,t,r))}),n},EM=["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 x_(e){if(typeof e!="string")return!1;var t=EM;return t.includes(e)}function tn(e){var t=Object.entries(e).filter(r=>{var[n]=r;return x_(n)});return Object.fromEntries(t)}var Xv=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",Zv=null,mf=null,w_=e=>{if(e===Zv&&Array.isArray(mf))return mf;var t=[];return k.Children.forEach(e,r=>{Ge(r)||(Lo.isFragment(r)?t=t.concat(w_(r.props.children)):t.push(r))}),mf=t,Zv=e,t};function kp(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>Xv(i)):n=[Xv(t)],w_(e).forEach(i=>{var a=zi(i,"type.displayName")||zi(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var __=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,PM=(e,t,r,n)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var a=(i=n&&pf?.[n])!==null&&i!==void 0?i:[],o=t.startsWith("data-"),s=typeof e!="function"&&(!!n&&a.includes(t)||x_(t)),l=!!r&&Pp(t);return o||s||l},Ze=(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;PM((o=n)===null||o===void 0?void 0:o[a],a,t,r)&&(i[a]=n[a])}),i},CM=["children","width","height","viewBox","className","style","title","desc"];function ch(){return ch=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},ch.apply(null,arguments)}function kM(e,t){if(e==null)return{};var r,n,i=TM(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 TM(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 O_=k.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:l,desc:c}=e,u=kM(e,CM),f=a||{width:n,height:i,x:0,y:0},d=ye("recharts-surface",o);return E.createElement("svg",ch({},Ze(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}),E.createElement("title",null,l),E.createElement("desc",null,c),r)}),MM=["children","className"];function uh(){return uh=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},uh.apply(null,arguments)}function jM(e,t){if(e==null)return{};var r,n,i=DM(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 DM(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 Ct=E.forwardRef((e,t)=>{var{children:r,className:n}=e,i=jM(e,MM),a=ye("recharts-layer",n);return E.createElement("g",uh({className:a},Ze(i,!0),{ref:t}),r)}),NM=k.createContext(null);function Fe(e){return function(){return e}}const S_=Math.cos,Zl=Math.sin,jr=Math.sqrt,Jl=Math.PI,lu=2*Jl,fh=Math.PI,dh=2*fh,bi=1e-6,IM=dh-bi;function A_(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function RM(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return A_;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 $M{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?A_:RM(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>bi)if(!(Math.abs(f*l-c*u)>bi)||!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),x=Math.sqrt(d),w=a*Math.tan((fh-Math.acos((p+d-g)/(2*v*x)))/2),y=w/x,_=w/v;Math.abs(y-1)>bi&&this._append`L${t+y*u},${r+y*f}`,this._append`A${a},${a},0,0,${+(f*h>u*m)},${this._x1=t+_*l},${this._y1=r+_*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)>bi||Math.abs(this._y1-u)>bi)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%dh+dh),d>IM?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>bi&&this._append`A${n},${n},0,${+(d>=fh)},${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 Tp(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 $M(t)}function Mp(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E_(e){this._context=e}E_.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 cu(e){return new E_(e)}function P_(e){return e[0]}function C_(e){return e[1]}function k_(e,t){var r=Fe(!0),n=null,i=cu,a=null,o=Tp(s);e=typeof e=="function"?e:e===void 0?P_:Fe(e),t=typeof t=="function"?t:t===void 0?C_:Fe(t);function s(l){var c,u=(l=Mp(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:Fe(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Fe(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Fe(!!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 Qs(e,t,r){var n=null,i=Fe(!0),a=null,o=cu,s=null,l=Tp(c);e=typeof e=="function"?e:e===void 0?P_:Fe(+e),t=typeof t=="function"?t:Fe(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?C_:Fe(+r);function c(f){var d,h,m,p=(f=Mp(f)).length,g,v=!1,x,w=new Array(p),y=new Array(p);for(a==null&&(s=o(x=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(w[m],y[m]);s.lineEnd(),s.areaEnd()}v&&(w[d]=+e(g,d,f),y[d]=+t(g,d,f),s.point(n?+n(g,d,f):w[d],r?+r(g,d,f):y[d]))}if(x)return s=null,x+""||null}function u(){return k_().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Fe(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Fe(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Fe(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Fe(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Fe(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Fe(+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:Fe(!!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 T_{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 LM(e){return new T_(e,!0)}function BM(e){return new T_(e,!1)}const jp={draw(e,t){const r=jr(t/Jl);e.moveTo(r,0),e.arc(0,0,r,0,lu)}},FM={draw(e,t){const r=jr(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()}},M_=jr(1/3),zM=M_*2,WM={draw(e,t){const r=jr(t/zM),n=r*M_;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},VM={draw(e,t){const r=jr(t),n=-r/2;e.rect(n,n,r,r)}},HM=.8908130915292852,j_=Zl(Jl/10)/Zl(7*Jl/10),UM=Zl(lu/10)*j_,KM=-S_(lu/10)*j_,qM={draw(e,t){const r=jr(t*HM),n=UM*r,i=KM*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=lu*a/5,s=S_(o),l=Zl(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},gf=jr(3),YM={draw(e,t){const r=-jr(t/(gf*3));e.moveTo(0,r*2),e.lineTo(-gf*r,-r),e.lineTo(gf*r,-r),e.closePath()}},hr=-.5,pr=jr(3)/2,hh=1/jr(12),GM=(hh/2+1)*3,XM={draw(e,t){const r=jr(t/GM),n=r/2,i=r*hh,a=n,o=r*hh+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(hr*n-pr*i,pr*n+hr*i),e.lineTo(hr*a-pr*o,pr*a+hr*o),e.lineTo(hr*s-pr*l,pr*s+hr*l),e.lineTo(hr*n+pr*i,hr*i-pr*n),e.lineTo(hr*a+pr*o,hr*o-pr*a),e.lineTo(hr*s+pr*l,hr*l-pr*s),e.closePath()}};function ZM(e,t){let r=null,n=Tp(i);e=typeof e=="function"?e:Fe(e||jp),t=typeof t=="function"?t:Fe(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:Fe(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Fe(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Ql(){}function ec(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 D_(e){this._context=e}D_.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:ec(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:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JM(e){return new D_(e)}function N_(e){this._context=e}N_.prototype={areaStart:Ql,areaEnd:Ql,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:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QM(e){return new N_(e)}function I_(e){this._context=e}I_.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:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ej(e){return new I_(e)}function R_(e){this._context=e}R_.prototype={areaStart:Ql,areaEnd:Ql,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 tj(e){return new R_(e)}function Jv(e){return e<0?-1:1}function Qv(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(Jv(a)+Jv(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ey(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function vf(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 tc(e){this._context=e}tc.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:vf(this,this._t0,ey(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,vf(this,ey(this,r=Qv(this,e,t)),r);break;default:vf(this,this._t0,r=Qv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function $_(e){this._context=new L_(e)}($_.prototype=Object.create(tc.prototype)).point=function(e,t){tc.prototype.point.call(this,t,e)};function L_(e){this._context=e}L_.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 rj(e){return new tc(e)}function nj(e){return new $_(e)}function B_(e){this._context=e}B_.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=ty(e),i=ty(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 ty(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 ij(e){return new B_(e)}function uu(e,t){this._context=e,this._t=t}uu.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 aj(e){return new uu(e,.5)}function oj(e){return new uu(e,0)}function sj(e){return new uu(e,1)}function Ca(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 ph(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function lj(e,t){return e[t]}function cj(e){const t=[];return t.key=e,t}function uj(){var e=Fe([]),t=ph,r=Ca,n=lj;function i(a){var o=Array.from(e.apply(this,arguments),cj),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=Mp(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:Fe(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Fe(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ph:typeof a=="function"?a:Fe(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Ca,i):r},i}function fj(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}Ca(e,t)}}function dj(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}Ca(e,t)}}function hj(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,Ca(e,t)}}var pj=["type","size","sizeType"];function mh(){return mh=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},mh.apply(null,arguments)}function ry(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 ny(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(r),!0).forEach(function(n){mj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mj(e,t,r){return(t=gj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gj(e){var t=vj(e,"string");return typeof t=="symbol"?t:t+""}function vj(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 yj(e,t){if(e==null)return{};var r,n,i=bj(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 bj(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 F_={symbolCircle:jp,symbolCross:FM,symbolDiamond:WM,symbolSquare:VM,symbolStar:qM,symbolTriangle:YM,symbolWye:XM},xj=Math.PI/180,wj=e=>{var t="symbol".concat(vs(e));return F_[t]||jp},_j=(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*xj;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}},Oj=(e,t)=>{F_["symbol".concat(vs(e))]=t},z_=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=yj(e,pj),a=ny(ny({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var s=()=>{var d=wj(o),h=ZM().type(d).size(_j(r,n,o));return h()},{className:l,cx:c,cy:u}=a,f=Ze(a,!0);return c===+c&&u===+u&&r===+r?E.createElement("path",mh({},f,{className:ye("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};z_.registerSymbol=Oj;var yf={},bf={},iy;function Sj(){return iy||(iy=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})(bf)),bf}var xf={},ay;function W_(){return ay||(ay=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(xf)),xf}var wf={},_f={},Of={},oy;function Aj(){return oy||(oy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Of)),Of}var sy;function Dp(){return sy||(sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Aj();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(_f)),_f}var Sf={},ly;function Ej(){return ly||(ly=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Sf)),Sf}var cy;function Pj(){return cy||(cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dp(),r=Ej();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(wf)),wf}var Af={},Ef={},uy;function Cj(){return uy||(uy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ep();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Ef)),Ef}var Pf={},Cf={},kf={},Tf={},fy;function V_(){return fy||(fy=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})(Tf)),Tf}var Mf={},dy;function H_(){return dy||(dy=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})(Mf)),Mf}var jf={},hy;function U_(){return hy||(hy=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})(jf)),jf}var py;function kj(){return py||(py=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Np(),r=V_(),n=H_(),i=U_();function a(f,d,h){return typeof h!="function"?t.isMatch(f,d):o(f,d,function m(p,g,v,x,w,y){const _=h(p,g,v,x,w,y);return _!==void 0?!!_:o(p,g,m,y)},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 x=!1;for(let w=0;w<f.length;w++){if(p.has(w))continue;const y=f[w];let _=!1;if(h(y,v,g,f,d,m)&&(_=!0),_){p.add(w),x=!0;break}}if(!x)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})(kf)),kf}var my;function Np(){return my||(my=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kj();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Cf)),Cf}var Df={},Nf={},If={},gy;function Tj(){return gy||(gy=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})(If)),If}var Rf={},vy;function K_(){return vy||(vy=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})(Rf)),Rf}var $f={},yy;function q_(){return yy||(yy=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]",x="[object Uint16Array]",w="[object Uint32Array]",y="[object BigUint64Array]",_="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",P="[object BigInt64Array]",T="[object Float32Array]",I="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=u,e.bigInt64ArrayTag=P,e.bigUint64ArrayTag=y,e.booleanTag=i,e.dataViewTag=p,e.dateTag=s,e.errorTag=m,e.float32ArrayTag=T,e.float64ArrayTag=I,e.functionTag=f,e.int16ArrayTag=O,e.int32ArrayTag=A,e.int8ArrayTag=_,e.mapTag=l,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=x,e.uint32ArrayTag=w,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=v})($f)),$f}var Lf={},by;function Mj(){return by||(by=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Lf)),Lf}var xy;function Y_(){return xy||(xy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tj(),r=K_(),n=q_(),i=H_(),a=Mj();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,x]of u)g.set(v,s(x,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],x=Object.getOwnPropertyDescriptor(u,v);(x==null||x.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})(Nf)),Nf}var wy;function jj(){return wy||(wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y_();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Df)),Df}var _y;function Dj(){return _y||(_y=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Np(),r=jj();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(Pf)),Pf}var Bf={},Ff={},zf={},Oy;function Nj(){return Oy||(Oy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y_(),r=q_();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})(zf)),zf}var Sy;function Ij(){return Sy||(Sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nj();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Ff)),Ff}var Wf={},Vf={},Ay;function G_(){return Ay||(Ay=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})(Vf)),Vf}var Hf={},Ey;function Rj(){return Ey||(Ey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=K_();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Hf)),Hf}var Py;function $j(){return Py||(Py=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g_(),r=G_(),n=Rj(),i=Ap();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})(Wf)),Wf}var Cy;function Lj(){return Cy||(Cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Np(),r=v_(),n=Ij(),i=Ep(),a=$j();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})(Bf)),Bf}var ky;function Bj(){return ky||(ky=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=W_(),r=Cj(),n=Dj(),i=Lj();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})(Af)),Af}var Ty;function Fj(){return Ty||(Ty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sj(),r=W_(),n=Pj(),i=Bj();function a(o,s=r.identity){return n.isArrayLikeObject(o)?t.uniqBy(Array.from(o),i.iteratee(s)):[]}e.uniqBy=a})(yf)),yf}var Uf,My;function zj(){return My||(My=1,Uf=Fj().uniqBy),Uf}var Wj=zj();const jy=En(Wj);function Vj(e,t,r){return t===!0?jy(e,r):typeof t=="function"?jy(e,t):e}var el={exports:{}},Kf={},tl={exports:{}},qf={};/**
|
|
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 LT(e){return typeof e=="number"?`${e}px`:typeof e=="string"||typeof e=="function"||Array.isArray(e)?e:"8px"}const Br=e=>{try{return e()}catch{}},BT=(e="mui")=>rT(e);function sf(e,t,r,n,i){if(!r)return;r=r===!0?{}:r;const a=i==="dark"?"dark":"light";if(!n){t[i]=DT({...r,palette:{mode:a,...r?.palette},colorSpace:e});return}const{palette:o,...s}=lh({...n,palette:{mode:a,...r?.palette},colorSpace:e});return t[i]={...r,palette:o,opacity:{...a_(a),...r?.opacity},overlays:r?.overlays||o_(a)},s}function FT(e={},...t){const{colorSchemes:r={light:!0},defaultColorScheme:n,disableCssColorScheme:i=!1,cssVarPrefix:a="mui",nativeColor:o=!1,shouldSkipGeneratingVar:s=NT,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=BT(a),{[d]:m,light:p,dark:g,...v}=r,x={...v};let w=m;if((d==="dark"&&!("dark"in r)||d==="light"&&!("light"in r))&&(w=!0),!w)throw new Error(process.env.NODE_ENV!=="production"?`MUI: The \`colorSchemes.${d}\` option is either missing or invalid.`:Hn(21,d));let y;o&&(y="oklch");const _=sf(y,x,w,u,d);p&&!x.light&&sf(y,x,p,void 0,"light"),g&&!x.dark&&sf(y,x,g,void 0,"dark");let O={defaultColorScheme:d,..._,cssVarPrefix:a,colorSchemeSelector:l,rootSelector:c,getCssVar:h,colorSchemes:x,font:{...mT(_.typography),..._.font},spacing:LT(u.spacing)};Object.keys(O.colorSchemes).forEach(j=>{const S=O.colorSchemes[j].palette,D=R=>{const z=R.split("-"),W=z[1],Y=z[2];return h(R,S[W][Y])};S.mode==="light"&&(B(S.common,"background","#fff"),B(S.common,"onBackground","#000")),S.mode==="dark"&&(B(S.common,"background","#000"),B(S.common,"onBackground","#fff"));function M(R,z,W){if(y){let Y;return R===pi&&(Y=`transparent ${((1-W)*100).toFixed(0)}%`),R===ke&&(Y=`#000 ${(W*100).toFixed(0)}%`),R===Te&&(Y=`#fff ${(W*100).toFixed(0)}%`),`color-mix(in ${y}, ${z}, ${Y})`}return R(z,W)}if($T(S,["Alert","AppBar","Avatar","Button","Chip","FilledInput","LinearProgress","Skeleton","Slider","SnackbarContent","SpeedDialAction","StepConnector","StepContent","Switch","TableCell","Tooltip"]),S.mode==="light"){B(S.Alert,"errorColor",M(ke,S.error.light,.6)),B(S.Alert,"infoColor",M(ke,S.info.light,.6)),B(S.Alert,"successColor",M(ke,S.success.light,.6)),B(S.Alert,"warningColor",M(ke,S.warning.light,.6)),B(S.Alert,"errorFilledBg",D("palette-error-main")),B(S.Alert,"infoFilledBg",D("palette-info-main")),B(S.Alert,"successFilledBg",D("palette-success-main")),B(S.Alert,"warningFilledBg",D("palette-warning-main")),B(S.Alert,"errorFilledColor",Br(()=>S.getContrastText(S.error.main))),B(S.Alert,"infoFilledColor",Br(()=>S.getContrastText(S.info.main))),B(S.Alert,"successFilledColor",Br(()=>S.getContrastText(S.success.main))),B(S.Alert,"warningFilledColor",Br(()=>S.getContrastText(S.warning.main))),B(S.Alert,"errorStandardBg",M(Te,S.error.light,.9)),B(S.Alert,"infoStandardBg",M(Te,S.info.light,.9)),B(S.Alert,"successStandardBg",M(Te,S.success.light,.9)),B(S.Alert,"warningStandardBg",M(Te,S.warning.light,.9)),B(S.Alert,"errorIconColor",D("palette-error-main")),B(S.Alert,"infoIconColor",D("palette-info-main")),B(S.Alert,"successIconColor",D("palette-success-main")),B(S.Alert,"warningIconColor",D("palette-warning-main")),B(S.AppBar,"defaultBg",D("palette-grey-100")),B(S.Avatar,"defaultBg",D("palette-grey-400")),B(S.Button,"inheritContainedBg",D("palette-grey-300")),B(S.Button,"inheritContainedHoverBg",D("palette-grey-A100")),B(S.Chip,"defaultBorder",D("palette-grey-400")),B(S.Chip,"defaultAvatarColor",D("palette-grey-700")),B(S.Chip,"defaultIconColor",D("palette-grey-700")),B(S.FilledInput,"bg","rgba(0, 0, 0, 0.06)"),B(S.FilledInput,"hoverBg","rgba(0, 0, 0, 0.09)"),B(S.FilledInput,"disabledBg","rgba(0, 0, 0, 0.12)"),B(S.LinearProgress,"primaryBg",M(Te,S.primary.main,.62)),B(S.LinearProgress,"secondaryBg",M(Te,S.secondary.main,.62)),B(S.LinearProgress,"errorBg",M(Te,S.error.main,.62)),B(S.LinearProgress,"infoBg",M(Te,S.info.main,.62)),B(S.LinearProgress,"successBg",M(Te,S.success.main,.62)),B(S.LinearProgress,"warningBg",M(Te,S.warning.main,.62)),B(S.Skeleton,"bg",y?M(pi,S.text.primary,.11):`rgba(${D("palette-text-primaryChannel")} / 0.11)`),B(S.Slider,"primaryTrack",M(Te,S.primary.main,.62)),B(S.Slider,"secondaryTrack",M(Te,S.secondary.main,.62)),B(S.Slider,"errorTrack",M(Te,S.error.main,.62)),B(S.Slider,"infoTrack",M(Te,S.info.main,.62)),B(S.Slider,"successTrack",M(Te,S.success.main,.62)),B(S.Slider,"warningTrack",M(Te,S.warning.main,.62));const R=y?M(ke,S.background.default,.6825):Js(S.background.default,.8);B(S.SnackbarContent,"bg",R),B(S.SnackbarContent,"color",Br(()=>y?sh.text.primary:S.getContrastText(R))),B(S.SpeedDialAction,"fabHoverBg",Js(S.background.paper,.15)),B(S.StepConnector,"border",D("palette-grey-400")),B(S.StepContent,"border",D("palette-grey-400")),B(S.Switch,"defaultColor",D("palette-common-white")),B(S.Switch,"defaultDisabledColor",D("palette-grey-100")),B(S.Switch,"primaryDisabledColor",M(Te,S.primary.main,.62)),B(S.Switch,"secondaryDisabledColor",M(Te,S.secondary.main,.62)),B(S.Switch,"errorDisabledColor",M(Te,S.error.main,.62)),B(S.Switch,"infoDisabledColor",M(Te,S.info.main,.62)),B(S.Switch,"successDisabledColor",M(Te,S.success.main,.62)),B(S.Switch,"warningDisabledColor",M(Te,S.warning.main,.62)),B(S.TableCell,"border",M(Te,M(pi,S.divider,1),.88)),B(S.Tooltip,"bg",M(pi,S.grey[700],.92))}if(S.mode==="dark"){B(S.Alert,"errorColor",M(Te,S.error.light,.6)),B(S.Alert,"infoColor",M(Te,S.info.light,.6)),B(S.Alert,"successColor",M(Te,S.success.light,.6)),B(S.Alert,"warningColor",M(Te,S.warning.light,.6)),B(S.Alert,"errorFilledBg",D("palette-error-dark")),B(S.Alert,"infoFilledBg",D("palette-info-dark")),B(S.Alert,"successFilledBg",D("palette-success-dark")),B(S.Alert,"warningFilledBg",D("palette-warning-dark")),B(S.Alert,"errorFilledColor",Br(()=>S.getContrastText(S.error.dark))),B(S.Alert,"infoFilledColor",Br(()=>S.getContrastText(S.info.dark))),B(S.Alert,"successFilledColor",Br(()=>S.getContrastText(S.success.dark))),B(S.Alert,"warningFilledColor",Br(()=>S.getContrastText(S.warning.dark))),B(S.Alert,"errorStandardBg",M(ke,S.error.light,.9)),B(S.Alert,"infoStandardBg",M(ke,S.info.light,.9)),B(S.Alert,"successStandardBg",M(ke,S.success.light,.9)),B(S.Alert,"warningStandardBg",M(ke,S.warning.light,.9)),B(S.Alert,"errorIconColor",D("palette-error-main")),B(S.Alert,"infoIconColor",D("palette-info-main")),B(S.Alert,"successIconColor",D("palette-success-main")),B(S.Alert,"warningIconColor",D("palette-warning-main")),B(S.AppBar,"defaultBg",D("palette-grey-900")),B(S.AppBar,"darkBg",D("palette-background-paper")),B(S.AppBar,"darkColor",D("palette-text-primary")),B(S.Avatar,"defaultBg",D("palette-grey-600")),B(S.Button,"inheritContainedBg",D("palette-grey-800")),B(S.Button,"inheritContainedHoverBg",D("palette-grey-700")),B(S.Chip,"defaultBorder",D("palette-grey-700")),B(S.Chip,"defaultAvatarColor",D("palette-grey-300")),B(S.Chip,"defaultIconColor",D("palette-grey-300")),B(S.FilledInput,"bg","rgba(255, 255, 255, 0.09)"),B(S.FilledInput,"hoverBg","rgba(255, 255, 255, 0.13)"),B(S.FilledInput,"disabledBg","rgba(255, 255, 255, 0.12)"),B(S.LinearProgress,"primaryBg",M(ke,S.primary.main,.5)),B(S.LinearProgress,"secondaryBg",M(ke,S.secondary.main,.5)),B(S.LinearProgress,"errorBg",M(ke,S.error.main,.5)),B(S.LinearProgress,"infoBg",M(ke,S.info.main,.5)),B(S.LinearProgress,"successBg",M(ke,S.success.main,.5)),B(S.LinearProgress,"warningBg",M(ke,S.warning.main,.5)),B(S.Skeleton,"bg",y?M(pi,S.text.primary,.13):`rgba(${D("palette-text-primaryChannel")} / 0.13)`),B(S.Slider,"primaryTrack",M(ke,S.primary.main,.5)),B(S.Slider,"secondaryTrack",M(ke,S.secondary.main,.5)),B(S.Slider,"errorTrack",M(ke,S.error.main,.5)),B(S.Slider,"infoTrack",M(ke,S.info.main,.5)),B(S.Slider,"successTrack",M(ke,S.success.main,.5)),B(S.Slider,"warningTrack",M(ke,S.warning.main,.5));const R=y?M(Te,S.background.default,.985):Js(S.background.default,.98);B(S.SnackbarContent,"bg",R),B(S.SnackbarContent,"color",Br(()=>y?r_.text.primary:S.getContrastText(R))),B(S.SpeedDialAction,"fabHoverBg",Js(S.background.paper,.15)),B(S.StepConnector,"border",D("palette-grey-600")),B(S.StepContent,"border",D("palette-grey-600")),B(S.Switch,"defaultColor",D("palette-grey-300")),B(S.Switch,"defaultDisabledColor",D("palette-grey-600")),B(S.Switch,"primaryDisabledColor",M(ke,S.primary.main,.55)),B(S.Switch,"secondaryDisabledColor",M(ke,S.secondary.main,.55)),B(S.Switch,"errorDisabledColor",M(ke,S.error.main,.55)),B(S.Switch,"infoDisabledColor",M(ke,S.info.main,.55)),B(S.Switch,"successDisabledColor",M(ke,S.success.main,.55)),B(S.Switch,"warningDisabledColor",M(ke,S.warning.main,.55)),B(S.TableCell,"border",M(ke,M(pi,S.divider,1),.68)),B(S.Tooltip,"bg",M(pi,S.grey[700],.92))}on(S.background,"default"),on(S.background,"paper"),on(S.common,"background"),on(S.common,"onBackground"),on(S,"divider"),Object.keys(S).forEach(R=>{const z=S[R];R!=="tonalOffset"&&z&&typeof z=="object"&&(z.main&&B(S[R],"mainChannel",wo(_o(z.main))),z.light&&B(S[R],"lightChannel",wo(_o(z.light))),z.dark&&B(S[R],"darkChannel",wo(_o(z.dark))),z.contrastText&&B(S[R],"contrastTextChannel",wo(_o(z.contrastText))),R==="text"&&(on(S[R],"primary"),on(S[R],"secondary")),R==="action"&&(z.active&&on(S[R],"active"),z.selected&&on(S[R],"selected")))})}),O=t.reduce((j,S)=>ar(j,S),O);const A={prefix:a,disableCssColorScheme:i,shouldSkipGeneratingVar:s,getSelector:RT(O),enableContrastVars:o},{vars:P,generateThemeVars:T,generateStyleSheets:I}=aT(O,A);return O.vars=P,Object.entries(O.colorSchemes[O.defaultColorScheme]).forEach(([j,S])=>{O[j]=S}),O.generateThemeVars=T,O.generateStyleSheets=I,O.generateSpacing=function(){return qw(u.spacing,mp(this))},O.getColorSchemeSelector=oT(l),O.spacing=O.generateSpacing(),O.shouldSkipGeneratingVar=s,O.unstable_sxConfig={...Qc,...u?.unstable_sxConfig},O.unstable_sx=function(S){return Ea({sx:S,theme:this})},O.toRuntimeSource=i_,O}function $v(e,t,r){e.colorSchemes&&r&&(e.colorSchemes[t]={...r!==!0&&r,palette:_p({...r===!0?{}:r.palette,mode:t})})}function zT(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 lh(e,...t);let u=r;"palette"in e||c[s]&&(c[s]!==!0?u=c[s].palette:s==="dark"&&(u={mode:"dark"}));const f=lh({...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},$v(f,"dark",c.dark)),f.palette.mode==="dark"&&(f.colorSchemes.dark={...c.dark!==!0&&c.dark,palette:f.palette},$v(f,"light",c.light)),f}return!r&&!("light"in c)&&s==="light"&&(c.light=!0),FT({...o,colorSchemes:c,defaultColorScheme:s,...typeof n!="boolean"&&n},...t)}const WT=zT(),VT="$$material";function HT(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}const UT=e=>HT(e)&&e!=="classes",KT=Vk({themeId:VT,defaultTheme:WT,rootShouldForwardProp:UT}),qT=tT;process.env.NODE_ENV!=="production"&&(be.node,be.object.isRequired);function YT(e){return eT(e)}function GT(e){return xp("MuiSvgIcon",e)}Lk("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const XT=e=>{const{color:t,fontSize:r,classes:n}=e,i={root:["root",t!=="inherit"&&`color${Bi(t)}`,`fontSize${Bi(r)}`]};return zP(i,GT,n)},ZT=KT("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,r.color!=="inherit"&&t[`color${Bi(r.color)}`],t[`fontSize${Bi(r.fontSize)}`]]}})(qT(({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}}]}))),Yl=E.forwardRef(function(t,r){const n=YT({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=E.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=XT(p);return b.jsxs(ZT,{as:s,className:ye(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?b.jsx("title",{children:f}):null]})});process.env.NODE_ENV!=="production"&&(Yl.propTypes={children:be.node,classes:be.object,className:be.string,color:be.oneOfType([be.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),be.string]),component:be.elementType,fontSize:be.oneOfType([be.oneOf(["inherit","large","medium","small"]),be.string]),htmlColor:be.string,inheritViewBox:be.bool,shapeRendering:be.string,sx:be.oneOfType([be.arrayOf(be.oneOfType([be.func,be.object,be.bool])),be.func,be.object]),titleAccess:be.string,viewBox:be.string});Yl.muiName="SvgIcon";function ou(e,t){function r(n,i){return b.jsx(Yl,{"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=Yl.muiName,E.memo(E.forwardRef(r))}const JT=ou(b.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"),ms=ou(b.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"),QT=ou(b.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"),_t=ou(b.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 s_={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Lv=k.createContext&&k.createContext(s_),eM=["attr","size","title"];function tM(e,t){if(e==null)return{};var r=rM(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 rM(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 Gl(){return Gl=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},Gl.apply(this,arguments)}function Bv(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 Xl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bv(Object(r),!0).forEach(function(n){nM(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bv(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function nM(e,t,r){return t=iM(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iM(e){var t=aM(e,"string");return typeof t=="symbol"?t:t+""}function aM(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 l_(e){return e&&e.map((t,r)=>k.createElement(t.tag,Xl({key:r},t.attr),l_(t.child)))}function Le(e){return t=>k.createElement(oM,Gl({attr:Xl({},e.attr)},t),l_(e.child))}function oM(e){var t=r=>{var{attr:n,size:i,title:a}=e,o=tM(e,eM),s=i||r.size||"1em",l;return r.className&&(l=r.className),e.className&&(l=(l?l+" ":"")+e.className),k.createElement("svg",Gl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},r.attr,n,o,{className:l,style:Xl(Xl({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 Lv!==void 0?k.createElement(Lv.Consumer,null,r=>t(r)):t(s_)}function sM(e){return Le({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 lM(e){return Le({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M137.4 374.6c12.5 12.5 32.8 12.5 45.3 0l128-128c9.2-9.2 11.9-22.9 6.9-34.9s-16.6-19.8-29.6-19.8L32 192c-12.9 0-24.6 7.8-29.6 19.8s-2.2 25.7 6.9 34.9l128 128z"},child:[]}]})(e)}function cM(e){return Le({attr:{viewBox:"0 0 320 512"},child:[{tag:"path",attr:{d:"M182.6 137.4c-12.5-12.5-32.8-12.5-45.3 0l-128 128c-9.2 9.2-11.9 22.9-6.9 34.9s16.6 19.8 29.6 19.8l256 0c12.9 0 24.6-7.8 29.6-19.8s2.2-25.7-6.9-34.9l-128-128z"},child:[]}]})(e)}function uM(e){return Le({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 fM(e){return Le({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 dM({title:e,description:t}){return b.jsxs("div",{className:"flex items-center justify-between px-6 my-6",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[24px] text-[#121212] font-semibold",children:e}),b.jsx("div",{className:"text-gray-500 text-[14px]",children:t})]}),b.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-[12px]",children:[b.jsxs("div",{className:"w-full sm:w-auto flex items-center justify-center gap-[8px] bg-white shadow-sm px-2 md:px-6 py-1 rounded-sm text-[#64748B] text-sm hover:bg-slate-50",children:[b.jsx(JT,{fontSize:"12"}),b.jsx("div",{className:" whitespace-nowrap",children:"Last 7 Days"}),b.jsx(uM,{fontSize:"12"})]}),b.jsxs("div",{className:"w-full flex items-center justify-center gap-[8px] bg-white text-[#884EA7] px-2 md:px-6 py-1 rounded-sm shadow-sm hover:bg-purple-50",children:[b.jsx("div",{className:"font-medium whitespace-nowrap",children:"Export Report"}),b.jsx(QT,{fontSize:"12"})]})]})]})}function Fv(e){return Le({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 hM(e){return Le({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 Op(e){return Le({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 pM(e){return Le({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 c_(e){return Le({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 mM(e){return Le({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 u_(e){return Le({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 zv(e){return Le({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 f_(e){return Le({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 Sp(e){return Le({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 gM(e){return Le({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 d_(e){return Le({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 h_(e){return Le({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 p_(e){return Le({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 vM=[{name:"Overview",icon:d_},{name:"Community",icon:Op},{name:"Financials",icon:p_},{name:"Facilities",icon:c_},{name:"Gate & Security",icon:Sp},{name:"Helpdesk",icon:hM},{name:"Engagement",icon:u_}];function yM(){const[e,t]=k.useState("Overview");return b.jsx("div",{className:"flex gap-[8px] p-3",children:vM.map(r=>{const n=r.icon,i=e===r.name;return b.jsxs("button",{onClick:()=>t(r.name),className:`flex items-center gap-[8px] rounded px-4 py-3 text-[14px] leading-[16px] font-medium transition
|
|
104
|
+
${i?"bg-[#FBF5FF] text-[#884EA7]":"bg-white text-[#64748B] hover:bg-gray-50"}`,children:[b.jsx(n,{className:"h-[15px] w-[15px] font-bold"}),r.name]},r.name)})})}const Wv=({color:e})=>b.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),gs=({active:e,payload:t})=>!e||!t||!t.length?null:b.jsx("div",{className:"bg-[#121212] text-white !text-[12px] p-3 rounded-lg shadow-lg",children:t.map((r,n)=>b.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[r.color&&b.jsx(Wv,{color:r.color}),r.payload.color&&b.jsx(Wv,{color:r.payload.color}),b.jsx("div",{className:"min-w-[84px] text-[#D1D3D4]",children:r.name}),b.jsx("div",{className:"font-semibold",children:r.value})]},n))}),m_=({value:e})=>{const t=typeof e=="string"?parseFloat(e.replace("%","")):e??0,r=t>=0;return b.jsxs("div",{className:`w-fit p-1 rounded text-[10px] leading-[14px] font-medium flex items-center gap-1 ${r?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:[r?b.jsx(cM,{}):b.jsx(lM,{}),Math.abs(t).toFixed(1),"%"]})},Gi=({title:e,icon:t,period:r,children:n,footer:i,className:a="",childrenClassName:o,titleWeight:s})=>{const l=s==="semi-bold"?600:500;return b.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:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,b.jsx("div",{style:{fontWeight:l,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),r&&b.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:r})]}),b.jsx("div",{className:`flex-1 min-h-0 space-y-[24px] ${o}`,children:n}),i&&b.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:i})]})};var lf={},cf={},Vv;function bM(){return Vv||(Vv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r==="__proto__"}e.isUnsafeProperty=t})(cf)),cf}var uf={},Hv;function g_(){return Hv||(Hv=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})(uf)),uf}var ff={},Uv;function v_(){return Uv||(Uv=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})(ff)),ff}var df={},Kv;function Ap(){return Kv||(Kv=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})(df)),df}var qv;function Ep(){return qv||(qv=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=bM(),r=g_(),n=v_(),i=Ap();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})(lf)),lf}var hf,Yv;function xM(){return Yv||(Yv=1,hf=Ep().get),hf}var wM=xM();const Fi=En(wM);var wt=e=>e===0?0:e>0?1:-1,sr=e=>typeof e=="number"&&e!=+e,Ei=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,ae=e=>(typeof e=="number"||e instanceof Number)&&!sr(e),Zr=e=>ae(e)||typeof e=="string",_M=0,Vo=e=>{var t=++_M;return"".concat(e||"").concat(t)},It=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(!ae(t)&&typeof t!="string")return n;var a;if(Ei(t)){if(r==null)return n;var o=t.indexOf("%");a=r*parseFloat(t.slice(0,o))/100}else a=+t;return sr(a)&&(a=n),i&&r!=null&&a>r&&(a=r),a},y_=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 et(e,t,r){return ae(e)&&ae(t)?e+r*(t-e):t}function b_(e,t,r){if(!(!e||!e.length))return e.find(n=>n&&(typeof t=="function"?t(n):Fi(n,t))===r)}var Ge=e=>e===null||typeof e>"u",vs=e=>Ge(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),OM=["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 Pp(e){if(typeof e!="string")return!1;var t=OM;return t.includes(e)}var SM=["viewBox","children"],Gv=["points","pathLength"],pf={svg:SM,polygon:Gv,polyline:Gv},Cp=(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=>{Pp(i)&&(n[i]=(a=>r[i](r,a)))}),n},AM=(e,t,r)=>n=>(e(t,r,n),null),su=(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];Pp(i)&&typeof a=="function"&&(n||(n={}),n[i]=AM(a,t,r))}),n},EM=["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 x_(e){if(typeof e!="string")return!1;var t=EM;return t.includes(e)}function tn(e){var t=Object.entries(e).filter(r=>{var[n]=r;return x_(n)});return Object.fromEntries(t)}var Xv=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",Zv=null,mf=null,w_=e=>{if(e===Zv&&Array.isArray(mf))return mf;var t=[];return k.Children.forEach(e,r=>{Ge(r)||(Lo.isFragment(r)?t=t.concat(w_(r.props.children)):t.push(r))}),mf=t,Zv=e,t};function kp(e,t){var r=[],n=[];return Array.isArray(t)?n=t.map(i=>Xv(i)):n=[Xv(t)],w_(e).forEach(i=>{var a=Fi(i,"type.displayName")||Fi(i,"type.name");n.indexOf(a)!==-1&&r.push(i)}),r}var __=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,PM=(e,t,r,n)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var a=(i=n&&pf?.[n])!==null&&i!==void 0?i:[],o=t.startsWith("data-"),s=typeof e!="function"&&(!!n&&a.includes(t)||x_(t)),l=!!r&&Pp(t);return o||s||l},Ze=(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;PM((o=n)===null||o===void 0?void 0:o[a],a,t,r)&&(i[a]=n[a])}),i},CM=["children","width","height","viewBox","className","style","title","desc"];function ch(){return ch=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},ch.apply(null,arguments)}function kM(e,t){if(e==null)return{};var r,n,i=TM(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 TM(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 O_=k.forwardRef((e,t)=>{var{children:r,width:n,height:i,viewBox:a,className:o,style:s,title:l,desc:c}=e,u=kM(e,CM),f=a||{width:n,height:i,x:0,y:0},d=ye("recharts-surface",o);return E.createElement("svg",ch({},Ze(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}),E.createElement("title",null,l),E.createElement("desc",null,c),r)}),MM=["children","className"];function uh(){return uh=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},uh.apply(null,arguments)}function jM(e,t){if(e==null)return{};var r,n,i=DM(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 DM(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 Ct=E.forwardRef((e,t)=>{var{children:r,className:n}=e,i=jM(e,MM),a=ye("recharts-layer",n);return E.createElement("g",uh({className:a},Ze(i,!0),{ref:t}),r)}),NM=k.createContext(null);function Fe(e){return function(){return e}}const S_=Math.cos,Zl=Math.sin,jr=Math.sqrt,Jl=Math.PI,lu=2*Jl,fh=Math.PI,dh=2*fh,bi=1e-6,IM=dh-bi;function A_(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function RM(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return A_;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 $M{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?A_:RM(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>bi)if(!(Math.abs(f*l-c*u)>bi)||!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),x=Math.sqrt(d),w=a*Math.tan((fh-Math.acos((p+d-g)/(2*v*x)))/2),y=w/x,_=w/v;Math.abs(y-1)>bi&&this._append`L${t+y*u},${r+y*f}`,this._append`A${a},${a},0,0,${+(f*h>u*m)},${this._x1=t+_*l},${this._y1=r+_*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)>bi||Math.abs(this._y1-u)>bi)&&this._append`L${c},${u}`,n&&(d<0&&(d=d%dh+dh),d>IM?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>bi&&this._append`A${n},${n},0,${+(d>=fh)},${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 Tp(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 $M(t)}function Mp(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E_(e){this._context=e}E_.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 cu(e){return new E_(e)}function P_(e){return e[0]}function C_(e){return e[1]}function k_(e,t){var r=Fe(!0),n=null,i=cu,a=null,o=Tp(s);e=typeof e=="function"?e:e===void 0?P_:Fe(e),t=typeof t=="function"?t:t===void 0?C_:Fe(t);function s(l){var c,u=(l=Mp(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:Fe(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:Fe(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Fe(!!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 Qs(e,t,r){var n=null,i=Fe(!0),a=null,o=cu,s=null,l=Tp(c);e=typeof e=="function"?e:e===void 0?P_:Fe(+e),t=typeof t=="function"?t:Fe(t===void 0?0:+t),r=typeof r=="function"?r:r===void 0?C_:Fe(+r);function c(f){var d,h,m,p=(f=Mp(f)).length,g,v=!1,x,w=new Array(p),y=new Array(p);for(a==null&&(s=o(x=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(w[m],y[m]);s.lineEnd(),s.areaEnd()}v&&(w[d]=+e(g,d,f),y[d]=+t(g,d,f),s.point(n?+n(g,d,f):w[d],r?+r(g,d,f):y[d]))}if(x)return s=null,x+""||null}function u(){return k_().defined(i).curve(o).context(a)}return c.x=function(f){return arguments.length?(e=typeof f=="function"?f:Fe(+f),n=null,c):e},c.x0=function(f){return arguments.length?(e=typeof f=="function"?f:Fe(+f),c):e},c.x1=function(f){return arguments.length?(n=f==null?null:typeof f=="function"?f:Fe(+f),c):n},c.y=function(f){return arguments.length?(t=typeof f=="function"?f:Fe(+f),r=null,c):t},c.y0=function(f){return arguments.length?(t=typeof f=="function"?f:Fe(+f),c):t},c.y1=function(f){return arguments.length?(r=f==null?null:typeof f=="function"?f:Fe(+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:Fe(!!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 T_{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 LM(e){return new T_(e,!0)}function BM(e){return new T_(e,!1)}const jp={draw(e,t){const r=jr(t/Jl);e.moveTo(r,0),e.arc(0,0,r,0,lu)}},FM={draw(e,t){const r=jr(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()}},M_=jr(1/3),zM=M_*2,WM={draw(e,t){const r=jr(t/zM),n=r*M_;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},VM={draw(e,t){const r=jr(t),n=-r/2;e.rect(n,n,r,r)}},HM=.8908130915292852,j_=Zl(Jl/10)/Zl(7*Jl/10),UM=Zl(lu/10)*j_,KM=-S_(lu/10)*j_,qM={draw(e,t){const r=jr(t*HM),n=UM*r,i=KM*r;e.moveTo(0,-r),e.lineTo(n,i);for(let a=1;a<5;++a){const o=lu*a/5,s=S_(o),l=Zl(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},gf=jr(3),YM={draw(e,t){const r=-jr(t/(gf*3));e.moveTo(0,r*2),e.lineTo(-gf*r,-r),e.lineTo(gf*r,-r),e.closePath()}},hr=-.5,pr=jr(3)/2,hh=1/jr(12),GM=(hh/2+1)*3,XM={draw(e,t){const r=jr(t/GM),n=r/2,i=r*hh,a=n,o=r*hh+r,s=-a,l=o;e.moveTo(n,i),e.lineTo(a,o),e.lineTo(s,l),e.lineTo(hr*n-pr*i,pr*n+hr*i),e.lineTo(hr*a-pr*o,pr*a+hr*o),e.lineTo(hr*s-pr*l,pr*s+hr*l),e.lineTo(hr*n+pr*i,hr*i-pr*n),e.lineTo(hr*a+pr*o,hr*o-pr*a),e.lineTo(hr*s+pr*l,hr*l-pr*s),e.closePath()}};function ZM(e,t){let r=null,n=Tp(i);e=typeof e=="function"?e:Fe(e||jp),t=typeof t=="function"?t:Fe(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:Fe(a),i):e},i.size=function(a){return arguments.length?(t=typeof a=="function"?a:Fe(+a),i):t},i.context=function(a){return arguments.length?(r=a??null,i):r},i}function Ql(){}function ec(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 D_(e){this._context=e}D_.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:ec(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:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function JM(e){return new D_(e)}function N_(e){this._context=e}N_.prototype={areaStart:Ql,areaEnd:Ql,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:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function QM(e){return new N_(e)}function I_(e){this._context=e}I_.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:ec(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function ej(e){return new I_(e)}function R_(e){this._context=e}R_.prototype={areaStart:Ql,areaEnd:Ql,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 tj(e){return new R_(e)}function Jv(e){return e<0?-1:1}function Qv(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(Jv(a)+Jv(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function ey(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function vf(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 tc(e){this._context=e}tc.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:vf(this,this._t0,ey(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,vf(this,ey(this,r=Qv(this,e,t)),r);break;default:vf(this,this._t0,r=Qv(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function $_(e){this._context=new L_(e)}($_.prototype=Object.create(tc.prototype)).point=function(e,t){tc.prototype.point.call(this,t,e)};function L_(e){this._context=e}L_.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 rj(e){return new tc(e)}function nj(e){return new $_(e)}function B_(e){this._context=e}B_.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=ty(e),i=ty(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 ty(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 ij(e){return new B_(e)}function uu(e,t){this._context=e,this._t=t}uu.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 aj(e){return new uu(e,.5)}function oj(e){return new uu(e,0)}function sj(e){return new uu(e,1)}function Ca(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 ph(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function lj(e,t){return e[t]}function cj(e){const t=[];return t.key=e,t}function uj(){var e=Fe([]),t=ph,r=Ca,n=lj;function i(a){var o=Array.from(e.apply(this,arguments),cj),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=Mp(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:Fe(Array.from(a)),i):e},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:Fe(+a),i):n},i.order=function(a){return arguments.length?(t=a==null?ph:typeof a=="function"?a:Fe(Array.from(a)),i):t},i.offset=function(a){return arguments.length?(r=a??Ca,i):r},i}function fj(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}Ca(e,t)}}function dj(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}Ca(e,t)}}function hj(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,Ca(e,t)}}var pj=["type","size","sizeType"];function mh(){return mh=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},mh.apply(null,arguments)}function ry(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 ny(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ry(Object(r),!0).forEach(function(n){mj(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ry(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function mj(e,t,r){return(t=gj(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gj(e){var t=vj(e,"string");return typeof t=="symbol"?t:t+""}function vj(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 yj(e,t){if(e==null)return{};var r,n,i=bj(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 bj(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 F_={symbolCircle:jp,symbolCross:FM,symbolDiamond:WM,symbolSquare:VM,symbolStar:qM,symbolTriangle:YM,symbolWye:XM},xj=Math.PI/180,wj=e=>{var t="symbol".concat(vs(e));return F_[t]||jp},_j=(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*xj;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}},Oj=(e,t)=>{F_["symbol".concat(vs(e))]=t},z_=e=>{var{type:t="circle",size:r=64,sizeType:n="area"}=e,i=yj(e,pj),a=ny(ny({},i),{},{type:t,size:r,sizeType:n}),o="circle";typeof t=="string"&&(o=t);var s=()=>{var d=wj(o),h=ZM().type(d).size(_j(r,n,o));return h()},{className:l,cx:c,cy:u}=a,f=Ze(a,!0);return c===+c&&u===+u&&r===+r?E.createElement("path",mh({},f,{className:ye("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};z_.registerSymbol=Oj;var yf={},bf={},iy;function Sj(){return iy||(iy=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})(bf)),bf}var xf={},ay;function W_(){return ay||(ay=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r}e.identity=t})(xf)),xf}var wf={},_f={},Of={},oy;function Aj(){return oy||(oy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Number.isSafeInteger(r)&&r>=0}e.isLength=t})(Of)),Of}var sy;function Dp(){return sy||(sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Aj();function r(n){return n!=null&&typeof n!="function"&&t.isLength(n.length)}e.isArrayLike=r})(_f)),_f}var Sf={},ly;function Ej(){return ly||(ly=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="object"&&r!==null}e.isObjectLike=t})(Sf)),Sf}var cy;function Pj(){return cy||(cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dp(),r=Ej();function n(i){return r.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=n})(wf)),wf}var Af={},Ef={},uy;function Cj(){return uy||(uy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Ep();function r(n){return function(i){return t.get(i,n)}}e.property=r})(Ef)),Ef}var Pf={},Cf={},kf={},Tf={},fy;function V_(){return fy||(fy=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})(Tf)),Tf}var Mf={},dy;function H_(){return dy||(dy=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})(Mf)),Mf}var jf={},hy;function U_(){return hy||(hy=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})(jf)),jf}var py;function kj(){return py||(py=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Np(),r=V_(),n=H_(),i=U_();function a(f,d,h){return typeof h!="function"?t.isMatch(f,d):o(f,d,function m(p,g,v,x,w,y){const _=h(p,g,v,x,w,y);return _!==void 0?!!_:o(p,g,m,y)},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 x=!1;for(let w=0;w<f.length;w++){if(p.has(w))continue;const y=f[w];let _=!1;if(h(y,v,g,f,d,m)&&(_=!0),_){p.add(w),x=!0;break}}if(!x)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})(kf)),kf}var my;function Np(){return my||(my=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=kj();function r(n,i){return t.isMatchWith(n,i,()=>{})}e.isMatch=r})(Cf)),Cf}var Df={},Nf={},If={},gy;function Tj(){return gy||(gy=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})(If)),If}var Rf={},vy;function K_(){return vy||(vy=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})(Rf)),Rf}var $f={},yy;function q_(){return yy||(yy=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]",x="[object Uint16Array]",w="[object Uint32Array]",y="[object BigUint64Array]",_="[object Int8Array]",O="[object Int16Array]",A="[object Int32Array]",P="[object BigInt64Array]",T="[object Float32Array]",I="[object Float64Array]";e.argumentsTag=a,e.arrayBufferTag=d,e.arrayTag=u,e.bigInt64ArrayTag=P,e.bigUint64ArrayTag=y,e.booleanTag=i,e.dataViewTag=p,e.dateTag=s,e.errorTag=m,e.float32ArrayTag=T,e.float64ArrayTag=I,e.functionTag=f,e.int16ArrayTag=O,e.int32ArrayTag=A,e.int8ArrayTag=_,e.mapTag=l,e.numberTag=n,e.objectTag=h,e.regexpTag=t,e.setTag=c,e.stringTag=r,e.symbolTag=o,e.uint16ArrayTag=x,e.uint32ArrayTag=w,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=v})($f)),$f}var Lf={},by;function Mj(){return by||(by=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}e.isTypedArray=t})(Lf)),Lf}var xy;function Y_(){return xy||(xy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Tj(),r=K_(),n=q_(),i=H_(),a=Mj();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,x]of u)g.set(v,s(x,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],x=Object.getOwnPropertyDescriptor(u,v);(x==null||x.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})(Nf)),Nf}var wy;function jj(){return wy||(wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y_();function r(n){return t.cloneDeepWithImpl(n,void 0,n,new Map,void 0)}e.cloneDeep=r})(Df)),Df}var _y;function Dj(){return _y||(_y=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Np(),r=jj();function n(i){return i=r.cloneDeep(i),a=>t.isMatch(a,i)}e.matches=n})(Pf)),Pf}var Bf={},Ff={},zf={},Oy;function Nj(){return Oy||(Oy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y_(),r=q_();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})(zf)),zf}var Sy;function Ij(){return Sy||(Sy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nj();function r(n){return t.cloneDeepWith(n)}e.cloneDeep=r})(Ff)),Ff}var Wf={},Vf={},Ay;function G_(){return Ay||(Ay=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})(Vf)),Vf}var Hf={},Ey;function Rj(){return Ey||(Ey=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=K_();function r(n){return n!==null&&typeof n=="object"&&t.getTag(n)==="[object Arguments]"}e.isArguments=r})(Hf)),Hf}var Py;function $j(){return Py||(Py=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=g_(),r=G_(),n=Rj(),i=Ap();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})(Wf)),Wf}var Cy;function Lj(){return Cy||(Cy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Np(),r=v_(),n=Ij(),i=Ep(),a=$j();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})(Bf)),Bf}var ky;function Bj(){return ky||(ky=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=W_(),r=Cj(),n=Dj(),i=Lj();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})(Af)),Af}var Ty;function Fj(){return Ty||(Ty=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Sj(),r=W_(),n=Pj(),i=Bj();function a(o,s=r.identity){return n.isArrayLikeObject(o)?t.uniqBy(Array.from(o),i.iteratee(s)):[]}e.uniqBy=a})(yf)),yf}var Uf,My;function zj(){return My||(My=1,Uf=Fj().uniqBy),Uf}var Wj=zj();const jy=En(Wj);function Vj(e,t,r){return t===!0?jy(e,r):typeof t=="function"?jy(e,t):e}var el={exports:{}},Kf={},tl={exports:{}},qf={};/**
|
|
105
105
|
* @license React
|
|
106
106
|
* use-sync-external-store-shim.production.js
|
|
107
107
|
*
|
|
@@ -139,7 +139,7 @@ This could lead to inefficient memoization and unnecessary re-renders.
|
|
|
139
139
|
Ensure transformation logic is in the result function, and extraction logic is in the input selectors.`,{stack:i})}}},eD=(e,t,r)=>{const{memoize:n,memoizeOptions:i}=t,{inputSelectorResults:a,inputSelectorResultsCopy:o}=e,s=n(()=>({}),...i);if(!(s.apply(null,a)===s.apply(null,o))){let c;try{throw new Error}catch(u){({stack:c}=u)}console.warn(`An input selector returned a different result when passed same arguments.
|
|
140
140
|
This means your output selector will likely run more frequently than intended.
|
|
141
141
|
Avoid returning a new reference inside your input selector, e.g.
|
|
142
|
-
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:a,secondInputs:o,stack:c})}},tD={inputStabilityCheck:"once",identityFunctionCheck:"once"};function rD(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function nD(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function iD(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var By=e=>Array.isArray(e)?e:[e];function aD(e){const t=Array.isArray(e[0])?e[0]:e;return iD(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Fy(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var oD=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...tD,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:Qj},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:eD}}},sD=class{constructor(e){this.value=e}deref(){return this.value}},lD=typeof WeakRef<"u"?WeakRef:sD,cD=0,zy=1;function rl(){return{s:cD,v:void 0,o:null,p:null}}function Z_(e,t={}){let r=rl();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let s=r;const{length:l}=arguments;for(let f=0,d=l;f<d;f++){const h=arguments[f];if(typeof h=="function"||typeof h=="object"&&h!==null){let m=s.o;m===null&&(s.o=m=new WeakMap);const p=m.get(h);p===void 0?(s=rl(),m.set(h,s)):s=p}else{let m=s.p;m===null&&(s.p=m=new Map);const p=m.get(h);p===void 0?(s=rl(),m.set(h,s)):s=p}}const c=s;let u;if(s.s===zy)u=s.v;else if(u=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new lD(u):u}return c.s=zy,c.v=u,u}return o.clearCache=()=>{r=rl(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function uD(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),rD(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:h=Z_,argsMemoizeOptions:m=[],devModeChecks:p={}}=u,g=By(d),v=By(m),x=aD(i),w=f(function(){return a++,c.apply(null,arguments)},...g);let y=!0;const _=h(function(){o++;const A=Fy(x,arguments);if(s=w.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:P,inputStabilityCheck:T}=oD(y,p);if(P.shouldRun&&P.run(c,A,s),T.shouldRun){const I=Fy(x,arguments);T.run({inputSelectorResults:A,inputSelectorResultsCopy:I},{memoize:f,memoizeOptions:g},arguments)}y&&(y=!1)}return s},...v);return Object.assign(_,{resultFunc:c,memoizedResultFunc:w,dependencies:x,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var $=uD(Z_),fD=Object.assign((e,t=$)=>{nD(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((o,s,l)=>(o[r[l]]=s,o),{}))},{withTypes:()=>fD}),Xf={},Zf={},Jf={},Wy;function dD(){return Wy||(Wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const o=t(n),s=t(i);if(o===s&&o===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=r})(Jf)),Jf}var Qf={},ed={},Vy;function J_(){return Vy||(Vy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(ed)),ed}var Hy;function hD(){return Hy||(Hy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=J_(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(Qf)),Qf}var Uy;function pD(){return Uy||(Uy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dD(),r=hD(),n=Ap();function i(a,o,s,l){if(a==null)return[];s=l?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const c=(h,m)=>{let p=h;for(let g=0;g<m.length&&p!=null;++g)p=p[m[g]];return p},u=(h,m)=>m==null||h==null?m:typeof h=="object"&&"key"in h?Object.hasOwn(m,h.key)?m[h.key]:c(m,h.path):typeof h=="function"?h(m):Array.isArray(h)?c(m,h):typeof m=="object"?m[h]:m,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(m=>u(m,h))})).slice().sort((h,m)=>{for(let p=0;p<f.length;p++){const g=t.compareValues(h.criteria[p],m.criteria[p],s[p]);if(g!==0)return g}return 0}).map(h=>h.original)}e.orderBy=i})(Zf)),Zf}var td={},Ky;function mD(){return Ky||(Ky=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),o=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<a?o(u,l+1):i.push(u)}};return o(r,0),i}e.flatten=t})(td)),td}var rd={},qy;function Q_(){return qy||(qy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G_(),r=Dp(),n=V_(),i=U_();function a(o,s,l){return n.isObject(l)&&(typeof s=="number"&&r.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?i.eq(l[s],o):!1}e.isIterateeCall=a})(rd)),rd}var Yy;function gD(){return Yy||(Yy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pD(),r=mD(),n=Q_();function i(a,...o){const s=o.length;return s>1&&n.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,r.flatten(o),["asc"])}e.sortBy=i})(Xf)),Xf}var nd,Gy;function vD(){return Gy||(Gy=1,nd=gD().sortBy),nd}var yD=vD();const fu=En(yD);var eO=e=>e.legend.settings,bD=e=>e.legend.size,xD=e=>e.legend.payload;$([xD,eO],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?fu(n,r):n});var nl=1;function wD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=k.useState({height:0,left:0,top:0,width:0}),n=k.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>nl||Math.abs(o.left-t.left)>nl||Math.abs(o.top-t.top)>nl||Math.abs(o.width-t.width)>nl)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function At(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var _D=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xy=_D,id=()=>Math.random().toString(36).substring(7).split("").join("."),OD={INIT:`@@redux/INIT${id()}`,REPLACE:`@@redux/REPLACE${id()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${id()}`},ji=OD;function ys(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function SD(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(PD(e))return"date";if(ED(e))return"error";const r=AD(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function AD(e){return typeof e.constructor=="function"?e.constructor.name:null}function ED(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function PD(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Nn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=SD(e)),t}function tO(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?At(2):`Expected the root reducer to be a function. Instead, received: '${Nn(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?At(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?At(1):`Expected the enhancer to be a function. Instead, received: '${Nn(r)}'`);return r(tO)(e,t)}let n=e,i=t,a=new Map,o=a,s=0,l=!1;function c(){o===a&&(o=new Map,a.forEach((g,v)=>{o.set(v,g)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?At(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?At(4):`Expected the listener to be a function. Instead, received: '${Nn(g)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?At(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let v=!0;c();const x=s++;return o.set(x,g),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?At(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,c(),o.delete(x),a=null}}}function d(g){if(!ys(g))throw new Error(process.env.NODE_ENV==="production"?At(7):`Actions must be plain objects. Instead, the actual type was: '${Nn(g)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?At(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof g.type!="string")throw new Error(process.env.NODE_ENV==="production"?At(17):`Action "type" property must be a string. Instead, the actual type was: '${Nn(g.type)}'. Value was: '${g.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?At(9):"Reducers may not dispatch actions.");try{l=!0,i=n(i,g)}finally{l=!1}return(a=o).forEach(x=>{x()}),g}function h(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?At(10):`Expected the nextReducer to be a function. Instead, received: '${Nn(g)}`);n=g,d({type:ji.REPLACE})}function m(){const g=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?At(11):`Expected the observer to be an object. Instead, received: '${Nn(v)}'`);function x(){const y=v;y.next&&y.next(u())}return x(),{unsubscribe:g(x)}},[Xy](){return this}}}return d({type:ji.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[Xy]:m}}function Zy(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function CD(e,t,r,n){const i=Object.keys(t),a=r&&r.type===ji.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!ys(e))return`The ${a} has unexpected type of "${Nn(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const o=Object.keys(e).filter(s=>!t.hasOwnProperty(s)&&!n[s]);if(o.forEach(s=>{n[s]=!0}),!(r&&r.type===ji.REPLACE)&&o.length>0)return`Unexpected ${o.length>1?"keys":"key"} "${o.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function kD(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ji.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?At(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:ji.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?At(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${ji.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function rO(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const s=t[o];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&Zy(`No reducer provided for key "${s}"`),typeof e[s]=="function"&&(r[s]=e[s])}const n=Object.keys(r);let i;process.env.NODE_ENV!=="production"&&(i={});let a;try{kD(r)}catch(o){a=o}return function(s={},l){if(a)throw a;if(process.env.NODE_ENV!=="production"){const f=CD(s,r,l,i);f&&Zy(f)}let c=!1;const u={};for(let f=0;f<n.length;f++){const d=n[f],h=r[d],m=s[d],p=h(m,l);if(typeof p>"u"){const g=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?At(14):`When called with an action of type ${g?`"${String(g)}"`:"(unknown type)"}, the slice reducer for key "${d}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[d]=p,c=c||p!==m}return c=c||n.length!==Object.keys(s).length,c?u:s}}function rc(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function TD(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(process.env.NODE_ENV==="production"?At(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:i.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(o));return a=rc(...s)(i.dispatch),{...i,dispatch:a}}}function Rp(e){return ys(e)&&"type"in e&&typeof e.type=="string"}var nO=Symbol.for("immer-nothing"),Jy=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state"),MD=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function Wt(e,...t){if(process.env.NODE_ENV!=="production"){const r=MD[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ka=Object.getPrototypeOf;function Wi(e){return!!e&&!!e[lr]}function wn(e){return e?iO(e)||Array.isArray(e)||!!e[Jy]||!!e.constructor?.[Jy]||bs(e)||hu(e):!1}var jD=Object.prototype.constructor.toString();function iO(e){if(!e||typeof e!="object")return!1;const t=ka(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===jD}function nc(e,t){du(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function du(e){const t=e[lr];return t?t.type_:Array.isArray(e)?1:bs(e)?2:hu(e)?3:0}function gh(e,t){return du(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function aO(e,t,r){const n=du(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function DD(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bs(e){return e instanceof Map}function hu(e){return e instanceof Set}function xi(e){return e.copy_||e.base_}function vh(e,t){if(bs(e))return new Map(e);if(hu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=iO(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[lr];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(ka(e),n)}else{const n=ka(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function $p(e,t=!1){return pu(e)||Wi(e)||!wn(e)||(du(e)>1&&Object.defineProperties(e,{set:{value:il},add:{value:il},clear:{value:il},delete:{value:il}}),Object.freeze(e),t&&Object.values(e).forEach(r=>$p(r,!0))),e}function il(){Wt(2)}function pu(e){return Object.isFrozen(e)}var ND={};function Vi(e){const t=ND[e];return t||Wt(0,e),t}var Ho;function oO(){return Ho}function ID(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qy(e,t){t&&(Vi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yh(e){bh(e),e.drafts_.forEach(RD),e.drafts_=null}function bh(e){e===Ho&&(Ho=e.parent_)}function e0(e){return Ho=ID(Ho,e)}function RD(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function t0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[lr].modified_&&(yh(t),Wt(4)),wn(e)&&(e=ic(t,e),t.parent_||ac(t,e)),t.patches_&&Vi("Patches").generateReplacementPatches_(r[lr].base_,e,t.patches_,t.inversePatches_)):e=ic(t,r,[]),yh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nO?e:void 0}function ic(e,t,r){if(pu(t))return t;const n=t[lr];if(!n)return nc(t,(i,a)=>r0(e,n,t,i,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ac(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let a=i,o=!1;n.type_===3&&(a=new Set(i),i.clear(),o=!0),nc(a,(s,l)=>r0(e,n,i,s,l,r,o)),ac(e,i,!1),r&&e.patches_&&Vi("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function r0(e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"&&i===r&&Wt(5),Wi(i)){const s=a&&t&&t.type_!==3&&!gh(t.assigned_,n)?a.concat(n):void 0,l=ic(e,i,s);if(aO(r,n,l),Wi(l))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(wn(i)&&!pu(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ic(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(bs(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&ac(e,i)}}function ac(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$p(t,r)}function $D(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:oO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=Lp;r&&(i=[n],a=Uo);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var Lp={get(e,t){if(t===lr)return e;const r=xi(e);if(!gh(r,t))return LD(e,r,t);const n=r[t];return e.finalized_||!wn(n)?n:n===ad(e.base_,t)?(od(e),e.copy_[t]=wh(n,e)):n},has(e,t){return t in xi(e)},ownKeys(e){return Reflect.ownKeys(xi(e))},set(e,t,r){const n=sO(xi(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=ad(xi(e),t),a=i?.[lr];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(DD(r,i)&&(r!==void 0||gh(e.base_,t)))return!0;od(e),xh(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ad(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,od(e),xh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=xi(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Wt(11)},getPrototypeOf(e){return ka(e.base_)},setPrototypeOf(){Wt(12)}},Uo={};nc(Lp,(e,t)=>{Uo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Uo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Wt(13),Uo.set.call(this,e,t,void 0)};Uo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Wt(14),Lp.set.call(this,e[0],t,r,e[0])};function ad(e,t){const r=e[lr];return(r?xi(r):e)[t]}function LD(e,t,r){const n=sO(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function sO(e,t){if(!(t in e))return;let r=ka(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ka(r)}}function xh(e){e.modified_||(e.modified_=!0,e.parent_&&xh(e.parent_))}function od(e){e.copy_||(e.copy_=vh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var BD=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const o=this;return function(l=a,...c){return o.produce(l,u=>r.call(this,u,...c))}}typeof r!="function"&&Wt(6),n!==void 0&&typeof n!="function"&&Wt(7);let i;if(wn(t)){const a=e0(this),o=wh(t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?yh(a):bh(a)}return Qy(a,n),t0(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===nO&&(i=void 0),this.autoFreeze_&&$p(i,!0),n){const a=[],o=[];Vi("Patches").generateReplacementPatches_(t,i,a,o),n(a,o)}return i}else Wt(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,l=>t(l,...s));let n,i;return[this.produce(t,r,(o,s)=>{n=o,i=s}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){wn(e)||Wt(8),Wi(e)&&(e=yn(e));const t=e0(this),r=wh(e,void 0);return r[lr].isManual_=!0,bh(t),r}finishDraft(e,t){const r=e&&e[lr];(!r||!r.isManual_)&&Wt(9);const{scope_:n}=r;return Qy(n,t),t0(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Vi("Patches").applyPatches_;return Wi(e)?n(e,t):this.produce(e,i=>n(i,t))}};function wh(e,t){const r=bs(e)?Vi("MapSet").proxyMap_(e,t):hu(e)?Vi("MapSet").proxySet_(e,t):$D(e,t);return(t?t.scope_:oO()).drafts_.push(r),r}function yn(e){return Wi(e)||Wt(10,e),lO(e)}function lO(e){if(!wn(e)||pu(e))return e;const t=e[lr];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=vh(e,t.scope_.immer_.useStrictShallowCopy_)}else r=vh(e,!0);return nc(r,(n,i)=>{aO(r,n,lO(i))}),t&&(t.finalized_=!1),r}var FD=new BD,cO=FD.produce;function uO(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var zD=uO(),WD=uO,VD=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rc:rc.apply(null,arguments)},HD=e=>e&&typeof e.match=="function";function wr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Rp(n)&&n.type===e,r}function UD(e){return typeof e=="function"&&"type"in e&&HD(e)}function KD(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
142
|
+
\`createSelector([state => state.todos.map(todo => todo.id)], todoIds => todoIds.length)\``,{arguments:r,firstInputs:a,secondInputs:o,stack:c})}},tD={inputStabilityCheck:"once",identityFunctionCheck:"once"};function rD(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function nD(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function iD(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){const r=e.map(n=>typeof n=="function"?`function ${n.name||"unnamed"}()`:typeof n).join(", ");throw new TypeError(`${t}[${r}]`)}}var By=e=>Array.isArray(e)?e:[e];function aD(e){const t=Array.isArray(e[0])?e[0]:e;return iD(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Fy(e,t){const r=[],{length:n}=e;for(let i=0;i<n;i++)r.push(e[i].apply(null,t));return r}var oD=(e,t)=>{const{identityFunctionCheck:r,inputStabilityCheck:n}={...tD,...t};return{identityFunctionCheck:{shouldRun:r==="always"||r==="once"&&e,run:Qj},inputStabilityCheck:{shouldRun:n==="always"||n==="once"&&e,run:eD}}},sD=class{constructor(e){this.value=e}deref(){return this.value}},lD=typeof WeakRef<"u"?WeakRef:sD,cD=0,zy=1;function rl(){return{s:cD,v:void 0,o:null,p:null}}function Z_(e,t={}){let r=rl();const{resultEqualityCheck:n}=t;let i,a=0;function o(){let s=r;const{length:l}=arguments;for(let f=0,d=l;f<d;f++){const h=arguments[f];if(typeof h=="function"||typeof h=="object"&&h!==null){let m=s.o;m===null&&(s.o=m=new WeakMap);const p=m.get(h);p===void 0?(s=rl(),m.set(h,s)):s=p}else{let m=s.p;m===null&&(s.p=m=new Map);const p=m.get(h);p===void 0?(s=rl(),m.set(h,s)):s=p}}const c=s;let u;if(s.s===zy)u=s.v;else if(u=e.apply(null,arguments),a++,n){const f=i?.deref?.()??i;f!=null&&n(f,u)&&(u=f,a!==0&&a--),i=typeof u=="object"&&u!==null||typeof u=="function"?new lD(u):u}return c.s=zy,c.v=u,u}return o.clearCache=()=>{r=rl(),o.resetResultsCount()},o.resultsCount=()=>a,o.resetResultsCount=()=>{a=0},o}function uD(e,...t){const r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,n=(...i)=>{let a=0,o=0,s,l={},c=i.pop();typeof c=="object"&&(l=c,c=i.pop()),rD(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const u={...r,...l},{memoize:f,memoizeOptions:d=[],argsMemoize:h=Z_,argsMemoizeOptions:m=[],devModeChecks:p={}}=u,g=By(d),v=By(m),x=aD(i),w=f(function(){return a++,c.apply(null,arguments)},...g);let y=!0;const _=h(function(){o++;const A=Fy(x,arguments);if(s=w.apply(null,A),process.env.NODE_ENV!=="production"){const{identityFunctionCheck:P,inputStabilityCheck:T}=oD(y,p);if(P.shouldRun&&P.run(c,A,s),T.shouldRun){const I=Fy(x,arguments);T.run({inputSelectorResults:A,inputSelectorResultsCopy:I},{memoize:f,memoizeOptions:g},arguments)}y&&(y=!1)}return s},...v);return Object.assign(_,{resultFunc:c,memoizedResultFunc:w,dependencies:x,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:f,argsMemoize:h})};return Object.assign(n,{withTypes:()=>n}),n}var $=uD(Z_),fD=Object.assign((e,t=$)=>{nD(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const r=Object.keys(e),n=r.map(a=>e[a]);return t(n,(...a)=>a.reduce((o,s,l)=>(o[r[l]]=s,o),{}))},{withTypes:()=>fD}),Xf={},Zf={},Jf={},Wy;function dD(){return Wy||(Wy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="symbol"?1:n===null?2:n===void 0?3:n!==n?4:0}const r=(n,i,a)=>{if(n!==i){const o=t(n),s=t(i);if(o===s&&o===0){if(n<i)return a==="desc"?1:-1;if(n>i)return a==="desc"?-1:1}return a==="desc"?s-o:o-s}return 0};e.compareValues=r})(Jf)),Jf}var Qf={},ed={},Vy;function J_(){return Vy||(Vy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return typeof r=="symbol"||r instanceof Symbol}e.isSymbol=t})(ed)),ed}var Hy;function hD(){return Hy||(Hy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=J_(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,o){return Array.isArray(a)?!1:typeof a=="number"||typeof a=="boolean"||a==null||t.isSymbol(a)?!0:typeof a=="string"&&(n.test(a)||!r.test(a))||o!=null&&Object.hasOwn(o,a)}e.isKey=i})(Qf)),Qf}var Uy;function pD(){return Uy||(Uy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=dD(),r=hD(),n=Ap();function i(a,o,s,l){if(a==null)return[];s=l?void 0:s,Array.isArray(a)||(a=Object.values(a)),Array.isArray(o)||(o=o==null?[null]:[o]),o.length===0&&(o=[null]),Array.isArray(s)||(s=s==null?[]:[s]),s=s.map(h=>String(h));const c=(h,m)=>{let p=h;for(let g=0;g<m.length&&p!=null;++g)p=p[m[g]];return p},u=(h,m)=>m==null||h==null?m:typeof h=="object"&&"key"in h?Object.hasOwn(m,h.key)?m[h.key]:c(m,h.path):typeof h=="function"?h(m):Array.isArray(h)?c(m,h):typeof m=="object"?m[h]:m,f=o.map(h=>(Array.isArray(h)&&h.length===1&&(h=h[0]),h==null||typeof h=="function"||Array.isArray(h)||r.isKey(h)?h:{key:h,path:n.toPath(h)}));return a.map(h=>({original:h,criteria:f.map(m=>u(m,h))})).slice().sort((h,m)=>{for(let p=0;p<f.length;p++){const g=t.compareValues(h.criteria[p],m.criteria[p],s[p]);if(g!==0)return g}return 0}).map(h=>h.original)}e.orderBy=i})(Zf)),Zf}var td={},Ky;function mD(){return Ky||(Ky=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r,n=1){const i=[],a=Math.floor(n),o=(s,l)=>{for(let c=0;c<s.length;c++){const u=s[c];Array.isArray(u)&&l<a?o(u,l+1):i.push(u)}};return o(r,0),i}e.flatten=t})(td)),td}var rd={},qy;function Q_(){return qy||(qy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=G_(),r=Dp(),n=V_(),i=U_();function a(o,s,l){return n.isObject(l)&&(typeof s=="number"&&r.isArrayLike(l)&&t.isIndex(s)&&s<l.length||typeof s=="string"&&s in l)?i.eq(l[s],o):!1}e.isIterateeCall=a})(rd)),rd}var Yy;function gD(){return Yy||(Yy=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=pD(),r=mD(),n=Q_();function i(a,...o){const s=o.length;return s>1&&n.isIterateeCall(a,o[0],o[1])?o=[]:s>2&&n.isIterateeCall(o[0],o[1],o[2])&&(o=[o[0]]),t.orderBy(a,r.flatten(o),["asc"])}e.sortBy=i})(Xf)),Xf}var nd,Gy;function vD(){return Gy||(Gy=1,nd=gD().sortBy),nd}var yD=vD();const fu=En(yD);var eO=e=>e.legend.settings,bD=e=>e.legend.size,xD=e=>e.legend.payload;$([xD,eO],(e,t)=>{var{itemSorter:r}=t,n=e.flat(1);return r?fu(n,r):n});var nl=1;function wD(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=k.useState({height:0,left:0,top:0,width:0}),n=k.useCallback(i=>{if(i!=null){var a=i.getBoundingClientRect(),o={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(o.height-t.height)>nl||Math.abs(o.left-t.left)>nl||Math.abs(o.top-t.top)>nl||Math.abs(o.width-t.width)>nl)&&r({height:o.height,left:o.left,top:o.top,width:o.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,n]}function At(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var _D=typeof Symbol=="function"&&Symbol.observable||"@@observable",Xy=_D,id=()=>Math.random().toString(36).substring(7).split("").join("."),OD={INIT:`@@redux/INIT${id()}`,REPLACE:`@@redux/REPLACE${id()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${id()}`},ji=OD;function ys(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function SD(e){if(e===void 0)return"undefined";if(e===null)return"null";const t=typeof e;switch(t){case"boolean":case"string":case"number":case"symbol":case"function":return t}if(Array.isArray(e))return"array";if(PD(e))return"date";if(ED(e))return"error";const r=AD(e);switch(r){case"Symbol":case"Promise":case"WeakMap":case"WeakSet":case"Map":case"Set":return r}return Object.prototype.toString.call(e).slice(8,-1).toLowerCase().replace(/\s/g,"")}function AD(e){return typeof e.constructor=="function"?e.constructor.name:null}function ED(e){return e instanceof Error||typeof e.message=="string"&&e.constructor&&typeof e.constructor.stackTraceLimit=="number"}function PD(e){return e instanceof Date?!0:typeof e.toDateString=="function"&&typeof e.getDate=="function"&&typeof e.setDate=="function"}function Nn(e){let t=typeof e;return process.env.NODE_ENV!=="production"&&(t=SD(e)),t}function tO(e,t,r){if(typeof e!="function")throw new Error(process.env.NODE_ENV==="production"?At(2):`Expected the root reducer to be a function. Instead, received: '${Nn(e)}'`);if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(process.env.NODE_ENV==="production"?At(0):"It looks like you are passing several store enhancers to createStore(). This is not supported. Instead, compose them together to a single function. See https://redux.js.org/tutorials/fundamentals/part-4-store#creating-a-store-with-enhancers for an example.");if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?At(1):`Expected the enhancer to be a function. Instead, received: '${Nn(r)}'`);return r(tO)(e,t)}let n=e,i=t,a=new Map,o=a,s=0,l=!1;function c(){o===a&&(o=new Map,a.forEach((g,v)=>{o.set(v,g)}))}function u(){if(l)throw new Error(process.env.NODE_ENV==="production"?At(3):"You may not call store.getState() while the reducer is executing. The reducer has already received the state as an argument. Pass it down from the top reducer instead of reading it from the store.");return i}function f(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?At(4):`Expected the listener to be a function. Instead, received: '${Nn(g)}'`);if(l)throw new Error(process.env.NODE_ENV==="production"?At(5):"You may not call store.subscribe() while the reducer is executing. If you would like to be notified after the store has been updated, subscribe from a component and invoke store.getState() in the callback to access the latest state. See https://redux.js.org/api/store#subscribelistener for more details.");let v=!0;c();const x=s++;return o.set(x,g),function(){if(v){if(l)throw new Error(process.env.NODE_ENV==="production"?At(6):"You may not unsubscribe from a store listener while the reducer is executing. See https://redux.js.org/api/store#subscribelistener for more details.");v=!1,c(),o.delete(x),a=null}}}function d(g){if(!ys(g))throw new Error(process.env.NODE_ENV==="production"?At(7):`Actions must be plain objects. Instead, the actual type was: '${Nn(g)}'. You may need to add middleware to your store setup to handle dispatching other values, such as 'redux-thunk' to handle dispatching functions. See https://redux.js.org/tutorials/fundamentals/part-4-store#middleware and https://redux.js.org/tutorials/fundamentals/part-6-async-logic#using-the-redux-thunk-middleware for examples.`);if(typeof g.type>"u")throw new Error(process.env.NODE_ENV==="production"?At(8):'Actions may not have an undefined "type" property. You may have misspelled an action type string constant.');if(typeof g.type!="string")throw new Error(process.env.NODE_ENV==="production"?At(17):`Action "type" property must be a string. Instead, the actual type was: '${Nn(g.type)}'. Value was: '${g.type}' (stringified)`);if(l)throw new Error(process.env.NODE_ENV==="production"?At(9):"Reducers may not dispatch actions.");try{l=!0,i=n(i,g)}finally{l=!1}return(a=o).forEach(x=>{x()}),g}function h(g){if(typeof g!="function")throw new Error(process.env.NODE_ENV==="production"?At(10):`Expected the nextReducer to be a function. Instead, received: '${Nn(g)}`);n=g,d({type:ji.REPLACE})}function m(){const g=f;return{subscribe(v){if(typeof v!="object"||v===null)throw new Error(process.env.NODE_ENV==="production"?At(11):`Expected the observer to be an object. Instead, received: '${Nn(v)}'`);function x(){const y=v;y.next&&y.next(u())}return x(),{unsubscribe:g(x)}},[Xy](){return this}}}return d({type:ji.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:h,[Xy]:m}}function Zy(e){typeof console<"u"&&typeof console.error=="function"&&console.error(e);try{throw new Error(e)}catch{}}function CD(e,t,r,n){const i=Object.keys(t),a=r&&r.type===ji.INIT?"preloadedState argument passed to createStore":"previous state received by the reducer";if(i.length===0)return"Store does not have a valid reducer. Make sure the argument passed to combineReducers is an object whose values are reducers.";if(!ys(e))return`The ${a} has unexpected type of "${Nn(e)}". Expected argument to be an object with the following keys: "${i.join('", "')}"`;const o=Object.keys(e).filter(s=>!t.hasOwnProperty(s)&&!n[s]);if(o.forEach(s=>{n[s]=!0}),!(r&&r.type===ji.REPLACE)&&o.length>0)return`Unexpected ${o.length>1?"keys":"key"} "${o.join('", "')}" found in ${a}. Expected to find one of the known reducer keys instead: "${i.join('", "')}". Unexpected keys will be ignored.`}function kD(e){Object.keys(e).forEach(t=>{const r=e[t];if(typeof r(void 0,{type:ji.INIT})>"u")throw new Error(process.env.NODE_ENV==="production"?At(12):`The slice reducer for key "${t}" returned undefined during initialization. If the state passed to the reducer is undefined, you must explicitly return the initial state. The initial state may not be undefined. If you don't want to set a value for this reducer, you can use null instead of undefined.`);if(typeof r(void 0,{type:ji.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(process.env.NODE_ENV==="production"?At(13):`The slice reducer for key "${t}" returned undefined when probed with a random type. Don't try to handle '${ji.INIT}' or other actions in "redux/*" namespace. They are considered private. Instead, you must return the current state for any unknown actions, unless it is undefined, in which case you must return the initial state, regardless of the action type. The initial state may not be undefined, but can be null.`)})}function rO(e){const t=Object.keys(e),r={};for(let o=0;o<t.length;o++){const s=t[o];process.env.NODE_ENV!=="production"&&typeof e[s]>"u"&&Zy(`No reducer provided for key "${s}"`),typeof e[s]=="function"&&(r[s]=e[s])}const n=Object.keys(r);let i;process.env.NODE_ENV!=="production"&&(i={});let a;try{kD(r)}catch(o){a=o}return function(s={},l){if(a)throw a;if(process.env.NODE_ENV!=="production"){const f=CD(s,r,l,i);f&&Zy(f)}let c=!1;const u={};for(let f=0;f<n.length;f++){const d=n[f],h=r[d],m=s[d],p=h(m,l);if(typeof p>"u"){const g=l&&l.type;throw new Error(process.env.NODE_ENV==="production"?At(14):`When called with an action of type ${g?`"${String(g)}"`:"(unknown type)"}, the slice reducer for key "${d}" returned undefined. To ignore an action, you must explicitly return the previous state. If you want this reducer to hold no value, you can return null instead of undefined.`)}u[d]=p,c=c||p!==m}return c=c||n.length!==Object.keys(s).length,c?u:s}}function rc(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...n)=>t(r(...n)))}function TD(...e){return t=>(r,n)=>{const i=t(r,n);let a=()=>{throw new Error(process.env.NODE_ENV==="production"?At(15):"Dispatching while constructing your middleware is not allowed. Other middleware would not be applied to this dispatch.")};const o={getState:i.getState,dispatch:(l,...c)=>a(l,...c)},s=e.map(l=>l(o));return a=rc(...s)(i.dispatch),{...i,dispatch:a}}}function Rp(e){return ys(e)&&"type"in e&&typeof e.type=="string"}var nO=Symbol.for("immer-nothing"),Jy=Symbol.for("immer-draftable"),lr=Symbol.for("immer-state"),MD=process.env.NODE_ENV!=="production"?[function(e){return`The plugin for '${e}' has not been loaded into Immer. To enable the plugin, import and call \`enable${e}()\` when initializing your application.`},function(e){return`produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${e}'`},"This object has been frozen and should not be mutated",function(e){return"Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? "+e},"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.","Immer forbids circular references","The first or second argument to `produce` must be a function","The third argument to `produce` must be a function or undefined","First argument to `createDraft` must be a plain object, an array, or an immerable object","First argument to `finishDraft` must be a draft returned by `createDraft`",function(e){return`'current' expects a draft, got: ${e}`},"Object.defineProperty() cannot be used on an Immer draft","Object.setPrototypeOf() cannot be used on an Immer draft","Immer only supports deleting array indices","Immer only supports setting array indices and the 'length' property",function(e){return`'original' expects a draft, got: ${e}`}]:[];function Wt(e,...t){if(process.env.NODE_ENV!=="production"){const r=MD[e],n=typeof r=="function"?r.apply(null,t):r;throw new Error(`[Immer] ${n}`)}throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ka=Object.getPrototypeOf;function zi(e){return!!e&&!!e[lr]}function wn(e){return e?iO(e)||Array.isArray(e)||!!e[Jy]||!!e.constructor?.[Jy]||bs(e)||hu(e):!1}var jD=Object.prototype.constructor.toString();function iO(e){if(!e||typeof e!="object")return!1;const t=ka(e);if(t===null)return!0;const r=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return r===Object?!0:typeof r=="function"&&Function.toString.call(r)===jD}function nc(e,t){du(e)===0?Reflect.ownKeys(e).forEach(r=>{t(r,e[r],e)}):e.forEach((r,n)=>t(n,r,e))}function du(e){const t=e[lr];return t?t.type_:Array.isArray(e)?1:bs(e)?2:hu(e)?3:0}function gh(e,t){return du(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function aO(e,t,r){const n=du(e);n===2?e.set(t,r):n===3?e.add(r):e[t]=r}function DD(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function bs(e){return e instanceof Map}function hu(e){return e instanceof Set}function xi(e){return e.copy_||e.base_}function vh(e,t){if(bs(e))return new Map(e);if(hu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const r=iO(e);if(t===!0||t==="class_only"&&!r){const n=Object.getOwnPropertyDescriptors(e);delete n[lr];let i=Reflect.ownKeys(n);for(let a=0;a<i.length;a++){const o=i[a],s=n[o];s.writable===!1&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(n[o]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[o]})}return Object.create(ka(e),n)}else{const n=ka(e);if(n!==null&&r)return{...e};const i=Object.create(n);return Object.assign(i,e)}}function $p(e,t=!1){return pu(e)||zi(e)||!wn(e)||(du(e)>1&&Object.defineProperties(e,{set:{value:il},add:{value:il},clear:{value:il},delete:{value:il}}),Object.freeze(e),t&&Object.values(e).forEach(r=>$p(r,!0))),e}function il(){Wt(2)}function pu(e){return Object.isFrozen(e)}var ND={};function Wi(e){const t=ND[e];return t||Wt(0,e),t}var Ho;function oO(){return Ho}function ID(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function Qy(e,t){t&&(Wi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function yh(e){bh(e),e.drafts_.forEach(RD),e.drafts_=null}function bh(e){e===Ho&&(Ho=e.parent_)}function e0(e){return Ho=ID(Ho,e)}function RD(e){const t=e[lr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function t0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const r=t.drafts_[0];return e!==void 0&&e!==r?(r[lr].modified_&&(yh(t),Wt(4)),wn(e)&&(e=ic(t,e),t.parent_||ac(t,e)),t.patches_&&Wi("Patches").generateReplacementPatches_(r[lr].base_,e,t.patches_,t.inversePatches_)):e=ic(t,r,[]),yh(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==nO?e:void 0}function ic(e,t,r){if(pu(t))return t;const n=t[lr];if(!n)return nc(t,(i,a)=>r0(e,n,t,i,a,r)),t;if(n.scope_!==e)return t;if(!n.modified_)return ac(e,n.base_,!0),n.base_;if(!n.finalized_){n.finalized_=!0,n.scope_.unfinalizedDrafts_--;const i=n.copy_;let a=i,o=!1;n.type_===3&&(a=new Set(i),i.clear(),o=!0),nc(a,(s,l)=>r0(e,n,i,s,l,r,o)),ac(e,i,!1),r&&e.patches_&&Wi("Patches").generatePatches_(n,r,e.patches_,e.inversePatches_)}return n.copy_}function r0(e,t,r,n,i,a,o){if(process.env.NODE_ENV!=="production"&&i===r&&Wt(5),zi(i)){const s=a&&t&&t.type_!==3&&!gh(t.assigned_,n)?a.concat(n):void 0,l=ic(e,i,s);if(aO(r,n,l),zi(l))e.canAutoFreeze_=!1;else return}else o&&r.add(i);if(wn(i)&&!pu(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ic(e,i),(!t||!t.scope_.parent_)&&typeof n!="symbol"&&(bs(r)?r.has(n):Object.prototype.propertyIsEnumerable.call(r,n))&&ac(e,i)}}function ac(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$p(t,r)}function $D(e,t){const r=Array.isArray(e),n={type_:r?1:0,scope_:t?t.scope_:oO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=n,a=Lp;r&&(i=[n],a=Uo);const{revoke:o,proxy:s}=Proxy.revocable(i,a);return n.draft_=s,n.revoke_=o,s}var Lp={get(e,t){if(t===lr)return e;const r=xi(e);if(!gh(r,t))return LD(e,r,t);const n=r[t];return e.finalized_||!wn(n)?n:n===ad(e.base_,t)?(od(e),e.copy_[t]=wh(n,e)):n},has(e,t){return t in xi(e)},ownKeys(e){return Reflect.ownKeys(xi(e))},set(e,t,r){const n=sO(xi(e),t);if(n?.set)return n.set.call(e.draft_,r),!0;if(!e.modified_){const i=ad(xi(e),t),a=i?.[lr];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_[t]=!1,!0;if(DD(r,i)&&(r!==void 0||gh(e.base_,t)))return!0;od(e),xh(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_[t]=!0),!0},deleteProperty(e,t){return ad(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,od(e),xh(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const r=xi(e),n=Reflect.getOwnPropertyDescriptor(r,t);return n&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:n.enumerable,value:r[t]}},defineProperty(){Wt(11)},getPrototypeOf(e){return ka(e.base_)},setPrototypeOf(){Wt(12)}},Uo={};nc(Lp,(e,t)=>{Uo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Uo.deleteProperty=function(e,t){return process.env.NODE_ENV!=="production"&&isNaN(parseInt(t))&&Wt(13),Uo.set.call(this,e,t,void 0)};Uo.set=function(e,t,r){return process.env.NODE_ENV!=="production"&&t!=="length"&&isNaN(parseInt(t))&&Wt(14),Lp.set.call(this,e[0],t,r,e[0])};function ad(e,t){const r=e[lr];return(r?xi(r):e)[t]}function LD(e,t,r){const n=sO(t,r);return n?"value"in n?n.value:n.get?.call(e.draft_):void 0}function sO(e,t){if(!(t in e))return;let r=ka(e);for(;r;){const n=Object.getOwnPropertyDescriptor(r,t);if(n)return n;r=ka(r)}}function xh(e){e.modified_||(e.modified_=!0,e.parent_&&xh(e.parent_))}function od(e){e.copy_||(e.copy_=vh(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var BD=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,r,n)=>{if(typeof t=="function"&&typeof r!="function"){const a=r;r=t;const o=this;return function(l=a,...c){return o.produce(l,u=>r.call(this,u,...c))}}typeof r!="function"&&Wt(6),n!==void 0&&typeof n!="function"&&Wt(7);let i;if(wn(t)){const a=e0(this),o=wh(t,void 0);let s=!0;try{i=r(o),s=!1}finally{s?yh(a):bh(a)}return Qy(a,n),t0(i,a)}else if(!t||typeof t!="object"){if(i=r(t),i===void 0&&(i=t),i===nO&&(i=void 0),this.autoFreeze_&&$p(i,!0),n){const a=[],o=[];Wi("Patches").generateReplacementPatches_(t,i,a,o),n(a,o)}return i}else Wt(1,t)},this.produceWithPatches=(t,r)=>{if(typeof t=="function")return(o,...s)=>this.produceWithPatches(o,l=>t(l,...s));let n,i;return[this.produce(t,r,(o,s)=>{n=o,i=s}),n,i]},typeof e?.autoFreeze=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof e?.useStrictShallowCopy=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){wn(e)||Wt(8),zi(e)&&(e=yn(e));const t=e0(this),r=wh(e,void 0);return r[lr].isManual_=!0,bh(t),r}finishDraft(e,t){const r=e&&e[lr];(!r||!r.isManual_)&&Wt(9);const{scope_:n}=r;return Qy(n,t),t0(void 0,n)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){const i=t[r];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}r>-1&&(t=t.slice(r+1));const n=Wi("Patches").applyPatches_;return zi(e)?n(e,t):this.produce(e,i=>n(i,t))}};function wh(e,t){const r=bs(e)?Wi("MapSet").proxyMap_(e,t):hu(e)?Wi("MapSet").proxySet_(e,t):$D(e,t);return(t?t.scope_:oO()).drafts_.push(r),r}function yn(e){return zi(e)||Wt(10,e),lO(e)}function lO(e){if(!wn(e)||pu(e))return e;const t=e[lr];let r;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=vh(e,t.scope_.immer_.useStrictShallowCopy_)}else r=vh(e,!0);return nc(r,(n,i)=>{aO(r,n,lO(i))}),t&&(t.finalized_=!1),r}var FD=new BD,cO=FD.produce;function uO(e){return({dispatch:r,getState:n})=>i=>a=>typeof a=="function"?a(r,n,e):i(a)}var zD=uO(),WD=uO,VD=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?rc:rc.apply(null,arguments)},HD=e=>e&&typeof e.match=="function";function wr(e,t){function r(...n){if(t){let i=t(...n);if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(0):"prepareAction did not return an object");return{type:e,payload:i.payload,..."meta"in i&&{meta:i.meta},..."error"in i&&{error:i.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=n=>Rp(n)&&n.type===e,r}function UD(e){return typeof e=="function"&&"type"in e&&HD(e)}function KD(e){const t=e?`${e}`.split("/"):[],r=t[t.length-1]||"actionCreator";return`Detected an action creator with type "${e||"unknown"}" being dispatched.
|
|
143
143
|
Make sure you're calling the action creator before dispatching, i.e. \`dispatch(${r}())\` instead of \`dispatch(${r})\`. This is necessary even if the action has no payload.`}function qD(e={}){if(process.env.NODE_ENV==="production")return()=>r=>n=>r(n);const{isActionCreator:t=UD}=e;return()=>r=>n=>(t(n)&&console.warn(KD(n.type)),r(n))}function fO(e,t){let r=0;return{measureTime(n){const i=Date.now();try{return n()}finally{const a=Date.now();r+=a-i}},warnIfExceeded(){r>e&&console.warn(`${t} took ${r}ms, which is more than the warning threshold of ${e}ms.
|
|
144
144
|
If your state or actions are very large, you may want to disable the middleware as it might cause too much of a slowdown in development mode. See https://redux-toolkit.js.org/api/getDefaultMiddleware for instructions.
|
|
145
145
|
It is disabled in production builds, so you don't need to worry about that.`)}}}var dO=class Oo extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,Oo.prototype)}static get[Symbol.species](){return Oo}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new Oo(...t[0].concat(this)):new Oo(...t.concat(this))}};function n0(e){return wn(e)?cO(e,()=>{}):e}function al(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function YD(e){return typeof e!="object"||e==null||Object.isFrozen(e)}function GD(e,t,r){const n=hO(e,t,r);return{detectMutations(){return pO(e,t,n,r)}}}function hO(e,t=[],r,n="",i=new Set){const a={value:r};if(!e(r)&&!i.has(r)){i.add(r),a.children={};for(const o in r){const s=n?n+"."+o:o;t.length&&t.indexOf(s)!==-1||(a.children[o]=hO(e,t,r[o],s))}}return a}function pO(e,t=[],r,n,i=!1,a=""){const o=r?r.value:void 0,s=o===n;if(i&&!s&&!Number.isNaN(n))return{wasMutated:!0,path:a};if(e(o)||e(n))return{wasMutated:!1};const l={};for(let u in r.children)l[u]=!0;for(let u in n)l[u]=!0;const c=t.length>0;for(let u in l){const f=a?a+"."+u:u;if(c&&t.some(m=>m instanceof RegExp?m.test(f):f===m))continue;const d=pO(e,t,r.children[u],n[u],s,f);if(d.wasMutated)return d}return{wasMutated:!1}}function XD(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{let t=function(s,l,c,u){return JSON.stringify(s,r(l,u),c)},r=function(s,l){let c=[],u=[];return l||(l=function(f,d){return c[0]===d?"[Circular ~]":"[Circular ~."+u.slice(0,c.indexOf(d)).join(".")+"]"}),function(f,d){if(c.length>0){var h=c.indexOf(this);~h?c.splice(h+1):c.push(this),~h?u.splice(h,1/0,f):u.push(f),~c.indexOf(d)&&(d=l.call(this,f,d))}else c.push(d);return s==null?d:s.call(this,f,d)}},{isImmutable:n=YD,ignoredPaths:i,warnAfter:a=32}=e;const o=GD.bind(null,n,i);return({getState:s})=>{let l=s(),c=o(l),u;return f=>d=>{const h=fO(a,"ImmutableStateInvariantMiddleware");h.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=o(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Se(19):`A state mutation was detected between dispatches, in the path '${u.path||""}'. This may cause incorrect behavior. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)});const m=f(d);return h.measureTime(()=>{if(l=s(),u=c.detectMutations(),c=o(l),u.wasMutated)throw new Error(process.env.NODE_ENV==="production"?Se(20):`A state mutation was detected inside a dispatch, in the path: ${u.path||""}. Take a look at the reducer(s) handling the action ${t(d)}. (https://redux.js.org/style-guide/style-guide#do-not-mutate-state)`)}),h.warnIfExceeded(),m}}}}function mO(e){const t=typeof e;return e==null||t==="string"||t==="boolean"||t==="number"||Array.isArray(e)||ys(e)}function _h(e,t="",r=mO,n,i=[],a){let o;if(!r(e))return{keyPath:t||"<root>",value:e};if(typeof e!="object"||e===null||a?.has(e))return!1;const s=n!=null?n(e):Object.entries(e),l=i.length>0;for(const[c,u]of s){const f=t?t+"."+c:c;if(!(l&&i.some(h=>h instanceof RegExp?h.test(f):f===h))){if(!r(u))return{keyPath:f,value:u};if(typeof u=="object"&&(o=_h(u,f,r,n,i,a),o))return o}}return a&&gO(e)&&a.add(e),!1}function gO(e){if(!Object.isFrozen(e))return!1;for(const t of Object.values(e))if(!(typeof t!="object"||t===null)&&!gO(t))return!1;return!0}function ZD(e={}){if(process.env.NODE_ENV==="production")return()=>t=>r=>t(r);{const{isSerializable:t=mO,getEntries:r,ignoredActions:n=[],ignoredActionPaths:i=["meta.arg","meta.baseQueryMeta"],ignoredPaths:a=[],warnAfter:o=32,ignoreState:s=!1,ignoreActions:l=!1,disableCache:c=!1}=e,u=!c&&WeakSet?new WeakSet:void 0;return f=>d=>h=>{if(!Rp(h))return d(h);const m=d(h),p=fO(o,"SerializableStateInvariantMiddleware");return!l&&!(n.length&&n.indexOf(h.type)!==-1)&&p.measureTime(()=>{const g=_h(h,"",t,r,i,u);if(g){const{keyPath:v,value:x}=g;console.error(`A non-serializable value was detected in an action, in the path: \`${v}\`. Value:`,x,`
|
|
@@ -147,7 +147,7 @@ Take a look at the logic that dispatched this action: `,h,`
|
|
|
147
147
|
(See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
|
|
148
148
|
(To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(p.measureTime(()=>{const g=f.getState(),v=_h(g,"",t,r,a,u);if(v){const{keyPath:x,value:w}=v;console.error(`A non-serializable value was detected in the state, in the path: \`${x}\`. Value:`,w,`
|
|
149
149
|
Take a look at the reducer(s) handling this action type: ${h.type}.
|
|
150
|
-
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),m}}}function ol(e){return typeof e=="boolean"}var JD=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new dO;if(r&&(ol(r)?o.push(zD):o.push(WD(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};ol(n)||(s=n),o.unshift(XD(s))}if(i){let s={};ol(i)||(s=i),o.push(ZD(s))}if(a){let s={};ol(a)||(s=a),o.unshift(qD(s))}}return o},QD="RTK_autoBatch",i0=e=>t=>{setTimeout(t,e)},eN=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:i0(10):e.type==="callback"?e.queueNotification:i0(e.timeout),c=()=>{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>i&&u(),d=n.subscribe(f);return s.add(u),()=>{d(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[QD],a=!i,a&&(o||(o=!0,l(c))),n.dispatch(u)}finally{i=!0}}})},tN=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new dO(e);return n&&i.push(eN(typeof n=="object"?n:void 0)),i};function rN(e){const t=JD(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(ys(r))l=rO(r);else throw new Error(process.env.NODE_ENV==="production"?Se(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Se(2):"`middleware` field must be a callback");let c;if(typeof n=="function"){if(c=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Se(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(p=>typeof p!="function"))throw new Error(process.env.NODE_ENV==="production"?Se(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&a){let p=new Set;c.forEach(g=>{if(p.has(g))throw new Error(process.env.NODE_ENV==="production"?Se(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");p.add(g)})}let u=rc;i&&(u=VD({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=TD(...c),d=tN(f);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?Se(5):"`enhancers` field must be a callback");let h=typeof s=="function"?s(d):d();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?Se(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(p=>typeof p!="function"))throw new Error(process.env.NODE_ENV==="production"?Se(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!h.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...h);return tO(l,o,m)}function vO(e){const t={},r=[];let n;const i={addCase(a,o){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?Se(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Se(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof a=="string"?a:a.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?Se(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?Se(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=o,i},addAsyncThunk(a,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Se(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Se(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Se(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}function nN(e){return typeof e=="function"}function iN(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Se(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,i]=vO(t),a;if(nN(e))a=()=>n0(e());else{const s=n0(e);a=()=>s}function o(s=a(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(Wi(u)){const h=f(u,l);return h===void 0?u:h}else{if(wn(u))return cO(u,d=>f(d,l));{const d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},s)}return o.getInitialState=a,o}var aN="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",oN=(e=21)=>{let t="",r=e;for(;r--;)t+=aN[Math.random()*64|0];return t},sN=Symbol.for("rtk-slice-createasyncthunk");function lN(e,t){return`${e}/${t}`}function cN({creators:e}={}){const t=e?.asyncThunk?.[sN];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=(typeof n.reducers=="function"?n.reducers(fN()):n.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,y){const _=typeof w=="string"?w:w.type;if(!_)throw new Error(process.env.NODE_ENV==="production"?Se(12):"`context.addCase` cannot be called with an empty action type");if(_ in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Se(13):"`context.addCase` cannot be called with two reducers for the same action type: "+_);return l.sliceCaseReducersByType[_]=y,c},addMatcher(w,y){return l.sliceMatchers.push({matcher:w,reducer:y}),c},exposeAction(w,y){return l.actionCreators[w]=y,c},exposeCaseReducer(w,y){return l.sliceCaseReducersByName[w]=y,c}};s.forEach(w=>{const y=o[w],_={reducerName:w,type:lN(i,w),createNotation:typeof n.reducers=="function"};hN(y)?mN(_,y,c,t):dN(_,y,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Se(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[w={},y=[],_=void 0]=typeof n.extraReducers=="function"?vO(n.extraReducers):[n.extraReducers],O={...w,...l.sliceCaseReducersByType};return iN(n.initialState,A=>{for(let P in O)A.addCase(P,O[P]);for(let P of l.sliceMatchers)A.addMatcher(P.matcher,P.reducer);for(let P of y)A.addMatcher(P.matcher,P.reducer);_&&A.addDefaultCase(_)})}const f=w=>w,d=new Map,h=new WeakMap;let m;function p(w,y){return m||(m=u()),m(w,y)}function g(){return m||(m=u()),m.getInitialState()}function v(w,y=!1){function _(A){let P=A[w];if(typeof P>"u"){if(y)P=al(h,_,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Se(15):"selectSlice returned undefined for an uninjected slice reducer")}return P}function O(A=f){const P=al(d,y,()=>new WeakMap);return al(P,A,()=>{const T={};for(const[I,j]of Object.entries(n.selectors??{}))T[I]=uN(j,A,()=>al(h,A,g),y);return T})}return{reducerPath:w,getSelectors:O,get selectors(){return O(_)},selectSlice:_}}const x={name:i,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...v(a),injectInto(w,{reducerPath:y,..._}={}){const O=y??a;return w.inject({reducerPath:O,reducer:p},_),{...x,...v(O,!0)}}};return x}}function uN(e,t,r,n){function i(a,...o){let s=t(a);if(typeof s>"u"){if(n)s=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Se(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...o)}return i.unwrapped=e,i}var fr=cN();function fN(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function dN({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!pN(n))throw new Error(process.env.NODE_ENV==="production"?Se(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?wr(e,o):wr(e))}function hN(e){return e._reducerDefinitionType==="asyncThunk"}function pN(e){return e._reducerDefinitionType==="reducerWithPrepare"}function mN({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:c,options:u}=r,f=i(e,a,u);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),s&&n.addCase(f.pending,s),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:o||sl,pending:s||sl,rejected:l||sl,settled:c||sl})}function sl(){}var gN="task",yO="listener",bO="completed",Bp="cancelled",vN=`task-${Bp}`,yN=`task-${bO}`,Oh=`${yO}-${Bp}`,bN=`${yO}-${bO}`,mu=class{constructor(e){this.code=e,this.message=`${gN} ${Bp} (reason: ${e})`}name="TaskAbortError";message},Fp=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Se(32):`${t} is not a function`)},oc=()=>{},xO=(e,t=oc)=>(e.catch(t),e),wO=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Di=(e,t)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ni=e=>{if(e.aborted){const{reason:t}=e;throw new mu(t)}};function _O(e,t){let r=oc;return new Promise((n,i)=>{const a=()=>i(new mu(e.reason));if(e.aborted){a();return}r=wO(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=oc})}var xN=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof mu?"cancelled":"rejected",error:r}}finally{t?.()}},sc=e=>t=>xO(_O(e,t).then(r=>(Ni(e),r))),OO=e=>{const t=sc(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:_a}=Object,a0={},xs="listenerMiddleware",wN=(e,t)=>{const r=n=>wO(e,()=>Di(n,e.reason));return(n,i)=>{Fp(n,"taskExecutor");const a=new AbortController;r(a);const o=xN(async()=>{Ni(e),Ni(a.signal);const s=await n({pause:sc(a.signal),delay:OO(a.signal),signal:a.signal});return Ni(a.signal),s},()=>Di(a,yN));return i?.autoJoin&&t.push(o.catch(oc)),{result:sc(e)(o),cancel(){Di(a,vN)}}}},_N=(e,t)=>{const r=async(n,i)=>{Ni(t);let a=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await _O(t,Promise.race(s));return Ni(t),l}finally{a()}};return(n,i)=>xO(r(n,i))},SO=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=wr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(21):"Creating or removing a listener requires one of the known fields for matching an action");return Fp(a,"options.listener"),{predicate:i,type:t,effect:a}},AO=_a(e=>{const{type:t,predicate:r,effect:n}=SO(e);return{id:oN(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Se(22):"Unsubscribe not initialized")}}},{withTypes:()=>AO}),o0=(e,t)=>{const{type:r,effect:n,predicate:i}=SO(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},Sh=e=>{e.pending.forEach(t=>{Di(t,Oh)})},ON=e=>()=>{e.forEach(Sh),e.clear()},s0=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},EO=_a(wr(`${xs}/add`),{withTypes:()=>EO}),SN=wr(`${xs}/removeAll`),PO=_a(wr(`${xs}/remove`),{withTypes:()=>PO}),AN=(...e)=>{console.error(`${xs}/error`,...e)},ws=(e={})=>{const t=new Map,{extra:r,onError:n=AN}=e;Fp(n,"onError");const i=u=>(u.unsubscribe=()=>t.delete(u.id),t.set(u.id,u),f=>{u.unsubscribe(),f?.cancelActive&&Sh(u)}),a=u=>{const f=o0(t,u)??AO(u);return i(f)};_a(a,{withTypes:()=>a});const o=u=>{const f=o0(t,u);return f&&(f.unsubscribe(),u.cancelActive&&Sh(f)),!!f};_a(o,{withTypes:()=>o});const s=async(u,f,d,h)=>{const m=new AbortController,p=_N(a,m.signal),g=[];try{u.pending.add(m),await Promise.resolve(u.effect(f,_a({},d,{getOriginalState:h,condition:(v,x)=>p(v,x).then(Boolean),take:p,delay:OO(m.signal),pause:sc(m.signal),extra:r,signal:m.signal,fork:wN(m.signal,g),unsubscribe:u.unsubscribe,subscribe:()=>{t.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((v,x,w)=>{v!==m&&(Di(v,Oh),w.delete(v))})},cancel:()=>{Di(m,Oh),u.pending.delete(m)},throwIfCancelled:()=>{Ni(m.signal)}})))}catch(v){v instanceof mu||s0(n,v,{raisedBy:"effect"})}finally{await Promise.all(g),Di(m,bN),u.pending.delete(m)}},l=ON(t);return{middleware:u=>f=>d=>{if(!Rp(d))return f(d);if(EO.match(d))return a(d.payload);if(SN.match(d)){l();return}if(PO.match(d))return o(d.payload);let h=u.getState();const m=()=>{if(h===a0)throw new Error(process.env.NODE_ENV==="production"?Se(23):`${xs}: getOriginalState can only be called synchronously`);return h};let p;try{if(p=f(d),t.size>0){const g=u.getState(),v=Array.from(t.values());for(const x of v){let w=!1;try{w=x.predicate(d,g,h)}catch(y){w=!1,s0(n,y,{raisedBy:"predicate"})}w&&s(x,d,u,m)}}}finally{h=a0}return p},startListening:a,stopListening:o,clearListeners:l}};function Se(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var EN={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},CO=fr({name:"chartLayout",initialState:EN,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:PN,setLayout:CN,setChartSize:kN,setScale:TN}=CO.actions,MN=CO.reducer;function l0(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 c0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l0(Object(r),!0).forEach(function(n){jN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jN(e,t,r){return(t=DN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DN(e){var t=NN(e,"string");return typeof t=="symbol"?t:t+""}function NN(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 lc=Math.PI/180,IN=e=>e*180/Math.PI,ut=(e,t,r,n)=>({x:e+Math.cos(-lc*n)*r,y:t+Math.sin(-lc*n)*r}),kO=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},RN=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},$N=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,o=RN({x:r,y:n},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(r-i)/o,l=Math.acos(s);return n>a&&(l=2*Math.PI-l),{radius:o,angle:IN(l),angleInRadian:l}},LN=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},BN=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return e+o*360},FN=(e,t)=>{var{x:r,y:n}=e,{radius:i,angle:a}=$N({x:r,y:n},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s||i===0)return null;var{startAngle:l,endAngle:c}=LN(t),u=a,f;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;f=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;f=u>=c&&u<=l}return f?c0(c0({},t),{},{radius:i,angle:BN(u,t)}):null};function TO(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function u0(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 yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u0(Object(r),!0).forEach(function(n){zN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zN(e,t,r){return(t=WN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WN(e){var t=VN(e,"string");return typeof t=="symbol"?t:t+""}function VN(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 ze(e,t,r){return Ge(e)||Ge(t)?r:Zr(t)?zi(e,t,r):typeof t=="function"?t(e):r}var HN=(e,t,r,n,i)=>{var a,o=-1,s=(a=t?.length)!==null&&a!==void 0?a:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<s;l++){var c=l>0?r[l-1].coordinate:r[s-1].coordinate,u=r[l].coordinate,f=l>=s-1?r[0].coordinate:r[l+1].coordinate,d=void 0;if(wt(u-c)!==wt(f-u)){var h=[];if(wt(f-u)===wt(i[1]-i[0])){d=f;var m=u+i[1]-i[0];h[0]=Math.min(m,(m+c)/2),h[1]=Math.max(m,(m+c)/2)}else{d=c;var p=f+i[1]-i[0];h[0]=Math.min(u,(p+u)/2),h[1]=Math.max(u,(p+u)/2)}var g=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(e>g[0]&&e<=g[1]||e>=h[0]&&e<=h[1]){({index:o}=r[l]);break}}else{var v=Math.min(c,f),x=Math.max(c,f);if(e>(v+u)/2&&e<=(x+u)/2){({index:o}=r[l]);break}}}else if(t){for(var w=0;w<s;w++)if(w===0&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w>0&&w<s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w===s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2){({index:o}=t[w]);break}}return o},UN=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&ae(e[a]))return yr(yr({},e),{},{[a]:e[a]+(n||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&ae(e[o]))return yr(yr({},e),{},{[o]:e[o]+(i||0)})}return e},Qn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",MO=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var i,a,o=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===r&&(a=!0),s.coordinate));return i||o.push(t),a||o.push(r),o},jO=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:o,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:f,niceTicks:d,axisType:h}=e;if(!o)return null;var m=s==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,p=i==="category"&&o.bandwidth?o.bandwidth()/m:0;if(p=h==="angleAxis"&&a&&a.length>=2?wt(a[0]-a[1])*2*p:p,f||d){var g=(f||d||[]).map((v,x)=>{var w=n?n.indexOf(v):v;return{coordinate:o(w)+p,value:v,offset:p,index:x}});return g.filter(v=>!sr(v.coordinate))}return l&&c?c.map((v,x)=>({coordinate:o(v)+p,value:v,index:x,offset:p})):o.ticks&&u!=null?o.ticks(u).map((v,x)=>({coordinate:o(v)+p,value:v,offset:p,index:x})):o.domain().map((v,x)=>({coordinate:o(v)+p,value:n?n[v]:v,index:x,offset:p}))},f0=1e-4,KN=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-f0,a=Math.max(n[0],n[1])+f0,o=e(t[0]),s=e(t[r-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[r-1]])}},qN=(e,t)=>{if(!t||t.length!==2||!ae(t[0])||!ae(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ae(e[0])||e[0]<r)&&(i[0]=r),(!ae(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},YN=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=sr(e[o][r][1])?e[o][r][0]:e[o][r][1];s>=0?(e[o][r][0]=i,e[o][r][1]=i+s,i=e[o][r][1]):(e[o][r][0]=a,e[o][r][1]=a+s,a=e[o][r][1])}},GN=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0;a<t;++a){var o=sr(e[a][r][1])?e[a][r][0]:e[a][r][1];o>=0?(e[a][r][0]=i,e[a][r][1]=i+o,i=e[a][r][1]):(e[a][r][0]=0,e[a][r][1]=0)}},XN={sign:YN,expand:fj,none:Ca,silhouette:dj,wiggle:hj,positive:GN},ZN=(e,t,r)=>{var n=XN[r],i=uj().keys(t).value((a,o)=>+ze(a,o,0)).order(ph).offset(n);return i(e)};function JN(e){return e==null?void 0:String(e)}function d0(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ge(i[t.dataKey])){var s=b_(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=ze(i,Ge(o)?t.dataKey:o);return Ge(l)?null:t.scale(l)}var h0=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var s=ze(a,t.dataKey,t.scale.domain()[o]);return Ge(s)?null:t.scale(s)-i/2+n},QN=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},e5=e=>{var t=e.flat(2).filter(ae);return[Math.min(...t),Math.max(...t)]},t5=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],r5=(e,t,r)=>{if(e!=null)return t5(Object.keys(e).reduce((n,i)=>{var a=e[i],{stackedData:o}=a,s=o.reduce((l,c)=>{var u=TO(c,t,r),f=e5(u);return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},p0=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,m0=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ko=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=fu(t,u=>u.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var l=i[o],c=i[o-1];a=Math.min((l.coordinate||0)-(c.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function g0(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return yr(yr({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Va(e,t){if(e)return String(e);if(typeof t=="string")return t}function n5(e,t,r,n,i){if(r==="horizontal"||r==="vertical"){var a=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return a?{x:e,y:t}:null}return n?FN({x:e,y:t},n):null}var i5=(e,t,r,n)=>{var i=t.find(c=>c&&c.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.y};if(e==="vertical")return{x:n.x,y:i.coordinate};if(e==="centric"){var a=i.coordinate,{radius:o}=n;return yr(yr(yr({},n),ut(n.cx,n.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:l}=n;return yr(yr(yr({},n),ut(n.cx,n.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},a5=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,Pn=e=>e.layout.width,Cn=e=>e.layout.height,o5=e=>e.layout.scale,DO=e=>e.layout.margin,gu=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),vu=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),NO="data-recharts-item-index",IO="data-recharts-item-data-key",_s=60;function v0(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 ll(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v0(Object(r),!0).forEach(function(n){s5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s5(e,t,r){return(t=l5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l5(e){var t=c5(e,"string");return typeof t=="symbol"?t:t+""}function c5(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 u5=e=>e.brush.height;function f5(e){var t=vu(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:_s;return r+i}return r},0)}function d5(e){var t=vu(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:_s;return r+i}return r},0)}function h5(e){var t=gu(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function p5(e){var t=gu(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var mt=$([Pn,Cn,DO,u5,f5,d5,h5,p5,eO,bD],(e,t,r,n,i,a,o,s,l,c)=>{var u={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+s},d=ll(ll({},f),u),h=d.bottom;d.bottom+=n,d=UN(d,l,c);var m=e-d.left-d.right,p=t-d.top-d.bottom;return ll(ll({brushBottom:h},d),{},{width:Math.max(m,0),height:Math.max(p,0)})}),m5=$(mt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),zp=$(Pn,Cn,(e,t)=>({x:0,y:0,width:e,height:t})),g5=k.createContext(null),Gt=()=>k.useContext(g5)!=null,yu=e=>e.brush,bu=$([yu,mt,DO],(e,t,r)=>({height:e.height,x:ae(e.x)?e.x:t.left,y:ae(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:ae(e.width)?e.width:t.width})),Wp=()=>{var e,t=Gt(),r=re(m5),n=re(bu),i=(e=re(yu))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},v5={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},RO=()=>{var e;return(e=re(mt))!==null&&e!==void 0?e:v5},$O=()=>re(Pn),LO=()=>re(Cn),me=e=>e.layout.layoutType,xu=()=>re(me),y5={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},BO=fr({name:"legend",initialState:y5,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload(e,t){e.payload.push(t.payload)},removeLegendPayload(e,t){var r=yn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)}}}),{setLegendSize:sG,setLegendSettings:lG,addLegendPayload:FO,removeLegendPayload:zO}=BO.actions,b5=BO.reducer;function Ah(){return Ah=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},Ah.apply(null,arguments)}function y0(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 sd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y0(Object(r),!0).forEach(function(n){x5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x5(e,t,r){return(t=w5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w5(e){var t=_5(e,"string");return typeof t=="symbol"?t:t+""}function _5(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 O5(e){return Array.isArray(e)&&Zr(e[0])&&Zr(e[1])?e.join(" ~ "):e}var S5=e=>{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:a,formatter:o,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:f,accessibilityLayer:d=!1}=e,h=()=>{if(a&&a.length){var _={padding:0,margin:0},O=(s?fu(a,s):a).map((A,P)=>{if(A.type==="none")return null;var T=A.formatter||o||O5,{value:I,name:j}=A,S=I,D=j;if(T){var M=T(I,j,A,P,a);if(Array.isArray(M))[S,D]=M;else if(M!=null)S=M;else return null}var R=sd({display:"block",paddingTop:4,paddingBottom:4,color:A.color||"#000"},n);return E.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(P),style:R},Zr(D)?E.createElement("span",{className:"recharts-tooltip-item-name"},D):null,Zr(D)?E.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,E.createElement("span",{className:"recharts-tooltip-item-value"},S),E.createElement("span",{className:"recharts-tooltip-item-unit"},A.unit||""))});return E.createElement("ul",{className:"recharts-tooltip-item-list",style:_},O)}return null},m=sd({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),p=sd({margin:0},i),g=!Ge(u),v=g?u:"",x=ye("recharts-default-tooltip",l),w=ye("recharts-tooltip-label",c);g&&f&&a!==void 0&&a!==null&&(v=f(u,a));var y=d?{role:"status","aria-live":"assertive"}:{};return E.createElement("div",Ah({className:x,style:m},y),E.createElement("p",{className:w,style:p},E.isValidElement(v)?v:"".concat(v)),h())},ao="recharts-tooltip-wrapper",A5={visibility:"hidden"};function E5(e){var{coordinate:t,translateX:r,translateY:n}=e;return ye(ao,{["".concat(ao,"-right")]:ae(r)&&t&&ae(t.x)&&r>=t.x,["".concat(ao,"-left")]:ae(r)&&t&&ae(t.x)&&r<t.x,["".concat(ao,"-bottom")]:ae(n)&&t&&ae(t.y)&&n>=t.y,["".concat(ao,"-top")]:ae(n)&&t&&ae(t.y)&&n<t.y})}function b0(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(a&&ae(a[n]))return a[n];var u=r[n]-s-(i>0?i:0),f=r[n]+i;if(t[n])return o[n]?u:f;var d=l[n];if(d==null)return 0;if(o[n]){var h=u,m=d;return h<m?Math.max(f,d):Math.max(u,d)}if(c==null)return 0;var p=f+s,g=d+c;return p>g?Math.max(u,d):Math.max(f,d)}function P5(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function C5(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:a,tooltipBox:o,useTranslate3d:s,viewBox:l}=e,c,u,f;return o.height>0&&o.width>0&&r?(u=b0({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=b0({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=P5({translateX:u,translateY:f,useTranslate3d:s})):c=A5,{cssProperties:c,cssClasses:E5({translateX:u,translateY:f,coordinate:r})}}function x0(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 cl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x0(Object(r),!0).forEach(function(n){Eh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eh(e,t,r){return(t=k5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k5(e){var t=T5(e,"string");return typeof t=="symbol"?t:t+""}function T5(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 M5 extends k.PureComponent{constructor(){super(...arguments),Eh(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Eh(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:a,coordinate:o,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:f,useTranslate3d:d,viewBox:h,wrapperStyle:m,lastBoundingBox:p,innerRef:g,hasPortalFromProps:v}=this.props,{cssClasses:x,cssProperties:w}=C5({allowEscapeViewBox:r,coordinate:o,offsetTopLeft:c,position:u,reverseDirection:f,tooltipBox:{height:p.height,width:p.width},useTranslate3d:d,viewBox:h}),y=v?{}:cl(cl({transition:l&&t?"transform ".concat(n,"ms ").concat(i):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),_=cl(cl({},y),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},m);return E.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:x,style:_,ref:g},a)}}var j5=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ei={devToolsEnabled:!1,isSsr:j5()},WO=()=>re(e=>e.rootProps.accessibilityLayer);function cr(e){return Number.isFinite(e)}function Ta(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}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 w0(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 _0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w0(Object(r),!0).forEach(function(n){D5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D5(e,t,r){return(t=N5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N5(e){var t=I5(e,"string");return typeof t=="symbol"?t:t+""}function I5(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 O0={curveBasisClosed:QM,curveBasisOpen:ej,curveBasis:JM,curveBumpX:LM,curveBumpY:BM,curveLinearClosed:tj,curveLinear:cu,curveMonotoneX:rj,curveMonotoneY:nj,curveNatural:ij,curveStep:aj,curveStepAfter:sj,curveStepBefore:oj},ul=e=>cr(e.x)&&cr(e.y),oo=e=>e.x,so=e=>e.y,R5=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(vs(e));return(r==="curveMonotone"||r==="curveBump")&&t?O0["".concat(r).concat(t==="vertical"?"Y":"X")]:O0[r]||cu},$5=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,o=R5(t,i),s=a?r.filter(ul):r,l;if(Array.isArray(n)){var c=a?n.filter(f=>ul(f)):n,u=s.map((f,d)=>_0(_0({},f),{},{base:c[d]}));return i==="vertical"?l=Qs().y(so).x1(oo).x0(f=>f.base.x):l=Qs().x(oo).y1(so).y0(f=>f.base.y),l.defined(ul).curve(o),l(u)}return i==="vertical"&&ae(n)?l=Qs().y(so).x1(oo).x0(n):ae(n)?l=Qs().x(oo).y1(so).y0(n):l=k_().x(oo).y(so),l.defined(ul).curve(o),l(s)},Vp=e=>{var{className:t,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var a=r&&r.length?$5(e):n;return E.createElement("path",Ph({},tn(e),Cp(e),{className:ye("recharts-curve",t),d:a===null?void 0:a,ref:i}))},L5=["x","y","top","left","width","height","className"];function Ch(){return Ch=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},Ch.apply(null,arguments)}function S0(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 B5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S0(Object(r),!0).forEach(function(n){F5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F5(e,t,r){return(t=z5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z5(e){var t=W5(e,"string");return typeof t=="symbol"?t:t+""}function W5(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 V5(e,t){if(e==null)return{};var r,n,i=H5(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 H5(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 U5=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),K5=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:o=0,className:s}=e,l=V5(e,L5),c=B5({x:t,y:r,top:n,left:i,width:a,height:o},l);return!ae(t)||!ae(r)||!ae(a)||!ae(o)||!ae(n)||!ae(i)?null:E.createElement("path",Ch({},Ze(c,!0),{className:ye("recharts-cross",s),d:U5(t,r,a,o,n,i)}))};function q5(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function A0(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 Y5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A0(Object(r),!0).forEach(function(n){G5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G5(e,t,r){return(t=X5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X5(e){var t=Z5(e,"string");return typeof t=="symbol"?t:t+""}function Z5(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 kt(e,t){var r=Y5({},e),n=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&n[s]!==void 0&&(o[s]=n[s]),o),r);return a}function J5(){}function E0(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 P0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E0(Object(r),!0).forEach(function(n){Q5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q5(e,t,r){return(t=eI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eI(e){var t=tI(e,"string");return typeof t=="symbol"?t:t+""}function tI(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 rI=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),VO=(e,t,r)=>e.map(n=>"".concat(rI(n)," ").concat(t,"ms ").concat(r)).join(","),nI=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),qo=(e,t)=>Object.keys(t).reduce((r,n)=>P0(P0({},r),{},{[n]:e(n,t[n])}),{});function C0(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?C0(Object(r),!0).forEach(function(n){iI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iI(e,t,r){return(t=aI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aI(e){var t=oI(e,"string");return typeof t=="symbol"?t:t+""}function oI(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 cc=(e,t,r)=>e+(t-e)*r,kh=e=>{var{from:t,to:r}=e;return t!==r},HO=(e,t,r)=>{var n=qo((i,a)=>{if(kh(a)){var[o,s]=e(a.from,a.to,a.velocity);return Et(Et({},a),{},{from:o,velocity:s})}return a},t);return r<1?qo((i,a)=>kh(a)?Et(Et({},a),{},{velocity:cc(a.velocity,n[i].velocity,r),from:cc(a.from,n[i].from,r)}):a,t):HO(e,n,r-1)};function sI(e,t,r,n,i,a){var o,s=n.reduce((d,h)=>Et(Et({},d),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),l=()=>qo((d,h)=>h.from,s),c=()=>!Object.values(s).filter(kh).length,u=null,f=d=>{o||(o=d);var h=d-o,m=h/r.dt;s=HO(r,s,m),i(Et(Et(Et({},e),t),l())),o=d,c()||(u=a.setTimeout(f))};return()=>(u=a.setTimeout(f),()=>{u()})}function lI(e,t,r,n,i,a,o){var s=null,l=i.reduce((f,d)=>Et(Et({},f),{},{[d]:[e[d],t[d]]}),{}),c,u=f=>{c||(c=f);var d=(f-c)/n,h=qo((p,g)=>cc(...g,r(d)),l);if(a(Et(Et(Et({},e),t),h)),d<1)s=o.setTimeout(u);else{var m=qo((p,g)=>cc(...g,r(1)),l);a(Et(Et(Et({},e),t),m))}};return()=>(s=o.setTimeout(u),()=>{s()})}const cI=(e,t,r,n,i,a)=>{var o=nI(e,t);return r.isStepper===!0?sI(e,t,r,o,i,a):lI(e,t,r,n,o,i,a)};var uc=1e-4,UO=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],KO=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),k0=(e,t)=>r=>{var n=UO(e,t);return KO(n,r)},uI=(e,t)=>r=>{var n=UO(e,t),i=[...n.map((a,o)=>a*o).slice(1),0];return KO(i,r)},T0=function(){for(var t,r,n,i,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];if(o.length===1)switch(o[0]){case"linear":[t,n,r,i]=[0,0,1,1];break;case"ease":[t,n,r,i]=[.25,.1,.25,1];break;case"ease-in":[t,n,r,i]=[.42,0,1,1];break;case"ease-out":[t,n,r,i]=[.42,0,.58,1];break;case"ease-in-out":[t,n,r,i]=[0,0,.58,1];break;default:{var l=o[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([t,n,r,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else o.length===4&&([t,n,r,i]=o);var c=k0(t,r),u=k0(n,i),f=uI(t,r),d=m=>m>1?1:m<0?0:m,h=m=>{for(var p=m>1?1:m,g=p,v=0;v<8;++v){var x=c(g)-p,w=f(g);if(Math.abs(x-p)<uc||w<uc)return u(g);g=d(g-x/w)}return u(g)};return h.isStepper=!1,h},fI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(o,s,l)=>{var c=-(o-s)*r,u=l*n,f=l+(c-u)*i/1e3,d=l*i/1e3+o;return Math.abs(d-s)<uc&&Math.abs(f)<uc?[s,0]:[d,f]};return a.isStepper=!0,a.dt=i,a},dI=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return T0(e);case"spring":return fI();default:if(e.split("(")[0]==="cubic-bezier")return T0(e)}return typeof e=="function"?e:null};function hI(e){var t,r=()=>null,n=!1,i=null,a=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,[l,...c]=s;if(typeof l=="number"){i=e.setTimeout(a.bind(null,c),l);return}a(l),i=e.setTimeout(a.bind(null,c));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,i&&(i(),i=null),a(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class pI{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{cancelAnimationFrame(i)}}}function mI(){return hI(new pI)}var gI=k.createContext(mI);function vI(e,t){var r=k.useContext(gI);return k.useMemo(()=>t??r(e),[e,t,r])}var yI={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},M0={t:0},ld={t:1};function Os(e){var t=kt(e,yI),{isActive:r,canBegin:n,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=vI(t.animationId,t.animationManager),[f,d]=k.useState(r?M0:ld),h=k.useRef(null);return k.useEffect(()=>{r||d(ld)},[r]),k.useEffect(()=>{if(!r||!n)return J5;var m=cI(M0,ld,dI(a),i,d,u.getTimeoutController()),p=()=>{h.current=m()};return u.start([l,o,p,i,s]),()=>{u.stop(),h.current&&h.current(),s()}},[r,n,i,a,o,l,s,u]),c(f.t)}function Ss(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=k.useRef(Vo(t)),n=k.useRef(e);return n.current!==e&&(r.current=Vo(t),n.current=e),r.current}function j0(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 D0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(r),!0).forEach(function(n){bI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bI(e,t,r){return(t=xI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xI(e){var t=wI(e,"string");return typeof t=="symbol"?t:t+""}function wI(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 fc(){return fc=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},fc.apply(null,arguments)}var N0=(e,t,r,n,i)=>{var a=Math.min(Math.abs(r)/2,Math.abs(n)/2),o=n>=0?1:-1,s=r>=0?1:-1,l=n>=0&&r>=0||n<0&&r<0?1:0,c;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],f=0,d=4;f<d;f++)u[f]=i[f]>a?a:i[f];c="M".concat(e,",").concat(t+o*u[0]),u[0]>0&&(c+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(e+s*u[0],",").concat(t)),c+="L ".concat(e+r-s*u[1],",").concat(t),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
|
|
150
|
+
(See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),p.warnIfExceeded()),m}}}function ol(e){return typeof e=="boolean"}var JD=()=>function(t){const{thunk:r=!0,immutableCheck:n=!0,serializableCheck:i=!0,actionCreatorCheck:a=!0}=t??{};let o=new dO;if(r&&(ol(r)?o.push(zD):o.push(WD(r.extraArgument))),process.env.NODE_ENV!=="production"){if(n){let s={};ol(n)||(s=n),o.unshift(XD(s))}if(i){let s={};ol(i)||(s=i),o.push(ZD(s))}if(a){let s={};ol(a)||(s=a),o.unshift(qD(s))}}return o},QD="RTK_autoBatch",i0=e=>t=>{setTimeout(t,e)},eN=(e={type:"raf"})=>t=>(...r)=>{const n=t(...r);let i=!0,a=!1,o=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:i0(10):e.type==="callback"?e.queueNotification:i0(e.timeout),c=()=>{o=!1,a&&(a=!1,s.forEach(u=>u()))};return Object.assign({},n,{subscribe(u){const f=()=>i&&u(),d=n.subscribe(f);return s.add(u),()=>{d(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[QD],a=!i,a&&(o||(o=!0,l(c))),n.dispatch(u)}finally{i=!0}}})},tN=e=>function(r){const{autoBatch:n=!0}=r??{};let i=new dO(e);return n&&i.push(eN(typeof n=="object"?n:void 0)),i};function rN(e){const t=JD(),{reducer:r=void 0,middleware:n,devTools:i=!0,duplicateMiddlewareCheck:a=!0,preloadedState:o=void 0,enhancers:s=void 0}=e||{};let l;if(typeof r=="function")l=r;else if(ys(r))l=rO(r);else throw new Error(process.env.NODE_ENV==="production"?Se(1):"`reducer` is a required argument, and must be a function or an object of functions that can be passed to combineReducers");if(process.env.NODE_ENV!=="production"&&n&&typeof n!="function")throw new Error(process.env.NODE_ENV==="production"?Se(2):"`middleware` field must be a callback");let c;if(typeof n=="function"){if(c=n(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Se(3):"when using a middleware builder function, an array of middleware must be returned")}else c=t();if(process.env.NODE_ENV!=="production"&&c.some(p=>typeof p!="function"))throw new Error(process.env.NODE_ENV==="production"?Se(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&a){let p=new Set;c.forEach(g=>{if(p.has(g))throw new Error(process.env.NODE_ENV==="production"?Se(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");p.add(g)})}let u=rc;i&&(u=VD({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const f=TD(...c),d=tN(f);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?Se(5):"`enhancers` field must be a callback");let h=typeof s=="function"?s(d):d();if(process.env.NODE_ENV!=="production"&&!Array.isArray(h))throw new Error(process.env.NODE_ENV==="production"?Se(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&h.some(p=>typeof p!="function"))throw new Error(process.env.NODE_ENV==="production"?Se(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!h.includes(f)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...h);return tO(l,o,m)}function vO(e){const t={},r=[];let n;const i={addCase(a,o){if(process.env.NODE_ENV!=="production"){if(r.length>0)throw new Error(process.env.NODE_ENV==="production"?Se(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(n)throw new Error(process.env.NODE_ENV==="production"?Se(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof a=="string"?a:a.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?Se(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?Se(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=o,i},addAsyncThunk(a,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Se(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return o.pending&&(t[a.pending.type]=o.pending),o.rejected&&(t[a.rejected.type]=o.rejected),o.fulfilled&&(t[a.fulfilled.type]=o.fulfilled),o.settled&&r.push({matcher:a.settled,reducer:o.settled}),i},addMatcher(a,o){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Se(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return r.push({matcher:a,reducer:o}),i},addDefaultCase(a){if(process.env.NODE_ENV!=="production"&&n)throw new Error(process.env.NODE_ENV==="production"?Se(31):"`builder.addDefaultCase` can only be called once");return n=a,i}};return e(i),[t,r,n]}function nN(e){return typeof e=="function"}function iN(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Se(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[r,n,i]=vO(t),a;if(nN(e))a=()=>n0(e());else{const s=n0(e);a=()=>s}function o(s=a(),l){let c=[r[l.type],...n.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,f)=>{if(f)if(zi(u)){const h=f(u,l);return h===void 0?u:h}else{if(wn(u))return cO(u,d=>f(d,l));{const d=f(u,l);if(d===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return d}}return u},s)}return o.getInitialState=a,o}var aN="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",oN=(e=21)=>{let t="",r=e;for(;r--;)t+=aN[Math.random()*64|0];return t},sN=Symbol.for("rtk-slice-createasyncthunk");function lN(e,t){return`${e}/${t}`}function cN({creators:e}={}){const t=e?.asyncThunk?.[sN];return function(n){const{name:i,reducerPath:a=i}=n;if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&n.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const o=(typeof n.reducers=="function"?n.reducers(fN()):n.reducers)||{},s=Object.keys(o),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,y){const _=typeof w=="string"?w:w.type;if(!_)throw new Error(process.env.NODE_ENV==="production"?Se(12):"`context.addCase` cannot be called with an empty action type");if(_ in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Se(13):"`context.addCase` cannot be called with two reducers for the same action type: "+_);return l.sliceCaseReducersByType[_]=y,c},addMatcher(w,y){return l.sliceMatchers.push({matcher:w,reducer:y}),c},exposeAction(w,y){return l.actionCreators[w]=y,c},exposeCaseReducer(w,y){return l.sliceCaseReducersByName[w]=y,c}};s.forEach(w=>{const y=o[w],_={reducerName:w,type:lN(i,w),createNotation:typeof n.reducers=="function"};hN(y)?mN(_,y,c,t):dN(_,y,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof n.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Se(14):"The object notation for `createSlice.extraReducers` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createSlice");const[w={},y=[],_=void 0]=typeof n.extraReducers=="function"?vO(n.extraReducers):[n.extraReducers],O={...w,...l.sliceCaseReducersByType};return iN(n.initialState,A=>{for(let P in O)A.addCase(P,O[P]);for(let P of l.sliceMatchers)A.addMatcher(P.matcher,P.reducer);for(let P of y)A.addMatcher(P.matcher,P.reducer);_&&A.addDefaultCase(_)})}const f=w=>w,d=new Map,h=new WeakMap;let m;function p(w,y){return m||(m=u()),m(w,y)}function g(){return m||(m=u()),m.getInitialState()}function v(w,y=!1){function _(A){let P=A[w];if(typeof P>"u"){if(y)P=al(h,_,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Se(15):"selectSlice returned undefined for an uninjected slice reducer")}return P}function O(A=f){const P=al(d,y,()=>new WeakMap);return al(P,A,()=>{const T={};for(const[I,j]of Object.entries(n.selectors??{}))T[I]=uN(j,A,()=>al(h,A,g),y);return T})}return{reducerPath:w,getSelectors:O,get selectors(){return O(_)},selectSlice:_}}const x={name:i,reducer:p,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...v(a),injectInto(w,{reducerPath:y,..._}={}){const O=y??a;return w.inject({reducerPath:O,reducer:p},_),{...x,...v(O,!0)}}};return x}}function uN(e,t,r,n){function i(a,...o){let s=t(a);if(typeof s>"u"){if(n)s=r();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Se(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...o)}return i.unwrapped=e,i}var fr=cN();function fN(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function dN({type:e,reducerName:t,createNotation:r},n,i){let a,o;if("reducer"in n){if(r&&!pN(n))throw new Error(process.env.NODE_ENV==="production"?Se(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");a=n.reducer,o=n.prepare}else a=n;i.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,o?wr(e,o):wr(e))}function hN(e){return e._reducerDefinitionType==="asyncThunk"}function pN(e){return e._reducerDefinitionType==="reducerWithPrepare"}function mN({type:e,reducerName:t},r,n,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:a,fulfilled:o,pending:s,rejected:l,settled:c,options:u}=r,f=i(e,a,u);n.exposeAction(t,f),o&&n.addCase(f.fulfilled,o),s&&n.addCase(f.pending,s),l&&n.addCase(f.rejected,l),c&&n.addMatcher(f.settled,c),n.exposeCaseReducer(t,{fulfilled:o||sl,pending:s||sl,rejected:l||sl,settled:c||sl})}function sl(){}var gN="task",yO="listener",bO="completed",Bp="cancelled",vN=`task-${Bp}`,yN=`task-${bO}`,Oh=`${yO}-${Bp}`,bN=`${yO}-${bO}`,mu=class{constructor(e){this.code=e,this.message=`${gN} ${Bp} (reason: ${e})`}name="TaskAbortError";message},Fp=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Se(32):`${t} is not a function`)},oc=()=>{},xO=(e,t=oc)=>(e.catch(t),e),wO=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),Di=(e,t)=>{const r=e.signal;r.aborted||("reason"in r||Object.defineProperty(r,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ni=e=>{if(e.aborted){const{reason:t}=e;throw new mu(t)}};function _O(e,t){let r=oc;return new Promise((n,i)=>{const a=()=>i(new mu(e.reason));if(e.aborted){a();return}r=wO(e,a),t.finally(()=>r()).then(n,i)}).finally(()=>{r=oc})}var xN=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof mu?"cancelled":"rejected",error:r}}finally{t?.()}},sc=e=>t=>xO(_O(e,t).then(r=>(Ni(e),r))),OO=e=>{const t=sc(e);return r=>t(new Promise(n=>setTimeout(n,r)))},{assign:wa}=Object,a0={},xs="listenerMiddleware",wN=(e,t)=>{const r=n=>wO(e,()=>Di(n,e.reason));return(n,i)=>{Fp(n,"taskExecutor");const a=new AbortController;r(a);const o=xN(async()=>{Ni(e),Ni(a.signal);const s=await n({pause:sc(a.signal),delay:OO(a.signal),signal:a.signal});return Ni(a.signal),s},()=>Di(a,yN));return i?.autoJoin&&t.push(o.catch(oc)),{result:sc(e)(o),cancel(){Di(a,vN)}}}},_N=(e,t)=>{const r=async(n,i)=>{Ni(t);let a=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:n,effect:(f,d)=>{d.unsubscribe(),l([f,d.getState(),d.getOriginalState()])}});a=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await _O(t,Promise.race(s));return Ni(t),l}finally{a()}};return(n,i)=>xO(r(n,i))},SO=e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:a}=e;if(t)i=wr(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Se(21):"Creating or removing a listener requires one of the known fields for matching an action");return Fp(a,"options.listener"),{predicate:i,type:t,effect:a}},AO=wa(e=>{const{type:t,predicate:r,effect:n}=SO(e);return{id:oN(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Se(22):"Unsubscribe not initialized")}}},{withTypes:()=>AO}),o0=(e,t)=>{const{type:r,effect:n,predicate:i}=SO(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===i)&&a.effect===n)},Sh=e=>{e.pending.forEach(t=>{Di(t,Oh)})},ON=e=>()=>{e.forEach(Sh),e.clear()},s0=(e,t,r)=>{try{e(t,r)}catch(n){setTimeout(()=>{throw n},0)}},EO=wa(wr(`${xs}/add`),{withTypes:()=>EO}),SN=wr(`${xs}/removeAll`),PO=wa(wr(`${xs}/remove`),{withTypes:()=>PO}),AN=(...e)=>{console.error(`${xs}/error`,...e)},ws=(e={})=>{const t=new Map,{extra:r,onError:n=AN}=e;Fp(n,"onError");const i=u=>(u.unsubscribe=()=>t.delete(u.id),t.set(u.id,u),f=>{u.unsubscribe(),f?.cancelActive&&Sh(u)}),a=u=>{const f=o0(t,u)??AO(u);return i(f)};wa(a,{withTypes:()=>a});const o=u=>{const f=o0(t,u);return f&&(f.unsubscribe(),u.cancelActive&&Sh(f)),!!f};wa(o,{withTypes:()=>o});const s=async(u,f,d,h)=>{const m=new AbortController,p=_N(a,m.signal),g=[];try{u.pending.add(m),await Promise.resolve(u.effect(f,wa({},d,{getOriginalState:h,condition:(v,x)=>p(v,x).then(Boolean),take:p,delay:OO(m.signal),pause:sc(m.signal),extra:r,signal:m.signal,fork:wN(m.signal,g),unsubscribe:u.unsubscribe,subscribe:()=>{t.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((v,x,w)=>{v!==m&&(Di(v,Oh),w.delete(v))})},cancel:()=>{Di(m,Oh),u.pending.delete(m)},throwIfCancelled:()=>{Ni(m.signal)}})))}catch(v){v instanceof mu||s0(n,v,{raisedBy:"effect"})}finally{await Promise.all(g),Di(m,bN),u.pending.delete(m)}},l=ON(t);return{middleware:u=>f=>d=>{if(!Rp(d))return f(d);if(EO.match(d))return a(d.payload);if(SN.match(d)){l();return}if(PO.match(d))return o(d.payload);let h=u.getState();const m=()=>{if(h===a0)throw new Error(process.env.NODE_ENV==="production"?Se(23):`${xs}: getOriginalState can only be called synchronously`);return h};let p;try{if(p=f(d),t.size>0){const g=u.getState(),v=Array.from(t.values());for(const x of v){let w=!1;try{w=x.predicate(d,g,h)}catch(y){w=!1,s0(n,y,{raisedBy:"predicate"})}w&&s(x,d,u,m)}}}finally{h=a0}return p},startListening:a,stopListening:o,clearListeners:l}};function Se(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var EN={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},CO=fr({name:"chartLayout",initialState:EN,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,n,i,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(n=t.payload.right)!==null&&n!==void 0?n:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:PN,setLayout:CN,setChartSize:kN,setScale:TN}=CO.actions,MN=CO.reducer;function l0(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 c0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?l0(Object(r),!0).forEach(function(n){jN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function jN(e,t,r){return(t=DN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DN(e){var t=NN(e,"string");return typeof t=="symbol"?t:t+""}function NN(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 lc=Math.PI/180,IN=e=>e*180/Math.PI,ut=(e,t,r,n)=>({x:e+Math.cos(-lc*n)*r,y:t+Math.sin(-lc*n)*r}),kO=function(t,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(n.left||0)-(n.right||0)),Math.abs(r-(n.top||0)-(n.bottom||0)))/2},RN=(e,t)=>{var{x:r,y:n}=e,{x:i,y:a}=t;return Math.sqrt((r-i)**2+(n-a)**2)},$N=(e,t)=>{var{x:r,y:n}=e,{cx:i,cy:a}=t,o=RN({x:r,y:n},{x:i,y:a});if(o<=0)return{radius:o,angle:0};var s=(r-i)/o,l=Math.acos(s);return n>a&&(l=2*Math.PI-l),{radius:o,angle:IN(l),angleInRadian:l}},LN=e=>{var{startAngle:t,endAngle:r}=e,n=Math.floor(t/360),i=Math.floor(r/360),a=Math.min(n,i);return{startAngle:t-a*360,endAngle:r-a*360}},BN=(e,t)=>{var{startAngle:r,endAngle:n}=t,i=Math.floor(r/360),a=Math.floor(n/360),o=Math.min(i,a);return e+o*360},FN=(e,t)=>{var{x:r,y:n}=e,{radius:i,angle:a}=$N({x:r,y:n},t),{innerRadius:o,outerRadius:s}=t;if(i<o||i>s||i===0)return null;var{startAngle:l,endAngle:c}=LN(t),u=a,f;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;f=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;f=u>=c&&u<=l}return f?c0(c0({},t),{},{radius:i,angle:BN(u,t)}):null};function TO(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function u0(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 yr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?u0(Object(r),!0).forEach(function(n){zN(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zN(e,t,r){return(t=WN(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WN(e){var t=VN(e,"string");return typeof t=="symbol"?t:t+""}function VN(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 ze(e,t,r){return Ge(e)||Ge(t)?r:Zr(t)?Fi(e,t,r):typeof t=="function"?t(e):r}var HN=(e,t,r,n,i)=>{var a,o=-1,s=(a=t?.length)!==null&&a!==void 0?a:0;if(s<=1||e==null)return 0;if(n==="angleAxis"&&i!=null&&Math.abs(Math.abs(i[1]-i[0])-360)<=1e-6)for(var l=0;l<s;l++){var c=l>0?r[l-1].coordinate:r[s-1].coordinate,u=r[l].coordinate,f=l>=s-1?r[0].coordinate:r[l+1].coordinate,d=void 0;if(wt(u-c)!==wt(f-u)){var h=[];if(wt(f-u)===wt(i[1]-i[0])){d=f;var m=u+i[1]-i[0];h[0]=Math.min(m,(m+c)/2),h[1]=Math.max(m,(m+c)/2)}else{d=c;var p=f+i[1]-i[0];h[0]=Math.min(u,(p+u)/2),h[1]=Math.max(u,(p+u)/2)}var g=[Math.min(u,(d+u)/2),Math.max(u,(d+u)/2)];if(e>g[0]&&e<=g[1]||e>=h[0]&&e<=h[1]){({index:o}=r[l]);break}}else{var v=Math.min(c,f),x=Math.max(c,f);if(e>(v+u)/2&&e<=(x+u)/2){({index:o}=r[l]);break}}}else if(t){for(var w=0;w<s;w++)if(w===0&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w>0&&w<s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2&&e<=(t[w].coordinate+t[w+1].coordinate)/2||w===s-1&&e>(t[w].coordinate+t[w-1].coordinate)/2){({index:o}=t[w]);break}}return o},UN=(e,t,r)=>{if(t&&r){var{width:n,height:i}=r,{align:a,verticalAlign:o,layout:s}=t;if((s==="vertical"||s==="horizontal"&&o==="middle")&&a!=="center"&&ae(e[a]))return yr(yr({},e),{},{[a]:e[a]+(n||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&o!=="middle"&&ae(e[o]))return yr(yr({},e),{},{[o]:e[o]+(i||0)})}return e},Qn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",MO=(e,t,r,n)=>{if(n)return e.map(s=>s.coordinate);var i,a,o=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===r&&(a=!0),s.coordinate));return i||o.push(t),a||o.push(r),o},jO=(e,t,r)=>{if(!e)return null;var{duplicateDomain:n,type:i,range:a,scale:o,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:f,niceTicks:d,axisType:h}=e;if(!o)return null;var m=s==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,p=i==="category"&&o.bandwidth?o.bandwidth()/m:0;if(p=h==="angleAxis"&&a&&a.length>=2?wt(a[0]-a[1])*2*p:p,f||d){var g=(f||d||[]).map((v,x)=>{var w=n?n.indexOf(v):v;return{coordinate:o(w)+p,value:v,offset:p,index:x}});return g.filter(v=>!sr(v.coordinate))}return l&&c?c.map((v,x)=>({coordinate:o(v)+p,value:v,index:x,offset:p})):o.ticks&&u!=null?o.ticks(u).map((v,x)=>({coordinate:o(v)+p,value:v,offset:p,index:x})):o.domain().map((v,x)=>({coordinate:o(v)+p,value:n?n[v]:v,index:x,offset:p}))},f0=1e-4,KN=e=>{var t=e.domain();if(!(!t||t.length<=2)){var r=t.length,n=e.range(),i=Math.min(n[0],n[1])-f0,a=Math.max(n[0],n[1])+f0,o=e(t[0]),s=e(t[r-1]);(o<i||o>a||s<i||s>a)&&e.domain([t[0],t[r-1]])}},qN=(e,t)=>{if(!t||t.length!==2||!ae(t[0])||!ae(t[1]))return e;var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!ae(e[0])||e[0]<r)&&(i[0]=r),(!ae(e[1])||e[1]>n)&&(i[1]=n),i[0]>n&&(i[0]=n),i[1]<r&&(i[1]=r),i},YN=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0,o=0;o<t;++o){var s=sr(e[o][r][1])?e[o][r][0]:e[o][r][1];s>=0?(e[o][r][0]=i,e[o][r][1]=i+s,i=e[o][r][1]):(e[o][r][0]=a,e[o][r][1]=a+s,a=e[o][r][1])}},GN=e=>{var t=e.length;if(!(t<=0))for(var r=0,n=e[0].length;r<n;++r)for(var i=0,a=0;a<t;++a){var o=sr(e[a][r][1])?e[a][r][0]:e[a][r][1];o>=0?(e[a][r][0]=i,e[a][r][1]=i+o,i=e[a][r][1]):(e[a][r][0]=0,e[a][r][1]=0)}},XN={sign:YN,expand:fj,none:Ca,silhouette:dj,wiggle:hj,positive:GN},ZN=(e,t,r)=>{var n=XN[r],i=uj().keys(t).value((a,o)=>+ze(a,o,0)).order(ph).offset(n);return i(e)};function JN(e){return e==null?void 0:String(e)}function d0(e){var{axis:t,ticks:r,bandSize:n,entry:i,index:a,dataKey:o}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Ge(i[t.dataKey])){var s=b_(r,"value",i[t.dataKey]);if(s)return s.coordinate+n/2}return r[a]?r[a].coordinate+n/2:null}var l=ze(i,Ge(o)?t.dataKey:o);return Ge(l)?null:t.scale(l)}var h0=e=>{var{axis:t,ticks:r,offset:n,bandSize:i,entry:a,index:o}=e;if(t.type==="category")return r[o]?r[o].coordinate+n:null;var s=ze(a,t.dataKey,t.scale.domain()[o]);return Ge(s)?null:t.scale(s)-i/2+n},QN=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]);return n<=0&&i>=0?0:i<0?i:n}return r[0]},e5=e=>{var t=e.flat(2).filter(ae);return[Math.min(...t),Math.max(...t)]},t5=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],r5=(e,t,r)=>{if(e!=null)return t5(Object.keys(e).reduce((n,i)=>{var a=e[i],{stackedData:o}=a,s=o.reduce((l,c)=>{var u=TO(c,t,r),f=e5(u);return[Math.min(l[0],f[0]),Math.max(l[1],f[1])]},[1/0,-1/0]);return[Math.min(s[0],n[0]),Math.max(s[1],n[1])]},[1/0,-1/0]))},p0=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,m0=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ko=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var n=e.scale.bandwidth();if(!r||n>0)return n}if(e&&t&&t.length>=2){for(var i=fu(t,u=>u.coordinate),a=1/0,o=1,s=i.length;o<s;o++){var l=i[o],c=i[o-1];a=Math.min((l.coordinate||0)-(c.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function g0(e){var{tooltipEntrySettings:t,dataKey:r,payload:n,value:i,name:a}=e;return yr(yr({},t),{},{dataKey:r,payload:n,value:i,name:a})}function Va(e,t){if(e)return String(e);if(typeof t=="string")return t}function n5(e,t,r,n,i){if(r==="horizontal"||r==="vertical"){var a=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return a?{x:e,y:t}:null}return n?FN({x:e,y:t},n):null}var i5=(e,t,r,n)=>{var i=t.find(c=>c&&c.index===r);if(i){if(e==="horizontal")return{x:i.coordinate,y:n.y};if(e==="vertical")return{x:n.x,y:i.coordinate};if(e==="centric"){var a=i.coordinate,{radius:o}=n;return yr(yr(yr({},n),ut(n.cx,n.cy,o,a)),{},{angle:a,radius:o})}var s=i.coordinate,{angle:l}=n;return yr(yr(yr({},n),ut(n.cx,n.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},a5=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,Pn=e=>e.layout.width,Cn=e=>e.layout.height,o5=e=>e.layout.scale,DO=e=>e.layout.margin,gu=$(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),vu=$(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),NO="data-recharts-item-index",IO="data-recharts-item-data-key",_s=60;function v0(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 ll(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?v0(Object(r),!0).forEach(function(n){s5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):v0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s5(e,t,r){return(t=l5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l5(e){var t=c5(e,"string");return typeof t=="symbol"?t:t+""}function c5(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 u5=e=>e.brush.height;function f5(e){var t=vu(e);return t.reduce((r,n)=>{if(n.orientation==="left"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:_s;return r+i}return r},0)}function d5(e){var t=vu(e);return t.reduce((r,n)=>{if(n.orientation==="right"&&!n.mirror&&!n.hide){var i=typeof n.width=="number"?n.width:_s;return r+i}return r},0)}function h5(e){var t=gu(e);return t.reduce((r,n)=>n.orientation==="top"&&!n.mirror&&!n.hide?r+n.height:r,0)}function p5(e){var t=gu(e);return t.reduce((r,n)=>n.orientation==="bottom"&&!n.mirror&&!n.hide?r+n.height:r,0)}var mt=$([Pn,Cn,DO,u5,f5,d5,h5,p5,eO,bD],(e,t,r,n,i,a,o,s,l,c)=>{var u={left:(r.left||0)+i,right:(r.right||0)+a},f={top:(r.top||0)+o,bottom:(r.bottom||0)+s},d=ll(ll({},f),u),h=d.bottom;d.bottom+=n,d=UN(d,l,c);var m=e-d.left-d.right,p=t-d.top-d.bottom;return ll(ll({brushBottom:h},d),{},{width:Math.max(m,0),height:Math.max(p,0)})}),m5=$(mt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),zp=$(Pn,Cn,(e,t)=>({x:0,y:0,width:e,height:t})),g5=k.createContext(null),Gt=()=>k.useContext(g5)!=null,yu=e=>e.brush,bu=$([yu,mt,DO],(e,t,r)=>({height:e.height,x:ae(e.x)?e.x:t.left,y:ae(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:ae(e.width)?e.width:t.width})),Wp=()=>{var e,t=Gt(),r=re(m5),n=re(bu),i=(e=re(yu))===null||e===void 0?void 0:e.padding;return!t||!n||!i?r:{width:n.width-i.left-i.right,height:n.height-i.top-i.bottom,x:i.left,y:i.top}},v5={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},RO=()=>{var e;return(e=re(mt))!==null&&e!==void 0?e:v5},$O=()=>re(Pn),LO=()=>re(Cn),me=e=>e.layout.layoutType,xu=()=>re(me),y5={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},BO=fr({name:"legend",initialState:y5,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload(e,t){e.payload.push(t.payload)},removeLegendPayload(e,t){var r=yn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)}}}),{setLegendSize:aG,setLegendSettings:oG,addLegendPayload:FO,removeLegendPayload:zO}=BO.actions,b5=BO.reducer;function Ah(){return Ah=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},Ah.apply(null,arguments)}function y0(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 sd(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?y0(Object(r),!0).forEach(function(n){x5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function x5(e,t,r){return(t=w5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function w5(e){var t=_5(e,"string");return typeof t=="symbol"?t:t+""}function _5(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 O5(e){return Array.isArray(e)&&Zr(e[0])&&Zr(e[1])?e.join(" ~ "):e}var S5=e=>{var{separator:t=" : ",contentStyle:r={},itemStyle:n={},labelStyle:i={},payload:a,formatter:o,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:f,accessibilityLayer:d=!1}=e,h=()=>{if(a&&a.length){var _={padding:0,margin:0},O=(s?fu(a,s):a).map((A,P)=>{if(A.type==="none")return null;var T=A.formatter||o||O5,{value:I,name:j}=A,S=I,D=j;if(T){var M=T(I,j,A,P,a);if(Array.isArray(M))[S,D]=M;else if(M!=null)S=M;else return null}var R=sd({display:"block",paddingTop:4,paddingBottom:4,color:A.color||"#000"},n);return E.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(P),style:R},Zr(D)?E.createElement("span",{className:"recharts-tooltip-item-name"},D):null,Zr(D)?E.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,E.createElement("span",{className:"recharts-tooltip-item-value"},S),E.createElement("span",{className:"recharts-tooltip-item-unit"},A.unit||""))});return E.createElement("ul",{className:"recharts-tooltip-item-list",style:_},O)}return null},m=sd({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},r),p=sd({margin:0},i),g=!Ge(u),v=g?u:"",x=ye("recharts-default-tooltip",l),w=ye("recharts-tooltip-label",c);g&&f&&a!==void 0&&a!==null&&(v=f(u,a));var y=d?{role:"status","aria-live":"assertive"}:{};return E.createElement("div",Ah({className:x,style:m},y),E.createElement("p",{className:w,style:p},E.isValidElement(v)?v:"".concat(v)),h())},ao="recharts-tooltip-wrapper",A5={visibility:"hidden"};function E5(e){var{coordinate:t,translateX:r,translateY:n}=e;return ye(ao,{["".concat(ao,"-right")]:ae(r)&&t&&ae(t.x)&&r>=t.x,["".concat(ao,"-left")]:ae(r)&&t&&ae(t.x)&&r<t.x,["".concat(ao,"-bottom")]:ae(n)&&t&&ae(t.y)&&n>=t.y,["".concat(ao,"-top")]:ae(n)&&t&&ae(t.y)&&n<t.y})}function b0(e){var{allowEscapeViewBox:t,coordinate:r,key:n,offsetTopLeft:i,position:a,reverseDirection:o,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(a&&ae(a[n]))return a[n];var u=r[n]-s-(i>0?i:0),f=r[n]+i;if(t[n])return o[n]?u:f;var d=l[n];if(d==null)return 0;if(o[n]){var h=u,m=d;return h<m?Math.max(f,d):Math.max(u,d)}if(c==null)return 0;var p=f+s,g=d+c;return p>g?Math.max(u,d):Math.max(f,d)}function P5(e){var{translateX:t,translateY:r,useTranslate3d:n}=e;return{transform:n?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function C5(e){var{allowEscapeViewBox:t,coordinate:r,offsetTopLeft:n,position:i,reverseDirection:a,tooltipBox:o,useTranslate3d:s,viewBox:l}=e,c,u,f;return o.height>0&&o.width>0&&r?(u=b0({allowEscapeViewBox:t,coordinate:r,key:"x",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.width,viewBox:l,viewBoxDimension:l.width}),f=b0({allowEscapeViewBox:t,coordinate:r,key:"y",offsetTopLeft:n,position:i,reverseDirection:a,tooltipDimension:o.height,viewBox:l,viewBoxDimension:l.height}),c=P5({translateX:u,translateY:f,useTranslate3d:s})):c=A5,{cssProperties:c,cssClasses:E5({translateX:u,translateY:f,coordinate:r})}}function x0(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 cl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?x0(Object(r),!0).forEach(function(n){Eh(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Eh(e,t,r){return(t=k5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k5(e){var t=T5(e,"string");return typeof t=="symbol"?t:t+""}function T5(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 M5 extends k.PureComponent{constructor(){super(...arguments),Eh(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Eh(this,"handleKeyDown",t=>{if(t.key==="Escape"){var r,n,i,a;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(r=(n=this.props.coordinate)===null||n===void 0?void 0:n.x)!==null&&r!==void 0?r:0,y:(i=(a=this.props.coordinate)===null||a===void 0?void 0:a.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,r;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((r=this.props.coordinate)===null||r===void 0?void 0:r.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:r,animationDuration:n,animationEasing:i,children:a,coordinate:o,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:f,useTranslate3d:d,viewBox:h,wrapperStyle:m,lastBoundingBox:p,innerRef:g,hasPortalFromProps:v}=this.props,{cssClasses:x,cssProperties:w}=C5({allowEscapeViewBox:r,coordinate:o,offsetTopLeft:c,position:u,reverseDirection:f,tooltipBox:{height:p.height,width:p.width},useTranslate3d:d,viewBox:h}),y=v?{}:cl(cl({transition:l&&t?"transform ".concat(n,"ms ").concat(i):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),_=cl(cl({},y),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},m);return E.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:x,style:_,ref:g},a)}}var j5=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),ei={devToolsEnabled:!1,isSsr:j5()},WO=()=>re(e=>e.rootProps.accessibilityLayer);function cr(e){return Number.isFinite(e)}function Ta(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}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 w0(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 _0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?w0(Object(r),!0).forEach(function(n){D5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function D5(e,t,r){return(t=N5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function N5(e){var t=I5(e,"string");return typeof t=="symbol"?t:t+""}function I5(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 O0={curveBasisClosed:QM,curveBasisOpen:ej,curveBasis:JM,curveBumpX:LM,curveBumpY:BM,curveLinearClosed:tj,curveLinear:cu,curveMonotoneX:rj,curveMonotoneY:nj,curveNatural:ij,curveStep:aj,curveStepAfter:sj,curveStepBefore:oj},ul=e=>cr(e.x)&&cr(e.y),oo=e=>e.x,so=e=>e.y,R5=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(vs(e));return(r==="curveMonotone"||r==="curveBump")&&t?O0["".concat(r).concat(t==="vertical"?"Y":"X")]:O0[r]||cu},$5=e=>{var{type:t="linear",points:r=[],baseLine:n,layout:i,connectNulls:a=!1}=e,o=R5(t,i),s=a?r.filter(ul):r,l;if(Array.isArray(n)){var c=a?n.filter(f=>ul(f)):n,u=s.map((f,d)=>_0(_0({},f),{},{base:c[d]}));return i==="vertical"?l=Qs().y(so).x1(oo).x0(f=>f.base.x):l=Qs().x(oo).y1(so).y0(f=>f.base.y),l.defined(ul).curve(o),l(u)}return i==="vertical"&&ae(n)?l=Qs().y(so).x1(oo).x0(n):ae(n)?l=Qs().x(oo).y1(so).y0(n):l=k_().x(oo).y(so),l.defined(ul).curve(o),l(s)},Vp=e=>{var{className:t,points:r,path:n,pathRef:i}=e;if((!r||!r.length)&&!n)return null;var a=r&&r.length?$5(e):n;return E.createElement("path",Ph({},tn(e),Cp(e),{className:ye("recharts-curve",t),d:a===null?void 0:a,ref:i}))},L5=["x","y","top","left","width","height","className"];function Ch(){return Ch=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},Ch.apply(null,arguments)}function S0(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 B5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?S0(Object(r),!0).forEach(function(n){F5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):S0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F5(e,t,r){return(t=z5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z5(e){var t=W5(e,"string");return typeof t=="symbol"?t:t+""}function W5(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 V5(e,t){if(e==null)return{};var r,n,i=H5(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 H5(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 U5=(e,t,r,n,i,a)=>"M".concat(e,",").concat(i,"v").concat(n,"M").concat(a,",").concat(t,"h").concat(r),K5=e=>{var{x:t=0,y:r=0,top:n=0,left:i=0,width:a=0,height:o=0,className:s}=e,l=V5(e,L5),c=B5({x:t,y:r,top:n,left:i,width:a,height:o},l);return!ae(t)||!ae(r)||!ae(a)||!ae(o)||!ae(n)||!ae(i)?null:E.createElement("path",Ch({},Ze(c,!0),{className:ye("recharts-cross",s),d:U5(t,r,a,o,n,i)}))};function q5(e,t,r,n){var i=n/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-i,width:e==="horizontal"?n:r.width-1,height:e==="horizontal"?r.height-1:n}}function A0(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 Y5(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?A0(Object(r),!0).forEach(function(n){G5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function G5(e,t,r){return(t=X5(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function X5(e){var t=Z5(e,"string");return typeof t=="symbol"?t:t+""}function Z5(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 kt(e,t){var r=Y5({},e),n=t,i=Object.keys(t),a=i.reduce((o,s)=>(o[s]===void 0&&n[s]!==void 0&&(o[s]=n[s]),o),r);return a}function J5(){}function E0(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 P0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?E0(Object(r),!0).forEach(function(n){Q5(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Q5(e,t,r){return(t=eI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eI(e){var t=tI(e,"string");return typeof t=="symbol"?t:t+""}function tI(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 rI=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),VO=(e,t,r)=>e.map(n=>"".concat(rI(n)," ").concat(t,"ms ").concat(r)).join(","),nI=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,n)=>r.filter(i=>n.includes(i))),qo=(e,t)=>Object.keys(t).reduce((r,n)=>P0(P0({},r),{},{[n]:e(n,t[n])}),{});function C0(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?C0(Object(r),!0).forEach(function(n){iI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):C0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function iI(e,t,r){return(t=aI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aI(e){var t=oI(e,"string");return typeof t=="symbol"?t:t+""}function oI(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 cc=(e,t,r)=>e+(t-e)*r,kh=e=>{var{from:t,to:r}=e;return t!==r},HO=(e,t,r)=>{var n=qo((i,a)=>{if(kh(a)){var[o,s]=e(a.from,a.to,a.velocity);return Et(Et({},a),{},{from:o,velocity:s})}return a},t);return r<1?qo((i,a)=>kh(a)?Et(Et({},a),{},{velocity:cc(a.velocity,n[i].velocity,r),from:cc(a.from,n[i].from,r)}):a,t):HO(e,n,r-1)};function sI(e,t,r,n,i,a){var o,s=n.reduce((d,h)=>Et(Et({},d),{},{[h]:{from:e[h],velocity:0,to:t[h]}}),{}),l=()=>qo((d,h)=>h.from,s),c=()=>!Object.values(s).filter(kh).length,u=null,f=d=>{o||(o=d);var h=d-o,m=h/r.dt;s=HO(r,s,m),i(Et(Et(Et({},e),t),l())),o=d,c()||(u=a.setTimeout(f))};return()=>(u=a.setTimeout(f),()=>{u()})}function lI(e,t,r,n,i,a,o){var s=null,l=i.reduce((f,d)=>Et(Et({},f),{},{[d]:[e[d],t[d]]}),{}),c,u=f=>{c||(c=f);var d=(f-c)/n,h=qo((p,g)=>cc(...g,r(d)),l);if(a(Et(Et(Et({},e),t),h)),d<1)s=o.setTimeout(u);else{var m=qo((p,g)=>cc(...g,r(1)),l);a(Et(Et(Et({},e),t),m))}};return()=>(s=o.setTimeout(u),()=>{s()})}const cI=(e,t,r,n,i,a)=>{var o=nI(e,t);return r.isStepper===!0?sI(e,t,r,o,i,a):lI(e,t,r,n,o,i,a)};var uc=1e-4,UO=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],KO=(e,t)=>e.map((r,n)=>r*t**n).reduce((r,n)=>r+n),k0=(e,t)=>r=>{var n=UO(e,t);return KO(n,r)},uI=(e,t)=>r=>{var n=UO(e,t),i=[...n.map((a,o)=>a*o).slice(1),0];return KO(i,r)},T0=function(){for(var t,r,n,i,a=arguments.length,o=new Array(a),s=0;s<a;s++)o[s]=arguments[s];if(o.length===1)switch(o[0]){case"linear":[t,n,r,i]=[0,0,1,1];break;case"ease":[t,n,r,i]=[.25,.1,.25,1];break;case"ease-in":[t,n,r,i]=[.42,0,1,1];break;case"ease-out":[t,n,r,i]=[.42,0,.58,1];break;case"ease-in-out":[t,n,r,i]=[0,0,.58,1];break;default:{var l=o[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([t,n,r,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else o.length===4&&([t,n,r,i]=o);var c=k0(t,r),u=k0(n,i),f=uI(t,r),d=m=>m>1?1:m<0?0:m,h=m=>{for(var p=m>1?1:m,g=p,v=0;v<8;++v){var x=c(g)-p,w=f(g);if(Math.abs(x-p)<uc||w<uc)return u(g);g=d(g-x/w)}return u(g)};return h.isStepper=!1,h},fI=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:n=8,dt:i=17}=t,a=(o,s,l)=>{var c=-(o-s)*r,u=l*n,f=l+(c-u)*i/1e3,d=l*i/1e3+o;return Math.abs(d-s)<uc&&Math.abs(f)<uc?[s,0]:[d,f]};return a.isStepper=!0,a.dt=i,a},dI=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return T0(e);case"spring":return fI();default:if(e.split("(")[0]==="cubic-bezier")return T0(e)}return typeof e=="function"?e:null};function hI(e){var t,r=()=>null,n=!1,i=null,a=o=>{if(!n){if(Array.isArray(o)){if(!o.length)return;var s=o,[l,...c]=s;if(typeof l=="number"){i=e.setTimeout(a.bind(null,c),l);return}a(l),i=e.setTimeout(a.bind(null,c));return}typeof o=="string"&&(t=o,r(t)),typeof o=="object"&&(t=o,r(t)),typeof o=="function"&&o()}};return{stop:()=>{n=!0},start:o=>{n=!1,i&&(i(),i=null),a(o)},subscribe:o=>(r=o,()=>{r=()=>null}),getTimeoutController:()=>e}}class pI{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,n=performance.now(),i=null,a=o=>{o-n>=r?t(o):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(a))};return i=requestAnimationFrame(a),()=>{cancelAnimationFrame(i)}}}function mI(){return hI(new pI)}var gI=k.createContext(mI);function vI(e,t){var r=k.useContext(gI);return k.useMemo(()=>t??r(e),[e,t,r])}var yI={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},M0={t:0},ld={t:1};function Os(e){var t=kt(e,yI),{isActive:r,canBegin:n,duration:i,easing:a,begin:o,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=vI(t.animationId,t.animationManager),[f,d]=k.useState(r?M0:ld),h=k.useRef(null);return k.useEffect(()=>{r||d(ld)},[r]),k.useEffect(()=>{if(!r||!n)return J5;var m=cI(M0,ld,dI(a),i,d,u.getTimeoutController()),p=()=>{h.current=m()};return u.start([l,o,p,i,s]),()=>{u.stop(),h.current&&h.current(),s()}},[r,n,i,a,o,l,s,u]),c(f.t)}function Ss(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=k.useRef(Vo(t)),n=k.useRef(e);return n.current!==e&&(r.current=Vo(t),n.current=e),r.current}function j0(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 D0(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?j0(Object(r),!0).forEach(function(n){bI(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j0(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function bI(e,t,r){return(t=xI(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xI(e){var t=wI(e,"string");return typeof t=="symbol"?t:t+""}function wI(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 fc(){return fc=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},fc.apply(null,arguments)}var N0=(e,t,r,n,i)=>{var a=Math.min(Math.abs(r)/2,Math.abs(n)/2),o=n>=0?1:-1,s=r>=0?1:-1,l=n>=0&&r>=0||n<0&&r<0?1:0,c;if(a>0&&i instanceof Array){for(var u=[0,0,0,0],f=0,d=4;f<d;f++)u[f]=i[f]>a?a:i[f];c="M".concat(e,",").concat(t+o*u[0]),u[0]>0&&(c+="A ".concat(u[0],",").concat(u[0],",0,0,").concat(l,",").concat(e+s*u[0],",").concat(t)),c+="L ".concat(e+r-s*u[1],",").concat(t),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
|
|
151
151
|
`).concat(e+r,",").concat(t+o*u[1])),c+="L ".concat(e+r,",").concat(t+n-o*u[2]),u[2]>0&&(c+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,`,
|
|
152
152
|
`).concat(e+r-s*u[2],",").concat(t+n)),c+="L ".concat(e+s*u[3],",").concat(t+n),u[3]>0&&(c+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,`,
|
|
153
153
|
`).concat(e,",").concat(t+n-o*u[3])),c+="Z"}else if(a>0&&i===+i&&i>0){var h=Math.min(a,i);c="M ".concat(e,",").concat(t+o*h,`
|
|
@@ -174,13 +174,13 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
|
|
|
174
174
|
`);if(n>0){var{circleTangency:w,lineTangency:y,theta:_}=fl({cx:t,cy:r,radius:n,angle:l,sign:u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:O,lineTangency:A,theta:P}=fl({cx:t,cy:r,radius:n,angle:c,sign:-u,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),T=s?Math.abs(l-c):Math.abs(l-c)-_-P;if(T<0&&a===0)return"".concat(x,"L").concat(t,",").concat(r,"Z");x+="L".concat(A.x,",").concat(A.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(+(T>180),",").concat(+(u>0),",").concat(w.x,",").concat(w.y,`
|
|
177
|
-
A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,"Z")}else x+="L".concat(t,",").concat(r,"Z");return x},AI={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},XO=e=>{var t=kt(e,AI),{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=ye("recharts-sector",f),h=a-i,m=It(o,h,0,!0),p;return m>0&&Math.abs(c-u)<360?p=SI({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,h/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):p=GO({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:u}),E.createElement("path",Th({},Ze(t,!0),{className:d,d:p}))};function EI(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=ut(s,l,c,f),h=ut(s,l,u,f);n=d.x,i=d.y,a=h.x,o=h.y}else return YO(t);return[{x:n,y:i},{x:a,y:o}]}var cd={},ud={},fd={},I0;function PI(){return I0||(I0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=J_();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(fd)),fd}var R0;function CI(){return R0||(R0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PI();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})(ud)),ud}var $0;function kI(){return $0||($0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q_(),r=CI();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})(cd)),cd}var dd,L0;function TI(){return L0||(L0=1,dd=kI().range),dd}var MI=TI();const ZO=En(MI);function Wn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jI(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Hp(e){let t,r,n;e.length!==2?(t=Wn,r=(s,l)=>Wn(e(s),l),n=(s,l)=>e(s)-l):(t=e===Wn||e===jI?e:DI,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 DI(){return 0}function JO(e){return e===null?NaN:+e}function*NI(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const II=Hp(Wn),As=II.right;Hp(JO).center;class B0 extends Map{constructor(t,r=LI){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(F0(this,t))}has(t){return super.has(F0(this,t))}set(t,r){return super.set(RI(this,t),r)}delete(t){return super.delete($I(this,t))}}function F0({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function RI({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function $I({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function LI(e){return e!==null&&typeof e=="object"?e.valueOf():e}function BI(e=Wn){if(e===Wn)return QO;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 QO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const FI=Math.sqrt(50),zI=Math.sqrt(10),WI=Math.sqrt(2);function dc(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>=FI?10:a>=zI?5:a>=WI?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?dc(e,t,r*2):[s,l,c]}function Mh(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?dc(t,e,r):dc(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 jh(e,t,r){return t=+t,e=+e,r=+r,dc(e,t,r)[2]}function Dh(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?jh(t,e,r):jh(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function z0(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function W0(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function e2(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?QO:BI(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));e2(e,t,h,m,i)}const a=e[t];let o=r,s=n;for(lo(e,r,t),i(e[n],a)>0&&lo(e,r,n);o<s;){for(lo(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?lo(e,r,s):(++s,lo(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function lo(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function VI(e,t,r){if(e=Float64Array.from(NI(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return W0(e);if(t>=1)return z0(e);var n,i=(n-1)*t,a=Math.floor(i),o=z0(e2(e,a).subarray(0,a+1)),s=W0(e.subarray(a+1));return o+(s-o)*(i-a)}}function HI(e,t,r=JO){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 UI(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 Pr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function kn(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 Nh=Symbol("implicit");function Up(){var e=new B0,t=[],r=[],n=Nh;function i(a){let o=e.get(a);if(o===void 0){if(n!==Nh)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 B0;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 Up(t,r).unknown(n)},Pr.apply(i,arguments),i}function Kp(){var e=Up().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=UI(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 Kp(t(),[n,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Pr.apply(f(),arguments)}function t2(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return t2(t())},e}function KI(){return t2(Kp.apply(null,arguments).paddingInner(1))}function qp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function r2(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Es(){}var Yo=.7,hc=1/Yo,Oa="\\s*([+-]?\\d+)\\s*",Go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qI=/^#([0-9a-f]{3,8})$/,YI=new RegExp(`^rgb\\(${Oa},${Oa},${Oa}\\)$`),GI=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),XI=new RegExp(`^rgba\\(${Oa},${Oa},${Oa},${Go}\\)$`),ZI=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${Go}\\)$`),JI=new RegExp(`^hsl\\(${Go},${Yr},${Yr}\\)$`),QI=new RegExp(`^hsla\\(${Go},${Yr},${Yr},${Go}\\)$`),V0={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};qp(Es,Xo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:H0,formatHex:H0,formatHex8:eR,formatHsl:tR,formatRgb:U0,toString:U0});function H0(){return this.rgb().formatHex()}function eR(){return this.rgb().formatHex8()}function tR(){return n2(this).formatHsl()}function U0(){return this.rgb().formatRgb()}function Xo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qI.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?K0(t):r===3?new Ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?dl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?dl(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=YI.exec(e))?new Ht(t[1],t[2],t[3],1):(t=GI.exec(e))?new Ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=XI.exec(e))?dl(t[1],t[2],t[3],t[4]):(t=ZI.exec(e))?dl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=JI.exec(e))?G0(t[1],t[2]/100,t[3]/100,1):(t=QI.exec(e))?G0(t[1],t[2]/100,t[3]/100,t[4]):V0.hasOwnProperty(e)?K0(V0[e]):e==="transparent"?new Ht(NaN,NaN,NaN,0):null}function K0(e){return new Ht(e>>16&255,e>>8&255,e&255,1)}function dl(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ht(e,t,r,n)}function rR(e){return e instanceof Es||(e=Xo(e)),e?(e=e.rgb(),new Ht(e.r,e.g,e.b,e.opacity)):new Ht}function Ih(e,t,r,n){return arguments.length===1?rR(e):new Ht(e,t,r,n??1)}function Ht(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}qp(Ht,Ih,r2(Es,{brighter(e){return e=e==null?hc:Math.pow(hc,e),new Ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new Ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ht(Ii(this.r),Ii(this.g),Ii(this.b),pc(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:q0,formatHex:q0,formatHex8:nR,formatRgb:Y0,toString:Y0}));function q0(){return`#${Pi(this.r)}${Pi(this.g)}${Pi(this.b)}`}function nR(){return`#${Pi(this.r)}${Pi(this.g)}${Pi(this.b)}${Pi((isNaN(this.opacity)?1:this.opacity)*255)}`}function Y0(){const e=pc(this.opacity);return`${e===1?"rgb(":"rgba("}${Ii(this.r)}, ${Ii(this.g)}, ${Ii(this.b)}${e===1?")":`, ${e})`}`}function pc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ii(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pi(e){return e=Ii(e),(e<16?"0":"")+e.toString(16)}function G0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Tr(e,t,r,n)}function n2(e){if(e instanceof Tr)return new Tr(e.h,e.s,e.l,e.opacity);if(e instanceof Es||(e=Xo(e)),!e)return new Tr;if(e instanceof Tr)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 Tr(o,s,l,e.opacity)}function iR(e,t,r,n){return arguments.length===1?n2(e):new Tr(e,t,r,n??1)}function Tr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}qp(Tr,iR,r2(Es,{brighter(e){return e=e==null?hc:Math.pow(hc,e),new Tr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new Tr(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 Ht(hd(e>=240?e-240:e+120,i,n),hd(e,i,n),hd(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Tr(X0(this.h),hl(this.s),hl(this.l),pc(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=pc(this.opacity);return`${e===1?"hsl(":"hsla("}${X0(this.h)}, ${hl(this.s)*100}%, ${hl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function X0(e){return e=(e||0)%360,e<0?e+360:e}function hl(e){return Math.max(0,Math.min(1,e||0))}function hd(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 Yp=e=>()=>e;function aR(e,t){return function(r){return e+r*t}}function oR(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 sR(e){return(e=+e)==1?i2:function(t,r){return r-t?oR(t,r,e):Yp(isNaN(t)?r:t)}}function i2(e,t){var r=t-e;return r?aR(e,r):Yp(isNaN(e)?t:e)}const Z0=(function e(t){var r=sR(t);function n(i,a){var o=r((i=Ih(i)).r,(a=Ih(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),c=i2(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 lR(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 cR(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function uR(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]=Ha(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 fR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function mc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function dR(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]=Ha(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Rh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pd=new RegExp(Rh.source,"g");function hR(e){return function(){return e}}function pR(e){return function(t){return e(t)+""}}function mR(e,t){var r=Rh.lastIndex=pd.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Rh.exec(e))&&(i=pd.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:mc(n,i)})),r=pd.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?pR(l[0].x):hR(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 Ha(e,t){var r=typeof t,n;return t==null||r==="boolean"?Yp(t):(r==="number"?mc:r==="string"?(n=Xo(t))?(t=n,Z0):mR:t instanceof Xo?Z0:t instanceof Date?fR:cR(t)?lR:Array.isArray(t)?uR:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?dR:mc)(e,t)}function Gp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function gR(e,t){t===void 0&&(t=e,e=Ha);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 vR(e){return function(){return e}}function gc(e){return+e}var J0=[0,1];function Lt(e){return e}function $h(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:vR(isNaN(t)?NaN:.5)}function yR(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function bR(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=$h(i,n),a=r(o,a)):(n=$h(n,i),a=r(a,o)),function(s){return a(n(s))}}function xR(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]=$h(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=As(e,s,1,n)-1;return a[l](i[l](s))}}function Ps(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wu(){var e=J0,t=J0,r=Ha,n,i,a,o=Lt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==Lt&&(o=yR(e[0],e[d-1])),s=d>2?xR:bR,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),mc)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,gc),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=Gp,u()},f.clamp=function(d){return arguments.length?(o=d?!0:Lt,u()):o!==Lt},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 Xp(){return wu()(Lt,Lt)}function wR(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vc(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 Ma(e){return e=vc(Math.abs(e)),e?e[1]:NaN}function _R(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 OR(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var SR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zo(e){if(!(t=SR.exec(e)))throw new Error("invalid format: "+e);var t;return new Zp({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]})}Zo.prototype=Zp.prototype;function Zp(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+""}Zp.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 AR(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 a2;function ER(e,t){var r=vc(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(a2=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")+vc(e,Math.max(0,t+a-1))[0]}function Q0(e,t){var r=vc(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 eb={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:wR,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)=>Q0(e*100,t),r:Q0,s:ER,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tb(e){return e}var rb=Array.prototype.map,nb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function PR(e){var t=e.grouping===void 0||e.thousands===void 0?tb:_R(rb.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?tb:OR(rb.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=Zo(f);var d=f.fill,h=f.align,m=f.sign,p=f.symbol,g=f.zero,v=f.width,x=f.comma,w=f.precision,y=f.trim,_=f.type;_==="n"?(x=!0,_="g"):eb[_]||(w===void 0&&(w=12),y=!0,_="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=p==="$"?r:p==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",A=p==="$"?n:/[%p]/.test(_)?o:"",P=eb[_],T=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function I(j){var S=O,D=A,M,R,z;if(_==="c")D=P(j)+D,j="";else{j=+j;var W=j<0||1/j<0;if(j=isNaN(j)?l:P(Math.abs(j),w),y&&(j=AR(j)),W&&+j==0&&m!=="+"&&(W=!1),S=(W?m==="("?m:s:m==="-"||m==="("?"":m)+S,D=(_==="s"?nb[8+a2/3]:"")+D+(W&&m==="("?")":""),T){for(M=-1,R=j.length;++M<R;)if(z=j.charCodeAt(M),48>z||z>57){D=(z===46?i+j.slice(M+1):j.slice(M))+D,j=j.slice(0,M);break}}}x&&!g&&(j=t(j,1/0));var Y=S.length+j.length+D.length,G=Y<v?new Array(v-Y+1).join(d):"";switch(x&&g&&(j=t(G+j,G.length?v-D.length:1/0),G=""),h){case"<":j=S+j+D+G;break;case"=":j=S+G+j+D;break;case"^":j=G.slice(0,Y=G.length>>1)+S+j+D+G.slice(Y);break;default:j=G+S+j+D;break}return a(j)}return I.toString=function(){return f+""},I}function u(f,d){var h=c((f=Zo(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(Ma(d)/3)))*3,p=Math.pow(10,-m),g=nb[8+m/3];return function(v){return h(p*v)+g}}return{format:c,formatPrefix:u}}var pl,Jp,o2;CR({thousands:",",grouping:[3],currency:["$",""]});function CR(e){return pl=PR(e),Jp=pl.format,o2=pl.formatPrefix,pl}function kR(e){return Math.max(0,-Ma(Math.abs(e)))}function TR(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ma(t)/3)))*3-Ma(Math.abs(e)))}function MR(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ma(t)-Ma(e))+1}function s2(e,t,r,n){var i=Dh(e,t,r),a;switch(n=Zo(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=TR(i,o))&&(n.precision=a),o2(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=MR(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=kR(i))&&(n.precision=a-(n.type==="%")*2);break}}return Jp(n)}function ti(e){var t=e.domain;return e.ticks=function(r){var n=t();return Mh(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return s2(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=jh(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 l2(){var e=Xp();return e.copy=function(){return Ps(e,l2())},Pr.apply(e,arguments),ti(e)}function c2(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,gc),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return c2(e).unknown(t)},e=arguments.length?Array.from(e,gc):[0,1],ti(r)}function u2(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 ib(e){return Math.log(e)}function ab(e){return Math.exp(e)}function jR(e){return-Math.log(-e)}function DR(e){return-Math.exp(-e)}function NR(e){return isFinite(e)?+("1e"+e):e<0?0:e}function IR(e){return e===10?NR:e===Math.E?Math.exp:t=>Math.pow(e,t)}function RR(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 ob(e){return(t,r)=>-e(-t,r)}function Qp(e){const t=e(ib,ab),r=t.domain;let n=10,i,a;function o(){return i=RR(n),a=IR(n),r()[0]<0?(i=ob(i),a=ob(a),e(jR,DR)):e(ib,ab),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=Mh(c,u,g))}else v=Mh(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=Zo(l)).precision==null&&(l.trim=!0),l=Jp(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(u2(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function f2(){const e=Qp(wu()).domain([1,10]);return e.copy=()=>Ps(e,f2()).base(e.base()),Pr.apply(e,arguments),e}function sb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function lb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function em(e){var t=1,r=e(sb(t),lb(t));return r.constant=function(n){return arguments.length?e(sb(t=+n),lb(t)):t},ti(r)}function d2(){var e=em(wu());return e.copy=function(){return Ps(e,d2()).constant(e.constant())},Pr.apply(e,arguments)}function cb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $R(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function LR(e){return e<0?-e*e:e*e}function tm(e){var t=e(Lt,Lt),r=1;function n(){return r===1?e(Lt,Lt):r===.5?e($R,LR):e(cb(r),cb(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ti(t)}function rm(){var e=tm(wu());return e.copy=function(){return Ps(e,rm()).exponent(e.exponent())},Pr.apply(e,arguments),e}function BR(){return rm.apply(null,arguments).exponent(.5)}function ub(e){return Math.sign(e)*e*e}function FR(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function h2(){var e=Xp(),t=[0,1],r=!1,n;function i(a){var o=FR(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(ub(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,gc)).map(ub)),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 h2(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Pr.apply(i,arguments),ti(i)}function p2(){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]=HI(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[As(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(Wn),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 p2().domain(e).range(t).unknown(n)},Pr.apply(a,arguments)}function m2(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[As(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 m2().domain([e,t]).range(i).unknown(a)},Pr.apply(ti(o),arguments)}function g2(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[As(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 g2().domain(e).range(t).unknown(r)},Pr.apply(i,arguments)}const md=new Date,gd=new Date;function gt(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=>gt(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)=>(md.setTime(+a),gd.setTime(+o),e(md),e(gd),Math.floor(r(md,gd))),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 yc=gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yc.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):yc);yc.range;const mn=1e3,br=mn*60,gn=br*60,_n=gn*24,nm=_n*7,fb=_n*30,vd=_n*365,Ci=gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*mn)},(e,t)=>(t-e)/mn,e=>e.getUTCSeconds());Ci.range;const im=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mn)},(e,t)=>{e.setTime(+e+t*br)},(e,t)=>(t-e)/br,e=>e.getMinutes());im.range;const am=gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*br)},(e,t)=>(t-e)/br,e=>e.getUTCMinutes());am.range;const om=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mn-e.getMinutes()*br)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getHours());om.range;const sm=gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getUTCHours());sm.range;const Cs=gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*br)/_n,e=>e.getDate()-1);Cs.range;const _u=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_n,e=>e.getUTCDate()-1);_u.range;const v2=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_n,e=>Math.floor(e/_n));v2.range;function Zi(e){return gt(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())*br)/nm)}const Ou=Zi(0),bc=Zi(1),zR=Zi(2),WR=Zi(3),ja=Zi(4),VR=Zi(5),HR=Zi(6);Ou.range;bc.range;zR.range;WR.range;ja.range;VR.range;HR.range;function Ji(e){return gt(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)/nm)}const Su=Ji(0),xc=Ji(1),UR=Ji(2),KR=Ji(3),Da=Ji(4),qR=Ji(5),YR=Ji(6);Su.range;xc.range;UR.range;KR.range;Da.range;qR.range;YR.range;const lm=gt(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());lm.range;const cm=gt(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());cm.range;const On=gt(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());On.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(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)});On.range;const Sn=gt(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());Sn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(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)});Sn.range;function y2(e,t,r,n,i,a){const o=[[Ci,1,mn],[Ci,5,5*mn],[Ci,15,15*mn],[Ci,30,30*mn],[a,1,br],[a,5,5*br],[a,15,15*br],[a,30,30*br],[i,1,gn],[i,3,3*gn],[i,6,6*gn],[i,12,12*gn],[n,1,_n],[n,2,2*_n],[r,1,nm],[t,1,fb],[t,3,3*fb],[e,1,vd]];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=Hp(([,,g])=>g).right(o,d);if(h===o.length)return e.every(Dh(c/vd,u/vd,f));if(h===0)return yc.every(Math.max(Dh(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[GR,XR]=y2(Sn,cm,Su,v2,sm,am),[ZR,JR]=y2(On,lm,Ou,Cs,om,im);function yd(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 bd(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 co(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function QR(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=uo(i),u=fo(i),f=uo(a),d=fo(a),h=uo(o),m=fo(o),p=uo(s),g=fo(s),v=uo(l),x=fo(l),w={a:W,A:Y,b:G,B:L,c:null,d:vb,e:vb,f:_$,g:j$,G:N$,H:b$,I:x$,j:w$,L:b2,m:O$,M:S$,p:K,q:H,Q:xb,s:wb,S:A$,u:E$,U:P$,V:C$,w:k$,W:T$,x:null,X:null,y:M$,Y:D$,Z:I$,"%":bb},y={a:ne,A:Q,b:J,B:te,c:null,d:yb,e:yb,f:B$,g:G$,G:Z$,H:R$,I:$$,j:L$,L:w2,m:F$,M:z$,p:oe,q:se,Q:xb,s:wb,S:W$,u:V$,U:H$,V:U$,w:K$,W:q$,x:null,X:null,y:Y$,Y:X$,Z:J$,"%":bb},_={a:I,A:j,b:S,B:D,c:M,d:mb,e:mb,f:m$,g:pb,G:hb,H:gb,I:gb,j:f$,L:p$,m:u$,M:d$,p:T,q:c$,Q:v$,s:y$,S:h$,u:i$,U:a$,V:o$,w:n$,W:s$,x:R,X:z,y:pb,Y:hb,Z:l$,"%":g$};w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),y.x=O(r,y),y.X=O(n,y),y.c=O(t,y);function O(V,q){return function(ie){var N=[],ge=-1,fe=0,Be=V.length,Ve,Tt,Ir;for(ie instanceof Date||(ie=new Date(+ie));++ge<Be;)V.charCodeAt(ge)===37&&(N.push(V.slice(fe,ge)),(Tt=db[Ve=V.charAt(++ge)])!=null?Ve=V.charAt(++ge):Tt=Ve==="e"?" ":"0",(Ir=q[Ve])&&(Ve=Ir(ie,Tt)),N.push(Ve),fe=ge+1);return N.push(V.slice(fe,ge)),N.join("")}}function A(V,q){return function(ie){var N=co(1900,void 0,1),ge=P(N,V,ie+="",0),fe,Be;if(ge!=ie.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(q&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(fe=bd(co(N.y,0,1)),Be=fe.getUTCDay(),fe=Be>4||Be===0?xc.ceil(fe):xc(fe),fe=_u.offset(fe,(N.V-1)*7),N.y=fe.getUTCFullYear(),N.m=fe.getUTCMonth(),N.d=fe.getUTCDate()+(N.w+6)%7):(fe=yd(co(N.y,0,1)),Be=fe.getDay(),fe=Be>4||Be===0?bc.ceil(fe):bc(fe),fe=Cs.offset(fe,(N.V-1)*7),N.y=fe.getFullYear(),N.m=fe.getMonth(),N.d=fe.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),Be="Z"in N?bd(co(N.y,0,1)).getUTCDay():yd(co(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(Be+5)%7:N.w+N.U*7-(Be+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,bd(N)):yd(N)}}function P(V,q,ie,N){for(var ge=0,fe=q.length,Be=ie.length,Ve,Tt;ge<fe;){if(N>=Be)return-1;if(Ve=q.charCodeAt(ge++),Ve===37){if(Ve=q.charAt(ge++),Tt=_[Ve in db?q.charAt(ge++):Ve],!Tt||(N=Tt(V,ie,N))<0)return-1}else if(Ve!=ie.charCodeAt(N++))return-1}return N}function T(V,q,ie){var N=c.exec(q.slice(ie));return N?(V.p=u.get(N[0].toLowerCase()),ie+N[0].length):-1}function I(V,q,ie){var N=h.exec(q.slice(ie));return N?(V.w=m.get(N[0].toLowerCase()),ie+N[0].length):-1}function j(V,q,ie){var N=f.exec(q.slice(ie));return N?(V.w=d.get(N[0].toLowerCase()),ie+N[0].length):-1}function S(V,q,ie){var N=v.exec(q.slice(ie));return N?(V.m=x.get(N[0].toLowerCase()),ie+N[0].length):-1}function D(V,q,ie){var N=p.exec(q.slice(ie));return N?(V.m=g.get(N[0].toLowerCase()),ie+N[0].length):-1}function M(V,q,ie){return P(V,t,q,ie)}function R(V,q,ie){return P(V,r,q,ie)}function z(V,q,ie){return P(V,n,q,ie)}function W(V){return o[V.getDay()]}function Y(V){return a[V.getDay()]}function G(V){return l[V.getMonth()]}function L(V){return s[V.getMonth()]}function K(V){return i[+(V.getHours()>=12)]}function H(V){return 1+~~(V.getMonth()/3)}function ne(V){return o[V.getUTCDay()]}function Q(V){return a[V.getUTCDay()]}function J(V){return l[V.getUTCMonth()]}function te(V){return s[V.getUTCMonth()]}function oe(V){return i[+(V.getUTCHours()>=12)]}function se(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var q=O(V+="",w);return q.toString=function(){return V},q},parse:function(V){var q=A(V+="",!1);return q.toString=function(){return V},q},utcFormat:function(V){var q=O(V+="",y);return q.toString=function(){return V},q},utcParse:function(V){var q=A(V+="",!0);return q.toString=function(){return V},q}}}var db={"-":"",_:" ",0:"0"},Ot=/^\s*\d+/,e$=/^%/,t$=/[\\^$*+?|[\]().{}]/g;function xe(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 r$(e){return e.replace(t$,"\\$&")}function uo(e){return new RegExp("^(?:"+e.map(r$).join("|")+")","i")}function fo(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function n$(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function i$(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function a$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function o$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function s$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function hb(e,t,r){var n=Ot.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function pb(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function l$(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 c$(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function u$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function mb(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function f$(e,t,r){var n=Ot.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function gb(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function d$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function h$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function p$(e,t,r){var n=Ot.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function m$(e,t,r){var n=Ot.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function g$(e,t,r){var n=e$.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function v$(e,t,r){var n=Ot.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function y$(e,t,r){var n=Ot.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function vb(e,t){return xe(e.getDate(),t,2)}function b$(e,t){return xe(e.getHours(),t,2)}function x$(e,t){return xe(e.getHours()%12||12,t,2)}function w$(e,t){return xe(1+Cs.count(On(e),e),t,3)}function b2(e,t){return xe(e.getMilliseconds(),t,3)}function _$(e,t){return b2(e,t)+"000"}function O$(e,t){return xe(e.getMonth()+1,t,2)}function S$(e,t){return xe(e.getMinutes(),t,2)}function A$(e,t){return xe(e.getSeconds(),t,2)}function E$(e){var t=e.getDay();return t===0?7:t}function P$(e,t){return xe(Ou.count(On(e)-1,e),t,2)}function x2(e){var t=e.getDay();return t>=4||t===0?ja(e):ja.ceil(e)}function C$(e,t){return e=x2(e),xe(ja.count(On(e),e)+(On(e).getDay()===4),t,2)}function k$(e){return e.getDay()}function T$(e,t){return xe(bc.count(On(e)-1,e),t,2)}function M$(e,t){return xe(e.getFullYear()%100,t,2)}function j$(e,t){return e=x2(e),xe(e.getFullYear()%100,t,2)}function D$(e,t){return xe(e.getFullYear()%1e4,t,4)}function N$(e,t){var r=e.getDay();return e=r>=4||r===0?ja(e):ja.ceil(e),xe(e.getFullYear()%1e4,t,4)}function I$(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xe(t/60|0,"0",2)+xe(t%60,"0",2)}function yb(e,t){return xe(e.getUTCDate(),t,2)}function R$(e,t){return xe(e.getUTCHours(),t,2)}function $$(e,t){return xe(e.getUTCHours()%12||12,t,2)}function L$(e,t){return xe(1+_u.count(Sn(e),e),t,3)}function w2(e,t){return xe(e.getUTCMilliseconds(),t,3)}function B$(e,t){return w2(e,t)+"000"}function F$(e,t){return xe(e.getUTCMonth()+1,t,2)}function z$(e,t){return xe(e.getUTCMinutes(),t,2)}function W$(e,t){return xe(e.getUTCSeconds(),t,2)}function V$(e){var t=e.getUTCDay();return t===0?7:t}function H$(e,t){return xe(Su.count(Sn(e)-1,e),t,2)}function _2(e){var t=e.getUTCDay();return t>=4||t===0?Da(e):Da.ceil(e)}function U$(e,t){return e=_2(e),xe(Da.count(Sn(e),e)+(Sn(e).getUTCDay()===4),t,2)}function K$(e){return e.getUTCDay()}function q$(e,t){return xe(xc.count(Sn(e)-1,e),t,2)}function Y$(e,t){return xe(e.getUTCFullYear()%100,t,2)}function G$(e,t){return e=_2(e),xe(e.getUTCFullYear()%100,t,2)}function X$(e,t){return xe(e.getUTCFullYear()%1e4,t,4)}function Z$(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Da(e):Da.ceil(e),xe(e.getUTCFullYear()%1e4,t,4)}function J$(){return"+0000"}function bb(){return"%"}function xb(e){return+e}function wb(e){return Math.floor(+e/1e3)}var ha,O2,S2;Q$({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 Q$(e){return ha=QR(e),O2=ha.format,ha.parse,S2=ha.utcFormat,ha.utcParse,ha}function e4(e){return new Date(e)}function t4(e){return e instanceof Date?+e:+new Date(+e)}function um(e,t,r,n,i,a,o,s,l,c){var u=Xp(),f=u.invert,d=u.domain,h=c(".%L"),m=c(":%S"),p=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),x=c("%b %d"),w=c("%B"),y=c("%Y");function _(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:x:r(O)<O?w:y)(O)}return u.invert=function(O){return new Date(f(O))},u.domain=function(O){return arguments.length?d(Array.from(O,t4)):d().map(e4)},u.ticks=function(O){var A=d();return e(A[0],A[A.length-1],O??10)},u.tickFormat=function(O,A){return A==null?_:c(A)},u.nice=function(O){var A=d();return(!O||typeof O.range!="function")&&(O=t(A[0],A[A.length-1],O??10)),O?d(u2(A,O)):u},u.copy=function(){return Ps(u,um(e,t,r,n,i,a,o,s,l,c))},u}function r4(){return Pr.apply(um(ZR,JR,On,lm,Ou,Cs,om,im,Ci,O2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function n4(){return Pr.apply(um(GR,XR,Sn,cm,Su,_u,sm,am,Ci,S2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Au(){var e=0,t=1,r,n,i,a,o=Lt,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(Ha),c.rangeRound=u(Gp),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 ri(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function A2(){var e=ti(Au()(Lt));return e.copy=function(){return ri(e,A2())},kn.apply(e,arguments)}function E2(){var e=Qp(Au()).domain([1,10]);return e.copy=function(){return ri(e,E2()).base(e.base())},kn.apply(e,arguments)}function P2(){var e=em(Au());return e.copy=function(){return ri(e,P2()).constant(e.constant())},kn.apply(e,arguments)}function fm(){var e=tm(Au());return e.copy=function(){return ri(e,fm()).exponent(e.exponent())},kn.apply(e,arguments)}function i4(){return fm.apply(null,arguments).exponent(.5)}function C2(){var e=[],t=Lt;function r(n){if(n!=null&&!isNaN(n=+n))return t((As(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(Wn),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)=>VI(e,a/n))},r.copy=function(){return C2(t).domain(e)},kn.apply(r,arguments)}function Eu(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,c=Lt,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,x,w;return arguments.length?([v,x,w]=g,c=gR(p,[v,x,w]),h):[c(0),c(.5),c(1)]}}return h.range=m(Ha),h.rangeRound=m(Gp),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 k2(){var e=ti(Eu()(Lt));return e.copy=function(){return ri(e,k2())},kn.apply(e,arguments)}function T2(){var e=Qp(Eu()).domain([.1,1,10]);return e.copy=function(){return ri(e,T2()).base(e.base())},kn.apply(e,arguments)}function M2(){var e=em(Eu());return e.copy=function(){return ri(e,M2()).constant(e.constant())},kn.apply(e,arguments)}function dm(){var e=tm(Eu());return e.copy=function(){return ri(e,dm()).exponent(e.exponent())},kn.apply(e,arguments)}function a4(){return dm.apply(null,arguments).exponent(.5)}const So=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Kp,scaleDiverging:k2,scaleDivergingLog:T2,scaleDivergingPow:dm,scaleDivergingSqrt:a4,scaleDivergingSymlog:M2,scaleIdentity:c2,scaleImplicit:Nh,scaleLinear:l2,scaleLog:f2,scaleOrdinal:Up,scalePoint:KI,scalePow:rm,scaleQuantile:p2,scaleQuantize:m2,scaleRadial:h2,scaleSequential:A2,scaleSequentialLog:E2,scaleSequentialPow:fm,scaleSequentialQuantile:C2,scaleSequentialSqrt:i4,scaleSequentialSymlog:P2,scaleSqrt:BR,scaleSymlog:d2,scaleThreshold:g2,scaleTime:r4,scaleUtc:n4,tickFormat:s2},Symbol.toStringTag,{value:"Module"}));var ni=e=>e.chartData,hm=$([ni],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Pu=(e,t,r,n)=>n?hm(e):ni(e);function Na(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(cr(t)&&cr(r))return!0}return!1}function _b(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function o4(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(cr(r))i=r;else if(typeof r=="function")return;if(cr(n))a=n;else if(typeof n=="function")return;var o=[i,a];if(Na(o))return o}}function s4(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Na(n))return _b(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(ae(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i=="string"&&p0.test(i)){var l=p0.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(ae(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&m0.test(a)){var u=m0.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(Na(d))return t==null?d:_b(d,t,r)}}}var Ua=1e9,l4={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},mm,Ye=!0,_r="[DecimalError] ",Ri=_r+"Invalid argument: ",pm=_r+"Exponent out of range: ",Ka=Math.floor,wi=Math.pow,c4=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,nr,bt=1e7,Ue=7,j2=9007199254740991,wc=Ka(j2/Ue),Z={};Z.absoluteValue=Z.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Z.comparedTo=Z.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};Z.decimalPlaces=Z.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ue;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Z.dividedBy=Z.div=function(e){return bn(this,new this.constructor(e))};Z.dividedToIntegerBy=Z.idiv=function(e){var t=this,r=t.constructor;return $e(bn(t,new r(e),0,1),r.precision)};Z.equals=Z.eq=function(e){return!this.cmp(e)};Z.exponent=function(){return ft(this)};Z.greaterThan=Z.gt=function(e){return this.cmp(e)>0};Z.greaterThanOrEqualTo=Z.gte=function(e){return this.cmp(e)>=0};Z.isInteger=Z.isint=function(){return this.e>this.d.length-2};Z.isNegative=Z.isneg=function(){return this.s<0};Z.isPositive=Z.ispos=function(){return this.s>0};Z.isZero=function(){return this.s===0};Z.lessThan=Z.lt=function(e){return this.cmp(e)<0};Z.lessThanOrEqualTo=Z.lte=function(e){return this.cmp(e)<1};Z.logarithm=Z.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(nr))throw Error(_r+"NaN");if(r.s<1)throw Error(_r+(r.s?"NaN":"-Infinity"));return r.eq(nr)?new n(0):(Ye=!1,t=bn(Jo(r,a),Jo(e,a),a),Ye=!0,$e(t,i))};Z.minus=Z.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?I2(t,e):D2(t,(e.s=-e.s,e))};Z.modulo=Z.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(_r+"NaN");return r.s?(Ye=!1,t=bn(r,e,0,1).times(e),Ye=!0,r.minus(t)):$e(new n(r),i)};Z.naturalExponential=Z.exp=function(){return N2(this)};Z.naturalLogarithm=Z.ln=function(){return Jo(this)};Z.negated=Z.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Z.plus=Z.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?D2(t,e):I2(t,(e.s=-e.s,e))};Z.precision=Z.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ri+e);if(t=ft(i)+1,n=i.d.length-1,r=n*Ue+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};Z.squareRoot=Z.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(_r+"NaN")}for(e=ft(s),Ye=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Kr(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ka((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(bn(s,a,o+2)).times(.5),Kr(a.d).slice(0,o)===(t=Kr(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if($e(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ye=!0,$e(n,r)};Z.times=Z.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%bt|0,t=s/bt|0;a[i]=(a[i]+t)%bt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ye?$e(e,f.precision):e};Z.toDecimalPlaces=Z.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Jr(e,0,Ua),t===void 0?t=n.rounding:Jr(t,0,8),$e(r,e+ft(r)+1,t))};Z.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Hi(n,!0):(Jr(e,0,Ua),t===void 0?t=i.rounding:Jr(t,0,8),n=$e(new i(n),e+1,t),r=Hi(n,!0,e+1)),r};Z.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Hi(i):(Jr(e,0,Ua),t===void 0?t=a.rounding:Jr(t,0,8),n=$e(new a(i),e+ft(i)+1,t),r=Hi(n.abs(),!1,e+ft(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Z.toInteger=Z.toint=function(){var e=this,t=e.constructor;return $e(new t(e),ft(e)+1,t.rounding)};Z.toNumber=function(){return+this};Z.toPower=Z.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(nr);if(s=new l(s),!s.s){if(e.s<1)throw Error(_r+"Infinity");return s}if(s.eq(nr))return s;if(n=l.precision,e.eq(nr))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=u<0?-u:u)<=j2){for(i=new l(nr),t=Math.ceil(n/Ue+4),Ye=!1;r%2&&(i=i.times(s),Sb(i.d,t)),r=Ka(r/2),r!==0;)s=s.times(s),Sb(s.d,t);return Ye=!0,e.s<0?new l(nr).div(i):$e(i,n)}}else if(a<0)throw Error(_r+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ye=!1,i=e.times(Jo(s,n+c)),Ye=!0,i=N2(i),i.s=a,i};Z.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ft(i),n=Hi(i,r<=a.toExpNeg||r>=a.toExpPos)):(Jr(e,1,Ua),t===void 0?t=a.rounding:Jr(t,0,8),i=$e(new a(i),e,t),r=ft(i),n=Hi(i,e<=r||r<=a.toExpNeg,e)),n};Z.toSignificantDigits=Z.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Jr(e,1,Ua),t===void 0?t=n.rounding:Jr(t,0,8)),$e(new n(r),e,t)};Z.toString=Z.valueOf=Z.val=Z.toJSON=Z[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ft(e),r=e.constructor;return Hi(e,t<=r.toExpNeg||t>=r.toExpPos)};function D2(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)),Ye?$e(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/Ue),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)/bt|0,l[a]%=bt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ye?$e(t,f):t}function Jr(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Ri+e)}function Kr(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=Ue-n.length,r&&(a+=In(r)),a+=n;o=e[t],n=o+"",r=Ue-n.length,r&&(a+=In(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var bn=(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%bt|0,o=a/bt|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*bt+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,x,w,y,_,O,A,P,T=n.constructor,I=n.s==i.s?1:-1,j=n.d,S=i.d;if(!n.s)return new T(n);if(!i.s)throw Error(_r+"Division by zero");for(l=n.e-i.e,A=S.length,_=j.length,h=new T(I),m=h.d=[],c=0;S[c]==(j[c]||0);)++c;if(S[c]>(j[c]||0)&&--l,a==null?x=a=T.precision:o?x=a+(ft(n)-ft(i))+1:x=a,x<0)return new T(0);if(x=x/Ue+2|0,c=0,A==1)for(u=0,S=S[0],x++;(c<_||u)&&x--;c++)w=u*bt+(j[c]||0),m[c]=w/S|0,u=w%S|0;else{for(u=bt/(S[0]+1)|0,u>1&&(S=e(S,u),j=e(j,u),A=S.length,_=j.length),y=A,p=j.slice(0,A),g=p.length;g<A;)p[g++]=0;P=S.slice(),P.unshift(0),O=S[0],S[1]>=bt/2&&++O;do u=0,s=t(S,p,A,g),s<0?(v=p[0],A!=g&&(v=v*bt+(p[1]||0)),u=v/O|0,u>1?(u>=bt&&(u=bt-1),f=e(S,u),d=f.length,g=p.length,s=t(f,p,d,g),s==1&&(u--,r(f,A<d?P:S,d))):(u==0&&(s=u=1),f=S.slice()),d=f.length,d<g&&f.unshift(0),r(p,f,g),s==-1&&(g=p.length,s=t(S,p,A,g),s<1&&(u++,r(p,A<g?P:S,g))),g=p.length):s===0&&(u++,p=[0]),m[c++]=u,s&&p[0]?p[g++]=j[y]||0:(p=[j[y]],g=1);while((y++<_||p[0]!==void 0)&&x--)}return m[0]||m.shift(),h.e=l,$e(h,o?a+ft(h)+1:a)}})();function N2(e,t){var r,n,i,a,o,s,l=0,c=0,u=e.constructor,f=u.precision;if(ft(e)>16)throw Error(pm+ft(e));if(!e.s)return new u(nr);for(Ye=!1,s=f,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(wi(2,c))/Math.LN10*2+5|0,s+=n,r=i=a=new u(nr),u.precision=s;;){if(i=$e(i.times(e),s),r=r.times(++l),o=a.plus(bn(i,r,s)),Kr(o.d).slice(0,s)===Kr(a.d).slice(0,s)){for(;c--;)a=$e(a.times(a),s);return u.precision=f,t==null?(Ye=!0,$e(a,f)):a}a=o}}function ft(e){for(var t=e.e*Ue,r=e.d[0];r>=10;r/=10)t++;return t}function xd(e,t,r){if(t>e.LN10.sd())throw Ye=!0,r&&(e.precision=r),Error(_r+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function In(e){for(var t="";e--;)t+="0";return t}function Jo(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(_r+(h.s?"NaN":"-Infinity"));if(h.eq(nr))return new p(0);if(t==null?(Ye=!1,c=g):c=t,h.eq(10))return t==null&&(Ye=!0),xd(p,c);if(c+=d,p.precision=c,r=Kr(m),n=r.charAt(0),a=ft(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Kr(h.d),n=r.charAt(0),f++;a=ft(h),n>1?(h=new p("0."+r),a++):h=new p(n+"."+r.slice(1))}else return l=xd(p,c+2,g).times(a+""),h=Jo(new p(n+"."+r.slice(1)),c-d).plus(l),p.precision=g,t==null?(Ye=!0,$e(h,g)):h;for(s=o=h=bn(h.minus(nr),h.plus(nr),c),u=$e(h.times(h),c),i=3;;){if(o=$e(o.times(u),c),l=s.plus(bn(o,new p(i),c)),Kr(l.d).slice(0,c)===Kr(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(xd(p,c+2,g).times(a+""))),s=bn(s,new p(f),c),p.precision=g,t==null?(Ye=!0,$e(s,g)):s;s=l,i+=2}}function Ob(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=Ka(r/Ue),e.d=[],n=(r+1)%Ue,r<0&&(n+=Ue),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Ue;n<i;)e.d.push(+t.slice(n,n+=Ue));t=t.slice(n),n=Ue-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Ye&&(e.e>wc||e.e<-wc))throw Error(pm+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(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+=Ue,i=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Ue),a=f.length,u>=a)return e;for(c=a=f[u],o=1;a>=10;a/=10)o++;n%=Ue,i=n-Ue+o}if(r!==void 0&&(a=wi(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/wi(10,o-i):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=ft(e),f.length=1,t=t-a-1,f[0]=wi(10,(Ue-t%Ue)%Ue),e.e=Ka(-t/Ue)||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=wi(10,Ue-n),f[u]=i>0?(c/wi(10,o-i)%wi(10,i)|0)*a:0),l)for(;;)if(u==0){(f[0]+=a)==bt&&(f[0]=1,++e.e);break}else{if(f[u]+=a,f[u]!=bt)break;f[u--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Ye&&(e.e>wc||e.e<-wc))throw Error(pm+ft(e));return e}function I2(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),Ye?$e(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/Ue),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]=bt-1;--l[a],l[i]+=bt}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,Ye?$e(t,h):t):new d(0)}function Hi(e,t,r){var n,i=ft(e),a=Kr(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+In(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+In(-i-1)+a,r&&(n=r-o)>0&&(a+=In(n))):i>=o?(a+=In(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+In(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=In(n))),e.s<0?"-"+a:a}function Sb(e,t){if(e.length>t)return e.length=t,!0}function R2(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(Ri+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 Ob(o,a.toString())}else if(typeof a!="string")throw Error(Ri+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,c4.test(a))Ob(o,a);else throw Error(Ri+a)}if(i.prototype=Z,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=R2,i.config=i.set=u4,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 u4(e){if(!e||typeof e!="object")throw Error(_r+"Object expected");var t,r,n,i=["precision",1,Ua,"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(Ka(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ri+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ri+r+": "+n);return this}var mm=R2(l4);nr=new mm(1);const je=mm;var f4=e=>e,$2={},L2=e=>e===$2,Ab=e=>function t(){return arguments.length===0||arguments.length===1&&L2(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},B2=(e,t)=>e===1?t:Ab(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!==$2).length;return a>=e?t(...n):B2(e-a,Ab(function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];var c=n.map(u=>L2(u)?s.shift():u);return t(...c,...s)}))}),Cu=e=>B2(e.length,e),Lh=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},d4=Cu((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),h4=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return f4;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce((s,l)=>l(s),a(...arguments))}},Bh=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),F2=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 z2(e){var t;return e===0?t=1:t=Math.floor(new je(e).abs().log(10).toNumber())+1,t}function W2(e,t,r){for(var n=new je(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}Cu((e,t,r)=>{var n=+e,i=+t;return n+r*(i-n)});Cu((e,t,r)=>{var n=t-+e;return n=n||1/0,(r-e)/n});Cu((e,t,r)=>{var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});var V2=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},H2=(e,t,r)=>{if(e.lte(0))return new je(0);var n=z2(e.toNumber()),i=new je(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new je(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?new je(l.toNumber()):new je(Math.ceil(l.toNumber()))},p4=(e,t,r)=>{var n=new je(1),i=new je(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new je(10).pow(z2(e)-1),i=new je(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new je(Math.floor(e)))}else e===0?i=new je(Math.floor((t-1)/2)):r||(i=new je(Math.floor(e)));var o=Math.floor((t-1)/2),s=h4(d4(l=>i.add(new je(l-o).mul(n)).toNumber()),Lh);return s(0,t)},U2=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 je(0),tickMin:new je(0),tickMax:new je(0)};var o=H2(new je(r).sub(t).div(n-1),i,a),s;t<=0&&r>=0?s=new je(0):(s=new je(t).add(r).div(2),s=s.sub(new je(s).mod(o)));var l=Math.ceil(s.sub(t).div(o).toNumber()),c=Math.ceil(new je(r).sub(s).div(o).toNumber()),u=l+c+1;return u>n?U2(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 je(l).mul(o)),tickMax:s.add(new je(c).mul(o))})};function m4(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]=V2([t,r]);if(o===-1/0||s===1/0){var l=s===1/0?[o,...Lh(0,n-1).map(()=>1/0)]:[...Lh(0,n-1).map(()=>-1/0),s];return t>r?Bh(l):l}if(o===s)return p4(o,n,i);var{step:c,tickMin:u,tickMax:f}=U2(o,s,a,i,0),d=W2(u,f.add(new je(.1).mul(c)),c);return t>r?Bh(d):d}function g4(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,o]=V2([r,n]);if(a===-1/0||o===1/0)return[r,n];if(a===o)return[a];var s=Math.max(t,2),l=H2(new je(o).sub(a).div(s-1),i,0),c=[...W2(new je(a),new je(o),l),o];return i===!1&&(c=c.map(u=>Math.round(u))),r>n?Bh(c):c}var v4=F2(m4),y4=F2(g4),K2=e=>e.rootProps.maxBarSize,b4=e=>e.rootProps.barGap,q2=e=>e.rootProps.barCategoryGap,x4=e=>e.rootProps.barSize,ks=e=>e.rootProps.stackOffset,gm=e=>e.options.chartName,vm=e=>e.rootProps.syncId,Y2=e=>e.rootProps.syncMethod,ym=e=>e.options.eventEmitter,hn={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},er={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},ku=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},w4={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:hn.reversed,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:hn.type,unit:void 0},_4={allowDataOverflow:er.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:er.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:er.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:er.scale,tick:er.tick,tickCount:er.tickCount,ticks:void 0,type:er.type,unit:void 0},O4={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:hn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},S4={allowDataOverflow:er.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:er.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:er.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:er.scale,tick:er.tick,tickCount:er.tickCount,ticks:void 0,type:"category",unit:void 0},bm=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?O4:w4,xm=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?S4:_4,Tu=e=>e.polarOptions,wm=$([Pn,Cn,mt],kO),G2=$([Tu,wm],(e,t)=>{if(e!=null)return It(e.innerRadius,t,0)}),X2=$([Tu,wm],(e,t)=>{if(e!=null)return It(e.outerRadius,t,t*.8)}),A4=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},Z2=$([Tu],A4);$([bm,Z2],ku);var J2=$([wm,G2,X2],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});$([xm,J2],ku);var Q2=$([me,Tu,G2,X2,Pn,Cn],(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:It(o,i,i/2),cy:It(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),Xe=(e,t)=>t,Ts=(e,t,r)=>r;function _m(e){return e?.id}var vt=e=>{var t=me(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},qa=e=>e.tooltip.settings.axisId,St=e=>{var t=vt(e),r=qa(e);return Ms(e,t,r)},eS=$([St],e=>e?.dataKey);function tS(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=_m(s);c.forEach((f,d)=>{var h=a==null||i?d:String(ze(f,a,null)),m=ze(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 Mu(e){return e.stackId!=null&&e.dataKey!=null}function Eb(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 _c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eb(Object(r),!0).forEach(function(n){E4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E4(e,t,r){return(t=P4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P4(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)}var Fh=[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},rS=(e,t)=>e.cartesianAxis.xAxis[t],Tn=(e,t)=>{var r=rS(e,t);return r??Zt},Jt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Fh,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:_s},nS=(e,t)=>e.cartesianAxis.yAxis[t],Mn=(e,t)=>{var r=nS(e,t);return r??Jt},k4={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:""},Om=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??k4},st=(e,t,r)=>{switch(t){case"xAxis":return Tn(e,r);case"yAxis":return Mn(e,r);case"zAxis":return Om(e,r);case"angleAxis":return bm(e,r);case"radiusAxis":return xm(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},T4=(e,t,r)=>{switch(t){case"xAxis":return Tn(e,r);case"yAxis":return Mn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Ms=(e,t,r)=>{switch(t){case"xAxis":return Tn(e,r);case"yAxis":return Mn(e,r);case"angleAxis":return bm(e,r);case"radiusAxis":return xm(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},iS=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Sm(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 ju=e=>e.graphicalItems.cartesianItems,M4=$([Xe,Ts],Sm),Am=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),js=$([ju,st,M4],Am),aS=$([js],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Mu)),oS=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),sS=$([js],oS),Em=e=>e.map(t=>t.data).filter(Boolean).flat(1),j4=$([js],Em),Pm=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},Cm=$([j4,Pu],Pm),km=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:ze(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:ze(i,n)}))):e.map(n=>({value:n})),Du=$([Cm,st,js],km);function lS(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Qi(e){return e.filter(t=>Zr(t)||t instanceof Date).map(Number).filter(t=>sr(t)===!1)}function D4(e,t,r){return!r||typeof t!="number"||sr(t)?[]:r.length?Qi(r.flatMap(n=>{var i=ze(e,n.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!cr(a)||!cr(o)))return[t-a,t+o]})):[]}var N4=$([aS,Pu,St],tS),cS=(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(_m);return[o,{stackedData:ZN(e,l,r),graphicalItems:s}]}))},zh=$([N4,aS,ks],cS),uS=(e,t,r)=>{var{dataStartIndex:n,dataEndIndex:i}=t;if(r!=="zAxis"){var a=r5(e,n,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},I4=$([zh,ni,Xe],uS),fS=(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=>lS(i,f)),u=ze(a,(l=t.dataKey)!==null&&l!==void 0?l:o.dataKey);return{value:u,errorDomain:D4(a,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(a=>({value:ze(a,t.dataKey),errorDomain:[]})):e.map(a=>({value:a,errorDomain:[]})),Nu=e=>e.errorBars,dS=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>lS(r,n));$([sS,Nu,Xe],dS);var R4=$([Cm,st,sS,Nu,Xe],fS);function $4(e){var{value:t}=e;if(Zr(t)||t instanceof Date)return t}var Pb=e=>{var t=e.flatMap(n=>[n.value,n.errorDomain]).flat(1),r=Qi(t);if(r.length!==0)return[Math.min(...r),Math.max(...r)]},L4=(e,t,r)=>{var n=e.map($4).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&y_(n))?ZO(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},Tm=e=>{var t;if(e==null||!("domain"in e))return Fh;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=Qi(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:Fh},Oc=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]}},hS=e=>e.referenceElements.dots,Ya=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),B4=$([hS,Xe,Ts],Ya),pS=e=>e.referenceElements.areas,F4=$([pS,Xe,Ts],Ya),mS=e=>e.referenceElements.lines,z4=$([mS,Xe,Ts],Ya),gS=(e,t)=>{var r=Qi(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},W4=$(B4,Xe,gS),vS=(e,t)=>{var r=Qi(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=$([F4,Xe],vS),yS=(e,t)=>{var r=Qi(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},H4=$(z4,Xe,yS),U4=$(W4,H4,V4,(e,t,r)=>Oc(e,r,t)),bS=$([st],Tm),Mm=(e,t,r,n,i,a,o)=>{var s=o4(t,e.allowDataOverflow);if(s!=null)return s;var l=a==="vertical"&&o==="xAxis"||a==="horizontal"&&o==="yAxis",c=l?Oc(r,i,Pb(n)):Oc(i,Pb(n));return s4(t,c,e.allowDataOverflow)},K4=$([st,bS,I4,R4,U4,me,Xe],Mm),q4=[0,1],jm=(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=Qn(t,a);return c&&s==null?ZO(0,r.length):l==="category"?L4(n,e,c):i==="expand"?q4:o}},Dm=$([st,me,Cm,Du,ks,Xe,K4],jm),xS=(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(vs(a));return s in So?s:"point"}}},Ga=$([st,me,iS,gm,Xe],xS);function Y4(e){if(e!=null){if(e in So)return So[e]();var t="scale".concat(vs(e));if(t in So)return So[t]()}}function Nm(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=Y4(t);if(i!=null){var a=i.domain(r).range(n);return KN(a),a}}}var Im=(e,t,r)=>{var n=Tm(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Na(e))return v4(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Na(e))return y4(e,t.tickCount,t.allowDecimals)}},Rm=$([Dm,Ms,Ga],Im),$m=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&Na(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},G4=$([st,Dm,Rm,Xe],$m),X4=$(Du,st,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Qi(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}}),wS=$(X4,me,q2,mt,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!cr(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=It(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),Z4=(e,t)=>{var r=Tn(e,t);return r==null||typeof r.padding!="string"?0:wS(e,"xAxis",t,r.padding)},J4=(e,t)=>{var r=Mn(e,t);return r==null||typeof r.padding!="string"?0:wS(e,"yAxis",t,r.padding)},Q4=$(Tn,Z4,(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}}),eL=$(Mn,J4,(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}}),tL=$([mt,Q4,bu,yu,(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]}),rL=$([mt,me,eL,bu,yu,(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]}),Ds=(e,t,r,n)=>{var i;switch(t){case"xAxis":return tL(e,r,n);case"yAxis":return rL(e,r,n);case"zAxis":return(i=Om(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return Z2(e);case"radiusAxis":return J2(e,r);default:return}},_S=$([st,Ds],ku),Xa=$([st,Ga,G4,_S],Nm);$([js,Nu,Xe],dS);function OS(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Iu=(e,t)=>t,Ru=(e,t,r)=>r,nL=$(gu,Iu,Ru,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(OS)),iL=$(vu,Iu,Ru,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(OS)),SS=(e,t)=>({width:e.width,height:t.height}),aL=(e,t)=>{var r=typeof t.width=="number"?t.width:_s;return{width:r,height:e.height}},AS=$(mt,Tn,SS),oL=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},sL=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},lL=$(Cn,mt,nL,Iu,Ru,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=SS(t,s);o==null&&(o=oL(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}),cL=$(Pn,mt,iL,Iu,Ru,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=aL(t,s);o==null&&(o=sL(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}),uL=(e,t)=>{var r=Tn(e,t);if(r!=null)return lL(e,r.orientation,r.mirror)},fL=$([mt,Tn,uL,(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}}}),dL=(e,t)=>{var r=Mn(e,t);if(r!=null)return cL(e,r.orientation,r.mirror)},hL=$([mt,Mn,dL,(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}}}),ES=$(mt,Mn,(e,t)=>{var r=typeof t.width=="number"?t.width:_s;return{width:r,height:e.height}}),Cb=(e,t,r)=>{switch(t){case"xAxis":return AS(e,r).width;case"yAxis":return ES(e,r).height;default:return}},PS=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=Qn(e,n),l=t.map(c=>c.value);if(o&&s&&a==="category"&&i&&y_(l))return l}},Lm=$([me,Du,st,Xe],PS),CS=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,o=Qn(e,n);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},Bm=$([me,Du,Ms,Xe],CS),kb=$([me,T4,Ga,Xa,Lm,Bm,Ds,Rm,Xe],(e,t,r,n,i,a,o,s,l)=>{if(t==null)return null;var c=Qn(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}}),pL=(e,t,r,n,i,a,o,s,l)=>{if(!(t==null||n==null)){var c=Qn(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?wt(a[0]-a[1])*2*m:m;var p=f||i;if(p){var g=p.map((v,x)=>{var w=o?o.indexOf(v):v;return{index:x,coordinate:n(w)+m,value:v,offset:m}});return g.filter(v=>!sr(v.coordinate))}return c&&s?s.map((v,x)=>({coordinate:n(v)+m,value:v,index:x,offset:m})):n.ticks?n.ticks(d).map(v=>({coordinate:n(v)+m,value:v,offset:m})):n.domain().map((v,x)=>({coordinate:n(v)+m,value:o?o[v]:v,index:x,offset:m}))}},kS=$([me,Ms,Ga,Xa,Rm,Ds,Lm,Bm,Xe],pL),mL=(e,t,r,n,i,a,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=Qn(e,o),{tickCount:l}=t,c=0;return c=o==="angleAxis"&&n?.length>=2?wt(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}))}},Kn=$([me,Ms,Xa,Ds,Lm,Bm,Xe],mL),qn=$(st,Xa,(e,t)=>{if(!(e==null||t==null))return _c(_c({},e),{},{scale:t})}),gL=$([st,Ga,Dm,_S],Nm);$((e,t,r)=>Om(e,r),gL,(e,t)=>{if(!(e==null||t==null))return _c(_c({},e),{},{scale:t})});var vL=$([me,gu,vu],(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}}),TS=e=>e.options.defaultTooltipEventType,MS=e=>e.options.validateTooltipEventTypes;function jS(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Fm(e,t){var r=TS(e),n=MS(e);return jS(t,r,n)}function yL(e){return re(t=>Fm(t,e))}var DS=(e,t)=>{var r,n=Number(t);if(!(sr(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},bL=e=>e.tooltip.settings,$n={active:!1,index:null,dataKey:void 0,coordinate:void 0},xL={itemInteraction:{click:$n,hover:$n},axisInteraction:{click:$n,hover:$n},keyboardInteraction:$n,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}},NS=fr({name:"tooltip",initialState:xL,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var r=yn(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:wL,removeTooltipEntrySettings:_L,setTooltipSettingsState:OL,setActiveMouseOverItemIndex:IS,mouseLeaveItem:SL,mouseLeaveChart:RS,setActiveClickItemIndex:AL,setMouseOverAxisIndex:$S,setMouseClickAxisIndex:EL,setSyncInteraction:Wh,setKeyboardInteraction:Vh}=NS.actions,PL=NS.reducer;function Tb(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 ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tb(Object(r),!0).forEach(function(n){CL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CL(e,t,r){return(t=kL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kL(e){var t=TL(e,"string");return typeof t=="symbol"?t:t+""}function TL(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 ML(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function jL(e){return e.index!=null}var LS=(e,t,r,n)=>{if(t==null)return $n;var i=ML(e,t,r);if(i==null)return $n;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(jL(i)){if(a)return ml(ml({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return ml(ml({},$n),{},{coordinate:i.coordinate})},zm=(e,t)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!cr(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)))},BS=(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}}}},FS=(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})},Ns=e=>e.options.tooltipPayloadSearcher,Za=e=>e.tooltip;function Mb(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 jb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(r),!0).forEach(function(n){DL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DL(e,t,r){return(t=NL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NL(e){var t=IL(e,"string");return typeof t=="symbol"?t:t+""}function IL(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 RL(e,t){return e??t}var zS=(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=RL(p,s),x=Array.isArray(v)?TO(v,c,u):v,w=(m=g?.dataKey)!==null&&m!==void 0?m:n,y=g?.nameKey,_;if(n&&Array.isArray(x)&&!Array.isArray(x[0])&&o==="axis"?_=b_(x,n,i):_=a(x,t,l,y),Array.isArray(_))_.forEach(A=>{var P=jb(jb({},g),{},{name:A.name,unit:A.unit,color:void 0,fill:void 0});d.push(g0({tooltipEntrySettings:P,dataKey:A.dataKey,payload:A.payload,value:ze(A.payload,A.dataKey),name:A.name}))});else{var O;d.push(g0({tooltipEntrySettings:g,dataKey:w,payload:_,value:ze(_,w),name:(O=ze(_,y))!==null&&O!==void 0?O:g?.name}))}return d},f)}},Wm=$([St,me,iS,gm,vt],xS),$L=$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),LL=$([vt,qa],Sm),Is=$([$L,St,LL],Am),BL=$([Is],e=>e.filter(Mu)),FL=$([Is],Em),Ja=$([FL,ni],Pm),zL=$([BL,ni,St],tS),Vm=$([Ja,St,Is],km),WL=$([St],Tm),VL=$([Is],e=>e.filter(Mu)),HL=$([zL,VL,ks],cS),UL=$([HL,ni,vt],uS),KL=$([Is],oS),qL=$([Ja,St,KL,Nu,vt],fS),YL=$([hS,vt,qa],Ya),GL=$([YL,vt],gS),XL=$([pS,vt,qa],Ya),ZL=$([XL,vt],vS),JL=$([mS,vt,qa],Ya),QL=$([JL,vt],yS),eB=$([GL,QL,ZL],Oc),tB=$([St,WL,UL,qL,eB,me,vt],Mm),WS=$([St,me,Ja,Vm,ks,vt,tB],jm),rB=$([WS,St,Wm],Im),nB=$([St,WS,rB,vt],$m),VS=e=>{var t=vt(e),r=qa(e),n=!1;return Ds(e,t,r,n)},HS=$([St,VS],ku),US=$([St,Wm,nB,HS],Nm),iB=$([me,Vm,St,vt],PS),aB=$([me,Vm,St,vt],CS),oB=(e,t,r,n,i,a,o,s)=>{if(t){var{type:l}=t,c=Qn(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?wt(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}))}}},jn=$([me,St,Wm,US,VS,iB,aB,vt],oB),Hm=$([TS,MS,bL],(e,t,r)=>jS(r.shared,e,t)),KS=e=>e.tooltip.settings.trigger,Um=e=>e.tooltip.settings.defaultIndex,$u=$([Za,Hm,KS,Um],LS),Yn=$([$u,Ja],zm),qS=$([jn,Yn],DS),YS=$([$u],e=>{if(e)return e.dataKey}),GS=$([Za,Hm,KS,Um],FS),sB=$([Pn,Cn,me,mt,jn,Um,GS,Ns],BS),lB=$([$u,sB],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),cB=$([$u],e=>e.active),uB=$([GS,Yn,ni,eS,qS,Ns,Hm],zS),fB=$([uB],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Db(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 Nb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Db(Object(r),!0).forEach(function(n){dB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dB(e,t,r){return(t=hB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hB(e){var t=pB(e,"string");return typeof t=="symbol"?t:t+""}function pB(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 mB=()=>re(St),gB=()=>{var e=mB(),t=re(jn),r=re(US);return Ko(Nb(Nb({},e),{},{scale:r}),t)},vB=()=>re(gm),Km=(e,t)=>t,XS=(e,t,r)=>r,qm=(e,t,r,n)=>n,yB=$(jn,e=>fu(e,t=>t.coordinate)),Ym=$([Za,Km,XS,qm],LS),ZS=$([Ym,Ja],zm),bB=(e,t,r)=>{if(t!=null){var n=Za(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},JS=$([Za,Km,XS,qm],FS),Sc=$([Pn,Cn,me,mt,jn,qm,JS,Ns],BS),xB=$([Ym,Sc],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),QS=$(jn,ZS,DS),wB=$([JS,ZS,ni,eS,QS,Ns,Km],zS),_B=$([Ym],e=>({isActive:e.active,activeIndex:e.index})),OB=(e,t,r,n,i,a,o,s)=>{if(!(!e||!t||!n||!i||!a)){var l=n5(e.chartX,e.chartY,t,r,s);if(l){var c=a5(l,t),u=HN(c,o,a,n,i),f=i5(t,a,u,l);return{activeIndex:String(u),activeCoordinate:f}}}};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)}function Ib(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 gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ib(Object(r),!0).forEach(function(n){SB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ib(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SB(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=EB(e,"string");return typeof t=="symbol"?t:t+""}function EB(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 PB(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=K5;else if(c==="BarChart")h=q5(o,u,i,a),m=qO;else if(o==="radial"){var{cx:p,cy:g,radius:v,startAngle:x,endAngle:w}=YO(u);h={cx:p,cy:g,startAngle:x,endAngle:w,innerRadius:v,outerRadius:v},m=XO}else h={points:EI(o,u,i)},m=Vp;var y=typeof s=="object"&&"className"in s?s.className:void 0,_=gl(gl(gl(gl({stroke:"#ccc",pointerEvents:"none"},i),h),Ze(s,!1)),{},{payload:f,payloadIndex:d,className:ye("recharts-tooltip-cursor",y)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function CB(e){var t=gB(),r=RO(),n=xu(),i=vB();return E.createElement(PB,Hh({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var eA=k.createContext(null),kB=()=>k.useContext(eA),wd={exports:{}},Rb;function TB(){return Rb||(Rb=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,x,w;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(w=1,x=new Array(v-1);w<v;w++)x[w-1]=arguments[w];g.fn.apply(g.context,x)}else{var y=g.length,_;for(w=0;w<y;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),v){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,u);break;case 3:g[w].fn.call(g[w].context,u,f);break;case 4:g[w].fn.call(g[w].context,u,f,d);break;default:if(!x)for(_=1,x=new Array(v-1);_<v;_++)x[_-1]=arguments[_];g[w].fn.apply(g[w].context,x)}}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})(wd)),wd.exports}var MB=TB();const jB=En(MB);var Qo=new jB,Uh="recharts.syncEvent.tooltip",$b="recharts.syncEvent.brush";function Gm(e,t){if(t){var r=Number.parseInt(t,10);if(!sr(r))return e?.[r]}}var DB={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},tA=fr({name:"options",initialState:DB,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),NB=tA.reducer,{createEventEmitter:IB}=tA.actions;function RB(e){return e.tooltip.syncInteraction}var $B={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},rA=fr({name:"chartData",initialState:$B,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:Lb,setDataStartEndIndexes:LB,setComputedData:cG}=rA.actions,BB=rA.reducer,FB=["x","y"];function Bb(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 mi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(r),!0).forEach(function(n){zB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zB(e,t,r){return(t=WB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WB(e){var t=VB(e,"string");return typeof t=="symbol"?t:t+""}function VB(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 HB(e,t){if(e==null)return{};var r,n,i=UB(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 UB(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 nA=()=>{};function KB(){var e=re(vm),t=re(ym),r=ot(),n=re(Y2),i=re(jn),a=xu(),o=Wp(),s=re(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return nA;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=HB(h,FB),v=mi(mi(mi({},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))}),x=mi(mi({},u),{},{payload:mi(mi({},u.payload),{},{coordinate:v})});r(x)}else r(u);return}if(i!=null){var w;if(typeof n=="function"){var y={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},_=n(i,y);w=i[_]}else n==="value"&&(w=i.find(D=>String(D.value)===u.payload.label));var{coordinate:O}=u.payload;if(w==null||u.payload.active===!1||O==null||o==null){r(Wh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:A,y:P}=O,T=Math.min(A,o.x+o.width),I=Math.min(P,o.y+o.height),j={x:a==="horizontal"?w.coordinate:T,y:a==="horizontal"?I:w.coordinate},S=Wh({active:u.payload.active,coordinate:j,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});r(S)}}};return Qo.on(Uh,l),()=>{Qo.off(Uh,l)}},[s,r,t,e,n,i,a,o])}function qB(){var e=re(vm),t=re(ym),r=ot();k.useEffect(()=>{if(e==null)return nA;var n=(i,a,o)=>{t!==o&&e===i&&r(LB(a))};return Qo.on($b,n),()=>{Qo.off($b,n)}},[r,t,e])}function YB(){var e=ot();k.useEffect(()=>{e(IB())},[e]),KB(),qB()}function GB(e,t,r,n,i,a){var o=re(d=>bB(d,e,t)),s=re(ym),l=re(vm),c=re(Y2),u=re(RB),f=u?.active;k.useEffect(()=>{if(!f&&l!=null&&s!=null){var d=Wh({active:a,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n});Qo.emit(Uh,l,d,s)}},[f,r,o,i,n,s,l,c,a])}function Fb(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 zb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fb(Object(r),!0).forEach(function(n){XB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XB(e,t,r){return(t=ZB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZB(e){var t=JB(e,"string");return typeof t=="symbol"?t:t+""}function JB(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){return e.dataKey}function eF(e,t){return E.isValidElement(e)?E.cloneElement(e,t):typeof e=="function"?E.createElement(e,t):E.createElement(S5,t)}var Wb=[],tF={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!ei.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function ea(e){var t=kt(e,tF),{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:x,portal:w,axisId:y}=t,_=ot(),O=typeof x=="number"?String(x):x;k.useEffect(()=>{_(OL({shared:g,trigger:v,axisId:y,active:r,defaultIndex:O}))},[_,g,v,y,r,O]);var A=Wp(),P=WO(),T=yL(g),{activeIndex:I,isActive:j}=re(J=>_B(J,T,v,O)),S=re(J=>wB(J,T,v,O)),D=re(J=>QS(J,T,v,O)),M=re(J=>xB(J,T,v,O)),R=S,z=kB(),W=r??j,[Y,G]=wD([R,W]),L=T==="axis"?D:void 0;GB(T,v,M,L,I,W);var K=w??z;if(K==null)return null;var H=R??Wb;W||(H=Wb),s&&H.length&&(H=Vj(R.filter(J=>J.value!=null&&(J.hide!==!0||t.includeHidden)),u,QB));var ne=H.length>0,Q=E.createElement(M5,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:l,active:W,coordinate:M,hasPayload:ne,offset:c,position:f,reverseDirection:d,useTranslate3d:h,viewBox:A,wrapperStyle:m,lastBoundingBox:Y,innerRef:G,hasPortalFromProps:!!w},eF(o,zb(zb({},t),{},{payload:H,label:L,active:W,coordinate:M,accessibilityLayer:P})));return E.createElement(E.Fragment,null,kw.createPortal(Q,K),W&&E.createElement(CB,{cursor:p,tooltipEventType:T,coordinate:M,payload:R,index:I}))}var _d={},Od={},Sd={},Vb;function rF(){return Vb||(Vb=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(...x){if(i?.aborted)return;o=this,s=x;const w=d==null;h(),l&&w&&u()};return v.schedule=h,v.cancel=p,v.flush=g,i?.addEventListener("abort",p,{once:!0}),v}e.debounce=t})(Sd)),Sd}var Hb;function nF(){return Hb||(Hb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rF();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})(Od)),Od}var Ub;function iF(){return Ub||(Ub=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nF();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})(_d)),_d}var Ad,Kb;function aF(){return Kb||(Kb=1,Ad=iF().throttle),Ad}var oF=aF();const sF=En(oF);var lF=process.env.NODE_ENV!=="production",ko=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(lF&&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 qb(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 Ed(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qb(Object(r),!0).forEach(function(n){cF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cF(e,t,r){return(t=uF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uF(e){var t=fF(e,"string");return typeof t=="symbol"?t:t+""}function fF(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 ta=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,x]=k.useState({containerWidth:n.width,containerHeight:n.height}),w=k.useCallback((_,O)=>{x(A=>{var P=Math.round(_),T=Math.round(O);return A.containerWidth===P&&A.containerHeight===T?A:{containerWidth:P,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var I,{width:j,height:S}=T[0].contentRect;w(j,S),(I=g.current)===null||I===void 0||I.call(g,j,S)};u>0&&(_=sF(_,u,{trailing:!0,leading:!1}));var O=new ResizeObserver(_),{width:A,height:P}=p.current.getBoundingClientRect();return w(A,P),O.observe(p.current),()=>{O.disconnect()}},[w,u]);var y=k.useMemo(()=>{var{containerWidth:_,containerHeight:O}=v;if(_<0||O<0)return null;ko(Ei(i)||Ei(a),`The width(%s) and height(%s) are both fixed numbers,
|
|
177
|
+
A`).concat(a,",").concat(a,",0,0,").concat(+(u<0),",").concat(y.x,",").concat(y.y,"Z")}else x+="L".concat(t,",").concat(r,"Z");return x},AI={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},XO=e=>{var t=kt(e,AI),{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=ye("recharts-sector",f),h=a-i,m=It(o,h,0,!0),p;return m>0&&Math.abs(c-u)<360?p=SI({cx:r,cy:n,innerRadius:i,outerRadius:a,cornerRadius:Math.min(m,h/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):p=GO({cx:r,cy:n,innerRadius:i,outerRadius:a,startAngle:c,endAngle:u}),E.createElement("path",Th({},Ze(t,!0),{className:d,d:p}))};function EI(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=ut(s,l,c,f),h=ut(s,l,u,f);n=d.x,i=d.y,a=h.x,o=h.y}else return YO(t);return[{x:n,y:i},{x:a,y:o}]}var cd={},ud={},fd={},I0;function PI(){return I0||(I0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=J_();function r(n){return t.isSymbol(n)?NaN:Number(n)}e.toNumber=r})(fd)),fd}var R0;function CI(){return R0||(R0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=PI();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})(ud)),ud}var $0;function kI(){return $0||($0=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Q_(),r=CI();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})(cd)),cd}var dd,L0;function TI(){return L0||(L0=1,dd=kI().range),dd}var MI=TI();const ZO=En(MI);function Wn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function jI(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Hp(e){let t,r,n;e.length!==2?(t=Wn,r=(s,l)=>Wn(e(s),l),n=(s,l)=>e(s)-l):(t=e===Wn||e===jI?e:DI,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 DI(){return 0}function JO(e){return e===null?NaN:+e}function*NI(e,t){for(let r of e)r!=null&&(r=+r)>=r&&(yield r)}const II=Hp(Wn),As=II.right;Hp(JO).center;class B0 extends Map{constructor(t,r=LI){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(F0(this,t))}has(t){return super.has(F0(this,t))}set(t,r){return super.set(RI(this,t),r)}delete(t){return super.delete($I(this,t))}}function F0({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):r}function RI({_intern:e,_key:t},r){const n=t(r);return e.has(n)?e.get(n):(e.set(n,r),r)}function $I({_intern:e,_key:t},r){const n=t(r);return e.has(n)&&(r=e.get(n),e.delete(n)),r}function LI(e){return e!==null&&typeof e=="object"?e.valueOf():e}function BI(e=Wn){if(e===Wn)return QO;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 QO(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const FI=Math.sqrt(50),zI=Math.sqrt(10),WI=Math.sqrt(2);function dc(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>=FI?10:a>=zI?5:a>=WI?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?dc(e,t,r*2):[s,l,c]}function Mh(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?dc(t,e,r):dc(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 jh(e,t,r){return t=+t,e=+e,r=+r,dc(e,t,r)[2]}function Dh(e,t,r){t=+t,e=+e,r=+r;const n=t<e,i=n?jh(t,e,r):jh(e,t,r);return(n?-1:1)*(i<0?1/-i:i)}function z0(e,t){let r;for(const n of e)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);return r}function W0(e,t){let r;for(const n of e)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);return r}function e2(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?QO:BI(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));e2(e,t,h,m,i)}const a=e[t];let o=r,s=n;for(lo(e,r,t),i(e[n],a)>0&&lo(e,r,n);o<s;){for(lo(e,o,s),++o,--s;i(e[o],a)<0;)++o;for(;i(e[s],a)>0;)--s}i(e[r],a)===0?lo(e,r,s):(++s,lo(e,s,n)),s<=t&&(r=s+1),t<=s&&(n=s-1)}return e}function lo(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function VI(e,t,r){if(e=Float64Array.from(NI(e)),!(!(n=e.length)||isNaN(t=+t))){if(t<=0||n<2)return W0(e);if(t>=1)return z0(e);var n,i=(n-1)*t,a=Math.floor(i),o=z0(e2(e,a).subarray(0,a+1)),s=W0(e.subarray(a+1));return o+(s-o)*(i-a)}}function HI(e,t,r=JO){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 UI(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 Pr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function kn(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 Nh=Symbol("implicit");function Up(){var e=new B0,t=[],r=[],n=Nh;function i(a){let o=e.get(a);if(o===void 0){if(n!==Nh)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 B0;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 Up(t,r).unknown(n)},Pr.apply(i,arguments),i}function Kp(){var e=Up().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=UI(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 Kp(t(),[n,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Pr.apply(f(),arguments)}function t2(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return t2(t())},e}function KI(){return t2(Kp.apply(null,arguments).paddingInner(1))}function qp(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function r2(e,t){var r=Object.create(e.prototype);for(var n in t)r[n]=t[n];return r}function Es(){}var Yo=.7,hc=1/Yo,_a="\\s*([+-]?\\d+)\\s*",Go="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qI=/^#([0-9a-f]{3,8})$/,YI=new RegExp(`^rgb\\(${_a},${_a},${_a}\\)$`),GI=new RegExp(`^rgb\\(${Yr},${Yr},${Yr}\\)$`),XI=new RegExp(`^rgba\\(${_a},${_a},${_a},${Go}\\)$`),ZI=new RegExp(`^rgba\\(${Yr},${Yr},${Yr},${Go}\\)$`),JI=new RegExp(`^hsl\\(${Go},${Yr},${Yr}\\)$`),QI=new RegExp(`^hsla\\(${Go},${Yr},${Yr},${Go}\\)$`),V0={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};qp(Es,Xo,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:H0,formatHex:H0,formatHex8:eR,formatHsl:tR,formatRgb:U0,toString:U0});function H0(){return this.rgb().formatHex()}function eR(){return this.rgb().formatHex8()}function tR(){return n2(this).formatHsl()}function U0(){return this.rgb().formatRgb()}function Xo(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=qI.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?K0(t):r===3?new Ht(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?dl(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?dl(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=YI.exec(e))?new Ht(t[1],t[2],t[3],1):(t=GI.exec(e))?new Ht(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=XI.exec(e))?dl(t[1],t[2],t[3],t[4]):(t=ZI.exec(e))?dl(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=JI.exec(e))?G0(t[1],t[2]/100,t[3]/100,1):(t=QI.exec(e))?G0(t[1],t[2]/100,t[3]/100,t[4]):V0.hasOwnProperty(e)?K0(V0[e]):e==="transparent"?new Ht(NaN,NaN,NaN,0):null}function K0(e){return new Ht(e>>16&255,e>>8&255,e&255,1)}function dl(e,t,r,n){return n<=0&&(e=t=r=NaN),new Ht(e,t,r,n)}function rR(e){return e instanceof Es||(e=Xo(e)),e?(e=e.rgb(),new Ht(e.r,e.g,e.b,e.opacity)):new Ht}function Ih(e,t,r,n){return arguments.length===1?rR(e):new Ht(e,t,r,n??1)}function Ht(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}qp(Ht,Ih,r2(Es,{brighter(e){return e=e==null?hc:Math.pow(hc,e),new Ht(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new Ht(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ht(Ii(this.r),Ii(this.g),Ii(this.b),pc(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:q0,formatHex:q0,formatHex8:nR,formatRgb:Y0,toString:Y0}));function q0(){return`#${Pi(this.r)}${Pi(this.g)}${Pi(this.b)}`}function nR(){return`#${Pi(this.r)}${Pi(this.g)}${Pi(this.b)}${Pi((isNaN(this.opacity)?1:this.opacity)*255)}`}function Y0(){const e=pc(this.opacity);return`${e===1?"rgb(":"rgba("}${Ii(this.r)}, ${Ii(this.g)}, ${Ii(this.b)}${e===1?")":`, ${e})`}`}function pc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Ii(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Pi(e){return e=Ii(e),(e<16?"0":"")+e.toString(16)}function G0(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Tr(e,t,r,n)}function n2(e){if(e instanceof Tr)return new Tr(e.h,e.s,e.l,e.opacity);if(e instanceof Es||(e=Xo(e)),!e)return new Tr;if(e instanceof Tr)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 Tr(o,s,l,e.opacity)}function iR(e,t,r,n){return arguments.length===1?n2(e):new Tr(e,t,r,n??1)}function Tr(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}qp(Tr,iR,r2(Es,{brighter(e){return e=e==null?hc:Math.pow(hc,e),new Tr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Yo:Math.pow(Yo,e),new Tr(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 Ht(hd(e>=240?e-240:e+120,i,n),hd(e,i,n),hd(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new Tr(X0(this.h),hl(this.s),hl(this.l),pc(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=pc(this.opacity);return`${e===1?"hsl(":"hsla("}${X0(this.h)}, ${hl(this.s)*100}%, ${hl(this.l)*100}%${e===1?")":`, ${e})`}`}}));function X0(e){return e=(e||0)%360,e<0?e+360:e}function hl(e){return Math.max(0,Math.min(1,e||0))}function hd(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 Yp=e=>()=>e;function aR(e,t){return function(r){return e+r*t}}function oR(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 sR(e){return(e=+e)==1?i2:function(t,r){return r-t?oR(t,r,e):Yp(isNaN(t)?r:t)}}function i2(e,t){var r=t-e;return r?aR(e,r):Yp(isNaN(e)?t:e)}const Z0=(function e(t){var r=sR(t);function n(i,a){var o=r((i=Ih(i)).r,(a=Ih(a)).r),s=r(i.g,a.g),l=r(i.b,a.b),c=i2(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 lR(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 cR(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function uR(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]=Ha(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 fR(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}function mc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function dR(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]=Ha(e[i],t[i]):n[i]=t[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var Rh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,pd=new RegExp(Rh.source,"g");function hR(e){return function(){return e}}function pR(e){return function(t){return e(t)+""}}function mR(e,t){var r=Rh.lastIndex=pd.lastIndex=0,n,i,a,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=Rh.exec(e))&&(i=pd.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:mc(n,i)})),r=pd.lastIndex;return r<t.length&&(a=t.slice(r),s[o]?s[o]+=a:s[++o]=a),s.length<2?l[0]?pR(l[0].x):hR(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 Ha(e,t){var r=typeof t,n;return t==null||r==="boolean"?Yp(t):(r==="number"?mc:r==="string"?(n=Xo(t))?(t=n,Z0):mR:t instanceof Xo?Z0:t instanceof Date?fR:cR(t)?lR:Array.isArray(t)?uR:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?dR:mc)(e,t)}function Gp(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function gR(e,t){t===void 0&&(t=e,e=Ha);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 vR(e){return function(){return e}}function gc(e){return+e}var J0=[0,1];function Lt(e){return e}function $h(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:vR(isNaN(t)?NaN:.5)}function yR(e,t){var r;return e>t&&(r=e,e=t,t=r),function(n){return Math.max(e,Math.min(t,n))}}function bR(e,t,r){var n=e[0],i=e[1],a=t[0],o=t[1];return i<n?(n=$h(i,n),a=r(o,a)):(n=$h(n,i),a=r(a,o)),function(s){return a(n(s))}}function xR(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]=$h(e[o],e[o+1]),a[o]=r(t[o],t[o+1]);return function(s){var l=As(e,s,1,n)-1;return a[l](i[l](s))}}function Ps(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function wu(){var e=J0,t=J0,r=Ha,n,i,a,o=Lt,s,l,c;function u(){var d=Math.min(e.length,t.length);return o!==Lt&&(o=yR(e[0],e[d-1])),s=d>2?xR:bR,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),mc)))(d)))},f.domain=function(d){return arguments.length?(e=Array.from(d,gc),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=Gp,u()},f.clamp=function(d){return arguments.length?(o=d?!0:Lt,u()):o!==Lt},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 Xp(){return wu()(Lt,Lt)}function wR(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function vc(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 Ma(e){return e=vc(Math.abs(e)),e?e[1]:NaN}function _R(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 OR(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var SR=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Zo(e){if(!(t=SR.exec(e)))throw new Error("invalid format: "+e);var t;return new Zp({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]})}Zo.prototype=Zp.prototype;function Zp(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+""}Zp.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 AR(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 a2;function ER(e,t){var r=vc(e,t);if(!r)return e+"";var n=r[0],i=r[1],a=i-(a2=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")+vc(e,Math.max(0,t+a-1))[0]}function Q0(e,t){var r=vc(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 eb={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:wR,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)=>Q0(e*100,t),r:Q0,s:ER,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function tb(e){return e}var rb=Array.prototype.map,nb=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function PR(e){var t=e.grouping===void 0||e.thousands===void 0?tb:_R(rb.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?tb:OR(rb.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=Zo(f);var d=f.fill,h=f.align,m=f.sign,p=f.symbol,g=f.zero,v=f.width,x=f.comma,w=f.precision,y=f.trim,_=f.type;_==="n"?(x=!0,_="g"):eb[_]||(w===void 0&&(w=12),y=!0,_="g"),(g||d==="0"&&h==="=")&&(g=!0,d="0",h="=");var O=p==="$"?r:p==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",A=p==="$"?n:/[%p]/.test(_)?o:"",P=eb[_],T=/[defgprs%]/.test(_);w=w===void 0?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,w)):Math.max(0,Math.min(20,w));function I(j){var S=O,D=A,M,R,z;if(_==="c")D=P(j)+D,j="";else{j=+j;var W=j<0||1/j<0;if(j=isNaN(j)?l:P(Math.abs(j),w),y&&(j=AR(j)),W&&+j==0&&m!=="+"&&(W=!1),S=(W?m==="("?m:s:m==="-"||m==="("?"":m)+S,D=(_==="s"?nb[8+a2/3]:"")+D+(W&&m==="("?")":""),T){for(M=-1,R=j.length;++M<R;)if(z=j.charCodeAt(M),48>z||z>57){D=(z===46?i+j.slice(M+1):j.slice(M))+D,j=j.slice(0,M);break}}}x&&!g&&(j=t(j,1/0));var Y=S.length+j.length+D.length,G=Y<v?new Array(v-Y+1).join(d):"";switch(x&&g&&(j=t(G+j,G.length?v-D.length:1/0),G=""),h){case"<":j=S+j+D+G;break;case"=":j=S+G+j+D;break;case"^":j=G.slice(0,Y=G.length>>1)+S+j+D+G.slice(Y);break;default:j=G+S+j+D;break}return a(j)}return I.toString=function(){return f+""},I}function u(f,d){var h=c((f=Zo(f),f.type="f",f)),m=Math.max(-8,Math.min(8,Math.floor(Ma(d)/3)))*3,p=Math.pow(10,-m),g=nb[8+m/3];return function(v){return h(p*v)+g}}return{format:c,formatPrefix:u}}var pl,Jp,o2;CR({thousands:",",grouping:[3],currency:["$",""]});function CR(e){return pl=PR(e),Jp=pl.format,o2=pl.formatPrefix,pl}function kR(e){return Math.max(0,-Ma(Math.abs(e)))}function TR(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Ma(t)/3)))*3-Ma(Math.abs(e)))}function MR(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Ma(t)-Ma(e))+1}function s2(e,t,r,n){var i=Dh(e,t,r),a;switch(n=Zo(n??",f"),n.type){case"s":{var o=Math.max(Math.abs(e),Math.abs(t));return n.precision==null&&!isNaN(a=TR(i,o))&&(n.precision=a),o2(n,o)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=MR(i,Math.max(Math.abs(e),Math.abs(t))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=kR(i))&&(n.precision=a-(n.type==="%")*2);break}}return Jp(n)}function ti(e){var t=e.domain;return e.ticks=function(r){var n=t();return Mh(n[0],n[n.length-1],r??10)},e.tickFormat=function(r,n){var i=t();return s2(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=jh(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 l2(){var e=Xp();return e.copy=function(){return Ps(e,l2())},Pr.apply(e,arguments),ti(e)}function c2(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,gc),r):e.slice()},r.unknown=function(n){return arguments.length?(t=n,r):t},r.copy=function(){return c2(e).unknown(t)},e=arguments.length?Array.from(e,gc):[0,1],ti(r)}function u2(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 ib(e){return Math.log(e)}function ab(e){return Math.exp(e)}function jR(e){return-Math.log(-e)}function DR(e){return-Math.exp(-e)}function NR(e){return isFinite(e)?+("1e"+e):e<0?0:e}function IR(e){return e===10?NR:e===Math.E?Math.exp:t=>Math.pow(e,t)}function RR(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 ob(e){return(t,r)=>-e(-t,r)}function Qp(e){const t=e(ib,ab),r=t.domain;let n=10,i,a;function o(){return i=RR(n),a=IR(n),r()[0]<0?(i=ob(i),a=ob(a),e(jR,DR)):e(ib,ab),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=Mh(c,u,g))}else v=Mh(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=Zo(l)).precision==null&&(l.trim=!0),l=Jp(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(u2(r(),{floor:s=>a(Math.floor(i(s))),ceil:s=>a(Math.ceil(i(s)))})),t}function f2(){const e=Qp(wu()).domain([1,10]);return e.copy=()=>Ps(e,f2()).base(e.base()),Pr.apply(e,arguments),e}function sb(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function lb(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function em(e){var t=1,r=e(sb(t),lb(t));return r.constant=function(n){return arguments.length?e(sb(t=+n),lb(t)):t},ti(r)}function d2(){var e=em(wu());return e.copy=function(){return Ps(e,d2()).constant(e.constant())},Pr.apply(e,arguments)}function cb(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function $R(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function LR(e){return e<0?-e*e:e*e}function tm(e){var t=e(Lt,Lt),r=1;function n(){return r===1?e(Lt,Lt):r===.5?e($R,LR):e(cb(r),cb(1/r))}return t.exponent=function(i){return arguments.length?(r=+i,n()):r},ti(t)}function rm(){var e=tm(wu());return e.copy=function(){return Ps(e,rm()).exponent(e.exponent())},Pr.apply(e,arguments),e}function BR(){return rm.apply(null,arguments).exponent(.5)}function ub(e){return Math.sign(e)*e*e}function FR(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function h2(){var e=Xp(),t=[0,1],r=!1,n;function i(a){var o=FR(e(a));return isNaN(o)?n:r?Math.round(o):o}return i.invert=function(a){return e.invert(ub(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,gc)).map(ub)),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 h2(e.domain(),t).round(r).clamp(e.clamp()).unknown(n)},Pr.apply(i,arguments),ti(i)}function p2(){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]=HI(e,o/s);return a}function a(o){return o==null||isNaN(o=+o)?n:t[As(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(Wn),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 p2().domain(e).range(t).unknown(n)},Pr.apply(a,arguments)}function m2(){var e=0,t=1,r=1,n=[.5],i=[0,1],a;function o(l){return l!=null&&l<=l?i[As(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 m2().domain([e,t]).range(i).unknown(a)},Pr.apply(ti(o),arguments)}function g2(){var e=[.5],t=[0,1],r,n=1;function i(a){return a!=null&&a<=a?t[As(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 g2().domain(e).range(t).unknown(r)},Pr.apply(i,arguments)}const md=new Date,gd=new Date;function gt(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=>gt(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)=>(md.setTime(+a),gd.setTime(+o),e(md),e(gd),Math.floor(r(md,gd))),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 yc=gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);yc.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):yc);yc.range;const mn=1e3,br=mn*60,gn=br*60,_n=gn*24,nm=_n*7,fb=_n*30,vd=_n*365,Ci=gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*mn)},(e,t)=>(t-e)/mn,e=>e.getUTCSeconds());Ci.range;const im=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mn)},(e,t)=>{e.setTime(+e+t*br)},(e,t)=>(t-e)/br,e=>e.getMinutes());im.range;const am=gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*br)},(e,t)=>(t-e)/br,e=>e.getUTCMinutes());am.range;const om=gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*mn-e.getMinutes()*br)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getHours());om.range;const sm=gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*gn)},(e,t)=>(t-e)/gn,e=>e.getUTCHours());sm.range;const Cs=gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*br)/_n,e=>e.getDate()-1);Cs.range;const _u=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_n,e=>e.getUTCDate()-1);_u.range;const v2=gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/_n,e=>Math.floor(e/_n));v2.range;function Xi(e){return gt(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())*br)/nm)}const Ou=Xi(0),bc=Xi(1),zR=Xi(2),WR=Xi(3),ja=Xi(4),VR=Xi(5),HR=Xi(6);Ou.range;bc.range;zR.range;WR.range;ja.range;VR.range;HR.range;function Zi(e){return gt(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)/nm)}const Su=Zi(0),xc=Zi(1),UR=Zi(2),KR=Zi(3),Da=Zi(4),qR=Zi(5),YR=Zi(6);Su.range;xc.range;UR.range;KR.range;Da.range;qR.range;YR.range;const lm=gt(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());lm.range;const cm=gt(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());cm.range;const On=gt(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());On.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(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)});On.range;const Sn=gt(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());Sn.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:gt(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)});Sn.range;function y2(e,t,r,n,i,a){const o=[[Ci,1,mn],[Ci,5,5*mn],[Ci,15,15*mn],[Ci,30,30*mn],[a,1,br],[a,5,5*br],[a,15,15*br],[a,30,30*br],[i,1,gn],[i,3,3*gn],[i,6,6*gn],[i,12,12*gn],[n,1,_n],[n,2,2*_n],[r,1,nm],[t,1,fb],[t,3,3*fb],[e,1,vd]];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=Hp(([,,g])=>g).right(o,d);if(h===o.length)return e.every(Dh(c/vd,u/vd,f));if(h===0)return yc.every(Math.max(Dh(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[GR,XR]=y2(Sn,cm,Su,v2,sm,am),[ZR,JR]=y2(On,lm,Ou,Cs,om,im);function yd(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 bd(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 co(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function QR(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=uo(i),u=fo(i),f=uo(a),d=fo(a),h=uo(o),m=fo(o),p=uo(s),g=fo(s),v=uo(l),x=fo(l),w={a:W,A:Y,b:G,B:L,c:null,d:vb,e:vb,f:_$,g:j$,G:N$,H:b$,I:x$,j:w$,L:b2,m:O$,M:S$,p:K,q:H,Q:xb,s:wb,S:A$,u:E$,U:P$,V:C$,w:k$,W:T$,x:null,X:null,y:M$,Y:D$,Z:I$,"%":bb},y={a:ne,A:Q,b:J,B:te,c:null,d:yb,e:yb,f:B$,g:G$,G:Z$,H:R$,I:$$,j:L$,L:w2,m:F$,M:z$,p:oe,q:se,Q:xb,s:wb,S:W$,u:V$,U:H$,V:U$,w:K$,W:q$,x:null,X:null,y:Y$,Y:X$,Z:J$,"%":bb},_={a:I,A:j,b:S,B:D,c:M,d:mb,e:mb,f:m$,g:pb,G:hb,H:gb,I:gb,j:f$,L:p$,m:u$,M:d$,p:T,q:c$,Q:v$,s:y$,S:h$,u:i$,U:a$,V:o$,w:n$,W:s$,x:R,X:z,y:pb,Y:hb,Z:l$,"%":g$};w.x=O(r,w),w.X=O(n,w),w.c=O(t,w),y.x=O(r,y),y.X=O(n,y),y.c=O(t,y);function O(V,q){return function(ie){var N=[],ge=-1,fe=0,Be=V.length,Ve,Tt,Ir;for(ie instanceof Date||(ie=new Date(+ie));++ge<Be;)V.charCodeAt(ge)===37&&(N.push(V.slice(fe,ge)),(Tt=db[Ve=V.charAt(++ge)])!=null?Ve=V.charAt(++ge):Tt=Ve==="e"?" ":"0",(Ir=q[Ve])&&(Ve=Ir(ie,Tt)),N.push(Ve),fe=ge+1);return N.push(V.slice(fe,ge)),N.join("")}}function A(V,q){return function(ie){var N=co(1900,void 0,1),ge=P(N,V,ie+="",0),fe,Be;if(ge!=ie.length)return null;if("Q"in N)return new Date(N.Q);if("s"in N)return new Date(N.s*1e3+("L"in N?N.L:0));if(q&&!("Z"in N)&&(N.Z=0),"p"in N&&(N.H=N.H%12+N.p*12),N.m===void 0&&(N.m="q"in N?N.q:0),"V"in N){if(N.V<1||N.V>53)return null;"w"in N||(N.w=1),"Z"in N?(fe=bd(co(N.y,0,1)),Be=fe.getUTCDay(),fe=Be>4||Be===0?xc.ceil(fe):xc(fe),fe=_u.offset(fe,(N.V-1)*7),N.y=fe.getUTCFullYear(),N.m=fe.getUTCMonth(),N.d=fe.getUTCDate()+(N.w+6)%7):(fe=yd(co(N.y,0,1)),Be=fe.getDay(),fe=Be>4||Be===0?bc.ceil(fe):bc(fe),fe=Cs.offset(fe,(N.V-1)*7),N.y=fe.getFullYear(),N.m=fe.getMonth(),N.d=fe.getDate()+(N.w+6)%7)}else("W"in N||"U"in N)&&("w"in N||(N.w="u"in N?N.u%7:"W"in N?1:0),Be="Z"in N?bd(co(N.y,0,1)).getUTCDay():yd(co(N.y,0,1)).getDay(),N.m=0,N.d="W"in N?(N.w+6)%7+N.W*7-(Be+5)%7:N.w+N.U*7-(Be+6)%7);return"Z"in N?(N.H+=N.Z/100|0,N.M+=N.Z%100,bd(N)):yd(N)}}function P(V,q,ie,N){for(var ge=0,fe=q.length,Be=ie.length,Ve,Tt;ge<fe;){if(N>=Be)return-1;if(Ve=q.charCodeAt(ge++),Ve===37){if(Ve=q.charAt(ge++),Tt=_[Ve in db?q.charAt(ge++):Ve],!Tt||(N=Tt(V,ie,N))<0)return-1}else if(Ve!=ie.charCodeAt(N++))return-1}return N}function T(V,q,ie){var N=c.exec(q.slice(ie));return N?(V.p=u.get(N[0].toLowerCase()),ie+N[0].length):-1}function I(V,q,ie){var N=h.exec(q.slice(ie));return N?(V.w=m.get(N[0].toLowerCase()),ie+N[0].length):-1}function j(V,q,ie){var N=f.exec(q.slice(ie));return N?(V.w=d.get(N[0].toLowerCase()),ie+N[0].length):-1}function S(V,q,ie){var N=v.exec(q.slice(ie));return N?(V.m=x.get(N[0].toLowerCase()),ie+N[0].length):-1}function D(V,q,ie){var N=p.exec(q.slice(ie));return N?(V.m=g.get(N[0].toLowerCase()),ie+N[0].length):-1}function M(V,q,ie){return P(V,t,q,ie)}function R(V,q,ie){return P(V,r,q,ie)}function z(V,q,ie){return P(V,n,q,ie)}function W(V){return o[V.getDay()]}function Y(V){return a[V.getDay()]}function G(V){return l[V.getMonth()]}function L(V){return s[V.getMonth()]}function K(V){return i[+(V.getHours()>=12)]}function H(V){return 1+~~(V.getMonth()/3)}function ne(V){return o[V.getUTCDay()]}function Q(V){return a[V.getUTCDay()]}function J(V){return l[V.getUTCMonth()]}function te(V){return s[V.getUTCMonth()]}function oe(V){return i[+(V.getUTCHours()>=12)]}function se(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var q=O(V+="",w);return q.toString=function(){return V},q},parse:function(V){var q=A(V+="",!1);return q.toString=function(){return V},q},utcFormat:function(V){var q=O(V+="",y);return q.toString=function(){return V},q},utcParse:function(V){var q=A(V+="",!0);return q.toString=function(){return V},q}}}var db={"-":"",_:" ",0:"0"},Ot=/^\s*\d+/,e$=/^%/,t$=/[\\^$*+?|[\]().{}]/g;function xe(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 r$(e){return e.replace(t$,"\\$&")}function uo(e){return new RegExp("^(?:"+e.map(r$).join("|")+")","i")}function fo(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function n$(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.w=+n[0],r+n[0].length):-1}function i$(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.u=+n[0],r+n[0].length):-1}function a$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.U=+n[0],r+n[0].length):-1}function o$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.V=+n[0],r+n[0].length):-1}function s$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.W=+n[0],r+n[0].length):-1}function hb(e,t,r){var n=Ot.exec(t.slice(r,r+4));return n?(e.y=+n[0],r+n[0].length):-1}function pb(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function l$(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 c$(e,t,r){var n=Ot.exec(t.slice(r,r+1));return n?(e.q=n[0]*3-3,r+n[0].length):-1}function u$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function mb(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function f$(e,t,r){var n=Ot.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function gb(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function d$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function h$(e,t,r){var n=Ot.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function p$(e,t,r){var n=Ot.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function m$(e,t,r){var n=Ot.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function g$(e,t,r){var n=e$.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function v$(e,t,r){var n=Ot.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function y$(e,t,r){var n=Ot.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function vb(e,t){return xe(e.getDate(),t,2)}function b$(e,t){return xe(e.getHours(),t,2)}function x$(e,t){return xe(e.getHours()%12||12,t,2)}function w$(e,t){return xe(1+Cs.count(On(e),e),t,3)}function b2(e,t){return xe(e.getMilliseconds(),t,3)}function _$(e,t){return b2(e,t)+"000"}function O$(e,t){return xe(e.getMonth()+1,t,2)}function S$(e,t){return xe(e.getMinutes(),t,2)}function A$(e,t){return xe(e.getSeconds(),t,2)}function E$(e){var t=e.getDay();return t===0?7:t}function P$(e,t){return xe(Ou.count(On(e)-1,e),t,2)}function x2(e){var t=e.getDay();return t>=4||t===0?ja(e):ja.ceil(e)}function C$(e,t){return e=x2(e),xe(ja.count(On(e),e)+(On(e).getDay()===4),t,2)}function k$(e){return e.getDay()}function T$(e,t){return xe(bc.count(On(e)-1,e),t,2)}function M$(e,t){return xe(e.getFullYear()%100,t,2)}function j$(e,t){return e=x2(e),xe(e.getFullYear()%100,t,2)}function D$(e,t){return xe(e.getFullYear()%1e4,t,4)}function N$(e,t){var r=e.getDay();return e=r>=4||r===0?ja(e):ja.ceil(e),xe(e.getFullYear()%1e4,t,4)}function I$(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+xe(t/60|0,"0",2)+xe(t%60,"0",2)}function yb(e,t){return xe(e.getUTCDate(),t,2)}function R$(e,t){return xe(e.getUTCHours(),t,2)}function $$(e,t){return xe(e.getUTCHours()%12||12,t,2)}function L$(e,t){return xe(1+_u.count(Sn(e),e),t,3)}function w2(e,t){return xe(e.getUTCMilliseconds(),t,3)}function B$(e,t){return w2(e,t)+"000"}function F$(e,t){return xe(e.getUTCMonth()+1,t,2)}function z$(e,t){return xe(e.getUTCMinutes(),t,2)}function W$(e,t){return xe(e.getUTCSeconds(),t,2)}function V$(e){var t=e.getUTCDay();return t===0?7:t}function H$(e,t){return xe(Su.count(Sn(e)-1,e),t,2)}function _2(e){var t=e.getUTCDay();return t>=4||t===0?Da(e):Da.ceil(e)}function U$(e,t){return e=_2(e),xe(Da.count(Sn(e),e)+(Sn(e).getUTCDay()===4),t,2)}function K$(e){return e.getUTCDay()}function q$(e,t){return xe(xc.count(Sn(e)-1,e),t,2)}function Y$(e,t){return xe(e.getUTCFullYear()%100,t,2)}function G$(e,t){return e=_2(e),xe(e.getUTCFullYear()%100,t,2)}function X$(e,t){return xe(e.getUTCFullYear()%1e4,t,4)}function Z$(e,t){var r=e.getUTCDay();return e=r>=4||r===0?Da(e):Da.ceil(e),xe(e.getUTCFullYear()%1e4,t,4)}function J$(){return"+0000"}function bb(){return"%"}function xb(e){return+e}function wb(e){return Math.floor(+e/1e3)}var da,O2,S2;Q$({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 Q$(e){return da=QR(e),O2=da.format,da.parse,S2=da.utcFormat,da.utcParse,da}function e4(e){return new Date(e)}function t4(e){return e instanceof Date?+e:+new Date(+e)}function um(e,t,r,n,i,a,o,s,l,c){var u=Xp(),f=u.invert,d=u.domain,h=c(".%L"),m=c(":%S"),p=c("%I:%M"),g=c("%I %p"),v=c("%a %d"),x=c("%b %d"),w=c("%B"),y=c("%Y");function _(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:x:r(O)<O?w:y)(O)}return u.invert=function(O){return new Date(f(O))},u.domain=function(O){return arguments.length?d(Array.from(O,t4)):d().map(e4)},u.ticks=function(O){var A=d();return e(A[0],A[A.length-1],O??10)},u.tickFormat=function(O,A){return A==null?_:c(A)},u.nice=function(O){var A=d();return(!O||typeof O.range!="function")&&(O=t(A[0],A[A.length-1],O??10)),O?d(u2(A,O)):u},u.copy=function(){return Ps(u,um(e,t,r,n,i,a,o,s,l,c))},u}function r4(){return Pr.apply(um(ZR,JR,On,lm,Ou,Cs,om,im,Ci,O2).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function n4(){return Pr.apply(um(GR,XR,Sn,cm,Su,_u,sm,am,Ci,S2).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function Au(){var e=0,t=1,r,n,i,a,o=Lt,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(Ha),c.rangeRound=u(Gp),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 ri(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function A2(){var e=ti(Au()(Lt));return e.copy=function(){return ri(e,A2())},kn.apply(e,arguments)}function E2(){var e=Qp(Au()).domain([1,10]);return e.copy=function(){return ri(e,E2()).base(e.base())},kn.apply(e,arguments)}function P2(){var e=em(Au());return e.copy=function(){return ri(e,P2()).constant(e.constant())},kn.apply(e,arguments)}function fm(){var e=tm(Au());return e.copy=function(){return ri(e,fm()).exponent(e.exponent())},kn.apply(e,arguments)}function i4(){return fm.apply(null,arguments).exponent(.5)}function C2(){var e=[],t=Lt;function r(n){if(n!=null&&!isNaN(n=+n))return t((As(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(Wn),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)=>VI(e,a/n))},r.copy=function(){return C2(t).domain(e)},kn.apply(r,arguments)}function Eu(){var e=0,t=.5,r=1,n=1,i,a,o,s,l,c=Lt,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,x,w;return arguments.length?([v,x,w]=g,c=gR(p,[v,x,w]),h):[c(0),c(.5),c(1)]}}return h.range=m(Ha),h.rangeRound=m(Gp),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 k2(){var e=ti(Eu()(Lt));return e.copy=function(){return ri(e,k2())},kn.apply(e,arguments)}function T2(){var e=Qp(Eu()).domain([.1,1,10]);return e.copy=function(){return ri(e,T2()).base(e.base())},kn.apply(e,arguments)}function M2(){var e=em(Eu());return e.copy=function(){return ri(e,M2()).constant(e.constant())},kn.apply(e,arguments)}function dm(){var e=tm(Eu());return e.copy=function(){return ri(e,dm()).exponent(e.exponent())},kn.apply(e,arguments)}function a4(){return dm.apply(null,arguments).exponent(.5)}const So=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Kp,scaleDiverging:k2,scaleDivergingLog:T2,scaleDivergingPow:dm,scaleDivergingSqrt:a4,scaleDivergingSymlog:M2,scaleIdentity:c2,scaleImplicit:Nh,scaleLinear:l2,scaleLog:f2,scaleOrdinal:Up,scalePoint:KI,scalePow:rm,scaleQuantile:p2,scaleQuantize:m2,scaleRadial:h2,scaleSequential:A2,scaleSequentialLog:E2,scaleSequentialPow:fm,scaleSequentialQuantile:C2,scaleSequentialSqrt:i4,scaleSequentialSymlog:P2,scaleSqrt:BR,scaleSymlog:d2,scaleThreshold:g2,scaleTime:r4,scaleUtc:n4,tickFormat:s2},Symbol.toStringTag,{value:"Module"}));var ni=e=>e.chartData,hm=$([ni],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Pu=(e,t,r,n)=>n?hm(e):ni(e);function Na(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(cr(t)&&cr(r))return!0}return!1}function _b(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function o4(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,n]=e,i,a;if(cr(r))i=r;else if(typeof r=="function")return;if(cr(n))a=n;else if(typeof n=="function")return;var o=[i,a];if(Na(o))return o}}function s4(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var n=e(t,r);if(Na(n))return _b(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(ae(i))o=i;else if(typeof i=="function")try{t!=null&&(o=i(t?.[0]))}catch{}else if(typeof i=="string"&&p0.test(i)){var l=p0.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(ae(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&m0.test(a)){var u=m0.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(Na(d))return t==null?d:_b(d,t,r)}}}var Ua=1e9,l4={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},mm,Ye=!0,_r="[DecimalError] ",Ri=_r+"Invalid argument: ",pm=_r+"Exponent out of range: ",Ka=Math.floor,wi=Math.pow,c4=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,nr,bt=1e7,Ue=7,j2=9007199254740991,wc=Ka(j2/Ue),Z={};Z.absoluteValue=Z.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};Z.comparedTo=Z.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};Z.decimalPlaces=Z.dp=function(){var e=this,t=e.d.length-1,r=(t-e.e)*Ue;if(t=e.d[t],t)for(;t%10==0;t/=10)r--;return r<0?0:r};Z.dividedBy=Z.div=function(e){return bn(this,new this.constructor(e))};Z.dividedToIntegerBy=Z.idiv=function(e){var t=this,r=t.constructor;return $e(bn(t,new r(e),0,1),r.precision)};Z.equals=Z.eq=function(e){return!this.cmp(e)};Z.exponent=function(){return ft(this)};Z.greaterThan=Z.gt=function(e){return this.cmp(e)>0};Z.greaterThanOrEqualTo=Z.gte=function(e){return this.cmp(e)>=0};Z.isInteger=Z.isint=function(){return this.e>this.d.length-2};Z.isNegative=Z.isneg=function(){return this.s<0};Z.isPositive=Z.ispos=function(){return this.s>0};Z.isZero=function(){return this.s===0};Z.lessThan=Z.lt=function(e){return this.cmp(e)<0};Z.lessThanOrEqualTo=Z.lte=function(e){return this.cmp(e)<1};Z.logarithm=Z.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(nr))throw Error(_r+"NaN");if(r.s<1)throw Error(_r+(r.s?"NaN":"-Infinity"));return r.eq(nr)?new n(0):(Ye=!1,t=bn(Jo(r,a),Jo(e,a),a),Ye=!0,$e(t,i))};Z.minus=Z.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?I2(t,e):D2(t,(e.s=-e.s,e))};Z.modulo=Z.mod=function(e){var t,r=this,n=r.constructor,i=n.precision;if(e=new n(e),!e.s)throw Error(_r+"NaN");return r.s?(Ye=!1,t=bn(r,e,0,1).times(e),Ye=!0,r.minus(t)):$e(new n(r),i)};Z.naturalExponential=Z.exp=function(){return N2(this)};Z.naturalLogarithm=Z.ln=function(){return Jo(this)};Z.negated=Z.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};Z.plus=Z.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?D2(t,e):I2(t,(e.s=-e.s,e))};Z.precision=Z.sd=function(e){var t,r,n,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Ri+e);if(t=ft(i)+1,n=i.d.length-1,r=n*Ue+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};Z.squareRoot=Z.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(_r+"NaN")}for(e=ft(s),Ye=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=Kr(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=Ka((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(bn(s,a,o+2)).times(.5),Kr(a.d).slice(0,o)===(t=Kr(n.d)).slice(0,o)){if(t=t.slice(o-3,o+1),i==o&&t=="4999"){if($e(a,r+1,0),a.times(a).eq(s)){n=a;break}}else if(t!="9999")break;o+=4}return Ye=!0,$e(n,r)};Z.times=Z.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%bt|0,t=s/bt|0;a[i]=(a[i]+t)%bt|0}for(;!a[--o];)a.pop();return t?++r:a.shift(),e.d=a,e.e=r,Ye?$e(e,f.precision):e};Z.toDecimalPlaces=Z.todp=function(e,t){var r=this,n=r.constructor;return r=new n(r),e===void 0?r:(Jr(e,0,Ua),t===void 0?t=n.rounding:Jr(t,0,8),$e(r,e+ft(r)+1,t))};Z.toExponential=function(e,t){var r,n=this,i=n.constructor;return e===void 0?r=Vi(n,!0):(Jr(e,0,Ua),t===void 0?t=i.rounding:Jr(t,0,8),n=$e(new i(n),e+1,t),r=Vi(n,!0,e+1)),r};Z.toFixed=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?Vi(i):(Jr(e,0,Ua),t===void 0?t=a.rounding:Jr(t,0,8),n=$e(new a(i),e+ft(i)+1,t),r=Vi(n.abs(),!1,e+ft(n)+1),i.isneg()&&!i.isZero()?"-"+r:r)};Z.toInteger=Z.toint=function(){var e=this,t=e.constructor;return $e(new t(e),ft(e)+1,t.rounding)};Z.toNumber=function(){return+this};Z.toPower=Z.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(nr);if(s=new l(s),!s.s){if(e.s<1)throw Error(_r+"Infinity");return s}if(s.eq(nr))return s;if(n=l.precision,e.eq(nr))return $e(s,n);if(t=e.e,r=e.d.length-1,o=t>=r,a=s.s,o){if((r=u<0?-u:u)<=j2){for(i=new l(nr),t=Math.ceil(n/Ue+4),Ye=!1;r%2&&(i=i.times(s),Sb(i.d,t)),r=Ka(r/2),r!==0;)s=s.times(s),Sb(s.d,t);return Ye=!0,e.s<0?new l(nr).div(i):$e(i,n)}}else if(a<0)throw Error(_r+"NaN");return a=a<0&&e.d[Math.max(t,r)]&1?-1:1,s.s=1,Ye=!1,i=e.times(Jo(s,n+c)),Ye=!0,i=N2(i),i.s=a,i};Z.toPrecision=function(e,t){var r,n,i=this,a=i.constructor;return e===void 0?(r=ft(i),n=Vi(i,r<=a.toExpNeg||r>=a.toExpPos)):(Jr(e,1,Ua),t===void 0?t=a.rounding:Jr(t,0,8),i=$e(new a(i),e,t),r=ft(i),n=Vi(i,e<=r||r<=a.toExpNeg,e)),n};Z.toSignificantDigits=Z.tosd=function(e,t){var r=this,n=r.constructor;return e===void 0?(e=n.precision,t=n.rounding):(Jr(e,1,Ua),t===void 0?t=n.rounding:Jr(t,0,8)),$e(new n(r),e,t)};Z.toString=Z.valueOf=Z.val=Z.toJSON=Z[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=ft(e),r=e.constructor;return Vi(e,t<=r.toExpNeg||t>=r.toExpPos)};function D2(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)),Ye?$e(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/Ue),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)/bt|0,l[a]%=bt;for(r&&(l.unshift(r),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,Ye?$e(t,f):t}function Jr(e,t,r){if(e!==~~e||e<t||e>r)throw Error(Ri+e)}function Kr(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=Ue-n.length,r&&(a+=In(r)),a+=n;o=e[t],n=o+"",r=Ue-n.length,r&&(a+=In(r))}else if(o===0)return"0";for(;o%10===0;)o/=10;return a+o}var bn=(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%bt|0,o=a/bt|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*bt+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,x,w,y,_,O,A,P,T=n.constructor,I=n.s==i.s?1:-1,j=n.d,S=i.d;if(!n.s)return new T(n);if(!i.s)throw Error(_r+"Division by zero");for(l=n.e-i.e,A=S.length,_=j.length,h=new T(I),m=h.d=[],c=0;S[c]==(j[c]||0);)++c;if(S[c]>(j[c]||0)&&--l,a==null?x=a=T.precision:o?x=a+(ft(n)-ft(i))+1:x=a,x<0)return new T(0);if(x=x/Ue+2|0,c=0,A==1)for(u=0,S=S[0],x++;(c<_||u)&&x--;c++)w=u*bt+(j[c]||0),m[c]=w/S|0,u=w%S|0;else{for(u=bt/(S[0]+1)|0,u>1&&(S=e(S,u),j=e(j,u),A=S.length,_=j.length),y=A,p=j.slice(0,A),g=p.length;g<A;)p[g++]=0;P=S.slice(),P.unshift(0),O=S[0],S[1]>=bt/2&&++O;do u=0,s=t(S,p,A,g),s<0?(v=p[0],A!=g&&(v=v*bt+(p[1]||0)),u=v/O|0,u>1?(u>=bt&&(u=bt-1),f=e(S,u),d=f.length,g=p.length,s=t(f,p,d,g),s==1&&(u--,r(f,A<d?P:S,d))):(u==0&&(s=u=1),f=S.slice()),d=f.length,d<g&&f.unshift(0),r(p,f,g),s==-1&&(g=p.length,s=t(S,p,A,g),s<1&&(u++,r(p,A<g?P:S,g))),g=p.length):s===0&&(u++,p=[0]),m[c++]=u,s&&p[0]?p[g++]=j[y]||0:(p=[j[y]],g=1);while((y++<_||p[0]!==void 0)&&x--)}return m[0]||m.shift(),h.e=l,$e(h,o?a+ft(h)+1:a)}})();function N2(e,t){var r,n,i,a,o,s,l=0,c=0,u=e.constructor,f=u.precision;if(ft(e)>16)throw Error(pm+ft(e));if(!e.s)return new u(nr);for(Ye=!1,s=f,o=new u(.03125);e.abs().gte(.1);)e=e.times(o),c+=5;for(n=Math.log(wi(2,c))/Math.LN10*2+5|0,s+=n,r=i=a=new u(nr),u.precision=s;;){if(i=$e(i.times(e),s),r=r.times(++l),o=a.plus(bn(i,r,s)),Kr(o.d).slice(0,s)===Kr(a.d).slice(0,s)){for(;c--;)a=$e(a.times(a),s);return u.precision=f,t==null?(Ye=!0,$e(a,f)):a}a=o}}function ft(e){for(var t=e.e*Ue,r=e.d[0];r>=10;r/=10)t++;return t}function xd(e,t,r){if(t>e.LN10.sd())throw Ye=!0,r&&(e.precision=r),Error(_r+"LN10 precision limit exceeded");return $e(new e(e.LN10),t)}function In(e){for(var t="";e--;)t+="0";return t}function Jo(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(_r+(h.s?"NaN":"-Infinity"));if(h.eq(nr))return new p(0);if(t==null?(Ye=!1,c=g):c=t,h.eq(10))return t==null&&(Ye=!0),xd(p,c);if(c+=d,p.precision=c,r=Kr(m),n=r.charAt(0),a=ft(h),Math.abs(a)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)h=h.times(e),r=Kr(h.d),n=r.charAt(0),f++;a=ft(h),n>1?(h=new p("0."+r),a++):h=new p(n+"."+r.slice(1))}else return l=xd(p,c+2,g).times(a+""),h=Jo(new p(n+"."+r.slice(1)),c-d).plus(l),p.precision=g,t==null?(Ye=!0,$e(h,g)):h;for(s=o=h=bn(h.minus(nr),h.plus(nr),c),u=$e(h.times(h),c),i=3;;){if(o=$e(o.times(u),c),l=s.plus(bn(o,new p(i),c)),Kr(l.d).slice(0,c)===Kr(s.d).slice(0,c))return s=s.times(2),a!==0&&(s=s.plus(xd(p,c+2,g).times(a+""))),s=bn(s,new p(f),c),p.precision=g,t==null?(Ye=!0,$e(s,g)):s;s=l,i+=2}}function Ob(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=Ka(r/Ue),e.d=[],n=(r+1)%Ue,r<0&&(n+=Ue),n<i){for(n&&e.d.push(+t.slice(0,n)),i-=Ue;n<i;)e.d.push(+t.slice(n,n+=Ue));t=t.slice(n),n=Ue-t.length}else n-=i;for(;n--;)t+="0";if(e.d.push(+t),Ye&&(e.e>wc||e.e<-wc))throw Error(pm+r)}else e.s=0,e.e=0,e.d=[0];return e}function $e(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+=Ue,i=t,c=f[u=0];else{if(u=Math.ceil((n+1)/Ue),a=f.length,u>=a)return e;for(c=a=f[u],o=1;a>=10;a/=10)o++;n%=Ue,i=n-Ue+o}if(r!==void 0&&(a=wi(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/wi(10,o-i):0:f[u-1])%10&1||r==(e.s<0?8:7))),t<1||!f[0])return l?(a=ft(e),f.length=1,t=t-a-1,f[0]=wi(10,(Ue-t%Ue)%Ue),e.e=Ka(-t/Ue)||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=wi(10,Ue-n),f[u]=i>0?(c/wi(10,o-i)%wi(10,i)|0)*a:0),l)for(;;)if(u==0){(f[0]+=a)==bt&&(f[0]=1,++e.e);break}else{if(f[u]+=a,f[u]!=bt)break;f[u--]=0,a=1}for(n=f.length;f[--n]===0;)f.pop();if(Ye&&(e.e>wc||e.e<-wc))throw Error(pm+ft(e));return e}function I2(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),Ye?$e(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/Ue),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]=bt-1;--l[a],l[i]+=bt}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,Ye?$e(t,h):t):new d(0)}function Vi(e,t,r){var n,i=ft(e),a=Kr(e.d),o=a.length;return t?(r&&(n=r-o)>0?a=a.charAt(0)+"."+a.slice(1)+In(n):o>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(i<0?"e":"e+")+i):i<0?(a="0."+In(-i-1)+a,r&&(n=r-o)>0&&(a+=In(n))):i>=o?(a+=In(i+1-o),r&&(n=r-i-1)>0&&(a=a+"."+In(n))):((n=i+1)<o&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-o)>0&&(i+1===o&&(a+="."),a+=In(n))),e.s<0?"-"+a:a}function Sb(e,t){if(e.length>t)return e.length=t,!0}function R2(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(Ri+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 Ob(o,a.toString())}else if(typeof a!="string")throw Error(Ri+a);if(a.charCodeAt(0)===45?(a=a.slice(1),o.s=-1):o.s=1,c4.test(a))Ob(o,a);else throw Error(Ri+a)}if(i.prototype=Z,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=R2,i.config=i.set=u4,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 u4(e){if(!e||typeof e!="object")throw Error(_r+"Object expected");var t,r,n,i=["precision",1,Ua,"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(Ka(n)===n&&n>=i[t+1]&&n<=i[t+2])this[r]=n;else throw Error(Ri+r+": "+n);if((n=e[r="LN10"])!==void 0)if(n==Math.LN10)this[r]=new this(n);else throw Error(Ri+r+": "+n);return this}var mm=R2(l4);nr=new mm(1);const je=mm;var f4=e=>e,$2={},L2=e=>e===$2,Ab=e=>function t(){return arguments.length===0||arguments.length===1&&L2(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},B2=(e,t)=>e===1?t:Ab(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!==$2).length;return a>=e?t(...n):B2(e-a,Ab(function(){for(var o=arguments.length,s=new Array(o),l=0;l<o;l++)s[l]=arguments[l];var c=n.map(u=>L2(u)?s.shift():u);return t(...c,...s)}))}),Cu=e=>B2(e.length,e),Lh=(e,t)=>{for(var r=[],n=e;n<t;++n)r[n-e]=n;return r},d4=Cu((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(r=>t[r]).map(e)),h4=function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];if(!r.length)return f4;var i=r.reverse(),a=i[0],o=i.slice(1);return function(){return o.reduce((s,l)=>l(s),a(...arguments))}},Bh=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),F2=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 z2(e){var t;return e===0?t=1:t=Math.floor(new je(e).abs().log(10).toNumber())+1,t}function W2(e,t,r){for(var n=new je(e),i=0,a=[];n.lt(t)&&i<1e5;)a.push(n.toNumber()),n=n.add(r),i++;return a}Cu((e,t,r)=>{var n=+e,i=+t;return n+r*(i-n)});Cu((e,t,r)=>{var n=t-+e;return n=n||1/0,(r-e)/n});Cu((e,t,r)=>{var n=t-+e;return n=n||1/0,Math.max(0,Math.min(1,(r-e)/n))});var V2=e=>{var[t,r]=e,[n,i]=[t,r];return t>r&&([n,i]=[r,t]),[n,i]},H2=(e,t,r)=>{if(e.lte(0))return new je(0);var n=z2(e.toNumber()),i=new je(10).pow(n),a=e.div(i),o=n!==1?.05:.1,s=new je(Math.ceil(a.div(o).toNumber())).add(r).mul(o),l=s.mul(i);return t?new je(l.toNumber()):new je(Math.ceil(l.toNumber()))},p4=(e,t,r)=>{var n=new je(1),i=new je(e);if(!i.isint()&&r){var a=Math.abs(e);a<1?(n=new je(10).pow(z2(e)-1),i=new je(Math.floor(i.div(n).toNumber())).mul(n)):a>1&&(i=new je(Math.floor(e)))}else e===0?i=new je(Math.floor((t-1)/2)):r||(i=new je(Math.floor(e)));var o=Math.floor((t-1)/2),s=h4(d4(l=>i.add(new je(l-o).mul(n)).toNumber()),Lh);return s(0,t)},U2=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 je(0),tickMin:new je(0),tickMax:new je(0)};var o=H2(new je(r).sub(t).div(n-1),i,a),s;t<=0&&r>=0?s=new je(0):(s=new je(t).add(r).div(2),s=s.sub(new je(s).mod(o)));var l=Math.ceil(s.sub(t).div(o).toNumber()),c=Math.ceil(new je(r).sub(s).div(o).toNumber()),u=l+c+1;return u>n?U2(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 je(l).mul(o)),tickMax:s.add(new je(c).mul(o))})};function m4(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]=V2([t,r]);if(o===-1/0||s===1/0){var l=s===1/0?[o,...Lh(0,n-1).map(()=>1/0)]:[...Lh(0,n-1).map(()=>-1/0),s];return t>r?Bh(l):l}if(o===s)return p4(o,n,i);var{step:c,tickMin:u,tickMax:f}=U2(o,s,a,i,0),d=W2(u,f.add(new je(.1).mul(c)),c);return t>r?Bh(d):d}function g4(e,t){var[r,n]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[a,o]=V2([r,n]);if(a===-1/0||o===1/0)return[r,n];if(a===o)return[a];var s=Math.max(t,2),l=H2(new je(o).sub(a).div(s-1),i,0),c=[...W2(new je(a),new je(o),l),o];return i===!1&&(c=c.map(u=>Math.round(u))),r>n?Bh(c):c}var v4=F2(m4),y4=F2(g4),K2=e=>e.rootProps.maxBarSize,b4=e=>e.rootProps.barGap,q2=e=>e.rootProps.barCategoryGap,x4=e=>e.rootProps.barSize,ks=e=>e.rootProps.stackOffset,gm=e=>e.options.chartName,vm=e=>e.rootProps.syncId,Y2=e=>e.rootProps.syncMethod,ym=e=>e.options.eventEmitter,hn={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},er={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},ku=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},w4={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:hn.reversed,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:hn.type,unit:void 0},_4={allowDataOverflow:er.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:er.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:er.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:er.scale,tick:er.tick,tickCount:er.tickCount,ticks:void 0,type:er.type,unit:void 0},O4={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:hn.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:hn.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:hn.scale,tick:hn.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},S4={allowDataOverflow:er.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:er.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:er.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:er.scale,tick:er.tick,tickCount:er.tickCount,ticks:void 0,type:"category",unit:void 0},bm=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?O4:w4,xm=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?S4:_4,Tu=e=>e.polarOptions,wm=$([Pn,Cn,mt],kO),G2=$([Tu,wm],(e,t)=>{if(e!=null)return It(e.innerRadius,t,0)}),X2=$([Tu,wm],(e,t)=>{if(e!=null)return It(e.outerRadius,t,t*.8)}),A4=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},Z2=$([Tu],A4);$([bm,Z2],ku);var J2=$([wm,G2,X2],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]});$([xm,J2],ku);var Q2=$([me,Tu,G2,X2,Pn,Cn],(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:It(o,i,i/2),cy:It(s,a,a/2),innerRadius:r,outerRadius:n,startAngle:l,endAngle:c,clockWise:!1}}}),Xe=(e,t)=>t,Ts=(e,t,r)=>r;function _m(e){return e?.id}var vt=e=>{var t=me(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},qa=e=>e.tooltip.settings.axisId,St=e=>{var t=vt(e),r=qa(e);return Ms(e,t,r)},eS=$([St],e=>e?.dataKey);function tS(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=_m(s);c.forEach((f,d)=>{var h=a==null||i?d:String(ze(f,a,null)),m=ze(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 Mu(e){return e.stackId!=null&&e.dataKey!=null}function Eb(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 _c(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Eb(Object(r),!0).forEach(function(n){E4(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Eb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function E4(e,t,r){return(t=P4(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P4(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)}var Fh=[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},rS=(e,t)=>e.cartesianAxis.xAxis[t],Tn=(e,t)=>{var r=rS(e,t);return r??Zt},Jt={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:Fh,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:_s},nS=(e,t)=>e.cartesianAxis.yAxis[t],Mn=(e,t)=>{var r=nS(e,t);return r??Jt},k4={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:""},Om=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??k4},st=(e,t,r)=>{switch(t){case"xAxis":return Tn(e,r);case"yAxis":return Mn(e,r);case"zAxis":return Om(e,r);case"angleAxis":return bm(e,r);case"radiusAxis":return xm(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},T4=(e,t,r)=>{switch(t){case"xAxis":return Tn(e,r);case"yAxis":return Mn(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},Ms=(e,t,r)=>{switch(t){case"xAxis":return Tn(e,r);case"yAxis":return Mn(e,r);case"angleAxis":return bm(e,r);case"radiusAxis":return xm(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},iS=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Sm(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 ju=e=>e.graphicalItems.cartesianItems,M4=$([Xe,Ts],Sm),Am=(e,t,r)=>e.filter(r).filter(n=>t?.includeHidden===!0?!0:!n.hide),js=$([ju,st,M4],Am),aS=$([js],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Mu)),oS=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),sS=$([js],oS),Em=e=>e.map(t=>t.data).filter(Boolean).flat(1),j4=$([js],Em),Pm=(e,t)=>{var{chartData:r=[],dataStartIndex:n,dataEndIndex:i}=t;return e.length>0?e:r.slice(n,i+1)},Cm=$([j4,Pu],Pm),km=(e,t,r)=>t?.dataKey!=null?e.map(n=>({value:ze(n,t.dataKey)})):r.length>0?r.map(n=>n.dataKey).flatMap(n=>e.map(i=>({value:ze(i,n)}))):e.map(n=>({value:n})),Du=$([Cm,st,js],km);function lS(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function Ji(e){return e.filter(t=>Zr(t)||t instanceof Date).map(Number).filter(t=>sr(t)===!1)}function D4(e,t,r){return!r||typeof t!="number"||sr(t)?[]:r.length?Ji(r.flatMap(n=>{var i=ze(e,n.dataKey),a,o;if(Array.isArray(i)?[a,o]=i:a=o=i,!(!cr(a)||!cr(o)))return[t-a,t+o]})):[]}var N4=$([aS,Pu,St],tS),cS=(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(_m);return[o,{stackedData:ZN(e,l,r),graphicalItems:s}]}))},zh=$([N4,aS,ks],cS),uS=(e,t,r)=>{var{dataStartIndex:n,dataEndIndex:i}=t;if(r!=="zAxis"){var a=r5(e,n,i);if(!(a!=null&&a[0]===0&&a[1]===0))return a}},I4=$([zh,ni,Xe],uS),fS=(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=>lS(i,f)),u=ze(a,(l=t.dataKey)!==null&&l!==void 0?l:o.dataKey);return{value:u,errorDomain:D4(a,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(a=>({value:ze(a,t.dataKey),errorDomain:[]})):e.map(a=>({value:a,errorDomain:[]})),Nu=e=>e.errorBars,dS=(e,t,r)=>e.flatMap(n=>t[n.id]).filter(Boolean).filter(n=>lS(r,n));$([sS,Nu,Xe],dS);var R4=$([Cm,st,sS,Nu,Xe],fS);function $4(e){var{value:t}=e;if(Zr(t)||t instanceof Date)return t}var Pb=e=>{var t=e.flatMap(n=>[n.value,n.errorDomain]).flat(1),r=Ji(t);if(r.length!==0)return[Math.min(...r),Math.max(...r)]},L4=(e,t,r)=>{var n=e.map($4).filter(i=>i!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&y_(n))?ZO(0,e.length):t.allowDuplicatedCategory?n:Array.from(new Set(n))},Tm=e=>{var t;if(e==null||!("domain"in e))return Fh;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var r=Ji(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:Fh},Oc=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]}},hS=e=>e.referenceElements.dots,Ya=(e,t,r)=>e.filter(n=>n.ifOverflow==="extendDomain").filter(n=>t==="xAxis"?n.xAxisId===r:n.yAxisId===r),B4=$([hS,Xe,Ts],Ya),pS=e=>e.referenceElements.areas,F4=$([pS,Xe,Ts],Ya),mS=e=>e.referenceElements.lines,z4=$([mS,Xe,Ts],Ya),gS=(e,t)=>{var r=Ji(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},W4=$(B4,Xe,gS),vS=(e,t)=>{var r=Ji(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=$([F4,Xe],vS),yS=(e,t)=>{var r=Ji(e.map(n=>t==="xAxis"?n.x:n.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]},H4=$(z4,Xe,yS),U4=$(W4,H4,V4,(e,t,r)=>Oc(e,r,t)),bS=$([st],Tm),Mm=(e,t,r,n,i,a,o)=>{var s=o4(t,e.allowDataOverflow);if(s!=null)return s;var l=a==="vertical"&&o==="xAxis"||a==="horizontal"&&o==="yAxis",c=l?Oc(r,i,Pb(n)):Oc(i,Pb(n));return s4(t,c,e.allowDataOverflow)},K4=$([st,bS,I4,R4,U4,me,Xe],Mm),q4=[0,1],jm=(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=Qn(t,a);return c&&s==null?ZO(0,r.length):l==="category"?L4(n,e,c):i==="expand"?q4:o}},Dm=$([st,me,Cm,Du,ks,Xe,K4],jm),xS=(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(vs(a));return s in So?s:"point"}}},Ga=$([st,me,iS,gm,Xe],xS);function Y4(e){if(e!=null){if(e in So)return So[e]();var t="scale".concat(vs(e));if(t in So)return So[t]()}}function Nm(e,t,r,n){if(!(r==null||n==null)){if(typeof e.scale=="function")return e.scale.copy().domain(r).range(n);var i=Y4(t);if(i!=null){var a=i.domain(r).range(n);return KN(a),a}}}var Im=(e,t,r)=>{var n=Tm(t);if(!(r!=="auto"&&r!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto")&&Na(e))return v4(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&Na(e))return y4(e,t.tickCount,t.allowDecimals)}},Rm=$([Dm,Ms,Ga],Im),$m=(e,t,r,n)=>{if(n!=="angleAxis"&&e?.type==="number"&&Na(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},G4=$([st,Dm,Rm,Xe],$m),X4=$(Du,st,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,n=Array.from(Ji(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}}),wS=$(X4,me,q2,mt,(e,t,r,n)=>n,(e,t,r,n,i)=>{if(!cr(e))return 0;var a=t==="vertical"?n.height:n.width;if(i==="gap")return e*a/2;if(i==="no-gap"){var o=It(r,e*a),s=e*a/2;return s-o-(s-o)/a*o}return 0}),Z4=(e,t)=>{var r=Tn(e,t);return r==null||typeof r.padding!="string"?0:wS(e,"xAxis",t,r.padding)},J4=(e,t)=>{var r=Mn(e,t);return r==null||typeof r.padding!="string"?0:wS(e,"yAxis",t,r.padding)},Q4=$(Tn,Z4,(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}}),eL=$(Mn,J4,(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}}),tL=$([mt,Q4,bu,yu,(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]}),rL=$([mt,me,eL,bu,yu,(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]}),Ds=(e,t,r,n)=>{var i;switch(t){case"xAxis":return tL(e,r,n);case"yAxis":return rL(e,r,n);case"zAxis":return(i=Om(e,r))===null||i===void 0?void 0:i.range;case"angleAxis":return Z2(e);case"radiusAxis":return J2(e,r);default:return}},_S=$([st,Ds],ku),Xa=$([st,Ga,G4,_S],Nm);$([js,Nu,Xe],dS);function OS(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var Iu=(e,t)=>t,Ru=(e,t,r)=>r,nL=$(gu,Iu,Ru,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(OS)),iL=$(vu,Iu,Ru,(e,t,r)=>e.filter(n=>n.orientation===t).filter(n=>n.mirror===r).sort(OS)),SS=(e,t)=>({width:e.width,height:t.height}),aL=(e,t)=>{var r=typeof t.width=="number"?t.width:_s;return{width:r,height:e.height}},AS=$(mt,Tn,SS),oL=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},sL=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},lL=$(Cn,mt,nL,Iu,Ru,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=SS(t,s);o==null&&(o=oL(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}),cL=$(Pn,mt,iL,Iu,Ru,(e,t,r,n,i)=>{var a={},o;return r.forEach(s=>{var l=aL(t,s);o==null&&(o=sL(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}),uL=(e,t)=>{var r=Tn(e,t);if(r!=null)return lL(e,r.orientation,r.mirror)},fL=$([mt,Tn,uL,(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}}}),dL=(e,t)=>{var r=Mn(e,t);if(r!=null)return cL(e,r.orientation,r.mirror)},hL=$([mt,Mn,dL,(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}}}),ES=$(mt,Mn,(e,t)=>{var r=typeof t.width=="number"?t.width:_s;return{width:r,height:e.height}}),Cb=(e,t,r)=>{switch(t){case"xAxis":return AS(e,r).width;case"yAxis":return ES(e,r).height;default:return}},PS=(e,t,r,n)=>{if(r!=null){var{allowDuplicatedCategory:i,type:a,dataKey:o}=r,s=Qn(e,n),l=t.map(c=>c.value);if(o&&s&&a==="category"&&i&&y_(l))return l}},Lm=$([me,Du,st,Xe],PS),CS=(e,t,r,n)=>{if(!(r==null||r.dataKey==null)){var{type:i,scale:a}=r,o=Qn(e,n);if(o&&(i==="number"||a!=="auto"))return t.map(s=>s.value)}},Bm=$([me,Du,Ms,Xe],CS),kb=$([me,T4,Ga,Xa,Lm,Bm,Ds,Rm,Xe],(e,t,r,n,i,a,o,s,l)=>{if(t==null)return null;var c=Qn(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}}),pL=(e,t,r,n,i,a,o,s,l)=>{if(!(t==null||n==null)){var c=Qn(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?wt(a[0]-a[1])*2*m:m;var p=f||i;if(p){var g=p.map((v,x)=>{var w=o?o.indexOf(v):v;return{index:x,coordinate:n(w)+m,value:v,offset:m}});return g.filter(v=>!sr(v.coordinate))}return c&&s?s.map((v,x)=>({coordinate:n(v)+m,value:v,index:x,offset:m})):n.ticks?n.ticks(d).map(v=>({coordinate:n(v)+m,value:v,offset:m})):n.domain().map((v,x)=>({coordinate:n(v)+m,value:o?o[v]:v,index:x,offset:m}))}},kS=$([me,Ms,Ga,Xa,Rm,Ds,Lm,Bm,Xe],pL),mL=(e,t,r,n,i,a,o)=>{if(!(t==null||r==null||n==null||n[0]===n[1])){var s=Qn(e,o),{tickCount:l}=t,c=0;return c=o==="angleAxis"&&n?.length>=2?wt(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}))}},Kn=$([me,Ms,Xa,Ds,Lm,Bm,Xe],mL),qn=$(st,Xa,(e,t)=>{if(!(e==null||t==null))return _c(_c({},e),{},{scale:t})}),gL=$([st,Ga,Dm,_S],Nm);$((e,t,r)=>Om(e,r),gL,(e,t)=>{if(!(e==null||t==null))return _c(_c({},e),{},{scale:t})});var vL=$([me,gu,vu],(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}}),TS=e=>e.options.defaultTooltipEventType,MS=e=>e.options.validateTooltipEventTypes;function jS(e,t,r){if(e==null)return t;var n=e?"axis":"item";return r==null?t:r.includes(n)?n:t}function Fm(e,t){var r=TS(e),n=MS(e);return jS(t,r,n)}function yL(e){return re(t=>Fm(t,e))}var DS=(e,t)=>{var r,n=Number(t);if(!(sr(n)||t==null))return n>=0?e==null||(r=e[n])===null||r===void 0?void 0:r.value:void 0},bL=e=>e.tooltip.settings,$n={active:!1,index:null,dataKey:void 0,coordinate:void 0},xL={itemInteraction:{click:$n,hover:$n},axisInteraction:{click:$n,hover:$n},keyboardInteraction:$n,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}},NS=fr({name:"tooltip",initialState:xL,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var r=yn(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:wL,removeTooltipEntrySettings:_L,setTooltipSettingsState:OL,setActiveMouseOverItemIndex:IS,mouseLeaveItem:SL,mouseLeaveChart:RS,setActiveClickItemIndex:AL,setMouseOverAxisIndex:$S,setMouseClickAxisIndex:EL,setSyncInteraction:Wh,setKeyboardInteraction:Vh}=NS.actions,PL=NS.reducer;function Tb(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 ml(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tb(Object(r),!0).forEach(function(n){CL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function CL(e,t,r){return(t=kL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function kL(e){var t=TL(e,"string");return typeof t=="symbol"?t:t+""}function TL(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 ML(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function jL(e){return e.index!=null}var LS=(e,t,r,n)=>{if(t==null)return $n;var i=ML(e,t,r);if(i==null)return $n;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(jL(i)){if(a)return ml(ml({},i),{},{active:!0})}else if(n!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:n};return ml(ml({},$n),{},{coordinate:i.coordinate})},zm=(e,t)=>{var r=e?.index;if(r==null)return null;var n=Number(r);if(!cr(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)))},BS=(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}}}},FS=(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})},Ns=e=>e.options.tooltipPayloadSearcher,Za=e=>e.tooltip;function Mb(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 jb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mb(Object(r),!0).forEach(function(n){DL(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function DL(e,t,r){return(t=NL(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function NL(e){var t=IL(e,"string");return typeof t=="symbol"?t:t+""}function IL(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 RL(e,t){return e??t}var zS=(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=RL(p,s),x=Array.isArray(v)?TO(v,c,u):v,w=(m=g?.dataKey)!==null&&m!==void 0?m:n,y=g?.nameKey,_;if(n&&Array.isArray(x)&&!Array.isArray(x[0])&&o==="axis"?_=b_(x,n,i):_=a(x,t,l,y),Array.isArray(_))_.forEach(A=>{var P=jb(jb({},g),{},{name:A.name,unit:A.unit,color:void 0,fill:void 0});d.push(g0({tooltipEntrySettings:P,dataKey:A.dataKey,payload:A.payload,value:ze(A.payload,A.dataKey),name:A.name}))});else{var O;d.push(g0({tooltipEntrySettings:g,dataKey:w,payload:_,value:ze(_,w),name:(O=ze(_,y))!==null&&O!==void 0?O:g?.name}))}return d},f)}},Wm=$([St,me,iS,gm,vt],xS),$L=$([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),LL=$([vt,qa],Sm),Is=$([$L,St,LL],Am),BL=$([Is],e=>e.filter(Mu)),FL=$([Is],Em),Ja=$([FL,ni],Pm),zL=$([BL,ni,St],tS),Vm=$([Ja,St,Is],km),WL=$([St],Tm),VL=$([Is],e=>e.filter(Mu)),HL=$([zL,VL,ks],cS),UL=$([HL,ni,vt],uS),KL=$([Is],oS),qL=$([Ja,St,KL,Nu,vt],fS),YL=$([hS,vt,qa],Ya),GL=$([YL,vt],gS),XL=$([pS,vt,qa],Ya),ZL=$([XL,vt],vS),JL=$([mS,vt,qa],Ya),QL=$([JL,vt],yS),eB=$([GL,QL,ZL],Oc),tB=$([St,WL,UL,qL,eB,me,vt],Mm),WS=$([St,me,Ja,Vm,ks,vt,tB],jm),rB=$([WS,St,Wm],Im),nB=$([St,WS,rB,vt],$m),VS=e=>{var t=vt(e),r=qa(e),n=!1;return Ds(e,t,r,n)},HS=$([St,VS],ku),US=$([St,Wm,nB,HS],Nm),iB=$([me,Vm,St,vt],PS),aB=$([me,Vm,St,vt],CS),oB=(e,t,r,n,i,a,o,s)=>{if(t){var{type:l}=t,c=Qn(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?wt(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}))}}},jn=$([me,St,Wm,US,VS,iB,aB,vt],oB),Hm=$([TS,MS,bL],(e,t,r)=>jS(r.shared,e,t)),KS=e=>e.tooltip.settings.trigger,Um=e=>e.tooltip.settings.defaultIndex,$u=$([Za,Hm,KS,Um],LS),Yn=$([$u,Ja],zm),qS=$([jn,Yn],DS),YS=$([$u],e=>{if(e)return e.dataKey}),GS=$([Za,Hm,KS,Um],FS),sB=$([Pn,Cn,me,mt,jn,Um,GS,Ns],BS),lB=$([$u,sB],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),cB=$([$u],e=>e.active),uB=$([GS,Yn,ni,eS,qS,Ns,Hm],zS),fB=$([uB],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Db(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 Nb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Db(Object(r),!0).forEach(function(n){dB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Db(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function dB(e,t,r){return(t=hB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hB(e){var t=pB(e,"string");return typeof t=="symbol"?t:t+""}function pB(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 mB=()=>re(St),gB=()=>{var e=mB(),t=re(jn),r=re(US);return Ko(Nb(Nb({},e),{},{scale:r}),t)},vB=()=>re(gm),Km=(e,t)=>t,XS=(e,t,r)=>r,qm=(e,t,r,n)=>n,yB=$(jn,e=>fu(e,t=>t.coordinate)),Ym=$([Za,Km,XS,qm],LS),ZS=$([Ym,Ja],zm),bB=(e,t,r)=>{if(t!=null){var n=Za(e);return t==="axis"?r==="hover"?n.axisInteraction.hover.dataKey:n.axisInteraction.click.dataKey:r==="hover"?n.itemInteraction.hover.dataKey:n.itemInteraction.click.dataKey}},JS=$([Za,Km,XS,qm],FS),Sc=$([Pn,Cn,me,mt,jn,qm,JS,Ns],BS),xB=$([Ym,Sc],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),QS=$(jn,ZS,DS),wB=$([JS,ZS,ni,eS,QS,Ns,Km],zS),_B=$([Ym],e=>({isActive:e.active,activeIndex:e.index})),OB=(e,t,r,n,i,a,o,s)=>{if(!(!e||!t||!n||!i||!a)){var l=n5(e.chartX,e.chartY,t,r,s);if(l){var c=a5(l,t),u=HN(c,o,a,n,i),f=i5(t,a,u,l);return{activeIndex:String(u),activeCoordinate:f}}}};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)}function Ib(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 gl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ib(Object(r),!0).forEach(function(n){SB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ib(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function SB(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=EB(e,"string");return typeof t=="symbol"?t:t+""}function EB(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 PB(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=K5;else if(c==="BarChart")h=q5(o,u,i,a),m=qO;else if(o==="radial"){var{cx:p,cy:g,radius:v,startAngle:x,endAngle:w}=YO(u);h={cx:p,cy:g,startAngle:x,endAngle:w,innerRadius:v,outerRadius:v},m=XO}else h={points:EI(o,u,i)},m=Vp;var y=typeof s=="object"&&"className"in s?s.className:void 0,_=gl(gl(gl(gl({stroke:"#ccc",pointerEvents:"none"},i),h),Ze(s,!1)),{},{payload:f,payloadIndex:d,className:ye("recharts-tooltip-cursor",y)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function CB(e){var t=gB(),r=RO(),n=xu(),i=vB();return E.createElement(PB,Hh({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:r,layout:n,tooltipAxisBandSize:t,chartName:i}))}var eA=k.createContext(null),kB=()=>k.useContext(eA),wd={exports:{}},Rb;function TB(){return Rb||(Rb=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,x,w;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(w=1,x=new Array(v-1);w<v;w++)x[w-1]=arguments[w];g.fn.apply(g.context,x)}else{var y=g.length,_;for(w=0;w<y;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),v){case 1:g[w].fn.call(g[w].context);break;case 2:g[w].fn.call(g[w].context,u);break;case 3:g[w].fn.call(g[w].context,u,f);break;case 4:g[w].fn.call(g[w].context,u,f,d);break;default:if(!x)for(_=1,x=new Array(v-1);_<v;_++)x[_-1]=arguments[_];g[w].fn.apply(g[w].context,x)}}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})(wd)),wd.exports}var MB=TB();const jB=En(MB);var Qo=new jB,Uh="recharts.syncEvent.tooltip",$b="recharts.syncEvent.brush";function Gm(e,t){if(t){var r=Number.parseInt(t,10);if(!sr(r))return e?.[r]}}var DB={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},tA=fr({name:"options",initialState:DB,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),NB=tA.reducer,{createEventEmitter:IB}=tA.actions;function RB(e){return e.tooltip.syncInteraction}var $B={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},rA=fr({name:"chartData",initialState:$B,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:Lb,setDataStartEndIndexes:LB,setComputedData:sG}=rA.actions,BB=rA.reducer,FB=["x","y"];function Bb(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 mi(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Bb(Object(r),!0).forEach(function(n){zB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Bb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zB(e,t,r){return(t=WB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function WB(e){var t=VB(e,"string");return typeof t=="symbol"?t:t+""}function VB(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 HB(e,t){if(e==null)return{};var r,n,i=UB(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 UB(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 nA=()=>{};function KB(){var e=re(vm),t=re(ym),r=ot(),n=re(Y2),i=re(jn),a=xu(),o=Wp(),s=re(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return nA;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=HB(h,FB),v=mi(mi(mi({},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))}),x=mi(mi({},u),{},{payload:mi(mi({},u.payload),{},{coordinate:v})});r(x)}else r(u);return}if(i!=null){var w;if(typeof n=="function"){var y={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},_=n(i,y);w=i[_]}else n==="value"&&(w=i.find(D=>String(D.value)===u.payload.label));var{coordinate:O}=u.payload;if(w==null||u.payload.active===!1||O==null||o==null){r(Wh({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:A,y:P}=O,T=Math.min(A,o.x+o.width),I=Math.min(P,o.y+o.height),j={x:a==="horizontal"?w.coordinate:T,y:a==="horizontal"?I:w.coordinate},S=Wh({active:u.payload.active,coordinate:j,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});r(S)}}};return Qo.on(Uh,l),()=>{Qo.off(Uh,l)}},[s,r,t,e,n,i,a,o])}function qB(){var e=re(vm),t=re(ym),r=ot();k.useEffect(()=>{if(e==null)return nA;var n=(i,a,o)=>{t!==o&&e===i&&r(LB(a))};return Qo.on($b,n),()=>{Qo.off($b,n)}},[r,t,e])}function YB(){var e=ot();k.useEffect(()=>{e(IB())},[e]),KB(),qB()}function GB(e,t,r,n,i,a){var o=re(d=>bB(d,e,t)),s=re(ym),l=re(vm),c=re(Y2),u=re(RB),f=u?.active;k.useEffect(()=>{if(!f&&l!=null&&s!=null){var d=Wh({active:a,coordinate:r,dataKey:o,index:i,label:typeof n=="number"?String(n):n});Qo.emit(Uh,l,d,s)}},[f,r,o,i,n,s,l,c,a])}function Fb(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 zb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Fb(Object(r),!0).forEach(function(n){XB(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Fb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function XB(e,t,r){return(t=ZB(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZB(e){var t=JB(e,"string");return typeof t=="symbol"?t:t+""}function JB(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){return e.dataKey}function eF(e,t){return E.isValidElement(e)?E.cloneElement(e,t):typeof e=="function"?E.createElement(e,t):E.createElement(S5,t)}var Wb=[],tF={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!ei.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Qi(e){var t=kt(e,tF),{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:x,portal:w,axisId:y}=t,_=ot(),O=typeof x=="number"?String(x):x;k.useEffect(()=>{_(OL({shared:g,trigger:v,axisId:y,active:r,defaultIndex:O}))},[_,g,v,y,r,O]);var A=Wp(),P=WO(),T=yL(g),{activeIndex:I,isActive:j}=re(J=>_B(J,T,v,O)),S=re(J=>wB(J,T,v,O)),D=re(J=>QS(J,T,v,O)),M=re(J=>xB(J,T,v,O)),R=S,z=kB(),W=r??j,[Y,G]=wD([R,W]),L=T==="axis"?D:void 0;GB(T,v,M,L,I,W);var K=w??z;if(K==null)return null;var H=R??Wb;W||(H=Wb),s&&H.length&&(H=Vj(R.filter(J=>J.value!=null&&(J.hide!==!0||t.includeHidden)),u,QB));var ne=H.length>0,Q=E.createElement(M5,{allowEscapeViewBox:n,animationDuration:i,animationEasing:a,isAnimationActive:l,active:W,coordinate:M,hasPayload:ne,offset:c,position:f,reverseDirection:d,useTranslate3d:h,viewBox:A,wrapperStyle:m,lastBoundingBox:Y,innerRef:G,hasPortalFromProps:!!w},eF(o,zb(zb({},t),{},{payload:H,label:L,active:W,coordinate:M,accessibilityLayer:P})));return E.createElement(E.Fragment,null,kw.createPortal(Q,K),W&&E.createElement(CB,{cursor:p,tooltipEventType:T,coordinate:M,payload:R,index:I}))}var _d={},Od={},Sd={},Vb;function rF(){return Vb||(Vb=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(...x){if(i?.aborted)return;o=this,s=x;const w=d==null;h(),l&&w&&u()};return v.schedule=h,v.cancel=p,v.flush=g,i?.addEventListener("abort",p,{once:!0}),v}e.debounce=t})(Sd)),Sd}var Hb;function nF(){return Hb||(Hb=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=rF();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})(Od)),Od}var Ub;function iF(){return Ub||(Ub=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=nF();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})(_d)),_d}var Ad,Kb;function aF(){return Kb||(Kb=1,Ad=iF().throttle),Ad}var oF=aF();const sF=En(oF);var lF=process.env.NODE_ENV!=="production",ko=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(lF&&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 qb(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 Ed(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qb(Object(r),!0).forEach(function(n){cF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function cF(e,t,r){return(t=uF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function uF(e){var t=fF(e,"string");return typeof t=="symbol"?t:t+""}function fF(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 ea=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,x]=k.useState({containerWidth:n.width,containerHeight:n.height}),w=k.useCallback((_,O)=>{x(A=>{var P=Math.round(_),T=Math.round(O);return A.containerWidth===P&&A.containerHeight===T?A:{containerWidth:P,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var I,{width:j,height:S}=T[0].contentRect;w(j,S),(I=g.current)===null||I===void 0||I.call(g,j,S)};u>0&&(_=sF(_,u,{trailing:!0,leading:!1}));var O=new ResizeObserver(_),{width:A,height:P}=p.current.getBoundingClientRect();return w(A,P),O.observe(p.current),()=>{O.disconnect()}},[w,u]);var y=k.useMemo(()=>{var{containerWidth:_,containerHeight:O}=v;if(_<0||O<0)return null;ko(Ei(i)||Ei(a),`The width(%s) and height(%s) are both fixed numbers,
|
|
178
178
|
maybe you don't need to use a ResponsiveContainer.`,i,a),ko(!r||r>0,"The aspect(%s) must be greater than zero.",r);var A=Ei(i)?_:i,P=Ei(a)?O:a;return r&&r>0&&(A?P=A/r:P&&(A=P*r),l&&P>l&&(P=l)),ko(A>0||P>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
|
-
height and width.`,A,P,i,a,o,s,r),E.Children.map(c,T=>k.cloneElement(T,{width:A,height:P,style:Ed({width:A,height:P},T.props.style)}))},[r,c,a,l,s,o,v,i]);return E.createElement("div",{id:f?"".concat(f):void 0,className:ye("recharts-responsive-container",d),style:Ed(Ed({},m),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:l}),ref:p},E.createElement("div",{style:{width:0,height:0,overflow:"visible"}},y))}),Qr=e=>null;Qr.displayName="Cell";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)}class mF{constructor(t){dF(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 Yb(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 gF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yb(Object(r),!0).forEach(function(n){vF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vF(e,t,r){return(t=yF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yF(e){var t=bF(e,"string");return typeof t=="symbol"?t:t+""}function bF(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 xF={cacheSize:2e3,enableCache:!0},iA=gF({},xF),Gb=new mF(iA.cacheSize),wF={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Xb="recharts_measurement_span";function _F(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 Zb=(e,t)=>{try{var r=document.getElementById(Xb);r||(r=document.createElement("span"),r.setAttribute("id",Xb),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,wF,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},To=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ei.isSsr)return{width:0,height:0};if(!iA.enableCache)return Zb(t,r);var n=_F(t,r),i=Gb.get(n);if(i)return i;var a=Zb(t,r);return Gb.set(n,a),a},Jb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Qb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,OF=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,SF=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,aA={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},AF=Object.keys(aA),ba="NaN";function EF(e,t){return e*aA[t]}class zt{static parse(t){var r,[,n,i]=(r=SF.exec(t))!==null&&r!==void 0?r:[];return new zt(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,sr(t)&&(this.unit=""),r!==""&&!OF.test(r)&&(this.num=NaN,this.unit=""),AF.includes(r)&&(this.num=EF(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new zt(NaN,""):new zt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new zt(NaN,""):new zt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new zt(NaN,""):new zt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new zt(NaN,""):new zt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return sr(this.num)}}function oA(e){if(e.includes(ba))return ba;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=Jb.exec(t))!==null&&r!==void 0?r:[],o=zt.parse(n??""),s=zt.parse(a??""),l=i==="*"?o.multiply(s):o.divide(s);if(l.isNaN())return ba;t=t.replace(Jb,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,f,d]=(c=Qb.exec(t))!==null&&c!==void 0?c:[],h=zt.parse(u??""),m=zt.parse(d??""),p=f==="+"?h.add(m):h.subtract(m);if(p.isNaN())return ba;t=t.replace(Qb,p.toString())}return t}var ex=/\(([^()]*)\)/;function PF(e){for(var t=e,r;(r=ex.exec(t))!=null;){var[,n]=r;t=t.replace(ex,oA(n))}return t}function CF(e){var t=e.replace(/\s+/g,"");return t=PF(t),t=oA(t),t}function kF(e){try{return CF(e)}catch{return ba}}function Pd(e){var t=kF(e.slice(5,-1));return t===ba?"":t}var TF=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],MF=["dx","dy","angle","className","breakAll"];function Kh(){return Kh=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},Kh.apply(null,arguments)}function tx(e,t){if(e==null)return{};var r,n,i=jF(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 jF(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 sA=/[ \f\n\r\t\v\u2028\u2029]+/,lA=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];Ge(t)||(r?i=t.toString().split(""):i=t.toString().split(sA));var a=i.map(s=>({word:s,width:To(s,n).width})),o=r?0:To(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}},DF=(e,t,r,n,i)=>{var{maxLines:a,children:o,style:s,breakAll:l}=e,c=ae(a),u=o,f=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return j.reduce((S,D)=>{var{word:M,width:R}=D,z=S[S.length-1];if(z&&(n==null||i||z.width+R+r<Number(n)))z.words.push(M),z.width+=R+r;else{var W={words:[M],width:R};S.push(W)}return S},[])},d=f(t),h=I=>I.reduce((j,S)=>j.width>S.width?j:S);if(!c||i)return d;var m=d.length>a||h(d).width>Number(n);if(!m)return d;for(var p="…",g=I=>{var j=u.slice(0,I),S=lA({breakAll:l,style:s,children:j+p}).wordsWithComputedWidth,D=f(S),M=D.length>a||h(D).width>Number(n);return[M,D]},v=0,x=u.length-1,w=0,y;v<=x&&w<=u.length-1;){var _=Math.floor((v+x)/2),O=_-1,[A,P]=g(O),[T]=g(_);if(!A&&!T&&(v=_+1),A&&T&&(x=_-1),!A&&T){y=P;break}w++}return y||d},rx=e=>{var t=Ge(e)?[]:e.toString().split(sA);return[{words:t}]},NF=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:o}=e;if((t||r)&&!ei.isSsr){var s,l,c=lA({breakAll:a,children:n,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:f}=c;s=u,l=f}else return rx(n);return DF({breakAll:a,children:n,maxLines:o,style:i},s,l,t,r)}return rx(n)},nx="#808080",Lu=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=nx}=e,u=tx(e,TF),f=k.useMemo(()=>NF({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=tx(u,MF);if(!Zr(r)||!Zr(n)||f.length===0)return null;var x=r+(ae(d)?d:0),w=n+(ae(h)?h:0),y;switch(l){case"start":y=Pd("calc(".concat(a,")"));break;case"middle":y=Pd("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:y=Pd("calc(".concat(f.length-1," * -").concat(i,")"));break}var _=[];if(o){var O=f[0].width,{width:A}=u;_.push("scale(".concat(ae(A)?A/O:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(x,", ").concat(w,")")),_.length&&(v.transform=_.join(" ")),E.createElement("text",Kh({},Ze(v,!0),{ref:t,x,y:w,className:ye("recharts-text",p),textAnchor:s,fill:c.includes("url")?nx:c}),f.map((P,T)=>{var I=P.words.join(g?"":" ");return E.createElement("tspan",{x,dy:T===0?y:i,key:"".concat(I,"-").concat(T)},I)}))});Lu.displayName="Text";var IF=["labelRef"];function RF(e,t){if(e==null)return{};var r,n,i=$F(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 $F(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 ix(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 nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ix(Object(r),!0).forEach(function(n){LF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ix(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LF(e,t,r){return(t=BF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=FF(e,"string");return typeof t=="symbol"?t:t+""}function FF(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 pn(){return pn=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},pn.apply(null,arguments)}var cA=k.createContext(null),zF=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 E.createElement(cA.Provider,{value:o},a)},uA=()=>{var e=k.useContext(cA),t=Wp();return e||t},WF=k.createContext(null),VF=()=>{var e=k.useContext(WF),t=re(Q2);return e||t},HF=e=>{var{value:t,formatter:r}=e,n=Ge(e.children)?t:e.children;return typeof r=="function"?r(n):n},Xm=e=>e!=null&&typeof e=="function",UF=(e,t)=>{var r=wt(t-e),n=Math.min(Math.abs(t-e),360);return r*n},KF=(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=UF(f,d),g=p>=0?1:-1,v,x;switch(t){case"insideStart":v=f+g*a,x=h;break;case"insideEnd":v=d-g*a,x=!h;break;case"end":v=d+g*a,x=h;break;default:throw new Error("Unsupported position ".concat(t))}x=p<=0?x:!x;var w=ut(s,l,m,v),y=ut(s,l,m,v+(x?1:-1)*359),_="M".concat(w.x,",").concat(w.y,`
|
|
181
|
+
height and width.`,A,P,i,a,o,s,r),E.Children.map(c,T=>k.cloneElement(T,{width:A,height:P,style:Ed({width:A,height:P},T.props.style)}))},[r,c,a,l,s,o,v,i]);return E.createElement("div",{id:f?"".concat(f):void 0,className:ye("recharts-responsive-container",d),style:Ed(Ed({},m),{},{width:i,height:a,minWidth:o,minHeight:s,maxHeight:l}),ref:p},E.createElement("div",{style:{width:0,height:0,overflow:"visible"}},y))}),Qr=e=>null;Qr.displayName="Cell";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)}class mF{constructor(t){dF(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 Yb(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 gF(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yb(Object(r),!0).forEach(function(n){vF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function vF(e,t,r){return(t=yF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yF(e){var t=bF(e,"string");return typeof t=="symbol"?t:t+""}function bF(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 xF={cacheSize:2e3,enableCache:!0},iA=gF({},xF),Gb=new mF(iA.cacheSize),wF={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Xb="recharts_measurement_span";function _F(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 Zb=(e,t)=>{try{var r=document.getElementById(Xb);r||(r=document.createElement("span"),r.setAttribute("id",Xb),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,wF,t),r.textContent="".concat(e);var n=r.getBoundingClientRect();return{width:n.width,height:n.height}}catch{return{width:0,height:0}}},To=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||ei.isSsr)return{width:0,height:0};if(!iA.enableCache)return Zb(t,r);var n=_F(t,r),i=Gb.get(n);if(i)return i;var a=Zb(t,r);return Gb.set(n,a),a},Jb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Qb=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,OF=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,SF=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,aA={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},AF=Object.keys(aA),ya="NaN";function EF(e,t){return e*aA[t]}class zt{static parse(t){var r,[,n,i]=(r=SF.exec(t))!==null&&r!==void 0?r:[];return new zt(parseFloat(n),i??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,sr(t)&&(this.unit=""),r!==""&&!OF.test(r)&&(this.num=NaN,this.unit=""),AF.includes(r)&&(this.num=EF(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new zt(NaN,""):new zt(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new zt(NaN,""):new zt(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new zt(NaN,""):new zt(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new zt(NaN,""):new zt(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return sr(this.num)}}function oA(e){if(e.includes(ya))return ya;for(var t=e;t.includes("*")||t.includes("/");){var r,[,n,i,a]=(r=Jb.exec(t))!==null&&r!==void 0?r:[],o=zt.parse(n??""),s=zt.parse(a??""),l=i==="*"?o.multiply(s):o.divide(s);if(l.isNaN())return ya;t=t.replace(Jb,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,f,d]=(c=Qb.exec(t))!==null&&c!==void 0?c:[],h=zt.parse(u??""),m=zt.parse(d??""),p=f==="+"?h.add(m):h.subtract(m);if(p.isNaN())return ya;t=t.replace(Qb,p.toString())}return t}var ex=/\(([^()]*)\)/;function PF(e){for(var t=e,r;(r=ex.exec(t))!=null;){var[,n]=r;t=t.replace(ex,oA(n))}return t}function CF(e){var t=e.replace(/\s+/g,"");return t=PF(t),t=oA(t),t}function kF(e){try{return CF(e)}catch{return ya}}function Pd(e){var t=kF(e.slice(5,-1));return t===ya?"":t}var TF=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],MF=["dx","dy","angle","className","breakAll"];function Kh(){return Kh=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},Kh.apply(null,arguments)}function tx(e,t){if(e==null)return{};var r,n,i=jF(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 jF(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 sA=/[ \f\n\r\t\v\u2028\u2029]+/,lA=e=>{var{children:t,breakAll:r,style:n}=e;try{var i=[];Ge(t)||(r?i=t.toString().split(""):i=t.toString().split(sA));var a=i.map(s=>({word:s,width:To(s,n).width})),o=r?0:To(" ",n).width;return{wordsWithComputedWidth:a,spaceWidth:o}}catch{return null}},DF=(e,t,r,n,i)=>{var{maxLines:a,children:o,style:s,breakAll:l}=e,c=ae(a),u=o,f=function(){var j=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return j.reduce((S,D)=>{var{word:M,width:R}=D,z=S[S.length-1];if(z&&(n==null||i||z.width+R+r<Number(n)))z.words.push(M),z.width+=R+r;else{var W={words:[M],width:R};S.push(W)}return S},[])},d=f(t),h=I=>I.reduce((j,S)=>j.width>S.width?j:S);if(!c||i)return d;var m=d.length>a||h(d).width>Number(n);if(!m)return d;for(var p="…",g=I=>{var j=u.slice(0,I),S=lA({breakAll:l,style:s,children:j+p}).wordsWithComputedWidth,D=f(S),M=D.length>a||h(D).width>Number(n);return[M,D]},v=0,x=u.length-1,w=0,y;v<=x&&w<=u.length-1;){var _=Math.floor((v+x)/2),O=_-1,[A,P]=g(O),[T]=g(_);if(!A&&!T&&(v=_+1),A&&T&&(x=_-1),!A&&T){y=P;break}w++}return y||d},rx=e=>{var t=Ge(e)?[]:e.toString().split(sA);return[{words:t}]},NF=e=>{var{width:t,scaleToFit:r,children:n,style:i,breakAll:a,maxLines:o}=e;if((t||r)&&!ei.isSsr){var s,l,c=lA({breakAll:a,children:n,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:f}=c;s=u,l=f}else return rx(n);return DF({breakAll:a,children:n,maxLines:o,style:i},s,l,t,r)}return rx(n)},nx="#808080",Lu=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=nx}=e,u=tx(e,TF),f=k.useMemo(()=>NF({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=tx(u,MF);if(!Zr(r)||!Zr(n)||f.length===0)return null;var x=r+(ae(d)?d:0),w=n+(ae(h)?h:0),y;switch(l){case"start":y=Pd("calc(".concat(a,")"));break;case"middle":y=Pd("calc(".concat((f.length-1)/2," * -").concat(i," + (").concat(a," / 2))"));break;default:y=Pd("calc(".concat(f.length-1," * -").concat(i,")"));break}var _=[];if(o){var O=f[0].width,{width:A}=u;_.push("scale(".concat(ae(A)?A/O:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(x,", ").concat(w,")")),_.length&&(v.transform=_.join(" ")),E.createElement("text",Kh({},Ze(v,!0),{ref:t,x,y:w,className:ye("recharts-text",p),textAnchor:s,fill:c.includes("url")?nx:c}),f.map((P,T)=>{var I=P.words.join(g?"":" ");return E.createElement("tspan",{x,dy:T===0?y:i,key:"".concat(I,"-").concat(T)},I)}))});Lu.displayName="Text";var IF=["labelRef"];function RF(e,t){if(e==null)return{};var r,n,i=$F(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 $F(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 ix(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 nt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ix(Object(r),!0).forEach(function(n){LF(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ix(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function LF(e,t,r){return(t=BF(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BF(e){var t=FF(e,"string");return typeof t=="symbol"?t:t+""}function FF(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 pn(){return pn=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},pn.apply(null,arguments)}var cA=k.createContext(null),zF=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 E.createElement(cA.Provider,{value:o},a)},uA=()=>{var e=k.useContext(cA),t=Wp();return e||t},WF=k.createContext(null),VF=()=>{var e=k.useContext(WF),t=re(Q2);return e||t},HF=e=>{var{value:t,formatter:r}=e,n=Ge(e.children)?t:e.children;return typeof r=="function"?r(n):n},Xm=e=>e!=null&&typeof e=="function",UF=(e,t)=>{var r=wt(t-e),n=Math.min(Math.abs(t-e),360);return r*n},KF=(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=UF(f,d),g=p>=0?1:-1,v,x;switch(t){case"insideStart":v=f+g*a,x=h;break;case"insideEnd":v=d-g*a,x=!h;break;case"end":v=d+g*a,x=h;break;default:throw new Error("Unsupported position ".concat(t))}x=p<=0?x:!x;var w=ut(s,l,m,v),y=ut(s,l,m,v+(x?1:-1)*359),_="M".concat(w.x,",").concat(w.y,`
|
|
182
182
|
A`).concat(m,",").concat(m,",0,1,").concat(x?0:1,`,
|
|
183
|
-
`).concat(y.x,",").concat(y.y),O=Ge(e.id)?Vo("recharts-radial-line-"):e.id;return E.createElement("text",pn({},n,{dominantBaseline:"central",className:ye("recharts-radial-bar-label",o)}),E.createElement("defs",null,E.createElement("path",{id:O,d:_})),E.createElement("textPath",{xlinkHref:"#".concat(O)},r))},qF=(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}=ut(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}=ut(n,i,d,c);return{x:h,y:m,textAnchor:"middle",verticalAnchor:"middle"}},fA=e=>"cx"in e&&ae(e.cx),YF=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!fA(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 x={x:o+l/2,y:s-u*n,textAnchor:"middle",verticalAnchor:d};return nt(nt({},x),a?{height:Math.max(s-a.y,0),width:l}:{})}if(i==="bottom"){var w={x:o+l/2,y:s+c+f,textAnchor:"middle",verticalAnchor:h};return nt(nt({},w),a?{height:Math.max(a.y+a.height-(s+c),0),width:l}:{})}if(i==="left"){var y={x:o-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return nt(nt({},y),a?{width:Math.max(y.x-a.x,0),height:c}:{})}if(i==="right"){var _={x:o+l+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return nt(nt({},_),a?{width:Math.max(a.x+a.width-_.x,0),height:c}:{})}var O=a?{width:l,height:c}:{};return i==="insideLeft"?nt({x:o+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},O):i==="insideRight"?nt({x:o+l-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},O):i==="insideTop"?nt({x:o+l/2,y:s+f,textAnchor:"middle",verticalAnchor:h},O):i==="insideBottom"?nt({x:o+l/2,y:s+c-f,textAnchor:"middle",verticalAnchor:d},O):i==="insideTopLeft"?nt({x:o+p,y:s+f,textAnchor:v,verticalAnchor:h},O):i==="insideTopRight"?nt({x:o+l-p,y:s+f,textAnchor:g,verticalAnchor:h},O):i==="insideBottomLeft"?nt({x:o+p,y:s+c-f,textAnchor:v,verticalAnchor:d},O):i==="insideBottomRight"?nt({x:o+l-p,y:s+c-f,textAnchor:g,verticalAnchor:d},O):i&&typeof i=="object"&&(ae(i.x)||Ei(i.x))&&(ae(i.y)||Ei(i.y))?nt({x:o+It(i.x,l),y:s+It(i.y,c),textAnchor:"end",verticalAnchor:"end"},O):nt({x:o+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},O)},GF={offset:5};function Rn(e){var t=kt(e,GF),{viewBox:r,position:n,value:i,children:a,content:o,className:s="",textBreakAll:l,labelRef:c}=t,u=VF(),f=uA(),d=n==="center"?f:u??f,h=r||d;if(!h||Ge(i)&&Ge(a)&&!k.isValidElement(o)&&typeof o!="function")return null;var m=nt(nt({},t),{},{viewBox:h});if(k.isValidElement(o)){var{labelRef:p}=m,g=RF(m,IF);return k.cloneElement(o,g)}var v;if(typeof o=="function"){if(v=k.createElement(o,m),k.isValidElement(v))return v}else v=HF(t);var x=fA(h),w=Ze(t,!0);if(x&&(n==="insideStart"||n==="insideEnd"||n==="end"))return KF(t,n,v,w,h);var y=x?qF(h,t.offset,t.position):YF(t,h);return E.createElement(Lu,pn({ref:c,className:ye("recharts-label",s)},w,y,{breakAll:l}),v)}Rn.displayName="Label";var XF=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?E.createElement(Rn,pn({key:"label-implicit"},n)):Zr(e)?E.createElement(Rn,pn({key:"label-implicit",value:e},n)):k.isValidElement(e)?e.type===Rn?k.cloneElement(e,nt({key:"label-implicit"},n)):E.createElement(Rn,pn({key:"label-implicit",content:e},n)):Xm(e)?E.createElement(Rn,pn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?E.createElement(Rn,pn({},e,{key:"label-implicit"},n)):null};function ZF(e){var{label:t}=e,r=uA();return XF(t,r)||null}var Cd={},kd={},ax;function JF(){return ax||(ax=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(kd)),kd}var Td={},ox;function QF(){return ox||(ox=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Td)),Td}var sx;function e6(){return sx||(sx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JF(),r=QF(),n=Dp();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Cd)),Cd}var Md,lx;function t6(){return lx||(lx=1,Md=e6().last),Md}var r6=t6();const n6=En(r6);var i6=["valueAccessor"],a6=["dataKey","clockWise","id","textBreakAll"];function Ac(){return Ac=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},Ac.apply(null,arguments)}function cx(e,t){if(e==null)return{};var r,n,i=o6(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 o6(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 s6=e=>Array.isArray(e.value)?n6(e.value):e.value,dA=k.createContext(void 0),hA=dA.Provider,pA=k.createContext(void 0),l6=pA.Provider;function c6(){return k.useContext(dA)}function u6(){return k.useContext(pA)}function Wl(e){var{valueAccessor:t=s6}=e,r=cx(e,i6),{dataKey:n,clockWise:i,id:a,textBreakAll:o}=r,s=cx(r,a6),l=c6(),c=u6(),u=l||c;return!u||!u.length?null:E.createElement(Ct,{className:"recharts-label-list"},u.map((f,d)=>{var h,m=Ge(n)?t(f,d):ze(f&&f.payload,n),p=Ge(a)?{}:{id:"".concat(a,"-").concat(d)};return E.createElement(Rn,Ac({},Ze(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 Zm(e){var{label:t}=e;return t?t===!0?E.createElement(Wl,{key:"labelList-implicit"}):E.isValidElement(t)||Xm(t)?E.createElement(Wl,{key:"labelList-implicit",content:t}):typeof t=="object"?E.createElement(Wl,Ac({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function qh(){return qh=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},qh.apply(null,arguments)}var mA=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=ye("recharts-dot",i);return t===+t&&r===+r&&n===+n?E.createElement("circle",qh({},tn(e),Cp(e),{className:a,cx:t,cy:r,r:n})):null},gA=e=>e.graphicalItems.polarItems,f6=$([Xe,Ts],Sm),Jm=$([gA,st,f6],Am),d6=$([Jm],Em),Qm=$([d6,hm],Pm),h6=$([Qm,st,Jm],km),p6=$([Qm,st,Jm],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,o=ze(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:o,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:ze(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]}))),ux=()=>{},m6=$([st,bS,ux,p6,ux,me,Xe],Mm),vA=$([st,me,Qm,h6,ks,Xe,m6],jm),g6=$([vA,st,Ga],Im);$([st,vA,g6,Xe],$m);var v6={radiusAxis:{},angleAxis:{}},yA=fr({name:"polarAxis",initialState:v6,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:uG,removeRadiusAxis:fG,addAngleAxis:dG,removeAngleAxis:hG}=yA.actions,y6=yA.reducer;function fx(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 dx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fx(Object(r),!0).forEach(function(n){b6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b6(e,t,r){return(t=x6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x6(e){var t=w6(e,"string");return typeof t=="symbol"?t:t+""}function w6(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 _6=(e,t)=>t,eg=$([gA,_6],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),O6=[],tg=(e,t,r)=>r?.length===0?O6:r,bA=$([hm,eg,tg],(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=>dx(dx({},t.presentationProps),a.props))),i!=null)return i}}),S6=$([bA,eg,tg],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,o=ze(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:Va(o,t.dataKey),color:s,payload:n,type:t.legendType}})}),A6=$([bA,eg,tg,mt],(e,t,r,n)=>{if(!(t==null||e==null))return _3({offset:n,pieSettings:t,displayedData:e,cells:r})}),jd={},hx;function E6(){return hx||(hx=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})(jd)),jd}var Dd,px;function P6(){return px||(px=1,Dd=E6().isPlainObject),Dd}var C6=P6();const k6=En(C6);function mx(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 gx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mx(Object(r),!0).forEach(function(n){T6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T6(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=j6(e,"string");return typeof t=="symbol"?t:t+""}function j6(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 Ec(){return Ec=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},Ec.apply(null,arguments)}var vx=(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},D6={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},N6=e=>{var t=kt(e,D6),{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),x=k.useRef(r),w=k.useRef(n),y=Ss(e,"trapezoid-");if(k.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var M=d.current.getTotalLength();M&&m(M)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var _=ye("recharts-trapezoid",s);if(!f)return E.createElement("g",null,E.createElement("path",Ec({},Ze(t,!0),{className:_,d:vx(r,n,i,a,o)})));var O=p.current,A=g.current,P=v.current,T=x.current,I=w.current,j="0px ".concat(h===-1?1:h,"px"),S="".concat(h,"px 0px"),D=VO(["strokeDasharray"],c,l);return E.createElement(Os,{animationId:y,key:y,canBegin:h>0,duration:c,easing:l,isActive:f,begin:u},M=>{var R=et(O,i,M),z=et(A,a,M),W=et(P,o,M),Y=et(T,r,M),G=et(I,n,M);d.current&&(p.current=R,g.current=z,v.current=W,x.current=Y,w.current=G);var L=M>0?{transition:D,strokeDasharray:S}:{strokeDasharray:j};return E.createElement("path",Ec({},Ze(t,!0),{className:_,d:vx(Y,G,R,z,W),ref:d,style:gx(gx({},L),t.style)}))})},I6=["option","shapeType","propTransformer","activeClassName","isActive"];function R6(e,t){if(e==null)return{};var r,n,i=$6(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 $6(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 yx(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 Pc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yx(Object(r),!0).forEach(function(n){L6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L6(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=F6(e,"string");return typeof t=="symbol"?t:t+""}function F6(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 z6(e,t){return Pc(Pc({},t),e)}function W6(e,t){return e==="symbols"}function bx(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return E.createElement(qO,r);case"trapezoid":return E.createElement(N6,r);case"sector":return E.createElement(XO,r);case"symbols":if(W6(t))return E.createElement(z_,r);break;default:return null}}function V6(e){return k.isValidElement(e)?e.props:e}function xA(e){var{option:t,shapeType:r,propTransformer:n=z6,activeClassName:i="recharts-active-shape",isActive:a}=e,o=R6(e,I6),s;if(k.isValidElement(t))s=k.cloneElement(t,Pc(Pc({},o),V6(t)));else if(typeof t=="function")s=t(o);else if(k6(t)&&typeof t!="boolean"){var l=n(t,o);s=E.createElement(bx,{shapeType:r,elementProps:l})}else{var c=o;s=E.createElement(bx,{shapeType:r,elementProps:c})}return a?E.createElement(Ct,{className:i},s):s}var rg=(e,t)=>{var r=ot();return(n,i)=>a=>{e?.(n,i,a),r(IS({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},ng=e=>{var t=ot();return(r,n)=>i=>{e?.(r,n,i),t(SL())}},ig=(e,t)=>{var r=ot();return(n,i)=>a=>{e?.(n,i,a),r(AL({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function ag(e){var{fn:t,args:r}=e,n=ot(),i=Gt();return k.useEffect(()=>{if(!i){var a=t(r);return n(wL(a)),()=>{n(_L(a))}}},[t,r,n,i]),null}var wA=()=>{};function _A(e){var{legendPayload:t}=e,r=ot(),n=Gt();return k.useEffect(()=>n?wA:(r(FO(t)),()=>{r(zO(t))}),[r,n,t]),null}function H6(e){var{legendPayload:t}=e,r=ot(),n=re(me);return k.useEffect(()=>n!=="centric"&&n!=="radial"?wA:(r(FO(t)),()=>{r(zO(t))}),[r,n,t]),null}var Nd,U6=()=>{var[e]=E.useState(()=>Vo("uid-"));return e},K6=(Nd=E.useId)!==null&&Nd!==void 0?Nd:U6;function q6(e,t){var r=K6();return t||(e?"".concat(e,"-").concat(r):r)}var Y6=k.createContext(void 0),og=e=>{var{id:t,type:r,children:n}=e,i=q6("recharts-".concat(r),t);return E.createElement(Y6.Provider,{value:i},n(i))},G6={cartesianItems:[],polarItems:[]},OA=fr({name:"graphicalItems",initialState:G6,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:r,next:n}=t.payload,i=yn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},removeCartesianGraphicalItem(e,t){var r=yn(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=yn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)}}}),{addCartesianGraphicalItem:X6,replaceCartesianGraphicalItem:Z6,removeCartesianGraphicalItem:J6,addPolarGraphicalItem:Q6,removePolarGraphicalItem:e3}=OA.actions,t3=OA.reducer;function SA(e){var t=ot(),r=k.useRef(null);return k.useEffect(()=>{r.current===null?t(X6(e)):r.current!==e&&t(Z6({prev:r.current,next:e})),r.current=e},[t,e]),k.useEffect(()=>()=>{r.current&&(t(J6(r.current)),r.current=null)},[t]),null}function r3(e){var t=ot();return k.useEffect(()=>(t(Q6(e)),()=>{t(e3(e))}),[t,e]),null}var n3=["onMouseEnter","onClick","onMouseLeave"],i3=["id"],a3=["id"];function sg(e,t){if(e==null)return{};var r,n,i=o3(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 o3(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 xx(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?xx(Object(r),!0).forEach(function(n){s3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s3(e,t,r){return(t=l3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l3(e){var t=c3(e,"string");return typeof t=="symbol"?t:t+""}function c3(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 Gn(){return Gn=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},Gn.apply(null,arguments)}function u3(e){var t=k.useMemo(()=>kp(e.children,Qr),[e.children]),r=re(n=>S6(n,e.id,t));return r==null?null:E.createElement(H6,{legendPayload:r})}function f3(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:Va(s,t),hide:l,type:c,color:o,unit:""}}}var d3=(e,t)=>e>t?"start":e<t?"end":"middle",h3=(e,t,r)=>It(typeof t=="function"?t(e):t,r,r*.8),p3=(e,t,r)=>{var{top:n,left:i,width:a,height:o}=t,s=kO(a,o),l=i+It(e.cx,a,a/2),c=n+It(e.cy,o,o/2),u=It(e.innerRadius,s,0),f=h3(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}},m3=(e,t)=>{var r=wt(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function g3(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var v3=(e,t)=>{if(E.isValidElement(e))return E.cloneElement(e,t);if(typeof e=="function")return e(t);var r=ye("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return E.createElement(Vp,Gn({},t,{type:"linear",className:r}))},y3=(e,t,r)=>{if(E.isValidElement(e))return E.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),E.isValidElement(n)))return n;var i=ye("recharts-pie-label-text",g3(e));return E.createElement(Lu,Gn({},t,{alignmentBaseline:"middle",className:i}),n)};function b3(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:o}=r;if(!n||!i||!t)return null;var s=tn(r),l=Ze(i,!1),c=Ze(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=ut(d.cx,d.cy,d.outerRadius+u,m),g=qe(qe(qe(qe({},s),d),{},{stroke:"none"},l),{},{index:h,textAnchor:d3(p.x,d.cx)},p),v=qe(qe(qe(qe({},s),d),{},{fill:"none",stroke:d.fill},c),{},{index:h,points:[ut(d.cx,d.cy,d.outerRadius,m),p],key:"line"});return E.createElement(Ct,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(h)},a&&v3(a,v),y3(i,g,ze(d,o)))});return E.createElement(Ct,{className:"recharts-pie-labels"},f)}function x3(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?E.createElement(Zm,{label:i}):E.createElement(b3,{sectors:t,props:r,showLabels:n})}function w3(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=re(Yn),{onMouseEnter:o,onClick:s,onMouseLeave:l}=i,c=sg(i,n3),u=rg(o,i.dataKey),f=ng(l),d=ig(s,i.dataKey);return t==null||t.length===0?null:E.createElement(E.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,x=qe(qe({},h),{},{stroke:h.stroke,tabIndex:-1,[NO]:m,[IO]:i.dataKey});return E.createElement(Ct,Gn({tabIndex:-1,className:"recharts-pie-sector"},su(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)}),E.createElement(xA,Gn({option:v,isActive:p,shapeType:"sector"},x)))}))}function _3(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=m3(s,l),m=Math.abs(h),p=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,g=n.filter(O=>ze(O,c,0)!==0).length,v=(m>=360?g:g-1)*p,x=m-g*d-v,w=n.reduce((O,A)=>{var P=ze(A,c,0);return O+(ae(P)?P:0)},0),y;if(w>0){var _;y=n.map((O,A)=>{var P=ze(O,c,0),T=ze(O,u,A),I=p3(r,a,O),j=(ae(P)?P:0)/w,S,D=qe(qe({},O),i&&i[A]&&i[A].props);A?S=_.endAngle+wt(h)*p*(P!==0?1:0):S=s;var M=S+wt(h)*((P!==0?d:0)+j*x),R=(S+M)/2,z=(I.innerRadius+I.outerRadius)/2,W=[{name:T,value:P,payload:D,dataKey:c,type:f}],Y=ut(I.cx,I.cy,z,R);return _=qe(qe(qe(qe({},r.presentationProps),{},{percent:j,cornerRadius:o,name:T,tooltipPayload:W,midAngle:R,middleRadius:z,tooltipPosition:Y},D),I),{},{value:P,startAngle:S,endAngle:M,payload:D,paddingAngle:wt(h)*p}),_})}return y}function O3(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 E.createElement(l6,{value:t?i:void 0},n)}function S3(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=Ss(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 E.createElement(O3,{showLabels:!m,sectors:n},E.createElement(Os,{animationId:d,begin:a,duration:o,isActive:i,easing:s,onAnimationStart:v,onAnimationEnd:g,key:d},x=>{var w=[],y=n&&n[0],_=y?.startAngle;return n?.forEach((O,A)=>{var P=h&&h[A],T=A>0?zi(O,"paddingAngle",0):0;if(P){var I=et(P.endAngle-P.startAngle,O.endAngle-O.startAngle,x),j=qe(qe({},O),{},{startAngle:_+T,endAngle:_+I+T});w.push(j),_=j.endAngle}else{var{endAngle:S,startAngle:D}=O,M=et(0,S-D,x),R=qe(qe({},O),{},{startAngle:_+T,endAngle:_+M+T});w.push(R),_=R.endAngle}}),r.current=w,E.createElement(Ct,null,E.createElement(w3,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),E.createElement(x3,{showLabels:!m,sectors:n,props:t}),t.children)}var A3={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!ei.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function E3(e){var{id:t}=e,r=sg(e,i3),{hide:n,className:i,rootTabIndex:a}=e,o=k.useMemo(()=>kp(e.children,Qr),[e.children]),s=re(u=>A6(u,t,o)),l=k.useRef(null),c=ye("recharts-pie",i);return n||s==null?(l.current=null,E.createElement(Ct,{tabIndex:a,className:c})):E.createElement(E.Fragment,null,E.createElement(ag,{fn:f3,args:qe(qe({},e),{},{sectors:s})}),E.createElement(Ct,{tabIndex:a,className:c},E.createElement(S3,{props:qe(qe({},r),{},{sectors:s}),previousSectorsRef:l})))}function Rs(e){var t=kt(e,A3),{id:r}=t,n=sg(t,a3),i=tn(n);return E.createElement(og,{id:r,type:"pie"},a=>E.createElement(E.Fragment,null,E.createElement(r3,{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}),E.createElement(u3,Gn({},n,{id:a})),E.createElement(E3,Gn({},n,{id:a}))))}Rs.displayName="Pie";function wx(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?wx(Object(r),!0).forEach(function(n){P3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P3(e,t,r){return(t=C3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C3(e){var t=k3(e,"string");return typeof t=="symbol"?t:t+""}function k3(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 T3={xAxis:{},yAxis:{},zAxis:{}},AA=fr({name:"cartesianAxis",initialState:T3,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]=_x(_x({},e.yAxis[r]),{},{width:n}))}}}),{addXAxis:M3,removeXAxis:j3,addYAxis:D3,removeYAxis:N3,addZAxis:pG,removeZAxis:mG,updateYAxisWidth:I3}=AA.actions,R3=AA.reducer,$3=$([mt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),L3=$([$3,Pn,Cn],(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)}}),lg=()=>re(L3),B3=()=>re(fB);function Ox(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 Sx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ox(Object(r),!0).forEach(function(n){F3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F3(e,t,r){return(t=z3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z3(e){var t=W3(e,"string");return typeof t=="symbol"?t:t+""}function W3(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 V3=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=Sx(Sx({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},Ze(i,!1)),Cp(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,o):typeof i=="function"?s=i(o):s=E.createElement(mA,o),E.createElement(Ct,{className:"recharts-active-dot"},s)};function H3(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i}=e,a=re(Yn),o=B3();if(t==null||o==null)return null;var s=t.find(l=>o.includes(l.payload));return Ge(s)?null:V3({point:s,childIndex:Number(a),mainColor:r,dataKey:i,activeDot:n})}var U3=process.env.NODE_ENV==="production",Id="Invariant failed";function Ax(e,t){if(U3)throw new Error(Id);var r=typeof t=="function"?t():t,n=r?"".concat(Id,": ").concat(r):Id;throw new Error(n)}var K3=["x","y"];function Yh(){return Yh=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},Yh.apply(null,arguments)}function Ex(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 ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(r),!0).forEach(function(n){q3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q3(e,t,r){return(t=Y3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y3(e){var t=G3(e,"string");return typeof t=="symbol"?t:t+""}function G3(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 X3(e,t){if(e==null)return{};var r,n,i=Z3(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 Z3(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 J3(e,t){var{x:r,y:n}=e,i=X3(e,K3),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 ho(ho(ho(ho(ho({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:d,name:t.name,radius:t.radius})}function cg(e){return E.createElement(xA,Yh({shapeType:"rectangle",propTransformer:J3,activeClassName:"recharts-active-bar"},e))}var Q3=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(ae(t))return t;var a=ae(n)||Ge(n);return a?t(n,i):(a||(process.env.NODE_ENV!=="production"?Ax(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")):Ax()),r)}},e8={},EA=fr({name:"errorBars",initialState:e8,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:gG,replaceErrorBar:vG,removeErrorBar:yG}=EA.actions,t8=EA.reducer,r8=["children"];function n8(e,t){if(e==null)return{};var r,n,i=i8(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 i8(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 a8={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},o8=k.createContext(a8);function PA(e){var{children:t}=e,r=n8(e,r8);return E.createElement(o8.Provider,{value:r},t)}function ug(e,t){var r,n,i=re(c=>Tn(c,e)),a=re(c=>Mn(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 CA(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=lg(),{needClipX:a,needClipY:o,needClip:s}=ug(t,r);if(!s)return null;var{x:l,y:c,width:u,height:f}=i;return E.createElement("clipPath",{id:"clipPath-".concat(n)},E.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 s8=["onMouseEnter","onMouseLeave","onClick"],l8=["value","background","tooltipPosition"],c8=["id"],u8=["onMouseEnter","onClick","onMouseLeave"];function Xn(){return Xn=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},Xn.apply(null,arguments)}function Px(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 $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Px(Object(r),!0).forEach(function(n){f8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f8(e,t,r){return(t=d8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d8(e){var t=h8(e,"string");return typeof t=="symbol"?t:t+""}function h8(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 Cc(e,t){if(e==null)return{};var r,n,i=p8(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 p8(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 m8=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Va(r,t),payload:e}]};function g8(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:Va(a,t),hide:o,type:e.tooltipType,color:e.fill,unit:s}}}function v8(e){var t=re(Yn),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:l}=a,c=Cc(a,s8),u=rg(o,n),f=ng(s),d=ig(l,n);if(!i||r==null)return null;var h=Ze(i,!1);return E.createElement(E.Fragment,null,r.map((m,p)=>{var{value:g,background:v,tooltipPosition:x}=m,w=Cc(m,l8);if(!v)return null;var y=u(m,p),_=f(m,p),O=d(m,p),A=$t($t($t($t($t({option:i,isActive:String(p)===t},w),{},{fill:"#eee"},v),h),su(c,m,p)),{},{onMouseEnter:y,onMouseLeave:_,onClick:O,dataKey:n,index:p,className:"recharts-bar-background-rectangle"});return E.createElement(cg,Xn({key:"background-bar-".concat(A.index)},A))}))}function y8(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 $t($t({},o),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:o,fill:a.fill})});return E.createElement(hA,{value:t?i:void 0},r)}function b8(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:o}=e,s=re(Yn),l=re(YS),c=r&&String(a)===s&&(l==null||o===l),u=c?r:t;return E.createElement(cg,Xn({},n,i,{isActive:c,option:u,index:a,dataKey:o}))}function x8(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return E.createElement(cg,Xn({},r,n,{isActive:!1,option:t,index:i,dataKey:a}))}function w8(e){var{data:t,props:r}=e,n=tn(r),{id:i}=n,a=Cc(n,c8),{shape:o,dataKey:s,activeBar:l}=r,{onMouseEnter:c,onClick:u,onMouseLeave:f}=r,d=Cc(r,u8),h=rg(c,s),m=ng(f),p=ig(u,s);return t?E.createElement(E.Fragment,null,t.map((g,v)=>E.createElement(Ct,Xn({className:"recharts-bar-rectangle"},su(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?E.createElement(b8,{shape:o,activeBar:l,baseProps:a,entry:g,index:v,dataKey:s}):E.createElement(x8,{shape:o,baseProps:a,entry:g,index:v,dataKey:s})))):null}function _8(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=Ss(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 E.createElement(y8,{showLabels:p,rects:n},E.createElement(Os,{animationId:d,begin:o,duration:s,isActive:a,easing:l,onAnimationEnd:g,onAnimationStart:v,key:d},x=>{var w=x===1?n:n?.map((y,_)=>{var O=f&&f[_];if(O)return $t($t({},y),{},{x:et(O.x,y.x,x),y:et(O.y,y.y,x),width:et(O.width,y.width,x),height:et(O.height,y.height,x)});if(i==="horizontal"){var A=et(0,y.height,x);return $t($t({},y),{},{y:y.y+y.height-A,height:A})}var P=et(0,y.width,x);return $t($t({},y),{},{width:P})});return x>0&&(r.current=w??null),w==null?null:E.createElement(Ct,null,E.createElement(w8,{props:t,data:w}))}),E.createElement(Zm,{label:t.label}),t.children)}function O8(e){var t=k.useRef(null);return E.createElement(_8,{previousRectanglesRef:t,props:e})}var kA=0,S8=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:ze(e,t)}};class A8 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=ye("recharts-bar",i),f=c;return E.createElement(Ct,{className:u,id:c},s&&E.createElement("defs",null,E.createElement(CA,{clipPathId:f,xAxisId:a,yAxisId:o})),E.createElement(Ct,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},E.createElement(v8,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),E.createElement(O8,this.props)))}}var E8={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!ei.isSsr,legendType:"rect",minPointSize:kA,xAxisId:0,yAxisId:0};function P8(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}=ug(t,r),d=xu(),h=Gt(),m=kp(e.children,Qr),p=re(x=>tz(x,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,E.createElement(PA,{xAxisId:t,yAxisId:r,data:p,dataPointFormatter:S8,errorBarOffset:g},E.createElement(A8,Xn({},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 C8(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=QN({numericAxis:p});return f.map((x,w)=>{var y,_,O,A,P,T;u?y=qN(u[w],g):(y=ze(x,r),Array.isArray(y)||(y=[v,y]));var I=Q3(n,kA)(y[1],w);if(t==="horizontal"){var j,[S,D]=[s.scale(y[0]),s.scale(y[1])];_=h0({axis:o,ticks:l,bandSize:a,offset:i.offset,entry:x,index:w}),O=(j=D??S)!==null&&j!==void 0?j:void 0,A=i.size;var M=S-D;if(P=sr(M)?0:M,T={x:_,y:d.top,width:A,height:d.height},Math.abs(I)>0&&Math.abs(P)<Math.abs(I)){var R=wt(P||I)*(Math.abs(I)-Math.abs(P));O-=R,P+=R}}else{var[z,W]=[o.scale(y[0]),o.scale(y[1])];if(_=z,O=h0({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:x,index:w}),A=W-z,P=i.size,T={x:d.left,y:O,width:d.width,height:P},Math.abs(I)>0&&Math.abs(A)<Math.abs(I)){var Y=wt(A||I)*(Math.abs(I)-Math.abs(A));A+=Y}}if(_==null||O==null||A==null||P==null)return null;var G=$t($t({},x),{},{x:_,y:O,width:A,height:P,value:u?y:y[1],payload:x,background:T,tooltipPosition:{x:_+A/2,y:O+P/2},parentViewBox:m},h&&h[w]&&h[w].props);return G}).filter(Boolean)}function k8(e){var t=kt(e,E8),r=Gt();return E.createElement(og,{id:t.id,type:"bar"},n=>E.createElement(E.Fragment,null,E.createElement(_A,{legendPayload:m8(t)}),E.createElement(ag,{fn:g8,args:t}),E.createElement(SA,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:JN(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),E.createElement(P8,Xn({},t,{id:n}))))}var TA=E.memo(k8);TA.displayName="Bar";function Cx(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 vl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cx(Object(r),!0).forEach(function(n){T8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T8(e,t,r){return(t=M8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M8(e){var t=j8(e,"string");return typeof t=="symbol"?t:t+""}function j8(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 D8=(e,t)=>t,N8=(e,t,r)=>r,I8=(e,t,r,n)=>n,R8=(e,t,r,n,i)=>i,$s=$([ju,R8],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),$8=$([$s],e=>e?.maxBarSize),L8=(e,t,r,n,i,a)=>a,kx=(e,t,r)=>{var n=r??e;if(!Ge(n))return It(n,t,0)},B8=$([me,ju,D8,N8,I8],(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")),F8=(e,t,r,n)=>{var i=me(e);return i==="horizontal"?zh(e,"yAxis",r,n):zh(e,"xAxis",t,n)},z8=(e,t,r)=>{var n=me(e);return n==="horizontal"?Cb(e,"xAxis",t):Cb(e,"yAxis",r)},W8=(e,t,r)=>{var n={},i=e.filter(Mu),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=kx(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=kx(t,r,c.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...s,...l]},V8=$([B8,x4,z8],W8),H8=(e,t,r,n,i)=>{var a,o,s=$s(e,t,r,n,i);if(s!=null){var l=me(e),c=K2(e),{maxBarSize:u}=s,f=Ge(u)?c:u,d,h;return l==="horizontal"?(d=qn(e,"xAxis",t,n),h=Kn(e,"xAxis",t,n)):(d=qn(e,"yAxis",r,n),h=Kn(e,"yAxis",r,n)),(a=(o=Ko(d,h,!0))!==null&&o!==void 0?o:f)!==null&&a!==void 0?a:0}},MA=(e,t,r,n)=>{var i=me(e),a,o;return i==="horizontal"?(a=qn(e,"xAxis",t,n),o=Kn(e,"xAxis",t,n)):(a=qn(e,"yAxis",r,n),o=Kn(e,"yAxis",r,n)),Ko(a,o)};function U8(e,t,r,n,i){var a=n.length;if(!(a<1)){var o=It(e,r,0,!0),s,l=[];if(cr(n[0].barSize)){var c=!1,u=r/a,f=n.reduce((v,x)=>v+(x.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,x)=>{var w,y={stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:h.offset+h.size+o,size:c?u:(w=x.barSize)!==null&&w!==void 0?w:0}},_=[...v,y];return h=_[_.length-1].position,_},l)}else{var m=It(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=cr(i)?Math.min(p,i):p;s=n.reduce((v,x,w)=>[...v,{stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:m+(p+o)*w+(p-g)/2,size:g}}],l)}return s}}var K8=(e,t,r,n,i,a,o)=>{var s=Ge(o)?t:o,l=U8(r,n,i!==a?i:a,e,s);return i!==a&&l!=null&&(l=l.map(c=>vl(vl({},c),{},{position:vl(vl({},c.position),{},{offset:c.position.offset-i/2})}))),l},q8=$([V8,K2,b4,q2,H8,MA,$8],K8),Y8=(e,t,r,n)=>qn(e,"xAxis",t,n),G8=(e,t,r,n)=>qn(e,"yAxis",r,n),X8=(e,t,r,n)=>Kn(e,"xAxis",t,n),Z8=(e,t,r,n)=>Kn(e,"yAxis",r,n),J8=$([q8,$s],(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}}),Q8=(e,t)=>{var r=_m(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)}}}},ez=$([F8,$s],Q8),tz=$([mt,zp,Y8,G8,X8,Z8,J8,me,Pu,MA,ez,$s,L8],(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 C8({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})}}),jA=e=>{var{chartData:t}=e,r=ot(),n=Gt();return k.useEffect(()=>n?()=>{}:(r(Lb(t)),()=>{r(Lb(void 0))}),[t,r,n]),null},Tx={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},DA=fr({name:"brush",initialState:Tx,reducers:{setBrushSettings(e,t){return t.payload==null?Tx:t.payload}}}),{setBrushSettings:bG}=DA.actions,rz=DA.reducer;function nz(e,t,r){return(t=iz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iz(e){var t=az(e,"string");return typeof t=="symbol"?t:t+""}function az(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 fg{static create(t){return new fg(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}}nz(fg,"EPS",1e-4);function oz(e){return(e%180+180)%180}var sz=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=oz(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)},lz={dots:[],areas:[],lines:[]},NA=fr({name:"referenceElements",initialState:lz,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=yn(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=yn(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=yn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:xG,removeDot:wG,addArea:_G,removeArea:OG,addLine:SG,removeLine:AG}=NA.actions,cz=NA.reducer,uz=k.createContext(void 0),fz=e=>{var{children:t}=e,[r]=k.useState("".concat(Vo("recharts"),"-clip")),n=lg();if(n==null)return null;var{x:i,y:a,width:o,height:s}=n;return E.createElement(uz.Provider,{value:r},E.createElement("defs",null,E.createElement("clipPath",{id:r},E.createElement("rect",{x:i,y:a,height:s,width:o}))),t)};function Ia(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 IA(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 dz(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return sz(n,r)}function hz(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 kc(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 pz(e,t){return IA(e,t+1)}function mz(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:IA(n,c)};var p=l,g,v=()=>(g===void 0&&(g=r(m,p)),g),x=m.coordinate,w=l===0||kc(e,x,v,u,s);w||(l=0,u=o,c+=1),w&&(u=x+e*(v()/2+i),l+=c)},d;c<=a.length;)if(d=f(),d)return d.v;return[]}function Mx(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 jt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mx(Object(r),!0).forEach(function(n){gz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gz(e,t,r){return(t=vz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vz(e){var t=yz(e,"string");return typeof t=="symbol"?t:t+""}function yz(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 bz(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=jt(jt({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate})}else a[d]=h=jt(jt({},h),{},{tickCoord:h.coordinate});var v=kc(e,h.tickCoord,p,s,l);v&&(l=h.tickCoord-e*(p()/2+i),a[d]=jt(jt({},h),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return a}function xz(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=jt(jt({},u),{},{tickCoord:d>0?u.coordinate-d*e:u.coordinate});var h=kc(e,u.tickCoord,()=>f,l,c);h&&(c=u.tickCoord-e*(f/2+i),o[s-1]=jt(jt({},u),{},{isShow:!0}))}for(var m=a?s-1:s,p=function(x){var w=o[x],y,_=()=>(y===void 0&&(y=r(w,x)),y);if(x===0){var O=e*(w.coordinate-e*_()/2-l);o[x]=w=jt(jt({},w),{},{tickCoord:O<0?w.coordinate-O*e:w.coordinate})}else o[x]=w=jt(jt({},w),{},{tickCoord:w.coordinate});var A=kc(e,w.tickCoord,_,l,c);A&&(l=w.tickCoord+e*(_()/2+i),o[x]=jt(jt({},w),{},{isShow:!0}))},g=0;g<m;g++)p(g);return o}function dg(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(ae(l)||ei.isSsr){var d;return(d=pz(i,ae(l)?l:0))!==null&&d!==void 0?d:[]}var h=[],m=s==="top"||s==="bottom"?"width":"height",p=u&&m==="width"?To(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=(w,y)=>{var _=typeof c=="function"?c(w.value,y):w.value;return m==="width"?dz(To(_,{fontSize:t,letterSpacing:r}),p,f):To(_,{fontSize:t,letterSpacing:r})[m]},v=i.length>=2?wt(i[1].coordinate-i[0].coordinate):1,x=hz(a,v,m);return l==="equidistantPreserveStart"?mz(v,x,g,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=xz(v,x,g,i,o,l==="preserveStartEnd"):h=bz(v,x,g,i,o),h.filter(w=>w.isShow))}var wz=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},_z=["axisLine","width","height","className","hide","ticks"],Oz=["viewBox"],Sz=["viewBox"];function Gh(e,t){if(e==null)return{};var r,n,i=Az(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 Az(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 Ui(){return Ui=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},Ui.apply(null,arguments)}function jx(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 ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jx(Object(r),!0).forEach(function(n){Ez(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ez(e,t,r){return(t=Pz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pz(e){var t=Cz(e,"string");return typeof t=="symbol"?t:t+""}function Cz(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 hg={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 kz(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=ht(ht(ht({},l),Ze(s,!1)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!o||a==="bottom"&&o);c=ht(ht({},c),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var f=+(a==="left"&&!o||a==="right"&&o);c=ht(ht({},c),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return E.createElement("line",Ui({},c,{className:ye("recharts-cartesian-axis-line",zi(s,"className"))}))}function Tz(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=ae(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 Mz(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function jz(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Dz(e){var{option:t,tickProps:r,value:n}=e,i,a=ye(r.className,"recharts-cartesian-axis-tick-value");if(E.isValidElement(t))i=E.cloneElement(t,ht(ht({},r),{},{className:a}));else if(typeof t=="function")i=t(ht(ht({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=ye(o,t?.className)),i=E.createElement(Lu,Ui({},r,{className:o}),n)}return i}function Nz(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:x,getTicksConfig:w,events:y}=e,_=dg(ht(ht({},w),{},{ticks:t}),v,x),O=Mz(c,u),A=jz(c,u),P=tn(w),T=Ze(r,!1),I=ht(ht({},P),{},{fill:"none"},Ze(n,!1)),j=_.map((S,D)=>{var{line:M,tick:R}=Tz(S,f,d,h,m,c,p,u,g),z=ht(ht(ht(ht({textAnchor:O,verticalAnchor:A},P),{},{stroke:"none",fill:i},T),R),{},{index:D,payload:S,visibleTicksCount:_.length,tickFormatter:a,padding:s},l);return E.createElement(Ct,Ui({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},su(y,S,D)),n&&E.createElement("line",Ui({},I,M,{className:ye("recharts-cartesian-axis-tick-line",zi(n,"className"))})),r&&E.createElement(Dz,{option:r,tickProps:z,value:"".concat(typeof a=="function"?a(S.value,D):S.value).concat(o||"")}))});return j.length>0?E.createElement("g",{className:"recharts-cartesian-axis-ticks"},j):null}var Iz=k.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s}=e,l=Gh(e,_z),[c,u]=k.useState(""),[f,d]=k.useState(""),h=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var p;return wz({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 x=window.getComputedStyle(v),w=x.fontSize,y=x.letterSpacing;(w!==c||y!==f)&&(u(w),d(y))}}},[c,f]);return o||n!=null&&n<=0||i!=null&&i<=0?null:E.createElement(Ct,{className:ye("recharts-cartesian-axis",a),ref:m},E.createElement(kz,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:tn(e)}),E.createElement(Nz,{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}),E.createElement(zF,{x:e.x,y:e.y,width:e.width,height:e.height},E.createElement(ZF,{label:e.label}),e.children))}),Rz=E.memo(Iz,(e,t)=>{var{viewBox:r}=e,n=Gh(e,Oz),{viewBox:i}=t,a=Gh(t,Sz);return Ia(r,i)&&Ia(n,a)}),pg=E.forwardRef((e,t)=>{var r=kt(e,hg);return E.createElement(Rz,Ui({},r,{ref:t}))});pg.displayName="CartesianAxis";var $z=["x1","y1","x2","y2","key"],Lz=["offset"],Bz=["xAxisId","yAxisId"],Fz=["xAxisId","yAxisId"];function Dx(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 Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dx(Object(r),!0).forEach(function(n){zz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zz(e,t,r){return(t=Wz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wz(e){var t=Vz(e,"string");return typeof t=="symbol"?t:t+""}function Vz(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 ki(){return ki=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},ki.apply(null,arguments)}function Tc(e,t){if(e==null)return{};var r,n,i=Hz(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 Hz(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 Uz=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 E.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function RA(e,t){var r;if(E.isValidElement(e))r=E.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=Tc(t,$z),c=tn(l),{offset:u}=c,f=Tc(c,Lz);r=E.createElement("line",ki({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function Kz(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=Tc(e,Bz),l=i.map((c,u)=>{var f=Dt(Dt({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return RA(n,f)});return E.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function qz(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=Tc(e,Fz),l=i.map((c,u)=>{var f=Dt(Dt({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return RA(n,f)});return E.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Yz(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 E.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 E.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function Gz(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 E.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 E.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var Xz=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return MO(dg(Dt(Dt(Dt({},hg),r),{},{ticks:jO(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},Zz=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return MO(dg(Dt(Dt(Dt({},hg),r),{},{ticks:jO(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},Jz={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Bu(e){var t=$O(),r=LO(),n=RO(),i=Dt(Dt({},kt(e,Jz)),{},{x:ae(e.x)?e.x:n.left,y:ae(e.y)?e.y:n.top,width:ae(e.width)?e.width:n.width,height:ae(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=Gt(),p=re(T=>kb(T,"xAxis",a,m)),g=re(T=>kb(T,"yAxis",o,m));if(!ae(c)||c<=0||!ae(u)||u<=0||!ae(s)||s!==+s||!ae(l)||l!==+l)return null;var v=i.verticalCoordinatesGenerator||Xz,x=i.horizontalCoordinatesGenerator||Zz,{horizontalPoints:w,verticalPoints:y}=i;if((!w||!w.length)&&typeof x=="function"){var _=d&&d.length,O=x({yAxis:g?Dt(Dt({},g),{},{ticks:_?d:g.ticks}):void 0,width:t,height:r,offset:n},_?!0:f);ko(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(w=O)}if((!y||!y.length)&&typeof v=="function"){var A=h&&h.length,P=v({xAxis:p?Dt(Dt({},p),{},{ticks:A?h:p.ticks}):void 0,width:t,height:r,offset:n},A?!0:f);ko(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof P,"]")),Array.isArray(P)&&(y=P)}return E.createElement("g",{className:"recharts-cartesian-grid"},E.createElement(Uz,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),E.createElement(Yz,ki({},i,{horizontalPoints:w})),E.createElement(Gz,ki({},i,{verticalPoints:y})),E.createElement(Kz,ki({},i,{offset:n,horizontalPoints:w,xAxis:p,yAxis:g})),E.createElement(qz,ki({},i,{offset:n,verticalPoints:y,xAxis:p,yAxis:g})))}Bu.displayName="CartesianGrid";var $A=(e,t,r,n)=>qn(e,"xAxis",t,n),LA=(e,t,r,n)=>Kn(e,"xAxis",t,n),BA=(e,t,r,n)=>qn(e,"yAxis",r,n),FA=(e,t,r,n)=>Kn(e,"yAxis",r,n),Qz=$([me,$A,BA,LA,FA],(e,t,r,n,i)=>Qn(e,"xAxis")?Ko(t,n,!1):Ko(r,i,!1)),eW=(e,t,r,n,i)=>i;function tW(e){return e.type==="line"}var rW=$([ju,eW],(e,t)=>e.filter(tW).find(r=>r.id===t)),nW=$([me,$A,BA,LA,FA,rW,Qz,Pu],(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 AW({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:o,displayedData:h})}}),iW=["id"],aW=["type","layout","connectNulls","needClip"],oW=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Nx(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 tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nx(Object(r),!0).forEach(function(n){sW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sW(e,t,r){return(t=lW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lW(e){var t=cW(e,"string");return typeof t=="symbol"?t:t+""}function cW(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 mg(e,t){if(e==null)return{};var r,n,i=uW(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 uW(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 Ki(){return Ki=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},Ki.apply(null,arguments)}var fW=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Va(r,t),payload:e}]};function dW(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:Va(o,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var zA=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function hW(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}var pW=(e,t,r)=>{var n=r.reduce((f,d)=>f+d);if(!n)return zA(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[...hW(r,i),...s,...u].map(f=>"".concat(f,"px")).join(", ")};function mW(e,t){var r;if(E.isValidElement(e))r=E.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var n=ye("recharts-line-dot",typeof e!="boolean"?e.className:"");r=E.createElement(mA,Ki({},t,{className:n}))}return r}function gW(e,t){return e==null?!1:t?!0:e.length===1}function vW(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n;if(!gW(r,i))return null;var{id:s}=n,l=mg(n,iW),c=__(i),u=tn(l),f=Ze(i,!0),d=r.map((m,p)=>{var g=tr(tr(tr({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 mW(i,g)}),h={clipPath:o?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return E.createElement(Ct,Ki({className:"recharts-line-dots",key:"dots"},h),d)}function yW(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 tr(tr({},o),{},{value:a.value,payload:a.payload,viewBox:o,parentViewBox:void 0,fill:void 0})}),[n]);return E.createElement(hA,{value:t?i:null},r)}function Ix(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:l,needClip:c}=a,u=mg(a,aW),f=tr(tr({},Ze(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 E.createElement(E.Fragment,null,n?.length>1&&E.createElement(Vp,Ki({},f,{pathRef:r})),E.createElement(vW,{points:n,clipPathId:t,props:a}))}function bW(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function xW(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,x=Ss(r,"recharts-line-"),[w,y]=k.useState(!1),_=!w,O=k.useCallback(()=>{typeof p=="function"&&p(),y(!1)},[p]),A=k.useCallback(()=>{typeof g=="function"&&g(),y(!0)},[g]),P=bW(n.current),T=a.current;return E.createElement(yW,{points:o,showLabels:_},r.children,E.createElement(Os,{animationId:x,begin:c,duration:u,isActive:l,easing:f,onAnimationEnd:O,onAnimationStart:A,key:x},I=>{var j=et(T,P+T,I),S=Math.min(j,P),D;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map(W=>parseFloat(W));D=pW(S,P,M)}else D=zA(P,S);else D=s==null?void 0:String(s);if(v){var R=v.length/o.length,z=I===1?o:o.map((W,Y)=>{var G=Math.floor(Y*R);if(v[G]){var L=v[G];return tr(tr({},W),{},{x:et(L.x,W.x,I),y:et(L.y,W.y,I)})}return d?tr(tr({},W),{},{x:et(h*2,W.x,I),y:et(m/2,W.y,I)}):tr(tr({},W),{},{x:W.x,y:W.y})});return i.current=z,E.createElement(Ix,{props:r,points:z,clipPathId:t,pathRef:n,strokeDasharray:D})}return I>0&&P>0&&(i.current=o,a.current=S),E.createElement(Ix,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:D})}),E.createElement(Zm,{label:r.label}))}function wW(e){var{clipPathId:t,props:r}=e,n=k.useRef(null),i=k.useRef(0),a=k.useRef(null);return E.createElement(xW,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var _W=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:ze(e.payload,t)});class OW 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=ye("recharts-line",a),p=d,{r:g=3,strokeWidth:v=2}=(t=Ze(n,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},x=__(n),w=g*2+v;return E.createElement(E.Fragment,null,E.createElement(Ct,{className:m},h&&E.createElement("defs",null,E.createElement(CA,{clipPathId:p,xAxisId:o,yAxisId:s}),!x&&E.createElement("clipPath",{id:"clipPath-dots-".concat(p)},E.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:f+w}))),E.createElement(PA,{xAxisId:o,yAxisId:s,data:i,dataPointFormatter:_W,errorBarOffset:0},E.createElement(wW,{props:this.props,clipPathId:p}))),E.createElement(H3,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var WA={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!ei.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function SW(e){var t=kt(e,WA),{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=mg(t,oW),{needClip:v}=ug(h,m),x=lg(),w=xu(),y=Gt(),_=re(I=>nW(I,h,m,y,p));if(w!=="horizontal"&&w!=="vertical"||_==null||x==null)return null;var{height:O,width:A,x:P,y:T}=x;return E.createElement(OW,Ki({},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:_,layout:w,height:O,width:A,left:P,top:T,needClip:v}))}function AW(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=ze(c,o);if(t==="horizontal"){var d=d0({axis:r,ticks:i,bandSize:s,entry:c,index:u}),h=Ge(f)?null:n.scale(f);return{x:d,y:h,value:f,payload:c}}var m=Ge(f)?null:r.scale(f),p=d0({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 EW(e){var t=kt(e,WA),r=Gt();return E.createElement(og,{id:t.id,type:"line"},n=>E.createElement(E.Fragment,null,E.createElement(_A,{legendPayload:fW(t)}),E.createElement(ag,{fn:dW,args:t}),E.createElement(SA,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),E.createElement(SW,Ki({},t,{id:n}))))}var $i=E.memo(EW);$i.displayName="Line";var PW=["dangerouslySetInnerHTML","ticks"],CW=["id"],kW=["domain"],TW=["domain"];function Xh(){return Xh=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},Xh.apply(null,arguments)}function Mc(e,t){if(e==null)return{};var r,n,i=MW(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 MW(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 jW(e){var t=ot();return k.useEffect(()=>(t(M3(e)),()=>{t(j3(e))}),[e,t]),null}var DW=e=>{var{xAxisId:t,className:r}=e,n=re(zp),i=Gt(),a="xAxis",o=re(g=>Xa(g,a,t,i)),s=re(g=>kS(g,a,t,i)),l=re(g=>AS(g,t)),c=re(g=>fL(g,t)),u=re(g=>rS(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:f,ticks:d}=e,h=Mc(e,PW),{id:m}=u,p=Mc(u,CW);return E.createElement(pg,Xh({},h,p,{scale:o,x:c.x,y:c.y,width:l.width,height:l.height,className:ye("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:s}))},NW={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},IW=e=>{var t,r,n,i,a,o=kt(e,NW);return E.createElement(E.Fragment,null,E.createElement(jW,{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}),E.createElement(DW,o))},RW=(e,t)=>{var{domain:r}=e,n=Mc(e,kW),{domain:i}=t,a=Mc(t,TW);return Ia(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Ia({domain:r},{domain:i}):!1},Fu=E.memo(IW,RW);Fu.displayName="XAxis";var $W=["dangerouslySetInnerHTML","ticks"],LW=["id"],BW=["domain"],FW=["domain"];function Zh(){return Zh=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},Zh.apply(null,arguments)}function jc(e,t){if(e==null)return{};var r,n,i=zW(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 zW(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 WW(e){var t=ot();return k.useEffect(()=>(t(D3(e)),()=>{t(N3(e))}),[e,t]),null}var VW=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=k.useRef(null),o=k.useRef(null),s=re(zp),l=Gt(),c=ot(),u="yAxis",f=re(_=>Xa(_,u,t,l)),d=re(_=>ES(_,t)),h=re(_=>hL(_,t)),m=re(_=>kS(_,u,t,l)),p=re(_=>nS(_,t));if(k.useLayoutEffect(()=>{if(!(n!=="auto"||!d||Xm(i)||k.isValidElement(i)||p==null)){var _=a.current;if(_){var O=_.getCalculatedWidth();Math.round(d.width)!==Math.round(O)&&c(I3({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,x=jc(e,$W),{id:w}=p,y=jc(p,LW);return E.createElement(pg,Zh({},x,y,{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:ye("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:m}))},HW={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},UW=e=>{var t,r,n,i,a,o=kt(e,HW);return E.createElement(E.Fragment,null,E.createElement(WW,{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}),E.createElement(VW,o))},KW=(e,t)=>{var{domain:r}=e,n=jc(e,BW),{domain:i}=t,a=jc(t,FW);return Ia(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Ia({domain:r},{domain:i}):!1},es=E.memo(UW,KW);es.displayName="YAxis";var yl={exports:{}},Rd={};/**
|
|
183
|
+
`).concat(y.x,",").concat(y.y),O=Ge(e.id)?Vo("recharts-radial-line-"):e.id;return E.createElement("text",pn({},n,{dominantBaseline:"central",className:ye("recharts-radial-bar-label",o)}),E.createElement("defs",null,E.createElement("path",{id:O,d:_})),E.createElement("textPath",{xlinkHref:"#".concat(O)},r))},qF=(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}=ut(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}=ut(n,i,d,c);return{x:h,y:m,textAnchor:"middle",verticalAnchor:"middle"}},fA=e=>"cx"in e&&ae(e.cx),YF=(e,t)=>{var{parentViewBox:r,offset:n,position:i}=e,a;r!=null&&!fA(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 x={x:o+l/2,y:s-u*n,textAnchor:"middle",verticalAnchor:d};return nt(nt({},x),a?{height:Math.max(s-a.y,0),width:l}:{})}if(i==="bottom"){var w={x:o+l/2,y:s+c+f,textAnchor:"middle",verticalAnchor:h};return nt(nt({},w),a?{height:Math.max(a.y+a.height-(s+c),0),width:l}:{})}if(i==="left"){var y={x:o-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return nt(nt({},y),a?{width:Math.max(y.x-a.x,0),height:c}:{})}if(i==="right"){var _={x:o+l+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"};return nt(nt({},_),a?{width:Math.max(a.x+a.width-_.x,0),height:c}:{})}var O=a?{width:l,height:c}:{};return i==="insideLeft"?nt({x:o+p,y:s+c/2,textAnchor:v,verticalAnchor:"middle"},O):i==="insideRight"?nt({x:o+l-p,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},O):i==="insideTop"?nt({x:o+l/2,y:s+f,textAnchor:"middle",verticalAnchor:h},O):i==="insideBottom"?nt({x:o+l/2,y:s+c-f,textAnchor:"middle",verticalAnchor:d},O):i==="insideTopLeft"?nt({x:o+p,y:s+f,textAnchor:v,verticalAnchor:h},O):i==="insideTopRight"?nt({x:o+l-p,y:s+f,textAnchor:g,verticalAnchor:h},O):i==="insideBottomLeft"?nt({x:o+p,y:s+c-f,textAnchor:v,verticalAnchor:d},O):i==="insideBottomRight"?nt({x:o+l-p,y:s+c-f,textAnchor:g,verticalAnchor:d},O):i&&typeof i=="object"&&(ae(i.x)||Ei(i.x))&&(ae(i.y)||Ei(i.y))?nt({x:o+It(i.x,l),y:s+It(i.y,c),textAnchor:"end",verticalAnchor:"end"},O):nt({x:o+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},O)},GF={offset:5};function Rn(e){var t=kt(e,GF),{viewBox:r,position:n,value:i,children:a,content:o,className:s="",textBreakAll:l,labelRef:c}=t,u=VF(),f=uA(),d=n==="center"?f:u??f,h=r||d;if(!h||Ge(i)&&Ge(a)&&!k.isValidElement(o)&&typeof o!="function")return null;var m=nt(nt({},t),{},{viewBox:h});if(k.isValidElement(o)){var{labelRef:p}=m,g=RF(m,IF);return k.cloneElement(o,g)}var v;if(typeof o=="function"){if(v=k.createElement(o,m),k.isValidElement(v))return v}else v=HF(t);var x=fA(h),w=Ze(t,!0);if(x&&(n==="insideStart"||n==="insideEnd"||n==="end"))return KF(t,n,v,w,h);var y=x?qF(h,t.offset,t.position):YF(t,h);return E.createElement(Lu,pn({ref:c,className:ye("recharts-label",s)},w,y,{breakAll:l}),v)}Rn.displayName="Label";var XF=(e,t,r)=>{if(!e)return null;var n={viewBox:t,labelRef:r};return e===!0?E.createElement(Rn,pn({key:"label-implicit"},n)):Zr(e)?E.createElement(Rn,pn({key:"label-implicit",value:e},n)):k.isValidElement(e)?e.type===Rn?k.cloneElement(e,nt({key:"label-implicit"},n)):E.createElement(Rn,pn({key:"label-implicit",content:e},n)):Xm(e)?E.createElement(Rn,pn({key:"label-implicit",content:e},n)):e&&typeof e=="object"?E.createElement(Rn,pn({},e,{key:"label-implicit"},n)):null};function ZF(e){var{label:t}=e,r=uA();return XF(t,r)||null}var Cd={},kd={},ax;function JF(){return ax||(ax=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return r[r.length-1]}e.last=t})(kd)),kd}var Td={},ox;function QF(){return ox||(ox=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(r){return Array.isArray(r)?r:Array.from(r)}e.toArray=t})(Td)),Td}var sx;function e6(){return sx||(sx=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=JF(),r=QF(),n=Dp();function i(a){if(n.isArrayLike(a))return t.last(r.toArray(a))}e.last=i})(Cd)),Cd}var Md,lx;function t6(){return lx||(lx=1,Md=e6().last),Md}var r6=t6();const n6=En(r6);var i6=["valueAccessor"],a6=["dataKey","clockWise","id","textBreakAll"];function Ac(){return Ac=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},Ac.apply(null,arguments)}function cx(e,t){if(e==null)return{};var r,n,i=o6(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 o6(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 s6=e=>Array.isArray(e.value)?n6(e.value):e.value,dA=k.createContext(void 0),hA=dA.Provider,pA=k.createContext(void 0),l6=pA.Provider;function c6(){return k.useContext(dA)}function u6(){return k.useContext(pA)}function Wl(e){var{valueAccessor:t=s6}=e,r=cx(e,i6),{dataKey:n,clockWise:i,id:a,textBreakAll:o}=r,s=cx(r,a6),l=c6(),c=u6(),u=l||c;return!u||!u.length?null:E.createElement(Ct,{className:"recharts-label-list"},u.map((f,d)=>{var h,m=Ge(n)?t(f,d):ze(f&&f.payload,n),p=Ge(a)?{}:{id:"".concat(a,"-").concat(d)};return E.createElement(Rn,Ac({},Ze(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 Zm(e){var{label:t}=e;return t?t===!0?E.createElement(Wl,{key:"labelList-implicit"}):E.isValidElement(t)||Xm(t)?E.createElement(Wl,{key:"labelList-implicit",content:t}):typeof t=="object"?E.createElement(Wl,Ac({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function qh(){return qh=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},qh.apply(null,arguments)}var mA=e=>{var{cx:t,cy:r,r:n,className:i}=e,a=ye("recharts-dot",i);return t===+t&&r===+r&&n===+n?E.createElement("circle",qh({},tn(e),Cp(e),{className:a,cx:t,cy:r,r:n})):null},gA=e=>e.graphicalItems.polarItems,f6=$([Xe,Ts],Sm),Jm=$([gA,st,f6],Am),d6=$([Jm],Em),Qm=$([d6,hm],Pm),h6=$([Qm,st,Jm],km),p6=$([Qm,st,Jm],(e,t,r)=>r.length>0?e.flatMap(n=>r.flatMap(i=>{var a,o=ze(n,(a=t.dataKey)!==null&&a!==void 0?a:i.dataKey);return{value:o,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(n=>({value:ze(n,t.dataKey),errorDomain:[]})):e.map(n=>({value:n,errorDomain:[]}))),ux=()=>{},m6=$([st,bS,ux,p6,ux,me,Xe],Mm),vA=$([st,me,Qm,h6,ks,Xe,m6],jm),g6=$([vA,st,Ga],Im);$([st,vA,g6,Xe],$m);var v6={radiusAxis:{},angleAxis:{}},yA=fr({name:"polarAxis",initialState:v6,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:lG,removeRadiusAxis:cG,addAngleAxis:uG,removeAngleAxis:fG}=yA.actions,y6=yA.reducer;function fx(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 dx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?fx(Object(r),!0).forEach(function(n){b6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):fx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function b6(e,t,r){return(t=x6(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function x6(e){var t=w6(e,"string");return typeof t=="symbol"?t:t+""}function w6(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 _6=(e,t)=>t,eg=$([gA,_6],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),O6=[],tg=(e,t,r)=>r?.length===0?O6:r,bA=$([hm,eg,tg],(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=>dx(dx({},t.presentationProps),a.props))),i!=null)return i}}),S6=$([bA,eg,tg],(e,t,r)=>{if(!(e==null||t==null))return e.map((n,i)=>{var a,o=ze(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:Va(o,t.dataKey),color:s,payload:n,type:t.legendType}})}),A6=$([bA,eg,tg,mt],(e,t,r,n)=>{if(!(t==null||e==null))return _3({offset:n,pieSettings:t,displayedData:e,cells:r})}),jd={},hx;function E6(){return hx||(hx=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})(jd)),jd}var Dd,px;function P6(){return px||(px=1,Dd=E6().isPlainObject),Dd}var C6=P6();const k6=En(C6);function mx(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 gx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mx(Object(r),!0).forEach(function(n){T6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T6(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=j6(e,"string");return typeof t=="symbol"?t:t+""}function j6(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 Ec(){return Ec=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},Ec.apply(null,arguments)}var vx=(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},D6={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},N6=e=>{var t=kt(e,D6),{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),x=k.useRef(r),w=k.useRef(n),y=Ss(e,"trapezoid-");if(k.useEffect(()=>{if(d.current&&d.current.getTotalLength)try{var M=d.current.getTotalLength();M&&m(M)}catch{}},[]),r!==+r||n!==+n||i!==+i||a!==+a||o!==+o||i===0&&a===0||o===0)return null;var _=ye("recharts-trapezoid",s);if(!f)return E.createElement("g",null,E.createElement("path",Ec({},Ze(t,!0),{className:_,d:vx(r,n,i,a,o)})));var O=p.current,A=g.current,P=v.current,T=x.current,I=w.current,j="0px ".concat(h===-1?1:h,"px"),S="".concat(h,"px 0px"),D=VO(["strokeDasharray"],c,l);return E.createElement(Os,{animationId:y,key:y,canBegin:h>0,duration:c,easing:l,isActive:f,begin:u},M=>{var R=et(O,i,M),z=et(A,a,M),W=et(P,o,M),Y=et(T,r,M),G=et(I,n,M);d.current&&(p.current=R,g.current=z,v.current=W,x.current=Y,w.current=G);var L=M>0?{transition:D,strokeDasharray:S}:{strokeDasharray:j};return E.createElement("path",Ec({},Ze(t,!0),{className:_,d:vx(Y,G,R,z,W),ref:d,style:gx(gx({},L),t.style)}))})},I6=["option","shapeType","propTransformer","activeClassName","isActive"];function R6(e,t){if(e==null)return{};var r,n,i=$6(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 $6(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 yx(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 Pc(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yx(Object(r),!0).forEach(function(n){L6(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function L6(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=F6(e,"string");return typeof t=="symbol"?t:t+""}function F6(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 z6(e,t){return Pc(Pc({},t),e)}function W6(e,t){return e==="symbols"}function bx(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return E.createElement(qO,r);case"trapezoid":return E.createElement(N6,r);case"sector":return E.createElement(XO,r);case"symbols":if(W6(t))return E.createElement(z_,r);break;default:return null}}function V6(e){return k.isValidElement(e)?e.props:e}function xA(e){var{option:t,shapeType:r,propTransformer:n=z6,activeClassName:i="recharts-active-shape",isActive:a}=e,o=R6(e,I6),s;if(k.isValidElement(t))s=k.cloneElement(t,Pc(Pc({},o),V6(t)));else if(typeof t=="function")s=t(o);else if(k6(t)&&typeof t!="boolean"){var l=n(t,o);s=E.createElement(bx,{shapeType:r,elementProps:l})}else{var c=o;s=E.createElement(bx,{shapeType:r,elementProps:c})}return a?E.createElement(Ct,{className:i},s):s}var rg=(e,t)=>{var r=ot();return(n,i)=>a=>{e?.(n,i,a),r(IS({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}},ng=e=>{var t=ot();return(r,n)=>i=>{e?.(r,n,i),t(SL())}},ig=(e,t)=>{var r=ot();return(n,i)=>a=>{e?.(n,i,a),r(AL({activeIndex:String(i),activeDataKey:t,activeCoordinate:n.tooltipPosition}))}};function ag(e){var{fn:t,args:r}=e,n=ot(),i=Gt();return k.useEffect(()=>{if(!i){var a=t(r);return n(wL(a)),()=>{n(_L(a))}}},[t,r,n,i]),null}var wA=()=>{};function _A(e){var{legendPayload:t}=e,r=ot(),n=Gt();return k.useEffect(()=>n?wA:(r(FO(t)),()=>{r(zO(t))}),[r,n,t]),null}function H6(e){var{legendPayload:t}=e,r=ot(),n=re(me);return k.useEffect(()=>n!=="centric"&&n!=="radial"?wA:(r(FO(t)),()=>{r(zO(t))}),[r,n,t]),null}var Nd,U6=()=>{var[e]=E.useState(()=>Vo("uid-"));return e},K6=(Nd=E.useId)!==null&&Nd!==void 0?Nd:U6;function q6(e,t){var r=K6();return t||(e?"".concat(e,"-").concat(r):r)}var Y6=k.createContext(void 0),og=e=>{var{id:t,type:r,children:n}=e,i=q6("recharts-".concat(r),t);return E.createElement(Y6.Provider,{value:i},n(i))},G6={cartesianItems:[],polarItems:[]},OA=fr({name:"graphicalItems",initialState:G6,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:r,next:n}=t.payload,i=yn(e).cartesianItems.indexOf(r);i>-1&&(e.cartesianItems[i]=n)},removeCartesianGraphicalItem(e,t){var r=yn(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=yn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)}}}),{addCartesianGraphicalItem:X6,replaceCartesianGraphicalItem:Z6,removeCartesianGraphicalItem:J6,addPolarGraphicalItem:Q6,removePolarGraphicalItem:e3}=OA.actions,t3=OA.reducer;function SA(e){var t=ot(),r=k.useRef(null);return k.useEffect(()=>{r.current===null?t(X6(e)):r.current!==e&&t(Z6({prev:r.current,next:e})),r.current=e},[t,e]),k.useEffect(()=>()=>{r.current&&(t(J6(r.current)),r.current=null)},[t]),null}function r3(e){var t=ot();return k.useEffect(()=>(t(Q6(e)),()=>{t(e3(e))}),[t,e]),null}var n3=["onMouseEnter","onClick","onMouseLeave"],i3=["id"],a3=["id"];function sg(e,t){if(e==null)return{};var r,n,i=o3(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 o3(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 xx(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?xx(Object(r),!0).forEach(function(n){s3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function s3(e,t,r){return(t=l3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function l3(e){var t=c3(e,"string");return typeof t=="symbol"?t:t+""}function c3(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 Gn(){return Gn=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},Gn.apply(null,arguments)}function u3(e){var t=k.useMemo(()=>kp(e.children,Qr),[e.children]),r=re(n=>S6(n,e.id,t));return r==null?null:E.createElement(H6,{legendPayload:r})}function f3(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:Va(s,t),hide:l,type:c,color:o,unit:""}}}var d3=(e,t)=>e>t?"start":e<t?"end":"middle",h3=(e,t,r)=>It(typeof t=="function"?t(e):t,r,r*.8),p3=(e,t,r)=>{var{top:n,left:i,width:a,height:o}=t,s=kO(a,o),l=i+It(e.cx,a,a/2),c=n+It(e.cy,o,o/2),u=It(e.innerRadius,s,0),f=h3(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}},m3=(e,t)=>{var r=wt(t-e),n=Math.min(Math.abs(t-e),360);return r*n};function g3(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var v3=(e,t)=>{if(E.isValidElement(e))return E.cloneElement(e,t);if(typeof e=="function")return e(t);var r=ye("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return E.createElement(Vp,Gn({},t,{type:"linear",className:r}))},y3=(e,t,r)=>{if(E.isValidElement(e))return E.cloneElement(e,t);var n=r;if(typeof e=="function"&&(n=e(t),E.isValidElement(n)))return n;var i=ye("recharts-pie-label-text",g3(e));return E.createElement(Lu,Gn({},t,{alignmentBaseline:"middle",className:i}),n)};function b3(e){var{sectors:t,props:r,showLabels:n}=e,{label:i,labelLine:a,dataKey:o}=r;if(!n||!i||!t)return null;var s=tn(r),l=Ze(i,!1),c=Ze(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=ut(d.cx,d.cy,d.outerRadius+u,m),g=qe(qe(qe(qe({},s),d),{},{stroke:"none"},l),{},{index:h,textAnchor:d3(p.x,d.cx)},p),v=qe(qe(qe(qe({},s),d),{},{fill:"none",stroke:d.fill},c),{},{index:h,points:[ut(d.cx,d.cy,d.outerRadius,m),p],key:"line"});return E.createElement(Ct,{key:"label-".concat(d.startAngle,"-").concat(d.endAngle,"-").concat(d.midAngle,"-").concat(h)},a&&v3(a,v),y3(i,g,ze(d,o)))});return E.createElement(Ct,{className:"recharts-pie-labels"},f)}function x3(e){var{sectors:t,props:r,showLabels:n}=e,{label:i}=r;return typeof i=="object"&&i!=null&&"position"in i?E.createElement(Zm,{label:i}):E.createElement(b3,{sectors:t,props:r,showLabels:n})}function w3(e){var{sectors:t,activeShape:r,inactiveShape:n,allOtherPieProps:i}=e,a=re(Yn),{onMouseEnter:o,onClick:s,onMouseLeave:l}=i,c=sg(i,n3),u=rg(o,i.dataKey),f=ng(l),d=ig(s,i.dataKey);return t==null||t.length===0?null:E.createElement(E.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,x=qe(qe({},h),{},{stroke:h.stroke,tabIndex:-1,[NO]:m,[IO]:i.dataKey});return E.createElement(Ct,Gn({tabIndex:-1,className:"recharts-pie-sector"},su(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)}),E.createElement(xA,Gn({option:v,isActive:p,shapeType:"sector"},x)))}))}function _3(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=m3(s,l),m=Math.abs(h),p=n.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,g=n.filter(O=>ze(O,c,0)!==0).length,v=(m>=360?g:g-1)*p,x=m-g*d-v,w=n.reduce((O,A)=>{var P=ze(A,c,0);return O+(ae(P)?P:0)},0),y;if(w>0){var _;y=n.map((O,A)=>{var P=ze(O,c,0),T=ze(O,u,A),I=p3(r,a,O),j=(ae(P)?P:0)/w,S,D=qe(qe({},O),i&&i[A]&&i[A].props);A?S=_.endAngle+wt(h)*p*(P!==0?1:0):S=s;var M=S+wt(h)*((P!==0?d:0)+j*x),R=(S+M)/2,z=(I.innerRadius+I.outerRadius)/2,W=[{name:T,value:P,payload:D,dataKey:c,type:f}],Y=ut(I.cx,I.cy,z,R);return _=qe(qe(qe(qe({},r.presentationProps),{},{percent:j,cornerRadius:o,name:T,tooltipPayload:W,midAngle:R,middleRadius:z,tooltipPosition:Y},D),I),{},{value:P,startAngle:S,endAngle:M,payload:D,paddingAngle:wt(h)*p}),_})}return y}function O3(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 E.createElement(l6,{value:t?i:void 0},n)}function S3(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=Ss(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 E.createElement(O3,{showLabels:!m,sectors:n},E.createElement(Os,{animationId:d,begin:a,duration:o,isActive:i,easing:s,onAnimationStart:v,onAnimationEnd:g,key:d},x=>{var w=[],y=n&&n[0],_=y?.startAngle;return n?.forEach((O,A)=>{var P=h&&h[A],T=A>0?Fi(O,"paddingAngle",0):0;if(P){var I=et(P.endAngle-P.startAngle,O.endAngle-O.startAngle,x),j=qe(qe({},O),{},{startAngle:_+T,endAngle:_+I+T});w.push(j),_=j.endAngle}else{var{endAngle:S,startAngle:D}=O,M=et(0,S-D,x),R=qe(qe({},O),{},{startAngle:_+T,endAngle:_+M+T});w.push(R),_=R.endAngle}}),r.current=w,E.createElement(Ct,null,E.createElement(w3,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),E.createElement(x3,{showLabels:!m,sectors:n,props:t}),t.children)}var A3={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!ei.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function E3(e){var{id:t}=e,r=sg(e,i3),{hide:n,className:i,rootTabIndex:a}=e,o=k.useMemo(()=>kp(e.children,Qr),[e.children]),s=re(u=>A6(u,t,o)),l=k.useRef(null),c=ye("recharts-pie",i);return n||s==null?(l.current=null,E.createElement(Ct,{tabIndex:a,className:c})):E.createElement(E.Fragment,null,E.createElement(ag,{fn:f3,args:qe(qe({},e),{},{sectors:s})}),E.createElement(Ct,{tabIndex:a,className:c},E.createElement(S3,{props:qe(qe({},r),{},{sectors:s}),previousSectorsRef:l})))}function Rs(e){var t=kt(e,A3),{id:r}=t,n=sg(t,a3),i=tn(n);return E.createElement(og,{id:r,type:"pie"},a=>E.createElement(E.Fragment,null,E.createElement(r3,{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}),E.createElement(u3,Gn({},n,{id:a})),E.createElement(E3,Gn({},n,{id:a}))))}Rs.displayName="Pie";function wx(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?wx(Object(r),!0).forEach(function(n){P3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function P3(e,t,r){return(t=C3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function C3(e){var t=k3(e,"string");return typeof t=="symbol"?t:t+""}function k3(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 T3={xAxis:{},yAxis:{},zAxis:{}},AA=fr({name:"cartesianAxis",initialState:T3,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]=_x(_x({},e.yAxis[r]),{},{width:n}))}}}),{addXAxis:M3,removeXAxis:j3,addYAxis:D3,removeYAxis:N3,addZAxis:dG,removeZAxis:hG,updateYAxisWidth:I3}=AA.actions,R3=AA.reducer,$3=$([mt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),L3=$([$3,Pn,Cn],(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)}}),lg=()=>re(L3),B3=()=>re(fB);function Ox(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 Sx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ox(Object(r),!0).forEach(function(n){F3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ox(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function F3(e,t,r){return(t=z3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function z3(e){var t=W3(e,"string");return typeof t=="symbol"?t:t+""}function W3(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 V3=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=Sx(Sx({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},Ze(i,!1)),Cp(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,o):typeof i=="function"?s=i(o):s=E.createElement(mA,o),E.createElement(Ct,{className:"recharts-active-dot"},s)};function H3(e){var{points:t,mainColor:r,activeDot:n,itemDataKey:i}=e,a=re(Yn),o=B3();if(t==null||o==null)return null;var s=t.find(l=>o.includes(l.payload));return Ge(s)?null:V3({point:s,childIndex:Number(a),mainColor:r,dataKey:i,activeDot:n})}var U3=process.env.NODE_ENV==="production",Id="Invariant failed";function Ax(e,t){if(U3)throw new Error(Id);var r=typeof t=="function"?t():t,n=r?"".concat(Id,": ").concat(r):Id;throw new Error(n)}var K3=["x","y"];function Yh(){return Yh=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},Yh.apply(null,arguments)}function Ex(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 ho(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ex(Object(r),!0).forEach(function(n){q3(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ex(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function q3(e,t,r){return(t=Y3(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Y3(e){var t=G3(e,"string");return typeof t=="symbol"?t:t+""}function G3(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 X3(e,t){if(e==null)return{};var r,n,i=Z3(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 Z3(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 J3(e,t){var{x:r,y:n}=e,i=X3(e,K3),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 ho(ho(ho(ho(ho({},t),i),o?{x:o}:{}),l?{y:l}:{}),{},{height:u,width:d,name:t.name,radius:t.radius})}function cg(e){return E.createElement(xA,Yh({shapeType:"rectangle",propTransformer:J3,activeClassName:"recharts-active-bar"},e))}var Q3=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(n,i)=>{if(ae(t))return t;var a=ae(n)||Ge(n);return a?t(n,i):(a||(process.env.NODE_ENV!=="production"?Ax(!1,"minPointSize callback function received a value with type of ".concat(typeof n,". Currently only numbers or null/undefined are supported.")):Ax()),r)}},e8={},EA=fr({name:"errorBars",initialState:e8,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:pG,replaceErrorBar:mG,removeErrorBar:gG}=EA.actions,t8=EA.reducer,r8=["children"];function n8(e,t){if(e==null)return{};var r,n,i=i8(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 i8(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 a8={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},o8=k.createContext(a8);function PA(e){var{children:t}=e,r=n8(e,r8);return E.createElement(o8.Provider,{value:r},t)}function ug(e,t){var r,n,i=re(c=>Tn(c,e)),a=re(c=>Mn(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 CA(e){var{xAxisId:t,yAxisId:r,clipPathId:n}=e,i=lg(),{needClipX:a,needClipY:o,needClip:s}=ug(t,r);if(!s)return null;var{x:l,y:c,width:u,height:f}=i;return E.createElement("clipPath",{id:"clipPath-".concat(n)},E.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 s8=["onMouseEnter","onMouseLeave","onClick"],l8=["value","background","tooltipPosition"],c8=["id"],u8=["onMouseEnter","onClick","onMouseLeave"];function Xn(){return Xn=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},Xn.apply(null,arguments)}function Px(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 $t(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Px(Object(r),!0).forEach(function(n){f8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Px(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function f8(e,t,r){return(t=d8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function d8(e){var t=h8(e,"string");return typeof t=="symbol"?t:t+""}function h8(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 Cc(e,t){if(e==null)return{};var r,n,i=p8(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 p8(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 m8=e=>{var{dataKey:t,name:r,fill:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Va(r,t),payload:e}]};function g8(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:Va(a,t),hide:o,type:e.tooltipType,color:e.fill,unit:s}}}function v8(e){var t=re(Yn),{data:r,dataKey:n,background:i,allOtherBarProps:a}=e,{onMouseEnter:o,onMouseLeave:s,onClick:l}=a,c=Cc(a,s8),u=rg(o,n),f=ng(s),d=ig(l,n);if(!i||r==null)return null;var h=Ze(i,!1);return E.createElement(E.Fragment,null,r.map((m,p)=>{var{value:g,background:v,tooltipPosition:x}=m,w=Cc(m,l8);if(!v)return null;var y=u(m,p),_=f(m,p),O=d(m,p),A=$t($t($t($t($t({option:i,isActive:String(p)===t},w),{},{fill:"#eee"},v),h),su(c,m,p)),{},{onMouseEnter:y,onMouseLeave:_,onClick:O,dataKey:n,index:p,className:"recharts-bar-background-rectangle"});return E.createElement(cg,Xn({key:"background-bar-".concat(A.index)},A))}))}function y8(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 $t($t({},o),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:o,fill:a.fill})});return E.createElement(hA,{value:t?i:void 0},r)}function b8(e){var{shape:t,activeBar:r,baseProps:n,entry:i,index:a,dataKey:o}=e,s=re(Yn),l=re(YS),c=r&&String(a)===s&&(l==null||o===l),u=c?r:t;return E.createElement(cg,Xn({},n,i,{isActive:c,option:u,index:a,dataKey:o}))}function x8(e){var{shape:t,baseProps:r,entry:n,index:i,dataKey:a}=e;return E.createElement(cg,Xn({},r,n,{isActive:!1,option:t,index:i,dataKey:a}))}function w8(e){var{data:t,props:r}=e,n=tn(r),{id:i}=n,a=Cc(n,c8),{shape:o,dataKey:s,activeBar:l}=r,{onMouseEnter:c,onClick:u,onMouseLeave:f}=r,d=Cc(r,u8),h=rg(c,s),m=ng(f),p=ig(u,s);return t?E.createElement(E.Fragment,null,t.map((g,v)=>E.createElement(Ct,Xn({className:"recharts-bar-rectangle"},su(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?E.createElement(b8,{shape:o,activeBar:l,baseProps:a,entry:g,index:v,dataKey:s}):E.createElement(x8,{shape:o,baseProps:a,entry:g,index:v,dataKey:s})))):null}function _8(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=Ss(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 E.createElement(y8,{showLabels:p,rects:n},E.createElement(Os,{animationId:d,begin:o,duration:s,isActive:a,easing:l,onAnimationEnd:g,onAnimationStart:v,key:d},x=>{var w=x===1?n:n?.map((y,_)=>{var O=f&&f[_];if(O)return $t($t({},y),{},{x:et(O.x,y.x,x),y:et(O.y,y.y,x),width:et(O.width,y.width,x),height:et(O.height,y.height,x)});if(i==="horizontal"){var A=et(0,y.height,x);return $t($t({},y),{},{y:y.y+y.height-A,height:A})}var P=et(0,y.width,x);return $t($t({},y),{},{width:P})});return x>0&&(r.current=w??null),w==null?null:E.createElement(Ct,null,E.createElement(w8,{props:t,data:w}))}),E.createElement(Zm,{label:t.label}),t.children)}function O8(e){var t=k.useRef(null);return E.createElement(_8,{previousRectanglesRef:t,props:e})}var kA=0,S8=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:ze(e,t)}};class A8 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=ye("recharts-bar",i),f=c;return E.createElement(Ct,{className:u,id:c},s&&E.createElement("defs",null,E.createElement(CA,{clipPathId:f,xAxisId:a,yAxisId:o})),E.createElement(Ct,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(f,")"):void 0},E.createElement(v8,{data:r,dataKey:n,background:l,allOtherBarProps:this.props}),E.createElement(O8,this.props)))}}var E8={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!ei.isSsr,legendType:"rect",minPointSize:kA,xAxisId:0,yAxisId:0};function P8(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}=ug(t,r),d=xu(),h=Gt(),m=kp(e.children,Qr),p=re(x=>tz(x,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,E.createElement(PA,{xAxisId:t,yAxisId:r,data:p,dataPointFormatter:S8,errorBarOffset:g},E.createElement(A8,Xn({},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 C8(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=QN({numericAxis:p});return f.map((x,w)=>{var y,_,O,A,P,T;u?y=qN(u[w],g):(y=ze(x,r),Array.isArray(y)||(y=[v,y]));var I=Q3(n,kA)(y[1],w);if(t==="horizontal"){var j,[S,D]=[s.scale(y[0]),s.scale(y[1])];_=h0({axis:o,ticks:l,bandSize:a,offset:i.offset,entry:x,index:w}),O=(j=D??S)!==null&&j!==void 0?j:void 0,A=i.size;var M=S-D;if(P=sr(M)?0:M,T={x:_,y:d.top,width:A,height:d.height},Math.abs(I)>0&&Math.abs(P)<Math.abs(I)){var R=wt(P||I)*(Math.abs(I)-Math.abs(P));O-=R,P+=R}}else{var[z,W]=[o.scale(y[0]),o.scale(y[1])];if(_=z,O=h0({axis:s,ticks:c,bandSize:a,offset:i.offset,entry:x,index:w}),A=W-z,P=i.size,T={x:d.left,y:O,width:d.width,height:P},Math.abs(I)>0&&Math.abs(A)<Math.abs(I)){var Y=wt(A||I)*(Math.abs(I)-Math.abs(A));A+=Y}}if(_==null||O==null||A==null||P==null)return null;var G=$t($t({},x),{},{x:_,y:O,width:A,height:P,value:u?y:y[1],payload:x,background:T,tooltipPosition:{x:_+A/2,y:O+P/2},parentViewBox:m},h&&h[w]&&h[w].props);return G}).filter(Boolean)}function k8(e){var t=kt(e,E8),r=Gt();return E.createElement(og,{id:t.id,type:"bar"},n=>E.createElement(E.Fragment,null,E.createElement(_A,{legendPayload:m8(t)}),E.createElement(ag,{fn:g8,args:t}),E.createElement(SA,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:JN(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:r}),E.createElement(P8,Xn({},t,{id:n}))))}var TA=E.memo(k8);TA.displayName="Bar";function Cx(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 vl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cx(Object(r),!0).forEach(function(n){T8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function T8(e,t,r){return(t=M8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function M8(e){var t=j8(e,"string");return typeof t=="symbol"?t:t+""}function j8(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 D8=(e,t)=>t,N8=(e,t,r)=>r,I8=(e,t,r,n)=>n,R8=(e,t,r,n,i)=>i,$s=$([ju,R8],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),$8=$([$s],e=>e?.maxBarSize),L8=(e,t,r,n,i,a)=>a,kx=(e,t,r)=>{var n=r??e;if(!Ge(n))return It(n,t,0)},B8=$([me,ju,D8,N8,I8],(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")),F8=(e,t,r,n)=>{var i=me(e);return i==="horizontal"?zh(e,"yAxis",r,n):zh(e,"xAxis",t,n)},z8=(e,t,r)=>{var n=me(e);return n==="horizontal"?Cb(e,"xAxis",t):Cb(e,"yAxis",r)},W8=(e,t,r)=>{var n={},i=e.filter(Mu),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=kx(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=kx(t,r,c.barSize);return{stackId:void 0,dataKeys:u,barSize:f}});return[...s,...l]},V8=$([B8,x4,z8],W8),H8=(e,t,r,n,i)=>{var a,o,s=$s(e,t,r,n,i);if(s!=null){var l=me(e),c=K2(e),{maxBarSize:u}=s,f=Ge(u)?c:u,d,h;return l==="horizontal"?(d=qn(e,"xAxis",t,n),h=Kn(e,"xAxis",t,n)):(d=qn(e,"yAxis",r,n),h=Kn(e,"yAxis",r,n)),(a=(o=Ko(d,h,!0))!==null&&o!==void 0?o:f)!==null&&a!==void 0?a:0}},MA=(e,t,r,n)=>{var i=me(e),a,o;return i==="horizontal"?(a=qn(e,"xAxis",t,n),o=Kn(e,"xAxis",t,n)):(a=qn(e,"yAxis",r,n),o=Kn(e,"yAxis",r,n)),Ko(a,o)};function U8(e,t,r,n,i){var a=n.length;if(!(a<1)){var o=It(e,r,0,!0),s,l=[];if(cr(n[0].barSize)){var c=!1,u=r/a,f=n.reduce((v,x)=>v+(x.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,x)=>{var w,y={stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:h.offset+h.size+o,size:c?u:(w=x.barSize)!==null&&w!==void 0?w:0}},_=[...v,y];return h=_[_.length-1].position,_},l)}else{var m=It(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=cr(i)?Math.min(p,i):p;s=n.reduce((v,x,w)=>[...v,{stackId:x.stackId,dataKeys:x.dataKeys,position:{offset:m+(p+o)*w+(p-g)/2,size:g}}],l)}return s}}var K8=(e,t,r,n,i,a,o)=>{var s=Ge(o)?t:o,l=U8(r,n,i!==a?i:a,e,s);return i!==a&&l!=null&&(l=l.map(c=>vl(vl({},c),{},{position:vl(vl({},c.position),{},{offset:c.position.offset-i/2})}))),l},q8=$([V8,K2,b4,q2,H8,MA,$8],K8),Y8=(e,t,r,n)=>qn(e,"xAxis",t,n),G8=(e,t,r,n)=>qn(e,"yAxis",r,n),X8=(e,t,r,n)=>Kn(e,"xAxis",t,n),Z8=(e,t,r,n)=>Kn(e,"yAxis",r,n),J8=$([q8,$s],(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}}),Q8=(e,t)=>{var r=_m(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)}}}},ez=$([F8,$s],Q8),tz=$([mt,zp,Y8,G8,X8,Z8,J8,me,Pu,MA,ez,$s,L8],(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 C8({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})}}),jA=e=>{var{chartData:t}=e,r=ot(),n=Gt();return k.useEffect(()=>n?()=>{}:(r(Lb(t)),()=>{r(Lb(void 0))}),[t,r,n]),null},Tx={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},DA=fr({name:"brush",initialState:Tx,reducers:{setBrushSettings(e,t){return t.payload==null?Tx:t.payload}}}),{setBrushSettings:vG}=DA.actions,rz=DA.reducer;function nz(e,t,r){return(t=iz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iz(e){var t=az(e,"string");return typeof t=="symbol"?t:t+""}function az(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 fg{static create(t){return new fg(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}}nz(fg,"EPS",1e-4);function oz(e){return(e%180+180)%180}var sz=function(t){var{width:r,height:n}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=oz(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)},lz={dots:[],areas:[],lines:[]},NA=fr({name:"referenceElements",initialState:lz,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=yn(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=yn(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=yn(e).lines.findIndex(n=>n===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:yG,removeDot:bG,addArea:xG,removeArea:wG,addLine:_G,removeLine:OG}=NA.actions,cz=NA.reducer,uz=k.createContext(void 0),fz=e=>{var{children:t}=e,[r]=k.useState("".concat(Vo("recharts"),"-clip")),n=lg();if(n==null)return null;var{x:i,y:a,width:o,height:s}=n;return E.createElement(uz.Provider,{value:r},E.createElement("defs",null,E.createElement("clipPath",{id:r},E.createElement("rect",{x:i,y:a,height:s,width:o}))),t)};function Ia(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 IA(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 dz(e,t,r){var n={width:e.width+t.width,height:e.height+t.height};return sz(n,r)}function hz(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 kc(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 pz(e,t){return IA(e,t+1)}function mz(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:IA(n,c)};var p=l,g,v=()=>(g===void 0&&(g=r(m,p)),g),x=m.coordinate,w=l===0||kc(e,x,v,u,s);w||(l=0,u=o,c+=1),w&&(u=x+e*(v()/2+i),l+=c)},d;c<=a.length;)if(d=f(),d)return d.v;return[]}function Mx(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 jt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mx(Object(r),!0).forEach(function(n){gz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function gz(e,t,r){return(t=vz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vz(e){var t=yz(e,"string");return typeof t=="symbol"?t:t+""}function yz(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 bz(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=jt(jt({},h),{},{tickCoord:g>0?h.coordinate-g*e:h.coordinate})}else a[d]=h=jt(jt({},h),{},{tickCoord:h.coordinate});var v=kc(e,h.tickCoord,p,s,l);v&&(l=h.tickCoord-e*(p()/2+i),a[d]=jt(jt({},h),{},{isShow:!0}))},u=o-1;u>=0;u--)c(u);return a}function xz(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=jt(jt({},u),{},{tickCoord:d>0?u.coordinate-d*e:u.coordinate});var h=kc(e,u.tickCoord,()=>f,l,c);h&&(c=u.tickCoord-e*(f/2+i),o[s-1]=jt(jt({},u),{},{isShow:!0}))}for(var m=a?s-1:s,p=function(x){var w=o[x],y,_=()=>(y===void 0&&(y=r(w,x)),y);if(x===0){var O=e*(w.coordinate-e*_()/2-l);o[x]=w=jt(jt({},w),{},{tickCoord:O<0?w.coordinate-O*e:w.coordinate})}else o[x]=w=jt(jt({},w),{},{tickCoord:w.coordinate});var A=kc(e,w.tickCoord,_,l,c);A&&(l=w.tickCoord+e*(_()/2+i),o[x]=jt(jt({},w),{},{isShow:!0}))},g=0;g<m;g++)p(g);return o}function dg(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(ae(l)||ei.isSsr){var d;return(d=pz(i,ae(l)?l:0))!==null&&d!==void 0?d:[]}var h=[],m=s==="top"||s==="bottom"?"width":"height",p=u&&m==="width"?To(u,{fontSize:t,letterSpacing:r}):{width:0,height:0},g=(w,y)=>{var _=typeof c=="function"?c(w.value,y):w.value;return m==="width"?dz(To(_,{fontSize:t,letterSpacing:r}),p,f):To(_,{fontSize:t,letterSpacing:r})[m]},v=i.length>=2?wt(i[1].coordinate-i[0].coordinate):1,x=hz(a,v,m);return l==="equidistantPreserveStart"?mz(v,x,g,i,o):(l==="preserveStart"||l==="preserveStartEnd"?h=xz(v,x,g,i,o,l==="preserveStartEnd"):h=bz(v,x,g,i,o),h.filter(w=>w.isShow))}var wz=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},_z=["axisLine","width","height","className","hide","ticks"],Oz=["viewBox"],Sz=["viewBox"];function Gh(e,t){if(e==null)return{};var r,n,i=Az(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 Az(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 Hi(){return Hi=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},Hi.apply(null,arguments)}function jx(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 ht(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jx(Object(r),!0).forEach(function(n){Ez(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ez(e,t,r){return(t=Pz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Pz(e){var t=Cz(e,"string");return typeof t=="symbol"?t:t+""}function Cz(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 hg={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 kz(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=ht(ht(ht({},l),Ze(s,!1)),{},{fill:"none"});if(a==="top"||a==="bottom"){var u=+(a==="top"&&!o||a==="bottom"&&o);c=ht(ht({},c),{},{x1:t,y1:r+u*i,x2:t+n,y2:r+u*i})}else{var f=+(a==="left"&&!o||a==="right"&&o);c=ht(ht({},c),{},{x1:t+f*n,y1:r,x2:t+f*n,y2:r+i})}return E.createElement("line",Hi({},c,{className:ye("recharts-cartesian-axis-line",Fi(s,"className"))}))}function Tz(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=ae(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 Mz(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function jz(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function Dz(e){var{option:t,tickProps:r,value:n}=e,i,a=ye(r.className,"recharts-cartesian-axis-tick-value");if(E.isValidElement(t))i=E.cloneElement(t,ht(ht({},r),{},{className:a}));else if(typeof t=="function")i=t(ht(ht({},r),{},{className:a}));else{var o="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(o=ye(o,t?.className)),i=E.createElement(Lu,Hi({},r,{className:o}),n)}return i}function Nz(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:x,getTicksConfig:w,events:y}=e,_=dg(ht(ht({},w),{},{ticks:t}),v,x),O=Mz(c,u),A=jz(c,u),P=tn(w),T=Ze(r,!1),I=ht(ht({},P),{},{fill:"none"},Ze(n,!1)),j=_.map((S,D)=>{var{line:M,tick:R}=Tz(S,f,d,h,m,c,p,u,g),z=ht(ht(ht(ht({textAnchor:O,verticalAnchor:A},P),{},{stroke:"none",fill:i},T),R),{},{index:D,payload:S,visibleTicksCount:_.length,tickFormatter:a,padding:s},l);return E.createElement(Ct,Hi({className:"recharts-cartesian-axis-tick",key:"tick-".concat(S.value,"-").concat(S.coordinate,"-").concat(S.tickCoord)},su(y,S,D)),n&&E.createElement("line",Hi({},I,M,{className:ye("recharts-cartesian-axis-tick-line",Fi(n,"className"))})),r&&E.createElement(Dz,{option:r,tickProps:z,value:"".concat(typeof a=="function"?a(S.value,D):S.value).concat(o||"")}))});return j.length>0?E.createElement("g",{className:"recharts-cartesian-axis-ticks"},j):null}var Iz=k.forwardRef((e,t)=>{var{axisLine:r,width:n,height:i,className:a,hide:o,ticks:s}=e,l=Gh(e,_z),[c,u]=k.useState(""),[f,d]=k.useState(""),h=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var p;return wz({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 x=window.getComputedStyle(v),w=x.fontSize,y=x.letterSpacing;(w!==c||y!==f)&&(u(w),d(y))}}},[c,f]);return o||n!=null&&n<=0||i!=null&&i<=0?null:E.createElement(Ct,{className:ye("recharts-cartesian-axis",a),ref:m},E.createElement(kz,{x:e.x,y:e.y,width:n,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:tn(e)}),E.createElement(Nz,{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}),E.createElement(zF,{x:e.x,y:e.y,width:e.width,height:e.height},E.createElement(ZF,{label:e.label}),e.children))}),Rz=E.memo(Iz,(e,t)=>{var{viewBox:r}=e,n=Gh(e,Oz),{viewBox:i}=t,a=Gh(t,Sz);return Ia(r,i)&&Ia(n,a)}),pg=E.forwardRef((e,t)=>{var r=kt(e,hg);return E.createElement(Rz,Hi({},r,{ref:t}))});pg.displayName="CartesianAxis";var $z=["x1","y1","x2","y2","key"],Lz=["offset"],Bz=["xAxisId","yAxisId"],Fz=["xAxisId","yAxisId"];function Dx(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 Dt(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Dx(Object(r),!0).forEach(function(n){zz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function zz(e,t,r){return(t=Wz(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wz(e){var t=Vz(e,"string");return typeof t=="symbol"?t:t+""}function Vz(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 ki(){return ki=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},ki.apply(null,arguments)}function Tc(e,t){if(e==null)return{};var r,n,i=Hz(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 Hz(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 Uz=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 E.createElement("rect",{x:n,y:i,ry:s,width:a,height:o,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function RA(e,t){var r;if(E.isValidElement(e))r=E.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=Tc(t,$z),c=tn(l),{offset:u}=c,f=Tc(c,Lz);r=E.createElement("line",ki({},f,{x1:n,y1:i,x2:a,y2:o,fill:"none",key:s}))}return r}function Kz(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=Tc(e,Bz),l=i.map((c,u)=>{var f=Dt(Dt({},s),{},{x1:t,y1:c,x2:t+r,y2:c,key:"line-".concat(u),index:u});return RA(n,f)});return E.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function qz(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=Tc(e,Fz),l=i.map((c,u)=>{var f=Dt(Dt({},s),{},{x1:c,y1:t,x2:c,y2:t+r,key:"line-".concat(u),index:u});return RA(n,f)});return E.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function Yz(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 E.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 E.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function Gz(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 E.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 E.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var Xz=(e,t)=>{var{xAxis:r,width:n,height:i,offset:a}=e;return MO(dg(Dt(Dt(Dt({},hg),r),{},{ticks:jO(r),viewBox:{x:0,y:0,width:n,height:i}})),a.left,a.left+a.width,t)},Zz=(e,t)=>{var{yAxis:r,width:n,height:i,offset:a}=e;return MO(dg(Dt(Dt(Dt({},hg),r),{},{ticks:jO(r),viewBox:{x:0,y:0,width:n,height:i}})),a.top,a.top+a.height,t)},Jz={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Bu(e){var t=$O(),r=LO(),n=RO(),i=Dt(Dt({},kt(e,Jz)),{},{x:ae(e.x)?e.x:n.left,y:ae(e.y)?e.y:n.top,width:ae(e.width)?e.width:n.width,height:ae(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=Gt(),p=re(T=>kb(T,"xAxis",a,m)),g=re(T=>kb(T,"yAxis",o,m));if(!ae(c)||c<=0||!ae(u)||u<=0||!ae(s)||s!==+s||!ae(l)||l!==+l)return null;var v=i.verticalCoordinatesGenerator||Xz,x=i.horizontalCoordinatesGenerator||Zz,{horizontalPoints:w,verticalPoints:y}=i;if((!w||!w.length)&&typeof x=="function"){var _=d&&d.length,O=x({yAxis:g?Dt(Dt({},g),{},{ticks:_?d:g.ticks}):void 0,width:t,height:r,offset:n},_?!0:f);ko(Array.isArray(O),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof O,"]")),Array.isArray(O)&&(w=O)}if((!y||!y.length)&&typeof v=="function"){var A=h&&h.length,P=v({xAxis:p?Dt(Dt({},p),{},{ticks:A?h:p.ticks}):void 0,width:t,height:r,offset:n},A?!0:f);ko(Array.isArray(P),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof P,"]")),Array.isArray(P)&&(y=P)}return E.createElement("g",{className:"recharts-cartesian-grid"},E.createElement(Uz,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),E.createElement(Yz,ki({},i,{horizontalPoints:w})),E.createElement(Gz,ki({},i,{verticalPoints:y})),E.createElement(Kz,ki({},i,{offset:n,horizontalPoints:w,xAxis:p,yAxis:g})),E.createElement(qz,ki({},i,{offset:n,verticalPoints:y,xAxis:p,yAxis:g})))}Bu.displayName="CartesianGrid";var $A=(e,t,r,n)=>qn(e,"xAxis",t,n),LA=(e,t,r,n)=>Kn(e,"xAxis",t,n),BA=(e,t,r,n)=>qn(e,"yAxis",r,n),FA=(e,t,r,n)=>Kn(e,"yAxis",r,n),Qz=$([me,$A,BA,LA,FA],(e,t,r,n,i)=>Qn(e,"xAxis")?Ko(t,n,!1):Ko(r,i,!1)),eW=(e,t,r,n,i)=>i;function tW(e){return e.type==="line"}var rW=$([ju,eW],(e,t)=>e.filter(tW).find(r=>r.id===t)),nW=$([me,$A,BA,LA,FA,rW,Qz,Pu],(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 AW({layout:e,xAxis:t,yAxis:r,xAxisTicks:n,yAxisTicks:i,dataKey:f,bandSize:o,displayedData:h})}}),iW=["id"],aW=["type","layout","connectNulls","needClip"],oW=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Nx(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 tr(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nx(Object(r),!0).forEach(function(n){sW(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function sW(e,t,r){return(t=lW(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function lW(e){var t=cW(e,"string");return typeof t=="symbol"?t:t+""}function cW(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 mg(e,t){if(e==null)return{};var r,n,i=uW(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 uW(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 Ui(){return Ui=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},Ui.apply(null,arguments)}var fW=e=>{var{dataKey:t,name:r,stroke:n,legendType:i,hide:a}=e;return[{inactive:a,dataKey:t,type:i,color:n,value:Va(r,t),payload:e}]};function dW(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:Va(o,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var zA=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function hW(e,t){for(var r=e.length%2!==0?[...e,0]:e,n=[],i=0;i<t;++i)n=[...n,...r];return n}var pW=(e,t,r)=>{var n=r.reduce((f,d)=>f+d);if(!n)return zA(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[...hW(r,i),...s,...u].map(f=>"".concat(f,"px")).join(", ")};function mW(e,t){var r;if(E.isValidElement(e))r=E.cloneElement(e,t);else if(typeof e=="function")r=e(t);else{var n=ye("recharts-line-dot",typeof e!="boolean"?e.className:"");r=E.createElement(mA,Ui({},t,{className:n}))}return r}function gW(e,t){return e==null?!1:t?!0:e.length===1}function vW(e){var{clipPathId:t,points:r,props:n}=e,{dot:i,dataKey:a,needClip:o}=n;if(!gW(r,i))return null;var{id:s}=n,l=mg(n,iW),c=__(i),u=tn(l),f=Ze(i,!0),d=r.map((m,p)=>{var g=tr(tr(tr({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 mW(i,g)}),h={clipPath:o?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return E.createElement(Ct,Ui({className:"recharts-line-dots",key:"dots"},h),d)}function yW(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 tr(tr({},o),{},{value:a.value,payload:a.payload,viewBox:o,parentViewBox:void 0,fill:void 0})}),[n]);return E.createElement(hA,{value:t?i:null},r)}function Ix(e){var{clipPathId:t,pathRef:r,points:n,strokeDasharray:i,props:a}=e,{type:o,layout:s,connectNulls:l,needClip:c}=a,u=mg(a,aW),f=tr(tr({},Ze(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 E.createElement(E.Fragment,null,n?.length>1&&E.createElement(Vp,Ui({},f,{pathRef:r})),E.createElement(vW,{points:n,clipPathId:t,props:a}))}function bW(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function xW(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,x=Ss(r,"recharts-line-"),[w,y]=k.useState(!1),_=!w,O=k.useCallback(()=>{typeof p=="function"&&p(),y(!1)},[p]),A=k.useCallback(()=>{typeof g=="function"&&g(),y(!0)},[g]),P=bW(n.current),T=a.current;return E.createElement(yW,{points:o,showLabels:_},r.children,E.createElement(Os,{animationId:x,begin:c,duration:u,isActive:l,easing:f,onAnimationEnd:O,onAnimationStart:A,key:x},I=>{var j=et(T,P+T,I),S=Math.min(j,P),D;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map(W=>parseFloat(W));D=pW(S,P,M)}else D=zA(P,S);else D=s==null?void 0:String(s);if(v){var R=v.length/o.length,z=I===1?o:o.map((W,Y)=>{var G=Math.floor(Y*R);if(v[G]){var L=v[G];return tr(tr({},W),{},{x:et(L.x,W.x,I),y:et(L.y,W.y,I)})}return d?tr(tr({},W),{},{x:et(h*2,W.x,I),y:et(m/2,W.y,I)}):tr(tr({},W),{},{x:W.x,y:W.y})});return i.current=z,E.createElement(Ix,{props:r,points:z,clipPathId:t,pathRef:n,strokeDasharray:D})}return I>0&&P>0&&(i.current=o,a.current=S),E.createElement(Ix,{props:r,points:o,clipPathId:t,pathRef:n,strokeDasharray:D})}),E.createElement(Zm,{label:r.label}))}function wW(e){var{clipPathId:t,props:r}=e,n=k.useRef(null),i=k.useRef(0),a=k.useRef(null);return E.createElement(xW,{props:r,clipPathId:t,previousPointsRef:n,longestAnimatedLengthRef:i,pathRef:a})}var _W=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:ze(e.payload,t)});class OW 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=ye("recharts-line",a),p=d,{r:g=3,strokeWidth:v=2}=(t=Ze(n,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},x=__(n),w=g*2+v;return E.createElement(E.Fragment,null,E.createElement(Ct,{className:m},h&&E.createElement("defs",null,E.createElement(CA,{clipPathId:p,xAxisId:o,yAxisId:s}),!x&&E.createElement("clipPath",{id:"clipPath-dots-".concat(p)},E.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:f+w}))),E.createElement(PA,{xAxisId:o,yAxisId:s,data:i,dataPointFormatter:_W,errorBarOffset:0},E.createElement(wW,{props:this.props,clipPathId:p}))),E.createElement(H3,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var WA={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!ei.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function SW(e){var t=kt(e,WA),{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=mg(t,oW),{needClip:v}=ug(h,m),x=lg(),w=xu(),y=Gt(),_=re(I=>nW(I,h,m,y,p));if(w!=="horizontal"&&w!=="vertical"||_==null||x==null)return null;var{height:O,width:A,x:P,y:T}=x;return E.createElement(OW,Ui({},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:_,layout:w,height:O,width:A,left:P,top:T,needClip:v}))}function AW(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=ze(c,o);if(t==="horizontal"){var d=d0({axis:r,ticks:i,bandSize:s,entry:c,index:u}),h=Ge(f)?null:n.scale(f);return{x:d,y:h,value:f,payload:c}}var m=Ge(f)?null:r.scale(f),p=d0({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 EW(e){var t=kt(e,WA),r=Gt();return E.createElement(og,{id:t.id,type:"line"},n=>E.createElement(E.Fragment,null,E.createElement(_A,{legendPayload:fW(t)}),E.createElement(ag,{fn:dW,args:t}),E.createElement(SA,{type:"line",id:n,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),E.createElement(SW,Ui({},t,{id:n}))))}var Oa=E.memo(EW);Oa.displayName="Line";var PW=["dangerouslySetInnerHTML","ticks"],CW=["id"],kW=["domain"],TW=["domain"];function Xh(){return Xh=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},Xh.apply(null,arguments)}function Mc(e,t){if(e==null)return{};var r,n,i=MW(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 MW(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 jW(e){var t=ot();return k.useEffect(()=>(t(M3(e)),()=>{t(j3(e))}),[e,t]),null}var DW=e=>{var{xAxisId:t,className:r}=e,n=re(zp),i=Gt(),a="xAxis",o=re(g=>Xa(g,a,t,i)),s=re(g=>kS(g,a,t,i)),l=re(g=>AS(g,t)),c=re(g=>fL(g,t)),u=re(g=>rS(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:f,ticks:d}=e,h=Mc(e,PW),{id:m}=u,p=Mc(u,CW);return E.createElement(pg,Xh({},h,p,{scale:o,x:c.x,y:c.y,width:l.width,height:l.height,className:ye("recharts-".concat(a," ").concat(a),r),viewBox:n,ticks:s}))},NW={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},IW=e=>{var t,r,n,i,a,o=kt(e,NW);return E.createElement(E.Fragment,null,E.createElement(jW,{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}),E.createElement(DW,o))},RW=(e,t)=>{var{domain:r}=e,n=Mc(e,kW),{domain:i}=t,a=Mc(t,TW);return Ia(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Ia({domain:r},{domain:i}):!1},Fu=E.memo(IW,RW);Fu.displayName="XAxis";var $W=["dangerouslySetInnerHTML","ticks"],LW=["id"],BW=["domain"],FW=["domain"];function Zh(){return Zh=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},Zh.apply(null,arguments)}function jc(e,t){if(e==null)return{};var r,n,i=zW(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 zW(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 WW(e){var t=ot();return k.useEffect(()=>(t(D3(e)),()=>{t(N3(e))}),[e,t]),null}var VW=e=>{var{yAxisId:t,className:r,width:n,label:i}=e,a=k.useRef(null),o=k.useRef(null),s=re(zp),l=Gt(),c=ot(),u="yAxis",f=re(_=>Xa(_,u,t,l)),d=re(_=>ES(_,t)),h=re(_=>hL(_,t)),m=re(_=>kS(_,u,t,l)),p=re(_=>nS(_,t));if(k.useLayoutEffect(()=>{if(!(n!=="auto"||!d||Xm(i)||k.isValidElement(i)||p==null)){var _=a.current;if(_){var O=_.getCalculatedWidth();Math.round(d.width)!==Math.round(O)&&c(I3({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,x=jc(e,$W),{id:w}=p,y=jc(p,LW);return E.createElement(pg,Zh({},x,y,{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:ye("recharts-".concat(u," ").concat(u),r),viewBox:s,ticks:m}))},HW={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},UW=e=>{var t,r,n,i,a,o=kt(e,HW);return E.createElement(E.Fragment,null,E.createElement(WW,{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}),E.createElement(VW,o))},KW=(e,t)=>{var{domain:r}=e,n=jc(e,BW),{domain:i}=t,a=jc(t,FW);return Ia(n,a)?Array.isArray(r)&&r.length===2&&Array.isArray(i)&&i.length===2?r[0]===i[0]&&r[1]===i[1]:Ia({domain:r},{domain:i}):!1},es=E.memo(UW,KW);es.displayName="YAxis";var yl={exports:{}},Rd={};/**
|
|
184
184
|
* @license React
|
|
185
185
|
* use-sync-external-store-with-selector.production.js
|
|
186
186
|
*
|
|
@@ -196,41 +196,41 @@ 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 $x;function YW(){return $x||($x=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;$d.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(_){if(!v){if(v=!0,x=_,_=f(_),d!==void 0&&m.hasValue){var O=m.value;if(d(O,_))return w=O}return w=_}if(O=w,r(x,_))return O;var A=f(_);return d!==void 0&&d(O,A)?(x=_,O):(x=_,w=A)}var v=!1,x,w,y=u===void 0?null:u;return[function(){return g(c())},y===null?void 0:function(){return g(y())}]},[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())})()),$d}var Lx;function GW(){return Lx||(Lx=1,process.env.NODE_ENV==="production"?yl.exports=qW():yl.exports=YW()),yl.exports}GW();function XW(e){e()}function ZW(){let e=null,t=null;return{clear(){e=null,t=null},notify(){XW(()=>{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 Bx={notify(){},get:()=>[]};function JW(e,t){let r,n=Bx,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=ZW())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=Bx)}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 QW=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e7=QW(),t7=()=>typeof navigator<"u"&&navigator.product==="ReactNative",r7=t7(),n7=()=>e7||r7?E.useLayoutEffect:E.useEffect,i7=n7(),a7=Symbol.for("react-redux-context"),o7=typeof globalThis<"u"?globalThis:{};function s7(){if(!E.createContext)return{};const e=o7[a7]??=new Map;let t=e.get(E.createContext);return t||(t=E.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(E.createContext,t)),t}var l7=s7();function c7(e){const{children:t,context:r,serverState:n,store:i}=e,a=E.useMemo(()=>{const l=JW(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=E.useMemo(()=>i.getState(),[i]);i7(()=>{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||l7;return E.createElement(s.Provider,{value:a},t)}var u7=c7,f7=(e,t)=>t,gg=$([f7,me,Q2,vt,HS,jn,yB,mt],OB),vg=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)}},VA=wr("mouseClick"),HA=ws();HA.startListening({actionCreator:VA,effect:(e,t)=>{var r=e.payload,n=gg(t.getState(),vg(r));n?.activeIndex!=null&&t.dispatch(EL({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Jh=wr("mouseMove"),UA=ws();UA.startListening({actionCreator:Jh,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=Fm(n,n.tooltip.settings.shared),a=gg(n,vg(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch($S({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(RS()))}});var Fx={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},KA=fr({name:"rootProps",initialState:Fx,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:Fx.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}}}),d7=KA.reducer,{updateOptions:h7}=KA.actions,qA=fr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:p7}=qA.actions,m7=qA.reducer,YA=wr("keyDown"),GA=wr("focus"),yg=ws();yg.startListening({actionCreator:YA,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(zm(i,Ja(r))),s=jn(r);if(a==="Enter"){var l=Sc(r,"axis","hover",String(i.index));t.dispatch(Vh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=vL(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=Sc(r,"axis","hover",String(d));t.dispatch(Vh({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}});yg.startListening({actionCreator:GA,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=Sc(r,"axis","hover",String(a));t.dispatch(Vh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var gr=wr("externalEvent"),XA=ws();XA.startListening({actionCreator:gr,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:lB(r),activeDataKey:YS(r),activeIndex:Yn(r),activeLabel:qS(r),activeTooltipIndex:Yn(r),isTooltipActive:cB(r)};e.payload.handler(n,e.payload.reactEvent)}}});var g7=$([Za],e=>e.tooltipItemPayloads),v7=$([g7,Ns,(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}}}),ZA=wr("touchMove"),JA=ws();JA.startListening({actionCreator:ZA,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=Fm(n,n.tooltip.settings.shared);if(i==="axis"){var a=gg(n,vg({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch($S({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(NO),u=(o=l.getAttribute(IO))!==null&&o!==void 0?o:void 0,f=v7(t.getState(),c,u);t.dispatch(IS({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var y7=rO({brush:rz,cartesianAxis:R3,chartData:BB,errorBars:t8,graphicalItems:t3,layout:MN,legend:b5,options:NB,polarAxis:y6,polarOptions:m7,referenceElements:cz,rootProps:d7,tooltip:PL}),b7=function(t){return rN({reducer:y7,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([HA.middleware,UA.middleware,yg.middleware,XA.middleware,JA.middleware]),devTools:ei.devToolsEnabled})};function QA(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Gt(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=b7(t));var o=Ip;return E.createElement(u7,{context:o,store:a.current},r)}function eE(e){var{layout:t,width:r,height:n,margin:i}=e,a=ot(),o=Gt();return k.useEffect(()=>{o||(a(CN(t)),a(kN({width:r,height:n})),a(PN(i)))},[a,o,t,r,n,i]),null}function tE(e){var t=ot();return k.useEffect(()=>{t(h7(e))},[t,e]),null}var x7=["children"];function w7(e,t){if(e==null)return{};var r,n,i=_7(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 _7(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 Dc(){return Dc=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},Dc.apply(null,arguments)}var O7={width:"100%",height:"100%"},S7=k.forwardRef((e,t)=>{var r=$O(),n=LO(),i=WO();if(!Ta(r)||!Ta(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,E.createElement(O_,Dc({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:O7,ref:t}),a)}),A7=e=>{var{children:t}=e,r=re(bu);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return E.createElement(O_,{width:n,height:i,x:o,y:a},t)},zx=k.forwardRef((e,t)=>{var{children:r}=e,n=w7(e,x7),i=Gt();return i?E.createElement(A7,null,r):E.createElement(S7,Dc({ref:t},n),r)});function E7(){var e=ot(),[t,r]=k.useState(null),n=re(o5);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;cr(a)&&a!==n&&e(TN(a))}},[t,e,n]),r}function Wx(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 P7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wx(Object(r),!0).forEach(function(n){C7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C7(e,t,r){return(t=k7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k7(e){var t=T7(e,"string");return typeof t=="symbol"?t:t+""}function T7(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 M7=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,x=ot(),[w,y]=k.useState(null),[_,O]=k.useState(null);YB();var A=E7(),P=k.useCallback(H=>{A(H),typeof t=="function"&&t(H),y(H),O(H)},[A,t,y,O]),T=k.useCallback(H=>{x(VA(H)),x(gr({handler:a,reactEvent:H}))},[x,a]),I=k.useCallback(H=>{x(Jh(H)),x(gr({handler:c,reactEvent:H}))},[x,c]),j=k.useCallback(H=>{x(RS()),x(gr({handler:u,reactEvent:H}))},[x,u]),S=k.useCallback(H=>{x(Jh(H)),x(gr({handler:f,reactEvent:H}))},[x,f]),D=k.useCallback(()=>{x(GA())},[x]),M=k.useCallback(H=>{x(YA(H.key))},[x]),R=k.useCallback(H=>{x(gr({handler:o,reactEvent:H}))},[x,o]),z=k.useCallback(H=>{x(gr({handler:s,reactEvent:H}))},[x,s]),W=k.useCallback(H=>{x(gr({handler:l,reactEvent:H}))},[x,l]),Y=k.useCallback(H=>{x(gr({handler:d,reactEvent:H}))},[x,d]),G=k.useCallback(H=>{x(gr({handler:p,reactEvent:H}))},[x,p]),L=k.useCallback(H=>{x(ZA(H)),x(gr({handler:m,reactEvent:H}))},[x,m]),K=k.useCallback(H=>{x(gr({handler:h,reactEvent:H}))},[x,h]);return E.createElement(eA.Provider,{value:w},E.createElement(NM.Provider,{value:_},E.createElement("div",{className:ye("recharts-wrapper",n),style:P7({position:"relative",cursor:"default",width:v,height:i},g),onClick:T,onContextMenu:R,onDoubleClick:z,onFocus:D,onKeyDown:M,onMouseDown:W,onMouseEnter:I,onMouseLeave:j,onMouseMove:S,onMouseUp:Y,onTouchEnd:K,onTouchMove:L,onTouchStart:G,ref:P},r)))}),j7=["children","className","width","height","style","compact","title","desc"];function D7(e,t){if(e==null)return{};var r,n,i=N7(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 N7(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 rE=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=D7(e,j7),f=tn(u);return s?E.createElement(zx,{otherAttributes:f,title:l,desc:c},r):E.createElement(M7,{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},E.createElement(zx,{otherAttributes:f,title:l,desc:c,ref:t},E.createElement(fz,null,r)))}),I7=["width","height"];function Qh(){return Qh=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},Qh.apply(null,arguments)}function R7(e,t){if(e==null)return{};var r,n,i=$7(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 $7(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 L7={top:5,right:5,bottom:5,left:5},B7={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:L7,reverseStackOrder:!1,syncMethod:"index"},nE=k.forwardRef(function(t,r){var n,i=kt(t.categoricalChartProps,B7),{width:a,height:o}=i,s=R7(i,I7);if(!Ta(a)||!Ta(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 E.createElement(QA,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},E.createElement(jA,{chartData:d.data}),E.createElement(eE,{width:a,height:o,layout:i.layout,margin:i.margin}),E.createElement(tE,{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}),E.createElement(rE,Qh({},s,{width:a,height:o,ref:r})))}),F7=["axis"],iE=k.forwardRef((e,t)=>E.createElement(nE,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:F7,tooltipPayloadSearcher:Gm,categoricalChartProps:e,ref:t})),z7=["axis","item"],W7=k.forwardRef((e,t)=>E.createElement(nE,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:z7,tooltipPayloadSearcher:Gm,categoricalChartProps:e,ref:t}));function V7(e){var t=ot();return k.useEffect(()=>{t(p7(e))},[t,e]),null}var H7=["width","height","layout"];function ep(){return ep=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},ep.apply(null,arguments)}function U7(e,t){if(e==null)return{};var r,n,i=K7(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 K7(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 q7={top:5,right:5,bottom:5,left:5},Y7={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:q7,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},G7=k.forwardRef(function(t,r){var n,i=kt(t.categoricalChartProps,Y7),{width:a,height:o,layout:s}=i,l=U7(i,H7);if(!Ta(a)||!Ta(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 E.createElement(QA,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},E.createElement(jA,{chartData:i.data}),E.createElement(eE,{width:a,height:o,layout:s,margin:i.margin}),E.createElement(tE,{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}),E.createElement(V7,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),E.createElement(rE,ep({width:a,height:o},l,{ref:r})))}),X7=["item"],Z7={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},zu=k.forwardRef((e,t)=>{var r=kt(e,Z7);return E.createElement(G7,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:X7,tooltipPayloadSearcher:Gm,categoricalChartProps:r,ref:t})});function J7({isStatic:e,data:t}){const r=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),n=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),a=Number(t?.moveOutPercentChange??t?.moveOutChange??0),o=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:r,color:o[0]},{name:"Move-outs",value:n,color:o[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return b.jsx(Xi,{title:"Community",period:"This Month",icon:b.jsx(Op,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:r+n})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(m_,{value:l(i,a)}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),b.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:b.jsx(ta,{width:"75%",height:"100%",children:b.jsxs(zu,{children:[b.jsxs(Rs,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[b.jsx(Qr,{fill:o[0]}),b.jsx(Qr,{fill:o[1]})]}),b.jsx(ea,{content:b.jsx(gs,{})})]})})})]})})}function Q7({isStatic:e,data:t}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],n=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}];return b.jsx(Xi,{title:"Engagement",period:"This Month",icon:b.jsx(u_,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:b.jsx("div",{className:"w-full h-[235px]",children:b.jsx(ta,{width:"100%",height:"100%",children:b.jsxs(W7,{data:n,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[b.jsx(Bu,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),b.jsx(es,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),b.jsx(Fu,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),b.jsx(ea,{content:b.jsx(gs,{}),cursor:{fill:"transparent"}}),b.jsx(TA,{dataKey:"value",barSize:40,isAnimationActive:!1,children:n.map((i,a)=>b.jsx(Qr,{fill:r[a]},i.name))})]})})})})}function eV(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 tV(e){return Array.from({length:24},(n,i)=>i).map(n=>{const i=e.find(l=>{const c=eV(l.slot_start_time);return Math.floor(c/60)===n}),a=n>=12?"PM":"AM";return{time:`${n%12||12} ${a}`,bookings:i?.slot_bookings||0,utilization:i?.averageUtilizationPercentage||0}})}function rV({isStatic:e,data:t}){const r=Number(t?.totalBookings||0),n=Number(t?.utilizationRate||0),i=k.useMemo(()=>t?.slots?.length?tV(t.slots):[],[t]),a=c=>["1 AM","6 AM","11 AM","5 PM","10 PM"].includes(c)?c:"",o=i.length>0?Math.max(...i.map(c=>c.total),5):5;function s(c){const u=c>=12?"PM":"AM";let f=c%12;return f===0&&(f=12),`${f} ${u}`}const l=i.length?i:Array.from({length:24},(c,u)=>({time:s(u),bookings:0,utilization:0}));return b.jsxs(Xi,{title:"Facilities",period:"Today",icon:b.jsx(c_,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mb-[16px]",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),b.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:r})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),b.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[n.toFixed(2),"%"]})]})]}),b.jsx("div",{className:"w-full h-[170px]",children:b.jsx(ta,{width:"100%",height:"100%",children:b.jsxs(iE,{data:l,margin:{top:0,right:-30,left:-40,bottom:0},children:[b.jsx(Bu,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(Fu,{dataKey:"time",interval:0,tickFormatter:a,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),b.jsx(es,{yAxisId:"left",domain:[0,o],tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),b.jsx(es,{yAxisId:"right",orientation:"right",domain:[20,100],ticks:[20,40,60,80,100],tickFormatter:c=>`${c}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),b.jsx(ea,{content:b.jsx(gs,{})}),b.jsx($i,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),b.jsx($i,{yAxisId:"left",type:"monotone",dataKey:"total",name:"Total Slots",stroke:"#F59E0B",strokeWidth:2,dot:!1}),b.jsx($i,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4"})]})})})]})}function nV({data:e}){const t=e?.incomeSummary||{},r=e?.expenditureSummary||{},n=["AED","USD","EUR"],i=["Rs","INR","₹"];function a(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function o(s,l){return l?i.includes(l)?`${l} ${a(s)}`:n.includes(l)?`${a(s)} ${l}`:`${a(s)} ${l}`:a(s)}return b.jsx(Xi,{title:"Income",period:"This Month",icon:b.jsx(zv,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",children:b.jsxs("div",{children:[b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Income"}),b.jsx("div",{children:"Collection"}),b.jsx("div",{children:"Closing"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[b.jsx("div",{children:o(t.opening_balance,t?.currency_type)}),b.jsx("div",{children:o(t.income,t?.currency_type)}),b.jsx("div",{children:o(t.collection,t?.currency_type)}),b.jsx("div",{children:o(t.closing_balance,t?.currency_type)})]}),b.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex items-center gap-[12px]",children:[b.jsx(zv,{className:"!text-[24px] text-red-600"}),b.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Expenditure"}),b.jsx("div",{children:"Payment"}),b.jsx("div",{children:"Outstanding"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[b.jsx("div",{children:o(r.opening_balance,r?.currency_type)}),b.jsx("div",{children:o(r.expenditure,r?.currency_type)}),b.jsx("div",{children:o(r.payment,r?.currency_type)}),b.jsx("div",{children:o(r.outstanding,r?.currency_type)})]})]})})}var Kt="top",Or="bottom",Sr="right",qt="left",bg="auto",Ls=[Kt,Or,Sr,qt],Ra="start",ts="end",iV="clippingParents",aE="viewport",po="popper",aV="reference",Vx=Ls.reduce(function(e,t){return e.concat([t+"-"+Ra,t+"-"+ts])},[]),oE=[].concat(Ls,[bg]).reduce(function(e,t){return e.concat([t,t+"-"+Ra,t+"-"+ts])},[]),oV="beforeRead",sV="read",lV="afterRead",cV="beforeMain",uV="main",fV="afterMain",dV="beforeWrite",hV="write",pV="afterWrite",mV=[oV,sV,lV,cV,uV,fV,dV,hV,pV];function en(e){return e?(e.nodeName||"").toLowerCase():null}function ur(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function qi(e){var t=ur(e).Element;return e instanceof t||e instanceof Element}function xr(e){var t=ur(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xg(e){if(typeof ShadowRoot>"u")return!1;var t=ur(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function gV(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!xr(a)||!en(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function vV(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,c){return l[c]="",l},{});!xr(i)||!en(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const sE={name:"applyStyles",enabled:!0,phase:"write",fn:gV,effect:vV,requires:["computeStyles"]};function Gr(e){return e.split("-")[0]}var Li=Math.max,Nc=Math.min,$a=Math.round;function tp(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function lE(){return!/^((?!chrome|android).)*safari/i.test(tp())}function La(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,a=1;t&&xr(e)&&(i=e.offsetWidth>0&&$a(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&$a(n.height)/e.offsetHeight||1);var o=qi(e)?ur(e):window,s=o.visualViewport,l=!lE()&&r,c=(n.left+(l&&s?s.offsetLeft:0))/i,u=(n.top+(l&&s?s.offsetTop:0))/a,f=n.width/i,d=n.height/a;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c,x:c,y:u}}function wg(e){var t=La(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function cE(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&xg(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function An(e){return ur(e).getComputedStyle(e)}function yV(e){return["table","td","th"].indexOf(en(e))>=0}function ii(e){return((qi(e)?e.ownerDocument:e.document)||window.document).documentElement}function Wu(e){return en(e)==="html"?e:e.assignedSlot||e.parentNode||(xg(e)?e.host:null)||ii(e)}function Hx(e){return!xr(e)||An(e).position==="fixed"?null:e.offsetParent}function bV(e){var t=/firefox/i.test(tp()),r=/Trident/i.test(tp());if(r&&xr(e)){var n=An(e);if(n.position==="fixed")return null}var i=Wu(e);for(xg(i)&&(i=i.host);xr(i)&&["html","body"].indexOf(en(i))<0;){var a=An(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Bs(e){for(var t=ur(e),r=Hx(e);r&&yV(r)&&An(r).position==="static";)r=Hx(r);return r&&(en(r)==="html"||en(r)==="body"&&An(r).position==="static")?t:r||bV(e)||t}function _g(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Mo(e,t,r){return Li(e,Nc(t,r))}function xV(e,t,r){var n=Mo(e,t,r);return n>r?r:n}function uE(){return{top:0,right:0,bottom:0,left:0}}function fE(e){return Object.assign({},uE(),e)}function dE(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var wV=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,fE(typeof t!="number"?t:dE(t,Ls))};function _V(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=Gr(r.placement),l=_g(s),c=[qt,Sr].indexOf(s)>=0,u=c?"height":"width";if(!(!a||!o)){var f=wV(i.padding,r),d=wg(a),h=l==="y"?Kt:qt,m=l==="y"?Or:Sr,p=r.rects.reference[u]+r.rects.reference[l]-o[l]-r.rects.popper[u],g=o[l]-r.rects.reference[l],v=Bs(a),x=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,w=p/2-g/2,y=f[h],_=x-d[u]-f[m],O=x/2-d[u]/2+w,A=Mo(y,O,_),P=l;r.modifiersData[n]=(t={},t[P]=A,t.centerOffset=A-O,t)}}function OV(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||cE(t.elements.popper,i)&&(t.elements.arrow=i))}const SV={name:"arrow",enabled:!0,phase:"main",fn:_V,effect:OV,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ba(e){return e.split("-")[1]}var AV={top:"auto",right:"auto",bottom:"auto",left:"auto"};function EV(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:$a(r*i)/i||0,y:$a(n*i)/i||0}}function Ux(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=o.x,h=d===void 0?0:d,m=o.y,p=m===void 0?0:m,g=typeof u=="function"?u({x:h,y:p}):{x:h,y:p};h=g.x,p=g.y;var v=o.hasOwnProperty("x"),x=o.hasOwnProperty("y"),w=qt,y=Kt,_=window;if(c){var O=Bs(r),A="clientHeight",P="clientWidth";if(O===ur(r)&&(O=ii(r),An(O).position!=="static"&&s==="absolute"&&(A="scrollHeight",P="scrollWidth")),O=O,i===Kt||(i===qt||i===Sr)&&a===ts){y=Or;var T=f&&O===_&&_.visualViewport?_.visualViewport.height:O[A];p-=T-n.height,p*=l?1:-1}if(i===qt||(i===Kt||i===Or)&&a===ts){w=Sr;var I=f&&O===_&&_.visualViewport?_.visualViewport.width:O[P];h-=I-n.width,h*=l?1:-1}}var j=Object.assign({position:s},c&&AV),S=u===!0?EV({x:h,y:p},ur(r)):{x:h,y:p};if(h=S.x,p=S.y,l){var D;return Object.assign({},j,(D={},D[y]=x?"0":"",D[w]=v?"0":"",D.transform=(_.devicePixelRatio||1)<=1?"translate("+h+"px, "+p+"px)":"translate3d("+h+"px, "+p+"px, 0)",D))}return Object.assign({},j,(t={},t[y]=x?p+"px":"",t[w]=v?h+"px":"",t.transform="",t))}function PV(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,l=s===void 0?!0:s,c={placement:Gr(t.placement),variation:Ba(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ux(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ux(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const CV={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:PV,data:{}};var bl={passive:!0};function kV(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,l=ur(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",r.update,bl)}),s&&l.addEventListener("resize",r.update,bl),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",r.update,bl)}),s&&l.removeEventListener("resize",r.update,bl)}}const TV={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:kV,data:{}};var MV={left:"right",right:"left",bottom:"top",top:"bottom"};function Vl(e){return e.replace(/left|right|bottom|top/g,function(t){return MV[t]})}var jV={start:"end",end:"start"};function Kx(e){return e.replace(/start|end/g,function(t){return jV[t]})}function Og(e){var t=ur(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Sg(e){return La(ii(e)).left+Og(e).scrollLeft}function DV(e,t){var r=ur(e),n=ii(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=lE();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+Sg(e),y:l}}function NV(e){var t,r=ii(e),n=Og(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Li(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Li(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+Sg(e),l=-n.scrollTop;return An(i||r).direction==="rtl"&&(s+=Li(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function Ag(e){var t=An(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function hE(e){return["html","body","#document"].indexOf(en(e))>=0?e.ownerDocument.body:xr(e)&&Ag(e)?e:hE(Wu(e))}function jo(e,t){var r;t===void 0&&(t=[]);var n=hE(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=ur(n),o=i?[a].concat(a.visualViewport||[],Ag(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(jo(Wu(o)))}function rp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function IV(e,t){var r=La(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function qx(e,t,r){return t===aE?rp(DV(e,r)):qi(t)?IV(t,r):rp(NV(ii(e)))}function RV(e){var t=jo(Wu(e)),r=["absolute","fixed"].indexOf(An(e).position)>=0,n=r&&xr(e)?Bs(e):e;return qi(n)?t.filter(function(i){return qi(i)&&cE(i,n)&&en(i)!=="body"}):[]}function $V(e,t,r,n){var i=t==="clippingParents"?RV(e):[].concat(t),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(l,c){var u=qx(e,c,n);return l.top=Li(u.top,l.top),l.right=Nc(u.right,l.right),l.bottom=Nc(u.bottom,l.bottom),l.left=Li(u.left,l.left),l},qx(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function pE(e){var t=e.reference,r=e.element,n=e.placement,i=n?Gr(n):null,a=n?Ba(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(i){case Kt:l={x:o,y:t.y-r.height};break;case Or:l={x:o,y:t.y+t.height};break;case Sr:l={x:t.x+t.width,y:s};break;case qt:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?_g(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case Ra:l[c]=l[c]-(t[u]/2-r[u]/2);break;case ts:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function rs(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.strategy,o=a===void 0?e.strategy:a,s=r.boundary,l=s===void 0?iV:s,c=r.rootBoundary,u=c===void 0?aE:c,f=r.elementContext,d=f===void 0?po:f,h=r.altBoundary,m=h===void 0?!1:h,p=r.padding,g=p===void 0?0:p,v=fE(typeof g!="number"?g:dE(g,Ls)),x=d===po?aV:po,w=e.rects.popper,y=e.elements[m?x:d],_=$V(qi(y)?y:y.contextElement||ii(e.elements.popper),l,u,o),O=La(e.elements.reference),A=pE({reference:O,element:w,placement:i}),P=rp(Object.assign({},w,A)),T=d===po?P:O,I={top:_.top-T.top+v.top,bottom:T.bottom-_.bottom+v.bottom,left:_.left-T.left+v.left,right:T.right-_.right+v.right},j=e.modifiersData.offset;if(d===po&&j){var S=j[i];Object.keys(I).forEach(function(D){var M=[Sr,Or].indexOf(D)>=0?1:-1,R=[Kt,Or].indexOf(D)>=0?"y":"x";I[D]+=S[R]*M})}return I}function LV(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?oE:l,u=Ba(n),f=u?s?Vx:Vx.filter(function(m){return Ba(m)===u}):Ls,d=f.filter(function(m){return c.indexOf(m)>=0});d.length===0&&(d=f);var h=d.reduce(function(m,p){return m[p]=rs(e,{placement:p,boundary:i,rootBoundary:a,padding:o})[Gr(p)],m},{});return Object.keys(h).sort(function(m,p){return h[m]-h[p]})}function BV(e){if(Gr(e)===bg)return[];var t=Vl(e);return[Kx(e),t,Kx(t)]}function FV(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,c=r.padding,u=r.boundary,f=r.rootBoundary,d=r.altBoundary,h=r.flipVariations,m=h===void 0?!0:h,p=r.allowedAutoPlacements,g=t.options.placement,v=Gr(g),x=v===g,w=l||(x||!m?[Vl(g)]:BV(g)),y=[g].concat(w).reduce(function(Q,J){return Q.concat(Gr(J)===bg?LV(t,{placement:J,boundary:u,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:p}):J)},[]),_=t.rects.reference,O=t.rects.popper,A=new Map,P=!0,T=y[0],I=0;I<y.length;I++){var j=y[I],S=Gr(j),D=Ba(j)===Ra,M=[Kt,Or].indexOf(S)>=0,R=M?"width":"height",z=rs(t,{placement:j,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),W=M?D?Sr:qt:D?Or:Kt;_[R]>O[R]&&(W=Vl(W));var Y=Vl(W),G=[];if(a&&G.push(z[S]<=0),s&&G.push(z[W]<=0,z[Y]<=0),G.every(function(Q){return Q})){T=j,P=!1;break}A.set(j,G)}if(P)for(var L=m?3:1,K=function(J){var te=y.find(function(oe){var se=A.get(oe);if(se)return se.slice(0,J).every(function(V){return V})});if(te)return T=te,"break"},H=L;H>0;H--){var ne=K(H);if(ne==="break")break}t.placement!==T&&(t.modifiersData[n]._skip=!0,t.placement=T,t.reset=!0)}}const zV={name:"flip",enabled:!0,phase:"main",fn:FV,requiresIfExists:["offset"],data:{_skip:!1}};function Yx(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Gx(e){return[Kt,Sr,Or,qt].some(function(t){return e[t]>=0})}function WV(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=rs(t,{elementContext:"reference"}),s=rs(t,{altBoundary:!0}),l=Yx(o,n),c=Yx(s,i,a),u=Gx(l),f=Gx(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const VV={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:WV};function HV(e,t,r){var n=Gr(e),i=[qt,Kt].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[qt,Sr].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function UV(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=oE.reduce(function(u,f){return u[f]=HV(f,t.rects,a),u},{}),s=o[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}const KV={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:UV};function qV(e){var t=e.state,r=e.name;t.modifiersData[r]=pE({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const YV={name:"popperOffsets",enabled:!0,phase:"read",fn:qV,data:{}};function GV(e){return e==="x"?"y":"x"}function XV(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,f=r.padding,d=r.tether,h=d===void 0?!0:d,m=r.tetherOffset,p=m===void 0?0:m,g=rs(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),v=Gr(t.placement),x=Ba(t.placement),w=!x,y=_g(v),_=GV(y),O=t.modifiersData.popperOffsets,A=t.rects.reference,P=t.rects.popper,T=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,I=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(O){if(a){var D,M=y==="y"?Kt:qt,R=y==="y"?Or:Sr,z=y==="y"?"height":"width",W=O[y],Y=W+g[M],G=W-g[R],L=h?-P[z]/2:0,K=x===Ra?A[z]:P[z],H=x===Ra?-P[z]:-A[z],ne=t.elements.arrow,Q=h&&ne?wg(ne):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uE(),te=J[M],oe=J[R],se=Mo(0,A[z],Q[z]),V=w?A[z]/2-L-se-te-I.mainAxis:K-se-te-I.mainAxis,q=w?-A[z]/2+L+se+oe+I.mainAxis:H+se+oe+I.mainAxis,ie=t.elements.arrow&&Bs(t.elements.arrow),N=ie?y==="y"?ie.clientTop||0:ie.clientLeft||0:0,ge=(D=j?.[y])!=null?D:0,fe=W+V-ge-N,Be=W+q-ge,Ve=Mo(h?Nc(Y,fe):Y,W,h?Li(G,Be):G);O[y]=Ve,S[y]=Ve-W}if(s){var Tt,Ir=y==="x"?Kt:qt,rn=y==="x"?Or:Sr,Cr=O[_],Rr=_==="y"?"height":"width",nn=Cr+g[Ir],an=Cr-g[rn],li=[Kt,qt].indexOf(v)!==-1,ci=(Tt=j?.[_])!=null?Tt:0,ui=li?nn:Cr-A[Rr]-P[Rr]-ci+I.altAxis,fi=li?Cr+A[Rr]+P[Rr]-ci-I.altAxis:an,na=h&&li?xV(ui,Cr,fi):Mo(h?ui:nn,Cr,h?fi:an);O[_]=na,S[_]=na-Cr}t.modifiersData[n]=S}}const ZV={name:"preventOverflow",enabled:!0,phase:"main",fn:XV,requiresIfExists:["offset"]};function JV(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function QV(e){return e===ur(e)||!xr(e)?Og(e):JV(e)}function e9(e){var t=e.getBoundingClientRect(),r=$a(t.width)/e.offsetWidth||1,n=$a(t.height)/e.offsetHeight||1;return r!==1||n!==1}function t9(e,t,r){r===void 0&&(r=!1);var n=xr(t),i=xr(t)&&e9(t),a=ii(t),o=La(e,i,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((en(t)!=="body"||Ag(a))&&(s=QV(t)),xr(t)?(l=La(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Sg(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function r9(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&i(l)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function n9(e){var t=r9(e);return mV.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function i9(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function a9(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var Xx={placement:"bottom",modifiers:[],strategy:"absolute"};function Zx(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function o9(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?Xx:i;return function(s,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xx,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],d=!1,h={state:u,setOptions:function(v){var x=typeof v=="function"?v(u.options):v;p(),u.options=Object.assign({},a,u.options,x),u.scrollParents={reference:qi(s)?jo(s):s.contextElement?jo(s.contextElement):[],popper:jo(l)};var w=n9(a9([].concat(n,u.options.modifiers)));return u.orderedModifiers=w.filter(function(y){return y.enabled}),m(),h.update()},forceUpdate:function(){if(!d){var v=u.elements,x=v.reference,w=v.popper;if(Zx(x,w)){u.rects={reference:t9(x,Bs(w),u.options.strategy==="fixed"),popper:wg(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(I){return u.modifiersData[I.name]=Object.assign({},I.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var _=u.orderedModifiers[y],O=_.fn,A=_.options,P=A===void 0?{}:A,T=_.name;typeof O=="function"&&(u=O({state:u,options:P,name:T,instance:h})||u)}}}},update:i9(function(){return new Promise(function(g){h.forceUpdate(),g(u)})}),destroy:function(){p(),d=!0}};if(!Zx(s,l))return h;h.setOptions(c).then(function(g){!d&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var v=g.name,x=g.options,w=x===void 0?{}:x,y=g.effect;if(typeof y=="function"){var _=y({state:u,name:v,instance:h,options:w}),O=function(){};f.push(_||O)}})}function p(){f.forEach(function(g){return g()}),f=[]}return h}}var s9=[TV,YV,CV,sE,KV,zV,ZV,SV,VV],l9=o9({defaultModifiers:s9}),c9="tippy-box",mE="tippy-content",u9="tippy-backdrop",gE="tippy-arrow",vE="tippy-svg-arrow",_i={passive:!0,capture:!0},yE=function(){return document.body};function f9(e,t){return{}.hasOwnProperty.call(e,t)}function Ld(e,t,r){if(Array.isArray(e)){var n=e[t];return n??(Array.isArray(r)?r[t]:r)}return e}function Eg(e,t){var r={}.toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function bE(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Jx(e,t){if(t===0)return e;var r;return function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)}}function d9(e,t){var r=Object.assign({},e);return t.forEach(function(n){delete r[n]}),r}function h9(e){return e.split(/\s+/).filter(Boolean)}function ya(e){return[].concat(e)}function Qx(e,t){e.indexOf(t)===-1&&e.push(t)}function p9(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function m9(e){return e.split("-")[0]}function Ic(e){return[].slice.call(e)}function e1(e){return Object.keys(e).reduce(function(t,r){return e[r]!==void 0&&(t[r]=e[r]),t},{})}function Do(){return document.createElement("div")}function ns(e){return["Element","Fragment"].some(function(t){return Eg(e,t)})}function g9(e){return Eg(e,"NodeList")}function v9(e){return Eg(e,"MouseEvent")}function y9(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function b9(e){return ns(e)?[e]:g9(e)?Ic(e):Array.isArray(e)?e:Ic(document.querySelectorAll(e))}function Bd(e,t){e.forEach(function(r){r&&(r.style.transitionDuration=t+"ms")})}function t1(e,t){e.forEach(function(r){r&&r.setAttribute("data-state",t)})}function x9(e){var t,r=ya(e),n=r[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function w9(e,t){var r=t.clientX,n=t.clientY;return e.every(function(i){var a=i.popperRect,o=i.popperState,s=i.props,l=s.interactiveBorder,c=m9(o.placement),u=o.modifiersData.offset;if(!u)return!0;var f=c==="bottom"?u.top.y:0,d=c==="top"?u.bottom.y:0,h=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,p=a.top-n+f>l,g=n-a.bottom-d>l,v=a.left-r+h>l,x=r-a.right-m>l;return p||g||v||x})}function Fd(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[n](i,r)})}function r1(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=r.getRootNode==null||(n=r.getRootNode())==null?void 0:n.host}return!1}var Ur={isTouch:!1},n1=0;function _9(){Ur.isTouch||(Ur.isTouch=!0,window.performance&&document.addEventListener("mousemove",xE))}function xE(){var e=performance.now();e-n1<20&&(Ur.isTouch=!1,document.removeEventListener("mousemove",xE)),n1=e}function O9(){var e=document.activeElement;if(y9(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function S9(){document.addEventListener("touchstart",_9,_i),window.addEventListener("blur",O9)}var A9=typeof window<"u"&&typeof document<"u",E9=A9?!!window.msCrypto:!1;function pa(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function i1(e){var t=/[ \t]{2,}/g,r=/^[ \t]*/gm;return e.replace(t," ").replace(r,"").trim()}function P9(e){return i1(`
|
|
199
|
+
*/var $x;function YW(){return $x||($x=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;$d.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(_){if(!v){if(v=!0,x=_,_=f(_),d!==void 0&&m.hasValue){var O=m.value;if(d(O,_))return w=O}return w=_}if(O=w,r(x,_))return O;var A=f(_);return d!==void 0&&d(O,A)?(x=_,O):(x=_,w=A)}var v=!1,x,w,y=u===void 0?null:u;return[function(){return g(c())},y===null?void 0:function(){return g(y())}]},[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())})()),$d}var Lx;function GW(){return Lx||(Lx=1,process.env.NODE_ENV==="production"?yl.exports=qW():yl.exports=YW()),yl.exports}GW();function XW(e){e()}function ZW(){let e=null,t=null;return{clear(){e=null,t=null},notify(){XW(()=>{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 Bx={notify(){},get:()=>[]};function JW(e,t){let r,n=Bx,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=ZW())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=Bx)}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 QW=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",e7=QW(),t7=()=>typeof navigator<"u"&&navigator.product==="ReactNative",r7=t7(),n7=()=>e7||r7?E.useLayoutEffect:E.useEffect,i7=n7(),a7=Symbol.for("react-redux-context"),o7=typeof globalThis<"u"?globalThis:{};function s7(){if(!E.createContext)return{};const e=o7[a7]??=new Map;let t=e.get(E.createContext);return t||(t=E.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(E.createContext,t)),t}var l7=s7();function c7(e){const{children:t,context:r,serverState:n,store:i}=e,a=E.useMemo(()=>{const l=JW(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=E.useMemo(()=>i.getState(),[i]);i7(()=>{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||l7;return E.createElement(s.Provider,{value:a},t)}var u7=c7,f7=(e,t)=>t,gg=$([f7,me,Q2,vt,HS,jn,yB,mt],OB),vg=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)}},VA=wr("mouseClick"),HA=ws();HA.startListening({actionCreator:VA,effect:(e,t)=>{var r=e.payload,n=gg(t.getState(),vg(r));n?.activeIndex!=null&&t.dispatch(EL({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Jh=wr("mouseMove"),UA=ws();UA.startListening({actionCreator:Jh,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=Fm(n,n.tooltip.settings.shared),a=gg(n,vg(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch($S({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(RS()))}});var Fx={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},KA=fr({name:"rootProps",initialState:Fx,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:Fx.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}}}),d7=KA.reducer,{updateOptions:h7}=KA.actions,qA=fr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:p7}=qA.actions,m7=qA.reducer,YA=wr("keyDown"),GA=wr("focus"),yg=ws();yg.startListening({actionCreator:YA,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(zm(i,Ja(r))),s=jn(r);if(a==="Enter"){var l=Sc(r,"axis","hover",String(i.index));t.dispatch(Vh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=vL(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=Sc(r,"axis","hover",String(d));t.dispatch(Vh({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}});yg.startListening({actionCreator:GA,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=Sc(r,"axis","hover",String(a));t.dispatch(Vh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var gr=wr("externalEvent"),XA=ws();XA.startListening({actionCreator:gr,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:lB(r),activeDataKey:YS(r),activeIndex:Yn(r),activeLabel:qS(r),activeTooltipIndex:Yn(r),isTooltipActive:cB(r)};e.payload.handler(n,e.payload.reactEvent)}}});var g7=$([Za],e=>e.tooltipItemPayloads),v7=$([g7,Ns,(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}}}),ZA=wr("touchMove"),JA=ws();JA.startListening({actionCreator:ZA,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=Fm(n,n.tooltip.settings.shared);if(i==="axis"){var a=gg(n,vg({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch($S({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(NO),u=(o=l.getAttribute(IO))!==null&&o!==void 0?o:void 0,f=v7(t.getState(),c,u);t.dispatch(IS({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var y7=rO({brush:rz,cartesianAxis:R3,chartData:BB,errorBars:t8,graphicalItems:t3,layout:MN,legend:b5,options:NB,polarAxis:y6,polarOptions:m7,referenceElements:cz,rootProps:d7,tooltip:PL}),b7=function(t){return rN({reducer:y7,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([HA.middleware,UA.middleware,yg.middleware,XA.middleware,JA.middleware]),devTools:ei.devToolsEnabled})};function QA(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Gt(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=b7(t));var o=Ip;return E.createElement(u7,{context:o,store:a.current},r)}function eE(e){var{layout:t,width:r,height:n,margin:i}=e,a=ot(),o=Gt();return k.useEffect(()=>{o||(a(CN(t)),a(kN({width:r,height:n})),a(PN(i)))},[a,o,t,r,n,i]),null}function tE(e){var t=ot();return k.useEffect(()=>{t(h7(e))},[t,e]),null}var x7=["children"];function w7(e,t){if(e==null)return{};var r,n,i=_7(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 _7(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 Dc(){return Dc=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},Dc.apply(null,arguments)}var O7={width:"100%",height:"100%"},S7=k.forwardRef((e,t)=>{var r=$O(),n=LO(),i=WO();if(!Ta(r)||!Ta(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,E.createElement(O_,Dc({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:O7,ref:t}),a)}),A7=e=>{var{children:t}=e,r=re(bu);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return E.createElement(O_,{width:n,height:i,x:o,y:a},t)},zx=k.forwardRef((e,t)=>{var{children:r}=e,n=w7(e,x7),i=Gt();return i?E.createElement(A7,null,r):E.createElement(S7,Dc({ref:t},n),r)});function E7(){var e=ot(),[t,r]=k.useState(null),n=re(o5);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;cr(a)&&a!==n&&e(TN(a))}},[t,e,n]),r}function Wx(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 P7(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Wx(Object(r),!0).forEach(function(n){C7(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Wx(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function C7(e,t,r){return(t=k7(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function k7(e){var t=T7(e,"string");return typeof t=="symbol"?t:t+""}function T7(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 M7=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,x=ot(),[w,y]=k.useState(null),[_,O]=k.useState(null);YB();var A=E7(),P=k.useCallback(H=>{A(H),typeof t=="function"&&t(H),y(H),O(H)},[A,t,y,O]),T=k.useCallback(H=>{x(VA(H)),x(gr({handler:a,reactEvent:H}))},[x,a]),I=k.useCallback(H=>{x(Jh(H)),x(gr({handler:c,reactEvent:H}))},[x,c]),j=k.useCallback(H=>{x(RS()),x(gr({handler:u,reactEvent:H}))},[x,u]),S=k.useCallback(H=>{x(Jh(H)),x(gr({handler:f,reactEvent:H}))},[x,f]),D=k.useCallback(()=>{x(GA())},[x]),M=k.useCallback(H=>{x(YA(H.key))},[x]),R=k.useCallback(H=>{x(gr({handler:o,reactEvent:H}))},[x,o]),z=k.useCallback(H=>{x(gr({handler:s,reactEvent:H}))},[x,s]),W=k.useCallback(H=>{x(gr({handler:l,reactEvent:H}))},[x,l]),Y=k.useCallback(H=>{x(gr({handler:d,reactEvent:H}))},[x,d]),G=k.useCallback(H=>{x(gr({handler:p,reactEvent:H}))},[x,p]),L=k.useCallback(H=>{x(ZA(H)),x(gr({handler:m,reactEvent:H}))},[x,m]),K=k.useCallback(H=>{x(gr({handler:h,reactEvent:H}))},[x,h]);return E.createElement(eA.Provider,{value:w},E.createElement(NM.Provider,{value:_},E.createElement("div",{className:ye("recharts-wrapper",n),style:P7({position:"relative",cursor:"default",width:v,height:i},g),onClick:T,onContextMenu:R,onDoubleClick:z,onFocus:D,onKeyDown:M,onMouseDown:W,onMouseEnter:I,onMouseLeave:j,onMouseMove:S,onMouseUp:Y,onTouchEnd:K,onTouchMove:L,onTouchStart:G,ref:P},r)))}),j7=["children","className","width","height","style","compact","title","desc"];function D7(e,t){if(e==null)return{};var r,n,i=N7(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 N7(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 rE=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=D7(e,j7),f=tn(u);return s?E.createElement(zx,{otherAttributes:f,title:l,desc:c},r):E.createElement(M7,{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},E.createElement(zx,{otherAttributes:f,title:l,desc:c,ref:t},E.createElement(fz,null,r)))}),I7=["width","height"];function Qh(){return Qh=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},Qh.apply(null,arguments)}function R7(e,t){if(e==null)return{};var r,n,i=$7(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 $7(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 L7={top:5,right:5,bottom:5,left:5},B7={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:L7,reverseStackOrder:!1,syncMethod:"index"},nE=k.forwardRef(function(t,r){var n,i=kt(t.categoricalChartProps,B7),{width:a,height:o}=i,s=R7(i,I7);if(!Ta(a)||!Ta(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 E.createElement(QA,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},E.createElement(jA,{chartData:d.data}),E.createElement(eE,{width:a,height:o,layout:i.layout,margin:i.margin}),E.createElement(tE,{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}),E.createElement(rE,Qh({},s,{width:a,height:o,ref:r})))}),F7=["axis"],iE=k.forwardRef((e,t)=>E.createElement(nE,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:F7,tooltipPayloadSearcher:Gm,categoricalChartProps:e,ref:t})),z7=["axis","item"],W7=k.forwardRef((e,t)=>E.createElement(nE,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:z7,tooltipPayloadSearcher:Gm,categoricalChartProps:e,ref:t}));function V7(e){var t=ot();return k.useEffect(()=>{t(p7(e))},[t,e]),null}var H7=["width","height","layout"];function ep(){return ep=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},ep.apply(null,arguments)}function U7(e,t){if(e==null)return{};var r,n,i=K7(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 K7(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 q7={top:5,right:5,bottom:5,left:5},Y7={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:q7,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},G7=k.forwardRef(function(t,r){var n,i=kt(t.categoricalChartProps,Y7),{width:a,height:o,layout:s}=i,l=U7(i,H7);if(!Ta(a)||!Ta(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 E.createElement(QA,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},E.createElement(jA,{chartData:i.data}),E.createElement(eE,{width:a,height:o,layout:s,margin:i.margin}),E.createElement(tE,{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}),E.createElement(V7,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),E.createElement(rE,ep({width:a,height:o},l,{ref:r})))}),X7=["item"],Z7={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},zu=k.forwardRef((e,t)=>{var r=kt(e,Z7);return E.createElement(G7,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:X7,tooltipPayloadSearcher:Gm,categoricalChartProps:r,ref:t})});function J7({isStatic:e,data:t}){const r=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),n=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),a=Number(t?.moveOutPercentChange??t?.moveOutChange??0),o=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:r,color:o[0]},{name:"Move-outs",value:n,color:o[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return b.jsx(Gi,{title:"Community",period:"This Month",icon:b.jsx(Op,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:b.jsxs("div",{className:"flex",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:r+n})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(m_,{value:l(i,a)}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),b.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:b.jsx(ea,{width:"75%",height:"100%",children:b.jsxs(zu,{children:[b.jsxs(Rs,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[b.jsx(Qr,{fill:o[0]}),b.jsx(Qr,{fill:o[1]})]}),b.jsx(Qi,{content:b.jsx(gs,{})})]})})})]})})}function Q7({isStatic:e,data:t}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],n=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}];return b.jsx(Gi,{title:"Engagement",period:"This Month",icon:b.jsx(u_,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:b.jsx("div",{className:"w-full h-[235px]",children:b.jsx(ea,{width:"100%",height:"100%",children:b.jsxs(W7,{data:n,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[b.jsx(Bu,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),b.jsx(es,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),b.jsx(Fu,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),b.jsx(Qi,{content:b.jsx(gs,{}),cursor:{fill:"transparent"}}),b.jsx(TA,{dataKey:"value",barSize:40,isAnimationActive:!1,children:n.map((i,a)=>b.jsx(Qr,{fill:r[a]},i.name))})]})})})})}function eV({isStatic:e,data:t}){const r=Number(t?.totalBookings||0),n=Number(t?.averageUtilizationPercentage||0)*100,i=k.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,f)=>({time:u,bookings:l[f]||0,utilization:c[f]||0}))},[t]),a=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",o=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return b.jsxs(Gi,{title:"Facilities",period:"As of Today",icon:b.jsx(c_,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mb-[16px]",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),b.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:r})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),b.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[n.toFixed(2),"%"]})]})]}),b.jsx("div",{className:"w-full h-[170px]",children:b.jsx(ea,{width:"100%",height:"100%",children:b.jsxs(iE,{data:o,margin:{top:5,right:-30,left:-35,bottom:0},children:[b.jsx(Bu,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(Fu,{dataKey:"time",interval:0,tickFormatter:a,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),b.jsx(es,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),b.jsx(es,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),b.jsx(Qi,{content:b.jsx(gs,{})}),b.jsx(Oa,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),b.jsx(Oa,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4"})]})})})]})}function tV({data:e}){const t=e?.incomeSummary||{},r=e?.expenditureSummary||{},n=["AED","USD","EUR"],i=["Rs","INR","₹"];function a(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function o(s,l){return l?i.includes(l)?`${l} ${a(s)}`:n.includes(l)?`${a(s)} ${l}`:`${a(s)} ${l}`:a(s)}return b.jsx(Gi,{title:"Income",period:"This Month",icon:b.jsx(zv,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",children:b.jsxs("div",{children:[b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Income"}),b.jsx("div",{children:"Collection"}),b.jsx("div",{children:"Closing"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[b.jsx("div",{children:o(t.opening_balance,t?.currency_type)}),b.jsx("div",{children:o(t.income,t?.currency_type)}),b.jsx("div",{children:o(t.collection,t?.currency_type)}),b.jsx("div",{children:o(t.closing_balance,t?.currency_type)})]}),b.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),b.jsx("div",{className:"flex items-center justify-between",children:b.jsxs("div",{className:"flex items-center gap-[12px]",children:[b.jsx(zv,{className:"!text-[24px] text-red-600"}),b.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[b.jsx("div",{children:"Opening"}),b.jsx("div",{children:"Expenditure"}),b.jsx("div",{children:"Payment"}),b.jsx("div",{children:"Outstanding"})]}),b.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[b.jsx("div",{children:o(r.opening_balance,r?.currency_type)}),b.jsx("div",{children:o(r.expenditure,r?.currency_type)}),b.jsx("div",{children:o(r.payment,r?.currency_type)}),b.jsx("div",{children:o(r.outstanding,r?.currency_type)})]})]})})}var Kt="top",Or="bottom",Sr="right",qt="left",bg="auto",Ls=[Kt,Or,Sr,qt],Ra="start",ts="end",rV="clippingParents",aE="viewport",po="popper",nV="reference",Vx=Ls.reduce(function(e,t){return e.concat([t+"-"+Ra,t+"-"+ts])},[]),oE=[].concat(Ls,[bg]).reduce(function(e,t){return e.concat([t,t+"-"+Ra,t+"-"+ts])},[]),iV="beforeRead",aV="read",oV="afterRead",sV="beforeMain",lV="main",cV="afterMain",uV="beforeWrite",fV="write",dV="afterWrite",hV=[iV,aV,oV,sV,lV,cV,uV,fV,dV];function en(e){return e?(e.nodeName||"").toLowerCase():null}function ur(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ki(e){var t=ur(e).Element;return e instanceof t||e instanceof Element}function xr(e){var t=ur(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function xg(e){if(typeof ShadowRoot>"u")return!1;var t=ur(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function pV(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!xr(a)||!en(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function mV(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(l,c){return l[c]="",l},{});!xr(i)||!en(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(l){i.removeAttribute(l)}))})}}const sE={name:"applyStyles",enabled:!0,phase:"write",fn:pV,effect:mV,requires:["computeStyles"]};function Gr(e){return e.split("-")[0]}var $i=Math.max,Nc=Math.min,$a=Math.round;function tp(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function lE(){return!/^((?!chrome|android).)*safari/i.test(tp())}function La(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,a=1;t&&xr(e)&&(i=e.offsetWidth>0&&$a(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&$a(n.height)/e.offsetHeight||1);var o=Ki(e)?ur(e):window,s=o.visualViewport,l=!lE()&&r,c=(n.left+(l&&s?s.offsetLeft:0))/i,u=(n.top+(l&&s?s.offsetTop:0))/a,f=n.width/i,d=n.height/a;return{width:f,height:d,top:u,right:c+f,bottom:u+d,left:c,x:c,y:u}}function wg(e){var t=La(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function cE(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&xg(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function An(e){return ur(e).getComputedStyle(e)}function gV(e){return["table","td","th"].indexOf(en(e))>=0}function ii(e){return((Ki(e)?e.ownerDocument:e.document)||window.document).documentElement}function Wu(e){return en(e)==="html"?e:e.assignedSlot||e.parentNode||(xg(e)?e.host:null)||ii(e)}function Hx(e){return!xr(e)||An(e).position==="fixed"?null:e.offsetParent}function vV(e){var t=/firefox/i.test(tp()),r=/Trident/i.test(tp());if(r&&xr(e)){var n=An(e);if(n.position==="fixed")return null}var i=Wu(e);for(xg(i)&&(i=i.host);xr(i)&&["html","body"].indexOf(en(i))<0;){var a=An(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Bs(e){for(var t=ur(e),r=Hx(e);r&&gV(r)&&An(r).position==="static";)r=Hx(r);return r&&(en(r)==="html"||en(r)==="body"&&An(r).position==="static")?t:r||vV(e)||t}function _g(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Mo(e,t,r){return $i(e,Nc(t,r))}function yV(e,t,r){var n=Mo(e,t,r);return n>r?r:n}function uE(){return{top:0,right:0,bottom:0,left:0}}function fE(e){return Object.assign({},uE(),e)}function dE(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var bV=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,fE(typeof t!="number"?t:dE(t,Ls))};function xV(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=Gr(r.placement),l=_g(s),c=[qt,Sr].indexOf(s)>=0,u=c?"height":"width";if(!(!a||!o)){var f=bV(i.padding,r),d=wg(a),h=l==="y"?Kt:qt,m=l==="y"?Or:Sr,p=r.rects.reference[u]+r.rects.reference[l]-o[l]-r.rects.popper[u],g=o[l]-r.rects.reference[l],v=Bs(a),x=v?l==="y"?v.clientHeight||0:v.clientWidth||0:0,w=p/2-g/2,y=f[h],_=x-d[u]-f[m],O=x/2-d[u]/2+w,A=Mo(y,O,_),P=l;r.modifiersData[n]=(t={},t[P]=A,t.centerOffset=A-O,t)}}function wV(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||cE(t.elements.popper,i)&&(t.elements.arrow=i))}const _V={name:"arrow",enabled:!0,phase:"main",fn:xV,effect:wV,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ba(e){return e.split("-")[1]}var OV={top:"auto",right:"auto",bottom:"auto",left:"auto"};function SV(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:$a(r*i)/i||0,y:$a(n*i)/i||0}}function Ux(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,f=e.isFixed,d=o.x,h=d===void 0?0:d,m=o.y,p=m===void 0?0:m,g=typeof u=="function"?u({x:h,y:p}):{x:h,y:p};h=g.x,p=g.y;var v=o.hasOwnProperty("x"),x=o.hasOwnProperty("y"),w=qt,y=Kt,_=window;if(c){var O=Bs(r),A="clientHeight",P="clientWidth";if(O===ur(r)&&(O=ii(r),An(O).position!=="static"&&s==="absolute"&&(A="scrollHeight",P="scrollWidth")),O=O,i===Kt||(i===qt||i===Sr)&&a===ts){y=Or;var T=f&&O===_&&_.visualViewport?_.visualViewport.height:O[A];p-=T-n.height,p*=l?1:-1}if(i===qt||(i===Kt||i===Or)&&a===ts){w=Sr;var I=f&&O===_&&_.visualViewport?_.visualViewport.width:O[P];h-=I-n.width,h*=l?1:-1}}var j=Object.assign({position:s},c&&OV),S=u===!0?SV({x:h,y:p},ur(r)):{x:h,y:p};if(h=S.x,p=S.y,l){var D;return Object.assign({},j,(D={},D[y]=x?"0":"",D[w]=v?"0":"",D.transform=(_.devicePixelRatio||1)<=1?"translate("+h+"px, "+p+"px)":"translate3d("+h+"px, "+p+"px, 0)",D))}return Object.assign({},j,(t={},t[y]=x?p+"px":"",t[w]=v?h+"px":"",t.transform="",t))}function AV(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,l=s===void 0?!0:s,c={placement:Gr(t.placement),variation:Ba(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Ux(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Ux(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const EV={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:AV,data:{}};var bl={passive:!0};function PV(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,l=ur(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(u){u.addEventListener("scroll",r.update,bl)}),s&&l.addEventListener("resize",r.update,bl),function(){a&&c.forEach(function(u){u.removeEventListener("scroll",r.update,bl)}),s&&l.removeEventListener("resize",r.update,bl)}}const CV={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:PV,data:{}};var kV={left:"right",right:"left",bottom:"top",top:"bottom"};function Vl(e){return e.replace(/left|right|bottom|top/g,function(t){return kV[t]})}var TV={start:"end",end:"start"};function Kx(e){return e.replace(/start|end/g,function(t){return TV[t]})}function Og(e){var t=ur(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function Sg(e){return La(ii(e)).left+Og(e).scrollLeft}function MV(e,t){var r=ur(e),n=ii(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,l=0;if(i){a=i.width,o=i.height;var c=lE();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:a,height:o,x:s+Sg(e),y:l}}function jV(e){var t,r=ii(e),n=Og(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=$i(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=$i(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+Sg(e),l=-n.scrollTop;return An(i||r).direction==="rtl"&&(s+=$i(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:l}}function Ag(e){var t=An(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function hE(e){return["html","body","#document"].indexOf(en(e))>=0?e.ownerDocument.body:xr(e)&&Ag(e)?e:hE(Wu(e))}function jo(e,t){var r;t===void 0&&(t=[]);var n=hE(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=ur(n),o=i?[a].concat(a.visualViewport||[],Ag(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(jo(Wu(o)))}function rp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function DV(e,t){var r=La(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function qx(e,t,r){return t===aE?rp(MV(e,r)):Ki(t)?DV(t,r):rp(jV(ii(e)))}function NV(e){var t=jo(Wu(e)),r=["absolute","fixed"].indexOf(An(e).position)>=0,n=r&&xr(e)?Bs(e):e;return Ki(n)?t.filter(function(i){return Ki(i)&&cE(i,n)&&en(i)!=="body"}):[]}function IV(e,t,r,n){var i=t==="clippingParents"?NV(e):[].concat(t),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(l,c){var u=qx(e,c,n);return l.top=$i(u.top,l.top),l.right=Nc(u.right,l.right),l.bottom=Nc(u.bottom,l.bottom),l.left=$i(u.left,l.left),l},qx(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function pE(e){var t=e.reference,r=e.element,n=e.placement,i=n?Gr(n):null,a=n?Ba(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,l;switch(i){case Kt:l={x:o,y:t.y-r.height};break;case Or:l={x:o,y:t.y+t.height};break;case Sr:l={x:t.x+t.width,y:s};break;case qt:l={x:t.x-r.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?_g(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(a){case Ra:l[c]=l[c]-(t[u]/2-r[u]/2);break;case ts:l[c]=l[c]+(t[u]/2-r[u]/2);break}}return l}function rs(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.strategy,o=a===void 0?e.strategy:a,s=r.boundary,l=s===void 0?rV:s,c=r.rootBoundary,u=c===void 0?aE:c,f=r.elementContext,d=f===void 0?po:f,h=r.altBoundary,m=h===void 0?!1:h,p=r.padding,g=p===void 0?0:p,v=fE(typeof g!="number"?g:dE(g,Ls)),x=d===po?nV:po,w=e.rects.popper,y=e.elements[m?x:d],_=IV(Ki(y)?y:y.contextElement||ii(e.elements.popper),l,u,o),O=La(e.elements.reference),A=pE({reference:O,element:w,placement:i}),P=rp(Object.assign({},w,A)),T=d===po?P:O,I={top:_.top-T.top+v.top,bottom:T.bottom-_.bottom+v.bottom,left:_.left-T.left+v.left,right:T.right-_.right+v.right},j=e.modifiersData.offset;if(d===po&&j){var S=j[i];Object.keys(I).forEach(function(D){var M=[Sr,Or].indexOf(D)>=0?1:-1,R=[Kt,Or].indexOf(D)>=0?"y":"x";I[D]+=S[R]*M})}return I}function RV(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,l=r.allowedAutoPlacements,c=l===void 0?oE:l,u=Ba(n),f=u?s?Vx:Vx.filter(function(m){return Ba(m)===u}):Ls,d=f.filter(function(m){return c.indexOf(m)>=0});d.length===0&&(d=f);var h=d.reduce(function(m,p){return m[p]=rs(e,{placement:p,boundary:i,rootBoundary:a,padding:o})[Gr(p)],m},{});return Object.keys(h).sort(function(m,p){return h[m]-h[p]})}function $V(e){if(Gr(e)===bg)return[];var t=Vl(e);return[Kx(e),t,Kx(t)]}function LV(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,l=r.fallbackPlacements,c=r.padding,u=r.boundary,f=r.rootBoundary,d=r.altBoundary,h=r.flipVariations,m=h===void 0?!0:h,p=r.allowedAutoPlacements,g=t.options.placement,v=Gr(g),x=v===g,w=l||(x||!m?[Vl(g)]:$V(g)),y=[g].concat(w).reduce(function(Q,J){return Q.concat(Gr(J)===bg?RV(t,{placement:J,boundary:u,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:p}):J)},[]),_=t.rects.reference,O=t.rects.popper,A=new Map,P=!0,T=y[0],I=0;I<y.length;I++){var j=y[I],S=Gr(j),D=Ba(j)===Ra,M=[Kt,Or].indexOf(S)>=0,R=M?"width":"height",z=rs(t,{placement:j,boundary:u,rootBoundary:f,altBoundary:d,padding:c}),W=M?D?Sr:qt:D?Or:Kt;_[R]>O[R]&&(W=Vl(W));var Y=Vl(W),G=[];if(a&&G.push(z[S]<=0),s&&G.push(z[W]<=0,z[Y]<=0),G.every(function(Q){return Q})){T=j,P=!1;break}A.set(j,G)}if(P)for(var L=m?3:1,K=function(J){var te=y.find(function(oe){var se=A.get(oe);if(se)return se.slice(0,J).every(function(V){return V})});if(te)return T=te,"break"},H=L;H>0;H--){var ne=K(H);if(ne==="break")break}t.placement!==T&&(t.modifiersData[n]._skip=!0,t.placement=T,t.reset=!0)}}const BV={name:"flip",enabled:!0,phase:"main",fn:LV,requiresIfExists:["offset"],data:{_skip:!1}};function Yx(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function Gx(e){return[Kt,Sr,Or,qt].some(function(t){return e[t]>=0})}function FV(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=rs(t,{elementContext:"reference"}),s=rs(t,{altBoundary:!0}),l=Yx(o,n),c=Yx(s,i,a),u=Gx(l),f=Gx(c);t.modifiersData[r]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":f})}const zV={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:FV};function WV(e,t,r){var n=Gr(e),i=[qt,Kt].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[qt,Sr].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function VV(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=oE.reduce(function(u,f){return u[f]=WV(f,t.rects,a),u},{}),s=o[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[n]=o}const HV={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:VV};function UV(e){var t=e.state,r=e.name;t.modifiersData[r]=pE({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const KV={name:"popperOffsets",enabled:!0,phase:"read",fn:UV,data:{}};function qV(e){return e==="x"?"y":"x"}function YV(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,l=r.boundary,c=r.rootBoundary,u=r.altBoundary,f=r.padding,d=r.tether,h=d===void 0?!0:d,m=r.tetherOffset,p=m===void 0?0:m,g=rs(t,{boundary:l,rootBoundary:c,padding:f,altBoundary:u}),v=Gr(t.placement),x=Ba(t.placement),w=!x,y=_g(v),_=qV(y),O=t.modifiersData.popperOffsets,A=t.rects.reference,P=t.rects.popper,T=typeof p=="function"?p(Object.assign({},t.rects,{placement:t.placement})):p,I=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),j=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(O){if(a){var D,M=y==="y"?Kt:qt,R=y==="y"?Or:Sr,z=y==="y"?"height":"width",W=O[y],Y=W+g[M],G=W-g[R],L=h?-P[z]/2:0,K=x===Ra?A[z]:P[z],H=x===Ra?-P[z]:-A[z],ne=t.elements.arrow,Q=h&&ne?wg(ne):{width:0,height:0},J=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:uE(),te=J[M],oe=J[R],se=Mo(0,A[z],Q[z]),V=w?A[z]/2-L-se-te-I.mainAxis:K-se-te-I.mainAxis,q=w?-A[z]/2+L+se+oe+I.mainAxis:H+se+oe+I.mainAxis,ie=t.elements.arrow&&Bs(t.elements.arrow),N=ie?y==="y"?ie.clientTop||0:ie.clientLeft||0:0,ge=(D=j?.[y])!=null?D:0,fe=W+V-ge-N,Be=W+q-ge,Ve=Mo(h?Nc(Y,fe):Y,W,h?$i(G,Be):G);O[y]=Ve,S[y]=Ve-W}if(s){var Tt,Ir=y==="x"?Kt:qt,rn=y==="x"?Or:Sr,Cr=O[_],Rr=_==="y"?"height":"width",nn=Cr+g[Ir],an=Cr-g[rn],li=[Kt,qt].indexOf(v)!==-1,ci=(Tt=j?.[_])!=null?Tt:0,ui=li?nn:Cr-A[Rr]-P[Rr]-ci+I.altAxis,fi=li?Cr+A[Rr]+P[Rr]-ci-I.altAxis:an,ra=h&&li?yV(ui,Cr,fi):Mo(h?ui:nn,Cr,h?fi:an);O[_]=ra,S[_]=ra-Cr}t.modifiersData[n]=S}}const GV={name:"preventOverflow",enabled:!0,phase:"main",fn:YV,requiresIfExists:["offset"]};function XV(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ZV(e){return e===ur(e)||!xr(e)?Og(e):XV(e)}function JV(e){var t=e.getBoundingClientRect(),r=$a(t.width)/e.offsetWidth||1,n=$a(t.height)/e.offsetHeight||1;return r!==1||n!==1}function QV(e,t,r){r===void 0&&(r=!1);var n=xr(t),i=xr(t)&&JV(t),a=ii(t),o=La(e,i,r),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(n||!n&&!r)&&((en(t)!=="body"||Ag(a))&&(s=ZV(t)),xr(t)?(l=La(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):a&&(l.x=Sg(a))),{x:o.left+s.scrollLeft-l.x,y:o.top+s.scrollTop-l.y,width:o.width,height:o.height}}function e9(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var l=t.get(s);l&&i(l)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function t9(e){var t=e9(e);return hV.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function r9(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function n9(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var Xx={placement:"bottom",modifiers:[],strategy:"absolute"};function Zx(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function i9(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?Xx:i;return function(s,l,c){c===void 0&&(c=a);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},Xx,a),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},f=[],d=!1,h={state:u,setOptions:function(v){var x=typeof v=="function"?v(u.options):v;p(),u.options=Object.assign({},a,u.options,x),u.scrollParents={reference:Ki(s)?jo(s):s.contextElement?jo(s.contextElement):[],popper:jo(l)};var w=t9(n9([].concat(n,u.options.modifiers)));return u.orderedModifiers=w.filter(function(y){return y.enabled}),m(),h.update()},forceUpdate:function(){if(!d){var v=u.elements,x=v.reference,w=v.popper;if(Zx(x,w)){u.rects={reference:QV(x,Bs(w),u.options.strategy==="fixed"),popper:wg(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(I){return u.modifiersData[I.name]=Object.assign({},I.data)});for(var y=0;y<u.orderedModifiers.length;y++){if(u.reset===!0){u.reset=!1,y=-1;continue}var _=u.orderedModifiers[y],O=_.fn,A=_.options,P=A===void 0?{}:A,T=_.name;typeof O=="function"&&(u=O({state:u,options:P,name:T,instance:h})||u)}}}},update:r9(function(){return new Promise(function(g){h.forceUpdate(),g(u)})}),destroy:function(){p(),d=!0}};if(!Zx(s,l))return h;h.setOptions(c).then(function(g){!d&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var v=g.name,x=g.options,w=x===void 0?{}:x,y=g.effect;if(typeof y=="function"){var _=y({state:u,name:v,instance:h,options:w}),O=function(){};f.push(_||O)}})}function p(){f.forEach(function(g){return g()}),f=[]}return h}}var a9=[CV,KV,EV,sE,HV,BV,GV,_V,zV],o9=i9({defaultModifiers:a9}),s9="tippy-box",mE="tippy-content",l9="tippy-backdrop",gE="tippy-arrow",vE="tippy-svg-arrow",_i={passive:!0,capture:!0},yE=function(){return document.body};function c9(e,t){return{}.hasOwnProperty.call(e,t)}function Ld(e,t,r){if(Array.isArray(e)){var n=e[t];return n??(Array.isArray(r)?r[t]:r)}return e}function Eg(e,t){var r={}.toString.call(e);return r.indexOf("[object")===0&&r.indexOf(t+"]")>-1}function bE(e,t){return typeof e=="function"?e.apply(void 0,t):e}function Jx(e,t){if(t===0)return e;var r;return function(n){clearTimeout(r),r=setTimeout(function(){e(n)},t)}}function u9(e,t){var r=Object.assign({},e);return t.forEach(function(n){delete r[n]}),r}function f9(e){return e.split(/\s+/).filter(Boolean)}function va(e){return[].concat(e)}function Qx(e,t){e.indexOf(t)===-1&&e.push(t)}function d9(e){return e.filter(function(t,r){return e.indexOf(t)===r})}function h9(e){return e.split("-")[0]}function Ic(e){return[].slice.call(e)}function e1(e){return Object.keys(e).reduce(function(t,r){return e[r]!==void 0&&(t[r]=e[r]),t},{})}function Do(){return document.createElement("div")}function ns(e){return["Element","Fragment"].some(function(t){return Eg(e,t)})}function p9(e){return Eg(e,"NodeList")}function m9(e){return Eg(e,"MouseEvent")}function g9(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function v9(e){return ns(e)?[e]:p9(e)?Ic(e):Array.isArray(e)?e:Ic(document.querySelectorAll(e))}function Bd(e,t){e.forEach(function(r){r&&(r.style.transitionDuration=t+"ms")})}function t1(e,t){e.forEach(function(r){r&&r.setAttribute("data-state",t)})}function y9(e){var t,r=va(e),n=r[0];return n!=null&&(t=n.ownerDocument)!=null&&t.body?n.ownerDocument:document}function b9(e,t){var r=t.clientX,n=t.clientY;return e.every(function(i){var a=i.popperRect,o=i.popperState,s=i.props,l=s.interactiveBorder,c=h9(o.placement),u=o.modifiersData.offset;if(!u)return!0;var f=c==="bottom"?u.top.y:0,d=c==="top"?u.bottom.y:0,h=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,p=a.top-n+f>l,g=n-a.bottom-d>l,v=a.left-r+h>l,x=r-a.right-m>l;return p||g||v||x})}function Fd(e,t,r){var n=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[n](i,r)})}function r1(e,t){for(var r=t;r;){var n;if(e.contains(r))return!0;r=r.getRootNode==null||(n=r.getRootNode())==null?void 0:n.host}return!1}var Ur={isTouch:!1},n1=0;function x9(){Ur.isTouch||(Ur.isTouch=!0,window.performance&&document.addEventListener("mousemove",xE))}function xE(){var e=performance.now();e-n1<20&&(Ur.isTouch=!1,document.removeEventListener("mousemove",xE)),n1=e}function w9(){var e=document.activeElement;if(g9(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function _9(){document.addEventListener("touchstart",x9,_i),window.addEventListener("blur",w9)}var O9=typeof window<"u"&&typeof document<"u",S9=O9?!!window.msCrypto:!1;function ha(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function i1(e){var t=/[ \t]{2,}/g,r=/^[ \t]*/gm;return e.replace(t," ").replace(r,"").trim()}function A9(e){return i1(`
|
|
200
200
|
%ctippy.js
|
|
201
201
|
|
|
202
202
|
%c`+i1(e)+`
|
|
203
203
|
|
|
204
204
|
%c👷 This is a development-only message. It will be removed in production.
|
|
205
|
-
`)}function wE(e){return[
|
|
205
|
+
`)}function wE(e){return[A9(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var is;process.env.NODE_ENV!=="production"&&E9();function E9(){is=new Set}function un(e,t){if(e&&!is.has(t)){var r;is.add(t),(r=console).warn.apply(r,wE(t))}}function np(e,t){if(e&&!is.has(t)){var r;is.add(t),(r=console).error.apply(r,wE(t))}}function P9(e){var t=!e,r=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;np(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),np(r,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var _E={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},C9={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},ir=Object.assign({appendTo:yE,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},_E,C9),k9=Object.keys(ir),T9=function(t){process.env.NODE_ENV!=="production"&&SE(t,[]);var r=Object.keys(t);r.forEach(function(n){ir[n]=t[n]})};function OE(e){var t=e.plugins||[],r=t.reduce(function(n,i){var a=i.name,o=i.defaultValue;if(a){var s;n[a]=e[a]!==void 0?e[a]:(s=ir[a])!=null?s:o}return n},{});return Object.assign({},e,r)}function M9(e,t){var r=t?Object.keys(OE(Object.assign({},ir,{plugins:t}))):k9,n=r.reduce(function(i,a){var o=(e.getAttribute("data-tippy-"+a)||"").trim();if(!o)return i;if(a==="content")i[a]=o;else try{i[a]=JSON.parse(o)}catch{i[a]=o}return i},{});return n}function a1(e,t){var r=Object.assign({},t,{content:bE(t.content,[e])},t.ignoreAttributes?{}:M9(e,t.plugins));return r.aria=Object.assign({},ir.aria,r.aria),r.aria={expanded:r.aria.expanded==="auto"?t.interactive:r.aria.expanded,content:r.aria.content==="auto"?t.interactive?null:"describedby":r.aria.content},r}function SE(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var r=Object.keys(e);r.forEach(function(n){var i=u9(ir,Object.keys(_E)),a=!c9(i,n);a&&(a=t.filter(function(o){return o.name===n}).length===0),un(a,["`"+n+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.",`
|
|
206
206
|
|
|
207
207
|
`,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
|
|
208
|
-
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var
|
|
208
|
+
`,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var j9=function(){return"innerHTML"};function ip(e,t){e[j9()]=t}function o1(e){var t=Do();return e===!0?t.className=gE:(t.className=vE,ns(e)?t.appendChild(e):ip(t,e)),t}function s1(e,t){ns(t.content)?(ip(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?ip(e,t.content):e.textContent=t.content)}function ap(e){var t=e.firstElementChild,r=Ic(t.children);return{box:t,content:r.find(function(n){return n.classList.contains(mE)}),arrow:r.find(function(n){return n.classList.contains(gE)||n.classList.contains(vE)}),backdrop:r.find(function(n){return n.classList.contains(l9)})}}function AE(e){var t=Do(),r=Do();r.className=s9,r.setAttribute("data-state","hidden"),r.setAttribute("tabindex","-1");var n=Do();n.className=mE,n.setAttribute("data-state","hidden"),s1(n,e.props),t.appendChild(r),r.appendChild(n),i(e.props,e.props);function i(a,o){var s=ap(t),l=s.box,c=s.content,u=s.arrow;o.theme?l.setAttribute("data-theme",o.theme):l.removeAttribute("data-theme"),typeof o.animation=="string"?l.setAttribute("data-animation",o.animation):l.removeAttribute("data-animation"),o.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof o.maxWidth=="number"?o.maxWidth+"px":o.maxWidth,o.role?l.setAttribute("role",o.role):l.removeAttribute("role"),(a.content!==o.content||a.allowHTML!==o.allowHTML)&&s1(c,e.props),o.arrow?u?a.arrow!==o.arrow&&(l.removeChild(u),l.appendChild(o1(o.arrow))):l.appendChild(o1(o.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}AE.$$tippy=!0;var D9=1,xl=[],zd=[];function N9(e,t){var r=a1(e,Object.assign({},ir,OE(e1(t)))),n,i,a,o=!1,s=!1,l=!1,c=!1,u,f,d,h=[],m=Jx(fe,r.interactiveDebounce),p,g=D9++,v=null,x=d9(r.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},y={id:g,reference:e,popper:Do(),popperInstance:v,props:r,state:w,plugins:x,clearDelayTimeouts:ui,setProps:fi,setContent:ra,show:Hs,hide:Us,hideWithInteractivity:qu,enable:li,disable:ci,unmount:Yu,destroy:Gu};if(!r.render)return process.env.NODE_ENV!=="production"&&np(!0,"render() function has not been supplied."),y;var _=r.render(y),O=_.popper,A=_.onUpdate;O.setAttribute("data-tippy-root",""),O.id="tippy-"+y.id,y.popper=O,e._tippy=y,O._tippy=y;var P=x.map(function(F){return F.fn(y)}),T=e.hasAttribute("aria-expanded");return ie(),L(),W(),Y("onCreate",[y]),r.showOnCreate&&nn(),O.addEventListener("mouseenter",function(){y.props.interactive&&y.state.isVisible&&y.clearDelayTimeouts()}),O.addEventListener("mouseleave",function(){y.props.interactive&&y.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",m)}),y;function I(){var F=y.props.touch;return Array.isArray(F)?F:[F,0]}function j(){return I()[0]==="hold"}function S(){var F;return!!((F=y.props.render)!=null&&F.$$tippy)}function D(){return p||e}function M(){var F=D().parentNode;return F?y9(F):document}function R(){return ap(O)}function z(F){return y.state.isMounted&&!y.state.isVisible||Ur.isTouch||u&&u.type==="focus"?0:Ld(y.props.delay,F?0:1,ir.delay)}function W(F){F===void 0&&(F=!1),O.style.pointerEvents=y.props.interactive&&!F?"":"none",O.style.zIndex=""+y.props.zIndex}function Y(F,ee,le){if(le===void 0&&(le=!0),P.forEach(function(de){de[F]&&de[F].apply(de,ee)}),le){var we;(we=y.props)[F].apply(we,ee)}}function G(){var F=y.props.aria;if(F.content){var ee="aria-"+F.content,le=O.id,we=va(y.props.triggerTarget||e);we.forEach(function(de){var yt=de.getAttribute(ee);if(y.state.isVisible)de.setAttribute(ee,yt?yt+" "+le:le);else{var dt=yt&&yt.replace(le,"").trim();dt?de.setAttribute(ee,dt):de.removeAttribute(ee)}})}}function L(){if(!(T||!y.props.aria.expanded)){var F=va(y.props.triggerTarget||e);F.forEach(function(ee){y.props.interactive?ee.setAttribute("aria-expanded",y.state.isVisible&&ee===D()?"true":"false"):ee.removeAttribute("aria-expanded")})}}function K(){M().removeEventListener("mousemove",m),xl=xl.filter(function(F){return F!==m})}function H(F){if(!(Ur.isTouch&&(l||F.type==="mousedown"))){var ee=F.composedPath&&F.composedPath()[0]||F.target;if(!(y.props.interactive&&r1(O,ee))){if(va(y.props.triggerTarget||e).some(function(le){return r1(le,ee)})){if(Ur.isTouch||y.state.isVisible&&y.props.trigger.indexOf("click")>=0)return}else Y("onClickOutside",[y,F]);y.props.hideOnClick===!0&&(y.clearDelayTimeouts(),y.hide(),s=!0,setTimeout(function(){s=!1}),y.state.isMounted||te())}}}function ne(){l=!0}function Q(){l=!1}function J(){var F=M();F.addEventListener("mousedown",H,!0),F.addEventListener("touchend",H,_i),F.addEventListener("touchstart",Q,_i),F.addEventListener("touchmove",ne,_i)}function te(){var F=M();F.removeEventListener("mousedown",H,!0),F.removeEventListener("touchend",H,_i),F.removeEventListener("touchstart",Q,_i),F.removeEventListener("touchmove",ne,_i)}function oe(F,ee){V(F,function(){!y.state.isVisible&&O.parentNode&&O.parentNode.contains(O)&&ee()})}function se(F,ee){V(F,ee)}function V(F,ee){var le=R().box;function we(de){de.target===le&&(Fd(le,"remove",we),ee())}if(F===0)return ee();Fd(le,"remove",f),Fd(le,"add",we),f=we}function q(F,ee,le){le===void 0&&(le=!1);var we=va(y.props.triggerTarget||e);we.forEach(function(de){de.addEventListener(F,ee,le),h.push({node:de,eventType:F,handler:ee,options:le})})}function ie(){j()&&(q("touchstart",ge,{passive:!0}),q("touchend",Be,{passive:!0})),f9(y.props.trigger).forEach(function(F){if(F!=="manual")switch(q(F,ge),F){case"mouseenter":q("mouseleave",Be);break;case"focus":q(S9?"focusout":"blur",Ve);break;case"focusin":q("focusout",Ve);break}})}function N(){h.forEach(function(F){var ee=F.node,le=F.eventType,we=F.handler,de=F.options;ee.removeEventListener(le,we,de)}),h=[]}function ge(F){var ee,le=!1;if(!(!y.state.isEnabled||Tt(F)||s)){var we=((ee=u)==null?void 0:ee.type)==="focus";u=F,p=F.currentTarget,L(),!y.state.isVisible&&m9(F)&&xl.forEach(function(de){return de(F)}),F.type==="click"&&(y.props.trigger.indexOf("mouseenter")<0||o)&&y.props.hideOnClick!==!1&&y.state.isVisible?le=!0:nn(F),F.type==="click"&&(o=!le),le&&!we&&an(F)}}function fe(F){var ee=F.target,le=D().contains(ee)||O.contains(ee);if(!(F.type==="mousemove"&&le)){var we=Rr().concat(O).map(function(de){var yt,dt=de._tippy,$r=(yt=dt.popperInstance)==null?void 0:yt.state;return $r?{popperRect:de.getBoundingClientRect(),popperState:$r,props:r}:null}).filter(Boolean);b9(we,F)&&(K(),an(F))}}function Be(F){var ee=Tt(F)||y.props.trigger.indexOf("click")>=0&&o;if(!ee){if(y.props.interactive){y.hideWithInteractivity(F);return}an(F)}}function Ve(F){y.props.trigger.indexOf("focusin")<0&&F.target!==D()||y.props.interactive&&F.relatedTarget&&O.contains(F.relatedTarget)||an(F)}function Tt(F){return Ur.isTouch?j()!==F.type.indexOf("touch")>=0:!1}function Ir(){rn();var F=y.props,ee=F.popperOptions,le=F.placement,we=F.offset,de=F.getReferenceClientRect,yt=F.moveTransition,dt=S()?ap(O).arrow:null,$r=de?{getBoundingClientRect:de,contextElement:de.contextElement||D()}:e,na={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(di){var Dn=di.state;if(S()){var Ks=R(),ia=Ks.box;["placement","reference-hidden","escaped"].forEach(function(aa){aa==="placement"?ia.setAttribute("data-placement",Dn.placement):Dn.attributes.popper["data-popper-"+aa]?ia.setAttribute("data-"+aa,""):ia.removeAttribute("data-"+aa)}),Dn.attributes.popper={}}}},Lr=[{name:"offset",options:{offset:we}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!yt}},na];S()&&dt&&Lr.push({name:"arrow",options:{element:dt,padding:3}}),Lr.push.apply(Lr,ee?.modifiers||[]),y.popperInstance=o9($r,O,Object.assign({},ee,{placement:le,onFirstUpdate:d,modifiers:Lr}))}function rn(){y.popperInstance&&(y.popperInstance.destroy(),y.popperInstance=null)}function Cr(){var F=y.props.appendTo,ee,le=D();y.props.interactive&&F===yE||F==="parent"?ee=le.parentNode:ee=bE(F,[le]),ee.contains(O)||ee.appendChild(O),y.state.isMounted=!0,Ir(),process.env.NODE_ENV!=="production"&&un(y.props.interactive&&F===ir.appendTo&&le.nextElementSibling!==O,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
|
|
209
209
|
|
|
210
210
|
`,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
|
|
211
211
|
|
|
212
212
|
`,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
|
|
213
213
|
|
|
214
|
-
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Rr(){return Ic(O.querySelectorAll("[data-tippy-root]"))}function nn(F){y.clearDelayTimeouts(),F&&Y("onTrigger",[y,F]),J();var ee=z(!0),le=I(),we=le[0],de=le[1];Ur.isTouch&&we==="hold"&&de&&(ee=de),ee?n=setTimeout(function(){y.show()},ee):y.show()}function an(F){if(y.clearDelayTimeouts(),Y("onUntrigger",[y,F]),!y.state.isVisible){te();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(F.type)>=0&&o)){var ee=z(!1);ee?i=setTimeout(function(){y.state.isVisible&&y.hide()},ee):a=requestAnimationFrame(function(){y.hide()})}}function li(){y.state.isEnabled=!0}function ci(){y.hide(),y.state.isEnabled=!1}function ui(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(a)}function fi(F){if(process.env.NODE_ENV!=="production"&&un(y.state.isDestroyed,
|
|
214
|
+
`,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Rr(){return Ic(O.querySelectorAll("[data-tippy-root]"))}function nn(F){y.clearDelayTimeouts(),F&&Y("onTrigger",[y,F]),J();var ee=z(!0),le=I(),we=le[0],de=le[1];Ur.isTouch&&we==="hold"&&de&&(ee=de),ee?n=setTimeout(function(){y.show()},ee):y.show()}function an(F){if(y.clearDelayTimeouts(),Y("onUntrigger",[y,F]),!y.state.isVisible){te();return}if(!(y.props.trigger.indexOf("mouseenter")>=0&&y.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(F.type)>=0&&o)){var ee=z(!1);ee?i=setTimeout(function(){y.state.isVisible&&y.hide()},ee):a=requestAnimationFrame(function(){y.hide()})}}function li(){y.state.isEnabled=!0}function ci(){y.hide(),y.state.isEnabled=!1}function ui(){clearTimeout(n),clearTimeout(i),cancelAnimationFrame(a)}function fi(F){if(process.env.NODE_ENV!=="production"&&un(y.state.isDestroyed,ha("setProps")),!y.state.isDestroyed){Y("onBeforeUpdate",[y,F]),N();var ee=y.props,le=a1(e,Object.assign({},ee,e1(F),{ignoreAttributes:!0}));y.props=le,ie(),ee.interactiveDebounce!==le.interactiveDebounce&&(K(),m=Jx(fe,le.interactiveDebounce)),ee.triggerTarget&&!le.triggerTarget?va(ee.triggerTarget).forEach(function(we){we.removeAttribute("aria-expanded")}):le.triggerTarget&&e.removeAttribute("aria-expanded"),L(),W(),A&&A(ee,le),y.popperInstance&&(Ir(),Rr().forEach(function(we){requestAnimationFrame(we._tippy.popperInstance.forceUpdate)})),Y("onAfterUpdate",[y,F])}}function ra(F){y.setProps({content:F})}function Hs(){process.env.NODE_ENV!=="production"&&un(y.state.isDestroyed,ha("show"));var F=y.state.isVisible,ee=y.state.isDestroyed,le=!y.state.isEnabled,we=Ur.isTouch&&!y.props.touch,de=Ld(y.props.duration,0,ir.duration);if(!(F||ee||le||we)&&!D().hasAttribute("disabled")&&(Y("onShow",[y],!1),y.props.onShow(y)!==!1)){if(y.state.isVisible=!0,S()&&(O.style.visibility="visible"),W(),J(),y.state.isMounted||(O.style.transition="none"),S()){var yt=R(),dt=yt.box,$r=yt.content;Bd([dt,$r],0)}d=function(){var Lr;if(!(!y.state.isVisible||c)){if(c=!0,O.offsetHeight,O.style.transition=y.props.moveTransition,S()&&y.props.animation){var eo=R(),di=eo.box,Dn=eo.content;Bd([di,Dn],de),t1([di,Dn],"visible")}G(),L(),Qx(zd,y),(Lr=y.popperInstance)==null||Lr.forceUpdate(),Y("onMount",[y]),y.props.animation&&S()&&se(de,function(){y.state.isShown=!0,Y("onShown",[y])})}},Cr()}}function Us(){process.env.NODE_ENV!=="production"&&un(y.state.isDestroyed,ha("hide"));var F=!y.state.isVisible,ee=y.state.isDestroyed,le=!y.state.isEnabled,we=Ld(y.props.duration,1,ir.duration);if(!(F||ee||le)&&(Y("onHide",[y],!1),y.props.onHide(y)!==!1)){if(y.state.isVisible=!1,y.state.isShown=!1,c=!1,o=!1,S()&&(O.style.visibility="hidden"),K(),te(),W(!0),S()){var de=R(),yt=de.box,dt=de.content;y.props.animation&&(Bd([yt,dt],we),t1([yt,dt],"hidden"))}G(),L(),y.props.animation?S()&&oe(we,y.unmount):y.unmount()}}function qu(F){process.env.NODE_ENV!=="production"&&un(y.state.isDestroyed,ha("hideWithInteractivity")),M().addEventListener("mousemove",m),Qx(xl,m),m(F)}function Yu(){process.env.NODE_ENV!=="production"&&un(y.state.isDestroyed,ha("unmount")),y.state.isVisible&&y.hide(),y.state.isMounted&&(rn(),Rr().forEach(function(F){F._tippy.unmount()}),O.parentNode&&O.parentNode.removeChild(O),zd=zd.filter(function(F){return F!==y}),y.state.isMounted=!1,Y("onHidden",[y]))}function Gu(){process.env.NODE_ENV!=="production"&&un(y.state.isDestroyed,ha("destroy")),!y.state.isDestroyed&&(y.clearDelayTimeouts(),y.unmount(),N(),delete e._tippy,y.state.isDestroyed=!0,Y("onDestroy",[y]))}}function Fs(e,t){t===void 0&&(t={});var r=ir.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(P9(e),SE(t,r)),_9();var n=Object.assign({},t,{plugins:r}),i=v9(e);if(process.env.NODE_ENV!=="production"){var a=ns(n.content),o=i.length>1;un(a&&o,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.",`
|
|
215
215
|
|
|
216
216
|
`,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
|
|
217
217
|
|
|
218
218
|
`,`1) content: element.innerHTML
|
|
219
|
-
`,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&R9(c,n);return u&&l.push(u),l},[]);return ns(e)?s[0]:s}Fs.defaultProps=ir;Fs.setDefaultProps=j9;Fs.currentInput=Ur;Object.assign({},sE,{effect:function(t){var r=t.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow)}});Fs.setDefaultProps({render:AE});function EE(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var PE=typeof window<"u"&&typeof document<"u";function op(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function l1(){return PE&&document.createElement("div")}function $9(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function CE(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e)if(t.hasOwnProperty(r)){if(!CE(e[r],t[r]))return!1}else return!1;return!0}else return!1}function L9(e){var t=[];return e.forEach(function(r){t.find(function(n){return CE(r,n)})||t.push(r)}),t}function B9(e,t){var r,n;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:L9([].concat(((r=e.popperOptions)==null?void 0:r.modifiers)||[],((n=t.popperOptions)==null?void 0:n.modifiers)||[]))})})}var Wd=PE?k.useLayoutEffect:k.useEffect;function F9(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function c1(e,t,r){r.split(/\s+/).forEach(function(n){n&&e.classList[t](n)})}var z9={name:"className",defaultValue:"",fn:function(t){var r=t.popper.firstElementChild,n=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!n()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}c1(r,"add",t.props.className)}function a(){n()&&c1(r,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:a,onAfterUpdate:i}}};function W9(e){function t(r){var n=r.children,i=r.content,a=r.visible,o=r.singleton,s=r.render,l=r.reference,c=r.disabled,u=c===void 0?!1:c,f=r.ignoreAttributes,d=f===void 0?!0:f;r.__source,r.__self;var h=EE(r,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=a!==void 0,p=o!==void 0,g=k.useState(!1),v=g[0],x=g[1],w=k.useState({}),y=w[0],_=w[1],O=k.useState(),A=O[0],P=O[1],T=F9(function(){return{container:l1(),renders:1}}),I=Object.assign({ignoreAttributes:d},h,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){I[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),I.trigger="manual",I.hideOnClick=!1),p&&(u=!0);var j=I,S=I.plugins||[];s&&(j=Object.assign({},I,{plugins:p&&o.data!=null?[].concat(S,[{fn:function(){return{onTrigger:function(z,W){var Y=o.data.children.find(function(G){var L=G.instance;return L.reference===W.currentTarget});z.state.$$activeSingletonInstance=Y.instance,P(Y.content)}}}}]):S,render:function(){return{popper:T.container}}}));var D=[l].concat(n?[n.type]:[]);return Wd(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var R=e(M||T.ref||l1(),Object.assign({},j,{plugins:[z9].concat(I.plugins||[])}));return T.instance=R,u&&R.disable(),a&&R.show(),p&&o.hook({instance:R,content:i,props:j,setSingletonContent:P}),x(!0),function(){R.destroy(),o?.cleanup(R)}},D),Wd(function(){var M;if(T.renders===1){T.renders++;return}var R=T.instance;R.setProps(B9(R.props,j)),(M=R.popperInstance)==null||M.forceUpdate(),u?R.disable():R.enable(),m&&(a?R.show():R.hide()),p&&o.hook({instance:R,content:i,props:j,setSingletonContent:P})}),Wd(function(){var M;if(s){var R=T.instance;R.setProps({popperOptions:Object.assign({},R.props.popperOptions,{modifiers:[].concat((((M=R.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(z){var W=z.name;return W!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(W){var Y,G=W.state,L=(Y=G.modifiersData)==null?void 0:Y.hide;(y.placement!==G.placement||y.referenceHidden!==L?.isReferenceHidden||y.escaped!==L?.hasPopperEscaped)&&_({placement:G.placement,referenceHidden:L?.isReferenceHidden,escaped:L?.hasPopperEscaped}),G.attributes.popper={}}}])})})}},[y.placement,y.referenceHidden,y.escaped].concat(D)),k.createElement(k.Fragment,null,n?k.cloneElement(n,{ref:function(R){T.ref=R,op(n.ref,R)}}):null,v&&kw.createPortal(s?s($9(y),A,T.instance):i,T.container))}return t}var V9=(function(e,t){return k.forwardRef(function(n,i){var a=n.children,o=EE(n,["children"]);return k.createElement(e,Object.assign({},t,o),a?k.cloneElement(a,{ref:function(l){op(i,l),op(a.ref,l)}}):null)})}),H9=V9(W9(Fs));function U9(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function K9(e){return Array.from({length:24},(t,r)=>{const n=e.find(i=>i.hour===r)||{};return{hour:r,time:U9(r),walkins:n.walkins??0,checkins:n.preApproved??0,staffAttendance:n.staffAttendance??0}})}const ma={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function q9({type:e,data:t,children:r}){if(!e||!t)return r;const n={activeWalkins:[["Currently Inside",t.currently_inside],["Absent Today",t.absent_today],["Total Visited Today",t.total_visited_today],["Total Staff",t.total_staff]],preApprovedCheckins:[["Currently Inside",t.currently_inside],["Total Visited Today",t.total_visited_today],["No Show",t.no_show],["Total Scheduled",t.total_scheduled]],staffAttendance:[["Currently Inside",t.currently_inside],["Total Visited Today",t.total_visited_today]]},i={activeWalkins:"Active Walk-ins",preApprovedCheckins:"Pre-approved Check-ins",staffAttendance:"Staff Checked-in"},a={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},o=b.jsx(Xi,{title:i[e],period:"Today",icon:b.jsx(Sp,{className:`${a[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:b.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:n[e].map(([s,l])=>b.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[b.jsx("div",{children:s}),b.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return b.jsx(H9,{content:o,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:r})}function Y9({isStatic:e,data:t}){const[r,n]=k.useState(null),i=t?.summary?.activeWalkins||{},a=t?.summary?.preApprovedCheckins||{},o=t?.summary?.staffAttendance||{},s=K9(t?.chart||[]),l=Math.max(...s.flatMap(f=>[f.walkins,f.checkins,f.staffAttendance])),c=l>0?l:5,u=[0,Math.ceil(c/2),c];return b.jsx(Xi,{title:"Gate Updates",period:"Today",icon:b.jsx(Sp,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:b.jsxs("div",{children:[b.jsx("div",{className:"grid grid-cols-3 gap-[24px] mb-[16px]",children:[{key:"activeWalkins",data:i,color:ma.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:o,color:ma.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:a,color:ma.preApproved,label:"Pre-approved"}].map(f=>b.jsx(q9,{type:f.key,data:f.data,children:b.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[b.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:f.label}),b.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:f.color},children:[f.key==="activeWalkins"?f.data?.visitor_in??0:f.key==="preApprovedCheckins"?f.data?.expected_pass_scanned??0:f.data?.total_in_now??0,b.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",f.key==="activeWalkins"?f.data?.total_pass??0:f.key==="preApprovedCheckins"?f.data?.total_expected_pass??0:f.data?.total_in_today??0]})]})]})},f.key))}),b.jsx("div",{className:"w-full h-[105px]",children:b.jsx(ta,{width:"100%",height:"100%",children:b.jsxs(iE,{data:s,margin:{top:1,right:0,left:-40,bottom:0},children:[b.jsx(Bu,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(Fu,{dataKey:"time",tickFormatter:(f,d)=>d%4===0?f:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),b.jsx(es,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:u,domain:[0,c],allowDecimals:!1,axisLine:!1,tickLine:!1}),b.jsx(ea,{content:b.jsx(gs,{})}),b.jsx($i,{type:"monotone",dataKey:"walkins",stroke:ma.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins"}),b.jsx($i,{type:"monotone",dataKey:"checkins",stroke:ma.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"}),b.jsx($i,{type:"monotone",dataKey:"staffAttendance",stroke:ma.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance"})]})})})]})})}function G9({isStatic:e,data:t}){const r=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],n=[{name:"L1 Level",value:Number(t?.today_L1||0),color:r[0]},{name:"L2 Level",value:Number(t?.today_L2||0),color:r[1]},{name:"L3 Level",value:Number(t?.today_L3||0),color:r[2]},{name:"L4 Level",value:Number(t?.today_L4||0),color:r[3]}];n.reduce((a,o)=>a+o.value,0);const i=n;return b.jsx(Xi,{title:"Helpdesk",period:"Today",icon:b.jsx(gM,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:b.jsxs("div",{className:"flex gap-[12px] h-fit",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(m_,{value:t?.percent_change}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),b.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:b.jsx(ta,{width:"75%",height:"100%",children:b.jsxs(zu,{children:[b.jsx(Rs,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((a,o)=>b.jsx(Qr,{fill:r[o]||"#CBD5E1"},a.name))}),b.jsx(ea,{content:b.jsx(gs,{})})]})})})]})})}/*!
|
|
219
|
+
`,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&N9(c,n);return u&&l.push(u),l},[]);return ns(e)?s[0]:s}Fs.defaultProps=ir;Fs.setDefaultProps=T9;Fs.currentInput=Ur;Object.assign({},sE,{effect:function(t){var r=t.state,n={popper:{position:r.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(r.elements.popper.style,n.popper),r.styles=n,r.elements.arrow&&Object.assign(r.elements.arrow.style,n.arrow)}});Fs.setDefaultProps({render:AE});function EE(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,a;for(a=0;a<n.length;a++)i=n[a],!(t.indexOf(i)>=0)&&(r[i]=e[i]);return r}var PE=typeof window<"u"&&typeof document<"u";function op(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function l1(){return PE&&document.createElement("div")}function I9(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function CE(e,t){if(e===t)return!0;if(typeof e=="object"&&e!=null&&typeof t=="object"&&t!=null){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var r in e)if(t.hasOwnProperty(r)){if(!CE(e[r],t[r]))return!1}else return!1;return!0}else return!1}function R9(e){var t=[];return e.forEach(function(r){t.find(function(n){return CE(r,n)})||t.push(r)}),t}function $9(e,t){var r,n;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:R9([].concat(((r=e.popperOptions)==null?void 0:r.modifiers)||[],((n=t.popperOptions)==null?void 0:n.modifiers)||[]))})})}var Wd=PE?k.useLayoutEffect:k.useEffect;function L9(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function c1(e,t,r){r.split(/\s+/).forEach(function(n){n&&e.classList[t](n)})}var B9={name:"className",defaultValue:"",fn:function(t){var r=t.popper.firstElementChild,n=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!n()){process.env.NODE_ENV!=="production"&&console.warn(["@tippyjs/react: Cannot use `className` prop in conjunction with","`render` prop. Place the className on the element you are","rendering."].join(" "));return}c1(r,"add",t.props.className)}function a(){n()&&c1(r,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:a,onAfterUpdate:i}}};function F9(e){function t(r){var n=r.children,i=r.content,a=r.visible,o=r.singleton,s=r.render,l=r.reference,c=r.disabled,u=c===void 0?!1:c,f=r.ignoreAttributes,d=f===void 0?!0:f;r.__source,r.__self;var h=EE(r,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=a!==void 0,p=o!==void 0,g=k.useState(!1),v=g[0],x=g[1],w=k.useState({}),y=w[0],_=w[1],O=k.useState(),A=O[0],P=O[1],T=L9(function(){return{container:l1(),renders:1}}),I=Object.assign({ignoreAttributes:d},h,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){I[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),I.trigger="manual",I.hideOnClick=!1),p&&(u=!0);var j=I,S=I.plugins||[];s&&(j=Object.assign({},I,{plugins:p&&o.data!=null?[].concat(S,[{fn:function(){return{onTrigger:function(z,W){var Y=o.data.children.find(function(G){var L=G.instance;return L.reference===W.currentTarget});z.state.$$activeSingletonInstance=Y.instance,P(Y.content)}}}}]):S,render:function(){return{popper:T.container}}}));var D=[l].concat(n?[n.type]:[]);return Wd(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var R=e(M||T.ref||l1(),Object.assign({},j,{plugins:[B9].concat(I.plugins||[])}));return T.instance=R,u&&R.disable(),a&&R.show(),p&&o.hook({instance:R,content:i,props:j,setSingletonContent:P}),x(!0),function(){R.destroy(),o?.cleanup(R)}},D),Wd(function(){var M;if(T.renders===1){T.renders++;return}var R=T.instance;R.setProps($9(R.props,j)),(M=R.popperInstance)==null||M.forceUpdate(),u?R.disable():R.enable(),m&&(a?R.show():R.hide()),p&&o.hook({instance:R,content:i,props:j,setSingletonContent:P})}),Wd(function(){var M;if(s){var R=T.instance;R.setProps({popperOptions:Object.assign({},R.props.popperOptions,{modifiers:[].concat((((M=R.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(z){var W=z.name;return W!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(W){var Y,G=W.state,L=(Y=G.modifiersData)==null?void 0:Y.hide;(y.placement!==G.placement||y.referenceHidden!==L?.isReferenceHidden||y.escaped!==L?.hasPopperEscaped)&&_({placement:G.placement,referenceHidden:L?.isReferenceHidden,escaped:L?.hasPopperEscaped}),G.attributes.popper={}}}])})})}},[y.placement,y.referenceHidden,y.escaped].concat(D)),k.createElement(k.Fragment,null,n?k.cloneElement(n,{ref:function(R){T.ref=R,op(n.ref,R)}}):null,v&&kw.createPortal(s?s(I9(y),A,T.instance):i,T.container))}return t}var z9=(function(e,t){return k.forwardRef(function(n,i){var a=n.children,o=EE(n,["children"]);return k.createElement(e,Object.assign({},t,o),a?k.cloneElement(a,{ref:function(l){op(i,l),op(a.ref,l)}}):null)})}),W9=z9(F9(Fs));function V9(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function H9(e=[]){return Array.from({length:24},(t,r)=>{const n=e.find(i=>i.hour===r)||{};return{hour:r,time:V9(r),walkins:n.walkins??0,checkins:n.preApproved??0,staffAttendance:n.staffAttendance??0}})}const pa={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function U9({type:e,data:t,children:r}){if(!e||!t)return r;const n={activeWalkins:[["Currently Inside",t.visitor_in],["Total Visited Today",t.total_pass]],preApprovedCheckins:[["Currently Inside",t.currently_inside],["Total Visited Today",t.expected_pass_scanned],["No show",t.expected_pass_not_scanned],["Total Scheduled",t.total_expected_pass]],staffAttendance:[["Currently Inside",t.total_in_now],["Absent Today",t.absent_staff],["Total Visited Today",t.total_in_today],["Total Staff",t.total_staff]]},i={activeWalkins:"Active Walk-ins",preApprovedCheckins:"Pre-approved Check-ins",staffAttendance:"Staff Attendance"},a={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},o=b.jsx(Gi,{title:i[e],period:"As of Today",icon:b.jsx(Sp,{className:`${a[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:b.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:n[e].map(([s,l])=>b.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[b.jsx("div",{children:s}),b.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return b.jsx(W9,{content:o,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:r})}function K9({isStatic:e,data:t}){const r=t?.summary?.activeWalkins||{},n=t?.summary?.preApprovedCheckins||{},i=t?.summary?.staffAttendance||{},a=H9(t?.chart||[]),o=Math.max(...a.flatMap(c=>[c.walkins,c.checkins,c.staffAttendance])),s=o>0?o:5,l=[0,Math.ceil(s/2),s];return b.jsx(Gi,{title:"Gate Updates",period:"Today",icon:b.jsx(Sp,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:b.jsxs("div",{children:[b.jsx("div",{className:"grid grid-cols-3 gap-[24px] mb-[16px]",children:[{key:"activeWalkins",data:r,color:pa.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:i,color:pa.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:n,color:pa.preApproved,label:"Pre-approved"}].map(c=>b.jsx(U9,{type:c.key,data:c.data,children:b.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[b.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:c.label}),b.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:c.color},children:[c.key==="activeWalkins"?c.data?.visitor_in??0:c.key==="preApprovedCheckins"?c.data?.expected_pass_scanned??0:c.data?.total_in_now??0,b.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",c.key==="activeWalkins"?c.data?.total_pass??0:c.key==="preApprovedCheckins"?c.data?.total_expected_pass??0:c.data?.total_staff??0]})]})]})},c.key))}),b.jsx("div",{className:"w-full h-[105px]",children:b.jsx(ea,{width:"100%",height:"100%",children:b.jsxs(iE,{data:a,margin:{top:5,right:0,left:-40,bottom:0},children:[b.jsx(Bu,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),b.jsx(Fu,{dataKey:"time",tickFormatter:(c,u)=>u%4===0?c:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),b.jsx(es,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:l,domain:[0,s],allowDecimals:!1,axisLine:!1,tickLine:!1}),b.jsx(Qi,{content:b.jsx(gs,{})}),b.jsx(Oa,{type:"monotone",dataKey:"walkins",stroke:pa.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins"}),b.jsx(Oa,{type:"monotone",dataKey:"checkins",stroke:pa.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"}),b.jsx(Oa,{type:"monotone",dataKey:"staffAttendance",stroke:pa.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance"})]})})})]})})}function q9({isStatic:e,data:t}){const r=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],n=[{name:"L1 Level",value:Number(t?.today_L1||0),color:r[0]},{name:"L2 Level",value:Number(t?.today_L2||0),color:r[1]},{name:"L3 Level",value:Number(t?.today_L3||0),color:r[2]},{name:"L4 Level",value:Number(t?.today_L4||0),color:r[3]}];n.reduce((a,o)=>a+o.value,0);const i=n;return b.jsx(Gi,{title:"Helpdesk",period:"As of Today",icon:b.jsx(gM,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:b.jsxs("div",{className:"flex gap-[12px] h-fit",children:[b.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[b.jsxs("div",{className:"flex flex-col gap-[8px]",children:[b.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),b.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),b.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[b.jsx(m_,{value:t?.percent_change}),b.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),b.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:b.jsx(ea,{width:"75%",height:"100%",children:b.jsxs(zu,{children:[b.jsx(Rs,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((a,o)=>b.jsx(Qr,{fill:r[o]||"#CBD5E1"},a.name))}),b.jsx(Qi,{content:b.jsx(gs,{})})]})})})]})})}/*!
|
|
220
220
|
* @kurkle/color v0.3.4
|
|
221
221
|
* https://github.com/kurkle/color#readme
|
|
222
222
|
* (c) 2024 Jukka Kurkela
|
|
223
223
|
* Released under the MIT License
|
|
224
|
-
*/function zs(e){return e+.5|0}const Ln=(e,t,r)=>Math.max(Math.min(e,r),t);function Ao(e){return Ln(zs(e*2.55),0,255)}function Vn(e){return Ln(zs(e*255),0,255)}function fn(e){return Ln(zs(e/2.55)/100,0,1)}function u1(e){return Ln(zs(e*100),0,100)}const mr={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},sp=[..."0123456789ABCDEF"],
|
|
224
|
+
*/function zs(e){return e+.5|0}const Ln=(e,t,r)=>Math.max(Math.min(e,r),t);function Ao(e){return Ln(zs(e*2.55),0,255)}function Vn(e){return Ln(zs(e*255),0,255)}function fn(e){return Ln(zs(e/2.55)/100,0,1)}function u1(e){return Ln(zs(e*100),0,100)}const mr={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},sp=[..."0123456789ABCDEF"],Y9=e=>sp[e&15],G9=e=>sp[(e&240)>>4]+sp[e&15],wl=e=>(e&240)>>4===(e&15),X9=e=>wl(e.r)&&wl(e.g)&&wl(e.b)&&wl(e.a);function Z9(e){var t=e.length,r;return e[0]==="#"&&(t===4||t===5?r={r:255&mr[e[1]]*17,g:255&mr[e[2]]*17,b:255&mr[e[3]]*17,a:t===5?mr[e[4]]*17:255}:(t===7||t===9)&&(r={r:mr[e[1]]<<4|mr[e[2]],g:mr[e[3]]<<4|mr[e[4]],b:mr[e[5]]<<4|mr[e[6]],a:t===9?mr[e[7]]<<4|mr[e[8]]:255})),r}const J9=(e,t)=>e<255?t(e):"";function Q9(e){var t=X9(e)?Y9:G9;return e?"#"+t(e.r)+t(e.g)+t(e.b)+J9(e.a,t):void 0}const eH=/^(hsla?|hwb|hsv)\(\s*([-+.e\d]+)(?:deg)?[\s,]+([-+.e\d]+)%[\s,]+([-+.e\d]+)%(?:[\s,]+([-+.e\d]+)(%)?)?\s*\)$/;function kE(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 tH(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 rH(e,t,r){const n=kE(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 nH(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 Pg(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=nH(r,n,i,u,a),l=l*60+.5),[l|0,c||0,s]}function Cg(e,t,r,n){return(Array.isArray(t)?e(t[0],t[1],t[2]):e(t,r,n)).map(Vn)}function kg(e,t,r){return Cg(kE,e,t,r)}function iH(e,t,r){return Cg(rH,e,t,r)}function aH(e,t,r){return Cg(tH,e,t,r)}function TE(e){return(e%360+360)%360}function oH(e){const t=eH.exec(e);let r=255,n;if(!t)return;t[5]!==n&&(r=t[6]?Ao(+t[5]):Vn(+t[5]));const i=TE(+t[2]),a=+t[3]/100,o=+t[4]/100;return t[1]==="hwb"?n=iH(i,a,o):t[1]==="hsv"?n=aH(i,a,o):n=kg(i,a,o),{r:n[0],g:n[1],b:n[2],a:r}}function sH(e,t){var r=Pg(e);r[0]=TE(r[0]+t),r=kg(r),e.r=r[0],e.g=r[1],e.b=r[2]}function lH(e){if(!e)return;const t=Pg(e),r=t[0],n=u1(t[1]),i=u1(t[2]);return e.a<255?`hsla(${r}, ${n}%, ${i}%, ${fn(e.a)})`:`hsl(${r}, ${n}%, ${i}%)`}const f1={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"},d1={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 cH(){const e={},t=Object.keys(d1),r=Object.keys(f1);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,f1[a]);a=parseInt(d1[o],16),e[s]=[a>>16&255,a>>8&255,a&255]}return e}let _l;function uH(e){_l||(_l=cH(),_l.transparent=[0,0,0,0]);const t=_l[e.toLowerCase()];return t&&{r:t[0],g:t[1],b:t[2],a:t.length===4?t[3]:255}}const fH=/^rgba?\(\s*([-+.\d]+)(%)?[\s,]+([-+.e\d]+)(%)?[\s,]+([-+.e\d]+)(%)?(?:[\s,/]+([-+.e\d]+)(%)?)?\s*\)$/;function dH(e){const t=fH.exec(e);let r=255,n,i,a;if(t){if(t[7]!==n){const o=+t[7];r=t[8]?Ao(o):Ln(o*255,0,255)}return n=+t[1],i=+t[3],a=+t[5],n=255&(t[2]?Ao(n):Ln(n,0,255)),i=255&(t[4]?Ao(i):Ln(i,0,255)),a=255&(t[6]?Ao(a):Ln(a,0,255)),{r:n,g:i,b:a,a:r}}}function hH(e){return e&&(e.a<255?`rgba(${e.r}, ${e.g}, ${e.b}, ${fn(e.a)})`:`rgb(${e.r}, ${e.g}, ${e.b})`)}const Vd=e=>e<=.0031308?e*12.92:Math.pow(e,1/2.4)*1.055-.055,ma=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4);function pH(e,t,r){const n=ma(fn(e.r)),i=ma(fn(e.g)),a=ma(fn(e.b));return{r:Vn(Vd(n+r*(ma(fn(t.r))-n))),g:Vn(Vd(i+r*(ma(fn(t.g))-i))),b:Vn(Vd(a+r*(ma(fn(t.b))-a))),a:e.a+r*(t.a-e.a)}}function Ol(e,t,r){if(e){let n=Pg(e);n[t]=Math.max(0,Math.min(n[t]+n[t]*r,t===0?360:1)),n=kg(n),e.r=n[0],e.g=n[1],e.b=n[2]}}function ME(e,t){return e&&Object.assign(t||{},e)}function h1(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=Vn(e[3]))):(t=ME(e,{r:0,g:0,b:0,a:1}),t.a=Vn(t.a)),t}function mH(e){return e.charAt(0)==="r"?dH(e):oH(e)}class as{constructor(t){if(t instanceof as)return t;const r=typeof t;let n;r==="object"?n=h1(t):r==="string"&&(n=Z9(t)||uH(t)||mH(t)),this._rgb=n,this._valid=!!n}get valid(){return this._valid}get rgb(){var t=ME(this._rgb);return t&&(t.a=fn(t.a)),t}set rgb(t){this._rgb=h1(t)}rgbString(){return this._valid?hH(this._rgb):void 0}hexString(){return this._valid?Q9(this._rgb):void 0}hslString(){return this._valid?lH(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=pH(this._rgb,t._rgb,r)),this}clone(){return new as(this.rgb)}alpha(t){return this._rgb.a=Vn(t),this}clearer(t){const r=this._rgb;return r.a*=1-t,this}greyscale(){const t=this._rgb,r=zs(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 Ol(this._rgb,2,t),this}darken(t){return Ol(this._rgb,2,-t),this}saturate(t){return Ol(this._rgb,1,t),this}desaturate(t){return Ol(this._rgb,1,-t),this}rotate(t){return sH(this._rgb,t),this}}/*!
|
|
225
225
|
* Chart.js v4.5.0
|
|
226
226
|
* https://www.chartjs.org
|
|
227
227
|
* (c) 2025 Chart.js Contributors
|
|
228
228
|
* Released under the MIT License
|
|
229
|
-
*/function sn(){}const yH=(()=>{let e=0;return()=>e++})();function Ce(e){return e==null}function xt(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 ve(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Ar(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Fr(e,t){return Ar(e)?e:t}function ue(e,t){return typeof e>"u"?t:e}const bH=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,jE=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function He(e,t,r){if(e&&typeof e.call=="function")return e.apply(r,t)}function Me(e,t,r,n){let i,a,o;if(xt(e))for(a=e.length,i=0;i<a;i++)t.call(r,e[i],i);else if(ve(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(r,e[o[i]],o[i])}function Rc(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 $c(e){if(xt(e))return e.map($c);if(ve(e)){const t=Object.create(null),r=Object.keys(e),n=r.length;let i=0;for(;i<n;++i)t[r[i]]=$c(e[r[i]]);return t}return e}function DE(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function xH(e,t,r,n){if(!DE(e))return;const i=t[e],a=r[e];ve(i)&&ve(a)?os(i,a,n):t[e]=$c(a)}function os(e,t,r){const n=xt(t)?t:[t],i=n.length;if(!ve(e))return e;r=r||{};const a=r.merger||xH;let o;for(let s=0;s<i;++s){if(o=n[s],!ve(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 No(e,t){return os(e,t,{merger:wH})}function wH(e,t,r){if(!DE(e))return;const n=t[e],i=r[e];ve(n)&&ve(i)?No(n,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=$c(i))}const p1={"":e=>e,x:e=>e.x,y:e=>e.y};function _H(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 OH(e){const t=_H(e);return r=>{for(const n of t){if(n==="")break;r=r&&r[n]}return r}}function Yi(e,t){return(p1[t]||(p1[t]=OH(t)))(e)}function Tg(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ss=e=>typeof e<"u",Zn=e=>typeof e=="function",m1=(e,t)=>{if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0};function SH(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Re=Math.PI,tt=2*Re,AH=tt+Re,Lc=Number.POSITIVE_INFINITY,EH=Re/180,pt=Re/2,gi=Re/4,g1=Re*2/3,NE=Math.log10,Xr=Math.sign;function Io(e,t,r){return Math.abs(e-t)<r}function v1(e){const t=Math.round(e);e=Io(e,t,e/1e3)?t:e;const r=Math.pow(10,Math.floor(NE(e))),n=e/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function PH(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 CH(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ls(e){return!CH(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function kH(e,t){const r=Math.round(e);return r-t<=e&&r+t>=e}function TH(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 vn(e){return e*(Re/180)}function MH(e){return e*(180/Re)}function y1(e){if(!Ar(e))return;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r++;return r}function IE(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*Re&&(a+=tt),{angle:a,distance:i}}function lp(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function jH(e,t){return(e-t+AH)%tt-Re}function kr(e){return(e%tt+tt)%tt}function cs(e,t,r,n){const i=kr(e),a=kr(t),o=kr(r),s=kr(a-i),l=kr(o-i),c=kr(i-a),u=kr(i-o);return i===a||i===o||n&&a===o||s>l&&c<u}function Nt(e,t,r){return Math.max(t,Math.min(r,e))}function DH(e){return Nt(e,-32768,32767)}function Bn(e,t,r,n=1e-6){return e>=Math.min(t,r)-n&&e<=Math.max(t,r)+n}function Mg(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 Ti=(e,t,r,n)=>Mg(e,r,n?i=>{const a=e[i][t];return a<r||a===r&&e[i+1][t]===r}:i=>e[i][t]<r),NH=(e,t,r)=>Mg(e,r,n=>e[n][t]>=r);function IH(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 RE=["push","pop","shift","splice","unshift"];function RH(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),RE.forEach(r=>{const n="_onData"+Tg(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 b1(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)&&(RE.forEach(a=>{delete e[a]}),delete e._chartjs)}function $E(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const LE=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function BE(e,t){let r=[],n=!1;return function(...i){r=i,n||(n=!0,LE.call(window,()=>{n=!1,e.apply(t,r)}))}}function $H(e,t){let r;return function(...n){return t?(clearTimeout(r),r=setTimeout(e,t,n)):e.apply(this,n),t}}const FE=e=>e==="start"?"left":e==="end"?"right":"center",Qt=(e,t,r)=>e==="start"?t:e==="end"?r:(t+r)/2,LH=(e,t,r,n)=>e===(n?"left":"right")?r:e==="center"?(t+r)/2:t;function BH(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(Ti(l,u,f).lo,r?n:Ti(t,u,o.getPixelForValue(f)).lo),c){const p=l.slice(0,i+1).reverse().findIndex(g=>!Ce(g[s.axis]));i-=Math.max(0,p)}i=Nt(i,0,n-1)}if(m){let p=Math.max(Ti(l,o.axis,d,!0).hi+1,r?0:Ti(t,u,o.getPixelForValue(d),!0).hi+1);if(c){const g=l.slice(p-1).findIndex(v=>!Ce(v[s.axis]));p+=Math.max(0,g)}a=Nt(p,i,n)-i}else a=n-i}return{start:i,count:a}}function FH(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 Sl=e=>e===0||e===1,x1=(e,t,r)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*tt/r)),w1=(e,t,r)=>Math.pow(2,-10*e)*Math.sin((e-t)*tt/r)+1,Ro={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*pt)+1,easeOutSine:e=>Math.sin(e*pt),easeInOutSine:e=>-.5*(Math.cos(Re*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=>Sl(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=>Sl(e)?e:x1(e,.075,.3),easeOutElastic:e=>Sl(e)?e:w1(e,.075,.3),easeInOutElastic(e){return Sl(e)?e:e<.5?.5*x1(e*2,.1125,.45):.5+.5*w1(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-Ro.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?Ro.easeInBounce(e*2)*.5:Ro.easeOutBounce(e*2-1)*.5+.5};function jg(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function _1(e){return jg(e)?e:new as(e)}function Hd(e){return jg(e)?e:new as(e).saturate(.5).darken(.1).hexString()}const zH=["x","y","borderWidth","radius","tension"],WH=["color","borderColor","backgroundColor"];function VH(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:WH},numbers:{type:"number",properties:zH}}),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 HH(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const O1=new Map;function UH(e,t){t=t||{};const r=e+JSON.stringify(t);let n=O1.get(r);return n||(n=new Intl.NumberFormat(e,t),O1.set(r,n)),n}function Dg(e,t,r){return UH(t,r).format(e)}const KH={values(e){return xt(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=qH(e,r)}const o=NE(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),Dg(e,n,l)}};function qH(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 zE={formatters:KH};function YH(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:zE.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 Gi=Object.create(null),cp=Object.create(null);function $o(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 Ud(e,t,r){return typeof t=="string"?os($o(e,t),r):os($o(e,""),t)}class GH{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)=>Hd(i.backgroundColor),this.hoverBorderColor=(n,i)=>Hd(i.borderColor),this.hoverColor=(n,i)=>Hd(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 Ud(this,t,r)}get(t){return $o(this,t)}describe(t,r){return Ud(cp,t,r)}override(t,r){return Ud(Gi,t,r)}route(t,r,n,i){const a=$o(this,t),o=$o(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 ve(l)?Object.assign({},c,l):ue(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(r=>r(this))}}var it=new GH({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[VH,HH,YH]);function XH(e){return!e||Ce(e.size)||Ce(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function S1(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 vi(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 A1(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function up(e,t,r,n){WE(e,t,r,n,null)}function WE(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)*EH;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,tt):e.arc(r,n,p,0,tt),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=g1,e.lineTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=g1,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+gi)*l,f=Math.cos(g+gi)*(i?i/2-c:l),s=Math.sin(g+gi)*l,d=Math.sin(g+gi)*(i?i/2-c:l),e.arc(r-f,n-s,c,g-Re,g-pt),e.arc(r+d,n-o,c,g-pt,g),e.arc(r+f,n+s,c,g,g+pt),e.arc(r-d,n+o,c,g+pt,g+Re),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+=gi;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+=gi;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+=gi,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 us(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 Ng(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Ig(e){e.restore()}function ZH(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 JH(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 QH(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ce(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 eU(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 tU(e,t){const r=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=r}function Bc(e,t,r,n,i,a={}){const o=xt(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,QH(e,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&tU(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Ce(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,r,n,a.maxWidth)),e.fillText(c,r,n,a.maxWidth),eU(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*Re,Re,!0),e.lineTo(r,n+a-o.bottomLeft),e.arc(r+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,Re,pt,!0),e.lineTo(r+i-o.bottomRight,n+a),e.arc(r+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,pt,0,!0),e.lineTo(r+i,n+o.topRight),e.arc(r+i-o.topRight,n+o.topRight,o.topRight,0,-pt,!0),e.lineTo(r+o.topLeft,n)}const rU=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,nU=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function iU(e,t){const r=(""+e).match(rU);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 aU=e=>+e||0;function Rg(e,t){const r={},n=ve(t),i=n?Object.keys(t):t,a=ve(e)?n?o=>ue(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)r[o]=aU(a(o));return r}function VE(e){return Rg(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Sa(e){return Rg(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Mr(e){const t=VE(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ut(e,t){e=e||{},t=t||it.font;let r=ue(e.size,t.size);typeof r=="string"&&(r=parseInt(r,10));let n=ue(e.style,t.style);n&&!(""+n).match(nU)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:ue(e.family,t.family),lineHeight:iU(ue(e.lineHeight,t.lineHeight),r),size:r,style:n,weight:ue(e.weight,t.weight),string:""};return i.string=XH(i),i}function Al(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 oU(e,t,r){const{min:n,max:i}=e,a=jE(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 ra(e,t){return Object.assign(Object.create(e),t)}function $g(e,t=[""],r,n,i=()=>e[0]){const a=r||e;typeof n>"u"&&(n=qE("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:n,_getTarget:i,override:s=>$g([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 UE(s,l,()=>pU(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return P1(s).includes(l)},ownKeys(s){return P1(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Fa(e,t,r,n){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:r,_stack:new Set,_descriptors:HE(e,n),setContext:a=>Fa(e,a,r,n),override:a=>Fa(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 UE(a,o,()=>lU(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 HE(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:Zn(r)?r:()=>r,isIndexable:Zn(n)?n:()=>n}}const sU=(e,t)=>e?e+Tg(t):t,Lg=(e,t)=>ve(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function UE(e,t,r){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const n=r();return e[t]=n,n}function lU(e,t,r){const{_proxy:n,_context:i,_subProxy:a,_descriptors:o}=e;let s=n[t];return Zn(s)&&o.isScriptable(t)&&(s=cU(t,s,e,r)),xt(s)&&s.length&&(s=uU(t,s,e,o.isIndexable)),Lg(t,s)&&(s=Fa(s,i,a&&a[t],o)),s}function cU(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),Lg(e,l)&&(l=Bg(i._scopes,i,e,l)),l}function uU(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(ve(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const f=Bg(c,i,e,u);t.push(Fa(f,a,o&&o[e],s))}}return t}function KE(e,t,r){return Zn(e)?e(t,r):e}const fU=(e,t)=>e===!0?t:typeof e=="string"?Yi(t,e):void 0;function dU(e,t,r,n,i){for(const a of t){const o=fU(r,a);if(o){e.add(o);const s=KE(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 Bg(e,t,r,n){const i=t._rootScopes,a=KE(t._fallback,r,n),o=[...e,...i],s=new Set;s.add(n);let l=E1(s,o,r,a||r,n);return l===null||typeof a<"u"&&a!==r&&(l=E1(s,o,a,l,n),l===null)?!1:$g(Array.from(s),[""],i,a,()=>hU(t,r,n))}function E1(e,t,r,n,i){for(;r;)r=dU(e,t,r,n,i);return r}function hU(e,t,r){const n=e._getTarget();t in n||(n[t]={});const i=n[t];return xt(i)&&ve(r)?r:i||{}}function pU(e,t,r,n){let i;for(const a of t)if(i=qE(sU(a,e),r),typeof i<"u")return Lg(e,i)?Bg(r,n,e,i):i}function qE(e,t){for(const r of t){if(!r)continue;const n=r[e];if(typeof n<"u")return n}}function P1(e){let t=e._keys;return t||(t=e._keys=mU(e._scopes)),t}function mU(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 gU=Number.EPSILON||1e-14,za=(e,t)=>t<e.length&&!e[t].skip&&e[t],YE=e=>e==="x"?"y":"x";function vU(e,t,r,n){const i=e.skip?t:e,a=t,o=r.skip?t:r,s=lp(a,i),l=lp(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 yU(e,t,r){const n=e.length;let i,a,o,s,l,c=za(e,0);for(let u=0;u<n-1;++u)if(l=c,c=za(e,u+1),!(!l||!c)){if(Io(t[u],0,gU)){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 bU(e,t,r="x"){const n=YE(r),i=e.length;let a,o,s,l=za(e,0);for(let c=0;c<i;++c){if(o=s,s=l,l=za(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 xU(e,t="x"){const r=YE(t),n=e.length,i=Array(n).fill(0),a=Array(n);let o,s,l,c=za(e,0);for(o=0;o<n;++o)if(s=l,l=c,c=za(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?Xr(i[o-1])!==Xr(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}yU(e,i,a),bU(e,a,t)}function El(e,t,r){return Math.max(Math.min(e,r),t)}function wU(e,t){let r,n,i,a,o,s=us(e[0],t);for(r=0,n=e.length;r<n;++r)o=a,a=s,s=r<n-1&&us(e[r+1],t),a&&(i=e[r],o&&(i.cp1x=El(i.cp1x,t.left,t.right),i.cp1y=El(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=El(i.cp2x,t.left,t.right),i.cp2y=El(i.cp2y,t.top,t.bottom)))}function _U(e,t,r,n,i){let a,o,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")xU(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=vU(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&&wU(e,r)}function Fg(){return typeof window<"u"&&typeof document<"u"}function zg(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function zc(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 Vu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function OU(e,t){return Vu(e).getPropertyValue(t)}const SU=["top","right","bottom","left"];function Bi(e,t,r){const n={};r=r?"-"+r:"";for(let i=0;i<4;i++){const a=SU[i];n[a]=parseFloat(e[t+"-"+a+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const AU=(e,t,r)=>(e>0||t>0)&&(!r||!r.shadowRoot);function EU(e,t){const r=e.touches,n=r&&r.length?r[0]:e,{offsetX:i,offsetY:a}=n;let o=!1,s,l;if(AU(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 Oi(e,t){if("native"in e)return e;const{canvas:r,currentDevicePixelRatio:n}=t,i=Vu(r),a=i.boxSizing==="border-box",o=Bi(i,"padding"),s=Bi(i,"border","width"),{x:l,y:c,box:u}=EU(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 PU(e,t,r){let n,i;if(t===void 0||r===void 0){const a=e&&zg(e);if(!a)t=e.clientWidth,r=e.clientHeight;else{const o=a.getBoundingClientRect(),s=Vu(a),l=Bi(s,"border","width"),c=Bi(s,"padding");t=o.width-c.width-l.width,r=o.height-c.height-l.height,n=zc(s.maxWidth,a,"clientWidth"),i=zc(s.maxHeight,a,"clientHeight")}}return{width:t,height:r,maxWidth:n||Lc,maxHeight:i||Lc}}const Pl=e=>Math.round(e*10)/10;function CU(e,t,r,n){const i=Vu(e),a=Bi(i,"margin"),o=zc(i.maxWidth,e,"clientWidth")||Lc,s=zc(i.maxHeight,e,"clientHeight")||Lc,l=PU(e,t,r);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=Bi(i,"border","width"),h=Bi(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=Pl(Math.min(c,o,l.maxWidth)),u=Pl(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Pl(c/2)),(t!==void 0||r!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=Pl(Math.floor(u*n))),{width:c,height:u}}function C1(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 kU=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Fg()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function k1(e,t){const r=OU(e,t),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Si(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:e.y+r*(t.y-e.y)}}function TU(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 MU(e,t,r,n){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=Si(e,i,r),s=Si(i,a,r),l=Si(a,t,r),c=Si(o,s,r),u=Si(s,l,r);return Si(c,u,r)}const jU=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}}},DU=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Aa(e,t,r){return e?jU(t,r):DU()}function GE(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 XE(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function ZE(e){return e==="angle"?{between:cs,compare:jH,normalize:kr}:{between:Bn,compare:(t,r)=>t-r,normalize:t=>t}}function T1({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 NU(e,t,r){const{property:n,start:i,end:a}=r,{between:o,normalize:s}=ZE(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 IU(e,t,r){if(!r)return[e];const{property:n,start:i,end:a}=r,o=t.length,{compare:s,between:l,normalize:c}=ZE(n),{start:u,end:f,loop:d,style:h}=NU(e,t,r),m=[];let p=!1,g=null,v,x,w;const y=()=>l(i,w,v)&&s(i,w)!==0,_=()=>s(a,v)===0||l(a,w,v),O=()=>p||y(),A=()=>!p||_();for(let P=u,T=u;P<=f;++P)x=t[P%o],!x.skip&&(v=c(x[n]),v!==w&&(p=l(v,i,a),g===null&&O()&&(g=s(v,i)===0?P:T),g!==null&&A()&&(m.push(T1({start:g,end:P,loop:d,count:o,style:h})),g=null),T=P,w=v));return g!==null&&m.push(T1({start:g,end:f,loop:d,count:o,style:h})),m}function RU(e,t){const r=[],n=e.segments;for(let i=0;i<n.length;i++){const a=IU(n[i],e.points,t);a.length&&r.push(...a)}return r}function $U(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 LU(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 BU(e,t){const r=e.points,n=e.options.spanGaps,i=r.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=$U(r,i,a,n);if(n===!0)return M1(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 M1(e,LU(r,o,l,c),r,t)}function M1(e,t,r,n){return!n||!n.setContext||!r?t:FU(e,t,r,n)}function FU(e,t,r,n){const i=e._chart.getContext(),a=j1(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 x=s?-1:1;if(m!==p){for(m+=l;r[m%l].skip;)m-=x;for(;r[p%l].skip;)p+=x;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=j1(n.setContext(ra(i,{type:"segment",p0:p,p1:v,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),zU(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 j1(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function zU(e,t){if(!t)return!1;const r=[],n=function(i,a){return jg(a)?(r.includes(a)||r.push(a),r.indexOf(a)):a};return JSON.stringify(e,n)!==JSON.stringify(t,n)}function Cl(e,t,r){return e.options.clip?e[r]:t[r]}function WU(e,t){const{xScale:r,yScale:n}=e;return r&&n?{left:Cl(r,t,"left"),right:Cl(r,t,"right"),top:Cl(n,t,"top"),bottom:Cl(n,t,"bottom")}:t}function VU(e,t){const r=t._clip;if(r.disabled)return!1;const n=WU(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)}}/*!
|
|
229
|
+
*/function sn(){}const gH=(()=>{let e=0;return()=>e++})();function Ce(e){return e==null}function xt(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 ve(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function Ar(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function Fr(e,t){return Ar(e)?e:t}function ue(e,t){return typeof e>"u"?t:e}const vH=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,jE=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function He(e,t,r){if(e&&typeof e.call=="function")return e.apply(r,t)}function Me(e,t,r,n){let i,a,o;if(xt(e))for(a=e.length,i=0;i<a;i++)t.call(r,e[i],i);else if(ve(e))for(o=Object.keys(e),a=o.length,i=0;i<a;i++)t.call(r,e[o[i]],o[i])}function Rc(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 $c(e){if(xt(e))return e.map($c);if(ve(e)){const t=Object.create(null),r=Object.keys(e),n=r.length;let i=0;for(;i<n;++i)t[r[i]]=$c(e[r[i]]);return t}return e}function DE(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function yH(e,t,r,n){if(!DE(e))return;const i=t[e],a=r[e];ve(i)&&ve(a)?os(i,a,n):t[e]=$c(a)}function os(e,t,r){const n=xt(t)?t:[t],i=n.length;if(!ve(e))return e;r=r||{};const a=r.merger||yH;let o;for(let s=0;s<i;++s){if(o=n[s],!ve(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 No(e,t){return os(e,t,{merger:bH})}function bH(e,t,r){if(!DE(e))return;const n=t[e],i=r[e];ve(n)&&ve(i)?No(n,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=$c(i))}const p1={"":e=>e,x:e=>e.x,y:e=>e.y};function xH(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 wH(e){const t=xH(e);return r=>{for(const n of t){if(n==="")break;r=r&&r[n]}return r}}function qi(e,t){return(p1[t]||(p1[t]=wH(t)))(e)}function Tg(e){return e.charAt(0).toUpperCase()+e.slice(1)}const ss=e=>typeof e<"u",Zn=e=>typeof e=="function",m1=(e,t)=>{if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0};function _H(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const Re=Math.PI,tt=2*Re,OH=tt+Re,Lc=Number.POSITIVE_INFINITY,SH=Re/180,pt=Re/2,gi=Re/4,g1=Re*2/3,NE=Math.log10,Xr=Math.sign;function Io(e,t,r){return Math.abs(e-t)<r}function v1(e){const t=Math.round(e);e=Io(e,t,e/1e3)?t:e;const r=Math.pow(10,Math.floor(NE(e))),n=e/r;return(n<=1?1:n<=2?2:n<=5?5:10)*r}function AH(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 EH(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function ls(e){return!EH(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function PH(e,t){const r=Math.round(e);return r-t<=e&&r+t>=e}function CH(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 vn(e){return e*(Re/180)}function kH(e){return e*(180/Re)}function y1(e){if(!Ar(e))return;let t=1,r=0;for(;Math.round(e*t)/t!==e;)t*=10,r++;return r}function IE(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*Re&&(a+=tt),{angle:a,distance:i}}function lp(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function TH(e,t){return(e-t+OH)%tt-Re}function kr(e){return(e%tt+tt)%tt}function cs(e,t,r,n){const i=kr(e),a=kr(t),o=kr(r),s=kr(a-i),l=kr(o-i),c=kr(i-a),u=kr(i-o);return i===a||i===o||n&&a===o||s>l&&c<u}function Nt(e,t,r){return Math.max(t,Math.min(r,e))}function MH(e){return Nt(e,-32768,32767)}function Bn(e,t,r,n=1e-6){return e>=Math.min(t,r)-n&&e<=Math.max(t,r)+n}function Mg(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 Ti=(e,t,r,n)=>Mg(e,r,n?i=>{const a=e[i][t];return a<r||a===r&&e[i+1][t]===r}:i=>e[i][t]<r),jH=(e,t,r)=>Mg(e,r,n=>e[n][t]>=r);function DH(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 RE=["push","pop","shift","splice","unshift"];function NH(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),RE.forEach(r=>{const n="_onData"+Tg(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 b1(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)&&(RE.forEach(a=>{delete e[a]}),delete e._chartjs)}function $E(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const LE=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function BE(e,t){let r=[],n=!1;return function(...i){r=i,n||(n=!0,LE.call(window,()=>{n=!1,e.apply(t,r)}))}}function IH(e,t){let r;return function(...n){return t?(clearTimeout(r),r=setTimeout(e,t,n)):e.apply(this,n),t}}const FE=e=>e==="start"?"left":e==="end"?"right":"center",Qt=(e,t,r)=>e==="start"?t:e==="end"?r:(t+r)/2,RH=(e,t,r,n)=>e===(n?"left":"right")?r:e==="center"?(t+r)/2:t;function $H(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(Ti(l,u,f).lo,r?n:Ti(t,u,o.getPixelForValue(f)).lo),c){const p=l.slice(0,i+1).reverse().findIndex(g=>!Ce(g[s.axis]));i-=Math.max(0,p)}i=Nt(i,0,n-1)}if(m){let p=Math.max(Ti(l,o.axis,d,!0).hi+1,r?0:Ti(t,u,o.getPixelForValue(d),!0).hi+1);if(c){const g=l.slice(p-1).findIndex(v=>!Ce(v[s.axis]));p+=Math.max(0,g)}a=Nt(p,i,n)-i}else a=n-i}return{start:i,count:a}}function LH(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 Sl=e=>e===0||e===1,x1=(e,t,r)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*tt/r)),w1=(e,t,r)=>Math.pow(2,-10*e)*Math.sin((e-t)*tt/r)+1,Ro={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*pt)+1,easeOutSine:e=>Math.sin(e*pt),easeInOutSine:e=>-.5*(Math.cos(Re*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=>Sl(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=>Sl(e)?e:x1(e,.075,.3),easeOutElastic:e=>Sl(e)?e:w1(e,.075,.3),easeInOutElastic(e){return Sl(e)?e:e<.5?.5*x1(e*2,.1125,.45):.5+.5*w1(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-Ro.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?Ro.easeInBounce(e*2)*.5:Ro.easeOutBounce(e*2-1)*.5+.5};function jg(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function _1(e){return jg(e)?e:new as(e)}function Hd(e){return jg(e)?e:new as(e).saturate(.5).darken(.1).hexString()}const BH=["x","y","borderWidth","radius","tension"],FH=["color","borderColor","backgroundColor"];function zH(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:FH},numbers:{type:"number",properties:BH}}),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 WH(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const O1=new Map;function VH(e,t){t=t||{};const r=e+JSON.stringify(t);let n=O1.get(r);return n||(n=new Intl.NumberFormat(e,t),O1.set(r,n)),n}function Dg(e,t,r){return VH(t,r).format(e)}const HH={values(e){return xt(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=UH(e,r)}const o=NE(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),Dg(e,n,l)}};function UH(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 zE={formatters:HH};function KH(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:zE.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 Yi=Object.create(null),cp=Object.create(null);function $o(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 Ud(e,t,r){return typeof t=="string"?os($o(e,t),r):os($o(e,""),t)}class qH{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)=>Hd(i.backgroundColor),this.hoverBorderColor=(n,i)=>Hd(i.borderColor),this.hoverColor=(n,i)=>Hd(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 Ud(this,t,r)}get(t){return $o(this,t)}describe(t,r){return Ud(cp,t,r)}override(t,r){return Ud(Yi,t,r)}route(t,r,n,i){const a=$o(this,t),o=$o(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 ve(l)?Object.assign({},c,l):ue(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(r=>r(this))}}var it=new qH({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[zH,WH,KH]);function YH(e){return!e||Ce(e.size)||Ce(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function S1(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 vi(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 A1(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function up(e,t,r,n){WE(e,t,r,n,null)}function WE(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)*SH;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,tt):e.arc(r,n,p,0,tt),e.closePath();break;case"triangle":u=i?i/2:p,e.moveTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=g1,e.lineTo(r+Math.sin(g)*u,n-Math.cos(g)*p),g+=g1,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+gi)*l,f=Math.cos(g+gi)*(i?i/2-c:l),s=Math.sin(g+gi)*l,d=Math.sin(g+gi)*(i?i/2-c:l),e.arc(r-f,n-s,c,g-Re,g-pt),e.arc(r+d,n-o,c,g-pt,g),e.arc(r+f,n+s,c,g,g+pt),e.arc(r-d,n+o,c,g+pt,g+Re),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+=gi;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+=gi;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+=gi,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 us(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 Ng(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function Ig(e){e.restore()}function GH(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 XH(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 ZH(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),Ce(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 JH(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 QH(e,t){const r=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=r}function Bc(e,t,r,n,i,a={}){const o=xt(t)?t:[t],s=a.strokeWidth>0&&a.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,ZH(e,a),l=0;l<o.length;++l)c=o[l],a.backdrop&&QH(e,a.backdrop),s&&(a.strokeColor&&(e.strokeStyle=a.strokeColor),Ce(a.strokeWidth)||(e.lineWidth=a.strokeWidth),e.strokeText(c,r,n,a.maxWidth)),e.fillText(c,r,n,a.maxWidth),JH(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*Re,Re,!0),e.lineTo(r,n+a-o.bottomLeft),e.arc(r+o.bottomLeft,n+a-o.bottomLeft,o.bottomLeft,Re,pt,!0),e.lineTo(r+i-o.bottomRight,n+a),e.arc(r+i-o.bottomRight,n+a-o.bottomRight,o.bottomRight,pt,0,!0),e.lineTo(r+i,n+o.topRight),e.arc(r+i-o.topRight,n+o.topRight,o.topRight,0,-pt,!0),e.lineTo(r+o.topLeft,n)}const eU=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,tU=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function rU(e,t){const r=(""+e).match(eU);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 nU=e=>+e||0;function Rg(e,t){const r={},n=ve(t),i=n?Object.keys(t):t,a=ve(e)?n?o=>ue(e[o],e[t[o]]):o=>e[o]:()=>e;for(const o of i)r[o]=nU(a(o));return r}function VE(e){return Rg(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Sa(e){return Rg(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Mr(e){const t=VE(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Ut(e,t){e=e||{},t=t||it.font;let r=ue(e.size,t.size);typeof r=="string"&&(r=parseInt(r,10));let n=ue(e.style,t.style);n&&!(""+n).match(tU)&&(console.warn('Invalid font style specified: "'+n+'"'),n=void 0);const i={family:ue(e.family,t.family),lineHeight:rU(ue(e.lineHeight,t.lineHeight),r),size:r,style:n,weight:ue(e.weight,t.weight),string:""};return i.string=YH(i),i}function Al(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 iU(e,t,r){const{min:n,max:i}=e,a=jE(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 ta(e,t){return Object.assign(Object.create(e),t)}function $g(e,t=[""],r,n,i=()=>e[0]){const a=r||e;typeof n>"u"&&(n=qE("_fallback",e));const o={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:a,_fallback:n,_getTarget:i,override:s=>$g([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 UE(s,l,()=>dU(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return P1(s).includes(l)},ownKeys(s){return P1(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function Fa(e,t,r,n){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:r,_stack:new Set,_descriptors:HE(e,n),setContext:a=>Fa(e,a,r,n),override:a=>Fa(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 UE(a,o,()=>oU(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 HE(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:Zn(r)?r:()=>r,isIndexable:Zn(n)?n:()=>n}}const aU=(e,t)=>e?e+Tg(t):t,Lg=(e,t)=>ve(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function UE(e,t,r){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const n=r();return e[t]=n,n}function oU(e,t,r){const{_proxy:n,_context:i,_subProxy:a,_descriptors:o}=e;let s=n[t];return Zn(s)&&o.isScriptable(t)&&(s=sU(t,s,e,r)),xt(s)&&s.length&&(s=lU(t,s,e,o.isIndexable)),Lg(t,s)&&(s=Fa(s,i,a&&a[t],o)),s}function sU(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),Lg(e,l)&&(l=Bg(i._scopes,i,e,l)),l}function lU(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(ve(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const f=Bg(c,i,e,u);t.push(Fa(f,a,o&&o[e],s))}}return t}function KE(e,t,r){return Zn(e)?e(t,r):e}const cU=(e,t)=>e===!0?t:typeof e=="string"?qi(t,e):void 0;function uU(e,t,r,n,i){for(const a of t){const o=cU(r,a);if(o){e.add(o);const s=KE(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 Bg(e,t,r,n){const i=t._rootScopes,a=KE(t._fallback,r,n),o=[...e,...i],s=new Set;s.add(n);let l=E1(s,o,r,a||r,n);return l===null||typeof a<"u"&&a!==r&&(l=E1(s,o,a,l,n),l===null)?!1:$g(Array.from(s),[""],i,a,()=>fU(t,r,n))}function E1(e,t,r,n,i){for(;r;)r=uU(e,t,r,n,i);return r}function fU(e,t,r){const n=e._getTarget();t in n||(n[t]={});const i=n[t];return xt(i)&&ve(r)?r:i||{}}function dU(e,t,r,n){let i;for(const a of t)if(i=qE(aU(a,e),r),typeof i<"u")return Lg(e,i)?Bg(r,n,e,i):i}function qE(e,t){for(const r of t){if(!r)continue;const n=r[e];if(typeof n<"u")return n}}function P1(e){let t=e._keys;return t||(t=e._keys=hU(e._scopes)),t}function hU(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 pU=Number.EPSILON||1e-14,za=(e,t)=>t<e.length&&!e[t].skip&&e[t],YE=e=>e==="x"?"y":"x";function mU(e,t,r,n){const i=e.skip?t:e,a=t,o=r.skip?t:r,s=lp(a,i),l=lp(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 gU(e,t,r){const n=e.length;let i,a,o,s,l,c=za(e,0);for(let u=0;u<n-1;++u)if(l=c,c=za(e,u+1),!(!l||!c)){if(Io(t[u],0,pU)){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 vU(e,t,r="x"){const n=YE(r),i=e.length;let a,o,s,l=za(e,0);for(let c=0;c<i;++c){if(o=s,s=l,l=za(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 yU(e,t="x"){const r=YE(t),n=e.length,i=Array(n).fill(0),a=Array(n);let o,s,l,c=za(e,0);for(o=0;o<n;++o)if(s=l,l=c,c=za(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?Xr(i[o-1])!==Xr(i[o])?0:(i[o-1]+i[o])/2:i[o-1]:i[o]}gU(e,i,a),vU(e,a,t)}function El(e,t,r){return Math.max(Math.min(e,r),t)}function bU(e,t){let r,n,i,a,o,s=us(e[0],t);for(r=0,n=e.length;r<n;++r)o=a,a=s,s=r<n-1&&us(e[r+1],t),a&&(i=e[r],o&&(i.cp1x=El(i.cp1x,t.left,t.right),i.cp1y=El(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=El(i.cp2x,t.left,t.right),i.cp2y=El(i.cp2y,t.top,t.bottom)))}function xU(e,t,r,n,i){let a,o,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")yU(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=mU(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&&bU(e,r)}function Fg(){return typeof window<"u"&&typeof document<"u"}function zg(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function zc(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 Vu=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function wU(e,t){return Vu(e).getPropertyValue(t)}const _U=["top","right","bottom","left"];function Li(e,t,r){const n={};r=r?"-"+r:"";for(let i=0;i<4;i++){const a=_U[i];n[a]=parseFloat(e[t+"-"+a+r])||0}return n.width=n.left+n.right,n.height=n.top+n.bottom,n}const OU=(e,t,r)=>(e>0||t>0)&&(!r||!r.shadowRoot);function SU(e,t){const r=e.touches,n=r&&r.length?r[0]:e,{offsetX:i,offsetY:a}=n;let o=!1,s,l;if(OU(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 Oi(e,t){if("native"in e)return e;const{canvas:r,currentDevicePixelRatio:n}=t,i=Vu(r),a=i.boxSizing==="border-box",o=Li(i,"padding"),s=Li(i,"border","width"),{x:l,y:c,box:u}=SU(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 AU(e,t,r){let n,i;if(t===void 0||r===void 0){const a=e&&zg(e);if(!a)t=e.clientWidth,r=e.clientHeight;else{const o=a.getBoundingClientRect(),s=Vu(a),l=Li(s,"border","width"),c=Li(s,"padding");t=o.width-c.width-l.width,r=o.height-c.height-l.height,n=zc(s.maxWidth,a,"clientWidth"),i=zc(s.maxHeight,a,"clientHeight")}}return{width:t,height:r,maxWidth:n||Lc,maxHeight:i||Lc}}const Pl=e=>Math.round(e*10)/10;function EU(e,t,r,n){const i=Vu(e),a=Li(i,"margin"),o=zc(i.maxWidth,e,"clientWidth")||Lc,s=zc(i.maxHeight,e,"clientHeight")||Lc,l=AU(e,t,r);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const d=Li(i,"border","width"),h=Li(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=Pl(Math.min(c,o,l.maxWidth)),u=Pl(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Pl(c/2)),(t!==void 0||r!==void 0)&&n&&l.height&&u>l.height&&(u=l.height,c=Pl(Math.floor(u*n))),{width:c,height:u}}function C1(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 PU=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Fg()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function k1(e,t){const r=wU(e,t),n=r&&r.match(/^(\d+)(\.\d+)?px$/);return n?+n[1]:void 0}function Si(e,t,r,n){return{x:e.x+r*(t.x-e.x),y:e.y+r*(t.y-e.y)}}function CU(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 kU(e,t,r,n){const i={x:e.cp2x,y:e.cp2y},a={x:t.cp1x,y:t.cp1y},o=Si(e,i,r),s=Si(i,a,r),l=Si(a,t,r),c=Si(o,s,r),u=Si(s,l,r);return Si(c,u,r)}const TU=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}}},MU=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Aa(e,t,r){return e?TU(t,r):MU()}function GE(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 XE(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function ZE(e){return e==="angle"?{between:cs,compare:TH,normalize:kr}:{between:Bn,compare:(t,r)=>t-r,normalize:t=>t}}function T1({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 jU(e,t,r){const{property:n,start:i,end:a}=r,{between:o,normalize:s}=ZE(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 DU(e,t,r){if(!r)return[e];const{property:n,start:i,end:a}=r,o=t.length,{compare:s,between:l,normalize:c}=ZE(n),{start:u,end:f,loop:d,style:h}=jU(e,t,r),m=[];let p=!1,g=null,v,x,w;const y=()=>l(i,w,v)&&s(i,w)!==0,_=()=>s(a,v)===0||l(a,w,v),O=()=>p||y(),A=()=>!p||_();for(let P=u,T=u;P<=f;++P)x=t[P%o],!x.skip&&(v=c(x[n]),v!==w&&(p=l(v,i,a),g===null&&O()&&(g=s(v,i)===0?P:T),g!==null&&A()&&(m.push(T1({start:g,end:P,loop:d,count:o,style:h})),g=null),T=P,w=v));return g!==null&&m.push(T1({start:g,end:f,loop:d,count:o,style:h})),m}function NU(e,t){const r=[],n=e.segments;for(let i=0;i<n.length;i++){const a=DU(n[i],e.points,t);a.length&&r.push(...a)}return r}function IU(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 RU(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 $U(e,t){const r=e.points,n=e.options.spanGaps,i=r.length;if(!i)return[];const a=!!e._loop,{start:o,end:s}=IU(r,i,a,n);if(n===!0)return M1(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 M1(e,RU(r,o,l,c),r,t)}function M1(e,t,r,n){return!n||!n.setContext||!r?t:LU(e,t,r,n)}function LU(e,t,r,n){const i=e._chart.getContext(),a=j1(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 x=s?-1:1;if(m!==p){for(m+=l;r[m%l].skip;)m-=x;for(;r[p%l].skip;)p+=x;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=j1(n.setContext(ta(i,{type:"segment",p0:p,p1:v,p0DataIndex:(d-1)%l,p1DataIndex:d%l,datasetIndex:o}))),BU(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 j1(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function BU(e,t){if(!t)return!1;const r=[],n=function(i,a){return jg(a)?(r.includes(a)||r.push(a),r.indexOf(a)):a};return JSON.stringify(e,n)!==JSON.stringify(t,n)}function Cl(e,t,r){return e.options.clip?e[r]:t[r]}function FU(e,t){const{xScale:r,yScale:n}=e;return r&&n?{left:Cl(r,t,"left"),right:Cl(r,t,"right"),top:Cl(n,t,"top"),bottom:Cl(n,t,"bottom")}:t}function zU(e,t){const r=t._clip;if(r.disabled)return!1;const n=FU(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)}}/*!
|
|
230
230
|
* Chart.js v4.5.0
|
|
231
231
|
* https://www.chartjs.org
|
|
232
232
|
* (c) 2025 Chart.js Contributors
|
|
233
233
|
* Released under the MIT License
|
|
234
|
-
*/class HU{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=LE.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 ln=new HU;const D1="transparent",UU={boolean(e,t,r){return r>.5?t:e},color(e,t,r){const n=_1(e||D1),i=n.valid&&_1(t||D1);return i&&i.valid?i.mix(n,r).hexString():t},number(e,t,r){return e+(t-e)*r}};class KU{constructor(t,r,n,i){const a=r[n];i=Al([t.to,i,a,t.from]);const o=Al([t.from,a,i]);this._active=!0,this._fn=t.fn||UU[t.type||typeof o],this._easing=Ro[t.easing]||Ro.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=Al([t.to,r,i,t.from]),this._from=Al([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 JE{constructor(t,r){this._chart=t,this._properties=new Map,this.configure(r)}configure(t){if(!ve(t))return;const r=Object.keys(it.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!ve(a))return;const o={};for(const s of r)o[s]=a[s];(xt(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!n.has(s))&&n.set(s,o)})})}_animateOptions(t,r){const n=r.options,i=YU(t,n);if(!i)return[];const a=this._createAnimations(i,n);return n.$shared&&qU(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 KU(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 ln.add(this._chart,n),!0}}function qU(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 YU(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 N1(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 GU(e,t,r){if(r===!1)return!1;const n=N1(e,r),i=N1(t,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function XU(e){let t,r,n,i;return ve(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 QE(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 I1(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],Ar(c)&&(a||t===0||Xr(t)===Xr(c))&&(t+=c)}return!u&&!n.all?0:t}function ZU(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 Kd(e,t){const r=e&&e.options.stacked;return r||r===void 0&&t.stack!==void 0}function JU(e,t,r){return`${e.id}.${t.id}.${r.stack||r.type}`}function QU(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 eK(e,t,r){const n=e[t]||(e[t]={});return n[r]||(n[r]={})}function R1(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 $1(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=JU(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]=eK(i,u,p),d[s]=g,d._top=R1(d,o,!0,n.type),d._bottom=R1(d,o,!1,n.type);const x=d._visualValues||(d._visualValues={});x[s]=g}}function qd(e,t){const r=e.scales;return Object.keys(r).filter(n=>r[n].axis===t).shift()}function tK(e,t){return ra(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function rK(e,t,r){return ra(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:r,index:t,mode:"default",type:"data"})}function mo(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 Yd=e=>e==="reset"||e==="none",L1=(e,t)=>t?e:Object.assign({},e),nK=(e,t,r)=>e&&!t.hidden&&t._stacked&&{keys:QE(r,!0),values:null};class Hu{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=Kd(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&&mo(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=ue(n.xAxisID,qd(t,"x")),o=r.yAxisID=ue(n.yAxisID,qd(t,"y")),s=r.rAxisID=ue(n.rAxisID,qd(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&&b1(this._data,this),t._stacked&&mo(t)}_dataCheck(){const t=this.getDataset(),r=t.data||(t.data=[]),n=this._data;if(ve(r)){const i=this._cachedMeta;this._data=ZU(r,i)}else if(n!==r){if(n){b1(n,this);const i=this._cachedMeta;mo(i),i._parsed=[]}r&&Object.isExtensible(r)&&RH(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=Kd(r.vScale,r),r.stack!==n.stack&&(i=!0,mo(r),r.stack=n.stack),this._resyncElements(t),(i||a!==r._stacked)&&($1(this,r._parsed),r._stacked=Kd(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{xt(i[t])?d=this.parseArrayData(n,i,t,r):ve(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&&$1(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(Yi(h,s),d),y:o.parse(Yi(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:QE(i,!0),values:r._stacks[t.axis]._visualValues};return I1(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=I1(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=nK(r,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=QU(s);let d,h;function m(){h=i[d];const p=h[s.axis];return!Ar(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],Ar(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=XU(ue(this.options.clip,GU(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=rK(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=tK(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&&ss(n);if(s)return L1(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(it.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(L1(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 JE(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||Yd(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){Yd(i)?Object.assign(t,n):this._resolveAnimations(r,i).update(t,n)}updateSharedOptions(t,r,n){t&&!Yd(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&&mo(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 iK(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=$E(n.sort((i,a)=>i-a))}return e._cache.$bar}function aK(e){const t=e.iScale,r=iK(t,e.type);let n=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(ss(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 oK(e,t,r,n){const i=r.barThickness;let a,o;return Ce(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 sK(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 lK(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 eP(e,t,r,n){return xt(e)?lK(e,t,r,n):t[r.axis]=r.parse(e,n),t}function B1(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(eP(d,f,a,c));return l}function Gd(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function cK(e,t,r){return e!==0?Xr(e):(t.isHorizontal()?1:-1)*(t.min>=r?1:-1)}function uK(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 fK(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}=uK(e);i==="middle"&&r&&(e.enableBorderRadius=!0,(r._top||0)===n?i=c:(r._bottom||0)===n?i=u:(a[F1(u,o,s,l)]=!0,i=c)),a[F1(i,o,s,l)]=!0,e.borderSkipped=a}function F1(e,t,r,n){return n?(e=dK(e,t,r),e=z1(e,r,t)):e=z1(e,t,r),e}function dK(e,t,r){return e===t?r:e===r?t:e}function z1(e,t,r){return e==="start"?t:e==="end"?r:e}function hK(e,{inflateAmount:t},r){e.inflateAmount=t==="auto"?r===1?.33:0:t}class pK extends Hu{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 B1(t,r,n,i)}parseArrayData(t,r,n,i){return B1(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(Yi(p,c),d),f.push(eP(Yi(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=Gd(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||Ce(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),g=this._calculateBarIndexPixels(h,u),v=(m._stacks||{})[s.axis],x={horizontal:c,base:p.base,enableBorderRadius:!v||Gd(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&&(x.options=f||this.resolveDataElementOptions(h,t[h].active?"active":i));const w=x.options||t[h].options;fK(x,w,v,o),hK(x,w,u.ratio),this.updateElement(t[h],h,x,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(Ce(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[ue(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||aK(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=Gd(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&&Xr(f)!==Xr(c.barEnd)&&(d=0),d+=f);const g=!Ce(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=cK(p,r,s)*o,f===s&&(v-=p/2);const x=r.getPixelForDecimal(0),w=r.getPixelForDecimal(1),y=Math.min(x,w),_=Math.max(x,w);v=Math.max(Math.min(v,_),y),m=v+p,n&&!u&&(l._stacks[r.axis]._visualValues[i]=r.getValueForPixel(m)-r.getValueForPixel(v))}if(v===r.getPixelForValue(s)){const x=Xr(p)*r.getLineWidthForValue(s)/2;v+=x,p-=x}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=ue(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"?sK(t,r,i,u*c):oK(t,r,i,u*c),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(ue(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 mK(e,t,r){let n=1,i=1,a=0,o=0;if(t<tt){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),f=Math.cos(l),d=Math.sin(l),h=(w,y,_)=>cs(w,s,l,!0)?1:Math.max(y,y*r,_,_*r),m=(w,y,_)=>cs(w,s,l,!0)?-1:Math.min(y,y*r,_,_*r),p=h(0,c,f),g=h(pt,u,d),v=m(Re,c,f),x=m(Re+pt,u,d);n=(p-v)/2,i=(g-x)/2,a=-(p+v)/2,o=-(g+x)/2}return{ratioX:n,ratioY:i,offsetX:a,offsetY:o}}class gK extends Hu{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(ve(n[t])){const{key:l="value"}=this._parsing;a=c=>+Yi(n[c],l)}let o,s;for(o=t,s=t+r;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return vn(this.options.rotation-90)}_getCircumference(){return vn(this.options.circumference)}_getRotationExtents(){let t=tt,r=-tt;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(bH(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:m,offsetY:p}=mK(f,u,l),g=(n.width-o)/d,v=(n.height-o)/h,x=Math.max(Math.min(g,v)/2,0),w=jE(this.options.radius,x),y=Math.max(w*l,0),_=(w-y)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=p*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*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/tt)}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(),x;for(x=0;x<r;++x)v+=this._circumference(x,a);for(x=r;x<r+n;++x){const w=this._circumference(x,a),y=t[x],_={x:u+this.offsetX,y:f+this.offsetY,startAngle:v,endAngle:v+w,circumference:w,outerRadius:m,innerRadius:h};g&&(_.options=p||this.resolveDataElementOptions(x,y.active?"active":i)),v+=w,this.updateElement(y,x,_,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)?tt*(Math.abs(t)/r):0}getLabelAndValue(t){const r=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=Dg(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(ue(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class vK extends Hu{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}=BH(r,i,o);this._drawStart=s,this._drawCount=l,FH(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=ls(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",x=r+n,w=t.length;let y=r>0&&this.getParsed(r-1);for(let _=0;_<w;++_){const O=t[_],A=v?O:{};if(_<r||_>=x){A.skip=!0;continue}const P=this.getParsed(_),T=Ce(P[h]),I=A[d]=o.getPixelForValue(P[d],_),j=A[h]=a||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,P,l):P[h],_);A.skip=isNaN(I)||isNaN(j)||T,A.stop=_>0&&Math.abs(P[d]-y[d])>g,p&&(A.parsed=P,A.raw=c.data[_]),f&&(A.options=u||this.resolveDataElementOptions(_,O.active?"active":i)),v||this.updateElement(O,_,A,i),y=P}}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 yi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wg{static override(t){Object.assign(Wg.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return yi()}parse(){return yi()}format(){return yi()}add(){return yi()}diff(){return yi()}startOf(){return yi()}endOf(){return yi()}}var yK={_date:Wg};function bK(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?NH:Ti;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=>!Ce(p[f.axis]));u.lo-=Math.max(0,h);const m=d.slice(u.hi).findIndex(p=>!Ce(p[f.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:a.length-1}}function Uu(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}=bK(a[s],t,o,i);for(let h=f;h<=d;++h){const m=u[h];m.skip||n(m,c,h)}}}function xK(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 Xd(e,t,r,n,i){const a=[];return!i&&!e.isPointInArea(t)||Uu(e,r,t,function(s,l,c){!i&&!us(s,e.chartArea,0)||s.inRange(t.x,t.y,n)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function wK(e,t,r,n){let i=[];function a(o,s,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],n),{angle:f}=IE(o,{x:t.x,y:t.y});cs(f,c,u)&&i.push({element:o,datasetIndex:s,index:l})}return Uu(e,r,t,a),i}function _K(e,t,r,n,i,a){let o=[];const s=xK(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 Uu(e,r,t,c),o}function Zd(e,t,r,n,i,a){return!a&&!e.isPointInArea(t)?[]:r==="r"&&!n?wK(e,t,r,i):_K(e,t,r,n,i,a)}function W1(e,t,r,n,i){const a=[],o=r==="x"?"inXRange":"inYRange";let s=!1;return Uu(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 OK={modes:{index(e,t,r,n){const i=Oi(t,e),a=r.axis||"x",o=r.includeInvisible||!1,s=r.intersect?Xd(e,i,a,n,o):Zd(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=Oi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;let s=r.intersect?Xd(e,i,a,n,o):Zd(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=Oi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Xd(e,i,a,n,o)},nearest(e,t,r,n){const i=Oi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Zd(e,i,a,r.intersect,n,o)},x(e,t,r,n){const i=Oi(t,e);return W1(e,i,"x",r.intersect,n)},y(e,t,r,n){const i=Oi(t,e);return W1(e,i,"y",r.intersect,n)}}};const tP=["left","top","right","bottom"];function go(e,t){return e.filter(r=>r.pos===t)}function V1(e,t){return e.filter(r=>tP.indexOf(r.pos)===-1&&r.box.axis===t)}function vo(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 SK(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 AK(e){const t={};for(const r of e){const{stack:n,pos:i,stackWeight:a}=r;if(!n||!tP.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 EK(e,t){const r=AK(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 PK(e){const t=SK(e),r=vo(t.filter(c=>c.box.fullSize),!0),n=vo(go(t,"left"),!0),i=vo(go(t,"right")),a=vo(go(t,"top"),!0),o=vo(go(t,"bottom")),s=V1(t,"x"),l=V1(t,"y");return{fullSize:r,leftAndTop:n.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:go(t,"chartArea"),vertical:n.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function H1(e,t,r,n){return Math.max(e[r],t[r])+Math.max(e[n],t[n])}function rP(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 CK(e,t,r,n){const{pos:i,box:a}=r,o=e.maxPadding;if(!ve(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&&rP(o,a.getPadding());const s=Math.max(0,t.outerWidth-H1(o,e,"left","right")),l=Math.max(0,t.outerHeight-H1(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 kK(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 TK(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 Eo(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,TK(s.horizontal,t));const{same:f,other:d}=CK(t,r,s,n);c|=f&&i.length,u=u||d,l.fullSize||i.push(s)}return c&&Eo(i,t,r,n)||u}function kl(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 U1(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;ss(c.start)&&(o=c.start),l.fullSize?kl(l,i.left,o,r.outerWidth-i.right-i.left,d):kl(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;ss(c.start)&&(a=c.start),l.fullSize?kl(l,a,i.top,d,r.outerHeight-i.bottom-i.top):kl(l,a,t.top+c.placed,d,f),c.start=a,c.placed+=f,a=l.right}}t.x=a,t.y=o}var Fn={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=Mr(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(r-i.height,0),s=PK(e.boxes),l=s.vertical,c=s.horizontal;Me(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);rP(d,Mr(n));const h=Object.assign({maxPadding:d,w:a,h:o,x:i.left,y:i.top},i),m=EK(l.concat(c),f);Eo(s.fullSize,h,f,m),Eo(l,h,f,m),Eo(c,h,f,m)&&Eo(l,h,f,m),kK(h),U1(s.leftAndTop,h,f,m),h.x+=h.w,h.y+=h.h,U1(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},Me(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 nP{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 MK extends nP{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Hl="$chartjs",jK={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},K1=e=>e===null||e==="";function DK(e,t){const r=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[Hl]={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",K1(i)){const a=k1(e,"width");a!==void 0&&(e.width=a)}if(K1(n))if(e.style.height==="")e.height=e.width/(t||2);else{const a=k1(e,"height");a!==void 0&&(e.height=a)}return e}const iP=kU?{passive:!0}:!1;function NK(e,t,r){e&&e.addEventListener(t,r,iP)}function IK(e,t,r){e&&e.canvas&&e.canvas.removeEventListener(t,r,iP)}function RK(e,t){const r=jK[e.type]||e.type,{x:n,y:i}=Oi(e,t);return{type:r,chart:t,native:e,x:n!==void 0?n:null,y:i!==void 0?i:null}}function Wc(e,t){for(const r of e)if(r===t||r.contains(t))return!0}function $K(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Wc(s.addedNodes,n),o=o&&!Wc(s.removedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function LK(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Wc(s.removedNodes,n),o=o&&!Wc(s.addedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}const fs=new Map;let q1=0;function aP(){const e=window.devicePixelRatio;e!==q1&&(q1=e,fs.forEach((t,r)=>{r.currentDevicePixelRatio!==e&&t()}))}function BK(e,t){fs.size||window.addEventListener("resize",aP),fs.set(e,t)}function FK(e){fs.delete(e),fs.size||window.removeEventListener("resize",aP)}function zK(e,t,r){const n=e.canvas,i=n&&zg(n);if(!i)return;const a=BE((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),BK(e,a),o}function Jd(e,t,r){r&&r.disconnect(),t==="resize"&&FK(e)}function WK(e,t,r){const n=e.canvas,i=BE(a=>{e.ctx!==null&&r(RK(a,e))},e);return NK(n,t,i),i}class VK extends nP{acquireContext(t,r){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(DK(t,r),n):null}releaseContext(t){const r=t.canvas;if(!r[Hl])return!1;const n=r[Hl].initial;["height","width"].forEach(a=>{const o=n[a];Ce(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[Hl],!0}addEventListener(t,r,n){this.removeEventListener(t,r);const i=t.$proxies||(t.$proxies={}),o={attach:$K,detach:LK,resize:zK}[r]||WK;i[r]=o(t,r,n)}removeEventListener(t,r){const n=t.$proxies||(t.$proxies={}),i=n[r];if(!i)return;({attach:Jd,detach:Jd,resize:Jd}[r]||IK)(t,r,i),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,r,n,i){return CU(t,r,n,i)}isAttached(t){const r=t&&zg(t);return!!(r&&r.isConnected)}}function HK(e){return!Fg()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?MK:VK}let ai=class{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 ls(this.x)&&ls(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 UK(e,t){const r=e.options.ticks,n=KK(e),i=Math.min(r.maxTicksLimit||n,n),a=r.major.enabled?YK(t):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>i)return GK(t,c,a,o/i),c;const u=qK(a,t,i);if(o>0){let f,d;const h=o>1?Math.round((l-s)/(o-1)):null;for(Tl(t,c,u,Ce(h)?0:s-h,s),f=0,d=o-1;f<d;f++)Tl(t,c,u,a[f],a[f+1]);return Tl(t,c,u,l,Ce(h)?t.length:l+h),c}return Tl(t,c,u),c}function KK(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 qK(e,t,r){const n=XK(e),i=t.length/r;if(!n)return Math.max(i,1);const a=PH(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 YK(e){const t=[];let r,n;for(r=0,n=e.length;r<n;r++)e[r].major&&t.push(r);return t}function GK(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 Tl(e,t,r,n,i){const a=ue(n,0),o=Math.min(ue(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 XK(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 ZK=e=>e==="left"?"right":e==="right"?"left":e,Y1=(e,t,r)=>t==="top"||t==="left"?e[t]+r:e[t]-r,G1=(e,t)=>Math.min(t||e,e);function X1(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 JK(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 QK(e,t){Me(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 yo(e){return e.drawTicks?e.tickLength:0}function Z1(e,t){if(!e.display)return 0;const r=Ut(e.font,t),n=Mr(e.padding);return(xt(e.text)?e.text.length:1)*r.lineHeight+n.height}function eq(e,t){return ra(e,{scale:t,type:"scale"})}function tq(e,t,r){return ra(e,{tick:r,index:t,type:"tick"})}function rq(e,t,r){let n=FE(e);return(r&&t!=="right"||!r&&t==="right")&&(n=ZK(n)),n}function nq(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=Qt(n,a,s),ve(r)){const v=Object.keys(r)[0],x=r[v];m=u[v].getPixelForValue(x)+p-t}else r==="center"?m=(c.bottom+c.top)/2+p-t:m=Y1(e,r,t);d=s-a}else{if(ve(r)){const v=Object.keys(r)[0],x=r[v];h=u[v].getPixelForValue(x)-g+t}else r==="center"?h=(c.left+c.right)/2-g+t:h=Y1(e,r,t);m=Qt(n,o,i),f=r==="left"?-pt:pt}return{titleX:h,titleY:m,maxWidth:d,rotation:f}}class Qa extends ai{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=Fr(t,Number.POSITIVE_INFINITY),r=Fr(r,Number.NEGATIVE_INFINITY),n=Fr(n,Number.POSITIVE_INFINITY),i=Fr(i,Number.NEGATIVE_INFINITY),{min:Fr(t,n),max:Fr(r,i),minDefined:Ar(t),maxDefined:Ar(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:Fr(r,Fr(n,r)),max:Fr(n,Fr(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(){He(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=oU(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?X1(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=UK(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(){He(this.options.afterUpdate,[this])}beforeSetDimensions(){He(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(){He(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),He(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){He(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=He(r.callback,[a.value,n,t],this)}afterTickToLabelConversion(){He(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){He(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,r=t.ticks,n=G1(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=Nt(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-yo(t.grid)-r.padding-Z1(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),o=MH(Math.min(Math.asin(Nt((u.highest.height+6)/s,-1,1)),Math.asin(Nt(l/c,-1,1))-Math.asin(Nt(d/c,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){He(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){He(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=Z1(i,r.options.font);if(s?(t.width=this.maxWidth,t.height=yo(a)+l):(t.height=this.maxHeight,t.width=yo(a)+l),n.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:d}=this._getLabelSizes(),h=n.padding*2,m=vn(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(){He(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++)Ce(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=X1(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/G1(r,n));let c=0,u=0,f,d,h,m,p,g,v,x,w,y,_;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:[]},x=p.lineHeight,w=y=0,!Ce(m)&&!xt(m))w=S1(i,v.data,v.gc,w,m),y=x;else if(xt(m))for(d=0,h=m.length;d<h;++d)_=m[d],!Ce(_)&&!xt(_)&&(w=S1(i,v.data,v.gc,w,_),y+=x);o.push(w),s.push(y),c=Math.max(w,c),u=Math.max(y,u)}QK(a,r);const O=o.indexOf(c),A=s.indexOf(u),P=T=>({width:o[T]||0,height:s[T]||0});return{first:P(0),last:P(r-1),widest:P(O),highest:P(A),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 DH(this._alignToPixels?vi(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=tq(this.getContext(),t,n))}return this.$context||(this.$context=eq(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,r=vn(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=yo(a),h=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,v=function(z){return vi(n,z,p)};let x,w,y,_,O,A,P,T,I,j,S,D;if(o==="top")x=v(this.bottom),A=this.bottom-d,T=x-g,j=v(t.top)+g,D=t.bottom;else if(o==="bottom")x=v(this.top),j=t.top,D=v(t.bottom)-g,A=x+g,T=this.top+d;else if(o==="left")x=v(this.right),O=this.right-d,P=x-g,I=v(t.left)+g,S=t.right;else if(o==="right")x=v(this.left),I=t.left,S=v(t.right)-g,O=x+g,P=this.left+d;else if(r==="x"){if(o==="center")x=v((t.top+t.bottom)/2+.5);else if(ve(o)){const z=Object.keys(o)[0],W=o[z];x=v(this.chart.scales[z].getPixelForValue(W))}j=t.top,D=t.bottom,A=x+g,T=A+d}else if(r==="y"){if(o==="center")x=v((t.left+t.right)/2);else if(ve(o)){const z=Object.keys(o)[0],W=o[z];x=v(this.chart.scales[z].getPixelForValue(W))}O=x-g,P=O-d,I=t.left,S=t.right}const M=ue(i.ticks.maxTicksLimit,f),R=Math.max(1,Math.ceil(f/M));for(w=0;w<f;w+=R){const z=this.getContext(w),W=a.setContext(z),Y=s.setContext(z),G=W.lineWidth,L=W.color,K=Y.dash||[],H=Y.dashOffset,ne=W.tickWidth,Q=W.tickColor,J=W.tickBorderDash||[],te=W.tickBorderDashOffset;y=JK(this,w,l),y!==void 0&&(_=vi(n,y,G),c?O=P=I=S=_:A=T=j=D=_,h.push({tx1:O,ty1:A,tx2:P,ty2:T,x1:I,y1:j,x2:S,y2:D,width:G,color:L,borderDash:K,borderDashOffset:H,tickWidth:ne,tickColor:Q,tickBorderDash:J,tickBorderDashOffset:te}))}return this._ticksLength=f,this._borderValue=x,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=yo(n.grid),h=d+u,m=f?-u:h,p=-vn(this.labelRotation),g=[];let v,x,w,y,_,O,A,P,T,I,j,S,D="middle";if(i==="top")O=this.bottom-m,A=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+m,A=this._getXAxisLabelAlignment();else if(i==="left"){const R=this._getYAxisLabelAlignment(d);A=R.textAlign,_=R.x}else if(i==="right"){const R=this._getYAxisLabelAlignment(d);A=R.textAlign,_=R.x}else if(r==="x"){if(i==="center")O=(t.top+t.bottom)/2+h;else if(ve(i)){const R=Object.keys(i)[0],z=i[R];O=this.chart.scales[R].getPixelForValue(z)+h}A=this._getXAxisLabelAlignment()}else if(r==="y"){if(i==="center")_=(t.left+t.right)/2-h;else if(ve(i)){const R=Object.keys(i)[0],z=i[R];_=this.chart.scales[R].getPixelForValue(z)}A=this._getYAxisLabelAlignment(d).textAlign}r==="y"&&(l==="start"?D="top":l==="end"&&(D="bottom"));const M=this._getLabelSizes();for(v=0,x=s.length;v<x;++v){w=s[v],y=w.label;const R=a.setContext(this.getContext(v));P=this.getPixelForTick(v)+a.labelOffset,T=this._resolveTickFontOptions(v),I=T.lineHeight,j=xt(y)?y.length:1;const z=j/2,W=R.color,Y=R.textStrokeColor,G=R.textStrokeWidth;let L=A;o?(_=P,A==="inner"&&(v===x-1?L=this.options.reverse?"left":"right":v===0?L=this.options.reverse?"right":"left":L="center"),i==="top"?c==="near"||p!==0?S=-j*I+I/2:c==="center"?S=-M.highest.height/2-z*I+I:S=-M.highest.height+I/2:c==="near"||p!==0?S=I/2:c==="center"?S=M.highest.height/2-z*I:S=M.highest.height-j*I,f&&(S*=-1),p!==0&&!R.showLabelBackdrop&&(_+=I/2*Math.sin(p))):(O=P,S=(1-j)*I/2);let K;if(R.showLabelBackdrop){const H=Mr(R.backdropPadding),ne=M.heights[v],Q=M.widths[v];let J=S-H.top,te=0-H.left;switch(D){case"middle":J-=ne/2;break;case"bottom":J-=ne;break}switch(A){case"center":te-=Q/2;break;case"right":te-=Q;break;case"inner":v===x-1?te-=Q:v>0&&(te-=Q/2);break}K={left:te,top:J,width:Q+H.width,height:ne+H.height,color:R.backdropColor}}g.push({label:y,font:T,textOffset:S,options:{rotation:p,color:W,strokeColor:Y,strokeWidth:G,textAlign:L,textBaseline:D,translation:[_,O],backdrop:K}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:r}=this.options;if(-vn(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=vi(t,this.left,o)-o/2,u=vi(t,this.right,s)+s/2,f=d=l):(f=vi(t,this.top,o)-o/2,d=vi(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&&Ng(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;Bc(n,c,0,u,l,s)}i&&Ig(n)}drawTitle(){const{ctx:t,options:{position:r,title:n,reverse:i}}=this;if(!n.display)return;const a=Ut(n.font),o=Mr(n.padding),s=n.align;let l=a.lineHeight/2;r==="bottom"||r==="center"||ve(r)?(l+=o.bottom,xt(n.text)&&(l+=a.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:f,rotation:d}=nq(this,l,r,s);Bc(t,n.text,0,0,a,{color:n.color,maxWidth:f,rotation:d,textAlign:rq(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=ue(t.grid&&t.grid.z,-1),i=ue(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Qa.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 Ut(r.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ml{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;oq(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,iq(t,o,n),this.override&&it.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 it[i]&&(delete it[i][n],this.override&&delete Gi[n])}}function iq(e,t,r){const n=os(Object.create(null),[r?it.get(r):{},it.get(t),e.defaults]);it.set(t,n),e.defaultRoutes&&aq(t,e.defaultRoutes),e.descriptors&&it.describe(t,e.descriptors)}function aq(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(".");it.route(a,i,l,s)})}function oq(e){return"id"in e&&"defaults"in e}class sq{constructor(){this.controllers=new Ml(Hu,"datasets",!0),this.elements=new Ml(ai,"elements"),this.plugins=new Ml(Object,"plugins"),this.scales=new Ml(Qa,"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):Me(i,o=>{const s=n||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,r,n){const i=Tg(t);He(n["before"+i],[],n),r[t](n),He(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 Wr=new sq;class lq{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(He(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Ce(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=ue(n.options&&n.options.plugins,{}),a=cq(n);return i===!1&&!r?[]:fq(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 cq(e){const t={},r=[],n=Object.keys(Wr.plugins.items);for(let a=0;a<n.length;a++)r.push(Wr.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 uq(e,t){return!t&&e===!1?null:e===!0?{}:e}function fq(e,{plugins:t,localIds:r},n,i){const a=[],o=e.getContext();for(const s of t){const l=s.id,c=uq(n[l],i);c!==null&&a.push({plugin:s,options:dq(e.config,{plugin:s,local:r[l]},c,o)})}return a}function dq(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 fp(e,t){const r=it.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||r.indexAxis||"x"}function hq(e,t){let r=e;return e==="_index_"?r=t:e==="_value_"&&(r=t==="x"?"y":"x"),r}function pq(e,t){return e===t?"_index_":"_value_"}function J1(e){if(e==="x"||e==="y"||e==="r")return e}function mq(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function dp(e,...t){if(J1(e))return e;for(const r of t){const n=r.axis||mq(r.position)||e.length>1&&J1(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Q1(e,t,r){if(r[t+"AxisID"]===e)return{axis:t}}function gq(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 Q1(e,"x",r[0])||Q1(e,"y",r[0])}return{}}function vq(e,t){const r=Gi[e.type]||{scales:{}},n=t.scales||{},i=fp(e.type,t),a=Object.create(null);return Object.keys(n).forEach(o=>{const s=n[o];if(!ve(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=dp(o,s,gq(o,e),it.scales[s.type]),c=pq(l,i),u=r.scales||{};a[o]=No(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(o=>{const s=o.type||e.type,l=o.indexAxis||fp(s,t),u=(Gi[s]||{}).scales||{};Object.keys(u).forEach(f=>{const d=hq(f,l),h=o[d+"AxisID"]||d;a[h]=a[h]||Object.create(null),No(a[h],[{axis:d},n[h],u[f]])})}),Object.keys(a).forEach(o=>{const s=a[o];No(s,[it.scales[s.type],it.scale])}),a}function oP(e){const t=e.options||(e.options={});t.plugins=ue(t.plugins,{}),t.scales=vq(e,t)}function sP(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function yq(e){return e=e||{},e.data=sP(e.data),oP(e),e}const ew=new Map,lP=new Set;function jl(e,t){let r=ew.get(e);return r||(r=t(),ew.set(e,r),lP.add(r)),r}const bo=(e,t,r)=>{const n=Yi(t,r);n!==void 0&&e.add(n)};class bq{constructor(t){this._config=yq(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=sP(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(),oP(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return jl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,r){return jl(`${t}.transition.${r}`,()=>[[`datasets.${t}.transitions.${r}`,`transitions.${r}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,r){return jl(`${t}-${r}`,()=>[[`datasets.${t}.elements.${r}`,`datasets.${t}`,`elements.${r}`,""]])}pluginScopeKeys(t){const r=t.id,n=this.type;return jl(`${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=>bo(l,t,f))),u.forEach(f=>bo(l,i,f)),u.forEach(f=>bo(l,Gi[a]||{},f)),u.forEach(f=>bo(l,it,f)),u.forEach(f=>bo(l,cp,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),lP.has(r)&&o.set(r,c),c}chartOptionScopes(){const{options:t,type:r}=this;return[t,Gi[r]||{},it.datasets[r]||{},{type:r},it,cp]}resolveNamedOptions(t,r,n,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=tw(this._resolverCache,t,i);let l=o;if(wq(o,r)){a.$shared=!1,n=Zn(n)?n():n;const c=this.createResolver(t,n,s);l=Fa(o,n,c)}for(const c of r)a[c]=l[c];return a}createResolver(t,r,n=[""],i){const{resolver:a}=tw(this._resolverCache,t,n);return ve(r)?Fa(a,r,void 0,i):a}}function tw(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:$g(t,r),subPrefixes:r.filter(s=>!s.toLowerCase().includes("hover"))},n.set(i,a)),a}const xq=e=>ve(e)&&Object.getOwnPropertyNames(e).some(t=>Zn(e[t]));function wq(e,t){const{isScriptable:r,isIndexable:n}=HE(e);for(const i of t){const a=r(i),o=n(i),s=(o||a)&&e[i];if(a&&(Zn(s)||xq(s))||o&&xt(s))return!0}return!1}var _q="4.5.0";const Oq=["top","bottom","left","right","chartArea"];function rw(e,t){return e==="top"||e==="bottom"||Oq.indexOf(e)===-1&&t==="x"}function nw(e,t){return function(r,n){return r[e]===n[e]?r[t]-n[t]:r[e]-n[e]}}function iw(e){const t=e.chart,r=t.options.animation;t.notifyPlugins("afterRender"),He(r&&r.onComplete,[e],t)}function Sq(e){const t=e.chart,r=t.options.animation;He(r&&r.onProgress,[e],t)}function cP(e){return Fg()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Ul={},aw=e=>{const t=cP(e);return Object.values(Ul).filter(r=>r.canvas===t).pop()};function Aq(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 Eq(e,t,r,n){return!r||e.type==="mouseout"?null:n?t:e}let Xt=class{static defaults=it;static instances=Ul;static overrides=Gi;static registry=Wr;static version=_q;static getChart=aw;static register(...t){Wr.add(...t),ow()}static unregister(...t){Wr.remove(...t),ow()}constructor(t,r){const n=this.config=new bq(r),i=cP(t),a=aw(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||HK(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=yH(),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 lq,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=$H(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],Ul[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ln.listen(this,"complete",iw),ln.listen(this,"progress",Sq),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:r},width:n,height:i,_aspectRatio:a}=this;return Ce(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 Wr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():C1(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return A1(this.canvas,this.ctx),this}stop(){return ln.stop(this),this}resize(t,r){ln.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,C1(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),He(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};Me(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=dp(o,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Me(a,o=>{const s=o.options,l=s.id,c=dp(l,s),u=ue(s.type,o.dtype);(s.position===void 0||rw(s.position,c)!==rw(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=Wr.getScale(u);f=new d({id:l,type:u,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(s,t)}),Me(i,(o,s)=>{o||delete n[s]}),Me(n,o=>{Fn.configure(this,o,o.options),Fn.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(nw("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||fp(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=Wr.getController(s),{datasetElementType:c,dataElementType:u}=it.datasets[s];Object.assign(l,{dataElementType:Wr.getElement(u),datasetElementType:c&&Wr.getElement(c)}),o.controller=new l(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Me(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||Me(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(nw("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Me(this.scales,t=>{Fn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!m1(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;Aq(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(!m1(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;Fn.update(this,this.width,this.height,t);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],Me(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,Zn(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&&(ln.has(this)?this.attached&&!ln.running(this)&&ln.start(this):(this.draw(),iw({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=VU(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(i&&Ng(r,i),t.controller.draw(),i&&Ig(r),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return us(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,r,n,i){const a=OK.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=ra(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);ss(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(),ln.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(),A1(t,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete Ul[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)};Me(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(){Me(this._listeners,(t,r)=>{this.platform.removeEventListener(this,r,t)}),this._listeners={},Me(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}});!Rc(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=SH(t),c=Eq(t,this._lastEvent,n,l);n&&(this._lastEvent=null,He(a.onHover,[t,s,this],this),l&&He(a.onClick,[t,s,this],this));const u=!Rc(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 ow(){return Me(Xt.instances,e=>e._plugins.invalidate())}function Pq(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,kr(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,kr(n-r));e.arc(i,a,s+c/2,r-d/2,n+d/2,!0)}else{const d=Math.min(c/2,o*kr(n-r));if(u==="round")e.arc(i,a,d,r-Re/2,n+Re/2,!0);else if(u==="bevel"){const h=2*d*d,m=-h*Math.cos(r+Re/2)+i,p=-h*Math.sin(r+Re/2)+a,g=h*Math.cos(n+Re/2)+i,v=h*Math.sin(n+Re/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 Cq(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+pt,n-pt),e.closePath(),e.clip()}function kq(e){return Rg(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Tq(e,t,r,n){const i=kq(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 Nt(l,0,Math.min(a,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Nt(i.innerStart,0,o),innerEnd:Nt(i.innerEnd,0,o)}}function va(e,t,r,n){return{x:r+e*Math.cos(t),y:n+e*Math.sin(t)}}function Vc(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 R=u>0?u-n:0,z=f>0?f-n:0,W=(R+z)/2,Y=W!==0?m*W/(W+n):m;h=(m-Y)/2}const p=Math.max(.001,m*f-r/Re)/f,g=(m-p)/2,v=l+g+h,x=i-g-h,{outerStart:w,outerEnd:y,innerStart:_,innerEnd:O}=Tq(t,d,f,x-v),A=f-w,P=f-y,T=v+w/A,I=x-y/P,j=d+_,S=d+O,D=v+_/j,M=x-O/S;if(e.beginPath(),a){const R=(T+I)/2;if(e.arc(o,s,f,T,R),e.arc(o,s,f,R,I),y>0){const G=va(P,I,o,s);e.arc(G.x,G.y,y,I,x+pt)}const z=va(S,x,o,s);if(e.lineTo(z.x,z.y),O>0){const G=va(S,M,o,s);e.arc(G.x,G.y,O,x+pt,M+Math.PI)}const W=(x-O/d+(v+_/d))/2;if(e.arc(o,s,d,x-O/d,W,!0),e.arc(o,s,d,W,v+_/d,!0),_>0){const G=va(j,D,o,s);e.arc(G.x,G.y,_,D+Math.PI,v-pt)}const Y=va(A,v,o,s);if(e.lineTo(Y.x,Y.y),w>0){const G=va(A,T,o,s);e.arc(G.x,G.y,w,v-pt,T)}}else{e.moveTo(o,s);const R=Math.cos(T)*f+o,z=Math.sin(T)*f+s;e.lineTo(R,z);const W=Math.cos(I)*f+o,Y=Math.sin(I)*f+s;e.lineTo(W,Y)}e.closePath()}function Mq(e,t,r,n,i){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){Vc(e,t,r,n,l,i);for(let c=0;c<a;++c)e.fill();isNaN(s)||(l=o+(s%tt||tt))}return Vc(e,t,r,n,l,i),e.fill(),l}function jq(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){Vc(e,t,r,n,p,i);for(let g=0;g<a;++g)e.stroke();isNaN(s)||(p=o+(s%tt||tt))}m&&Cq(e,t,p),l.selfJoin&&p-o>=Re&&h===0&&u!=="miter"&&Pq(e,t,p),a||(Vc(e,t,r,n,p,i),e.stroke())}class Vg extends ai{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}=IE(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=ue(f,l-s),m=cs(a,s,l)&&s!==l,p=h>=tt||m,g=Bn(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>tt?Math.floor(n/tt):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(Re,n||0)),c=i*l;t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,Mq(t,this,c,a,o),jq(t,this,c,a,o),t.restore()}}function uP(e,t,r=t){e.lineCap=ue(r.borderCapStyle,t.borderCapStyle),e.setLineDash(ue(r.borderDash,t.borderDash)),e.lineDashOffset=ue(r.borderDashOffset,t.borderDashOffset),e.lineJoin=ue(r.borderJoinStyle,t.borderJoinStyle),e.lineWidth=ue(r.borderWidth,t.borderWidth),e.strokeStyle=ue(r.borderColor,t.borderColor)}function Dq(e,t,r){e.lineTo(r.x,r.y)}function Nq(e){return e.stepped?ZH:e.tension||e.cubicInterpolationMode==="monotone"?JH:Dq}function fP(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 Iq(e,t,r,n){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:c}=fP(i,r,n),u=Nq(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 Rq(e,t,r,n){const i=t.points,{count:a,start:o,ilen:s}=fP(i,r,n),{move:l=!0,reverse:c}=n||{};let u=0,f=0,d,h,m,p,g,v;const x=y=>(o+(c?s-y:y))%a,w=()=>{p!==g&&(e.lineTo(u,g),e.lineTo(u,p),e.lineTo(u,v))};for(l&&(h=i[x(0)],e.moveTo(h.x,h.y)),d=0;d<=s;++d){if(h=i[x(d)],h.skip)continue;const y=h.x,_=h.y,O=y|0;O===m?(_<p?p=_:_>g&&(g=_),u=(f*u+y)/++f):(w(),e.lineTo(y,_),m=O,f=0,p=g=_),v=_}w()}function hp(e){const t=e.options,r=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!r?Rq:Iq}function $q(e){return e.stepped?TU:e.tension||e.cubicInterpolationMode==="monotone"?MU:Si}function Lq(e,t,r,n){let i=t._path;i||(i=t._path=new Path2D,t.path(i,r,n)&&i.closePath()),uP(e,t.options),e.stroke(i)}function Bq(e,t,r,n){const{segments:i,options:a}=t,o=hp(t);for(const s of i)uP(e,a,s.style),e.beginPath(),o(e,t,s,{start:r,end:r+n-1})&&e.closePath(),e.stroke()}const Fq=typeof Path2D=="function";function zq(e,t,r,n){Fq&&!t.options.segment?Lq(e,t,r,n):Bq(e,t,r,n)}class Hg extends ai{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;_U(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=BU(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=RU(this,{property:r,start:i,end:i});if(!o.length)return;const s=[],l=$q(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 hp(this)(t,this,r,n)}path(t,r,n){const i=this.segments,a=hp(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(),zq(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function sw(e,t,r,n){const i=e.options,{[r]:a}=e.getProps([r],n);return Math.abs(t-a)<i.radius+i.hitRadius}class Ug extends ai{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 sw(this,t,"x",r)}inYRange(t,r){return sw(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||!us(this,r,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,up(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function dP(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 zn(e,t,r,n){return e?0:Nt(t,r,n)}function Wq(e,t,r){const n=e.options.borderWidth,i=e.borderSkipped,a=VE(n);return{t:zn(i.top,a.top,0,r),r:zn(i.right,a.right,0,t),b:zn(i.bottom,a.bottom,0,r),l:zn(i.left,a.left,0,t)}}function Vq(e,t,r){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=Sa(i),o=Math.min(t,r),s=e.borderSkipped,l=n||ve(i);return{topLeft:zn(!l||s.top||s.left,a.topLeft,0,o),topRight:zn(!l||s.top||s.right,a.topRight,0,o),bottomLeft:zn(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:zn(!l||s.bottom||s.right,a.bottomRight,0,o)}}function Hq(e){const t=dP(e),r=t.right-t.left,n=t.bottom-t.top,i=Wq(e,r/2,n/2),a=Vq(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 Qd(e,t,r,n){const i=t===null,a=r===null,s=e&&!(i&&a)&&dP(e,n);return s&&(i||Bn(t,s.left,s.right))&&(a||Bn(r,s.top,s.bottom))}function Uq(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Kq(e,t){e.rect(t.x,t.y,t.w,t.h)}function eh(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 Ws extends ai{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}=Hq(this),s=Uq(o.radius)?Fc:Kq;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,eh(o,r,a)),t.clip(),s(t,eh(a,-r,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),s(t,eh(a,r)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,r,n){return Qd(this,t,r,n)}inXRange(t,r){return Qd(this,t,null,r)}inYRange(t,r){return Qd(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 lw=(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)}},qq=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class cw extends ai{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=He(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=Ut(n.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=lw(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:x,itemHeight:w}=Yq(n,r,a,g,i);v>0&&h+w+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:x,height:w},d=Math.max(d,x),h+=w+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=Aa(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=Qt(n,this.left+i,this.right-this.lineWidths[s]);for(const c of r)s!==c.row&&(s=c.row,l=Qt(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=Qt(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of r)c.col!==s&&(s=c.col,l=Qt(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;Ng(t,this),this._draw(),Ig(t)}}_draw(){const{options:t,columnSizes:r,lineWidths:n,ctx:i}=this,{align:a,labels:o}=t,s=it.color,l=Aa(t.rtl,this.left,this.width),c=Ut(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}=lw(o,f),v=function(O,A,P){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;i.save();const T=ue(P.lineWidth,1);if(i.fillStyle=ue(P.fillStyle,s),i.lineCap=ue(P.lineCap,"butt"),i.lineDashOffset=ue(P.lineDashOffset,0),i.lineJoin=ue(P.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=ue(P.strokeStyle,s),i.setLineDash(ue(P.lineDash,[])),o.usePointStyle){const I={radius:p*Math.SQRT2/2,pointStyle:P.pointStyle,rotation:P.rotation,borderWidth:T},j=l.xPlus(O,m/2),S=A+d;WE(i,I,j,S,o.pointStyleWidth&&m)}else{const I=A+Math.max((f-p)/2,0),j=l.leftForLtr(O,m),S=Sa(P.borderRadius);i.beginPath(),Object.values(S).some(D=>D!==0)?Fc(i,{x:j,y:I,w:m,h:p,radius:S}):i.rect(j,I,m,p),i.fill(),T!==0&&i.stroke()}i.restore()},x=function(O,A,P){Bc(i,P.text,O,A+g/2,c,{strikethrough:P.hidden,textAlign:l.textAlign(P.textAlign)})},w=this.isHorizontal(),y=this._computeTitleHeight();w?h={x:Qt(a,this.left+u,this.right-n[0]),y:this.top+u+y,line:0}:h={x:this.left+u,y:Qt(a,this.top+y+u,this.bottom-r[0].height),line:0},GE(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((O,A)=>{i.strokeStyle=O.fontColor,i.fillStyle=O.fontColor;const P=i.measureText(O.text).width,T=l.textAlign(O.textAlign||(O.textAlign=o.textAlign)),I=m+d+P;let j=h.x,S=h.y;l.setWidth(this.width),w?A>0&&j+I+u>this.right&&(S=h.y+=_,h.line++,j=h.x=Qt(a,this.left+u,this.right-n[h.line])):A>0&&S+_>this.bottom&&(j=h.x=j+r[h.line].width+u,h.line++,S=h.y=Qt(a,this.top+y+u,this.bottom-r[h.line].height));const D=l.x(j);if(v(D,S,O),j=LH(T,j+m+d,w?j+I:this.right,t.rtl),x(l.x(j),S,O),w)h.x+=I+u;else if(typeof O.text!="string"){const M=c.lineHeight;h.y+=hP(O,M)+u}else h.y+=_}),XE(this.ctx,t.textDirection)}drawTitle(){const t=this.options,r=t.title,n=Ut(r.font),i=Mr(r.padding);if(!r.display)return;const a=Aa(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=Qt(t.align,f,this.right-d);else{const m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);u=c+Qt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const h=Qt(s,f,f+d);o.textAlign=a.textAlign(FE(s)),o.textBaseline="middle",o.strokeStyle=r.color,o.fillStyle=r.color,o.font=n.string,Bc(o,r.text,h,u,n)}_computeTitleHeight(){const t=this.options.title,r=Ut(t.font),n=Mr(t.padding);return t.display?r.lineHeight+n.height:0}_getLegendItemAt(t,r){let n,i,a;if(Bn(t,this.left,this.right)&&Bn(r,this.top,this.bottom)){for(a=this.legendHitBoxes,n=0;n<a.length;++n)if(i=a[n],Bn(t,i.left,i.left+i.width)&&Bn(r,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(t){const r=this.options;if(!Zq(t.type,r))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=qq(i,n);i&&!a&&He(r.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!a&&He(r.onHover,[t,n,this],this)}else n&&He(r.onClick,[t,n,this],this)}}function Yq(e,t,r,n,i){const a=Gq(n,e,t,r),o=Xq(i,n,t.lineHeight);return{itemWidth:a,itemHeight:o}}function Gq(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 Xq(e,t,r){let n=e;return typeof t.text!="string"&&(n=hP(t,r)),n}function hP(e,t){const r=e.text?e.text.length:0;return t*r}function Zq(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Dr={id:"legend",_element:cw,start(e,t,r){const n=e.legend=new cw({ctx:e.ctx,options:r,chart:e});Fn.configure(e,n,r),Fn.addBox(e,n)},stop(e){Fn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,r){const n=e.legend;Fn.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=Mr(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 Po={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=lp(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 zr(e,t){return t&&(xt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function cn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
234
|
+
*/class WU{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=LE.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 ln=new WU;const D1="transparent",VU={boolean(e,t,r){return r>.5?t:e},color(e,t,r){const n=_1(e||D1),i=n.valid&&_1(t||D1);return i&&i.valid?i.mix(n,r).hexString():t},number(e,t,r){return e+(t-e)*r}};class HU{constructor(t,r,n,i){const a=r[n];i=Al([t.to,i,a,t.from]);const o=Al([t.from,a,i]);this._active=!0,this._fn=t.fn||VU[t.type||typeof o],this._easing=Ro[t.easing]||Ro.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=Al([t.to,r,i,t.from]),this._from=Al([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 JE{constructor(t,r){this._chart=t,this._properties=new Map,this.configure(r)}configure(t){if(!ve(t))return;const r=Object.keys(it.animation),n=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const a=t[i];if(!ve(a))return;const o={};for(const s of r)o[s]=a[s];(xt(a.properties)&&a.properties||[i]).forEach(s=>{(s===i||!n.has(s))&&n.set(s,o)})})}_animateOptions(t,r){const n=r.options,i=KU(t,n);if(!i)return[];const a=this._createAnimations(i,n);return n.$shared&&UU(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 HU(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 ln.add(this._chart,n),!0}}function UU(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 KU(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 N1(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 qU(e,t,r){if(r===!1)return!1;const n=N1(e,r),i=N1(t,r);return{top:i.end,right:n.end,bottom:i.start,left:n.start}}function YU(e){let t,r,n,i;return ve(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 QE(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 I1(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],Ar(c)&&(a||t===0||Xr(t)===Xr(c))&&(t+=c)}return!u&&!n.all?0:t}function GU(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 Kd(e,t){const r=e&&e.options.stacked;return r||r===void 0&&t.stack!==void 0}function XU(e,t,r){return`${e.id}.${t.id}.${r.stack||r.type}`}function ZU(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 JU(e,t,r){const n=e[t]||(e[t]={});return n[r]||(n[r]={})}function R1(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 $1(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=XU(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]=JU(i,u,p),d[s]=g,d._top=R1(d,o,!0,n.type),d._bottom=R1(d,o,!1,n.type);const x=d._visualValues||(d._visualValues={});x[s]=g}}function qd(e,t){const r=e.scales;return Object.keys(r).filter(n=>r[n].axis===t).shift()}function QU(e,t){return ta(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function eK(e,t,r){return ta(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:r,index:t,mode:"default",type:"data"})}function mo(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 Yd=e=>e==="reset"||e==="none",L1=(e,t)=>t?e:Object.assign({},e),tK=(e,t,r)=>e&&!t.hidden&&t._stacked&&{keys:QE(r,!0),values:null};class Hu{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=Kd(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&&mo(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=ue(n.xAxisID,qd(t,"x")),o=r.yAxisID=ue(n.yAxisID,qd(t,"y")),s=r.rAxisID=ue(n.rAxisID,qd(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&&b1(this._data,this),t._stacked&&mo(t)}_dataCheck(){const t=this.getDataset(),r=t.data||(t.data=[]),n=this._data;if(ve(r)){const i=this._cachedMeta;this._data=GU(r,i)}else if(n!==r){if(n){b1(n,this);const i=this._cachedMeta;mo(i),i._parsed=[]}r&&Object.isExtensible(r)&&NH(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=Kd(r.vScale,r),r.stack!==n.stack&&(i=!0,mo(r),r.stack=n.stack),this._resyncElements(t),(i||a!==r._stacked)&&($1(this,r._parsed),r._stacked=Kd(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{xt(i[t])?d=this.parseArrayData(n,i,t,r):ve(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&&$1(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(qi(h,s),d),y:o.parse(qi(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:QE(i,!0),values:r._stacks[t.axis]._visualValues};return I1(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=I1(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=tK(r,n,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:f}=ZU(s);let d,h;function m(){h=i[d];const p=h[s.axis];return!Ar(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],Ar(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=YU(ue(this.options.clip,qU(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=eK(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=QU(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&&ss(n);if(s)return L1(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(it.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(L1(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 JE(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||Yd(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){Yd(i)?Object.assign(t,n):this._resolveAnimations(r,i).update(t,n)}updateSharedOptions(t,r,n){t&&!Yd(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&&mo(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 rK(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=$E(n.sort((i,a)=>i-a))}return e._cache.$bar}function nK(e){const t=e.iScale,r=rK(t,e.type);let n=t._length,i,a,o,s;const l=()=>{o===32767||o===-32768||(ss(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 iK(e,t,r,n){const i=r.barThickness;let a,o;return Ce(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 aK(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 oK(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 eP(e,t,r,n){return xt(e)?oK(e,t,r,n):t[r.axis]=r.parse(e,n),t}function B1(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(eP(d,f,a,c));return l}function Gd(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function sK(e,t,r){return e!==0?Xr(e):(t.isHorizontal()?1:-1)*(t.min>=r?1:-1)}function lK(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 cK(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}=lK(e);i==="middle"&&r&&(e.enableBorderRadius=!0,(r._top||0)===n?i=c:(r._bottom||0)===n?i=u:(a[F1(u,o,s,l)]=!0,i=c)),a[F1(i,o,s,l)]=!0,e.borderSkipped=a}function F1(e,t,r,n){return n?(e=uK(e,t,r),e=z1(e,r,t)):e=z1(e,t,r),e}function uK(e,t,r){return e===t?r:e===r?t:e}function z1(e,t,r){return e==="start"?t:e==="end"?r:e}function fK(e,{inflateAmount:t},r){e.inflateAmount=t==="auto"?r===1?.33:0:t}class dK extends Hu{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 B1(t,r,n,i)}parseArrayData(t,r,n,i){return B1(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(qi(p,c),d),f.push(eP(qi(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=Gd(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||Ce(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(h),g=this._calculateBarIndexPixels(h,u),v=(m._stacks||{})[s.axis],x={horizontal:c,base:p.base,enableBorderRadius:!v||Gd(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&&(x.options=f||this.resolveDataElementOptions(h,t[h].active?"active":i));const w=x.options||t[h].options;cK(x,w,v,o),fK(x,w,u.ratio),this.updateElement(t[h],h,x,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(Ce(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[ue(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||nK(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=Gd(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&&Xr(f)!==Xr(c.barEnd)&&(d=0),d+=f);const g=!Ce(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=sK(p,r,s)*o,f===s&&(v-=p/2);const x=r.getPixelForDecimal(0),w=r.getPixelForDecimal(1),y=Math.min(x,w),_=Math.max(x,w);v=Math.max(Math.min(v,_),y),m=v+p,n&&!u&&(l._stacks[r.axis]._visualValues[i]=r.getValueForPixel(m)-r.getValueForPixel(v))}if(v===r.getPixelForValue(s)){const x=Xr(p)*r.getLineWidthForValue(s)/2;v+=x,p-=x}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=ue(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"?aK(t,r,i,u*c):iK(t,r,i,u*c),d=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,h=this._getAxis().indexOf(ue(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 hK(e,t,r){let n=1,i=1,a=0,o=0;if(t<tt){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),f=Math.cos(l),d=Math.sin(l),h=(w,y,_)=>cs(w,s,l,!0)?1:Math.max(y,y*r,_,_*r),m=(w,y,_)=>cs(w,s,l,!0)?-1:Math.min(y,y*r,_,_*r),p=h(0,c,f),g=h(pt,u,d),v=m(Re,c,f),x=m(Re+pt,u,d);n=(p-v)/2,i=(g-x)/2,a=-(p+v)/2,o=-(g+x)/2}return{ratioX:n,ratioY:i,offsetX:a,offsetY:o}}class pK extends Hu{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(ve(n[t])){const{key:l="value"}=this._parsing;a=c=>+qi(n[c],l)}let o,s;for(o=t,s=t+r;o<s;++o)i._parsed[o]=a(o)}}_getRotation(){return vn(this.options.rotation-90)}_getCircumference(){return vn(this.options.circumference)}_getRotationExtents(){let t=tt,r=-tt;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(vH(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:f}=this._getRotationExtents(),{ratioX:d,ratioY:h,offsetX:m,offsetY:p}=hK(f,u,l),g=(n.width-o)/d,v=(n.height-o)/h,x=Math.max(Math.min(g,v)/2,0),w=jE(this.options.radius,x),y=Math.max(w*l,0),_=(w-y)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=p*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*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/tt)}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(),x;for(x=0;x<r;++x)v+=this._circumference(x,a);for(x=r;x<r+n;++x){const w=this._circumference(x,a),y=t[x],_={x:u+this.offsetX,y:f+this.offsetY,startAngle:v,endAngle:v+w,circumference:w,outerRadius:m,innerRadius:h};g&&(_.options=p||this.resolveDataElementOptions(x,y.active?"active":i)),v+=w,this.updateElement(y,x,_,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)?tt*(Math.abs(t)/r):0}getLabelAndValue(t){const r=this._cachedMeta,n=this.chart,i=n.data.labels||[],a=Dg(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(ue(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class mK extends Hu{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}=$H(r,i,o);this._drawStart=s,this._drawCount=l,LH(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=ls(m)?m:Number.POSITIVE_INFINITY,v=this.chart._animationsDisabled||a||i==="none",x=r+n,w=t.length;let y=r>0&&this.getParsed(r-1);for(let _=0;_<w;++_){const O=t[_],A=v?O:{};if(_<r||_>=x){A.skip=!0;continue}const P=this.getParsed(_),T=Ce(P[h]),I=A[d]=o.getPixelForValue(P[d],_),j=A[h]=a||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,P,l):P[h],_);A.skip=isNaN(I)||isNaN(j)||T,A.stop=_>0&&Math.abs(P[d]-y[d])>g,p&&(A.parsed=P,A.raw=c.data[_]),f&&(A.options=u||this.resolveDataElementOptions(_,O.active?"active":i)),v||this.updateElement(O,_,A,i),y=P}}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 yi(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class Wg{static override(t){Object.assign(Wg.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return yi()}parse(){return yi()}format(){return yi()}add(){return yi()}diff(){return yi()}startOf(){return yi()}endOf(){return yi()}}var gK={_date:Wg};function vK(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?jH:Ti;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=>!Ce(p[f.axis]));u.lo-=Math.max(0,h);const m=d.slice(u.hi).findIndex(p=>!Ce(p[f.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:a.length-1}}function Uu(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}=vK(a[s],t,o,i);for(let h=f;h<=d;++h){const m=u[h];m.skip||n(m,c,h)}}}function yK(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 Xd(e,t,r,n,i){const a=[];return!i&&!e.isPointInArea(t)||Uu(e,r,t,function(s,l,c){!i&&!us(s,e.chartArea,0)||s.inRange(t.x,t.y,n)&&a.push({element:s,datasetIndex:l,index:c})},!0),a}function bK(e,t,r,n){let i=[];function a(o,s,l){const{startAngle:c,endAngle:u}=o.getProps(["startAngle","endAngle"],n),{angle:f}=IE(o,{x:t.x,y:t.y});cs(f,c,u)&&i.push({element:o,datasetIndex:s,index:l})}return Uu(e,r,t,a),i}function xK(e,t,r,n,i,a){let o=[];const s=yK(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 Uu(e,r,t,c),o}function Zd(e,t,r,n,i,a){return!a&&!e.isPointInArea(t)?[]:r==="r"&&!n?bK(e,t,r,i):xK(e,t,r,n,i,a)}function W1(e,t,r,n,i){const a=[],o=r==="x"?"inXRange":"inYRange";let s=!1;return Uu(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 wK={modes:{index(e,t,r,n){const i=Oi(t,e),a=r.axis||"x",o=r.includeInvisible||!1,s=r.intersect?Xd(e,i,a,n,o):Zd(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=Oi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;let s=r.intersect?Xd(e,i,a,n,o):Zd(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=Oi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Xd(e,i,a,n,o)},nearest(e,t,r,n){const i=Oi(t,e),a=r.axis||"xy",o=r.includeInvisible||!1;return Zd(e,i,a,r.intersect,n,o)},x(e,t,r,n){const i=Oi(t,e);return W1(e,i,"x",r.intersect,n)},y(e,t,r,n){const i=Oi(t,e);return W1(e,i,"y",r.intersect,n)}}};const tP=["left","top","right","bottom"];function go(e,t){return e.filter(r=>r.pos===t)}function V1(e,t){return e.filter(r=>tP.indexOf(r.pos)===-1&&r.box.axis===t)}function vo(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 _K(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 OK(e){const t={};for(const r of e){const{stack:n,pos:i,stackWeight:a}=r;if(!n||!tP.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 SK(e,t){const r=OK(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 AK(e){const t=_K(e),r=vo(t.filter(c=>c.box.fullSize),!0),n=vo(go(t,"left"),!0),i=vo(go(t,"right")),a=vo(go(t,"top"),!0),o=vo(go(t,"bottom")),s=V1(t,"x"),l=V1(t,"y");return{fullSize:r,leftAndTop:n.concat(a),rightAndBottom:i.concat(l).concat(o).concat(s),chartArea:go(t,"chartArea"),vertical:n.concat(i).concat(l),horizontal:a.concat(o).concat(s)}}function H1(e,t,r,n){return Math.max(e[r],t[r])+Math.max(e[n],t[n])}function rP(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 EK(e,t,r,n){const{pos:i,box:a}=r,o=e.maxPadding;if(!ve(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&&rP(o,a.getPadding());const s=Math.max(0,t.outerWidth-H1(o,e,"left","right")),l=Math.max(0,t.outerHeight-H1(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 PK(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 CK(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 Eo(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,CK(s.horizontal,t));const{same:f,other:d}=EK(t,r,s,n);c|=f&&i.length,u=u||d,l.fullSize||i.push(s)}return c&&Eo(i,t,r,n)||u}function kl(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 U1(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;ss(c.start)&&(o=c.start),l.fullSize?kl(l,i.left,o,r.outerWidth-i.right-i.left,d):kl(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;ss(c.start)&&(a=c.start),l.fullSize?kl(l,a,i.top,d,r.outerHeight-i.bottom-i.top):kl(l,a,t.top+c.placed,d,f),c.start=a,c.placed+=f,a=l.right}}t.x=a,t.y=o}var Fn={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=Mr(e.options.layout.padding),a=Math.max(t-i.width,0),o=Math.max(r-i.height,0),s=AK(e.boxes),l=s.vertical,c=s.horizontal;Me(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);rP(d,Mr(n));const h=Object.assign({maxPadding:d,w:a,h:o,x:i.left,y:i.top},i),m=SK(l.concat(c),f);Eo(s.fullSize,h,f,m),Eo(l,h,f,m),Eo(c,h,f,m)&&Eo(l,h,f,m),PK(h),U1(s.leftAndTop,h,f,m),h.x+=h.w,h.y+=h.h,U1(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},Me(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 nP{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 kK extends nP{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const Hl="$chartjs",TK={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},K1=e=>e===null||e==="";function MK(e,t){const r=e.style,n=e.getAttribute("height"),i=e.getAttribute("width");if(e[Hl]={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",K1(i)){const a=k1(e,"width");a!==void 0&&(e.width=a)}if(K1(n))if(e.style.height==="")e.height=e.width/(t||2);else{const a=k1(e,"height");a!==void 0&&(e.height=a)}return e}const iP=PU?{passive:!0}:!1;function jK(e,t,r){e&&e.addEventListener(t,r,iP)}function DK(e,t,r){e&&e.canvas&&e.canvas.removeEventListener(t,r,iP)}function NK(e,t){const r=TK[e.type]||e.type,{x:n,y:i}=Oi(e,t);return{type:r,chart:t,native:e,x:n!==void 0?n:null,y:i!==void 0?i:null}}function Wc(e,t){for(const r of e)if(r===t||r.contains(t))return!0}function IK(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Wc(s.addedNodes,n),o=o&&!Wc(s.removedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}function RK(e,t,r){const n=e.canvas,i=new MutationObserver(a=>{let o=!1;for(const s of a)o=o||Wc(s.removedNodes,n),o=o&&!Wc(s.addedNodes,n);o&&r()});return i.observe(document,{childList:!0,subtree:!0}),i}const fs=new Map;let q1=0;function aP(){const e=window.devicePixelRatio;e!==q1&&(q1=e,fs.forEach((t,r)=>{r.currentDevicePixelRatio!==e&&t()}))}function $K(e,t){fs.size||window.addEventListener("resize",aP),fs.set(e,t)}function LK(e){fs.delete(e),fs.size||window.removeEventListener("resize",aP)}function BK(e,t,r){const n=e.canvas,i=n&&zg(n);if(!i)return;const a=BE((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),$K(e,a),o}function Jd(e,t,r){r&&r.disconnect(),t==="resize"&&LK(e)}function FK(e,t,r){const n=e.canvas,i=BE(a=>{e.ctx!==null&&r(NK(a,e))},e);return jK(n,t,i),i}class zK extends nP{acquireContext(t,r){const n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(MK(t,r),n):null}releaseContext(t){const r=t.canvas;if(!r[Hl])return!1;const n=r[Hl].initial;["height","width"].forEach(a=>{const o=n[a];Ce(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[Hl],!0}addEventListener(t,r,n){this.removeEventListener(t,r);const i=t.$proxies||(t.$proxies={}),o={attach:IK,detach:RK,resize:BK}[r]||FK;i[r]=o(t,r,n)}removeEventListener(t,r){const n=t.$proxies||(t.$proxies={}),i=n[r];if(!i)return;({attach:Jd,detach:Jd,resize:Jd}[r]||DK)(t,r,i),n[r]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,r,n,i){return EU(t,r,n,i)}isAttached(t){const r=t&&zg(t);return!!(r&&r.isConnected)}}function WK(e){return!Fg()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?kK:zK}let ai=class{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 ls(this.x)&&ls(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 VK(e,t){const r=e.options.ticks,n=HK(e),i=Math.min(r.maxTicksLimit||n,n),a=r.major.enabled?KK(t):[],o=a.length,s=a[0],l=a[o-1],c=[];if(o>i)return qK(t,c,a,o/i),c;const u=UK(a,t,i);if(o>0){let f,d;const h=o>1?Math.round((l-s)/(o-1)):null;for(Tl(t,c,u,Ce(h)?0:s-h,s),f=0,d=o-1;f<d;f++)Tl(t,c,u,a[f],a[f+1]);return Tl(t,c,u,l,Ce(h)?t.length:l+h),c}return Tl(t,c,u),c}function HK(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 UK(e,t,r){const n=YK(e),i=t.length/r;if(!n)return Math.max(i,1);const a=AH(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 KK(e){const t=[];let r,n;for(r=0,n=e.length;r<n;r++)e[r].major&&t.push(r);return t}function qK(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 Tl(e,t,r,n,i){const a=ue(n,0),o=Math.min(ue(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 YK(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 GK=e=>e==="left"?"right":e==="right"?"left":e,Y1=(e,t,r)=>t==="top"||t==="left"?e[t]+r:e[t]-r,G1=(e,t)=>Math.min(t||e,e);function X1(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 XK(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 ZK(e,t){Me(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 yo(e){return e.drawTicks?e.tickLength:0}function Z1(e,t){if(!e.display)return 0;const r=Ut(e.font,t),n=Mr(e.padding);return(xt(e.text)?e.text.length:1)*r.lineHeight+n.height}function JK(e,t){return ta(e,{scale:t,type:"scale"})}function QK(e,t,r){return ta(e,{tick:r,index:t,type:"tick"})}function eq(e,t,r){let n=FE(e);return(r&&t!=="right"||!r&&t==="right")&&(n=GK(n)),n}function tq(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=Qt(n,a,s),ve(r)){const v=Object.keys(r)[0],x=r[v];m=u[v].getPixelForValue(x)+p-t}else r==="center"?m=(c.bottom+c.top)/2+p-t:m=Y1(e,r,t);d=s-a}else{if(ve(r)){const v=Object.keys(r)[0],x=r[v];h=u[v].getPixelForValue(x)-g+t}else r==="center"?h=(c.left+c.right)/2-g+t:h=Y1(e,r,t);m=Qt(n,o,i),f=r==="left"?-pt:pt}return{titleX:h,titleY:m,maxWidth:d,rotation:f}}class Qa extends ai{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=Fr(t,Number.POSITIVE_INFINITY),r=Fr(r,Number.NEGATIVE_INFINITY),n=Fr(n,Number.POSITIVE_INFINITY),i=Fr(i,Number.NEGATIVE_INFINITY),{min:Fr(t,n),max:Fr(r,i),minDefined:Ar(t),maxDefined:Ar(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:Fr(r,Fr(n,r)),max:Fr(n,Fr(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(){He(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=iU(this,a,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?X1(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),o.display&&(o.autoSkip||o.source==="auto")&&(this.ticks=VK(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(){He(this.options.afterUpdate,[this])}beforeSetDimensions(){He(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(){He(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),He(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){He(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=He(r.callback,[a.value,n,t],this)}afterTickToLabelConversion(){He(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){He(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,r=t.ticks,n=G1(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=Nt(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-yo(t.grid)-r.padding-Z1(t.title,this.chart.options.font),c=Math.sqrt(f*f+d*d),o=kH(Math.min(Math.asin(Nt((u.highest.height+6)/s,-1,1)),Math.asin(Nt(l/c,-1,1))-Math.asin(Nt(d/c,-1,1)))),o=Math.max(i,Math.min(a,o))),this.labelRotation=o}afterCalculateLabelRotation(){He(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){He(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=Z1(i,r.options.font);if(s?(t.width=this.maxWidth,t.height=yo(a)+l):(t.height=this.maxHeight,t.width=yo(a)+l),n.display&&this.ticks.length){const{first:c,last:u,widest:f,highest:d}=this._getLabelSizes(),h=n.padding*2,m=vn(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(){He(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++)Ce(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=X1(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/G1(r,n));let c=0,u=0,f,d,h,m,p,g,v,x,w,y,_;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:[]},x=p.lineHeight,w=y=0,!Ce(m)&&!xt(m))w=S1(i,v.data,v.gc,w,m),y=x;else if(xt(m))for(d=0,h=m.length;d<h;++d)_=m[d],!Ce(_)&&!xt(_)&&(w=S1(i,v.data,v.gc,w,_),y+=x);o.push(w),s.push(y),c=Math.max(w,c),u=Math.max(y,u)}ZK(a,r);const O=o.indexOf(c),A=s.indexOf(u),P=T=>({width:o[T]||0,height:s[T]||0});return{first:P(0),last:P(r-1),widest:P(O),highest:P(A),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 MH(this._alignToPixels?vi(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=QK(this.getContext(),t,n))}return this.$context||(this.$context=JK(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,r=vn(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=yo(a),h=[],m=s.setContext(this.getContext()),p=m.display?m.width:0,g=p/2,v=function(z){return vi(n,z,p)};let x,w,y,_,O,A,P,T,I,j,S,D;if(o==="top")x=v(this.bottom),A=this.bottom-d,T=x-g,j=v(t.top)+g,D=t.bottom;else if(o==="bottom")x=v(this.top),j=t.top,D=v(t.bottom)-g,A=x+g,T=this.top+d;else if(o==="left")x=v(this.right),O=this.right-d,P=x-g,I=v(t.left)+g,S=t.right;else if(o==="right")x=v(this.left),I=t.left,S=v(t.right)-g,O=x+g,P=this.left+d;else if(r==="x"){if(o==="center")x=v((t.top+t.bottom)/2+.5);else if(ve(o)){const z=Object.keys(o)[0],W=o[z];x=v(this.chart.scales[z].getPixelForValue(W))}j=t.top,D=t.bottom,A=x+g,T=A+d}else if(r==="y"){if(o==="center")x=v((t.left+t.right)/2);else if(ve(o)){const z=Object.keys(o)[0],W=o[z];x=v(this.chart.scales[z].getPixelForValue(W))}O=x-g,P=O-d,I=t.left,S=t.right}const M=ue(i.ticks.maxTicksLimit,f),R=Math.max(1,Math.ceil(f/M));for(w=0;w<f;w+=R){const z=this.getContext(w),W=a.setContext(z),Y=s.setContext(z),G=W.lineWidth,L=W.color,K=Y.dash||[],H=Y.dashOffset,ne=W.tickWidth,Q=W.tickColor,J=W.tickBorderDash||[],te=W.tickBorderDashOffset;y=XK(this,w,l),y!==void 0&&(_=vi(n,y,G),c?O=P=I=S=_:A=T=j=D=_,h.push({tx1:O,ty1:A,tx2:P,ty2:T,x1:I,y1:j,x2:S,y2:D,width:G,color:L,borderDash:K,borderDashOffset:H,tickWidth:ne,tickColor:Q,tickBorderDash:J,tickBorderDashOffset:te}))}return this._ticksLength=f,this._borderValue=x,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=yo(n.grid),h=d+u,m=f?-u:h,p=-vn(this.labelRotation),g=[];let v,x,w,y,_,O,A,P,T,I,j,S,D="middle";if(i==="top")O=this.bottom-m,A=this._getXAxisLabelAlignment();else if(i==="bottom")O=this.top+m,A=this._getXAxisLabelAlignment();else if(i==="left"){const R=this._getYAxisLabelAlignment(d);A=R.textAlign,_=R.x}else if(i==="right"){const R=this._getYAxisLabelAlignment(d);A=R.textAlign,_=R.x}else if(r==="x"){if(i==="center")O=(t.top+t.bottom)/2+h;else if(ve(i)){const R=Object.keys(i)[0],z=i[R];O=this.chart.scales[R].getPixelForValue(z)+h}A=this._getXAxisLabelAlignment()}else if(r==="y"){if(i==="center")_=(t.left+t.right)/2-h;else if(ve(i)){const R=Object.keys(i)[0],z=i[R];_=this.chart.scales[R].getPixelForValue(z)}A=this._getYAxisLabelAlignment(d).textAlign}r==="y"&&(l==="start"?D="top":l==="end"&&(D="bottom"));const M=this._getLabelSizes();for(v=0,x=s.length;v<x;++v){w=s[v],y=w.label;const R=a.setContext(this.getContext(v));P=this.getPixelForTick(v)+a.labelOffset,T=this._resolveTickFontOptions(v),I=T.lineHeight,j=xt(y)?y.length:1;const z=j/2,W=R.color,Y=R.textStrokeColor,G=R.textStrokeWidth;let L=A;o?(_=P,A==="inner"&&(v===x-1?L=this.options.reverse?"left":"right":v===0?L=this.options.reverse?"right":"left":L="center"),i==="top"?c==="near"||p!==0?S=-j*I+I/2:c==="center"?S=-M.highest.height/2-z*I+I:S=-M.highest.height+I/2:c==="near"||p!==0?S=I/2:c==="center"?S=M.highest.height/2-z*I:S=M.highest.height-j*I,f&&(S*=-1),p!==0&&!R.showLabelBackdrop&&(_+=I/2*Math.sin(p))):(O=P,S=(1-j)*I/2);let K;if(R.showLabelBackdrop){const H=Mr(R.backdropPadding),ne=M.heights[v],Q=M.widths[v];let J=S-H.top,te=0-H.left;switch(D){case"middle":J-=ne/2;break;case"bottom":J-=ne;break}switch(A){case"center":te-=Q/2;break;case"right":te-=Q;break;case"inner":v===x-1?te-=Q:v>0&&(te-=Q/2);break}K={left:te,top:J,width:Q+H.width,height:ne+H.height,color:R.backdropColor}}g.push({label:y,font:T,textOffset:S,options:{rotation:p,color:W,strokeColor:Y,strokeWidth:G,textAlign:L,textBaseline:D,translation:[_,O],backdrop:K}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:r}=this.options;if(-vn(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=vi(t,this.left,o)-o/2,u=vi(t,this.right,s)+s/2,f=d=l):(f=vi(t,this.top,o)-o/2,d=vi(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&&Ng(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;Bc(n,c,0,u,l,s)}i&&Ig(n)}drawTitle(){const{ctx:t,options:{position:r,title:n,reverse:i}}=this;if(!n.display)return;const a=Ut(n.font),o=Mr(n.padding),s=n.align;let l=a.lineHeight/2;r==="bottom"||r==="center"||ve(r)?(l+=o.bottom,xt(n.text)&&(l+=a.lineHeight*(n.text.length-1))):l+=o.top;const{titleX:c,titleY:u,maxWidth:f,rotation:d}=tq(this,l,r,s);Bc(t,n.text,0,0,a,{color:n.color,maxWidth:f,rotation:d,textAlign:eq(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=ue(t.grid&&t.grid.z,-1),i=ue(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==Qa.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 Ut(r.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ml{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;iq(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,rq(t,o,n),this.override&&it.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 it[i]&&(delete it[i][n],this.override&&delete Yi[n])}}function rq(e,t,r){const n=os(Object.create(null),[r?it.get(r):{},it.get(t),e.defaults]);it.set(t,n),e.defaultRoutes&&nq(t,e.defaultRoutes),e.descriptors&&it.describe(t,e.descriptors)}function nq(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(".");it.route(a,i,l,s)})}function iq(e){return"id"in e&&"defaults"in e}class aq{constructor(){this.controllers=new Ml(Hu,"datasets",!0),this.elements=new Ml(ai,"elements"),this.plugins=new Ml(Object,"plugins"),this.scales=new Ml(Qa,"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):Me(i,o=>{const s=n||this._getRegistryForType(o);this._exec(t,s,o)})})}_exec(t,r,n){const i=Tg(t);He(n["before"+i],[],n),r[t](n),He(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 Wr=new aq;class oq{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(He(s,l,o)===!1&&i.cancelable)return!1}return!0}invalidate(){Ce(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=ue(n.options&&n.options.plugins,{}),a=sq(n);return i===!1&&!r?[]:cq(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 sq(e){const t={},r=[],n=Object.keys(Wr.plugins.items);for(let a=0;a<n.length;a++)r.push(Wr.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 lq(e,t){return!t&&e===!1?null:e===!0?{}:e}function cq(e,{plugins:t,localIds:r},n,i){const a=[],o=e.getContext();for(const s of t){const l=s.id,c=lq(n[l],i);c!==null&&a.push({plugin:s,options:uq(e.config,{plugin:s,local:r[l]},c,o)})}return a}function uq(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 fp(e,t){const r=it.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||r.indexAxis||"x"}function fq(e,t){let r=e;return e==="_index_"?r=t:e==="_value_"&&(r=t==="x"?"y":"x"),r}function dq(e,t){return e===t?"_index_":"_value_"}function J1(e){if(e==="x"||e==="y"||e==="r")return e}function hq(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function dp(e,...t){if(J1(e))return e;for(const r of t){const n=r.axis||hq(r.position)||e.length>1&&J1(e[0].toLowerCase());if(n)return n}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function Q1(e,t,r){if(r[t+"AxisID"]===e)return{axis:t}}function pq(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 Q1(e,"x",r[0])||Q1(e,"y",r[0])}return{}}function mq(e,t){const r=Yi[e.type]||{scales:{}},n=t.scales||{},i=fp(e.type,t),a=Object.create(null);return Object.keys(n).forEach(o=>{const s=n[o];if(!ve(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=dp(o,s,pq(o,e),it.scales[s.type]),c=dq(l,i),u=r.scales||{};a[o]=No(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(o=>{const s=o.type||e.type,l=o.indexAxis||fp(s,t),u=(Yi[s]||{}).scales||{};Object.keys(u).forEach(f=>{const d=fq(f,l),h=o[d+"AxisID"]||d;a[h]=a[h]||Object.create(null),No(a[h],[{axis:d},n[h],u[f]])})}),Object.keys(a).forEach(o=>{const s=a[o];No(s,[it.scales[s.type],it.scale])}),a}function oP(e){const t=e.options||(e.options={});t.plugins=ue(t.plugins,{}),t.scales=mq(e,t)}function sP(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function gq(e){return e=e||{},e.data=sP(e.data),oP(e),e}const ew=new Map,lP=new Set;function jl(e,t){let r=ew.get(e);return r||(r=t(),ew.set(e,r),lP.add(r)),r}const bo=(e,t,r)=>{const n=qi(t,r);n!==void 0&&e.add(n)};class vq{constructor(t){this._config=gq(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=sP(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(),oP(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return jl(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,r){return jl(`${t}.transition.${r}`,()=>[[`datasets.${t}.transitions.${r}`,`transitions.${r}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,r){return jl(`${t}-${r}`,()=>[[`datasets.${t}.elements.${r}`,`datasets.${t}`,`elements.${r}`,""]])}pluginScopeKeys(t){const r=t.id,n=this.type;return jl(`${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=>bo(l,t,f))),u.forEach(f=>bo(l,i,f)),u.forEach(f=>bo(l,Yi[a]||{},f)),u.forEach(f=>bo(l,it,f)),u.forEach(f=>bo(l,cp,f))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),lP.has(r)&&o.set(r,c),c}chartOptionScopes(){const{options:t,type:r}=this;return[t,Yi[r]||{},it.datasets[r]||{},{type:r},it,cp]}resolveNamedOptions(t,r,n,i=[""]){const a={$shared:!0},{resolver:o,subPrefixes:s}=tw(this._resolverCache,t,i);let l=o;if(bq(o,r)){a.$shared=!1,n=Zn(n)?n():n;const c=this.createResolver(t,n,s);l=Fa(o,n,c)}for(const c of r)a[c]=l[c];return a}createResolver(t,r,n=[""],i){const{resolver:a}=tw(this._resolverCache,t,n);return ve(r)?Fa(a,r,void 0,i):a}}function tw(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:$g(t,r),subPrefixes:r.filter(s=>!s.toLowerCase().includes("hover"))},n.set(i,a)),a}const yq=e=>ve(e)&&Object.getOwnPropertyNames(e).some(t=>Zn(e[t]));function bq(e,t){const{isScriptable:r,isIndexable:n}=HE(e);for(const i of t){const a=r(i),o=n(i),s=(o||a)&&e[i];if(a&&(Zn(s)||yq(s))||o&&xt(s))return!0}return!1}var xq="4.5.0";const wq=["top","bottom","left","right","chartArea"];function rw(e,t){return e==="top"||e==="bottom"||wq.indexOf(e)===-1&&t==="x"}function nw(e,t){return function(r,n){return r[e]===n[e]?r[t]-n[t]:r[e]-n[e]}}function iw(e){const t=e.chart,r=t.options.animation;t.notifyPlugins("afterRender"),He(r&&r.onComplete,[e],t)}function _q(e){const t=e.chart,r=t.options.animation;He(r&&r.onProgress,[e],t)}function cP(e){return Fg()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const Ul={},aw=e=>{const t=cP(e);return Object.values(Ul).filter(r=>r.canvas===t).pop()};function Oq(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 Sq(e,t,r,n){return!r||e.type==="mouseout"?null:n?t:e}let Xt=class{static defaults=it;static instances=Ul;static overrides=Yi;static registry=Wr;static version=xq;static getChart=aw;static register(...t){Wr.add(...t),ow()}static unregister(...t){Wr.remove(...t),ow()}constructor(t,r){const n=this.config=new vq(r),i=cP(t),a=aw(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||WK(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=gH(),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 oq,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=IH(f=>this.update(f),o.resizeDelay||0),this._dataChanges=[],Ul[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}ln.listen(this,"complete",iw),ln.listen(this,"progress",_q),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:r},width:n,height:i,_aspectRatio:a}=this;return Ce(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 Wr}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():C1(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return A1(this.canvas,this.ctx),this}stop(){return ln.stop(this),this}resize(t,r){ln.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,C1(this,s,!0)&&(this.notifyPlugins("resize",{size:o}),He(n.onResize,[this,o],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const r=this.options.scales||{};Me(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=dp(o,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Me(a,o=>{const s=o.options,l=s.id,c=dp(l,s),u=ue(s.type,o.dtype);(s.position===void 0||rw(s.position,c)!==rw(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=Wr.getScale(u);f=new d({id:l,type:u,ctx:this.ctx,chart:this}),n[f.id]=f}f.init(s,t)}),Me(i,(o,s)=>{o||delete n[s]}),Me(n,o=>{Fn.configure(this,o,o.options),Fn.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(nw("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||fp(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=Wr.getController(s),{datasetElementType:c,dataElementType:u}=it.datasets[s];Object.assign(l,{dataElementType:Wr.getElement(u),datasetElementType:c&&Wr.getElement(c)}),o.controller=new l(this,n),t.push(o.controller)}}return this._updateMetasets(),t}_resetElements(){Me(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||Me(a,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(nw("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Me(this.scales,t=>{Fn.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,r=new Set(Object.keys(this._listeners)),n=new Set(t.events);(!m1(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;Oq(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(!m1(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;Fn.update(this,this.width,this.height,t);const r=this.chartArea,n=r.width<=0||r.height<=0;this._layers=[],Me(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,Zn(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&&(ln.has(this)?this.attached&&!ln.running(this)&&ln.start(this):(this.draw(),iw({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=zU(this,t);this.notifyPlugins("beforeDatasetDraw",n)!==!1&&(i&&Ng(r,i),t.controller.draw(),i&&Ig(r),n.cancelable=!1,this.notifyPlugins("afterDatasetDraw",n))}isPointInArea(t){return us(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,r,n,i){const a=wK.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=ta(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);ss(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(),ln.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(),A1(t,r),this.platform.releaseContext(r),this.canvas=null,this.ctx=null),delete Ul[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)};Me(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(){Me(this._listeners,(t,r)=>{this.platform.removeEventListener(this,r,t)}),this._listeners={},Me(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}});!Rc(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=_H(t),c=Sq(t,this._lastEvent,n,l);n&&(this._lastEvent=null,He(a.onHover,[t,s,this],this),l&&He(a.onClick,[t,s,this],this));const u=!Rc(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 ow(){return Me(Xt.instances,e=>e._plugins.invalidate())}function Aq(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,kr(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,kr(n-r));e.arc(i,a,s+c/2,r-d/2,n+d/2,!0)}else{const d=Math.min(c/2,o*kr(n-r));if(u==="round")e.arc(i,a,d,r-Re/2,n+Re/2,!0);else if(u==="bevel"){const h=2*d*d,m=-h*Math.cos(r+Re/2)+i,p=-h*Math.sin(r+Re/2)+a,g=h*Math.cos(n+Re/2)+i,v=h*Math.sin(n+Re/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 Eq(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+pt,n-pt),e.closePath(),e.clip()}function Pq(e){return Rg(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Cq(e,t,r,n){const i=Pq(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 Nt(l,0,Math.min(a,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:Nt(i.innerStart,0,o),innerEnd:Nt(i.innerEnd,0,o)}}function ga(e,t,r,n){return{x:r+e*Math.cos(t),y:n+e*Math.sin(t)}}function Vc(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 R=u>0?u-n:0,z=f>0?f-n:0,W=(R+z)/2,Y=W!==0?m*W/(W+n):m;h=(m-Y)/2}const p=Math.max(.001,m*f-r/Re)/f,g=(m-p)/2,v=l+g+h,x=i-g-h,{outerStart:w,outerEnd:y,innerStart:_,innerEnd:O}=Cq(t,d,f,x-v),A=f-w,P=f-y,T=v+w/A,I=x-y/P,j=d+_,S=d+O,D=v+_/j,M=x-O/S;if(e.beginPath(),a){const R=(T+I)/2;if(e.arc(o,s,f,T,R),e.arc(o,s,f,R,I),y>0){const G=ga(P,I,o,s);e.arc(G.x,G.y,y,I,x+pt)}const z=ga(S,x,o,s);if(e.lineTo(z.x,z.y),O>0){const G=ga(S,M,o,s);e.arc(G.x,G.y,O,x+pt,M+Math.PI)}const W=(x-O/d+(v+_/d))/2;if(e.arc(o,s,d,x-O/d,W,!0),e.arc(o,s,d,W,v+_/d,!0),_>0){const G=ga(j,D,o,s);e.arc(G.x,G.y,_,D+Math.PI,v-pt)}const Y=ga(A,v,o,s);if(e.lineTo(Y.x,Y.y),w>0){const G=ga(A,T,o,s);e.arc(G.x,G.y,w,v-pt,T)}}else{e.moveTo(o,s);const R=Math.cos(T)*f+o,z=Math.sin(T)*f+s;e.lineTo(R,z);const W=Math.cos(I)*f+o,Y=Math.sin(I)*f+s;e.lineTo(W,Y)}e.closePath()}function kq(e,t,r,n,i){const{fullCircles:a,startAngle:o,circumference:s}=t;let l=t.endAngle;if(a){Vc(e,t,r,n,l,i);for(let c=0;c<a;++c)e.fill();isNaN(s)||(l=o+(s%tt||tt))}return Vc(e,t,r,n,l,i),e.fill(),l}function Tq(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){Vc(e,t,r,n,p,i);for(let g=0;g<a;++g)e.stroke();isNaN(s)||(p=o+(s%tt||tt))}m&&Eq(e,t,p),l.selfJoin&&p-o>=Re&&h===0&&u!=="miter"&&Aq(e,t,p),a||(Vc(e,t,r,n,p,i),e.stroke())}class Vg extends ai{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}=IE(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=ue(f,l-s),m=cs(a,s,l)&&s!==l,p=h>=tt||m,g=Bn(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>tt?Math.floor(n/tt):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(Re,n||0)),c=i*l;t.fillStyle=r.backgroundColor,t.strokeStyle=r.borderColor,kq(t,this,c,a,o),Tq(t,this,c,a,o),t.restore()}}function uP(e,t,r=t){e.lineCap=ue(r.borderCapStyle,t.borderCapStyle),e.setLineDash(ue(r.borderDash,t.borderDash)),e.lineDashOffset=ue(r.borderDashOffset,t.borderDashOffset),e.lineJoin=ue(r.borderJoinStyle,t.borderJoinStyle),e.lineWidth=ue(r.borderWidth,t.borderWidth),e.strokeStyle=ue(r.borderColor,t.borderColor)}function Mq(e,t,r){e.lineTo(r.x,r.y)}function jq(e){return e.stepped?GH:e.tension||e.cubicInterpolationMode==="monotone"?XH:Mq}function fP(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 Dq(e,t,r,n){const{points:i,options:a}=t,{count:o,start:s,loop:l,ilen:c}=fP(i,r,n),u=jq(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 Nq(e,t,r,n){const i=t.points,{count:a,start:o,ilen:s}=fP(i,r,n),{move:l=!0,reverse:c}=n||{};let u=0,f=0,d,h,m,p,g,v;const x=y=>(o+(c?s-y:y))%a,w=()=>{p!==g&&(e.lineTo(u,g),e.lineTo(u,p),e.lineTo(u,v))};for(l&&(h=i[x(0)],e.moveTo(h.x,h.y)),d=0;d<=s;++d){if(h=i[x(d)],h.skip)continue;const y=h.x,_=h.y,O=y|0;O===m?(_<p?p=_:_>g&&(g=_),u=(f*u+y)/++f):(w(),e.lineTo(y,_),m=O,f=0,p=g=_),v=_}w()}function hp(e){const t=e.options,r=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!r?Nq:Dq}function Iq(e){return e.stepped?CU:e.tension||e.cubicInterpolationMode==="monotone"?kU:Si}function Rq(e,t,r,n){let i=t._path;i||(i=t._path=new Path2D,t.path(i,r,n)&&i.closePath()),uP(e,t.options),e.stroke(i)}function $q(e,t,r,n){const{segments:i,options:a}=t,o=hp(t);for(const s of i)uP(e,a,s.style),e.beginPath(),o(e,t,s,{start:r,end:r+n-1})&&e.closePath(),e.stroke()}const Lq=typeof Path2D=="function";function Bq(e,t,r,n){Lq&&!t.options.segment?Rq(e,t,r,n):$q(e,t,r,n)}class Hg extends ai{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;xU(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=$U(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=NU(this,{property:r,start:i,end:i});if(!o.length)return;const s=[],l=Iq(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 hp(this)(t,this,r,n)}path(t,r,n){const i=this.segments,a=hp(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(),Bq(t,this,n,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function sw(e,t,r,n){const i=e.options,{[r]:a}=e.getProps([r],n);return Math.abs(t-a)<i.radius+i.hitRadius}class Ug extends ai{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 sw(this,t,"x",r)}inYRange(t,r){return sw(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||!us(this,r,this.size(n)/2)||(t.strokeStyle=n.borderColor,t.lineWidth=n.borderWidth,t.fillStyle=n.backgroundColor,up(t,n,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function dP(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 zn(e,t,r,n){return e?0:Nt(t,r,n)}function Fq(e,t,r){const n=e.options.borderWidth,i=e.borderSkipped,a=VE(n);return{t:zn(i.top,a.top,0,r),r:zn(i.right,a.right,0,t),b:zn(i.bottom,a.bottom,0,r),l:zn(i.left,a.left,0,t)}}function zq(e,t,r){const{enableBorderRadius:n}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,a=Sa(i),o=Math.min(t,r),s=e.borderSkipped,l=n||ve(i);return{topLeft:zn(!l||s.top||s.left,a.topLeft,0,o),topRight:zn(!l||s.top||s.right,a.topRight,0,o),bottomLeft:zn(!l||s.bottom||s.left,a.bottomLeft,0,o),bottomRight:zn(!l||s.bottom||s.right,a.bottomRight,0,o)}}function Wq(e){const t=dP(e),r=t.right-t.left,n=t.bottom-t.top,i=Fq(e,r/2,n/2),a=zq(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 Qd(e,t,r,n){const i=t===null,a=r===null,s=e&&!(i&&a)&&dP(e,n);return s&&(i||Bn(t,s.left,s.right))&&(a||Bn(r,s.top,s.bottom))}function Vq(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Hq(e,t){e.rect(t.x,t.y,t.w,t.h)}function eh(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 Ws extends ai{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}=Wq(this),s=Vq(o.radius)?Fc:Hq;t.save(),(o.w!==a.w||o.h!==a.h)&&(t.beginPath(),s(t,eh(o,r,a)),t.clip(),s(t,eh(a,-r,o)),t.fillStyle=n,t.fill("evenodd")),t.beginPath(),s(t,eh(a,r)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,r,n){return Qd(this,t,r,n)}inXRange(t,r){return Qd(this,t,null,r)}inYRange(t,r){return Qd(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 lw=(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)}},Uq=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class cw extends ai{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=He(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=Ut(n.font),a=i.size,o=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=lw(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:x,itemHeight:w}=Kq(n,r,a,g,i);v>0&&h+w+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:x,height:w},d=Math.max(d,x),h+=w+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=Aa(a,this.left,this.width);if(this.isHorizontal()){let s=0,l=Qt(n,this.left+i,this.right-this.lineWidths[s]);for(const c of r)s!==c.row&&(s=c.row,l=Qt(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=Qt(n,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of r)c.col!==s&&(s=c.col,l=Qt(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;Ng(t,this),this._draw(),Ig(t)}}_draw(){const{options:t,columnSizes:r,lineWidths:n,ctx:i}=this,{align:a,labels:o}=t,s=it.color,l=Aa(t.rtl,this.left,this.width),c=Ut(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}=lw(o,f),v=function(O,A,P){if(isNaN(m)||m<=0||isNaN(p)||p<0)return;i.save();const T=ue(P.lineWidth,1);if(i.fillStyle=ue(P.fillStyle,s),i.lineCap=ue(P.lineCap,"butt"),i.lineDashOffset=ue(P.lineDashOffset,0),i.lineJoin=ue(P.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=ue(P.strokeStyle,s),i.setLineDash(ue(P.lineDash,[])),o.usePointStyle){const I={radius:p*Math.SQRT2/2,pointStyle:P.pointStyle,rotation:P.rotation,borderWidth:T},j=l.xPlus(O,m/2),S=A+d;WE(i,I,j,S,o.pointStyleWidth&&m)}else{const I=A+Math.max((f-p)/2,0),j=l.leftForLtr(O,m),S=Sa(P.borderRadius);i.beginPath(),Object.values(S).some(D=>D!==0)?Fc(i,{x:j,y:I,w:m,h:p,radius:S}):i.rect(j,I,m,p),i.fill(),T!==0&&i.stroke()}i.restore()},x=function(O,A,P){Bc(i,P.text,O,A+g/2,c,{strikethrough:P.hidden,textAlign:l.textAlign(P.textAlign)})},w=this.isHorizontal(),y=this._computeTitleHeight();w?h={x:Qt(a,this.left+u,this.right-n[0]),y:this.top+u+y,line:0}:h={x:this.left+u,y:Qt(a,this.top+y+u,this.bottom-r[0].height),line:0},GE(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((O,A)=>{i.strokeStyle=O.fontColor,i.fillStyle=O.fontColor;const P=i.measureText(O.text).width,T=l.textAlign(O.textAlign||(O.textAlign=o.textAlign)),I=m+d+P;let j=h.x,S=h.y;l.setWidth(this.width),w?A>0&&j+I+u>this.right&&(S=h.y+=_,h.line++,j=h.x=Qt(a,this.left+u,this.right-n[h.line])):A>0&&S+_>this.bottom&&(j=h.x=j+r[h.line].width+u,h.line++,S=h.y=Qt(a,this.top+y+u,this.bottom-r[h.line].height));const D=l.x(j);if(v(D,S,O),j=RH(T,j+m+d,w?j+I:this.right,t.rtl),x(l.x(j),S,O),w)h.x+=I+u;else if(typeof O.text!="string"){const M=c.lineHeight;h.y+=hP(O,M)+u}else h.y+=_}),XE(this.ctx,t.textDirection)}drawTitle(){const t=this.options,r=t.title,n=Ut(r.font),i=Mr(r.padding);if(!r.display)return;const a=Aa(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=Qt(t.align,f,this.right-d);else{const m=this.columnSizes.reduce((p,g)=>Math.max(p,g.height),0);u=c+Qt(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const h=Qt(s,f,f+d);o.textAlign=a.textAlign(FE(s)),o.textBaseline="middle",o.strokeStyle=r.color,o.fillStyle=r.color,o.font=n.string,Bc(o,r.text,h,u,n)}_computeTitleHeight(){const t=this.options.title,r=Ut(t.font),n=Mr(t.padding);return t.display?r.lineHeight+n.height:0}_getLegendItemAt(t,r){let n,i,a;if(Bn(t,this.left,this.right)&&Bn(r,this.top,this.bottom)){for(a=this.legendHitBoxes,n=0;n<a.length;++n)if(i=a[n],Bn(t,i.left,i.left+i.width)&&Bn(r,i.top,i.top+i.height))return this.legendItems[n]}return null}handleEvent(t){const r=this.options;if(!Gq(t.type,r))return;const n=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,a=Uq(i,n);i&&!a&&He(r.onLeave,[t,i,this],this),this._hoveredItem=n,n&&!a&&He(r.onHover,[t,n,this],this)}else n&&He(r.onClick,[t,n,this],this)}}function Kq(e,t,r,n,i){const a=qq(n,e,t,r),o=Yq(i,n,t.lineHeight);return{itemWidth:a,itemHeight:o}}function qq(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 Yq(e,t,r){let n=e;return typeof t.text!="string"&&(n=hP(t,r)),n}function hP(e,t){const r=e.text?e.text.length:0;return t*r}function Gq(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Dr={id:"legend",_element:cw,start(e,t,r){const n=e.legend=new cw({ctx:e.ctx,options:r,chart:e});Fn.configure(e,n,r),Fn.addBox(e,n)},stop(e){Fn.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,r){const n=e.legend;Fn.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=Mr(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 Po={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=lp(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 zr(e,t){return t&&(xt(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function cn(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
|
|
235
235
|
`)>-1?e.split(`
|
|
236
|
-
`):e}function Jq(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 uw(e,t){const r=e.chart.ctx,{body:n,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=Ut(t.bodyFont),c=Ut(t.titleFont),u=Ut(t.footerFont),f=a.length,d=i.length,h=n.length,m=Mr(t.padding);let p=m.height,g=0,v=n.reduce((y,_)=>y+_.before.length+_.lines.length+_.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(p+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const y=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=h*y+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}d&&(p+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let x=0;const w=function(y){g=Math.max(g,r.measureText(y).width+x)};return r.save(),r.font=c.string,Me(e.title,w),r.font=l.string,Me(e.beforeBody.concat(e.afterBody),w),x=t.displayColors?o+2+t.boxPadding:0,Me(n,y=>{Me(y.before,w),Me(y.lines,w),Me(y.after,w)}),x=0,r.font=u.string,Me(e.footer,w),r.restore(),g+=m.width,{width:g,height:p}}function Qq(e,t){const{y:r,height:n}=t;return r<n/2?"top":r>e.height-n/2?"bottom":"center"}function eY(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 tY(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"),eY(c,e,t,r)&&(c="center"),c}function fw(e,t,r){const n=r.yAlign||t.yAlign||Qq(e,r);return{xAlign:r.xAlign||t.xAlign||tY(e,t,r,n),yAlign:n}}function rY(e,t){let{x:r,width:n}=e;return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function nY(e,t,r){let{y:n,height:i}=e;return t==="top"?n+=r:t==="bottom"?n-=i+r:n-=i/2,n}function dw(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}=Sa(o);let m=rY(t,s);const p=nY(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:Nt(m,0,n.width-t.width),y:Nt(p,0,n.height-t.height)}}function Dl(e,t,r){const n=Mr(r.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function hw(e){return zr([],cn(e))}function iY(e,t,r){return ra(e,{tooltip:t,tooltipItems:r,type:"tooltip"})}function pw(e,t){const r=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return r?e.override(r):e}const pP={beforeTitle:sn,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:sn,beforeBody:sn,beforeLabel:sn,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 Ce(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:sn,afterBody:sn,beforeFooter:sn,footer:sn,afterFooter:sn};function Ft(e,t,r,n){const i=e[t].call(r,n);return typeof i>"u"?pP[t].call(r,n):i}class mw extends ai{static positioners=Po;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 JE(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=iY(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=zr(s,cn(i)),s=zr(s,cn(a)),s=zr(s,cn(o)),s}getBeforeBody(t,r){return hw(Ft(r.callbacks,"beforeBody",this,t))}getBody(t,r){const{callbacks:n}=r,i=[];return Me(t,a=>{const o={before:[],lines:[],after:[]},s=pw(n,a);zr(o.before,cn(Ft(s,"beforeLabel",this,a))),zr(o.lines,Ft(s,"label",this,a)),zr(o.after,cn(Ft(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,r){return hw(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=zr(s,cn(i)),s=zr(s,cn(a)),s=zr(s,cn(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(Jq(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))),Me(s,u=>{const f=pw(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=Po[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=uw(this,n),c=Object.assign({},s,l),u=fw(this.chart,n,c),f=dw(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}=Sa(s),{x:d,y:h}=t,{width:m,height:p}=r;let g,v,x,w,y,_;return a==="center"?(y=h+p/2,i==="left"?(g=d,v=g-o,w=y+o,_=y-o):(g=d+m,v=g+o,w=y-o,_=y+o),x=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"?(w=h,y=w-o,g=v-o,x=v+o):(w=h+p,y=w+o,g=v+o,x=v-o),_=w),{x1:g,x2:v,x3:x,y1:w,y2:y,y3:_}}drawTitle(t,r,n){const i=this.title,a=i.length;let o,s,l;if(a){const c=Aa(n.rtl,this.x,this.width);for(t.x=Dl(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",o=Ut(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=Ut(a.bodyFont),f=Dl(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,up(t,p,g,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,up(t,p,g,v)}else{t.lineWidth=ve(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=Sa(o.borderRadius);Object.values(v).some(x=>x!==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=Ut(n.bodyFont);let d=f.lineHeight,h=0;const m=Aa(n.rtl,this.x,this.width),p=function(P){r.fillText(P,m.x(t.x+h),t.y+d/2),t.y+=d+a},g=m.textAlign(o);let v,x,w,y,_,O,A;for(r.textAlign=o,r.textBaseline="middle",r.font=f.string,t.x=Dl(this,g,n),r.fillStyle=n.bodyColor,Me(this.beforeBody,p),h=s&&g!=="right"?o==="center"?c/2+u:c+2+u:0,y=0,O=i.length;y<O;++y){for(v=i[y],x=this.labelTextColors[y],r.fillStyle=x,Me(v.before,p),w=v.lines,s&&w.length&&(this._drawColorBox(r,t,y,m,n),d=Math.max(f.lineHeight,l)),_=0,A=w.length;_<A;++_)p(w[_]),d=f.lineHeight;Me(v.after,p)}h=0,d=f.lineHeight,Me(this.afterBody,p),t.y-=a}drawFooter(t,r,n){const i=this.footer,a=i.length;let o,s;if(a){const l=Aa(n.rtl,this.x,this.width);for(t.x=Dl(this,n.footerAlign,n),t.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",o=Ut(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}=Sa(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=Po[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=uw(this,t),l=Object.assign({},o,this._size),c=fw(r,t,l),u=dw(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=Mr(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),GE(t,r.textDirection),a.y+=o.top,this.drawTitle(a,t,r),this.drawBody(a,t,r),this.drawFooter(a,t,r),XE(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=!Rc(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||!Rc(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=Po[a.position].call(this,t,r);return o!==!1&&(n!==o.x||i!==o.y)}}var Nr={id:"tooltip",_element:mw,positioners:Po,afterInit(e,t,r){r&&(e.tooltip=new mw({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:pP},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 aY=(e,t,r,n)=>(typeof t=="string"?(r=e.push(t)-1,n.unshift({index:r,label:t})):isNaN(t)&&(r=null),r);function oY(e,t,r,n){const i=e.indexOf(t);if(i===-1)return aY(e,t,r,n);const a=e.lastIndexOf(t);return i!==a?r:i}const sY=(e,t)=>e===null?null:Nt(Math.round(e),0,t);function gw(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class oi extends Qa{static id="category";static defaults={ticks:{callback:gw}};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(Ce(t))return null;const n=this.getLabels();return r=isFinite(r)&&n[r]===t?r:oY(n,t,ue(r,t),this._addedLabels),sY(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 gw.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 lY(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=!Ce(o),x=!Ce(s),w=!Ce(c),y=(g-p)/(f+1);let _=v1((g-p)/m/h)*h,O,A,P,T;if(_<1e-14&&!v&&!x)return[{value:p},{value:g}];T=Math.ceil(g/_)-Math.floor(p/_),T>m&&(_=v1(T*_/m/h)*h),Ce(l)||(O=Math.pow(10,l),_=Math.ceil(_*O)/O),i==="ticks"?(A=Math.floor(p/_)*_,P=Math.ceil(g/_)*_):(A=p,P=g),v&&x&&a&&kH((s-o)/a,_/1e3)?(T=Math.round(Math.min((s-o)/_,u)),_=(s-o)/T,A=o,P=s):w?(A=v?o:A,P=x?s:P,T=c-1,_=(P-A)/T):(T=(P-A)/_,Io(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const I=Math.max(y1(_),y1(A));O=Math.pow(10,Ce(l)?I:l),A=Math.round(A*O)/O,P=Math.round(P*O)/O;let j=0;for(v&&(d&&A!==o?(r.push({value:o}),A<o&&j++,Io(Math.round((A+j*_)*O)/O,o,vw(o,y,e))&&j++):A<o&&j++);j<T;++j){const S=Math.round((A+j*_)*O)/O;if(x&&S>s)break;r.push({value:S})}return x&&d&&P!==s?r.length&&Io(r[r.length-1].value,s,vw(s,y,e))?r[r.length-1].value=s:r.push({value:s}):(!x||P===s)&&r.push({value:P}),r}function vw(e,t,{horizontal:r,minRotation:n}){const i=vn(n),a=(r?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class cY extends Qa{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 Ce(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=Xr(i),c=Xr(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=lY(i,a);return t.bounds==="ticks"&&TH(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 Dg(t,this.chart.options.locale,this.options.ticks.format)}}class si extends cY{static id="linear";static defaults={ticks:{callback:zE.formatters.numeric}};determineDataLimits(){const{min:t,max:r}=this.getMinMax(!0);this.min=Ar(t)?t:0,this.max=Ar(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),r=t?this.width:this.height,n=vn(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 Ku={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}},Vt=Object.keys(Ku);function yw(e,t){return e-t}function bw(e,t){if(Ce(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)),Ar(o)||(o=typeof n=="string"?r.parse(o,n):r.parse(o)),o===null?null:(i&&(o=i==="week"&&(ls(a)||a===!0)?r.startOf(o,"isoWeek",a):r.startOf(o,i)),+o)}function xw(e,t,r,n){const i=Vt.length;for(let a=Vt.indexOf(e);a<i-1;++a){const o=Ku[Vt[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((r-t)/(s*o.size))<=n)return Vt[a]}return Vt[i-1]}function uY(e,t,r,n,i){for(let a=Vt.length-1;a>=Vt.indexOf(r);a--){const o=Vt[a];if(Ku[o].common&&e._adapter.diff(i,n,o)>=t-1)return o}return Vt[r?Vt.indexOf(r):0]}function fY(e){for(let t=Vt.indexOf(e)+1,r=Vt.length;t<r;++t)if(Ku[Vt[t]].common)return Vt[t]}function ww(e,t,r){if(!r)e[t]=!0;else if(r.length){const{lo:n,hi:i}=Mg(r,t),a=r[n]>=t?r[n]:r[i];e[a]=!0}}function dY(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 _w(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:dY(e,n,i,r)}class Ow extends Qa{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 yK._date(t.adapters.date);i.init(r),No(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:bw(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=Ar(i)&&!isNaN(i)?i:+r.startOf(Date.now(),n),a=Ar(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=IH(i,a,o);return this._unit=r.unit||(n.autoSkip?xw(r.minUnit,this.min,this.max,this._getLabelCapacity(a)):uY(this,s.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:fY(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),_w(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=Nt(r,0,o),n=Nt(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||xw(a.minUnit,r,n,this._getLabelCapacity(r)),s=ue(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,c=ls(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++)ww(u,d,m);return(d===n||i.bounds==="ticks"||h===1)&&ww(u,d,m),Object.keys(u).sort(yw).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 He(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=vn(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,_w(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(bw(this,i[r]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return $E(t.sort(yw))}}function Nl(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}=Ti(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}=Ti(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 CG extends Ow{static id="timeseries";static defaults=Ow.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=Nl(r,this.min),this._tableRange=Nl(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(Nl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const r=this._offsets,n=this.getDecimalForPixel(t)/r.factor-r.end;return Nl(this._table,n*this._tableRange+this._minPos,!0)}}const mP="label";function Sw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function hY(e,t){const r=e.options;r&&t&&Object.assign(r,t)}function gP(e,t){e.labels=t}function vP(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mP;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 pY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mP;const r={labels:[],datasets:[]};return gP(r,e.labels),vP(r,e.datasets,t),r}function mY(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 Xt(h.current,{type:o,data:pY(s,a),options:l&&{...l},plugins:c}),Sw(t,m.current))},g=()=>{Sw(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&hY(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&gP(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&vP(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 gY=k.forwardRef(mY);function Kg(e,t){return Xt.register(t),k.forwardRef((r,n)=>k.createElement(gY,{...r,ref:n,type:e}))}const qg=Kg("line",vK),Vs=Kg("bar",pK),Yg=Kg("doughnut",gK);Xt.register(Vg,Nr,Dr);const vY={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()}},yY=({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 b.jsx(We,{title:"Unit Status",period:"This Month",icon:b.jsx(Op,{className:"h-6 w-6 text-green-600"}),className:"h-[238px]",children:b.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5 space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Sold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#1FA05B]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Unsold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#EF4444]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-[8px] items-center ",children:[r," ",b.jsx("div",{className:"text-[#64748B] text-[10px]",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[158px] w-[158px] ml-auto mr-2",children:b.jsx(Yg,{data:i,options:a,plugins:[vY]})})})]})})},Aw=({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 b.jsxs("div",{className:"flex flex-col items-start",children:[b.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:b.jsx("div",{className:`h-3 rounded-full ${r}`,style:{width:`${i}%`}})}),b.jsx("div",{className:`${a} !text-[12px] font-bold mt-1`,children:e}),b.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:n})]})},Ew=({title:e,value:t,suffix:r,valueClass:n=""})=>b.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:[b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),b.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${n}`,children:[t," ",r&&b.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:r})]})]}),bY=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:r=700,tenantCount:n=56,avgResidents:i=4.4,avgLeaseMonths:a=18})=>{const o=r+n;return b.jsxs("div",{children:[b.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[b.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[b.jsx(h_,{className:"h-6 w-6 text-[#329DFF]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),b.jsxs("div",{className:"flex items-center justify-between gap-",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),b.jsxs("div",{className:"flex items-end",children:[b.jsx(Aw,{value:r,total:o,colorClass:"bg-[#8B5CF6]",label:"Owner"}),b.jsx(Aw,{value:n,total:o,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),b.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[b.jsx(Ew,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),b.jsx(Ew,{title:"Avg Lease Period",value:a,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Xt.register(Vg,Nr,Dr);const xY={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()}},wY=({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 b.jsx(We,{title:"Resident Overview",icon:b.jsx(d_,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:b.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[n," ",b.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:b.jsx(Yg,{data:o,options:s,plugins:[xY]})})})]})})};Xt.register(oi,si,Ws,Nr,Dr);const _Y=({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 b.jsx(We,{title:"Block-wise Occupancy",period:b.jsx(_t,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:b.jsx(Vs,{data:a,options:o})})};Xt.register(oi,si,Ug,Hg,Nr,Dr);const OY=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}`},SY=({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=>OY(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 b.jsx(We,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:b.jsx(qg,{data:n,options:i})})};Xt.register(oi,si,Ug,Hg,Nr,Dr);const AY=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}`},yP=({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=>AY(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 b.jsx(qg,{data:n,options:i})};function Pw({label:e,value:t,positive:r,bgColor:n,delta:i,deltaLabel:a,textColor:o}){return b.jsxs("div",{className:`rounded-lg p-4 ${n} border border-[#EBEBEB] h-[126px]`,children:[b.jsx("div",{className:`text-[16px] leading-[20px] ${o}`,children:e}),b.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[b.jsx("div",{className:r?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),b.jsx("div",{className:"text-[#64748B] ",children:a})]})]})}function EY(){return b.jsxs(We,{title:"Accounting",className:"w-full h-[523px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(Pw,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),b.jsx(Pw,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),b.jsx("div",{className:"h-[254px] mt-[35.5px]",children:b.jsx(yP,{})})]})}Xt.register(oi,si,Ws,Nr,Dr);const PY=()=>{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 b.jsx(We,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(Vs,{data:n,options:i})})},CY=()=>{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 b.jsxs(We,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[b.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((n,i)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:n.title}),b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:n?.subtitle})]}),b.jsx("div",{className:"flex flex-col items-end",children:b.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:r(n.amount)})})]},i))}),b.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),b.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:r(t)})]})]})};Xt.register(oi,si,Ws,Nr,Dr);const kY=()=>{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 b.jsxs(We,{title:"Dues Ageing",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((a,o)=>b.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:b.jsxs("div",{className:"flex justify-between items-start",children:[b.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:a}),b.jsxs("div",{className:"text-right",children:[b.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[o]/1e3).toFixed(1),"K"]}),b.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[r[o]," Units"]})]})]})},a))}),b.jsx("div",{className:"h-[192px]",children:b.jsx(Vs,{data:n,options:i})})]})};Xt.register(Vg,Nr,Dr);const TY=()=>{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 b.jsxs(We,{title:"Expense Categories",className:"w-full h-[523px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[b.jsx(Yg,{data:r,options:i}),b.jsxs("div",{className:"absolute text-center",children:[b.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(n/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),b.jsx("div",{className:"space-y-2",children:e.map((a,o)=>b.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[b.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[b.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.datasets[0].backgroundColor[o]}}),a]}),b.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[o]/1e3).toFixed(0),"K"]})]},a))})]})},xo=[{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 MY(){const e=xo.reduce((t,r)=>t+r.value,0);return b.jsx(We,{title:"Asset Value Breakdown",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[b.jsx(ta,{width:"100%",height:"100%",children:b.jsxs(zu,{children:[b.jsx(Rs,{data:xo,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:xo.map((t,r)=>b.jsx(Qr,{fill:t.color},`cell-${r}`))}),b.jsx(ea,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),b.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[b.jsx("div",{className:"flex flex-col gap-[8px]",children:xo.slice(0,3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),b.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:xo.slice(3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}Xt.register(oi,si,Ws,Nr,Dr);const jY=()=>{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 b.jsx(We,{title:"Revenue by Category",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(Vs,{data:n,options:i})})};function DY(e){return Le({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 NY(e){return Le({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 IY({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(We,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-slate-500",children:n})]})]})}function RY(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:f_,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:NY,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:DY,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:p_,iconColor:"text-[#DBB467]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(IY,{...t},r))})}const Il=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function $Y(){const t=Il.find(r=>r.name==="Completed")?.value||0;return b.jsx(We,{title:"Guard Patrols",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[b.jsx(ta,{width:"100%",height:"100%",children:b.jsxs(zu,{children:[b.jsx(Rs,{data:Il,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Il.map((r,n)=>b.jsx(Qr,{fill:r.color},`cell-${n}`))}),b.jsx(ea,{formatter:r=>r.toLocaleString()})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),b.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),b.jsx("div",{className:"flex flex-col gap-[8px] mt-3 w-full px-6 text-[14px]",children:Il.map(r=>b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.color}}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.name})]}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.value})]},r.name))})]})})}Xt.register(oi,si,Ug,Hg,Nr,Dr);const LY=()=>{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 b.jsx(We,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),children:b.jsx(qg,{data:t,options:r})})};function BY(){return b.jsx(We,{title:"Incident Reports",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[b.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),b.jsxs("div",{className:"mt-4 ",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:b.jsx("div",{className:"text-white !text-[12px] font-bold",children:"!"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000] bg-red-50",children:[b.jsx("div",{children:"4 - Danger"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:b.jsx(Fv,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] bg-yellow-50",children:[b.jsx("div",{children:"3 - High"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:b.jsx(Fv,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] bg-green-50",children:[b.jsx("div",{children:"1 - Low"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function FY(){return b.jsx(We,{title:"Staff Attendance",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center h-[76px] gap-[16px] mb-2",children:[b.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),b.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),b.jsxs("div",{className:"mt-[24px] ",children:[b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Security guards"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"12/12 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Housekeeping"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"7/8 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Maintenance"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"4/4 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Gardening"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"2/2 Present"})]})]})]})})}function zY(e){return Le({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 WY(e){return Le({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 VY(e){return Le({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 HY({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(We,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-slate-500",children:n})]})]})}function UY(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:h_,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:WY,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:VY,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:pM,iconColor:"text-[#36AB6C]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(HY,{...t},r))})}const KY=[{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 qY(){return b.jsx(We,{title:"Complaints",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),className:"h-[362px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:KY.map((e,t)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212]",children:e.title}),b.jsxs("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}Xt.register(oi,si,Ws,Nr,Dr);const YY=({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 b.jsx(We,{title:"Complaints by Level",className:"w-full h-[362px]",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),children:b.jsx(Vs,{data:a,options:o})})},GY=[{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 XY(){return b.jsx(We,{title:"Request Box",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),className:"h-[362px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:GY.map((e,t)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212]",children:e.title}),b.jsxs("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}function ZY(e){return Le({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 JY({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(We,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-slate-500",children:n})]})]})}function QY(){const e=[{title:"Open Complaints",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:f_,iconColor:"text-[#AB0000]"},{title:"Pending Requests",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:ZY,iconColor:"text-[#E7A015]"},{title:"Avg Response Time",value:"3h",delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:fM,iconColor:"text-[#1FA05B]"},{title:"Resolution Rate",value:"93%",delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:sM,iconColor:"text-[#329DFF]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(JY,{...t},r))})}function Cw({title:e,date:t,rsvp:r,utilisation:n,status:i}){return b.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),b.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})]}),b.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),b.jsxs("div",{className:"flex justify-between items-center mt-2",children:[b.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[r," RSVP"]}),b.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[n,"% utilisation"]})]}),b.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:b.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${n}%`}})})]})}function eG(){return b.jsx(We,{title:"Events Utilisation",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{children:[b.jsx(Cw,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),b.jsx(Cw,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Rl({label:e,value:t,subLabel:r,bgColor:n,textColor:i}){return b.jsxs("div",{className:`rounded-lg p-4 ${n} h-[124px]`,children:[b.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),b.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:r})]})}function tG(){return b.jsx(We,{title:"Notice Board Status",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(Rl,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),b.jsx(Rl,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),b.jsx(Rl,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),b.jsx(Rl,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function bP(e){return Le({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 rG({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(We,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function nG({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:bP,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return b.jsx("div",{className:"h-full",children:t.map((r,n)=>b.jsx(rG,{...r},n))})}function iG(e){return Le({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 aG({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(We,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function oG(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:bP,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:mM,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:zY,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:iG,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(aG,{...t},r))})}exports.Accounting=EY;exports.AssetValueBreakdown=MY;exports.BlockWiseOccupancy=_Y;exports.Budgets=PY;exports.Card=We;exports.CashBankBalance=CY;exports.Community=J7;exports.Complaints=qY;exports.ComplaintsByLevel=YY;exports.DuesAgeing=kY;exports.Engagement=Q7;exports.EngagementStatsGrid=oG;exports.EventsUtilisation=eG;exports.ExpenseCategories=TY;exports.Facilities=rV;exports.FinanceSummary=nV;exports.GateAndSecurityStatsGrid=UY;exports.GateUpdates=Y9;exports.GuardPatrols=$Y;exports.Header=dM;exports.Helpdesk=G9;exports.HelpdeskStatsGrid=QY;exports.HourlyTrafficFlow=LY;exports.IncidentReports=BY;exports.IncomeExpenditure=yP;exports.MainHeader=yM;exports.MoveInOutTrends=SY;exports.NoticeBoardStatus=tG;exports.OccupancyOverview=bY;exports.RequestBox=XY;exports.ResidentOverview=wY;exports.RevenuebyCategory=jY;exports.SingleStats=nG;exports.StaffAttendance=FY;exports.StatsGrid=RY;exports.UnitStatus=yY;
|
|
236
|
+
`):e}function Xq(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 uw(e,t){const r=e.chart.ctx,{body:n,footer:i,title:a}=e,{boxWidth:o,boxHeight:s}=t,l=Ut(t.bodyFont),c=Ut(t.titleFont),u=Ut(t.footerFont),f=a.length,d=i.length,h=n.length,m=Mr(t.padding);let p=m.height,g=0,v=n.reduce((y,_)=>y+_.before.length+_.lines.length+_.after.length,0);if(v+=e.beforeBody.length+e.afterBody.length,f&&(p+=f*c.lineHeight+(f-1)*t.titleSpacing+t.titleMarginBottom),v){const y=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;p+=h*y+(v-h)*l.lineHeight+(v-1)*t.bodySpacing}d&&(p+=t.footerMarginTop+d*u.lineHeight+(d-1)*t.footerSpacing);let x=0;const w=function(y){g=Math.max(g,r.measureText(y).width+x)};return r.save(),r.font=c.string,Me(e.title,w),r.font=l.string,Me(e.beforeBody.concat(e.afterBody),w),x=t.displayColors?o+2+t.boxPadding:0,Me(n,y=>{Me(y.before,w),Me(y.lines,w),Me(y.after,w)}),x=0,r.font=u.string,Me(e.footer,w),r.restore(),g+=m.width,{width:g,height:p}}function Zq(e,t){const{y:r,height:n}=t;return r<n/2?"top":r>e.height-n/2?"bottom":"center"}function Jq(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 Qq(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"),Jq(c,e,t,r)&&(c="center"),c}function fw(e,t,r){const n=r.yAlign||t.yAlign||Zq(e,r);return{xAlign:r.xAlign||t.xAlign||Qq(e,t,r,n),yAlign:n}}function eY(e,t){let{x:r,width:n}=e;return t==="right"?r-=n:t==="center"&&(r-=n/2),r}function tY(e,t,r){let{y:n,height:i}=e;return t==="top"?n+=r:t==="bottom"?n-=i+r:n-=i/2,n}function dw(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}=Sa(o);let m=eY(t,s);const p=tY(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:Nt(m,0,n.width-t.width),y:Nt(p,0,n.height-t.height)}}function Dl(e,t,r){const n=Mr(r.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-n.right:e.x+n.left}function hw(e){return zr([],cn(e))}function rY(e,t,r){return ta(e,{tooltip:t,tooltipItems:r,type:"tooltip"})}function pw(e,t){const r=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return r?e.override(r):e}const pP={beforeTitle:sn,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:sn,beforeBody:sn,beforeLabel:sn,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 Ce(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:sn,afterBody:sn,beforeFooter:sn,footer:sn,afterFooter:sn};function Ft(e,t,r,n){const i=e[t].call(r,n);return typeof i>"u"?pP[t].call(r,n):i}class mw extends ai{static positioners=Po;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 JE(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(a)),a}getContext(){return this.$context||(this.$context=rY(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=zr(s,cn(i)),s=zr(s,cn(a)),s=zr(s,cn(o)),s}getBeforeBody(t,r){return hw(Ft(r.callbacks,"beforeBody",this,t))}getBody(t,r){const{callbacks:n}=r,i=[];return Me(t,a=>{const o={before:[],lines:[],after:[]},s=pw(n,a);zr(o.before,cn(Ft(s,"beforeLabel",this,a))),zr(o.lines,Ft(s,"label",this,a)),zr(o.after,cn(Ft(s,"afterLabel",this,a))),i.push(o)}),i}getAfterBody(t,r){return hw(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=zr(s,cn(i)),s=zr(s,cn(a)),s=zr(s,cn(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(Xq(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))),Me(s,u=>{const f=pw(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=Po[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=uw(this,n),c=Object.assign({},s,l),u=fw(this.chart,n,c),f=dw(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}=Sa(s),{x:d,y:h}=t,{width:m,height:p}=r;let g,v,x,w,y,_;return a==="center"?(y=h+p/2,i==="left"?(g=d,v=g-o,w=y+o,_=y-o):(g=d+m,v=g+o,w=y-o,_=y+o),x=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"?(w=h,y=w-o,g=v-o,x=v+o):(w=h+p,y=w+o,g=v+o,x=v-o),_=w),{x1:g,x2:v,x3:x,y1:w,y2:y,y3:_}}drawTitle(t,r,n){const i=this.title,a=i.length;let o,s,l;if(a){const c=Aa(n.rtl,this.x,this.width);for(t.x=Dl(this,n.titleAlign,n),r.textAlign=c.textAlign(n.titleAlign),r.textBaseline="middle",o=Ut(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=Ut(a.bodyFont),f=Dl(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,up(t,p,g,v),t.strokeStyle=o.borderColor,t.fillStyle=o.backgroundColor,up(t,p,g,v)}else{t.lineWidth=ve(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=Sa(o.borderRadius);Object.values(v).some(x=>x!==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=Ut(n.bodyFont);let d=f.lineHeight,h=0;const m=Aa(n.rtl,this.x,this.width),p=function(P){r.fillText(P,m.x(t.x+h),t.y+d/2),t.y+=d+a},g=m.textAlign(o);let v,x,w,y,_,O,A;for(r.textAlign=o,r.textBaseline="middle",r.font=f.string,t.x=Dl(this,g,n),r.fillStyle=n.bodyColor,Me(this.beforeBody,p),h=s&&g!=="right"?o==="center"?c/2+u:c+2+u:0,y=0,O=i.length;y<O;++y){for(v=i[y],x=this.labelTextColors[y],r.fillStyle=x,Me(v.before,p),w=v.lines,s&&w.length&&(this._drawColorBox(r,t,y,m,n),d=Math.max(f.lineHeight,l)),_=0,A=w.length;_<A;++_)p(w[_]),d=f.lineHeight;Me(v.after,p)}h=0,d=f.lineHeight,Me(this.afterBody,p),t.y-=a}drawFooter(t,r,n){const i=this.footer,a=i.length;let o,s;if(a){const l=Aa(n.rtl,this.x,this.width);for(t.x=Dl(this,n.footerAlign,n),t.y+=n.footerMarginTop,r.textAlign=l.textAlign(n.footerAlign),r.textBaseline="middle",o=Ut(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}=Sa(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=Po[t.position].call(this,this._active,this._eventPosition);if(!o)return;const s=this._size=uw(this,t),l=Object.assign({},o,this._size),c=fw(r,t,l),u=dw(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=Mr(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),GE(t,r.textDirection),a.y+=o.top,this.drawTitle(a,t,r),this.drawBody(a,t,r),this.drawFooter(a,t,r),XE(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=!Rc(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||!Rc(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=Po[a.position].call(this,t,r);return o!==!1&&(n!==o.x||i!==o.y)}}var Nr={id:"tooltip",_element:mw,positioners:Po,afterInit(e,t,r){r&&(e.tooltip=new mw({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:pP},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 nY=(e,t,r,n)=>(typeof t=="string"?(r=e.push(t)-1,n.unshift({index:r,label:t})):isNaN(t)&&(r=null),r);function iY(e,t,r,n){const i=e.indexOf(t);if(i===-1)return nY(e,t,r,n);const a=e.lastIndexOf(t);return i!==a?r:i}const aY=(e,t)=>e===null?null:Nt(Math.round(e),0,t);function gw(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class oi extends Qa{static id="category";static defaults={ticks:{callback:gw}};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(Ce(t))return null;const n=this.getLabels();return r=isFinite(r)&&n[r]===t?r:iY(n,t,ue(r,t),this._addedLabels),aY(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 gw.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 oY(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=!Ce(o),x=!Ce(s),w=!Ce(c),y=(g-p)/(f+1);let _=v1((g-p)/m/h)*h,O,A,P,T;if(_<1e-14&&!v&&!x)return[{value:p},{value:g}];T=Math.ceil(g/_)-Math.floor(p/_),T>m&&(_=v1(T*_/m/h)*h),Ce(l)||(O=Math.pow(10,l),_=Math.ceil(_*O)/O),i==="ticks"?(A=Math.floor(p/_)*_,P=Math.ceil(g/_)*_):(A=p,P=g),v&&x&&a&&PH((s-o)/a,_/1e3)?(T=Math.round(Math.min((s-o)/_,u)),_=(s-o)/T,A=o,P=s):w?(A=v?o:A,P=x?s:P,T=c-1,_=(P-A)/T):(T=(P-A)/_,Io(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const I=Math.max(y1(_),y1(A));O=Math.pow(10,Ce(l)?I:l),A=Math.round(A*O)/O,P=Math.round(P*O)/O;let j=0;for(v&&(d&&A!==o?(r.push({value:o}),A<o&&j++,Io(Math.round((A+j*_)*O)/O,o,vw(o,y,e))&&j++):A<o&&j++);j<T;++j){const S=Math.round((A+j*_)*O)/O;if(x&&S>s)break;r.push({value:S})}return x&&d&&P!==s?r.length&&Io(r[r.length-1].value,s,vw(s,y,e))?r[r.length-1].value=s:r.push({value:s}):(!x||P===s)&&r.push({value:P}),r}function vw(e,t,{horizontal:r,minRotation:n}){const i=vn(n),a=(r?Math.sin(i):Math.cos(i))||.001,o=.75*t*(""+e).length;return Math.min(t/a,o)}class sY extends Qa{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 Ce(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=Xr(i),c=Xr(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=oY(i,a);return t.bounds==="ticks"&&CH(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 Dg(t,this.chart.options.locale,this.options.ticks.format)}}class si extends sY{static id="linear";static defaults={ticks:{callback:zE.formatters.numeric}};determineDataLimits(){const{min:t,max:r}=this.getMinMax(!0);this.min=Ar(t)?t:0,this.max=Ar(r)?r:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),r=t?this.width:this.height,n=vn(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 Ku={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}},Vt=Object.keys(Ku);function yw(e,t){return e-t}function bw(e,t){if(Ce(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)),Ar(o)||(o=typeof n=="string"?r.parse(o,n):r.parse(o)),o===null?null:(i&&(o=i==="week"&&(ls(a)||a===!0)?r.startOf(o,"isoWeek",a):r.startOf(o,i)),+o)}function xw(e,t,r,n){const i=Vt.length;for(let a=Vt.indexOf(e);a<i-1;++a){const o=Ku[Vt[a]],s=o.steps?o.steps:Number.MAX_SAFE_INTEGER;if(o.common&&Math.ceil((r-t)/(s*o.size))<=n)return Vt[a]}return Vt[i-1]}function lY(e,t,r,n,i){for(let a=Vt.length-1;a>=Vt.indexOf(r);a--){const o=Vt[a];if(Ku[o].common&&e._adapter.diff(i,n,o)>=t-1)return o}return Vt[r?Vt.indexOf(r):0]}function cY(e){for(let t=Vt.indexOf(e)+1,r=Vt.length;t<r;++t)if(Ku[Vt[t]].common)return Vt[t]}function ww(e,t,r){if(!r)e[t]=!0;else if(r.length){const{lo:n,hi:i}=Mg(r,t),a=r[n]>=t?r[n]:r[i];e[a]=!0}}function uY(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 _w(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:uY(e,n,i,r)}class Ow extends Qa{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 gK._date(t.adapters.date);i.init(r),No(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:bw(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=Ar(i)&&!isNaN(i)?i:+r.startOf(Date.now(),n),a=Ar(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=DH(i,a,o);return this._unit=r.unit||(n.autoSkip?xw(r.minUnit,this.min,this.max,this._getLabelCapacity(a)):lY(this,s.length,r.minUnit,this.min,this.max)),this._majorUnit=!n.major.enabled||this._unit==="year"?void 0:cY(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),_w(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=Nt(r,0,o),n=Nt(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||xw(a.minUnit,r,n,this._getLabelCapacity(r)),s=ue(i.ticks.stepSize,1),l=o==="week"?a.isoWeekday:!1,c=ls(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++)ww(u,d,m);return(d===n||i.bounds==="ticks"||h===1)&&ww(u,d,m),Object.keys(u).sort(yw).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 He(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=vn(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,_w(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(bw(this,i[r]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return $E(t.sort(yw))}}function Nl(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}=Ti(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}=Ti(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 EG extends Ow{static id="timeseries";static defaults=Ow.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=Nl(r,this.min),this._tableRange=Nl(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(Nl(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const r=this._offsets,n=this.getDecimalForPixel(t)/r.factor-r.end;return Nl(this._table,n*this._tableRange+this._minPos,!0)}}const mP="label";function Sw(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function fY(e,t){const r=e.options;r&&t&&Object.assign(r,t)}function gP(e,t){e.labels=t}function vP(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:mP;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 dY(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:mP;const r={labels:[],datasets:[]};return gP(r,e.labels),vP(r,e.datasets,t),r}function hY(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 Xt(h.current,{type:o,data:dY(s,a),options:l&&{...l},plugins:c}),Sw(t,m.current))},g=()=>{Sw(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&fY(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&gP(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&vP(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 pY=k.forwardRef(hY);function Kg(e,t){return Xt.register(t),k.forwardRef((r,n)=>k.createElement(pY,{...r,ref:n,type:e}))}const qg=Kg("line",mK),Vs=Kg("bar",dK),Yg=Kg("doughnut",pK);Xt.register(Vg,Nr,Dr);const mY={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()}},gY=({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 b.jsx(We,{title:"Unit Status",period:"This Month",icon:b.jsx(Op,{className:"h-6 w-6 text-green-600"}),className:"h-[238px]",children:b.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5 space-y-3",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Sold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#1FA05B]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] lending-[16px] text-[#64748B]",children:"Unsold"}),b.jsx("div",{className:"text-[28px] leading-[32px] text-[#EF4444]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-[8px] items-center ",children:[r," ",b.jsx("div",{className:"text-[#64748B] text-[10px]",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[158px] w-[158px] ml-auto mr-2",children:b.jsx(Yg,{data:i,options:a,plugins:[mY]})})})]})})},Aw=({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 b.jsxs("div",{className:"flex flex-col items-start",children:[b.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:b.jsx("div",{className:`h-3 rounded-full ${r}`,style:{width:`${i}%`}})}),b.jsx("div",{className:`${a} !text-[12px] font-bold mt-1`,children:e}),b.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:n})]})},Ew=({title:e,value:t,suffix:r,valueClass:n=""})=>b.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:[b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),b.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${n}`,children:[t," ",r&&b.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:r})]})]}),vY=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:r=700,tenantCount:n=56,avgResidents:i=4.4,avgLeaseMonths:a=18})=>{const o=r+n;return b.jsxs("div",{children:[b.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[b.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[b.jsx(h_,{className:"h-6 w-6 text-[#329DFF]"}),b.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),b.jsxs("div",{className:"flex items-center justify-between gap-",children:[b.jsxs("div",{children:[b.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),b.jsxs("div",{className:"flex items-center gap-1",children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),b.jsxs("div",{className:"flex items-end",children:[b.jsx(Aw,{value:r,total:o,colorClass:"bg-[#8B5CF6]",label:"Owner"}),b.jsx(Aw,{value:n,total:o,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),b.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[b.jsx(Ew,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),b.jsx(Ew,{title:"Avg Lease Period",value:a,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};Xt.register(Vg,Nr,Dr);const yY={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()}},bY=({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 b.jsx(We,{title:"Resident Overview",icon:b.jsx(d_,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:b.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[b.jsxs("div",{className:"col-span-5",children:[b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),b.jsxs("div",{children:[b.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),b.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),b.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[n," ",b.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),b.jsx("div",{className:"col-span-7",children:b.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:b.jsx(Yg,{data:o,options:s,plugins:[yY]})})})]})})};Xt.register(oi,si,Ws,Nr,Dr);const xY=({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 b.jsx(We,{title:"Block-wise Occupancy",period:b.jsx(_t,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:b.jsx(Vs,{data:a,options:o})})};Xt.register(oi,si,Ug,Hg,Nr,Dr);const wY=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}`},_Y=({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=>wY(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 b.jsx(We,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:b.jsx(qg,{data:n,options:i})})};Xt.register(oi,si,Ug,Hg,Nr,Dr);const OY=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}`},yP=({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=>OY(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 b.jsx(qg,{data:n,options:i})};function Pw({label:e,value:t,positive:r,bgColor:n,delta:i,deltaLabel:a,textColor:o}){return b.jsxs("div",{className:`rounded-lg p-4 ${n} border border-[#EBEBEB] h-[126px]`,children:[b.jsx("div",{className:`text-[16px] leading-[20px] ${o}`,children:e}),b.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[b.jsx("div",{className:r?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),b.jsx("div",{className:"text-[#64748B] ",children:a})]})]})}function SY(){return b.jsxs(We,{title:"Accounting",className:"w-full h-[523px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(Pw,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),b.jsx(Pw,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),b.jsx("div",{className:"h-[254px] mt-[35.5px]",children:b.jsx(yP,{})})]})}Xt.register(oi,si,Ws,Nr,Dr);const AY=()=>{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 b.jsx(We,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(Vs,{data:n,options:i})})},EY=()=>{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 b.jsxs(We,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[b.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((n,i)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:n.title}),b.jsx("div",{className:"!text-[12px] text-[#64748B]",children:n?.subtitle})]}),b.jsx("div",{className:"flex flex-col items-end",children:b.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:r(n.amount)})})]},i))}),b.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[b.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),b.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:r(t)})]})]})};Xt.register(oi,si,Ws,Nr,Dr);const PY=()=>{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 b.jsxs(We,{title:"Dues Ageing",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((a,o)=>b.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:b.jsxs("div",{className:"flex justify-between items-start",children:[b.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:a}),b.jsxs("div",{className:"text-right",children:[b.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[o]/1e3).toFixed(1),"K"]}),b.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[r[o]," Units"]})]})]})},a))}),b.jsx("div",{className:"h-[192px]",children:b.jsx(Vs,{data:n,options:i})})]})};Xt.register(Vg,Nr,Dr);const CY=()=>{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 b.jsxs(We,{title:"Expense Categories",className:"w-full h-[523px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[b.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[b.jsx(Yg,{data:r,options:i}),b.jsxs("div",{className:"absolute text-center",children:[b.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(n/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),b.jsx("div",{className:"space-y-2",children:e.map((a,o)=>b.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[b.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[b.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.datasets[0].backgroundColor[o]}}),a]}),b.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[o]/1e3).toFixed(0),"K"]})]},a))})]})},xo=[{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 kY(){const e=xo.reduce((t,r)=>t+r.value,0);return b.jsx(We,{title:"Asset Value Breakdown",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[b.jsx(ea,{width:"100%",height:"100%",children:b.jsxs(zu,{children:[b.jsx(Rs,{data:xo,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:xo.map((t,r)=>b.jsx(Qr,{fill:t.color},`cell-${r}`))}),b.jsx(Qi,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),b.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),b.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[b.jsx("div",{className:"flex flex-col gap-[8px]",children:xo.slice(0,3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),b.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:xo.slice(3).map(t=>b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),b.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}Xt.register(oi,si,Ws,Nr,Dr);const TY=()=>{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 b.jsx(We,{title:"Revenue by Category",className:"w-full h-[362px]",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:b.jsx(Vs,{data:n,options:i})})};function MY(e){return Le({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 jY(e){return Le({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 DY({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(We,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-slate-500",children:n})]})]})}function NY(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:f_,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:jY,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:MY,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:p_,iconColor:"text-[#DBB467]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(DY,{...t},r))})}const Il=[{name:"Completed",value:46,color:"#12B981"},{name:"Delayed",value:2,color:"#EF4444"},{name:"Missed",value:2,color:"#F69E0A"}];function IY(){const t=Il.find(r=>r.name==="Completed")?.value||0;return b.jsx(We,{title:"Guard Patrols",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{className:"flex flex-col items-center justify-center",children:[b.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[b.jsx(ea,{width:"100%",height:"100%",children:b.jsxs(zu,{children:[b.jsx(Rs,{data:Il,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:Il.map((r,n)=>b.jsx(Qr,{fill:r.color},`cell-${n}`))}),b.jsx(Qi,{formatter:r=>r.toLocaleString()})]})}),b.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[b.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px] ",children:[t,"/",50]}),b.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),b.jsx("div",{className:"flex flex-col gap-[8px] mt-3 w-full px-6 text-[14px]",children:Il.map(r=>b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"inline-block w-[7px] h-[7px] rotate-45",style:{backgroundColor:r.color}}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.name})]}),b.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:r.value})]},r.name))})]})})}Xt.register(oi,si,Ug,Hg,Nr,Dr);const RY=()=>{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 b.jsx(We,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),children:b.jsx(qg,{data:t,options:r})})};function $Y(){return b.jsx(We,{title:"Incident Reports",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[b.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:"3"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:"5"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),b.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[b.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:"12"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),b.jsxs("div",{className:"mt-4 ",children:[b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#AB0000]",children:b.jsx("div",{className:"text-white !text-[12px] font-bold",children:"!"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 001"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#AB0000] bg-red-50",children:[b.jsx("div",{children:"4 - Danger"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#AB0000]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#E7A015]",children:b.jsx(Fv,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 002"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#E7A015] bg-yellow-50",children:[b.jsx("div",{children:"3 - High"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#E7A015]"})]})]}),b.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md border border-[#FAFBFD]",children:[b.jsxs("div",{className:"flex items-center gap-[8px]",children:[b.jsx("div",{className:"w-4 h-4 rounded-full flex items-center justify-center bg-[#1FA05B]",children:b.jsx(Fv,{className:"text-white text-[10px]"})}),b.jsx("div",{className:"text-gray-700 font-medium",children:"INC 003"})]}),b.jsxs("div",{className:"px-3 py-1 rounded-full !text-[12px] font-semibold flex items-center gap-[4px] text-[#1FA05B] bg-green-50",children:[b.jsx("div",{children:"1 - Low"}),b.jsx("div",{className:"w-2 h-2 rounded-full bg-[#1FA05B]"})]})]})]})]})})}function LY(){return b.jsx(We,{title:"Staff Attendance",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",children:b.jsxs("div",{children:[b.jsxs("div",{className:"flex w-full text-center h-[76px] gap-[16px] mb-2",children:[b.jsxs("div",{className:"flex-1 py-4 bg-green-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#1FA05B] pb-[8px]",children:"25"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Present"})]}),b.jsxs("div",{className:"flex-1 py-4 bg-red-50 rounded-md",children:[b.jsx("div",{className:"!text-[24px] leading-[18px] font-medium text-[#AB0000] pb-[8px]",children:"1"}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Absent"})]})]}),b.jsxs("div",{className:"mt-[24px] ",children:[b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Security guards"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"12/12 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Housekeeping"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"7/8 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Maintenance"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"4/4 Present"})]}),b.jsxs("div",{className:"flex justify-between items-center p-3 bg-[#FAFBFD] rounded-md",children:[b.jsx("div",{className:" font-medium !text-[12px] leading-[18px]",children:"Gardening"}),b.jsx("div",{className:"text-[#64748B] leading[20px] text-[14px]",children:"2/2 Present"})]})]})]})})}function BY(e){return Le({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 FY(e){return Le({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 zY(e){return Le({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 WY({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(We,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-slate-500",children:n})]})]})}function VY(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:h_,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:FY,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:zY,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:pM,iconColor:"text-[#36AB6C]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(WY,{...t},r))})}const HY=[{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 UY(){return b.jsx(We,{title:"Complaints",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),className:"h-[362px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:HY.map((e,t)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212]",children:e.title}),b.jsxs("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}Xt.register(oi,si,Ws,Nr,Dr);const KY=({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 b.jsx(We,{title:"Complaints by Level",className:"w-full h-[362px]",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),children:b.jsx(Vs,{data:a,options:o})})},qY=[{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 YY(){return b.jsx(We,{title:"Request Box",period:b.jsx(_t,{className:"text-[20px] text-[#884EA7]"}),className:"h-[362px]",children:b.jsx("div",{className:"flex flex-col gap-[12px]",children:qY.map((e,t)=>b.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[b.jsxs("div",{className:"flex flex-col",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212]",children:e.title}),b.jsxs("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",e.total]})]}),b.jsxs("div",{className:"flex flex-col items-end",children:[b.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(e.pending).padStart(2,"0")}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},t))})})}function GY(e){return Le({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 XY({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsxs(We,{title:e,icon:b.jsx("div",{className:"h-6 w-6 grid place-items-center",children:b.jsx(a,{className:`h-6 w-6 ${o}`})}),children:[b.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[b.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-slate-500",children:n})]})]})}function ZY(){const e=[{title:"Open Complaints",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:f_,iconColor:"text-[#AB0000]"},{title:"Pending Requests",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:GY,iconColor:"text-[#E7A015]"},{title:"Avg Response Time",value:"3h",delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:fM,iconColor:"text-[#1FA05B]"},{title:"Resolution Rate",value:"93%",delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:sM,iconColor:"text-[#329DFF]"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(XY,{...t},r))})}function Cw({title:e,date:t,rsvp:r,utilisation:n,status:i}){return b.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),b.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})]}),b.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),b.jsxs("div",{className:"flex justify-between items-center mt-2",children:[b.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[r," RSVP"]}),b.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[n,"% utilisation"]})]}),b.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:b.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${n}%`}})})]})}function JY(){return b.jsx(We,{title:"Events Utilisation",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{children:[b.jsx(Cw,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),b.jsx(Cw,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Rl({label:e,value:t,subLabel:r,bgColor:n,textColor:i}){return b.jsxs("div",{className:`rounded-lg p-4 ${n} h-[124px]`,children:[b.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),b.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),b.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:r})]})}function QY(){return b.jsx(We,{title:"Notice Board Status",period:b.jsx(_t,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:b.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[b.jsx(Rl,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),b.jsx(Rl,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),b.jsx(Rl,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),b.jsx(Rl,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function bP(e){return Le({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 eG({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(We,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function tG({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:bP,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return b.jsx("div",{className:"h-full",children:t.map((r,n)=>b.jsx(eG,{...r},n))})}function rG(e){return Le({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 nG({title:e,value:t,delta:r,deltaLabel:n,positive:i=!0,Icon:a=ms,iconColor:o="text-emerald-600",iconBg:s="bg-emerald-50"}){return b.jsx(We,{title:e,icon:b.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:b.jsx(a,{className:`h-4 w-4 ${o}`})}),className:"h-[132px]",children:b.jsxs("div",{children:[b.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),b.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[b.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:r}),b.jsx("div",{className:"text-[#64748B]",children:n})]})]})})}function iG(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:bP,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:mM,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:BY,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:rG,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return b.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,r)=>b.jsx(nG,{...t},r))})}exports.Accounting=SY;exports.AssetValueBreakdown=kY;exports.BlockWiseOccupancy=xY;exports.Budgets=AY;exports.Card=We;exports.CashBankBalance=EY;exports.Community=J7;exports.Complaints=UY;exports.ComplaintsByLevel=KY;exports.DuesAgeing=PY;exports.Engagement=Q7;exports.EngagementStatsGrid=iG;exports.EventsUtilisation=JY;exports.ExpenseCategories=CY;exports.Facilities=eV;exports.FinanceSummary=tV;exports.GateAndSecurityStatsGrid=VY;exports.GateUpdates=K9;exports.GuardPatrols=IY;exports.Header=dM;exports.Helpdesk=q9;exports.HelpdeskStatsGrid=ZY;exports.HourlyTrafficFlow=RY;exports.IncidentReports=$Y;exports.IncomeExpenditure=yP;exports.MainHeader=yM;exports.MoveInOutTrends=_Y;exports.NoticeBoardStatus=QY;exports.OccupancyOverview=vY;exports.RequestBox=YY;exports.ResidentOverview=bY;exports.RevenuebyCategory=TY;exports.SingleStats=tG;exports.StaffAttendance=LY;exports.StatsGrid=NY;exports.UnitStatus=gY;
|