anarock-widgets 1.0.191 → 1.0.193

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -18,7 +18,7 @@
18
18
  `+ae+F}}var U=!1,K;{var Z=typeof WeakMap=="function"?WeakMap:Map;K=new Z}function R(F,Q){if(!F||U)return"";{var se=K.get(F);if(se!==void 0)return se}var xe;U=!0;var $e=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var it;it=ie.current,ie.current=null,J();try{if(Q){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(zn){xe=zn}Reflect.construct(F,[],De)}else{try{De.call()}catch(zn){xe=zn}F.call(De.prototype)}}else{try{throw Error()}catch(zn){xe=zn}F()}}catch(zn){if(zn&&xe&&typeof zn.stack=="string"){for(var Pe=zn.stack.split(`
19
19
  `),Tn=xe.stack.split(`
20
20
  `),Tt=Pe.length-1,$t=Tn.length-1;Tt>=1&&$t>=0&&Pe[Tt]!==Tn[$t];)$t--;for(;Tt>=1&&$t>=0;Tt--,$t--)if(Pe[Tt]!==Tn[$t]){if(Tt!==1||$t!==1)do if(Tt--,$t--,$t<0||Pe[Tt]!==Tn[$t]){var _r=`
21
- `+Pe[Tt].replace(" at new "," at ");return F.displayName&&_r.includes("<anonymous>")&&(_r=_r.replace("<anonymous>",F.displayName)),typeof F=="function"&&K.set(F,_r),_r}while(Tt>=1&&$t>=0);break}}}finally{U=!1,ie.current=it,ee(),Error.prepareStackTrace=$e}var ds=F?F.displayName||F.name:"",ca=ds?ue(ds):"";return typeof F=="function"&&K.set(F,ca),ca}function ge(F,Q,se){return R(F,!1)}function te(F){var Q=F.prototype;return!!(Q&&Q.isReactComponent)}function ve(F,Q,se){if(F==null)return"";if(typeof F=="function")return R(F,te(F));if(typeof F=="string")return ue(F);switch(F){case c:return ue("Suspense");case u:return ue("SuspenseList")}if(typeof F=="object")switch(F.$$typeof){case l:return ge(F.render);case d:return ve(F.type,Q,se);case f:{var xe=F,$e=xe._payload,it=xe._init;try{return ve(it($e),Q,se)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,Fe={},st=b.ReactDebugCurrentFrame;function _t(F){if(F){var Q=F._owner,se=ve(F.type,F._source,Q?Q.type:null);st.setExtraStackFrame(se)}else st.setExtraStackFrame(null)}function ut(F,Q,se,xe,$e){{var it=Function.call.bind(we);for(var De in F)if(it(F,De)){var Pe=void 0;try{if(typeof F[De]!="function"){var Tn=Error((xe||"React class")+": "+se+" type `"+De+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof F[De]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Tn.name="Invariant Violation",Tn}Pe=F[De](Q,De,xe,se,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Tt){Pe=Tt}Pe&&!(Pe instanceof Error)&&(_t($e),S("%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).",xe||"React class",se,De,typeof Pe),_t(null)),Pe instanceof Error&&!(Pe.message in Fe)&&(Fe[Pe.message]=!0,_t($e),S("Failed %s type: %s",se,Pe.message),_t(null))}}}var Ye=Array.isArray;function At(F){return Ye(F)}function Ht(F){{var Q=typeof Symbol=="function"&&Symbol.toStringTag,se=Q&&F[Symbol.toStringTag]||F.constructor.name||"Object";return se}}function mt(F){try{return gn(F),!1}catch{return!0}}function gn(F){return""+F}function an(F){if(mt(F))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ht(F)),gn(F)}var vn=b.ReactCurrentOwner,Bn={key:!0,ref:!0,__self:!0,__source:!0},Qt,Wn;function ye(F){if(we.call(F,"ref")){var Q=Object.getOwnPropertyDescriptor(F,"ref").get;if(Q&&Q.isReactWarning)return!1}return F.ref!==void 0}function yn(F){if(we.call(F,"key")){var Q=Object.getOwnPropertyDescriptor(F,"key").get;if(Q&&Q.isReactWarning)return!1}return F.key!==void 0}function Zt(F,Q){typeof F.ref=="string"&&vn.current}function H(F,Q){{var se=function(){Qt||(Qt=!0,S("%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)",Q))};se.isReactWarning=!0,Object.defineProperty(F,"key",{get:se,configurable:!0})}}function le(F,Q){{var se=function(){Wn||(Wn=!0,S("%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)",Q))};se.isReactWarning=!0,Object.defineProperty(F,"ref",{get:se,configurable:!0})}}var G=function(F,Q,se,xe,$e,it,De){var Pe={$$typeof:t,type:F,key:Q,ref:se,props:De,_owner:it};return Pe._store={},Object.defineProperty(Pe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Pe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.defineProperty(Pe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:$e}),Object.freeze&&(Object.freeze(Pe.props),Object.freeze(Pe)),Pe};function de(F,Q,se,xe,$e){{var it,De={},Pe=null,Tn=null;se!==void 0&&(an(se),Pe=""+se),yn(Q)&&(an(Q.key),Pe=""+Q.key),ye(Q)&&(Tn=Q.ref,Zt(Q,$e));for(it in Q)we.call(Q,it)&&!Bn.hasOwnProperty(it)&&(De[it]=Q[it]);if(F&&F.defaultProps){var Tt=F.defaultProps;for(it in Tt)De[it]===void 0&&(De[it]=Tt[it])}if(Pe||Tn){var $t=typeof F=="function"?F.displayName||F.name||"Unknown":F;Pe&&H(De,$t),Tn&&le(De,$t)}return G(F,Pe,Tn,$e,xe,vn.current,De)}}var he=b.ReactCurrentOwner,rt=b.ReactDebugCurrentFrame;function gt(F){if(F){var Q=F._owner,se=ve(F.type,F._source,Q?Q.type:null);rt.setExtraStackFrame(se)}else rt.setExtraStackFrame(null)}var xr;xr=!1;function ko(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function wr(){{if(he.current){var F=N(he.current.type);if(F)return`
21
+ `+Pe[Tt].replace(" at new "," at ");return F.displayName&&_r.includes("<anonymous>")&&(_r=_r.replace("<anonymous>",F.displayName)),typeof F=="function"&&K.set(F,_r),_r}while(Tt>=1&&$t>=0);break}}}finally{U=!1,ie.current=it,ee(),Error.prepareStackTrace=$e}var ds=F?F.displayName||F.name:"",ca=ds?ue(ds):"";return typeof F=="function"&&K.set(F,ca),ca}function ge(F,Q,se){return R(F,!1)}function te(F){var Q=F.prototype;return!!(Q&&Q.isReactComponent)}function ve(F,Q,se){if(F==null)return"";if(typeof F=="function")return R(F,te(F));if(typeof F=="string")return ue(F);switch(F){case c:return ue("Suspense");case u:return ue("SuspenseList")}if(typeof F=="object")switch(F.$$typeof){case l:return ge(F.render);case d:return ve(F.type,Q,se);case f:{var xe=F,$e=xe._payload,it=xe._init;try{return ve(it($e),Q,se)}catch{}}}return""}var we=Object.prototype.hasOwnProperty,Fe={},st=b.ReactDebugCurrentFrame;function _t(F){if(F){var Q=F._owner,se=ve(F.type,F._source,Q?Q.type:null);st.setExtraStackFrame(se)}else st.setExtraStackFrame(null)}function ut(F,Q,se,xe,$e){{var it=Function.call.bind(we);for(var De in F)if(it(F,De)){var Pe=void 0;try{if(typeof F[De]!="function"){var Tn=Error((xe||"React class")+": "+se+" type `"+De+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof F[De]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Tn.name="Invariant Violation",Tn}Pe=F[De](Q,De,xe,se,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Tt){Pe=Tt}Pe&&!(Pe instanceof Error)&&(_t($e),S("%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).",xe||"React class",se,De,typeof Pe),_t(null)),Pe instanceof Error&&!(Pe.message in Fe)&&(Fe[Pe.message]=!0,_t($e),S("Failed %s type: %s",se,Pe.message),_t(null))}}}var Ye=Array.isArray;function At(F){return Ye(F)}function Yt(F){{var Q=typeof Symbol=="function"&&Symbol.toStringTag,se=Q&&F[Symbol.toStringTag]||F.constructor.name||"Object";return se}}function mt(F){try{return gn(F),!1}catch{return!0}}function gn(F){return""+F}function an(F){if(mt(F))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Yt(F)),gn(F)}var vn=b.ReactCurrentOwner,Bn={key:!0,ref:!0,__self:!0,__source:!0},Zt,Wn;function ye(F){if(we.call(F,"ref")){var Q=Object.getOwnPropertyDescriptor(F,"ref").get;if(Q&&Q.isReactWarning)return!1}return F.ref!==void 0}function yn(F){if(we.call(F,"key")){var Q=Object.getOwnPropertyDescriptor(F,"key").get;if(Q&&Q.isReactWarning)return!1}return F.key!==void 0}function Jt(F,Q){typeof F.ref=="string"&&vn.current}function H(F,Q){{var se=function(){Zt||(Zt=!0,S("%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)",Q))};se.isReactWarning=!0,Object.defineProperty(F,"key",{get:se,configurable:!0})}}function le(F,Q){{var se=function(){Wn||(Wn=!0,S("%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)",Q))};se.isReactWarning=!0,Object.defineProperty(F,"ref",{get:se,configurable:!0})}}var G=function(F,Q,se,xe,$e,it,De){var Pe={$$typeof:t,type:F,key:Q,ref:se,props:De,_owner:it};return Pe._store={},Object.defineProperty(Pe._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Pe,"_self",{configurable:!1,enumerable:!1,writable:!1,value:xe}),Object.defineProperty(Pe,"_source",{configurable:!1,enumerable:!1,writable:!1,value:$e}),Object.freeze&&(Object.freeze(Pe.props),Object.freeze(Pe)),Pe};function de(F,Q,se,xe,$e){{var it,De={},Pe=null,Tn=null;se!==void 0&&(an(se),Pe=""+se),yn(Q)&&(an(Q.key),Pe=""+Q.key),ye(Q)&&(Tn=Q.ref,Jt(Q,$e));for(it in Q)we.call(Q,it)&&!Bn.hasOwnProperty(it)&&(De[it]=Q[it]);if(F&&F.defaultProps){var Tt=F.defaultProps;for(it in Tt)De[it]===void 0&&(De[it]=Tt[it])}if(Pe||Tn){var $t=typeof F=="function"?F.displayName||F.name||"Unknown":F;Pe&&H(De,$t),Tn&&le(De,$t)}return G(F,Pe,Tn,$e,xe,vn.current,De)}}var he=b.ReactCurrentOwner,rt=b.ReactDebugCurrentFrame;function gt(F){if(F){var Q=F._owner,se=ve(F.type,F._source,Q?Q.type:null);rt.setExtraStackFrame(se)}else rt.setExtraStackFrame(null)}var xr;xr=!1;function ko(F){return typeof F=="object"&&F!==null&&F.$$typeof===t}function wr(){{if(he.current){var F=N(he.current.type);if(F)return`
22
22
 
23
23
  Check the render method of \``+F+"`."}return""}}function la(F){return""}var ji={};function ei(F){{var Q=wr();if(!Q){var se=typeof F=="string"?F:F.displayName||F.name;se&&(Q=`
24
24
 
@@ -124,7 +124,7 @@ To suppress this warning, you need to explicitly provide the \`palette.${t}Chann
124
124
  ${i?"bg-[#FBF5FF] text-[#884EA7]":"bg-white text-[#64748B] hover:bg-gray-50"}`,children:[v.jsx(r,{className:"h-[15px] w-[15px] font-bold"}),n.name]},n.name)})})}function P3(e){return Ze({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 k3(e){return Ze({attr:{viewBox:"0 0 576 512"},child:[{tag:"path",attr:{d:"M151.6 42.4C145.5 35.8 137 32 128 32s-17.5 3.8-23.6 10.4l-88 96c-11.9 13-11.1 33.3 2 45.2s33.3 11.1 45.2-2L96 146.3 96 448c0 17.7 14.3 32 32 32s32-14.3 32-32l0-301.7 32.4 35.4c11.9 13 32.2 13.9 45.2 2s13.9-32.2 2-45.2l-88-96zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l32 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-32 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-96 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-160 0zm0 128c-17.7 0-32 14.3-32 32s14.3 32 32 32l224 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-224 0z"},child:[]}]})(e)}function C3(e){return Ze({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 D3(e){return Ze({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 A3(e){return Ze({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)}const T3=({color:e})=>v.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),fu=({active:e,payload:t,coordinate:n})=>{if(!e||!t||!t.length)return null;const r=60,i=235;let o=n?.y||0;return o+r/2>i&&(o=i-r/2-8),o-r/2<0&&(o=r/2+8),v.jsxs("div",{className:"relative bg-[#121212] text-white text-[12px] px-4 py-2 rounded-lg shadow-lg",style:{transform:`translateY(${o}px) translateY(-50%)`},children:[v.jsx("div",{className:`absolute left-[-6px] top-1/2 -translate-y-1/2 w-0 h-0
125
125
  border-t-[6px] border-t-transparent
126
126
  border-b-[6px] border-b-transparent
127
- border-r-[6px] border-r-[#121212]`}),t.map((a,s)=>v.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[a.payload.color&&v.jsx(T3,{color:a.payload.color}),v.jsx("span",{className:"text-[#D1D3D4] min-w-[70px]",children:a?.payload?.name}),v.jsx("span",{className:"font-semibold",children:a.value})]},s))]})},xb=({value:e})=>{const t=typeof e=="string"?parseFloat(e.replace("%","")):e??0,n=t>=0;return v.jsxs("div",{className:`w-fit p-1 rounded text-[10px] leading-[14px] font-medium flex items-center gap-1 ${n?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:[n?v.jsx(D3,{}):v.jsx(C3,{}),Math.abs(t).toFixed(1),"%"]})},os=({title:e,icon:t,period:n,actionButtons:r,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,headingClassName:c,childrenClassName:u})=>{const d=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] flex flex-col ${a||"gap-[24px]"}`,children:[v.jsxs("div",{className:`flex items-center justify-between ${c}`,children:[v.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,v.jsx("div",{style:{fontWeight:d,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[r&&r,n&&v.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:n})]})]}),v.jsx("div",{className:`flex-1 min-h-0 ${u||"space-y-[24px]"}`,children:i}),o&&v.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:o})]})};function Qw(e,t){sessionStorage.setItem(e,t),(e==="community_id"||e==="export"||e==="widget_id")&&window.dispatchEvent(new StorageEvent("dashboard-update",{key:e}))}var ym={},bm={},Zw;function M3(){return Zw||(Zw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(bm)),bm}var xm={},Jw;function qC(){return Jw||(Jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(xm)),xm}var wm={},e_;function GC(){return e_||(e_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(wm)),wm}var _m={},t_;function wb(){return t_||(t_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){const r=[],i=n.length;if(i===0)return r;let o=0,a="",s="",l=!1;for(n.charCodeAt(0)===46&&(r.push(""),o++);o<i;){const c=n[o];s?c==="\\"&&o+1<i?(o++,a+=n[o]):c===s?s="":a+=c:l?c==='"'||c==="'"?s=c:c==="]"?(l=!1,r.push(a),a=""):a+=c:c==="["?(l=!0,a&&(r.push(a),a="")):c==="."?a&&(r.push(a),a=""):a+=c,o++}return a&&r.push(a),r}e.toPath=t})(_m)),_m}var n_;function _b(){return n_||(n_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M3(),n=qC(),r=GC(),i=wb();function o(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?n.isDeepKey(l)?o(s,i.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return a(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 a(s,l,c){if(l.length===0)return c;let u=s;for(let d=0;d<l.length;d++){if(u==null||t.isUnsafeProperty(l[d]))return c;u=u[l[d]]}return u===void 0?c:u}e.get=o})(ym)),ym}var Sm,r_;function N3(){return r_||(r_=1,Sm=_b().get),Sm}var j3=N3();const Ka=ho(j3);var tn=e=>e===0?0:e>0?1:-1,Cn=e=>typeof e=="number"&&e!=+e,Ta=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,pe=e=>(typeof e=="number"||e instanceof Number)&&!Cn(e),jr=e=>pe(e)||typeof e=="string",R3=0,Nc=e=>{var t=++R3;return"".concat(e||"").concat(t)},kn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!pe(t)&&typeof t!="string")return r;var o;if(Ta(t)){if(n==null)return r;var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Cn(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},XC=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1};function tt(e,t,n){return pe(e)&&pe(t)?e+n*(t-e):t}function QC(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Ka(r,t))===n)}var ht=e=>e===null||typeof e>"u",pu=e=>ht(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),I3=["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 Sb(e){if(typeof e!="string")return!1;var t=I3;return t.includes(e)}var L3=["viewBox","children"],i_=["points","pathLength"],Om={svg:L3,polygon:i_,polyline:i_},Ob=(e,t)=>{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 r={};return Object.keys(n).forEach(i=>{Sb(i)&&(r[i]=(o=>n[i](n,o)))}),r},F3=(e,t,n)=>r=>(e(t,n,r),null),hu=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];Sb(i)&&typeof o=="function"&&(r||(r={}),r[i]=F3(o,t,n))}),r},$3=["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 ZC(e){if(typeof e!="string")return!1;var t=$3;return t.includes(e)}function zr(e){var t=Object.entries(e).filter(n=>{var[r]=n;return ZC(r)});return Object.fromEntries(t)}var o_=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",a_=null,Em=null,JC=e=>{if(e===a_&&Array.isArray(Em))return Em;var t=[];return k.Children.forEach(e,n=>{ht(n)||(Ho.isFragment(n)?t=t.concat(JC(n.props.children)):t.push(n))}),Em=t,a_=e,t};function Eb(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>o_(i)):r=[o_(t)],JC(e).forEach(i=>{var o=Ka(i,"type.displayName")||Ka(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}var Jp=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,B3=(e,t,n,r)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var o=(i=r&&Om?.[r])!==null&&i!==void 0?i:[],a=t.startsWith("data-"),s=typeof e!="function"&&(!!r&&o.includes(t)||ZC(t)),l=!!n&&Sb(t);return a||s||l},ct=(e,t,n)=>{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 i={};return Object.keys(r).forEach(o=>{var a;B3((a=r)===null||a===void 0?void 0:a[o],o,t,n)&&(i[o]=r[o])}),i},W3=["children","width","height","viewBox","className","style","title","desc"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tv.apply(null,arguments)}function z3(e,t){if(e==null)return{};var n,r,i=V3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Pb=k.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:a,style:s,title:l,desc:c}=e,u=z3(e,W3),d=o||{width:r,height:i,x:0,y:0},f=oe("recharts-surface",a);return O.createElement("svg",Tv({},ct(u,!0,"svg"),{className:f,width:r,height:i,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),O.createElement("title",null,l),O.createElement("desc",null,c),n)}),H3=["children","className"];function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mv.apply(null,arguments)}function Y3(e,t){if(e==null)return{};var n,r,i=U3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function U3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ot=O.forwardRef((e,t)=>{var{children:n,className:r}=e,i=Y3(e,H3),o=oe("recharts-layer",r);return O.createElement("g",Mv({className:o},ct(i,!0),{ref:t}),n)}),eD=k.createContext(null),K3=()=>k.useContext(eD);function lt(e){return function(){return e}}const tD=Math.cos,Of=Math.sin,Zr=Math.sqrt,Ef=Math.PI,eh=2*Ef,Nv=Math.PI,jv=2*Nv,ba=1e-6,q3=jv-ba;function nD(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function G3(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nD;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class X3{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?nD:G3(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-t,c=i-n,u=a-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>ba)if(!(Math.abs(d*l-c*u)>ba)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,h=l*l+c*c,g=p*p+m*m,b=Math.sqrt(h),S=Math.sqrt(f),w=o*Math.tan((Nv-Math.acos((h+f-g)/(2*b*S)))/2),x=w/S,_=w/b;Math.abs(x-1)>ba&&this._append`L${t+x*u},${n+x*d}`,this._append`A${o},${o},0,0,${+(d*p>u*m)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,d=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>ba||Math.abs(this._y1-u)>ba)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%jv+jv),f>q3?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>ba&&this._append`A${r},${r},0,${+(f>=Nv)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function kb(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new X3(t)}function Cb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rD(e){this._context=e}rD.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 th(e){return new rD(e)}function iD(e){return e[0]}function oD(e){return e[1]}function aD(e,t){var n=lt(!0),r=null,i=th,o=null,a=kb(s);e=typeof e=="function"?e:e===void 0?iD:lt(e),t=typeof t=="function"?t:t===void 0?oD:lt(t);function s(l){var c,u=(l=Cb(l)).length,d,f=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:lt(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:lt(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:lt(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function ed(e,t,n){var r=null,i=lt(!0),o=null,a=th,s=null,l=kb(c);e=typeof e=="function"?e:e===void 0?iD:lt(+e),t=typeof t=="function"?t:lt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?oD:lt(+n);function c(d){var f,p,m,h=(d=Cb(d)).length,g,b=!1,S,w=new Array(h),x=new Array(h);for(o==null&&(s=a(S=l())),f=0;f<=h;++f){if(!(f<h&&i(g=d[f],f,d))===b)if(b=!b)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=f-1;m>=p;--m)s.point(w[m],x[m]);s.lineEnd(),s.areaEnd()}b&&(w[f]=+e(g,f,d),x[f]=+t(g,f,d),s.point(r?+r(g,f,d):w[f],n?+n(g,f,d):x[f]))}if(S)return s=null,S+""||null}function u(){return aD().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:lt(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:lt(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:lt(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:lt(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:lt(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:lt(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:lt(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class sD{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Q3(e){return new sD(e,!0)}function Z3(e){return new sD(e,!1)}const Db={draw(e,t){const n=Zr(t/Ef);e.moveTo(n,0),e.arc(0,0,n,0,eh)}},J3={draw(e,t){const n=Zr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},lD=Zr(1/3),e8=lD*2,t8={draw(e,t){const n=Zr(t/e8),r=n*lD;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},n8={draw(e,t){const n=Zr(t),r=-n/2;e.rect(r,r,n,n)}},r8=.8908130915292852,cD=Of(Ef/10)/Of(7*Ef/10),i8=Of(eh/10)*cD,o8=-tD(eh/10)*cD,a8={draw(e,t){const n=Zr(t*r8),r=i8*n,i=o8*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=eh*o/5,s=tD(a),l=Of(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Pm=Zr(3),s8={draw(e,t){const n=-Zr(t/(Pm*3));e.moveTo(0,n*2),e.lineTo(-Pm*n,-n),e.lineTo(Pm*n,-n),e.closePath()}},Sr=-.5,Or=Zr(3)/2,Rv=1/Zr(12),l8=(Rv/2+1)*3,c8={draw(e,t){const n=Zr(t/l8),r=n/2,i=n*Rv,o=r,a=n*Rv+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Sr*r-Or*i,Or*r+Sr*i),e.lineTo(Sr*o-Or*a,Or*o+Sr*a),e.lineTo(Sr*s-Or*l,Or*s+Sr*l),e.lineTo(Sr*r+Or*i,Sr*i-Or*r),e.lineTo(Sr*o+Or*a,Sr*a-Or*o),e.lineTo(Sr*s+Or*l,Sr*l-Or*s),e.closePath()}};function u8(e,t){let n=null,r=kb(i);e=typeof e=="function"?e:lt(e||Db),t=typeof t=="function"?t:lt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:lt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:lt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Pf(){}function kf(e,t,n){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+n)/6)}function uD(e){this._context=e}uD.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:kf(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:kf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function d8(e){return new uD(e)}function dD(e){this._context=e}dD.prototype={areaStart:Pf,areaEnd:Pf,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:kf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function f8(e){return new dD(e)}function fD(e){this._context=e}fD.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:kf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function p8(e){return new fD(e)}function pD(e){this._context=e}pD.prototype={areaStart:Pf,areaEnd:Pf,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 h8(e){return new pD(e)}function s_(e){return e<0?-1:1}function l_(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(s_(o)+s_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function c_(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function km(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Cf(e){this._context=e}Cf.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:km(this,this._t0,c_(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 n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,km(this,c_(this,n=l_(this,e,t)),n);break;default:km(this,this._t0,n=l_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function hD(e){this._context=new mD(e)}(hD.prototype=Object.create(Cf.prototype)).point=function(e,t){Cf.prototype.point.call(this,t,e)};function mD(e){this._context=e}mD.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function m8(e){return new Cf(e)}function g8(e){return new hD(e)}function gD(e){this._context=e}gD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=u_(e),i=u_(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===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 u_(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function v8(e){return new gD(e)}function nh(e,t){this._context=e,this._t=t}nh.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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function y8(e){return new nh(e,.5)}function b8(e){return new nh(e,0)}function x8(e){return new nh(e,1)}function Ks(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Iv(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function w8(e,t){return e[t]}function _8(e){const t=[];return t.key=e,t}function S8(){var e=lt([]),t=Iv,n=Ks,r=w8;function i(o){var a=Array.from(e.apply(this,arguments),_8),s,l=a.length,c=-1,u;for(const d of o)for(s=0,++c;s<l;++s)(a[s][c]=[0,+r(d,a[s].key,c,o)]).data=d;for(s=0,u=Cb(t(a));s<l;++s)a[u[s]].index=s;return n(a,u),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:lt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:lt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Iv:typeof o=="function"?o:lt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Ks,i):n},i}function O8(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Ks(e,t)}}function E8(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ks(e,t)}}function P8(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],d=u[r][1]||0,f=u[r-1][1]||0,p=(d-f)/2,m=0;m<s;++m){var h=e[t[m]],g=h[r][1]||0,b=h[r-1][1]||0;p+=g-b}l+=d,c+=p*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,Ks(e,t)}}var k8=["type","size","sizeType"];function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lv.apply(null,arguments)}function d_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function f_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d_(Object(n),!0).forEach(function(r){C8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C8(e,t,n){return(t=D8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D8(e){var t=A8(e,"string");return typeof t=="symbol"?t:t+""}function A8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T8(e,t){if(e==null)return{};var n,r,i=M8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function M8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var vD={symbolCircle:Db,symbolCross:J3,symbolDiamond:t8,symbolSquare:n8,symbolStar:a8,symbolTriangle:s8,symbolWye:c8},N8=Math.PI/180,j8=e=>{var t="symbol".concat(pu(e));return vD[t]||Db},R8=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*N8;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**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}},I8=(e,t)=>{vD["symbol".concat(pu(e))]=t},Ab=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=T8(e,k8),o=f_(f_({},i),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var f=j8(a),p=u8().type(f).size(R8(n,r,a));return p()},{className:l,cx:c,cy:u}=o,d=ct(o,!0);return c===+c&&u===+u&&n===+n?O.createElement("path",Lv({},d,{className:oe("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};Ab.registerSymbol=I8;function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fv.apply(null,arguments)}function p_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function L8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p_(Object(n),!0).forEach(function(r){Tb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tb(e,t,n){return(t=F8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F8(e){var t=$8(e,"string");return typeof t=="symbol"?t:t+""}function $8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Er=32;class Mb extends k.PureComponent{renderIcon(t,n){var{inactiveColor:r}=this.props,i=Er/2,o=Er/6,a=Er/3,s=t.inactive?r:t.color,l=n??t.type;if(l==="none")return null;if(l==="plainline")return O.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:Er,y2:i,className:"recharts-legend-icon"});if(l==="line")return O.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(i,"h").concat(a,`
127
+ border-r-[6px] border-r-[#121212]`}),t.map((a,s)=>v.jsxs("div",{className:"flex items-center gap-2 capitalize",children:[a.payload.color&&v.jsx(T3,{color:a.payload.color}),v.jsx("span",{className:"text-[#D1D3D4] min-w-[70px]",children:a?.payload?.name}),v.jsx("span",{className:"font-semibold",children:a.value})]},s))]})},xb=({value:e})=>{const t=typeof e=="string"?parseFloat(e.replace("%","")):e??0,n=t>=0;return v.jsxs("div",{className:`w-fit p-1 rounded text-[10px] leading-[14px] font-medium flex items-center gap-1 ${n?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:[n?v.jsx(D3,{}):v.jsx(C3,{}),Math.abs(t).toFixed(1),"%"]})},os=({title:e,icon:t,period:n,actionButtons:r,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,headingClassName:c,childrenClassName:u})=>{const d=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white !border-[0.5px] !border-[#EBEBEB] !rounded-[12px] !shadow-[0_0_12px_0_#EAF2FF] p-[16px] flex flex-col ${a||"gap-[24px]"}`,children:[v.jsxs("div",{className:`flex items-center justify-between ${c}`,children:[v.jsxs("div",{className:"flex items-center gap-[12px]",children:[t,v.jsx("div",{style:{fontWeight:d,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !text-[16px] !leading-[20px] !text-[#121212]",children:e})]}),v.jsxs("div",{className:"flex items-center gap-2",children:[r&&r,n&&v.jsx("div",{className:"!text-[12px] !leading-[16px] !text-[#64748B]",children:n})]})]}),v.jsx("div",{className:`flex-1 min-h-0 ${u||"space-y-[24px]"}`,children:i}),o&&v.jsx("div",{className:"mt-3 pt-3 border-t border-gray-100 !text-[12px] text-[#64748B]",children:o})]})};function Qw(e,t){sessionStorage.setItem(e,t),(e==="community_id"||e==="export"||e==="widget_id")&&window.dispatchEvent(new StorageEvent("dashboard-update",{key:e}))}var ym={},bm={},Zw;function M3(){return Zw||(Zw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==="__proto__"}e.isUnsafeProperty=t})(bm)),bm}var xm={},Jw;function qC(){return Jw||(Jw=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){switch(typeof n){case"number":case"symbol":return!1;case"string":return n.includes(".")||n.includes("[")||n.includes("]")}}e.isDeepKey=t})(xm)),xm}var wm={},e_;function GC(){return e_||(e_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="string"||typeof n=="symbol"?n:Object.is(n?.valueOf?.(),-0)?"-0":String(n)}e.toKey=t})(wm)),wm}var _m={},t_;function wb(){return t_||(t_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){const r=[],i=n.length;if(i===0)return r;let o=0,a="",s="",l=!1;for(n.charCodeAt(0)===46&&(r.push(""),o++);o<i;){const c=n[o];s?c==="\\"&&o+1<i?(o++,a+=n[o]):c===s?s="":a+=c:l?c==='"'||c==="'"?s=c:c==="]"?(l=!1,r.push(a),a=""):a+=c:c==="["?(l=!0,a&&(r.push(a),a="")):c==="."?a&&(r.push(a),a=""):a+=c,o++}return a&&r.push(a),r}e.toPath=t})(_m)),_m}var n_;function _b(){return n_||(n_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=M3(),n=qC(),r=GC(),i=wb();function o(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?n.isDeepKey(l)?o(s,i.toPath(l),c):c:u}case"number":case"symbol":{typeof l=="number"&&(l=r.toKey(l));const u=s[l];return u===void 0?c:u}default:{if(Array.isArray(l))return a(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 a(s,l,c){if(l.length===0)return c;let u=s;for(let d=0;d<l.length;d++){if(u==null||t.isUnsafeProperty(l[d]))return c;u=u[l[d]]}return u===void 0?c:u}e.get=o})(ym)),ym}var Sm,r_;function N3(){return r_||(r_=1,Sm=_b().get),Sm}var j3=N3();const Ka=ho(j3);var nn=e=>e===0?0:e>0?1:-1,Cn=e=>typeof e=="number"&&e!=+e,Ta=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,pe=e=>(typeof e=="number"||e instanceof Number)&&!Cn(e),jr=e=>pe(e)||typeof e=="string",R3=0,Nc=e=>{var t=++R3;return"".concat(e||"").concat(t)},kn=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!pe(t)&&typeof t!="string")return r;var o;if(Ta(t)){if(n==null)return r;var a=t.indexOf("%");o=n*parseFloat(t.slice(0,a))/100}else o=+t;return Cn(o)&&(o=r),i&&n!=null&&o>n&&(o=n),o},XC=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,n={},r=0;r<t;r++)if(!n[e[r]])n[e[r]]=!0;else return!0;return!1};function tt(e,t,n){return pe(e)&&pe(t)?e+n*(t-e):t}function QC(e,t,n){if(!(!e||!e.length))return e.find(r=>r&&(typeof t=="function"?t(r):Ka(r,t))===n)}var ht=e=>e===null||typeof e>"u",pu=e=>ht(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1)),I3=["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 Sb(e){if(typeof e!="string")return!1;var t=I3;return t.includes(e)}var L3=["viewBox","children"],i_=["points","pathLength"],Om={svg:L3,polygon:i_,polyline:i_},Ob=(e,t)=>{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 r={};return Object.keys(n).forEach(i=>{Sb(i)&&(r[i]=(o=>n[i](n,o)))}),r},F3=(e,t,n)=>r=>(e(t,n,r),null),hu=(e,t,n)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var r=null;return Object.keys(e).forEach(i=>{var o=e[i];Sb(i)&&typeof o=="function"&&(r||(r={}),r[i]=F3(o,t,n))}),r},$3=["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 ZC(e){if(typeof e!="string")return!1;var t=$3;return t.includes(e)}function zr(e){var t=Object.entries(e).filter(n=>{var[r]=n;return ZC(r)});return Object.fromEntries(t)}var o_=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",a_=null,Em=null,JC=e=>{if(e===a_&&Array.isArray(Em))return Em;var t=[];return k.Children.forEach(e,n=>{ht(n)||(Ho.isFragment(n)?t=t.concat(JC(n.props.children)):t.push(n))}),Em=t,a_=e,t};function Eb(e,t){var n=[],r=[];return Array.isArray(t)?r=t.map(i=>o_(i)):r=[o_(t)],JC(e).forEach(i=>{var o=Ka(i,"type.displayName")||Ka(i,"type.name");r.indexOf(o)!==-1&&n.push(i)}),n}var Jp=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0,B3=(e,t,n,r)=>{var i;if(typeof t=="symbol"||typeof t=="number")return!0;var o=(i=r&&Om?.[r])!==null&&i!==void 0?i:[],a=t.startsWith("data-"),s=typeof e!="function"&&(!!r&&o.includes(t)||ZC(t)),l=!!n&&Sb(t);return a||s||l},ct=(e,t,n)=>{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 i={};return Object.keys(r).forEach(o=>{var a;B3((a=r)===null||a===void 0?void 0:a[o],o,t,n)&&(i[o]=r[o])}),i},W3=["children","width","height","viewBox","className","style","title","desc"];function Tv(){return Tv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tv.apply(null,arguments)}function z3(e,t){if(e==null)return{};var n,r,i=V3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function V3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Pb=k.forwardRef((e,t)=>{var{children:n,width:r,height:i,viewBox:o,className:a,style:s,title:l,desc:c}=e,u=z3(e,W3),d=o||{width:r,height:i,x:0,y:0},f=oe("recharts-surface",a);return O.createElement("svg",Tv({},ct(u,!0,"svg"),{className:f,width:r,height:i,style:s,viewBox:"".concat(d.x," ").concat(d.y," ").concat(d.width," ").concat(d.height),ref:t}),O.createElement("title",null,l),O.createElement("desc",null,c),n)}),H3=["children","className"];function Mv(){return Mv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mv.apply(null,arguments)}function Y3(e,t){if(e==null)return{};var n,r,i=U3(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function U3(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Ot=O.forwardRef((e,t)=>{var{children:n,className:r}=e,i=Y3(e,H3),o=oe("recharts-layer",r);return O.createElement("g",Mv({className:o},ct(i,!0),{ref:t}),n)}),eD=k.createContext(null),K3=()=>k.useContext(eD);function lt(e){return function(){return e}}const tD=Math.cos,Of=Math.sin,Zr=Math.sqrt,Ef=Math.PI,eh=2*Ef,Nv=Math.PI,jv=2*Nv,ba=1e-6,q3=jv-ba;function nD(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function G3(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return nD;const n=10**t;return function(r){this._+=r[0];for(let i=1,o=r.length;i<o;++i)this._+=Math.round(arguments[i]*n)/n+r[i]}}class X3{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?nD:G3(t)}moveTo(t,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,n){this._append`L${this._x1=+t},${this._y1=+n}`}quadraticCurveTo(t,n,r,i){this._append`Q${+t},${+n},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,n,r,i,o,a){this._append`C${+t},${+n},${+r},${+i},${this._x1=+o},${this._y1=+a}`}arcTo(t,n,r,i,o){if(t=+t,n=+n,r=+r,i=+i,o=+o,o<0)throw new Error(`negative radius: ${o}`);let a=this._x1,s=this._y1,l=r-t,c=i-n,u=a-t,d=s-n,f=u*u+d*d;if(this._x1===null)this._append`M${this._x1=t},${this._y1=n}`;else if(f>ba)if(!(Math.abs(d*l-c*u)>ba)||!o)this._append`L${this._x1=t},${this._y1=n}`;else{let p=r-a,m=i-s,h=l*l+c*c,g=p*p+m*m,b=Math.sqrt(h),S=Math.sqrt(f),w=o*Math.tan((Nv-Math.acos((h+f-g)/(2*b*S)))/2),x=w/S,_=w/b;Math.abs(x-1)>ba&&this._append`L${t+x*u},${n+x*d}`,this._append`A${o},${o},0,0,${+(d*p>u*m)},${this._x1=t+_*l},${this._y1=n+_*c}`}}arc(t,n,r,i,o,a){if(t=+t,n=+n,r=+r,a=!!a,r<0)throw new Error(`negative radius: ${r}`);let s=r*Math.cos(i),l=r*Math.sin(i),c=t+s,u=n+l,d=1^a,f=a?i-o:o-i;this._x1===null?this._append`M${c},${u}`:(Math.abs(this._x1-c)>ba||Math.abs(this._y1-u)>ba)&&this._append`L${c},${u}`,r&&(f<0&&(f=f%jv+jv),f>q3?this._append`A${r},${r},0,1,${d},${t-s},${n-l}A${r},${r},0,1,${d},${this._x1=c},${this._y1=u}`:f>ba&&this._append`A${r},${r},0,${+(f>=Nv)},${d},${this._x1=t+r*Math.cos(o)},${this._y1=n+r*Math.sin(o)}`)}rect(t,n,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+n}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function kb(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{const r=Math.floor(n);if(!(r>=0))throw new RangeError(`invalid digits: ${n}`);t=r}return e},()=>new X3(t)}function Cb(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function rD(e){this._context=e}rD.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 th(e){return new rD(e)}function iD(e){return e[0]}function oD(e){return e[1]}function aD(e,t){var n=lt(!0),r=null,i=th,o=null,a=kb(s);e=typeof e=="function"?e:e===void 0?iD:lt(e),t=typeof t=="function"?t:t===void 0?oD:lt(t);function s(l){var c,u=(l=Cb(l)).length,d,f=!1,p;for(r==null&&(o=i(p=a())),c=0;c<=u;++c)!(c<u&&n(d=l[c],c,l))===f&&((f=!f)?o.lineStart():o.lineEnd()),f&&o.point(+e(d,c,l),+t(d,c,l));if(p)return o=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:lt(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:lt(+l),s):t},s.defined=function(l){return arguments.length?(n=typeof l=="function"?l:lt(!!l),s):n},s.curve=function(l){return arguments.length?(i=l,r!=null&&(o=i(r)),s):i},s.context=function(l){return arguments.length?(l==null?r=o=null:o=i(r=l),s):r},s}function ed(e,t,n){var r=null,i=lt(!0),o=null,a=th,s=null,l=kb(c);e=typeof e=="function"?e:e===void 0?iD:lt(+e),t=typeof t=="function"?t:lt(t===void 0?0:+t),n=typeof n=="function"?n:n===void 0?oD:lt(+n);function c(d){var f,p,m,h=(d=Cb(d)).length,g,b=!1,S,w=new Array(h),x=new Array(h);for(o==null&&(s=a(S=l())),f=0;f<=h;++f){if(!(f<h&&i(g=d[f],f,d))===b)if(b=!b)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),m=f-1;m>=p;--m)s.point(w[m],x[m]);s.lineEnd(),s.areaEnd()}b&&(w[f]=+e(g,f,d),x[f]=+t(g,f,d),s.point(r?+r(g,f,d):w[f],n?+n(g,f,d):x[f]))}if(S)return s=null,S+""||null}function u(){return aD().defined(i).curve(a).context(o)}return c.x=function(d){return arguments.length?(e=typeof d=="function"?d:lt(+d),r=null,c):e},c.x0=function(d){return arguments.length?(e=typeof d=="function"?d:lt(+d),c):e},c.x1=function(d){return arguments.length?(r=d==null?null:typeof d=="function"?d:lt(+d),c):r},c.y=function(d){return arguments.length?(t=typeof d=="function"?d:lt(+d),n=null,c):t},c.y0=function(d){return arguments.length?(t=typeof d=="function"?d:lt(+d),c):t},c.y1=function(d){return arguments.length?(n=d==null?null:typeof d=="function"?d:lt(+d),c):n},c.lineX0=c.lineY0=function(){return u().x(e).y(t)},c.lineY1=function(){return u().x(e).y(n)},c.lineX1=function(){return u().x(r).y(t)},c.defined=function(d){return arguments.length?(i=typeof d=="function"?d:lt(!!d),c):i},c.curve=function(d){return arguments.length?(a=d,o!=null&&(s=a(o)),c):a},c.context=function(d){return arguments.length?(d==null?o=s=null:s=a(o=d),c):o},c}class sD{constructor(t,n){this._context=t,this._x=n}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,n){switch(t=+t,n=+n,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,n):this._context.moveTo(t,n);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,n,t,n):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+n)/2,t,this._y0,t,n);break}}this._x0=t,this._y0=n}}function Q3(e){return new sD(e,!0)}function Z3(e){return new sD(e,!1)}const Db={draw(e,t){const n=Zr(t/Ef);e.moveTo(n,0),e.arc(0,0,n,0,eh)}},J3={draw(e,t){const n=Zr(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}},lD=Zr(1/3),e8=lD*2,t8={draw(e,t){const n=Zr(t/e8),r=n*lD;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}},n8={draw(e,t){const n=Zr(t),r=-n/2;e.rect(r,r,n,n)}},r8=.8908130915292852,cD=Of(Ef/10)/Of(7*Ef/10),i8=Of(eh/10)*cD,o8=-tD(eh/10)*cD,a8={draw(e,t){const n=Zr(t*r8),r=i8*n,i=o8*n;e.moveTo(0,-n),e.lineTo(r,i);for(let o=1;o<5;++o){const a=eh*o/5,s=tD(a),l=Of(a);e.lineTo(l*n,-s*n),e.lineTo(s*r-l*i,l*r+s*i)}e.closePath()}},Pm=Zr(3),s8={draw(e,t){const n=-Zr(t/(Pm*3));e.moveTo(0,n*2),e.lineTo(-Pm*n,-n),e.lineTo(Pm*n,-n),e.closePath()}},Sr=-.5,Or=Zr(3)/2,Rv=1/Zr(12),l8=(Rv/2+1)*3,c8={draw(e,t){const n=Zr(t/l8),r=n/2,i=n*Rv,o=r,a=n*Rv+n,s=-o,l=a;e.moveTo(r,i),e.lineTo(o,a),e.lineTo(s,l),e.lineTo(Sr*r-Or*i,Or*r+Sr*i),e.lineTo(Sr*o-Or*a,Or*o+Sr*a),e.lineTo(Sr*s-Or*l,Or*s+Sr*l),e.lineTo(Sr*r+Or*i,Sr*i-Or*r),e.lineTo(Sr*o+Or*a,Sr*a-Or*o),e.lineTo(Sr*s+Or*l,Sr*l-Or*s),e.closePath()}};function u8(e,t){let n=null,r=kb(i);e=typeof e=="function"?e:lt(e||Db),t=typeof t=="function"?t:lt(t===void 0?64:+t);function i(){let o;if(n||(n=o=r()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),o)return n=null,o+""||null}return i.type=function(o){return arguments.length?(e=typeof o=="function"?o:lt(o),i):e},i.size=function(o){return arguments.length?(t=typeof o=="function"?o:lt(+o),i):t},i.context=function(o){return arguments.length?(n=o??null,i):n},i}function Pf(){}function kf(e,t,n){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+n)/6)}function uD(e){this._context=e}uD.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:kf(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:kf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function d8(e){return new uD(e)}function dD(e){this._context=e}dD.prototype={areaStart:Pf,areaEnd:Pf,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:kf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function f8(e){return new dD(e)}function fD(e){this._context=e}fD.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 n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:kf(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function p8(e){return new fD(e)}function pD(e){this._context=e}pD.prototype={areaStart:Pf,areaEnd:Pf,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 h8(e){return new pD(e)}function s_(e){return e<0?-1:1}function l_(e,t,n){var r=e._x1-e._x0,i=t-e._x1,o=(e._y1-e._y0)/(r||i<0&&-0),a=(n-e._y1)/(i||r<0&&-0),s=(o*i+a*r)/(r+i);return(s_(o)+s_(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function c_(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function km(e,t,n){var r=e._x0,i=e._y0,o=e._x1,a=e._y1,s=(o-r)/3;e._context.bezierCurveTo(r+s,i+s*t,o-s,a-s*n,o,a)}function Cf(e){this._context=e}Cf.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:km(this,this._t0,c_(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 n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,km(this,c_(this,n=l_(this,e,t)),n);break;default:km(this,this._t0,n=l_(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function hD(e){this._context=new mD(e)}(hD.prototype=Object.create(Cf.prototype)).point=function(e,t){Cf.prototype.point.call(this,t,e)};function mD(e){this._context=e}mD.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,o){this._context.bezierCurveTo(t,e,r,n,o,i)}};function m8(e){return new Cf(e)}function g8(e){return new hD(e)}function gD(e){this._context=e}gD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=u_(e),i=u_(t),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(r[0][o],i[0][o],r[1][o],i[1][o],e[a],t[a]);(this._line||this._line!==0&&n===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 u_(e){var t,n=e.length-1,r,i=new Array(n),o=new Array(n),a=new Array(n);for(i[0]=0,o[0]=2,a[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,o[t]=4,a[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,o[n-1]=7,a[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/o[t-1],o[t]-=r,a[t]-=r*a[t-1];for(i[n-1]=a[n-1]/o[n-1],t=n-2;t>=0;--t)i[t]=(a[t]-i[t+1])/o[t];for(o[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)o[t]=2*e[t+1]-i[t+1];return[i,o]}function v8(e){return new gD(e)}function nh(e,t){this._context=e,this._t=t}nh.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 n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function y8(e){return new nh(e,.5)}function b8(e){return new nh(e,0)}function x8(e){return new nh(e,1)}function Ks(e,t){if((a=e.length)>1)for(var n=1,r,i,o=e[t[0]],a,s=o.length;n<a;++n)for(i=o,o=e[t[n]],r=0;r<s;++r)o[r][1]+=o[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Iv(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function w8(e,t){return e[t]}function _8(e){const t=[];return t.key=e,t}function S8(){var e=lt([]),t=Iv,n=Ks,r=w8;function i(o){var a=Array.from(e.apply(this,arguments),_8),s,l=a.length,c=-1,u;for(const d of o)for(s=0,++c;s<l;++s)(a[s][c]=[0,+r(d,a[s].key,c,o)]).data=d;for(s=0,u=Cb(t(a));s<l;++s)a[u[s]].index=s;return n(a,u),a}return i.keys=function(o){return arguments.length?(e=typeof o=="function"?o:lt(Array.from(o)),i):e},i.value=function(o){return arguments.length?(r=typeof o=="function"?o:lt(+o),i):r},i.order=function(o){return arguments.length?(t=o==null?Iv:typeof o=="function"?o:lt(Array.from(o)),i):t},i.offset=function(o){return arguments.length?(n=o??Ks,i):n},i}function O8(e,t){if((r=e.length)>0){for(var n,r,i=0,o=e[0].length,a;i<o;++i){for(a=n=0;n<r;++n)a+=e[n][i][1]||0;if(a)for(n=0;n<r;++n)e[n][i][1]/=a}Ks(e,t)}}function E8(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,o=r.length;n<o;++n){for(var a=0,s=0;a<i;++a)s+=e[a][n][1]||0;r[n][1]+=r[n][0]=-s/2}Ks(e,t)}}function P8(e,t){if(!(!((a=e.length)>0)||!((o=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,o,a;r<o;++r){for(var s=0,l=0,c=0;s<a;++s){for(var u=e[t[s]],d=u[r][1]||0,f=u[r-1][1]||0,p=(d-f)/2,m=0;m<s;++m){var h=e[t[m]],g=h[r][1]||0,b=h[r-1][1]||0;p+=g-b}l+=d,c+=p*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=c/l)}i[r-1][1]+=i[r-1][0]=n,Ks(e,t)}}var k8=["type","size","sizeType"];function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lv.apply(null,arguments)}function d_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function f_(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?d_(Object(n),!0).forEach(function(r){C8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function C8(e,t,n){return(t=D8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D8(e){var t=A8(e,"string");return typeof t=="symbol"?t:t+""}function A8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function T8(e,t){if(e==null)return{};var n,r,i=M8(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function M8(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var vD={symbolCircle:Db,symbolCross:J3,symbolDiamond:t8,symbolSquare:n8,symbolStar:a8,symbolTriangle:s8,symbolWye:c8},N8=Math.PI/180,j8=e=>{var t="symbol".concat(pu(e));return vD[t]||Db},R8=(e,t,n)=>{if(t==="area")return e;switch(n){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var r=18*N8;return 1.25*e*e*(Math.tan(r)-Math.tan(r*2)*Math.tan(r)**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}},I8=(e,t)=>{vD["symbol".concat(pu(e))]=t},Ab=e=>{var{type:t="circle",size:n=64,sizeType:r="area"}=e,i=T8(e,k8),o=f_(f_({},i),{},{type:t,size:n,sizeType:r}),a="circle";typeof t=="string"&&(a=t);var s=()=>{var f=j8(a),p=u8().type(f).size(R8(n,r,a));return p()},{className:l,cx:c,cy:u}=o,d=ct(o,!0);return c===+c&&u===+u&&n===+n?O.createElement("path",Lv({},d,{className:oe("recharts-symbols",l),transform:"translate(".concat(c,", ").concat(u,")"),d:s()})):null};Ab.registerSymbol=I8;function Fv(){return Fv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fv.apply(null,arguments)}function p_(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function L8(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?p_(Object(n),!0).forEach(function(r){Tb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p_(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Tb(e,t,n){return(t=F8(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F8(e){var t=$8(e,"string");return typeof t=="symbol"?t:t+""}function $8(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Er=32;class Mb extends k.PureComponent{renderIcon(t,n){var{inactiveColor:r}=this.props,i=Er/2,o=Er/6,a=Er/3,s=t.inactive?r:t.color,l=n??t.type;if(l==="none")return null;if(l==="plainline")return O.createElement("line",{strokeWidth:4,fill:"none",stroke:s,strokeDasharray:t.payload.strokeDasharray,x1:0,y1:i,x2:Er,y2:i,className:"recharts-legend-icon"});if(l==="line")return O.createElement("path",{strokeWidth:4,fill:"none",stroke:s,d:"M0,".concat(i,"h").concat(a,`
128
128
  A`).concat(o,",").concat(o,",0,1,1,").concat(2*a,",").concat(i,`
129
129
  H`).concat(Er,"M").concat(2*a,",").concat(i,`
130
130
  A`).concat(o,",").concat(o,",0,1,1,").concat(a,",").concat(i),className:"recharts-legend-icon"});if(l==="rect")return O.createElement("path",{stroke:"none",fill:s,d:"M0,".concat(Er/8,"h").concat(Er,"v").concat(Er*3/4,"h").concat(-Er,"z"),className:"recharts-legend-icon"});if(O.isValidElement(t.legendIcon)){var c=L8({},t);return delete c.legendIcon,O.cloneElement(t.legendIcon,c)}return O.createElement(Ab,{fill:s,cx:i,cy:i,size:Er,sizeType:"diameter",type:l})}renderItems(){var{payload:t,iconSize:n,layout:r,formatter:i,inactiveColor:o,iconType:a}=this.props,s={x:0,y:0,width:Er,height:Er},l={display:r==="horizontal"?"inline-block":"block",marginRight:10},c={display:"inline-block",verticalAlign:"middle",marginRight:4};return t.map((u,d)=>{var f=u.formatter||i,p=oe({"recharts-legend-item":!0,["legend-item-".concat(d)]:!0,inactive:u.inactive});if(u.type==="none")return null;var m=u.inactive?o:u.color,h=f?f(u.value,u,d):u.value;return O.createElement("li",Fv({className:p,style:l,key:"legend-item-".concat(d)},hu(this.props,u,d)),O.createElement(Pb,{width:n,height:n,viewBox:s,style:c,"aria-label":"".concat(h," legend icon")},this.renderIcon(u,a)),O.createElement("span",{className:"recharts-legend-item-text",style:{color:m}},h))})}render(){var{payload:t,layout:n,align:r}=this.props;if(!t||!t.length)return null;var i={padding:0,margin:0,textAlign:n==="horizontal"?r:"left"};return O.createElement("ul",{className:"recharts-default-legend",style:i},this.renderItems())}}Tb(Mb,"displayName","Legend");Tb(Mb,"defaultProps",{align:"center",iconSize:14,inactiveColor:"#ccc",layout:"horizontal",verticalAlign:"middle"});var Cm={},Dm={},h_;function B8(){return h_||(h_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){const i=new Map;for(let o=0;o<n.length;o++){const a=n[o],s=r(a);i.has(s)||i.set(s,a)}return Array.from(i.values())}e.uniqBy=t})(Dm)),Dm}var Am={},m_;function yD(){return m_||(m_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n}e.identity=t})(Am)),Am}var Tm={},Mm={},Nm={},g_;function W8(){return g_||(g_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Number.isSafeInteger(n)&&n>=0}e.isLength=t})(Nm)),Nm}var v_;function Nb(){return v_||(v_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=W8();function n(r){return r!=null&&typeof r!="function"&&t.isLength(r.length)}e.isArrayLike=n})(Mm)),Mm}var jm={},y_;function z8(){return y_||(y_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return typeof n=="object"&&n!==null}e.isObjectLike=t})(jm)),jm}var b_;function V8(){return b_||(b_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Nb(),n=z8();function r(i){return n.isObjectLike(i)&&t.isArrayLike(i)}e.isArrayLikeObject=r})(Tm)),Tm}var Rm={},Im={},x_;function H8(){return x_||(x_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_b();function n(r){return function(i){return t.get(i,r)}}e.property=n})(Im)),Im}var Lm={},Fm={},$m={},Bm={},w_;function bD(){return w_||(w_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n!==null&&(typeof n=="object"||typeof n=="function")}e.isObject=t})(Bm)),Bm}var Wm={},__;function xD(){return __||(__=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null||typeof n!="object"&&typeof n!="function"}e.isPrimitive=t})(Wm)),Wm}var zm={},S_;function wD(){return S_||(S_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r){return n===r||Number.isNaN(n)&&Number.isNaN(r)}e.eq=t})(zm)),zm}var O_;function Y8(){return O_||(O_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jb(),n=bD(),r=xD(),i=wD();function o(d,f,p){return typeof p!="function"?t.isMatch(d,f):a(d,f,function m(h,g,b,S,w,x){const _=p(h,g,b,S,w,x);return _!==void 0?!!_:a(h,g,m,x)},new Map)}function a(d,f,p,m){if(f===d)return!0;switch(typeof f){case"object":return s(d,f,p,m);case"function":return Object.keys(f).length>0?a(d,{...f},p,m):i.eq(d,f);default:return n.isObject(d)?typeof f=="string"?f==="":!0:i.eq(d,f)}}function s(d,f,p,m){if(f==null)return!0;if(Array.isArray(f))return c(d,f,p,m);if(f instanceof Map)return l(d,f,p,m);if(f instanceof Set)return u(d,f,p,m);const h=Object.keys(f);if(d==null)return h.length===0;if(h.length===0)return!0;if(m&&m.has(f))return m.get(f)===d;m&&m.set(f,d);try{for(let g=0;g<h.length;g++){const b=h[g];if(!r.isPrimitive(d)&&!(b in d)||f[b]===void 0&&d[b]!==void 0||f[b]===null&&d[b]!==null||!p(d[b],f[b],b,d,f,m))return!1}return!0}finally{m&&m.delete(f)}}function l(d,f,p,m){if(f.size===0)return!0;if(!(d instanceof Map))return!1;for(const[h,g]of f.entries()){const b=d.get(h);if(p(b,g,h,d,f,m)===!1)return!1}return!0}function c(d,f,p,m){if(f.length===0)return!0;if(!Array.isArray(d))return!1;const h=new Set;for(let g=0;g<f.length;g++){const b=f[g];let S=!1;for(let w=0;w<d.length;w++){if(h.has(w))continue;const x=d[w];let _=!1;if(p(x,b,g,d,f,m)&&(_=!0),_){h.add(w),S=!0;break}}if(!S)return!1}return!0}function u(d,f,p,m){return f.size===0?!0:d instanceof Set?c([...d],[...f],p,m):!1}e.isMatchWith=o,e.isSetMatch=u})($m)),$m}var E_;function jb(){return E_||(E_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Y8();function n(r,i){return t.isMatchWith(r,i,()=>{})}e.isMatch=n})(Fm)),Fm}var Vm={},Hm={},Ym={},P_;function U8(){return P_||(P_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Object.getOwnPropertySymbols(n).filter(r=>Object.prototype.propertyIsEnumerable.call(n,r))}e.getSymbols=t})(Ym)),Ym}var Um={},k_;function _D(){return k_||(k_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n==null?n===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(n)}e.getTag=t})(Um)),Um}var Km={},C_;function SD(){return C_||(C_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t="[object RegExp]",n="[object String]",r="[object Number]",i="[object Boolean]",o="[object Arguments]",a="[object Symbol]",s="[object Date]",l="[object Map]",c="[object Set]",u="[object Array]",d="[object Function]",f="[object ArrayBuffer]",p="[object Object]",m="[object Error]",h="[object DataView]",g="[object Uint8Array]",b="[object Uint8ClampedArray]",S="[object Uint16Array]",w="[object Uint32Array]",x="[object BigUint64Array]",_="[object Int8Array]",E="[object Int16Array]",C="[object Int32Array]",D="[object BigInt64Array]",T="[object Float32Array]",j="[object Float64Array]";e.argumentsTag=o,e.arrayBufferTag=f,e.arrayTag=u,e.bigInt64ArrayTag=D,e.bigUint64ArrayTag=x,e.booleanTag=i,e.dataViewTag=h,e.dateTag=s,e.errorTag=m,e.float32ArrayTag=T,e.float64ArrayTag=j,e.functionTag=d,e.int16ArrayTag=E,e.int32ArrayTag=C,e.int8ArrayTag=_,e.mapTag=l,e.numberTag=r,e.objectTag=p,e.regexpTag=t,e.setTag=c,e.stringTag=n,e.symbolTag=a,e.uint16ArrayTag=S,e.uint32ArrayTag=w,e.uint8ArrayTag=g,e.uint8ClampedArrayTag=b})(Km)),Km}var qm={},D_;function K8(){return D_||(D_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}e.isTypedArray=t})(qm)),qm}var A_;function OD(){return A_||(A_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=U8(),n=_D(),r=SD(),i=xD(),o=K8();function a(u,d){return s(u,void 0,u,new Map,d)}function s(u,d,f,p=new Map,m=void 0){const h=m?.(u,d,f,p);if(h!==void 0)return h;if(i.isPrimitive(u))return u;if(p.has(u))return p.get(u);if(Array.isArray(u)){const g=new Array(u.length);p.set(u,g);for(let b=0;b<u.length;b++)g[b]=s(u[b],b,f,p,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;p.set(u,g);for(const[b,S]of u)g.set(b,s(S,b,f,p,m));return g}if(u instanceof Set){const g=new Set;p.set(u,g);for(const b of u)g.add(s(b,void 0,f,p,m));return g}if(typeof Buffer<"u"&&Buffer.isBuffer(u))return u.subarray();if(o.isTypedArray(u)){const g=new(Object.getPrototypeOf(u)).constructor(u.length);p.set(u,g);for(let b=0;b<u.length;b++)g[b]=s(u[b],b,f,p,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 p.set(u,g),l(g,u,f,p,m),g}if(typeof File<"u"&&u instanceof File){const g=new File([u],u.name,{type:u.type});return p.set(u,g),l(g,u,f,p,m),g}if(u instanceof Blob){const g=new Blob([u],{type:u.type});return p.set(u,g),l(g,u,f,p,m),g}if(u instanceof Error){const g=new u.constructor;return p.set(u,g),g.message=u.message,g.name=u.name,g.stack=u.stack,g.cause=u.cause,l(g,u,f,p,m),g}if(typeof u=="object"&&c(u)){const g=Object.create(Object.getPrototypeOf(u));return p.set(u,g),l(g,u,f,p,m),g}return u}function l(u,d,f=u,p,m){const h=[...Object.keys(d),...t.getSymbols(d)];for(let g=0;g<h.length;g++){const b=h[g],S=Object.getOwnPropertyDescriptor(u,b);(S==null||S.writable)&&(u[b]=s(d[b],b,f,p,m))}}function c(u){switch(n.getTag(u)){case r.argumentsTag:case r.arrayTag:case r.arrayBufferTag:case r.dataViewTag:case r.booleanTag:case r.dateTag:case r.float32ArrayTag:case r.float64ArrayTag:case r.int8ArrayTag:case r.int16ArrayTag:case r.int32ArrayTag:case r.mapTag:case r.numberTag:case r.objectTag:case r.regexpTag:case r.setTag:case r.stringTag:case r.symbolTag:case r.uint8ArrayTag:case r.uint8ClampedArrayTag:case r.uint16ArrayTag:case r.uint32ArrayTag:return!0;default:return!1}}e.cloneDeepWith=a,e.cloneDeepWithImpl=s,e.copyProperties=l})(Hm)),Hm}var T_;function q8(){return T_||(T_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OD();function n(r){return t.cloneDeepWithImpl(r,void 0,r,new Map,void 0)}e.cloneDeep=n})(Vm)),Vm}var M_;function G8(){return M_||(M_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jb(),n=q8();function r(i){return i=n.cloneDeep(i),o=>t.isMatch(o,i)}e.matches=r})(Lm)),Lm}var Gm={},Xm={},Qm={},N_;function X8(){return N_||(N_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=OD(),n=SD();function r(i,o){return t.cloneDeepWith(i,(a,s,l,c)=>{const u=o?.(a,s,l,c);if(u!==void 0)return u;if(typeof i=="object")switch(Object.prototype.toString.call(i)){case n.numberTag:case n.stringTag:case n.booleanTag:{const d=new i.constructor(i?.valueOf());return t.copyProperties(d,i),d}case n.argumentsTag:{const d={};return t.copyProperties(d,i),d.length=i.length,d[Symbol.iterator]=i[Symbol.iterator],d}default:return}})}e.cloneDeepWith=r})(Qm)),Qm}var j_;function Q8(){return j_||(j_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=X8();function n(r){return t.cloneDeepWith(r)}e.cloneDeep=n})(Xm)),Xm}var Zm={},Jm={},R_;function ED(){return R_||(R_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=/^(?:0|[1-9]\d*)$/;function n(r,i=Number.MAX_SAFE_INTEGER){switch(typeof r){case"number":return Number.isInteger(r)&&r>=0&&r<i;case"symbol":return!1;case"string":return t.test(r)}}e.isIndex=n})(Jm)),Jm}var eg={},I_;function Z8(){return I_||(I_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=_D();function n(r){return r!==null&&typeof r=="object"&&t.getTag(r)==="[object Arguments]"}e.isArguments=n})(eg)),eg}var L_;function J8(){return L_||(L_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=qC(),n=ED(),r=Z8(),i=wb();function o(a,s){let l;if(Array.isArray(s)?l=s:typeof s=="string"&&t.isDeepKey(s)&&a?.[s]==null?l=i.toPath(s):l=[s],l.length===0)return!1;let c=a;for(let u=0;u<l.length;u++){const d=l[u];if((c==null||!Object.hasOwn(c,d))&&!((Array.isArray(c)||r.isArguments(c))&&n.isIndex(d)&&d<c.length))return!1;c=c[d]}return!0}e.has=o})(Zm)),Zm}var F_;function eW(){return F_||(F_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=jb(),n=GC(),r=Q8(),i=_b(),o=J8();function a(s,l){switch(typeof s){case"object":{Object.is(s?.valueOf(),-0)&&(s="-0");break}case"number":{s=n.toKey(s);break}}return l=r.cloneDeep(l),function(c){const u=i.get(c,s);return u===void 0?o.has(c,s):l===void 0?u===void 0:t.isMatch(u,l)}}e.matchesProperty=a})(Gm)),Gm}var $_;function tW(){return $_||($_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=yD(),n=H8(),r=G8(),i=eW();function o(a){if(a==null)return t.identity;switch(typeof a){case"function":return a;case"object":return Array.isArray(a)&&a.length===2?i.matchesProperty(a[0],a[1]):r.matches(a);case"string":case"symbol":case"number":return n.property(a)}}e.iteratee=o})(Rm)),Rm}var B_;function nW(){return B_||(B_=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=B8(),n=yD(),r=V8(),i=tW();function o(a,s=n.identity){return r.isArrayLikeObject(a)?t.uniqBy(Array.from(a),i.iteratee(s)):[]}e.uniqBy=o})(Cm)),Cm}var tg,W_;function rW(){return W_||(W_=1,tg=nW().uniqBy),tg}var iW=rW();const z_=ho(iW);function PD(e,t,n){return t===!0?z_(e,n):typeof t=="function"?z_(e,t):e}var td={exports:{}},ng={},nd={exports:{}},rg={};/**
@@ -173,7 +173,7 @@ Take a look at the logic that dispatched this action: `,p,`
173
173
  (See https://redux.js.org/faq/actions#why-should-type-be-a-string-or-at-least-serializable-why-should-my-action-types-be-constants)`,`
174
174
  (To allow non-serializable values see: https://redux-toolkit.js.org/usage/usage-guide#working-with-non-serializable-data)`)}}),s||(h.measureTime(()=>{const g=d.getState(),b=Yv(g,"",t,n,o,u);if(b){const{keyPath:S,value:w}=b;console.error(`A non-serializable value was detected in the state, in the path: \`${S}\`. Value:`,w,`
175
175
  Take a look at the reducer(s) handling this action type: ${p.type}.
176
- (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),m}}}function sd(e){return typeof e=="boolean"}var hz=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new HD;if(n&&(sd(n)?a.push(rz):a.push(iz(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};sd(r)||(s=r),a.unshift(fz(s))}if(i){let s={};sd(i)||(s=i),a.push(pz(s))}if(o){let s={};sd(o)||(s=o),a.unshift(cz(s))}}return a},mz="RTK_autoBatch",hS=e=>t=>{setTimeout(t,e)},gz=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hS(10):e.type==="callback"?e.queueNotification:hS(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>i&&u(),f=r.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[mz],o=!i,o&&(a||(a=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},vz=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new HD(e);return r&&i.push(gz(typeof r=="object"?r:void 0)),i};function yz(e){const t=hz(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(mu(n))l=jD(n);else throw new Error(process.env.NODE_ENV==="production"?Re(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"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Re(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Re(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(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Re(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&o){let h=new Set;c.forEach(g=>{if(h.has(g))throw new Error(process.env.NODE_ENV==="production"?Re(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");h.add(g)})}let u=Df;i&&(u=oz({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const d=UW(...c),f=vz(d);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?Re(5):"`enhancers` field must be a callback");let p=typeof s=="function"?s(f):f();if(process.env.NODE_ENV!=="production"&&!Array.isArray(p))throw new Error(process.env.NODE_ENV==="production"?Re(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&p.some(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Re(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!p.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...p);return ND(l,a,m)}function GD(e){const t={},n=[];let r;const i={addCase(o,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Re(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Re(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof o=="string"?o:o.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?Re(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?Re(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=a,i},addAsyncThunk(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Re(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[o.pending.type]=a.pending),a.rejected&&(t[o.rejected.type]=a.rejected),a.fulfilled&&(t[o.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:o.settled,reducer:a.settled}),i},addMatcher(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Re(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Re(31):"`builder.addDefaultCase` can only be called once");return r=o,i}};return e(i),[t,n,r]}function bz(e){return typeof e=="function"}function xz(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Re(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=GD(t),o;if(bz(e))o=()=>pS(e());else{const s=pS(e);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(qa(u)){const p=d(u,l);return p===void 0?u:p}else{if(so(u))return WD(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return a.getInitialState=o,a}var wz="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_z=(e=21)=>{let t="",n=e;for(;n--;)t+=wz[Math.random()*64|0];return t},Sz=Symbol.for("rtk-slice-createasyncthunk");function Oz(e,t){return`${e}/${t}`}function Ez({creators:e}={}){const t=e?.asyncThunk?.[Sz];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(process.env.NODE_ENV==="production"?Re(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&r.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof r.reducers=="function"?r.reducers(kz()):r.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,x){const _=typeof w=="string"?w:w.type;if(!_)throw new Error(process.env.NODE_ENV==="production"?Re(12):"`context.addCase` cannot be called with an empty action type");if(_ in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Re(13):"`context.addCase` cannot be called with two reducers for the same action type: "+_);return l.sliceCaseReducersByType[_]=x,c},addMatcher(w,x){return l.sliceMatchers.push({matcher:w,reducer:x}),c},exposeAction(w,x){return l.actionCreators[w]=x,c},exposeCaseReducer(w,x){return l.sliceCaseReducersByName[w]=x,c}};s.forEach(w=>{const x=a[w],_={reducerName:w,type:Oz(i,w),createNotation:typeof r.reducers=="function"};Dz(x)?Tz(_,x,c,t):Cz(_,x,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Re(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={},x=[],_=void 0]=typeof r.extraReducers=="function"?GD(r.extraReducers):[r.extraReducers],E={...w,...l.sliceCaseReducersByType};return xz(r.initialState,C=>{for(let D in E)C.addCase(D,E[D]);for(let D of l.sliceMatchers)C.addMatcher(D.matcher,D.reducer);for(let D of x)C.addMatcher(D.matcher,D.reducer);_&&C.addDefaultCase(_)})}const d=w=>w,f=new Map,p=new WeakMap;let m;function h(w,x){return m||(m=u()),m(w,x)}function g(){return m||(m=u()),m.getInitialState()}function b(w,x=!1){function _(C){let D=C[w];if(typeof D>"u"){if(x)D=ad(p,_,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Re(15):"selectSlice returned undefined for an uninjected slice reducer")}return D}function E(C=d){const D=ad(f,x,()=>new WeakMap);return ad(D,C,()=>{const T={};for(const[j,A]of Object.entries(r.selectors??{}))T[j]=Pz(A,C,()=>ad(p,C,g),x);return T})}return{reducerPath:w,getSelectors:E,get selectors(){return E(_)},selectSlice:_}}const S={name:i,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...b(o),injectInto(w,{reducerPath:x,..._}={}){const E=x??o;return w.inject({reducerPath:E,reducer:h},_),{...S,...b(E,!0)}}};return S}}function Pz(e,t,n,r){function i(o,...a){let s=t(o);if(typeof s>"u"){if(r)s=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Re(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return i.unwrapped=e,i}var yr=Ez();function kz(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Cz({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Az(r))throw new Error(process.env.NODE_ENV==="production"?Re(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?Rr(e,a):Rr(e))}function Dz(e){return e._reducerDefinitionType==="asyncThunk"}function Az(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Tz({type:e,reducerName:t},n,r,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Re(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||ld,pending:s||ld,rejected:l||ld,settled:c||ld})}function ld(){}var Mz="task",XD="listener",QD="completed",$b="cancelled",Nz=`task-${$b}`,jz=`task-${QD}`,Uv=`${XD}-${$b}`,Rz=`${XD}-${QD}`,sh=class{constructor(e){this.code=e,this.message=`${Mz} ${$b} (reason: ${e})`}name="TaskAbortError";message},Bb=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Re(32):`${t} is not a function`)},Nf=()=>{},ZD=(e,t=Nf)=>(e.catch(t),e),JD=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),$a=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ba=e=>{if(e.aborted){const{reason:t}=e;throw new sh(t)}};function eA(e,t){let n=Nf;return new Promise((r,i)=>{const o=()=>i(new sh(e.reason));if(e.aborted){o();return}n=JD(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Nf})}var Iz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof sh?"cancelled":"rejected",error:n}}finally{t?.()}},jf=e=>t=>ZD(eA(e,t).then(n=>(Ba(e),n))),tA=e=>{const t=jf(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Ns}=Object,mS={},vu="listenerMiddleware",Lz=(e,t)=>{const n=r=>JD(e,()=>$a(r,e.reason));return(r,i)=>{Bb(r,"taskExecutor");const o=new AbortController;n(o);const a=Iz(async()=>{Ba(e),Ba(o.signal);const s=await r({pause:jf(o.signal),delay:tA(o.signal),signal:o.signal});return Ba(o.signal),s},()=>$a(o,jz));return i?.autoJoin&&t.push(a.catch(Nf)),{result:jf(e)(a),cancel(){$a(o,Nz)}}}},Fz=(e,t)=>{const n=async(r,i)=>{Ba(t);let o=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:r,effect:(d,f)=>{f.unsubscribe(),l([d,f.getState(),f.getOriginalState()])}});o=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await eA(t,Promise.race(s));return Ba(t),l}finally{o()}};return(r,i)=>ZD(n(r,i))},nA=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Rr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Re(21):"Creating or removing a listener requires one of the known fields for matching an action");return Bb(o,"options.listener"),{predicate:i,type:t,effect:o}},rA=Ns(e=>{const{type:t,predicate:n,effect:r}=nA(e);return{id:_z(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Re(22):"Unsubscribe not initialized")}}},{withTypes:()=>rA}),gS=(e,t)=>{const{type:n,effect:r,predicate:i}=nA(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},Kv=e=>{e.pending.forEach(t=>{$a(t,Uv)})},$z=e=>()=>{e.forEach(Kv),e.clear()},vS=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},iA=Ns(Rr(`${vu}/add`),{withTypes:()=>iA}),Bz=Rr(`${vu}/removeAll`),oA=Ns(Rr(`${vu}/remove`),{withTypes:()=>oA}),Wz=(...e)=>{console.error(`${vu}/error`,...e)},yu=(e={})=>{const t=new Map,{extra:n,onError:r=Wz}=e;Bb(r,"onError");const i=u=>(u.unsubscribe=()=>t.delete(u.id),t.set(u.id,u),d=>{u.unsubscribe(),d?.cancelActive&&Kv(u)}),o=u=>{const d=gS(t,u)??rA(u);return i(d)};Ns(o,{withTypes:()=>o});const a=u=>{const d=gS(t,u);return d&&(d.unsubscribe(),u.cancelActive&&Kv(d)),!!d};Ns(a,{withTypes:()=>a});const s=async(u,d,f,p)=>{const m=new AbortController,h=Fz(o,m.signal),g=[];try{u.pending.add(m),await Promise.resolve(u.effect(d,Ns({},f,{getOriginalState:p,condition:(b,S)=>h(b,S).then(Boolean),take:h,delay:tA(m.signal),pause:jf(m.signal),extra:n,signal:m.signal,fork:Lz(m.signal,g),unsubscribe:u.unsubscribe,subscribe:()=>{t.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((b,S,w)=>{b!==m&&($a(b,Uv),w.delete(b))})},cancel:()=>{$a(m,Uv),u.pending.delete(m)},throwIfCancelled:()=>{Ba(m.signal)}})))}catch(b){b instanceof sh||vS(r,b,{raisedBy:"effect"})}finally{await Promise.all(g),$a(m,Rz),u.pending.delete(m)}},l=$z(t);return{middleware:u=>d=>f=>{if(!Ib(f))return d(f);if(iA.match(f))return o(f.payload);if(Bz.match(f)){l();return}if(oA.match(f))return a(f.payload);let p=u.getState();const m=()=>{if(p===mS)throw new Error(process.env.NODE_ENV==="production"?Re(23):`${vu}: getOriginalState can only be called synchronously`);return p};let h;try{if(h=d(f),t.size>0){const g=u.getState(),b=Array.from(t.values());for(const S of b){let w=!1;try{w=S.predicate(f,g,p)}catch(x){w=!1,vS(r,x,{raisedBy:"predicate"})}w&&s(S,f,u,m)}}}finally{p=mS}return h},startListening:o,stopListening:a,clearListeners:l}};function Re(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 zz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},aA=yr({name:"chartLayout",initialState:zz,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 n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Vz,setLayout:Hz,setChartSize:Yz,setScale:Uz}=aA.actions,Kz=aA.reducer;function yS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yS(Object(n),!0).forEach(function(r){qz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qz(e,t,n){return(t=Gz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gz(e){var t=Xz(e,"string");return typeof t=="symbol"?t:t+""}function Xz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rf=Math.PI/180,Qz=e=>e*180/Math.PI,Wt=(e,t,n,r)=>({x:e+Math.cos(-Rf*r)*n,y:t+Math.sin(-Rf*r)*n}),sA=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Zz=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Jz=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=Zz({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:Qz(l),angleInRadian:l}},e7=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},t7=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return e+a*360},n7=(e,t)=>{var{x:n,y:r}=e,{radius:i,angle:o}=Jz({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s||i===0)return null;var{startAngle:l,endAngle:c}=e7(t),u=o,d;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}return d?bS(bS({},t),{},{radius:i,angle:t7(u,t)}):null};function lA(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function xS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ar(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xS(Object(n),!0).forEach(function(r){r7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r7(e,t,n){return(t=i7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i7(e){var t=o7(e,"string");return typeof t=="symbol"?t:t+""}function o7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nt(e,t,n){return ht(e)||ht(t)?n:jr(t)?Ka(e,t,n):typeof t=="function"?t(e):n}var a7=(e,t,n,r,i)=>{var o,a=-1,s=(o=t?.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(r==="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?n[l-1].coordinate:n[s-1].coordinate,u=n[l].coordinate,d=l>=s-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(tn(u-c)!==tn(d-u)){var p=[];if(tn(d-u)===tn(i[1]-i[0])){f=d;var m=u+i[1]-i[0];p[0]=Math.min(m,(m+c)/2),p[1]=Math.max(m,(m+c)/2)}else{f=c;var h=d+i[1]-i[0];p[0]=Math.min(u,(h+u)/2),p[1]=Math.max(u,(h+u)/2)}var g=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){({index:a}=n[l]);break}}else{var b=Math.min(c,d),S=Math.max(c,d);if(e>(b+u)/2&&e<=(S+u)/2){({index:a}=n[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:a}=t[w]);break}}return a},s7=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=t;if((s==="vertical"||s==="horizontal"&&a==="middle")&&o!=="center"&&pe(e[o]))return Ar(Ar({},e),{},{[o]:e[o]+(r||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&a!=="middle"&&pe(e[a]))return Ar(Ar({},e),{},{[a]:e[a]+(i||0)})}return e},Di=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",cA=(e,t,n,r)=>{if(r)return e.map(s=>s.coordinate);var i,o,a=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===n&&(o=!0),s.coordinate));return i||a.push(t),o||a.push(n),a},uA=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!a)return null;var m=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,h=i==="category"&&a.bandwidth?a.bandwidth()/m:0;if(h=p==="angleAxis"&&o&&o.length>=2?tn(o[0]-o[1])*2*h:h,d||f){var g=(d||f||[]).map((b,S)=>{var w=r?r.indexOf(b):b;return{coordinate:a(w)+h,value:b,offset:h,index:S}});return g.filter(b=>!Cn(b.coordinate))}return l&&c?c.map((b,S)=>({coordinate:a(b)+h,value:b,index:S,offset:h})):a.ticks&&u!=null?a.ticks(u).map((b,S)=>({coordinate:a(b)+h,value:b,offset:h,index:S})):a.domain().map((b,S)=>({coordinate:a(b)+h,value:r?r[b]:b,index:S,offset:h}))},wS=1e-4,l7=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-wS,o=Math.max(r[0],r[1])+wS,a=e(t[0]),s=e(t[n-1]);(a<i||a>o||s<i||s>o)&&e.domain([t[0],t[n-1]])}},c7=(e,t)=>{if(!t||t.length!==2||!pe(t[0])||!pe(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!pe(e[0])||e[0]<n)&&(i[0]=n),(!pe(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},u7=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,a=0;a<t;++a){var s=Cn(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1])}},d7=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var a=Cn(e[o][n][1])?e[o][n][0]:e[o][n][1];a>=0?(e[o][n][0]=i,e[o][n][1]=i+a,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},f7={sign:u7,expand:O8,none:Ks,silhouette:E8,wiggle:P8,positive:d7},p7=(e,t,n)=>{var r=f7[n],i=S8().keys(t).value((o,a)=>+nt(o,a,0)).order(Iv).offset(r);return i(e)};function dA(e){return e==null?void 0:String(e)}function If(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ht(i[t.dataKey])){var s=QC(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=nt(i,ht(a)?t.dataKey:a);return ht(l)?null:t.scale(l)}var _S=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:a}=e;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var s=nt(o,t.dataKey,t.scale.domain()[a]);return ht(s)?null:t.scale(s)-i/2+r},h7=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},m7=e=>{var t=e.flat(2).filter(pe);return[Math.min(...t),Math.max(...t)]},g7=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],v7=(e,t,n)=>{if(e!=null)return g7(Object.keys(e).reduce((r,i)=>{var o=e[i],{stackedData:a}=o,s=a.reduce((l,c)=>{var u=lA(c,t,n),d=m7(u);return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},SS=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xa=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=rh(t,u=>u.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function ES(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return Ar(Ar({},t),{},{dataKey:n,payload:r,value:i,name:o})}function ea(e,t){if(e)return String(e);if(typeof t=="string")return t}function y7(e,t,n,r,i){if(n==="horizontal"||n==="vertical"){var o=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return o?{x:e,y:t}:null}return r?n7({x:e,y:t},r):null}var b7=(e,t,n,r)=>{var i=t.find(c=>c&&c.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.y};if(e==="vertical")return{x:r.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,{radius:a}=r;return Ar(Ar(Ar({},r),Wt(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return Ar(Ar(Ar({},r),Wt(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},x7=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,vo=e=>e.layout.width,yo=e=>e.layout.height,w7=e=>e.layout.scale,fA=e=>e.layout.margin,lh=W(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ch=W(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pA="data-recharts-item-index",hA="data-recharts-item-data-key",bu=60;function PS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PS(Object(n),!0).forEach(function(r){_7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _7(e,t,n){return(t=S7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S7(e){var t=O7(e,"string");return typeof t=="symbol"?t:t+""}function O7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E7=e=>e.brush.height;function P7(e){var t=ch(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:bu;return n+i}return n},0)}function k7(e){var t=ch(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:bu;return n+i}return n},0)}function C7(e){var t=lh(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function D7(e){var t=lh(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var Kt=W([vo,yo,fA,E7,P7,k7,C7,D7,TD,jW],(e,t,n,r,i,o,a,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},d={top:(n.top||0)+a,bottom:(n.bottom||0)+s},f=cd(cd({},d),u),p=f.bottom;f.bottom+=r,f=s7(f,l,c);var m=e-f.left-f.right,h=t-f.top-f.bottom;return cd(cd({brushBottom:p},f),{},{width:Math.max(m,0),height:Math.max(h,0)})}),A7=W(Kt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Wb=W(vo,yo,(e,t)=>({x:0,y:0,width:e,height:t})),T7=k.createContext(null),mn=()=>k.useContext(T7)!=null,uh=e=>e.brush,dh=W([uh,Kt,fA],(e,t,n)=>({height:e.height,x:pe(e.x)?e.x:t.left,y:pe(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:pe(e.width)?e.width:t.width})),fh=()=>{var e,t=mn(),n=ce(A7),r=ce(dh),i=(e=ce(uh))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},M7={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},mA=()=>{var e;return(e=ce(Kt))!==null&&e!==void 0?e:M7},zb=()=>ce(vo),Vb=()=>ce(yo),N7=()=>ce(e=>e.layout.margin),Ee=e=>e.layout.layoutType,xu=()=>ce(Ee),j7={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},gA=yr({name:"legend",initialState:j7,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 n=eo(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)}}}),{setLegendSize:kS,setLegendSettings:R7,addLegendPayload:vA,removeLegendPayload:yA}=gA.actions,I7=gA.reducer,L7=["contextPayload"];function qv(){return qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qv.apply(null,arguments)}function CS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CS(Object(n),!0).forEach(function(r){Hb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hb(e,t,n){return(t=F7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F7(e){var t=$7(e,"string");return typeof t=="symbol"?t:t+""}function $7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B7(e,t){if(e==null)return{};var n,r,i=W7(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function W7(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function z7(e){return e.value}function V7(e){var{contextPayload:t}=e,n=B7(e,L7),r=PD(t,e.payloadUniqBy,z7),i=Gs(Gs({},n),{},{payload:r});return O.isValidElement(e.content)?O.cloneElement(e.content,i):typeof e.content=="function"?O.createElement(e.content,i):O.createElement(Mb,i)}function H7(e,t,n,r,i,o){var{layout:a,align:s,verticalAlign:l}=t,c,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(s==="center"&&a==="vertical"?c={left:((r||0)-o.width)/2}:c=s==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(l==="middle"?u={top:((i||0)-o.height)/2}:u=l==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Gs(Gs({},c),u)}function Y7(e){var t=xt();return k.useEffect(()=>{t(R7(e))},[t,e]),null}function U7(e){var t=xt();return k.useEffect(()=>(t(kS(e)),()=>{t(kS({width:0,height:0}))}),[t,e]),null}function K7(e){var t=LW(),n=K3(),r=N7(),{width:i,height:o,wrapperStyle:a,portal:s}=e,[l,c]=MD([t]),u=zb(),d=Vb();if(u==null||d==null)return null;var f=u-(r.left||0)-(r.right||0),p=ph.getWidthOrHeight(e.layout,o,i,f),m=s?a:Gs(Gs({position:"absolute",width:p?.width||i||"auto",height:p?.height||o||"auto"},H7(a,e,r,u,d,l)),a),h=s??n;if(h==null)return null;var g=O.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:c},O.createElement(Y7,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),O.createElement(U7,{width:l.width,height:l.height}),O.createElement(V7,qv({},e,p,{margin:r,chartWidth:u,chartHeight:d,contextPayload:t})));return Ui.createPortal(g,h)}let ph=class extends k.PureComponent{static getWidthOrHeight(t,n,r,i){return t==="vertical"&&pe(n)?{height:n}:t==="horizontal"?{width:r||i}:null}render(){return O.createElement(K7,this.props)}};Hb(ph,"displayName","Legend");Hb(ph,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function Gv(){return Gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gv.apply(null,arguments)}function DS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DS(Object(n),!0).forEach(function(r){q7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q7(e,t,n){return(t=G7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G7(e){var t=X7(e,"string");return typeof t=="symbol"?t:t+""}function X7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q7(e){return Array.isArray(e)&&jr(e[0])&&jr(e[1])?e.join(" ~ "):e}var Z7=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:d,accessibilityLayer:f=!1}=e,p=()=>{if(o&&o.length){var _={padding:0,margin:0},E=(s?rh(o,s):o).map((C,D)=>{if(C.type==="none")return null;var T=C.formatter||a||Q7,{value:j,name:A}=C,P=j,N=A;if(T){var M=T(j,A,C,D,o);if(Array.isArray(M))[P,N]=M;else if(M!=null)P=M;else return null}var I=vg({display:"block",paddingTop:4,paddingBottom:4,color:C.color||"#000"},r);return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:I},jr(N)?O.createElement("span",{className:"recharts-tooltip-item-name"},N):null,jr(N)?O.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,O.createElement("span",{className:"recharts-tooltip-item-value"},P),O.createElement("span",{className:"recharts-tooltip-item-unit"},C.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:_},E)}return null},m=vg({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),h=vg({margin:0},i),g=!ht(u),b=g?u:"",S=oe("recharts-default-tooltip",l),w=oe("recharts-tooltip-label",c);g&&d&&o!==void 0&&o!==null&&(b=d(u,o));var x=f?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",Gv({className:S,style:m},x),O.createElement("p",{className:w,style:h},O.isValidElement(b)?b:"".concat(b)),p())},Il="recharts-tooltip-wrapper",J7={visibility:"hidden"};function eV(e){var{coordinate:t,translateX:n,translateY:r}=e;return oe(Il,{["".concat(Il,"-right")]:pe(n)&&t&&pe(t.x)&&n>=t.x,["".concat(Il,"-left")]:pe(n)&&t&&pe(t.x)&&n<t.x,["".concat(Il,"-bottom")]:pe(r)&&t&&pe(t.y)&&r>=t.y,["".concat(Il,"-top")]:pe(r)&&t&&pe(t.y)&&r<t.y})}function AS(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(o&&pe(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var f=l[r];if(f==null)return 0;if(a[r]){var p=u,m=f;return p<m?Math.max(d,f):Math.max(u,f)}if(c==null)return 0;var h=d+s,g=f+c;return h>g?Math.max(u,f):Math.max(d,f)}function tV(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function nV(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:a,useTranslate3d:s,viewBox:l}=e,c,u,d;return a.height>0&&a.width>0&&n?(u=AS({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=AS({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=tV({translateX:u,translateY:d,useTranslate3d:s})):c=J7,{cssProperties:c,cssClasses:eV({translateX:u,translateY:d,coordinate:n})}}function TS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ud(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TS(Object(n),!0).forEach(function(r){Xv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xv(e,t,n){return(t=rV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rV(e){var t=iV(e,"string");return typeof t=="symbol"?t:t+""}function iV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class oV extends k.PureComponent{constructor(){super(...arguments),Xv(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Xv(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:d,useTranslate3d:f,viewBox:p,wrapperStyle:m,lastBoundingBox:h,innerRef:g,hasPortalFromProps:b}=this.props,{cssClasses:S,cssProperties:w}=nV({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:h.height,width:h.width},useTranslate3d:f,viewBox:p}),x=b?{}:ud(ud({transition:l&&t?"transform ".concat(r,"ms ").concat(i):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),_=ud(ud({},x),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},m);return O.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:S,style:_,ref:g},o)}}var aV=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),bo={devToolsEnabled:!1,isSsr:aV()},bA=()=>ce(e=>e.rootProps.accessibilityLayer);function dn(e){return Number.isFinite(e)}function Xs(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qv.apply(null,arguments)}function MS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MS(Object(n),!0).forEach(function(r){sV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sV(e,t,n){return(t=lV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lV(e){var t=cV(e,"string");return typeof t=="symbol"?t:t+""}function cV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jS={curveBasisClosed:f8,curveBasisOpen:p8,curveBasis:d8,curveBumpX:Q3,curveBumpY:Z3,curveLinearClosed:h8,curveLinear:th,curveMonotoneX:m8,curveMonotoneY:g8,curveNatural:v8,curveStep:y8,curveStepAfter:x8,curveStepBefore:b8},dd=e=>dn(e.x)&&dn(e.y),Ll=e=>e.x,Fl=e=>e.y,uV=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(pu(e));return(n==="curveMonotone"||n==="curveBump")&&t?jS["".concat(n).concat(t==="vertical"?"Y":"X")]:jS[n]||th},dV=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=e,a=uV(t,i),s=o?n.filter(dd):n,l;if(Array.isArray(r)){var c=o?r.filter(d=>dd(d)):r,u=s.map((d,f)=>NS(NS({},d),{},{base:c[f]}));return i==="vertical"?l=ed().y(Fl).x1(Ll).x0(d=>d.base.x):l=ed().x(Ll).y1(Fl).y0(d=>d.base.y),l.defined(dd).curve(a),l(u)}return i==="vertical"&&pe(r)?l=ed().y(Fl).x1(Ll).x0(r):pe(r)?l=ed().x(Ll).y1(Fl).y0(r):l=aD().x(Ll).y(Fl),l.defined(dd).curve(a),l(s)},js=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var o=n&&n.length?dV(e):r;return O.createElement("path",Qv({},zr(e),Ob(e),{className:oe("recharts-curve",t),d:o===null?void 0:o,ref:i}))},fV=["x","y","top","left","width","height","className"];function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zv.apply(null,arguments)}function RS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RS(Object(n),!0).forEach(function(r){hV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hV(e,t,n){return(t=mV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mV(e){var t=gV(e,"string");return typeof t=="symbol"?t:t+""}function gV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vV(e,t){if(e==null)return{};var n,r,i=yV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yV(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var bV=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),xV=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=e,l=vV(e,fV),c=pV({x:t,y:n,top:r,left:i,width:o,height:a},l);return!pe(t)||!pe(n)||!pe(o)||!pe(a)||!pe(r)||!pe(i)?null:O.createElement("path",Zv({},ct(c,!0),{className:oe("recharts-cross",s),d:bV(t,n,o,a,r,i)}))};function wV(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function IS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IS(Object(n),!0).forEach(function(r){SV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SV(e,t,n){return(t=OV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OV(e){var t=EV(e,"string");return typeof t=="symbol"?t:t+""}function EV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function qt(e,t){var n=_V({},e),r=t,i=Object.keys(t),o=i.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return o}function PV(){}function LS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LS(Object(n),!0).forEach(function(r){kV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kV(e,t,n){return(t=CV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CV(e){var t=DV(e,"string");return typeof t=="symbol"?t:t+""}function DV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AV=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),xA=(e,t,n)=>e.map(r=>"".concat(AV(r)," ").concat(t,"ms ").concat(n)).join(","),TV=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Ic=(e,t)=>Object.keys(t).reduce((n,r)=>FS(FS({},n),{},{[r]:e(r,t[r])}),{});function $S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$S(Object(n),!0).forEach(function(r){MV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$S(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MV(e,t,n){return(t=NV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NV(e){var t=jV(e,"string");return typeof t=="symbol"?t:t+""}function jV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lf=(e,t,n)=>e+(t-e)*n,Jv=e=>{var{from:t,to:n}=e;return t!==n},wA=(e,t,n)=>{var r=Ic((i,o)=>{if(Jv(o)){var[a,s]=e(o.from,o.to,o.velocity);return ln(ln({},o),{},{from:a,velocity:s})}return o},t);return n<1?Ic((i,o)=>Jv(o)?ln(ln({},o),{},{velocity:Lf(o.velocity,r[i].velocity,n),from:Lf(o.from,r[i].from,n)}):o,t):wA(e,r,n-1)};function RV(e,t,n,r,i,o){var a,s=r.reduce((f,p)=>ln(ln({},f),{},{[p]:{from:e[p],velocity:0,to:t[p]}}),{}),l=()=>Ic((f,p)=>p.from,s),c=()=>!Object.values(s).filter(Jv).length,u=null,d=f=>{a||(a=f);var p=f-a,m=p/n.dt;s=wA(n,s,m),i(ln(ln(ln({},e),t),l())),a=f,c()||(u=o.setTimeout(d))};return()=>(u=o.setTimeout(d),()=>{u()})}function IV(e,t,n,r,i,o,a){var s=null,l=i.reduce((d,f)=>ln(ln({},d),{},{[f]:[e[f],t[f]]}),{}),c,u=d=>{c||(c=d);var f=(d-c)/r,p=Ic((h,g)=>Lf(...g,n(f)),l);if(o(ln(ln(ln({},e),t),p)),f<1)s=a.setTimeout(u);else{var m=Ic((h,g)=>Lf(...g,n(1)),l);o(ln(ln(ln({},e),t),m))}};return()=>(s=a.setTimeout(u),()=>{s()})}const LV=(e,t,n,r,i,o)=>{var a=TV(e,t);return n.isStepper===!0?RV(e,t,n,a,i,o):IV(e,t,n,r,a,i,o)};var Ff=1e-4,_A=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],SA=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),BS=(e,t)=>n=>{var r=_A(e,t);return SA(r,n)},FV=(e,t)=>n=>{var r=_A(e,t),i=[...r.map((o,a)=>o*a).slice(1),0];return SA(i,n)},WS=function(){for(var t,n,r,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];if(a.length===1)switch(a[0]){case"linear":[t,r,n,i]=[0,0,1,1];break;case"ease":[t,r,n,i]=[.25,.1,.25,1];break;case"ease-in":[t,r,n,i]=[.42,0,1,1];break;case"ease-out":[t,r,n,i]=[.42,0,.58,1];break;case"ease-in-out":[t,r,n,i]=[0,0,.58,1];break;default:{var l=a[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([t,r,n,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else a.length===4&&([t,r,n,i]=a);var c=BS(t,n),u=BS(r,i),d=FV(t,n),f=m=>m>1?1:m<0?0:m,p=m=>{for(var h=m>1?1:m,g=h,b=0;b<8;++b){var S=c(g)-h,w=d(g);if(Math.abs(S-h)<Ff||w<Ff)return u(g);g=f(g-S/w)}return u(g)};return p.isStepper=!1,p},$V=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(a,s,l)=>{var c=-(a-s)*n,u=l*r,d=l+(c-u)*i/1e3,f=l*i/1e3+a;return Math.abs(f-s)<Ff&&Math.abs(d)<Ff?[s,0]:[f,d]};return o.isStepper=!0,o.dt=i,o},BV=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return WS(e);case"spring":return $V();default:if(e.split("(")[0]==="cubic-bezier")return WS(e)}return typeof e=="function"?e:null};function WV(e){var t,n=()=>null,r=!1,i=null,o=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...c]=s;if(typeof l=="number"){i=e.setTimeout(o.bind(null,c),l);return}o(l),i=e.setTimeout(o.bind(null,c));return}typeof a=="string"&&(t=a,n(t)),typeof a=="object"&&(t=a,n(t)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,i&&(i(),i=null),o(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>e}}class zV{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=a=>{a-r>=n?t(a):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}function VV(){return WV(new zV)}var HV=k.createContext(VV);function YV(e,t){var n=k.useContext(HV);return k.useMemo(()=>t??n(e),[e,t,n])}var UV={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},zS={t:0},yg={t:1};function dl(e){var t=qt(e,UV),{isActive:n,canBegin:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=YV(t.animationId,t.animationManager),[d,f]=k.useState(n?zS:yg),p=k.useRef(null);return k.useEffect(()=>{n||f(yg)},[n]),k.useEffect(()=>{if(!n||!r)return PV;var m=LV(zS,yg,BV(o),i,f,u.getTimeoutController()),h=()=>{p.current=m()};return u.start([l,a,h,i,s]),()=>{u.stop(),p.current&&p.current(),s()}},[n,r,i,o,a,l,s,u]),c(d.t)}function fl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(Nc(t)),r=k.useRef(e);return r.current!==e&&(n.current=Nc(t),r.current=e),n.current}function VS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VS(Object(n),!0).forEach(function(r){KV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KV(e,t,n){return(t=qV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qV(e){var t=GV(e,"string");return typeof t=="symbol"?t:t+""}function GV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $f(){return $f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$f.apply(null,arguments)}var YS=(e,t,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),a=r>=0?1:-1,s=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>o?o:i[d];c="M".concat(e,",").concat(t+a*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+n-s*u[1],",").concat(t),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
176
+ (See https://redux.js.org/faq/organizing-state#can-i-put-functions-promises-or-other-non-serializable-items-in-my-store-state)`)}}),h.warnIfExceeded()),m}}}function sd(e){return typeof e=="boolean"}var hz=()=>function(t){const{thunk:n=!0,immutableCheck:r=!0,serializableCheck:i=!0,actionCreatorCheck:o=!0}=t??{};let a=new HD;if(n&&(sd(n)?a.push(rz):a.push(iz(n.extraArgument))),process.env.NODE_ENV!=="production"){if(r){let s={};sd(r)||(s=r),a.unshift(fz(s))}if(i){let s={};sd(i)||(s=i),a.push(pz(s))}if(o){let s={};sd(o)||(s=o),a.unshift(cz(s))}}return a},mz="RTK_autoBatch",hS=e=>t=>{setTimeout(t,e)},gz=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let i=!0,o=!1,a=!1;const s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:hS(10):e.type==="callback"?e.queueNotification:hS(e.timeout),c=()=>{a=!1,o&&(o=!1,s.forEach(u=>u()))};return Object.assign({},r,{subscribe(u){const d=()=>i&&u(),f=r.subscribe(d);return s.add(u),()=>{f(),s.delete(u)}},dispatch(u){try{return i=!u?.meta?.[mz],o=!i,o&&(a||(a=!0,l(c))),r.dispatch(u)}finally{i=!0}}})},vz=e=>function(n){const{autoBatch:r=!0}=n??{};let i=new HD(e);return r&&i.push(gz(typeof r=="object"?r:void 0)),i};function yz(e){const t=hz(),{reducer:n=void 0,middleware:r,devTools:i=!0,duplicateMiddlewareCheck:o=!0,preloadedState:a=void 0,enhancers:s=void 0}=e||{};let l;if(typeof n=="function")l=n;else if(mu(n))l=jD(n);else throw new Error(process.env.NODE_ENV==="production"?Re(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"&&r&&typeof r!="function")throw new Error(process.env.NODE_ENV==="production"?Re(2):"`middleware` field must be a callback");let c;if(typeof r=="function"){if(c=r(t),process.env.NODE_ENV!=="production"&&!Array.isArray(c))throw new Error(process.env.NODE_ENV==="production"?Re(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(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Re(4):"each middleware provided to configureStore must be a function");if(process.env.NODE_ENV!=="production"&&o){let h=new Set;c.forEach(g=>{if(h.has(g))throw new Error(process.env.NODE_ENV==="production"?Re(42):"Duplicate middleware references found when creating the store. Ensure that each middleware is only included once.");h.add(g)})}let u=Df;i&&(u=oz({trace:process.env.NODE_ENV!=="production",...typeof i=="object"&&i}));const d=UW(...c),f=vz(d);if(process.env.NODE_ENV!=="production"&&s&&typeof s!="function")throw new Error(process.env.NODE_ENV==="production"?Re(5):"`enhancers` field must be a callback");let p=typeof s=="function"?s(f):f();if(process.env.NODE_ENV!=="production"&&!Array.isArray(p))throw new Error(process.env.NODE_ENV==="production"?Re(6):"`enhancers` callback must return an array");if(process.env.NODE_ENV!=="production"&&p.some(h=>typeof h!="function"))throw new Error(process.env.NODE_ENV==="production"?Re(7):"each enhancer provided to configureStore must be a function");process.env.NODE_ENV!=="production"&&c.length&&!p.includes(d)&&console.error("middlewares were provided, but middleware enhancer was not included in final enhancers - make sure to call `getDefaultEnhancers`");const m=u(...p);return ND(l,a,m)}function GD(e){const t={},n=[];let r;const i={addCase(o,a){if(process.env.NODE_ENV!=="production"){if(n.length>0)throw new Error(process.env.NODE_ENV==="production"?Re(26):"`builder.addCase` should only be called before calling `builder.addMatcher`");if(r)throw new Error(process.env.NODE_ENV==="production"?Re(27):"`builder.addCase` should only be called before calling `builder.addDefaultCase`")}const s=typeof o=="string"?o:o.type;if(!s)throw new Error(process.env.NODE_ENV==="production"?Re(28):"`builder.addCase` cannot be called with an empty action type");if(s in t)throw new Error(process.env.NODE_ENV==="production"?Re(29):`\`builder.addCase\` cannot be called with two reducers for the same action type '${s}'`);return t[s]=a,i},addAsyncThunk(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Re(43):"`builder.addAsyncThunk` should only be called before calling `builder.addDefaultCase`");return a.pending&&(t[o.pending.type]=a.pending),a.rejected&&(t[o.rejected.type]=a.rejected),a.fulfilled&&(t[o.fulfilled.type]=a.fulfilled),a.settled&&n.push({matcher:o.settled,reducer:a.settled}),i},addMatcher(o,a){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Re(30):"`builder.addMatcher` should only be called before calling `builder.addDefaultCase`");return n.push({matcher:o,reducer:a}),i},addDefaultCase(o){if(process.env.NODE_ENV!=="production"&&r)throw new Error(process.env.NODE_ENV==="production"?Re(31):"`builder.addDefaultCase` can only be called once");return r=o,i}};return e(i),[t,n,r]}function bz(e){return typeof e=="function"}function xz(e,t){if(process.env.NODE_ENV!=="production"&&typeof t=="object")throw new Error(process.env.NODE_ENV==="production"?Re(8):"The object notation for `createReducer` has been removed. Please use the 'builder callback' notation instead: https://redux-toolkit.js.org/api/createReducer");let[n,r,i]=GD(t),o;if(bz(e))o=()=>pS(e());else{const s=pS(e);o=()=>s}function a(s=o(),l){let c=[n[l.type],...r.filter(({matcher:u})=>u(l)).map(({reducer:u})=>u)];return c.filter(u=>!!u).length===0&&(c=[i]),c.reduce((u,d)=>{if(d)if(qa(u)){const p=d(u,l);return p===void 0?u:p}else{if(so(u))return WD(u,f=>d(f,l));{const f=d(u,l);if(f===void 0){if(u===null)return u;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return u},s)}return a.getInitialState=o,a}var wz="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",_z=(e=21)=>{let t="",n=e;for(;n--;)t+=wz[Math.random()*64|0];return t},Sz=Symbol.for("rtk-slice-createasyncthunk");function Oz(e,t){return`${e}/${t}`}function Ez({creators:e}={}){const t=e?.asyncThunk?.[Sz];return function(r){const{name:i,reducerPath:o=i}=r;if(!i)throw new Error(process.env.NODE_ENV==="production"?Re(11):"`name` is a required option for createSlice");typeof process<"u"&&process.env.NODE_ENV==="development"&&r.initialState===void 0&&console.error("You must provide an `initialState` value that is not `undefined`. You may have misspelled `initialState`");const a=(typeof r.reducers=="function"?r.reducers(kz()):r.reducers)||{},s=Object.keys(a),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},c={addCase(w,x){const _=typeof w=="string"?w:w.type;if(!_)throw new Error(process.env.NODE_ENV==="production"?Re(12):"`context.addCase` cannot be called with an empty action type");if(_ in l.sliceCaseReducersByType)throw new Error(process.env.NODE_ENV==="production"?Re(13):"`context.addCase` cannot be called with two reducers for the same action type: "+_);return l.sliceCaseReducersByType[_]=x,c},addMatcher(w,x){return l.sliceMatchers.push({matcher:w,reducer:x}),c},exposeAction(w,x){return l.actionCreators[w]=x,c},exposeCaseReducer(w,x){return l.sliceCaseReducersByName[w]=x,c}};s.forEach(w=>{const x=a[w],_={reducerName:w,type:Oz(i,w),createNotation:typeof r.reducers=="function"};Dz(x)?Tz(_,x,c,t):Cz(_,x,c)});function u(){if(process.env.NODE_ENV!=="production"&&typeof r.extraReducers=="object")throw new Error(process.env.NODE_ENV==="production"?Re(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={},x=[],_=void 0]=typeof r.extraReducers=="function"?GD(r.extraReducers):[r.extraReducers],E={...w,...l.sliceCaseReducersByType};return xz(r.initialState,C=>{for(let D in E)C.addCase(D,E[D]);for(let D of l.sliceMatchers)C.addMatcher(D.matcher,D.reducer);for(let D of x)C.addMatcher(D.matcher,D.reducer);_&&C.addDefaultCase(_)})}const d=w=>w,f=new Map,p=new WeakMap;let m;function h(w,x){return m||(m=u()),m(w,x)}function g(){return m||(m=u()),m.getInitialState()}function b(w,x=!1){function _(C){let D=C[w];if(typeof D>"u"){if(x)D=ad(p,_,g);else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Re(15):"selectSlice returned undefined for an uninjected slice reducer")}return D}function E(C=d){const D=ad(f,x,()=>new WeakMap);return ad(D,C,()=>{const T={};for(const[j,A]of Object.entries(r.selectors??{}))T[j]=Pz(A,C,()=>ad(p,C,g),x);return T})}return{reducerPath:w,getSelectors:E,get selectors(){return E(_)},selectSlice:_}}const S={name:i,reducer:h,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:g,...b(o),injectInto(w,{reducerPath:x,..._}={}){const E=x??o;return w.inject({reducerPath:E,reducer:h},_),{...S,...b(E,!0)}}};return S}}function Pz(e,t,n,r){function i(o,...a){let s=t(o);if(typeof s>"u"){if(r)s=n();else if(process.env.NODE_ENV!=="production")throw new Error(process.env.NODE_ENV==="production"?Re(16):"selectState returned undefined for an uninjected slice reducer")}return e(s,...a)}return i.unwrapped=e,i}var yr=Ez();function kz(){function e(t,n){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...n}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...n){return t(...n)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,n){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:n}},asyncThunk:e}}function Cz({type:e,reducerName:t,createNotation:n},r,i){let o,a;if("reducer"in r){if(n&&!Az(r))throw new Error(process.env.NODE_ENV==="production"?Re(17):"Please use the `create.preparedReducer` notation for prepared action creators with the `create` notation.");o=r.reducer,a=r.prepare}else o=r;i.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,a?Rr(e,a):Rr(e))}function Dz(e){return e._reducerDefinitionType==="asyncThunk"}function Az(e){return e._reducerDefinitionType==="reducerWithPrepare"}function Tz({type:e,reducerName:t},n,r,i){if(!i)throw new Error(process.env.NODE_ENV==="production"?Re(18):"Cannot use `create.asyncThunk` in the built-in `createSlice`. Use `buildCreateSlice({ creators: { asyncThunk: asyncThunkCreator } })` to create a customised version of `createSlice`.");const{payloadCreator:o,fulfilled:a,pending:s,rejected:l,settled:c,options:u}=n,d=i(e,o,u);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),l&&r.addCase(d.rejected,l),c&&r.addMatcher(d.settled,c),r.exposeCaseReducer(t,{fulfilled:a||ld,pending:s||ld,rejected:l||ld,settled:c||ld})}function ld(){}var Mz="task",XD="listener",QD="completed",$b="cancelled",Nz=`task-${$b}`,jz=`task-${QD}`,Uv=`${XD}-${$b}`,Rz=`${XD}-${QD}`,sh=class{constructor(e){this.code=e,this.message=`${Mz} ${$b} (reason: ${e})`}name="TaskAbortError";message},Bb=(e,t)=>{if(typeof e!="function")throw new TypeError(process.env.NODE_ENV==="production"?Re(32):`${t} is not a function`)},Nf=()=>{},ZD=(e,t=Nf)=>(e.catch(t),e),JD=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),$a=(e,t)=>{const n=e.signal;n.aborted||("reason"in n||Object.defineProperty(n,"reason",{enumerable:!0,value:t,configurable:!0,writable:!0}),e.abort(t))},Ba=e=>{if(e.aborted){const{reason:t}=e;throw new sh(t)}};function eA(e,t){let n=Nf;return new Promise((r,i)=>{const o=()=>i(new sh(e.reason));if(e.aborted){o();return}n=JD(e,o),t.finally(()=>n()).then(r,i)}).finally(()=>{n=Nf})}var Iz=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(n){return{status:n instanceof sh?"cancelled":"rejected",error:n}}finally{t?.()}},jf=e=>t=>ZD(eA(e,t).then(n=>(Ba(e),n))),tA=e=>{const t=jf(e);return n=>t(new Promise(r=>setTimeout(r,n)))},{assign:Ns}=Object,mS={},vu="listenerMiddleware",Lz=(e,t)=>{const n=r=>JD(e,()=>$a(r,e.reason));return(r,i)=>{Bb(r,"taskExecutor");const o=new AbortController;n(o);const a=Iz(async()=>{Ba(e),Ba(o.signal);const s=await r({pause:jf(o.signal),delay:tA(o.signal),signal:o.signal});return Ba(o.signal),s},()=>$a(o,jz));return i?.autoJoin&&t.push(a.catch(Nf)),{result:jf(e)(a),cancel(){$a(o,Nz)}}}},Fz=(e,t)=>{const n=async(r,i)=>{Ba(t);let o=()=>{};const s=[new Promise((l,c)=>{let u=e({predicate:r,effect:(d,f)=>{f.unsubscribe(),l([d,f.getState(),f.getOriginalState()])}});o=()=>{u(),c()}})];i!=null&&s.push(new Promise(l=>setTimeout(l,i,null)));try{const l=await eA(t,Promise.race(s));return Ba(t),l}finally{o()}};return(r,i)=>ZD(n(r,i))},nA=e=>{let{type:t,actionCreator:n,matcher:r,predicate:i,effect:o}=e;if(t)i=Rr(t).match;else if(n)t=n.type,i=n.match;else if(r)i=r;else if(!i)throw new Error(process.env.NODE_ENV==="production"?Re(21):"Creating or removing a listener requires one of the known fields for matching an action");return Bb(o,"options.listener"),{predicate:i,type:t,effect:o}},rA=Ns(e=>{const{type:t,predicate:n,effect:r}=nA(e);return{id:_z(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(process.env.NODE_ENV==="production"?Re(22):"Unsubscribe not initialized")}}},{withTypes:()=>rA}),gS=(e,t)=>{const{type:n,effect:r,predicate:i}=nA(t);return Array.from(e.values()).find(o=>(typeof n=="string"?o.type===n:o.predicate===i)&&o.effect===r)},Kv=e=>{e.pending.forEach(t=>{$a(t,Uv)})},$z=e=>()=>{e.forEach(Kv),e.clear()},vS=(e,t,n)=>{try{e(t,n)}catch(r){setTimeout(()=>{throw r},0)}},iA=Ns(Rr(`${vu}/add`),{withTypes:()=>iA}),Bz=Rr(`${vu}/removeAll`),oA=Ns(Rr(`${vu}/remove`),{withTypes:()=>oA}),Wz=(...e)=>{console.error(`${vu}/error`,...e)},yu=(e={})=>{const t=new Map,{extra:n,onError:r=Wz}=e;Bb(r,"onError");const i=u=>(u.unsubscribe=()=>t.delete(u.id),t.set(u.id,u),d=>{u.unsubscribe(),d?.cancelActive&&Kv(u)}),o=u=>{const d=gS(t,u)??rA(u);return i(d)};Ns(o,{withTypes:()=>o});const a=u=>{const d=gS(t,u);return d&&(d.unsubscribe(),u.cancelActive&&Kv(d)),!!d};Ns(a,{withTypes:()=>a});const s=async(u,d,f,p)=>{const m=new AbortController,h=Fz(o,m.signal),g=[];try{u.pending.add(m),await Promise.resolve(u.effect(d,Ns({},f,{getOriginalState:p,condition:(b,S)=>h(b,S).then(Boolean),take:h,delay:tA(m.signal),pause:jf(m.signal),extra:n,signal:m.signal,fork:Lz(m.signal,g),unsubscribe:u.unsubscribe,subscribe:()=>{t.set(u.id,u)},cancelActiveListeners:()=>{u.pending.forEach((b,S,w)=>{b!==m&&($a(b,Uv),w.delete(b))})},cancel:()=>{$a(m,Uv),u.pending.delete(m)},throwIfCancelled:()=>{Ba(m.signal)}})))}catch(b){b instanceof sh||vS(r,b,{raisedBy:"effect"})}finally{await Promise.all(g),$a(m,Rz),u.pending.delete(m)}},l=$z(t);return{middleware:u=>d=>f=>{if(!Ib(f))return d(f);if(iA.match(f))return o(f.payload);if(Bz.match(f)){l();return}if(oA.match(f))return a(f.payload);let p=u.getState();const m=()=>{if(p===mS)throw new Error(process.env.NODE_ENV==="production"?Re(23):`${vu}: getOriginalState can only be called synchronously`);return p};let h;try{if(h=d(f),t.size>0){const g=u.getState(),b=Array.from(t.values());for(const S of b){let w=!1;try{w=S.predicate(f,g,p)}catch(x){w=!1,vS(r,x,{raisedBy:"predicate"})}w&&s(S,f,u,m)}}}finally{p=mS}return h},startListening:o,stopListening:a,clearListeners:l}};function Re(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 zz={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},aA=yr({name:"chartLayout",initialState:zz,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 n,r,i,o;e.margin.top=(n=t.payload.top)!==null&&n!==void 0?n:0,e.margin.right=(r=t.payload.right)!==null&&r!==void 0?r:0,e.margin.bottom=(i=t.payload.bottom)!==null&&i!==void 0?i:0,e.margin.left=(o=t.payload.left)!==null&&o!==void 0?o:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:Vz,setLayout:Hz,setChartSize:Yz,setScale:Uz}=aA.actions,Kz=aA.reducer;function yS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?yS(Object(n),!0).forEach(function(r){qz(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qz(e,t,n){return(t=Gz(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Gz(e){var t=Xz(e,"string");return typeof t=="symbol"?t:t+""}function Xz(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Rf=Math.PI/180,Qz=e=>e*180/Math.PI,Wt=(e,t,n,r)=>({x:e+Math.cos(-Rf*r)*n,y:t+Math.sin(-Rf*r)*n}),sA=function(t,n){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0};return Math.min(Math.abs(t-(r.left||0)-(r.right||0)),Math.abs(n-(r.top||0)-(r.bottom||0)))/2},Zz=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return Math.sqrt((n-i)**2+(r-o)**2)},Jz=(e,t)=>{var{x:n,y:r}=e,{cx:i,cy:o}=t,a=Zz({x:n,y:r},{x:i,y:o});if(a<=0)return{radius:a,angle:0};var s=(n-i)/a,l=Math.acos(s);return r>o&&(l=2*Math.PI-l),{radius:a,angle:Qz(l),angleInRadian:l}},e7=e=>{var{startAngle:t,endAngle:n}=e,r=Math.floor(t/360),i=Math.floor(n/360),o=Math.min(r,i);return{startAngle:t-o*360,endAngle:n-o*360}},t7=(e,t)=>{var{startAngle:n,endAngle:r}=t,i=Math.floor(n/360),o=Math.floor(r/360),a=Math.min(i,o);return e+a*360},n7=(e,t)=>{var{x:n,y:r}=e,{radius:i,angle:o}=Jz({x:n,y:r},t),{innerRadius:a,outerRadius:s}=t;if(i<a||i>s||i===0)return null;var{startAngle:l,endAngle:c}=e7(t),u=o,d;if(l<=c){for(;u>c;)u-=360;for(;u<l;)u+=360;d=u>=l&&u<=c}else{for(;u>l;)u-=360;for(;u<c;)u+=360;d=u>=c&&u<=l}return d?bS(bS({},t),{},{radius:i,angle:t7(u,t)}):null};function lA(e,t,n){return Array.isArray(e)&&e&&t+n!==0?e.slice(t,n+1):e}function xS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ar(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?xS(Object(n),!0).forEach(function(r){r7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function r7(e,t,n){return(t=i7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i7(e){var t=o7(e,"string");return typeof t=="symbol"?t:t+""}function o7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function nt(e,t,n){return ht(e)||ht(t)?n:jr(t)?Ka(e,t,n):typeof t=="function"?t(e):n}var a7=(e,t,n,r,i)=>{var o,a=-1,s=(o=t?.length)!==null&&o!==void 0?o:0;if(s<=1||e==null)return 0;if(r==="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?n[l-1].coordinate:n[s-1].coordinate,u=n[l].coordinate,d=l>=s-1?n[0].coordinate:n[l+1].coordinate,f=void 0;if(nn(u-c)!==nn(d-u)){var p=[];if(nn(d-u)===nn(i[1]-i[0])){f=d;var m=u+i[1]-i[0];p[0]=Math.min(m,(m+c)/2),p[1]=Math.max(m,(m+c)/2)}else{f=c;var h=d+i[1]-i[0];p[0]=Math.min(u,(h+u)/2),p[1]=Math.max(u,(h+u)/2)}var g=[Math.min(u,(f+u)/2),Math.max(u,(f+u)/2)];if(e>g[0]&&e<=g[1]||e>=p[0]&&e<=p[1]){({index:a}=n[l]);break}}else{var b=Math.min(c,d),S=Math.max(c,d);if(e>(b+u)/2&&e<=(S+u)/2){({index:a}=n[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:a}=t[w]);break}}return a},s7=(e,t,n)=>{if(t&&n){var{width:r,height:i}=n,{align:o,verticalAlign:a,layout:s}=t;if((s==="vertical"||s==="horizontal"&&a==="middle")&&o!=="center"&&pe(e[o]))return Ar(Ar({},e),{},{[o]:e[o]+(r||0)});if((s==="horizontal"||s==="vertical"&&o==="center")&&a!=="middle"&&pe(e[a]))return Ar(Ar({},e),{},{[a]:e[a]+(i||0)})}return e},Di=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",cA=(e,t,n,r)=>{if(r)return e.map(s=>s.coordinate);var i,o,a=e.map(s=>(s.coordinate===t&&(i=!0),s.coordinate===n&&(o=!0),s.coordinate));return i||a.push(t),o||a.push(n),a},uA=(e,t,n)=>{if(!e)return null;var{duplicateDomain:r,type:i,range:o,scale:a,realScaleType:s,isCategorical:l,categoricalDomain:c,tickCount:u,ticks:d,niceTicks:f,axisType:p}=e;if(!a)return null;var m=s==="scaleBand"&&a.bandwidth?a.bandwidth()/2:2,h=i==="category"&&a.bandwidth?a.bandwidth()/m:0;if(h=p==="angleAxis"&&o&&o.length>=2?nn(o[0]-o[1])*2*h:h,d||f){var g=(d||f||[]).map((b,S)=>{var w=r?r.indexOf(b):b;return{coordinate:a(w)+h,value:b,offset:h,index:S}});return g.filter(b=>!Cn(b.coordinate))}return l&&c?c.map((b,S)=>({coordinate:a(b)+h,value:b,index:S,offset:h})):a.ticks&&u!=null?a.ticks(u).map((b,S)=>({coordinate:a(b)+h,value:b,offset:h,index:S})):a.domain().map((b,S)=>({coordinate:a(b)+h,value:r?r[b]:b,index:S,offset:h}))},wS=1e-4,l7=e=>{var t=e.domain();if(!(!t||t.length<=2)){var n=t.length,r=e.range(),i=Math.min(r[0],r[1])-wS,o=Math.max(r[0],r[1])+wS,a=e(t[0]),s=e(t[n-1]);(a<i||a>o||s<i||s>o)&&e.domain([t[0],t[n-1]])}},c7=(e,t)=>{if(!t||t.length!==2||!pe(t[0])||!pe(t[1]))return e;var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]),i=[e[0],e[1]];return(!pe(e[0])||e[0]<n)&&(i[0]=n),(!pe(e[1])||e[1]>r)&&(i[1]=r),i[0]>r&&(i[0]=r),i[1]<n&&(i[1]=n),i},u7=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0,a=0;a<t;++a){var s=Cn(e[a][n][1])?e[a][n][0]:e[a][n][1];s>=0?(e[a][n][0]=i,e[a][n][1]=i+s,i=e[a][n][1]):(e[a][n][0]=o,e[a][n][1]=o+s,o=e[a][n][1])}},d7=e=>{var t=e.length;if(!(t<=0))for(var n=0,r=e[0].length;n<r;++n)for(var i=0,o=0;o<t;++o){var a=Cn(e[o][n][1])?e[o][n][0]:e[o][n][1];a>=0?(e[o][n][0]=i,e[o][n][1]=i+a,i=e[o][n][1]):(e[o][n][0]=0,e[o][n][1]=0)}},f7={sign:u7,expand:O8,none:Ks,silhouette:E8,wiggle:P8,positive:d7},p7=(e,t,n)=>{var r=f7[n],i=S8().keys(t).value((o,a)=>+nt(o,a,0)).order(Iv).offset(r);return i(e)};function dA(e){return e==null?void 0:String(e)}function If(e){var{axis:t,ticks:n,bandSize:r,entry:i,index:o,dataKey:a}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!ht(i[t.dataKey])){var s=QC(n,"value",i[t.dataKey]);if(s)return s.coordinate+r/2}return n[o]?n[o].coordinate+r/2:null}var l=nt(i,ht(a)?t.dataKey:a);return ht(l)?null:t.scale(l)}var _S=e=>{var{axis:t,ticks:n,offset:r,bandSize:i,entry:o,index:a}=e;if(t.type==="category")return n[a]?n[a].coordinate+r:null;var s=nt(o,t.dataKey,t.scale.domain()[a]);return ht(s)?null:t.scale(s)-i/2+r},h7=e=>{var{numericAxis:t}=e,n=t.scale.domain();if(t.type==="number"){var r=Math.min(n[0],n[1]),i=Math.max(n[0],n[1]);return r<=0&&i>=0?0:i<0?i:r}return n[0]},m7=e=>{var t=e.flat(2).filter(pe);return[Math.min(...t),Math.max(...t)]},g7=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],v7=(e,t,n)=>{if(e!=null)return g7(Object.keys(e).reduce((r,i)=>{var o=e[i],{stackedData:a}=o,s=a.reduce((l,c)=>{var u=lA(c,t,n),d=m7(u);return[Math.min(l[0],d[0]),Math.max(l[1],d[1])]},[1/0,-1/0]);return[Math.min(s[0],r[0]),Math.max(s[1],r[1])]},[1/0,-1/0]))},SS=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,OS=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Xa=(e,t,n)=>{if(e&&e.scale&&e.scale.bandwidth){var r=e.scale.bandwidth();if(!n||r>0)return r}if(e&&t&&t.length>=2){for(var i=rh(t,u=>u.coordinate),o=1/0,a=1,s=i.length;a<s;a++){var l=i[a],c=i[a-1];o=Math.min((l.coordinate||0)-(c.coordinate||0),o)}return o===1/0?0:o}return n?void 0:0};function ES(e){var{tooltipEntrySettings:t,dataKey:n,payload:r,value:i,name:o}=e;return Ar(Ar({},t),{},{dataKey:n,payload:r,value:i,name:o})}function ea(e,t){if(e)return String(e);if(typeof t=="string")return t}function y7(e,t,n,r,i){if(n==="horizontal"||n==="vertical"){var o=e>=i.left&&e<=i.left+i.width&&t>=i.top&&t<=i.top+i.height;return o?{x:e,y:t}:null}return r?n7({x:e,y:t},r):null}var b7=(e,t,n,r)=>{var i=t.find(c=>c&&c.index===n);if(i){if(e==="horizontal")return{x:i.coordinate,y:r.y};if(e==="vertical")return{x:r.x,y:i.coordinate};if(e==="centric"){var o=i.coordinate,{radius:a}=r;return Ar(Ar(Ar({},r),Wt(r.cx,r.cy,a,o)),{},{angle:o,radius:a})}var s=i.coordinate,{angle:l}=r;return Ar(Ar(Ar({},r),Wt(r.cx,r.cy,s,l)),{},{angle:l,radius:s})}return{x:0,y:0}},x7=(e,t)=>t==="horizontal"?e.x:t==="vertical"?e.y:t==="centric"?e.angle:e.radius,vo=e=>e.layout.width,yo=e=>e.layout.height,w7=e=>e.layout.scale,fA=e=>e.layout.margin,lh=W(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),ch=W(e=>e.cartesianAxis.yAxis,e=>Object.values(e)),pA="data-recharts-item-index",hA="data-recharts-item-data-key",bu=60;function PS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PS(Object(n),!0).forEach(function(r){_7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _7(e,t,n){return(t=S7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S7(e){var t=O7(e,"string");return typeof t=="symbol"?t:t+""}function O7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var E7=e=>e.brush.height;function P7(e){var t=ch(e);return t.reduce((n,r)=>{if(r.orientation==="left"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:bu;return n+i}return n},0)}function k7(e){var t=ch(e);return t.reduce((n,r)=>{if(r.orientation==="right"&&!r.mirror&&!r.hide){var i=typeof r.width=="number"?r.width:bu;return n+i}return n},0)}function C7(e){var t=lh(e);return t.reduce((n,r)=>r.orientation==="top"&&!r.mirror&&!r.hide?n+r.height:n,0)}function D7(e){var t=lh(e);return t.reduce((n,r)=>r.orientation==="bottom"&&!r.mirror&&!r.hide?n+r.height:n,0)}var qt=W([vo,yo,fA,E7,P7,k7,C7,D7,TD,jW],(e,t,n,r,i,o,a,s,l,c)=>{var u={left:(n.left||0)+i,right:(n.right||0)+o},d={top:(n.top||0)+a,bottom:(n.bottom||0)+s},f=cd(cd({},d),u),p=f.bottom;f.bottom+=r,f=s7(f,l,c);var m=e-f.left-f.right,h=t-f.top-f.bottom;return cd(cd({brushBottom:p},f),{},{width:Math.max(m,0),height:Math.max(h,0)})}),A7=W(qt,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Wb=W(vo,yo,(e,t)=>({x:0,y:0,width:e,height:t})),T7=k.createContext(null),mn=()=>k.useContext(T7)!=null,uh=e=>e.brush,dh=W([uh,qt,fA],(e,t,n)=>({height:e.height,x:pe(e.x)?e.x:t.left,y:pe(e.y)?e.y:t.top+t.height+t.brushBottom-(n?.bottom||0),width:pe(e.width)?e.width:t.width})),fh=()=>{var e,t=mn(),n=ce(A7),r=ce(dh),i=(e=ce(uh))===null||e===void 0?void 0:e.padding;return!t||!r||!i?n:{width:r.width-i.left-i.right,height:r.height-i.top-i.bottom,x:i.left,y:i.top}},M7={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},mA=()=>{var e;return(e=ce(qt))!==null&&e!==void 0?e:M7},zb=()=>ce(vo),Vb=()=>ce(yo),N7=()=>ce(e=>e.layout.margin),Ee=e=>e.layout.layoutType,xu=()=>ce(Ee),j7={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},gA=yr({name:"legend",initialState:j7,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 n=eo(e).payload.indexOf(t.payload);n>-1&&e.payload.splice(n,1)}}}),{setLegendSize:kS,setLegendSettings:R7,addLegendPayload:vA,removeLegendPayload:yA}=gA.actions,I7=gA.reducer,L7=["contextPayload"];function qv(){return qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},qv.apply(null,arguments)}function CS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Gs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?CS(Object(n),!0).forEach(function(r){Hb(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):CS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hb(e,t,n){return(t=F7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function F7(e){var t=$7(e,"string");return typeof t=="symbol"?t:t+""}function $7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function B7(e,t){if(e==null)return{};var n,r,i=W7(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function W7(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function z7(e){return e.value}function V7(e){var{contextPayload:t}=e,n=B7(e,L7),r=PD(t,e.payloadUniqBy,z7),i=Gs(Gs({},n),{},{payload:r});return O.isValidElement(e.content)?O.cloneElement(e.content,i):typeof e.content=="function"?O.createElement(e.content,i):O.createElement(Mb,i)}function H7(e,t,n,r,i,o){var{layout:a,align:s,verticalAlign:l}=t,c,u;return(!e||(e.left===void 0||e.left===null)&&(e.right===void 0||e.right===null))&&(s==="center"&&a==="vertical"?c={left:((r||0)-o.width)/2}:c=s==="right"?{right:n&&n.right||0}:{left:n&&n.left||0}),(!e||(e.top===void 0||e.top===null)&&(e.bottom===void 0||e.bottom===null))&&(l==="middle"?u={top:((i||0)-o.height)/2}:u=l==="bottom"?{bottom:n&&n.bottom||0}:{top:n&&n.top||0}),Gs(Gs({},c),u)}function Y7(e){var t=xt();return k.useEffect(()=>{t(R7(e))},[t,e]),null}function U7(e){var t=xt();return k.useEffect(()=>(t(kS(e)),()=>{t(kS({width:0,height:0}))}),[t,e]),null}function K7(e){var t=LW(),n=K3(),r=N7(),{width:i,height:o,wrapperStyle:a,portal:s}=e,[l,c]=MD([t]),u=zb(),d=Vb();if(u==null||d==null)return null;var f=u-(r.left||0)-(r.right||0),p=ph.getWidthOrHeight(e.layout,o,i,f),m=s?a:Gs(Gs({position:"absolute",width:p?.width||i||"auto",height:p?.height||o||"auto"},H7(a,e,r,u,d,l)),a),h=s??n;if(h==null)return null;var g=O.createElement("div",{className:"recharts-legend-wrapper",style:m,ref:c},O.createElement(Y7,{layout:e.layout,align:e.align,verticalAlign:e.verticalAlign,itemSorter:e.itemSorter}),O.createElement(U7,{width:l.width,height:l.height}),O.createElement(V7,qv({},e,p,{margin:r,chartWidth:u,chartHeight:d,contextPayload:t})));return Ui.createPortal(g,h)}let ph=class extends k.PureComponent{static getWidthOrHeight(t,n,r,i){return t==="vertical"&&pe(n)?{height:n}:t==="horizontal"?{width:r||i}:null}render(){return O.createElement(K7,this.props)}};Hb(ph,"displayName","Legend");Hb(ph,"defaultProps",{align:"center",iconSize:14,itemSorter:"value",layout:"horizontal",verticalAlign:"bottom"});function Gv(){return Gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gv.apply(null,arguments)}function DS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vg(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DS(Object(n),!0).forEach(function(r){q7(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function q7(e,t,n){return(t=G7(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function G7(e){var t=X7(e,"string");return typeof t=="symbol"?t:t+""}function X7(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Q7(e){return Array.isArray(e)&&jr(e[0])&&jr(e[1])?e.join(" ~ "):e}var Z7=e=>{var{separator:t=" : ",contentStyle:n={},itemStyle:r={},labelStyle:i={},payload:o,formatter:a,itemSorter:s,wrapperClassName:l,labelClassName:c,label:u,labelFormatter:d,accessibilityLayer:f=!1}=e,p=()=>{if(o&&o.length){var _={padding:0,margin:0},E=(s?rh(o,s):o).map((C,D)=>{if(C.type==="none")return null;var T=C.formatter||a||Q7,{value:j,name:A}=C,P=j,N=A;if(T){var M=T(j,A,C,D,o);if(Array.isArray(M))[P,N]=M;else if(M!=null)P=M;else return null}var I=vg({display:"block",paddingTop:4,paddingBottom:4,color:C.color||"#000"},r);return O.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(D),style:I},jr(N)?O.createElement("span",{className:"recharts-tooltip-item-name"},N):null,jr(N)?O.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,O.createElement("span",{className:"recharts-tooltip-item-value"},P),O.createElement("span",{className:"recharts-tooltip-item-unit"},C.unit||""))});return O.createElement("ul",{className:"recharts-tooltip-item-list",style:_},E)}return null},m=vg({margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},n),h=vg({margin:0},i),g=!ht(u),b=g?u:"",S=oe("recharts-default-tooltip",l),w=oe("recharts-tooltip-label",c);g&&d&&o!==void 0&&o!==null&&(b=d(u,o));var x=f?{role:"status","aria-live":"assertive"}:{};return O.createElement("div",Gv({className:S,style:m},x),O.createElement("p",{className:w,style:h},O.isValidElement(b)?b:"".concat(b)),p())},Il="recharts-tooltip-wrapper",J7={visibility:"hidden"};function eV(e){var{coordinate:t,translateX:n,translateY:r}=e;return oe(Il,{["".concat(Il,"-right")]:pe(n)&&t&&pe(t.x)&&n>=t.x,["".concat(Il,"-left")]:pe(n)&&t&&pe(t.x)&&n<t.x,["".concat(Il,"-bottom")]:pe(r)&&t&&pe(t.y)&&r>=t.y,["".concat(Il,"-top")]:pe(r)&&t&&pe(t.y)&&r<t.y})}function AS(e){var{allowEscapeViewBox:t,coordinate:n,key:r,offsetTopLeft:i,position:o,reverseDirection:a,tooltipDimension:s,viewBox:l,viewBoxDimension:c}=e;if(o&&pe(o[r]))return o[r];var u=n[r]-s-(i>0?i:0),d=n[r]+i;if(t[r])return a[r]?u:d;var f=l[r];if(f==null)return 0;if(a[r]){var p=u,m=f;return p<m?Math.max(d,f):Math.max(u,f)}if(c==null)return 0;var h=d+s,g=f+c;return h>g?Math.max(u,f):Math.max(d,f)}function tV(e){var{translateX:t,translateY:n,useTranslate3d:r}=e;return{transform:r?"translate3d(".concat(t,"px, ").concat(n,"px, 0)"):"translate(".concat(t,"px, ").concat(n,"px)")}}function nV(e){var{allowEscapeViewBox:t,coordinate:n,offsetTopLeft:r,position:i,reverseDirection:o,tooltipBox:a,useTranslate3d:s,viewBox:l}=e,c,u,d;return a.height>0&&a.width>0&&n?(u=AS({allowEscapeViewBox:t,coordinate:n,key:"x",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.width,viewBox:l,viewBoxDimension:l.width}),d=AS({allowEscapeViewBox:t,coordinate:n,key:"y",offsetTopLeft:r,position:i,reverseDirection:o,tooltipDimension:a.height,viewBox:l,viewBoxDimension:l.height}),c=tV({translateX:u,translateY:d,useTranslate3d:s})):c=J7,{cssProperties:c,cssClasses:eV({translateX:u,translateY:d,coordinate:n})}}function TS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ud(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TS(Object(n),!0).forEach(function(r){Xv(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Xv(e,t,n){return(t=rV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rV(e){var t=iV(e,"string");return typeof t=="symbol"?t:t+""}function iV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class oV extends k.PureComponent{constructor(){super(...arguments),Xv(this,"state",{dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}),Xv(this,"handleKeyDown",t=>{if(t.key==="Escape"){var n,r,i,o;this.setState({dismissed:!0,dismissedAtCoordinate:{x:(n=(r=this.props.coordinate)===null||r===void 0?void 0:r.x)!==null&&n!==void 0?n:0,y:(i=(o=this.props.coordinate)===null||o===void 0?void 0:o.y)!==null&&i!==void 0?i:0}})}})}componentDidMount(){document.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.removeEventListener("keydown",this.handleKeyDown)}componentDidUpdate(){var t,n;this.state.dismissed&&(((t=this.props.coordinate)===null||t===void 0?void 0:t.x)!==this.state.dismissedAtCoordinate.x||((n=this.props.coordinate)===null||n===void 0?void 0:n.y)!==this.state.dismissedAtCoordinate.y)&&(this.state.dismissed=!1)}render(){var{active:t,allowEscapeViewBox:n,animationDuration:r,animationEasing:i,children:o,coordinate:a,hasPayload:s,isAnimationActive:l,offset:c,position:u,reverseDirection:d,useTranslate3d:f,viewBox:p,wrapperStyle:m,lastBoundingBox:h,innerRef:g,hasPortalFromProps:b}=this.props,{cssClasses:S,cssProperties:w}=nV({allowEscapeViewBox:n,coordinate:a,offsetTopLeft:c,position:u,reverseDirection:d,tooltipBox:{height:h.height,width:h.width},useTranslate3d:f,viewBox:p}),x=b?{}:ud(ud({transition:l&&t?"transform ".concat(r,"ms ").concat(i):void 0},w),{},{pointerEvents:"none",visibility:!this.state.dismissed&&t&&s?"visible":"hidden",position:"absolute",top:0,left:0}),_=ud(ud({},x),{},{visibility:!this.state.dismissed&&t&&s?"visible":"hidden"},m);return O.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:S,style:_,ref:g},o)}}var aV=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),bo={devToolsEnabled:!1,isSsr:aV()},bA=()=>ce(e=>e.rootProps.accessibilityLayer);function dn(e){return Number.isFinite(e)}function Xs(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function Qv(){return Qv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qv.apply(null,arguments)}function MS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?MS(Object(n),!0).forEach(function(r){sV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):MS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sV(e,t,n){return(t=lV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lV(e){var t=cV(e,"string");return typeof t=="symbol"?t:t+""}function cV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var jS={curveBasisClosed:f8,curveBasisOpen:p8,curveBasis:d8,curveBumpX:Q3,curveBumpY:Z3,curveLinearClosed:h8,curveLinear:th,curveMonotoneX:m8,curveMonotoneY:g8,curveNatural:v8,curveStep:y8,curveStepAfter:x8,curveStepBefore:b8},dd=e=>dn(e.x)&&dn(e.y),Ll=e=>e.x,Fl=e=>e.y,uV=(e,t)=>{if(typeof e=="function")return e;var n="curve".concat(pu(e));return(n==="curveMonotone"||n==="curveBump")&&t?jS["".concat(n).concat(t==="vertical"?"Y":"X")]:jS[n]||th},dV=e=>{var{type:t="linear",points:n=[],baseLine:r,layout:i,connectNulls:o=!1}=e,a=uV(t,i),s=o?n.filter(dd):n,l;if(Array.isArray(r)){var c=o?r.filter(d=>dd(d)):r,u=s.map((d,f)=>NS(NS({},d),{},{base:c[f]}));return i==="vertical"?l=ed().y(Fl).x1(Ll).x0(d=>d.base.x):l=ed().x(Ll).y1(Fl).y0(d=>d.base.y),l.defined(dd).curve(a),l(u)}return i==="vertical"&&pe(r)?l=ed().y(Fl).x1(Ll).x0(r):pe(r)?l=ed().x(Ll).y1(Fl).y0(r):l=aD().x(Ll).y(Fl),l.defined(dd).curve(a),l(s)},js=e=>{var{className:t,points:n,path:r,pathRef:i}=e;if((!n||!n.length)&&!r)return null;var o=n&&n.length?dV(e):r;return O.createElement("path",Qv({},zr(e),Ob(e),{className:oe("recharts-curve",t),d:o===null?void 0:o,ref:i}))},fV=["x","y","top","left","width","height","className"];function Zv(){return Zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Zv.apply(null,arguments)}function RS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function pV(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?RS(Object(n),!0).forEach(function(r){hV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):RS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hV(e,t,n){return(t=mV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mV(e){var t=gV(e,"string");return typeof t=="symbol"?t:t+""}function gV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vV(e,t){if(e==null)return{};var n,r,i=yV(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yV(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var bV=(e,t,n,r,i,o)=>"M".concat(e,",").concat(i,"v").concat(r,"M").concat(o,",").concat(t,"h").concat(n),xV=e=>{var{x:t=0,y:n=0,top:r=0,left:i=0,width:o=0,height:a=0,className:s}=e,l=vV(e,fV),c=pV({x:t,y:n,top:r,left:i,width:o,height:a},l);return!pe(t)||!pe(n)||!pe(o)||!pe(a)||!pe(r)||!pe(i)?null:O.createElement("path",Zv({},ct(c,!0),{className:oe("recharts-cross",s),d:bV(t,n,o,a,r,i)}))};function wV(e,t,n,r){var i=r/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-i:n.left+.5,y:e==="horizontal"?n.top+.5:t.y-i,width:e==="horizontal"?r:n.width-1,height:e==="horizontal"?n.height-1:r}}function IS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function _V(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?IS(Object(n),!0).forEach(function(r){SV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):IS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function SV(e,t,n){return(t=OV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function OV(e){var t=EV(e,"string");return typeof t=="symbol"?t:t+""}function EV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Gt(e,t){var n=_V({},e),r=t,i=Object.keys(t),o=i.reduce((a,s)=>(a[s]===void 0&&r[s]!==void 0&&(a[s]=r[s]),a),n);return o}function PV(){}function LS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function FS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LS(Object(n),!0).forEach(function(r){kV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function kV(e,t,n){return(t=CV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function CV(e){var t=DV(e,"string");return typeof t=="symbol"?t:t+""}function DV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var AV=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),xA=(e,t,n)=>e.map(r=>"".concat(AV(r)," ").concat(t,"ms ").concat(n)).join(","),TV=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((n,r)=>n.filter(i=>r.includes(i))),Ic=(e,t)=>Object.keys(t).reduce((n,r)=>FS(FS({},n),{},{[r]:e(r,t[r])}),{});function $S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$S(Object(n),!0).forEach(function(r){MV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$S(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MV(e,t,n){return(t=NV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NV(e){var t=jV(e,"string");return typeof t=="symbol"?t:t+""}function jV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Lf=(e,t,n)=>e+(t-e)*n,Jv=e=>{var{from:t,to:n}=e;return t!==n},wA=(e,t,n)=>{var r=Ic((i,o)=>{if(Jv(o)){var[a,s]=e(o.from,o.to,o.velocity);return ln(ln({},o),{},{from:a,velocity:s})}return o},t);return n<1?Ic((i,o)=>Jv(o)?ln(ln({},o),{},{velocity:Lf(o.velocity,r[i].velocity,n),from:Lf(o.from,r[i].from,n)}):o,t):wA(e,r,n-1)};function RV(e,t,n,r,i,o){var a,s=r.reduce((f,p)=>ln(ln({},f),{},{[p]:{from:e[p],velocity:0,to:t[p]}}),{}),l=()=>Ic((f,p)=>p.from,s),c=()=>!Object.values(s).filter(Jv).length,u=null,d=f=>{a||(a=f);var p=f-a,m=p/n.dt;s=wA(n,s,m),i(ln(ln(ln({},e),t),l())),a=f,c()||(u=o.setTimeout(d))};return()=>(u=o.setTimeout(d),()=>{u()})}function IV(e,t,n,r,i,o,a){var s=null,l=i.reduce((d,f)=>ln(ln({},d),{},{[f]:[e[f],t[f]]}),{}),c,u=d=>{c||(c=d);var f=(d-c)/r,p=Ic((h,g)=>Lf(...g,n(f)),l);if(o(ln(ln(ln({},e),t),p)),f<1)s=a.setTimeout(u);else{var m=Ic((h,g)=>Lf(...g,n(1)),l);o(ln(ln(ln({},e),t),m))}};return()=>(s=a.setTimeout(u),()=>{s()})}const LV=(e,t,n,r,i,o)=>{var a=TV(e,t);return n.isStepper===!0?RV(e,t,n,a,i,o):IV(e,t,n,r,a,i,o)};var Ff=1e-4,_A=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],SA=(e,t)=>e.map((n,r)=>n*t**r).reduce((n,r)=>n+r),BS=(e,t)=>n=>{var r=_A(e,t);return SA(r,n)},FV=(e,t)=>n=>{var r=_A(e,t),i=[...r.map((o,a)=>o*a).slice(1),0];return SA(i,n)},WS=function(){for(var t,n,r,i,o=arguments.length,a=new Array(o),s=0;s<o;s++)a[s]=arguments[s];if(a.length===1)switch(a[0]){case"linear":[t,r,n,i]=[0,0,1,1];break;case"ease":[t,r,n,i]=[.25,.1,.25,1];break;case"ease-in":[t,r,n,i]=[.42,0,1,1];break;case"ease-out":[t,r,n,i]=[.42,0,.58,1];break;case"ease-in-out":[t,r,n,i]=[0,0,.58,1];break;default:{var l=a[0].split("(");l[0]==="cubic-bezier"&&l[1].split(")")[0].split(",").length===4&&([t,r,n,i]=l[1].split(")")[0].split(",").map(m=>parseFloat(m)))}}else a.length===4&&([t,r,n,i]=a);var c=BS(t,n),u=BS(r,i),d=FV(t,n),f=m=>m>1?1:m<0?0:m,p=m=>{for(var h=m>1?1:m,g=h,b=0;b<8;++b){var S=c(g)-h,w=d(g);if(Math.abs(S-h)<Ff||w<Ff)return u(g);g=f(g-S/w)}return u(g)};return p.isStepper=!1,p},$V=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:n=100,damping:r=8,dt:i=17}=t,o=(a,s,l)=>{var c=-(a-s)*n,u=l*r,d=l+(c-u)*i/1e3,f=l*i/1e3+a;return Math.abs(f-s)<Ff&&Math.abs(d)<Ff?[s,0]:[f,d]};return o.isStepper=!0,o.dt=i,o},BV=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return WS(e);case"spring":return $V();default:if(e.split("(")[0]==="cubic-bezier")return WS(e)}return typeof e=="function"?e:null};function WV(e){var t,n=()=>null,r=!1,i=null,o=a=>{if(!r){if(Array.isArray(a)){if(!a.length)return;var s=a,[l,...c]=s;if(typeof l=="number"){i=e.setTimeout(o.bind(null,c),l);return}o(l),i=e.setTimeout(o.bind(null,c));return}typeof a=="string"&&(t=a,n(t)),typeof a=="object"&&(t=a,n(t)),typeof a=="function"&&a()}};return{stop:()=>{r=!0},start:a=>{r=!1,i&&(i(),i=null),o(a)},subscribe:a=>(n=a,()=>{n=()=>null}),getTimeoutController:()=>e}}class zV{setTimeout(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=performance.now(),i=null,o=a=>{a-r>=n?t(a):typeof requestAnimationFrame=="function"&&(i=requestAnimationFrame(o))};return i=requestAnimationFrame(o),()=>{cancelAnimationFrame(i)}}}function VV(){return WV(new zV)}var HV=k.createContext(VV);function YV(e,t){var n=k.useContext(HV);return k.useMemo(()=>t??n(e),[e,t,n])}var UV={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},zS={t:0},yg={t:1};function dl(e){var t=Gt(e,UV),{isActive:n,canBegin:r,duration:i,easing:o,begin:a,onAnimationEnd:s,onAnimationStart:l,children:c}=t,u=YV(t.animationId,t.animationManager),[d,f]=k.useState(n?zS:yg),p=k.useRef(null);return k.useEffect(()=>{n||f(yg)},[n]),k.useEffect(()=>{if(!n||!r)return PV;var m=LV(zS,yg,BV(o),i,f,u.getTimeoutController()),h=()=>{p.current=m()};return u.start([l,a,h,i,s]),()=>{u.stop(),p.current&&p.current(),s()}},[n,r,i,o,a,l,s,u]),c(d.t)}function fl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",n=k.useRef(Nc(t)),r=k.useRef(e);return r.current!==e&&(n.current=Nc(t),r.current=e),n.current}function VS(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HS(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VS(Object(n),!0).forEach(function(r){KV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VS(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function KV(e,t,n){return(t=qV(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qV(e){var t=GV(e,"string");return typeof t=="symbol"?t:t+""}function GV(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function $f(){return $f=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$f.apply(null,arguments)}var YS=(e,t,n,r,i)=>{var o=Math.min(Math.abs(n)/2,Math.abs(r)/2),a=r>=0?1:-1,s=n>=0?1:-1,l=r>=0&&n>=0||r<0&&n<0?1:0,c;if(o>0&&i instanceof Array){for(var u=[0,0,0,0],d=0,f=4;d<f;d++)u[d]=i[d]>o?o:i[d];c="M".concat(e,",").concat(t+a*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+n-s*u[1],",").concat(t),u[1]>0&&(c+="A ".concat(u[1],",").concat(u[1],",0,0,").concat(l,`,
177
177
  `).concat(e+n,",").concat(t+a*u[1])),c+="L ".concat(e+n,",").concat(t+r-a*u[2]),u[2]>0&&(c+="A ".concat(u[2],",").concat(u[2],",0,0,").concat(l,`,
178
178
  `).concat(e+n-s*u[2],",").concat(t+r)),c+="L ".concat(e+s*u[3],",").concat(t+r),u[3]>0&&(c+="A ".concat(u[3],",").concat(u[3],",0,0,").concat(l,`,
179
179
  `).concat(e,",").concat(t+r-a*u[3])),c+="Z"}else if(o>0&&i===+i&&i>0){var p=Math.min(o,i);c="M ".concat(e,",").concat(t+a*p,`
@@ -183,14 +183,14 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
183
183
  L `).concat(e+n,",").concat(t+r-a*p,`
184
184
  A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e+n-s*p,",").concat(t+r,`
185
185
  L `).concat(e+s*p,",").concat(t+r,`
186
- A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e,",").concat(t+r-a*p," Z")}else c="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return c},XV={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},OA=e=>{var t=qt(e,XV),n=k.useRef(null),[r,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var M=n.current.getTotalLength();M&&i(M)}catch{}},[]);var{x:o,y:a,width:s,height:l,radius:c,className:u}=t,{animationEasing:d,animationDuration:f,animationBegin:p,isAnimationActive:m,isUpdateAnimationActive:h}=t,g=k.useRef(s),b=k.useRef(l),S=k.useRef(o),w=k.useRef(a),x=k.useMemo(()=>({x:o,y:a,width:s,height:l,radius:c}),[o,a,s,l,c]),_=fl(x,"rectangle-");if(o!==+o||a!==+a||s!==+s||l!==+l||s===0||l===0)return null;var E=oe("recharts-rectangle",u);if(!h)return O.createElement("path",$f({},ct(t,!0),{className:E,d:YS(o,a,s,l,c)}));var C=g.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(r===-1?1:r,"px"),P="".concat(r,"px 0px"),N=xA(["strokeDasharray"],f,typeof d=="string"?d:void 0);return O.createElement(dl,{animationId:_,key:_,canBegin:r>0,duration:f,easing:d,isActive:h,begin:p},M=>{var I=tt(C,s,M),L=tt(D,l,M),$=tt(T,o,M),V=tt(j,a,M);n.current&&(g.current=I,b.current=L,S.current=$,w.current=V);var z;return m?M>0?z={transition:N,strokeDasharray:P}:z={strokeDasharray:A}:z={strokeDasharray:P},O.createElement("path",$f({},ct(t,!0),{className:E,d:YS($,V,I,L,c),ref:n,style:HS(HS({},z),t.style)}))})};function EA(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,a=Wt(t,n,r,i),s=Wt(t,n,r,o);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ey.apply(null,arguments)}var QV=(e,t)=>{var n=tn(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},fd=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+r,u=Math.asin(s/c)/Rf,d=l?i:i+o*u,f=Wt(t,n,c,d),p=Wt(t,n,r,d),m=l?i-o*u:i,h=Wt(t,n,c*Math.cos(u*Rf),m);return{center:f,circleTangency:p,lineTangency:h,theta:u}},PA=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=QV(o,a),l=o+s,c=Wt(t,n,i,o),u=Wt(t,n,i,l),d="M ".concat(c.x,",").concat(c.y,`
186
+ A `).concat(p,",").concat(p,",0,0,").concat(l,",").concat(e,",").concat(t+r-a*p," Z")}else c="M ".concat(e,",").concat(t," h ").concat(n," v ").concat(r," h ").concat(-n," Z");return c},XV={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},OA=e=>{var t=Gt(e,XV),n=k.useRef(null),[r,i]=k.useState(-1);k.useEffect(()=>{if(n.current&&n.current.getTotalLength)try{var M=n.current.getTotalLength();M&&i(M)}catch{}},[]);var{x:o,y:a,width:s,height:l,radius:c,className:u}=t,{animationEasing:d,animationDuration:f,animationBegin:p,isAnimationActive:m,isUpdateAnimationActive:h}=t,g=k.useRef(s),b=k.useRef(l),S=k.useRef(o),w=k.useRef(a),x=k.useMemo(()=>({x:o,y:a,width:s,height:l,radius:c}),[o,a,s,l,c]),_=fl(x,"rectangle-");if(o!==+o||a!==+a||s!==+s||l!==+l||s===0||l===0)return null;var E=oe("recharts-rectangle",u);if(!h)return O.createElement("path",$f({},ct(t,!0),{className:E,d:YS(o,a,s,l,c)}));var C=g.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(r===-1?1:r,"px"),P="".concat(r,"px 0px"),N=xA(["strokeDasharray"],f,typeof d=="string"?d:void 0);return O.createElement(dl,{animationId:_,key:_,canBegin:r>0,duration:f,easing:d,isActive:h,begin:p},M=>{var I=tt(C,s,M),L=tt(D,l,M),$=tt(T,o,M),V=tt(j,a,M);n.current&&(g.current=I,b.current=L,S.current=$,w.current=V);var z;return m?M>0?z={transition:N,strokeDasharray:P}:z={strokeDasharray:A}:z={strokeDasharray:P},O.createElement("path",$f({},ct(t,!0),{className:E,d:YS($,V,I,L,c),ref:n,style:HS(HS({},z),t.style)}))})};function EA(e){var{cx:t,cy:n,radius:r,startAngle:i,endAngle:o}=e,a=Wt(t,n,r,i),s=Wt(t,n,r,o);return{points:[a,s],cx:t,cy:n,radius:r,startAngle:i,endAngle:o}}function ey(){return ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ey.apply(null,arguments)}var QV=(e,t)=>{var n=nn(t-e),r=Math.min(Math.abs(t-e),359.999);return n*r},fd=e=>{var{cx:t,cy:n,radius:r,angle:i,sign:o,isExternal:a,cornerRadius:s,cornerIsExternal:l}=e,c=s*(a?1:-1)+r,u=Math.asin(s/c)/Rf,d=l?i:i+o*u,f=Wt(t,n,c,d),p=Wt(t,n,r,d),m=l?i-o*u:i,h=Wt(t,n,c*Math.cos(u*Rf),m);return{center:f,circleTangency:p,lineTangency:h,theta:u}},PA=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:o,endAngle:a}=e,s=QV(o,a),l=o+s,c=Wt(t,n,i,o),u=Wt(t,n,i,l),d="M ".concat(c.x,",").concat(c.y,`
187
187
  A `).concat(i,",").concat(i,`,0,
188
188
  `).concat(+(Math.abs(s)>180),",").concat(+(o>l),`,
189
189
  `).concat(u.x,",").concat(u.y,`
190
190
  `);if(r>0){var f=Wt(t,n,r,o),p=Wt(t,n,r,l);d+="L ".concat(p.x,",").concat(p.y,`
191
191
  A `).concat(r,",").concat(r,`,0,
192
192
  `).concat(+(Math.abs(s)>180),",").concat(+(o<=l),`,
193
- `).concat(f.x,",").concat(f.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},ZV=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=tn(c-l),{circleTangency:d,lineTangency:f,theta:p}=fd({cx:t,cy:n,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:m,lineTangency:h,theta:g}=fd({cx:t,cy:n,radius:i,angle:c,sign:-u,cornerRadius:o,cornerIsExternal:s}),b=s?Math.abs(l-c):Math.abs(l-c)-p-g;if(b<0)return a?"M ".concat(f.x,",").concat(f.y,`
193
+ `).concat(f.x,",").concat(f.y," Z")}else d+="L ".concat(t,",").concat(n," Z");return d},ZV=e=>{var{cx:t,cy:n,innerRadius:r,outerRadius:i,cornerRadius:o,forceCornerRadius:a,cornerIsExternal:s,startAngle:l,endAngle:c}=e,u=nn(c-l),{circleTangency:d,lineTangency:f,theta:p}=fd({cx:t,cy:n,radius:i,angle:l,sign:u,cornerRadius:o,cornerIsExternal:s}),{circleTangency:m,lineTangency:h,theta:g}=fd({cx:t,cy:n,radius:i,angle:c,sign:-u,cornerRadius:o,cornerIsExternal:s}),b=s?Math.abs(l-c):Math.abs(l-c)-p-g;if(b<0)return a?"M ".concat(f.x,",").concat(f.y,`
194
194
  a`).concat(o,",").concat(o,",0,0,1,").concat(o*2,`,0
195
195
  a`).concat(o,",").concat(o,",0,0,1,").concat(-o*2,`,0
196
196
  `):PA({cx:t,cy:n,innerRadius:r,outerRadius:i,startAngle:l,endAngle:c});var S="M ".concat(f.x,",").concat(f.y,`
@@ -200,13 +200,13 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
200
200
  `);if(r>0){var{circleTangency:w,lineTangency:x,theta:_}=fd({cx:t,cy:n,radius:r,angle:l,sign:u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),{circleTangency:E,lineTangency:C,theta:D}=fd({cx:t,cy:n,radius:r,angle:c,sign:-u,isExternal:!0,cornerRadius:o,cornerIsExternal:s}),T=s?Math.abs(l-c):Math.abs(l-c)-_-D;if(T<0&&o===0)return"".concat(S,"L").concat(t,",").concat(n,"Z");S+="L".concat(C.x,",").concat(C.y,`
201
201
  A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(E.x,",").concat(E.y,`
202
202
  A`).concat(r,",").concat(r,",0,").concat(+(T>180),",").concat(+(u>0),",").concat(w.x,",").concat(w.y,`
203
- A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else S+="L".concat(t,",").concat(n,"Z");return S},JV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},kA=e=>{var t=qt(e,JV),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=oe("recharts-sector",d),p=o-i,m=kn(a,p,0,!0),h;return m>0&&Math.abs(c-u)<360?h=ZV({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):h=PA({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",ey({},ct(t,!0),{className:f,d:h}))};function eH(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Wt(s,l,c,d),p=Wt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return EA(t);return[{x:r,y:i},{x:o,y:a}]}var bg={},xg={},wg={},US;function tH(){return US||(US=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(wg)),wg}var KS;function nH(){return KS||(KS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tH();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(xg)),xg}var qS;function rH(){return qS||(qS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AD(),n=nH();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(bg)),bg}var _g,GS;function iH(){return GS||(GS=1,_g=rH().range),_g}var oH=iH();const CA=ho(oH);function Wo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function aH(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Yb(e){let t,n,r;e.length!==2?(t=Wo,n=(s,l)=>Wo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Wo||e===aH?e:sH,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function sH(){return 0}function DA(e){return e===null?NaN:+e}function*lH(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const cH=Yb(Wo),wu=cH.right;Yb(DA).center;class XS extends Map{constructor(t,n=fH){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(QS(this,t))}has(t){return super.has(QS(this,t))}set(t,n){return super.set(uH(this,t),n)}delete(t){return super.delete(dH(this,t))}}function QS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function uH({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function dH({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function fH(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pH(e=Wo){if(e===Wo)return AA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function AA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const hH=Math.sqrt(50),mH=Math.sqrt(10),gH=Math.sqrt(2);function Bf(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=hH?10:o>=mH?5:o>=gH?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,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)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Bf(e,t,n*2):[s,l,c]}function ty(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Bf(t,e,n):Bf(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function ny(e,t,n){return t=+t,e=+e,n=+n,Bf(e,t,n)[2]}function ry(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?ny(t,e,n):ny(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ZS(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function JS(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function TA(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?AA:pH(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));TA(e,t,p,m,i)}const o=e[t];let a=n,s=r;for($l(e,n,t),i(e[r],o)>0&&$l(e,n,r);a<s;){for($l(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?$l(e,n,s):(++s,$l(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function $l(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function vH(e,t,n){if(e=Float64Array.from(lH(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return JS(e);if(t>=1)return ZS(e);var r,i=(r-1)*t,o=Math.floor(i),a=ZS(TA(e,o).subarray(0,o+1)),s=JS(e.subarray(o+1));return a+(s-a)*(i-o)}}function yH(e,t,n=DA){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function bH(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xo(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 iy=Symbol("implicit");function Ub(){var e=new XS,t=[],n=[],r=iy;function i(o){let a=e.get(o);if(a===void 0){if(r!==iy)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new XS;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Ub(t,n).unknown(r)},Vr.apply(i,arguments),i}function Kb(){var e=Ub().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,h=p?r:i;o=(h-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(h-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var g=bH(f).map(function(b){return m+o*b});return n(p?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return Kb(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Vr.apply(d(),arguments)}function MA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return MA(t())},e}function xH(){return MA(Kb.apply(null,arguments).paddingInner(1))}function qb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function NA(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function _u(){}var Lc=.7,Wf=1/Lc,Rs="\\s*([+-]?\\d+)\\s*",Fc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wH=/^#([0-9a-f]{3,8})$/,_H=new RegExp(`^rgb\\(${Rs},${Rs},${Rs}\\)$`),SH=new RegExp(`^rgb\\(${bi},${bi},${bi}\\)$`),OH=new RegExp(`^rgba\\(${Rs},${Rs},${Rs},${Fc}\\)$`),EH=new RegExp(`^rgba\\(${bi},${bi},${bi},${Fc}\\)$`),PH=new RegExp(`^hsl\\(${Fc},${bi},${bi}\\)$`),kH=new RegExp(`^hsla\\(${Fc},${bi},${bi},${Fc}\\)$`),eO={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};qb(_u,$c,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tO,formatHex:tO,formatHex8:CH,formatHsl:DH,formatRgb:nO,toString:nO});function tO(){return this.rgb().formatHex()}function CH(){return this.rgb().formatHex8()}function DH(){return jA(this).formatHsl()}function nO(){return this.rgb().formatRgb()}function $c(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=wH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?rO(t):n===3?new Xn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?pd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?pd(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=_H.exec(e))?new Xn(t[1],t[2],t[3],1):(t=SH.exec(e))?new Xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=OH.exec(e))?pd(t[1],t[2],t[3],t[4]):(t=EH.exec(e))?pd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PH.exec(e))?aO(t[1],t[2]/100,t[3]/100,1):(t=kH.exec(e))?aO(t[1],t[2]/100,t[3]/100,t[4]):eO.hasOwnProperty(e)?rO(eO[e]):e==="transparent"?new Xn(NaN,NaN,NaN,0):null}function rO(e){return new Xn(e>>16&255,e>>8&255,e&255,1)}function pd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xn(e,t,n,r)}function AH(e){return e instanceof _u||(e=$c(e)),e?(e=e.rgb(),new Xn(e.r,e.g,e.b,e.opacity)):new Xn}function oy(e,t,n,r){return arguments.length===1?AH(e):new Xn(e,t,n,r??1)}function Xn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}qb(Xn,oy,NA(_u,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lc:Math.pow(Lc,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xn(Wa(this.r),Wa(this.g),Wa(this.b),zf(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:iO,formatHex:iO,formatHex8:TH,formatRgb:oO,toString:oO}));function iO(){return`#${Ma(this.r)}${Ma(this.g)}${Ma(this.b)}`}function TH(){return`#${Ma(this.r)}${Ma(this.g)}${Ma(this.b)}${Ma((isNaN(this.opacity)?1:this.opacity)*255)}`}function oO(){const e=zf(this.opacity);return`${e===1?"rgb(":"rgba("}${Wa(this.r)}, ${Wa(this.g)}, ${Wa(this.b)}${e===1?")":`, ${e})`}`}function zf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ma(e){return e=Wa(e),(e<16?"0":"")+e.toString(16)}function aO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kr(e,t,n,r)}function jA(e){if(e instanceof Kr)return new Kr(e.h,e.s,e.l,e.opacity);if(e instanceof _u||(e=$c(e)),!e)return new Kr;if(e instanceof Kr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Kr(a,s,l,e.opacity)}function MH(e,t,n,r){return arguments.length===1?jA(e):new Kr(e,t,n,r??1)}function Kr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}qb(Kr,MH,NA(_u,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lc:Math.pow(Lc,e),new Kr(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Xn(Sg(e>=240?e-240:e+120,i,r),Sg(e,i,r),Sg(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Kr(sO(this.h),hd(this.s),hd(this.l),zf(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=zf(this.opacity);return`${e===1?"hsl(":"hsla("}${sO(this.h)}, ${hd(this.s)*100}%, ${hd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sO(e){return e=(e||0)%360,e<0?e+360:e}function hd(e){return Math.max(0,Math.min(1,e||0))}function Sg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Gb=e=>()=>e;function NH(e,t){return function(n){return e+n*t}}function jH(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function RH(e){return(e=+e)==1?RA:function(t,n){return n-t?jH(t,n,e):Gb(isNaN(t)?n:t)}}function RA(e,t){var n=t-e;return n?NH(e,n):Gb(isNaN(e)?t:e)}const lO=(function e(t){var n=RH(t);function r(i,o){var a=n((i=oy(i)).r,(o=oy(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=RA(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function IH(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function LH(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=pl(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function $H(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Vf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function BH(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=pl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ay=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Og=new RegExp(ay.source,"g");function WH(e){return function(){return e}}function zH(e){return function(t){return e(t)+""}}function VH(e,t){var n=ay.lastIndex=Og.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=ay.exec(e))&&(i=Og.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Vf(r,i)})),n=Og.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?zH(l[0].x):WH(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function pl(e,t){var n=typeof t,r;return t==null||n==="boolean"?Gb(t):(n==="number"?Vf:n==="string"?(r=$c(t))?(t=r,lO):VH:t instanceof $c?lO:t instanceof Date?$H:LH(t)?IH:Array.isArray(t)?FH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?BH:Vf)(e,t)}function Xb(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function HH(e,t){t===void 0&&(t=e,e=pl);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function YH(e){return function(){return e}}function Hf(e){return+e}var cO=[0,1];function Rn(e){return e}function sy(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:YH(isNaN(t)?NaN:.5)}function UH(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function KH(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=sy(i,r),o=n(a,o)):(r=sy(r,i),o=n(o,a)),function(s){return o(r(s))}}function qH(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=sy(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=wu(e,s,1,r)-1;return o[l](i[l](s))}}function Su(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function hh(){var e=cO,t=cO,n=pl,r,i,o,a=Rn,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==Rn&&(a=UH(e[0],e[f-1])),s=f>2?qH:KH,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),Vf)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Hf),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Xb,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Rn,u()):a!==Rn},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function Qb(){return hh()(Rn,Rn)}function GH(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Yf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Qs(e){return e=Yf(Math.abs(e)),e?e[1]:NaN}function XH(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function QH(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ZH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bc(e){if(!(t=ZH.exec(e)))throw new Error("invalid format: "+e);var t;return new Zb({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]})}Bc.prototype=Zb.prototype;function Zb(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+""}Zb.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 JH(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var IA;function eY(e,t){var n=Yf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(IA=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Yf(e,Math.max(0,t+o-1))[0]}function uO(e,t){var n=Yf(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const dO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:GH,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)=>uO(e*100,t),r:uO,s:eY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fO(e){return e}var pO=Array.prototype.map,hO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tY(e){var t=e.grouping===void 0||e.thousands===void 0?fO:XH(pO.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?fO:QH(pO.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Bc(d);var f=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,S=d.comma,w=d.precision,x=d.trim,_=d.type;_==="n"?(S=!0,_="g"):dO[_]||(w===void 0&&(w=12),x=!0,_="g"),(g||f==="0"&&p==="=")&&(g=!0,f="0",p="=");var E=h==="$"?n:h==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C=h==="$"?r:/[%p]/.test(_)?a:"",D=dO[_],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 j(A){var P=E,N=C,M,I,L;if(_==="c")N=D(A)+N,A="";else{A=+A;var $=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),x&&(A=JH(A)),$&&+A==0&&m!=="+"&&($=!1),P=($?m==="("?m:s:m==="-"||m==="("?"":m)+P,N=(_==="s"?hO[8+IA/3]:"")+N+($&&m==="("?")":""),T){for(M=-1,I=A.length;++M<I;)if(L=A.charCodeAt(M),48>L||L>57){N=(L===46?i+A.slice(M+1):A.slice(M))+N,A=A.slice(0,M);break}}}S&&!g&&(A=t(A,1/0));var V=P.length+A.length+N.length,z=V<b?new Array(b-V+1).join(f):"";switch(S&&g&&(A=t(z+A,z.length?b-N.length:1/0),z=""),p){case"<":A=P+A+N+z;break;case"=":A=P+z+A+N;break;case"^":A=z.slice(0,V=z.length>>1)+P+A+N+z.slice(V);break;default:A=z+P+A+N;break}return o(A)}return j.toString=function(){return d+""},j}function u(d,f){var p=c((d=Bc(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Qs(f)/3)))*3,h=Math.pow(10,-m),g=hO[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:u}}var md,Jb,LA;nY({thousands:",",grouping:[3],currency:["$",""]});function nY(e){return md=tY(e),Jb=md.format,LA=md.formatPrefix,md}function rY(e){return Math.max(0,-Qs(Math.abs(e)))}function iY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qs(t)/3)))*3-Qs(Math.abs(e)))}function oY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qs(t)-Qs(e))+1}function FA(e,t,n,r){var i=ry(e,t,n),o;switch(r=Bc(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=iY(i,a))&&(r.precision=o),LA(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=oY(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=rY(i))&&(r.precision=o-(r.type==="%")*2);break}}return Jb(r)}function ta(e){var t=e.domain;return e.ticks=function(n){var r=t();return ty(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return FA(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=ny(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function $A(){var e=Qb();return e.copy=function(){return Su(e,$A())},Vr.apply(e,arguments),ta(e)}function BA(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Hf),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return BA(e).unknown(t)},e=arguments.length?Array.from(e,Hf):[0,1],ta(n)}function WA(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function mO(e){return Math.log(e)}function gO(e){return Math.exp(e)}function aY(e){return-Math.log(-e)}function sY(e){return-Math.exp(-e)}function lY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function cY(e){return e===10?lY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function uY(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 vO(e){return(t,n)=>-e(-t,n)}function e0(e){const t=e(mO,gO),n=t.domain;let r=10,i,o;function a(){return i=uY(r),o=cY(r),n()[0]<0?(i=vO(i),o=vO(o),e(aY,sY)):e(mO,gO),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,h;const g=s==null?10:+s;let b=[];if(!(r%1)&&p-f<g){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(h=f<0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(h=f>0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}b.length*2<g&&(b=ty(c,u,g))}else b=ty(f,p,Math.min(p-f,g)).map(o);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Bc(l)).precision==null&&(l.trim=!0),l=Jb(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(WA(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function zA(){const e=e0(hh()).domain([1,10]);return e.copy=()=>Su(e,zA()).base(e.base()),Vr.apply(e,arguments),e}function yO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function bO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function t0(e){var t=1,n=e(yO(t),bO(t));return n.constant=function(r){return arguments.length?e(yO(t=+r),bO(t)):t},ta(n)}function VA(){var e=t0(hh());return e.copy=function(){return Su(e,VA()).constant(e.constant())},Vr.apply(e,arguments)}function xO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function dY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function fY(e){return e<0?-e*e:e*e}function n0(e){var t=e(Rn,Rn),n=1;function r(){return n===1?e(Rn,Rn):n===.5?e(dY,fY):e(xO(n),xO(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ta(t)}function r0(){var e=n0(hh());return e.copy=function(){return Su(e,r0()).exponent(e.exponent())},Vr.apply(e,arguments),e}function pY(){return r0.apply(null,arguments).exponent(.5)}function wO(e){return Math.sign(e)*e*e}function hY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function HA(){var e=Qb(),t=[0,1],n=!1,r;function i(o){var a=hY(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(wO(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Hf)).map(wO)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return HA(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Vr.apply(i,arguments),ta(i)}function YA(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=yH(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[wu(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Wo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return YA().domain(e).range(t).unknown(r)},Vr.apply(o,arguments)}function UA(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[wu(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return UA().domain([e,t]).range(i).unknown(o)},Vr.apply(ta(a),arguments)}function KA(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[wu(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return KA().domain(e).range(t).unknown(n)},Vr.apply(i,arguments)}const Eg=new Date,Pg=new Date;function Gt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>Gt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(Eg.setTime(+o),Pg.setTime(+a),e(Eg),e(Pg),Math.floor(n(Eg,Pg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Uf=Gt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Gt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Uf);Uf.range;const qi=1e3,Tr=qi*60,Gi=Tr*60,lo=Gi*24,i0=lo*7,_O=lo*30,kg=lo*365,Na=Gt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qi)},(e,t)=>(t-e)/qi,e=>e.getUTCSeconds());Na.range;const o0=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi)},(e,t)=>{e.setTime(+e+t*Tr)},(e,t)=>(t-e)/Tr,e=>e.getMinutes());o0.range;const a0=Gt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tr)},(e,t)=>(t-e)/Tr,e=>e.getUTCMinutes());a0.range;const s0=Gt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi-e.getMinutes()*Tr)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getHours());s0.range;const l0=Gt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getUTCHours());l0.range;const Ou=Gt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tr)/lo,e=>e.getDate()-1);Ou.range;const mh=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>e.getUTCDate()-1);mh.range;const qA=Gt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>Math.floor(e/lo));qA.range;function as(e){return Gt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Tr)/i0)}const gh=as(0),Kf=as(1),mY=as(2),gY=as(3),Zs=as(4),vY=as(5),yY=as(6);gh.range;Kf.range;mY.range;gY.range;Zs.range;vY.range;yY.range;function ss(e){return Gt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/i0)}const vh=ss(0),qf=ss(1),bY=ss(2),xY=ss(3),Js=ss(4),wY=ss(5),_Y=ss(6);vh.range;qf.range;bY.range;xY.range;Js.range;wY.range;_Y.range;const c0=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());c0.range;const u0=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());u0.range;const co=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());co.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,n)=>{t.setFullYear(t.getFullYear()+n*e)});co.range;const uo=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());uo.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,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});uo.range;function GA(e,t,n,r,i,o){const a=[[Na,1,qi],[Na,5,5*qi],[Na,15,15*qi],[Na,30,30*qi],[o,1,Tr],[o,5,5*Tr],[o,15,15*Tr],[o,30,30*Tr],[i,1,Gi],[i,3,3*Gi],[i,6,6*Gi],[i,12,12*Gi],[r,1,lo],[r,2,2*lo],[n,1,i0],[t,1,_O],[t,3,3*_O],[e,1,kg]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=Yb(([,,g])=>g).right(a,f);if(p===a.length)return e.every(ry(c/kg,u/kg,d));if(p===0)return Uf.every(Math.max(ry(c,u,d),1));const[m,h]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(h)}return[s,l]}const[SY,OY]=GA(uo,u0,vh,qA,l0,a0),[EY,PY]=GA(co,c0,gh,Ou,s0,o0);function Cg(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 Dg(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 Bl(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kY(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Wl(i),u=zl(i),d=Wl(o),f=zl(o),p=Wl(a),m=zl(a),h=Wl(s),g=zl(s),b=Wl(l),S=zl(l),w={a:$,A:V,b:z,B,c:null,d:CO,e:CO,f:XY,g:a9,G:l9,H:KY,I:qY,j:GY,L:XA,m:QY,M:ZY,p:X,q,Q:TO,s:MO,S:JY,u:e9,U:t9,V:n9,w:r9,W:i9,x:null,X:null,y:o9,Y:s9,Z:c9,"%":AO},x={a:re,A:J,b:ee,B:ie,c:null,d:DO,e:DO,f:p9,g:S9,G:E9,H:u9,I:d9,j:f9,L:ZA,m:h9,M:m9,p:ae,q:ue,Q:TO,s:MO,S:g9,u:v9,U:y9,V:b9,w:x9,W:w9,x:null,X:null,y:_9,Y:O9,Z:P9,"%":AO},_={a:j,A,b:P,B:N,c:M,d:PO,e:PO,f:VY,g:EO,G:OO,H:kO,I:kO,j:$Y,L:zY,m:FY,M:BY,p:T,q:LY,Q:YY,s:UY,S:WY,u:MY,U:NY,V:jY,w:TY,W:RY,x:I,X:L,y:EO,Y:OO,Z:IY,"%":HY};w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x);function E(U,K){return function(Z){var R=[],ge=-1,te=0,ve=U.length,we,Fe,st;for(Z instanceof Date||(Z=new Date(+Z));++ge<ve;)U.charCodeAt(ge)===37&&(R.push(U.slice(te,ge)),(Fe=SO[we=U.charAt(++ge)])!=null?we=U.charAt(++ge):Fe=we==="e"?" ":"0",(st=K[we])&&(we=st(Z,Fe)),R.push(we),te=ge+1);return R.push(U.slice(te,ge)),R.join("")}}function C(U,K){return function(Z){var R=Bl(1900,void 0,1),ge=D(R,U,Z+="",0),te,ve;if(ge!=Z.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(K&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(te=Dg(Bl(R.y,0,1)),ve=te.getUTCDay(),te=ve>4||ve===0?qf.ceil(te):qf(te),te=mh.offset(te,(R.V-1)*7),R.y=te.getUTCFullYear(),R.m=te.getUTCMonth(),R.d=te.getUTCDate()+(R.w+6)%7):(te=Cg(Bl(R.y,0,1)),ve=te.getDay(),te=ve>4||ve===0?Kf.ceil(te):Kf(te),te=Ou.offset(te,(R.V-1)*7),R.y=te.getFullYear(),R.m=te.getMonth(),R.d=te.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ve="Z"in R?Dg(Bl(R.y,0,1)).getUTCDay():Cg(Bl(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ve+5)%7:R.w+R.U*7-(ve+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Dg(R)):Cg(R)}}function D(U,K,Z,R){for(var ge=0,te=K.length,ve=Z.length,we,Fe;ge<te;){if(R>=ve)return-1;if(we=K.charCodeAt(ge++),we===37){if(we=K.charAt(ge++),Fe=_[we in SO?K.charAt(ge++):we],!Fe||(R=Fe(U,Z,R))<0)return-1}else if(we!=Z.charCodeAt(R++))return-1}return R}function T(U,K,Z){var R=c.exec(K.slice(Z));return R?(U.p=u.get(R[0].toLowerCase()),Z+R[0].length):-1}function j(U,K,Z){var R=p.exec(K.slice(Z));return R?(U.w=m.get(R[0].toLowerCase()),Z+R[0].length):-1}function A(U,K,Z){var R=d.exec(K.slice(Z));return R?(U.w=f.get(R[0].toLowerCase()),Z+R[0].length):-1}function P(U,K,Z){var R=b.exec(K.slice(Z));return R?(U.m=S.get(R[0].toLowerCase()),Z+R[0].length):-1}function N(U,K,Z){var R=h.exec(K.slice(Z));return R?(U.m=g.get(R[0].toLowerCase()),Z+R[0].length):-1}function M(U,K,Z){return D(U,t,K,Z)}function I(U,K,Z){return D(U,n,K,Z)}function L(U,K,Z){return D(U,r,K,Z)}function $(U){return a[U.getDay()]}function V(U){return o[U.getDay()]}function z(U){return l[U.getMonth()]}function B(U){return s[U.getMonth()]}function X(U){return i[+(U.getHours()>=12)]}function q(U){return 1+~~(U.getMonth()/3)}function re(U){return a[U.getUTCDay()]}function J(U){return o[U.getUTCDay()]}function ee(U){return l[U.getUTCMonth()]}function ie(U){return s[U.getUTCMonth()]}function ae(U){return i[+(U.getUTCHours()>=12)]}function ue(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var K=E(U+="",w);return K.toString=function(){return U},K},parse:function(U){var K=C(U+="",!1);return K.toString=function(){return U},K},utcFormat:function(U){var K=E(U+="",x);return K.toString=function(){return U},K},utcParse:function(U){var K=C(U+="",!0);return K.toString=function(){return U},K}}}var SO={"-":"",_:" ",0:"0"},nn=/^\s*\d+/,CY=/^%/,DY=/[\\^$*+?|[\]().{}]/g;function Me(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function AY(e){return e.replace(DY,"\\$&")}function Wl(e){return new RegExp("^(?:"+e.map(AY).join("|")+")","i")}function zl(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function TY(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function MY(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function NY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function jY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function RY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function OO(e,t,n){var r=nn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function EO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function IY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function LY(e,t,n){var r=nn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function FY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function PO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $Y(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function kO(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function BY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function WY(e,t,n){var r=nn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zY(e,t,n){var r=nn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function VY(e,t,n){var r=nn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function HY(e,t,n){var r=CY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function YY(e,t,n){var r=nn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function UY(e,t,n){var r=nn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function CO(e,t){return Me(e.getDate(),t,2)}function KY(e,t){return Me(e.getHours(),t,2)}function qY(e,t){return Me(e.getHours()%12||12,t,2)}function GY(e,t){return Me(1+Ou.count(co(e),e),t,3)}function XA(e,t){return Me(e.getMilliseconds(),t,3)}function XY(e,t){return XA(e,t)+"000"}function QY(e,t){return Me(e.getMonth()+1,t,2)}function ZY(e,t){return Me(e.getMinutes(),t,2)}function JY(e,t){return Me(e.getSeconds(),t,2)}function e9(e){var t=e.getDay();return t===0?7:t}function t9(e,t){return Me(gh.count(co(e)-1,e),t,2)}function QA(e){var t=e.getDay();return t>=4||t===0?Zs(e):Zs.ceil(e)}function n9(e,t){return e=QA(e),Me(Zs.count(co(e),e)+(co(e).getDay()===4),t,2)}function r9(e){return e.getDay()}function i9(e,t){return Me(Kf.count(co(e)-1,e),t,2)}function o9(e,t){return Me(e.getFullYear()%100,t,2)}function a9(e,t){return e=QA(e),Me(e.getFullYear()%100,t,2)}function s9(e,t){return Me(e.getFullYear()%1e4,t,4)}function l9(e,t){var n=e.getDay();return e=n>=4||n===0?Zs(e):Zs.ceil(e),Me(e.getFullYear()%1e4,t,4)}function c9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Me(t/60|0,"0",2)+Me(t%60,"0",2)}function DO(e,t){return Me(e.getUTCDate(),t,2)}function u9(e,t){return Me(e.getUTCHours(),t,2)}function d9(e,t){return Me(e.getUTCHours()%12||12,t,2)}function f9(e,t){return Me(1+mh.count(uo(e),e),t,3)}function ZA(e,t){return Me(e.getUTCMilliseconds(),t,3)}function p9(e,t){return ZA(e,t)+"000"}function h9(e,t){return Me(e.getUTCMonth()+1,t,2)}function m9(e,t){return Me(e.getUTCMinutes(),t,2)}function g9(e,t){return Me(e.getUTCSeconds(),t,2)}function v9(e){var t=e.getUTCDay();return t===0?7:t}function y9(e,t){return Me(vh.count(uo(e)-1,e),t,2)}function JA(e){var t=e.getUTCDay();return t>=4||t===0?Js(e):Js.ceil(e)}function b9(e,t){return e=JA(e),Me(Js.count(uo(e),e)+(uo(e).getUTCDay()===4),t,2)}function x9(e){return e.getUTCDay()}function w9(e,t){return Me(qf.count(uo(e)-1,e),t,2)}function _9(e,t){return Me(e.getUTCFullYear()%100,t,2)}function S9(e,t){return e=JA(e),Me(e.getUTCFullYear()%100,t,2)}function O9(e,t){return Me(e.getUTCFullYear()%1e4,t,4)}function E9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Js(e):Js.ceil(e),Me(e.getUTCFullYear()%1e4,t,4)}function P9(){return"+0000"}function AO(){return"%"}function TO(e){return+e}function MO(e){return Math.floor(+e/1e3)}var bs,eT,tT;k9({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 k9(e){return bs=kY(e),eT=bs.format,bs.parse,tT=bs.utcFormat,bs.utcParse,bs}function C9(e){return new Date(e)}function D9(e){return e instanceof Date?+e:+new Date(+e)}function d0(e,t,n,r,i,o,a,s,l,c){var u=Qb(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),S=c("%b %d"),w=c("%B"),x=c("%Y");function _(E){return(l(E)<E?p:s(E)<E?m:a(E)<E?h:o(E)<E?g:r(E)<E?i(E)<E?b:S:n(E)<E?w:x)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?f(Array.from(E,D9)):f().map(C9)},u.ticks=function(E){var C=f();return e(C[0],C[C.length-1],E??10)},u.tickFormat=function(E,C){return C==null?_:c(C)},u.nice=function(E){var C=f();return(!E||typeof E.range!="function")&&(E=t(C[0],C[C.length-1],E??10)),E?f(WA(C,E)):u},u.copy=function(){return Su(u,d0(e,t,n,r,i,o,a,s,l,c))},u}function A9(){return Vr.apply(d0(EY,PY,co,c0,gh,Ou,s0,o0,Na,eT).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function T9(){return Vr.apply(d0(SY,OY,uo,u0,vh,mh,l0,a0,Na,tT).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function yh(){var e=0,t=1,n,r,i,o,a=Rn,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(pl),c.rangeRound=u(Xb),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function na(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nT(){var e=ta(yh()(Rn));return e.copy=function(){return na(e,nT())},xo.apply(e,arguments)}function rT(){var e=e0(yh()).domain([1,10]);return e.copy=function(){return na(e,rT()).base(e.base())},xo.apply(e,arguments)}function iT(){var e=t0(yh());return e.copy=function(){return na(e,iT()).constant(e.constant())},xo.apply(e,arguments)}function f0(){var e=n0(yh());return e.copy=function(){return na(e,f0()).exponent(e.exponent())},xo.apply(e,arguments)}function M9(){return f0.apply(null,arguments).exponent(.5)}function oT(){var e=[],t=Rn;function n(r){if(r!=null&&!isNaN(r=+r))return t((wu(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Wo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>vH(e,o/r))},n.copy=function(){return oT(t).domain(e)},xo.apply(n,arguments)}function bh(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=Rn,u,d=!1,f;function p(h){return isNaN(h=+h)?f:(h=.5+((h=+u(h))-o)*(r*h<r*o?s:l),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([e,t,n]=h,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,S,w;return arguments.length?([b,S,w]=g,c=HH(h,[b,S,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(pl),p.rangeRound=m(Xb),p.unknown=function(h){return arguments.length?(f=h,p):f},function(h){return u=h,i=h(e),o=h(t),a=h(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function aT(){var e=ta(bh()(Rn));return e.copy=function(){return na(e,aT())},xo.apply(e,arguments)}function sT(){var e=e0(bh()).domain([.1,1,10]);return e.copy=function(){return na(e,sT()).base(e.base())},xo.apply(e,arguments)}function lT(){var e=t0(bh());return e.copy=function(){return na(e,lT()).constant(e.constant())},xo.apply(e,arguments)}function p0(){var e=n0(bh());return e.copy=function(){return na(e,p0()).exponent(e.exponent())},xo.apply(e,arguments)}function N9(){return p0.apply(null,arguments).exponent(.5)}const ac=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Kb,scaleDiverging:aT,scaleDivergingLog:sT,scaleDivergingPow:p0,scaleDivergingSqrt:N9,scaleDivergingSymlog:lT,scaleIdentity:BA,scaleImplicit:iy,scaleLinear:$A,scaleLog:zA,scaleOrdinal:Ub,scalePoint:xH,scalePow:r0,scaleQuantile:YA,scaleQuantize:UA,scaleRadial:HA,scaleSequential:nT,scaleSequentialLog:rT,scaleSequentialPow:f0,scaleSequentialQuantile:oT,scaleSequentialSqrt:M9,scaleSequentialSymlog:iT,scaleSqrt:pY,scaleSymlog:VA,scaleThreshold:KA,scaleTime:A9,scaleUtc:T9,tickFormat:FA},Symbol.toStringTag,{value:"Module"}));var ra=e=>e.chartData,h0=W([ra],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Eu=(e,t,n,r)=>r?h0(e):ra(e);function el(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(dn(t)&&dn(n))return!0}return!1}function NO(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function j9(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(dn(n))i=n;else if(typeof n=="function")return;if(dn(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(el(a))return a}}function R9(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(el(r))return NO(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(pe(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&SS.test(i)){var l=SS.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(pe(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&OS.test(o)){var u=OS.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(el(f))return t==null?f:NO(f,t,n)}}}var hl=1e9,I9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},g0,bt=!0,Ir="[DecimalError] ",za=Ir+"Invalid argument: ",m0=Ir+"Exponent out of range: ",ml=Math.floor,wa=Math.pow,L9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,dr,Jt=1e7,ft=7,cT=9007199254740991,Gf=ml(cT/ft),fe={};fe.absoluteValue=fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};fe.comparedTo=fe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};fe.decimalPlaces=fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ft;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};fe.dividedBy=fe.div=function(e){return to(this,new this.constructor(e))};fe.dividedToIntegerBy=fe.idiv=function(e){var t=this,n=t.constructor;return at(to(t,new n(e),0,1),n.precision)};fe.equals=fe.eq=function(e){return!this.cmp(e)};fe.exponent=function(){return zt(this)};fe.greaterThan=fe.gt=function(e){return this.cmp(e)>0};fe.greaterThanOrEqualTo=fe.gte=function(e){return this.cmp(e)>=0};fe.isInteger=fe.isint=function(){return this.e>this.d.length-2};fe.isNegative=fe.isneg=function(){return this.s<0};fe.isPositive=fe.ispos=function(){return this.s>0};fe.isZero=function(){return this.s===0};fe.lessThan=fe.lt=function(e){return this.cmp(e)<0};fe.lessThanOrEqualTo=fe.lte=function(e){return this.cmp(e)<1};fe.logarithm=fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(dr))throw Error(Ir+"NaN");if(n.s<1)throw Error(Ir+(n.s?"NaN":"-Infinity"));return n.eq(dr)?new r(0):(bt=!1,t=to(Wc(n,o),Wc(e,o),o),bt=!0,at(t,i))};fe.minus=fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?fT(t,e):uT(t,(e.s=-e.s,e))};fe.modulo=fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ir+"NaN");return n.s?(bt=!1,t=to(n,e,0,1).times(e),bt=!0,n.minus(t)):at(new r(n),i)};fe.naturalExponential=fe.exp=function(){return dT(this)};fe.naturalLogarithm=fe.ln=function(){return Wc(this)};fe.negated=fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fe.plus=fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uT(t,e):fT(t,(e.s=-e.s,e))};fe.precision=fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(za+e);if(t=zt(i)+1,r=i.d.length-1,n=r*ft+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};fe.squareRoot=fe.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ir+"NaN")}for(e=zt(s),bt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=mi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ml((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),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(to(s,o,a+2)).times(.5),mi(o.d).slice(0,a)===(t=mi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(at(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return bt=!0,at(r,n)};fe.times=fe.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%Jt|0,t=s/Jt|0;o[i]=(o[i]+t)%Jt|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,bt?at(e,d.precision):e};fe.toDecimalPlaces=fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Oi(e,0,hl),t===void 0?t=r.rounding:Oi(t,0,8),at(n,e+zt(n)+1,t))};fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Qa(r,!0):(Oi(e,0,hl),t===void 0?t=i.rounding:Oi(t,0,8),r=at(new i(r),e+1,t),n=Qa(r,!0,e+1)),n};fe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Qa(i):(Oi(e,0,hl),t===void 0?t=o.rounding:Oi(t,0,8),r=at(new o(i),e+zt(i)+1,t),n=Qa(r.abs(),!1,e+zt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};fe.toInteger=fe.toint=function(){var e=this,t=e.constructor;return at(new t(e),zt(e)+1,t.rounding)};fe.toNumber=function(){return+this};fe.toPower=fe.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(dr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ir+"Infinity");return s}if(s.eq(dr))return s;if(r=l.precision,e.eq(dr))return at(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=cT){for(i=new l(dr),t=Math.ceil(r/ft+4),bt=!1;n%2&&(i=i.times(s),RO(i.d,t)),n=ml(n/2),n!==0;)s=s.times(s),RO(s.d,t);return bt=!0,e.s<0?new l(dr).div(i):at(i,r)}}else if(o<0)throw Error(Ir+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,bt=!1,i=e.times(Wc(s,r+c)),bt=!0,i=dT(i),i.s=o,i};fe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=zt(i),r=Qa(i,n<=o.toExpNeg||n>=o.toExpPos)):(Oi(e,1,hl),t===void 0?t=o.rounding:Oi(t,0,8),i=at(new o(i),e,t),n=zt(i),r=Qa(i,e<=n||n<=o.toExpNeg,e)),r};fe.toSignificantDigits=fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Oi(e,1,hl),t===void 0?t=r.rounding:Oi(t,0,8)),at(new r(n),e,t)};fe.toString=fe.valueOf=fe.val=fe.toJSON=fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zt(e),n=e.constructor;return Qa(e,t<=n.toExpNeg||t>=n.toExpPos)};function uT(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),bt?at(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/ft),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/Jt|0,l[o]%=Jt;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,bt?at(t,d):t}function Oi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(za+e)}function mi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=ft-r.length,n&&(o+=Ao(n)),o+=r;a=e[t],r=a+"",n=ft-r.length,n&&(o+=Ao(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var to=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%Jt|0,a=o/Jt|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*Jt+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,h,g,b,S,w,x,_,E,C,D,T=r.constructor,j=r.s==i.s?1:-1,A=r.d,P=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Ir+"Division by zero");for(l=r.e-i.e,C=P.length,_=A.length,p=new T(j),m=p.d=[],c=0;P[c]==(A[c]||0);)++c;if(P[c]>(A[c]||0)&&--l,o==null?S=o=T.precision:a?S=o+(zt(r)-zt(i))+1:S=o,S<0)return new T(0);if(S=S/ft+2|0,c=0,C==1)for(u=0,P=P[0],S++;(c<_||u)&&S--;c++)w=u*Jt+(A[c]||0),m[c]=w/P|0,u=w%P|0;else{for(u=Jt/(P[0]+1)|0,u>1&&(P=e(P,u),A=e(A,u),C=P.length,_=A.length),x=C,h=A.slice(0,C),g=h.length;g<C;)h[g++]=0;D=P.slice(),D.unshift(0),E=P[0],P[1]>=Jt/2&&++E;do u=0,s=t(P,h,C,g),s<0?(b=h[0],C!=g&&(b=b*Jt+(h[1]||0)),u=b/E|0,u>1?(u>=Jt&&(u=Jt-1),d=e(P,u),f=d.length,g=h.length,s=t(d,h,f,g),s==1&&(u--,n(d,C<f?D:P,f))):(u==0&&(s=u=1),d=P.slice()),f=d.length,f<g&&d.unshift(0),n(h,d,g),s==-1&&(g=h.length,s=t(P,h,C,g),s<1&&(u++,n(h,C<g?D:P,g))),g=h.length):s===0&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[g++]=A[x]||0:(h=[A[x]],g=1);while((x++<_||h[0]!==void 0)&&S--)}return m[0]||m.shift(),p.e=l,at(p,a?o+zt(p)+1:o)}})();function dT(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(zt(e)>16)throw Error(m0+zt(e));if(!e.s)return new u(dr);for(bt=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(wa(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(dr),u.precision=s;;){if(i=at(i.times(e),s),n=n.times(++l),a=o.plus(to(i,n,s)),mi(a.d).slice(0,s)===mi(o.d).slice(0,s)){for(;c--;)o=at(o.times(o),s);return u.precision=d,t==null?(bt=!0,at(o,d)):o}o=a}}function zt(e){for(var t=e.e*ft,n=e.d[0];n>=10;n/=10)t++;return t}function Ag(e,t,n){if(t>e.LN10.sd())throw bt=!0,n&&(e.precision=n),Error(Ir+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Ao(e){for(var t="";e--;)t+="0";return t}function Wc(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,h=p.constructor,g=h.precision;if(p.s<1)throw Error(Ir+(p.s?"NaN":"-Infinity"));if(p.eq(dr))return new h(0);if(t==null?(bt=!1,c=g):c=t,p.eq(10))return t==null&&(bt=!0),Ag(h,c);if(c+=f,h.precision=c,n=mi(m),r=n.charAt(0),o=zt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=mi(p.d),r=n.charAt(0),d++;o=zt(p),r>1?(p=new h("0."+n),o++):p=new h(r+"."+n.slice(1))}else return l=Ag(h,c+2,g).times(o+""),p=Wc(new h(r+"."+n.slice(1)),c-f).plus(l),h.precision=g,t==null?(bt=!0,at(p,g)):p;for(s=a=p=to(p.minus(dr),p.plus(dr),c),u=at(p.times(p),c),i=3;;){if(a=at(a.times(u),c),l=s.plus(to(a,new h(i),c)),mi(l.d).slice(0,c)===mi(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Ag(h,c+2,g).times(o+""))),s=to(s,new h(d),c),h.precision=g,t==null?(bt=!0,at(s,g)):s;s=l,i+=2}}function jO(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=ml(n/ft),e.d=[],r=(n+1)%ft,n<0&&(r+=ft),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=ft;r<i;)e.d.push(+t.slice(r,r+=ft));t=t.slice(r),r=ft-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),bt&&(e.e>Gf||e.e<-Gf))throw Error(m0+n)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=ft,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/ft),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=ft,i=r-ft+a}if(n!==void 0&&(o=wa(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/wa(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=zt(e),d.length=1,t=t-o-1,d[0]=wa(10,(ft-t%ft)%ft),e.e=ml(-t/ft)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=wa(10,ft-r),d[u]=i>0?(c/wa(10,a-i)%wa(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==Jt&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=Jt)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(bt&&(e.e>Gf||e.e<-Gf))throw Error(m0+zt(e));return e}function fT(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),bt?at(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/ft),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=Jt-1;--l[o],l[i]+=Jt}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,bt?at(t,p):t):new f(0)}function Qa(e,t,n){var r,i=zt(e),o=mi(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ao(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ao(-i-1)+o,n&&(r=n-a)>0&&(o+=Ao(r))):i>=a?(o+=Ao(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Ao(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Ao(r))),e.s<0?"-"+o:o}function RO(e,t){if(e.length>t)return e.length=t,!0}function pT(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(za+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return jO(a,o.toString())}else if(typeof o!="string")throw Error(za+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,L9.test(o))jO(a,o);else throw Error(za+o)}if(i.prototype=fe,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=pT,i.config=i.set=F9,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function F9(e){if(!e||typeof e!="object")throw Error(Ir+"Object expected");var t,n,r,i=["precision",1,hl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(ml(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(za+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(za+n+": "+r);return this}var g0=pT(I9);dr=new g0(1);const Xe=g0;var $9=e=>e,hT={},mT=e=>e===hT,IO=e=>function t(){return arguments.length===0||arguments.length===1&&mT(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},gT=(e,t)=>e===1?t:IO(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==hT).length;return o>=e?t(...r):gT(e-o,IO(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>mT(u)?s.shift():u);return t(...c,...s)}))}),xh=e=>gT(e.length,e),ly=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},B9=xh((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),W9=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return $9;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},cy=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),vT=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function yT(e){var t;return e===0?t=1:t=Math.floor(new Xe(e).abs().log(10).toNumber())+1,t}function bT(e,t,n){for(var r=new Xe(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}xh((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});xh((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});xh((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var xT=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},wT=(e,t,n)=>{if(e.lte(0))return new Xe(0);var r=yT(e.toNumber()),i=new Xe(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Xe(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Xe(l.toNumber()):new Xe(Math.ceil(l.toNumber()))},z9=(e,t,n)=>{var r=new Xe(1),i=new Xe(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Xe(10).pow(yT(e)-1),i=new Xe(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Xe(Math.floor(e)))}else e===0?i=new Xe(Math.floor((t-1)/2)):n||(i=new Xe(Math.floor(e)));var a=Math.floor((t-1)/2),s=W9(B9(l=>i.add(new Xe(l-a).mul(r)).toNumber()),ly);return s(0,t)},_T=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Xe(0),tickMin:new Xe(0),tickMax:new Xe(0)};var a=wT(new Xe(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Xe(0):(s=new Xe(t).add(n).div(2),s=s.sub(new Xe(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Xe(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?_T(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Xe(l).mul(a)),tickMax:s.add(new Xe(c).mul(a))})};function V9(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=xT([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...ly(0,r-1).map(()=>1/0)]:[...ly(0,r-1).map(()=>-1/0),s];return t>n?cy(l):l}if(a===s)return z9(a,r,i);var{step:c,tickMin:u,tickMax:d}=_T(a,s,o,i,0),f=bT(u,d.add(new Xe(.1).mul(c)),c);return t>n?cy(f):f}function H9(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=xT([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=wT(new Xe(a).sub(o).div(s-1),i,0),c=[...bT(new Xe(o),new Xe(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?cy(c):c}var Y9=vT(V9),U9=vT(H9),ST=e=>e.rootProps.maxBarSize,K9=e=>e.rootProps.barGap,OT=e=>e.rootProps.barCategoryGap,q9=e=>e.rootProps.barSize,Pu=e=>e.rootProps.stackOffset,v0=e=>e.options.chartName,y0=e=>e.rootProps.syncId,ET=e=>e.rootProps.syncMethod,b0=e=>e.options.eventEmitter,Hi={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},lr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},wh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},G9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:Hi.reversed,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:Hi.type,unit:void 0},X9={allowDataOverflow:lr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:lr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:lr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:lr.scale,tick:lr.tick,tickCount:lr.tickCount,ticks:void 0,type:lr.type,unit:void 0},Q9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Hi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Z9={allowDataOverflow:lr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:lr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:lr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:lr.scale,tick:lr.tick,tickCount:lr.tickCount,ticks:void 0,type:"category",unit:void 0},x0=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?Q9:G9,w0=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?Z9:X9,_h=e=>e.polarOptions,_0=W([vo,yo,Kt],sA),PT=W([_h,_0],(e,t)=>{if(e!=null)return kn(e.innerRadius,t,0)}),kT=W([_h,_0],(e,t)=>{if(e!=null)return kn(e.outerRadius,t,t*.8)}),J9=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},CT=W([_h],J9);W([x0,CT],wh);var DT=W([_0,PT,kT],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});W([w0,DT],wh);var AT=W([Ee,_h,PT,kT,vo,yo],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:kn(a,i,i/2),cy:kn(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),wt=(e,t)=>t,ku=(e,t,n)=>n;function Sh(e){return e?.id}var Xt=e=>{var t=Ee(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},gl=e=>e.tooltip.settings.axisId,rn=e=>{var t=Xt(e),n=gl(e);return Cu(e,t,n)},TT=W([rn],e=>e?.dataKey);function MT(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=Sh(s);c.forEach((d,f)=>{var p=o==null||i?f:String(nt(d,o,null)),m=nt(d,s.dataKey,0),h;a.has(p)?h=a.get(p):h={},Object.assign(h,{[u]:m}),a.set(p,h)})}}),Array.from(a.values())}function Oh(e){return e.stackId!=null&&e.dataKey!=null}function LO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LO(Object(n),!0).forEach(function(r){eU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eU(e,t,n){return(t=tU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(e){var t=nU(e,"string");return typeof t=="symbol"?t:t+""}function nU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uy=[0,"auto"],ir={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},NT=(e,t)=>e.cartesianAxis.xAxis[t],Ai=(e,t)=>{var n=NT(e,t);return n??ir},or={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:uy,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:bu},jT=(e,t)=>e.cartesianAxis.yAxis[t],Ti=(e,t)=>{var n=jT(e,t);return n??or},rU={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:""},S0=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??rU},Lt=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"zAxis":return S0(e,n);case"angleAxis":return x0(e,n);case"radiusAxis":return w0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},iU=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Cu=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"angleAxis":return x0(e,n);case"radiusAxis":return w0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},RT=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function O0(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Du=e=>e.graphicalItems.cartesianItems,oU=W([wt,ku],O0),E0=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Au=W([Du,Lt,oU],E0),IT=W([Au],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Oh)),LT=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),FT=W([Au],LT),P0=e=>e.map(t=>t.data).filter(Boolean).flat(1),aU=W([Au],P0),k0=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},C0=W([aU,Eu],k0),D0=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:nt(i,r)}))):e.map(r=>({value:r})),Eh=W([C0,Lt,Au],D0);function $T(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ls(e){return e.filter(t=>jr(t)||t instanceof Date).map(Number).filter(t=>Cn(t)===!1)}function sU(e,t,n){return!n||typeof t!="number"||Cn(t)?[]:n.length?ls(n.flatMap(r=>{var i=nt(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!dn(o)||!dn(a)))return[t-o,t+a]})):[]}var lU=W([IT,Eu,rn],MT),BT=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(Sh);return[a,{stackedData:p7(e,l,n),graphicalItems:s}]}))},zc=W([lU,IT,Pu],BT),WT=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=v7(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},cU=W([zc,ra,wt],WT),zT=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>$T(i,d)),u=nt(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:sU(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:nt(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Ph=e=>e.errorBars,VT=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>$T(n,r));W([FT,Ph,wt],VT);var uU=W([C0,Lt,FT,Ph,wt],zT);function dU(e){var{value:t}=e;if(jr(t)||t instanceof Date)return t}var FO=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=ls(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},fU=(e,t,n)=>{var r=e.map(dU).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&XC(r))?CA(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},A0=e=>{var t;if(e==null||!("domain"in e))return uy;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=ls(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:uy},Qf=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},HT=e=>e.referenceElements.dots,vl=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),pU=W([HT,wt,ku],vl),YT=e=>e.referenceElements.areas,hU=W([YT,wt,ku],vl),UT=e=>e.referenceElements.lines,mU=W([UT,wt,ku],vl),KT=(e,t)=>{var n=ls(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},gU=W(pU,wt,KT),qT=(e,t)=>{var n=ls(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},vU=W([hU,wt],qT),GT=(e,t)=>{var n=ls(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},yU=W(mU,wt,GT),bU=W(gU,yU,vU,(e,t,n)=>Qf(e,n,t)),XT=W([Lt],A0),T0=(e,t,n,r,i,o,a)=>{var s=j9(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?Qf(n,i,FO(r)):Qf(i,FO(r));return R9(t,c,e.allowDataOverflow)},xU=W([Lt,XT,cU,uU,bU,Ee,wt],T0),wU=[0,1],M0=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=Di(t,o);return c&&s==null?CA(0,n.length):l==="category"?fU(r,e,c):i==="expand"?wU:a}},N0=W([Lt,Ee,C0,Eh,Pu,wt,xU],M0),QT=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(pu(o));return s in ac?s:"point"}}},yl=W([Lt,Ee,RT,v0,wt],QT);function _U(e){if(e!=null){if(e in ac)return ac[e]();var t="scale".concat(pu(e));if(t in ac)return ac[t]()}}function j0(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=_U(t);if(i!=null){var o=i.domain(n).range(r);return l7(o),o}}}var R0=(e,t,n)=>{var r=A0(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&el(e))return Y9(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&el(e))return U9(e,t.tickCount,t.allowDecimals)}},I0=W([N0,Cu,yl],R0),L0=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&el(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},SU=W([Lt,N0,I0,wt],L0),OU=W(Eh,Lt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ls(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),ZT=W(OU,Ee,OT,Kt,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!dn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=kn(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),EU=(e,t)=>{var n=Ai(e,t);return n==null||typeof n.padding!="string"?0:ZT(e,"xAxis",t,n.padding)},PU=(e,t)=>{var n=Ti(e,t);return n==null||typeof n.padding!="string"?0:ZT(e,"yAxis",t,n.padding)},kU=W(Ai,EU,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),CU=W(Ti,PU,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),DU=W([Kt,kU,dh,uh,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),AU=W([Kt,Ee,CU,dh,uh,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Tu=(e,t,n,r)=>{var i;switch(t){case"xAxis":return DU(e,n,r);case"yAxis":return AU(e,n,r);case"zAxis":return(i=S0(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return CT(e);case"radiusAxis":return DT(e,n);default:return}},JT=W([Lt,Tu],wh),qo=W([Lt,yl,SU,JT],j0);W([Au,Ph,wt],VT);function eM(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var kh=(e,t)=>t,Ch=(e,t,n)=>n,TU=W(lh,kh,Ch,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(eM)),MU=W(ch,kh,Ch,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(eM)),tM=(e,t)=>({width:e.width,height:t.height}),NU=(e,t)=>{var n=typeof t.width=="number"?t.width:bu;return{width:n,height:e.height}},nM=W(Kt,Ai,tM),jU=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},RU=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},IU=W(yo,Kt,TU,kh,Ch,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=tM(t,s);a==null&&(a=jU(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),LU=W(vo,Kt,MU,kh,Ch,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=NU(t,s);a==null&&(a=RU(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),FU=(e,t)=>{var n=Ai(e,t);if(n!=null)return IU(e,n.orientation,n.mirror)},$U=W([Kt,Ai,FU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),BU=(e,t)=>{var n=Ti(e,t);if(n!=null)return LU(e,n.orientation,n.mirror)},WU=W([Kt,Ti,BU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),rM=W(Kt,Ti,(e,t)=>{var n=typeof t.width=="number"?t.width:bu;return{width:n,height:e.height}}),$O=(e,t,n)=>{switch(t){case"xAxis":return nM(e,n).width;case"yAxis":return rM(e,n).height;default:return}},iM=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=Di(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&XC(l))return l}},F0=W([Ee,Eh,Lt,wt],iM),oM=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=Di(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},$0=W([Ee,Eh,Cu,wt],oM),BO=W([Ee,iU,yl,qo,F0,$0,Tu,I0,wt],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=Di(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:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),zU=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=Di(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?tn(o[0]-o[1])*2*m:m;var h=d||i;if(h){var g=h.map((b,S)=>{var w=a?a.indexOf(b):b;return{index:S,coordinate:r(w)+m,value:b,offset:m}});return g.filter(b=>!Cn(b.coordinate))}return c&&s?s.map((b,S)=>({coordinate:r(b)+m,value:b,index:S,offset:m})):r.ticks?r.ticks(f).map(b=>({coordinate:r(b)+m,value:b,offset:m})):r.domain().map((b,S)=>({coordinate:r(b)+m,value:a?a[b]:b,index:S,offset:m}))}},aM=W([Ee,Cu,yl,qo,I0,Tu,F0,$0,wt],zU),VU=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=Di(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?tn(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},Ei=W([Ee,Cu,qo,Tu,F0,$0,wt],VU),Pi=W(Lt,qo,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})}),HU=W([Lt,yl,N0,JT],j0);W((e,t,n)=>S0(e,n),HU,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})});var YU=W([Ee,lh,ch],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),sM=e=>e.options.defaultTooltipEventType,lM=e=>e.options.validateTooltipEventTypes;function cM(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function B0(e,t){var n=sM(e),r=lM(e);return cM(t,n,r)}function UU(e){return ce(t=>B0(t,e))}var uM=(e,t)=>{var n,r=Number(t);if(!(Cn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},KU=e=>e.tooltip.settings,Mo={active:!1,index:null,dataKey:void 0,coordinate:void 0},qU={itemInteraction:{click:Mo,hover:Mo},axisInteraction:{click:Mo,hover:Mo},keyboardInteraction:Mo,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}},dM=yr({name:"tooltip",initialState:qU,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=eo(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,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:GU,removeTooltipEntrySettings:XU,setTooltipSettingsState:QU,setActiveMouseOverItemIndex:fM,mouseLeaveItem:ZU,mouseLeaveChart:pM,setActiveClickItemIndex:JU,setMouseOverAxisIndex:hM,setMouseClickAxisIndex:eK,setSyncInteraction:dy,setKeyboardInteraction:fy}=dM.actions,tK=dM.reducer;function WO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(n),!0).forEach(function(r){nK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nK(e,t,n){return(t=rK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rK(e){var t=iK(e,"string");return typeof t=="symbol"?t:t+""}function iK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oK(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function aK(e){return e.index!=null}var mM=(e,t,n,r)=>{if(t==null)return Mo;var i=oK(e,t,n);if(i==null)return Mo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(aK(i)){if(o)return gd(gd({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return gd(gd({},Mo),{},{coordinate:i.coordinate})},W0=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!dn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},gM=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},vM=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Mu=e=>e.options.tooltipPayloadSearcher,bl=e=>e.tooltip;function zO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zO(Object(n),!0).forEach(function(r){sK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sK(e,t,n){return(t=lK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lK(e){var t=cK(e,"string");return typeof t=="symbol"?t:t+""}function cK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uK(e,t){return e??t}var yM=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:h,settings:g}=p,b=uK(h,s),S=Array.isArray(b)?lA(b,c,u):b,w=(m=g?.dataKey)!==null&&m!==void 0?m:r,x=g?.nameKey,_;if(r&&Array.isArray(S)&&!Array.isArray(S[0])&&a==="axis"?_=QC(S,r,i):_=o(S,t,l,x),Array.isArray(_))_.forEach(C=>{var D=VO(VO({},g),{},{name:C.name,unit:C.unit,color:void 0,fill:void 0});f.push(ES({tooltipEntrySettings:D,dataKey:C.dataKey,payload:C.payload,value:nt(C.payload,C.dataKey),name:C.name}))});else{var E;f.push(ES({tooltipEntrySettings:g,dataKey:w,payload:_,value:nt(_,w),name:(E=nt(_,x))!==null&&E!==void 0?E:g?.name}))}return f},d)}},z0=W([rn,Ee,RT,v0,Xt],QT),dK=W([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),fK=W([Xt,gl],O0),Nu=W([dK,rn,fK],E0),pK=W([Nu],e=>e.filter(Oh)),hK=W([Nu],P0),xl=W([hK,ra],k0),mK=W([pK,ra,rn],MT),V0=W([xl,rn,Nu],D0),gK=W([rn],A0),vK=W([Nu],e=>e.filter(Oh)),yK=W([mK,vK,Pu],BT),bK=W([yK,ra,Xt],WT),xK=W([Nu],LT),wK=W([xl,rn,xK,Ph,Xt],zT),_K=W([HT,Xt,gl],vl),SK=W([_K,Xt],KT),OK=W([YT,Xt,gl],vl),EK=W([OK,Xt],qT),PK=W([UT,Xt,gl],vl),kK=W([PK,Xt],GT),CK=W([SK,kK,EK],Qf),DK=W([rn,gK,bK,wK,CK,Ee,Xt],T0),bM=W([rn,Ee,xl,V0,Pu,Xt,DK],M0),AK=W([bM,rn,z0],R0),TK=W([rn,bM,AK,Xt],L0),xM=e=>{var t=Xt(e),n=gl(e),r=!1;return Tu(e,t,n,r)},wM=W([rn,xM],wh),_M=W([rn,z0,TK,wM],j0),MK=W([Ee,V0,rn,Xt],iM),NK=W([Ee,V0,rn,Xt],oM),jK=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=Di(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?tn(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},wo=W([Ee,rn,z0,_M,xM,MK,NK,Xt],jK),H0=W([sM,lM,KU],(e,t,n)=>cM(n.shared,e,t)),SM=e=>e.tooltip.settings.trigger,Y0=e=>e.tooltip.settings.defaultIndex,Dh=W([bl,H0,SM,Y0],mM),Go=W([Dh,xl],W0),OM=W([wo,Go],uM),EM=W([Dh],e=>{if(e)return e.dataKey}),PM=W([bl,H0,SM,Y0],vM),RK=W([vo,yo,Ee,Kt,wo,Y0,PM,Mu],gM),IK=W([Dh,RK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),LK=W([Dh],e=>e.active),FK=W([PM,Go,ra,TT,OM,Mu,H0],yM),$K=W([FK],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function HO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HO(Object(n),!0).forEach(function(r){BK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BK(e,t,n){return(t=WK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WK(e){var t=zK(e,"string");return typeof t=="symbol"?t:t+""}function zK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VK=()=>ce(rn),HK=()=>{var e=VK(),t=ce(wo),n=ce(_M);return Xa(YO(YO({},e),{},{scale:n}),t)},kM=()=>ce(v0),U0=(e,t)=>t,CM=(e,t,n)=>n,K0=(e,t,n,r)=>r,YK=W(wo,e=>rh(e,t=>t.coordinate)),q0=W([bl,U0,CM,K0],mM),DM=W([q0,xl],W0),UK=(e,t,n)=>{if(t!=null){var r=bl(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},AM=W([bl,U0,CM,K0],vM),Zf=W([vo,yo,Ee,Kt,wo,K0,AM,Mu],gM),KK=W([q0,Zf],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),TM=W(wo,DM,uM),qK=W([AM,DM,ra,TT,TM,Mu,U0],yM),GK=W([q0],e=>({isActive:e.active,activeIndex:e.index})),XK=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=y7(e.chartX,e.chartY,t,n,s);if(l){var c=x7(l,t),u=a7(c,a,o,r,i),d=b7(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},py.apply(null,arguments)}function UO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(n),!0).forEach(function(r){QK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QK(e,t,n){return(t=ZK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZK(e){var t=JK(e,"string");return typeof t=="symbol"?t:t+""}function JK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eq(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=xV;else if(c==="BarChart")p=wV(a,u,i,o),m=OA;else if(a==="radial"){var{cx:h,cy:g,radius:b,startAngle:S,endAngle:w}=EA(u);p={cx:h,cy:g,startAngle:S,endAngle:w,innerRadius:b,outerRadius:b},m=kA}else p={points:eH(a,u,i)},m=js;var x=typeof s=="object"&&"className"in s?s.className:void 0,_=vd(vd(vd(vd({stroke:"#ccc",pointerEvents:"none"},i),p),ct(s,!1)),{},{payload:d,payloadIndex:f,className:oe("recharts-tooltip-cursor",x)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function tq(e){var t=HK(),n=mA(),r=xu(),i=kM();return O.createElement(eq,py({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var MM=k.createContext(null),nq=()=>k.useContext(MM),Tg={exports:{}},KO;function rq(){return KO||(KO=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var h=n?n+c:c;if(!this._events[h])return!1;var g=this._events[h],b=arguments.length,S,w;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),b){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,d),!0;case 4:return g.fn.call(g.context,u,d,f),!0;case 5:return g.fn.call(g.context,u,d,f,p),!0;case 6:return g.fn.call(g.context,u,d,f,p,m),!0}for(w=1,S=new Array(b-1);w<b;w++)S[w-1]=arguments[w];g.fn.apply(g.context,S)}else{var x=g.length,_;for(w=0;w<x;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),b){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,d);break;case 4:g[w].fn.call(g[w].context,u,d,f);break;default:if(!S)for(_=1,S=new Array(b-1);_<b;_++)S[_-1]=arguments[_];g[w].fn.apply(g[w].context,S)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var h=0,g=[],b=m.length;h<b;h++)(m[h].fn!==u||f&&!m[h].once||d&&m[h].context!==d)&&g.push(m[h]);g.length?this._events[p]=g.length===1?g[0]:g:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Tg)),Tg.exports}var iq=rq();const oq=ho(iq);var Vc=new oq,hy="recharts.syncEvent.tooltip",qO="recharts.syncEvent.brush";function Ah(e,t){if(t){var n=Number.parseInt(t,10);if(!Cn(n))return e?.[n]}}var aq={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},NM=yr({name:"options",initialState:aq,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),sq=NM.reducer,{createEventEmitter:lq}=NM.actions;function cq(e){return e.tooltip.syncInteraction}var uq={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},jM=yr({name:"chartData",initialState:uq,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:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:GO,setDataStartEndIndexes:dq,setComputedData:ufe}=jM.actions,fq=jM.reducer,pq=["x","y"];function XO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XO(Object(n),!0).forEach(function(r){hq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hq(e,t,n){return(t=mq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mq(e){var t=gq(e,"string");return typeof t=="symbol"?t:t+""}function gq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vq(e,t){if(e==null)return{};var n,r,i=yq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var RM=()=>{};function bq(){var e=ce(y0),t=ce(b0),n=xt(),r=ce(ET),i=ce(wo),o=xu(),a=fh(),s=ce(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return RM;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:h}=p,g=vq(p,pq),b=fa(fa(fa({},g),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof h=="number"&&{y:Math.max(a.y,Math.min(h,a.y+a.height))}),S=fa(fa({},u),{},{payload:fa(fa({},u.payload),{},{coordinate:b})});n(S)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var x={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},_=r(i,x);w=i[_]}else r==="value"&&(w=i.find(N=>String(N.value)===u.payload.label));var{coordinate:E}=u.payload;if(w==null||u.payload.active===!1||E==null||a==null){n(dy({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:C,y:D}=E,T=Math.min(C,a.x+a.width),j=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?j:w.coordinate},P=dy({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(P)}}};return Vc.on(hy,l),()=>{Vc.off(hy,l)}},[s,n,t,e,r,i,o,a])}function xq(){var e=ce(y0),t=ce(b0),n=xt();k.useEffect(()=>{if(e==null)return RM;var r=(i,o,a)=>{t!==a&&e===i&&n(dq(o))};return Vc.on(qO,r),()=>{Vc.off(qO,r)}},[n,t,e])}function wq(){var e=xt();k.useEffect(()=>{e(lq())},[e]),bq(),xq()}function _q(e,t,n,r,i,o){var a=ce(f=>UK(f,e,t)),s=ce(b0),l=ce(y0),c=ce(ET),u=ce(cq),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=dy({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});Vc.emit(hy,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ZO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QO(Object(n),!0).forEach(function(r){Sq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sq(e,t,n){return(t=Oq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oq(e){var t=Eq(e,"string");return typeof t=="symbol"?t:t+""}function Eq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pq(e){return e.dataKey}function kq(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(Z7,t)}var JO=[],Cq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!bo.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function on(e){var t=qt(e,Cq),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:h,shared:g,trigger:b,defaultIndex:S,portal:w,axisId:x}=t,_=xt(),E=typeof S=="number"?String(S):S;k.useEffect(()=>{_(QU({shared:g,trigger:b,axisId:x,active:n,defaultIndex:E}))},[_,g,b,x,n,E]);var C=fh(),D=bA(),T=UU(g),{activeIndex:j,isActive:A}=ce(ee=>GK(ee,T,b,E)),P=ce(ee=>qK(ee,T,b,E)),N=ce(ee=>TM(ee,T,b,E)),M=ce(ee=>KK(ee,T,b,E)),I=P,L=nq(),$=n??A,[V,z]=MD([I,$]),B=T==="axis"?N:void 0;_q(T,b,M,B,j,$);var X=w??L;if(X==null)return null;var q=I??JO;$||(q=JO),s&&q.length&&(q=PD(I.filter(ee=>ee.value!=null&&(ee.hide!==!0||t.includeHidden)),u,Pq));var re=q.length>0,J=O.createElement(oV,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:$,coordinate:M,hasPayload:re,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:C,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},kq(a,ZO(ZO({},t),{},{payload:q,label:B,active:$,coordinate:M,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Ui.createPortal(J,X),$&&O.createElement(tq,{cursor:h,tooltipEventType:T,coordinate:M,payload:I,index:j}))}var Mg={},Ng={},jg={},eE;function Dq(){return eE||(eE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),h()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},h=()=>{m(),a=void 0,s=null},g=()=>{u()},b=function(...S){if(i?.aborted)return;a=this,s=S;const w=f==null;p(),l&&w&&u()};return b.schedule=p,b.cancel=h,b.flush=g,i?.addEventListener("abort",h,{once:!0}),b}e.debounce=t})(jg)),jg}var tE;function Aq(){return tE||(tE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dq();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...h){u=r.apply(this,h),d=null},i,{edges:c}),p=function(...h){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,h),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,h),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(Ng)),Ng}var nE;function Tq(){return nE||(nE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Aq();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})(Mg)),Mg}var Rg,rE;function Mq(){return rE||(rE=1,Rg=Tq().throttle),Rg}var Nq=Mq();const jq=ho(Nq);var Rq=process.env.NODE_ENV!=="production",hc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(Rq&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function iE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ig(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iE(Object(n),!0).forEach(function(r){Iq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iq(e,t,n){return(t=Lq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lq(e){var t=Fq(e,"string");return typeof t=="symbol"?t:t+""}function Fq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ft=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,h=k.useRef(null),g=k.useRef();g.current=p,k.useImperativeHandle(t,()=>h.current);var[b,S]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((_,E)=>{S(C=>{var D=Math.round(_),T=Math.round(E);return C.containerWidth===D&&C.containerHeight===T?C:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var j,{width:A,height:P}=T[0].contentRect;w(A,P),(j=g.current)===null||j===void 0||j.call(g,A,P)};u>0&&(_=jq(_,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(_),{width:C,height:D}=h.current.getBoundingClientRect();return w(C,D),E.observe(h.current),()=>{E.disconnect()}},[w,u]);var x=k.useMemo(()=>{var{containerWidth:_,containerHeight:E}=b;if(_<0||E<0)return null;hc(Ta(i)||Ta(o),`The width(%s) and height(%s) are both fixed numbers,
203
+ A`).concat(o,",").concat(o,",0,0,").concat(+(u<0),",").concat(x.x,",").concat(x.y,"Z")}else S+="L".concat(t,",").concat(n,"Z");return S},JV={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},kA=e=>{var t=Gt(e,JV),{cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:a,forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u,className:d}=t;if(o<i||c===u)return null;var f=oe("recharts-sector",d),p=o-i,m=kn(a,p,0,!0),h;return m>0&&Math.abs(c-u)<360?h=ZV({cx:n,cy:r,innerRadius:i,outerRadius:o,cornerRadius:Math.min(m,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:c,endAngle:u}):h=PA({cx:n,cy:r,innerRadius:i,outerRadius:o,startAngle:c,endAngle:u}),O.createElement("path",ey({},ct(t,!0),{className:f,d:h}))};function eH(e,t,n){var r,i,o,a;if(e==="horizontal")r=t.x,o=r,i=n.top,a=n.top+n.height;else if(e==="vertical")i=t.y,a=i,r=n.left,o=n.left+n.width;else if(t.cx!=null&&t.cy!=null)if(e==="centric"){var{cx:s,cy:l,innerRadius:c,outerRadius:u,angle:d}=t,f=Wt(s,l,c,d),p=Wt(s,l,u,d);r=f.x,i=f.y,o=p.x,a=p.y}else return EA(t);return[{x:r,y:i},{x:o,y:a}]}var bg={},xg={},wg={},US;function tH(){return US||(US=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=DD();function n(r){return t.isSymbol(r)?NaN:Number(r)}e.toNumber=n})(wg)),wg}var KS;function nH(){return KS||(KS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=tH();function n(r){return r?(r=t.toNumber(r),r===1/0||r===-1/0?(r<0?-1:1)*Number.MAX_VALUE:r===r?r:0):r===0?r:0}e.toFinite=n})(xg)),xg}var qS;function rH(){return qS||(qS=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=AD(),n=nH();function r(i,o,a){a&&typeof a!="number"&&t.isIterateeCall(i,o,a)&&(o=a=void 0),i=n.toFinite(i),o===void 0?(o=i,i=0):o=n.toFinite(o),a=a===void 0?i<o?1:-1:n.toFinite(a);const s=Math.max(Math.ceil((o-i)/(a||1)),0),l=new Array(s);for(let c=0;c<s;c++)l[c]=i,i+=a;return l}e.range=r})(bg)),bg}var _g,GS;function iH(){return GS||(GS=1,_g=rH().range),_g}var oH=iH();const CA=ho(oH);function Wo(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function aH(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Yb(e){let t,n,r;e.length!==2?(t=Wo,n=(s,l)=>Wo(e(s),l),r=(s,l)=>e(s)-l):(t=e===Wo||e===aH?e:sH,n=e,r=e);function i(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<0?c=d+1:u=d}while(c<u)}return c}function o(s,l,c=0,u=s.length){if(c<u){if(t(l,l)!==0)return u;do{const d=c+u>>>1;n(s[d],l)<=0?c=d+1:u=d}while(c<u)}return c}function a(s,l,c=0,u=s.length){const d=i(s,l,c,u-1);return d>c&&r(s[d-1],l)>-r(s[d],l)?d-1:d}return{left:i,center:a,right:o}}function sH(){return 0}function DA(e){return e===null?NaN:+e}function*lH(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const cH=Yb(Wo),wu=cH.right;Yb(DA).center;class XS extends Map{constructor(t,n=fH){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(QS(this,t))}has(t){return super.has(QS(this,t))}set(t,n){return super.set(uH(this,t),n)}delete(t){return super.delete(dH(this,t))}}function QS({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function uH({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function dH({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function fH(e){return e!==null&&typeof e=="object"?e.valueOf():e}function pH(e=Wo){if(e===Wo)return AA;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function AA(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}const hH=Math.sqrt(50),mH=Math.sqrt(10),gH=Math.sqrt(2);function Bf(e,t,n){const r=(t-e)/Math.max(0,n),i=Math.floor(Math.log10(r)),o=r/Math.pow(10,i),a=o>=hH?10:o>=mH?5:o>=gH?2:1;let s,l,c;return i<0?(c=Math.pow(10,-i)/a,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)*a,s=Math.round(e/c),l=Math.round(t/c),s*c<e&&++s,l*c>t&&--l),l<s&&.5<=n&&n<2?Bf(e,t,n*2):[s,l,c]}function ty(e,t,n){if(t=+t,e=+e,n=+n,!(n>0))return[];if(e===t)return[e];const r=t<e,[i,o,a]=r?Bf(t,e,n):Bf(e,t,n);if(!(o>=i))return[];const s=o-i+1,l=new Array(s);if(r)if(a<0)for(let c=0;c<s;++c)l[c]=(o-c)/-a;else for(let c=0;c<s;++c)l[c]=(o-c)*a;else if(a<0)for(let c=0;c<s;++c)l[c]=(i+c)/-a;else for(let c=0;c<s;++c)l[c]=(i+c)*a;return l}function ny(e,t,n){return t=+t,e=+e,n=+n,Bf(e,t,n)[2]}function ry(e,t,n){t=+t,e=+e,n=+n;const r=t<e,i=r?ny(t,e,n):ny(e,t,n);return(r?-1:1)*(i<0?1/-i:i)}function ZS(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function JS(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function TA(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?AA:pH(i);r>n;){if(r-n>600){const l=r-n+1,c=t-n+1,u=Math.log(l),d=.5*Math.exp(2*u/3),f=.5*Math.sqrt(u*d*(l-d)/l)*(c-l/2<0?-1:1),p=Math.max(n,Math.floor(t-c*d/l+f)),m=Math.min(r,Math.floor(t+(l-c)*d/l+f));TA(e,t,p,m,i)}const o=e[t];let a=n,s=r;for($l(e,n,t),i(e[r],o)>0&&$l(e,n,r);a<s;){for($l(e,a,s),++a,--s;i(e[a],o)<0;)++a;for(;i(e[s],o)>0;)--s}i(e[n],o)===0?$l(e,n,s):(++s,$l(e,s,r)),s<=t&&(n=s+1),t<=s&&(r=s-1)}return e}function $l(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function vH(e,t,n){if(e=Float64Array.from(lH(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return JS(e);if(t>=1)return ZS(e);var r,i=(r-1)*t,o=Math.floor(i),a=ZS(TA(e,o).subarray(0,o+1)),s=JS(e.subarray(o+1));return a+(s-a)*(i-o)}}function yH(e,t,n=DA){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,o=Math.floor(i),a=+n(e[o],o,e),s=+n(e[o+1],o+1,e);return a+(s-a)*(i-o)}}function bH(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,o=new Array(i);++r<i;)o[r]=e+r*n;return o}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function xo(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 iy=Symbol("implicit");function Ub(){var e=new XS,t=[],n=[],r=iy;function i(o){let a=e.get(o);if(a===void 0){if(r!==iy)return r;e.set(o,a=t.push(o)-1)}return n[a%n.length]}return i.domain=function(o){if(!arguments.length)return t.slice();t=[],e=new XS;for(const a of o)e.has(a)||e.set(a,t.push(a)-1);return i},i.range=function(o){return arguments.length?(n=Array.from(o),i):n.slice()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return Ub(t,n).unknown(r)},Vr.apply(i,arguments),i}function Kb(){var e=Ub().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,o,a,s=!1,l=0,c=0,u=.5;delete e.unknown;function d(){var f=t().length,p=i<r,m=p?i:r,h=p?r:i;o=(h-m)/Math.max(1,f-l+c*2),s&&(o=Math.floor(o)),m+=(h-m-o*(f-l))*u,a=o*(1-l),s&&(m=Math.round(m),a=Math.round(a));var g=bH(f).map(function(b){return m+o*b});return n(p?g.reverse():g)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,s=!0,d()},e.bandwidth=function(){return a},e.step=function(){return o},e.round=function(f){return arguments.length?(s=!!f,d()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,c=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(c=+f,d()):c},e.align=function(f){return arguments.length?(u=Math.max(0,Math.min(1,f)),d()):u},e.copy=function(){return Kb(t(),[r,i]).round(s).paddingInner(l).paddingOuter(c).align(u)},Vr.apply(d(),arguments)}function MA(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return MA(t())},e}function xH(){return MA(Kb.apply(null,arguments).paddingInner(1))}function qb(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function NA(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function _u(){}var Lc=.7,Wf=1/Lc,Rs="\\s*([+-]?\\d+)\\s*",Fc="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",bi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",wH=/^#([0-9a-f]{3,8})$/,_H=new RegExp(`^rgb\\(${Rs},${Rs},${Rs}\\)$`),SH=new RegExp(`^rgb\\(${bi},${bi},${bi}\\)$`),OH=new RegExp(`^rgba\\(${Rs},${Rs},${Rs},${Fc}\\)$`),EH=new RegExp(`^rgba\\(${bi},${bi},${bi},${Fc}\\)$`),PH=new RegExp(`^hsl\\(${Fc},${bi},${bi}\\)$`),kH=new RegExp(`^hsla\\(${Fc},${bi},${bi},${Fc}\\)$`),eO={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};qb(_u,$c,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:tO,formatHex:tO,formatHex8:CH,formatHsl:DH,formatRgb:nO,toString:nO});function tO(){return this.rgb().formatHex()}function CH(){return this.rgb().formatHex8()}function DH(){return jA(this).formatHsl()}function nO(){return this.rgb().formatRgb()}function $c(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=wH.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?rO(t):n===3?new Xn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?pd(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?pd(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=_H.exec(e))?new Xn(t[1],t[2],t[3],1):(t=SH.exec(e))?new Xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=OH.exec(e))?pd(t[1],t[2],t[3],t[4]):(t=EH.exec(e))?pd(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=PH.exec(e))?aO(t[1],t[2]/100,t[3]/100,1):(t=kH.exec(e))?aO(t[1],t[2]/100,t[3]/100,t[4]):eO.hasOwnProperty(e)?rO(eO[e]):e==="transparent"?new Xn(NaN,NaN,NaN,0):null}function rO(e){return new Xn(e>>16&255,e>>8&255,e&255,1)}function pd(e,t,n,r){return r<=0&&(e=t=n=NaN),new Xn(e,t,n,r)}function AH(e){return e instanceof _u||(e=$c(e)),e?(e=e.rgb(),new Xn(e.r,e.g,e.b,e.opacity)):new Xn}function oy(e,t,n,r){return arguments.length===1?AH(e):new Xn(e,t,n,r??1)}function Xn(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}qb(Xn,oy,NA(_u,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lc:Math.pow(Lc,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xn(Wa(this.r),Wa(this.g),Wa(this.b),zf(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:iO,formatHex:iO,formatHex8:TH,formatRgb:oO,toString:oO}));function iO(){return`#${Ma(this.r)}${Ma(this.g)}${Ma(this.b)}`}function TH(){return`#${Ma(this.r)}${Ma(this.g)}${Ma(this.b)}${Ma((isNaN(this.opacity)?1:this.opacity)*255)}`}function oO(){const e=zf(this.opacity);return`${e===1?"rgb(":"rgba("}${Wa(this.r)}, ${Wa(this.g)}, ${Wa(this.b)}${e===1?")":`, ${e})`}`}function zf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Wa(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ma(e){return e=Wa(e),(e<16?"0":"")+e.toString(16)}function aO(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Kr(e,t,n,r)}function jA(e){if(e instanceof Kr)return new Kr(e.h,e.s,e.l,e.opacity);if(e instanceof _u||(e=$c(e)),!e)return new Kr;if(e instanceof Kr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),o=Math.max(t,n,r),a=NaN,s=o-i,l=(o+i)/2;return s?(t===o?a=(n-r)/s+(n<r)*6:n===o?a=(r-t)/s+2:a=(t-n)/s+4,s/=l<.5?o+i:2-o-i,a*=60):s=l>0&&l<1?0:a,new Kr(a,s,l,e.opacity)}function MH(e,t,n,r){return arguments.length===1?jA(e):new Kr(e,t,n,r??1)}function Kr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}qb(Kr,MH,NA(_u,{brighter(e){return e=e==null?Wf:Math.pow(Wf,e),new Kr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lc:Math.pow(Lc,e),new Kr(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,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Xn(Sg(e>=240?e-240:e+120,i,r),Sg(e,i,r),Sg(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Kr(sO(this.h),hd(this.s),hd(this.l),zf(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=zf(this.opacity);return`${e===1?"hsl(":"hsla("}${sO(this.h)}, ${hd(this.s)*100}%, ${hd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function sO(e){return e=(e||0)%360,e<0?e+360:e}function hd(e){return Math.max(0,Math.min(1,e||0))}function Sg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Gb=e=>()=>e;function NH(e,t){return function(n){return e+n*t}}function jH(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function RH(e){return(e=+e)==1?RA:function(t,n){return n-t?jH(t,n,e):Gb(isNaN(t)?n:t)}}function RA(e,t){var n=t-e;return n?NH(e,n):Gb(isNaN(e)?t:e)}const lO=(function e(t){var n=RH(t);function r(i,o){var a=n((i=oy(i)).r,(o=oy(o)).r),s=n(i.g,o.g),l=n(i.b,o.b),c=RA(i.opacity,o.opacity);return function(u){return i.r=a(u),i.g=s(u),i.b=l(u),i.opacity=c(u),i+""}}return r.gamma=e,r})(1);function IH(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(o){for(i=0;i<n;++i)r[i]=e[i]*(1-o)+t[i]*o;return r}}function LH(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function FH(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),o=new Array(n),a;for(a=0;a<r;++a)i[a]=pl(e[a],t[a]);for(;a<n;++a)o[a]=t[a];return function(s){for(a=0;a<r;++a)o[a]=i[a](s);return o}}function $H(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function Vf(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function BH(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=pl(e[i],t[i]):r[i]=t[i];return function(o){for(i in n)r[i]=n[i](o);return r}}var ay=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Og=new RegExp(ay.source,"g");function WH(e){return function(){return e}}function zH(e){return function(t){return e(t)+""}}function VH(e,t){var n=ay.lastIndex=Og.lastIndex=0,r,i,o,a=-1,s=[],l=[];for(e=e+"",t=t+"";(r=ay.exec(e))&&(i=Og.exec(t));)(o=i.index)>n&&(o=t.slice(n,o),s[a]?s[a]+=o:s[++a]=o),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Vf(r,i)})),n=Og.lastIndex;return n<t.length&&(o=t.slice(n),s[a]?s[a]+=o:s[++a]=o),s.length<2?l[0]?zH(l[0].x):WH(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function pl(e,t){var n=typeof t,r;return t==null||n==="boolean"?Gb(t):(n==="number"?Vf:n==="string"?(r=$c(t))?(t=r,lO):VH:t instanceof $c?lO:t instanceof Date?$H:LH(t)?IH:Array.isArray(t)?FH:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?BH:Vf)(e,t)}function Xb(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}function HH(e,t){t===void 0&&(t=e,e=pl);for(var n=0,r=t.length-1,i=t[0],o=new Array(r<0?0:r);n<r;)o[n]=e(i,i=t[++n]);return function(a){var s=Math.max(0,Math.min(r-1,Math.floor(a*=r)));return o[s](a-s)}}function YH(e){return function(){return e}}function Hf(e){return+e}var cO=[0,1];function Rn(e){return e}function sy(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:YH(isNaN(t)?NaN:.5)}function UH(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function KH(e,t,n){var r=e[0],i=e[1],o=t[0],a=t[1];return i<r?(r=sy(i,r),o=n(a,o)):(r=sy(r,i),o=n(o,a)),function(s){return o(r(s))}}function qH(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),o=new Array(r),a=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++a<r;)i[a]=sy(e[a],e[a+1]),o[a]=n(t[a],t[a+1]);return function(s){var l=wu(e,s,1,r)-1;return o[l](i[l](s))}}function Su(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function hh(){var e=cO,t=cO,n=pl,r,i,o,a=Rn,s,l,c;function u(){var f=Math.min(e.length,t.length);return a!==Rn&&(a=UH(e[0],e[f-1])),s=f>2?qH:KH,l=c=null,d}function d(f){return f==null||isNaN(f=+f)?o:(l||(l=s(e.map(r),t,n)))(r(a(f)))}return d.invert=function(f){return a(i((c||(c=s(t,e.map(r),Vf)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,Hf),u()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),u()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Xb,u()},d.clamp=function(f){return arguments.length?(a=f?!0:Rn,u()):a!==Rn},d.interpolate=function(f){return arguments.length?(n=f,u()):n},d.unknown=function(f){return arguments.length?(o=f,d):o},function(f,p){return r=f,i=p,u()}}function Qb(){return hh()(Rn,Rn)}function GH(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Yf(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function Qs(e){return e=Yf(Math.abs(e)),e?e[1]:NaN}function XH(e,t){return function(n,r){for(var i=n.length,o=[],a=0,s=e[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),o.push(n.substring(i-=s,i+s)),!((l+=s+1)>r));)s=e[a=(a+1)%e.length];return o.reverse().join(t)}}function QH(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var ZH=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bc(e){if(!(t=ZH.exec(e)))throw new Error("invalid format: "+e);var t;return new Zb({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]})}Bc.prototype=Zb.prototype;function Zb(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+""}Zb.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 JH(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var IA;function eY(e,t){var n=Yf(e,t);if(!n)return e+"";var r=n[0],i=n[1],o=i-(IA=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,a=r.length;return o===a?r:o>a?r+new Array(o-a+1).join("0"):o>0?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Yf(e,Math.max(0,t+o-1))[0]}function uO(e,t){var n=Yf(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const dO={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:GH,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)=>uO(e*100,t),r:uO,s:eY,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function fO(e){return e}var pO=Array.prototype.map,hO=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function tY(e){var t=e.grouping===void 0||e.thousands===void 0?fO:XH(pO.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",o=e.numerals===void 0?fO:QH(pO.call(e.numerals,String)),a=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function c(d){d=Bc(d);var f=d.fill,p=d.align,m=d.sign,h=d.symbol,g=d.zero,b=d.width,S=d.comma,w=d.precision,x=d.trim,_=d.type;_==="n"?(S=!0,_="g"):dO[_]||(w===void 0&&(w=12),x=!0,_="g"),(g||f==="0"&&p==="=")&&(g=!0,f="0",p="=");var E=h==="$"?n:h==="#"&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",C=h==="$"?r:/[%p]/.test(_)?a:"",D=dO[_],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 j(A){var P=E,N=C,M,I,L;if(_==="c")N=D(A)+N,A="";else{A=+A;var $=A<0||1/A<0;if(A=isNaN(A)?l:D(Math.abs(A),w),x&&(A=JH(A)),$&&+A==0&&m!=="+"&&($=!1),P=($?m==="("?m:s:m==="-"||m==="("?"":m)+P,N=(_==="s"?hO[8+IA/3]:"")+N+($&&m==="("?")":""),T){for(M=-1,I=A.length;++M<I;)if(L=A.charCodeAt(M),48>L||L>57){N=(L===46?i+A.slice(M+1):A.slice(M))+N,A=A.slice(0,M);break}}}S&&!g&&(A=t(A,1/0));var V=P.length+A.length+N.length,z=V<b?new Array(b-V+1).join(f):"";switch(S&&g&&(A=t(z+A,z.length?b-N.length:1/0),z=""),p){case"<":A=P+A+N+z;break;case"=":A=P+z+A+N;break;case"^":A=z.slice(0,V=z.length>>1)+P+A+N+z.slice(V);break;default:A=z+P+A+N;break}return o(A)}return j.toString=function(){return d+""},j}function u(d,f){var p=c((d=Bc(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Qs(f)/3)))*3,h=Math.pow(10,-m),g=hO[8+m/3];return function(b){return p(h*b)+g}}return{format:c,formatPrefix:u}}var md,Jb,LA;nY({thousands:",",grouping:[3],currency:["$",""]});function nY(e){return md=tY(e),Jb=md.format,LA=md.formatPrefix,md}function rY(e){return Math.max(0,-Qs(Math.abs(e)))}function iY(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Qs(t)/3)))*3-Qs(Math.abs(e)))}function oY(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,Qs(t)-Qs(e))+1}function FA(e,t,n,r){var i=ry(e,t,n),o;switch(r=Bc(r??",f"),r.type){case"s":{var a=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(o=iY(i,a))&&(r.precision=o),LA(r,a)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(o=oY(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=o-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(o=rY(i))&&(r.precision=o-(r.type==="%")*2);break}}return Jb(r)}function ta(e){var t=e.domain;return e.ticks=function(n){var r=t();return ty(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return FA(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,o=r.length-1,a=r[i],s=r[o],l,c,u=10;for(s<a&&(c=a,a=s,s=c,c=i,i=o,o=c);u-- >0;){if(c=ny(a,s,n),c===l)return r[i]=a,r[o]=s,t(r);if(c>0)a=Math.floor(a/c)*c,s=Math.ceil(s/c)*c;else if(c<0)a=Math.ceil(a*c)/c,s=Math.floor(s*c)/c;else break;l=c}return e},e}function $A(){var e=Qb();return e.copy=function(){return Su(e,$A())},Vr.apply(e,arguments),ta(e)}function BA(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,Hf),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return BA(e).unknown(t)},e=arguments.length?Array.from(e,Hf):[0,1],ta(n)}function WA(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],o=e[r],a;return o<i&&(a=n,n=r,r=a,a=i,i=o,o=a),e[n]=t.floor(i),e[r]=t.ceil(o),e}function mO(e){return Math.log(e)}function gO(e){return Math.exp(e)}function aY(e){return-Math.log(-e)}function sY(e){return-Math.exp(-e)}function lY(e){return isFinite(e)?+("1e"+e):e<0?0:e}function cY(e){return e===10?lY:e===Math.E?Math.exp:t=>Math.pow(e,t)}function uY(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 vO(e){return(t,n)=>-e(-t,n)}function e0(e){const t=e(mO,gO),n=t.domain;let r=10,i,o;function a(){return i=uY(r),o=cY(r),n()[0]<0?(i=vO(i),o=vO(o),e(aY,sY)):e(mO,gO),t}return t.base=function(s){return arguments.length?(r=+s,a()):r},t.domain=function(s){return arguments.length?(n(s),a()):n()},t.ticks=s=>{const l=n();let c=l[0],u=l[l.length-1];const d=u<c;d&&([c,u]=[u,c]);let f=i(c),p=i(u),m,h;const g=s==null?10:+s;let b=[];if(!(r%1)&&p-f<g){if(f=Math.floor(f),p=Math.ceil(p),c>0){for(;f<=p;++f)for(m=1;m<r;++m)if(h=f<0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}}else for(;f<=p;++f)for(m=r-1;m>=1;--m)if(h=f>0?m/o(-f):m*o(f),!(h<c)){if(h>u)break;b.push(h)}b.length*2<g&&(b=ty(c,u,g))}else b=ty(f,p,Math.min(p-f,g)).map(o);return d?b.reverse():b},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Bc(l)).precision==null&&(l.trim=!0),l=Jb(l)),s===1/0)return l;const c=Math.max(1,r*s/t.ticks().length);return u=>{let d=u/o(Math.round(i(u)));return d*r<r-.5&&(d*=r),d<=c?l(u):""}},t.nice=()=>n(WA(n(),{floor:s=>o(Math.floor(i(s))),ceil:s=>o(Math.ceil(i(s)))})),t}function zA(){const e=e0(hh()).domain([1,10]);return e.copy=()=>Su(e,zA()).base(e.base()),Vr.apply(e,arguments),e}function yO(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function bO(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function t0(e){var t=1,n=e(yO(t),bO(t));return n.constant=function(r){return arguments.length?e(yO(t=+r),bO(t)):t},ta(n)}function VA(){var e=t0(hh());return e.copy=function(){return Su(e,VA()).constant(e.constant())},Vr.apply(e,arguments)}function xO(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function dY(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function fY(e){return e<0?-e*e:e*e}function n0(e){var t=e(Rn,Rn),n=1;function r(){return n===1?e(Rn,Rn):n===.5?e(dY,fY):e(xO(n),xO(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},ta(t)}function r0(){var e=n0(hh());return e.copy=function(){return Su(e,r0()).exponent(e.exponent())},Vr.apply(e,arguments),e}function pY(){return r0.apply(null,arguments).exponent(.5)}function wO(e){return Math.sign(e)*e*e}function hY(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function HA(){var e=Qb(),t=[0,1],n=!1,r;function i(o){var a=hY(e(o));return isNaN(a)?r:n?Math.round(a):a}return i.invert=function(o){return e.invert(wO(o))},i.domain=function(o){return arguments.length?(e.domain(o),i):e.domain()},i.range=function(o){return arguments.length?(e.range((t=Array.from(o,Hf)).map(wO)),i):t.slice()},i.rangeRound=function(o){return i.range(o).round(!0)},i.round=function(o){return arguments.length?(n=!!o,i):n},i.clamp=function(o){return arguments.length?(e.clamp(o),i):e.clamp()},i.unknown=function(o){return arguments.length?(r=o,i):r},i.copy=function(){return HA(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Vr.apply(i,arguments),ta(i)}function YA(){var e=[],t=[],n=[],r;function i(){var a=0,s=Math.max(1,t.length);for(n=new Array(s-1);++a<s;)n[a-1]=yH(e,a/s);return o}function o(a){return a==null||isNaN(a=+a)?r:t[wu(n,a)]}return o.invertExtent=function(a){var s=t.indexOf(a);return s<0?[NaN,NaN]:[s>0?n[s-1]:e[0],s<n.length?n[s]:e[e.length-1]]},o.domain=function(a){if(!arguments.length)return e.slice();e=[];for(let s of a)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(Wo),i()},o.range=function(a){return arguments.length?(t=Array.from(a),i()):t.slice()},o.unknown=function(a){return arguments.length?(r=a,o):r},o.quantiles=function(){return n.slice()},o.copy=function(){return YA().domain(e).range(t).unknown(r)},Vr.apply(o,arguments)}function UA(){var e=0,t=1,n=1,r=[.5],i=[0,1],o;function a(l){return l!=null&&l<=l?i[wu(r,l,0,n)]:o}function s(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return a}return a.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},a.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,s()):i.slice()},a.invertExtent=function(l){var c=i.indexOf(l);return c<0?[NaN,NaN]:c<1?[e,r[0]]:c>=n?[r[n-1],t]:[r[c-1],r[c]]},a.unknown=function(l){return arguments.length&&(o=l),a},a.thresholds=function(){return r.slice()},a.copy=function(){return UA().domain([e,t]).range(i).unknown(o)},Vr.apply(ta(a),arguments)}function KA(){var e=[.5],t=[0,1],n,r=1;function i(o){return o!=null&&o<=o?t[wu(e,o,0,r)]:n}return i.domain=function(o){return arguments.length?(e=Array.from(o),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(o){return arguments.length?(t=Array.from(o),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(o){var a=t.indexOf(o);return[e[a-1],e[a]]},i.unknown=function(o){return arguments.length?(n=o,i):n},i.copy=function(){return KA().domain(e).range(t).unknown(n)},Vr.apply(i,arguments)}const Eg=new Date,Pg=new Date;function Xt(e,t,n,r){function i(o){return e(o=arguments.length===0?new Date:new Date(+o)),o}return i.floor=o=>(e(o=new Date(+o)),o),i.ceil=o=>(e(o=new Date(o-1)),t(o,1),e(o),o),i.round=o=>{const a=i(o),s=i.ceil(o);return o-a<s-o?a:s},i.offset=(o,a)=>(t(o=new Date(+o),a==null?1:Math.floor(a)),o),i.range=(o,a,s)=>{const l=[];if(o=i.ceil(o),s=s==null?1:Math.floor(s),!(o<a)||!(s>0))return l;let c;do l.push(c=new Date(+o)),t(o,s),e(o);while(c<o&&o<a);return l},i.filter=o=>Xt(a=>{if(a>=a)for(;e(a),!o(a);)a.setTime(a-1)},(a,s)=>{if(a>=a)if(s<0)for(;++s<=0;)for(;t(a,-1),!o(a););else for(;--s>=0;)for(;t(a,1),!o(a););}),n&&(i.count=(o,a)=>(Eg.setTime(+o),Pg.setTime(+a),e(Eg),e(Pg),Math.floor(n(Eg,Pg))),i.every=o=>(o=Math.floor(o),!isFinite(o)||!(o>0)?null:o>1?i.filter(r?a=>r(a)%o===0:a=>i.count(0,a)%o===0):i)),i}const Uf=Xt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);Uf.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?Xt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):Uf);Uf.range;const qi=1e3,Tr=qi*60,Gi=Tr*60,lo=Gi*24,i0=lo*7,_O=lo*30,kg=lo*365,Na=Xt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*qi)},(e,t)=>(t-e)/qi,e=>e.getUTCSeconds());Na.range;const o0=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi)},(e,t)=>{e.setTime(+e+t*Tr)},(e,t)=>(t-e)/Tr,e=>e.getMinutes());o0.range;const a0=Xt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Tr)},(e,t)=>(t-e)/Tr,e=>e.getUTCMinutes());a0.range;const s0=Xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*qi-e.getMinutes()*Tr)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getHours());s0.range;const l0=Xt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*Gi)},(e,t)=>(t-e)/Gi,e=>e.getUTCHours());l0.range;const Ou=Xt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Tr)/lo,e=>e.getDate()-1);Ou.range;const mh=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>e.getUTCDate()-1);mh.range;const qA=Xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/lo,e=>Math.floor(e/lo));qA.range;function as(e){return Xt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Tr)/i0)}const gh=as(0),Kf=as(1),mY=as(2),gY=as(3),Zs=as(4),vY=as(5),yY=as(6);gh.range;Kf.range;mY.range;gY.range;Zs.range;vY.range;yY.range;function ss(e){return Xt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/i0)}const vh=ss(0),qf=ss(1),bY=ss(2),xY=ss(3),Js=ss(4),wY=ss(5),_Y=ss(6);vh.range;qf.range;bY.range;xY.range;Js.range;wY.range;_Y.range;const c0=Xt(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());c0.range;const u0=Xt(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());u0.range;const co=Xt(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());co.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});co.range;const uo=Xt(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());uo.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:Xt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});uo.range;function GA(e,t,n,r,i,o){const a=[[Na,1,qi],[Na,5,5*qi],[Na,15,15*qi],[Na,30,30*qi],[o,1,Tr],[o,5,5*Tr],[o,15,15*Tr],[o,30,30*Tr],[i,1,Gi],[i,3,3*Gi],[i,6,6*Gi],[i,12,12*Gi],[r,1,lo],[r,2,2*lo],[n,1,i0],[t,1,_O],[t,3,3*_O],[e,1,kg]];function s(c,u,d){const f=u<c;f&&([c,u]=[u,c]);const p=d&&typeof d.range=="function"?d:l(c,u,d),m=p?p.range(c,+u+1):[];return f?m.reverse():m}function l(c,u,d){const f=Math.abs(u-c)/d,p=Yb(([,,g])=>g).right(a,f);if(p===a.length)return e.every(ry(c/kg,u/kg,d));if(p===0)return Uf.every(Math.max(ry(c,u,d),1));const[m,h]=a[f/a[p-1][2]<a[p][2]/f?p-1:p];return m.every(h)}return[s,l]}const[SY,OY]=GA(uo,u0,vh,qA,l0,a0),[EY,PY]=GA(co,c0,gh,Ou,s0,o0);function Cg(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 Dg(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 Bl(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function kY(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,o=e.days,a=e.shortDays,s=e.months,l=e.shortMonths,c=Wl(i),u=zl(i),d=Wl(o),f=zl(o),p=Wl(a),m=zl(a),h=Wl(s),g=zl(s),b=Wl(l),S=zl(l),w={a:$,A:V,b:z,B,c:null,d:CO,e:CO,f:XY,g:a9,G:l9,H:KY,I:qY,j:GY,L:XA,m:QY,M:ZY,p:X,q,Q:TO,s:MO,S:JY,u:e9,U:t9,V:n9,w:r9,W:i9,x:null,X:null,y:o9,Y:s9,Z:c9,"%":AO},x={a:re,A:J,b:ee,B:ie,c:null,d:DO,e:DO,f:p9,g:S9,G:E9,H:u9,I:d9,j:f9,L:ZA,m:h9,M:m9,p:ae,q:ue,Q:TO,s:MO,S:g9,u:v9,U:y9,V:b9,w:x9,W:w9,x:null,X:null,y:_9,Y:O9,Z:P9,"%":AO},_={a:j,A,b:P,B:N,c:M,d:PO,e:PO,f:VY,g:EO,G:OO,H:kO,I:kO,j:$Y,L:zY,m:FY,M:BY,p:T,q:LY,Q:YY,s:UY,S:WY,u:MY,U:NY,V:jY,w:TY,W:RY,x:I,X:L,y:EO,Y:OO,Z:IY,"%":HY};w.x=E(n,w),w.X=E(r,w),w.c=E(t,w),x.x=E(n,x),x.X=E(r,x),x.c=E(t,x);function E(U,K){return function(Z){var R=[],ge=-1,te=0,ve=U.length,we,Fe,st;for(Z instanceof Date||(Z=new Date(+Z));++ge<ve;)U.charCodeAt(ge)===37&&(R.push(U.slice(te,ge)),(Fe=SO[we=U.charAt(++ge)])!=null?we=U.charAt(++ge):Fe=we==="e"?" ":"0",(st=K[we])&&(we=st(Z,Fe)),R.push(we),te=ge+1);return R.push(U.slice(te,ge)),R.join("")}}function C(U,K){return function(Z){var R=Bl(1900,void 0,1),ge=D(R,U,Z+="",0),te,ve;if(ge!=Z.length)return null;if("Q"in R)return new Date(R.Q);if("s"in R)return new Date(R.s*1e3+("L"in R?R.L:0));if(K&&!("Z"in R)&&(R.Z=0),"p"in R&&(R.H=R.H%12+R.p*12),R.m===void 0&&(R.m="q"in R?R.q:0),"V"in R){if(R.V<1||R.V>53)return null;"w"in R||(R.w=1),"Z"in R?(te=Dg(Bl(R.y,0,1)),ve=te.getUTCDay(),te=ve>4||ve===0?qf.ceil(te):qf(te),te=mh.offset(te,(R.V-1)*7),R.y=te.getUTCFullYear(),R.m=te.getUTCMonth(),R.d=te.getUTCDate()+(R.w+6)%7):(te=Cg(Bl(R.y,0,1)),ve=te.getDay(),te=ve>4||ve===0?Kf.ceil(te):Kf(te),te=Ou.offset(te,(R.V-1)*7),R.y=te.getFullYear(),R.m=te.getMonth(),R.d=te.getDate()+(R.w+6)%7)}else("W"in R||"U"in R)&&("w"in R||(R.w="u"in R?R.u%7:"W"in R?1:0),ve="Z"in R?Dg(Bl(R.y,0,1)).getUTCDay():Cg(Bl(R.y,0,1)).getDay(),R.m=0,R.d="W"in R?(R.w+6)%7+R.W*7-(ve+5)%7:R.w+R.U*7-(ve+6)%7);return"Z"in R?(R.H+=R.Z/100|0,R.M+=R.Z%100,Dg(R)):Cg(R)}}function D(U,K,Z,R){for(var ge=0,te=K.length,ve=Z.length,we,Fe;ge<te;){if(R>=ve)return-1;if(we=K.charCodeAt(ge++),we===37){if(we=K.charAt(ge++),Fe=_[we in SO?K.charAt(ge++):we],!Fe||(R=Fe(U,Z,R))<0)return-1}else if(we!=Z.charCodeAt(R++))return-1}return R}function T(U,K,Z){var R=c.exec(K.slice(Z));return R?(U.p=u.get(R[0].toLowerCase()),Z+R[0].length):-1}function j(U,K,Z){var R=p.exec(K.slice(Z));return R?(U.w=m.get(R[0].toLowerCase()),Z+R[0].length):-1}function A(U,K,Z){var R=d.exec(K.slice(Z));return R?(U.w=f.get(R[0].toLowerCase()),Z+R[0].length):-1}function P(U,K,Z){var R=b.exec(K.slice(Z));return R?(U.m=S.get(R[0].toLowerCase()),Z+R[0].length):-1}function N(U,K,Z){var R=h.exec(K.slice(Z));return R?(U.m=g.get(R[0].toLowerCase()),Z+R[0].length):-1}function M(U,K,Z){return D(U,t,K,Z)}function I(U,K,Z){return D(U,n,K,Z)}function L(U,K,Z){return D(U,r,K,Z)}function $(U){return a[U.getDay()]}function V(U){return o[U.getDay()]}function z(U){return l[U.getMonth()]}function B(U){return s[U.getMonth()]}function X(U){return i[+(U.getHours()>=12)]}function q(U){return 1+~~(U.getMonth()/3)}function re(U){return a[U.getUTCDay()]}function J(U){return o[U.getUTCDay()]}function ee(U){return l[U.getUTCMonth()]}function ie(U){return s[U.getUTCMonth()]}function ae(U){return i[+(U.getUTCHours()>=12)]}function ue(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var K=E(U+="",w);return K.toString=function(){return U},K},parse:function(U){var K=C(U+="",!1);return K.toString=function(){return U},K},utcFormat:function(U){var K=E(U+="",x);return K.toString=function(){return U},K},utcParse:function(U){var K=C(U+="",!0);return K.toString=function(){return U},K}}}var SO={"-":"",_:" ",0:"0"},rn=/^\s*\d+/,CY=/^%/,DY=/[\\^$*+?|[\]().{}]/g;function Me(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function AY(e){return e.replace(DY,"\\$&")}function Wl(e){return new RegExp("^(?:"+e.map(AY).join("|")+")","i")}function zl(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function TY(e,t,n){var r=rn.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function MY(e,t,n){var r=rn.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function NY(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function jY(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function RY(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function OO(e,t,n){var r=rn.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function EO(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function IY(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function LY(e,t,n){var r=rn.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function FY(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function PO(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function $Y(e,t,n){var r=rn.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function kO(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function BY(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function WY(e,t,n){var r=rn.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function zY(e,t,n){var r=rn.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function VY(e,t,n){var r=rn.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function HY(e,t,n){var r=CY.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function YY(e,t,n){var r=rn.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function UY(e,t,n){var r=rn.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function CO(e,t){return Me(e.getDate(),t,2)}function KY(e,t){return Me(e.getHours(),t,2)}function qY(e,t){return Me(e.getHours()%12||12,t,2)}function GY(e,t){return Me(1+Ou.count(co(e),e),t,3)}function XA(e,t){return Me(e.getMilliseconds(),t,3)}function XY(e,t){return XA(e,t)+"000"}function QY(e,t){return Me(e.getMonth()+1,t,2)}function ZY(e,t){return Me(e.getMinutes(),t,2)}function JY(e,t){return Me(e.getSeconds(),t,2)}function e9(e){var t=e.getDay();return t===0?7:t}function t9(e,t){return Me(gh.count(co(e)-1,e),t,2)}function QA(e){var t=e.getDay();return t>=4||t===0?Zs(e):Zs.ceil(e)}function n9(e,t){return e=QA(e),Me(Zs.count(co(e),e)+(co(e).getDay()===4),t,2)}function r9(e){return e.getDay()}function i9(e,t){return Me(Kf.count(co(e)-1,e),t,2)}function o9(e,t){return Me(e.getFullYear()%100,t,2)}function a9(e,t){return e=QA(e),Me(e.getFullYear()%100,t,2)}function s9(e,t){return Me(e.getFullYear()%1e4,t,4)}function l9(e,t){var n=e.getDay();return e=n>=4||n===0?Zs(e):Zs.ceil(e),Me(e.getFullYear()%1e4,t,4)}function c9(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+Me(t/60|0,"0",2)+Me(t%60,"0",2)}function DO(e,t){return Me(e.getUTCDate(),t,2)}function u9(e,t){return Me(e.getUTCHours(),t,2)}function d9(e,t){return Me(e.getUTCHours()%12||12,t,2)}function f9(e,t){return Me(1+mh.count(uo(e),e),t,3)}function ZA(e,t){return Me(e.getUTCMilliseconds(),t,3)}function p9(e,t){return ZA(e,t)+"000"}function h9(e,t){return Me(e.getUTCMonth()+1,t,2)}function m9(e,t){return Me(e.getUTCMinutes(),t,2)}function g9(e,t){return Me(e.getUTCSeconds(),t,2)}function v9(e){var t=e.getUTCDay();return t===0?7:t}function y9(e,t){return Me(vh.count(uo(e)-1,e),t,2)}function JA(e){var t=e.getUTCDay();return t>=4||t===0?Js(e):Js.ceil(e)}function b9(e,t){return e=JA(e),Me(Js.count(uo(e),e)+(uo(e).getUTCDay()===4),t,2)}function x9(e){return e.getUTCDay()}function w9(e,t){return Me(qf.count(uo(e)-1,e),t,2)}function _9(e,t){return Me(e.getUTCFullYear()%100,t,2)}function S9(e,t){return e=JA(e),Me(e.getUTCFullYear()%100,t,2)}function O9(e,t){return Me(e.getUTCFullYear()%1e4,t,4)}function E9(e,t){var n=e.getUTCDay();return e=n>=4||n===0?Js(e):Js.ceil(e),Me(e.getUTCFullYear()%1e4,t,4)}function P9(){return"+0000"}function AO(){return"%"}function TO(e){return+e}function MO(e){return Math.floor(+e/1e3)}var bs,eT,tT;k9({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 k9(e){return bs=kY(e),eT=bs.format,bs.parse,tT=bs.utcFormat,bs.utcParse,bs}function C9(e){return new Date(e)}function D9(e){return e instanceof Date?+e:+new Date(+e)}function d0(e,t,n,r,i,o,a,s,l,c){var u=Qb(),d=u.invert,f=u.domain,p=c(".%L"),m=c(":%S"),h=c("%I:%M"),g=c("%I %p"),b=c("%a %d"),S=c("%b %d"),w=c("%B"),x=c("%Y");function _(E){return(l(E)<E?p:s(E)<E?m:a(E)<E?h:o(E)<E?g:r(E)<E?i(E)<E?b:S:n(E)<E?w:x)(E)}return u.invert=function(E){return new Date(d(E))},u.domain=function(E){return arguments.length?f(Array.from(E,D9)):f().map(C9)},u.ticks=function(E){var C=f();return e(C[0],C[C.length-1],E??10)},u.tickFormat=function(E,C){return C==null?_:c(C)},u.nice=function(E){var C=f();return(!E||typeof E.range!="function")&&(E=t(C[0],C[C.length-1],E??10)),E?f(WA(C,E)):u},u.copy=function(){return Su(u,d0(e,t,n,r,i,o,a,s,l,c))},u}function A9(){return Vr.apply(d0(EY,PY,co,c0,gh,Ou,s0,o0,Na,eT).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function T9(){return Vr.apply(d0(SY,OY,uo,u0,vh,mh,l0,a0,Na,tT).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function yh(){var e=0,t=1,n,r,i,o,a=Rn,s=!1,l;function c(d){return d==null||isNaN(d=+d)?l:a(i===0?.5:(d=(o(d)-n)*i,s?Math.max(0,Math.min(1,d)):d))}c.domain=function(d){return arguments.length?([e,t]=d,n=o(e=+e),r=o(t=+t),i=n===r?0:1/(r-n),c):[e,t]},c.clamp=function(d){return arguments.length?(s=!!d,c):s},c.interpolator=function(d){return arguments.length?(a=d,c):a};function u(d){return function(f){var p,m;return arguments.length?([p,m]=f,a=d(p,m),c):[a(0),a(1)]}}return c.range=u(pl),c.rangeRound=u(Xb),c.unknown=function(d){return arguments.length?(l=d,c):l},function(d){return o=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),c}}function na(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function nT(){var e=ta(yh()(Rn));return e.copy=function(){return na(e,nT())},xo.apply(e,arguments)}function rT(){var e=e0(yh()).domain([1,10]);return e.copy=function(){return na(e,rT()).base(e.base())},xo.apply(e,arguments)}function iT(){var e=t0(yh());return e.copy=function(){return na(e,iT()).constant(e.constant())},xo.apply(e,arguments)}function f0(){var e=n0(yh());return e.copy=function(){return na(e,f0()).exponent(e.exponent())},xo.apply(e,arguments)}function M9(){return f0.apply(null,arguments).exponent(.5)}function oT(){var e=[],t=Rn;function n(r){if(r!=null&&!isNaN(r=+r))return t((wu(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(Wo),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,o)=>vH(e,o/r))},n.copy=function(){return oT(t).domain(e)},xo.apply(n,arguments)}function bh(){var e=0,t=.5,n=1,r=1,i,o,a,s,l,c=Rn,u,d=!1,f;function p(h){return isNaN(h=+h)?f:(h=.5+((h=+u(h))-o)*(r*h<r*o?s:l),c(d?Math.max(0,Math.min(1,h)):h))}p.domain=function(h){return arguments.length?([e,t,n]=h,i=u(e=+e),o=u(t=+t),a=u(n=+n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p):[e,t,n]},p.clamp=function(h){return arguments.length?(d=!!h,p):d},p.interpolator=function(h){return arguments.length?(c=h,p):c};function m(h){return function(g){var b,S,w;return arguments.length?([b,S,w]=g,c=HH(h,[b,S,w]),p):[c(0),c(.5),c(1)]}}return p.range=m(pl),p.rangeRound=m(Xb),p.unknown=function(h){return arguments.length?(f=h,p):f},function(h){return u=h,i=h(e),o=h(t),a=h(n),s=i===o?0:.5/(o-i),l=o===a?0:.5/(a-o),r=o<i?-1:1,p}}function aT(){var e=ta(bh()(Rn));return e.copy=function(){return na(e,aT())},xo.apply(e,arguments)}function sT(){var e=e0(bh()).domain([.1,1,10]);return e.copy=function(){return na(e,sT()).base(e.base())},xo.apply(e,arguments)}function lT(){var e=t0(bh());return e.copy=function(){return na(e,lT()).constant(e.constant())},xo.apply(e,arguments)}function p0(){var e=n0(bh());return e.copy=function(){return na(e,p0()).exponent(e.exponent())},xo.apply(e,arguments)}function N9(){return p0.apply(null,arguments).exponent(.5)}const ac=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Kb,scaleDiverging:aT,scaleDivergingLog:sT,scaleDivergingPow:p0,scaleDivergingSqrt:N9,scaleDivergingSymlog:lT,scaleIdentity:BA,scaleImplicit:iy,scaleLinear:$A,scaleLog:zA,scaleOrdinal:Ub,scalePoint:xH,scalePow:r0,scaleQuantile:YA,scaleQuantize:UA,scaleRadial:HA,scaleSequential:nT,scaleSequentialLog:rT,scaleSequentialPow:f0,scaleSequentialQuantile:oT,scaleSequentialSqrt:M9,scaleSequentialSymlog:iT,scaleSqrt:pY,scaleSymlog:VA,scaleThreshold:KA,scaleTime:A9,scaleUtc:T9,tickFormat:FA},Symbol.toStringTag,{value:"Module"}));var ra=e=>e.chartData,h0=W([ra],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Eu=(e,t,n,r)=>r?h0(e):ra(e);function el(e){if(Array.isArray(e)&&e.length===2){var[t,n]=e;if(dn(t)&&dn(n))return!0}return!1}function NO(e,t,n){return n?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function j9(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[n,r]=e,i,o;if(dn(n))i=n;else if(typeof n=="function")return;if(dn(r))o=r;else if(typeof r=="function")return;var a=[i,o];if(el(a))return a}}function R9(e,t,n){if(!(!n&&t==null)){if(typeof e=="function"&&t!=null)try{var r=e(t,n);if(el(r))return NO(r,t,n)}catch{}if(Array.isArray(e)&&e.length===2){var[i,o]=e,a,s;if(i==="auto")t!=null&&(a=Math.min(...t));else if(pe(i))a=i;else if(typeof i=="function")try{t!=null&&(a=i(t?.[0]))}catch{}else if(typeof i=="string"&&SS.test(i)){var l=SS.exec(i);if(l==null||t==null)a=void 0;else{var c=+l[1];a=t[0]-c}}else a=t?.[0];if(o==="auto")t!=null&&(s=Math.max(...t));else if(pe(o))s=o;else if(typeof o=="function")try{t!=null&&(s=o(t?.[1]))}catch{}else if(typeof o=="string"&&OS.test(o)){var u=OS.exec(o);if(u==null||t==null)s=void 0;else{var d=+u[1];s=t[1]+d}}else s=t?.[1];var f=[a,s];if(el(f))return t==null?f:NO(f,t,n)}}}var hl=1e9,I9={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},g0,bt=!0,Ir="[DecimalError] ",za=Ir+"Invalid argument: ",m0=Ir+"Exponent out of range: ",ml=Math.floor,wa=Math.pow,L9=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,dr,en=1e7,ft=7,cT=9007199254740991,Gf=ml(cT/ft),fe={};fe.absoluteValue=fe.abs=function(){var e=new this.constructor(this);return e.s&&(e.s=1),e};fe.comparedTo=fe.cmp=function(e){var t,n,r,i,o=this;if(e=new o.constructor(e),o.s!==e.s)return o.s||-e.s;if(o.e!==e.e)return o.e>e.e^o.s<0?1:-1;for(r=o.d.length,i=e.d.length,t=0,n=r<i?r:i;t<n;++t)if(o.d[t]!==e.d[t])return o.d[t]>e.d[t]^o.s<0?1:-1;return r===i?0:r>i^o.s<0?1:-1};fe.decimalPlaces=fe.dp=function(){var e=this,t=e.d.length-1,n=(t-e.e)*ft;if(t=e.d[t],t)for(;t%10==0;t/=10)n--;return n<0?0:n};fe.dividedBy=fe.div=function(e){return to(this,new this.constructor(e))};fe.dividedToIntegerBy=fe.idiv=function(e){var t=this,n=t.constructor;return at(to(t,new n(e),0,1),n.precision)};fe.equals=fe.eq=function(e){return!this.cmp(e)};fe.exponent=function(){return zt(this)};fe.greaterThan=fe.gt=function(e){return this.cmp(e)>0};fe.greaterThanOrEqualTo=fe.gte=function(e){return this.cmp(e)>=0};fe.isInteger=fe.isint=function(){return this.e>this.d.length-2};fe.isNegative=fe.isneg=function(){return this.s<0};fe.isPositive=fe.ispos=function(){return this.s>0};fe.isZero=function(){return this.s===0};fe.lessThan=fe.lt=function(e){return this.cmp(e)<0};fe.lessThanOrEqualTo=fe.lte=function(e){return this.cmp(e)<1};fe.logarithm=fe.log=function(e){var t,n=this,r=n.constructor,i=r.precision,o=i+5;if(e===void 0)e=new r(10);else if(e=new r(e),e.s<1||e.eq(dr))throw Error(Ir+"NaN");if(n.s<1)throw Error(Ir+(n.s?"NaN":"-Infinity"));return n.eq(dr)?new r(0):(bt=!1,t=to(Wc(n,o),Wc(e,o),o),bt=!0,at(t,i))};fe.minus=fe.sub=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?fT(t,e):uT(t,(e.s=-e.s,e))};fe.modulo=fe.mod=function(e){var t,n=this,r=n.constructor,i=r.precision;if(e=new r(e),!e.s)throw Error(Ir+"NaN");return n.s?(bt=!1,t=to(n,e,0,1).times(e),bt=!0,n.minus(t)):at(new r(n),i)};fe.naturalExponential=fe.exp=function(){return dT(this)};fe.naturalLogarithm=fe.ln=function(){return Wc(this)};fe.negated=fe.neg=function(){var e=new this.constructor(this);return e.s=-e.s||0,e};fe.plus=fe.add=function(e){var t=this;return e=new t.constructor(e),t.s==e.s?uT(t,e):fT(t,(e.s=-e.s,e))};fe.precision=fe.sd=function(e){var t,n,r,i=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(za+e);if(t=zt(i)+1,r=i.d.length-1,n=r*ft+1,r=i.d[r],r){for(;r%10==0;r/=10)n--;for(r=i.d[0];r>=10;r/=10)n++}return e&&t>n?t:n};fe.squareRoot=fe.sqrt=function(){var e,t,n,r,i,o,a,s=this,l=s.constructor;if(s.s<1){if(!s.s)return new l(0);throw Error(Ir+"NaN")}for(e=zt(s),bt=!1,i=Math.sqrt(+s),i==0||i==1/0?(t=mi(s.d),(t.length+e)%2==0&&(t+="0"),i=Math.sqrt(t),e=ml((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),r=new l(t)):r=new l(i.toString()),n=l.precision,i=a=n+3;;)if(o=r,r=o.plus(to(s,o,a+2)).times(.5),mi(o.d).slice(0,a)===(t=mi(r.d)).slice(0,a)){if(t=t.slice(a-3,a+1),i==a&&t=="4999"){if(at(o,n+1,0),o.times(o).eq(s)){r=o;break}}else if(t!="9999")break;a+=4}return bt=!0,at(r,n)};fe.times=fe.mul=function(e){var t,n,r,i,o,a,s,l,c,u=this,d=u.constructor,f=u.d,p=(e=new d(e)).d;if(!u.s||!e.s)return new d(0);for(e.s*=u.s,n=u.e+e.e,l=f.length,c=p.length,l<c&&(o=f,f=p,p=o,a=l,l=c,c=a),o=[],a=l+c,r=a;r--;)o.push(0);for(r=c;--r>=0;){for(t=0,i=l+r;i>r;)s=o[i]+p[r]*f[i-r-1]+t,o[i--]=s%en|0,t=s/en|0;o[i]=(o[i]+t)%en|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=n,bt?at(e,d.precision):e};fe.toDecimalPlaces=fe.todp=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Oi(e,0,hl),t===void 0?t=r.rounding:Oi(t,0,8),at(n,e+zt(n)+1,t))};fe.toExponential=function(e,t){var n,r=this,i=r.constructor;return e===void 0?n=Qa(r,!0):(Oi(e,0,hl),t===void 0?t=i.rounding:Oi(t,0,8),r=at(new i(r),e+1,t),n=Qa(r,!0,e+1)),n};fe.toFixed=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?Qa(i):(Oi(e,0,hl),t===void 0?t=o.rounding:Oi(t,0,8),r=at(new o(i),e+zt(i)+1,t),n=Qa(r.abs(),!1,e+zt(r)+1),i.isneg()&&!i.isZero()?"-"+n:n)};fe.toInteger=fe.toint=function(){var e=this,t=e.constructor;return at(new t(e),zt(e)+1,t.rounding)};fe.toNumber=function(){return+this};fe.toPower=fe.pow=function(e){var t,n,r,i,o,a,s=this,l=s.constructor,c=12,u=+(e=new l(e));if(!e.s)return new l(dr);if(s=new l(s),!s.s){if(e.s<1)throw Error(Ir+"Infinity");return s}if(s.eq(dr))return s;if(r=l.precision,e.eq(dr))return at(s,r);if(t=e.e,n=e.d.length-1,a=t>=n,o=s.s,a){if((n=u<0?-u:u)<=cT){for(i=new l(dr),t=Math.ceil(r/ft+4),bt=!1;n%2&&(i=i.times(s),RO(i.d,t)),n=ml(n/2),n!==0;)s=s.times(s),RO(s.d,t);return bt=!0,e.s<0?new l(dr).div(i):at(i,r)}}else if(o<0)throw Error(Ir+"NaN");return o=o<0&&e.d[Math.max(t,n)]&1?-1:1,s.s=1,bt=!1,i=e.times(Wc(s,r+c)),bt=!0,i=dT(i),i.s=o,i};fe.toPrecision=function(e,t){var n,r,i=this,o=i.constructor;return e===void 0?(n=zt(i),r=Qa(i,n<=o.toExpNeg||n>=o.toExpPos)):(Oi(e,1,hl),t===void 0?t=o.rounding:Oi(t,0,8),i=at(new o(i),e,t),n=zt(i),r=Qa(i,e<=n||n<=o.toExpNeg,e)),r};fe.toSignificantDigits=fe.tosd=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Oi(e,1,hl),t===void 0?t=r.rounding:Oi(t,0,8)),at(new r(n),e,t)};fe.toString=fe.valueOf=fe.val=fe.toJSON=fe[Symbol.for("nodejs.util.inspect.custom")]=function(){var e=this,t=zt(e),n=e.constructor;return Qa(e,t<=n.toExpNeg||t>=n.toExpPos)};function uT(e,t){var n,r,i,o,a,s,l,c,u=e.constructor,d=u.precision;if(!e.s||!t.s)return t.s||(t=new u(e)),bt?at(t,d):t;if(l=e.d,c=t.d,a=e.e,i=t.e,l=l.slice(),o=a-i,o){for(o<0?(r=l,o=-o,s=c.length):(r=c,i=a,s=l.length),a=Math.ceil(d/ft),s=a>s?a+1:s+1,o>s&&(o=s,r.length=1),r.reverse();o--;)r.push(0);r.reverse()}for(s=l.length,o=c.length,s-o<0&&(o=s,r=c,c=l,l=r),n=0;o;)n=(l[--o]=l[o]+c[o]+n)/en|0,l[o]%=en;for(n&&(l.unshift(n),++i),s=l.length;l[--s]==0;)l.pop();return t.d=l,t.e=i,bt?at(t,d):t}function Oi(e,t,n){if(e!==~~e||e<t||e>n)throw Error(za+e)}function mi(e){var t,n,r,i=e.length-1,o="",a=e[0];if(i>0){for(o+=a,t=1;t<i;t++)r=e[t]+"",n=ft-r.length,n&&(o+=Ao(n)),o+=r;a=e[t],r=a+"",n=ft-r.length,n&&(o+=Ao(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}var to=(function(){function e(r,i){var o,a=0,s=r.length;for(r=r.slice();s--;)o=r[s]*i+a,r[s]=o%en|0,a=o/en|0;return a&&r.unshift(a),r}function t(r,i,o,a){var s,l;if(o!=a)l=o>a?1:-1;else for(s=l=0;s<o;s++)if(r[s]!=i[s]){l=r[s]>i[s]?1:-1;break}return l}function n(r,i,o){for(var a=0;o--;)r[o]-=a,a=r[o]<i[o]?1:0,r[o]=a*en+r[o]-i[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,i,o,a){var s,l,c,u,d,f,p,m,h,g,b,S,w,x,_,E,C,D,T=r.constructor,j=r.s==i.s?1:-1,A=r.d,P=i.d;if(!r.s)return new T(r);if(!i.s)throw Error(Ir+"Division by zero");for(l=r.e-i.e,C=P.length,_=A.length,p=new T(j),m=p.d=[],c=0;P[c]==(A[c]||0);)++c;if(P[c]>(A[c]||0)&&--l,o==null?S=o=T.precision:a?S=o+(zt(r)-zt(i))+1:S=o,S<0)return new T(0);if(S=S/ft+2|0,c=0,C==1)for(u=0,P=P[0],S++;(c<_||u)&&S--;c++)w=u*en+(A[c]||0),m[c]=w/P|0,u=w%P|0;else{for(u=en/(P[0]+1)|0,u>1&&(P=e(P,u),A=e(A,u),C=P.length,_=A.length),x=C,h=A.slice(0,C),g=h.length;g<C;)h[g++]=0;D=P.slice(),D.unshift(0),E=P[0],P[1]>=en/2&&++E;do u=0,s=t(P,h,C,g),s<0?(b=h[0],C!=g&&(b=b*en+(h[1]||0)),u=b/E|0,u>1?(u>=en&&(u=en-1),d=e(P,u),f=d.length,g=h.length,s=t(d,h,f,g),s==1&&(u--,n(d,C<f?D:P,f))):(u==0&&(s=u=1),d=P.slice()),f=d.length,f<g&&d.unshift(0),n(h,d,g),s==-1&&(g=h.length,s=t(P,h,C,g),s<1&&(u++,n(h,C<g?D:P,g))),g=h.length):s===0&&(u++,h=[0]),m[c++]=u,s&&h[0]?h[g++]=A[x]||0:(h=[A[x]],g=1);while((x++<_||h[0]!==void 0)&&S--)}return m[0]||m.shift(),p.e=l,at(p,a?o+zt(p)+1:o)}})();function dT(e,t){var n,r,i,o,a,s,l=0,c=0,u=e.constructor,d=u.precision;if(zt(e)>16)throw Error(m0+zt(e));if(!e.s)return new u(dr);for(bt=!1,s=d,a=new u(.03125);e.abs().gte(.1);)e=e.times(a),c+=5;for(r=Math.log(wa(2,c))/Math.LN10*2+5|0,s+=r,n=i=o=new u(dr),u.precision=s;;){if(i=at(i.times(e),s),n=n.times(++l),a=o.plus(to(i,n,s)),mi(a.d).slice(0,s)===mi(o.d).slice(0,s)){for(;c--;)o=at(o.times(o),s);return u.precision=d,t==null?(bt=!0,at(o,d)):o}o=a}}function zt(e){for(var t=e.e*ft,n=e.d[0];n>=10;n/=10)t++;return t}function Ag(e,t,n){if(t>e.LN10.sd())throw bt=!0,n&&(e.precision=n),Error(Ir+"LN10 precision limit exceeded");return at(new e(e.LN10),t)}function Ao(e){for(var t="";e--;)t+="0";return t}function Wc(e,t){var n,r,i,o,a,s,l,c,u,d=1,f=10,p=e,m=p.d,h=p.constructor,g=h.precision;if(p.s<1)throw Error(Ir+(p.s?"NaN":"-Infinity"));if(p.eq(dr))return new h(0);if(t==null?(bt=!1,c=g):c=t,p.eq(10))return t==null&&(bt=!0),Ag(h,c);if(c+=f,h.precision=c,n=mi(m),r=n.charAt(0),o=zt(p),Math.abs(o)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)p=p.times(e),n=mi(p.d),r=n.charAt(0),d++;o=zt(p),r>1?(p=new h("0."+n),o++):p=new h(r+"."+n.slice(1))}else return l=Ag(h,c+2,g).times(o+""),p=Wc(new h(r+"."+n.slice(1)),c-f).plus(l),h.precision=g,t==null?(bt=!0,at(p,g)):p;for(s=a=p=to(p.minus(dr),p.plus(dr),c),u=at(p.times(p),c),i=3;;){if(a=at(a.times(u),c),l=s.plus(to(a,new h(i),c)),mi(l.d).slice(0,c)===mi(s.d).slice(0,c))return s=s.times(2),o!==0&&(s=s.plus(Ag(h,c+2,g).times(o+""))),s=to(s,new h(d),c),h.precision=g,t==null?(bt=!0,at(s,g)):s;s=l,i+=2}}function jO(e,t){var n,r,i;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;)++r;for(i=t.length;t.charCodeAt(i-1)===48;)--i;if(t=t.slice(r,i),t){if(i-=r,n=n-r-1,e.e=ml(n/ft),e.d=[],r=(n+1)%ft,n<0&&(r+=ft),r<i){for(r&&e.d.push(+t.slice(0,r)),i-=ft;r<i;)e.d.push(+t.slice(r,r+=ft));t=t.slice(r),r=ft-t.length}else r-=i;for(;r--;)t+="0";if(e.d.push(+t),bt&&(e.e>Gf||e.e<-Gf))throw Error(m0+n)}else e.s=0,e.e=0,e.d=[0];return e}function at(e,t,n){var r,i,o,a,s,l,c,u,d=e.d;for(a=1,o=d[0];o>=10;o/=10)a++;if(r=t-a,r<0)r+=ft,i=t,c=d[u=0];else{if(u=Math.ceil((r+1)/ft),o=d.length,u>=o)return e;for(c=o=d[u],a=1;o>=10;o/=10)a++;r%=ft,i=r-ft+a}if(n!==void 0&&(o=wa(10,a-i-1),s=c/o%10|0,l=t<0||d[u+1]!==void 0||c%o,l=n<4?(s||l)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||l||n==6&&(r>0?i>0?c/wa(10,a-i):0:d[u-1])%10&1||n==(e.s<0?8:7))),t<1||!d[0])return l?(o=zt(e),d.length=1,t=t-o-1,d[0]=wa(10,(ft-t%ft)%ft),e.e=ml(-t/ft)||0):(d.length=1,d[0]=e.e=e.s=0),e;if(r==0?(d.length=u,o=1,u--):(d.length=u+1,o=wa(10,ft-r),d[u]=i>0?(c/wa(10,a-i)%wa(10,i)|0)*o:0),l)for(;;)if(u==0){(d[0]+=o)==en&&(d[0]=1,++e.e);break}else{if(d[u]+=o,d[u]!=en)break;d[u--]=0,o=1}for(r=d.length;d[--r]===0;)d.pop();if(bt&&(e.e>Gf||e.e<-Gf))throw Error(m0+zt(e));return e}function fT(e,t){var n,r,i,o,a,s,l,c,u,d,f=e.constructor,p=f.precision;if(!e.s||!t.s)return t.s?t.s=-t.s:t=new f(e),bt?at(t,p):t;if(l=e.d,d=t.d,r=t.e,c=e.e,l=l.slice(),a=c-r,a){for(u=a<0,u?(n=l,a=-a,s=d.length):(n=d,r=c,s=l.length),i=Math.max(Math.ceil(p/ft),s)+2,a>i&&(a=i,n.length=1),n.reverse(),i=a;i--;)n.push(0);n.reverse()}else{for(i=l.length,s=d.length,u=i<s,u&&(s=i),i=0;i<s;i++)if(l[i]!=d[i]){u=l[i]<d[i];break}a=0}for(u&&(n=l,l=d,d=n,t.s=-t.s),s=l.length,i=d.length-s;i>0;--i)l[s++]=0;for(i=d.length;i>a;){if(l[--i]<d[i]){for(o=i;o&&l[--o]===0;)l[o]=en-1;--l[o],l[i]+=en}l[i]-=d[i]}for(;l[--s]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=r,bt?at(t,p):t):new f(0)}function Qa(e,t,n){var r,i=zt(e),o=mi(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+Ao(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(i<0?"e":"e+")+i):i<0?(o="0."+Ao(-i-1)+o,n&&(r=n-a)>0&&(o+=Ao(r))):i>=a?(o+=Ao(i+1-a),n&&(r=n-i-1)>0&&(o=o+"."+Ao(r))):((r=i+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(i+1===a&&(o+="."),o+=Ao(r))),e.s<0?"-"+o:o}function RO(e,t){if(e.length>t)return e.length=t,!0}function pT(e){var t,n,r;function i(o){var a=this;if(!(a instanceof i))return new i(o);if(a.constructor=i,o instanceof i){a.s=o.s,a.e=o.e,a.d=(o=o.d)?o.slice():o;return}if(typeof o=="number"){if(o*0!==0)throw Error(za+o);if(o>0)a.s=1;else if(o<0)o=-o,a.s=-1;else{a.s=0,a.e=0,a.d=[0];return}if(o===~~o&&o<1e7){a.e=0,a.d=[o];return}return jO(a,o.toString())}else if(typeof o!="string")throw Error(za+o);if(o.charCodeAt(0)===45?(o=o.slice(1),a.s=-1):a.s=1,L9.test(o))jO(a,o);else throw Error(za+o)}if(i.prototype=fe,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=pT,i.config=i.set=F9,e===void 0&&(e={}),e)for(r=["precision","rounding","toExpNeg","toExpPos","LN10"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return i.config(e),i}function F9(e){if(!e||typeof e!="object")throw Error(Ir+"Object expected");var t,n,r,i=["precision",1,hl,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(t=0;t<i.length;t+=3)if((r=e[n=i[t]])!==void 0)if(ml(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(za+n+": "+r);if((r=e[n="LN10"])!==void 0)if(r==Math.LN10)this[n]=new this(r);else throw Error(za+n+": "+r);return this}var g0=pT(I9);dr=new g0(1);const Xe=g0;var $9=e=>e,hT={},mT=e=>e===hT,IO=e=>function t(){return arguments.length===0||arguments.length===1&&mT(arguments.length<=0?void 0:arguments[0])?t:e(...arguments)},gT=(e,t)=>e===1?t:IO(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=r.filter(a=>a!==hT).length;return o>=e?t(...r):gT(e-o,IO(function(){for(var a=arguments.length,s=new Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=r.map(u=>mT(u)?s.shift():u);return t(...c,...s)}))}),xh=e=>gT(e.length,e),ly=(e,t)=>{for(var n=[],r=e;r<t;++r)n[r-e]=r;return n},B9=xh((e,t)=>Array.isArray(t)?t.map(e):Object.keys(t).map(n=>t[n]).map(e)),W9=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];if(!n.length)return $9;var i=n.reverse(),o=i[0],a=i.slice(1);return function(){return a.reduce((s,l)=>l(s),o(...arguments))}},cy=e=>Array.isArray(e)?e.reverse():e.split("").reverse().join(""),vT=e=>{var t=null,n=null;return function(){for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return t&&i.every((a,s)=>{var l;return a===((l=t)===null||l===void 0?void 0:l[s])})||(t=i,n=e(...i)),n}};function yT(e){var t;return e===0?t=1:t=Math.floor(new Xe(e).abs().log(10).toNumber())+1,t}function bT(e,t,n){for(var r=new Xe(e),i=0,o=[];r.lt(t)&&i<1e5;)o.push(r.toNumber()),r=r.add(n),i++;return o}xh((e,t,n)=>{var r=+e,i=+t;return r+n*(i-r)});xh((e,t,n)=>{var r=t-+e;return r=r||1/0,(n-e)/r});xh((e,t,n)=>{var r=t-+e;return r=r||1/0,Math.max(0,Math.min(1,(n-e)/r))});var xT=e=>{var[t,n]=e,[r,i]=[t,n];return t>n&&([r,i]=[n,t]),[r,i]},wT=(e,t,n)=>{if(e.lte(0))return new Xe(0);var r=yT(e.toNumber()),i=new Xe(10).pow(r),o=e.div(i),a=r!==1?.05:.1,s=new Xe(Math.ceil(o.div(a).toNumber())).add(n).mul(a),l=s.mul(i);return t?new Xe(l.toNumber()):new Xe(Math.ceil(l.toNumber()))},z9=(e,t,n)=>{var r=new Xe(1),i=new Xe(e);if(!i.isint()&&n){var o=Math.abs(e);o<1?(r=new Xe(10).pow(yT(e)-1),i=new Xe(Math.floor(i.div(r).toNumber())).mul(r)):o>1&&(i=new Xe(Math.floor(e)))}else e===0?i=new Xe(Math.floor((t-1)/2)):n||(i=new Xe(Math.floor(e)));var a=Math.floor((t-1)/2),s=W9(B9(l=>i.add(new Xe(l-a).mul(r)).toNumber()),ly);return s(0,t)},_T=function(t,n,r,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;if(!Number.isFinite((n-t)/(r-1)))return{step:new Xe(0),tickMin:new Xe(0),tickMax:new Xe(0)};var a=wT(new Xe(n).sub(t).div(r-1),i,o),s;t<=0&&n>=0?s=new Xe(0):(s=new Xe(t).add(n).div(2),s=s.sub(new Xe(s).mod(a)));var l=Math.ceil(s.sub(t).div(a).toNumber()),c=Math.ceil(new Xe(n).sub(s).div(a).toNumber()),u=l+c+1;return u>r?_T(t,n,r,i,o+1):(u<r&&(c=n>0?c+(r-u):c,l=n>0?l:l+(r-u)),{step:a,tickMin:s.sub(new Xe(l).mul(a)),tickMax:s.add(new Xe(c).mul(a))})};function V9(e){var[t,n]=e,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,o=Math.max(r,2),[a,s]=xT([t,n]);if(a===-1/0||s===1/0){var l=s===1/0?[a,...ly(0,r-1).map(()=>1/0)]:[...ly(0,r-1).map(()=>-1/0),s];return t>n?cy(l):l}if(a===s)return z9(a,r,i);var{step:c,tickMin:u,tickMax:d}=_T(a,s,o,i,0),f=bT(u,d.add(new Xe(.1).mul(c)),c);return t>n?cy(f):f}function H9(e,t){var[n,r]=e,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,[o,a]=xT([n,r]);if(o===-1/0||a===1/0)return[n,r];if(o===a)return[o];var s=Math.max(t,2),l=wT(new Xe(a).sub(o).div(s-1),i,0),c=[...bT(new Xe(o),new Xe(a),l),a];return i===!1&&(c=c.map(u=>Math.round(u))),n>r?cy(c):c}var Y9=vT(V9),U9=vT(H9),ST=e=>e.rootProps.maxBarSize,K9=e=>e.rootProps.barGap,OT=e=>e.rootProps.barCategoryGap,q9=e=>e.rootProps.barSize,Pu=e=>e.rootProps.stackOffset,v0=e=>e.options.chartName,y0=e=>e.rootProps.syncId,ET=e=>e.rootProps.syncMethod,b0=e=>e.options.eventEmitter,Hi={allowDuplicatedCategory:!0,angleAxisId:0,reversed:!1,scale:"auto",tick:!0,type:"category"},lr={allowDataOverflow:!1,allowDuplicatedCategory:!0,radiusAxisId:0,scale:"auto",tick:!0,tickCount:5,type:"number"},wh=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t},G9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:Hi.reversed,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:Hi.type,unit:void 0},X9={allowDataOverflow:lr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:lr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:lr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:lr.scale,tick:lr.tick,tickCount:lr.tickCount,ticks:void 0,type:lr.type,unit:void 0},Q9={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:Hi.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:Hi.angleAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:Hi.scale,tick:Hi.tick,tickCount:void 0,ticks:void 0,type:"number",unit:void 0},Z9={allowDataOverflow:lr.allowDataOverflow,allowDecimals:!1,allowDuplicatedCategory:lr.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:lr.radiusAxisId,includeHidden:!1,name:void 0,reversed:!1,scale:lr.scale,tick:lr.tick,tickCount:lr.tickCount,ticks:void 0,type:"category",unit:void 0},x0=(e,t)=>e.polarAxis.angleAxis[t]!=null?e.polarAxis.angleAxis[t]:e.layout.layoutType==="radial"?Q9:G9,w0=(e,t)=>e.polarAxis.radiusAxis[t]!=null?e.polarAxis.radiusAxis[t]:e.layout.layoutType==="radial"?Z9:X9,_h=e=>e.polarOptions,_0=W([vo,yo,qt],sA),PT=W([_h,_0],(e,t)=>{if(e!=null)return kn(e.innerRadius,t,0)}),kT=W([_h,_0],(e,t)=>{if(e!=null)return kn(e.outerRadius,t,t*.8)}),J9=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:n}=e;return[t,n]},CT=W([_h],J9);W([x0,CT],wh);var DT=W([_0,PT,kT],(e,t,n)=>{if(!(e==null||t==null||n==null))return[t,n]});W([w0,DT],wh);var AT=W([Ee,_h,PT,kT,vo,yo],(e,t,n,r,i,o)=>{if(!(e!=="centric"&&e!=="radial"||t==null||n==null||r==null)){var{cx:a,cy:s,startAngle:l,endAngle:c}=t;return{cx:kn(a,i,i/2),cy:kn(s,o,o/2),innerRadius:n,outerRadius:r,startAngle:l,endAngle:c,clockWise:!1}}}),wt=(e,t)=>t,ku=(e,t,n)=>n;function Sh(e){return e?.id}var Qt=e=>{var t=Ee(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"},gl=e=>e.tooltip.settings.axisId,on=e=>{var t=Qt(e),n=gl(e);return Cu(e,t,n)},TT=W([on],e=>e?.dataKey);function MT(e,t,n){var{chartData:r=[]}=t,{allowDuplicatedCategory:i,dataKey:o}=n,a=new Map;return e.forEach(s=>{var l,c=(l=s.data)!==null&&l!==void 0?l:r;if(!(c==null||c.length===0)){var u=Sh(s);c.forEach((d,f)=>{var p=o==null||i?f:String(nt(d,o,null)),m=nt(d,s.dataKey,0),h;a.has(p)?h=a.get(p):h={},Object.assign(h,{[u]:m}),a.set(p,h)})}}),Array.from(a.values())}function Oh(e){return e.stackId!=null&&e.dataKey!=null}function LO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LO(Object(n),!0).forEach(function(r){eU(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eU(e,t,n){return(t=tU(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tU(e){var t=nU(e,"string");return typeof t=="symbol"?t:t+""}function nU(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var uy=[0,"auto"],ir={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},NT=(e,t)=>e.cartesianAxis.xAxis[t],Ai=(e,t)=>{var n=NT(e,t);return n??ir},or={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:uy,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:bu},jT=(e,t)=>e.cartesianAxis.yAxis[t],Ti=(e,t)=>{var n=jT(e,t);return n??or},rU={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:""},S0=(e,t)=>{var n=e.cartesianAxis.zAxis[t];return n??rU},Lt=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"zAxis":return S0(e,n);case"angleAxis":return x0(e,n);case"radiusAxis":return w0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},iU=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},Cu=(e,t,n)=>{switch(t){case"xAxis":return Ai(e,n);case"yAxis":return Ti(e,n);case"angleAxis":return x0(e,n);case"radiusAxis":return w0(e,n);default:throw new Error("Unexpected axis type: ".concat(t))}},RT=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function O0(e,t){return n=>{switch(e){case"xAxis":return"xAxisId"in n&&n.xAxisId===t;case"yAxis":return"yAxisId"in n&&n.yAxisId===t;case"zAxis":return"zAxisId"in n&&n.zAxisId===t;case"angleAxis":return"angleAxisId"in n&&n.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in n&&n.radiusAxisId===t;default:return!1}}}var Du=e=>e.graphicalItems.cartesianItems,oU=W([wt,ku],O0),E0=(e,t,n)=>e.filter(n).filter(r=>t?.includeHidden===!0?!0:!r.hide),Au=W([Du,Lt,oU],E0),IT=W([Au],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Oh)),LT=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),FT=W([Au],LT),P0=e=>e.map(t=>t.data).filter(Boolean).flat(1),aU=W([Au],P0),k0=(e,t)=>{var{chartData:n=[],dataStartIndex:r,dataEndIndex:i}=t;return e.length>0?e:n.slice(r,i+1)},C0=W([aU,Eu],k0),D0=(e,t,n)=>t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey)})):n.length>0?n.map(r=>r.dataKey).flatMap(r=>e.map(i=>({value:nt(i,r)}))):e.map(r=>({value:r})),Eh=W([C0,Lt,Au],D0);function $T(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function ls(e){return e.filter(t=>jr(t)||t instanceof Date).map(Number).filter(t=>Cn(t)===!1)}function sU(e,t,n){return!n||typeof t!="number"||Cn(t)?[]:n.length?ls(n.flatMap(r=>{var i=nt(e,r.dataKey),o,a;if(Array.isArray(i)?[o,a]=i:o=a=i,!(!dn(o)||!dn(a)))return[t-o,t+a]})):[]}var lU=W([IT,Eu,on],MT),BT=(e,t,n)=>{var r={},i=t.reduce((o,a)=>(a.stackId==null||(o[a.stackId]==null&&(o[a.stackId]=[]),o[a.stackId].push(a)),o),r);return Object.fromEntries(Object.entries(i).map(o=>{var[a,s]=o,l=s.map(Sh);return[a,{stackedData:p7(e,l,n),graphicalItems:s}]}))},zc=W([lU,IT,Pu],BT),WT=(e,t,n)=>{var{dataStartIndex:r,dataEndIndex:i}=t;if(n!=="zAxis"){var o=v7(e,r,i);if(!(o!=null&&o[0]===0&&o[1]===0))return o}},cU=W([zc,ra,wt],WT),zT=(e,t,n,r,i)=>n.length>0?e.flatMap(o=>n.flatMap(a=>{var s,l,c=(s=r[a.id])===null||s===void 0?void 0:s.filter(d=>$T(i,d)),u=nt(o,(l=t.dataKey)!==null&&l!==void 0?l:a.dataKey);return{value:u,errorDomain:sU(o,u,c)}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:nt(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]})),Ph=e=>e.errorBars,VT=(e,t,n)=>e.flatMap(r=>t[r.id]).filter(Boolean).filter(r=>$T(n,r));W([FT,Ph,wt],VT);var uU=W([C0,Lt,FT,Ph,wt],zT);function dU(e){var{value:t}=e;if(jr(t)||t instanceof Date)return t}var FO=e=>{var t=e.flatMap(r=>[r.value,r.errorDomain]).flat(1),n=ls(t);if(n.length!==0)return[Math.min(...n),Math.max(...n)]},fU=(e,t,n)=>{var r=e.map(dU).filter(i=>i!=null);return n&&(t.dataKey==null||t.allowDuplicatedCategory&&XC(r))?CA(0,e.length):t.allowDuplicatedCategory?r:Array.from(new Set(r))},A0=e=>{var t;if(e==null||!("domain"in e))return uy;if(e.domain!=null)return e.domain;if(e.ticks!=null){if(e.type==="number"){var n=ls(e.ticks);return[Math.min(...n),Math.max(...n)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:uy},Qf=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=n.filter(Boolean);if(i.length!==0){var o=i.flat(),a=Math.min(...o),s=Math.max(...o);return[a,s]}},HT=e=>e.referenceElements.dots,vl=(e,t,n)=>e.filter(r=>r.ifOverflow==="extendDomain").filter(r=>t==="xAxis"?r.xAxisId===n:r.yAxisId===n),pU=W([HT,wt,ku],vl),YT=e=>e.referenceElements.areas,hU=W([YT,wt,ku],vl),UT=e=>e.referenceElements.lines,mU=W([UT,wt,ku],vl),KT=(e,t)=>{var n=ls(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},gU=W(pU,wt,KT),qT=(e,t)=>{var n=ls(e.flatMap(r=>[t==="xAxis"?r.x1:r.y1,t==="xAxis"?r.x2:r.y2]));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},vU=W([hU,wt],qT),GT=(e,t)=>{var n=ls(e.map(r=>t==="xAxis"?r.x:r.y));if(n.length!==0)return[Math.min(...n),Math.max(...n)]},yU=W(mU,wt,GT),bU=W(gU,yU,vU,(e,t,n)=>Qf(e,n,t)),XT=W([Lt],A0),T0=(e,t,n,r,i,o,a)=>{var s=j9(t,e.allowDataOverflow);if(s!=null)return s;var l=o==="vertical"&&a==="xAxis"||o==="horizontal"&&a==="yAxis",c=l?Qf(n,i,FO(r)):Qf(i,FO(r));return R9(t,c,e.allowDataOverflow)},xU=W([Lt,XT,cU,uU,bU,Ee,wt],T0),wU=[0,1],M0=(e,t,n,r,i,o,a)=>{if(!((e==null||n==null||n.length===0)&&a===void 0)){var{dataKey:s,type:l}=e,c=Di(t,o);return c&&s==null?CA(0,n.length):l==="category"?fU(r,e,c):i==="expand"?wU:a}},N0=W([Lt,Ee,C0,Eh,Pu,wt,xU],M0),QT=(e,t,n,r,i)=>{if(e!=null){var{scale:o,type:a}=e;if(o==="auto")return t==="radial"&&i==="radiusAxis"?"band":t==="radial"&&i==="angleAxis"?"linear":a==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!n)?"point":a==="category"?"band":"linear";if(typeof o=="string"){var s="scale".concat(pu(o));return s in ac?s:"point"}}},yl=W([Lt,Ee,RT,v0,wt],QT);function _U(e){if(e!=null){if(e in ac)return ac[e]();var t="scale".concat(pu(e));if(t in ac)return ac[t]()}}function j0(e,t,n,r){if(!(n==null||r==null)){if(typeof e.scale=="function")return e.scale.copy().domain(n).range(r);var i=_U(t);if(i!=null){var o=i.domain(n).range(r);return l7(o),o}}}var R0=(e,t,n)=>{var r=A0(t);if(!(n!=="auto"&&n!=="linear")){if(t!=null&&t.tickCount&&Array.isArray(r)&&(r[0]==="auto"||r[1]==="auto")&&el(e))return Y9(e,t.tickCount,t.allowDecimals);if(t!=null&&t.tickCount&&t.type==="number"&&el(e))return U9(e,t.tickCount,t.allowDecimals)}},I0=W([N0,Cu,yl],R0),L0=(e,t,n,r)=>{if(r!=="angleAxis"&&e?.type==="number"&&el(t)&&Array.isArray(n)&&n.length>0){var i=t[0],o=n[0],a=t[1],s=n[n.length-1];return[Math.min(i,o),Math.max(a,s)]}return t},SU=W([Lt,N0,I0,wt],L0),OU=W(Eh,Lt,(e,t)=>{if(!(!t||t.type!=="number")){var n=1/0,r=Array.from(ls(e.map(s=>s.value))).sort((s,l)=>s-l);if(r.length<2)return 1/0;var i=r[r.length-1]-r[0];if(i===0)return 1/0;for(var o=0;o<r.length-1;o++){var a=r[o+1]-r[o];n=Math.min(n,a)}return n/i}}),ZT=W(OU,Ee,OT,qt,(e,t,n,r)=>r,(e,t,n,r,i)=>{if(!dn(e))return 0;var o=t==="vertical"?r.height:r.width;if(i==="gap")return e*o/2;if(i==="no-gap"){var a=kn(n,e*o),s=e*o/2;return s-a-(s-a)/o*a}return 0}),EU=(e,t)=>{var n=Ai(e,t);return n==null||typeof n.padding!="string"?0:ZT(e,"xAxis",t,n.padding)},PU=(e,t)=>{var n=Ti(e,t);return n==null||typeof n.padding!="string"?0:ZT(e,"yAxis",t,n.padding)},kU=W(Ai,EU,(e,t)=>{var n,r;if(e==null)return{left:0,right:0};var{padding:i}=e;return typeof i=="string"?{left:t,right:t}:{left:((n=i.left)!==null&&n!==void 0?n:0)+t,right:((r=i.right)!==null&&r!==void 0?r:0)+t}}),CU=W(Ti,PU,(e,t)=>{var n,r;if(e==null)return{top:0,bottom:0};var{padding:i}=e;return typeof i=="string"?{top:t,bottom:t}:{top:((n=i.top)!==null&&n!==void 0?n:0)+t,bottom:((r=i.bottom)!==null&&r!==void 0?r:0)+t}}),DU=W([qt,kU,dh,uh,(e,t,n)=>n],(e,t,n,r,i)=>{var{padding:o}=r;return i?[o.left,n.width-o.right]:[e.left+t.left,e.left+e.width-t.right]}),AU=W([qt,Ee,CU,dh,uh,(e,t,n)=>n],(e,t,n,r,i,o)=>{var{padding:a}=i;return o?[r.height-a.bottom,a.top]:t==="horizontal"?[e.top+e.height-n.bottom,e.top+n.top]:[e.top+n.top,e.top+e.height-n.bottom]}),Tu=(e,t,n,r)=>{var i;switch(t){case"xAxis":return DU(e,n,r);case"yAxis":return AU(e,n,r);case"zAxis":return(i=S0(e,n))===null||i===void 0?void 0:i.range;case"angleAxis":return CT(e);case"radiusAxis":return DT(e,n);default:return}},JT=W([Lt,Tu],wh),qo=W([Lt,yl,SU,JT],j0);W([Au,Ph,wt],VT);function eM(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var kh=(e,t)=>t,Ch=(e,t,n)=>n,TU=W(lh,kh,Ch,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(eM)),MU=W(ch,kh,Ch,(e,t,n)=>e.filter(r=>r.orientation===t).filter(r=>r.mirror===n).sort(eM)),tM=(e,t)=>({width:e.width,height:t.height}),NU=(e,t)=>{var n=typeof t.width=="number"?t.width:bu;return{width:n,height:e.height}},nM=W(qt,Ai,tM),jU=(e,t,n)=>{switch(t){case"top":return e.top;case"bottom":return n-e.bottom;default:return 0}},RU=(e,t,n)=>{switch(t){case"left":return e.left;case"right":return n-e.right;default:return 0}},IU=W(yo,qt,TU,kh,Ch,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=tM(t,s);a==null&&(a=jU(t,r,e));var c=r==="top"&&!i||r==="bottom"&&i;o[s.id]=a-Number(c)*l.height,a+=(c?-1:1)*l.height}),o}),LU=W(vo,qt,MU,kh,Ch,(e,t,n,r,i)=>{var o={},a;return n.forEach(s=>{var l=NU(t,s);a==null&&(a=RU(t,r,e));var c=r==="left"&&!i||r==="right"&&i;o[s.id]=a-Number(c)*l.width,a+=(c?-1:1)*l.width}),o}),FU=(e,t)=>{var n=Ai(e,t);if(n!=null)return IU(e,n.orientation,n.mirror)},$U=W([qt,Ai,FU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:e.left,y:0}:{x:e.left,y:i}}}),BU=(e,t)=>{var n=Ti(e,t);if(n!=null)return LU(e,n.orientation,n.mirror)},WU=W([qt,Ti,BU,(e,t)=>t],(e,t,n,r)=>{if(t!=null){var i=n?.[r];return i==null?{x:0,y:e.top}:{x:i,y:e.top}}}),rM=W(qt,Ti,(e,t)=>{var n=typeof t.width=="number"?t.width:bu;return{width:n,height:e.height}}),$O=(e,t,n)=>{switch(t){case"xAxis":return nM(e,n).width;case"yAxis":return rM(e,n).height;default:return}},iM=(e,t,n,r)=>{if(n!=null){var{allowDuplicatedCategory:i,type:o,dataKey:a}=n,s=Di(e,r),l=t.map(c=>c.value);if(a&&s&&o==="category"&&i&&XC(l))return l}},F0=W([Ee,Eh,Lt,wt],iM),oM=(e,t,n,r)=>{if(!(n==null||n.dataKey==null)){var{type:i,scale:o}=n,a=Di(e,r);if(a&&(i==="number"||o!=="auto"))return t.map(s=>s.value)}},$0=W([Ee,Eh,Cu,wt],oM),BO=W([Ee,iU,yl,qo,F0,$0,Tu,I0,wt],(e,t,n,r,i,o,a,s,l)=>{if(t==null)return null;var c=Di(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:o,duplicateDomain:i,isCategorical:c,niceTicks:s,range:a,realScaleType:n,scale:r}}),zU=(e,t,n,r,i,o,a,s,l)=>{if(!(t==null||r==null)){var c=Di(e,l),{type:u,ticks:d,tickCount:f}=t,p=n==="scaleBand"&&typeof r.bandwidth=="function"?r.bandwidth()/2:2,m=u==="category"&&r.bandwidth?r.bandwidth()/p:0;m=l==="angleAxis"&&o!=null&&o.length>=2?nn(o[0]-o[1])*2*m:m;var h=d||i;if(h){var g=h.map((b,S)=>{var w=a?a.indexOf(b):b;return{index:S,coordinate:r(w)+m,value:b,offset:m}});return g.filter(b=>!Cn(b.coordinate))}return c&&s?s.map((b,S)=>({coordinate:r(b)+m,value:b,index:S,offset:m})):r.ticks?r.ticks(f).map(b=>({coordinate:r(b)+m,value:b,offset:m})):r.domain().map((b,S)=>({coordinate:r(b)+m,value:a?a[b]:b,index:S,offset:m}))}},aM=W([Ee,Cu,yl,qo,I0,Tu,F0,$0,wt],zU),VU=(e,t,n,r,i,o,a)=>{if(!(t==null||n==null||r==null||r[0]===r[1])){var s=Di(e,a),{tickCount:l}=t,c=0;return c=a==="angleAxis"&&r?.length>=2?nn(r[0]-r[1])*2*c:c,s&&o?o.map((u,d)=>({coordinate:n(u)+c,value:u,index:d,offset:c})):n.ticks?n.ticks(l).map(u=>({coordinate:n(u)+c,value:u,offset:c})):n.domain().map((u,d)=>({coordinate:n(u)+c,value:i?i[u]:u,index:d,offset:c}))}},Ei=W([Ee,Cu,qo,Tu,F0,$0,wt],VU),Pi=W(Lt,qo,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})}),HU=W([Lt,yl,N0,JT],j0);W((e,t,n)=>S0(e,n),HU,(e,t)=>{if(!(e==null||t==null))return Xf(Xf({},e),{},{scale:t})});var YU=W([Ee,lh,ch],(e,t,n)=>{switch(e){case"horizontal":return t.some(r=>r.reversed)?"right-to-left":"left-to-right";case"vertical":return n.some(r=>r.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),sM=e=>e.options.defaultTooltipEventType,lM=e=>e.options.validateTooltipEventTypes;function cM(e,t,n){if(e==null)return t;var r=e?"axis":"item";return n==null?t:n.includes(r)?r:t}function B0(e,t){var n=sM(e),r=lM(e);return cM(t,n,r)}function UU(e){return ce(t=>B0(t,e))}var uM=(e,t)=>{var n,r=Number(t);if(!(Cn(r)||t==null))return r>=0?e==null||(n=e[r])===null||n===void 0?void 0:n.value:void 0},KU=e=>e.tooltip.settings,Mo={active:!1,index:null,dataKey:void 0,coordinate:void 0},qU={itemInteraction:{click:Mo,hover:Mo},axisInteraction:{click:Mo,hover:Mo},keyboardInteraction:Mo,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}},dM=yr({name:"tooltip",initialState:qU,reducers:{addTooltipEntrySettings(e,t){e.tooltipItemPayloads.push(t.payload)},removeTooltipEntrySettings(e,t){var n=eo(e).tooltipItemPayloads.indexOf(t.payload);n>-1&&e.tooltipItemPayloads.splice(n,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:GU,removeTooltipEntrySettings:XU,setTooltipSettingsState:QU,setActiveMouseOverItemIndex:fM,mouseLeaveItem:ZU,mouseLeaveChart:pM,setActiveClickItemIndex:JU,setMouseOverAxisIndex:hM,setMouseClickAxisIndex:eK,setSyncInteraction:dy,setKeyboardInteraction:fy}=dM.actions,tK=dM.reducer;function WO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function gd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?WO(Object(n),!0).forEach(function(r){nK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):WO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function nK(e,t,n){return(t=rK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function rK(e){var t=iK(e,"string");return typeof t=="symbol"?t:t+""}function iK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function oK(e,t,n){return t==="axis"?n==="click"?e.axisInteraction.click:e.axisInteraction.hover:n==="click"?e.itemInteraction.click:e.itemInteraction.hover}function aK(e){return e.index!=null}var mM=(e,t,n,r)=>{if(t==null)return Mo;var i=oK(e,t,n);if(i==null)return Mo;if(i.active)return i;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var o=e.settings.active===!0;if(aK(i)){if(o)return gd(gd({},i),{},{active:!0})}else if(r!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:r};return gd(gd({},Mo),{},{coordinate:i.coordinate})},W0=(e,t)=>{var n=e?.index;if(n==null)return null;var r=Number(n);if(!dn(r))return n;var i=0,o=1/0;return t.length>0&&(o=t.length-1),String(Math.max(i,Math.min(r,o)))},gM=(e,t,n,r,i,o,a,s)=>{if(!(o==null||s==null)){var l=a[0],c=l==null?void 0:s(l.positions,o);if(c!=null)return c;var u=i?.[Number(o)];if(u)switch(n){case"horizontal":return{x:u.coordinate,y:(r.top+t)/2};default:return{x:(r.left+e)/2,y:u.coordinate}}}},vM=(e,t,n,r)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var i;return n==="hover"?i=e.itemInteraction.hover.dataKey:i=e.itemInteraction.click.dataKey,i==null&&r!=null?[e.tooltipItemPayloads[0]]:e.tooltipItemPayloads.filter(o=>{var a;return((a=o.settings)===null||a===void 0?void 0:a.dataKey)===i})},Mu=e=>e.options.tooltipPayloadSearcher,bl=e=>e.tooltip;function zO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function VO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zO(Object(n),!0).forEach(function(r){sK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sK(e,t,n){return(t=lK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lK(e){var t=cK(e,"string");return typeof t=="symbol"?t:t+""}function cK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function uK(e,t){return e??t}var yM=(e,t,n,r,i,o,a)=>{if(!(t==null||o==null)){var{chartData:s,computedData:l,dataStartIndex:c,dataEndIndex:u}=n,d=[];return e.reduce((f,p)=>{var m,{dataDefinedOnItem:h,settings:g}=p,b=uK(h,s),S=Array.isArray(b)?lA(b,c,u):b,w=(m=g?.dataKey)!==null&&m!==void 0?m:r,x=g?.nameKey,_;if(r&&Array.isArray(S)&&!Array.isArray(S[0])&&a==="axis"?_=QC(S,r,i):_=o(S,t,l,x),Array.isArray(_))_.forEach(C=>{var D=VO(VO({},g),{},{name:C.name,unit:C.unit,color:void 0,fill:void 0});f.push(ES({tooltipEntrySettings:D,dataKey:C.dataKey,payload:C.payload,value:nt(C.payload,C.dataKey),name:C.name}))});else{var E;f.push(ES({tooltipEntrySettings:g,dataKey:w,payload:_,value:nt(_,w),name:(E=nt(_,x))!==null&&E!==void 0?E:g?.name}))}return f},d)}},z0=W([on,Ee,RT,v0,Qt],QT),dK=W([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),fK=W([Qt,gl],O0),Nu=W([dK,on,fK],E0),pK=W([Nu],e=>e.filter(Oh)),hK=W([Nu],P0),xl=W([hK,ra],k0),mK=W([pK,ra,on],MT),V0=W([xl,on,Nu],D0),gK=W([on],A0),vK=W([Nu],e=>e.filter(Oh)),yK=W([mK,vK,Pu],BT),bK=W([yK,ra,Qt],WT),xK=W([Nu],LT),wK=W([xl,on,xK,Ph,Qt],zT),_K=W([HT,Qt,gl],vl),SK=W([_K,Qt],KT),OK=W([YT,Qt,gl],vl),EK=W([OK,Qt],qT),PK=W([UT,Qt,gl],vl),kK=W([PK,Qt],GT),CK=W([SK,kK,EK],Qf),DK=W([on,gK,bK,wK,CK,Ee,Qt],T0),bM=W([on,Ee,xl,V0,Pu,Qt,DK],M0),AK=W([bM,on,z0],R0),TK=W([on,bM,AK,Qt],L0),xM=e=>{var t=Qt(e),n=gl(e),r=!1;return Tu(e,t,n,r)},wM=W([on,xM],wh),_M=W([on,z0,TK,wM],j0),MK=W([Ee,V0,on,Qt],iM),NK=W([Ee,V0,on,Qt],oM),jK=(e,t,n,r,i,o,a,s)=>{if(t){var{type:l}=t,c=Di(e,s);if(r){var u=n==="scaleBand"&&r.bandwidth?r.bandwidth()/2:2,d=l==="category"&&r.bandwidth?r.bandwidth()/u:0;return d=s==="angleAxis"&&i!=null&&i?.length>=2?nn(i[0]-i[1])*2*d:d,c&&a?a.map((f,p)=>({coordinate:r(f)+d,value:f,index:p,offset:d})):r.domain().map((f,p)=>({coordinate:r(f)+d,value:o?o[f]:f,index:p,offset:d}))}}},wo=W([Ee,on,z0,_M,xM,MK,NK,Qt],jK),H0=W([sM,lM,KU],(e,t,n)=>cM(n.shared,e,t)),SM=e=>e.tooltip.settings.trigger,Y0=e=>e.tooltip.settings.defaultIndex,Dh=W([bl,H0,SM,Y0],mM),Go=W([Dh,xl],W0),OM=W([wo,Go],uM),EM=W([Dh],e=>{if(e)return e.dataKey}),PM=W([bl,H0,SM,Y0],vM),RK=W([vo,yo,Ee,qt,wo,Y0,PM,Mu],gM),IK=W([Dh,RK],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),LK=W([Dh],e=>e.active),FK=W([PM,Go,ra,TT,OM,Mu,H0],yM),$K=W([FK],e=>{if(e!=null){var t=e.map(n=>n.payload).filter(n=>n!=null);return Array.from(new Set(t))}});function HO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function YO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?HO(Object(n),!0).forEach(function(r){BK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):HO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function BK(e,t,n){return(t=WK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function WK(e){var t=zK(e,"string");return typeof t=="symbol"?t:t+""}function zK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var VK=()=>ce(on),HK=()=>{var e=VK(),t=ce(wo),n=ce(_M);return Xa(YO(YO({},e),{},{scale:n}),t)},kM=()=>ce(v0),U0=(e,t)=>t,CM=(e,t,n)=>n,K0=(e,t,n,r)=>r,YK=W(wo,e=>rh(e,t=>t.coordinate)),q0=W([bl,U0,CM,K0],mM),DM=W([q0,xl],W0),UK=(e,t,n)=>{if(t!=null){var r=bl(e);return t==="axis"?n==="hover"?r.axisInteraction.hover.dataKey:r.axisInteraction.click.dataKey:n==="hover"?r.itemInteraction.hover.dataKey:r.itemInteraction.click.dataKey}},AM=W([bl,U0,CM,K0],vM),Zf=W([vo,yo,Ee,qt,wo,K0,AM,Mu],gM),KK=W([q0,Zf],(e,t)=>{var n;return(n=e.coordinate)!==null&&n!==void 0?n:t}),TM=W(wo,DM,uM),qK=W([AM,DM,ra,TT,TM,Mu,U0],yM),GK=W([q0],e=>({isActive:e.active,activeIndex:e.index})),XK=(e,t,n,r,i,o,a,s)=>{if(!(!e||!t||!r||!i||!o)){var l=y7(e.chartX,e.chartY,t,n,s);if(l){var c=x7(l,t),u=a7(c,a,o,r,i),d=b7(t,o,u,l);return{activeIndex:String(u),activeCoordinate:d}}}};function py(){return py=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},py.apply(null,arguments)}function UO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UO(Object(n),!0).forEach(function(r){QK(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QK(e,t,n){return(t=ZK(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZK(e){var t=JK(e,"string");return typeof t=="symbol"?t:t+""}function JK(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eq(e){var{coordinate:t,payload:n,index:r,offset:i,tooltipAxisBandSize:o,layout:a,cursor:s,tooltipEventType:l,chartName:c}=e,u=t,d=n,f=r;if(!s||!u||c!=="ScatterChart"&&l!=="axis")return null;var p,m;if(c==="ScatterChart")p=u,m=xV;else if(c==="BarChart")p=wV(a,u,i,o),m=OA;else if(a==="radial"){var{cx:h,cy:g,radius:b,startAngle:S,endAngle:w}=EA(u);p={cx:h,cy:g,startAngle:S,endAngle:w,innerRadius:b,outerRadius:b},m=kA}else p={points:eH(a,u,i)},m=js;var x=typeof s=="object"&&"className"in s?s.className:void 0,_=vd(vd(vd(vd({stroke:"#ccc",pointerEvents:"none"},i),p),ct(s,!1)),{},{payload:d,payloadIndex:f,className:oe("recharts-tooltip-cursor",x)});return k.isValidElement(s)?k.cloneElement(s,_):k.createElement(m,_)}function tq(e){var t=HK(),n=mA(),r=xu(),i=kM();return O.createElement(eq,py({},e,{coordinate:e.coordinate,index:e.index,payload:e.payload,offset:n,layout:r,tooltipAxisBandSize:t,chartName:i}))}var MM=k.createContext(null),nq=()=>k.useContext(MM),Tg={exports:{}},KO;function rq(){return KO||(KO=1,(function(e){var t=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function o(l,c,u,d,f){if(typeof u!="function")throw new TypeError("The listener must be a function");var p=new i(u,d||l,f),m=n?n+c:c;return l._events[m]?l._events[m].fn?l._events[m]=[l._events[m],p]:l._events[m].push(p):(l._events[m]=p,l._eventsCount++),l}function a(l,c){--l._eventsCount===0?l._events=new r:delete l._events[c]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var c=[],u,d;if(this._eventsCount===0)return c;for(d in u=this._events)t.call(u,d)&&c.push(n?d.slice(1):d);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},s.prototype.listeners=function(c){var u=n?n+c:c,d=this._events[u];if(!d)return[];if(d.fn)return[d.fn];for(var f=0,p=d.length,m=new Array(p);f<p;f++)m[f]=d[f].fn;return m},s.prototype.listenerCount=function(c){var u=n?n+c:c,d=this._events[u];return d?d.fn?1:d.length:0},s.prototype.emit=function(c,u,d,f,p,m){var h=n?n+c:c;if(!this._events[h])return!1;var g=this._events[h],b=arguments.length,S,w;if(g.fn){switch(g.once&&this.removeListener(c,g.fn,void 0,!0),b){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,d),!0;case 4:return g.fn.call(g.context,u,d,f),!0;case 5:return g.fn.call(g.context,u,d,f,p),!0;case 6:return g.fn.call(g.context,u,d,f,p,m),!0}for(w=1,S=new Array(b-1);w<b;w++)S[w-1]=arguments[w];g.fn.apply(g.context,S)}else{var x=g.length,_;for(w=0;w<x;w++)switch(g[w].once&&this.removeListener(c,g[w].fn,void 0,!0),b){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,d);break;case 4:g[w].fn.call(g[w].context,u,d,f);break;default:if(!S)for(_=1,S=new Array(b-1);_<b;_++)S[_-1]=arguments[_];g[w].fn.apply(g[w].context,S)}}return!0},s.prototype.on=function(c,u,d){return o(this,c,u,d,!1)},s.prototype.once=function(c,u,d){return o(this,c,u,d,!0)},s.prototype.removeListener=function(c,u,d,f){var p=n?n+c:c;if(!this._events[p])return this;if(!u)return a(this,p),this;var m=this._events[p];if(m.fn)m.fn===u&&(!f||m.once)&&(!d||m.context===d)&&a(this,p);else{for(var h=0,g=[],b=m.length;h<b;h++)(m[h].fn!==u||f&&!m[h].once||d&&m[h].context!==d)&&g.push(m[h]);g.length?this._events[p]=g.length===1?g[0]:g:a(this,p)}return this},s.prototype.removeAllListeners=function(c){var u;return c?(u=n?n+c:c,this._events[u]&&a(this,u)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,e.exports=s})(Tg)),Tg.exports}var iq=rq();const oq=ho(iq);var Vc=new oq,hy="recharts.syncEvent.tooltip",qO="recharts.syncEvent.brush";function Ah(e,t){if(t){var n=Number.parseInt(t,10);if(!Cn(n))return e?.[n]}}var aq={chartName:"",tooltipPayloadSearcher:void 0,eventEmitter:void 0,defaultTooltipEventType:"axis"},NM=yr({name:"options",initialState:aq,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),sq=NM.reducer,{createEventEmitter:lq}=NM.actions;function cq(e){return e.tooltip.syncInteraction}var uq={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},jM=yr({name:"chartData",initialState:uq,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:n,endIndex:r}=t.payload;n!=null&&(e.dataStartIndex=n),r!=null&&(e.dataEndIndex=r)}}}),{setChartData:GO,setDataStartEndIndexes:dq,setComputedData:ufe}=jM.actions,fq=jM.reducer,pq=["x","y"];function XO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function fa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XO(Object(n),!0).forEach(function(r){hq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function hq(e,t,n){return(t=mq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mq(e){var t=gq(e,"string");return typeof t=="symbol"?t:t+""}function gq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vq(e,t){if(e==null)return{};var n,r,i=yq(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function yq(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var RM=()=>{};function bq(){var e=ce(y0),t=ce(b0),n=xt(),r=ce(ET),i=ce(wo),o=xu(),a=fh(),s=ce(l=>l.rootProps.className);k.useEffect(()=>{if(e==null)return RM;var l=(c,u,d)=>{if(t!==d&&e===c){if(r==="index"){var f;if(a&&u!==null&&u!==void 0&&(f=u.payload)!==null&&f!==void 0&&f.coordinate){var p=u.payload.coordinate,{x:m,y:h}=p,g=vq(p,pq),b=fa(fa(fa({},g),typeof m=="number"&&{x:Math.max(a.x,Math.min(m,a.x+a.width))}),typeof h=="number"&&{y:Math.max(a.y,Math.min(h,a.y+a.height))}),S=fa(fa({},u),{},{payload:fa(fa({},u.payload),{},{coordinate:b})});n(S)}else n(u);return}if(i!=null){var w;if(typeof r=="function"){var x={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},_=r(i,x);w=i[_]}else r==="value"&&(w=i.find(N=>String(N.value)===u.payload.label));var{coordinate:E}=u.payload;if(w==null||u.payload.active===!1||E==null||a==null){n(dy({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0}));return}var{x:C,y:D}=E,T=Math.min(C,a.x+a.width),j=Math.min(D,a.y+a.height),A={x:o==="horizontal"?w.coordinate:T,y:o==="horizontal"?j:w.coordinate},P=dy({active:u.payload.active,coordinate:A,dataKey:u.payload.dataKey,index:String(w.index),label:u.payload.label});n(P)}}};return Vc.on(hy,l),()=>{Vc.off(hy,l)}},[s,n,t,e,r,i,o,a])}function xq(){var e=ce(y0),t=ce(b0),n=xt();k.useEffect(()=>{if(e==null)return RM;var r=(i,o,a)=>{t!==a&&e===i&&n(dq(o))};return Vc.on(qO,r),()=>{Vc.off(qO,r)}},[n,t,e])}function wq(){var e=xt();k.useEffect(()=>{e(lq())},[e]),bq(),xq()}function _q(e,t,n,r,i,o){var a=ce(f=>UK(f,e,t)),s=ce(b0),l=ce(y0),c=ce(ET),u=ce(cq),d=u?.active;k.useEffect(()=>{if(!d&&l!=null&&s!=null){var f=dy({active:o,coordinate:n,dataKey:a,index:i,label:typeof r=="number"?String(r):r});Vc.emit(hy,l,f,s)}},[d,n,a,i,r,s,l,c,o])}function QO(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function ZO(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?QO(Object(n),!0).forEach(function(r){Sq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):QO(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Sq(e,t,n){return(t=Oq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oq(e){var t=Eq(e,"string");return typeof t=="symbol"?t:t+""}function Eq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Pq(e){return e.dataKey}function kq(e,t){return O.isValidElement(e)?O.cloneElement(e,t):typeof e=="function"?O.createElement(e,t):O.createElement(Z7,t)}var JO=[],Cq={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,isAnimationActive:!bo.isSsr,itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function Ht(e){var t=Gt(e,Cq),{active:n,allowEscapeViewBox:r,animationDuration:i,animationEasing:o,content:a,filterNull:s,isAnimationActive:l,offset:c,payloadUniqBy:u,position:d,reverseDirection:f,useTranslate3d:p,wrapperStyle:m,cursor:h,shared:g,trigger:b,defaultIndex:S,portal:w,axisId:x}=t,_=xt(),E=typeof S=="number"?String(S):S;k.useEffect(()=>{_(QU({shared:g,trigger:b,axisId:x,active:n,defaultIndex:E}))},[_,g,b,x,n,E]);var C=fh(),D=bA(),T=UU(g),{activeIndex:j,isActive:A}=ce(ee=>GK(ee,T,b,E)),P=ce(ee=>qK(ee,T,b,E)),N=ce(ee=>TM(ee,T,b,E)),M=ce(ee=>KK(ee,T,b,E)),I=P,L=nq(),$=n??A,[V,z]=MD([I,$]),B=T==="axis"?N:void 0;_q(T,b,M,B,j,$);var X=w??L;if(X==null)return null;var q=I??JO;$||(q=JO),s&&q.length&&(q=PD(I.filter(ee=>ee.value!=null&&(ee.hide!==!0||t.includeHidden)),u,Pq));var re=q.length>0,J=O.createElement(oV,{allowEscapeViewBox:r,animationDuration:i,animationEasing:o,isAnimationActive:l,active:$,coordinate:M,hasPayload:re,offset:c,position:d,reverseDirection:f,useTranslate3d:p,viewBox:C,wrapperStyle:m,lastBoundingBox:V,innerRef:z,hasPortalFromProps:!!w},kq(a,ZO(ZO({},t),{},{payload:q,label:B,active:$,coordinate:M,accessibilityLayer:D})));return O.createElement(O.Fragment,null,Ui.createPortal(J,X),$&&O.createElement(tq,{cursor:h,tooltipEventType:T,coordinate:M,payload:I,index:j}))}var Mg={},Ng={},jg={},eE;function Dq(){return eE||(eE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n,r,{signal:i,edges:o}={}){let a,s=null;const l=o!=null&&o.includes("leading"),c=o==null||o.includes("trailing"),u=()=>{s!==null&&(n.apply(a,s),a=void 0,s=null)},d=()=>{c&&u(),h()};let f=null;const p=()=>{f!=null&&clearTimeout(f),f=setTimeout(()=>{f=null,d()},r)},m=()=>{f!==null&&(clearTimeout(f),f=null)},h=()=>{m(),a=void 0,s=null},g=()=>{u()},b=function(...S){if(i?.aborted)return;a=this,s=S;const w=f==null;p(),l&&w&&u()};return b.schedule=p,b.cancel=h,b.flush=g,i?.addEventListener("abort",h,{once:!0}),b}e.debounce=t})(jg)),jg}var tE;function Aq(){return tE||(tE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Dq();function n(r,i=0,o={}){typeof o!="object"&&(o={});const{leading:a=!1,trailing:s=!0,maxWait:l}=o,c=Array(2);a&&(c[0]="leading"),s&&(c[1]="trailing");let u,d=null;const f=t.debounce(function(...h){u=r.apply(this,h),d=null},i,{edges:c}),p=function(...h){return l!=null&&(d===null&&(d=Date.now()),Date.now()-d>=l)?(u=r.apply(this,h),d=Date.now(),f.cancel(),f.schedule(),u):(f.apply(this,h),u)},m=()=>(f.flush(),u);return p.cancel=f.cancel,p.flush=m,p}e.debounce=n})(Ng)),Ng}var nE;function Tq(){return nE||(nE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=Aq();function n(r,i=0,o={}){const{leading:a=!0,trailing:s=!0}=o;return t.debounce(r,i,{leading:a,maxWait:i,trailing:s})}e.throttle=n})(Mg)),Mg}var Rg,rE;function Mq(){return rE||(rE=1,Rg=Tq().throttle),Rg}var Nq=Mq();const jq=ho(Nq);var Rq=process.env.NODE_ENV!=="production",hc=function(t,n){for(var r=arguments.length,i=new Array(r>2?r-2:0),o=2;o<r;o++)i[o-2]=arguments[o];if(Rq&&typeof console<"u"&&console.warn&&(n===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(n===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var a=0;console.warn(n.replace(/%s/g,()=>i[a++]))}};function iE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ig(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?iE(Object(n),!0).forEach(function(r){Iq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):iE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Iq(e,t,n){return(t=Lq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lq(e){var t=Fq(e,"string");return typeof t=="symbol"?t:t+""}function Fq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ft=k.forwardRef((e,t)=>{var{aspect:n,initialDimension:r={width:-1,height:-1},width:i="100%",height:o="100%",minWidth:a=0,minHeight:s,maxHeight:l,children:c,debounce:u=0,id:d,className:f,onResize:p,style:m={}}=e,h=k.useRef(null),g=k.useRef();g.current=p,k.useImperativeHandle(t,()=>h.current);var[b,S]=k.useState({containerWidth:r.width,containerHeight:r.height}),w=k.useCallback((_,E)=>{S(C=>{var D=Math.round(_),T=Math.round(E);return C.containerWidth===D&&C.containerHeight===T?C:{containerWidth:D,containerHeight:T}})},[]);k.useEffect(()=>{var _=T=>{var j,{width:A,height:P}=T[0].contentRect;w(A,P),(j=g.current)===null||j===void 0||j.call(g,A,P)};u>0&&(_=jq(_,u,{trailing:!0,leading:!1}));var E=new ResizeObserver(_),{width:C,height:D}=h.current.getBoundingClientRect();return w(C,D),E.observe(h.current),()=>{E.disconnect()}},[w,u]);var x=k.useMemo(()=>{var{containerWidth:_,containerHeight:E}=b;if(_<0||E<0)return null;hc(Ta(i)||Ta(o),`The width(%s) and height(%s) are both fixed numbers,
204
204
  maybe you don't need to use a ResponsiveContainer.`,i,o),hc(!n||n>0,"The aspect(%s) must be greater than zero.",n);var C=Ta(i)?_:i,D=Ta(o)?E:o;return n&&n>0&&(C?D=C/n:D&&(C=D*n),l&&D>l&&(D=l)),hc(C>0||D>0,`The width(%s) and height(%s) of chart should be greater than 0,
205
205
  please check the style of container, or the props width(%s) and height(%s),
206
206
  or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the
207
- height and width.`,C,D,i,o,a,s,n),O.Children.map(c,T=>k.cloneElement(T,{width:C,height:D,style:Ig({width:C,height:D},T.props.style)}))},[n,c,o,l,s,a,b,i]);return O.createElement("div",{id:d?"".concat(d):void 0,className:oe("recharts-responsive-container",f),style:Ig(Ig({},m),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:l}),ref:h},O.createElement("div",{style:{width:0,height:0,overflow:"visible"}},x))}),Vt=e=>null;Vt.displayName="Cell";function $q(e,t,n){return(t=Bq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bq(e){var t=Wq(e,"string");return typeof t=="symbol"?t:t+""}function Wq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class zq{constructor(t){$q(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function oE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oE(Object(n),!0).forEach(function(r){Hq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hq(e,t,n){return(t=Yq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yq(e){var t=Uq(e,"string");return typeof t=="symbol"?t:t+""}function Uq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kq={cacheSize:2e3,enableCache:!0},IM=Vq({},Kq),aE=new zq(IM.cacheSize),qq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},sE="recharts_measurement_span";function Gq(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}var lE=(e,t)=>{try{var n=document.getElementById(sE);n||(n=document.createElement("span"),n.setAttribute("id",sE),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,qq,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},mc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||bo.isSsr)return{width:0,height:0};if(!IM.enableCache)return lE(t,n);var r=Gq(t,n),i=aE.get(r);if(i)return i;var o=lE(t,n);return aE.set(r,o),o},cE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,uE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Xq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Qq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,LM={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Zq=Object.keys(LM),Cs="NaN";function Jq(e,t){return e*LM[t]}class Yn{static parse(t){var n,[,r,i]=(n=Qq.exec(t))!==null&&n!==void 0?n:[];return new Yn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Cn(t)&&(this.unit=""),n!==""&&!Xq.test(n)&&(this.num=NaN,this.unit=""),Zq.includes(n)&&(this.num=Jq(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Cn(this.num)}}function FM(e){if(e.includes(Cs))return Cs;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=cE.exec(t))!==null&&n!==void 0?n:[],a=Yn.parse(r??""),s=Yn.parse(o??""),l=i==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return Cs;t=t.replace(cE,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=uE.exec(t))!==null&&c!==void 0?c:[],p=Yn.parse(u??""),m=Yn.parse(f??""),h=d==="+"?p.add(m):p.subtract(m);if(h.isNaN())return Cs;t=t.replace(uE,h.toString())}return t}var dE=/\(([^()]*)\)/;function eG(e){for(var t=e,n;(n=dE.exec(t))!=null;){var[,r]=n;t=t.replace(dE,FM(r))}return t}function tG(e){var t=e.replace(/\s+/g,"");return t=eG(t),t=FM(t),t}function nG(e){try{return tG(e)}catch{return Cs}}function Lg(e){var t=nG(e.slice(5,-1));return t===Cs?"":t}var rG=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],iG=["dx","dy","angle","className","breakAll"];function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},my.apply(null,arguments)}function fE(e,t){if(e==null)return{};var n,r,i=oG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function oG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $M=/[ \f\n\r\t\v\u2028\u2029]+/,BM=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];ht(t)||(n?i=t.toString().split(""):i=t.toString().split($M));var o=i.map(s=>({word:s,width:mc(s,r).width})),a=n?0:mc(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}},aG=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=e,c=pe(o),u=a,d=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return A.reduce((P,N)=>{var{word:M,width:I}=N,L=P[P.length-1];if(L&&(r==null||i||L.width+I+n<Number(r)))L.words.push(M),L.width+=I+n;else{var $={words:[M],width:I};P.push($)}return P},[])},f=d(t),p=j=>j.reduce((A,P)=>A.width>P.width?A:P);if(!c||i)return f;var m=f.length>o||p(f).width>Number(r);if(!m)return f;for(var h="…",g=j=>{var A=u.slice(0,j),P=BM({breakAll:l,style:s,children:A+h}).wordsWithComputedWidth,N=d(P),M=N.length>o||p(N).width>Number(r);return[M,N]},b=0,S=u.length-1,w=0,x;b<=S&&w<=u.length-1;){var _=Math.floor((b+S)/2),E=_-1,[C,D]=g(E),[T]=g(_);if(!C&&!T&&(b=_+1),C&&T&&(S=_-1),!C&&T){x=D;break}w++}return x||f},pE=e=>{var t=ht(e)?[]:e.toString().split($M);return[{words:t}]},sG=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!bo.isSsr){var s,l,c=BM({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return pE(r);return aG({breakAll:o,children:r,maxLines:a,style:i},s,l,t,n)}return pE(r)},hE="#808080",Th=k.forwardRef((e,t)=>{var{x:n=0,y:r=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:a=!1,textAnchor:s="start",verticalAnchor:l="end",fill:c=hE}=e,u=fE(e,rG),d=k.useMemo(()=>sG({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:a,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,a,u.style,u.width]),{dx:f,dy:p,angle:m,className:h,breakAll:g}=u,b=fE(u,iG);if(!jr(n)||!jr(r)||d.length===0)return null;var S=n+(pe(f)?f:0),w=r+(pe(p)?p:0),x;switch(l){case"start":x=Lg("calc(".concat(o,")"));break;case"middle":x=Lg("calc(".concat((d.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:x=Lg("calc(".concat(d.length-1," * -").concat(i,")"));break}var _=[];if(a){var E=d[0].width,{width:C}=u;_.push("scale(".concat(pe(C)?C/E:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(S,", ").concat(w,")")),_.length&&(b.transform=_.join(" ")),O.createElement("text",my({},ct(b,!0),{ref:t,x:S,y:w,className:oe("recharts-text",h),textAnchor:s,fill:c.includes("url")?hE:c}),d.map((D,T)=>{var j=D.words.join(g?"":" ");return O.createElement("tspan",{x:S,dy:T===0?x:i,key:"".concat(j,"-").concat(T)},j)}))});Th.displayName="Text";var lG=["labelRef"];function cG(e,t){if(e==null)return{};var n,r,i=uG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mE(Object(n),!0).forEach(function(r){dG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dG(e,t,n){return(t=fG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fG(e){var t=pG(e,"string");return typeof t=="symbol"?t:t+""}function pG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yi.apply(null,arguments)}var WM=k.createContext(null),zM=e=>{var{x:t,y:n,width:r,height:i,children:o}=e,a=k.useMemo(()=>({x:t,y:n,width:r,height:i}),[t,n,r,i]);return O.createElement(WM.Provider,{value:a},o)},VM=()=>{var e=k.useContext(WM),t=fh();return e||t},hG=k.createContext(null),mG=()=>{var e=k.useContext(hG),t=ce(AT);return e||t},gG=e=>{var{value:t,formatter:n}=e,r=ht(e.children)?t:e.children;return typeof n=="function"?n(r):r},G0=e=>e!=null&&typeof e=="function",vG=(e,t)=>{var n=tn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},yG=(e,t,n,r,i)=>{var{offset:o,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:p}=i,m=(c+u)/2,h=vG(d,f),g=h>=0?1:-1,b,S;switch(t){case"insideStart":b=d+g*o,S=p;break;case"insideEnd":b=f-g*o,S=!p;break;case"end":b=f+g*o,S=p;break;default:throw new Error("Unsupported position ".concat(t))}S=h<=0?S:!S;var w=Wt(s,l,m,b),x=Wt(s,l,m,b+(S?1:-1)*359),_="M".concat(w.x,",").concat(w.y,`
207
+ height and width.`,C,D,i,o,a,s,n),O.Children.map(c,T=>k.cloneElement(T,{width:C,height:D,style:Ig({width:C,height:D},T.props.style)}))},[n,c,o,l,s,a,b,i]);return O.createElement("div",{id:d?"".concat(d):void 0,className:oe("recharts-responsive-container",f),style:Ig(Ig({},m),{},{width:i,height:o,minWidth:a,minHeight:s,maxHeight:l}),ref:h},O.createElement("div",{style:{width:0,height:0,overflow:"visible"}},x))}),Vt=e=>null;Vt.displayName="Cell";function $q(e,t,n){return(t=Bq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Bq(e){var t=Wq(e,"string");return typeof t=="symbol"?t:t+""}function Wq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}class zq{constructor(t){$q(this,"cache",new Map),this.maxSize=t}get(t){var n=this.cache.get(t);return n!==void 0&&(this.cache.delete(t),this.cache.set(t,n)),n}set(t,n){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var r=this.cache.keys().next().value;this.cache.delete(r)}this.cache.set(t,n)}clear(){this.cache.clear()}size(){return this.cache.size}}function oE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vq(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?oE(Object(n),!0).forEach(function(r){Hq(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Hq(e,t,n){return(t=Yq(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Yq(e){var t=Uq(e,"string");return typeof t=="symbol"?t:t+""}function Uq(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Kq={cacheSize:2e3,enableCache:!0},IM=Vq({},Kq),aE=new zq(IM.cacheSize),qq={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},sE="recharts_measurement_span";function Gq(e,t){var n=t.fontSize||"",r=t.fontFamily||"",i=t.fontWeight||"",o=t.fontStyle||"",a=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(n,"|").concat(r,"|").concat(i,"|").concat(o,"|").concat(a,"|").concat(s)}var lE=(e,t)=>{try{var n=document.getElementById(sE);n||(n=document.createElement("span"),n.setAttribute("id",sE),n.setAttribute("aria-hidden","true"),document.body.appendChild(n)),Object.assign(n.style,qq,t),n.textContent="".concat(e);var r=n.getBoundingClientRect();return{width:r.width,height:r.height}}catch{return{width:0,height:0}}},mc=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||bo.isSsr)return{width:0,height:0};if(!IM.enableCache)return lE(t,n);var r=Gq(t,n),i=aE.get(r);if(i)return i;var o=lE(t,n);return aE.set(r,o),o},cE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,uE=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Xq=/^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/,Qq=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,LM={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},Zq=Object.keys(LM),Cs="NaN";function Jq(e,t){return e*LM[t]}class Yn{static parse(t){var n,[,r,i]=(n=Qq.exec(t))!==null&&n!==void 0?n:[];return new Yn(parseFloat(r),i??"")}constructor(t,n){this.num=t,this.unit=n,this.num=t,this.unit=n,Cn(t)&&(this.unit=""),n!==""&&!Xq.test(n)&&(this.num=NaN,this.unit=""),Zq.includes(n)&&(this.num=Jq(t,n),this.unit="px")}add(t){return this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new Yn(NaN,""):new Yn(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Cn(this.num)}}function FM(e){if(e.includes(Cs))return Cs;for(var t=e;t.includes("*")||t.includes("/");){var n,[,r,i,o]=(n=cE.exec(t))!==null&&n!==void 0?n:[],a=Yn.parse(r??""),s=Yn.parse(o??""),l=i==="*"?a.multiply(s):a.divide(s);if(l.isNaN())return Cs;t=t.replace(cE,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var c,[,u,d,f]=(c=uE.exec(t))!==null&&c!==void 0?c:[],p=Yn.parse(u??""),m=Yn.parse(f??""),h=d==="+"?p.add(m):p.subtract(m);if(h.isNaN())return Cs;t=t.replace(uE,h.toString())}return t}var dE=/\(([^()]*)\)/;function eG(e){for(var t=e,n;(n=dE.exec(t))!=null;){var[,r]=n;t=t.replace(dE,FM(r))}return t}function tG(e){var t=e.replace(/\s+/g,"");return t=eG(t),t=FM(t),t}function nG(e){try{return tG(e)}catch{return Cs}}function Lg(e){var t=nG(e.slice(5,-1));return t===Cs?"":t}var rG=["x","y","lineHeight","capHeight","scaleToFit","textAnchor","verticalAnchor","fill"],iG=["dx","dy","angle","className","breakAll"];function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},my.apply(null,arguments)}function fE(e,t){if(e==null)return{};var n,r,i=oG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function oG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $M=/[ \f\n\r\t\v\u2028\u2029]+/,BM=e=>{var{children:t,breakAll:n,style:r}=e;try{var i=[];ht(t)||(n?i=t.toString().split(""):i=t.toString().split($M));var o=i.map(s=>({word:s,width:mc(s,r).width})),a=n?0:mc(" ",r).width;return{wordsWithComputedWidth:o,spaceWidth:a}}catch{return null}},aG=(e,t,n,r,i)=>{var{maxLines:o,children:a,style:s,breakAll:l}=e,c=pe(o),u=a,d=function(){var A=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return A.reduce((P,N)=>{var{word:M,width:I}=N,L=P[P.length-1];if(L&&(r==null||i||L.width+I+n<Number(r)))L.words.push(M),L.width+=I+n;else{var $={words:[M],width:I};P.push($)}return P},[])},f=d(t),p=j=>j.reduce((A,P)=>A.width>P.width?A:P);if(!c||i)return f;var m=f.length>o||p(f).width>Number(r);if(!m)return f;for(var h="…",g=j=>{var A=u.slice(0,j),P=BM({breakAll:l,style:s,children:A+h}).wordsWithComputedWidth,N=d(P),M=N.length>o||p(N).width>Number(r);return[M,N]},b=0,S=u.length-1,w=0,x;b<=S&&w<=u.length-1;){var _=Math.floor((b+S)/2),E=_-1,[C,D]=g(E),[T]=g(_);if(!C&&!T&&(b=_+1),C&&T&&(S=_-1),!C&&T){x=D;break}w++}return x||f},pE=e=>{var t=ht(e)?[]:e.toString().split($M);return[{words:t}]},sG=e=>{var{width:t,scaleToFit:n,children:r,style:i,breakAll:o,maxLines:a}=e;if((t||n)&&!bo.isSsr){var s,l,c=BM({breakAll:o,children:r,style:i});if(c){var{wordsWithComputedWidth:u,spaceWidth:d}=c;s=u,l=d}else return pE(r);return aG({breakAll:o,children:r,maxLines:a,style:i},s,l,t,n)}return pE(r)},hE="#808080",Th=k.forwardRef((e,t)=>{var{x:n=0,y:r=0,lineHeight:i="1em",capHeight:o="0.71em",scaleToFit:a=!1,textAnchor:s="start",verticalAnchor:l="end",fill:c=hE}=e,u=fE(e,rG),d=k.useMemo(()=>sG({breakAll:u.breakAll,children:u.children,maxLines:u.maxLines,scaleToFit:a,style:u.style,width:u.width}),[u.breakAll,u.children,u.maxLines,a,u.style,u.width]),{dx:f,dy:p,angle:m,className:h,breakAll:g}=u,b=fE(u,iG);if(!jr(n)||!jr(r)||d.length===0)return null;var S=n+(pe(f)?f:0),w=r+(pe(p)?p:0),x;switch(l){case"start":x=Lg("calc(".concat(o,")"));break;case"middle":x=Lg("calc(".concat((d.length-1)/2," * -").concat(i," + (").concat(o," / 2))"));break;default:x=Lg("calc(".concat(d.length-1," * -").concat(i,")"));break}var _=[];if(a){var E=d[0].width,{width:C}=u;_.push("scale(".concat(pe(C)?C/E:1,")"))}return m&&_.push("rotate(".concat(m,", ").concat(S,", ").concat(w,")")),_.length&&(b.transform=_.join(" ")),O.createElement("text",my({},ct(b,!0),{ref:t,x:S,y:w,className:oe("recharts-text",h),textAnchor:s,fill:c.includes("url")?hE:c}),d.map((D,T)=>{var j=D.words.join(g?"":" ");return O.createElement("tspan",{x:S,dy:T===0?x:i,key:"".concat(j,"-").concat(T)},j)}))});Th.displayName="Text";var lG=["labelRef"];function cG(e,t){if(e==null)return{};var n,r,i=uG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function uG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function mE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Mt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?mE(Object(n),!0).forEach(function(r){dG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):mE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dG(e,t,n){return(t=fG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fG(e){var t=pG(e,"string");return typeof t=="symbol"?t:t+""}function pG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Yi(){return Yi=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Yi.apply(null,arguments)}var WM=k.createContext(null),zM=e=>{var{x:t,y:n,width:r,height:i,children:o}=e,a=k.useMemo(()=>({x:t,y:n,width:r,height:i}),[t,n,r,i]);return O.createElement(WM.Provider,{value:a},o)},VM=()=>{var e=k.useContext(WM),t=fh();return e||t},hG=k.createContext(null),mG=()=>{var e=k.useContext(hG),t=ce(AT);return e||t},gG=e=>{var{value:t,formatter:n}=e,r=ht(e.children)?t:e.children;return typeof n=="function"?n(r):r},G0=e=>e!=null&&typeof e=="function",vG=(e,t)=>{var n=nn(t-e),r=Math.min(Math.abs(t-e),360);return n*r},yG=(e,t,n,r,i)=>{var{offset:o,className:a}=e,{cx:s,cy:l,innerRadius:c,outerRadius:u,startAngle:d,endAngle:f,clockWise:p}=i,m=(c+u)/2,h=vG(d,f),g=h>=0?1:-1,b,S;switch(t){case"insideStart":b=d+g*o,S=p;break;case"insideEnd":b=f-g*o,S=!p;break;case"end":b=f+g*o,S=p;break;default:throw new Error("Unsupported position ".concat(t))}S=h<=0?S:!S;var w=Wt(s,l,m,b),x=Wt(s,l,m,b+(S?1:-1)*359),_="M".concat(w.x,",").concat(w.y,`
208
208
  A`).concat(m,",").concat(m,",0,1,").concat(S?0:1,`,
209
- `).concat(x.x,",").concat(x.y),E=ht(e.id)?Nc("recharts-radial-line-"):e.id;return O.createElement("text",Yi({},r,{dominantBaseline:"central",className:oe("recharts-radial-bar-label",a)}),O.createElement("defs",null,O.createElement("path",{id:E,d:_})),O.createElement("textPath",{xlinkHref:"#".concat(E)},n))},bG=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(n==="outside"){var{x:u,y:d}=Wt(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:m}=Wt(r,i,f,c);return{x:p,y:m,textAnchor:"middle",verticalAnchor:"middle"}},HM=e=>"cx"in e&&pe(e.cx),xG=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!HM(n)&&(o=n);var{x:a,y:s,width:l,height:c}=t,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",m=l>=0?1:-1,h=m*r,g=m>0?"end":"start",b=m>0?"start":"end";if(i==="top"){var S={x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f};return Mt(Mt({},S),o?{height:Math.max(s-o.y,0),width:l}:{})}if(i==="bottom"){var w={x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p};return Mt(Mt({},w),o?{height:Math.max(o.y+o.height-(s+c),0),width:l}:{})}if(i==="left"){var x={x:a-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Mt(Mt({},x),o?{width:Math.max(x.x-o.x,0),height:c}:{})}if(i==="right"){var _={x:a+l+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"};return Mt(Mt({},_),o?{width:Math.max(o.x+o.width-_.x,0),height:c}:{})}var E=o?{width:l,height:c}:{};return i==="insideLeft"?Mt({x:a+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"},E):i==="insideRight"?Mt({x:a+l-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},E):i==="insideTop"?Mt({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},E):i==="insideBottom"?Mt({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},E):i==="insideTopLeft"?Mt({x:a+h,y:s+d,textAnchor:b,verticalAnchor:p},E):i==="insideTopRight"?Mt({x:a+l-h,y:s+d,textAnchor:g,verticalAnchor:p},E):i==="insideBottomLeft"?Mt({x:a+h,y:s+c-d,textAnchor:b,verticalAnchor:f},E):i==="insideBottomRight"?Mt({x:a+l-h,y:s+c-d,textAnchor:g,verticalAnchor:f},E):i&&typeof i=="object"&&(pe(i.x)||Ta(i.x))&&(pe(i.y)||Ta(i.y))?Mt({x:a+kn(i.x,l),y:s+kn(i.y,c),textAnchor:"end",verticalAnchor:"end"},E):Mt({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},E)},wG={offset:5};function To(e){var t=qt(e,wG),{viewBox:n,position:r,value:i,children:o,content:a,className:s="",textBreakAll:l,labelRef:c}=t,u=mG(),d=VM(),f=r==="center"?d:u??d,p=n||f;if(!p||ht(i)&&ht(o)&&!k.isValidElement(a)&&typeof a!="function")return null;var m=Mt(Mt({},t),{},{viewBox:p});if(k.isValidElement(a)){var{labelRef:h}=m,g=cG(m,lG);return k.cloneElement(a,g)}var b;if(typeof a=="function"){if(b=k.createElement(a,m),k.isValidElement(b))return b}else b=gG(t);var S=HM(p),w=ct(t,!0);if(S&&(r==="insideStart"||r==="insideEnd"||r==="end"))return yG(t,r,b,w,p);var x=S?bG(p,t.offset,t.position):xG(t,p);return O.createElement(Th,Yi({ref:c,className:oe("recharts-label",s)},w,x,{breakAll:l}),b)}To.displayName="Label";var _G=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?O.createElement(To,Yi({key:"label-implicit"},r)):jr(e)?O.createElement(To,Yi({key:"label-implicit",value:e},r)):k.isValidElement(e)?e.type===To?k.cloneElement(e,Mt({key:"label-implicit"},r)):O.createElement(To,Yi({key:"label-implicit",content:e},r)):G0(e)?O.createElement(To,Yi({key:"label-implicit",content:e},r)):e&&typeof e=="object"?O.createElement(To,Yi({},e,{key:"label-implicit"},r)):null};function YM(e){var{label:t}=e,n=VM();return _G(t,n)||null}var Fg={},$g={},gE;function SG(){return gE||(gE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})($g)),$g}var Bg={},vE;function OG(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(Bg)),Bg}var yE;function EG(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SG(),n=OG(),r=Nb();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i})(Fg)),Fg}var Wg,bE;function PG(){return bE||(bE=1,Wg=EG().last),Wg}var kG=PG();const CG=ho(kG);var DG=["valueAccessor"],AG=["dataKey","clockWise","id","textBreakAll"];function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jf.apply(null,arguments)}function xE(e,t){if(e==null)return{};var n,r,i=TG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var MG=e=>Array.isArray(e.value)?CG(e.value):e.value,UM=k.createContext(void 0),X0=UM.Provider,KM=k.createContext(void 0),NG=KM.Provider;function jG(){return k.useContext(UM)}function RG(){return k.useContext(KM)}function ef(e){var{valueAccessor:t=MG}=e,n=xE(e,DG),{dataKey:r,clockWise:i,id:o,textBreakAll:a}=n,s=xE(n,AG),l=jG(),c=RG(),u=l||c;return!u||!u.length?null:O.createElement(Ot,{className:"recharts-label-list"},u.map((d,f)=>{var p,m=ht(r)?t(d,f):nt(d&&d.payload,r),h=ht(o)?{}:{id:"".concat(o,"-").concat(f)};return O.createElement(To,Jf({},ct(d,!0),s,h,{fill:(p=n.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:m,textBreakAll:a,viewBox:d.viewBox,key:"label-".concat(f),index:f}))}))}ef.displayName="LabelList";function Mh(e){var{label:t}=e;return t?t===!0?O.createElement(ef,{key:"labelList-implicit"}):O.isValidElement(t)||G0(t)?O.createElement(ef,{key:"labelList-implicit",content:t}):typeof t=="object"?O.createElement(ef,Jf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gy.apply(null,arguments)}var Q0=e=>{var{cx:t,cy:n,r,className:i}=e,o=oe("recharts-dot",i);return t===+t&&n===+n&&r===+r?O.createElement("circle",gy({},zr(e),Ob(e),{className:o,cx:t,cy:n,r})):null},qM=e=>e.graphicalItems.polarItems,IG=W([wt,ku],O0),Z0=W([qM,Lt,IG],E0),LG=W([Z0],P0),J0=W([LG,h0],k0),FG=W([J0,Lt,Z0],D0),$G=W([J0,Lt,Z0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,a=nt(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]}))),wE=()=>{},BG=W([Lt,XT,wE,$G,wE,Ee,wt],T0),GM=W([Lt,Ee,J0,FG,Pu,wt,BG],M0),WG=W([GM,Lt,yl],R0);W([Lt,GM,WG,wt],L0);var zG={radiusAxis:{},angleAxis:{}},XM=yr({name:"polarAxis",initialState:zG,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:dfe,removeRadiusAxis:ffe,addAngleAxis:pfe,removeAngleAxis:hfe}=XM.actions,VG=XM.reducer;function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function SE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_E(Object(n),!0).forEach(function(r){HG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HG(e,t,n){return(t=YG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YG(e){var t=UG(e,"string");return typeof t=="symbol"?t:t+""}function UG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KG=(e,t)=>t,ex=W([qM,KG],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),qG=[],tx=(e,t,n)=>n?.length===0?qG:n,QM=W([h0,ex,tx],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>SE(SE({},t.presentationProps),o.props))),i!=null)return i}}),GG=W([QM,ex,tx],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,a=nt(r,t.nameKey,t.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=t.fill,{value:ea(a,t.dataKey),color:s,payload:r,type:t.legendType}})}),XG=W([QM,ex,tx,Kt],(e,t,n,r)=>{if(!(t==null||e==null))return KX({offset:r,pieSettings:t,displayedData:e,cells:n})}),zg={},OE;function QG(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(zg)),zg}var Vg,EE;function ZG(){return EE||(EE=1,Vg=QG().isPlainObject),Vg}var JG=ZG();const eX=ho(JG);function PE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(r){tX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tX(e,t,n){return(t=nX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nX(e){var t=rX(e,"string");return typeof t=="symbol"?t:t+""}function rX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(null,arguments)}var CE=(e,t,n,r,i)=>{var o=n-r,a;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-o/2,",").concat(t+i),a+="L ".concat(e+n-o/2-r,",").concat(t+i),a+="L ".concat(e,",").concat(t," Z"),a},iX={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oX=e=>{var t=qt(e,iX),{x:n,y:r,upperWidth:i,lowerWidth:o,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=k.useRef(),[p,m]=k.useState(-1),h=k.useRef(i),g=k.useRef(o),b=k.useRef(a),S=k.useRef(n),w=k.useRef(r),x=fl(e,"trapezoid-");if(k.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var M=f.current.getTotalLength();M&&m(M)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||a!==+a||i===0&&o===0||a===0)return null;var _=oe("recharts-trapezoid",s);if(!d)return O.createElement("g",null,O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(n,r,i,o,a)})));var E=h.current,C=g.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(p===-1?1:p,"px"),P="".concat(p,"px 0px"),N=xA(["strokeDasharray"],c,l);return O.createElement(dl,{animationId:x,key:x,canBegin:p>0,duration:c,easing:l,isActive:d,begin:u},M=>{var I=tt(E,i,M),L=tt(C,o,M),$=tt(D,a,M),V=tt(T,n,M),z=tt(j,r,M);f.current&&(h.current=I,g.current=L,b.current=$,S.current=V,w.current=z);var B=M>0?{transition:N,strokeDasharray:P}:{strokeDasharray:A};return O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(V,z,I,L,$),ref:f,style:kE(kE({},B),t.style)}))})},aX=["option","shapeType","propTransformer","activeClassName","isActive"];function sX(e,t){if(e==null)return{};var n,r,i=lX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function DE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DE(Object(n),!0).forEach(function(r){cX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cX(e,t,n){return(t=uX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uX(e){var t=dX(e,"string");return typeof t=="symbol"?t:t+""}function dX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fX(e,t){return tp(tp({},t),e)}function pX(e,t){return e==="symbols"}function AE(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return O.createElement(OA,n);case"trapezoid":return O.createElement(oX,n);case"sector":return O.createElement(kA,n);case"symbols":if(pX(t))return O.createElement(Ab,n);break;default:return null}}function hX(e){return k.isValidElement(e)?e.props:e}function ZM(e){var{option:t,shapeType:n,propTransformer:r=fX,activeClassName:i="recharts-active-shape",isActive:o}=e,a=sX(e,aX),s;if(k.isValidElement(t))s=k.cloneElement(t,tp(tp({},a),hX(t)));else if(typeof t=="function")s=t(a);else if(eX(t)&&typeof t!="boolean"){var l=r(t,a);s=O.createElement(AE,{shapeType:n,elementProps:l})}else{var c=a;s=O.createElement(AE,{shapeType:n,elementProps:c})}return o?O.createElement(Ot,{className:i},s):s}var nx=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(fM({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},rx=e=>{var t=xt();return(n,r)=>i=>{e?.(n,r,i),t(ZU())}},ix=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(JU({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function Nh(e){var{fn:t,args:n}=e,r=xt(),i=mn();return k.useEffect(()=>{if(!i){var o=t(n);return r(GU(o)),()=>{r(XU(o))}}},[t,n,r,i]),null}var JM=()=>{};function ox(e){var{legendPayload:t}=e,n=xt(),r=mn();return k.useEffect(()=>r?JM:(n(vA(t)),()=>{n(yA(t))}),[n,r,t]),null}function mX(e){var{legendPayload:t}=e,n=xt(),r=ce(Ee);return k.useEffect(()=>r!=="centric"&&r!=="radial"?JM:(n(vA(t)),()=>{n(yA(t))}),[n,r,t]),null}var Hg,gX=()=>{var[e]=O.useState(()=>Nc("uid-"));return e},vX=(Hg=O.useId)!==null&&Hg!==void 0?Hg:gX;function yX(e,t){var n=vX();return t||(e?"".concat(e,"-").concat(n):n)}var bX=k.createContext(void 0),jh=e=>{var{id:t,type:n,children:r}=e,i=yX("recharts-".concat(n),t);return O.createElement(bX.Provider,{value:i},r(i))},xX={cartesianItems:[],polarItems:[]},eN=yr({name:"graphicalItems",initialState:xX,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:n,next:r}=t.payload,i=eo(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},removeCartesianGraphicalItem(e,t){var n=eo(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var n=eo(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)}}}),{addCartesianGraphicalItem:wX,replaceCartesianGraphicalItem:_X,removeCartesianGraphicalItem:SX,addPolarGraphicalItem:OX,removePolarGraphicalItem:EX}=eN.actions,PX=eN.reducer;function ax(e){var t=xt(),n=k.useRef(null);return k.useEffect(()=>{n.current===null?t(wX(e)):n.current!==e&&t(_X({prev:n.current,next:e})),n.current=e},[t,e]),k.useEffect(()=>()=>{n.current&&(t(SX(n.current)),n.current=null)},[t]),null}function kX(e){var t=xt();return k.useEffect(()=>(t(OX(e)),()=>{t(EX(e))}),[t,e]),null}var CX=["onMouseEnter","onClick","onMouseLeave"],DX=["id"],AX=["id"];function sx(e,t){if(e==null)return{};var n,r,i=TX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function TE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TE(Object(n),!0).forEach(function(r){MX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MX(e,t,n){return(t=NX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NX(e){var t=jX(e,"string");return typeof t=="symbol"?t:t+""}function jX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xo.apply(null,arguments)}function RX(e){var t=k.useMemo(()=>Eb(e.children,Vt),[e.children]),n=ce(r=>GG(r,e.id,t));return n==null?null:O.createElement(mX,{legendPayload:n})}function IX(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:r.map(u=>u.tooltipPayload),positions:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:t,nameKey:n,name:ea(s,t),hide:l,type:c,color:a,unit:""}}}var LX=(e,t)=>e>t?"start":e<t?"end":"middle",FX=(e,t,n)=>kn(typeof t=="function"?t(e):t,n,n*.8),$X=(e,t,n)=>{var{top:r,left:i,width:o,height:a}=t,s=sA(o,a),l=i+kn(e.cx,o,o/2),c=r+kn(e.cy,a,a/2),u=kn(e.innerRadius,s,0),d=FX(n,e.outerRadius,s),f=e.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},BX=(e,t)=>{var n=tn(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function WX(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var zX=(e,t)=>{if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return e(t);var n=oe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return O.createElement(js,Xo({},t,{type:"linear",className:n}))},VX=(e,t,n)=>{if(O.isValidElement(e))return O.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),O.isValidElement(r)))return r;var i=oe("recharts-pie-label-text",WX(e));return O.createElement(Th,Xo({},t,{alignmentBaseline:"middle",className:i}),r)};function HX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!t)return null;var s=zr(n),l=ct(i,!1),c=ct(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,d=t.map((f,p)=>{var m=(f.startAngle+f.endAngle)/2,h=Wt(f.cx,f.cy,f.outerRadius+u,m),g=yt(yt(yt(yt({},s),f),{},{stroke:"none"},l),{},{index:p,textAnchor:LX(h.x,f.cx)},h),b=yt(yt(yt(yt({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:p,points:[Wt(f.cx,f.cy,f.outerRadius,m),h],key:"line"});return O.createElement(Ot,{key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(p)},o&&zX(o,b),VX(i,g,nt(f,a)))});return O.createElement(Ot,{className:"recharts-pie-labels"},d)}function YX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?O.createElement(Mh,{label:i}):O.createElement(HX,{sectors:t,props:n,showLabels:r})}function UX(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=ce(Go),{onMouseEnter:a,onClick:s,onMouseLeave:l}=i,c=sx(i,CX),u=nx(a,i.dataKey),d=rx(l),f=ix(s,i.dataKey);return t==null||t.length===0?null:O.createElement(O.Fragment,null,t.map((p,m)=>{if(p?.startAngle===0&&p?.endAngle===0&&t.length!==1)return null;var h=n&&String(m)===o,g=o?r:null,b=h?n:g,S=yt(yt({},p),{},{stroke:p.stroke,tabIndex:-1,[pA]:m,[hA]:i.dataKey});return O.createElement(Ot,Xo({tabIndex:-1,className:"recharts-pie-sector"},hu(c,p,m),{onMouseEnter:u(p,m),onMouseLeave:d(p,m),onClick:f(p,m),key:"sector-".concat(p?.startAngle,"-").concat(p?.endAngle,"-").concat(p.midAngle,"-").concat(m)}),O.createElement(ZM,Xo({option:b,isActive:h,shapeType:"sector"},S)))}))}function KX(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=n,f=Math.abs(n.minAngle),p=BX(s,l),m=Math.abs(p),h=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,g=r.filter(E=>nt(E,c,0)!==0).length,b=(m>=360?g:g-1)*h,S=m-g*f-b,w=r.reduce((E,C)=>{var D=nt(C,c,0);return E+(pe(D)?D:0)},0),x;if(w>0){var _;x=r.map((E,C)=>{var D=nt(E,c,0),T=nt(E,u,C),j=$X(n,o,E),A=(pe(D)?D:0)/w,P,N=yt(yt({},E),i&&i[C]&&i[C].props);C?P=_.endAngle+tn(p)*h*(D!==0?1:0):P=s;var M=P+tn(p)*((D!==0?f:0)+A*S),I=(P+M)/2,L=(j.innerRadius+j.outerRadius)/2,$=[{name:T,value:D,payload:N,dataKey:c,type:d}],V=Wt(j.cx,j.cy,L,I);return _=yt(yt(yt(yt({},n.presentationProps),{},{percent:A,cornerRadius:a,name:T,tooltipPayload:$,midAngle:I,middleRadius:L,tooltipPosition:V},N),j),{},{value:D,startAngle:P,endAngle:M,payload:N,paddingAngle:tn(p)*h}),_})}return x}function qX(e){var{showLabels:t,sectors:n,children:r}=e,i=k.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return O.createElement(NG,{value:t?i:void 0},r)}function GX(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,f=fl(t,"recharts-pie-"),p=n.current,[m,h]=k.useState(!1),g=k.useCallback(()=>{typeof d=="function"&&d(),h(!1)},[d]),b=k.useCallback(()=>{typeof u=="function"&&u(),h(!0)},[u]);return O.createElement(qX,{showLabels:!m,sectors:r},O.createElement(dl,{animationId:f,begin:o,duration:a,isActive:i,easing:s,onAnimationStart:b,onAnimationEnd:g,key:f},S=>{var w=[],x=r&&r[0],_=x?.startAngle;return r?.forEach((E,C)=>{var D=p&&p[C],T=C>0?Ka(E,"paddingAngle",0):0;if(D){var j=tt(D.endAngle-D.startAngle,E.endAngle-E.startAngle,S),A=yt(yt({},E),{},{startAngle:_+T,endAngle:_+j+T});w.push(A),_=A.endAngle}else{var{endAngle:P,startAngle:N}=E,M=tt(0,P-N,S),I=yt(yt({},E),{},{startAngle:_+T,endAngle:_+M+T});w.push(I),_=I.endAngle}}),n.current=w,O.createElement(Ot,null,O.createElement(UX,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),O.createElement(YX,{showLabels:!m,sectors:r,props:t}),t.children)}var XX={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!bo.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function QX(e){var{id:t}=e,n=sx(e,DX),{hide:r,className:i,rootTabIndex:o}=e,a=k.useMemo(()=>Eb(e.children,Vt),[e.children]),s=ce(u=>XG(u,t,a)),l=k.useRef(null),c=oe("recharts-pie",i);return r||s==null?(l.current=null,O.createElement(Ot,{tabIndex:o,className:c})):O.createElement(O.Fragment,null,O.createElement(Nh,{fn:IX,args:yt(yt({},e),{},{sectors:s})}),O.createElement(Ot,{tabIndex:o,className:c},O.createElement(GX,{props:yt(yt({},n),{},{sectors:s}),previousSectorsRef:l})))}function Mi(e){var t=qt(e,XX),{id:n}=t,r=sx(t,AX),i=zr(r);return O.createElement(jh,{id:n,type:"pie"},o=>O.createElement(O.Fragment,null,O.createElement(kX,{type:"pie",id:o,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),O.createElement(RX,Xo({},r,{id:o})),O.createElement(QX,Xo({},r,{id:o}))))}Mi.displayName="Pie";function ME(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ME(Object(n),!0).forEach(function(r){ZX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ME(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZX(e,t,n){return(t=JX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JX(e){var t=eQ(e,"string");return typeof t=="symbol"?t:t+""}function eQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tQ={xAxis:{},yAxis:{},zAxis:{}},tN=yr({name:"cartesianAxis",initialState:tQ,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:n,width:r}=t.payload;e.yAxis[n]&&(e.yAxis[n]=NE(NE({},e.yAxis[n]),{},{width:r}))}}}),{addXAxis:nQ,removeXAxis:rQ,addYAxis:iQ,removeYAxis:oQ,addZAxis:mfe,removeZAxis:gfe,updateYAxisWidth:aQ}=tN.actions,sQ=tN.reducer,lQ=W([Kt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),cQ=W([lQ,vo,yo],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Rh=()=>ce(cQ),uQ=()=>ce($K);function jE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jE(Object(n),!0).forEach(function(r){dQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dQ(e,t,n){return(t=fQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fQ(e){var t=pQ(e,"string");return typeof t=="symbol"?t:t+""}function pQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hQ=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var a=RE(RE({index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},ct(i,!1)),Ob(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=O.createElement(Q0,a),O.createElement(Ot,{className:"recharts-active-dot"},s)};function vy(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i}=e,o=ce(Go),a=uQ();if(t==null||a==null)return null;var s=t.find(l=>a.includes(l.payload));return ht(s)?null:hQ({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var mQ=process.env.NODE_ENV==="production",Yg="Invariant failed";function IE(e,t){if(mQ)throw new Error(Yg);var n=typeof t=="function"?t():t,r=n?"".concat(Yg,": ").concat(n):Yg;throw new Error(r)}var gQ=["x","y"];function yy(){return yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yy.apply(null,arguments)}function LE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LE(Object(n),!0).forEach(function(r){vQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vQ(e,t,n){return(t=yQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yQ(e){var t=bQ(e,"string");return typeof t=="symbol"?t:t+""}function bQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xQ(e,t){if(e==null)return{};var n,r,i=wQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _Q(e,t){var{x:n,y:r}=e,i=xQ(e,gQ),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),d="".concat(t.width||i.width),f=parseInt(d,10);return Vl(Vl(Vl(Vl(Vl({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function lx(e){return O.createElement(ZM,yy({shapeType:"rectangle",propTransformer:_Q,activeClassName:"recharts-active-bar"},e))}var SQ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(pe(t))return t;var o=pe(r)||ht(r);return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?IE(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")):IE()),n)}},OQ={},nN=yr({name:"errorBars",initialState:OQ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:vfe,replaceErrorBar:yfe,removeErrorBar:bfe}=nN.actions,EQ=nN.reducer,PQ=["children"];function kQ(e,t){if(e==null)return{};var n,r,i=CQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function CQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var DQ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},AQ=k.createContext(DQ);function rN(e){var{children:t}=e,n=kQ(e,PQ);return O.createElement(AQ.Provider,{value:n},t)}function Ih(e,t){var n,r,i=ce(c=>Ai(c,e)),o=ce(c=>Ti(c,t)),a=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:ir.allowDataOverflow,s=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:or.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function cx(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=Rh(),{needClipX:o,needClipY:a,needClip:s}=Ih(t,n);if(!s)return null;var{x:l,y:c,width:u,height:d}=i;return O.createElement("clipPath",{id:"clipPath-".concat(r)},O.createElement("rect",{x:o?l:l-u/2,y:a?c:c-d/2,width:o?u:u*2,height:a?d:d*2}))}var TQ=["onMouseEnter","onMouseLeave","onClick"],MQ=["value","background","tooltipPosition"],NQ=["id"],jQ=["onMouseEnter","onClick","onMouseLeave"];function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo.apply(null,arguments)}function FE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FE(Object(n),!0).forEach(function(r){RQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RQ(e,t,n){return(t=IQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IQ(e){var t=LQ(e,"string");return typeof t=="symbol"?t:t+""}function LQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function np(e,t){if(e==null)return{};var n,r,i=FQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function FQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $Q=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:ea(n,t),payload:e}]};function BQ(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:ea(o,t),hide:a,type:e.tooltipType,color:e.fill,unit:s}}}function WQ(e){var t=ce(Go),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=np(o,TQ),u=nx(a,r),d=rx(s),f=ix(l,r);if(!i||n==null)return null;var p=ct(i,!1);return O.createElement(O.Fragment,null,n.map((m,h)=>{var{value:g,background:b,tooltipPosition:S}=m,w=np(m,MQ);if(!b)return null;var x=u(m,h),_=d(m,h),E=f(m,h),C=Nn(Nn(Nn(Nn(Nn({option:i,isActive:String(h)===t},w),{},{fill:"#eee"},b),p),hu(c,m,h)),{},{onMouseEnter:x,onMouseLeave:_,onClick:E,dataKey:r,index:h,className:"recharts-bar-background-rectangle"});return O.createElement(lx,Qo({key:"background-bar-".concat(C.index)},C))}))}function zQ(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var a={x:o.x,y:o.y,width:o.width,height:o.height};return Nn(Nn({},a),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:a,fill:o.fill})});return O.createElement(X0,{value:t?i:void 0},n)}function VQ(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=ce(Go),l=ce(EM),c=n&&String(o)===s&&(l==null||a===l),u=c?n:t;return O.createElement(lx,Qo({},r,i,{isActive:c,option:u,index:o,dataKey:a}))}function HQ(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return O.createElement(lx,Qo({},n,r,{isActive:!1,option:t,index:i,dataKey:o}))}function YQ(e){var{data:t,props:n}=e,r=zr(n),{id:i}=r,o=np(r,NQ),{shape:a,dataKey:s,activeBar:l}=n,{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,f=np(n,jQ),p=nx(c,s),m=rx(d),h=ix(u,s);return t?O.createElement(O.Fragment,null,t.map((g,b)=>O.createElement(Ot,Qo({className:"recharts-bar-rectangle"},hu(f,g,b),{onMouseEnter:p(g,b),onMouseLeave:m(g,b),onClick:h(g,b),key:"rectangle-".concat(g?.x,"-").concat(g?.y,"-").concat(g?.value,"-").concat(b)}),l?O.createElement(VQ,{shape:a,activeBar:l,baseProps:o,entry:g,index:b,dataKey:s}):O.createElement(HQ,{shape:a,baseProps:o,entry:g,index:b,dataKey:s})))):null}function UQ(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=n.current,f=fl(t,"recharts-bar-"),[p,m]=k.useState(!1),h=!p,g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),b=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return O.createElement(zQ,{showLabels:h,rects:r},O.createElement(dl,{animationId:f,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:g,onAnimationStart:b,key:f},S=>{var w=S===1?r:r?.map((x,_)=>{var E=d&&d[_];if(E)return Nn(Nn({},x),{},{x:tt(E.x,x.x,S),y:tt(E.y,x.y,S),width:tt(E.width,x.width,S),height:tt(E.height,x.height,S)});if(i==="horizontal"){var C=tt(0,x.height,S);return Nn(Nn({},x),{},{y:x.y+x.height-C,height:C})}var D=tt(0,x.width,S);return Nn(Nn({},x),{},{width:D})});return S>0&&(n.current=w??null),w==null?null:O.createElement(Ot,null,O.createElement(YQ,{props:t,data:w}))}),O.createElement(Mh,{label:t.label}),t.children)}function KQ(e){var t=k.useRef(null);return O.createElement(UQ,{previousRectanglesRef:t,props:e})}var iN=0,qQ=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:nt(e,t)}};class GQ extends k.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||n==null)return null;var u=oe("recharts-bar",i),d=c;return O.createElement(Ot,{className:u,id:c},s&&O.createElement("defs",null,O.createElement(cx,{clipPathId:d,xAxisId:o,yAxisId:a})),O.createElement(Ot,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},O.createElement(WQ,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),O.createElement(KQ,this.props)))}}var XQ={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!bo.isSsr,legendType:"rect",minPointSize:iN,xAxisId:0,yAxisId:0};function QQ(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=Ih(t,n),f=xu(),p=mn(),m=Eb(e.children,Vt),h=ce(S=>EZ(S,t,n,p,e.id,m));if(f!=="vertical"&&f!=="horizontal")return null;var g,b=h?.[0];return b==null||b.height==null||b.width==null?g=0:g=f==="vertical"?b.height/2:b.width/2,O.createElement(rN,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:qQ,errorBarOffset:g},O.createElement(GQ,Qo({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function ZQ(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:p,parentViewBox:m}=e,h=t==="horizontal"?s:a,g=u?h.scale.domain():null,b=h7({numericAxis:h});return d.map((S,w)=>{var x,_,E,C,D,T;u?x=c7(u[w],g):(x=nt(S,n),Array.isArray(x)||(x=[b,x]));var j=SQ(r,iN)(x[1],w);if(t==="horizontal"){var A,[P,N]=[s.scale(x[0]),s.scale(x[1])];_=_S({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:S,index:w}),E=(A=N??P)!==null&&A!==void 0?A:void 0,C=i.size;var M=P-N;if(D=Cn(M)?0:M,T={x:_,y:f.top,width:C,height:f.height},Math.abs(j)>0&&Math.abs(D)<Math.abs(j)){var I=tn(D||j)*(Math.abs(j)-Math.abs(D));E-=I,D+=I}}else{var[L,$]=[a.scale(x[0]),a.scale(x[1])];if(_=L,E=_S({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:S,index:w}),C=$-L,D=i.size,T={x:f.left,y:E,width:f.width,height:D},Math.abs(j)>0&&Math.abs(C)<Math.abs(j)){var V=tn(C||j)*(Math.abs(j)-Math.abs(C));C+=V}}if(_==null||E==null||C==null||D==null)return null;var z=Nn(Nn({},S),{},{x:_,y:E,width:C,height:D,value:u?x:x[1],payload:S,background:T,tooltipPosition:{x:_+C/2,y:E+D/2},parentViewBox:m},p&&p[w]&&p[w].props);return z}).filter(Boolean)}function JQ(e){var t=qt(e,XQ),n=mn();return O.createElement(jh,{id:t.id,type:"bar"},r=>O.createElement(O.Fragment,null,O.createElement(ox,{legendPayload:$Q(t)}),O.createElement(Nh,{fn:BQ,args:t}),O.createElement(ax,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:dA(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),O.createElement(QQ,Qo({},t,{id:r}))))}var jn=O.memo(JQ);jn.displayName="Bar";function $E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$E(Object(n),!0).forEach(function(r){eZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eZ(e,t,n){return(t=tZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tZ(e){var t=nZ(e,"string");return typeof t=="symbol"?t:t+""}function nZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rZ=(e,t)=>t,iZ=(e,t,n)=>n,oZ=(e,t,n,r)=>r,aZ=(e,t,n,r,i)=>i,ju=W([Du,aZ],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),sZ=W([ju],e=>e?.maxBarSize),lZ=(e,t,n,r,i,o)=>o,BE=(e,t,n)=>{var r=n??e;if(!ht(r))return kn(r,t,0)},cZ=W([Ee,Du,rZ,iZ,oZ],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),uZ=(e,t,n,r)=>{var i=Ee(e);return i==="horizontal"?zc(e,"yAxis",n,r):zc(e,"xAxis",t,r)},dZ=(e,t,n)=>{var r=Ee(e);return r==="horizontal"?$O(e,"xAxis",t):$O(e,"yAxis",n)},fZ=(e,t,n)=>{var r={},i=e.filter(Oh),o=e.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,d]=c,f=d.map(m=>m.dataKey),p=BE(t,n,d[0].barSize);return{stackId:u,dataKeys:f,barSize:p}}),l=o.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=BE(t,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]},pZ=W([cZ,q9,dZ],fZ),hZ=(e,t,n,r,i)=>{var o,a,s=ju(e,t,n,r,i);if(s!=null){var l=Ee(e),c=ST(e),{maxBarSize:u}=s,d=ht(u)?c:u,f,p;return l==="horizontal"?(f=Pi(e,"xAxis",t,r),p=Ei(e,"xAxis",t,r)):(f=Pi(e,"yAxis",n,r),p=Ei(e,"yAxis",n,r)),(o=(a=Xa(f,p,!0))!==null&&a!==void 0?a:d)!==null&&o!==void 0?o:0}},oN=(e,t,n,r)=>{var i=Ee(e),o,a;return i==="horizontal"?(o=Pi(e,"xAxis",t,r),a=Ei(e,"xAxis",t,r)):(o=Pi(e,"yAxis",n,r),a=Ei(e,"yAxis",n,r)),Xa(o,a)};function mZ(e,t,n,r,i){var o=r.length;if(!(o<1)){var a=kn(e,n,0,!0),s,l=[];if(dn(r[0].barSize)){var c=!1,u=n/o,d=r.reduce((b,S)=>b+(S.barSize||0),0);d+=(o-1)*a,d>=n&&(d-=(o-1)*a,a=0),d>=n&&u>0&&(c=!0,u*=.9,d=o*u);var f=(n-d)/2>>0,p={offset:f-a,size:0};s=r.reduce((b,S)=>{var w,x={stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:p.offset+p.size+a,size:c?u:(w=S.barSize)!==null&&w!==void 0?w:0}},_=[...b,x];return p=_[_.length-1].position,_},l)}else{var m=kn(t,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var h=(n-2*m-(o-1)*a)/o;h>1&&(h>>=0);var g=dn(i)?Math.min(h,i):h;s=r.reduce((b,S,w)=>[...b,{stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:m+(h+a)*w+(h-g)/2,size:g}}],l)}return s}}var gZ=(e,t,n,r,i,o,a)=>{var s=ht(a)?t:a,l=mZ(n,r,i!==o?i:o,e,s);return i!==o&&l!=null&&(l=l.map(c=>yd(yd({},c),{},{position:yd(yd({},c.position),{},{offset:c.position.offset-i/2})}))),l},vZ=W([pZ,ST,K9,OT,hZ,oN,sZ],gZ),yZ=(e,t,n,r)=>Pi(e,"xAxis",t,r),bZ=(e,t,n,r)=>Pi(e,"yAxis",n,r),xZ=(e,t,n,r)=>Ei(e,"xAxis",t,r),wZ=(e,t,n,r)=>Ei(e,"yAxis",n,r),_Z=W([vZ,ju],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),SZ=(e,t)=>{var n=Sh(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(a=>a.key===n)}}}},OZ=W([uZ,ju],SZ),EZ=W([Kt,Wb,yZ,bZ,xZ,wZ,_Z,Ee,Eu,oN,OZ,ju,lZ],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||i==null||o==null||c==null)){var{data:g}=d,b;if(g!=null&&g.length>0?b=g:b=p?.slice(m,h+1),b!=null)return ZQ({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:b,offset:e,cells:f})}}),aN=e=>{var{chartData:t}=e,n=xt(),r=mn();return k.useEffect(()=>r?()=>{}:(n(GO(t)),()=>{n(GO(void 0))}),[t,n,r]),null},WE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},sN=yr({name:"brush",initialState:WE,reducers:{setBrushSettings(e,t){return t.payload==null?WE:t.payload}}}),{setBrushSettings:xfe}=sN.actions,PZ=sN.reducer;function zE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(r){lN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lN(e,t,n){return(t=kZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kZ(e){var t=CZ(e,"string");return typeof t=="symbol"?t:t+""}function CZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DZ=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},AZ=e=>{var{x1:t,y1:n,x2:r,y2:i}=e;return DZ({x:t,y:n},{x:r,y:i})};class Lh{static create(t){return new Lh(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:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}lN(Lh,"EPS",1e-4);var TZ=e=>{var t=Object.keys(e).reduce((n,r)=>bd(bd({},n),{},{[r]:Lh.create(e[r])}),{});return bd(bd({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[a,s]=o;return[a,t[a].apply(s,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function MZ(e){return(e%180+180)%180}var NZ=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=MZ(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},jZ={dots:[],areas:[],lines:[]},cN=yr({name:"referenceElements",initialState:jZ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=eo(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=eo(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=eo(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:wfe,removeDot:_fe,addArea:Sfe,removeArea:Ofe,addLine:RZ,removeLine:IZ}=cN.actions,LZ=cN.reducer,uN=k.createContext(void 0),FZ=e=>{var{children:t}=e,[n]=k.useState("".concat(Nc("recharts"),"-clip")),r=Rh();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return O.createElement(uN.Provider,{value:n},O.createElement("defs",null,O.createElement("clipPath",{id:n},O.createElement("rect",{x:i,y:o,height:s,width:a}))),t)},$Z=()=>k.useContext(uN);function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(n),!0).forEach(function(r){ux(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ux(e,t,n){return(t=BZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BZ(e){var t=WZ(e,"string");return typeof t=="symbol"?t:t+""}function WZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function by(){return by=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},by.apply(null,arguments)}var zZ=(e,t)=>{var n;return O.isValidElement(e)?n=O.cloneElement(e,t):typeof e=="function"?n=e(t):n=O.createElement("line",by({},t,{className:"recharts-reference-line-line"})),n},VZ=(e,t,n,r,i,o,a,s,l)=>{var{x:c,y:u,width:d,height:f}=i;if(n){var{y:p}=l,m=e.y.apply(p,{position:o});if(Cn(m)||l.ifOverflow==="discard"&&!e.y.isInRange(m))return null;var h=[{x:c+d,y:m},{x:c,y:m}];return s==="left"?h.reverse():h}if(t){var{x:g}=l,b=e.x.apply(g,{position:o});if(Cn(b)||l.ifOverflow==="discard"&&!e.x.isInRange(b))return null;var S=[{x:b,y:u+f},{x:b,y:u}];return a==="top"?S.reverse():S}if(r){var{segment:w}=l,x=w.map(_=>e.apply(_,{position:o}));return l.ifOverflow==="discard"&&x.some(_=>!e.isInRange(_))?null:x}return null};function HZ(e){var t=xt();return k.useEffect(()=>(t(RZ(e)),()=>{t(IZ(e))})),null}function YZ(e){var{x:t,y:n,segment:r,xAxisId:i,yAxisId:o,shape:a,className:s,ifOverflow:l}=e,c=mn(),u=$Z(),d=ce(A=>Ai(A,i)),f=ce(A=>Ti(A,o)),p=ce(A=>qo(A,"xAxis",i,c)),m=ce(A=>qo(A,"yAxis",o,c)),h=fh(),g=jr(t),b=jr(n);if(!u||!h||d==null||f==null||p==null||m==null)return null;var S=TZ({x:p,y:m}),w=r&&r.length===2,x=VZ(S,g,b,w,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var[{x:_,y:E},{x:C,y:D}]=x,T=l==="hidden"?"url(#".concat(u,")"):void 0,j=HE(HE({clipPath:T},ct(e,!0)),{},{x1:_,y1:E,x2:C,y2:D});return O.createElement(Ot,{className:oe("recharts-reference-line",s)},zZ(a,j),O.createElement(zM,AZ({x1:_,y1:E,x2:C,y2:D}),O.createElement(YM,{label:e.label}),e.children))}function UZ(e){return O.createElement(O.Fragment,null,O.createElement(HZ,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x:e.x,y:e.y}),O.createElement(YZ,e))}class dx extends k.Component{render(){return O.createElement(UZ,this.props)}}ux(dx,"displayName","ReferenceLine");ux(dx,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function tl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function dN(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function KZ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return NZ(r,n)}function qZ(e,t,n){var r=n==="width",{x:i,y:o,width:a,height:s}=e;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function rp(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function GZ(e,t){return dN(e,t+1)}function XZ(e,t,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var m=r?.[l];if(m===void 0)return{v:dN(r,c)};var h=l,g,b=()=>(g===void 0&&(g=n(m,h)),g),S=m.coordinate,w=l===0||rp(e,S,b,u,s);w||(l=0,u=a,c+=1),w&&(u=S+e*(b()/2+i),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function YE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YE(Object(n),!0).forEach(function(r){QZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QZ(e,t,n){return(t=ZZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZZ(e){var t=JZ(e,"string");return typeof t=="symbol"?t:t+""}function JZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eJ(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(f){var p=o[f],m,h=()=>(m===void 0&&(m=n(p,f)),m);if(f===a-1){var g=e*(p.coordinate+e*h()/2-l);o[f]=p=xn(xn({},p),{},{tickCoord:g>0?p.coordinate-g*e:p.coordinate})}else o[f]=p=xn(xn({},p),{},{tickCoord:p.coordinate});var b=rp(e,p.tickCoord,h,s,l);b&&(l=p.tickCoord-e*(h()/2+i),o[f]=xn(xn({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function tJ(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=xn(xn({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=rp(e,u.tickCoord,()=>d,l,c);p&&(c=u.tickCoord-e*(d/2+i),a[s-1]=xn(xn({},u),{},{isShow:!0}))}for(var m=o?s-1:s,h=function(S){var w=a[S],x,_=()=>(x===void 0&&(x=n(w,S)),x);if(S===0){var E=e*(w.coordinate-e*_()/2-l);a[S]=w=xn(xn({},w),{},{tickCoord:E<0?w.coordinate-E*e:w.coordinate})}else a[S]=w=xn(xn({},w),{},{tickCoord:w.coordinate});var C=rp(e,w.tickCoord,_,l,c);C&&(l=w.tickCoord+e*(_()/2+i),a[S]=xn(xn({},w),{},{isShow:!0}))},g=0;g<m;g++)h(g);return a}function fx(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!i||!i.length||!r)return[];if(pe(l)||bo.isSsr){var f;return(f=GZ(i,pe(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],m=s==="top"||s==="bottom"?"width":"height",h=u&&m==="width"?mc(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=(w,x)=>{var _=typeof c=="function"?c(w.value,x):w.value;return m==="width"?KZ(mc(_,{fontSize:t,letterSpacing:n}),h,d):mc(_,{fontSize:t,letterSpacing:n})[m]},b=i.length>=2?tn(i[1].coordinate-i[0].coordinate):1,S=qZ(o,b,m);return l==="equidistantPreserveStart"?XZ(b,S,g,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=tJ(b,S,g,i,a,l==="preserveStartEnd"):p=eJ(b,S,g,i,a),p.filter(w=>w.isShow))}var nJ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){t.forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},rJ=["axisLine","width","height","className","hide","ticks"],iJ=["viewBox"],oJ=["viewBox"];function xy(e,t){if(e==null)return{};var n,r,i=aJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Za.apply(null,arguments)}function UE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UE(Object(n),!0).forEach(function(r){sJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sJ(e,t,n){return(t=lJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lJ(e){var t=cJ(e,"string");return typeof t=="symbol"?t:t+""}function cJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var px={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 uJ(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Yt(Yt(Yt({},l),ct(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var u=+(o==="top"&&!a||o==="bottom"&&a);c=Yt(Yt({},c),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(o==="left"&&!a||o==="right"&&a);c=Yt(Yt({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return O.createElement("line",Za({},c,{className:oe("recharts-cartesian-axis-line",Ka(s,"className"))}))}function dJ(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,m,h=s?-1:1,g=e.tickSize||a,b=pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,f=n+ +!s*i,d=f-h*g,m=d-h*l,p=b;break;case"left":d=f=e.coordinate,u=t+ +!s*r,c=u-h*g,p=c-h*l,m=b;break;case"right":d=f=e.coordinate,u=t+ +s*r,c=u+h*g,p=c+h*l,m=b;break;default:c=u=e.coordinate,f=n+ +s*i,d=f+h*g,m=d+h*l,p=b;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function fJ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function pJ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function hJ(e){var{option:t,tickProps:n,value:r}=e,i,o=oe(n.className,"recharts-cartesian-axis-tick-value");if(O.isValidElement(t))i=O.cloneElement(t,Yt(Yt({},n),{},{className:o}));else if(typeof t=="function")i=t(Yt(Yt({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=oe(a,t?.className)),i=O.createElement(Th,Za({},n,{className:a}),r)}return i}function mJ(e){var{ticks:t=[],tick:n,tickLine:r,stroke:i,tickFormatter:o,unit:a,padding:s,tickTextProps:l,orientation:c,mirror:u,x:d,y:f,width:p,height:m,tickSize:h,tickMargin:g,fontSize:b,letterSpacing:S,getTicksConfig:w,events:x}=e,_=fx(Yt(Yt({},w),{},{ticks:t}),b,S),E=fJ(c,u),C=pJ(c,u),D=zr(w),T=ct(n,!1),j=Yt(Yt({},D),{},{fill:"none"},ct(r,!1)),A=_.map((P,N)=>{var{line:M,tick:I}=dJ(P,d,f,p,m,c,h,u,g),L=Yt(Yt(Yt(Yt({textAnchor:E,verticalAnchor:C},D),{},{stroke:"none",fill:i},T),I),{},{index:N,payload:P,visibleTicksCount:_.length,tickFormatter:o,padding:s},l);return O.createElement(Ot,Za({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},hu(x,P,N)),r&&O.createElement("line",Za({},j,M,{className:oe("recharts-cartesian-axis-tick-line",Ka(r,"className"))})),n&&O.createElement(hJ,{option:n,tickProps:L,value:"".concat(typeof o=="function"?o(P.value,N):P.value).concat(a||"")}))});return A.length>0?O.createElement("g",{className:"recharts-cartesian-axis-ticks"},A):null}var gJ=k.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s}=e,l=xy(e,rJ),[c,u]=k.useState(""),[d,f]=k.useState(""),p=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var h;return nJ({ticks:p.current,label:(h=e.labelRef)===null||h===void 0?void 0:h.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(h=>{if(h){var g=h.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=Array.from(g);var b=g[0];if(b){var S=window.getComputedStyle(b),w=S.fontSize,x=S.letterSpacing;(w!==c||x!==d)&&(u(w),f(x))}}},[c,d]);return a||r!=null&&r<=0||i!=null&&i<=0?null:O.createElement(Ot,{className:oe("recharts-cartesian-axis",o),ref:m},O.createElement(uJ,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:zr(e)}),O.createElement(mJ,{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:d,getTicksConfig:e,events:l}),O.createElement(zM,{x:e.x,y:e.y,width:e.width,height:e.height},O.createElement(YM,{label:e.label}),e.children))}),vJ=O.memo(gJ,(e,t)=>{var{viewBox:n}=e,r=xy(e,iJ),{viewBox:i}=t,o=xy(t,oJ);return tl(n,i)&&tl(r,o)}),hx=O.forwardRef((e,t)=>{var n=qt(e,px);return O.createElement(vJ,Za({},n,{ref:t}))});hx.displayName="CartesianAxis";var yJ=["x1","y1","x2","y2","key"],bJ=["offset"],xJ=["xAxisId","yAxisId"],wJ=["xAxisId","yAxisId"];function KE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KE(Object(n),!0).forEach(function(r){_J(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _J(e,t,n){return(t=SJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SJ(e){var t=OJ(e,"string");return typeof t=="symbol"?t:t+""}function OJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ja.apply(null,arguments)}function ip(e,t){if(e==null)return{};var n,r,i=EJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function EJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var PJ=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=e;return O.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function fN(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=t,l=ip(t,yJ),c=zr(l),{offset:u}=c,d=ip(c,bJ);n=O.createElement("line",ja({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function kJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,xJ),l=i.map((c,u)=>{var d=Sn(Sn({},s),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(u),index:u});return fN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function CJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,wJ),l=i.map((c,u)=>{var d=Sn(Sn({},s),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(u),index:u});return fN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function DJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%t.length;return O.createElement("rect",{key:"react-".concat(f),y:d,x:r,height:m,width:o,stroke:"none",fill:t[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function AJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=e;if(!t||!n||!n.length)return null;var c=l.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%n.length;return O.createElement("rect",{key:"react-".concat(f),x:d,y:o,width:m,height:s,stroke:"none",fill:n[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var TJ=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return cA(fx(Sn(Sn(Sn({},px),n),{},{ticks:uA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},MJ=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return cA(fx(Sn(Sn(Sn({},px),n),{},{ticks:uA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},NJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Hr(e){var t=zb(),n=Vb(),r=mA(),i=Sn(Sn({},qt(e,NJ)),{},{x:pe(e.x)?e.x:r.left,y:pe(e.y)?e.y:r.top,width:pe(e.width)?e.width:r.width,height:pe(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:p}=i,m=mn(),h=ce(T=>BO(T,"xAxis",o,m)),g=ce(T=>BO(T,"yAxis",a,m));if(!pe(c)||c<=0||!pe(u)||u<=0||!pe(s)||s!==+s||!pe(l)||l!==+l)return null;var b=i.verticalCoordinatesGenerator||TJ,S=i.horizontalCoordinatesGenerator||MJ,{horizontalPoints:w,verticalPoints:x}=i;if((!w||!w.length)&&typeof S=="function"){var _=f&&f.length,E=S({yAxis:g?Sn(Sn({},g),{},{ticks:_?f:g.ticks}):void 0,width:t,height:n,offset:r},_?!0:d);hc(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(w=E)}if((!x||!x.length)&&typeof b=="function"){var C=p&&p.length,D=b({xAxis:h?Sn(Sn({},h),{},{ticks:C?p:h.ticks}):void 0,width:t,height:n,offset:r},C?!0:d);hc(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(x=D)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(PJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),O.createElement(DJ,ja({},i,{horizontalPoints:w})),O.createElement(AJ,ja({},i,{verticalPoints:x})),O.createElement(kJ,ja({},i,{offset:r,horizontalPoints:w,xAxis:h,yAxis:g})),O.createElement(CJ,ja({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:g})))}Hr.displayName="CartesianGrid";var pN=(e,t,n,r)=>Pi(e,"xAxis",t,r),hN=(e,t,n,r)=>Ei(e,"xAxis",t,r),mN=(e,t,n,r)=>Pi(e,"yAxis",n,r),gN=(e,t,n,r)=>Ei(e,"yAxis",n,r),jJ=W([Ee,pN,mN,hN,gN],(e,t,n,r,i)=>Di(e,"xAxis")?Xa(t,r,!1):Xa(n,i,!1)),RJ=(e,t,n,r,i)=>i;function IJ(e){return e.type==="line"}var LJ=W([Du,RJ],(e,t)=>e.filter(IJ).find(n=>n.id===t)),FJ=W([Ee,pN,mN,hN,gN,LJ,jJ,Eu],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:d,data:f}=o,p;if(f!=null&&f.length>0?p=f:p=l?.slice(c,u+1),p!=null)return aee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:a,displayedData:p})}}),$J=["id"],BJ=["type","layout","connectNulls","needClip"],WJ=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function qE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qE(Object(n),!0).forEach(function(r){zJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zJ(e,t,n){return(t=VJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VJ(e){var t=HJ(e,"string");return typeof t=="symbol"?t:t+""}function HJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mx(e,t){if(e==null)return{};var n,r,i=YJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function YJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ja.apply(null,arguments)}var UJ=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:ea(n,t),payload:e}]};function KJ(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:ea(a,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var vN=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function qJ(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var GJ=(e,t,n)=>{var r=n.reduce((d,f)=>d+f);if(!r)return vN(t,e);for(var i=Math.floor(e/r),o=e%r,a=t-e,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...qJ(n,i),...s,...u].map(d=>"".concat(d,"px")).join(", ")};function XJ(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-line-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Q0,Ja({},t,{className:r}))}return n}function QJ(e,t){return e==null?!1:t?!0:e.length===1}function ZJ(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:a}=r;if(!QJ(n,i))return null;var{id:s}=r,l=mx(r,$J),c=Jp(i),u=zr(l),d=ct(i,!0),f=n.map((m,h)=>{var g=cr(cr(cr({key:"dot-".concat(h),r:3},u),d),{},{index:h,cx:m.x,cy:m.y,dataKey:o,value:m.value,payload:m.payload,points:n});return XJ(i,g)}),p={clipPath:a?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,Ja({className:"recharts-line-dots",key:"dots"},p),f)}function JJ(e){var{showLabels:t,children:n,points:r}=e,i=k.useMemo(()=>r?.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return cr(cr({},a),{},{value:o.value,payload:o.payload,viewBox:a,parentViewBox:void 0,fill:void 0})}),[r]);return O.createElement(X0,{value:t?i:null},n)}function GE(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:a,layout:s,connectNulls:l,needClip:c}=o,u=mx(o,BJ),d=cr(cr({},ct(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:r,type:a,layout:s,connectNulls:l,strokeDasharray:i??o.strokeDasharray});return O.createElement(O.Fragment,null,r?.length>1&&O.createElement(js,Ja({},d,{pathRef:n})),O.createElement(ZJ,{points:r,clipPathId:t,props:o}))}function eee(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function tee(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:g}=n,b=i.current,S=fl(n,"recharts-line-"),[w,x]=k.useState(!1),_=!w,E=k.useCallback(()=>{typeof h=="function"&&h(),x(!1)},[h]),C=k.useCallback(()=>{typeof g=="function"&&g(),x(!0)},[g]),D=eee(r.current),T=o.current;return O.createElement(JJ,{points:a,showLabels:_},n.children,O.createElement(dl,{animationId:S,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:C,key:S},j=>{var A=tt(T,D+T,j),P=Math.min(A,D),N;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map($=>parseFloat($));N=GJ(P,D,M)}else N=vN(D,P);else N=s==null?void 0:String(s);if(b){var I=b.length/a.length,L=j===1?a:a.map(($,V)=>{var z=Math.floor(V*I);if(b[z]){var B=b[z];return cr(cr({},$),{},{x:tt(B.x,$.x,j),y:tt(B.y,$.y,j)})}return f?cr(cr({},$),{},{x:tt(p*2,$.x,j),y:tt(m/2,$.y,j)}):cr(cr({},$),{},{x:$.x,y:$.y})});return i.current=L,O.createElement(GE,{props:n,points:L,clipPathId:t,pathRef:r,strokeDasharray:N})}return j>0&&D>0&&(i.current=a,o.current=P),O.createElement(GE,{props:n,points:a,clipPathId:t,pathRef:r,strokeDasharray:N})}),O.createElement(Mh,{label:n.label}))}function nee(e){var{clipPathId:t,props:n}=e,r=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return O.createElement(tee,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var ree=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:nt(e.payload,t)});class iee extends k.Component{render(){var t,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:d,id:f,needClip:p}=this.props;if(n)return null;var m=oe("recharts-line",o),h=f,{r:g=3,strokeWidth:b=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},S=Jp(r),w=g*2+b;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:m},p&&O.createElement("defs",null,O.createElement(cx,{clipPathId:h,xAxisId:a,yAxisId:s}),!S&&O.createElement("clipPath",{id:"clipPath-dots-".concat(h)},O.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:d+w}))),O.createElement(rN,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:ree,errorBarOffset:0},O.createElement(nee,{props:this.props,clipPathId:h}))),O.createElement(vy,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var yN={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!bo.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function oee(e){var t=qt(e,yN),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,g=mx(t,WJ),{needClip:b}=Ih(p,m),S=Rh(),w=xu(),x=mn(),_=ce(j=>FJ(j,p,m,x,h));if(w!=="horizontal"&&w!=="vertical"||_==null||S==null)return null;var{height:E,width:C,x:D,y:T}=S;return O.createElement(iee,Ja({},g,{id:h,connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:p,yAxisId:m,points:_,layout:w,height:E,width:C,left:D,top:T,needClip:b}))}function aee(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var d=nt(c,a);if(t==="horizontal"){var f=If({axis:n,ticks:i,bandSize:s,entry:c,index:u}),p=ht(d)?null:r.scale(d);return{x:f,y:p,value:d,payload:c}}var m=ht(d)?null:n.scale(d),h=If({axis:r,ticks:o,bandSize:s,entry:c,index:u});return m==null||h==null?null:{x:m,y:h,value:d,payload:c}}).filter(Boolean)}function see(e){var t=qt(e,yN),n=mn();return O.createElement(jh,{id:t.id,type:"line"},r=>O.createElement(O.Fragment,null,O.createElement(ox,{legendPayload:UJ(t)}),O.createElement(Nh,{fn:KJ,args:t}),O.createElement(ax,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),O.createElement(oee,Ja({},t,{id:r}))))}var zo=O.memo(see);zo.displayName="Line";var bN=(e,t,n,r)=>Pi(e,"xAxis",t,r),xN=(e,t,n,r)=>Ei(e,"xAxis",t,r),wN=(e,t,n,r)=>Pi(e,"yAxis",n,r),_N=(e,t,n,r)=>Ei(e,"yAxis",n,r),lee=W([Ee,bN,wN,xN,_N],(e,t,n,r,i)=>Di(e,"xAxis")?Xa(t,r,!1):Xa(n,i,!1)),cee=(e,t,n,r,i)=>i,SN=W([Du,cee],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),uee=(e,t,n,r,i)=>{var o,a=SN(e,t,n,r,i);if(a!=null){var s=Ee(e),l=Di(s,"xAxis"),c;if(l?c=zc(e,"yAxis",n,r):c=zc(e,"xAxis",t,r),c!=null){var{stackId:u}=a,d=Sh(a);if(!(u==null||d==null)){var f=(o=c[u])===null||o===void 0?void 0:o.stackedData;return f?.find(p=>p.key===d)}}}},dee=W([Ee,bN,wN,xN,_N,uee,Eu,lee,SN],(e,t,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=a;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:f}=l,p;if(f&&f.length>0?p=f:p=c?.slice(u,d+1),p!=null){var m=void 0;return Mee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:m,bandSize:s})}}}),fee=["id"],pee=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function ON(e,t){if(e==null)return{};var n,r,i=hee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function XE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XE(Object(n),!0).forEach(function(r){mee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mee(e,t,n){return(t=gee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gee(e){var t=vee(e,"string");return typeof t=="symbol"?t:t+""}function vee(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(null,arguments)}function op(e,t){return e&&e!=="none"?e:t}var yee=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:op(r,i),value:ea(n,t),payload:e}]};function bee(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:ea(a,t),hide:s,type:e.tooltipType,color:op(r,o),unit:l}}}var xee=(e,t)=>{var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-area-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Q0,no({},t,{className:r}))}return n};function wee(e,t){return e==null?!1:t?!0:e.length===1}function _ee(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:a}=r;if(!wee(n,o))return null;var s=Jp(o),l=zr(r),c=ct(o,!0),u=n.map((f,p)=>{var m=Xi(Xi(Xi({key:"dot-".concat(p),r:3},l),c),{},{index:p,cx:f.x,cy:f.y,dataKey:a,value:f.value,payload:f.payload,points:n});return xee(o,m)}),d={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,no({className:"recharts-area-dots"},d),u)}function See(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return Xi(Xi({},a),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:a,fill:void 0})});return O.createElement(X0,{value:t?i:null},n)}function QE(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:a,type:s,stroke:l,connectNulls:c,isRange:u}=o,{id:d}=o,f=ON(o,fee),p=zr(f);return O.createElement(O.Fragment,null,t?.length>1&&O.createElement(Ot,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},O.createElement(js,no({},p,{id:d,points:t,connectNulls:c,type:s,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),l!=="none"&&O.createElement(js,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:t})),l!=="none"&&u&&O.createElement(js,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:n}))),O.createElement(_ee,{points:t,props:f,clipPathId:i}))}function Oee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].y,a=r[r.length-1].y;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),pe(l)?O.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function Eee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].x,a=r[r.length-1].x;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),pe(l)?O.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function Pee(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?O.createElement(Oee,{alpha:t,points:r,baseLine:i,strokeWidth:o}):O.createElement(Eee,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function kee(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=r,m=fl(r,"recharts-area-"),[h,g]=k.useState(!1),b=!h,S=k.useCallback(()=>{typeof p=="function"&&p(),g(!1)},[p]),w=k.useCallback(()=>{typeof f=="function"&&f(),g(!0)},[f]),x=i.current,_=o.current;return O.createElement(See,{showLabels:b,points:a},r.children,O.createElement(dl,{animationId:m,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:S,onAnimationStart:w,key:m},E=>{if(x){var C=x.length/a.length,D=E===1?a:a.map((j,A)=>{var P=Math.floor(A*C);if(x[P]){var N=x[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),T;return pe(s)?T=tt(_,s,E):ht(s)||Cn(s)?T=tt(_,0,E):T=s.map((j,A)=>{var P=Math.floor(A*C);if(Array.isArray(_)&&_[P]){var N=_[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),E>0&&(i.current=D,o.current=T),O.createElement(QE,{points:D,baseLine:T,needClip:t,clipPathId:n,props:r})}return E>0&&(i.current=a,o.current=s),O.createElement(Ot,null,l&&O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(n)},O.createElement(Pee,{alpha:E,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),O.createElement(Ot,{clipPath:"url(#animationClipPath-".concat(n,")")},O.createElement(QE,{points:a,baseLine:s,needClip:t,clipPathId:n,props:r})))}),O.createElement(Mh,{label:r.label}))}function Cee(e){var{needClip:t,clipPathId:n,props:r}=e,i=k.useRef(null),o=k.useRef();return O.createElement(kee,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class Dee extends k.PureComponent{render(){var t,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:p,baseLine:m}=this.props;if(n)return null;var h=oe("recharts-area",o),g=p,{r:b=3,strokeWidth:S=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},w=Jp(r),x=b*2+S;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:h},l&&O.createElement("defs",null,O.createElement(cx,{clipPathId:g,xAxisId:c,yAxisId:u}),!w&&O.createElement("clipPath",{id:"clipPath-dots-".concat(g)},O.createElement("rect",{x:s-x/2,y:a-x/2,width:d+x,height:f+x}))),O.createElement(Cee,{needClip:l,clipPathId:g,props:this.props})),O.createElement(vy,{points:i,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&O.createElement(vy,{points:m,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var EN={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!bo.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function Aee(e){var t,n=qt(e,EN),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:m,xAxisId:h,yAxisId:g}=n,b=ON(n,pee),S=xu(),w=kM(),{needClip:x}=Ih(h,g),_=mn(),{points:E,isRange:C,baseLine:D}=(t=ce(M=>dee(M,h,g,_,e.id)))!==null&&t!==void 0?t:{},T=Rh();if(S!=="horizontal"&&S!=="vertical"||T==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:j,width:A,x:P,y:N}=T;return!E||!E.length?null:O.createElement(Dee,no({},b,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:D,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:j,hide:d,layout:S,isAnimationActive:f,isRange:C,legendType:p,needClip:x,points:E,stroke:m,width:A,left:P,top:N,xAxisId:h,yAxisId:g}))}var Tee=(e,t,n,r,i)=>{var o=n??t;if(pe(o))return o;var a=e==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function Mee(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=Tee(o,a,n,s,l),g=o==="horizontal",b=!1,S=c.map((x,_)=>{var E;m?E=i[u+_]:(E=nt(x,r),Array.isArray(E)?b=!0:E=[h,E]);var C=E[1]==null||m&&!t&&nt(x,r)==null;return g?{x:If({axis:s,ticks:d,bandSize:p,entry:x,index:_}),y:C?null:l.scale(E[1]),value:E,payload:x}:{x:C?null:s.scale(E[1]),y:If({axis:l,ticks:f,bandSize:p,entry:x,index:_}),value:E,payload:x}}),w;return m||b?w=S.map(x=>{var _=Array.isArray(x.value)?x.value[0]:null;return g?{x:x.x,y:_!=null&&x.y!=null?l.scale(_):null,payload:x.payload}:{x:_!=null?s.scale(_):null,y:x.y,payload:x.payload}}):w=g?l.scale(h):s.scale(h),{points:S,baseLine:w,isRange:b}}function Nee(e){var t=qt(e,EN),n=mn();return O.createElement(jh,{id:t.id,type:"area"},r=>O.createElement(O.Fragment,null,O.createElement(ox,{legendPayload:yee(t)}),O.createElement(Nh,{fn:bee,args:t}),O.createElement(ax,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:dA(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),O.createElement(Aee,no({},t,{id:r}))))}var PN=O.memo(Nee);PN.displayName="Area";var jee=["dangerouslySetInnerHTML","ticks"],Ree=["id"],Iee=["domain"],Lee=["domain"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wy.apply(null,arguments)}function ap(e,t){if(e==null)return{};var n,r,i=Fee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $ee(e){var t=xt();return k.useEffect(()=>(t(nQ(e)),()=>{t(rQ(e))}),[e,t]),null}var Bee=e=>{var{xAxisId:t,className:n}=e,r=ce(Wb),i=mn(),o="xAxis",a=ce(g=>qo(g,o,t,i)),s=ce(g=>aM(g,o,t,i)),l=ce(g=>nM(g,t)),c=ce(g=>$U(g,t)),u=ce(g=>NT(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,p=ap(e,jee),{id:m}=u,h=ap(u,Ree);return O.createElement(hx,wy({},p,h,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:oe("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},Wee={allowDataOverflow:ir.allowDataOverflow,allowDecimals:ir.allowDecimals,allowDuplicatedCategory:ir.allowDuplicatedCategory,height:ir.height,hide:!1,mirror:ir.mirror,orientation:ir.orientation,padding:ir.padding,reversed:ir.reversed,scale:ir.scale,tickCount:ir.tickCount,type:ir.type,xAxisId:0},zee=e=>{var t,n,r,i,o,a=qt(e,Wee);return O.createElement(O.Fragment,null,O.createElement($ee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.xAxisId,scale:a.scale,type:a.type,padding:a.padding,allowDataOverflow:a.allowDataOverflow,domain:a.domain,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,height:a.height,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Bee,a))},Vee=(e,t)=>{var{domain:n}=e,r=ap(e,Iee),{domain:i}=t,o=ap(t,Lee);return tl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:tl({domain:n},{domain:i}):!1},br=O.memo(zee,Vee);br.displayName="XAxis";var Hee=["dangerouslySetInnerHTML","ticks"],Yee=["id"],Uee=["domain"],Kee=["domain"];function _y(){return _y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_y.apply(null,arguments)}function sp(e,t){if(e==null)return{};var n,r,i=qee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Gee(e){var t=xt();return k.useEffect(()=>(t(iQ(e)),()=>{t(oQ(e))}),[e,t]),null}var Xee=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=k.useRef(null),a=k.useRef(null),s=ce(Wb),l=mn(),c=xt(),u="yAxis",d=ce(_=>qo(_,u,t,l)),f=ce(_=>rM(_,t)),p=ce(_=>WU(_,t)),m=ce(_=>aM(_,u,t,l)),h=ce(_=>jT(_,t));if(k.useLayoutEffect(()=>{if(!(r!=="auto"||!f||G0(i)||k.isValidElement(i)||h==null)){var _=o.current;if(_){var E=_.getCalculatedWidth();Math.round(f.width)!==Math.round(E)&&c(aQ({id:t,width:E}))}}},[m,f,c,i,t,r,h]),f==null||p==null||h==null)return null;var{dangerouslySetInnerHTML:g,ticks:b}=e,S=sp(e,Hee),{id:w}=h,x=sp(h,Yee);return O.createElement(hx,_y({},S,x,{ref:o,labelRef:a,scale:d,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:f.width,height:f.height,className:oe("recharts-".concat(u," ").concat(u),n),viewBox:s,ticks:m}))},Qee={allowDataOverflow:or.allowDataOverflow,allowDecimals:or.allowDecimals,allowDuplicatedCategory:or.allowDuplicatedCategory,hide:!1,mirror:or.mirror,orientation:or.orientation,padding:or.padding,reversed:or.reversed,scale:or.scale,tickCount:or.tickCount,type:or.type,width:or.width,yAxisId:0},Zee=e=>{var t,n,r,i,o,a=qt(e,Qee);return O.createElement(O.Fragment,null,O.createElement(Gee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.yAxisId,scale:a.scale,type:a.type,domain:a.domain,allowDataOverflow:a.allowDataOverflow,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,padding:a.padding,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,width:a.width,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Xee,a))},Jee=(e,t)=>{var{domain:n}=e,r=sp(e,Uee),{domain:i}=t,o=sp(t,Kee);return tl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:tl({domain:n},{domain:i}):!1},nr=O.memo(Zee,Jee);nr.displayName="YAxis";var xd={exports:{}},Ug={};/**
209
+ `).concat(x.x,",").concat(x.y),E=ht(e.id)?Nc("recharts-radial-line-"):e.id;return O.createElement("text",Yi({},r,{dominantBaseline:"central",className:oe("recharts-radial-bar-label",a)}),O.createElement("defs",null,O.createElement("path",{id:E,d:_})),O.createElement("textPath",{xlinkHref:"#".concat(E)},n))},bG=(e,t,n)=>{var{cx:r,cy:i,innerRadius:o,outerRadius:a,startAngle:s,endAngle:l}=e,c=(s+l)/2;if(n==="outside"){var{x:u,y:d}=Wt(r,i,a+t,c);return{x:u,y:d,textAnchor:u>=r?"start":"end",verticalAnchor:"middle"}}if(n==="center")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"middle"};if(n==="centerTop")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"start"};if(n==="centerBottom")return{x:r,y:i,textAnchor:"middle",verticalAnchor:"end"};var f=(o+a)/2,{x:p,y:m}=Wt(r,i,f,c);return{x:p,y:m,textAnchor:"middle",verticalAnchor:"middle"}},HM=e=>"cx"in e&&pe(e.cx),xG=(e,t)=>{var{parentViewBox:n,offset:r,position:i}=e,o;n!=null&&!HM(n)&&(o=n);var{x:a,y:s,width:l,height:c}=t,u=c>=0?1:-1,d=u*r,f=u>0?"end":"start",p=u>0?"start":"end",m=l>=0?1:-1,h=m*r,g=m>0?"end":"start",b=m>0?"start":"end";if(i==="top"){var S={x:a+l/2,y:s-u*r,textAnchor:"middle",verticalAnchor:f};return Mt(Mt({},S),o?{height:Math.max(s-o.y,0),width:l}:{})}if(i==="bottom"){var w={x:a+l/2,y:s+c+d,textAnchor:"middle",verticalAnchor:p};return Mt(Mt({},w),o?{height:Math.max(o.y+o.height-(s+c),0),width:l}:{})}if(i==="left"){var x={x:a-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"};return Mt(Mt({},x),o?{width:Math.max(x.x-o.x,0),height:c}:{})}if(i==="right"){var _={x:a+l+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"};return Mt(Mt({},_),o?{width:Math.max(o.x+o.width-_.x,0),height:c}:{})}var E=o?{width:l,height:c}:{};return i==="insideLeft"?Mt({x:a+h,y:s+c/2,textAnchor:b,verticalAnchor:"middle"},E):i==="insideRight"?Mt({x:a+l-h,y:s+c/2,textAnchor:g,verticalAnchor:"middle"},E):i==="insideTop"?Mt({x:a+l/2,y:s+d,textAnchor:"middle",verticalAnchor:p},E):i==="insideBottom"?Mt({x:a+l/2,y:s+c-d,textAnchor:"middle",verticalAnchor:f},E):i==="insideTopLeft"?Mt({x:a+h,y:s+d,textAnchor:b,verticalAnchor:p},E):i==="insideTopRight"?Mt({x:a+l-h,y:s+d,textAnchor:g,verticalAnchor:p},E):i==="insideBottomLeft"?Mt({x:a+h,y:s+c-d,textAnchor:b,verticalAnchor:f},E):i==="insideBottomRight"?Mt({x:a+l-h,y:s+c-d,textAnchor:g,verticalAnchor:f},E):i&&typeof i=="object"&&(pe(i.x)||Ta(i.x))&&(pe(i.y)||Ta(i.y))?Mt({x:a+kn(i.x,l),y:s+kn(i.y,c),textAnchor:"end",verticalAnchor:"end"},E):Mt({x:a+l/2,y:s+c/2,textAnchor:"middle",verticalAnchor:"middle"},E)},wG={offset:5};function To(e){var t=Gt(e,wG),{viewBox:n,position:r,value:i,children:o,content:a,className:s="",textBreakAll:l,labelRef:c}=t,u=mG(),d=VM(),f=r==="center"?d:u??d,p=n||f;if(!p||ht(i)&&ht(o)&&!k.isValidElement(a)&&typeof a!="function")return null;var m=Mt(Mt({},t),{},{viewBox:p});if(k.isValidElement(a)){var{labelRef:h}=m,g=cG(m,lG);return k.cloneElement(a,g)}var b;if(typeof a=="function"){if(b=k.createElement(a,m),k.isValidElement(b))return b}else b=gG(t);var S=HM(p),w=ct(t,!0);if(S&&(r==="insideStart"||r==="insideEnd"||r==="end"))return yG(t,r,b,w,p);var x=S?bG(p,t.offset,t.position):xG(t,p);return O.createElement(Th,Yi({ref:c,className:oe("recharts-label",s)},w,x,{breakAll:l}),b)}To.displayName="Label";var _G=(e,t,n)=>{if(!e)return null;var r={viewBox:t,labelRef:n};return e===!0?O.createElement(To,Yi({key:"label-implicit"},r)):jr(e)?O.createElement(To,Yi({key:"label-implicit",value:e},r)):k.isValidElement(e)?e.type===To?k.cloneElement(e,Mt({key:"label-implicit"},r)):O.createElement(To,Yi({key:"label-implicit",content:e},r)):G0(e)?O.createElement(To,Yi({key:"label-implicit",content:e},r)):e&&typeof e=="object"?O.createElement(To,Yi({},e,{key:"label-implicit"},r)):null};function YM(e){var{label:t}=e,n=VM();return _G(t,n)||null}var Fg={},$g={},gE;function SG(){return gE||(gE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return n[n.length-1]}e.last=t})($g)),$g}var Bg={},vE;function OG(){return vE||(vE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){return Array.isArray(n)?n:Array.from(n)}e.toArray=t})(Bg)),Bg}var yE;function EG(){return yE||(yE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});const t=SG(),n=OG(),r=Nb();function i(o){if(r.isArrayLike(o))return t.last(n.toArray(o))}e.last=i})(Fg)),Fg}var Wg,bE;function PG(){return bE||(bE=1,Wg=EG().last),Wg}var kG=PG();const CG=ho(kG);var DG=["valueAccessor"],AG=["dataKey","clockWise","id","textBreakAll"];function Jf(){return Jf=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jf.apply(null,arguments)}function xE(e,t){if(e==null)return{};var n,r,i=TG(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TG(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var MG=e=>Array.isArray(e.value)?CG(e.value):e.value,UM=k.createContext(void 0),X0=UM.Provider,KM=k.createContext(void 0),NG=KM.Provider;function jG(){return k.useContext(UM)}function RG(){return k.useContext(KM)}function ef(e){var{valueAccessor:t=MG}=e,n=xE(e,DG),{dataKey:r,clockWise:i,id:o,textBreakAll:a}=n,s=xE(n,AG),l=jG(),c=RG(),u=l||c;return!u||!u.length?null:O.createElement(Ot,{className:"recharts-label-list"},u.map((d,f)=>{var p,m=ht(r)?t(d,f):nt(d&&d.payload,r),h=ht(o)?{}:{id:"".concat(o,"-").concat(f)};return O.createElement(To,Jf({},ct(d,!0),s,h,{fill:(p=n.fill)!==null&&p!==void 0?p:d.fill,parentViewBox:d.parentViewBox,value:m,textBreakAll:a,viewBox:d.viewBox,key:"label-".concat(f),index:f}))}))}ef.displayName="LabelList";function Mh(e){var{label:t}=e;return t?t===!0?O.createElement(ef,{key:"labelList-implicit"}):O.isValidElement(t)||G0(t)?O.createElement(ef,{key:"labelList-implicit",content:t}):typeof t=="object"?O.createElement(ef,Jf({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}function gy(){return gy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gy.apply(null,arguments)}var Q0=e=>{var{cx:t,cy:n,r,className:i}=e,o=oe("recharts-dot",i);return t===+t&&n===+n&&r===+r?O.createElement("circle",gy({},zr(e),Ob(e),{className:o,cx:t,cy:n,r})):null},qM=e=>e.graphicalItems.polarItems,IG=W([wt,ku],O0),Z0=W([qM,Lt,IG],E0),LG=W([Z0],P0),J0=W([LG,h0],k0),FG=W([J0,Lt,Z0],D0),$G=W([J0,Lt,Z0],(e,t,n)=>n.length>0?e.flatMap(r=>n.flatMap(i=>{var o,a=nt(r,(o=t.dataKey)!==null&&o!==void 0?o:i.dataKey);return{value:a,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(r=>({value:nt(r,t.dataKey),errorDomain:[]})):e.map(r=>({value:r,errorDomain:[]}))),wE=()=>{},BG=W([Lt,XT,wE,$G,wE,Ee,wt],T0),GM=W([Lt,Ee,J0,FG,Pu,wt,BG],M0),WG=W([GM,Lt,yl],R0);W([Lt,GM,WG,wt],L0);var zG={radiusAxis:{},angleAxis:{}},XM=yr({name:"polarAxis",initialState:zG,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:dfe,removeRadiusAxis:ffe,addAngleAxis:pfe,removeAngleAxis:hfe}=XM.actions,VG=XM.reducer;function _E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function SE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?_E(Object(n),!0).forEach(function(r){HG(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function HG(e,t,n){return(t=YG(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function YG(e){var t=UG(e,"string");return typeof t=="symbol"?t:t+""}function UG(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var KG=(e,t)=>t,ex=W([qM,KG],(e,t)=>e.filter(n=>n.type==="pie").find(n=>n.id===t)),qG=[],tx=(e,t,n)=>n?.length===0?qG:n,QM=W([h0,ex,tx],(e,t,n)=>{var{chartData:r}=e;if(t!=null){var i;if(t?.data!=null&&t.data.length>0?i=t.data:i=r,(!i||!i.length)&&n!=null&&(i=n.map(o=>SE(SE({},t.presentationProps),o.props))),i!=null)return i}}),GG=W([QM,ex,tx],(e,t,n)=>{if(!(e==null||t==null))return e.map((r,i)=>{var o,a=nt(r,t.nameKey,t.name),s;return n!=null&&(o=n[i])!==null&&o!==void 0&&(o=o.props)!==null&&o!==void 0&&o.fill?s=n[i].props.fill:typeof r=="object"&&r!=null&&"fill"in r?s=r.fill:s=t.fill,{value:ea(a,t.dataKey),color:s,payload:r,type:t.legendType}})}),XG=W([QM,ex,tx,qt],(e,t,n,r)=>{if(!(t==null||e==null))return KX({offset:r,pieSettings:t,displayedData:e,cells:n})}),zg={},OE;function QG(){return OE||(OE=1,(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"});function t(n){if(typeof n!="object"||n==null)return!1;if(Object.getPrototypeOf(n)===null)return!0;if(Object.prototype.toString.call(n)!=="[object Object]"){const i=n[Symbol.toStringTag];return i==null||!Object.getOwnPropertyDescriptor(n,Symbol.toStringTag)?.writable?!1:n.toString()===`[object ${i}]`}let r=n;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(n)===r}e.isPlainObject=t})(zg)),zg}var Vg,EE;function ZG(){return EE||(EE=1,Vg=QG().isPlainObject),Vg}var JG=ZG();const eX=ho(JG);function PE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function kE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(r){tX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tX(e,t,n){return(t=nX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function nX(e){var t=rX(e,"string");return typeof t=="symbol"?t:t+""}function rX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ep(){return ep=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ep.apply(null,arguments)}var CE=(e,t,n,r,i)=>{var o=n-r,a;return a="M ".concat(e,",").concat(t),a+="L ".concat(e+n,",").concat(t),a+="L ".concat(e+n-o/2,",").concat(t+i),a+="L ".concat(e+n-o/2-r,",").concat(t+i),a+="L ".concat(e,",").concat(t," Z"),a},iX={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},oX=e=>{var t=Gt(e,iX),{x:n,y:r,upperWidth:i,lowerWidth:o,height:a,className:s}=t,{animationEasing:l,animationDuration:c,animationBegin:u,isUpdateAnimationActive:d}=t,f=k.useRef(),[p,m]=k.useState(-1),h=k.useRef(i),g=k.useRef(o),b=k.useRef(a),S=k.useRef(n),w=k.useRef(r),x=fl(e,"trapezoid-");if(k.useEffect(()=>{if(f.current&&f.current.getTotalLength)try{var M=f.current.getTotalLength();M&&m(M)}catch{}},[]),n!==+n||r!==+r||i!==+i||o!==+o||a!==+a||i===0&&o===0||a===0)return null;var _=oe("recharts-trapezoid",s);if(!d)return O.createElement("g",null,O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(n,r,i,o,a)})));var E=h.current,C=g.current,D=b.current,T=S.current,j=w.current,A="0px ".concat(p===-1?1:p,"px"),P="".concat(p,"px 0px"),N=xA(["strokeDasharray"],c,l);return O.createElement(dl,{animationId:x,key:x,canBegin:p>0,duration:c,easing:l,isActive:d,begin:u},M=>{var I=tt(E,i,M),L=tt(C,o,M),$=tt(D,a,M),V=tt(T,n,M),z=tt(j,r,M);f.current&&(h.current=I,g.current=L,b.current=$,S.current=V,w.current=z);var B=M>0?{transition:N,strokeDasharray:P}:{strokeDasharray:A};return O.createElement("path",ep({},ct(t,!0),{className:_,d:CE(V,z,I,L,$),ref:f,style:kE(kE({},B),t.style)}))})},aX=["option","shapeType","propTransformer","activeClassName","isActive"];function sX(e,t){if(e==null)return{};var n,r,i=lX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function lX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function DE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function tp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?DE(Object(n),!0).forEach(function(r){cX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):DE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function cX(e,t,n){return(t=uX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uX(e){var t=dX(e,"string");return typeof t=="symbol"?t:t+""}function dX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fX(e,t){return tp(tp({},t),e)}function pX(e,t){return e==="symbols"}function AE(e){var{shapeType:t,elementProps:n}=e;switch(t){case"rectangle":return O.createElement(OA,n);case"trapezoid":return O.createElement(oX,n);case"sector":return O.createElement(kA,n);case"symbols":if(pX(t))return O.createElement(Ab,n);break;default:return null}}function hX(e){return k.isValidElement(e)?e.props:e}function ZM(e){var{option:t,shapeType:n,propTransformer:r=fX,activeClassName:i="recharts-active-shape",isActive:o}=e,a=sX(e,aX),s;if(k.isValidElement(t))s=k.cloneElement(t,tp(tp({},a),hX(t)));else if(typeof t=="function")s=t(a);else if(eX(t)&&typeof t!="boolean"){var l=r(t,a);s=O.createElement(AE,{shapeType:n,elementProps:l})}else{var c=a;s=O.createElement(AE,{shapeType:n,elementProps:c})}return o?O.createElement(Ot,{className:i},s):s}var nx=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(fM({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}},rx=e=>{var t=xt();return(n,r)=>i=>{e?.(n,r,i),t(ZU())}},ix=(e,t)=>{var n=xt();return(r,i)=>o=>{e?.(r,i,o),n(JU({activeIndex:String(i),activeDataKey:t,activeCoordinate:r.tooltipPosition}))}};function Nh(e){var{fn:t,args:n}=e,r=xt(),i=mn();return k.useEffect(()=>{if(!i){var o=t(n);return r(GU(o)),()=>{r(XU(o))}}},[t,n,r,i]),null}var JM=()=>{};function ox(e){var{legendPayload:t}=e,n=xt(),r=mn();return k.useEffect(()=>r?JM:(n(vA(t)),()=>{n(yA(t))}),[n,r,t]),null}function mX(e){var{legendPayload:t}=e,n=xt(),r=ce(Ee);return k.useEffect(()=>r!=="centric"&&r!=="radial"?JM:(n(vA(t)),()=>{n(yA(t))}),[n,r,t]),null}var Hg,gX=()=>{var[e]=O.useState(()=>Nc("uid-"));return e},vX=(Hg=O.useId)!==null&&Hg!==void 0?Hg:gX;function yX(e,t){var n=vX();return t||(e?"".concat(e,"-").concat(n):n)}var bX=k.createContext(void 0),jh=e=>{var{id:t,type:n,children:r}=e,i=yX("recharts-".concat(n),t);return O.createElement(bX.Provider,{value:i},r(i))},xX={cartesianItems:[],polarItems:[]},eN=yr({name:"graphicalItems",initialState:xX,reducers:{addCartesianGraphicalItem(e,t){e.cartesianItems.push(t.payload)},replaceCartesianGraphicalItem(e,t){var{prev:n,next:r}=t.payload,i=eo(e).cartesianItems.indexOf(n);i>-1&&(e.cartesianItems[i]=r)},removeCartesianGraphicalItem(e,t){var n=eo(e).cartesianItems.indexOf(t.payload);n>-1&&e.cartesianItems.splice(n,1)},addPolarGraphicalItem(e,t){e.polarItems.push(t.payload)},removePolarGraphicalItem(e,t){var n=eo(e).polarItems.indexOf(t.payload);n>-1&&e.polarItems.splice(n,1)}}}),{addCartesianGraphicalItem:wX,replaceCartesianGraphicalItem:_X,removeCartesianGraphicalItem:SX,addPolarGraphicalItem:OX,removePolarGraphicalItem:EX}=eN.actions,PX=eN.reducer;function ax(e){var t=xt(),n=k.useRef(null);return k.useEffect(()=>{n.current===null?t(wX(e)):n.current!==e&&t(_X({prev:n.current,next:e})),n.current=e},[t,e]),k.useEffect(()=>()=>{n.current&&(t(SX(n.current)),n.current=null)},[t]),null}function kX(e){var t=xt();return k.useEffect(()=>(t(OX(e)),()=>{t(EX(e))}),[t,e]),null}var CX=["onMouseEnter","onClick","onMouseLeave"],DX=["id"],AX=["id"];function sx(e,t){if(e==null)return{};var n,r,i=TX(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function TX(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function TE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?TE(Object(n),!0).forEach(function(r){MX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):TE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function MX(e,t,n){return(t=NX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NX(e){var t=jX(e,"string");return typeof t=="symbol"?t:t+""}function jX(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xo(){return Xo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xo.apply(null,arguments)}function RX(e){var t=k.useMemo(()=>Eb(e.children,Vt),[e.children]),n=ce(r=>GG(r,e.id,t));return n==null?null:O.createElement(mX,{legendPayload:n})}function IX(e){var{dataKey:t,nameKey:n,sectors:r,stroke:i,strokeWidth:o,fill:a,name:s,hide:l,tooltipType:c}=e;return{dataDefinedOnItem:r.map(u=>u.tooltipPayload),positions:r.map(u=>u.tooltipPosition),settings:{stroke:i,strokeWidth:o,fill:a,dataKey:t,nameKey:n,name:ea(s,t),hide:l,type:c,color:a,unit:""}}}var LX=(e,t)=>e>t?"start":e<t?"end":"middle",FX=(e,t,n)=>kn(typeof t=="function"?t(e):t,n,n*.8),$X=(e,t,n)=>{var{top:r,left:i,width:o,height:a}=t,s=sA(o,a),l=i+kn(e.cx,o,o/2),c=r+kn(e.cy,a,a/2),u=kn(e.innerRadius,s,0),d=FX(n,e.outerRadius,s),f=e.maxRadius||Math.sqrt(o*o+a*a)/2;return{cx:l,cy:c,innerRadius:u,outerRadius:d,maxRadius:f}},BX=(e,t)=>{var n=nn(t-e),r=Math.min(Math.abs(t-e),360);return n*r};function WX(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var zX=(e,t)=>{if(O.isValidElement(e))return O.cloneElement(e,t);if(typeof e=="function")return e(t);var n=oe("recharts-pie-label-line",typeof e!="boolean"?e.className:"");return O.createElement(js,Xo({},t,{type:"linear",className:n}))},VX=(e,t,n)=>{if(O.isValidElement(e))return O.cloneElement(e,t);var r=n;if(typeof e=="function"&&(r=e(t),O.isValidElement(r)))return r;var i=oe("recharts-pie-label-text",WX(e));return O.createElement(Th,Xo({},t,{alignmentBaseline:"middle",className:i}),r)};function HX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i,labelLine:o,dataKey:a}=n;if(!r||!i||!t)return null;var s=zr(n),l=ct(i,!1),c=ct(o,!1),u=typeof i=="object"&&"offsetRadius"in i&&typeof i.offsetRadius=="number"&&i.offsetRadius||20,d=t.map((f,p)=>{var m=(f.startAngle+f.endAngle)/2,h=Wt(f.cx,f.cy,f.outerRadius+u,m),g=yt(yt(yt(yt({},s),f),{},{stroke:"none"},l),{},{index:p,textAnchor:LX(h.x,f.cx)},h),b=yt(yt(yt(yt({},s),f),{},{fill:"none",stroke:f.fill},c),{},{index:p,points:[Wt(f.cx,f.cy,f.outerRadius,m),h],key:"line"});return O.createElement(Ot,{key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(p)},o&&zX(o,b),VX(i,g,nt(f,a)))});return O.createElement(Ot,{className:"recharts-pie-labels"},d)}function YX(e){var{sectors:t,props:n,showLabels:r}=e,{label:i}=n;return typeof i=="object"&&i!=null&&"position"in i?O.createElement(Mh,{label:i}):O.createElement(HX,{sectors:t,props:n,showLabels:r})}function UX(e){var{sectors:t,activeShape:n,inactiveShape:r,allOtherPieProps:i}=e,o=ce(Go),{onMouseEnter:a,onClick:s,onMouseLeave:l}=i,c=sx(i,CX),u=nx(a,i.dataKey),d=rx(l),f=ix(s,i.dataKey);return t==null||t.length===0?null:O.createElement(O.Fragment,null,t.map((p,m)=>{if(p?.startAngle===0&&p?.endAngle===0&&t.length!==1)return null;var h=n&&String(m)===o,g=o?r:null,b=h?n:g,S=yt(yt({},p),{},{stroke:p.stroke,tabIndex:-1,[pA]:m,[hA]:i.dataKey});return O.createElement(Ot,Xo({tabIndex:-1,className:"recharts-pie-sector"},hu(c,p,m),{onMouseEnter:u(p,m),onMouseLeave:d(p,m),onClick:f(p,m),key:"sector-".concat(p?.startAngle,"-").concat(p?.endAngle,"-").concat(p.midAngle,"-").concat(m)}),O.createElement(ZM,Xo({option:b,isActive:h,shapeType:"sector"},S)))}))}function KX(e){var t,{pieSettings:n,displayedData:r,cells:i,offset:o}=e,{cornerRadius:a,startAngle:s,endAngle:l,dataKey:c,nameKey:u,tooltipType:d}=n,f=Math.abs(n.minAngle),p=BX(s,l),m=Math.abs(p),h=r.length<=1?0:(t=n.paddingAngle)!==null&&t!==void 0?t:0,g=r.filter(E=>nt(E,c,0)!==0).length,b=(m>=360?g:g-1)*h,S=m-g*f-b,w=r.reduce((E,C)=>{var D=nt(C,c,0);return E+(pe(D)?D:0)},0),x;if(w>0){var _;x=r.map((E,C)=>{var D=nt(E,c,0),T=nt(E,u,C),j=$X(n,o,E),A=(pe(D)?D:0)/w,P,N=yt(yt({},E),i&&i[C]&&i[C].props);C?P=_.endAngle+nn(p)*h*(D!==0?1:0):P=s;var M=P+nn(p)*((D!==0?f:0)+A*S),I=(P+M)/2,L=(j.innerRadius+j.outerRadius)/2,$=[{name:T,value:D,payload:N,dataKey:c,type:d}],V=Wt(j.cx,j.cy,L,I);return _=yt(yt(yt(yt({},n.presentationProps),{},{percent:A,cornerRadius:a,name:T,tooltipPayload:$,midAngle:I,middleRadius:L,tooltipPosition:V},N),j),{},{value:D,startAngle:P,endAngle:M,payload:N,paddingAngle:nn(p)*h}),_})}return x}function qX(e){var{showLabels:t,sectors:n,children:r}=e,i=k.useMemo(()=>!t||!n?[]:n.map(o=>({value:o.value,payload:o.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:o.cx,cy:o.cy,innerRadius:o.innerRadius,outerRadius:o.outerRadius,startAngle:o.startAngle,endAngle:o.endAngle,clockWise:!1},fill:o.fill})),[n,t]);return O.createElement(NG,{value:t?i:void 0},r)}function GX(e){var{props:t,previousSectorsRef:n}=e,{sectors:r,isAnimationActive:i,animationBegin:o,animationDuration:a,animationEasing:s,activeShape:l,inactiveShape:c,onAnimationStart:u,onAnimationEnd:d}=t,f=fl(t,"recharts-pie-"),p=n.current,[m,h]=k.useState(!1),g=k.useCallback(()=>{typeof d=="function"&&d(),h(!1)},[d]),b=k.useCallback(()=>{typeof u=="function"&&u(),h(!0)},[u]);return O.createElement(qX,{showLabels:!m,sectors:r},O.createElement(dl,{animationId:f,begin:o,duration:a,isActive:i,easing:s,onAnimationStart:b,onAnimationEnd:g,key:f},S=>{var w=[],x=r&&r[0],_=x?.startAngle;return r?.forEach((E,C)=>{var D=p&&p[C],T=C>0?Ka(E,"paddingAngle",0):0;if(D){var j=tt(D.endAngle-D.startAngle,E.endAngle-E.startAngle,S),A=yt(yt({},E),{},{startAngle:_+T,endAngle:_+j+T});w.push(A),_=A.endAngle}else{var{endAngle:P,startAngle:N}=E,M=tt(0,P-N,S),I=yt(yt({},E),{},{startAngle:_+T,endAngle:_+M+T});w.push(I),_=I.endAngle}}),n.current=w,O.createElement(Ot,null,O.createElement(UX,{sectors:w,activeShape:l,inactiveShape:c,allOtherPieProps:t}))}),O.createElement(YX,{showLabels:!m,sectors:r,props:t}),t.children)}var XX={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:!bo.isSsr,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff"};function QX(e){var{id:t}=e,n=sx(e,DX),{hide:r,className:i,rootTabIndex:o}=e,a=k.useMemo(()=>Eb(e.children,Vt),[e.children]),s=ce(u=>XG(u,t,a)),l=k.useRef(null),c=oe("recharts-pie",i);return r||s==null?(l.current=null,O.createElement(Ot,{tabIndex:o,className:c})):O.createElement(O.Fragment,null,O.createElement(Nh,{fn:IX,args:yt(yt({},e),{},{sectors:s})}),O.createElement(Ot,{tabIndex:o,className:c},O.createElement(GX,{props:yt(yt({},n),{},{sectors:s}),previousSectorsRef:l})))}function Mi(e){var t=Gt(e,XX),{id:n}=t,r=sx(t,AX),i=zr(r);return O.createElement(jh,{id:n,type:"pie"},o=>O.createElement(O.Fragment,null,O.createElement(kX,{type:"pie",id:o,data:r.data,dataKey:r.dataKey,hide:r.hide,angleAxisId:0,radiusAxisId:0,name:r.name,nameKey:r.nameKey,tooltipType:r.tooltipType,legendType:r.legendType,fill:r.fill,cx:r.cx,cy:r.cy,startAngle:r.startAngle,endAngle:r.endAngle,paddingAngle:r.paddingAngle,minAngle:r.minAngle,innerRadius:r.innerRadius,outerRadius:r.outerRadius,cornerRadius:r.cornerRadius,presentationProps:i,maxRadius:t.maxRadius}),O.createElement(RX,Xo({},r,{id:o})),O.createElement(QX,Xo({},r,{id:o}))))}Mi.displayName="Pie";function ME(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function NE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ME(Object(n),!0).forEach(function(r){ZX(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ME(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ZX(e,t,n){return(t=JX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function JX(e){var t=eQ(e,"string");return typeof t=="symbol"?t:t+""}function eQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tQ={xAxis:{},yAxis:{},zAxis:{}},tN=yr({name:"cartesianAxis",initialState:tQ,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:n,width:r}=t.payload;e.yAxis[n]&&(e.yAxis[n]=NE(NE({},e.yAxis[n]),{},{width:r}))}}}),{addXAxis:nQ,removeXAxis:rQ,addYAxis:iQ,removeYAxis:oQ,addZAxis:mfe,removeZAxis:gfe,updateYAxisWidth:aQ}=tN.actions,sQ=tN.reducer,lQ=W([qt],e=>{if(e)return{top:e.top,bottom:e.bottom,left:e.left,right:e.right}}),cQ=W([lQ,vo,yo],(e,t,n)=>{if(!(!e||t==null||n==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,n-e.top-e.bottom)}}),Rh=()=>ce(cQ),uQ=()=>ce($K);function jE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function RE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jE(Object(n),!0).forEach(function(r){dQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dQ(e,t,n){return(t=fQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fQ(e){var t=pQ(e,"string");return typeof t=="symbol"?t:t+""}function pQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var hQ=e=>{var{point:t,childIndex:n,mainColor:r,activeDot:i,dataKey:o}=e;if(i===!1||t.x==null||t.y==null)return null;var a=RE(RE({index:n,dataKey:o,cx:t.x,cy:t.y,r:4,fill:r??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},ct(i,!1)),Ob(i)),s;return k.isValidElement(i)?s=k.cloneElement(i,a):typeof i=="function"?s=i(a):s=O.createElement(Q0,a),O.createElement(Ot,{className:"recharts-active-dot"},s)};function vy(e){var{points:t,mainColor:n,activeDot:r,itemDataKey:i}=e,o=ce(Go),a=uQ();if(t==null||a==null)return null;var s=t.find(l=>a.includes(l.payload));return ht(s)?null:hQ({point:s,childIndex:Number(o),mainColor:n,dataKey:i,activeDot:r})}var mQ=process.env.NODE_ENV==="production",Yg="Invariant failed";function IE(e,t){if(mQ)throw new Error(Yg);var n=typeof t=="function"?t():t,r=n?"".concat(Yg,": ").concat(n):Yg;throw new Error(r)}var gQ=["x","y"];function yy(){return yy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yy.apply(null,arguments)}function LE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Vl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?LE(Object(n),!0).forEach(function(r){vQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):LE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function vQ(e,t,n){return(t=yQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function yQ(e){var t=bQ(e,"string");return typeof t=="symbol"?t:t+""}function bQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function xQ(e,t){if(e==null)return{};var n,r,i=wQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function wQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function _Q(e,t){var{x:n,y:r}=e,i=xQ(e,gQ),o="".concat(n),a=parseInt(o,10),s="".concat(r),l=parseInt(s,10),c="".concat(t.height||i.height),u=parseInt(c,10),d="".concat(t.width||i.width),f=parseInt(d,10);return Vl(Vl(Vl(Vl(Vl({},t),i),a?{x:a}:{}),l?{y:l}:{}),{},{height:u,width:f,name:t.name,radius:t.radius})}function lx(e){return O.createElement(ZM,yy({shapeType:"rectangle",propTransformer:_Q,activeClassName:"recharts-active-bar"},e))}var SQ=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(r,i)=>{if(pe(t))return t;var o=pe(r)||ht(r);return o?t(r,i):(o||(process.env.NODE_ENV!=="production"?IE(!1,"minPointSize callback function received a value with type of ".concat(typeof r,". Currently only numbers or null/undefined are supported.")):IE()),n)}},OQ={},nN=yr({name:"errorBars",initialState:OQ,reducers:{addErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]||(e[n]=[]),e[n].push(r)},replaceErrorBar:(e,t)=>{var{itemId:n,prev:r,next:i}=t.payload;e[n]&&(e[n]=e[n].map(o=>o.dataKey===r.dataKey&&o.direction===r.direction?i:o))},removeErrorBar:(e,t)=>{var{itemId:n,errorBar:r}=t.payload;e[n]&&(e[n]=e[n].filter(i=>i.dataKey!==r.dataKey||i.direction!==r.direction))}}}),{addErrorBar:vfe,replaceErrorBar:yfe,removeErrorBar:bfe}=nN.actions,EQ=nN.reducer,PQ=["children"];function kQ(e,t){if(e==null)return{};var n,r,i=CQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function CQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var DQ={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},AQ=k.createContext(DQ);function rN(e){var{children:t}=e,n=kQ(e,PQ);return O.createElement(AQ.Provider,{value:n},t)}function Ih(e,t){var n,r,i=ce(c=>Ai(c,e)),o=ce(c=>Ti(c,t)),a=(n=i?.allowDataOverflow)!==null&&n!==void 0?n:ir.allowDataOverflow,s=(r=o?.allowDataOverflow)!==null&&r!==void 0?r:or.allowDataOverflow,l=a||s;return{needClip:l,needClipX:a,needClipY:s}}function cx(e){var{xAxisId:t,yAxisId:n,clipPathId:r}=e,i=Rh(),{needClipX:o,needClipY:a,needClip:s}=Ih(t,n);if(!s)return null;var{x:l,y:c,width:u,height:d}=i;return O.createElement("clipPath",{id:"clipPath-".concat(r)},O.createElement("rect",{x:o?l:l-u/2,y:a?c:c-d/2,width:o?u:u*2,height:a?d:d*2}))}var TQ=["onMouseEnter","onMouseLeave","onClick"],MQ=["value","background","tooltipPosition"],NQ=["id"],jQ=["onMouseEnter","onClick","onMouseLeave"];function Qo(){return Qo=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qo.apply(null,arguments)}function FE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Nn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?FE(Object(n),!0).forEach(function(r){RQ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):FE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RQ(e,t,n){return(t=IQ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function IQ(e){var t=LQ(e,"string");return typeof t=="symbol"?t:t+""}function LQ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function np(e,t){if(e==null)return{};var n,r,i=FQ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function FQ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var $Q=e=>{var{dataKey:t,name:n,fill:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:ea(n,t),payload:e}]};function BQ(e){var{dataKey:t,stroke:n,strokeWidth:r,fill:i,name:o,hide:a,unit:s}=e;return{dataDefinedOnItem:void 0,positions:void 0,settings:{stroke:n,strokeWidth:r,fill:i,dataKey:t,nameKey:void 0,name:ea(o,t),hide:a,type:e.tooltipType,color:e.fill,unit:s}}}function WQ(e){var t=ce(Go),{data:n,dataKey:r,background:i,allOtherBarProps:o}=e,{onMouseEnter:a,onMouseLeave:s,onClick:l}=o,c=np(o,TQ),u=nx(a,r),d=rx(s),f=ix(l,r);if(!i||n==null)return null;var p=ct(i,!1);return O.createElement(O.Fragment,null,n.map((m,h)=>{var{value:g,background:b,tooltipPosition:S}=m,w=np(m,MQ);if(!b)return null;var x=u(m,h),_=d(m,h),E=f(m,h),C=Nn(Nn(Nn(Nn(Nn({option:i,isActive:String(h)===t},w),{},{fill:"#eee"},b),p),hu(c,m,h)),{},{onMouseEnter:x,onMouseLeave:_,onClick:E,dataKey:r,index:h,className:"recharts-bar-background-rectangle"});return O.createElement(lx,Qo({key:"background-bar-".concat(C.index)},C))}))}function zQ(e){var{showLabels:t,children:n,rects:r}=e,i=r?.map(o=>{var a={x:o.x,y:o.y,width:o.width,height:o.height};return Nn(Nn({},a),{},{value:o.value,payload:o.payload,parentViewBox:o.parentViewBox,viewBox:a,fill:o.fill})});return O.createElement(X0,{value:t?i:void 0},n)}function VQ(e){var{shape:t,activeBar:n,baseProps:r,entry:i,index:o,dataKey:a}=e,s=ce(Go),l=ce(EM),c=n&&String(o)===s&&(l==null||a===l),u=c?n:t;return O.createElement(lx,Qo({},r,i,{isActive:c,option:u,index:o,dataKey:a}))}function HQ(e){var{shape:t,baseProps:n,entry:r,index:i,dataKey:o}=e;return O.createElement(lx,Qo({},n,r,{isActive:!1,option:t,index:i,dataKey:o}))}function YQ(e){var{data:t,props:n}=e,r=zr(n),{id:i}=r,o=np(r,NQ),{shape:a,dataKey:s,activeBar:l}=n,{onMouseEnter:c,onClick:u,onMouseLeave:d}=n,f=np(n,jQ),p=nx(c,s),m=rx(d),h=ix(u,s);return t?O.createElement(O.Fragment,null,t.map((g,b)=>O.createElement(Ot,Qo({className:"recharts-bar-rectangle"},hu(f,g,b),{onMouseEnter:p(g,b),onMouseLeave:m(g,b),onClick:h(g,b),key:"rectangle-".concat(g?.x,"-").concat(g?.y,"-").concat(g?.value,"-").concat(b)}),l?O.createElement(VQ,{shape:a,activeBar:l,baseProps:o,entry:g,index:b,dataKey:s}):O.createElement(HQ,{shape:a,baseProps:o,entry:g,index:b,dataKey:s})))):null}function UQ(e){var{props:t,previousRectanglesRef:n}=e,{data:r,layout:i,isAnimationActive:o,animationBegin:a,animationDuration:s,animationEasing:l,onAnimationEnd:c,onAnimationStart:u}=t,d=n.current,f=fl(t,"recharts-bar-"),[p,m]=k.useState(!1),h=!p,g=k.useCallback(()=>{typeof c=="function"&&c(),m(!1)},[c]),b=k.useCallback(()=>{typeof u=="function"&&u(),m(!0)},[u]);return O.createElement(zQ,{showLabels:h,rects:r},O.createElement(dl,{animationId:f,begin:a,duration:s,isActive:o,easing:l,onAnimationEnd:g,onAnimationStart:b,key:f},S=>{var w=S===1?r:r?.map((x,_)=>{var E=d&&d[_];if(E)return Nn(Nn({},x),{},{x:tt(E.x,x.x,S),y:tt(E.y,x.y,S),width:tt(E.width,x.width,S),height:tt(E.height,x.height,S)});if(i==="horizontal"){var C=tt(0,x.height,S);return Nn(Nn({},x),{},{y:x.y+x.height-C,height:C})}var D=tt(0,x.width,S);return Nn(Nn({},x),{},{width:D})});return S>0&&(n.current=w??null),w==null?null:O.createElement(Ot,null,O.createElement(YQ,{props:t,data:w}))}),O.createElement(Mh,{label:t.label}),t.children)}function KQ(e){var t=k.useRef(null);return O.createElement(UQ,{previousRectanglesRef:t,props:e})}var iN=0,qQ=(e,t)=>{var n=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:n,errorVal:nt(e,t)}};class GQ extends k.PureComponent{render(){var{hide:t,data:n,dataKey:r,className:i,xAxisId:o,yAxisId:a,needClip:s,background:l,id:c}=this.props;if(t||n==null)return null;var u=oe("recharts-bar",i),d=c;return O.createElement(Ot,{className:u,id:c},s&&O.createElement("defs",null,O.createElement(cx,{clipPathId:d,xAxisId:o,yAxisId:a})),O.createElement(Ot,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(d,")"):void 0},O.createElement(WQ,{data:n,dataKey:r,background:l,allOtherBarProps:this.props}),O.createElement(KQ,this.props)))}}var XQ={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",hide:!1,isAnimationActive:!bo.isSsr,legendType:"rect",minPointSize:iN,xAxisId:0,yAxisId:0};function QQ(e){var{xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u}=e,{needClip:d}=Ih(t,n),f=xu(),p=mn(),m=Eb(e.children,Vt),h=ce(S=>EZ(S,t,n,p,e.id,m));if(f!=="vertical"&&f!=="horizontal")return null;var g,b=h?.[0];return b==null||b.height==null||b.width==null?g=0:g=f==="vertical"?b.height/2:b.width/2,O.createElement(rN,{xAxisId:t,yAxisId:n,data:h,dataPointFormatter:qQ,errorBarOffset:g},O.createElement(GQ,Qo({},e,{layout:f,needClip:d,data:h,xAxisId:t,yAxisId:n,hide:r,legendType:i,minPointSize:o,activeBar:a,animationBegin:s,animationDuration:l,animationEasing:c,isAnimationActive:u})))}function ZQ(e){var{layout:t,barSettings:{dataKey:n,minPointSize:r},pos:i,bandSize:o,xAxis:a,yAxis:s,xAxisTicks:l,yAxisTicks:c,stackedData:u,displayedData:d,offset:f,cells:p,parentViewBox:m}=e,h=t==="horizontal"?s:a,g=u?h.scale.domain():null,b=h7({numericAxis:h});return d.map((S,w)=>{var x,_,E,C,D,T;u?x=c7(u[w],g):(x=nt(S,n),Array.isArray(x)||(x=[b,x]));var j=SQ(r,iN)(x[1],w);if(t==="horizontal"){var A,[P,N]=[s.scale(x[0]),s.scale(x[1])];_=_S({axis:a,ticks:l,bandSize:o,offset:i.offset,entry:S,index:w}),E=(A=N??P)!==null&&A!==void 0?A:void 0,C=i.size;var M=P-N;if(D=Cn(M)?0:M,T={x:_,y:f.top,width:C,height:f.height},Math.abs(j)>0&&Math.abs(D)<Math.abs(j)){var I=nn(D||j)*(Math.abs(j)-Math.abs(D));E-=I,D+=I}}else{var[L,$]=[a.scale(x[0]),a.scale(x[1])];if(_=L,E=_S({axis:s,ticks:c,bandSize:o,offset:i.offset,entry:S,index:w}),C=$-L,D=i.size,T={x:f.left,y:E,width:f.width,height:D},Math.abs(j)>0&&Math.abs(C)<Math.abs(j)){var V=nn(C||j)*(Math.abs(j)-Math.abs(C));C+=V}}if(_==null||E==null||C==null||D==null)return null;var z=Nn(Nn({},S),{},{x:_,y:E,width:C,height:D,value:u?x:x[1],payload:S,background:T,tooltipPosition:{x:_+C/2,y:E+D/2},parentViewBox:m},p&&p[w]&&p[w].props);return z}).filter(Boolean)}function JQ(e){var t=Gt(e,XQ),n=mn();return O.createElement(jh,{id:t.id,type:"bar"},r=>O.createElement(O.Fragment,null,O.createElement(ox,{legendPayload:$Q(t)}),O.createElement(Nh,{fn:BQ,args:t}),O.createElement(ax,{type:"bar",id:r,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:dA(t.stackId),hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:n}),O.createElement(QQ,Qo({},t,{id:r}))))}var jn=O.memo(JQ);jn.displayName="Bar";function $E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function yd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$E(Object(n),!0).forEach(function(r){eZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$E(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function eZ(e,t,n){return(t=tZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tZ(e){var t=nZ(e,"string");return typeof t=="symbol"?t:t+""}function nZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var rZ=(e,t)=>t,iZ=(e,t,n)=>n,oZ=(e,t,n,r)=>r,aZ=(e,t,n,r,i)=>i,ju=W([Du,aZ],(e,t)=>e.filter(n=>n.type==="bar").find(n=>n.id===t)),sZ=W([ju],e=>e?.maxBarSize),lZ=(e,t,n,r,i,o)=>o,BE=(e,t,n)=>{var r=n??e;if(!ht(r))return kn(r,t,0)},cZ=W([Ee,Du,rZ,iZ,oZ],(e,t,n,r,i)=>t.filter(o=>e==="horizontal"?o.xAxisId===n:o.yAxisId===r).filter(o=>o.isPanorama===i).filter(o=>o.hide===!1).filter(o=>o.type==="bar")),uZ=(e,t,n,r)=>{var i=Ee(e);return i==="horizontal"?zc(e,"yAxis",n,r):zc(e,"xAxis",t,r)},dZ=(e,t,n)=>{var r=Ee(e);return r==="horizontal"?$O(e,"xAxis",t):$O(e,"yAxis",n)},fZ=(e,t,n)=>{var r={},i=e.filter(Oh),o=e.filter(c=>c.stackId==null),a=i.reduce((c,u)=>(c[u.stackId]||(c[u.stackId]=[]),c[u.stackId].push(u),c),r),s=Object.entries(a).map(c=>{var[u,d]=c,f=d.map(m=>m.dataKey),p=BE(t,n,d[0].barSize);return{stackId:u,dataKeys:f,barSize:p}}),l=o.map(c=>{var u=[c.dataKey].filter(f=>f!=null),d=BE(t,n,c.barSize);return{stackId:void 0,dataKeys:u,barSize:d}});return[...s,...l]},pZ=W([cZ,q9,dZ],fZ),hZ=(e,t,n,r,i)=>{var o,a,s=ju(e,t,n,r,i);if(s!=null){var l=Ee(e),c=ST(e),{maxBarSize:u}=s,d=ht(u)?c:u,f,p;return l==="horizontal"?(f=Pi(e,"xAxis",t,r),p=Ei(e,"xAxis",t,r)):(f=Pi(e,"yAxis",n,r),p=Ei(e,"yAxis",n,r)),(o=(a=Xa(f,p,!0))!==null&&a!==void 0?a:d)!==null&&o!==void 0?o:0}},oN=(e,t,n,r)=>{var i=Ee(e),o,a;return i==="horizontal"?(o=Pi(e,"xAxis",t,r),a=Ei(e,"xAxis",t,r)):(o=Pi(e,"yAxis",n,r),a=Ei(e,"yAxis",n,r)),Xa(o,a)};function mZ(e,t,n,r,i){var o=r.length;if(!(o<1)){var a=kn(e,n,0,!0),s,l=[];if(dn(r[0].barSize)){var c=!1,u=n/o,d=r.reduce((b,S)=>b+(S.barSize||0),0);d+=(o-1)*a,d>=n&&(d-=(o-1)*a,a=0),d>=n&&u>0&&(c=!0,u*=.9,d=o*u);var f=(n-d)/2>>0,p={offset:f-a,size:0};s=r.reduce((b,S)=>{var w,x={stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:p.offset+p.size+a,size:c?u:(w=S.barSize)!==null&&w!==void 0?w:0}},_=[...b,x];return p=_[_.length-1].position,_},l)}else{var m=kn(t,n,0,!0);n-2*m-(o-1)*a<=0&&(a=0);var h=(n-2*m-(o-1)*a)/o;h>1&&(h>>=0);var g=dn(i)?Math.min(h,i):h;s=r.reduce((b,S,w)=>[...b,{stackId:S.stackId,dataKeys:S.dataKeys,position:{offset:m+(h+a)*w+(h-g)/2,size:g}}],l)}return s}}var gZ=(e,t,n,r,i,o,a)=>{var s=ht(a)?t:a,l=mZ(n,r,i!==o?i:o,e,s);return i!==o&&l!=null&&(l=l.map(c=>yd(yd({},c),{},{position:yd(yd({},c.position),{},{offset:c.position.offset-i/2})}))),l},vZ=W([pZ,ST,K9,OT,hZ,oN,sZ],gZ),yZ=(e,t,n,r)=>Pi(e,"xAxis",t,r),bZ=(e,t,n,r)=>Pi(e,"yAxis",n,r),xZ=(e,t,n,r)=>Ei(e,"xAxis",t,r),wZ=(e,t,n,r)=>Ei(e,"yAxis",n,r),_Z=W([vZ,ju],(e,t)=>{if(!(e==null||t==null)){var n=e.find(r=>r.stackId===t.stackId&&t.dataKey!=null&&r.dataKeys.includes(t.dataKey));if(n!=null)return n.position}}),SZ=(e,t)=>{var n=Sh(t);if(!(!e||n==null||t==null)){var{stackId:r}=t;if(r!=null){var i=e[r];if(i){var{stackedData:o}=i;if(o)return o.find(a=>a.key===n)}}}},OZ=W([uZ,ju],SZ),EZ=W([qt,Wb,yZ,bZ,xZ,wZ,_Z,Ee,Eu,oN,OZ,ju,lZ],(e,t,n,r,i,o,a,s,l,c,u,d,f)=>{var{chartData:p,dataStartIndex:m,dataEndIndex:h}=l;if(!(d==null||a==null||t==null||s!=="horizontal"&&s!=="vertical"||n==null||r==null||i==null||o==null||c==null)){var{data:g}=d,b;if(g!=null&&g.length>0?b=g:b=p?.slice(m,h+1),b!=null)return ZQ({layout:s,barSettings:d,pos:a,parentViewBox:t,bandSize:c,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,stackedData:u,displayedData:b,offset:e,cells:f})}}),aN=e=>{var{chartData:t}=e,n=xt(),r=mn();return k.useEffect(()=>r?()=>{}:(n(GO(t)),()=>{n(GO(void 0))}),[t,n,r]),null},WE={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},sN=yr({name:"brush",initialState:WE,reducers:{setBrushSettings(e,t){return t.payload==null?WE:t.payload}}}),{setBrushSettings:xfe}=sN.actions,PZ=sN.reducer;function zE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zE(Object(n),!0).forEach(function(r){lN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function lN(e,t,n){return(t=kZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function kZ(e){var t=CZ(e,"string");return typeof t=="symbol"?t:t+""}function CZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var DZ=(e,t)=>{var{x:n,y:r}=e,{x:i,y:o}=t;return{x:Math.min(n,i),y:Math.min(r,o),width:Math.abs(i-n),height:Math.abs(o-r)}},AZ=e=>{var{x1:t,y1:n,x2:r,y2:i}=e;return DZ({x:t,y:n},{x:r,y:i})};class Lh{static create(t){return new Lh(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:n,position:r}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t!==void 0){if(r)switch(r){case"start":return this.scale(t);case"middle":{var i=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+i}case"end":{var o=this.bandwidth?this.bandwidth():0;return this.scale(t)+o}default:return this.scale(t)}if(n){var a=this.bandwidth?this.bandwidth()/2:0;return this.scale(t)+a}return this.scale(t)}}isInRange(t){var n=this.range(),r=n[0],i=n[n.length-1];return r<=i?t>=r&&t<=i:t>=i&&t<=r}}lN(Lh,"EPS",1e-4);var TZ=e=>{var t=Object.keys(e).reduce((n,r)=>bd(bd({},n),{},{[r]:Lh.create(e[r])}),{});return bd(bd({},t),{},{apply(n){var{bandAware:r,position:i}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return Object.fromEntries(Object.entries(n).map(o=>{var[a,s]=o;return[a,t[a].apply(s,{bandAware:r,position:i})]}))},isInRange(n){return Object.keys(n).every(r=>t[r].isInRange(n[r]))}})};function MZ(e){return(e%180+180)%180}var NZ=function(t){var{width:n,height:r}=t,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=MZ(i),a=o*Math.PI/180,s=Math.atan(r/n),l=a>s&&a<Math.PI-s?r/Math.sin(a):n/Math.cos(a);return Math.abs(l)},jZ={dots:[],areas:[],lines:[]},cN=yr({name:"referenceElements",initialState:jZ,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var n=eo(e).dots.findIndex(r=>r===t.payload);n!==-1&&e.dots.splice(n,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var n=eo(e).areas.findIndex(r=>r===t.payload);n!==-1&&e.areas.splice(n,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var n=eo(e).lines.findIndex(r=>r===t.payload);n!==-1&&e.lines.splice(n,1)}}}),{addDot:wfe,removeDot:_fe,addArea:Sfe,removeArea:Ofe,addLine:RZ,removeLine:IZ}=cN.actions,LZ=cN.reducer,uN=k.createContext(void 0),FZ=e=>{var{children:t}=e,[n]=k.useState("".concat(Nc("recharts"),"-clip")),r=Rh();if(r==null)return null;var{x:i,y:o,width:a,height:s}=r;return O.createElement(uN.Provider,{value:n},O.createElement("defs",null,O.createElement("clipPath",{id:n},O.createElement("rect",{x:i,y:o,height:s,width:a}))),t)},$Z=()=>k.useContext(uN);function VE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function HE(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?VE(Object(n),!0).forEach(function(r){ux(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):VE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function ux(e,t,n){return(t=BZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BZ(e){var t=WZ(e,"string");return typeof t=="symbol"?t:t+""}function WZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function by(){return by=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},by.apply(null,arguments)}var zZ=(e,t)=>{var n;return O.isValidElement(e)?n=O.cloneElement(e,t):typeof e=="function"?n=e(t):n=O.createElement("line",by({},t,{className:"recharts-reference-line-line"})),n},VZ=(e,t,n,r,i,o,a,s,l)=>{var{x:c,y:u,width:d,height:f}=i;if(n){var{y:p}=l,m=e.y.apply(p,{position:o});if(Cn(m)||l.ifOverflow==="discard"&&!e.y.isInRange(m))return null;var h=[{x:c+d,y:m},{x:c,y:m}];return s==="left"?h.reverse():h}if(t){var{x:g}=l,b=e.x.apply(g,{position:o});if(Cn(b)||l.ifOverflow==="discard"&&!e.x.isInRange(b))return null;var S=[{x:b,y:u+f},{x:b,y:u}];return a==="top"?S.reverse():S}if(r){var{segment:w}=l,x=w.map(_=>e.apply(_,{position:o}));return l.ifOverflow==="discard"&&x.some(_=>!e.isInRange(_))?null:x}return null};function HZ(e){var t=xt();return k.useEffect(()=>(t(RZ(e)),()=>{t(IZ(e))})),null}function YZ(e){var{x:t,y:n,segment:r,xAxisId:i,yAxisId:o,shape:a,className:s,ifOverflow:l}=e,c=mn(),u=$Z(),d=ce(A=>Ai(A,i)),f=ce(A=>Ti(A,o)),p=ce(A=>qo(A,"xAxis",i,c)),m=ce(A=>qo(A,"yAxis",o,c)),h=fh(),g=jr(t),b=jr(n);if(!u||!h||d==null||f==null||p==null||m==null)return null;var S=TZ({x:p,y:m}),w=r&&r.length===2,x=VZ(S,g,b,w,h,e.position,d.orientation,f.orientation,e);if(!x)return null;var[{x:_,y:E},{x:C,y:D}]=x,T=l==="hidden"?"url(#".concat(u,")"):void 0,j=HE(HE({clipPath:T},ct(e,!0)),{},{x1:_,y1:E,x2:C,y2:D});return O.createElement(Ot,{className:oe("recharts-reference-line",s)},zZ(a,j),O.createElement(zM,AZ({x1:_,y1:E,x2:C,y2:D}),O.createElement(YM,{label:e.label}),e.children))}function UZ(e){return O.createElement(O.Fragment,null,O.createElement(HZ,{yAxisId:e.yAxisId,xAxisId:e.xAxisId,ifOverflow:e.ifOverflow,x:e.x,y:e.y}),O.createElement(YZ,e))}class dx extends k.Component{render(){return O.createElement(UZ,this.props)}}ux(dx,"displayName","ReferenceLine");ux(dx,"defaultProps",{ifOverflow:"discard",xAxisId:0,yAxisId:0,fill:"none",stroke:"#ccc",fillOpacity:1,strokeWidth:1,position:"middle"});function tl(e,t){for(var n in e)if({}.hasOwnProperty.call(e,n)&&(!{}.hasOwnProperty.call(t,n)||e[n]!==t[n]))return!1;for(var r in t)if({}.hasOwnProperty.call(t,r)&&!{}.hasOwnProperty.call(e,r))return!1;return!0}function dN(e,t,n){if(t<1)return[];if(t===1&&n===void 0)return e;for(var r=[],i=0;i<e.length;i+=t)r.push(e[i]);return r}function KZ(e,t,n){var r={width:e.width+t.width,height:e.height+t.height};return NZ(r,n)}function qZ(e,t,n){var r=n==="width",{x:i,y:o,width:a,height:s}=e;return t===1?{start:r?i:o,end:r?i+a:o+s}:{start:r?i+a:o+s,end:r?i:o}}function rp(e,t,n,r,i){if(e*t<e*r||e*t>e*i)return!1;var o=n();return e*(t-e*o/2-r)>=0&&e*(t+e*o/2-i)<=0}function GZ(e,t){return dN(e,t+1)}function XZ(e,t,n,r,i){for(var o=(r||[]).slice(),{start:a,end:s}=t,l=0,c=1,u=a,d=function(){var m=r?.[l];if(m===void 0)return{v:dN(r,c)};var h=l,g,b=()=>(g===void 0&&(g=n(m,h)),g),S=m.coordinate,w=l===0||rp(e,S,b,u,s);w||(l=0,u=a,c+=1),w&&(u=S+e*(b()/2+i),l+=c)},f;c<=o.length;)if(f=d(),f)return f.v;return[]}function YE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function xn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?YE(Object(n),!0).forEach(function(r){QZ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):YE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function QZ(e,t,n){return(t=ZZ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ZZ(e){var t=JZ(e,"string");return typeof t=="symbol"?t:t+""}function JZ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eJ(e,t,n,r,i){for(var o=(r||[]).slice(),a=o.length,{start:s}=t,{end:l}=t,c=function(f){var p=o[f],m,h=()=>(m===void 0&&(m=n(p,f)),m);if(f===a-1){var g=e*(p.coordinate+e*h()/2-l);o[f]=p=xn(xn({},p),{},{tickCoord:g>0?p.coordinate-g*e:p.coordinate})}else o[f]=p=xn(xn({},p),{},{tickCoord:p.coordinate});var b=rp(e,p.tickCoord,h,s,l);b&&(l=p.tickCoord-e*(h()/2+i),o[f]=xn(xn({},p),{},{isShow:!0}))},u=a-1;u>=0;u--)c(u);return o}function tJ(e,t,n,r,i,o){var a=(r||[]).slice(),s=a.length,{start:l,end:c}=t;if(o){var u=r[s-1],d=n(u,s-1),f=e*(u.coordinate+e*d/2-c);a[s-1]=u=xn(xn({},u),{},{tickCoord:f>0?u.coordinate-f*e:u.coordinate});var p=rp(e,u.tickCoord,()=>d,l,c);p&&(c=u.tickCoord-e*(d/2+i),a[s-1]=xn(xn({},u),{},{isShow:!0}))}for(var m=o?s-1:s,h=function(S){var w=a[S],x,_=()=>(x===void 0&&(x=n(w,S)),x);if(S===0){var E=e*(w.coordinate-e*_()/2-l);a[S]=w=xn(xn({},w),{},{tickCoord:E<0?w.coordinate-E*e:w.coordinate})}else a[S]=w=xn(xn({},w),{},{tickCoord:w.coordinate});var C=rp(e,w.tickCoord,_,l,c);C&&(l=w.tickCoord+e*(_()/2+i),a[S]=xn(xn({},w),{},{isShow:!0}))},g=0;g<m;g++)h(g);return a}function fx(e,t,n){var{tick:r,ticks:i,viewBox:o,minTickGap:a,orientation:s,interval:l,tickFormatter:c,unit:u,angle:d}=e;if(!i||!i.length||!r)return[];if(pe(l)||bo.isSsr){var f;return(f=GZ(i,pe(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],m=s==="top"||s==="bottom"?"width":"height",h=u&&m==="width"?mc(u,{fontSize:t,letterSpacing:n}):{width:0,height:0},g=(w,x)=>{var _=typeof c=="function"?c(w.value,x):w.value;return m==="width"?KZ(mc(_,{fontSize:t,letterSpacing:n}),h,d):mc(_,{fontSize:t,letterSpacing:n})[m]},b=i.length>=2?nn(i[1].coordinate-i[0].coordinate):1,S=qZ(o,b,m);return l==="equidistantPreserveStart"?XZ(b,S,g,i,a):(l==="preserveStart"||l==="preserveStartEnd"?p=tJ(b,S,g,i,a,l==="preserveStartEnd"):p=eJ(b,S,g,i,a),p.filter(w=>w.isShow))}var nJ=e=>{var{ticks:t,label:n,labelGapWithTick:r=5,tickSize:i=0,tickMargin:o=0}=e,a=0;if(t){t.forEach(u=>{if(u){var d=u.getBoundingClientRect();d.width>a&&(a=d.width)}});var s=n?n.getBoundingClientRect().width:0,l=i+o,c=a+l+s+(n?r:0);return Math.round(c)}return 0},rJ=["axisLine","width","height","className","hide","ticks"],iJ=["viewBox"],oJ=["viewBox"];function xy(e,t){if(e==null)return{};var n,r,i=aJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function aJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Za(){return Za=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Za.apply(null,arguments)}function UE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Ut(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?UE(Object(n),!0).forEach(function(r){sJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):UE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sJ(e,t,n){return(t=lJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function lJ(e){var t=cJ(e,"string");return typeof t=="symbol"?t:t+""}function cJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var px={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 uJ(e){var{x:t,y:n,width:r,height:i,orientation:o,mirror:a,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var c=Ut(Ut(Ut({},l),ct(s,!1)),{},{fill:"none"});if(o==="top"||o==="bottom"){var u=+(o==="top"&&!a||o==="bottom"&&a);c=Ut(Ut({},c),{},{x1:t,y1:n+u*i,x2:t+r,y2:n+u*i})}else{var d=+(o==="left"&&!a||o==="right"&&a);c=Ut(Ut({},c),{},{x1:t+d*r,y1:n,x2:t+d*r,y2:n+i})}return O.createElement("line",Za({},c,{className:oe("recharts-cartesian-axis-line",Ka(s,"className"))}))}function dJ(e,t,n,r,i,o,a,s,l){var c,u,d,f,p,m,h=s?-1:1,g=e.tickSize||a,b=pe(e.tickCoord)?e.tickCoord:e.coordinate;switch(o){case"top":c=u=e.coordinate,f=n+ +!s*i,d=f-h*g,m=d-h*l,p=b;break;case"left":d=f=e.coordinate,u=t+ +!s*r,c=u-h*g,p=c-h*l,m=b;break;case"right":d=f=e.coordinate,u=t+ +s*r,c=u+h*g,p=c+h*l,m=b;break;default:c=u=e.coordinate,f=n+ +s*i,d=f+h*g,m=d+h*l,p=b;break}return{line:{x1:c,y1:d,x2:u,y2:f},tick:{x:p,y:m}}}function fJ(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function pJ(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function hJ(e){var{option:t,tickProps:n,value:r}=e,i,o=oe(n.className,"recharts-cartesian-axis-tick-value");if(O.isValidElement(t))i=O.cloneElement(t,Ut(Ut({},n),{},{className:o}));else if(typeof t=="function")i=t(Ut(Ut({},n),{},{className:o}));else{var a="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(a=oe(a,t?.className)),i=O.createElement(Th,Za({},n,{className:a}),r)}return i}function mJ(e){var{ticks:t=[],tick:n,tickLine:r,stroke:i,tickFormatter:o,unit:a,padding:s,tickTextProps:l,orientation:c,mirror:u,x:d,y:f,width:p,height:m,tickSize:h,tickMargin:g,fontSize:b,letterSpacing:S,getTicksConfig:w,events:x}=e,_=fx(Ut(Ut({},w),{},{ticks:t}),b,S),E=fJ(c,u),C=pJ(c,u),D=zr(w),T=ct(n,!1),j=Ut(Ut({},D),{},{fill:"none"},ct(r,!1)),A=_.map((P,N)=>{var{line:M,tick:I}=dJ(P,d,f,p,m,c,h,u,g),L=Ut(Ut(Ut(Ut({textAnchor:E,verticalAnchor:C},D),{},{stroke:"none",fill:i},T),I),{},{index:N,payload:P,visibleTicksCount:_.length,tickFormatter:o,padding:s},l);return O.createElement(Ot,Za({className:"recharts-cartesian-axis-tick",key:"tick-".concat(P.value,"-").concat(P.coordinate,"-").concat(P.tickCoord)},hu(x,P,N)),r&&O.createElement("line",Za({},j,M,{className:oe("recharts-cartesian-axis-tick-line",Ka(r,"className"))})),n&&O.createElement(hJ,{option:n,tickProps:L,value:"".concat(typeof o=="function"?o(P.value,N):P.value).concat(a||"")}))});return A.length>0?O.createElement("g",{className:"recharts-cartesian-axis-ticks"},A):null}var gJ=k.forwardRef((e,t)=>{var{axisLine:n,width:r,height:i,className:o,hide:a,ticks:s}=e,l=xy(e,rJ),[c,u]=k.useState(""),[d,f]=k.useState(""),p=k.useRef([]);k.useImperativeHandle(t,()=>({getCalculatedWidth:()=>{var h;return nJ({ticks:p.current,label:(h=e.labelRef)===null||h===void 0?void 0:h.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var m=k.useCallback(h=>{if(h){var g=h.getElementsByClassName("recharts-cartesian-axis-tick-value");p.current=Array.from(g);var b=g[0];if(b){var S=window.getComputedStyle(b),w=S.fontSize,x=S.letterSpacing;(w!==c||x!==d)&&(u(w),f(x))}}},[c,d]);return a||r!=null&&r<=0||i!=null&&i<=0?null:O.createElement(Ot,{className:oe("recharts-cartesian-axis",o),ref:m},O.createElement(uJ,{x:e.x,y:e.y,width:r,height:i,orientation:e.orientation,mirror:e.mirror,axisLine:n,otherSvgProps:zr(e)}),O.createElement(mJ,{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:d,getTicksConfig:e,events:l}),O.createElement(zM,{x:e.x,y:e.y,width:e.width,height:e.height},O.createElement(YM,{label:e.label}),e.children))}),vJ=O.memo(gJ,(e,t)=>{var{viewBox:n}=e,r=xy(e,iJ),{viewBox:i}=t,o=xy(t,oJ);return tl(n,i)&&tl(r,o)}),hx=O.forwardRef((e,t)=>{var n=Gt(e,px);return O.createElement(vJ,Za({},n,{ref:t}))});hx.displayName="CartesianAxis";var yJ=["x1","y1","x2","y2","key"],bJ=["offset"],xJ=["xAxisId","yAxisId"],wJ=["xAxisId","yAxisId"];function KE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Sn(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?KE(Object(n),!0).forEach(function(r){_J(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):KE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function _J(e,t,n){return(t=SJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function SJ(e){var t=OJ(e,"string");return typeof t=="symbol"?t:t+""}function OJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ja(){return ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ja.apply(null,arguments)}function ip(e,t){if(e==null)return{};var n,r,i=EJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function EJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var PJ=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:n,x:r,y:i,width:o,height:a,ry:s}=e;return O.createElement("rect",{x:r,y:i,ry:s,width:o,height:a,stroke:"none",fill:t,fillOpacity:n,className:"recharts-cartesian-grid-bg"})};function fN(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var{x1:r,y1:i,x2:o,y2:a,key:s}=t,l=ip(t,yJ),c=zr(l),{offset:u}=c,d=ip(c,bJ);n=O.createElement("line",ja({},d,{x1:r,y1:i,x2:o,y2:a,fill:"none",key:s}))}return n}function kJ(e){var{x:t,width:n,horizontal:r=!0,horizontalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,xJ),l=i.map((c,u)=>{var d=Sn(Sn({},s),{},{x1:t,y1:c,x2:t+n,y2:c,key:"line-".concat(u),index:u});return fN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function CJ(e){var{y:t,height:n,vertical:r=!0,verticalPoints:i}=e;if(!r||!i||!i.length)return null;var{xAxisId:o,yAxisId:a}=e,s=ip(e,wJ),l=i.map((c,u)=>{var d=Sn(Sn({},s),{},{x1:c,y1:t,x2:c,y2:t+n,key:"line-".concat(u),index:u});return fN(r,d)});return O.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function DJ(e){var{horizontalFill:t,fillOpacity:n,x:r,y:i,width:o,height:a,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length)return null;var c=s.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%t.length;return O.createElement("rect",{key:"react-".concat(f),y:d,x:r,height:m,width:o,stroke:"none",fill:t[h],fillOpacity:n,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},u)}function AJ(e){var{vertical:t=!0,verticalFill:n,fillOpacity:r,x:i,y:o,width:a,height:s,verticalPoints:l}=e;if(!t||!n||!n.length)return null;var c=l.map(d=>Math.round(d+i-i)).sort((d,f)=>d-f);i!==c[0]&&c.unshift(0);var u=c.map((d,f)=>{var p=!c[f+1],m=p?i+a-d:c[f+1]-d;if(m<=0)return null;var h=f%n.length;return O.createElement("rect",{key:"react-".concat(f),x:d,y:o,width:m,height:s,stroke:"none",fill:n[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return O.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},u)}var TJ=(e,t)=>{var{xAxis:n,width:r,height:i,offset:o}=e;return cA(fx(Sn(Sn(Sn({},px),n),{},{ticks:uA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.left,o.left+o.width,t)},MJ=(e,t)=>{var{yAxis:n,width:r,height:i,offset:o}=e;return cA(fx(Sn(Sn(Sn({},px),n),{},{ticks:uA(n),viewBox:{x:0,y:0,width:r,height:i}})),o.top,o.top+o.height,t)},NJ={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0};function Hr(e){var t=zb(),n=Vb(),r=mA(),i=Sn(Sn({},Gt(e,NJ)),{},{x:pe(e.x)?e.x:r.left,y:pe(e.y)?e.y:r.top,width:pe(e.width)?e.width:r.width,height:pe(e.height)?e.height:r.height}),{xAxisId:o,yAxisId:a,x:s,y:l,width:c,height:u,syncWithTicks:d,horizontalValues:f,verticalValues:p}=i,m=mn(),h=ce(T=>BO(T,"xAxis",o,m)),g=ce(T=>BO(T,"yAxis",a,m));if(!pe(c)||c<=0||!pe(u)||u<=0||!pe(s)||s!==+s||!pe(l)||l!==+l)return null;var b=i.verticalCoordinatesGenerator||TJ,S=i.horizontalCoordinatesGenerator||MJ,{horizontalPoints:w,verticalPoints:x}=i;if((!w||!w.length)&&typeof S=="function"){var _=f&&f.length,E=S({yAxis:g?Sn(Sn({},g),{},{ticks:_?f:g.ticks}):void 0,width:t,height:n,offset:r},_?!0:d);hc(Array.isArray(E),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof E,"]")),Array.isArray(E)&&(w=E)}if((!x||!x.length)&&typeof b=="function"){var C=p&&p.length,D=b({xAxis:h?Sn(Sn({},h),{},{ticks:C?p:h.ticks}):void 0,width:t,height:n,offset:r},C?!0:d);hc(Array.isArray(D),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof D,"]")),Array.isArray(D)&&(x=D)}return O.createElement("g",{className:"recharts-cartesian-grid"},O.createElement(PJ,{fill:i.fill,fillOpacity:i.fillOpacity,x:i.x,y:i.y,width:i.width,height:i.height,ry:i.ry}),O.createElement(DJ,ja({},i,{horizontalPoints:w})),O.createElement(AJ,ja({},i,{verticalPoints:x})),O.createElement(kJ,ja({},i,{offset:r,horizontalPoints:w,xAxis:h,yAxis:g})),O.createElement(CJ,ja({},i,{offset:r,verticalPoints:x,xAxis:h,yAxis:g})))}Hr.displayName="CartesianGrid";var pN=(e,t,n,r)=>Pi(e,"xAxis",t,r),hN=(e,t,n,r)=>Ei(e,"xAxis",t,r),mN=(e,t,n,r)=>Pi(e,"yAxis",n,r),gN=(e,t,n,r)=>Ei(e,"yAxis",n,r),jJ=W([Ee,pN,mN,hN,gN],(e,t,n,r,i)=>Di(e,"xAxis")?Xa(t,r,!1):Xa(n,i,!1)),RJ=(e,t,n,r,i)=>i;function IJ(e){return e.type==="line"}var LJ=W([Du,RJ],(e,t)=>e.filter(IJ).find(n=>n.id===t)),FJ=W([Ee,pN,mN,hN,gN,LJ,jJ,Eu],(e,t,n,r,i,o,a,s)=>{var{chartData:l,dataStartIndex:c,dataEndIndex:u}=s;if(!(o==null||t==null||n==null||r==null||i==null||r.length===0||i.length===0||a==null)){var{dataKey:d,data:f}=o,p;if(f!=null&&f.length>0?p=f:p=l?.slice(c,u+1),p!=null)return aee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataKey:d,bandSize:a,displayedData:p})}}),$J=["id"],BJ=["type","layout","connectNulls","needClip"],WJ=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function qE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function cr(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?qE(Object(n),!0).forEach(function(r){zJ(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function zJ(e,t,n){return(t=VJ(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function VJ(e){var t=HJ(e,"string");return typeof t=="symbol"?t:t+""}function HJ(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mx(e,t){if(e==null)return{};var n,r,i=YJ(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function YJ(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ja.apply(null,arguments)}var UJ=e=>{var{dataKey:t,name:n,stroke:r,legendType:i,hide:o}=e;return[{inactive:o,dataKey:t,type:i,color:r,value:ea(n,t),payload:e}]};function KJ(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:ea(a,t),hide:s,type:e.tooltipType,color:e.stroke,unit:l}}}var vN=(e,t)=>"".concat(t,"px ").concat(e-t,"px");function qJ(e,t){for(var n=e.length%2!==0?[...e,0]:e,r=[],i=0;i<t;++i)r=[...r,...n];return r}var GJ=(e,t,n)=>{var r=n.reduce((d,f)=>d+f);if(!r)return vN(t,e);for(var i=Math.floor(e/r),o=e%r,a=t-e,s=[],l=0,c=0;l<n.length;c+=n[l],++l)if(c+n[l]>o){s=[...n.slice(0,l),o-c];break}var u=s.length%2===0?[0,a]:[a];return[...qJ(n,i),...s,...u].map(d=>"".concat(d,"px")).join(", ")};function XJ(e,t){var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-line-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Q0,Ja({},t,{className:r}))}return n}function QJ(e,t){return e==null?!1:t?!0:e.length===1}function ZJ(e){var{clipPathId:t,points:n,props:r}=e,{dot:i,dataKey:o,needClip:a}=r;if(!QJ(n,i))return null;var{id:s}=r,l=mx(r,$J),c=Jp(i),u=zr(l),d=ct(i,!0),f=n.map((m,h)=>{var g=cr(cr(cr({key:"dot-".concat(h),r:3},u),d),{},{index:h,cx:m.x,cy:m.y,dataKey:o,value:m.value,payload:m.payload,points:n});return XJ(i,g)}),p={clipPath:a?"url(#clipPath-".concat(c?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,Ja({className:"recharts-line-dots",key:"dots"},p),f)}function JJ(e){var{showLabels:t,children:n,points:r}=e,i=k.useMemo(()=>r?.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return cr(cr({},a),{},{value:o.value,payload:o.payload,viewBox:a,parentViewBox:void 0,fill:void 0})}),[r]);return O.createElement(X0,{value:t?i:null},n)}function GE(e){var{clipPathId:t,pathRef:n,points:r,strokeDasharray:i,props:o}=e,{type:a,layout:s,connectNulls:l,needClip:c}=o,u=mx(o,BJ),d=cr(cr({},ct(u,!0)),{},{fill:"none",className:"recharts-line-curve",clipPath:c?"url(#clipPath-".concat(t,")"):void 0,points:r,type:a,layout:s,connectNulls:l,strokeDasharray:i??o.strokeDasharray});return O.createElement(O.Fragment,null,r?.length>1&&O.createElement(js,Ja({},d,{pathRef:n})),O.createElement(ZJ,{points:r,clipPathId:t,props:o}))}function eee(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function tee(e){var{clipPathId:t,props:n,pathRef:r,previousPointsRef:i,longestAnimatedLengthRef:o}=e,{points:a,strokeDasharray:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,animateNewValues:f,width:p,height:m,onAnimationEnd:h,onAnimationStart:g}=n,b=i.current,S=fl(n,"recharts-line-"),[w,x]=k.useState(!1),_=!w,E=k.useCallback(()=>{typeof h=="function"&&h(),x(!1)},[h]),C=k.useCallback(()=>{typeof g=="function"&&g(),x(!0)},[g]),D=eee(r.current),T=o.current;return O.createElement(JJ,{points:a,showLabels:_},n.children,O.createElement(dl,{animationId:S,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:E,onAnimationStart:C,key:S},j=>{var A=tt(T,D+T,j),P=Math.min(A,D),N;if(l)if(s){var M="".concat(s).split(/[,\s]+/gim).map($=>parseFloat($));N=GJ(P,D,M)}else N=vN(D,P);else N=s==null?void 0:String(s);if(b){var I=b.length/a.length,L=j===1?a:a.map(($,V)=>{var z=Math.floor(V*I);if(b[z]){var B=b[z];return cr(cr({},$),{},{x:tt(B.x,$.x,j),y:tt(B.y,$.y,j)})}return f?cr(cr({},$),{},{x:tt(p*2,$.x,j),y:tt(m/2,$.y,j)}):cr(cr({},$),{},{x:$.x,y:$.y})});return i.current=L,O.createElement(GE,{props:n,points:L,clipPathId:t,pathRef:r,strokeDasharray:N})}return j>0&&D>0&&(i.current=a,o.current=P),O.createElement(GE,{props:n,points:a,clipPathId:t,pathRef:r,strokeDasharray:N})}),O.createElement(Mh,{label:n.label}))}function nee(e){var{clipPathId:t,props:n}=e,r=k.useRef(null),i=k.useRef(0),o=k.useRef(null);return O.createElement(tee,{props:n,clipPathId:t,previousPointsRef:r,longestAnimatedLengthRef:i,pathRef:o})}var ree=(e,t)=>({x:e.x,y:e.y,value:e.value,errorVal:nt(e.payload,t)});class iee extends k.Component{render(){var t,{hide:n,dot:r,points:i,className:o,xAxisId:a,yAxisId:s,top:l,left:c,width:u,height:d,id:f,needClip:p}=this.props;if(n)return null;var m=oe("recharts-line",o),h=f,{r:g=3,strokeWidth:b=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},S=Jp(r),w=g*2+b;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:m},p&&O.createElement("defs",null,O.createElement(cx,{clipPathId:h,xAxisId:a,yAxisId:s}),!S&&O.createElement("clipPath",{id:"clipPath-dots-".concat(h)},O.createElement("rect",{x:c-w/2,y:l-w/2,width:u+w,height:d+w}))),O.createElement(rN,{xAxisId:a,yAxisId:s,data:i,dataPointFormatter:ree,errorBarOffset:0},O.createElement(nee,{props:this.props,clipPathId:h}))),O.createElement(vy,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey}))}}var yN={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:!bo.isSsr,label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0};function oee(e){var t=Gt(e,yN),{activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,hide:c,isAnimationActive:u,label:d,legendType:f,xAxisId:p,yAxisId:m,id:h}=t,g=mx(t,WJ),{needClip:b}=Ih(p,m),S=Rh(),w=xu(),x=mn(),_=ce(j=>FJ(j,p,m,x,h));if(w!=="horizontal"&&w!=="vertical"||_==null||S==null)return null;var{height:E,width:C,x:D,y:T}=S;return O.createElement(iee,Ja({},g,{id:h,connectNulls:s,dot:l,activeDot:n,animateNewValues:r,animationBegin:i,animationDuration:o,animationEasing:a,isAnimationActive:u,hide:c,label:d,legendType:f,xAxisId:p,yAxisId:m,points:_,layout:w,height:E,width:C,left:D,top:T,needClip:b}))}function aee(e){var{layout:t,xAxis:n,yAxis:r,xAxisTicks:i,yAxisTicks:o,dataKey:a,bandSize:s,displayedData:l}=e;return l.map((c,u)=>{var d=nt(c,a);if(t==="horizontal"){var f=If({axis:n,ticks:i,bandSize:s,entry:c,index:u}),p=ht(d)?null:r.scale(d);return{x:f,y:p,value:d,payload:c}}var m=ht(d)?null:n.scale(d),h=If({axis:r,ticks:o,bandSize:s,entry:c,index:u});return m==null||h==null?null:{x:m,y:h,value:d,payload:c}}).filter(Boolean)}function see(e){var t=Gt(e,yN),n=mn();return O.createElement(jh,{id:t.id,type:"line"},r=>O.createElement(O.Fragment,null,O.createElement(ox,{legendPayload:UJ(t)}),O.createElement(Nh,{fn:KJ,args:t}),O.createElement(ax,{type:"line",id:r,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:n}),O.createElement(oee,Ja({},t,{id:r}))))}var zo=O.memo(see);zo.displayName="Line";var bN=(e,t,n,r)=>Pi(e,"xAxis",t,r),xN=(e,t,n,r)=>Ei(e,"xAxis",t,r),wN=(e,t,n,r)=>Pi(e,"yAxis",n,r),_N=(e,t,n,r)=>Ei(e,"yAxis",n,r),lee=W([Ee,bN,wN,xN,_N],(e,t,n,r,i)=>Di(e,"xAxis")?Xa(t,r,!1):Xa(n,i,!1)),cee=(e,t,n,r,i)=>i,SN=W([Du,cee],(e,t)=>e.filter(n=>n.type==="area").find(n=>n.id===t)),uee=(e,t,n,r,i)=>{var o,a=SN(e,t,n,r,i);if(a!=null){var s=Ee(e),l=Di(s,"xAxis"),c;if(l?c=zc(e,"yAxis",n,r):c=zc(e,"xAxis",t,r),c!=null){var{stackId:u}=a,d=Sh(a);if(!(u==null||d==null)){var f=(o=c[u])===null||o===void 0?void 0:o.stackedData;return f?.find(p=>p.key===d)}}}},dee=W([Ee,bN,wN,xN,_N,uee,Eu,lee,SN],(e,t,n,r,i,o,a,s,l)=>{var{chartData:c,dataStartIndex:u,dataEndIndex:d}=a;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var{data:f}=l,p;if(f&&f.length>0?p=f:p=c?.slice(u,d+1),p!=null){var m=void 0;return Mee({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:u,areaSettings:l,stackedData:o,displayedData:p,chartBaseValue:m,bandSize:s})}}}),fee=["id"],pee=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function ON(e,t){if(e==null)return{};var n,r,i=hee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function hee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function XE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function Xi(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?XE(Object(n),!0).forEach(function(r){mee(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):XE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function mee(e,t,n){return(t=gee(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function gee(e){var t=vee(e,"string");return typeof t=="symbol"?t:t+""}function vee(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function no(){return no=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},no.apply(null,arguments)}function op(e,t){return e&&e!=="none"?e:t}var yee=e=>{var{dataKey:t,name:n,stroke:r,fill:i,legendType:o,hide:a}=e;return[{inactive:a,dataKey:t,type:o,color:op(r,i),value:ea(n,t),payload:e}]};function bee(e){var{dataKey:t,data:n,stroke:r,strokeWidth:i,fill:o,name:a,hide:s,unit:l}=e;return{dataDefinedOnItem:n,positions:void 0,settings:{stroke:r,strokeWidth:i,fill:o,dataKey:t,nameKey:void 0,name:ea(a,t),hide:s,type:e.tooltipType,color:op(r,o),unit:l}}}var xee=(e,t)=>{var n;if(O.isValidElement(e))n=O.cloneElement(e,t);else if(typeof e=="function")n=e(t);else{var r=oe("recharts-area-dot",typeof e!="boolean"?e.className:"");n=O.createElement(Q0,no({},t,{className:r}))}return n};function wee(e,t){return e==null?!1:t?!0:e.length===1}function _ee(e){var{clipPathId:t,points:n,props:r}=e,{needClip:i,dot:o,dataKey:a}=r;if(!wee(n,o))return null;var s=Jp(o),l=zr(r),c=ct(o,!0),u=n.map((f,p)=>{var m=Xi(Xi(Xi({key:"dot-".concat(p),r:3},l),c),{},{index:p,cx:f.x,cy:f.y,dataKey:a,value:f.value,payload:f.payload,points:n});return xee(o,m)}),d={clipPath:i?"url(#clipPath-".concat(s?"":"dots-").concat(t,")"):void 0};return O.createElement(Ot,no({className:"recharts-area-dots"},d),u)}function See(e){var{showLabels:t,children:n,points:r}=e,i=r.map(o=>{var a={x:o.x,y:o.y,width:0,height:0};return Xi(Xi({},a),{},{value:o.value,payload:o.payload,parentViewBox:void 0,viewBox:a,fill:void 0})});return O.createElement(X0,{value:t?i:null},n)}function QE(e){var{points:t,baseLine:n,needClip:r,clipPathId:i,props:o}=e,{layout:a,type:s,stroke:l,connectNulls:c,isRange:u}=o,{id:d}=o,f=ON(o,fee),p=zr(f);return O.createElement(O.Fragment,null,t?.length>1&&O.createElement(Ot,{clipPath:r?"url(#clipPath-".concat(i,")"):void 0},O.createElement(js,no({},p,{id:d,points:t,connectNulls:c,type:s,baseLine:n,layout:a,stroke:"none",className:"recharts-area-area"})),l!=="none"&&O.createElement(js,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:t})),l!=="none"&&u&&O.createElement(js,no({},p,{className:"recharts-area-curve",layout:a,type:s,connectNulls:c,fill:"none",points:n}))),O.createElement(_ee,{points:t,props:f,clipPathId:i}))}function Oee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].y,a=r[r.length-1].y;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.x||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.x||0),l)),pe(l)?O.createElement("rect",{x:0,y:o<a?o:o-s,width:l+(i?parseInt("".concat(i),10):1),height:Math.floor(s)}):null}function Eee(e){var{alpha:t,baseLine:n,points:r,strokeWidth:i}=e,o=r[0].x,a=r[r.length-1].x;if(!dn(o)||!dn(a))return null;var s=t*Math.abs(o-a),l=Math.max(...r.map(c=>c.y||0));return pe(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(c=>c.y||0),l)),pe(l)?O.createElement("rect",{x:o<a?o:o-s,y:0,width:s,height:Math.floor(l+(i?parseInt("".concat(i),10):1))}):null}function Pee(e){var{alpha:t,layout:n,points:r,baseLine:i,strokeWidth:o}=e;return n==="vertical"?O.createElement(Oee,{alpha:t,points:r,baseLine:i,strokeWidth:o}):O.createElement(Eee,{alpha:t,points:r,baseLine:i,strokeWidth:o})}function kee(e){var{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o}=e,{points:a,baseLine:s,isAnimationActive:l,animationBegin:c,animationDuration:u,animationEasing:d,onAnimationStart:f,onAnimationEnd:p}=r,m=fl(r,"recharts-area-"),[h,g]=k.useState(!1),b=!h,S=k.useCallback(()=>{typeof p=="function"&&p(),g(!1)},[p]),w=k.useCallback(()=>{typeof f=="function"&&f(),g(!0)},[f]),x=i.current,_=o.current;return O.createElement(See,{showLabels:b,points:a},r.children,O.createElement(dl,{animationId:m,begin:c,duration:u,isActive:l,easing:d,onAnimationEnd:S,onAnimationStart:w,key:m},E=>{if(x){var C=x.length/a.length,D=E===1?a:a.map((j,A)=>{var P=Math.floor(A*C);if(x[P]){var N=x[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),T;return pe(s)?T=tt(_,s,E):ht(s)||Cn(s)?T=tt(_,0,E):T=s.map((j,A)=>{var P=Math.floor(A*C);if(Array.isArray(_)&&_[P]){var N=_[P];return Xi(Xi({},j),{},{x:tt(N.x,j.x,E),y:tt(N.y,j.y,E)})}return j}),E>0&&(i.current=D,o.current=T),O.createElement(QE,{points:D,baseLine:T,needClip:t,clipPathId:n,props:r})}return E>0&&(i.current=a,o.current=s),O.createElement(Ot,null,l&&O.createElement("defs",null,O.createElement("clipPath",{id:"animationClipPath-".concat(n)},O.createElement(Pee,{alpha:E,points:a,baseLine:s,layout:r.layout,strokeWidth:r.strokeWidth}))),O.createElement(Ot,{clipPath:"url(#animationClipPath-".concat(n,")")},O.createElement(QE,{points:a,baseLine:s,needClip:t,clipPathId:n,props:r})))}),O.createElement(Mh,{label:r.label}))}function Cee(e){var{needClip:t,clipPathId:n,props:r}=e,i=k.useRef(null),o=k.useRef();return O.createElement(kee,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:o})}class Dee extends k.PureComponent{render(){var t,{hide:n,dot:r,points:i,className:o,top:a,left:s,needClip:l,xAxisId:c,yAxisId:u,width:d,height:f,id:p,baseLine:m}=this.props;if(n)return null;var h=oe("recharts-area",o),g=p,{r:b=3,strokeWidth:S=2}=(t=ct(r,!1))!==null&&t!==void 0?t:{r:3,strokeWidth:2},w=Jp(r),x=b*2+S;return O.createElement(O.Fragment,null,O.createElement(Ot,{className:h},l&&O.createElement("defs",null,O.createElement(cx,{clipPathId:g,xAxisId:c,yAxisId:u}),!w&&O.createElement("clipPath",{id:"clipPath-dots-".concat(g)},O.createElement("rect",{x:s-x/2,y:a-x/2,width:d+x,height:f+x}))),O.createElement(Cee,{needClip:l,clipPathId:g,props:this.props})),O.createElement(vy,{points:i,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}),this.props.isRange&&Array.isArray(m)&&O.createElement(vy,{points:m,mainColor:op(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot}))}}var EN={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:!bo.isSsr,legendType:"line",stroke:"#3182bd",xAxisId:0,yAxisId:0};function Aee(e){var t,n=Gt(e,EN),{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,connectNulls:s,dot:l,fill:c,fillOpacity:u,hide:d,isAnimationActive:f,legendType:p,stroke:m,xAxisId:h,yAxisId:g}=n,b=ON(n,pee),S=xu(),w=kM(),{needClip:x}=Ih(h,g),_=mn(),{points:E,isRange:C,baseLine:D}=(t=ce(M=>dee(M,h,g,_,e.id)))!==null&&t!==void 0?t:{},T=Rh();if(S!=="horizontal"&&S!=="vertical"||T==null||w!=="AreaChart"&&w!=="ComposedChart")return null;var{height:j,width:A,x:P,y:N}=T;return!E||!E.length?null:O.createElement(Dee,no({},b,{activeDot:r,animationBegin:i,animationDuration:o,animationEasing:a,baseLine:D,connectNulls:s,dot:l,fill:c,fillOpacity:u,height:j,hide:d,layout:S,isAnimationActive:f,isRange:C,legendType:p,needClip:x,points:E,stroke:m,width:A,left:P,top:N,xAxisId:h,yAxisId:g}))}var Tee=(e,t,n,r,i)=>{var o=n??t;if(pe(o))return o;var a=e==="horizontal"?i:r,s=a.scale.domain();if(a.type==="number"){var l=Math.max(s[0],s[1]),c=Math.min(s[0],s[1]);return o==="dataMin"?c:o==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return o==="dataMin"?s[0]:o==="dataMax"?s[1]:s[0]};function Mee(e){var{areaSettings:{connectNulls:t,baseValue:n,dataKey:r},stackedData:i,layout:o,chartBaseValue:a,xAxis:s,yAxis:l,displayedData:c,dataStartIndex:u,xAxisTicks:d,yAxisTicks:f,bandSize:p}=e,m=i&&i.length,h=Tee(o,a,n,s,l),g=o==="horizontal",b=!1,S=c.map((x,_)=>{var E;m?E=i[u+_]:(E=nt(x,r),Array.isArray(E)?b=!0:E=[h,E]);var C=E[1]==null||m&&!t&&nt(x,r)==null;return g?{x:If({axis:s,ticks:d,bandSize:p,entry:x,index:_}),y:C?null:l.scale(E[1]),value:E,payload:x}:{x:C?null:s.scale(E[1]),y:If({axis:l,ticks:f,bandSize:p,entry:x,index:_}),value:E,payload:x}}),w;return m||b?w=S.map(x=>{var _=Array.isArray(x.value)?x.value[0]:null;return g?{x:x.x,y:_!=null&&x.y!=null?l.scale(_):null,payload:x.payload}:{x:_!=null?s.scale(_):null,y:x.y,payload:x.payload}}):w=g?l.scale(h):s.scale(h),{points:S,baseLine:w,isRange:b}}function Nee(e){var t=Gt(e,EN),n=mn();return O.createElement(jh,{id:t.id,type:"area"},r=>O.createElement(O.Fragment,null,O.createElement(ox,{legendPayload:yee(t)}),O.createElement(Nh,{fn:bee,args:t}),O.createElement(ax,{type:"area",id:r,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:dA(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),O.createElement(Aee,no({},t,{id:r}))))}var PN=O.memo(Nee);PN.displayName="Area";var jee=["dangerouslySetInnerHTML","ticks"],Ree=["id"],Iee=["domain"],Lee=["domain"];function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wy.apply(null,arguments)}function ap(e,t){if(e==null)return{};var n,r,i=Fee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Fee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function $ee(e){var t=xt();return k.useEffect(()=>(t(nQ(e)),()=>{t(rQ(e))}),[e,t]),null}var Bee=e=>{var{xAxisId:t,className:n}=e,r=ce(Wb),i=mn(),o="xAxis",a=ce(g=>qo(g,o,t,i)),s=ce(g=>aM(g,o,t,i)),l=ce(g=>nM(g,t)),c=ce(g=>$U(g,t)),u=ce(g=>NT(g,t));if(l==null||c==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:f}=e,p=ap(e,jee),{id:m}=u,h=ap(u,Ree);return O.createElement(hx,wy({},p,h,{scale:a,x:c.x,y:c.y,width:l.width,height:l.height,className:oe("recharts-".concat(o," ").concat(o),n),viewBox:r,ticks:s}))},Wee={allowDataOverflow:ir.allowDataOverflow,allowDecimals:ir.allowDecimals,allowDuplicatedCategory:ir.allowDuplicatedCategory,height:ir.height,hide:!1,mirror:ir.mirror,orientation:ir.orientation,padding:ir.padding,reversed:ir.reversed,scale:ir.scale,tickCount:ir.tickCount,type:ir.type,xAxisId:0},zee=e=>{var t,n,r,i,o,a=Gt(e,Wee);return O.createElement(O.Fragment,null,O.createElement($ee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.xAxisId,scale:a.scale,type:a.type,padding:a.padding,allowDataOverflow:a.allowDataOverflow,domain:a.domain,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,height:a.height,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Bee,a))},Vee=(e,t)=>{var{domain:n}=e,r=ap(e,Iee),{domain:i}=t,o=ap(t,Lee);return tl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:tl({domain:n},{domain:i}):!1},br=O.memo(zee,Vee);br.displayName="XAxis";var Hee=["dangerouslySetInnerHTML","ticks"],Yee=["id"],Uee=["domain"],Kee=["domain"];function _y(){return _y=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_y.apply(null,arguments)}function sp(e,t){if(e==null)return{};var n,r,i=qee(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function qee(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Gee(e){var t=xt();return k.useEffect(()=>(t(iQ(e)),()=>{t(oQ(e))}),[e,t]),null}var Xee=e=>{var{yAxisId:t,className:n,width:r,label:i}=e,o=k.useRef(null),a=k.useRef(null),s=ce(Wb),l=mn(),c=xt(),u="yAxis",d=ce(_=>qo(_,u,t,l)),f=ce(_=>rM(_,t)),p=ce(_=>WU(_,t)),m=ce(_=>aM(_,u,t,l)),h=ce(_=>jT(_,t));if(k.useLayoutEffect(()=>{if(!(r!=="auto"||!f||G0(i)||k.isValidElement(i)||h==null)){var _=o.current;if(_){var E=_.getCalculatedWidth();Math.round(f.width)!==Math.round(E)&&c(aQ({id:t,width:E}))}}},[m,f,c,i,t,r,h]),f==null||p==null||h==null)return null;var{dangerouslySetInnerHTML:g,ticks:b}=e,S=sp(e,Hee),{id:w}=h,x=sp(h,Yee);return O.createElement(hx,_y({},S,x,{ref:o,labelRef:a,scale:d,x:p.x,y:p.y,tickTextProps:r==="auto"?{width:void 0}:{width:r},width:f.width,height:f.height,className:oe("recharts-".concat(u," ").concat(u),n),viewBox:s,ticks:m}))},Qee={allowDataOverflow:or.allowDataOverflow,allowDecimals:or.allowDecimals,allowDuplicatedCategory:or.allowDuplicatedCategory,hide:!1,mirror:or.mirror,orientation:or.orientation,padding:or.padding,reversed:or.reversed,scale:or.scale,tickCount:or.tickCount,type:or.type,width:or.width,yAxisId:0},Zee=e=>{var t,n,r,i,o,a=Gt(e,Qee);return O.createElement(O.Fragment,null,O.createElement(Gee,{interval:(t=a.interval)!==null&&t!==void 0?t:"preserveEnd",id:a.yAxisId,scale:a.scale,type:a.type,domain:a.domain,allowDataOverflow:a.allowDataOverflow,dataKey:a.dataKey,allowDuplicatedCategory:a.allowDuplicatedCategory,allowDecimals:a.allowDecimals,tickCount:a.tickCount,padding:a.padding,includeHidden:(n=a.includeHidden)!==null&&n!==void 0?n:!1,reversed:a.reversed,ticks:a.ticks,width:a.width,orientation:a.orientation,mirror:a.mirror,hide:a.hide,unit:a.unit,name:a.name,angle:(r=a.angle)!==null&&r!==void 0?r:0,minTickGap:(i=a.minTickGap)!==null&&i!==void 0?i:5,tick:(o=a.tick)!==null&&o!==void 0?o:!0,tickFormatter:a.tickFormatter}),O.createElement(Xee,a))},Jee=(e,t)=>{var{domain:n}=e,r=sp(e,Uee),{domain:i}=t,o=sp(t,Kee);return tl(r,o)?Array.isArray(n)&&n.length===2&&Array.isArray(i)&&i.length===2?n[0]===i[0]&&n[1]===i[1]:tl({domain:n},{domain:i}):!1},nr=O.memo(Zee,Jee);nr.displayName="YAxis";var xd={exports:{}},Ug={};/**
210
210
  * @license React
211
211
  * use-sync-external-store-with-selector.production.js
212
212
  *
@@ -222,27 +222,27 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
222
222
  *
223
223
  * This source code is licensed under the MIT license found in the
224
224
  * LICENSE file in the root directory of this source tree.
225
- */var JE;function tte(){return JE||(JE=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,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;Kg.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!b){if(b=!0,S=_,_=d(_),f!==void 0&&m.hasValue){var E=m.value;if(f(E,_))return w=E}return w=_}if(E=w,n(S,_))return E;var C=d(_);return f!==void 0&&f(E,C)?(S=_,E):(S=_,w=C)}var b=!1,S,w,x=u===void 0?null:u;return[function(){return g(c())},x===null?void 0:function(){return g(x())}]},[c,u,d,f]);var h=r(l,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=h},[h]),s(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kg}var e2;function nte(){return e2||(e2=1,process.env.NODE_ENV==="production"?xd.exports=ete():xd.exports=tte()),xd.exports}nte();function rte(e){e()}function ite(){let e=null,t=null;return{clear(){e=null,t=null},notify(){rte(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var t2={notify(){},get:()=>[]};function ote(e,t){let n,r=t2,i=0,o=!1;function a(h){u();const g=r.subscribe(h);let b=!1;return()=>{b||(b=!0,g(),d())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=ite())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=t2)}function f(){o||(o=!0,u())}function p(){o&&(o=!1,d())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var ate=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ste=ate(),lte=()=>typeof navigator<"u"&&navigator.product==="ReactNative",cte=lte(),ute=()=>ste||cte?O.useLayoutEffect:O.useEffect,dte=ute(),fte=Symbol.for("react-redux-context"),pte=typeof globalThis<"u"?globalThis:{};function hte(){if(!O.createContext)return{};const e=pte[fte]??=new Map;let t=e.get(O.createContext);return t||(t=O.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(O.createContext,t)),t}var mte=hte();function gte(e){const{children:t,context:n,serverState:r,store:i}=e,o=O.useMemo(()=>{const l=ote(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[i,r]),a=O.useMemo(()=>i.getState(),[i]);dte(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||mte;return O.createElement(s.Provider,{value:o},t)}var vte=gte,yte=(e,t)=>t,gx=W([yte,Ee,AT,Xt,wM,wo,YK,Kt],XK),vx=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},kN=Rr("mouseClick"),CN=yu();CN.startListening({actionCreator:kN,effect:(e,t)=>{var n=e.payload,r=gx(t.getState(),vx(n));r?.activeIndex!=null&&t.dispatch(eK({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Sy=Rr("mouseMove"),DN=yu();DN.startListening({actionCreator:Sy,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=B0(r,r.tooltip.settings.shared),o=gx(r,vx(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch(hM({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(pM()))}});var n2={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},AN=yr({name:"rootProps",initialState:n2,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:n2.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}}}),bte=AN.reducer,{updateOptions:xte}=AN.actions,TN=yr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:wte}=TN.actions,_te=TN.reducer,MN=Rr("keyDown"),NN=Rr("focus"),yx=yu();yx.startListening({actionCreator:MN,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(W0(i,xl(n))),s=wo(n);if(o==="Enter"){var l=Zf(n,"axis","hover",String(i.index));t.dispatch(fy({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=YU(n),u=c==="left-to-right"?1:-1,d=o==="ArrowRight"?1:-1,f=a+d*u;if(!(s==null||f>=s.length||f<0)){var p=Zf(n,"axis","hover",String(f));t.dispatch(fy({active:!0,activeIndex:f.toString(),activeDataKey:void 0,activeCoordinate:p}))}}}}});yx.startListening({actionCreator:NN,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=Zf(n,"axis","hover",String(o));t.dispatch(fy({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var kr=Rr("externalEvent"),jN=yu();jN.startListening({actionCreator:kr,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:IK(n),activeDataKey:EM(n),activeIndex:Go(n),activeLabel:OM(n),activeTooltipIndex:Go(n),isTooltipActive:LK(n)};e.payload.handler(r,e.payload.reactEvent)}}});var Ste=W([bl],e=>e.tooltipItemPayloads),Ote=W([Ste,Mu,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=t(o,n);return a}}}),RN=Rr("touchMove"),IN=yu();IN.startListening({actionCreator:RN,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=B0(r,r.tooltip.settings.shared);if(i==="axis"){var o=gx(r,vx({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch(hM({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(pA),u=(a=l.getAttribute(hA))!==null&&a!==void 0?a:void 0,d=Ote(t.getState(),c,u);t.dispatch(fM({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var Ete=jD({brush:PZ,cartesianAxis:sQ,chartData:fq,errorBars:EQ,graphicalItems:PX,layout:Kz,legend:I7,options:sq,polarAxis:VG,polarOptions:_te,referenceElements:LZ,rootProps:bte,tooltip:tK}),Pte=function(t){return yz({reducer:Ete,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([CN.middleware,DN.middleware,yx.middleware,jN.middleware,IN.middleware]),devTools:bo.devToolsEnabled})};function LN(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=mn(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=Pte(t));var a=Rb;return O.createElement(vte,{context:a,store:o.current},n)}function FN(e){var{layout:t,width:n,height:r,margin:i}=e,o=xt(),a=mn();return k.useEffect(()=>{a||(o(Hz(t)),o(Yz({width:n,height:r})),o(Vz(i)))},[o,a,t,n,r,i]),null}function $N(e){var t=xt();return k.useEffect(()=>{t(xte(e))},[t,e]),null}var kte=["children"];function Cte(e,t){if(e==null)return{};var n,r,i=Dte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lp.apply(null,arguments)}var Ate={width:"100%",height:"100%"},Tte=k.forwardRef((e,t)=>{var n=zb(),r=Vb(),i=bA();if(!Xs(n)||!Xs(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=e,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,O.createElement(Pb,lp({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:Ate,ref:t}),o)}),Mte=e=>{var{children:t}=e,n=ce(dh);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return O.createElement(Pb,{width:r,height:i,x:a,y:o},t)},r2=k.forwardRef((e,t)=>{var{children:n}=e,r=Cte(e,kte),i=mn();return i?O.createElement(Mte,null,n):O.createElement(Tte,lp({ref:t},r),n)});function Nte(){var e=xt(),[t,n]=k.useState(null),r=ce(w7);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;dn(o)&&o!==r&&e(Uz(o))}},[t,e,r]),n}function i2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i2(Object(n),!0).forEach(function(r){Rte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rte(e,t,n){return(t=Ite(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ite(e){var t=Lte(e,"string");return typeof t=="symbol"?t:t+""}function Lte(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fte=k.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:p,onTouchMove:m,onTouchStart:h,style:g,width:b}=e,S=xt(),[w,x]=k.useState(null),[_,E]=k.useState(null);wq();var C=Nte(),D=k.useCallback(q=>{C(q),typeof t=="function"&&t(q),x(q),E(q)},[C,t,x,E]),T=k.useCallback(q=>{S(kN(q)),S(kr({handler:o,reactEvent:q}))},[S,o]),j=k.useCallback(q=>{S(Sy(q)),S(kr({handler:c,reactEvent:q}))},[S,c]),A=k.useCallback(q=>{S(pM()),S(kr({handler:u,reactEvent:q}))},[S,u]),P=k.useCallback(q=>{S(Sy(q)),S(kr({handler:d,reactEvent:q}))},[S,d]),N=k.useCallback(()=>{S(NN())},[S]),M=k.useCallback(q=>{S(MN(q.key))},[S]),I=k.useCallback(q=>{S(kr({handler:a,reactEvent:q}))},[S,a]),L=k.useCallback(q=>{S(kr({handler:s,reactEvent:q}))},[S,s]),$=k.useCallback(q=>{S(kr({handler:l,reactEvent:q}))},[S,l]),V=k.useCallback(q=>{S(kr({handler:f,reactEvent:q}))},[S,f]),z=k.useCallback(q=>{S(kr({handler:h,reactEvent:q}))},[S,h]),B=k.useCallback(q=>{S(RN(q)),S(kr({handler:m,reactEvent:q}))},[S,m]),X=k.useCallback(q=>{S(kr({handler:p,reactEvent:q}))},[S,p]);return O.createElement(MM.Provider,{value:w},O.createElement(eD.Provider,{value:_},O.createElement("div",{className:oe("recharts-wrapper",r),style:jte({position:"relative",cursor:"default",width:b,height:i},g),onClick:T,onContextMenu:I,onDoubleClick:L,onFocus:N,onKeyDown:M,onMouseDown:$,onMouseEnter:j,onMouseLeave:A,onMouseMove:P,onMouseUp:V,onTouchEnd:X,onTouchMove:B,onTouchStart:z,ref:D},n)))}),$te=["children","className","width","height","style","compact","title","desc"];function Bte(e,t){if(e==null)return{};var n,r,i=Wte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var BN=k.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=e,u=Bte(e,$te),d=zr(u);return s?O.createElement(r2,{otherAttributes:d,title:l,desc:c},n):O.createElement(Fte,{className:r,style:a,width:i,height:o,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},O.createElement(r2,{otherAttributes:d,title:l,desc:c,ref:t},O.createElement(FZ,null,n)))}),zte=["width","height"];function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oy.apply(null,arguments)}function Vte(e,t){if(e==null)return{};var n,r,i=Hte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Yte={top:5,right:5,bottom:5,left:5},Ute={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Yte,reverseStackOrder:!1,syncMethod:"index"},bx=k.forwardRef(function(t,n){var r,i=qt(t.categoricalChartProps,Ute),{width:o,height:a}=i,s=Vte(i,zte);if(!Xs(o)||!Xs(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,categoricalChartProps:f}=t,p={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return O.createElement(LN,{preloadedState:{options:p},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:l},O.createElement(aN,{chartData:f.data}),O.createElement(FN,{width:o,height:a,layout:i.layout,margin:i.margin}),O.createElement($N,{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}),O.createElement(BN,Oy({},s,{width:o,height:a,ref:n})))}),Kte=["axis"],xx=k.forwardRef((e,t)=>O.createElement(bx,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Kte,tooltipPayloadSearcher:Ah,categoricalChartProps:e,ref:t})),qte=["axis","item"],ia=k.forwardRef((e,t)=>O.createElement(bx,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:qte,tooltipPayloadSearcher:Ah,categoricalChartProps:e,ref:t}));function Gte(e){var t=xt();return k.useEffect(()=>{t(wte(e))},[t,e]),null}var Xte=["width","height","layout"];function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ey.apply(null,arguments)}function Qte(e,t){if(e==null)return{};var n,r,i=Zte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Jte={top:5,right:5,bottom:5,left:5},ene={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Jte,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},tne=k.forwardRef(function(t,n){var r,i=qt(t.categoricalChartProps,ene),{width:o,height:a,layout:s}=i,l=Qte(i,Xte);if(!Xs(o)||!Xs(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f}=t,p={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,eventEmitter:void 0};return O.createElement(LN,{preloadedState:{options:p},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},O.createElement(aN,{chartData:i.data}),O.createElement(FN,{width:o,height:a,layout:s,margin:i.margin}),O.createElement($N,{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}),O.createElement(Gte,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),O.createElement(BN,Ey({width:o,height:a},l,{ref:n})))}),nne=["item"],rne={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},_o=k.forwardRef((e,t)=>{var n=qt(e,rne);return O.createElement(tne,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:nne,tooltipPayloadSearcher:Ah,categoricalChartProps:n,ref:t})}),ine=["axis"],one=k.forwardRef((e,t)=>O.createElement(bx,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ine,tooltipPayloadSearcher:Ah,categoricalChartProps:e,ref:t}));function wl(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function ane(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Py(e,t){return Py=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Py(e,t)}function sne(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Py(e,t)}const o2={disabled:!1};var lne=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.shape({enter:y.number,exit:y.number,appear:y.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&y.oneOfType([y.string,y.shape({enter:y.string,exit:y.string,active:y.string}),y.shape({enter:y.string,enterDone:y.string,enterActive:y.string,exit:y.string,exitDone:y.string,exitActive:y.string})]);const WN=k.createContext(null);var cne=function(t){return t.scrollTop},sc="unmounted",_a="exited",Sa="entering",Ps="entered",ky="exiting",Ni=(function(e){sne(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=_a,o.appearStatus=Sa):l=Ps:r.unmountOnExit||r.mountOnEnter?l=sc:l=_a,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sc?{status:_a}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Sa&&a!==Ps&&(o=Sa):(a===Sa||a===Ps)&&(o=ky)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Sa){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ui.findDOMNode(this);a&&cne(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_a&&this.setState({status:sc})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ui.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!a||o2.disabled){this.safeSetState({status:Ps},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Sa},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Ps},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ui.findDOMNode(this);if(!o||o2.disabled){this.safeSetState({status:_a},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ky},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:_a},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ui.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sc)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=ane(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(WN.Provider,{value:null},typeof a=="function"?a(i,s):k.cloneElement(k.Children.only(a),s))},t})(k.Component);Ni.contextType=WN;Ni.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:y.shape({current:typeof Element>"u"?y.any:function(e,t,n,r,i,o){var a=e[t];return y.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:y.oneOfType([y.func.isRequired,y.element.isRequired]).isRequired,in:y.bool,mountOnEnter:y.bool,unmountOnExit:y.bool,appear:y.bool,enter:y.bool,exit:y.bool,timeout:function(t){var n=lne;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:y.func,onEnter:y.func,onEntering:y.func,onEntered:y.func,onExit:y.func,onExiting:y.func,onExited:y.func}:{};function xs(){}Ni.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xs,onEntering:xs,onEntered:xs,onExit:xs,onExiting:xs,onExited:xs};Ni.UNMOUNTED=sc;Ni.EXITED=_a;Ni.ENTERING=Sa;Ni.ENTERED=Ps;Ni.EXITING=ky;const a2={};function une(e,t){const n=O.useRef(a2);return n.current===a2&&(n.current=e(t)),n}const dne=[];function fne(e){O.useEffect(e,dne)}class Fh{static create(){return new Fh}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function lc(){const e=une(Fh.create).current;return fne(e.disposeEffect),e}function pne(e){const{prototype:t={}}=e;return!!t.isReactComponent}function hne(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!pne(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const zN=wl(y.elementType,hne),VN=e=>e.scrollTop;function cp(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function mne(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function HN(e,t,n,r){const i=e[t];if(i==null||!Number.isInteger(i)){const o=mne(i);return new RangeError(`Invalid ${r} \`${t}\` of type \`${o}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function YN(e,t,n,r){return e[t]===void 0?null:HN(e,t,n,r)}function Cy(){return null}YN.isRequired=HN;Cy.isRequired=Cy;const UN=process.env.NODE_ENV==="production"?Cy:YN;function gne(e){return pn("MuiPaper",e)}Ln("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const vne=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Dn(o,gne,i)},yne=Ce("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Fn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),KN=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiPaper"}),i=Wp(),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=vne(d);return process.env.NODE_ENV!=="production"&&i.shadows[s]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${s}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(`
225
+ */var JE;function tte(){return JE||(JE=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,n=typeof Object.is=="function"?Object.is:e,r=t.useSyncExternalStore,i=t.useRef,o=t.useEffect,a=t.useMemo,s=t.useDebugValue;Kg.useSyncExternalStoreWithSelector=function(l,c,u,d,f){var p=i(null);if(p.current===null){var m={hasValue:!1,value:null};p.current=m}else m=p.current;p=a(function(){function g(_){if(!b){if(b=!0,S=_,_=d(_),f!==void 0&&m.hasValue){var E=m.value;if(f(E,_))return w=E}return w=_}if(E=w,n(S,_))return E;var C=d(_);return f!==void 0&&f(E,C)?(S=_,E):(S=_,w=C)}var b=!1,S,w,x=u===void 0?null:u;return[function(){return g(c())},x===null?void 0:function(){return g(x())}]},[c,u,d,f]);var h=r(l,p[0],p[1]);return o(function(){m.hasValue=!0,m.value=h},[h]),s(h),h},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Kg}var e2;function nte(){return e2||(e2=1,process.env.NODE_ENV==="production"?xd.exports=ete():xd.exports=tte()),xd.exports}nte();function rte(e){e()}function ite(){let e=null,t=null;return{clear(){e=null,t=null},notify(){rte(()=>{let n=e;for(;n;)n.callback(),n=n.next})},get(){const n=[];let r=e;for(;r;)n.push(r),r=r.next;return n},subscribe(n){let r=!0;const i=t={callback:n,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!r||e===null||(r=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var t2={notify(){},get:()=>[]};function ote(e,t){let n,r=t2,i=0,o=!1;function a(h){u();const g=r.subscribe(h);let b=!1;return()=>{b||(b=!0,g(),d())}}function s(){r.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return o}function u(){i++,n||(n=e.subscribe(l),r=ite())}function d(){i--,n&&i===0&&(n(),n=void 0,r.clear(),r=t2)}function f(){o||(o=!0,u())}function p(){o&&(o=!1,d())}const m={addNestedSub:a,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>r};return m}var ate=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ste=ate(),lte=()=>typeof navigator<"u"&&navigator.product==="ReactNative",cte=lte(),ute=()=>ste||cte?O.useLayoutEffect:O.useEffect,dte=ute(),fte=Symbol.for("react-redux-context"),pte=typeof globalThis<"u"?globalThis:{};function hte(){if(!O.createContext)return{};const e=pte[fte]??=new Map;let t=e.get(O.createContext);return t||(t=O.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(O.createContext,t)),t}var mte=hte();function gte(e){const{children:t,context:n,serverState:r,store:i}=e,o=O.useMemo(()=>{const l=ote(i),c={store:i,subscription:l,getServerState:r?()=>r:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:d="once"}=e;return Object.assign(c,{stabilityCheck:d,identityFunctionCheck:u})}},[i,r]),a=O.useMemo(()=>i.getState(),[i]);dte(()=>{const{subscription:l}=o;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),a!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[o,a]);const s=n||mte;return O.createElement(s.Provider,{value:o},t)}var vte=gte,yte=(e,t)=>t,gx=W([yte,Ee,AT,Qt,wM,wo,YK,qt],XK),vx=e=>{var t=e.currentTarget.getBoundingClientRect(),n=t.width/e.currentTarget.offsetWidth,r=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/n),chartY:Math.round((e.clientY-t.top)/r)}},kN=Rr("mouseClick"),CN=yu();CN.startListening({actionCreator:kN,effect:(e,t)=>{var n=e.payload,r=gx(t.getState(),vx(n));r?.activeIndex!=null&&t.dispatch(eK({activeIndex:r.activeIndex,activeDataKey:void 0,activeCoordinate:r.activeCoordinate}))}});var Sy=Rr("mouseMove"),DN=yu();DN.startListening({actionCreator:Sy,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=B0(r,r.tooltip.settings.shared),o=gx(r,vx(n));i==="axis"&&(o?.activeIndex!=null?t.dispatch(hM({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate})):t.dispatch(pM()))}});var n2={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},AN=yr({name:"rootProps",initialState:n2,reducers:{updateOptions:(e,t)=>{var n;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(n=t.payload.barGap)!==null&&n!==void 0?n:n2.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}}}),bte=AN.reducer,{updateOptions:xte}=AN.actions,TN=yr({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:wte}=TN.actions,_te=TN.reducer,MN=Rr("keyDown"),NN=Rr("focus"),yx=yu();yx.startListening({actionCreator:MN,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip,o=e.payload;if(!(o!=="ArrowRight"&&o!=="ArrowLeft"&&o!=="Enter")){var a=Number(W0(i,xl(n))),s=wo(n);if(o==="Enter"){var l=Zf(n,"axis","hover",String(i.index));t.dispatch(fy({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=YU(n),u=c==="left-to-right"?1:-1,d=o==="ArrowRight"?1:-1,f=a+d*u;if(!(s==null||f>=s.length||f<0)){var p=Zf(n,"axis","hover",String(f));t.dispatch(fy({active:!0,activeIndex:f.toString(),activeDataKey:void 0,activeCoordinate:p}))}}}}});yx.startListening({actionCreator:NN,effect:(e,t)=>{var n=t.getState(),r=n.rootProps.accessibilityLayer!==!1;if(r){var{keyboardInteraction:i}=n.tooltip;if(!i.active&&i.index==null){var o="0",a=Zf(n,"axis","hover",String(o));t.dispatch(fy({activeDataKey:void 0,active:!0,activeIndex:o,activeCoordinate:a}))}}}});var kr=Rr("externalEvent"),jN=yu();jN.startListening({actionCreator:kr,effect:(e,t)=>{if(e.payload.handler!=null){var n=t.getState(),r={activeCoordinate:IK(n),activeDataKey:EM(n),activeIndex:Go(n),activeLabel:OM(n),activeTooltipIndex:Go(n),isTooltipActive:LK(n)};e.payload.handler(r,e.payload.reactEvent)}}});var Ste=W([bl],e=>e.tooltipItemPayloads),Ote=W([Ste,Mu,(e,t,n)=>t,(e,t,n)=>n],(e,t,n,r)=>{var i=e.find(s=>s.settings.dataKey===r);if(i!=null){var{positions:o}=i;if(o!=null){var a=t(o,n);return a}}}),RN=Rr("touchMove"),IN=yu();IN.startListening({actionCreator:RN,effect:(e,t)=>{var n=e.payload,r=t.getState(),i=B0(r,r.tooltip.settings.shared);if(i==="axis"){var o=gx(r,vx({clientX:n.touches[0].clientX,clientY:n.touches[0].clientY,currentTarget:n.currentTarget}));o?.activeIndex!=null&&t.dispatch(hM({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}else if(i==="item"){var a,s=n.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(pA),u=(a=l.getAttribute(hA))!==null&&a!==void 0?a:void 0,d=Ote(t.getState(),c,u);t.dispatch(fM({activeDataKey:u,activeIndex:c,activeCoordinate:d}))}}});var Ete=jD({brush:PZ,cartesianAxis:sQ,chartData:fq,errorBars:EQ,graphicalItems:PX,layout:Kz,legend:I7,options:sq,polarAxis:VG,polarOptions:_te,referenceElements:LZ,rootProps:bte,tooltip:tK}),Pte=function(t){return yz({reducer:Ete,preloadedState:t,middleware:n=>n({serializableCheck:!1}).concat([CN.middleware,DN.middleware,yx.middleware,jN.middleware,IN.middleware]),devTools:bo.devToolsEnabled})};function LN(e){var{preloadedState:t,children:n,reduxStoreName:r}=e,i=mn(),o=k.useRef(null);if(i)return n;o.current==null&&(o.current=Pte(t));var a=Rb;return O.createElement(vte,{context:a,store:o.current},n)}function FN(e){var{layout:t,width:n,height:r,margin:i}=e,o=xt(),a=mn();return k.useEffect(()=>{a||(o(Hz(t)),o(Yz({width:n,height:r})),o(Vz(i)))},[o,a,t,n,r,i]),null}function $N(e){var t=xt();return k.useEffect(()=>{t(xte(e))},[t,e]),null}var kte=["children"];function Cte(e,t){if(e==null)return{};var n,r,i=Dte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Dte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},lp.apply(null,arguments)}var Ate={width:"100%",height:"100%"},Tte=k.forwardRef((e,t)=>{var n=zb(),r=Vb(),i=bA();if(!Xs(n)||!Xs(r))return null;var{children:o,otherAttributes:a,title:s,desc:l}=e,c,u;return typeof a.tabIndex=="number"?c=a.tabIndex:c=i?0:void 0,typeof a.role=="string"?u=a.role:u=i?"application":void 0,O.createElement(Pb,lp({},a,{title:s,desc:l,role:u,tabIndex:c,width:n,height:r,style:Ate,ref:t}),o)}),Mte=e=>{var{children:t}=e,n=ce(dh);if(!n)return null;var{width:r,height:i,y:o,x:a}=n;return O.createElement(Pb,{width:r,height:i,x:a,y:o},t)},r2=k.forwardRef((e,t)=>{var{children:n}=e,r=Cte(e,kte),i=mn();return i?O.createElement(Mte,null,n):O.createElement(Tte,lp({ref:t},r),n)});function Nte(){var e=xt(),[t,n]=k.useState(null),r=ce(w7);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),o=i.width/t.offsetWidth;dn(o)&&o!==r&&e(Uz(o))}},[t,e,r]),n}function i2(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function jte(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?i2(Object(n),!0).forEach(function(r){Rte(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i2(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Rte(e,t,n){return(t=Ite(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ite(e){var t=Lte(e,"string");return typeof t=="symbol"?t:t+""}function Lte(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Fte=k.forwardRef((e,t)=>{var{children:n,className:r,height:i,onClick:o,onContextMenu:a,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:d,onMouseUp:f,onTouchEnd:p,onTouchMove:m,onTouchStart:h,style:g,width:b}=e,S=xt(),[w,x]=k.useState(null),[_,E]=k.useState(null);wq();var C=Nte(),D=k.useCallback(q=>{C(q),typeof t=="function"&&t(q),x(q),E(q)},[C,t,x,E]),T=k.useCallback(q=>{S(kN(q)),S(kr({handler:o,reactEvent:q}))},[S,o]),j=k.useCallback(q=>{S(Sy(q)),S(kr({handler:c,reactEvent:q}))},[S,c]),A=k.useCallback(q=>{S(pM()),S(kr({handler:u,reactEvent:q}))},[S,u]),P=k.useCallback(q=>{S(Sy(q)),S(kr({handler:d,reactEvent:q}))},[S,d]),N=k.useCallback(()=>{S(NN())},[S]),M=k.useCallback(q=>{S(MN(q.key))},[S]),I=k.useCallback(q=>{S(kr({handler:a,reactEvent:q}))},[S,a]),L=k.useCallback(q=>{S(kr({handler:s,reactEvent:q}))},[S,s]),$=k.useCallback(q=>{S(kr({handler:l,reactEvent:q}))},[S,l]),V=k.useCallback(q=>{S(kr({handler:f,reactEvent:q}))},[S,f]),z=k.useCallback(q=>{S(kr({handler:h,reactEvent:q}))},[S,h]),B=k.useCallback(q=>{S(RN(q)),S(kr({handler:m,reactEvent:q}))},[S,m]),X=k.useCallback(q=>{S(kr({handler:p,reactEvent:q}))},[S,p]);return O.createElement(MM.Provider,{value:w},O.createElement(eD.Provider,{value:_},O.createElement("div",{className:oe("recharts-wrapper",r),style:jte({position:"relative",cursor:"default",width:b,height:i},g),onClick:T,onContextMenu:I,onDoubleClick:L,onFocus:N,onKeyDown:M,onMouseDown:$,onMouseEnter:j,onMouseLeave:A,onMouseMove:P,onMouseUp:V,onTouchEnd:X,onTouchMove:B,onTouchStart:z,ref:D},n)))}),$te=["children","className","width","height","style","compact","title","desc"];function Bte(e,t){if(e==null)return{};var n,r,i=Wte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Wte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var BN=k.forwardRef((e,t)=>{var{children:n,className:r,width:i,height:o,style:a,compact:s,title:l,desc:c}=e,u=Bte(e,$te),d=zr(u);return s?O.createElement(r2,{otherAttributes:d,title:l,desc:c},n):O.createElement(Fte,{className:r,style:a,width:i,height:o,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},O.createElement(r2,{otherAttributes:d,title:l,desc:c,ref:t},O.createElement(FZ,null,n)))}),zte=["width","height"];function Oy(){return Oy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Oy.apply(null,arguments)}function Vte(e,t){if(e==null)return{};var n,r,i=Hte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Hte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Yte={top:5,right:5,bottom:5,left:5},Ute={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Yte,reverseStackOrder:!1,syncMethod:"index"},bx=k.forwardRef(function(t,n){var r,i=Gt(t.categoricalChartProps,Ute),{width:o,height:a}=i,s=Vte(i,zte);if(!Xs(o)||!Xs(a))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,categoricalChartProps:f}=t,p={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return O.createElement(LN,{preloadedState:{options:p},reduxStoreName:(r=f.id)!==null&&r!==void 0?r:l},O.createElement(aN,{chartData:f.data}),O.createElement(FN,{width:o,height:a,layout:i.layout,margin:i.margin}),O.createElement($N,{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}),O.createElement(BN,Oy({},s,{width:o,height:a,ref:n})))}),Kte=["axis"],xx=k.forwardRef((e,t)=>O.createElement(bx,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Kte,tooltipPayloadSearcher:Ah,categoricalChartProps:e,ref:t})),qte=["axis","item"],ia=k.forwardRef((e,t)=>O.createElement(bx,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:qte,tooltipPayloadSearcher:Ah,categoricalChartProps:e,ref:t}));function Gte(e){var t=xt();return k.useEffect(()=>{t(wte(e))},[t,e]),null}var Xte=["width","height","layout"];function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ey.apply(null,arguments)}function Qte(e,t){if(e==null)return{};var n,r,i=Zte(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Zte(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}var Jte={top:5,right:5,bottom:5,left:5},ene={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Jte,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},tne=k.forwardRef(function(t,n){var r,i=Gt(t.categoricalChartProps,ene),{width:o,height:a,layout:s}=i,l=Qte(i,Xte);if(!Xs(o)||!Xs(a))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f}=t,p={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:d,tooltipPayloadSearcher:f,eventEmitter:void 0};return O.createElement(LN,{preloadedState:{options:p},reduxStoreName:(r=i.id)!==null&&r!==void 0?r:c},O.createElement(aN,{chartData:i.data}),O.createElement(FN,{width:o,height:a,layout:s,margin:i.margin}),O.createElement($N,{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}),O.createElement(Gte,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),O.createElement(BN,Ey({width:o,height:a},l,{ref:n})))}),nne=["item"],rne={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},_o=k.forwardRef((e,t)=>{var n=Gt(e,rne);return O.createElement(tne,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:nne,tooltipPayloadSearcher:Ah,categoricalChartProps:n,ref:t})}),ine=["axis"],one=k.forwardRef((e,t)=>O.createElement(bx,{chartName:"AreaChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:ine,tooltipPayloadSearcher:Ah,categoricalChartProps:e,ref:t}));function wl(e,t){return process.env.NODE_ENV==="production"?()=>null:function(...r){return e(...r)||t(...r)}}function ane(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Py(e,t){return Py=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,r){return n.__proto__=r,n},Py(e,t)}function sne(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Py(e,t)}const o2={disabled:!1};var lne=process.env.NODE_ENV!=="production"?y.oneOfType([y.number,y.shape({enter:y.number,exit:y.number,appear:y.number}).isRequired]):null;process.env.NODE_ENV!=="production"&&y.oneOfType([y.string,y.shape({enter:y.string,exit:y.string,active:y.string}),y.shape({enter:y.string,enterDone:y.string,enterActive:y.string,exit:y.string,exitDone:y.string,exitActive:y.string})]);const WN=k.createContext(null);var cne=function(t){return t.scrollTop},sc="unmounted",_a="exited",Sa="entering",Ps="entered",ky="exiting",Ni=(function(e){sne(t,e);function t(r,i){var o;o=e.call(this,r,i)||this;var a=i,s=a&&!a.isMounting?r.enter:r.appear,l;return o.appearStatus=null,r.in?s?(l=_a,o.appearStatus=Sa):l=Ps:r.unmountOnExit||r.mountOnEnter?l=sc:l=_a,o.state={status:l},o.nextCallback=null,o}t.getDerivedStateFromProps=function(i,o){var a=i.in;return a&&o.status===sc?{status:_a}:null};var n=t.prototype;return n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(i){var o=null;if(i!==this.props){var a=this.state.status;this.props.in?a!==Sa&&a!==Ps&&(o=Sa):(a===Sa||a===Ps)&&(o=ky)}this.updateStatus(!1,o)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var i=this.props.timeout,o,a,s;return o=a=s=i,i!=null&&typeof i!="number"&&(o=i.exit,a=i.enter,s=i.appear!==void 0?i.appear:a),{exit:o,enter:a,appear:s}},n.updateStatus=function(i,o){if(i===void 0&&(i=!1),o!==null)if(this.cancelNextCallback(),o===Sa){if(this.props.unmountOnExit||this.props.mountOnEnter){var a=this.props.nodeRef?this.props.nodeRef.current:Ui.findDOMNode(this);a&&cne(a)}this.performEnter(i)}else this.performExit();else this.props.unmountOnExit&&this.state.status===_a&&this.setState({status:sc})},n.performEnter=function(i){var o=this,a=this.props.enter,s=this.context?this.context.isMounting:i,l=this.props.nodeRef?[s]:[Ui.findDOMNode(this),s],c=l[0],u=l[1],d=this.getTimeouts(),f=s?d.appear:d.enter;if(!i&&!a||o2.disabled){this.safeSetState({status:Ps},function(){o.props.onEntered(c)});return}this.props.onEnter(c,u),this.safeSetState({status:Sa},function(){o.props.onEntering(c,u),o.onTransitionEnd(f,function(){o.safeSetState({status:Ps},function(){o.props.onEntered(c,u)})})})},n.performExit=function(){var i=this,o=this.props.exit,a=this.getTimeouts(),s=this.props.nodeRef?void 0:Ui.findDOMNode(this);if(!o||o2.disabled){this.safeSetState({status:_a},function(){i.props.onExited(s)});return}this.props.onExit(s),this.safeSetState({status:ky},function(){i.props.onExiting(s),i.onTransitionEnd(a.exit,function(){i.safeSetState({status:_a},function(){i.props.onExited(s)})})})},n.cancelNextCallback=function(){this.nextCallback!==null&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(i,o){o=this.setNextCallback(o),this.setState(i,o)},n.setNextCallback=function(i){var o=this,a=!0;return this.nextCallback=function(s){a&&(a=!1,o.nextCallback=null,i(s))},this.nextCallback.cancel=function(){a=!1},this.nextCallback},n.onTransitionEnd=function(i,o){this.setNextCallback(o);var a=this.props.nodeRef?this.props.nodeRef.current:Ui.findDOMNode(this),s=i==null&&!this.props.addEndListener;if(!a||s){setTimeout(this.nextCallback,0);return}if(this.props.addEndListener){var l=this.props.nodeRef?[this.nextCallback]:[a,this.nextCallback],c=l[0],u=l[1];this.props.addEndListener(c,u)}i!=null&&setTimeout(this.nextCallback,i)},n.render=function(){var i=this.state.status;if(i===sc)return null;var o=this.props,a=o.children;o.in,o.mountOnEnter,o.unmountOnExit,o.appear,o.enter,o.exit,o.timeout,o.addEndListener,o.onEnter,o.onEntering,o.onEntered,o.onExit,o.onExiting,o.onExited,o.nodeRef;var s=ane(o,["children","in","mountOnEnter","unmountOnExit","appear","enter","exit","timeout","addEndListener","onEnter","onEntering","onEntered","onExit","onExiting","onExited","nodeRef"]);return k.createElement(WN.Provider,{value:null},typeof a=="function"?a(i,s):k.cloneElement(k.Children.only(a),s))},t})(k.Component);Ni.contextType=WN;Ni.propTypes=process.env.NODE_ENV!=="production"?{nodeRef:y.shape({current:typeof Element>"u"?y.any:function(e,t,n,r,i,o){var a=e[t];return y.instanceOf(a&&"ownerDocument"in a?a.ownerDocument.defaultView.Element:Element)(e,t,n,r,i,o)}}),children:y.oneOfType([y.func.isRequired,y.element.isRequired]).isRequired,in:y.bool,mountOnEnter:y.bool,unmountOnExit:y.bool,appear:y.bool,enter:y.bool,exit:y.bool,timeout:function(t){var n=lne;t.addEndListener||(n=n.isRequired);for(var r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return n.apply(void 0,[t].concat(i))},addEndListener:y.func,onEnter:y.func,onEntering:y.func,onEntered:y.func,onExit:y.func,onExiting:y.func,onExited:y.func}:{};function xs(){}Ni.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:xs,onEntering:xs,onEntered:xs,onExit:xs,onExiting:xs,onExited:xs};Ni.UNMOUNTED=sc;Ni.EXITED=_a;Ni.ENTERING=Sa;Ni.ENTERED=Ps;Ni.EXITING=ky;const a2={};function une(e,t){const n=O.useRef(a2);return n.current===a2&&(n.current=e(t)),n}const dne=[];function fne(e){O.useEffect(e,dne)}class Fh{static create(){return new Fh}currentId=null;start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=null,n()},t)}clear=()=>{this.currentId!==null&&(clearTimeout(this.currentId),this.currentId=null)};disposeEffect=()=>this.clear}function lc(){const e=une(Fh.create).current;return fne(e.disposeEffect),e}function pne(e){const{prototype:t={}}=e;return!!t.isReactComponent}function hne(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;return typeof o=="function"&&!pne(o)&&(s="Did you accidentally provide a plain function component instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element type that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const zN=wl(y.elementType,hne),VN=e=>e.scrollTop;function cp(e,t){const{timeout:n,easing:r,style:i={}}=e;return{duration:i.transitionDuration??(typeof n=="number"?n:n[t.mode]||0),easing:i.transitionTimingFunction??(typeof r=="object"?r[t.mode]:r),delay:i.transitionDelay}}function mne(e){const t=typeof e;switch(t){case"number":return Number.isNaN(e)?"NaN":Number.isFinite(e)?e!==Math.floor(e)?"float":"number":"Infinity";case"object":return e===null?"null":e.constructor.name;default:return t}}function HN(e,t,n,r){const i=e[t];if(i==null||!Number.isInteger(i)){const o=mne(i);return new RangeError(`Invalid ${r} \`${t}\` of type \`${o}\` supplied to \`${n}\`, expected \`integer\`.`)}return null}function YN(e,t,n,r){return e[t]===void 0?null:HN(e,t,n,r)}function Cy(){return null}YN.isRequired=HN;Cy.isRequired=Cy;const UN=process.env.NODE_ENV==="production"?Cy:YN;function gne(e){return pn("MuiPaper",e)}Ln("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);const vne=e=>{const{square:t,elevation:n,variant:r,classes:i}=e,o={root:["root",r,!t&&"rounded",r==="elevation"&&`elevation${n}`]};return Dn(o,gne,i)},yne=Ce("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,n.variant==="elevation"&&t[`elevation${n.elevation}`]]}})(Fn(({theme:e})=>({backgroundColor:(e.vars||e).palette.background.paper,color:(e.vars||e).palette.text.primary,transition:e.transitions.create("box-shadow"),variants:[{props:({ownerState:t})=>!t.square,style:{borderRadius:e.shape.borderRadius}},{props:{variant:"outlined"},style:{border:`1px solid ${(e.vars||e).palette.divider}`}},{props:{variant:"elevation"},style:{boxShadow:"var(--Paper-shadow)",backgroundImage:"var(--Paper-overlay)"}}]}))),KN=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiPaper"}),i=Wp(),{className:o,component:a="div",elevation:s=1,square:l=!1,variant:c="elevation",...u}=r,d={...r,component:a,elevation:s,square:l,variant:c},f=vne(d);return process.env.NODE_ENV!=="production"&&i.shadows[s]===void 0&&console.error([`MUI: The elevation provided <Paper elevation={${s}}> is not available in the theme.`,`Please make sure that \`theme.shadows[${s}]\` is defined.`].join(`
226
226
  `)),v.jsx(yne,{as:a,ownerState:d,className:oe(f.root,o),ref:n,...u,style:{...c==="elevation"&&{"--Paper-shadow":(i.vars||i).shadows[s],...i.vars&&{"--Paper-overlay":i.vars.overlays?.[s]},...!i.vars&&i.palette.mode==="dark"&&{"--Paper-overlay":`linear-gradient(${lf("#fff",_v(s))}, ${lf("#fff",_v(s))})`}},...u.style}})});process.env.NODE_ENV!=="production"&&(KN.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,elevation:wl(UN,e=>{const{elevation:t,variant:n}=e;return t>0&&n==="outlined"?new Error(`MUI: Combining \`elevation={${t}}\` with \`variant="${n}"\` has no effect. Either use \`elevation={0}\` or use a different \`variant\`.`):null}),square:y.bool,style:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),variant:y.oneOfType([y.oneOf(["elevation","outlined"]),y.string])});function up(e){return typeof e=="string"}function qN(e,t,n){return e===void 0||up(e)?t:{...t,ownerState:{...t.ownerState,...n}}}function GN(e,t,n){return typeof e=="function"?e(t,n):e}function XN(e,t=[]){if(e===void 0)return{};const n={};return Object.keys(e).filter(r=>r.match(/^on[A-Z]/)&&typeof e[r]=="function"&&!t.includes(r)).forEach(r=>{n[r]=e[r]}),n}function s2(e){if(e===void 0)return{};const t={};return Object.keys(e).filter(n=>!(n.match(/^on[A-Z]/)&&typeof e[n]=="function")).forEach(n=>{t[n]=e[n]}),t}function QN(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:r,externalForwardedProps:i,className:o}=e;if(!t){const p=oe(n?.className,o,i?.className,r?.className),m={...n?.style,...i?.style,...r?.style},h={...n,...i,...r};return p.length>0&&(h.className=p),Object.keys(m).length>0&&(h.style=m),{props:h,internalRef:void 0}}const a=XN({...i,...r}),s=s2(r),l=s2(i),c=t(a),u=oe(c?.className,n?.className,o,i?.className,r?.className),d={...c?.style,...n?.style,...i?.style,...r?.style},f={...c,...n,...l,...s};return u.length>0&&(f.className=u),Object.keys(d).length>0&&(f.style=d),{props:f,internalRef:c.ref}}function Qn(e,t){const{className:n,elementType:r,ownerState:i,externalForwardedProps:o,internalForwardedProps:a,shouldForwardComponentProp:s=!1,...l}=t,{component:c,slots:u={[e]:void 0},slotProps:d={[e]:void 0},...f}=o,p=u[e]||r,m=GN(d[e],i),{props:{component:h,...g},internalRef:b}=QN({className:n,...l,externalForwardedProps:e==="root"?f:void 0,externalSlotProps:m}),S=In(b,m?.ref,t.ref),w=e==="root"?h||c:h,x=qN(p,{...e==="root"&&!c&&!u[e]&&a,...e!=="root"&&!u[e]&&a,...g,...w&&!s&&{as:w},...w&&s&&{component:w},ref:S},i);return[p,x]}const So=y.oneOfType([y.func,y.object]);function l2(e){try{return e.matches(":focus-visible")}catch{process.env.NODE_ENV!=="production"&&!/jsdom/.test(window.navigator.userAgent)&&console.warn(["MUI: The `:focus-visible` pseudo class is not supported in this browser.","Some components rely on this feature to work properly."].join(`
227
- `))}return!1}function bne(e){return typeof e.main=="string"}function xne(e,t=[]){if(!bne(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function wx(e=[]){return([,t])=>t&&xne(t,e)}function fo(e,t,n,r,i){if(process.env.NODE_ENV==="production")return null;const o=e[t],a=i||t;return o==null?null:o&&o.nodeType!==1?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}var Jn="top",Lr="bottom",Fr="right",er="left",_x="auto",Ru=[Jn,Lr,Fr,er],nl="start",Hc="end",wne="clippingParents",ZN="viewport",Hl="popper",_ne="reference",c2=Ru.reduce(function(e,t){return e.concat([t+"-"+nl,t+"-"+Hc])},[]),JN=[].concat(Ru,[_x]).reduce(function(e,t){return e.concat([t,t+"-"+nl,t+"-"+Hc])},[]),Sne="beforeRead",One="read",Ene="afterRead",Pne="beforeMain",kne="main",Cne="afterMain",Dne="beforeWrite",Ane="write",Tne="afterWrite",Mne=[Sne,One,Ene,Pne,kne,Cne,Dne,Ane,Tne];function ki(e){return e?(e.nodeName||"").toLowerCase():null}function vr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function es(e){var t=vr(e).Element;return e instanceof t||e instanceof Element}function Mr(e){var t=vr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Sx(e){if(typeof ShadowRoot>"u")return!1;var t=vr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Nne(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Mr(o)||!ki(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function jne(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Mr(i)||!ki(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const ej={name:"applyStyles",enabled:!0,phase:"write",fn:Nne,effect:jne,requires:["computeStyles"]};function xi(e){return e.split("-")[0]}var Va=Math.max,dp=Math.min,rl=Math.round;function Dy(){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 tj(){return!/^((?!chrome|android).)*safari/i.test(Dy())}function il(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Mr(e)&&(i=e.offsetWidth>0&&rl(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&rl(r.height)/e.offsetHeight||1);var a=es(e)?vr(e):window,s=a.visualViewport,l=!tj()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Ox(e){var t=il(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function nj(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Sx(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function po(e){return vr(e).getComputedStyle(e)}function Rne(e){return["table","td","th"].indexOf(ki(e))>=0}function oa(e){return((es(e)?e.ownerDocument:e.document)||window.document).documentElement}function $h(e){return ki(e)==="html"?e:e.assignedSlot||e.parentNode||(Sx(e)?e.host:null)||oa(e)}function u2(e){return!Mr(e)||po(e).position==="fixed"?null:e.offsetParent}function Ine(e){var t=/firefox/i.test(Dy()),n=/Trident/i.test(Dy());if(n&&Mr(e)){var r=po(e);if(r.position==="fixed")return null}var i=$h(e);for(Sx(i)&&(i=i.host);Mr(i)&&["html","body"].indexOf(ki(i))<0;){var o=po(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Iu(e){for(var t=vr(e),n=u2(e);n&&Rne(n)&&po(n).position==="static";)n=u2(n);return n&&(ki(n)==="html"||ki(n)==="body"&&po(n).position==="static")?t:n||Ine(e)||t}function Ex(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gc(e,t,n){return Va(e,dp(t,n))}function Lne(e,t,n){var r=gc(e,t,n);return r>n?n:r}function rj(){return{top:0,right:0,bottom:0,left:0}}function ij(e){return Object.assign({},rj(),e)}function oj(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Fne=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,ij(typeof t!="number"?t:oj(t,Ru))};function $ne(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=xi(n.placement),l=Ex(s),c=[er,Fr].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=Fne(i.padding,n),f=Ox(o),p=l==="y"?Jn:er,m=l==="y"?Lr:Fr,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],b=Iu(o),S=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,w=h/2-g/2,x=d[p],_=S-f[u]-d[m],E=S/2-f[u]/2+w,C=gc(x,E,_),D=l;n.modifiersData[r]=(t={},t[D]=C,t.centerOffset=C-E,t)}}function Bne(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||nj(t.elements.popper,i)&&(t.elements.arrow=i))}const Wne={name:"arrow",enabled:!0,phase:"main",fn:$ne,effect:Bne,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ol(e){return e.split("-")[1]}var zne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vne(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:rl(n*i)/i||0,y:rl(r*i)/i||0}}function d2(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,h=m===void 0?0:m,g=typeof u=="function"?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var b=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=er,x=Jn,_=window;if(c){var E=Iu(n),C="clientHeight",D="clientWidth";if(E===vr(n)&&(E=oa(n),po(E).position!=="static"&&s==="absolute"&&(C="scrollHeight",D="scrollWidth")),E=E,i===Jn||(i===er||i===Fr)&&o===Hc){x=Lr;var T=d&&E===_&&_.visualViewport?_.visualViewport.height:E[C];h-=T-r.height,h*=l?1:-1}if(i===er||(i===Jn||i===Lr)&&o===Hc){w=Fr;var j=d&&E===_&&_.visualViewport?_.visualViewport.width:E[D];p-=j-r.width,p*=l?1:-1}}var A=Object.assign({position:s},c&&zne),P=u===!0?Vne({x:p,y:h},vr(n)):{x:p,y:h};if(p=P.x,h=P.y,l){var N;return Object.assign({},A,(N={},N[x]=S?"0":"",N[w]=b?"0":"",N.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",N))}return Object.assign({},A,(t={},t[x]=S?h+"px":"",t[w]=b?p+"px":"",t.transform="",t))}function Hne(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:xi(t.placement),variation:ol(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,d2(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,d2(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 Yne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hne,data:{}};var wd={passive:!0};function Une(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=vr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,wd)}),s&&l.addEventListener("resize",n.update,wd),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,wd)}),s&&l.removeEventListener("resize",n.update,wd)}}const Kne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Une,data:{}};var qne={left:"right",right:"left",bottom:"top",top:"bottom"};function tf(e){return e.replace(/left|right|bottom|top/g,function(t){return qne[t]})}var Gne={start:"end",end:"start"};function f2(e){return e.replace(/start|end/g,function(t){return Gne[t]})}function Px(e){var t=vr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function kx(e){return il(oa(e)).left+Px(e).scrollLeft}function Xne(e,t){var n=vr(e),r=oa(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=tj();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+kx(e),y:l}}function Qne(e){var t,n=oa(e),r=Px(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Va(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Va(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+kx(e),l=-r.scrollTop;return po(i||n).direction==="rtl"&&(s+=Va(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Cx(e){var t=po(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function aj(e){return["html","body","#document"].indexOf(ki(e))>=0?e.ownerDocument.body:Mr(e)&&Cx(e)?e:aj($h(e))}function vc(e,t){var n;t===void 0&&(t=[]);var r=aj(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=vr(r),a=i?[o].concat(o.visualViewport||[],Cx(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(vc($h(a)))}function Ay(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Zne(e,t){var n=il(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function p2(e,t,n){return t===ZN?Ay(Xne(e,n)):es(t)?Zne(t,n):Ay(Qne(oa(e)))}function Jne(e){var t=vc($h(e)),n=["absolute","fixed"].indexOf(po(e).position)>=0,r=n&&Mr(e)?Iu(e):e;return es(r)?t.filter(function(i){return es(i)&&nj(i,r)&&ki(i)!=="body"}):[]}function ere(e,t,n,r){var i=t==="clippingParents"?Jne(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=p2(e,c,r);return l.top=Va(u.top,l.top),l.right=dp(u.right,l.right),l.bottom=dp(u.bottom,l.bottom),l.left=Va(u.left,l.left),l},p2(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function sj(e){var t=e.reference,n=e.element,r=e.placement,i=r?xi(r):null,o=r?ol(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Jn:l={x:a,y:t.y-n.height};break;case Lr:l={x:a,y:t.y+t.height};break;case Fr:l={x:t.x+t.width,y:s};break;case er:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?Ex(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case nl:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Hc:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Yc(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?wne:s,c=n.rootBoundary,u=c===void 0?ZN:c,d=n.elementContext,f=d===void 0?Hl:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,b=ij(typeof g!="number"?g:oj(g,Ru)),S=f===Hl?_ne:Hl,w=e.rects.popper,x=e.elements[m?S:f],_=ere(es(x)?x:x.contextElement||oa(e.elements.popper),l,u,a),E=il(e.elements.reference),C=sj({reference:E,element:w,placement:i}),D=Ay(Object.assign({},w,C)),T=f===Hl?D:E,j={top:_.top-T.top+b.top,bottom:T.bottom-_.bottom+b.bottom,left:_.left-T.left+b.left,right:T.right-_.right+b.right},A=e.modifiersData.offset;if(f===Hl&&A){var P=A[i];Object.keys(j).forEach(function(N){var M=[Fr,Lr].indexOf(N)>=0?1:-1,I=[Jn,Lr].indexOf(N)>=0?"y":"x";j[N]+=P[I]*M})}return j}function tre(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?JN:l,u=ol(r),d=u?s?c2:c2.filter(function(m){return ol(m)===u}):Ru,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=Yc(e,{placement:h,boundary:i,rootBoundary:o,padding:a})[xi(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function nre(e){if(xi(e)===_x)return[];var t=tf(e);return[f2(e),t,f2(t)]}function rre(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,b=xi(g),S=b===g,w=l||(S||!m?[tf(g)]:nre(g)),x=[g].concat(w).reduce(function(J,ee){return J.concat(xi(ee)===_x?tre(t,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,E=t.rects.popper,C=new Map,D=!0,T=x[0],j=0;j<x.length;j++){var A=x[j],P=xi(A),N=ol(A)===nl,M=[Jn,Lr].indexOf(P)>=0,I=M?"width":"height",L=Yc(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),$=M?N?Fr:er:N?Lr:Jn;_[I]>E[I]&&($=tf($));var V=tf($),z=[];if(o&&z.push(L[P]<=0),s&&z.push(L[$]<=0,L[V]<=0),z.every(function(J){return J})){T=A,D=!1;break}C.set(A,z)}if(D)for(var B=m?3:1,X=function(ee){var ie=x.find(function(ae){var ue=C.get(ae);if(ue)return ue.slice(0,ee).every(function(U){return U})});if(ie)return T=ie,"break"},q=B;q>0;q--){var re=X(q);if(re==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}const ire={name:"flip",enabled:!0,phase:"main",fn:rre,requiresIfExists:["offset"],data:{_skip:!1}};function h2(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function m2(e){return[Jn,Fr,Lr,er].some(function(t){return e[t]>=0})}function ore(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Yc(t,{elementContext:"reference"}),s=Yc(t,{altBoundary:!0}),l=h2(a,r),c=h2(s,i,o),u=m2(l),d=m2(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const are={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ore};function sre(e,t,n){var r=xi(e),i=[er,Jn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[er,Fr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function lre(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=JN.reduce(function(u,d){return u[d]=sre(d,t.rects,o),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const cre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lre};function ure(e){var t=e.state,n=e.name;t.modifiersData[n]=sj({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const dre={name:"popperOffsets",enabled:!0,phase:"read",fn:ure,data:{}};function fre(e){return e==="x"?"y":"x"}function pre(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=Yc(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=xi(t.placement),S=ol(t.placement),w=!S,x=Ex(b),_=fre(x),E=t.modifiersData.popperOffsets,C=t.rects.reference,D=t.rects.popper,T=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,j=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(E){if(o){var N,M=x==="y"?Jn:er,I=x==="y"?Lr:Fr,L=x==="y"?"height":"width",$=E[x],V=$+g[M],z=$-g[I],B=p?-D[L]/2:0,X=S===nl?C[L]:D[L],q=S===nl?-D[L]:-C[L],re=t.elements.arrow,J=p&&re?Ox(re):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rj(),ie=ee[M],ae=ee[I],ue=gc(0,C[L],J[L]),U=w?C[L]/2-B-ue-ie-j.mainAxis:X-ue-ie-j.mainAxis,K=w?-C[L]/2+B+ue+ae+j.mainAxis:q+ue+ae+j.mainAxis,Z=t.elements.arrow&&Iu(t.elements.arrow),R=Z?x==="y"?Z.clientTop||0:Z.clientLeft||0:0,ge=(N=A?.[x])!=null?N:0,te=$+U-ge-R,ve=$+K-ge,we=gc(p?dp(V,te):V,$,p?Va(z,ve):z);E[x]=we,P[x]=we-$}if(s){var Fe,st=x==="x"?Jn:er,_t=x==="x"?Lr:Fr,ut=E[_],Ye=_==="y"?"height":"width",At=ut+g[st],Ht=ut-g[_t],mt=[Jn,er].indexOf(b)!==-1,gn=(Fe=A?.[_])!=null?Fe:0,an=mt?At:ut-C[Ye]-D[Ye]-gn+j.altAxis,vn=mt?ut+C[Ye]+D[Ye]-gn-j.altAxis:Ht,Bn=p&&mt?Lne(an,ut,vn):gc(p?an:At,ut,p?vn:Ht);E[_]=Bn,P[_]=Bn-ut}t.modifiersData[r]=P}}const hre={name:"preventOverflow",enabled:!0,phase:"main",fn:pre,requiresIfExists:["offset"]};function mre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gre(e){return e===vr(e)||!Mr(e)?Px(e):mre(e)}function vre(e){var t=e.getBoundingClientRect(),n=rl(t.width)/e.offsetWidth||1,r=rl(t.height)/e.offsetHeight||1;return n!==1||r!==1}function yre(e,t,n){n===void 0&&(n=!1);var r=Mr(t),i=Mr(t)&&vre(t),o=oa(t),a=il(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ki(t)!=="body"||Cx(o))&&(s=gre(t)),Mr(t)?(l=il(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=kx(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function bre(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function xre(e){var t=bre(e);return Mne.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function wre(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function _re(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var g2={placement:"bottom",modifiers:[],strategy:"absolute"};function v2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Sre(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?g2:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},g2,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;h(),u.options=Object.assign({},o,u.options,S),u.scrollParents={reference:es(s)?vc(s):s.contextElement?vc(s.contextElement):[],popper:vc(l)};var w=xre(_re([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(x){return x.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var b=u.elements,S=b.reference,w=b.popper;if(v2(S,w)){u.rects={reference:yre(S,Iu(w),u.options.strategy==="fixed"),popper:Ox(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var _=u.orderedModifiers[x],E=_.fn,C=_.options,D=C===void 0?{}:C,T=_.name;typeof E=="function"&&(u=E({state:u,options:D,name:T,instance:p})||u)}}}},update:wre(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){h(),f=!0}};if(!v2(s,l))return p;p.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var b=g.name,S=g.options,w=S===void 0?{}:S,x=g.effect;if(typeof x=="function"){var _=x({state:u,name:b,instance:p,options:w}),E=function(){};d.push(_||E)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}var Ore=[Kne,dre,Yne,ej,cre,ire,hre,Wne,are],lj=Sre({defaultModifiers:Ore});function cj(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:GN(n,r),{props:s,internalRef:l}=QN({...o,externalSlotProps:a}),c=In(l,a?.ref,e.additionalProps?.ref);return qN(t,{...s,ref:c},r)}function _l(e){return parseInt(O.version,10)>=19?e?.props?.ref||null:e?.ref||null}function Ere(e){return typeof e=="function"?e():e}const Uc=O.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=O.useState(null),l=In(O.isValidElement(r)?_l(r):null,n);if(io(()=>{o||s(Ere(i)||document.body)},[i,o]),io(()=>{if(a&&!o)return aw(n,a),()=>{aw(n,null)}},[n,a,o]),o){if(O.isValidElement(r)){const c={ref:l};return O.cloneElement(r,c)}return r}return a&&gk.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(Uc.propTypes={children:y.node,container:y.oneOfType([fo,y.func]),disablePortal:y.bool});process.env.NODE_ENV!=="production"&&(Uc.propTypes=Hk(Uc.propTypes));function Pre(e){return pn("MuiPopper",e)}Ln("MuiPopper",["root"]);function kre(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function fp(e){return typeof e=="function"?e():e}function Bh(e){return e.nodeType!==void 0}function Cre(e){return!Bh(e)}const Dre=e=>{const{classes:t}=e;return Dn({root:["root"]},Pre,t)},Are={},Tre=O.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:h,...g}=t,b=O.useRef(null),S=In(b,n),w=O.useRef(null),x=In(w,d),_=O.useRef(x);io(()=>{_.current=x},[x]),O.useImperativeHandle(d,()=>w.current,[]);const E=kre(c,o),[C,D]=O.useState(E),[T,j]=O.useState(fp(r));O.useEffect(()=>{w.current&&w.current.forceUpdate()}),O.useEffect(()=>{r&&j(fp(r))},[r]),io(()=>{if(!T||!l)return;const I=V=>{D(V.placement)};if(process.env.NODE_ENV!=="production"&&T&&Bh(T)&&T.nodeType===1){const V=T.getBoundingClientRect();process.env.NODE_ENV!=="test"&&V.top===0&&V.left===0&&V.right===0&&V.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
227
+ `))}return!1}function bne(e){return typeof e.main=="string"}function xne(e,t=[]){if(!bne(e))return!1;for(const n of t)if(!e.hasOwnProperty(n)||typeof e[n]!="string")return!1;return!0}function wx(e=[]){return([,t])=>t&&xne(t,e)}function fo(e,t,n,r,i){if(process.env.NODE_ENV==="production")return null;const o=e[t],a=i||t;return o==null?null:o&&o.nodeType!==1?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an HTMLElement.`):null}var Jn="top",Lr="bottom",Fr="right",er="left",_x="auto",Ru=[Jn,Lr,Fr,er],nl="start",Hc="end",wne="clippingParents",ZN="viewport",Hl="popper",_ne="reference",c2=Ru.reduce(function(e,t){return e.concat([t+"-"+nl,t+"-"+Hc])},[]),JN=[].concat(Ru,[_x]).reduce(function(e,t){return e.concat([t,t+"-"+nl,t+"-"+Hc])},[]),Sne="beforeRead",One="read",Ene="afterRead",Pne="beforeMain",kne="main",Cne="afterMain",Dne="beforeWrite",Ane="write",Tne="afterWrite",Mne=[Sne,One,Ene,Pne,kne,Cne,Dne,Ane,Tne];function ki(e){return e?(e.nodeName||"").toLowerCase():null}function vr(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function es(e){var t=vr(e).Element;return e instanceof t||e instanceof Element}function Mr(e){var t=vr(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Sx(e){if(typeof ShadowRoot>"u")return!1;var t=vr(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function Nne(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var r=t.styles[n]||{},i=t.attributes[n]||{},o=t.elements[n];!Mr(o)||!ki(o)||(Object.assign(o.style,r),Object.keys(i).forEach(function(a){var s=i[a];s===!1?o.removeAttribute(a):o.setAttribute(a,s===!0?"":s)}))})}function jne(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(r){var i=t.elements[r],o=t.attributes[r]||{},a=Object.keys(t.styles.hasOwnProperty(r)?t.styles[r]:n[r]),s=a.reduce(function(l,c){return l[c]="",l},{});!Mr(i)||!ki(i)||(Object.assign(i.style,s),Object.keys(o).forEach(function(l){i.removeAttribute(l)}))})}}const ej={name:"applyStyles",enabled:!0,phase:"write",fn:Nne,effect:jne,requires:["computeStyles"]};function xi(e){return e.split("-")[0]}var Va=Math.max,dp=Math.min,rl=Math.round;function Dy(){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 tj(){return!/^((?!chrome|android).)*safari/i.test(Dy())}function il(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,o=1;t&&Mr(e)&&(i=e.offsetWidth>0&&rl(r.width)/e.offsetWidth||1,o=e.offsetHeight>0&&rl(r.height)/e.offsetHeight||1);var a=es(e)?vr(e):window,s=a.visualViewport,l=!tj()&&n,c=(r.left+(l&&s?s.offsetLeft:0))/i,u=(r.top+(l&&s?s.offsetTop:0))/o,d=r.width/i,f=r.height/o;return{width:d,height:f,top:u,right:c+d,bottom:u+f,left:c,x:c,y:u}}function Ox(e){var t=il(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function nj(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Sx(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function po(e){return vr(e).getComputedStyle(e)}function Rne(e){return["table","td","th"].indexOf(ki(e))>=0}function oa(e){return((es(e)?e.ownerDocument:e.document)||window.document).documentElement}function $h(e){return ki(e)==="html"?e:e.assignedSlot||e.parentNode||(Sx(e)?e.host:null)||oa(e)}function u2(e){return!Mr(e)||po(e).position==="fixed"?null:e.offsetParent}function Ine(e){var t=/firefox/i.test(Dy()),n=/Trident/i.test(Dy());if(n&&Mr(e)){var r=po(e);if(r.position==="fixed")return null}var i=$h(e);for(Sx(i)&&(i=i.host);Mr(i)&&["html","body"].indexOf(ki(i))<0;){var o=po(i);if(o.transform!=="none"||o.perspective!=="none"||o.contain==="paint"||["transform","perspective"].indexOf(o.willChange)!==-1||t&&o.willChange==="filter"||t&&o.filter&&o.filter!=="none")return i;i=i.parentNode}return null}function Iu(e){for(var t=vr(e),n=u2(e);n&&Rne(n)&&po(n).position==="static";)n=u2(n);return n&&(ki(n)==="html"||ki(n)==="body"&&po(n).position==="static")?t:n||Ine(e)||t}function Ex(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function gc(e,t,n){return Va(e,dp(t,n))}function Lne(e,t,n){var r=gc(e,t,n);return r>n?n:r}function rj(){return{top:0,right:0,bottom:0,left:0}}function ij(e){return Object.assign({},rj(),e)}function oj(e,t){return t.reduce(function(n,r){return n[r]=e,n},{})}var Fne=function(t,n){return t=typeof t=="function"?t(Object.assign({},n.rects,{placement:n.placement})):t,ij(typeof t!="number"?t:oj(t,Ru))};function $ne(e){var t,n=e.state,r=e.name,i=e.options,o=n.elements.arrow,a=n.modifiersData.popperOffsets,s=xi(n.placement),l=Ex(s),c=[er,Fr].indexOf(s)>=0,u=c?"height":"width";if(!(!o||!a)){var d=Fne(i.padding,n),f=Ox(o),p=l==="y"?Jn:er,m=l==="y"?Lr:Fr,h=n.rects.reference[u]+n.rects.reference[l]-a[l]-n.rects.popper[u],g=a[l]-n.rects.reference[l],b=Iu(o),S=b?l==="y"?b.clientHeight||0:b.clientWidth||0:0,w=h/2-g/2,x=d[p],_=S-f[u]-d[m],E=S/2-f[u]/2+w,C=gc(x,E,_),D=l;n.modifiersData[r]=(t={},t[D]=C,t.centerOffset=C-E,t)}}function Bne(e){var t=e.state,n=e.options,r=n.element,i=r===void 0?"[data-popper-arrow]":r;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||nj(t.elements.popper,i)&&(t.elements.arrow=i))}const Wne={name:"arrow",enabled:!0,phase:"main",fn:$ne,effect:Bne,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function ol(e){return e.split("-")[1]}var zne={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Vne(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:rl(n*i)/i||0,y:rl(r*i)/i||0}}function d2(e){var t,n=e.popper,r=e.popperRect,i=e.placement,o=e.variation,a=e.offsets,s=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,f=a.x,p=f===void 0?0:f,m=a.y,h=m===void 0?0:m,g=typeof u=="function"?u({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var b=a.hasOwnProperty("x"),S=a.hasOwnProperty("y"),w=er,x=Jn,_=window;if(c){var E=Iu(n),C="clientHeight",D="clientWidth";if(E===vr(n)&&(E=oa(n),po(E).position!=="static"&&s==="absolute"&&(C="scrollHeight",D="scrollWidth")),E=E,i===Jn||(i===er||i===Fr)&&o===Hc){x=Lr;var T=d&&E===_&&_.visualViewport?_.visualViewport.height:E[C];h-=T-r.height,h*=l?1:-1}if(i===er||(i===Jn||i===Lr)&&o===Hc){w=Fr;var j=d&&E===_&&_.visualViewport?_.visualViewport.width:E[D];p-=j-r.width,p*=l?1:-1}}var A=Object.assign({position:s},c&&zne),P=u===!0?Vne({x:p,y:h},vr(n)):{x:p,y:h};if(p=P.x,h=P.y,l){var N;return Object.assign({},A,(N={},N[x]=S?"0":"",N[w]=b?"0":"",N.transform=(_.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",N))}return Object.assign({},A,(t={},t[x]=S?h+"px":"",t[w]=b?p+"px":"",t.transform="",t))}function Hne(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,o=n.adaptive,a=o===void 0?!0:o,s=n.roundOffsets,l=s===void 0?!0:s,c={placement:xi(t.placement),variation:ol(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,d2(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:l})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,d2(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 Yne={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Hne,data:{}};var wd={passive:!0};function Une(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,o=i===void 0?!0:i,a=r.resize,s=a===void 0?!0:a,l=vr(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return o&&c.forEach(function(u){u.addEventListener("scroll",n.update,wd)}),s&&l.addEventListener("resize",n.update,wd),function(){o&&c.forEach(function(u){u.removeEventListener("scroll",n.update,wd)}),s&&l.removeEventListener("resize",n.update,wd)}}const Kne={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Une,data:{}};var qne={left:"right",right:"left",bottom:"top",top:"bottom"};function tf(e){return e.replace(/left|right|bottom|top/g,function(t){return qne[t]})}var Gne={start:"end",end:"start"};function f2(e){return e.replace(/start|end/g,function(t){return Gne[t]})}function Px(e){var t=vr(e),n=t.pageXOffset,r=t.pageYOffset;return{scrollLeft:n,scrollTop:r}}function kx(e){return il(oa(e)).left+Px(e).scrollLeft}function Xne(e,t){var n=vr(e),r=oa(e),i=n.visualViewport,o=r.clientWidth,a=r.clientHeight,s=0,l=0;if(i){o=i.width,a=i.height;var c=tj();(c||!c&&t==="fixed")&&(s=i.offsetLeft,l=i.offsetTop)}return{width:o,height:a,x:s+kx(e),y:l}}function Qne(e){var t,n=oa(e),r=Px(e),i=(t=e.ownerDocument)==null?void 0:t.body,o=Va(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),a=Va(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-r.scrollLeft+kx(e),l=-r.scrollTop;return po(i||n).direction==="rtl"&&(s+=Va(n.clientWidth,i?i.clientWidth:0)-o),{width:o,height:a,x:s,y:l}}function Cx(e){var t=po(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function aj(e){return["html","body","#document"].indexOf(ki(e))>=0?e.ownerDocument.body:Mr(e)&&Cx(e)?e:aj($h(e))}function vc(e,t){var n;t===void 0&&(t=[]);var r=aj(e),i=r===((n=e.ownerDocument)==null?void 0:n.body),o=vr(r),a=i?[o].concat(o.visualViewport||[],Cx(r)?r:[]):r,s=t.concat(a);return i?s:s.concat(vc($h(a)))}function Ay(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Zne(e,t){var n=il(e,!1,t==="fixed");return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function p2(e,t,n){return t===ZN?Ay(Xne(e,n)):es(t)?Zne(t,n):Ay(Qne(oa(e)))}function Jne(e){var t=vc($h(e)),n=["absolute","fixed"].indexOf(po(e).position)>=0,r=n&&Mr(e)?Iu(e):e;return es(r)?t.filter(function(i){return es(i)&&nj(i,r)&&ki(i)!=="body"}):[]}function ere(e,t,n,r){var i=t==="clippingParents"?Jne(e):[].concat(t),o=[].concat(i,[n]),a=o[0],s=o.reduce(function(l,c){var u=p2(e,c,r);return l.top=Va(u.top,l.top),l.right=dp(u.right,l.right),l.bottom=dp(u.bottom,l.bottom),l.left=Va(u.left,l.left),l},p2(e,a,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function sj(e){var t=e.reference,n=e.element,r=e.placement,i=r?xi(r):null,o=r?ol(r):null,a=t.x+t.width/2-n.width/2,s=t.y+t.height/2-n.height/2,l;switch(i){case Jn:l={x:a,y:t.y-n.height};break;case Lr:l={x:a,y:t.y+t.height};break;case Fr:l={x:t.x+t.width,y:s};break;case er:l={x:t.x-n.width,y:s};break;default:l={x:t.x,y:t.y}}var c=i?Ex(i):null;if(c!=null){var u=c==="y"?"height":"width";switch(o){case nl:l[c]=l[c]-(t[u]/2-n[u]/2);break;case Hc:l[c]=l[c]+(t[u]/2-n[u]/2);break}}return l}function Yc(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,o=n.strategy,a=o===void 0?e.strategy:o,s=n.boundary,l=s===void 0?wne:s,c=n.rootBoundary,u=c===void 0?ZN:c,d=n.elementContext,f=d===void 0?Hl:d,p=n.altBoundary,m=p===void 0?!1:p,h=n.padding,g=h===void 0?0:h,b=ij(typeof g!="number"?g:oj(g,Ru)),S=f===Hl?_ne:Hl,w=e.rects.popper,x=e.elements[m?S:f],_=ere(es(x)?x:x.contextElement||oa(e.elements.popper),l,u,a),E=il(e.elements.reference),C=sj({reference:E,element:w,placement:i}),D=Ay(Object.assign({},w,C)),T=f===Hl?D:E,j={top:_.top-T.top+b.top,bottom:T.bottom-_.bottom+b.bottom,left:_.left-T.left+b.left,right:T.right-_.right+b.right},A=e.modifiersData.offset;if(f===Hl&&A){var P=A[i];Object.keys(j).forEach(function(N){var M=[Fr,Lr].indexOf(N)>=0?1:-1,I=[Jn,Lr].indexOf(N)>=0?"y":"x";j[N]+=P[I]*M})}return j}function tre(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,o=n.rootBoundary,a=n.padding,s=n.flipVariations,l=n.allowedAutoPlacements,c=l===void 0?JN:l,u=ol(r),d=u?s?c2:c2.filter(function(m){return ol(m)===u}):Ru,f=d.filter(function(m){return c.indexOf(m)>=0});f.length===0&&(f=d);var p=f.reduce(function(m,h){return m[h]=Yc(e,{placement:h,boundary:i,rootBoundary:o,padding:a})[xi(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function nre(e){if(xi(e)===_x)return[];var t=tf(e);return[f2(e),t,f2(t)]}function rre(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!0:a,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,b=xi(g),S=b===g,w=l||(S||!m?[tf(g)]:nre(g)),x=[g].concat(w).reduce(function(J,ee){return J.concat(xi(ee)===_x?tre(t,{placement:ee,boundary:u,rootBoundary:d,padding:c,flipVariations:m,allowedAutoPlacements:h}):ee)},[]),_=t.rects.reference,E=t.rects.popper,C=new Map,D=!0,T=x[0],j=0;j<x.length;j++){var A=x[j],P=xi(A),N=ol(A)===nl,M=[Jn,Lr].indexOf(P)>=0,I=M?"width":"height",L=Yc(t,{placement:A,boundary:u,rootBoundary:d,altBoundary:f,padding:c}),$=M?N?Fr:er:N?Lr:Jn;_[I]>E[I]&&($=tf($));var V=tf($),z=[];if(o&&z.push(L[P]<=0),s&&z.push(L[$]<=0,L[V]<=0),z.every(function(J){return J})){T=A,D=!1;break}C.set(A,z)}if(D)for(var B=m?3:1,X=function(ee){var ie=x.find(function(ae){var ue=C.get(ae);if(ue)return ue.slice(0,ee).every(function(U){return U})});if(ie)return T=ie,"break"},q=B;q>0;q--){var re=X(q);if(re==="break")break}t.placement!==T&&(t.modifiersData[r]._skip=!0,t.placement=T,t.reset=!0)}}const ire={name:"flip",enabled:!0,phase:"main",fn:rre,requiresIfExists:["offset"],data:{_skip:!1}};function h2(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function m2(e){return[Jn,Fr,Lr,er].some(function(t){return e[t]>=0})}function ore(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,o=t.modifiersData.preventOverflow,a=Yc(t,{elementContext:"reference"}),s=Yc(t,{altBoundary:!0}),l=h2(a,r),c=h2(s,i,o),u=m2(l),d=m2(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}const are={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:ore};function sre(e,t,n){var r=xi(e),i=[er,Jn].indexOf(r)>=0?-1:1,o=typeof n=="function"?n(Object.assign({},t,{placement:e})):n,a=o[0],s=o[1];return a=a||0,s=(s||0)*i,[er,Fr].indexOf(r)>=0?{x:s,y:a}:{x:a,y:s}}function lre(e){var t=e.state,n=e.options,r=e.name,i=n.offset,o=i===void 0?[0,0]:i,a=JN.reduce(function(u,d){return u[d]=sre(d,t.rects,o),u},{}),s=a[t.placement],l=s.x,c=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=a}const cre={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:lre};function ure(e){var t=e.state,n=e.name;t.modifiersData[n]=sj({reference:t.rects.reference,element:t.rects.popper,placement:t.placement})}const dre={name:"popperOffsets",enabled:!0,phase:"read",fn:ure,data:{}};function fre(e){return e==="x"?"y":"x"}function pre(e){var t=e.state,n=e.options,r=e.name,i=n.mainAxis,o=i===void 0?!0:i,a=n.altAxis,s=a===void 0?!1:a,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,f=n.tether,p=f===void 0?!0:f,m=n.tetherOffset,h=m===void 0?0:m,g=Yc(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),b=xi(t.placement),S=ol(t.placement),w=!S,x=Ex(b),_=fre(x),E=t.modifiersData.popperOffsets,C=t.rects.reference,D=t.rects.popper,T=typeof h=="function"?h(Object.assign({},t.rects,{placement:t.placement})):h,j=typeof T=="number"?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,P={x:0,y:0};if(E){if(o){var N,M=x==="y"?Jn:er,I=x==="y"?Lr:Fr,L=x==="y"?"height":"width",$=E[x],V=$+g[M],z=$-g[I],B=p?-D[L]/2:0,X=S===nl?C[L]:D[L],q=S===nl?-D[L]:-C[L],re=t.elements.arrow,J=p&&re?Ox(re):{width:0,height:0},ee=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:rj(),ie=ee[M],ae=ee[I],ue=gc(0,C[L],J[L]),U=w?C[L]/2-B-ue-ie-j.mainAxis:X-ue-ie-j.mainAxis,K=w?-C[L]/2+B+ue+ae+j.mainAxis:q+ue+ae+j.mainAxis,Z=t.elements.arrow&&Iu(t.elements.arrow),R=Z?x==="y"?Z.clientTop||0:Z.clientLeft||0:0,ge=(N=A?.[x])!=null?N:0,te=$+U-ge-R,ve=$+K-ge,we=gc(p?dp(V,te):V,$,p?Va(z,ve):z);E[x]=we,P[x]=we-$}if(s){var Fe,st=x==="x"?Jn:er,_t=x==="x"?Lr:Fr,ut=E[_],Ye=_==="y"?"height":"width",At=ut+g[st],Yt=ut-g[_t],mt=[Jn,er].indexOf(b)!==-1,gn=(Fe=A?.[_])!=null?Fe:0,an=mt?At:ut-C[Ye]-D[Ye]-gn+j.altAxis,vn=mt?ut+C[Ye]+D[Ye]-gn-j.altAxis:Yt,Bn=p&&mt?Lne(an,ut,vn):gc(p?an:At,ut,p?vn:Yt);E[_]=Bn,P[_]=Bn-ut}t.modifiersData[r]=P}}const hre={name:"preventOverflow",enabled:!0,phase:"main",fn:pre,requiresIfExists:["offset"]};function mre(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function gre(e){return e===vr(e)||!Mr(e)?Px(e):mre(e)}function vre(e){var t=e.getBoundingClientRect(),n=rl(t.width)/e.offsetWidth||1,r=rl(t.height)/e.offsetHeight||1;return n!==1||r!==1}function yre(e,t,n){n===void 0&&(n=!1);var r=Mr(t),i=Mr(t)&&vre(t),o=oa(t),a=il(e,i,n),s={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&((ki(t)!=="body"||Cx(o))&&(s=gre(t)),Mr(t)?(l=il(t,!0),l.x+=t.clientLeft,l.y+=t.clientTop):o&&(l.x=kx(o))),{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function bre(e){var t=new Map,n=new Set,r=[];e.forEach(function(o){t.set(o.name,o)});function i(o){n.add(o.name);var a=[].concat(o.requires||[],o.requiresIfExists||[]);a.forEach(function(s){if(!n.has(s)){var l=t.get(s);l&&i(l)}}),r.push(o)}return e.forEach(function(o){n.has(o.name)||i(o)}),r}function xre(e){var t=bre(e);return Mne.reduce(function(n,r){return n.concat(t.filter(function(i){return i.phase===r}))},[])}function wre(e){var t;return function(){return t||(t=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})})),t}}function _re(e){var t=e.reduce(function(n,r){var i=n[r.name];return n[r.name]=i?Object.assign({},i,r,{options:Object.assign({},i.options,r.options),data:Object.assign({},i.data,r.data)}):r,n},{});return Object.keys(t).map(function(n){return t[n]})}var g2={placement:"bottom",modifiers:[],strategy:"absolute"};function v2(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some(function(r){return!(r&&typeof r.getBoundingClientRect=="function")})}function Sre(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,o=i===void 0?g2:i;return function(s,l,c){c===void 0&&(c=o);var u={placement:"bottom",orderedModifiers:[],options:Object.assign({},g2,o),modifiersData:{},elements:{reference:s,popper:l},attributes:{},styles:{}},d=[],f=!1,p={state:u,setOptions:function(b){var S=typeof b=="function"?b(u.options):b;h(),u.options=Object.assign({},o,u.options,S),u.scrollParents={reference:es(s)?vc(s):s.contextElement?vc(s.contextElement):[],popper:vc(l)};var w=xre(_re([].concat(r,u.options.modifiers)));return u.orderedModifiers=w.filter(function(x){return x.enabled}),m(),p.update()},forceUpdate:function(){if(!f){var b=u.elements,S=b.reference,w=b.popper;if(v2(S,w)){u.rects={reference:yre(S,Iu(w),u.options.strategy==="fixed"),popper:Ox(w)},u.reset=!1,u.placement=u.options.placement,u.orderedModifiers.forEach(function(j){return u.modifiersData[j.name]=Object.assign({},j.data)});for(var x=0;x<u.orderedModifiers.length;x++){if(u.reset===!0){u.reset=!1,x=-1;continue}var _=u.orderedModifiers[x],E=_.fn,C=_.options,D=C===void 0?{}:C,T=_.name;typeof E=="function"&&(u=E({state:u,options:D,name:T,instance:p})||u)}}}},update:wre(function(){return new Promise(function(g){p.forceUpdate(),g(u)})}),destroy:function(){h(),f=!0}};if(!v2(s,l))return p;p.setOptions(c).then(function(g){!f&&c.onFirstUpdate&&c.onFirstUpdate(g)});function m(){u.orderedModifiers.forEach(function(g){var b=g.name,S=g.options,w=S===void 0?{}:S,x=g.effect;if(typeof x=="function"){var _=x({state:u,name:b,instance:p,options:w}),E=function(){};d.push(_||E)}})}function h(){d.forEach(function(g){return g()}),d=[]}return p}}var Ore=[Kne,dre,Yne,ej,cre,ire,hre,Wne,are],lj=Sre({defaultModifiers:Ore});function cj(e){const{elementType:t,externalSlotProps:n,ownerState:r,skipResolvingSlotProps:i=!1,...o}=e,a=i?{}:GN(n,r),{props:s,internalRef:l}=QN({...o,externalSlotProps:a}),c=In(l,a?.ref,e.additionalProps?.ref);return qN(t,{...s,ref:c},r)}function _l(e){return parseInt(O.version,10)>=19?e?.props?.ref||null:e?.ref||null}function Ere(e){return typeof e=="function"?e():e}const Uc=O.forwardRef(function(t,n){const{children:r,container:i,disablePortal:o=!1}=t,[a,s]=O.useState(null),l=In(O.isValidElement(r)?_l(r):null,n);if(io(()=>{o||s(Ere(i)||document.body)},[i,o]),io(()=>{if(a&&!o)return aw(n,a),()=>{aw(n,null)}},[n,a,o]),o){if(O.isValidElement(r)){const c={ref:l};return O.cloneElement(r,c)}return r}return a&&gk.createPortal(r,a)});process.env.NODE_ENV!=="production"&&(Uc.propTypes={children:y.node,container:y.oneOfType([fo,y.func]),disablePortal:y.bool});process.env.NODE_ENV!=="production"&&(Uc.propTypes=Hk(Uc.propTypes));function Pre(e){return pn("MuiPopper",e)}Ln("MuiPopper",["root"]);function kre(e,t){if(t==="ltr")return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}function fp(e){return typeof e=="function"?e():e}function Bh(e){return e.nodeType!==void 0}function Cre(e){return!Bh(e)}const Dre=e=>{const{classes:t}=e;return Dn({root:["root"]},Pre,t)},Are={},Tre=O.forwardRef(function(t,n){const{anchorEl:r,children:i,direction:o,disablePortal:a,modifiers:s,open:l,placement:c,popperOptions:u,popperRef:d,slotProps:f={},slots:p={},TransitionProps:m,ownerState:h,...g}=t,b=O.useRef(null),S=In(b,n),w=O.useRef(null),x=In(w,d),_=O.useRef(x);io(()=>{_.current=x},[x]),O.useImperativeHandle(d,()=>w.current,[]);const E=kre(c,o),[C,D]=O.useState(E),[T,j]=O.useState(fp(r));O.useEffect(()=>{w.current&&w.current.forceUpdate()}),O.useEffect(()=>{r&&j(fp(r))},[r]),io(()=>{if(!T||!l)return;const I=V=>{D(V.placement)};if(process.env.NODE_ENV!=="production"&&T&&Bh(T)&&T.nodeType===1){const V=T.getBoundingClientRect();process.env.NODE_ENV!=="test"&&V.top===0&&V.left===0&&V.right===0&&V.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
228
228
  `))}let L=[{name:"preventOverflow",options:{altBoundary:a}},{name:"flip",options:{altBoundary:a}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:({state:V})=>{I(V)}}];s!=null&&(L=L.concat(s)),u&&u.modifiers!=null&&(L=L.concat(u.modifiers));const $=lj(T,b.current,{placement:E,...u,modifiers:L});return _.current($),()=>{$.destroy(),_.current(null)}},[T,a,s,l,u,E]);const A={placement:C};m!==null&&(A.TransitionProps=m);const P=Dre(t),N=p.root??"div",M=cj({elementType:N,externalSlotProps:f.root,externalForwardedProps:g,additionalProps:{role:"tooltip",ref:S},ownerState:t,className:P.root});return v.jsx(N,{...M,children:typeof i=="function"?i(A):i})}),uj=O.forwardRef(function(t,n){const{anchorEl:r,children:i,container:o,direction:a="ltr",disablePortal:s=!1,keepMounted:l=!1,modifiers:c,open:u,placement:d="bottom",popperOptions:f=Are,popperRef:p,style:m,transition:h=!1,slotProps:g={},slots:b={},...S}=t,[w,x]=O.useState(!0),_=()=>{x(!1)},E=()=>{x(!0)};if(!l&&!u&&(!h||w))return null;let C;if(o)C=o;else if(r){const j=fp(r);C=j&&Bh(j)?mr(j).body:mr(null).body}const D=!u&&l&&(!h||w)?"none":void 0,T=h?{in:u,onEnter:_,onExited:E}:void 0;return v.jsx(Uc,{disablePortal:s,container:C,children:v.jsx(Tre,{anchorEl:r,direction:a,disablePortal:s,modifiers:c,ref:n,open:h?!w:u,placement:d,popperOptions:f,popperRef:p,slotProps:g,slots:b,...S,style:{position:"fixed",top:0,left:0,display:D,...m},TransitionProps:T,children:i})})});process.env.NODE_ENV!=="production"&&(uj.propTypes={anchorEl:wl(y.oneOfType([fo,y.object,y.func]),e=>{if(e.open){const t=fp(e.anchorEl);if(t&&Bh(t)&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
229
229
  `))}else if(!t||typeof t.getBoundingClientRect!="function"||Cre(t)&&t.contextElement!=null&&t.contextElement.nodeType!==1)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","It should be an HTML element instance or a virtualElement ","(https://popper.js.org/docs/v2/virtual-elements/)."].join(`
230
230
  `))}return null}),children:y.oneOfType([y.node,y.func]),container:y.oneOfType([fo,y.func]),direction:y.oneOf(["ltr","rtl"]),disablePortal:y.bool,keepMounted:y.bool,modifiers:y.arrayOf(y.shape({data:y.object,effect:y.func,enabled:y.bool,fn:y.func,name:y.any,options:y.object,phase:y.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:y.arrayOf(y.string),requiresIfExists:y.arrayOf(y.string)})),open:y.bool.isRequired,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:y.shape({modifiers:y.array,onFirstUpdate:y.func,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:y.oneOf(["absolute","fixed"])}),popperRef:So,slotProps:y.shape({root:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType}),transition:y.bool});const Mre=Ce(uj,{name:"MuiPopper",slot:"Root"})({}),Dx=O.forwardRef(function(t,n){const r=tb(),i=rr({props:t,name:"MuiPopper"}),{anchorEl:o,component:a,components:s,componentsProps:l,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:h,popperRef:g,transition:b,slots:S,slotProps:w,...x}=i,_=S?.root??s?.Root,E={anchorEl:o,container:c,disablePortal:u,keepMounted:d,modifiers:f,open:p,placement:m,popperOptions:h,popperRef:g,transition:b,...x};return v.jsx(Mre,{as:a,direction:r?"rtl":"ltr",slots:{root:_},slotProps:w??l,...E,ref:n})});process.env.NODE_ENV!=="production"&&(Dx.propTypes={anchorEl:y.oneOfType([fo,y.object,y.func]),children:y.oneOfType([y.node,y.func]),component:y.elementType,components:y.shape({Root:y.elementType}),componentsProps:y.shape({root:y.oneOfType([y.func,y.object])}),container:y.oneOfType([fo,y.func]),disablePortal:y.bool,keepMounted:y.bool,modifiers:y.arrayOf(y.shape({data:y.object,effect:y.func,enabled:y.bool,fn:y.func,name:y.any,options:y.object,phase:y.oneOf(["afterMain","afterRead","afterWrite","beforeMain","beforeRead","beforeWrite","main","read","write"]),requires:y.arrayOf(y.string),requiresIfExists:y.arrayOf(y.string)})),open:y.bool.isRequired,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),popperOptions:y.shape({modifiers:y.array,onFirstUpdate:y.func,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),strategy:y.oneOf(["absolute","fixed"])}),popperRef:So,slotProps:y.shape({root:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transition:y.bool});function _d(e){return parseInt(e,10)||0}const Nre={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function jre(e){for(const t in e)return!1;return!0}function y2(e){return jre(e)||e.outerHeightStyle===0&&!e.overflowing}const dj=O.forwardRef(function(t,n){const{onChange:r,maxRows:i,minRows:o=1,style:a,value:s,...l}=t,{current:c}=O.useRef(s!=null),u=O.useRef(null),d=In(n,u),f=O.useRef(null),p=O.useRef(null),m=O.useCallback(()=>{const w=u.current,x=p.current;if(!w||!x)return;const E=oo(w).getComputedStyle(w);if(E.width==="0px")return{outerHeightStyle:0,overflowing:!1};x.style.width=E.width,x.value=w.value||t.placeholder||"x",x.value.slice(-1)===`
231
231
  `&&(x.value+=" ");const C=E.boxSizing,D=_d(E.paddingBottom)+_d(E.paddingTop),T=_d(E.borderBottomWidth)+_d(E.borderTopWidth),j=x.scrollHeight;x.value="x";const A=x.scrollHeight;let P=j;o&&(P=Math.max(Number(o)*A,P)),i&&(P=Math.min(Number(i)*A,P)),P=Math.max(P,A);const N=P+(C==="border-box"?D+T:0),M=Math.abs(P-j)<=1;return{outerHeightStyle:N,overflowing:M}},[i,o,t.placeholder]),h=Cc(()=>{const w=u.current,x=m();if(!w||!x||y2(x))return!1;const _=x.outerHeightStyle;return f.current!=null&&f.current!==_}),g=O.useCallback(()=>{const w=u.current,x=m();if(!w||!x||y2(x))return;const _=x.outerHeightStyle;f.current!==_&&(f.current=_,w.style.height=`${_}px`),w.style.overflow=x.overflowing?"hidden":""},[m]),b=O.useRef(-1);io(()=>{const w=eC(g),x=u?.current;if(!x)return;const _=oo(x);_.addEventListener("resize",w);let E;return typeof ResizeObserver<"u"&&(E=new ResizeObserver(()=>{h()&&(E.unobserve(x),cancelAnimationFrame(b.current),g(),b.current=requestAnimationFrame(()=>{E.observe(x)}))}),E.observe(x)),()=>{w.clear(),cancelAnimationFrame(b.current),_.removeEventListener("resize",w),E&&E.disconnect()}},[m,g,h]),io(()=>{g()});const S=w=>{c||g();const x=w.target,_=x.value.length,E=x.value.endsWith(`
232
232
  `),C=x.selectionStart===_;E&&C&&x.setSelectionRange(_,_),r&&r(w)};return v.jsxs(O.Fragment,{children:[v.jsx("textarea",{value:s,onChange:S,ref:d,rows:o,style:a,...l}),v.jsx("textarea",{"aria-hidden":!0,className:t.className,readOnly:!0,ref:p,tabIndex:-1,style:{...Nre.shadow,...a,paddingTop:0,paddingBottom:0}})]})});process.env.NODE_ENV!=="production"&&(dj.propTypes={className:y.string,maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),onChange:y.func,placeholder:y.string,style:y.object,value:y.oneOfType([y.arrayOf(y.string),y.number,y.string])});function Ax({props:e,states:t,muiFormControl:n}){return t.reduce((r,i)=>(r[i]=e[i],n&&typeof e[i]>"u"&&(r[i]=n[i]),r),{})}const Tx=O.createContext(void 0);process.env.NODE_ENV!=="production"&&(Tx.displayName="FormControlContext");function Mx(){return O.useContext(Tx)}function b2(e){return e!=null&&!(Array.isArray(e)&&e.length===0)}function fj(e,t=!1){return e&&(b2(e.value)&&e.value!==""||t&&b2(e.defaultValue)&&e.defaultValue!=="")}function Rre(e){return pn("MuiInputBase",e)}const al=Ln("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]);var x2;const Wh=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,n.size==="small"&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t[`color${un(n.color)}`],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},zh=(e,t)=>{const{ownerState:n}=e;return[t.input,n.size==="small"&&t.inputSizeSmall,n.multiline&&t.inputMultiline,n.type==="search"&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},Ire=e=>{const{classes:t,color:n,disabled:r,error:i,endAdornment:o,focused:a,formControl:s,fullWidth:l,hiddenLabel:c,multiline:u,readOnly:d,size:f,startAdornment:p,type:m}=e,h={root:["root",`color${un(n)}`,r&&"disabled",i&&"error",l&&"fullWidth",a&&"focused",s&&"formControl",f&&f!=="medium"&&`size${un(f)}`,u&&"multiline",p&&"adornedStart",o&&"adornedEnd",c&&"hiddenLabel",d&&"readOnly"],input:["input",r&&"disabled",m==="search"&&"inputTypeSearch",u&&"inputMultiline",f==="small"&&"inputSizeSmall",c&&"inputHiddenLabel",p&&"inputAdornedStart",o&&"inputAdornedEnd",d&&"readOnly"]};return Dn(h,Rre,t)},Vh=Ce("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Wh})(Fn(({theme:e})=>({...e.typography.body1,color:(e.vars||e).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${al.disabled}`]:{color:(e.vars||e).palette.text.disabled,cursor:"default"},variants:[{props:({ownerState:t})=>t.multiline,style:{padding:"4px 0 5px"}},{props:({ownerState:t,size:n})=>t.multiline&&n==="small",style:{paddingTop:1}},{props:({ownerState:t})=>t.fullWidth,style:{width:"100%"}}]}))),Hh=Ce("input",{name:"MuiInputBase",slot:"Input",overridesResolver:zh})(Fn(({theme:e})=>{const t=e.palette.mode==="light",n={color:"currentColor",...e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},transition:e.transitions.create("opacity",{duration:e.transitions.duration.shorter})},r={opacity:"0 !important"},i=e.vars?{opacity:e.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return{font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%","&::-webkit-input-placeholder":n,"&::-moz-placeholder":n,"&::-ms-input-placeholder":n,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${al.formControl} &`]:{"&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&::-ms-input-placeholder":r,"&:focus::-webkit-input-placeholder":i,"&:focus::-moz-placeholder":i,"&:focus::-ms-input-placeholder":i},[`&.${al.disabled}`]:{opacity:1,WebkitTextFillColor:(e.vars||e).palette.text.disabled},variants:[{props:({ownerState:o})=>!o.disableInjectingGlobalStyles,style:{animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}}},{props:{size:"small"},style:{paddingTop:1}},{props:({ownerState:o})=>o.multiline,style:{height:"auto",resize:"none",padding:0,paddingTop:0}},{props:{type:"search"},style:{MozAppearance:"textfield"}}]}})),w2=y5({"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}),Yh=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiInputBase"}),{"aria-describedby":i,autoComplete:o,autoFocus:a,className:s,color:l,components:c={},componentsProps:u={},defaultValue:d,disabled:f,disableInjectingGlobalStyles:p,endAdornment:m,error:h,fullWidth:g=!1,id:b,inputComponent:S="input",inputProps:w={},inputRef:x,margin:_,maxRows:E,minRows:C,multiline:D=!1,name:T,onBlur:j,onChange:A,onClick:P,onFocus:N,onKeyDown:M,onKeyUp:I,placeholder:L,readOnly:$,renderSuffix:V,rows:z,size:B,slotProps:X={},slots:q={},startAdornment:re,type:J="text",value:ee,...ie}=r,ae=w.value!=null?w.value:ee,{current:ue}=O.useRef(ae!=null),U=O.useRef(),K=O.useCallback(ye=>{process.env.NODE_ENV!=="production"&&ye&&ye.nodeName!=="INPUT"&&!ye.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
233
- `))},[]),Z=In(U,x,w.ref,K),[R,ge]=O.useState(!1),te=Mx();process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(te)return te.registerEffect()},[te]);const ve=Ax({props:r,muiFormControl:te,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ve.focused=te?te.focused:R,O.useEffect(()=>{!te&&f&&R&&(ge(!1),j&&j())},[te,f,R,j]);const we=te&&te.onFilled,Fe=te&&te.onEmpty,st=O.useCallback(ye=>{fj(ye)?we&&we():Fe&&Fe()},[we,Fe]);io(()=>{ue&&st({value:ae})},[ae,st,ue]);const _t=ye=>{N&&N(ye),w.onFocus&&w.onFocus(ye),te&&te.onFocus?te.onFocus(ye):ge(!0)},ut=ye=>{j&&j(ye),w.onBlur&&w.onBlur(ye),te&&te.onBlur?te.onBlur(ye):ge(!1)},Ye=(ye,...yn)=>{if(!ue){const Zt=ye.target||U.current;if(Zt==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":_i(1));st({value:Zt.value})}w.onChange&&w.onChange(ye,...yn),A&&A(ye,...yn)};O.useEffect(()=>{st(U.current)},[]);const At=ye=>{U.current&&ye.currentTarget===ye.target&&U.current.focus(),P&&P(ye)};let Ht=S,mt=w;D&&Ht==="input"&&(z?(process.env.NODE_ENV!=="production"&&(C||E)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),mt={type:void 0,minRows:z,maxRows:z,...mt}):mt={type:void 0,maxRows:E,minRows:C,...mt},Ht=dj);const gn=ye=>{st(ye.animationName==="mui-auto-fill-cancel"?U.current:{value:"x"})};O.useEffect(()=>{te&&te.setAdornedStart(!!re)},[te,re]);const an={...r,color:ve.color||"primary",disabled:ve.disabled,endAdornment:m,error:ve.error,focused:ve.focused,formControl:te,fullWidth:g,hiddenLabel:ve.hiddenLabel,multiline:D,size:ve.size,startAdornment:re,type:J},vn=Ire(an),Bn=q.root||c.Root||Vh,Qt=X.root||u.root||{},Wn=q.input||c.Input||Hh;return mt={...mt,...X.input??u.input},v.jsxs(O.Fragment,{children:[!p&&typeof w2=="function"&&(x2||(x2=v.jsx(w2,{}))),v.jsxs(Bn,{...Qt,ref:n,onClick:At,...ie,...!up(Bn)&&{ownerState:{...an,...Qt.ownerState}},className:oe(vn.root,Qt.className,s,$&&"MuiInputBase-readOnly"),children:[re,v.jsx(Tx.Provider,{value:null,children:v.jsx(Wn,{"aria-invalid":ve.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:ve.disabled,id:b,onAnimationStart:gn,name:T,placeholder:L,readOnly:$,required:ve.required,rows:z,value:ae,onKeyDown:M,onKeyUp:I,type:J,...mt,...!up(Wn)&&{as:Ht,ownerState:{...an,...mt.ownerState}},ref:Z,className:oe(vn.input,mt.className,$&&"MuiInputBase-readOnly"),onBlur:ut,onChange:Ye,onFocus:_t})}),m,V?V({...ve,startAdornment:re}):null]})]})});process.env.NODE_ENV!=="production"&&(Yh.propTypes={"aria-describedby":y.string,autoComplete:y.string,autoFocus:y.bool,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["primary","secondary","error","info","success","warning"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableInjectingGlobalStyles:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:zN,inputProps:y.object,inputRef:So,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClick:y.func,onFocus:y.func,onInvalid:y.func,onKeyDown:y.func,onKeyUp:y.func,placeholder:y.string,readOnly:y.bool,renderSuffix:y.func,required:y.bool,rows:y.oneOfType([y.number,y.string]),size:y.oneOfType([y.oneOf(["medium","small"]),y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});function Lre(e){return pn("MuiInput",e)}const Yl={...al,...Ln("MuiInput",["root","underline","input"])};function Fre(e){return pn("MuiOutlinedInput",e)}const ni={...al,...Ln("MuiOutlinedInput",["root","notchedOutline","input"])};function $re(e){return pn("MuiFilledInput",e)}const pa={...al,...Ln("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Bre=rs(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Wre(e){const{prototype:t={}}=e;return!!t.isReactComponent}function pj(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!Wre(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Sl=wl(y.element,pj);Sl.isRequired=wl(y.element.isRequired,pj);const zre={entering:{opacity:1},entered:{opacity:1}},hj=O.forwardRef(function(t,n){const r=Wp(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:b=i,TransitionComponent:S=Ni,...w}=t,x=O.useRef(null),_=In(x,_l(s),n),E=M=>I=>{if(M){const L=x.current;I===void 0?M(L):M(L,I)}},C=E(f),D=E((M,I)=>{VN(M);const L=cp({style:g,timeout:b,easing:l},{mode:"enter"});M.style.webkitTransition=r.transitions.create("opacity",L),M.style.transition=r.transitions.create("opacity",L),u&&u(M,I)}),T=E(d),j=E(h),A=E(M=>{const I=cp({style:g,timeout:b,easing:l},{mode:"exit"});M.style.webkitTransition=r.transitions.create("opacity",I),M.style.transition=r.transitions.create("opacity",I),p&&p(M)}),P=E(m),N=M=>{o&&o(x.current,M)};return v.jsx(S,{appear:a,in:c,nodeRef:x,onEnter:D,onEntered:T,onEntering:C,onExit:A,onExited:P,onExiting:j,addEndListener:N,timeout:b,...w,children:(M,{ownerState:I,...L})=>O.cloneElement(s,{style:{opacity:0,visibility:M==="exited"&&!c?"hidden":void 0,...zre[M],...g,...s.props.style},ref:_,...L})})});process.env.NODE_ENV!=="production"&&(hj.propTypes={addEndListener:y.func,appear:y.bool,children:Sl.isRequired,easing:y.oneOfType([y.shape({enter:y.string,exit:y.string}),y.string]),in:y.bool,onEnter:y.func,onEntered:y.func,onEntering:y.func,onExit:y.func,onExited:y.func,onExiting:y.func,style:y.object,timeout:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function Vre(e){return pn("MuiBackdrop",e)}Ln("MuiBackdrop",["root","invisible"]);const Hre=e=>{const{classes:t,invisible:n}=e;return Dn({root:["root",n&&"invisible"]},Vre,t)},Yre=Ce("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),mj=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...h}=r,g={...r,component:a,invisible:s},b=Hre(g),S={transition:p,root:c.Root,...f},w={...u,...d},x={component:a,slots:S,slotProps:w},[_,E]=Qn("root",{elementType:Yre,externalForwardedProps:x,className:oe(b.root,o),ownerState:g}),[C,D]=Qn("transition",{elementType:hj,externalForwardedProps:x,ownerState:g});return v.jsx(C,{in:l,timeout:m,...h,...D,children:v.jsx(_,{"aria-hidden":!0,...E,classes:b,ref:n,children:i})})});process.env.NODE_ENV!=="production"&&(mj.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,components:y.shape({Root:y.elementType}),componentsProps:y.shape({root:y.object}),invisible:y.bool,open:y.bool.isRequired,slotProps:y.shape({root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),TransitionComponent:y.elementType,transitionDuration:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function gj(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Ure(e){const t=mr(e);return t.body===e?oo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function yc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function _2(e){return parseInt(oo(e).getComputedStyle(e).paddingRight,10)||0}function Kre(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function S2(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,a=>{const s=!o.includes(a),l=!Kre(a);s&&l&&yc(a,i)})}function qg(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function qre(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Ure(r)){const a=gj(oo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_2(r)+a}px`;const s=mr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${_2(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=mr(r).body;else{const a=r.parentElement,s=oo(r);o=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function Gre(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Xre{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&yc(t.modalRef,!1);const i=Gre(n);S2(n,t.mount,t.modalRef,i,!0);const o=qg(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=qg(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=qre(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=qg(this.containers,a=>a.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&yc(t.modalRef,n),S2(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&yc(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const Qre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Zre(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Jre(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function eie(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Jre(e))}function tie(e){const t=[],n=[];return Array.from(e.querySelectorAll(Qre)).forEach((r,i)=>{const o=Zre(r);o===-1||!eie(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function nie(){return!0}function pp(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=tie,isEnabled:a=nie,open:s}=e,l=O.useRef(!1),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=O.useRef(null),p=O.useRef(!1),m=O.useRef(null),h=In(_l(t),m),g=O.useRef(null);O.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),O.useEffect(()=>{if(!s||!m.current)return;const w=mr(m.current);return m.current.contains(w.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
233
+ `))},[]),Z=In(U,x,w.ref,K),[R,ge]=O.useState(!1),te=Mx();process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(te)return te.registerEffect()},[te]);const ve=Ax({props:r,muiFormControl:te,states:["color","disabled","error","hiddenLabel","size","required","filled"]});ve.focused=te?te.focused:R,O.useEffect(()=>{!te&&f&&R&&(ge(!1),j&&j())},[te,f,R,j]);const we=te&&te.onFilled,Fe=te&&te.onEmpty,st=O.useCallback(ye=>{fj(ye)?we&&we():Fe&&Fe()},[we,Fe]);io(()=>{ue&&st({value:ae})},[ae,st,ue]);const _t=ye=>{N&&N(ye),w.onFocus&&w.onFocus(ye),te&&te.onFocus?te.onFocus(ye):ge(!0)},ut=ye=>{j&&j(ye),w.onBlur&&w.onBlur(ye),te&&te.onBlur?te.onBlur(ye):ge(!1)},Ye=(ye,...yn)=>{if(!ue){const Jt=ye.target||U.current;if(Jt==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":_i(1));st({value:Jt.value})}w.onChange&&w.onChange(ye,...yn),A&&A(ye,...yn)};O.useEffect(()=>{st(U.current)},[]);const At=ye=>{U.current&&ye.currentTarget===ye.target&&U.current.focus(),P&&P(ye)};let Yt=S,mt=w;D&&Yt==="input"&&(z?(process.env.NODE_ENV!=="production"&&(C||E)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),mt={type:void 0,minRows:z,maxRows:z,...mt}):mt={type:void 0,maxRows:E,minRows:C,...mt},Yt=dj);const gn=ye=>{st(ye.animationName==="mui-auto-fill-cancel"?U.current:{value:"x"})};O.useEffect(()=>{te&&te.setAdornedStart(!!re)},[te,re]);const an={...r,color:ve.color||"primary",disabled:ve.disabled,endAdornment:m,error:ve.error,focused:ve.focused,formControl:te,fullWidth:g,hiddenLabel:ve.hiddenLabel,multiline:D,size:ve.size,startAdornment:re,type:J},vn=Ire(an),Bn=q.root||c.Root||Vh,Zt=X.root||u.root||{},Wn=q.input||c.Input||Hh;return mt={...mt,...X.input??u.input},v.jsxs(O.Fragment,{children:[!p&&typeof w2=="function"&&(x2||(x2=v.jsx(w2,{}))),v.jsxs(Bn,{...Zt,ref:n,onClick:At,...ie,...!up(Bn)&&{ownerState:{...an,...Zt.ownerState}},className:oe(vn.root,Zt.className,s,$&&"MuiInputBase-readOnly"),children:[re,v.jsx(Tx.Provider,{value:null,children:v.jsx(Wn,{"aria-invalid":ve.error,"aria-describedby":i,autoComplete:o,autoFocus:a,defaultValue:d,disabled:ve.disabled,id:b,onAnimationStart:gn,name:T,placeholder:L,readOnly:$,required:ve.required,rows:z,value:ae,onKeyDown:M,onKeyUp:I,type:J,...mt,...!up(Wn)&&{as:Yt,ownerState:{...an,...mt.ownerState}},ref:Z,className:oe(vn.input,mt.className,$&&"MuiInputBase-readOnly"),onBlur:ut,onChange:Ye,onFocus:_t})}),m,V?V({...ve,startAdornment:re}):null]})]})});process.env.NODE_ENV!=="production"&&(Yh.propTypes={"aria-describedby":y.string,autoComplete:y.string,autoFocus:y.bool,classes:y.object,className:y.string,color:y.oneOfType([y.oneOf(["primary","secondary","error","info","success","warning"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableInjectingGlobalStyles:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:zN,inputProps:y.object,inputRef:So,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClick:y.func,onFocus:y.func,onInvalid:y.func,onKeyDown:y.func,onKeyUp:y.func,placeholder:y.string,readOnly:y.bool,renderSuffix:y.func,required:y.bool,rows:y.oneOfType([y.number,y.string]),size:y.oneOfType([y.oneOf(["medium","small"]),y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});function Lre(e){return pn("MuiInput",e)}const Yl={...al,...Ln("MuiInput",["root","underline","input"])};function Fre(e){return pn("MuiOutlinedInput",e)}const ni={...al,...Ln("MuiOutlinedInput",["root","notchedOutline","input"])};function $re(e){return pn("MuiFilledInput",e)}const pa={...al,...Ln("MuiFilledInput",["root","underline","input","adornedStart","adornedEnd","sizeSmall","multiline","hiddenLabel"])},Bre=rs(v.jsx("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown");function Wre(e){const{prototype:t={}}=e;return!!t.isReactComponent}function pj(e,t,n,r,i){const o=e[t],a=i||t;if(o==null||typeof window>"u")return null;let s;const l=o.type;return typeof l=="function"&&!Wre(l)&&(s="Did you accidentally use a plain function component for an element instead?"),s!==void 0?new Error(`Invalid ${r} \`${a}\` supplied to \`${n}\`. Expected an element that can hold a ref. ${s} For more information see https://mui.com/r/caveat-with-refs-guide`):null}const Sl=wl(y.element,pj);Sl.isRequired=wl(y.element.isRequired,pj);const zre={entering:{opacity:1},entered:{opacity:1}},hj=O.forwardRef(function(t,n){const r=Wp(),i={enter:r.transitions.duration.enteringScreen,exit:r.transitions.duration.leavingScreen},{addEndListener:o,appear:a=!0,children:s,easing:l,in:c,onEnter:u,onEntered:d,onEntering:f,onExit:p,onExited:m,onExiting:h,style:g,timeout:b=i,TransitionComponent:S=Ni,...w}=t,x=O.useRef(null),_=In(x,_l(s),n),E=M=>I=>{if(M){const L=x.current;I===void 0?M(L):M(L,I)}},C=E(f),D=E((M,I)=>{VN(M);const L=cp({style:g,timeout:b,easing:l},{mode:"enter"});M.style.webkitTransition=r.transitions.create("opacity",L),M.style.transition=r.transitions.create("opacity",L),u&&u(M,I)}),T=E(d),j=E(h),A=E(M=>{const I=cp({style:g,timeout:b,easing:l},{mode:"exit"});M.style.webkitTransition=r.transitions.create("opacity",I),M.style.transition=r.transitions.create("opacity",I),p&&p(M)}),P=E(m),N=M=>{o&&o(x.current,M)};return v.jsx(S,{appear:a,in:c,nodeRef:x,onEnter:D,onEntered:T,onEntering:C,onExit:A,onExited:P,onExiting:j,addEndListener:N,timeout:b,...w,children:(M,{ownerState:I,...L})=>O.cloneElement(s,{style:{opacity:0,visibility:M==="exited"&&!c?"hidden":void 0,...zre[M],...g,...s.props.style},ref:_,...L})})});process.env.NODE_ENV!=="production"&&(hj.propTypes={addEndListener:y.func,appear:y.bool,children:Sl.isRequired,easing:y.oneOfType([y.shape({enter:y.string,exit:y.string}),y.string]),in:y.bool,onEnter:y.func,onEntered:y.func,onEntering:y.func,onExit:y.func,onExited:y.func,onExiting:y.func,style:y.object,timeout:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function Vre(e){return pn("MuiBackdrop",e)}Ln("MuiBackdrop",["root","invisible"]);const Hre=e=>{const{classes:t,invisible:n}=e;return Dn({root:["root",n&&"invisible"]},Vre,t)},Yre=Ce("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent",variants:[{props:{invisible:!0},style:{backgroundColor:"transparent"}}]}),mj=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiBackdrop"}),{children:i,className:o,component:a="div",invisible:s=!1,open:l,components:c={},componentsProps:u={},slotProps:d={},slots:f={},TransitionComponent:p,transitionDuration:m,...h}=r,g={...r,component:a,invisible:s},b=Hre(g),S={transition:p,root:c.Root,...f},w={...u,...d},x={component:a,slots:S,slotProps:w},[_,E]=Qn("root",{elementType:Yre,externalForwardedProps:x,className:oe(b.root,o),ownerState:g}),[C,D]=Qn("transition",{elementType:hj,externalForwardedProps:x,ownerState:g});return v.jsx(C,{in:l,timeout:m,...h,...D,children:v.jsx(_,{"aria-hidden":!0,...E,classes:b,ref:n,children:i})})});process.env.NODE_ENV!=="production"&&(mj.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,components:y.shape({Root:y.elementType}),componentsProps:y.shape({root:y.object}),invisible:y.bool,open:y.bool.isRequired,slotProps:y.shape({root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),TransitionComponent:y.elementType,transitionDuration:y.oneOfType([y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});function gj(e=window){const t=e.document.documentElement.clientWidth;return e.innerWidth-t}function Ure(e){const t=mr(e);return t.body===e?oo(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}function yc(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function _2(e){return parseInt(oo(e).getComputedStyle(e).paddingRight,10)||0}function Kre(e){const n=["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].includes(e.tagName),r=e.tagName==="INPUT"&&e.getAttribute("type")==="hidden";return n||r}function S2(e,t,n,r,i){const o=[t,n,...r];[].forEach.call(e.children,a=>{const s=!o.includes(a),l=!Kre(a);s&&l&&yc(a,i)})}function qg(e,t){let n=-1;return e.some((r,i)=>t(r)?(n=i,!0):!1),n}function qre(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(Ure(r)){const a=gj(oo(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight=`${_2(r)+a}px`;const s=mr(r).querySelectorAll(".mui-fixed");[].forEach.call(s,l=>{n.push({value:l.style.paddingRight,property:"padding-right",el:l}),l.style.paddingRight=`${_2(l)+a}px`})}let o;if(r.parentNode instanceof DocumentFragment)o=mr(r).body;else{const a=r.parentElement,s=oo(r);o=a?.nodeName==="HTML"&&s.getComputedStyle(a).overflowY==="scroll"?a:r}n.push({value:o.style.overflow,property:"overflow",el:o},{value:o.style.overflowX,property:"overflow-x",el:o},{value:o.style.overflowY,property:"overflow-y",el:o}),o.style.overflow="hidden"}return()=>{n.forEach(({value:o,el:a,property:s})=>{o?a.style.setProperty(s,o):a.style.removeProperty(s)})}}function Gre(e){const t=[];return[].forEach.call(e.children,n=>{n.getAttribute("aria-hidden")==="true"&&t.push(n)}),t}class Xre{constructor(){this.modals=[],this.containers=[]}add(t,n){let r=this.modals.indexOf(t);if(r!==-1)return r;r=this.modals.length,this.modals.push(t),t.modalRef&&yc(t.modalRef,!1);const i=Gre(n);S2(n,t.mount,t.modalRef,i,!0);const o=qg(this.containers,a=>a.container===n);return o!==-1?(this.containers[o].modals.push(t),r):(this.containers.push({modals:[t],container:n,restore:null,hiddenSiblings:i}),r)}mount(t,n){const r=qg(this.containers,o=>o.modals.includes(t)),i=this.containers[r];i.restore||(i.restore=qre(i,n))}remove(t,n=!0){const r=this.modals.indexOf(t);if(r===-1)return r;const i=qg(this.containers,a=>a.modals.includes(t)),o=this.containers[i];if(o.modals.splice(o.modals.indexOf(t),1),this.modals.splice(r,1),o.modals.length===0)o.restore&&o.restore(),t.modalRef&&yc(t.modalRef,n),S2(o.container,t.mount,t.modalRef,o.hiddenSiblings,!1),this.containers.splice(i,1);else{const a=o.modals[o.modals.length-1];a.modalRef&&yc(a.modalRef,!1)}return r}isTopModal(t){return this.modals.length>0&&this.modals[this.modals.length-1]===t}}const Qre=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function Zre(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?e.contentEditable==="true"||(e.nodeName==="AUDIO"||e.nodeName==="VIDEO"||e.nodeName==="DETAILS")&&e.getAttribute("tabindex")===null?0:e.tabIndex:t}function Jre(e){if(e.tagName!=="INPUT"||e.type!=="radio"||!e.name)return!1;const t=r=>e.ownerDocument.querySelector(`input[type="radio"]${r}`);let n=t(`[name="${e.name}"]:checked`);return n||(n=t(`[name="${e.name}"]`)),n!==e}function eie(e){return!(e.disabled||e.tagName==="INPUT"&&e.type==="hidden"||Jre(e))}function tie(e){const t=[],n=[];return Array.from(e.querySelectorAll(Qre)).forEach((r,i)=>{const o=Zre(r);o===-1||!eie(r)||(o===0?t.push(r):n.push({documentOrder:i,tabIndex:o,node:r}))}),n.sort((r,i)=>r.tabIndex===i.tabIndex?r.documentOrder-i.documentOrder:r.tabIndex-i.tabIndex).map(r=>r.node).concat(t)}function nie(){return!0}function pp(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:i=!1,getTabbable:o=tie,isEnabled:a=nie,open:s}=e,l=O.useRef(!1),c=O.useRef(null),u=O.useRef(null),d=O.useRef(null),f=O.useRef(null),p=O.useRef(!1),m=O.useRef(null),h=In(_l(t),m),g=O.useRef(null);O.useEffect(()=>{!s||!m.current||(p.current=!n)},[n,s]),O.useEffect(()=>{if(!s||!m.current)return;const w=mr(m.current);return m.current.contains(w.activeElement)||(m.current.hasAttribute("tabIndex")||(process.env.NODE_ENV!=="production"&&console.error(["MUI: The modal content node does not accept focus.",'For the benefit of assistive technologies, the tabIndex of the node is being set to "-1".'].join(`
234
234
  `)),m.current.setAttribute("tabIndex","-1")),p.current&&m.current.focus()),()=>{i||(d.current&&d.current.focus&&(l.current=!0,d.current.focus()),d.current=null)}},[s]),O.useEffect(()=>{if(!s||!m.current)return;const w=mr(m.current),x=C=>{g.current=C,!(r||!a()||C.key!=="Tab")&&w.activeElement===m.current&&C.shiftKey&&(l.current=!0,u.current&&u.current.focus())},_=()=>{const C=m.current;if(C===null)return;if(!w.hasFocus()||!a()||l.current){l.current=!1;return}if(C.contains(w.activeElement)||r&&w.activeElement!==c.current&&w.activeElement!==u.current)return;if(w.activeElement!==f.current)f.current=null;else if(f.current!==null)return;if(!p.current)return;let D=[];if((w.activeElement===c.current||w.activeElement===u.current)&&(D=o(m.current)),D.length>0){const T=!!(g.current?.shiftKey&&g.current?.key==="Tab"),j=D[0],A=D[D.length-1];typeof j!="string"&&typeof A!="string"&&(T?A.focus():j.focus())}else C.focus()};w.addEventListener("focusin",_),w.addEventListener("keydown",x,!0);const E=setInterval(()=>{w.activeElement&&w.activeElement.tagName==="BODY"&&_()},50);return()=>{clearInterval(E),w.removeEventListener("focusin",_),w.removeEventListener("keydown",x,!0)}},[n,r,i,a,s,o]);const b=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0,f.current=w.target;const x=t.props.onFocus;x&&x(w)},S=w=>{d.current===null&&(d.current=w.relatedTarget),p.current=!0};return v.jsxs(O.Fragment,{children:[v.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:c,"data-testid":"sentinelStart"}),O.cloneElement(t,{ref:h,onFocus:b}),v.jsx("div",{tabIndex:s?0:-1,onFocus:S,ref:u,"data-testid":"sentinelEnd"})]})}process.env.NODE_ENV!=="production"&&(pp.propTypes={children:Sl,disableAutoFocus:y.bool,disableEnforceFocus:y.bool,disableRestoreFocus:y.bool,getTabbable:y.func,isEnabled:y.func,open:y.bool.isRequired});process.env.NODE_ENV!=="production"&&(pp.propTypes=Hk(pp.propTypes));function rie(e){return typeof e=="function"?e():e}function iie(e){return e?e.props.hasOwnProperty("in"):!1}const O2=()=>{},Sd=new Xre;function oie(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:r=!1,closeAfterTransition:i=!1,onTransitionEnter:o,onTransitionExited:a,children:s,onClose:l,open:c,rootRef:u}=e,d=O.useRef({}),f=O.useRef(null),p=O.useRef(null),m=In(p,u),[h,g]=O.useState(!c),b=iie(s);let S=!0;(e["aria-hidden"]==="false"||e["aria-hidden"]===!1)&&(S=!1);const w=()=>mr(f.current),x=()=>(d.current.modalRef=p.current,d.current.mount=f.current,d.current),_=()=>{Sd.mount(x(),{disableScrollLock:r}),p.current&&(p.current.scrollTop=0)},E=Cc(()=>{const I=rie(t)||w().body;Sd.add(x(),I),p.current&&_()}),C=()=>Sd.isTopModal(x()),D=Cc(I=>{f.current=I,I&&(c&&C()?_():p.current&&yc(p.current,S))}),T=O.useCallback(()=>{Sd.remove(x(),S)},[S]);O.useEffect(()=>()=>{T()},[T]),O.useEffect(()=>{c?E():(!b||!i)&&T()},[c,T,b,i,E]);const j=I=>L=>{I.onKeyDown?.(L),!(L.key!=="Escape"||L.which===229||!C())&&(n||(L.stopPropagation(),l&&l(L,"escapeKeyDown")))},A=I=>L=>{I.onClick?.(L),L.target===L.currentTarget&&l&&l(L,"backdropClick")};return{getRootProps:(I={})=>{const L=XN(e);delete L.onTransitionEnter,delete L.onTransitionExited;const $={...L,...I};return{role:"presentation",...$,onKeyDown:j($),ref:m}},getBackdropProps:(I={})=>{const L=I;return{"aria-hidden":!0,...L,onClick:A(L),open:c}},getTransitionProps:()=>{const I=()=>{g(!1),o&&o()},L=()=>{g(!0),a&&a(),i&&T()};return{onEnter:h1(I,s?.props.onEnter??O2),onExited:h1(L,s?.props.onExited??O2)}},rootRef:m,portalRef:D,isTopModal:C,exited:h,hasTransition:b}}function aie(e){return pn("MuiModal",e)}Ln("MuiModal",["root","hidden","backdrop"]);const sie=e=>{const{open:t,exited:n,classes:r}=e;return Dn({root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]},aie,r)},lie=Ce("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})(Fn(({theme:e})=>({position:"fixed",zIndex:(e.vars||e).zIndex.modal,right:0,bottom:0,top:0,left:0,variants:[{props:({ownerState:t})=>!t.open&&t.exited,style:{visibility:"hidden"}}]}))),cie=Ce(mj,{name:"MuiModal",slot:"Backdrop"})({zIndex:-1}),vj=O.forwardRef(function(t,n){const r=rr({name:"MuiModal",props:t}),{BackdropComponent:i=cie,BackdropProps:o,classes:a,className:s,closeAfterTransition:l=!1,children:c,container:u,component:d,components:f={},componentsProps:p={},disableAutoFocus:m=!1,disableEnforceFocus:h=!1,disableEscapeKeyDown:g=!1,disablePortal:b=!1,disableRestoreFocus:S=!1,disableScrollLock:w=!1,hideBackdrop:x=!1,keepMounted:_=!1,onClose:E,onTransitionEnter:C,onTransitionExited:D,open:T,slotProps:j={},slots:A={},theme:P,...N}=r,M={...r,closeAfterTransition:l,disableAutoFocus:m,disableEnforceFocus:h,disableEscapeKeyDown:g,disablePortal:b,disableRestoreFocus:S,disableScrollLock:w,hideBackdrop:x,keepMounted:_},{getRootProps:I,getBackdropProps:L,getTransitionProps:$,portalRef:V,isTopModal:z,exited:B,hasTransition:X}=oie({...M,rootRef:n}),q={...M,exited:B},re=sie(q),J={};if(c.props.tabIndex===void 0&&(J.tabIndex="-1"),X){const{onEnter:K,onExited:Z}=$();J.onEnter=K,J.onExited=Z}const ee={slots:{root:f.Root,backdrop:f.Backdrop,...A},slotProps:{...p,...j}},[ie,ae]=Qn("root",{ref:n,elementType:lie,externalForwardedProps:{...ee,...N,component:d},getSlotProps:I,ownerState:q,className:oe(s,re?.root,!q.open&&q.exited&&re?.hidden)}),[ue,U]=Qn("backdrop",{ref:o?.ref,elementType:i,externalForwardedProps:ee,shouldForwardComponentProp:!0,additionalProps:o,getSlotProps:K=>L({...K,onClick:Z=>{K?.onClick&&K.onClick(Z)}}),className:oe(o?.className,re?.backdrop),ownerState:q});return!_&&!T&&(!X||B)?null:v.jsx(Uc,{ref:V,container:u,disablePortal:b,children:v.jsxs(ie,{...ae,children:[!x&&i?v.jsx(ue,{...U}):null,v.jsx(pp,{disableEnforceFocus:h,disableAutoFocus:m,disableRestoreFocus:S,isEnabled:z,open:T,children:O.cloneElement(c,J)})]})})});process.env.NODE_ENV!=="production"&&(vj.propTypes={BackdropComponent:y.elementType,BackdropProps:y.object,children:Sl.isRequired,classes:y.object,className:y.string,closeAfterTransition:y.bool,component:y.elementType,components:y.shape({Backdrop:y.elementType,Root:y.elementType}),componentsProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object])}),container:y.oneOfType([fo,y.func]),disableAutoFocus:y.bool,disableEnforceFocus:y.bool,disableEscapeKeyDown:y.bool,disablePortal:y.bool,disableRestoreFocus:y.bool,disableScrollLock:y.bool,hideBackdrop:y.bool,keepMounted:y.bool,onClose:y.func,onTransitionEnter:y.func,onTransitionExited:y.func,open:y.bool.isRequired,slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,root:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});const uie=e=>{const{classes:t,disableUnderline:n,startAdornment:r,endAdornment:i,size:o,hiddenLabel:a,multiline:s}=e,l={root:["root",!n&&"underline",r&&"adornedStart",i&&"adornedEnd",o==="small"&&`size${un(o)}`,a&&"hiddenLabel",s&&"multiline"],input:["input"]},c=Dn(l,$re,t);return{...t,...c}},die=Ce(Vh,{shouldForwardProp:e=>mo(e)||e==="classes",name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Wh(e,t),!n.disableUnderline&&t.underline]}})(Fn(({theme:e})=>{const t=e.palette.mode==="light",n=t?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",r=t?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",i=t?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",o=t?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return{position:"relative",backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r,borderTopLeftRadius:(e.vars||e).shape.borderRadius,borderTopRightRadius:(e.vars||e).shape.borderRadius,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),"&:hover":{backgroundColor:e.vars?e.vars.palette.FilledInput.hoverBg:i,"@media (hover: none)":{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r}},[`&.${pa.focused}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.bg:r},[`&.${pa.disabled}`]:{backgroundColor:e.vars?e.vars.palette.FilledInput.disabledBg:o},variants:[{props:({ownerState:a})=>!a.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${pa.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${pa.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${e.vars?e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline):n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${pa.disabled}, .${pa.error}):before`]:{borderBottom:`1px solid ${(e.vars||e).palette.text.primary}`},[`&.${pa.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(wx()).map(([a])=>({props:{disableUnderline:!1,color:a},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[a]?.main}`}}})),{props:({ownerState:a})=>a.startAdornment,style:{paddingLeft:12}},{props:({ownerState:a})=>a.endAdornment,style:{paddingRight:12}},{props:({ownerState:a})=>a.multiline,style:{padding:"25px 12px 8px"}},{props:({ownerState:a,size:s})=>a.multiline&&s==="small",style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:a})=>a.multiline&&a.hiddenLabel&&a.size==="small",style:{paddingTop:8,paddingBottom:9}}]}})),fie=Ce(Hh,{name:"MuiFilledInput",slot:"Input",overridesResolver:zh})(Fn(({theme:e})=>({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12,...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{paddingTop:21,paddingBottom:4}},{props:({ownerState:t})=>t.hiddenLabel,style:{paddingTop:16,paddingBottom:17}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}},{props:({ownerState:t})=>t.hiddenLabel&&t.size==="small",style:{paddingTop:8,paddingBottom:9}},{props:({ownerState:t})=>t.multiline,style:{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0}}]}))),Nx=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiFilledInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,hiddenLabel:l,inputComponent:c="input",multiline:u=!1,slotProps:d,slots:f={},type:p="text",...m}=r,h={...r,disableUnderline:i,fullWidth:s,inputComponent:c,multiline:u,type:p},g=uie(r),b={root:{ownerState:h},input:{ownerState:h}},S=d??a?Pn(b,d??a):b,w=f.root??o.Root??die,x=f.input??o.Input??fie;return v.jsx(Yh,{slots:{root:w,input:x},slotProps:S,fullWidth:s,inputComponent:c,multiline:u,ref:n,type:p,...m,classes:g})});process.env.NODE_ENV!=="production"&&(Nx.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableUnderline:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,hiddenLabel:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:So,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});Nx.muiName="Input";function Ty(e){return`scale(${e}, ${e**2})`}const pie={entering:{opacity:1,transform:Ty(1)},entered:{opacity:1,transform:"none"}},Gg=typeof navigator<"u"&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),Kc=O.forwardRef(function(t,n){const{addEndListener:r,appear:i=!0,children:o,easing:a,in:s,onEnter:l,onEntered:c,onEntering:u,onExit:d,onExited:f,onExiting:p,style:m,timeout:h="auto",TransitionComponent:g=Ni,...b}=t,S=lc(),w=O.useRef(),x=Wp(),_=O.useRef(null),E=In(_,_l(o),n),C=I=>L=>{if(I){const $=_.current;L===void 0?I($):I($,L)}},D=C(u),T=C((I,L)=>{VN(I);const{duration:$,delay:V,easing:z}=cp({style:m,timeout:h,easing:a},{mode:"enter"});let B;h==="auto"?(B=x.transitions.getAutoHeightDuration(I.clientHeight),w.current=B):B=$,I.style.transition=[x.transitions.create("opacity",{duration:B,delay:V}),x.transitions.create("transform",{duration:Gg?B:B*.666,delay:V,easing:z})].join(","),l&&l(I,L)}),j=C(c),A=C(p),P=C(I=>{const{duration:L,delay:$,easing:V}=cp({style:m,timeout:h,easing:a},{mode:"exit"});let z;h==="auto"?(z=x.transitions.getAutoHeightDuration(I.clientHeight),w.current=z):z=L,I.style.transition=[x.transitions.create("opacity",{duration:z,delay:$}),x.transitions.create("transform",{duration:Gg?z:z*.666,delay:Gg?$:$||z*.333,easing:V})].join(","),I.style.opacity=0,I.style.transform=Ty(.75),d&&d(I)}),N=C(f),M=I=>{h==="auto"&&S.start(w.current||0,I),r&&r(_.current,I)};return v.jsx(g,{appear:i,in:s,nodeRef:_,onEnter:T,onEntered:j,onEntering:D,onExit:P,onExited:N,onExiting:A,addEndListener:M,timeout:h==="auto"?null:h,...b,children:(I,{ownerState:L,...$})=>O.cloneElement(o,{style:{opacity:0,transform:Ty(.75),visibility:I==="exited"&&!s?"hidden":void 0,...pie[I],...m,...o.props.style},ref:E,...$})})});process.env.NODE_ENV!=="production"&&(Kc.propTypes={addEndListener:y.func,appear:y.bool,children:Sl.isRequired,easing:y.oneOfType([y.shape({enter:y.string,exit:y.string}),y.string]),in:y.bool,onEnter:y.func,onEntered:y.func,onEntering:y.func,onExit:y.func,onExited:y.func,onExiting:y.func,style:y.object,timeout:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})])});Kc&&(Kc.muiSupportAuto=!0);const hie=e=>{const{classes:t,disableUnderline:n}=e,i=Dn({root:["root",!n&&"underline"],input:["input"]},Lre,t);return{...t,...i}},mie=Ce(Vh,{shouldForwardProp:e=>mo(e)||e==="classes",name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...Wh(e,t),!n.disableUnderline&&t.underline]}})(Fn(({theme:e})=>{let n=e.palette.mode==="light"?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return e.vars&&(n=e.alpha(e.vars.palette.common.onBackground,e.vars.opacity.inputUnderline)),{position:"relative",variants:[{props:({ownerState:r})=>r.formControl,style:{"label + &":{marginTop:16}}},{props:({ownerState:r})=>!r.disableUnderline,style:{"&::after":{left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:e.transitions.create("transform",{duration:e.transitions.duration.shorter,easing:e.transitions.easing.easeOut}),pointerEvents:"none"},[`&.${Yl.focused}:after`]:{transform:"scaleX(1) translateX(0)"},[`&.${Yl.error}`]:{"&::before, &::after":{borderBottomColor:(e.vars||e).palette.error.main}},"&::before":{borderBottom:`1px solid ${n}`,left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:e.transitions.create("border-bottom-color",{duration:e.transitions.duration.shorter}),pointerEvents:"none"},[`&:hover:not(.${Yl.disabled}, .${Yl.error}):before`]:{borderBottom:`2px solid ${(e.vars||e).palette.text.primary}`,"@media (hover: none)":{borderBottom:`1px solid ${n}`}},[`&.${Yl.disabled}:before`]:{borderBottomStyle:"dotted"}}},...Object.entries(e.palette).filter(wx()).map(([r])=>({props:{color:r,disableUnderline:!1},style:{"&::after":{borderBottom:`2px solid ${(e.vars||e).palette[r].main}`}}}))]}})),gie=Ce(Hh,{name:"MuiInput",slot:"Input",overridesResolver:zh})({}),jx=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiInput"}),{disableUnderline:i=!1,components:o={},componentsProps:a,fullWidth:s=!1,inputComponent:l="input",multiline:c=!1,slotProps:u,slots:d={},type:f="text",...p}=r,m=hie(r),g={root:{ownerState:{disableUnderline:i}}},b=u??a?Pn(u??a,g):g,S=d.root??o.Root??mie,w=d.input??o.Input??gie;return v.jsx(Yh,{slots:{root:S,input:w},slotProps:b,fullWidth:s,inputComponent:l,multiline:c,ref:n,type:f,...p,classes:m})});process.env.NODE_ENV!=="production"&&(jx.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),componentsProps:y.shape({input:y.object,root:y.object}),defaultValue:y.any,disabled:y.bool,disableUnderline:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:So,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,root:y.object}),slots:y.shape({input:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});jx.muiName="Input";const yj=O.createContext({});process.env.NODE_ENV!=="production"&&(yj.displayName="ListContext");function vie(e){return pn("MuiList",e)}Ln("MuiList",["root","padding","dense","subheader"]);const yie=e=>{const{classes:t,disablePadding:n,dense:r,subheader:i}=e;return Dn({root:["root",!n&&"padding",r&&"dense",i&&"subheader"]},vie,t)},bie=Ce("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})({listStyle:"none",margin:0,padding:0,position:"relative",variants:[{props:({ownerState:e})=>!e.disablePadding,style:{paddingTop:8,paddingBottom:8}},{props:({ownerState:e})=>e.subheader,style:{paddingTop:0}}]}),bj=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiList"}),{children:i,className:o,component:a="ul",dense:s=!1,disablePadding:l=!1,subheader:c,...u}=r,d=O.useMemo(()=>({dense:s}),[s]),f={...r,component:a,dense:s,disablePadding:l},p=yie(f);return v.jsx(yj.Provider,{value:d,children:v.jsxs(bie,{as:a,className:oe(p.root,o),ref:n,ownerState:f,...u,children:[c,i]})})});process.env.NODE_ENV!=="production"&&(bj.propTypes={children:y.node,classes:y.object,className:y.string,component:y.elementType,dense:y.bool,disablePadding:y.bool,subheader:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object])});function Xg(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function E2(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function xj(e,t){if(t===void 0)return!0;let n=e.innerText;return n===void 0&&(n=e.textContent),n=n.trim().toLowerCase(),n.length===0?!1:t.repeating?n[0]===t.keys[0]:n.startsWith(t.keys.join(""))}function Ul(e,t,n,r,i,o){let a=!1,s=i(e,t,t?n:!1);for(;s;){if(s===e.firstChild){if(a)return!1;a=!0}const l=r?!1:s.disabled||s.getAttribute("aria-disabled")==="true";if(!s.hasAttribute("tabindex")||!xj(s,o)||l)s=i(e,s,n);else return s.focus(),!0}return!1}const wj=O.forwardRef(function(t,n){const{actions:r,autoFocus:i=!1,autoFocusItem:o=!1,children:a,className:s,disabledItemsFocusable:l=!1,disableListWrap:c=!1,onKeyDown:u,variant:d="selectedMenu",...f}=t,p=O.useRef(null),m=O.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});io(()=>{i&&p.current.focus()},[i]),O.useImperativeHandle(r,()=>({adjustStyleForScrollbar:(w,{direction:x})=>{const _=!p.current.style.width;if(w.clientHeight<p.current.clientHeight&&_){const E=`${gj(oo(w))}px`;p.current.style[x==="rtl"?"paddingLeft":"paddingRight"]=E,p.current.style.width=`calc(100% + ${E})`}return p.current}}),[]);const h=w=>{const x=p.current,_=w.key;if(w.ctrlKey||w.metaKey||w.altKey){u&&u(w);return}const C=mr(x).activeElement;if(_==="ArrowDown")w.preventDefault(),Ul(x,C,c,l,Xg);else if(_==="ArrowUp")w.preventDefault(),Ul(x,C,c,l,E2);else if(_==="Home")w.preventDefault(),Ul(x,null,c,l,Xg);else if(_==="End")w.preventDefault(),Ul(x,null,c,l,E2);else if(_.length===1){const D=m.current,T=_.toLowerCase(),j=performance.now();D.keys.length>0&&(j-D.lastTime>500?(D.keys=[],D.repeating=!0,D.previousKeyMatched=!0):D.repeating&&T!==D.keys[0]&&(D.repeating=!1)),D.lastTime=j,D.keys.push(T);const A=C&&!D.repeating&&xj(C,D);D.previousKeyMatched&&(A||Ul(x,C,!1,l,Xg,D))?w.preventDefault():D.previousKeyMatched=!1}u&&u(w)},g=In(p,n);let b=-1;O.Children.forEach(a,(w,x)=>{if(!O.isValidElement(w)){b===x&&(b+=1,b>=a.length&&(b=-1));return}process.env.NODE_ENV!=="production"&&Ho.isFragment(w)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
235
235
  `)),w.props.disabled||(d==="selectedMenu"&&w.props.selected||b===-1)&&(b=x),b===x&&(w.props.disabled||w.props.muiSkipListHighlight||w.type.muiSkipListHighlight)&&(b+=1,b>=a.length&&(b=-1))});const S=O.Children.map(a,(w,x)=>{if(x===b){const _={};return o&&(_.autoFocus=!0),w.props.tabIndex===void 0&&d==="selectedMenu"&&(_.tabIndex=0),O.cloneElement(w,_)}return w});return v.jsx(bj,{role:"menu",ref:g,className:s,onKeyDown:h,tabIndex:i?0:-1,...f,children:S})});process.env.NODE_ENV!=="production"&&(wj.propTypes={autoFocus:y.bool,autoFocusItem:y.bool,children:y.node,className:y.string,disabledItemsFocusable:y.bool,disableListWrap:y.bool,onKeyDown:y.func,variant:y.oneOf(["menu","selectedMenu"])});function xie(e){return pn("MuiPopover",e)}Ln("MuiPopover",["root","paper"]);function P2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.height/2:t==="bottom"&&(n=e.height),n}function k2(e,t){let n=0;return typeof t=="number"?n=t:t==="center"?n=e.width/2:t==="right"&&(n=e.width),n}function C2(e){return[e.horizontal,e.vertical].map(t=>typeof t=="number"?`${t}px`:t).join(" ")}function cc(e){return typeof e=="function"?e():e}const wie=e=>{const{classes:t}=e;return Dn({root:["root"],paper:["paper"]},xie,t)},_ie=Ce(vj,{name:"MuiPopover",slot:"Root"})({}),_j=Ce(KN,{name:"MuiPopover",slot:"Paper"})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Sj=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiPopover"}),{action:i,anchorEl:o,anchorOrigin:a={vertical:"top",horizontal:"left"},anchorPosition:s,anchorReference:l="anchorEl",children:c,className:u,container:d,elevation:f=8,marginThreshold:p=16,open:m,PaperProps:h={},slots:g={},slotProps:b={},transformOrigin:S={vertical:"top",horizontal:"left"},TransitionComponent:w,transitionDuration:x="auto",TransitionProps:_={},disableScrollLock:E=!1,...C}=r,D=O.useRef(),T={...r,anchorOrigin:a,anchorReference:l,elevation:f,marginThreshold:p,transformOrigin:S,TransitionComponent:w,transitionDuration:x,TransitionProps:_},j=wie(T),A=O.useCallback(()=>{if(l==="anchorPosition")return process.env.NODE_ENV!=="production"&&(s||console.error('MUI: You need to provide a `anchorPosition` prop when using <Popover anchorReference="anchorPosition" />.')),s;const K=cc(o),Z=K&&K.nodeType===1?K:mr(D.current).body,R=Z.getBoundingClientRect();if(process.env.NODE_ENV!=="production"){const ge=Z.getBoundingClientRect();process.env.NODE_ENV!=="test"&&ge.top===0&&ge.left===0&&ge.right===0&&ge.bottom===0&&console.warn(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
236
236
  `))}return{top:R.top+P2(R,a.vertical),left:R.left+k2(R,a.horizontal)}},[o,a.horizontal,a.vertical,s,l]),P=O.useCallback(K=>({vertical:P2(K,S.vertical),horizontal:k2(K,S.horizontal)}),[S.horizontal,S.vertical]),N=O.useCallback(K=>{const Z={width:K.offsetWidth,height:K.offsetHeight},R=P(Z);if(l==="none")return{top:null,left:null,transformOrigin:C2(R)};const ge=A();let te=ge.top-R.vertical,ve=ge.left-R.horizontal;const we=te+Z.height,Fe=ve+Z.width,st=oo(cc(o)),_t=st.innerHeight-p,ut=st.innerWidth-p;if(p!==null&&te<p){const Ye=te-p;te-=Ye,R.vertical+=Ye}else if(p!==null&&we>_t){const Ye=we-_t;te-=Ye,R.vertical+=Ye}if(process.env.NODE_ENV!=="production"&&Z.height>_t&&Z.height&&_t&&console.error(["MUI: The popover component is too tall.",`Some part of it can not be seen on the screen (${Z.height-_t}px).`,"Please consider adding a `max-height` to improve the user-experience."].join(`
237
237
  `)),p!==null&&ve<p){const Ye=ve-p;ve-=Ye,R.horizontal+=Ye}else if(Fe>ut){const Ye=Fe-ut;ve-=Ye,R.horizontal+=Ye}return{top:`${Math.round(te)}px`,left:`${Math.round(ve)}px`,transformOrigin:C2(R)}},[o,l,A,P,p]),[M,I]=O.useState(m),L=O.useCallback(()=>{const K=D.current;if(!K)return;const Z=N(K);Z.top!==null&&K.style.setProperty("top",Z.top),Z.left!==null&&(K.style.left=Z.left),K.style.transformOrigin=Z.transformOrigin,I(!0)},[N]);O.useEffect(()=>(E&&window.addEventListener("scroll",L),()=>window.removeEventListener("scroll",L)),[o,E,L]);const $=()=>{L()},V=()=>{I(!1)};O.useEffect(()=>{m&&L()}),O.useImperativeHandle(i,()=>m?{updatePosition:()=>{L()}}:null,[m,L]),O.useEffect(()=>{if(!m)return;const K=eC(()=>{L()}),Z=oo(cc(o));return Z.addEventListener("resize",K),()=>{K.clear(),Z.removeEventListener("resize",K)}},[o,m,L]);let z=x;const B={slots:{transition:w,...g},slotProps:{transition:_,paper:h,...b}},[X,q]=Qn("transition",{elementType:Kc,externalForwardedProps:B,ownerState:T,getSlotProps:K=>({...K,onEntering:(Z,R)=>{K.onEntering?.(Z,R),$()},onExited:Z=>{K.onExited?.(Z),V()}}),additionalProps:{appear:!0,in:m}});x==="auto"&&!X.muiSupportAuto&&(z=void 0);const re=d||(o?mr(cc(o)).body:void 0),[J,{slots:ee,slotProps:ie,...ae}]=Qn("root",{ref:n,elementType:_ie,externalForwardedProps:{...B,...C},shouldForwardComponentProp:!0,additionalProps:{slots:{backdrop:g.backdrop},slotProps:{backdrop:S5(typeof b.backdrop=="function"?b.backdrop(T):b.backdrop,{invisible:!0})},container:re,open:m},ownerState:T,className:oe(j.root,u)}),[ue,U]=Qn("paper",{ref:D,className:j.paper,elementType:_j,externalForwardedProps:B,shouldForwardComponentProp:!0,additionalProps:{elevation:f,style:M?void 0:{opacity:0}},ownerState:T});return v.jsx(J,{...ae,...!up(J)&&{slots:ee,slotProps:ie,disableScrollLock:E},children:v.jsx(X,{...q,timeout:z,children:v.jsx(ue,{...U,children:c})})})});process.env.NODE_ENV!=="production"&&(Sj.propTypes={action:So,anchorEl:wl(y.oneOfType([fo,y.func]),e=>{if(e.open&&(!e.anchorReference||e.anchorReference==="anchorEl")){const t=cc(e.anchorEl);if(t&&t.nodeType===1){const n=t.getBoundingClientRect();if(process.env.NODE_ENV!=="test"&&n.top===0&&n.left===0&&n.right===0&&n.bottom===0)return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.","The anchor element should be part of the document layout.","Make sure the element is present in the document or that it's not display none."].join(`
238
238
  `))}else return new Error(["MUI: The `anchorEl` prop provided to the component is invalid.",`It should be an Element or PopoverVirtualElement instance but it's \`${t}\` instead.`].join(`
239
239
  `))}return null}),anchorOrigin:y.shape({horizontal:y.oneOfType([y.oneOf(["center","left","right"]),y.number]).isRequired,vertical:y.oneOfType([y.oneOf(["bottom","center","top"]),y.number]).isRequired}),anchorPosition:y.shape({left:y.number.isRequired,top:y.number.isRequired}),anchorReference:y.oneOf(["anchorEl","anchorPosition","none"]),BackdropComponent:y.elementType,BackdropProps:y.object,children:y.node,classes:y.object,className:y.string,container:y.oneOfType([fo,y.func]),disableScrollLock:y.bool,elevation:UN,marginThreshold:y.number,onClose:y.func,open:y.bool.isRequired,PaperProps:y.shape({component:zN}),slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),paper:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,paper:y.elementType,root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transformOrigin:y.shape({horizontal:y.oneOfType([y.oneOf(["center","left","right"]),y.number]).isRequired,vertical:y.oneOfType([y.oneOf(["bottom","center","top"]),y.number]).isRequired}),TransitionComponent:y.elementType,transitionDuration:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})]),TransitionProps:y.object});function Sie(e){return pn("MuiMenu",e)}Ln("MuiMenu",["root","paper","list"]);const Oie={vertical:"top",horizontal:"right"},Eie={vertical:"top",horizontal:"left"},Pie=e=>{const{classes:t}=e;return Dn({root:["root"],paper:["paper"],list:["list"]},Sie,t)},kie=Ce(Sj,{shouldForwardProp:e=>mo(e)||e==="classes",name:"MuiMenu",slot:"Root"})({}),Cie=Ce(_j,{name:"MuiMenu",slot:"Paper"})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Die=Ce(wj,{name:"MuiMenu",slot:"List"})({outline:0}),Oj=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiMenu"}),{autoFocus:i=!0,children:o,className:a,disableAutoFocusItem:s=!1,MenuListProps:l={},onClose:c,open:u,PaperProps:d={},PopoverClasses:f,transitionDuration:p="auto",TransitionProps:{onEntering:m,...h}={},variant:g="selectedMenu",slots:b={},slotProps:S={},...w}=r,x=tb(),_={...r,autoFocus:i,disableAutoFocusItem:s,MenuListProps:l,onEntering:m,PaperProps:d,transitionDuration:p,TransitionProps:h,variant:g},E=Pie(_),C=i&&!s&&u,D=O.useRef(null),T=(z,B)=>{D.current&&D.current.adjustStyleForScrollbar(z,{direction:x?"rtl":"ltr"}),m&&m(z,B)},j=z=>{z.key==="Tab"&&(z.preventDefault(),c&&c(z,"tabKeyDown"))};let A=-1;O.Children.map(o,(z,B)=>{O.isValidElement(z)&&(process.env.NODE_ENV!=="production"&&Ho.isFragment(z)&&console.error(["MUI: The Menu component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
240
- `)),z.props.disabled||(g==="selectedMenu"&&z.props.selected||A===-1)&&(A=B))});const P={slots:b,slotProps:{list:l,transition:h,paper:d,...S}},N=cj({elementType:b.root,externalSlotProps:S.root,ownerState:_,className:[E.root,a]}),[M,I]=Qn("paper",{className:E.paper,elementType:Cie,externalForwardedProps:P,shouldForwardComponentProp:!0,ownerState:_}),[L,$]=Qn("list",{className:oe(E.list,l.className),elementType:Die,shouldForwardComponentProp:!0,externalForwardedProps:P,getSlotProps:z=>({...z,onKeyDown:B=>{j(B),z.onKeyDown?.(B)}}),ownerState:_}),V=typeof P.slotProps.transition=="function"?P.slotProps.transition(_):P.slotProps.transition;return v.jsx(kie,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?Oie:Eie,slots:{root:b.root,paper:M,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:N,paper:I,backdrop:typeof S.backdrop=="function"?S.backdrop(_):S.backdrop,transition:{...V,onEntering:(...z)=>{T(...z),V?.onEntering?.(...z)}}},open:u,ref:n,transitionDuration:p,ownerState:_,...w,classes:f,children:v.jsx(L,{actions:D,autoFocus:i&&(A===-1||s),autoFocusItem:C,variant:g,...$,children:o})})});process.env.NODE_ENV!=="production"&&(Oj.propTypes={anchorEl:y.oneOfType([fo,y.func]),autoFocus:y.bool,children:y.node,classes:y.object,className:y.string,disableAutoFocusItem:y.bool,MenuListProps:y.object,onClose:y.func,open:y.bool.isRequired,PaperProps:y.object,PopoverClasses:y.object,slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),list:y.oneOfType([y.func,y.object]),paper:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,list:y.elementType,paper:y.elementType,root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transitionDuration:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})]),TransitionProps:y.object,variant:y.oneOf(["menu","selectedMenu"])});function Aie(e){return pn("MuiNativeSelect",e)}const Rx=Ln("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Tie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${un(n)}`,o&&"iconOpen",r&&"disabled"]};return Dn(s,Aie,t)},Ej=Ce("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Rx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Mie=Ce(Ej,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:mo,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Rx.multiple}`]:t.multiple}]}})({}),Pj=Ce("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Rx.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Nie=Ce(Pj,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${un(n.variant)}`],n.open&&t.iconOpen]}})({}),kj=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},d=Tie(u);return v.jsxs(O.Fragment,{children:[v.jsx(Mie,{ownerState:u,className:oe(d.select,r),disabled:i,ref:s||n,...c}),t.multiple?null:v.jsx(Nie,{as:a,ownerState:u,className:d.icon})]})});process.env.NODE_ENV!=="production"&&(kj.propTypes={children:y.node,classes:y.object,className:y.string,disabled:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:So,multiple:y.bool,name:y.string,onChange:y.func,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});var D2;const jie=Ce("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:mo})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Rie=Ce("legend",{name:"MuiNotchedOutlined",shouldForwardProp:mo})(Fn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Cj(e){const{children:t,classes:n,className:r,label:i,notched:o,...a}=e,s=i!=null&&i!=="",l={...e,notched:o,withLabel:s};return v.jsx(jie,{"aria-hidden":!0,className:r,ownerState:l,...a,children:v.jsx(Rie,{ownerState:l,children:s?v.jsx("span",{children:i}):D2||(D2=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(Cj.propTypes={children:y.node,classes:y.object,className:y.string,label:y.node,notched:y.bool.isRequired,style:y.object});const Iie=e=>{const{classes:t}=e,r=Dn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Fre,t);return{...t,...r}},Lie=Ce(Vh,{shouldForwardProp:e=>mo(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Wh})(Fn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ni.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${ni.focused} .${ni.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(wx()).map(([n])=>({props:{color:n},style:{[`&.${ni.focused} .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${ni.error} .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ni.disabled} .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),Fie=Ce(Cj,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Fn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),$ie=Ce(Hh,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:zh})(Fn(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Ix=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:f="text",...p}=r,m=Iie(r),h=Mx(),g=Ax({props:r,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...r,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:h,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:l,size:g.size,type:f},S=u.root??i.Root??Lie,w=u.input??i.Input??$ie,[x,_]=Qn("notchedOutline",{elementType:Fie,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&g.required?v.jsxs(O.Fragment,{children:[s," ","*"]}):s}});return v.jsx(Yh,{slots:{root:S,input:w},slotProps:d,renderSuffix:E=>v.jsx(x,{..._,notched:typeof c<"u"?c:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:o,inputComponent:a,multiline:l,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(Ix.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),defaultValue:y.any,disabled:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:So,label:y.node,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,notched:y.bool,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,notchedOutline:y.oneOfType([y.func,y.object]),root:y.object}),slots:y.shape({input:y.elementType,notchedOutline:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});Ix.muiName="Input";function Dj(e){return pn("MuiSelect",e)}const Kl=Ln("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var A2;const Bie=Ce(Ej,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Kl.select}`]:t.select},{[`&.${Kl.select}`]:t[n.variant]},{[`&.${Kl.error}`]:t.error},{[`&.${Kl.multiple}`]:t.multiple}]}})({[`&.${Kl.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Wie=Ce(Pj,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${un(n.variant)}`],n.open&&t.iconOpen]}})({}),zie=Ce("input",{shouldForwardProp:e=>Jk(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function T2(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Vie(e){return e==null||typeof e=="string"&&!e.trim()}const Hie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${un(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Dn(s,Dj,t)},Aj=O.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:h,labelId:g,MenuProps:b={},multiple:S,name:w,onBlur:x,onChange:_,onClose:E,onFocus:C,onOpen:D,open:T,readOnly:j,renderValue:A,required:P,SelectDisplayProps:N={},tabIndex:M,type:I,value:L,variant:$="standard",...V}=t,[z,B]=Sv({controlled:L,default:u,name:"Select"}),[X,q]=Sv({controlled:T,default:c,name:"Select"}),re=O.useRef(null),J=O.useRef(null),[ee,ie]=O.useState(null),{current:ae}=O.useRef(T!=null),[ue,U]=O.useState(),K=In(n,h),Z=O.useCallback(G=>{J.current=G,G&&ie(G)},[]),R=ee?.parentNode;O.useImperativeHandle(K,()=>({focus:()=>{J.current.focus()},node:re.current,value:z}),[z]),O.useEffect(()=>{c&&X&&ee&&!ae&&(U(a?null:R.clientWidth),J.current.focus())},[ee,a]),O.useEffect(()=>{o&&J.current.focus()},[o]),O.useEffect(()=>{if(!g)return;const G=mr(J.current).getElementById(g);if(G){const de=()=>{getSelection().isCollapsed&&J.current.focus()};return G.addEventListener("click",de),()=>{G.removeEventListener("click",de)}}},[g]);const ge=(G,de)=>{G?D&&D(de):E&&E(de),ae||(U(a?null:R.clientWidth),q(G))},te=G=>{G.button===0&&(G.preventDefault(),J.current.focus(),ge(!0,G))},ve=G=>{ge(!1,G)},we=O.Children.toArray(s),Fe=G=>{const de=we.find(he=>he.props.value===G.target.value);de!==void 0&&(B(de.props.value),_&&_(G,de))},st=G=>de=>{let he;if(de.currentTarget.hasAttribute("tabindex")){if(S){he=Array.isArray(z)?z.slice():[];const rt=z.indexOf(G.props.value);rt===-1?he.push(G.props.value):he.splice(rt,1)}else he=G.props.value;if(G.props.onClick&&G.props.onClick(de),z!==he&&(B(he),_)){const rt=de.nativeEvent||de,gt=new rt.constructor(rt.type,rt);Object.defineProperty(gt,"target",{writable:!0,value:{value:he,name:w}}),_(gt,G)}S||ge(!1,de)}},_t=G=>{j||[" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),ge(!0,G))},ut=ee!==null&&X,Ye=G=>{!ut&&x&&(Object.defineProperty(G,"target",{writable:!0,value:{value:z,name:w}}),x(G))};delete V["aria-invalid"];let At,Ht;const mt=[];let gn=!1,an=!1;(fj({value:z})||f)&&(A?At=A(z):gn=!0);const vn=we.map(G=>{if(!O.isValidElement(G))return null;process.env.NODE_ENV!=="production"&&Ho.isFragment(G)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
241
- `));let de;if(S){if(!Array.isArray(z))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":_i(2));de=z.some(he=>T2(he,G.props.value)),de&&gn&&mt.push(G.props.children)}else de=T2(z,G.props.value),de&&gn&&(Ht=G.props.children);return de&&(an=!0),O.cloneElement(G,{"aria-selected":de?"true":"false",onClick:st(G),onKeyUp:he=>{he.key===" "&&he.preventDefault(),G.props.onKeyUp&&G.props.onKeyUp(he)},role:"option",selected:de,value:void 0,"data-value":G.props.value})});process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(!an&&!S&&z!==""){const G=we.map(de=>de.props.value);console.warn([`MUI: You have provided an out-of-range value \`${z}\` for the select ${w?`(name="${w}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${G.filter(de=>de!=null).map(de=>`\`${de}\``).join(", ")||'""'}.`].join(`
242
- `))}},[an,we,S,w,z]),gn&&(S?mt.length===0?At=null:At=mt.reduce((G,de,he)=>(G.push(de),he<mt.length-1&&G.push(", "),G),[]):At=Ht);let Bn=ue;!a&&ae&&ee&&(Bn=R.clientWidth);let Qt;typeof M<"u"?Qt=M:Qt=d?null:0;const Wn=N.id||(w?`mui-component-select-${w}`:void 0),ye={...t,variant:$,value:z,open:ut,error:p},yn=Hie(ye),Zt={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(ye):b.slotProps?.paper},H={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(ye):b.slotProps?.list},le=Yk();return v.jsxs(O.Fragment,{children:[v.jsx(Bie,{as:"div",ref:Z,tabIndex:Qt,role:"combobox","aria-controls":ut?le:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ut?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,Wn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":P?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:_t,onMouseDown:d||j?null:te,onBlur:Ye,onFocus:C,...N,ownerState:ye,className:oe(N.className,yn.select,l),id:Wn,children:Vie(At)?A2||(A2=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):At}),v.jsx(zie,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:w,ref:re,"aria-hidden":!0,onChange:Fe,tabIndex:-1,disabled:d,className:yn.nativeInput,autoFocus:o,required:P,...V,ownerState:ye}),v.jsx(Wie,{as:m,className:yn.icon,ownerState:ye}),v.jsx(Oj,{id:`menu-${w||""}`,anchorEl:R,open:ut,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":S?"true":void 0,disableListWrap:!0,id:le,...H},paper:{...Zt,style:{minWidth:Bn,...Zt!=null?Zt.style:null}}},children:vn})]})});process.env.NODE_ENV!=="production"&&(Aj.propTypes={"aria-describedby":y.string,"aria-label":y.string,autoFocus:y.bool,autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,disabled:y.bool,displayEmpty:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:So,labelId:y.string,MenuProps:y.object,multiple:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClose:y.func,onFocus:y.func,onOpen:y.func,open:y.bool,readOnly:y.bool,renderValue:y.func,required:y.bool,SelectDisplayProps:y.object,tabIndex:y.oneOfType([y.number,y.string]),type:y.any,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});const Yie=e=>{const{classes:t}=e,r=Dn({root:["root"]},Dj,t);return{...t,...r}},Lx={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>mo(e)&&e!=="variant"},Uie=Ce(jx,Lx)(""),Kie=Ce(Ix,Lx)(""),qie=Ce(Nx,Lx)(""),Fx=O.forwardRef(function(t,n){const r=rr({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Bre,id:d,input:f,inputProps:p,label:m,labelId:h,MenuProps:g,multiple:b=!1,native:S=!1,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:C,variant:D="outlined",...T}=r,j=S?kj:Aj,A=Mx(),P=Ax({props:r,muiFormControl:A,states:["variant","error"]}),N=P.variant||D,M={...r,variant:N,classes:a},I=Yie(M),{root:L,...$}=I,V=f||{standard:v.jsx(Uie,{ownerState:M}),outlined:v.jsx(Kie,{label:m,ownerState:M}),filled:v.jsx(qie,{ownerState:M})}[N],z=In(n,_l(V));return v.jsx(O.Fragment,{children:O.cloneElement(V,{inputComponent:j,inputProps:{children:o,error:P.error,IconComponent:u,variant:N,type:void 0,multiple:b,...S?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:h,MenuProps:g,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:{id:d,...C}},...p,classes:p?Pn($,p.classes):$,...f?f.props.inputProps:{}},...(b&&S||c)&&N==="outlined"?{notched:!0}:{},ref:z,className:oe(V.props.className,s,I.root),...!f&&{variant:N},...T})})});process.env.NODE_ENV!=="production"&&(Fx.propTypes={autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,displayEmpty:y.bool,IconComponent:y.elementType,id:y.string,input:y.element,inputProps:y.object,label:y.node,labelId:y.string,MenuProps:y.object,multiple:y.bool,native:y.bool,onChange:y.func,onClose:y.func,onOpen:y.func,open:y.bool,renderValue:y.func,SelectDisplayProps:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.oneOfType([y.oneOf([""]),y.any]),variant:y.oneOf(["filled","outlined","standard"])});Fx.muiName="Select";function Gie(e){return pn("MuiTooltip",e)}const kt=Ln("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Xie(e){return Math.round(e*1e5)/1e5}const Qie=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${un(o.split("-")[0])}`],arrow:["arrow"]};return Dn(a,Gie,t)},Zie=Ce(Dx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Fn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${kt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${kt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${kt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${kt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${kt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${kt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${kt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${kt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),Jie=Ce("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${un(n.placement.split("-")[0])}`]]}})(Fn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${kt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${kt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${kt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Xie(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${kt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${kt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),eoe=Ce("span",{name:"MuiTooltip",slot:"Arrow"})(Fn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Od=!1;const M2=new Fh;let ql={x:0,y:0};function Ed(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Tj=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:h=0,enterTouchDelay:g=700,followCursor:b=!1,id:S,leaveDelay:w=0,leaveTouchDelay:x=1500,onClose:_,onOpen:E,open:C,placement:D="bottom",PopperComponent:T,PopperProps:j={},slotProps:A={},slots:P={},title:N,TransitionComponent:M,TransitionProps:I,...L}=r,$=O.isValidElement(o)?o:v.jsx("span",{children:o}),V=Wp(),z=tb(),[B,X]=O.useState(),[q,re]=O.useState(null),J=O.useRef(!1),ee=f||b,ie=lc(),ae=lc(),ue=lc(),U=lc(),[K,Z]=Sv({controlled:C,default:!1,name:"Tooltip",state:"open"});let R=K;if(process.env.NODE_ENV!=="production"){const{current:be}=O.useRef(C!==void 0);O.useEffect(()=>{B&&B.disabled&&!be&&N!==""&&B.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
243
- `))},[N,B,be])}const ge=Yk(S),te=O.useRef(),ve=Cc(()=>{te.current!==void 0&&(document.body.style.WebkitUserSelect=te.current,te.current=void 0),U.clear()});O.useEffect(()=>ve,[ve]);const we=be=>{M2.clear(),Od=!0,Z(!0),E&&!R&&E(be)},Fe=Cc(be=>{M2.start(800+w,()=>{Od=!1}),Z(!1),_&&R&&_(be),ie.start(V.transitions.duration.shortest,()=>{J.current=!1})}),st=be=>{J.current&&be.type!=="touchstart"||(B&&B.removeAttribute("title"),ae.clear(),ue.clear(),m||Od&&h?ae.start(Od?h:m,()=>{we(be)}):we(be))},_t=be=>{ae.clear(),ue.start(w,()=>{Fe(be)})},[,ut]=O.useState(!1),Ye=be=>{l2(be.target)||(ut(!1),_t(be))},At=be=>{B||X(be.currentTarget),l2(be.target)&&(ut(!0),st(be))},Ht=be=>{J.current=!0;const An=$.props;An.onTouchStart&&An.onTouchStart(be)},mt=be=>{Ht(be),ue.clear(),ie.clear(),ve(),te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(g,()=>{document.body.style.WebkitUserSelect=te.current,st(be)})},gn=be=>{$.props.onTouchEnd&&$.props.onTouchEnd(be),ve(),ue.start(x,()=>{Fe(be)})};O.useEffect(()=>{if(!R)return;function be(An){An.key==="Escape"&&Fe(An)}return document.addEventListener("keydown",be),()=>{document.removeEventListener("keydown",be)}},[Fe,R]);const an=In(_l($),X,n);!N&&N!==0&&(R=!1);const vn=O.useRef(),Bn=be=>{const An=$.props;An.onMouseMove&&An.onMouseMove(be),ql={x:be.clientX,y:be.clientY},vn.current&&vn.current.update()},Qt={},Wn=typeof N=="string";c?(Qt.title=!R&&Wn&&!d?N:null,Qt["aria-describedby"]=R?ge:null):(Qt["aria-label"]=Wn?N:null,Qt["aria-labelledby"]=R&&!Wn?ge:null);const ye={...Qt,...L,...$.props,className:oe(L.className,$.props.className),onTouchStart:Ht,ref:an,...b?{onMouseMove:Bn}:{}};process.env.NODE_ENV!=="production"&&(ye["data-mui-internal-clone-element"]=!0,O.useEffect(()=>{B&&!B.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
240
+ `)),z.props.disabled||(g==="selectedMenu"&&z.props.selected||A===-1)&&(A=B))});const P={slots:b,slotProps:{list:l,transition:h,paper:d,...S}},N=cj({elementType:b.root,externalSlotProps:S.root,ownerState:_,className:[E.root,a]}),[M,I]=Qn("paper",{className:E.paper,elementType:Cie,externalForwardedProps:P,shouldForwardComponentProp:!0,ownerState:_}),[L,$]=Qn("list",{className:oe(E.list,l.className),elementType:Die,shouldForwardComponentProp:!0,externalForwardedProps:P,getSlotProps:z=>({...z,onKeyDown:B=>{j(B),z.onKeyDown?.(B)}}),ownerState:_}),V=typeof P.slotProps.transition=="function"?P.slotProps.transition(_):P.slotProps.transition;return v.jsx(kie,{onClose:c,anchorOrigin:{vertical:"bottom",horizontal:x?"right":"left"},transformOrigin:x?Oie:Eie,slots:{root:b.root,paper:M,backdrop:b.backdrop,...b.transition&&{transition:b.transition}},slotProps:{root:N,paper:I,backdrop:typeof S.backdrop=="function"?S.backdrop(_):S.backdrop,transition:{...V,onEntering:(...z)=>{T(...z),V?.onEntering?.(...z)}}},open:u,ref:n,transitionDuration:p,ownerState:_,...w,classes:f,children:v.jsx(L,{actions:D,autoFocus:i&&(A===-1||s),autoFocusItem:C,variant:g,...$,children:o})})});process.env.NODE_ENV!=="production"&&(Oj.propTypes={anchorEl:y.oneOfType([fo,y.func]),autoFocus:y.bool,children:y.node,classes:y.object,className:y.string,disableAutoFocusItem:y.bool,MenuListProps:y.object,onClose:y.func,open:y.bool.isRequired,PaperProps:y.object,PopoverClasses:y.object,slotProps:y.shape({backdrop:y.oneOfType([y.func,y.object]),list:y.oneOfType([y.func,y.object]),paper:y.oneOfType([y.func,y.object]),root:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({backdrop:y.elementType,list:y.elementType,paper:y.elementType,root:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),transitionDuration:y.oneOfType([y.oneOf(["auto"]),y.number,y.shape({appear:y.number,enter:y.number,exit:y.number})]),TransitionProps:y.object,variant:y.oneOf(["menu","selectedMenu"])});function Aie(e){return pn("MuiNativeSelect",e)}const Rx=Ln("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Tie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${un(n)}`,o&&"iconOpen",r&&"disabled"]};return Dn(s,Aie,t)},Ej=Ce("select",{name:"MuiNativeSelect"})(({theme:e})=>({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":{borderRadius:0},[`&.${Rx.disabled}`]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(e.vars||e).palette.background.paper},variants:[{props:({ownerState:t})=>t.variant!=="filled"&&t.variant!=="outlined",style:{"&&&":{paddingRight:24,minWidth:16}}},{props:{variant:"filled"},style:{"&&&":{paddingRight:32}}},{props:{variant:"outlined"},style:{borderRadius:(e.vars||e).shape.borderRadius,"&:focus":{borderRadius:(e.vars||e).shape.borderRadius},"&&&":{paddingRight:32}}}]})),Mie=Ce(Ej,{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:mo,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{[`&.${Rx.multiple}`]:t.multiple}]}})({}),Pj=Ce("svg",{name:"MuiNativeSelect"})(({theme:e})=>({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(e.vars||e).palette.action.active,[`&.${Rx.disabled}`]:{color:(e.vars||e).palette.action.disabled},variants:[{props:({ownerState:t})=>t.open,style:{transform:"rotate(180deg)"}},{props:{variant:"filled"},style:{right:7}},{props:{variant:"outlined"},style:{right:7}}]})),Nie=Ce(Pj,{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${un(n.variant)}`],n.open&&t.iconOpen]}})({}),kj=O.forwardRef(function(t,n){const{className:r,disabled:i,error:o,IconComponent:a,inputRef:s,variant:l="standard",...c}=t,u={...t,disabled:i,variant:l,error:o},d=Tie(u);return v.jsxs(O.Fragment,{children:[v.jsx(Mie,{ownerState:u,className:oe(d.select,r),disabled:i,ref:s||n,...c}),t.multiple?null:v.jsx(Nie,{as:a,ownerState:u,className:d.icon})]})});process.env.NODE_ENV!=="production"&&(kj.propTypes={children:y.node,classes:y.object,className:y.string,disabled:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:So,multiple:y.bool,name:y.string,onChange:y.func,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});var D2;const jie=Ce("fieldset",{name:"MuiNotchedOutlined",shouldForwardProp:mo})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),Rie=Ce("legend",{name:"MuiNotchedOutlined",shouldForwardProp:mo})(Fn(({theme:e})=>({float:"unset",width:"auto",overflow:"hidden",variants:[{props:({ownerState:t})=>!t.withLabel,style:{padding:0,lineHeight:"11px",transition:e.transitions.create("width",{duration:150,easing:e.transitions.easing.easeOut})}},{props:({ownerState:t})=>t.withLabel,style:{display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:e.transitions.create("max-width",{duration:50,easing:e.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}}},{props:({ownerState:t})=>t.withLabel&&t.notched,style:{maxWidth:"100%",transition:e.transitions.create("max-width",{duration:100,easing:e.transitions.easing.easeOut,delay:50})}}]})));function Cj(e){const{children:t,classes:n,className:r,label:i,notched:o,...a}=e,s=i!=null&&i!=="",l={...e,notched:o,withLabel:s};return v.jsx(jie,{"aria-hidden":!0,className:r,ownerState:l,...a,children:v.jsx(Rie,{ownerState:l,children:s?v.jsx("span",{children:i}):D2||(D2=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"}))})})}process.env.NODE_ENV!=="production"&&(Cj.propTypes={children:y.node,classes:y.object,className:y.string,label:y.node,notched:y.bool.isRequired,style:y.object});const Iie=e=>{const{classes:t}=e,r=Dn({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},Fre,t);return{...t,...r}},Lie=Ce(Vh,{shouldForwardProp:e=>mo(e)||e==="classes",name:"MuiOutlinedInput",slot:"Root",overridesResolver:Wh})(Fn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{position:"relative",borderRadius:(e.vars||e).shape.borderRadius,[`&:hover .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette.text.primary},"@media (hover: none)":{[`&:hover .${ni.notchedOutline}`]:{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}},[`&.${ni.focused} .${ni.notchedOutline}`]:{borderWidth:2},variants:[...Object.entries(e.palette).filter(wx()).map(([n])=>({props:{color:n},style:{[`&.${ni.focused} .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette[n].main}}})),{props:{},style:{[`&.${ni.error} .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette.error.main},[`&.${ni.disabled} .${ni.notchedOutline}`]:{borderColor:(e.vars||e).palette.action.disabled}}},{props:({ownerState:n})=>n.startAdornment,style:{paddingLeft:14}},{props:({ownerState:n})=>n.endAdornment,style:{paddingRight:14}},{props:({ownerState:n})=>n.multiline,style:{padding:"16.5px 14px"}},{props:({ownerState:n,size:r})=>n.multiline&&r==="small",style:{padding:"8.5px 14px"}}]}})),Fie=Ce(Cj,{name:"MuiOutlinedInput",slot:"NotchedOutline"})(Fn(({theme:e})=>{const t=e.palette.mode==="light"?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:e.vars?e.alpha(e.vars.palette.common.onBackground,.23):t}})),$ie=Ce(Hh,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:zh})(Fn(({theme:e})=>({padding:"16.5px 14px",...!e.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:e.palette.mode==="light"?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:e.palette.mode==="light"?null:"#fff",caretColor:e.palette.mode==="light"?null:"#fff",borderRadius:"inherit"}},...e.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[e.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},variants:[{props:{size:"small"},style:{padding:"8.5px 14px"}},{props:({ownerState:t})=>t.multiline,style:{padding:0}},{props:({ownerState:t})=>t.startAdornment,style:{paddingLeft:0}},{props:({ownerState:t})=>t.endAdornment,style:{paddingRight:0}}]}))),Ix=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiOutlinedInput"}),{components:i={},fullWidth:o=!1,inputComponent:a="input",label:s,multiline:l=!1,notched:c,slots:u={},slotProps:d={},type:f="text",...p}=r,m=Iie(r),h=Mx(),g=Ax({props:r,muiFormControl:h,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),b={...r,color:g.color||"primary",disabled:g.disabled,error:g.error,focused:g.focused,formControl:h,fullWidth:o,hiddenLabel:g.hiddenLabel,multiline:l,size:g.size,type:f},S=u.root??i.Root??Lie,w=u.input??i.Input??$ie,[x,_]=Qn("notchedOutline",{elementType:Fie,className:m.notchedOutline,shouldForwardComponentProp:!0,ownerState:b,externalForwardedProps:{slots:u,slotProps:d},additionalProps:{label:s!=null&&s!==""&&g.required?v.jsxs(O.Fragment,{children:[s," ","*"]}):s}});return v.jsx(Yh,{slots:{root:S,input:w},slotProps:d,renderSuffix:E=>v.jsx(x,{..._,notched:typeof c<"u"?c:!!(E.startAdornment||E.filled||E.focused)}),fullWidth:o,inputComponent:a,multiline:l,ref:n,type:f,...p,classes:{...m,notchedOutline:null}})});process.env.NODE_ENV!=="production"&&(Ix.propTypes={autoComplete:y.string,autoFocus:y.bool,classes:y.object,color:y.oneOfType([y.oneOf(["primary","secondary"]),y.string]),components:y.shape({Input:y.elementType,Root:y.elementType}),defaultValue:y.any,disabled:y.bool,endAdornment:y.node,error:y.bool,fullWidth:y.bool,id:y.string,inputComponent:y.elementType,inputProps:y.object,inputRef:So,label:y.node,margin:y.oneOf(["dense","none"]),maxRows:y.oneOfType([y.number,y.string]),minRows:y.oneOfType([y.number,y.string]),multiline:y.bool,name:y.string,notched:y.bool,onChange:y.func,placeholder:y.string,readOnly:y.bool,required:y.bool,rows:y.oneOfType([y.number,y.string]),slotProps:y.shape({input:y.object,notchedOutline:y.oneOfType([y.func,y.object]),root:y.object}),slots:y.shape({input:y.elementType,notchedOutline:y.elementType,root:y.elementType}),startAdornment:y.node,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),type:y.string,value:y.any});Ix.muiName="Input";function Dj(e){return pn("MuiSelect",e)}const Kl=Ln("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var A2;const Bie=Ce(Ej,{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{[`&.${Kl.select}`]:t.select},{[`&.${Kl.select}`]:t[n.variant]},{[`&.${Kl.error}`]:t.error},{[`&.${Kl.multiple}`]:t.multiple}]}})({[`&.${Kl.select}`]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),Wie=Ce(Pj,{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t[`icon${un(n.variant)}`],n.open&&t.iconOpen]}})({}),zie=Ce("input",{shouldForwardProp:e=>Jk(e)&&e!=="classes",name:"MuiSelect",slot:"NativeInput"})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function T2(e,t){return typeof t=="object"&&t!==null?e===t:String(e)===String(t)}function Vie(e){return e==null||typeof e=="string"&&!e.trim()}const Hie=e=>{const{classes:t,variant:n,disabled:r,multiple:i,open:o,error:a}=e,s={select:["select",n,r&&"disabled",i&&"multiple",a&&"error"],icon:["icon",`icon${un(n)}`,o&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return Dn(s,Dj,t)},Aj=O.forwardRef(function(t,n){const{"aria-describedby":r,"aria-label":i,autoFocus:o,autoWidth:a,children:s,className:l,defaultOpen:c,defaultValue:u,disabled:d,displayEmpty:f,error:p=!1,IconComponent:m,inputRef:h,labelId:g,MenuProps:b={},multiple:S,name:w,onBlur:x,onChange:_,onClose:E,onFocus:C,onOpen:D,open:T,readOnly:j,renderValue:A,required:P,SelectDisplayProps:N={},tabIndex:M,type:I,value:L,variant:$="standard",...V}=t,[z,B]=Sv({controlled:L,default:u,name:"Select"}),[X,q]=Sv({controlled:T,default:c,name:"Select"}),re=O.useRef(null),J=O.useRef(null),[ee,ie]=O.useState(null),{current:ae}=O.useRef(T!=null),[ue,U]=O.useState(),K=In(n,h),Z=O.useCallback(G=>{J.current=G,G&&ie(G)},[]),R=ee?.parentNode;O.useImperativeHandle(K,()=>({focus:()=>{J.current.focus()},node:re.current,value:z}),[z]),O.useEffect(()=>{c&&X&&ee&&!ae&&(U(a?null:R.clientWidth),J.current.focus())},[ee,a]),O.useEffect(()=>{o&&J.current.focus()},[o]),O.useEffect(()=>{if(!g)return;const G=mr(J.current).getElementById(g);if(G){const de=()=>{getSelection().isCollapsed&&J.current.focus()};return G.addEventListener("click",de),()=>{G.removeEventListener("click",de)}}},[g]);const ge=(G,de)=>{G?D&&D(de):E&&E(de),ae||(U(a?null:R.clientWidth),q(G))},te=G=>{G.button===0&&(G.preventDefault(),J.current.focus(),ge(!0,G))},ve=G=>{ge(!1,G)},we=O.Children.toArray(s),Fe=G=>{const de=we.find(he=>he.props.value===G.target.value);de!==void 0&&(B(de.props.value),_&&_(G,de))},st=G=>de=>{let he;if(de.currentTarget.hasAttribute("tabindex")){if(S){he=Array.isArray(z)?z.slice():[];const rt=z.indexOf(G.props.value);rt===-1?he.push(G.props.value):he.splice(rt,1)}else he=G.props.value;if(G.props.onClick&&G.props.onClick(de),z!==he&&(B(he),_)){const rt=de.nativeEvent||de,gt=new rt.constructor(rt.type,rt);Object.defineProperty(gt,"target",{writable:!0,value:{value:he,name:w}}),_(gt,G)}S||ge(!1,de)}},_t=G=>{j||[" ","ArrowUp","ArrowDown","Enter"].includes(G.key)&&(G.preventDefault(),ge(!0,G))},ut=ee!==null&&X,Ye=G=>{!ut&&x&&(Object.defineProperty(G,"target",{writable:!0,value:{value:z,name:w}}),x(G))};delete V["aria-invalid"];let At,Yt;const mt=[];let gn=!1,an=!1;(fj({value:z})||f)&&(A?At=A(z):gn=!0);const vn=we.map(G=>{if(!O.isValidElement(G))return null;process.env.NODE_ENV!=="production"&&Ho.isFragment(G)&&console.error(["MUI: The Select component doesn't accept a Fragment as a child.","Consider providing an array instead."].join(`
241
+ `));let de;if(S){if(!Array.isArray(z))throw new Error(process.env.NODE_ENV!=="production"?"MUI: The `value` prop must be an array when using the `Select` component with `multiple`.":_i(2));de=z.some(he=>T2(he,G.props.value)),de&&gn&&mt.push(G.props.children)}else de=T2(z,G.props.value),de&&gn&&(Yt=G.props.children);return de&&(an=!0),O.cloneElement(G,{"aria-selected":de?"true":"false",onClick:st(G),onKeyUp:he=>{he.key===" "&&he.preventDefault(),G.props.onKeyUp&&G.props.onKeyUp(he)},role:"option",selected:de,value:void 0,"data-value":G.props.value})});process.env.NODE_ENV!=="production"&&O.useEffect(()=>{if(!an&&!S&&z!==""){const G=we.map(de=>de.props.value);console.warn([`MUI: You have provided an out-of-range value \`${z}\` for the select ${w?`(name="${w}") `:""}component.`,"Consider providing a value that matches one of the available options or ''.",`The available values are ${G.filter(de=>de!=null).map(de=>`\`${de}\``).join(", ")||'""'}.`].join(`
242
+ `))}},[an,we,S,w,z]),gn&&(S?mt.length===0?At=null:At=mt.reduce((G,de,he)=>(G.push(de),he<mt.length-1&&G.push(", "),G),[]):At=Yt);let Bn=ue;!a&&ae&&ee&&(Bn=R.clientWidth);let Zt;typeof M<"u"?Zt=M:Zt=d?null:0;const Wn=N.id||(w?`mui-component-select-${w}`:void 0),ye={...t,variant:$,value:z,open:ut,error:p},yn=Hie(ye),Jt={...b.PaperProps,...typeof b.slotProps?.paper=="function"?b.slotProps.paper(ye):b.slotProps?.paper},H={...b.MenuListProps,...typeof b.slotProps?.list=="function"?b.slotProps.list(ye):b.slotProps?.list},le=Yk();return v.jsxs(O.Fragment,{children:[v.jsx(Bie,{as:"div",ref:Z,tabIndex:Zt,role:"combobox","aria-controls":ut?le:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":ut?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[g,Wn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":P?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:_t,onMouseDown:d||j?null:te,onBlur:Ye,onFocus:C,...N,ownerState:ye,className:oe(N.className,yn.select,l),id:Wn,children:Vie(At)?A2||(A2=v.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):At}),v.jsx(zie,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:w,ref:re,"aria-hidden":!0,onChange:Fe,tabIndex:-1,disabled:d,className:yn.nativeInput,autoFocus:o,required:P,...V,ownerState:ye}),v.jsx(Wie,{as:m,className:yn.icon,ownerState:ye}),v.jsx(Oj,{id:`menu-${w||""}`,anchorEl:R,open:ut,onClose:ve,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...b,slotProps:{...b.slotProps,list:{"aria-labelledby":g,role:"listbox","aria-multiselectable":S?"true":void 0,disableListWrap:!0,id:le,...H},paper:{...Jt,style:{minWidth:Bn,...Jt!=null?Jt.style:null}}},children:vn})]})});process.env.NODE_ENV!=="production"&&(Aj.propTypes={"aria-describedby":y.string,"aria-label":y.string,autoFocus:y.bool,autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,disabled:y.bool,displayEmpty:y.bool,error:y.bool,IconComponent:y.elementType.isRequired,inputRef:So,labelId:y.string,MenuProps:y.object,multiple:y.bool,name:y.string,onBlur:y.func,onChange:y.func,onClose:y.func,onFocus:y.func,onOpen:y.func,open:y.bool,readOnly:y.bool,renderValue:y.func,required:y.bool,SelectDisplayProps:y.object,tabIndex:y.oneOfType([y.number,y.string]),type:y.any,value:y.any,variant:y.oneOf(["standard","outlined","filled"])});const Yie=e=>{const{classes:t}=e,r=Dn({root:["root"]},Dj,t);return{...t,...r}},Lx={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>mo(e)&&e!=="variant"},Uie=Ce(jx,Lx)(""),Kie=Ce(Ix,Lx)(""),qie=Ce(Nx,Lx)(""),Fx=O.forwardRef(function(t,n){const r=rr({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Bre,id:d,input:f,inputProps:p,label:m,labelId:h,MenuProps:g,multiple:b=!1,native:S=!1,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:C,variant:D="outlined",...T}=r,j=S?kj:Aj,A=Mx(),P=Ax({props:r,muiFormControl:A,states:["variant","error"]}),N=P.variant||D,M={...r,variant:N,classes:a},I=Yie(M),{root:L,...$}=I,V=f||{standard:v.jsx(Uie,{ownerState:M}),outlined:v.jsx(Kie,{label:m,ownerState:M}),filled:v.jsx(qie,{ownerState:M})}[N],z=In(n,_l(V));return v.jsx(O.Fragment,{children:O.cloneElement(V,{inputComponent:j,inputProps:{children:o,error:P.error,IconComponent:u,variant:N,type:void 0,multiple:b,...S?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:h,MenuProps:g,onClose:w,onOpen:x,open:_,renderValue:E,SelectDisplayProps:{id:d,...C}},...p,classes:p?Pn($,p.classes):$,...f?f.props.inputProps:{}},...(b&&S||c)&&N==="outlined"?{notched:!0}:{},ref:z,className:oe(V.props.className,s,I.root),...!f&&{variant:N},...T})})});process.env.NODE_ENV!=="production"&&(Fx.propTypes={autoWidth:y.bool,children:y.node,classes:y.object,className:y.string,defaultOpen:y.bool,defaultValue:y.any,displayEmpty:y.bool,IconComponent:y.elementType,id:y.string,input:y.element,inputProps:y.object,label:y.node,labelId:y.string,MenuProps:y.object,multiple:y.bool,native:y.bool,onChange:y.func,onClose:y.func,onOpen:y.func,open:y.bool,renderValue:y.func,SelectDisplayProps:y.object,sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),value:y.oneOfType([y.oneOf([""]),y.any]),variant:y.oneOf(["filled","outlined","standard"])});Fx.muiName="Select";function Gie(e){return pn("MuiTooltip",e)}const kt=Ln("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function Xie(e){return Math.round(e*1e5)/1e5}const Qie=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${un(o.split("-")[0])}`],arrow:["arrow"]};return Dn(a,Gie,t)},Zie=Ce(Dx,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(Fn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${kt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${kt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${kt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${kt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${kt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${kt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${kt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${kt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),Jie=Ce("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${un(n.placement.split("-")[0])}`]]}})(Fn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${kt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${kt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${kt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${Xie(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${kt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${kt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${kt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${kt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),eoe=Ce("span",{name:"MuiTooltip",slot:"Arrow"})(Fn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Od=!1;const M2=new Fh;let ql={x:0,y:0};function Ed(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Tj=O.forwardRef(function(t,n){const r=rr({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:m=100,enterNextDelay:h=0,enterTouchDelay:g=700,followCursor:b=!1,id:S,leaveDelay:w=0,leaveTouchDelay:x=1500,onClose:_,onOpen:E,open:C,placement:D="bottom",PopperComponent:T,PopperProps:j={},slotProps:A={},slots:P={},title:N,TransitionComponent:M,TransitionProps:I,...L}=r,$=O.isValidElement(o)?o:v.jsx("span",{children:o}),V=Wp(),z=tb(),[B,X]=O.useState(),[q,re]=O.useState(null),J=O.useRef(!1),ee=f||b,ie=lc(),ae=lc(),ue=lc(),U=lc(),[K,Z]=Sv({controlled:C,default:!1,name:"Tooltip",state:"open"});let R=K;if(process.env.NODE_ENV!=="production"){const{current:be}=O.useRef(C!==void 0);O.useEffect(()=>{B&&B.disabled&&!be&&N!==""&&B.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
243
+ `))},[N,B,be])}const ge=Yk(S),te=O.useRef(),ve=Cc(()=>{te.current!==void 0&&(document.body.style.WebkitUserSelect=te.current,te.current=void 0),U.clear()});O.useEffect(()=>ve,[ve]);const we=be=>{M2.clear(),Od=!0,Z(!0),E&&!R&&E(be)},Fe=Cc(be=>{M2.start(800+w,()=>{Od=!1}),Z(!1),_&&R&&_(be),ie.start(V.transitions.duration.shortest,()=>{J.current=!1})}),st=be=>{J.current&&be.type!=="touchstart"||(B&&B.removeAttribute("title"),ae.clear(),ue.clear(),m||Od&&h?ae.start(Od?h:m,()=>{we(be)}):we(be))},_t=be=>{ae.clear(),ue.start(w,()=>{Fe(be)})},[,ut]=O.useState(!1),Ye=be=>{l2(be.target)||(ut(!1),_t(be))},At=be=>{B||X(be.currentTarget),l2(be.target)&&(ut(!0),st(be))},Yt=be=>{J.current=!0;const An=$.props;An.onTouchStart&&An.onTouchStart(be)},mt=be=>{Yt(be),ue.clear(),ie.clear(),ve(),te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",U.start(g,()=>{document.body.style.WebkitUserSelect=te.current,st(be)})},gn=be=>{$.props.onTouchEnd&&$.props.onTouchEnd(be),ve(),ue.start(x,()=>{Fe(be)})};O.useEffect(()=>{if(!R)return;function be(An){An.key==="Escape"&&Fe(An)}return document.addEventListener("keydown",be),()=>{document.removeEventListener("keydown",be)}},[Fe,R]);const an=In(_l($),X,n);!N&&N!==0&&(R=!1);const vn=O.useRef(),Bn=be=>{const An=$.props;An.onMouseMove&&An.onMouseMove(be),ql={x:be.clientX,y:be.clientY},vn.current&&vn.current.update()},Zt={},Wn=typeof N=="string";c?(Zt.title=!R&&Wn&&!d?N:null,Zt["aria-describedby"]=R?ge:null):(Zt["aria-label"]=Wn?N:null,Zt["aria-labelledby"]=R&&!Wn?ge:null);const ye={...Zt,...L,...$.props,className:oe(L.className,$.props.className),onTouchStart:Yt,ref:an,...b?{onMouseMove:Bn}:{}};process.env.NODE_ENV!=="production"&&(ye["data-mui-internal-clone-element"]=!0,O.useEffect(()=>{B&&!B.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
244
244
  `))},[B]));const yn={};p||(ye.onTouchStart=mt,ye.onTouchEnd=gn),d||(ye.onMouseOver=Ed(st,ye.onMouseOver),ye.onMouseLeave=Ed(_t,ye.onMouseLeave),ee||(yn.onMouseOver=st,yn.onMouseLeave=_t)),u||(ye.onFocus=Ed(At,ye.onFocus),ye.onBlur=Ed(Ye,ye.onBlur),ee||(yn.onFocus=At,yn.onBlur=Ye)),process.env.NODE_ENV!=="production"&&$.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${$.props.title}\` or the Tooltip component.`].join(`
245
- `));const Zt={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:D,PopperComponentProp:T,touch:J.current},H=typeof A.popper=="function"?A.popper(Zt):A.popper,le=O.useMemo(()=>{let be=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return j.popperOptions?.modifiers&&(be=be.concat(j.popperOptions.modifiers)),H?.popperOptions?.modifiers&&(be=be.concat(H.popperOptions.modifiers)),{...j.popperOptions,...H?.popperOptions,modifiers:be}},[q,j.popperOptions,H?.popperOptions]),G=Qie(Zt),de=typeof A.transition=="function"?A.transition(Zt):A.transition,he={slots:{popper:s.Popper,transition:s.Transition??M,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:A.arrow??l.arrow,popper:{...j,...H??l.popper},tooltip:A.tooltip??l.tooltip,transition:{...I,...de??l.transition}}},[rt,gt]=Qn("popper",{elementType:Zie,externalForwardedProps:he,ownerState:Zt,className:oe(G.popper,j?.className)}),[xr,ko]=Qn("transition",{elementType:Kc,externalForwardedProps:he,ownerState:Zt}),[wr,la]=Qn("tooltip",{elementType:Jie,className:G.tooltip,externalForwardedProps:he,ownerState:Zt}),[ji,ei]=Qn("arrow",{elementType:eoe,className:G.arrow,externalForwardedProps:he,ownerState:Zt,ref:re});return v.jsxs(O.Fragment,{children:[O.cloneElement($,ye),v.jsx(rt,{as:T??Dx,placement:D,anchorEl:b?{getBoundingClientRect:()=>({top:ql.y,left:ql.x,right:ql.x,bottom:ql.y,width:0,height:0})}:B,popperRef:vn,open:B?R:!1,id:ge,transition:!0,...yn,...gt,popperOptions:le,children:({TransitionProps:be})=>v.jsx(xr,{timeout:V.transitions.duration.shorter,...be,...ko,children:v.jsxs(wr,{...la,children:[N,i?v.jsx(ji,{...ei}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Tj.propTypes={arrow:y.bool,children:Sl.isRequired,classes:y.object,className:y.string,components:y.shape({Arrow:y.elementType,Popper:y.elementType,Tooltip:y.elementType,Transition:y.elementType}),componentsProps:y.shape({arrow:y.object,popper:y.object,tooltip:y.object,transition:y.object}),describeChild:y.bool,disableFocusListener:y.bool,disableHoverListener:y.bool,disableInteractive:y.bool,disableTouchListener:y.bool,enterDelay:y.number,enterNextDelay:y.number,enterTouchDelay:y.number,followCursor:y.bool,id:y.string,leaveDelay:y.number,leaveTouchDelay:y.number,onClose:y.func,onOpen:y.func,open:y.bool,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:y.elementType,PopperProps:y.object,slotProps:y.shape({arrow:y.oneOfType([y.func,y.object]),popper:y.oneOfType([y.func,y.object]),tooltip:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({arrow:y.elementType,popper:y.elementType,tooltip:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.node,TransitionComponent:y.elementType,TransitionProps:y.object});function toe(e){return Ze({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 noe(e){return Ze({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function roe(e){return Ze({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)}sf(Fx)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function Ol({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||[],[a,s]=k.useState(o),[l,c]=k.useState("");t.filter(d=>d.community_name.toLowerCase().includes(l.toLowerCase()));const u=()=>{Qw("widget_id",e),Qw("export",!0),i()};return v.jsx("div",{className:"flex items-center gap-2",children:v.jsx(Tj,{title:"Export CSV for this widget",children:v.jsx("button",{onClick:u,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:v.jsx(noe,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function ioe({isStatic:e,data:t}){const n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),r=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),a=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:n,color:a[0]},{name:"Move-outs",value:r,color:a[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return v.jsx(os,{title:"Community",period:"This Month",icon:v.jsx(VC,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(xb,{value:l(i,o)}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),v.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:v.jsx(Ft,{width:"75%",height:"100%",children:v.jsxs(_o,{children:[v.jsxs(Mi,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[v.jsx(Vt,{fill:a[0]}),v.jsx(Vt,{fill:a[1]})]}),v.jsx(on,{content:v.jsx(fu,{})})]})})})]})})}function ooe({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{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]}],o=t?.widget==="commercial";return v.jsx(os,{title:"Engagement",period:"This Month",icon:v.jsx(HC,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} gap-[20px]`,actionButtons:!o&&v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsx("div",{className:"w-full h-[235px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[v.jsx(Hr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),v.jsx(nr,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),v.jsx(br,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),v.jsx(on,{content:v.jsx(fu,{}),cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0}}),v.jsx(jn,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>v.jsx(Vt,{fill:r[s]},a.name))})]})})})})}function aoe({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=k.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return v.jsxs(os,{title:"Facilities",period:"Today",icon:v.jsx(Zp,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),v.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),v.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),v.jsx("div",{className:"w-full h-[170px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(xx,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(br,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),v.jsx(nr,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(nr,{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}),v.jsx(on,{content:v.jsx(fu,{})}),v.jsx(zo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),v.jsx(zo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function soe({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(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 a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return v.jsx(os,{title:"Income",period:"This Month",icon:v.jsx(Av,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:v.jsx(Ol,{widgetId:e?.widget_id,options:e?.communities}),children:v.jsxs("div",{children:[v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Income"}),v.jsx("div",{children:"Collection"}),v.jsx("div",{children:"Closing"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[v.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),v.jsx("div",{children:a(t.income,t?.currency_type)}),v.jsx("div",{children:a(t.collection,t?.currency_type)}),v.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),v.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex items-center gap-[12px]",children:[v.jsx(Av,{className:"!text-[24px] text-red-600"}),v.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Expenditure"}),v.jsx("div",{children:"Payment"}),v.jsx("div",{children:"Outstanding"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[v.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),v.jsx("div",{children:a(n.expenditure,n?.currency_type)}),v.jsx("div",{children:a(n.payment,n?.currency_type)}),v.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var loe="tippy-box",Mj="tippy-content",coe="tippy-backdrop",Nj="tippy-arrow",jj="tippy-svg-arrow",Oa={passive:!0,capture:!0},Rj=function(){return document.body};function uoe(e,t){return{}.hasOwnProperty.call(e,t)}function Qg(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function $x(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Ij(e,t){return typeof e=="function"?e.apply(void 0,t):e}function N2(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function doe(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function foe(e){return e.split(/\s+/).filter(Boolean)}function ks(e){return[].concat(e)}function j2(e,t){e.indexOf(t)===-1&&e.push(t)}function poe(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function hoe(e){return e.split("-")[0]}function hp(e){return[].slice.call(e)}function R2(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function bc(){return document.createElement("div")}function qc(e){return["Element","Fragment"].some(function(t){return $x(e,t)})}function moe(e){return $x(e,"NodeList")}function goe(e){return $x(e,"MouseEvent")}function voe(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function yoe(e){return qc(e)?[e]:moe(e)?hp(e):Array.isArray(e)?e:hp(document.querySelectorAll(e))}function Zg(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function I2(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function boe(e){var t,n=ks(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function xoe(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=hoe(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,h=o.top-r+d>l,g=r-o.bottom-f>l,b=o.left-n+p>l,S=n-o.right-m>l;return h||g||b||S})}function Jg(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function L2(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var ui={isTouch:!1},F2=0;function woe(){ui.isTouch||(ui.isTouch=!0,window.performance&&document.addEventListener("mousemove",Lj))}function Lj(){var e=performance.now();e-F2<20&&(ui.isTouch=!1,document.removeEventListener("mousemove",Lj)),F2=e}function _oe(){var e=document.activeElement;if(voe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Soe(){document.addEventListener("touchstart",woe,Oa),window.addEventListener("blur",_oe)}var Ooe=typeof window<"u"&&typeof document<"u",Eoe=Ooe?!!window.msCrypto:!1;function ws(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 $2(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Poe(e){return $2(`
245
+ `));const Jt={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:D,PopperComponentProp:T,touch:J.current},H=typeof A.popper=="function"?A.popper(Jt):A.popper,le=O.useMemo(()=>{let be=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return j.popperOptions?.modifiers&&(be=be.concat(j.popperOptions.modifiers)),H?.popperOptions?.modifiers&&(be=be.concat(H.popperOptions.modifiers)),{...j.popperOptions,...H?.popperOptions,modifiers:be}},[q,j.popperOptions,H?.popperOptions]),G=Qie(Jt),de=typeof A.transition=="function"?A.transition(Jt):A.transition,he={slots:{popper:s.Popper,transition:s.Transition??M,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:A.arrow??l.arrow,popper:{...j,...H??l.popper},tooltip:A.tooltip??l.tooltip,transition:{...I,...de??l.transition}}},[rt,gt]=Qn("popper",{elementType:Zie,externalForwardedProps:he,ownerState:Jt,className:oe(G.popper,j?.className)}),[xr,ko]=Qn("transition",{elementType:Kc,externalForwardedProps:he,ownerState:Jt}),[wr,la]=Qn("tooltip",{elementType:Jie,className:G.tooltip,externalForwardedProps:he,ownerState:Jt}),[ji,ei]=Qn("arrow",{elementType:eoe,className:G.arrow,externalForwardedProps:he,ownerState:Jt,ref:re});return v.jsxs(O.Fragment,{children:[O.cloneElement($,ye),v.jsx(rt,{as:T??Dx,placement:D,anchorEl:b?{getBoundingClientRect:()=>({top:ql.y,left:ql.x,right:ql.x,bottom:ql.y,width:0,height:0})}:B,popperRef:vn,open:B?R:!1,id:ge,transition:!0,...yn,...gt,popperOptions:le,children:({TransitionProps:be})=>v.jsx(xr,{timeout:V.transitions.duration.shorter,...be,...ko,children:v.jsxs(wr,{...la,children:[N,i?v.jsx(ji,{...ei}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Tj.propTypes={arrow:y.bool,children:Sl.isRequired,classes:y.object,className:y.string,components:y.shape({Arrow:y.elementType,Popper:y.elementType,Tooltip:y.elementType,Transition:y.elementType}),componentsProps:y.shape({arrow:y.object,popper:y.object,tooltip:y.object,transition:y.object}),describeChild:y.bool,disableFocusListener:y.bool,disableHoverListener:y.bool,disableInteractive:y.bool,disableTouchListener:y.bool,enterDelay:y.number,enterNextDelay:y.number,enterTouchDelay:y.number,followCursor:y.bool,id:y.string,leaveDelay:y.number,leaveTouchDelay:y.number,onClose:y.func,onOpen:y.func,open:y.bool,placement:y.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:y.elementType,PopperProps:y.object,slotProps:y.shape({arrow:y.oneOfType([y.func,y.object]),popper:y.oneOfType([y.func,y.object]),tooltip:y.oneOfType([y.func,y.object]),transition:y.oneOfType([y.func,y.object])}),slots:y.shape({arrow:y.elementType,popper:y.elementType,tooltip:y.elementType,transition:y.elementType}),sx:y.oneOfType([y.arrayOf(y.oneOfType([y.func,y.object,y.bool])),y.func,y.object]),title:y.node,TransitionComponent:y.elementType,TransitionProps:y.object});function toe(e){return Ze({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 noe(e){return Ze({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function roe(e){return Ze({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)}sf(Fx)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function Ol({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||[],[a,s]=k.useState(o),[l,c]=k.useState("");t.filter(d=>d.community_name.toLowerCase().includes(l.toLowerCase()));const u=()=>{Qw("widget_id",e),Qw("export",!0),i()};return v.jsx("div",{className:"flex items-center gap-2",children:v.jsx(Tj,{title:"Export CSV for this widget",children:v.jsx("button",{onClick:u,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:v.jsx(noe,{className:"stroke-[#884EA7] stroke-[1.4]"})})})})}function ioe({isStatic:e,data:t}){const n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),r=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),i=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),a=["#8B5CF6","#EBE4F9"],s=[{name:"Move-ins",value:n,color:a[0]},{name:"Move-outs",value:r,color:a[1]}];function l(c,u){return((Number(c)+Number(u))/2).toFixed(2)+"%"}return v.jsx(os,{title:"Community",period:"This Month",icon:v.jsx(VC,{className:"!text-[24px] text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+r})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(xb,{value:l(i,o)}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),v.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:v.jsx(Ft,{width:"75%",height:"100%",children:v.jsxs(_o,{children:[v.jsxs(Mi,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[v.jsx(Vt,{fill:a[0]}),v.jsx(Vt,{fill:a[1]})]}),v.jsx(Ht,{content:v.jsx(fu,{})})]})})})]})})}function ooe({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{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]}],o=t?.widget==="commercial";return v.jsx(os,{title:"Engagement",period:"This Month",icon:v.jsx(HC,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} ${o?"h-[324px]":"h-[303px]"} gap-[20px]`,actionButtons:!o&&v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsx("div",{className:"w-full h-[235px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[v.jsx(Hr,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),v.jsx(nr,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),v.jsx(br,{type:"number",allowDecimals:!1,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),v.jsx(Ht,{content:v.jsx(fu,{}),cursor:{fill:"transparent"},wrapperStyle:{outline:"none"},position:{x:160,y:0}}),v.jsx(jn,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((a,s)=>v.jsx(Vt,{fill:r[s]},a.name))})]})})})})}function aoe({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=k.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return v.jsxs(os,{title:"Facilities",period:"Today",icon:v.jsx(Zp,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mt-[16px] mb-[16px]",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),v.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),v.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),v.jsx("div",{className:"w-full h-[170px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(xx,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(br,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),v.jsx(nr,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(nr,{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}),v.jsx(Ht,{content:v.jsx(fu,{})}),v.jsx(zo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1,isAnimationActive:!1}),v.jsx(zo,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4",isAnimationActive:!1})]})})})]})}function soe({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(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 a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return v.jsx(os,{title:"Income",period:"This Month",icon:v.jsx(Av,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:v.jsx(Ol,{widgetId:e?.widget_id,options:e?.communities}),children:v.jsxs("div",{children:[v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Income"}),v.jsx("div",{children:"Collection"}),v.jsx("div",{children:"Closing"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[v.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),v.jsx("div",{children:a(t.income,t?.currency_type)}),v.jsx("div",{children:a(t.collection,t?.currency_type)}),v.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),v.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),v.jsx("div",{className:"flex items-center justify-between",children:v.jsxs("div",{className:"flex items-center gap-[12px]",children:[v.jsx(Av,{className:"!text-[24px] text-red-600"}),v.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[v.jsx("div",{children:"Opening"}),v.jsx("div",{children:"Expenditure"}),v.jsx("div",{children:"Payment"}),v.jsx("div",{children:"Outstanding"})]}),v.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[v.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),v.jsx("div",{children:a(n.expenditure,n?.currency_type)}),v.jsx("div",{children:a(n.payment,n?.currency_type)}),v.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var loe="tippy-box",Mj="tippy-content",coe="tippy-backdrop",Nj="tippy-arrow",jj="tippy-svg-arrow",Oa={passive:!0,capture:!0},Rj=function(){return document.body};function uoe(e,t){return{}.hasOwnProperty.call(e,t)}function Qg(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function $x(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function Ij(e,t){return typeof e=="function"?e.apply(void 0,t):e}function N2(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function doe(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function foe(e){return e.split(/\s+/).filter(Boolean)}function ks(e){return[].concat(e)}function j2(e,t){e.indexOf(t)===-1&&e.push(t)}function poe(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function hoe(e){return e.split("-")[0]}function hp(e){return[].slice.call(e)}function R2(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function bc(){return document.createElement("div")}function qc(e){return["Element","Fragment"].some(function(t){return $x(e,t)})}function moe(e){return $x(e,"NodeList")}function goe(e){return $x(e,"MouseEvent")}function voe(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function yoe(e){return qc(e)?[e]:moe(e)?hp(e):Array.isArray(e)?e:hp(document.querySelectorAll(e))}function Zg(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function I2(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function boe(e){var t,n=ks(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function xoe(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=hoe(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,m=c==="left"?u.right.x:0,h=o.top-r+d>l,g=r-o.bottom-f>l,b=o.left-n+p>l,S=n-o.right-m>l;return h||g||b||S})}function Jg(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function L2(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var ui={isTouch:!1},F2=0;function woe(){ui.isTouch||(ui.isTouch=!0,window.performance&&document.addEventListener("mousemove",Lj))}function Lj(){var e=performance.now();e-F2<20&&(ui.isTouch=!1,document.removeEventListener("mousemove",Lj)),F2=e}function _oe(){var e=document.activeElement;if(voe(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function Soe(){document.addEventListener("touchstart",woe,Oa),window.addEventListener("blur",_oe)}var Ooe=typeof window<"u"&&typeof document<"u",Eoe=Ooe?!!window.msCrypto:!1;function ws(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 $2(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function Poe(e){return $2(`
246
246
  %ctippy.js
247
247
 
248
248
  %c`+$2(e)+`
@@ -251,18 +251,18 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
251
251
  `)}function Fj(e){return[Poe(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}var Gc;process.env.NODE_ENV!=="production"&&koe();function koe(){Gc=new Set}function Wi(e,t){if(e&&!Gc.has(t)){var n;Gc.add(t),(n=console).warn.apply(n,Fj(t))}}function My(e,t){if(e&&!Gc.has(t)){var n;Gc.add(t),(n=console).error.apply(n,Fj(t))}}function Coe(e){var t=!e,n=Object.prototype.toString.call(e)==="[object Object]"&&!e.addEventListener;My(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),My(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}var $j={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Doe={allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999},fr=Object.assign({appendTo:Rj,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},$j,Doe),Aoe=Object.keys(fr),Toe=function(t){process.env.NODE_ENV!=="production"&&Wj(t,[]);var n=Object.keys(t);n.forEach(function(r){fr[r]=t[r]})};function Bj(e){var t=e.plugins||[],n=t.reduce(function(r,i){var o=i.name,a=i.defaultValue;if(o){var s;r[o]=e[o]!==void 0?e[o]:(s=fr[o])!=null?s:a}return r},{});return Object.assign({},e,n)}function Moe(e,t){var n=t?Object.keys(Bj(Object.assign({},fr,{plugins:t}))):Aoe,r=n.reduce(function(i,o){var a=(e.getAttribute("data-tippy-"+o)||"").trim();if(!a)return i;if(o==="content")i[o]=a;else try{i[o]=JSON.parse(a)}catch{i[o]=a}return i},{});return r}function B2(e,t){var n=Object.assign({},t,{content:Ij(t.content,[e])},t.ignoreAttributes?{}:Moe(e,t.plugins));return n.aria=Object.assign({},fr.aria,n.aria),n.aria={expanded:n.aria.expanded==="auto"?t.interactive:n.aria.expanded,content:n.aria.content==="auto"?t.interactive?null:"describedby":n.aria.content},n}function Wj(e,t){e===void 0&&(e={}),t===void 0&&(t=[]);var n=Object.keys(e);n.forEach(function(r){var i=doe(fr,Object.keys($j)),o=!uoe(i,r);o&&(o=t.filter(function(a){return a.name===r}).length===0),Wi(o,["`"+r+"`","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.",`
252
252
 
253
253
  `,`All props: https://atomiks.github.io/tippyjs/v6/all-props/
254
- `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Noe=function(){return"innerHTML"};function Ny(e,t){e[Noe()]=t}function W2(e){var t=bc();return e===!0?t.className=Nj:(t.className=jj,qc(e)?t.appendChild(e):Ny(t,e)),t}function z2(e,t){qc(t.content)?(Ny(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Ny(e,t.content):e.textContent=t.content)}function jy(e){var t=e.firstElementChild,n=hp(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(Mj)}),arrow:n.find(function(r){return r.classList.contains(Nj)||r.classList.contains(jj)}),backdrop:n.find(function(r){return r.classList.contains(coe)})}}function zj(e){var t=bc(),n=bc();n.className=loe,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=bc();r.className=Mj,r.setAttribute("data-state","hidden"),z2(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=jy(t),l=s.box,c=s.content,u=s.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&z2(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(W2(a.arrow))):l.appendChild(W2(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}zj.$$tippy=!0;var joe=1,Pd=[],ev=[];function Roe(e,t){var n=B2(e,Object.assign({},fr,Bj(R2(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=N2(te,n.interactiveDebounce),h,g=joe++,b=null,S=poe(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:g,reference:e,popper:bc(),popperInstance:b,props:n,state:w,plugins:S,clearDelayTimeouts:an,setProps:vn,setContent:Bn,show:Qt,hide:Wn,hideWithInteractivity:ye,enable:mt,disable:gn,unmount:yn,destroy:Zt};if(!n.render)return process.env.NODE_ENV!=="production"&&My(!0,"render() function has not been supplied."),x;var _=n.render(x),E=_.popper,C=_.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+x.id,x.popper=E,e._tippy=x,E._tippy=x;var D=S.map(function(H){return H.fn(x)}),T=e.hasAttribute("aria-expanded");return Z(),B(),$(),V("onCreate",[x]),n.showOnCreate&&At(),E.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",m)}),x;function j(){var H=x.props.touch;return Array.isArray(H)?H:[H,0]}function A(){return j()[0]==="hold"}function P(){var H;return!!((H=x.props.render)!=null&&H.$$tippy)}function N(){return h||e}function M(){var H=N().parentNode;return H?boe(H):document}function I(){return jy(E)}function L(H){return x.state.isMounted&&!x.state.isVisible||ui.isTouch||u&&u.type==="focus"?0:Qg(x.props.delay,H?0:1,fr.delay)}function $(H){H===void 0&&(H=!1),E.style.pointerEvents=x.props.interactive&&!H?"":"none",E.style.zIndex=""+x.props.zIndex}function V(H,le,G){if(G===void 0&&(G=!0),D.forEach(function(he){he[H]&&he[H].apply(he,le)}),G){var de;(de=x.props)[H].apply(de,le)}}function z(){var H=x.props.aria;if(H.content){var le="aria-"+H.content,G=E.id,de=ks(x.props.triggerTarget||e);de.forEach(function(he){var rt=he.getAttribute(le);if(x.state.isVisible)he.setAttribute(le,rt?rt+" "+G:G);else{var gt=rt&&rt.replace(G,"").trim();gt?he.setAttribute(le,gt):he.removeAttribute(le)}})}}function B(){if(!(T||!x.props.aria.expanded)){var H=ks(x.props.triggerTarget||e);H.forEach(function(le){x.props.interactive?le.setAttribute("aria-expanded",x.state.isVisible&&le===N()?"true":"false"):le.removeAttribute("aria-expanded")})}}function X(){M().removeEventListener("mousemove",m),Pd=Pd.filter(function(H){return H!==m})}function q(H){if(!(ui.isTouch&&(l||H.type==="mousedown"))){var le=H.composedPath&&H.composedPath()[0]||H.target;if(!(x.props.interactive&&L2(E,le))){if(ks(x.props.triggerTarget||e).some(function(G){return L2(G,le)})){if(ui.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[x,H]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout(function(){s=!1}),x.state.isMounted||ie())}}}function re(){l=!0}function J(){l=!1}function ee(){var H=M();H.addEventListener("mousedown",q,!0),H.addEventListener("touchend",q,Oa),H.addEventListener("touchstart",J,Oa),H.addEventListener("touchmove",re,Oa)}function ie(){var H=M();H.removeEventListener("mousedown",q,!0),H.removeEventListener("touchend",q,Oa),H.removeEventListener("touchstart",J,Oa),H.removeEventListener("touchmove",re,Oa)}function ae(H,le){U(H,function(){!x.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&le()})}function ue(H,le){U(H,le)}function U(H,le){var G=I().box;function de(he){he.target===G&&(Jg(G,"remove",de),le())}if(H===0)return le();Jg(G,"remove",d),Jg(G,"add",de),d=de}function K(H,le,G){G===void 0&&(G=!1);var de=ks(x.props.triggerTarget||e);de.forEach(function(he){he.addEventListener(H,le,G),p.push({node:he,eventType:H,handler:le,options:G})})}function Z(){A()&&(K("touchstart",ge,{passive:!0}),K("touchend",ve,{passive:!0})),foe(x.props.trigger).forEach(function(H){if(H!=="manual")switch(K(H,ge),H){case"mouseenter":K("mouseleave",ve);break;case"focus":K(Eoe?"focusout":"blur",we);break;case"focusin":K("focusout",we);break}})}function R(){p.forEach(function(H){var le=H.node,G=H.eventType,de=H.handler,he=H.options;le.removeEventListener(G,de,he)}),p=[]}function ge(H){var le,G=!1;if(!(!x.state.isEnabled||Fe(H)||s)){var de=((le=u)==null?void 0:le.type)==="focus";u=H,h=H.currentTarget,B(),!x.state.isVisible&&goe(H)&&Pd.forEach(function(he){return he(H)}),H.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||a)&&x.props.hideOnClick!==!1&&x.state.isVisible?G=!0:At(H),H.type==="click"&&(a=!G),G&&!de&&Ht(H)}}function te(H){var le=H.target,G=N().contains(le)||E.contains(le);if(!(H.type==="mousemove"&&G)){var de=Ye().concat(E).map(function(he){var rt,gt=he._tippy,xr=(rt=gt.popperInstance)==null?void 0:rt.state;return xr?{popperRect:he.getBoundingClientRect(),popperState:xr,props:n}:null}).filter(Boolean);xoe(de,H)&&(X(),Ht(H))}}function ve(H){var le=Fe(H)||x.props.trigger.indexOf("click")>=0&&a;if(!le){if(x.props.interactive){x.hideWithInteractivity(H);return}Ht(H)}}function we(H){x.props.trigger.indexOf("focusin")<0&&H.target!==N()||x.props.interactive&&H.relatedTarget&&E.contains(H.relatedTarget)||Ht(H)}function Fe(H){return ui.isTouch?A()!==H.type.indexOf("touch")>=0:!1}function st(){_t();var H=x.props,le=H.popperOptions,G=H.placement,de=H.offset,he=H.getReferenceClientRect,rt=H.moveTransition,gt=P()?jy(E).arrow:null,xr=he?{getBoundingClientRect:he,contextElement:he.contextElement||N()}:e,ko={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ji){var ei=ji.state;if(P()){var be=I(),An=be.box;["placement","reference-hidden","escaped"].forEach(function(us){us==="placement"?An.setAttribute("data-placement",ei.placement):ei.attributes.popper["data-popper-"+us]?An.setAttribute("data-"+us,""):An.removeAttribute("data-"+us)}),ei.attributes.popper={}}}},wr=[{name:"offset",options:{offset:de}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!rt}},ko];P()&&gt&&wr.push({name:"arrow",options:{element:gt,padding:3}}),wr.push.apply(wr,le?.modifiers||[]),x.popperInstance=lj(xr,E,Object.assign({},le,{placement:G,onFirstUpdate:f,modifiers:wr}))}function _t(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function ut(){var H=x.props.appendTo,le,G=N();x.props.interactive&&H===Rj||H==="parent"?le=G.parentNode:le=Ij(H,[G]),le.contains(E)||le.appendChild(E),x.state.isMounted=!0,st(),process.env.NODE_ENV!=="production"&&Wi(x.props.interactive&&H===fr.appendTo&&G.nextElementSibling!==E,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
254
+ `,"Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))})}var Noe=function(){return"innerHTML"};function Ny(e,t){e[Noe()]=t}function W2(e){var t=bc();return e===!0?t.className=Nj:(t.className=jj,qc(e)?t.appendChild(e):Ny(t,e)),t}function z2(e,t){qc(t.content)?(Ny(e,""),e.appendChild(t.content)):typeof t.content!="function"&&(t.allowHTML?Ny(e,t.content):e.textContent=t.content)}function jy(e){var t=e.firstElementChild,n=hp(t.children);return{box:t,content:n.find(function(r){return r.classList.contains(Mj)}),arrow:n.find(function(r){return r.classList.contains(Nj)||r.classList.contains(jj)}),backdrop:n.find(function(r){return r.classList.contains(coe)})}}function zj(e){var t=bc(),n=bc();n.className=loe,n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=bc();r.className=Mj,r.setAttribute("data-state","hidden"),z2(r,e.props),t.appendChild(n),n.appendChild(r),i(e.props,e.props);function i(o,a){var s=jy(t),l=s.box,c=s.content,u=s.arrow;a.theme?l.setAttribute("data-theme",a.theme):l.removeAttribute("data-theme"),typeof a.animation=="string"?l.setAttribute("data-animation",a.animation):l.removeAttribute("data-animation"),a.inertia?l.setAttribute("data-inertia",""):l.removeAttribute("data-inertia"),l.style.maxWidth=typeof a.maxWidth=="number"?a.maxWidth+"px":a.maxWidth,a.role?l.setAttribute("role",a.role):l.removeAttribute("role"),(o.content!==a.content||o.allowHTML!==a.allowHTML)&&z2(c,e.props),a.arrow?u?o.arrow!==a.arrow&&(l.removeChild(u),l.appendChild(W2(a.arrow))):l.appendChild(W2(a.arrow)):u&&l.removeChild(u)}return{popper:t,onUpdate:i}}zj.$$tippy=!0;var joe=1,Pd=[],ev=[];function Roe(e,t){var n=B2(e,Object.assign({},fr,Bj(R2(t)))),r,i,o,a=!1,s=!1,l=!1,c=!1,u,d,f,p=[],m=N2(te,n.interactiveDebounce),h,g=joe++,b=null,S=poe(n.plugins),w={isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},x={id:g,reference:e,popper:bc(),popperInstance:b,props:n,state:w,plugins:S,clearDelayTimeouts:an,setProps:vn,setContent:Bn,show:Zt,hide:Wn,hideWithInteractivity:ye,enable:mt,disable:gn,unmount:yn,destroy:Jt};if(!n.render)return process.env.NODE_ENV!=="production"&&My(!0,"render() function has not been supplied."),x;var _=n.render(x),E=_.popper,C=_.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+x.id,x.popper=E,e._tippy=x,E._tippy=x;var D=S.map(function(H){return H.fn(x)}),T=e.hasAttribute("aria-expanded");return Z(),B(),$(),V("onCreate",[x]),n.showOnCreate&&At(),E.addEventListener("mouseenter",function(){x.props.interactive&&x.state.isVisible&&x.clearDelayTimeouts()}),E.addEventListener("mouseleave",function(){x.props.interactive&&x.props.trigger.indexOf("mouseenter")>=0&&M().addEventListener("mousemove",m)}),x;function j(){var H=x.props.touch;return Array.isArray(H)?H:[H,0]}function A(){return j()[0]==="hold"}function P(){var H;return!!((H=x.props.render)!=null&&H.$$tippy)}function N(){return h||e}function M(){var H=N().parentNode;return H?boe(H):document}function I(){return jy(E)}function L(H){return x.state.isMounted&&!x.state.isVisible||ui.isTouch||u&&u.type==="focus"?0:Qg(x.props.delay,H?0:1,fr.delay)}function $(H){H===void 0&&(H=!1),E.style.pointerEvents=x.props.interactive&&!H?"":"none",E.style.zIndex=""+x.props.zIndex}function V(H,le,G){if(G===void 0&&(G=!0),D.forEach(function(he){he[H]&&he[H].apply(he,le)}),G){var de;(de=x.props)[H].apply(de,le)}}function z(){var H=x.props.aria;if(H.content){var le="aria-"+H.content,G=E.id,de=ks(x.props.triggerTarget||e);de.forEach(function(he){var rt=he.getAttribute(le);if(x.state.isVisible)he.setAttribute(le,rt?rt+" "+G:G);else{var gt=rt&&rt.replace(G,"").trim();gt?he.setAttribute(le,gt):he.removeAttribute(le)}})}}function B(){if(!(T||!x.props.aria.expanded)){var H=ks(x.props.triggerTarget||e);H.forEach(function(le){x.props.interactive?le.setAttribute("aria-expanded",x.state.isVisible&&le===N()?"true":"false"):le.removeAttribute("aria-expanded")})}}function X(){M().removeEventListener("mousemove",m),Pd=Pd.filter(function(H){return H!==m})}function q(H){if(!(ui.isTouch&&(l||H.type==="mousedown"))){var le=H.composedPath&&H.composedPath()[0]||H.target;if(!(x.props.interactive&&L2(E,le))){if(ks(x.props.triggerTarget||e).some(function(G){return L2(G,le)})){if(ui.isTouch||x.state.isVisible&&x.props.trigger.indexOf("click")>=0)return}else V("onClickOutside",[x,H]);x.props.hideOnClick===!0&&(x.clearDelayTimeouts(),x.hide(),s=!0,setTimeout(function(){s=!1}),x.state.isMounted||ie())}}}function re(){l=!0}function J(){l=!1}function ee(){var H=M();H.addEventListener("mousedown",q,!0),H.addEventListener("touchend",q,Oa),H.addEventListener("touchstart",J,Oa),H.addEventListener("touchmove",re,Oa)}function ie(){var H=M();H.removeEventListener("mousedown",q,!0),H.removeEventListener("touchend",q,Oa),H.removeEventListener("touchstart",J,Oa),H.removeEventListener("touchmove",re,Oa)}function ae(H,le){U(H,function(){!x.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&le()})}function ue(H,le){U(H,le)}function U(H,le){var G=I().box;function de(he){he.target===G&&(Jg(G,"remove",de),le())}if(H===0)return le();Jg(G,"remove",d),Jg(G,"add",de),d=de}function K(H,le,G){G===void 0&&(G=!1);var de=ks(x.props.triggerTarget||e);de.forEach(function(he){he.addEventListener(H,le,G),p.push({node:he,eventType:H,handler:le,options:G})})}function Z(){A()&&(K("touchstart",ge,{passive:!0}),K("touchend",ve,{passive:!0})),foe(x.props.trigger).forEach(function(H){if(H!=="manual")switch(K(H,ge),H){case"mouseenter":K("mouseleave",ve);break;case"focus":K(Eoe?"focusout":"blur",we);break;case"focusin":K("focusout",we);break}})}function R(){p.forEach(function(H){var le=H.node,G=H.eventType,de=H.handler,he=H.options;le.removeEventListener(G,de,he)}),p=[]}function ge(H){var le,G=!1;if(!(!x.state.isEnabled||Fe(H)||s)){var de=((le=u)==null?void 0:le.type)==="focus";u=H,h=H.currentTarget,B(),!x.state.isVisible&&goe(H)&&Pd.forEach(function(he){return he(H)}),H.type==="click"&&(x.props.trigger.indexOf("mouseenter")<0||a)&&x.props.hideOnClick!==!1&&x.state.isVisible?G=!0:At(H),H.type==="click"&&(a=!G),G&&!de&&Yt(H)}}function te(H){var le=H.target,G=N().contains(le)||E.contains(le);if(!(H.type==="mousemove"&&G)){var de=Ye().concat(E).map(function(he){var rt,gt=he._tippy,xr=(rt=gt.popperInstance)==null?void 0:rt.state;return xr?{popperRect:he.getBoundingClientRect(),popperState:xr,props:n}:null}).filter(Boolean);xoe(de,H)&&(X(),Yt(H))}}function ve(H){var le=Fe(H)||x.props.trigger.indexOf("click")>=0&&a;if(!le){if(x.props.interactive){x.hideWithInteractivity(H);return}Yt(H)}}function we(H){x.props.trigger.indexOf("focusin")<0&&H.target!==N()||x.props.interactive&&H.relatedTarget&&E.contains(H.relatedTarget)||Yt(H)}function Fe(H){return ui.isTouch?A()!==H.type.indexOf("touch")>=0:!1}function st(){_t();var H=x.props,le=H.popperOptions,G=H.placement,de=H.offset,he=H.getReferenceClientRect,rt=H.moveTransition,gt=P()?jy(E).arrow:null,xr=he?{getBoundingClientRect:he,contextElement:he.contextElement||N()}:e,ko={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(ji){var ei=ji.state;if(P()){var be=I(),An=be.box;["placement","reference-hidden","escaped"].forEach(function(us){us==="placement"?An.setAttribute("data-placement",ei.placement):ei.attributes.popper["data-popper-"+us]?An.setAttribute("data-"+us,""):An.removeAttribute("data-"+us)}),ei.attributes.popper={}}}},wr=[{name:"offset",options:{offset:de}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!rt}},ko];P()&&gt&&wr.push({name:"arrow",options:{element:gt,padding:3}}),wr.push.apply(wr,le?.modifiers||[]),x.popperInstance=lj(xr,E,Object.assign({},le,{placement:G,onFirstUpdate:f,modifiers:wr}))}function _t(){x.popperInstance&&(x.popperInstance.destroy(),x.popperInstance=null)}function ut(){var H=x.props.appendTo,le,G=N();x.props.interactive&&H===Rj||H==="parent"?le=G.parentNode:le=Ij(H,[G]),le.contains(E)||le.appendChild(E),x.state.isMounted=!0,st(),process.env.NODE_ENV!=="production"&&Wi(x.props.interactive&&H===fr.appendTo&&G.nextElementSibling!==E,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.",`
255
255
 
256
256
  `,"Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.",`
257
257
 
258
258
  `,"Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.",`
259
259
 
260
- `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ye(){return hp(E.querySelectorAll("[data-tippy-root]"))}function At(H){x.clearDelayTimeouts(),H&&V("onTrigger",[x,H]),ee();var le=L(!0),G=j(),de=G[0],he=G[1];ui.isTouch&&de==="hold"&&he&&(le=he),le?r=setTimeout(function(){x.show()},le):x.show()}function Ht(H){if(x.clearDelayTimeouts(),V("onUntrigger",[x,H]),!x.state.isVisible){ie();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(H.type)>=0&&a)){var le=L(!1);le?i=setTimeout(function(){x.state.isVisible&&x.hide()},le):o=requestAnimationFrame(function(){x.hide()})}}function mt(){x.state.isEnabled=!0}function gn(){x.hide(),x.state.isEnabled=!1}function an(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function vn(H){if(process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("setProps")),!x.state.isDestroyed){V("onBeforeUpdate",[x,H]),R();var le=x.props,G=B2(e,Object.assign({},le,R2(H),{ignoreAttributes:!0}));x.props=G,Z(),le.interactiveDebounce!==G.interactiveDebounce&&(X(),m=N2(te,G.interactiveDebounce)),le.triggerTarget&&!G.triggerTarget?ks(le.triggerTarget).forEach(function(de){de.removeAttribute("aria-expanded")}):G.triggerTarget&&e.removeAttribute("aria-expanded"),B(),$(),C&&C(le,G),x.popperInstance&&(st(),Ye().forEach(function(de){requestAnimationFrame(de._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[x,H])}}function Bn(H){x.setProps({content:H})}function Qt(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("show"));var H=x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,de=ui.isTouch&&!x.props.touch,he=Qg(x.props.duration,0,fr.duration);if(!(H||le||G||de)&&!N().hasAttribute("disabled")&&(V("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,P()&&(E.style.visibility="visible"),$(),ee(),x.state.isMounted||(E.style.transition="none"),P()){var rt=I(),gt=rt.box,xr=rt.content;Zg([gt,xr],0)}f=function(){var wr;if(!(!x.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=x.props.moveTransition,P()&&x.props.animation){var la=I(),ji=la.box,ei=la.content;Zg([ji,ei],he),I2([ji,ei],"visible")}z(),B(),j2(ev,x),(wr=x.popperInstance)==null||wr.forceUpdate(),V("onMount",[x]),x.props.animation&&P()&&ue(he,function(){x.state.isShown=!0,V("onShown",[x])})}},ut()}}function Wn(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("hide"));var H=!x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,de=Qg(x.props.duration,1,fr.duration);if(!(H||le||G)&&(V("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,c=!1,a=!1,P()&&(E.style.visibility="hidden"),X(),ie(),$(!0),P()){var he=I(),rt=he.box,gt=he.content;x.props.animation&&(Zg([rt,gt],de),I2([rt,gt],"hidden"))}z(),B(),x.props.animation?P()&&ae(de,x.unmount):x.unmount()}}function ye(H){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("hideWithInteractivity")),M().addEventListener("mousemove",m),j2(Pd,m),m(H)}function yn(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(_t(),Ye().forEach(function(H){H._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),ev=ev.filter(function(H){return H!==x}),x.state.isMounted=!1,V("onHidden",[x]))}function Zt(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),R(),delete e._tippy,x.state.isDestroyed=!0,V("onDestroy",[x]))}}function Lu(e,t){t===void 0&&(t={});var n=fr.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Coe(e),Wj(t,n)),Soe();var r=Object.assign({},t,{plugins:n}),i=yoe(e);if(process.env.NODE_ENV!=="production"){var o=qc(r.content),a=i.length>1;Wi(o&&a,["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.",`
260
+ `,"See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}function Ye(){return hp(E.querySelectorAll("[data-tippy-root]"))}function At(H){x.clearDelayTimeouts(),H&&V("onTrigger",[x,H]),ee();var le=L(!0),G=j(),de=G[0],he=G[1];ui.isTouch&&de==="hold"&&he&&(le=he),le?r=setTimeout(function(){x.show()},le):x.show()}function Yt(H){if(x.clearDelayTimeouts(),V("onUntrigger",[x,H]),!x.state.isVisible){ie();return}if(!(x.props.trigger.indexOf("mouseenter")>=0&&x.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(H.type)>=0&&a)){var le=L(!1);le?i=setTimeout(function(){x.state.isVisible&&x.hide()},le):o=requestAnimationFrame(function(){x.hide()})}}function mt(){x.state.isEnabled=!0}function gn(){x.hide(),x.state.isEnabled=!1}function an(){clearTimeout(r),clearTimeout(i),cancelAnimationFrame(o)}function vn(H){if(process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("setProps")),!x.state.isDestroyed){V("onBeforeUpdate",[x,H]),R();var le=x.props,G=B2(e,Object.assign({},le,R2(H),{ignoreAttributes:!0}));x.props=G,Z(),le.interactiveDebounce!==G.interactiveDebounce&&(X(),m=N2(te,G.interactiveDebounce)),le.triggerTarget&&!G.triggerTarget?ks(le.triggerTarget).forEach(function(de){de.removeAttribute("aria-expanded")}):G.triggerTarget&&e.removeAttribute("aria-expanded"),B(),$(),C&&C(le,G),x.popperInstance&&(st(),Ye().forEach(function(de){requestAnimationFrame(de._tippy.popperInstance.forceUpdate)})),V("onAfterUpdate",[x,H])}}function Bn(H){x.setProps({content:H})}function Zt(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("show"));var H=x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,de=ui.isTouch&&!x.props.touch,he=Qg(x.props.duration,0,fr.duration);if(!(H||le||G||de)&&!N().hasAttribute("disabled")&&(V("onShow",[x],!1),x.props.onShow(x)!==!1)){if(x.state.isVisible=!0,P()&&(E.style.visibility="visible"),$(),ee(),x.state.isMounted||(E.style.transition="none"),P()){var rt=I(),gt=rt.box,xr=rt.content;Zg([gt,xr],0)}f=function(){var wr;if(!(!x.state.isVisible||c)){if(c=!0,E.offsetHeight,E.style.transition=x.props.moveTransition,P()&&x.props.animation){var la=I(),ji=la.box,ei=la.content;Zg([ji,ei],he),I2([ji,ei],"visible")}z(),B(),j2(ev,x),(wr=x.popperInstance)==null||wr.forceUpdate(),V("onMount",[x]),x.props.animation&&P()&&ue(he,function(){x.state.isShown=!0,V("onShown",[x])})}},ut()}}function Wn(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("hide"));var H=!x.state.isVisible,le=x.state.isDestroyed,G=!x.state.isEnabled,de=Qg(x.props.duration,1,fr.duration);if(!(H||le||G)&&(V("onHide",[x],!1),x.props.onHide(x)!==!1)){if(x.state.isVisible=!1,x.state.isShown=!1,c=!1,a=!1,P()&&(E.style.visibility="hidden"),X(),ie(),$(!0),P()){var he=I(),rt=he.box,gt=he.content;x.props.animation&&(Zg([rt,gt],de),I2([rt,gt],"hidden"))}z(),B(),x.props.animation?P()&&ae(de,x.unmount):x.unmount()}}function ye(H){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("hideWithInteractivity")),M().addEventListener("mousemove",m),j2(Pd,m),m(H)}function yn(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("unmount")),x.state.isVisible&&x.hide(),x.state.isMounted&&(_t(),Ye().forEach(function(H){H._tippy.unmount()}),E.parentNode&&E.parentNode.removeChild(E),ev=ev.filter(function(H){return H!==x}),x.state.isMounted=!1,V("onHidden",[x]))}function Jt(){process.env.NODE_ENV!=="production"&&Wi(x.state.isDestroyed,ws("destroy")),!x.state.isDestroyed&&(x.clearDelayTimeouts(),x.unmount(),R(),delete e._tippy,x.state.isDestroyed=!0,V("onDestroy",[x]))}}function Lu(e,t){t===void 0&&(t={});var n=fr.plugins.concat(t.plugins||[]);process.env.NODE_ENV!=="production"&&(Coe(e),Wj(t,n)),Soe();var r=Object.assign({},t,{plugins:n}),i=yoe(e);if(process.env.NODE_ENV!=="production"){var o=qc(r.content),a=i.length>1;Wi(o&&a,["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.",`
261
261
 
262
262
  `,"Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.",`
263
263
 
264
264
  `,`1) content: element.innerHTML
265
- `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&Roe(c,r);return u&&l.push(u),l},[]);return qc(e)?s[0]:s}Lu.defaultProps=fr;Lu.setDefaultProps=Toe;Lu.currentInput=ui;Object.assign({},ej,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});Lu.setDefaultProps({render:zj});function Vj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hj=typeof window<"u"&&typeof document<"u";function Ry(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function V2(){return Hj&&document.createElement("div")}function Ioe(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function Yj(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 n in e)if(t.hasOwnProperty(n)){if(!Yj(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Loe(e){var t=[];return e.forEach(function(n){t.find(function(r){return Yj(n,r)})||t.push(n)}),t}function Foe(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Loe([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var tv=Hj?k.useLayoutEffect:k.useEffect;function $oe(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function H2(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Boe={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){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}H2(n,"add",t.props.className)}function o(){r()&&H2(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function Woe(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=Vj(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,h=a!==void 0,g=k.useState(!1),b=g[0],S=g[1],w=k.useState({}),x=w[0],_=w[1],E=k.useState(),C=E[0],D=E[1],T=$oe(function(){return{container:V2(),renders:1}}),j=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){j[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),j.trigger="manual",j.hideOnClick=!1),h&&(u=!0);var A=j,P=j.plugins||[];s&&(A=Object.assign({},j,{plugins:h&&a.data!=null?[].concat(P,[{fn:function(){return{onTrigger:function(L,$){var V=a.data.children.find(function(z){var B=z.instance;return B.reference===$.currentTarget});L.state.$$activeSingletonInstance=V.instance,D(V.content)}}}}]):P,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return tv(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var I=e(M||T.ref||V2(),Object.assign({},A,{plugins:[Boe].concat(j.plugins||[])}));return T.instance=I,u&&I.disable(),o&&I.show(),h&&a.hook({instance:I,content:i,props:A,setSingletonContent:D}),S(!0),function(){I.destroy(),a?.cleanup(I)}},N),tv(function(){var M;if(T.renders===1){T.renders++;return}var I=T.instance;I.setProps(Foe(I.props,A)),(M=I.popperInstance)==null||M.forceUpdate(),u?I.disable():I.enable(),m&&(o?I.show():I.hide()),h&&a.hook({instance:I,content:i,props:A,setSingletonContent:D})}),tv(function(){var M;if(s){var I=T.instance;I.setProps({popperOptions:Object.assign({},I.props.popperOptions,{modifiers:[].concat((((M=I.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(L){var $=L.name;return $!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function($){var V,z=$.state,B=(V=z.modifiersData)==null?void 0:V.hide;(x.placement!==z.placement||x.referenceHidden!==B?.isReferenceHidden||x.escaped!==B?.hasPopperEscaped)&&_({placement:z.placement,referenceHidden:B?.isReferenceHidden,escaped:B?.hasPopperEscaped}),z.attributes.popper={}}}])})})}},[x.placement,x.referenceHidden,x.escaped].concat(N)),k.createElement(k.Fragment,null,r?k.cloneElement(r,{ref:function(I){T.ref=I,Ry(r.ref,I)}}):null,b&&Ui.createPortal(s?s(Ioe(x),C,T.instance):i,T.container))}return t}var zoe=(function(e,t){return k.forwardRef(function(r,i){var o=r.children,a=Vj(r,["children"]);return k.createElement(e,Object.assign({},t,a),o?k.cloneElement(o,{ref:function(l){Ry(i,l),Ry(o.ref,l)}}):null)})}),Uj=zoe(Woe(Lu));function Voe(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function Hoe(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>i.hour===n)||{};return{hour:n,time:Voe(n),walkins:r.walkins??0,checkins:r.preApproved??0,staffAttendance:r.staffAttendance??0}})}const _s={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function Yoe({type:e,data:t,children:n}){if(!e||!t)return n;const r={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"},o={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},a=v.jsx(os,{title:i[e],period:"Today",icon:v.jsx(yb,{className:`${o[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:v.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:r[e].map(([s,l])=>v.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[v.jsx("div",{children:s}),v.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return v.jsx(Uj,{content:a,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:n})}function Uoe({isStatic:e,data:t}){const n=t?.summary?.activeWalkins||{},r=t?.summary?.preApprovedCheckins||{},i=t?.summary?.staffAttendance||{},o=k.useMemo(()=>Hoe(t?.chart||[]),[t]),{yAxisTicks:a,yAxisMax:s}=k.useMemo(()=>{const l=Math.max(...o.flatMap(u=>[u.walkins,u.checkins,u.staffAttendance])),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[o]);return v.jsx(os,{title:"Gate Updates",period:"Today",icon:v.jsx(yb,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{children:[v.jsx("div",{className:"grid grid-cols-3 gap-[24px] mt-[16px] mb-[16px]",children:[{key:"activeWalkins",data:n,color:_s.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:i,color:_s.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:r,color:_s.preApproved,label:"Pre-approved"}].map(l=>v.jsx(Yoe,{type:l.key,data:l.data,children:v.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[v.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:l.label}),v.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:l.color},children:[l.key==="activeWalkins"?l.data?.visitor_in??0:l.key==="preApprovedCheckins"?l.data?.currently_inside??0:l.data?.total_in_now??0,v.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",l.key==="activeWalkins"?l.data?.total_pass??0:l.key==="preApprovedCheckins"?l.data?.total_expected_pass??0:l.data?.total_staff??0]})]})]})},l.key))}),v.jsx("div",{className:"w-full h-[105px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(xx,{data:o,margin:{top:5,right:0,left:-40,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(br,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),v.jsx(nr,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:a,domain:[0,s],allowDecimals:!1,axisLine:!1,tickLine:!1}),v.jsx(on,{content:v.jsx(fu,{})}),v.jsx(zo,{type:"monotone",dataKey:"walkins",stroke:_s.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins",isAnimationActive:!1}),v.jsx(zo,{type:"monotone",dataKey:"checkins",stroke:_s.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1}),v.jsx(zo,{type:"monotone",dataKey:"staffAttendance",stroke:_s.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance",isAnimationActive:!1})]})})})]})})}function Koe({isStatic:e,data:t}){const n=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],r=[{name:"L1 Level",value:Number(t?.total_L1||0),color:n[0]},{name:"L2 Level",value:Number(t?.total_L2||0),color:n[1]},{name:"L3 Level",value:Number(t?.total_L3||0),color:n[2]},{name:"No Level",value:Number(t?.total_NoLevel||0),color:n[3]}];r.reduce((o,a)=>o+a.value,0);const i=r;return v.jsx(os,{title:"Helpdesk",period:"As of Today",icon:v.jsx(S3,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex gap-[12px] h-fit",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.total_open_complaints??0})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(xb,{value:t?.percent_change}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),v.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:v.jsx(Ft,{width:"75%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((o,a)=>v.jsx(Vt,{fill:n[a]||"#CBD5E1"},o.name))}),v.jsx(on,{content:v.jsx(fu,{})})]})})})]})})}/*!
265
+ `,"2) content: () => element.cloneNode(true)"].join(" "))}var s=i.reduce(function(l,c){var u=c&&Roe(c,r);return u&&l.push(u),l},[]);return qc(e)?s[0]:s}Lu.defaultProps=fr;Lu.setDefaultProps=Toe;Lu.currentInput=ui;Object.assign({},ej,{effect:function(t){var n=t.state,r={popper:{position:n.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(n.elements.popper.style,r.popper),n.styles=r,n.elements.arrow&&Object.assign(n.elements.arrow.style,r.arrow)}});Lu.setDefaultProps({render:zj});function Vj(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,o;for(o=0;o<r.length;o++)i=r[o],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Hj=typeof window<"u"&&typeof document<"u";function Ry(e,t){e&&(typeof e=="function"&&e(t),{}.hasOwnProperty.call(e,"current")&&(e.current=t))}function V2(){return Hj&&document.createElement("div")}function Ioe(e){var t={"data-placement":e.placement};return e.referenceHidden&&(t["data-reference-hidden"]=""),e.escaped&&(t["data-escaped"]=""),t}function Yj(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 n in e)if(t.hasOwnProperty(n)){if(!Yj(e[n],t[n]))return!1}else return!1;return!0}else return!1}function Loe(e){var t=[];return e.forEach(function(n){t.find(function(r){return Yj(n,r)})||t.push(n)}),t}function Foe(e,t){var n,r;return Object.assign({},t,{popperOptions:Object.assign({},e.popperOptions,t.popperOptions,{modifiers:Loe([].concat(((n=e.popperOptions)==null?void 0:n.modifiers)||[],((r=t.popperOptions)==null?void 0:r.modifiers)||[]))})})}var tv=Hj?k.useLayoutEffect:k.useEffect;function $oe(e){var t=k.useRef();return t.current||(t.current=typeof e=="function"?e():e),t.current}function H2(e,t,n){n.split(/\s+/).forEach(function(r){r&&e.classList[t](r)})}var Boe={name:"className",defaultValue:"",fn:function(t){var n=t.popper.firstElementChild,r=function(){var s;return!!((s=t.props.render)!=null&&s.$$tippy)};function i(){if(t.props.className&&!r()){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}H2(n,"add",t.props.className)}function o(){r()&&H2(n,"remove",t.props.className)}return{onCreate:i,onBeforeUpdate:o,onAfterUpdate:i}}};function Woe(e){function t(n){var r=n.children,i=n.content,o=n.visible,a=n.singleton,s=n.render,l=n.reference,c=n.disabled,u=c===void 0?!1:c,d=n.ignoreAttributes,f=d===void 0?!0:d;n.__source,n.__self;var p=Vj(n,["children","content","visible","singleton","render","reference","disabled","ignoreAttributes","__source","__self"]),m=o!==void 0,h=a!==void 0,g=k.useState(!1),b=g[0],S=g[1],w=k.useState({}),x=w[0],_=w[1],E=k.useState(),C=E[0],D=E[1],T=$oe(function(){return{container:V2(),renders:1}}),j=Object.assign({ignoreAttributes:f},p,{content:T.container});m&&(process.env.NODE_ENV!=="production"&&["trigger","hideOnClick","showOnCreate"].forEach(function(M){j[M]!==void 0&&console.warn(["@tippyjs/react: Cannot specify `"+M+"` prop in","controlled mode (`visible` prop)"].join(" "))}),j.trigger="manual",j.hideOnClick=!1),h&&(u=!0);var A=j,P=j.plugins||[];s&&(A=Object.assign({},j,{plugins:h&&a.data!=null?[].concat(P,[{fn:function(){return{onTrigger:function(L,$){var V=a.data.children.find(function(z){var B=z.instance;return B.reference===$.currentTarget});L.state.$$activeSingletonInstance=V.instance,D(V.content)}}}}]):P,render:function(){return{popper:T.container}}}));var N=[l].concat(r?[r.type]:[]);return tv(function(){var M=l;l&&l.hasOwnProperty("current")&&(M=l.current);var I=e(M||T.ref||V2(),Object.assign({},A,{plugins:[Boe].concat(j.plugins||[])}));return T.instance=I,u&&I.disable(),o&&I.show(),h&&a.hook({instance:I,content:i,props:A,setSingletonContent:D}),S(!0),function(){I.destroy(),a?.cleanup(I)}},N),tv(function(){var M;if(T.renders===1){T.renders++;return}var I=T.instance;I.setProps(Foe(I.props,A)),(M=I.popperInstance)==null||M.forceUpdate(),u?I.disable():I.enable(),m&&(o?I.show():I.hide()),h&&a.hook({instance:I,content:i,props:A,setSingletonContent:D})}),tv(function(){var M;if(s){var I=T.instance;I.setProps({popperOptions:Object.assign({},I.props.popperOptions,{modifiers:[].concat((((M=I.props.popperOptions)==null?void 0:M.modifiers)||[]).filter(function(L){var $=L.name;return $!=="$$tippyReact"}),[{name:"$$tippyReact",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function($){var V,z=$.state,B=(V=z.modifiersData)==null?void 0:V.hide;(x.placement!==z.placement||x.referenceHidden!==B?.isReferenceHidden||x.escaped!==B?.hasPopperEscaped)&&_({placement:z.placement,referenceHidden:B?.isReferenceHidden,escaped:B?.hasPopperEscaped}),z.attributes.popper={}}}])})})}},[x.placement,x.referenceHidden,x.escaped].concat(N)),k.createElement(k.Fragment,null,r?k.cloneElement(r,{ref:function(I){T.ref=I,Ry(r.ref,I)}}):null,b&&Ui.createPortal(s?s(Ioe(x),C,T.instance):i,T.container))}return t}var zoe=(function(e,t){return k.forwardRef(function(r,i){var o=r.children,a=Vj(r,["children"]);return k.createElement(e,Object.assign({},t,a),o?k.cloneElement(o,{ref:function(l){Ry(i,l),Ry(o.ref,l)}}):null)})}),Uj=zoe(Woe(Lu));function Voe(e){const t=e>=12?"PM":"AM";let n=e%12;return n===0&&(n=12),`${n} ${t}`}function Hoe(e=[]){return Array.from({length:24},(t,n)=>{const r=e.find(i=>i.hour===n)||{};return{hour:n,time:Voe(n),walkins:r.walkins??0,checkins:r.preApproved??0,staffAttendance:r.staffAttendance??0}})}const _s={walkins:"#1FA05B",preApproved:"#E7A015",staffAttendance:"#329DFF"};function Yoe({type:e,data:t,children:n}){if(!e||!t)return n;const r={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"},o={activeWalkins:"text-[#1FA05B]",preApprovedCheckins:"text-[#E7A015]",staffAttendance:"text-[#329DFF]"},a=v.jsx(os,{title:i[e],period:"Today",icon:v.jsx(yb,{className:`${o[e]} !text-[24px]`}),className:"!gap-0 min-w-[353px] bg-white shadow-xl rounded-lg border border-gray-200",children:v.jsx("div",{className:"flex flex-col gap-[8px] mt-[12px] pt-[12px] border-t border-dashed border-[#EBEBEB]",children:r[e].map(([s,l])=>v.jsxs("div",{className:"flex justify-between text-[14px] text-[#64748B]",children:[v.jsx("div",{children:s}),v.jsx("div",{className:"font-semibold text-gray-800",children:l??0})]},s))})});return v.jsx(Uj,{content:a,placement:"bottom-start",interactive:!0,delay:[100,0],offset:[0,8],appendTo:document.body,theme:"light-border",maxWidth:"none",children:n})}function Uoe({isStatic:e,data:t}){const n=t?.summary?.activeWalkins||{},r=t?.summary?.preApprovedCheckins||{},i=t?.summary?.staffAttendance||{},o=k.useMemo(()=>Hoe(t?.chart||[]),[t]),{yAxisTicks:a,yAxisMax:s}=k.useMemo(()=>{const l=Math.max(...o.flatMap(u=>[u.walkins,u.checkins,u.staffAttendance])),c=l>0?l:5;return{yAxisTicks:[0,Math.ceil(c/2),c],yAxisMax:c}},[o]);return v.jsx(os,{title:"Gate Updates",period:"Today",icon:v.jsx(yb,{className:"!text-[24px] text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{children:[v.jsx("div",{className:"grid grid-cols-3 gap-[24px] mt-[16px] mb-[16px]",children:[{key:"activeWalkins",data:n,color:_s.walkins,label:"Active Walk-ins"},{key:"staffAttendance",data:i,color:_s.staffAttendance,label:"Staff Checked-in"},{key:"preApprovedCheckins",data:r,color:_s.preApproved,label:"Pre-approved"}].map(l=>v.jsx(Yoe,{type:l.key,data:l.data,children:v.jsxs("div",{className:"flex flex-col gap-[8px] cursor-pointer",children:[v.jsx("div",{className:"text-[10px] text-[#64748B] whitespace-nowrap",children:l.label}),v.jsxs("div",{className:"text-[28px] font-medium flex items-center",style:{color:l.color},children:[l.key==="activeWalkins"?l.data?.visitor_in??0:l.key==="preApprovedCheckins"?l.data?.currently_inside??0:l.data?.total_in_now??0,v.jsxs("div",{className:"text-[20px] text-[#64748B] ml-1",children:["/",l.key==="activeWalkins"?l.data?.total_pass??0:l.key==="preApprovedCheckins"?l.data?.total_expected_pass??0:l.data?.total_staff??0]})]})]})},l.key))}),v.jsx("div",{className:"w-full h-[105px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(xx,{data:o,margin:{top:5,right:0,left:-40,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),v.jsx(br,{dataKey:"time",tickFormatter:(l,c)=>c%4===0?l:"",tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),v.jsx(nr,{tick:{fontSize:10,fill:"#64748B",fontWeight:400},ticks:a,domain:[0,s],allowDecimals:!1,axisLine:!1,tickLine:!1}),v.jsx(Ht,{content:v.jsx(fu,{})}),v.jsx(zo,{type:"monotone",dataKey:"walkins",stroke:_s.walkins,strokeWidth:2,dot:!1,name:"Active Walk-ins",isAnimationActive:!1}),v.jsx(zo,{type:"monotone",dataKey:"checkins",stroke:_s.preApproved,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved",isAnimationActive:!1}),v.jsx(zo,{type:"monotone",dataKey:"staffAttendance",stroke:_s.staffAttendance,strokeWidth:2,dot:!1,name:"Staff Attendance",isAnimationActive:!1})]})})})]})})}function Koe({isStatic:e,data:t}){const n=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],r=[{name:"L1 Level",value:Number(t?.total_L1||0),color:n[0]},{name:"L2 Level",value:Number(t?.total_L2||0),color:n[1]},{name:"L3 Level",value:Number(t?.total_L3||0),color:n[2]},{name:"No Level",value:Number(t?.total_NoLevel||0),color:n[3]}];r.reduce((o,a)=>o+a.value,0);const i=r;return v.jsx(os,{title:"Helpdesk",period:"As of Today",icon:v.jsx(S3,{className:"!text-[24px] text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid gap-[20px]`,actionButtons:v.jsx(Ol,{widgetId:t?.widget_id,options:t?.communities}),children:v.jsxs("div",{className:"flex gap-[12px] h-fit",children:[v.jsxs("div",{className:"w-[50%] flex flex-col gap-[28px]",children:[v.jsxs("div",{className:"flex flex-col gap-[8px]",children:[v.jsx("div",{className:"!m-0 !text-[12px] !leading-[16px] !text-[#64748B]",children:"Un-resolved Complaints"}),v.jsx("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.total_open_complaints??0})]}),v.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] flex items-center gap-[4px]",children:[v.jsx(xb,{value:t?.percent_change}),v.jsx("div",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),v.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:v.jsx(Ft,{width:"75%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:i,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:i.map((o,a)=>v.jsx(Vt,{fill:n[a]||"#CBD5E1"},o.name))}),v.jsx(Ht,{content:v.jsx(fu,{})})]})})})]})})}/*!
266
266
  * @kurkle/color v0.3.4
267
267
  * https://github.com/kurkle/color#readme
268
268
  * (c) 2024 Jukka Kurkela
@@ -272,14 +272,14 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
272
272
  * https://www.chartjs.org
273
273
  * (c) 2025 Chart.js Contributors
274
274
  * Released under the MIT License
275
- */function Fi(){}const gae=(()=>{let e=0;return()=>e++})();function He(e){return e==null}function en(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 Te(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function $r(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ri(e,t){return $r(e)?e:t}function Se(e,t){return typeof e>"u"?t:e}const vae=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Xj=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function dt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ge(e,t,n,r){let i,o,a;if(en(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Te(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function mp(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function gp(e){if(en(e))return e.map(gp);if(Te(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=gp(e[n[i]]);return t}return e}function Qj(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function yae(e,t,n,r){if(!Qj(e))return;const i=t[e],o=n[e];Te(i)&&Te(o)?Qc(i,o,r):t[e]=gp(o)}function Qc(e,t,n){const r=en(t)?t:[t],i=r.length;if(!Te(e))return e;n=n||{};const o=n.merger||yae;let a;for(let s=0;s<i;++s){if(a=r[s],!Te(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,n)}return e}function xc(e,t){return Qc(e,t,{merger:bae})}function bae(e,t,n){if(!Qj(e))return;const r=t[e],i=n[e];Te(r)&&Te(i)?xc(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=gp(i))}const G2={"":e=>e,x:e=>e.x,y:e=>e.y};function xae(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function wae(e){const t=xae(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ts(e,t){return(G2[t]||(G2[t]=wae(t)))(e)}function Vx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Zc=e=>typeof e<"u",Zo=e=>typeof e=="function",X2=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function _ae(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ot=Math.PI,Ct=2*ot,Sae=Ct+ot,vp=Number.POSITIVE_INFINITY,Oae=ot/180,Ut=ot/2,ha=ot/4,Q2=ot*2/3,Zj=Math.log10,wi=Math.sign;function wc(e,t,n){return Math.abs(e-t)<n}function Z2(e){const t=Math.round(e);e=wc(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Zj(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Eae(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Pae(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Jc(e){return!Pae(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function kae(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Cae(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Qi(e){return e*(ot/180)}function Dae(e){return e*(180/ot)}function J2(e){if(!$r(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Jj(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*ot&&(o+=Ct),{angle:o,distance:i}}function Ly(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Aae(e,t){return(e-t+Sae)%Ct-ot}function Ur(e){return(e%Ct+Ct)%Ct}function eu(e,t,n,r){const i=Ur(e),o=Ur(t),a=Ur(n),s=Ur(o-i),l=Ur(a-i),c=Ur(i-o),u=Ur(i-a);return i===o||i===a||r&&o===a||s>l&&c<u}function En(e,t,n){return Math.max(t,Math.min(n,e))}function Tae(e){return En(e,-32768,32767)}function Ro(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Hx(e,t,n){n=n||(a=>e[a]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Ra=(e,t,n,r)=>Hx(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),Mae=(e,t,n)=>Hx(e,n,r=>e[r][t]>=n);function Nae(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const eR=["push","pop","shift","splice","unshift"];function jae(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),eR.forEach(n=>{const r="_onData"+Vx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function eP(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(eR.forEach(o=>{delete e[o]}),delete e._chartjs)}function tR(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const nR=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function rR(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,nR.call(window,()=>{r=!1,e.apply(t,n)}))}}function Rae(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const iR=e=>e==="start"?"left":e==="end"?"right":"center",ar=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Iae=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Lae(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:d,max:f,minDefined:p,maxDefined:m}=a.getUserBounds();if(p){if(i=Math.min(Ra(l,u,d).lo,n?r:Ra(t,u,a.getPixelForValue(d)).lo),c){const h=l.slice(0,i+1).reverse().findIndex(g=>!He(g[s.axis]));i-=Math.max(0,h)}i=En(i,0,r-1)}if(m){let h=Math.max(Ra(l,a.axis,f,!0).hi+1,n?0:Ra(t,u,a.getPixelForValue(f),!0).hi+1);if(c){const g=l.slice(h-1).findIndex(b=>!He(b[s.axis]));h+=Math.max(0,g)}o=En(h,i,r)-i}else o=r-i}return{start:i,count:o}}function Fae(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Ad=e=>e===0||e===1,tP=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Ct/n)),nP=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Ct/n)+1,_c={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*Ut)+1,easeOutSine:e=>Math.sin(e*Ut),easeInOutSine:e=>-.5*(Math.cos(ot*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=>Ad(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=>Ad(e)?e:tP(e,.075,.3),easeOutElastic:e=>Ad(e)?e:nP(e,.075,.3),easeInOutElastic(e){return Ad(e)?e:e<.5?.5*tP(e*2,.1125,.45):.5+.5*nP(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-_c.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?_c.easeInBounce(e*2)*.5:_c.easeOutBounce(e*2-1)*.5+.5};function Yx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function rP(e){return Yx(e)?e:new Xc(e)}function rv(e){return Yx(e)?e:new Xc(e).saturate(.5).darken(.1).hexString()}const $ae=["x","y","borderWidth","radius","tension"],Bae=["color","borderColor","backgroundColor"];function Wae(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:Bae},numbers:{type:"number",properties:$ae}}),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 zae(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const iP=new Map;function Vae(e,t){t=t||{};const n=e+JSON.stringify(t);let r=iP.get(n);return r||(r=new Intl.NumberFormat(e,t),iP.set(n,r)),r}function Ux(e,t,n){return Vae(t,n).format(e)}const Hae={values(e){return en(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=Yae(e,n)}const a=Zj(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Ux(e,r,l)}};function Yae(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var oR={formatters:Hae};function Uae(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,n)=>n.lineWidth,tickColor:(t,n)=>n.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:oR.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 ns=Object.create(null),Fy=Object.create(null);function Sc(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function iv(e,t,n){return typeof t=="string"?Qc(Sc(e,t),n):Qc(Sc(e,""),t)}class Kae{constructor(t,n){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=r=>r.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=(r,i)=>rv(i.backgroundColor),this.hoverBorderColor=(r,i)=>rv(i.borderColor),this.hoverColor=(r,i)=>rv(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(n)}set(t,n){return iv(this,t,n)}get(t){return Sc(this,t)}describe(t,n){return iv(Fy,t,n)}override(t,n){return iv(ns,t,n)}route(t,n,r,i){const o=Sc(this,t),a=Sc(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return Te(l)?Object.assign({},c,l):Se(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Rt=new Kae({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Wae,zae,Uae]);function qae(e){return!e||He(e.size)||He(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function oP(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function ma(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function aP(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function $y(e,t,n,r){aR(e,t,n,r,null)}function aR(e,t,n,r,i){let o,a,s,l,c,u,d,f;const p=t.pointStyle,m=t.rotation,h=t.radius;let g=(m||0)*Oae;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,Ct):e.arc(n,r,h,0,Ct),e.closePath();break;case"triangle":u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=Q2,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=Q2,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case"rectRounded":c=h*.516,l=h-c,a=Math.cos(g+ha)*l,d=Math.cos(g+ha)*(i?i/2-c:l),s=Math.sin(g+ha)*l,f=Math.sin(g+ha)*(i?i/2-c:l),e.arc(n-d,r-s,c,g-ot,g-Ut),e.arc(n+f,r-a,c,g-Ut,g),e.arc(n+d,r+s,c,g,g+Ut),e.arc(n-f,r+a,c,g+Ut,g+ot),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*h,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=ha;case"rectRot":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-a),e.lineTo(n+d,r+s),e.lineTo(n-f,r+a),e.closePath();break;case"crossRot":g+=ha;case"cross":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"star":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a),g+=ha,d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"line":a=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function tu(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Kx(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function qx(e){e.restore()}function Gae(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Xae(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Qae(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),He(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 Zae(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),a=t-o.actualBoundingBoxLeft,s=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function Jae(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function yp(e,t,n,r,i,o={}){const a=en(t)?t:[t],s=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,Qae(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Jae(e,o.backdrop),s&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),He(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),Zae(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function bp(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*ot,ot,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,ot,Ut,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Ut,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Ut,!0),e.lineTo(n+a.topLeft,r)}const ese=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,tse=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function nse(e,t){const n=(""+e).match(ese);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const rse=e=>+e||0;function Gx(e,t){const n={},r=Te(t),i=r?Object.keys(t):t,o=Te(e)?r?a=>Se(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=rse(o(a));return n}function sR(e){return Gx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Is(e){return Gx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Qr(e){const t=sR(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Zn(e,t){e=e||{},t=t||Rt.font;let n=Se(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Se(e.style,t.style);r&&!(""+r).match(tse)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Se(e.family,t.family),lineHeight:nse(Se(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Se(e.weight,t.weight),string:""};return i.string=qae(i),i}function Td(e,t,n,r){let i,o,a;for(i=0,o=e.length;i<o;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function ise(e,t,n){const{min:r,max:i}=e,o=Xj(t,(i-r)/2),a=(s,l)=>n&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function cs(e,t){return Object.assign(Object.create(e),t)}function Xx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=dR("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>Xx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return cR(s,l,()=>fse(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return lP(s).includes(l)},ownKeys(s){return lP(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function sl(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:lR(e,r),setContext:o=>sl(e,o,n,r),override:o=>sl(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return cR(o,a,()=>ase(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function lR(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Zo(n)?n:()=>n,isIndexable:Zo(r)?r:()=>r}}const ose=(e,t)=>e?e+Vx(t):t,Qx=(e,t)=>Te(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function cR(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function ase(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return Zo(s)&&a.isScriptable(t)&&(s=sse(t,s,e,n)),en(s)&&s.length&&(s=lse(t,s,e,a.isIndexable)),Qx(t,s)&&(s=sl(s,i,o&&o[t],a)),s}function sse(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),Qx(e,l)&&(l=Zx(i._scopes,i,e,l)),l}function lse(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Te(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Zx(c,i,e,u);t.push(sl(d,o,a&&a[e],s))}}return t}function uR(e,t,n){return Zo(e)?e(t,n):e}const cse=(e,t)=>e===!0?t:typeof e=="string"?ts(t,e):void 0;function use(e,t,n,r,i){for(const o of t){const a=cse(n,o);if(a){e.add(a);const s=uR(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function Zx(e,t,n,r){const i=t._rootScopes,o=uR(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=sP(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=sP(s,a,o,l,r),l===null)?!1:Xx(Array.from(s),[""],i,o,()=>dse(t,n,r))}function sP(e,t,n,r,i){for(;n;)n=use(e,t,n,r,i);return n}function dse(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return en(i)&&Te(n)?n:i||{}}function fse(e,t,n,r){let i;for(const o of t)if(i=dR(ose(o,e),n),typeof i<"u")return Qx(e,i)?Zx(n,r,e,i):i}function dR(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function lP(e){let t=e._keys;return t||(t=e._keys=pse(e._scopes)),t}function pse(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const hse=Number.EPSILON||1e-14,ll=(e,t)=>t<e.length&&!e[t].skip&&e[t],fR=e=>e==="x"?"y":"x";function mse(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=Ly(o,i),l=Ly(a,o);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+f*(a.x-i.x),y:o.y+f*(a.y-i.y)}}}function gse(e,t,n){const r=e.length;let i,o,a,s,l,c=ll(e,0);for(let u=0;u<r-1;++u)if(l=c,c=ll(e,u+1),!(!l||!c)){if(wc(t[u],0,hse)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(o,2),!(s<=9)&&(a=3/Math.sqrt(s),n[u]=i*a*t[u],n[u+1]=o*a*t[u])}}function vse(e,t,n="x"){const r=fR(n),i=e.length;let o,a,s,l=ll(e,0);for(let c=0;c<i;++c){if(a=s,s=l,l=ll(e,c+1),!s)continue;const u=s[n],d=s[r];a&&(o=(u-a[n])/3,s[`cp1${n}`]=u-o,s[`cp1${r}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,s[`cp2${n}`]=u+o,s[`cp2${r}`]=d+o*t[c])}}function yse(e,t="x"){const n=fR(t),r=e.length,i=Array(r).fill(0),o=Array(r);let a,s,l,c=ll(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=ll(e,a+1),!!l){if(c){const u=c[t]-l[t];i[a]=u!==0?(c[n]-l[n])/u:0}o[a]=s?c?wi(i[a-1])!==wi(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}gse(e,i,o),vse(e,o,t)}function Md(e,t,n){return Math.max(Math.min(e,n),t)}function bse(e,t){let n,r,i,o,a,s=tu(e[0],t);for(n=0,r=e.length;n<r;++n)a=o,o=s,s=n<r-1&&tu(e[n+1],t),o&&(i=e[n],a&&(i.cp1x=Md(i.cp1x,t.left,t.right),i.cp1y=Md(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=Md(i.cp2x,t.left,t.right),i.cp2y=Md(i.cp2y,t.top,t.bottom)))}function xse(e,t,n,r,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")yse(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)s=e[o],l=mse(c,s,e[Math.min(o+1,a-(r?0:1))%a],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&&bse(e,n)}function Jx(){return typeof window<"u"&&typeof document<"u"}function e1(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function xp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Uh=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function wse(e,t){return Uh(e).getPropertyValue(t)}const _se=["top","right","bottom","left"];function Ha(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=_se[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Sse=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Ose(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(Sse(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function Ea(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Uh(n),o=i.boxSizing==="border-box",a=Ha(i,"padding"),s=Ha(i,"border","width"),{x:l,y:c,box:u}=Ose(e,n),d=a.left+(u&&s.left),f=a.top+(u&&s.top);let{width:p,height:m}=t;return o&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((c-f)/m*n.height/r)}}function Ese(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&e1(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=Uh(o),l=Ha(s,"border","width"),c=Ha(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=xp(s.maxWidth,o,"clientWidth"),i=xp(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||vp,maxHeight:i||vp}}const Nd=e=>Math.round(e*10)/10;function Pse(e,t,n,r){const i=Uh(e),o=Ha(i,"margin"),a=xp(i.maxWidth,e,"clientWidth")||vp,s=xp(i.maxHeight,e,"clientHeight")||vp,l=Ese(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Ha(i,"border","width"),p=Ha(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=Nd(Math.min(c,a,l.maxWidth)),u=Nd(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Nd(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Nd(Math.floor(u*r))),{width:c,height:u}}function cP(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const kse=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Jx()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function uP(e,t){const n=wse(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Pa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Cse(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function Dse(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=Pa(e,i,n),s=Pa(i,o,n),l=Pa(o,t,n),c=Pa(a,s,n),u=Pa(s,l,n);return Pa(c,u,n)}const Ase=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},Tse=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ls(e,t,n){return e?Ase(t,n):Tse()}function pR(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function hR(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function mR(e){return e==="angle"?{between:eu,compare:Aae,normalize:Ur}:{between:Ro,compare:(t,n)=>t-n,normalize:t=>t}}function dP({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function Mse(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=mR(r),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&a(s(t[c%l][r]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Nse(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,a=t.length,{compare:s,between:l,normalize:c}=mR(r),{start:u,end:d,loop:f,style:p}=Mse(e,t,n),m=[];let h=!1,g=null,b,S,w;const x=()=>l(i,w,b)&&s(i,w)!==0,_=()=>s(o,b)===0||l(o,w,b),E=()=>h||x(),C=()=>!h||_();for(let D=u,T=u;D<=d;++D)S=t[D%a],!S.skip&&(b=c(S[r]),b!==w&&(h=l(b,i,o),g===null&&E()&&(g=s(b,i)===0?D:T),g!==null&&C()&&(m.push(dP({start:g,end:D,loop:f,count:a,style:p})),g=null),T=D,w=b));return g!==null&&m.push(dP({start:g,end:d,loop:f,count:a,style:p})),m}function jse(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=Nse(r[i],e.points,t);o.length&&n.push(...o)}return n}function Rse(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function Ise(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Lse(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Rse(n,i,o,r);if(r===!0)return fP(e,[{start:a,end:s,loop:o}],n,t);const l=s<a?s+i:s,c=!!e._fullLoop&&a===0&&s===i-1;return fP(e,Ise(n,a,l,c),n,t)}function fP(e,t,n,r){return!r||!r.setContext||!n?t:Fse(e,t,n,r)}function Fse(e,t,n,r){const i=e._chart.getContext(),o=pP(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function p(m,h,g,b){const S=s?-1:1;if(m!==h){for(m+=l;n[m%l].skip;)m-=S;for(;n[h%l].skip;)h+=S;m%l!==h%l&&(c.push({start:m%l,end:h%l,loop:g,style:b}),u=b,d=h%l)}}for(const m of t){d=s?d:m.start;let h=n[d%l],g;for(f=d+1;f<=m.end;f++){const b=n[f%l];g=pP(r.setContext(cs(i,{type:"segment",p0:h,p1:b,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:a}))),$se(g,u)&&p(d,f-1,m.loop,u),h=b,u=g}d<f-1&&p(d,f-1,m.loop,u)}return c}function pP(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function $se(e,t){if(!t)return!1;const n=[],r=function(i,o){return Yx(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function jd(e,t,n){return e.options.clip?e[n]:t[n]}function Bse(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:jd(n,t,"left"),right:jd(n,t,"right"),top:jd(r,t,"top"),bottom:jd(r,t,"bottom")}:t}function Wse(e,t){const n=t._clip;if(n.disabled)return!1;const r=Bse(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
275
+ */function Fi(){}const gae=(()=>{let e=0;return()=>e++})();function He(e){return e==null}function tn(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 Te(e){return e!==null&&Object.prototype.toString.call(e)==="[object Object]"}function $r(e){return(typeof e=="number"||e instanceof Number)&&isFinite(+e)}function ri(e,t){return $r(e)?e:t}function Se(e,t){return typeof e>"u"?t:e}const vae=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100:+e/t,Xj=(e,t)=>typeof e=="string"&&e.endsWith("%")?parseFloat(e)/100*t:+e;function dt(e,t,n){if(e&&typeof e.call=="function")return e.apply(n,t)}function Ge(e,t,n,r){let i,o,a;if(tn(e))for(o=e.length,i=0;i<o;i++)t.call(n,e[i],i);else if(Te(e))for(a=Object.keys(e),o=a.length,i=0;i<o;i++)t.call(n,e[a[i]],a[i])}function mp(e,t){let n,r,i,o;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],o=t[n],i.datasetIndex!==o.datasetIndex||i.index!==o.index)return!1;return!0}function gp(e){if(tn(e))return e.map(gp);if(Te(e)){const t=Object.create(null),n=Object.keys(e),r=n.length;let i=0;for(;i<r;++i)t[n[i]]=gp(e[n[i]]);return t}return e}function Qj(e){return["__proto__","prototype","constructor"].indexOf(e)===-1}function yae(e,t,n,r){if(!Qj(e))return;const i=t[e],o=n[e];Te(i)&&Te(o)?Qc(i,o,r):t[e]=gp(o)}function Qc(e,t,n){const r=tn(t)?t:[t],i=r.length;if(!Te(e))return e;n=n||{};const o=n.merger||yae;let a;for(let s=0;s<i;++s){if(a=r[s],!Te(a))continue;const l=Object.keys(a);for(let c=0,u=l.length;c<u;++c)o(l[c],e,a,n)}return e}function xc(e,t){return Qc(e,t,{merger:bae})}function bae(e,t,n){if(!Qj(e))return;const r=t[e],i=n[e];Te(r)&&Te(i)?xc(r,i):Object.prototype.hasOwnProperty.call(t,e)||(t[e]=gp(i))}const G2={"":e=>e,x:e=>e.x,y:e=>e.y};function xae(e){const t=e.split("."),n=[];let r="";for(const i of t)r+=i,r.endsWith("\\")?r=r.slice(0,-1)+".":(n.push(r),r="");return n}function wae(e){const t=xae(e);return n=>{for(const r of t){if(r==="")break;n=n&&n[r]}return n}}function ts(e,t){return(G2[t]||(G2[t]=wae(t)))(e)}function Vx(e){return e.charAt(0).toUpperCase()+e.slice(1)}const Zc=e=>typeof e<"u",Zo=e=>typeof e=="function",X2=(e,t)=>{if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0};function _ae(e){return e.type==="mouseup"||e.type==="click"||e.type==="contextmenu"}const ot=Math.PI,Ct=2*ot,Sae=Ct+ot,vp=Number.POSITIVE_INFINITY,Oae=ot/180,Kt=ot/2,ha=ot/4,Q2=ot*2/3,Zj=Math.log10,wi=Math.sign;function wc(e,t,n){return Math.abs(e-t)<n}function Z2(e){const t=Math.round(e);e=wc(e,t,e/1e3)?t:e;const n=Math.pow(10,Math.floor(Zj(e))),r=e/n;return(r<=1?1:r<=2?2:r<=5?5:10)*n}function Eae(e){const t=[],n=Math.sqrt(e);let r;for(r=1;r<n;r++)e%r===0&&(t.push(r),t.push(e/r));return n===(n|0)&&t.push(n),t.sort((i,o)=>i-o).pop(),t}function Pae(e){return typeof e=="symbol"||typeof e=="object"&&e!==null&&!(Symbol.toPrimitive in e||"toString"in e||"valueOf"in e)}function Jc(e){return!Pae(e)&&!isNaN(parseFloat(e))&&isFinite(e)}function kae(e,t){const n=Math.round(e);return n-t<=e&&n+t>=e}function Cae(e,t,n){let r,i,o;for(r=0,i=e.length;r<i;r++)o=e[r][n],isNaN(o)||(t.min=Math.min(t.min,o),t.max=Math.max(t.max,o))}function Qi(e){return e*(ot/180)}function Dae(e){return e*(180/ot)}function J2(e){if(!$r(e))return;let t=1,n=0;for(;Math.round(e*t)/t!==e;)t*=10,n++;return n}function Jj(e,t){const n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);let o=Math.atan2(r,n);return o<-.5*ot&&(o+=Ct),{angle:o,distance:i}}function Ly(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}function Aae(e,t){return(e-t+Sae)%Ct-ot}function Ur(e){return(e%Ct+Ct)%Ct}function eu(e,t,n,r){const i=Ur(e),o=Ur(t),a=Ur(n),s=Ur(o-i),l=Ur(a-i),c=Ur(i-o),u=Ur(i-a);return i===o||i===a||r&&o===a||s>l&&c<u}function En(e,t,n){return Math.max(t,Math.min(n,e))}function Tae(e){return En(e,-32768,32767)}function Ro(e,t,n,r=1e-6){return e>=Math.min(t,n)-r&&e<=Math.max(t,n)+r}function Hx(e,t,n){n=n||(a=>e[a]<t);let r=e.length-1,i=0,o;for(;r-i>1;)o=i+r>>1,n(o)?i=o:r=o;return{lo:i,hi:r}}const Ra=(e,t,n,r)=>Hx(e,n,r?i=>{const o=e[i][t];return o<n||o===n&&e[i+1][t]===n}:i=>e[i][t]<n),Mae=(e,t,n)=>Hx(e,n,r=>e[r][t]>=n);function Nae(e,t,n){let r=0,i=e.length;for(;r<i&&e[r]<t;)r++;for(;i>r&&e[i-1]>n;)i--;return r>0||i<e.length?e.slice(r,i):e}const eR=["push","pop","shift","splice","unshift"];function jae(e,t){if(e._chartjs){e._chartjs.listeners.push(t);return}Object.defineProperty(e,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[t]}}),eR.forEach(n=>{const r="_onData"+Vx(n),i=e[n];Object.defineProperty(e,n,{configurable:!0,enumerable:!1,value(...o){const a=i.apply(this,o);return e._chartjs.listeners.forEach(s=>{typeof s[r]=="function"&&s[r](...o)}),a}})})}function eP(e,t){const n=e._chartjs;if(!n)return;const r=n.listeners,i=r.indexOf(t);i!==-1&&r.splice(i,1),!(r.length>0)&&(eR.forEach(o=>{delete e[o]}),delete e._chartjs)}function tR(e){const t=new Set(e);return t.size===e.length?e:Array.from(t)}const nR=(function(){return typeof window>"u"?function(e){return e()}:window.requestAnimationFrame})();function rR(e,t){let n=[],r=!1;return function(...i){n=i,r||(r=!0,nR.call(window,()=>{r=!1,e.apply(t,n)}))}}function Rae(e,t){let n;return function(...r){return t?(clearTimeout(n),n=setTimeout(e,t,r)):e.apply(this,r),t}}const iR=e=>e==="start"?"left":e==="end"?"right":"center",ar=(e,t,n)=>e==="start"?t:e==="end"?n:(t+n)/2,Iae=(e,t,n,r)=>e===(r?"left":"right")?n:e==="center"?(t+n)/2:t;function Lae(e,t,n){const r=t.length;let i=0,o=r;if(e._sorted){const{iScale:a,vScale:s,_parsed:l}=e,c=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null,u=a.axis,{min:d,max:f,minDefined:p,maxDefined:m}=a.getUserBounds();if(p){if(i=Math.min(Ra(l,u,d).lo,n?r:Ra(t,u,a.getPixelForValue(d)).lo),c){const h=l.slice(0,i+1).reverse().findIndex(g=>!He(g[s.axis]));i-=Math.max(0,h)}i=En(i,0,r-1)}if(m){let h=Math.max(Ra(l,a.axis,f,!0).hi+1,n?0:Ra(t,u,a.getPixelForValue(f),!0).hi+1);if(c){const g=l.slice(h-1).findIndex(b=>!He(b[s.axis]));h+=Math.max(0,g)}o=En(h,i,r)-i}else o=r-i}return{start:i,count:o}}function Fae(e){const{xScale:t,yScale:n,_scaleRanges:r}=e,i={xmin:t.min,xmax:t.max,ymin:n.min,ymax:n.max};if(!r)return e._scaleRanges=i,!0;const o=r.xmin!==t.min||r.xmax!==t.max||r.ymin!==n.min||r.ymax!==n.max;return Object.assign(r,i),o}const Ad=e=>e===0||e===1,tP=(e,t,n)=>-(Math.pow(2,10*(e-=1))*Math.sin((e-t)*Ct/n)),nP=(e,t,n)=>Math.pow(2,-10*e)*Math.sin((e-t)*Ct/n)+1,_c={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*Kt)+1,easeOutSine:e=>Math.sin(e*Kt),easeInOutSine:e=>-.5*(Math.cos(ot*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=>Ad(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=>Ad(e)?e:tP(e,.075,.3),easeOutElastic:e=>Ad(e)?e:nP(e,.075,.3),easeInOutElastic(e){return Ad(e)?e:e<.5?.5*tP(e*2,.1125,.45):.5+.5*nP(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-_c.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?_c.easeInBounce(e*2)*.5:_c.easeOutBounce(e*2-1)*.5+.5};function Yx(e){if(e&&typeof e=="object"){const t=e.toString();return t==="[object CanvasPattern]"||t==="[object CanvasGradient]"}return!1}function rP(e){return Yx(e)?e:new Xc(e)}function rv(e){return Yx(e)?e:new Xc(e).saturate(.5).darken(.1).hexString()}const $ae=["x","y","borderWidth","radius","tension"],Bae=["color","borderColor","backgroundColor"];function Wae(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:Bae},numbers:{type:"number",properties:$ae}}),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 zae(e){e.set("layout",{autoPadding:!0,padding:{top:0,right:0,bottom:0,left:0}})}const iP=new Map;function Vae(e,t){t=t||{};const n=e+JSON.stringify(t);let r=iP.get(n);return r||(r=new Intl.NumberFormat(e,t),iP.set(n,r)),r}function Ux(e,t,n){return Vae(t,n).format(e)}const Hae={values(e){return tn(e)?e:""+e},numeric(e,t,n){if(e===0)return"0";const r=this.chart.options.locale;let i,o=e;if(n.length>1){const c=Math.max(Math.abs(n[0].value),Math.abs(n[n.length-1].value));(c<1e-4||c>1e15)&&(i="scientific"),o=Yae(e,n)}const a=Zj(Math.abs(o)),s=isNaN(a)?1:Math.max(Math.min(-1*Math.floor(a),20),0),l={notation:i,minimumFractionDigits:s,maximumFractionDigits:s};return Object.assign(l,this.options.ticks.format),Ux(e,r,l)}};function Yae(e,t){let n=t.length>3?t[2].value-t[1].value:t[1].value-t[0].value;return Math.abs(n)>=1&&e!==Math.floor(e)&&(n=e-Math.floor(e)),n}var oR={formatters:Hae};function Uae(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,n)=>n.lineWidth,tickColor:(t,n)=>n.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:oR.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 ns=Object.create(null),Fy=Object.create(null);function Sc(e,t){if(!t)return e;const n=t.split(".");for(let r=0,i=n.length;r<i;++r){const o=n[r];e=e[o]||(e[o]=Object.create(null))}return e}function iv(e,t,n){return typeof t=="string"?Qc(Sc(e,t),n):Qc(Sc(e,""),t)}class Kae{constructor(t,n){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=r=>r.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=(r,i)=>rv(i.backgroundColor),this.hoverBorderColor=(r,i)=>rv(i.borderColor),this.hoverColor=(r,i)=>rv(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(n)}set(t,n){return iv(this,t,n)}get(t){return Sc(this,t)}describe(t,n){return iv(Fy,t,n)}override(t,n){return iv(ns,t,n)}route(t,n,r,i){const o=Sc(this,t),a=Sc(this,r),s="_"+n;Object.defineProperties(o,{[s]:{value:o[n],writable:!0},[n]:{enumerable:!0,get(){const l=this[s],c=a[i];return Te(l)?Object.assign({},c,l):Se(l,c)},set(l){this[s]=l}}})}apply(t){t.forEach(n=>n(this))}}var Rt=new Kae({_scriptable:e=>!e.startsWith("on"),_indexable:e=>e!=="events",hover:{_fallback:"interaction"},interaction:{_scriptable:!1,_indexable:!1}},[Wae,zae,Uae]);function qae(e){return!e||He(e.size)||He(e.family)?null:(e.style?e.style+" ":"")+(e.weight?e.weight+" ":"")+e.size+"px "+e.family}function oP(e,t,n,r,i){let o=t[i];return o||(o=t[i]=e.measureText(i).width,n.push(i)),o>r&&(r=o),r}function ma(e,t,n){const r=e.currentDevicePixelRatio,i=n!==0?Math.max(n/2,.5):0;return Math.round((t-i)*r)/r+i}function aP(e,t){!t&&!e||(t=t||e.getContext("2d"),t.save(),t.resetTransform(),t.clearRect(0,0,e.width,e.height),t.restore())}function $y(e,t,n,r){aR(e,t,n,r,null)}function aR(e,t,n,r,i){let o,a,s,l,c,u,d,f;const p=t.pointStyle,m=t.rotation,h=t.radius;let g=(m||0)*Oae;if(p&&typeof p=="object"&&(o=p.toString(),o==="[object HTMLImageElement]"||o==="[object HTMLCanvasElement]")){e.save(),e.translate(n,r),e.rotate(g),e.drawImage(p,-p.width/2,-p.height/2,p.width,p.height),e.restore();return}if(!(isNaN(h)||h<=0)){switch(e.beginPath(),p){default:i?e.ellipse(n,r,i/2,h,0,0,Ct):e.arc(n,r,h,0,Ct),e.closePath();break;case"triangle":u=i?i/2:h,e.moveTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=Q2,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),g+=Q2,e.lineTo(n+Math.sin(g)*u,r-Math.cos(g)*h),e.closePath();break;case"rectRounded":c=h*.516,l=h-c,a=Math.cos(g+ha)*l,d=Math.cos(g+ha)*(i?i/2-c:l),s=Math.sin(g+ha)*l,f=Math.sin(g+ha)*(i?i/2-c:l),e.arc(n-d,r-s,c,g-ot,g-Kt),e.arc(n+f,r-a,c,g-Kt,g),e.arc(n+d,r+s,c,g,g+Kt),e.arc(n-f,r+a,c,g+Kt,g+ot),e.closePath();break;case"rect":if(!m){l=Math.SQRT1_2*h,u=i?i/2:l,e.rect(n-u,r-l,2*u,2*l);break}g+=ha;case"rectRot":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+f,r-a),e.lineTo(n+d,r+s),e.lineTo(n-f,r+a),e.closePath();break;case"crossRot":g+=ha;case"cross":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"star":d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a),g+=ha,d=Math.cos(g)*(i?i/2:h),a=Math.cos(g)*h,s=Math.sin(g)*h,f=Math.sin(g)*(i?i/2:h),e.moveTo(n-d,r-s),e.lineTo(n+d,r+s),e.moveTo(n+f,r-a),e.lineTo(n-f,r+a);break;case"line":a=i?i/2:Math.cos(g)*h,s=Math.sin(g)*h,e.moveTo(n-a,r-s),e.lineTo(n+a,r+s);break;case"dash":e.moveTo(n,r),e.lineTo(n+Math.cos(g)*(i?i/2:h),r+Math.sin(g)*h);break;case!1:e.closePath();break}e.fill(),t.borderWidth>0&&e.stroke()}}function tu(e,t,n){return n=n||.5,!t||e&&e.x>t.left-n&&e.x<t.right+n&&e.y>t.top-n&&e.y<t.bottom+n}function Kx(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()}function qx(e){e.restore()}function Gae(e,t,n,r,i){if(!t)return e.lineTo(n.x,n.y);if(i==="middle"){const o=(t.x+n.x)/2;e.lineTo(o,t.y),e.lineTo(o,n.y)}else i==="after"!=!!r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}function Xae(e,t,n,r){if(!t)return e.lineTo(n.x,n.y);e.bezierCurveTo(r?t.cp1x:t.cp2x,r?t.cp1y:t.cp2y,r?n.cp2x:n.cp1x,r?n.cp2y:n.cp1y,n.x,n.y)}function Qae(e,t){t.translation&&e.translate(t.translation[0],t.translation[1]),He(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 Zae(e,t,n,r,i){if(i.strikethrough||i.underline){const o=e.measureText(r),a=t-o.actualBoundingBoxLeft,s=t+o.actualBoundingBoxRight,l=n-o.actualBoundingBoxAscent,c=n+o.actualBoundingBoxDescent,u=i.strikethrough?(l+c)/2:c;e.strokeStyle=e.fillStyle,e.beginPath(),e.lineWidth=i.decorationWidth||2,e.moveTo(a,u),e.lineTo(s,u),e.stroke()}}function Jae(e,t){const n=e.fillStyle;e.fillStyle=t.color,e.fillRect(t.left,t.top,t.width,t.height),e.fillStyle=n}function yp(e,t,n,r,i,o={}){const a=tn(t)?t:[t],s=o.strokeWidth>0&&o.strokeColor!=="";let l,c;for(e.save(),e.font=i.string,Qae(e,o),l=0;l<a.length;++l)c=a[l],o.backdrop&&Jae(e,o.backdrop),s&&(o.strokeColor&&(e.strokeStyle=o.strokeColor),He(o.strokeWidth)||(e.lineWidth=o.strokeWidth),e.strokeText(c,n,r,o.maxWidth)),e.fillText(c,n,r,o.maxWidth),Zae(e,n,r,c,o),r+=Number(i.lineHeight);e.restore()}function bp(e,t){const{x:n,y:r,w:i,h:o,radius:a}=t;e.arc(n+a.topLeft,r+a.topLeft,a.topLeft,1.5*ot,ot,!0),e.lineTo(n,r+o-a.bottomLeft),e.arc(n+a.bottomLeft,r+o-a.bottomLeft,a.bottomLeft,ot,Kt,!0),e.lineTo(n+i-a.bottomRight,r+o),e.arc(n+i-a.bottomRight,r+o-a.bottomRight,a.bottomRight,Kt,0,!0),e.lineTo(n+i,r+a.topRight),e.arc(n+i-a.topRight,r+a.topRight,a.topRight,0,-Kt,!0),e.lineTo(n+a.topLeft,r)}const ese=/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/,tse=/^(normal|italic|initial|inherit|unset|(oblique( -?[0-9]?[0-9]deg)?))$/;function nse(e,t){const n=(""+e).match(ese);if(!n||n[1]==="normal")return t*1.2;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100;break}return t*e}const rse=e=>+e||0;function Gx(e,t){const n={},r=Te(t),i=r?Object.keys(t):t,o=Te(e)?r?a=>Se(e[a],e[t[a]]):a=>e[a]:()=>e;for(const a of i)n[a]=rse(o(a));return n}function sR(e){return Gx(e,{top:"y",right:"x",bottom:"y",left:"x"})}function Is(e){return Gx(e,["topLeft","topRight","bottomLeft","bottomRight"])}function Qr(e){const t=sR(e);return t.width=t.left+t.right,t.height=t.top+t.bottom,t}function Zn(e,t){e=e||{},t=t||Rt.font;let n=Se(e.size,t.size);typeof n=="string"&&(n=parseInt(n,10));let r=Se(e.style,t.style);r&&!(""+r).match(tse)&&(console.warn('Invalid font style specified: "'+r+'"'),r=void 0);const i={family:Se(e.family,t.family),lineHeight:nse(Se(e.lineHeight,t.lineHeight),n),size:n,style:r,weight:Se(e.weight,t.weight),string:""};return i.string=qae(i),i}function Td(e,t,n,r){let i,o,a;for(i=0,o=e.length;i<o;++i)if(a=e[i],a!==void 0&&a!==void 0)return a}function ise(e,t,n){const{min:r,max:i}=e,o=Xj(t,(i-r)/2),a=(s,l)=>n&&s===0?0:s+l;return{min:a(r,-Math.abs(o)),max:a(i,o)}}function cs(e,t){return Object.assign(Object.create(e),t)}function Xx(e,t=[""],n,r,i=()=>e[0]){const o=n||e;typeof r>"u"&&(r=dR("_fallback",e));const a={[Symbol.toStringTag]:"Object",_cacheable:!0,_scopes:e,_rootScopes:o,_fallback:r,_getTarget:i,override:s=>Xx([s,...e],t,o,r)};return new Proxy(a,{deleteProperty(s,l){return delete s[l],delete s._keys,delete e[0][l],!0},get(s,l){return cR(s,l,()=>fse(l,t,e,s))},getOwnPropertyDescriptor(s,l){return Reflect.getOwnPropertyDescriptor(s._scopes[0],l)},getPrototypeOf(){return Reflect.getPrototypeOf(e[0])},has(s,l){return lP(s).includes(l)},ownKeys(s){return lP(s)},set(s,l,c){const u=s._storage||(s._storage=i());return s[l]=u[l]=c,delete s._keys,!0}})}function sl(e,t,n,r){const i={_cacheable:!1,_proxy:e,_context:t,_subProxy:n,_stack:new Set,_descriptors:lR(e,r),setContext:o=>sl(e,o,n,r),override:o=>sl(e.override(o),t,n,r)};return new Proxy(i,{deleteProperty(o,a){return delete o[a],delete e[a],!0},get(o,a,s){return cR(o,a,()=>ase(o,a,s))},getOwnPropertyDescriptor(o,a){return o._descriptors.allKeys?Reflect.has(e,a)?{enumerable:!0,configurable:!0}:void 0:Reflect.getOwnPropertyDescriptor(e,a)},getPrototypeOf(){return Reflect.getPrototypeOf(e)},has(o,a){return Reflect.has(e,a)},ownKeys(){return Reflect.ownKeys(e)},set(o,a,s){return e[a]=s,delete o[a],!0}})}function lR(e,t={scriptable:!0,indexable:!0}){const{_scriptable:n=t.scriptable,_indexable:r=t.indexable,_allKeys:i=t.allKeys}=e;return{allKeys:i,scriptable:n,indexable:r,isScriptable:Zo(n)?n:()=>n,isIndexable:Zo(r)?r:()=>r}}const ose=(e,t)=>e?e+Vx(t):t,Qx=(e,t)=>Te(t)&&e!=="adapters"&&(Object.getPrototypeOf(t)===null||t.constructor===Object);function cR(e,t,n){if(Object.prototype.hasOwnProperty.call(e,t)||t==="constructor")return e[t];const r=n();return e[t]=r,r}function ase(e,t,n){const{_proxy:r,_context:i,_subProxy:o,_descriptors:a}=e;let s=r[t];return Zo(s)&&a.isScriptable(t)&&(s=sse(t,s,e,n)),tn(s)&&s.length&&(s=lse(t,s,e,a.isIndexable)),Qx(t,s)&&(s=sl(s,i,o&&o[t],a)),s}function sse(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_stack:s}=n;if(s.has(e))throw new Error("Recursion detected: "+Array.from(s).join("->")+"->"+e);s.add(e);let l=t(o,a||r);return s.delete(e),Qx(e,l)&&(l=Zx(i._scopes,i,e,l)),l}function lse(e,t,n,r){const{_proxy:i,_context:o,_subProxy:a,_descriptors:s}=n;if(typeof o.index<"u"&&r(e))return t[o.index%t.length];if(Te(t[0])){const l=t,c=i._scopes.filter(u=>u!==l);t=[];for(const u of l){const d=Zx(c,i,e,u);t.push(sl(d,o,a&&a[e],s))}}return t}function uR(e,t,n){return Zo(e)?e(t,n):e}const cse=(e,t)=>e===!0?t:typeof e=="string"?ts(t,e):void 0;function use(e,t,n,r,i){for(const o of t){const a=cse(n,o);if(a){e.add(a);const s=uR(a._fallback,n,i);if(typeof s<"u"&&s!==n&&s!==r)return s}else if(a===!1&&typeof r<"u"&&n!==r)return null}return!1}function Zx(e,t,n,r){const i=t._rootScopes,o=uR(t._fallback,n,r),a=[...e,...i],s=new Set;s.add(r);let l=sP(s,a,n,o||n,r);return l===null||typeof o<"u"&&o!==n&&(l=sP(s,a,o,l,r),l===null)?!1:Xx(Array.from(s),[""],i,o,()=>dse(t,n,r))}function sP(e,t,n,r,i){for(;n;)n=use(e,t,n,r,i);return n}function dse(e,t,n){const r=e._getTarget();t in r||(r[t]={});const i=r[t];return tn(i)&&Te(n)?n:i||{}}function fse(e,t,n,r){let i;for(const o of t)if(i=dR(ose(o,e),n),typeof i<"u")return Qx(e,i)?Zx(n,r,e,i):i}function dR(e,t){for(const n of t){if(!n)continue;const r=n[e];if(typeof r<"u")return r}}function lP(e){let t=e._keys;return t||(t=e._keys=pse(e._scopes)),t}function pse(e){const t=new Set;for(const n of e)for(const r of Object.keys(n).filter(i=>!i.startsWith("_")))t.add(r);return Array.from(t)}const hse=Number.EPSILON||1e-14,ll=(e,t)=>t<e.length&&!e[t].skip&&e[t],fR=e=>e==="x"?"y":"x";function mse(e,t,n,r){const i=e.skip?t:e,o=t,a=n.skip?t:n,s=Ly(o,i),l=Ly(a,o);let c=s/(s+l),u=l/(s+l);c=isNaN(c)?0:c,u=isNaN(u)?0:u;const d=r*c,f=r*u;return{previous:{x:o.x-d*(a.x-i.x),y:o.y-d*(a.y-i.y)},next:{x:o.x+f*(a.x-i.x),y:o.y+f*(a.y-i.y)}}}function gse(e,t,n){const r=e.length;let i,o,a,s,l,c=ll(e,0);for(let u=0;u<r-1;++u)if(l=c,c=ll(e,u+1),!(!l||!c)){if(wc(t[u],0,hse)){n[u]=n[u+1]=0;continue}i=n[u]/t[u],o=n[u+1]/t[u],s=Math.pow(i,2)+Math.pow(o,2),!(s<=9)&&(a=3/Math.sqrt(s),n[u]=i*a*t[u],n[u+1]=o*a*t[u])}}function vse(e,t,n="x"){const r=fR(n),i=e.length;let o,a,s,l=ll(e,0);for(let c=0;c<i;++c){if(a=s,s=l,l=ll(e,c+1),!s)continue;const u=s[n],d=s[r];a&&(o=(u-a[n])/3,s[`cp1${n}`]=u-o,s[`cp1${r}`]=d-o*t[c]),l&&(o=(l[n]-u)/3,s[`cp2${n}`]=u+o,s[`cp2${r}`]=d+o*t[c])}}function yse(e,t="x"){const n=fR(t),r=e.length,i=Array(r).fill(0),o=Array(r);let a,s,l,c=ll(e,0);for(a=0;a<r;++a)if(s=l,l=c,c=ll(e,a+1),!!l){if(c){const u=c[t]-l[t];i[a]=u!==0?(c[n]-l[n])/u:0}o[a]=s?c?wi(i[a-1])!==wi(i[a])?0:(i[a-1]+i[a])/2:i[a-1]:i[a]}gse(e,i,o),vse(e,o,t)}function Md(e,t,n){return Math.max(Math.min(e,n),t)}function bse(e,t){let n,r,i,o,a,s=tu(e[0],t);for(n=0,r=e.length;n<r;++n)a=o,o=s,s=n<r-1&&tu(e[n+1],t),o&&(i=e[n],a&&(i.cp1x=Md(i.cp1x,t.left,t.right),i.cp1y=Md(i.cp1y,t.top,t.bottom)),s&&(i.cp2x=Md(i.cp2x,t.left,t.right),i.cp2y=Md(i.cp2y,t.top,t.bottom)))}function xse(e,t,n,r,i){let o,a,s,l;if(t.spanGaps&&(e=e.filter(c=>!c.skip)),t.cubicInterpolationMode==="monotone")yse(e,i);else{let c=r?e[e.length-1]:e[0];for(o=0,a=e.length;o<a;++o)s=e[o],l=mse(c,s,e[Math.min(o+1,a-(r?0:1))%a],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&&bse(e,n)}function Jx(){return typeof window<"u"&&typeof document<"u"}function e1(e){let t=e.parentNode;return t&&t.toString()==="[object ShadowRoot]"&&(t=t.host),t}function xp(e,t,n){let r;return typeof e=="string"?(r=parseInt(e,10),e.indexOf("%")!==-1&&(r=r/100*t.parentNode[n])):r=e,r}const Uh=e=>e.ownerDocument.defaultView.getComputedStyle(e,null);function wse(e,t){return Uh(e).getPropertyValue(t)}const _se=["top","right","bottom","left"];function Ha(e,t,n){const r={};n=n?"-"+n:"";for(let i=0;i<4;i++){const o=_se[i];r[o]=parseFloat(e[t+"-"+o+n])||0}return r.width=r.left+r.right,r.height=r.top+r.bottom,r}const Sse=(e,t,n)=>(e>0||t>0)&&(!n||!n.shadowRoot);function Ose(e,t){const n=e.touches,r=n&&n.length?n[0]:e,{offsetX:i,offsetY:o}=r;let a=!1,s,l;if(Sse(i,o,e.target))s=i,l=o;else{const c=t.getBoundingClientRect();s=r.clientX-c.left,l=r.clientY-c.top,a=!0}return{x:s,y:l,box:a}}function Ea(e,t){if("native"in e)return e;const{canvas:n,currentDevicePixelRatio:r}=t,i=Uh(n),o=i.boxSizing==="border-box",a=Ha(i,"padding"),s=Ha(i,"border","width"),{x:l,y:c,box:u}=Ose(e,n),d=a.left+(u&&s.left),f=a.top+(u&&s.top);let{width:p,height:m}=t;return o&&(p-=a.width+s.width,m-=a.height+s.height),{x:Math.round((l-d)/p*n.width/r),y:Math.round((c-f)/m*n.height/r)}}function Ese(e,t,n){let r,i;if(t===void 0||n===void 0){const o=e&&e1(e);if(!o)t=e.clientWidth,n=e.clientHeight;else{const a=o.getBoundingClientRect(),s=Uh(o),l=Ha(s,"border","width"),c=Ha(s,"padding");t=a.width-c.width-l.width,n=a.height-c.height-l.height,r=xp(s.maxWidth,o,"clientWidth"),i=xp(s.maxHeight,o,"clientHeight")}}return{width:t,height:n,maxWidth:r||vp,maxHeight:i||vp}}const Nd=e=>Math.round(e*10)/10;function Pse(e,t,n,r){const i=Uh(e),o=Ha(i,"margin"),a=xp(i.maxWidth,e,"clientWidth")||vp,s=xp(i.maxHeight,e,"clientHeight")||vp,l=Ese(e,t,n);let{width:c,height:u}=l;if(i.boxSizing==="content-box"){const f=Ha(i,"border","width"),p=Ha(i,"padding");c-=p.width+f.width,u-=p.height+f.height}return c=Math.max(0,c-o.width),u=Math.max(0,r?c/r:u-o.height),c=Nd(Math.min(c,a,l.maxWidth)),u=Nd(Math.min(u,s,l.maxHeight)),c&&!u&&(u=Nd(c/2)),(t!==void 0||n!==void 0)&&r&&l.height&&u>l.height&&(u=l.height,c=Nd(Math.floor(u*r))),{width:c,height:u}}function cP(e,t,n){const r=t||1,i=Math.floor(e.height*r),o=Math.floor(e.width*r);e.height=Math.floor(e.height),e.width=Math.floor(e.width);const a=e.canvas;return a.style&&(n||!a.style.height&&!a.style.width)&&(a.style.height=`${e.height}px`,a.style.width=`${e.width}px`),e.currentDevicePixelRatio!==r||a.height!==i||a.width!==o?(e.currentDevicePixelRatio=r,a.height=i,a.width=o,e.ctx.setTransform(r,0,0,r,0,0),!0):!1}const kse=(function(){let e=!1;try{const t={get passive(){return e=!0,!1}};Jx()&&(window.addEventListener("test",null,t),window.removeEventListener("test",null,t))}catch{}return e})();function uP(e,t){const n=wse(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?+r[1]:void 0}function Pa(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function Cse(e,t,n,r){return{x:e.x+n*(t.x-e.x),y:r==="middle"?n<.5?e.y:t.y:r==="after"?n<1?e.y:t.y:n>0?t.y:e.y}}function Dse(e,t,n,r){const i={x:e.cp2x,y:e.cp2y},o={x:t.cp1x,y:t.cp1y},a=Pa(e,i,n),s=Pa(i,o,n),l=Pa(o,t,n),c=Pa(a,s,n),u=Pa(s,l,n);return Pa(c,u,n)}const Ase=function(e,t){return{x(n){return e+e+t-n},setWidth(n){t=n},textAlign(n){return n==="center"?n:n==="right"?"left":"right"},xPlus(n,r){return n-r},leftForLtr(n,r){return n-r}}},Tse=function(){return{x(e){return e},setWidth(e){},textAlign(e){return e},xPlus(e,t){return e+t},leftForLtr(e,t){return e}}};function Ls(e,t,n){return e?Ase(t,n):Tse()}function pR(e,t){let n,r;(t==="ltr"||t==="rtl")&&(n=e.canvas.style,r=[n.getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)}function hR(e,t){t!==void 0&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}function mR(e){return e==="angle"?{between:eu,compare:Aae,normalize:Ur}:{between:Ro,compare:(t,n)=>t-n,normalize:t=>t}}function dP({start:e,end:t,count:n,loop:r,style:i}){return{start:e%n,end:t%n,loop:r&&(t-e+1)%n===0,style:i}}function Mse(e,t,n){const{property:r,start:i,end:o}=n,{between:a,normalize:s}=mR(r),l=t.length;let{start:c,end:u,loop:d}=e,f,p;if(d){for(c+=l,u+=l,f=0,p=l;f<p&&a(s(t[c%l][r]),i,o);++f)c--,u--;c%=l,u%=l}return u<c&&(u+=l),{start:c,end:u,loop:d,style:e.style}}function Nse(e,t,n){if(!n)return[e];const{property:r,start:i,end:o}=n,a=t.length,{compare:s,between:l,normalize:c}=mR(r),{start:u,end:d,loop:f,style:p}=Mse(e,t,n),m=[];let h=!1,g=null,b,S,w;const x=()=>l(i,w,b)&&s(i,w)!==0,_=()=>s(o,b)===0||l(o,w,b),E=()=>h||x(),C=()=>!h||_();for(let D=u,T=u;D<=d;++D)S=t[D%a],!S.skip&&(b=c(S[r]),b!==w&&(h=l(b,i,o),g===null&&E()&&(g=s(b,i)===0?D:T),g!==null&&C()&&(m.push(dP({start:g,end:D,loop:f,count:a,style:p})),g=null),T=D,w=b));return g!==null&&m.push(dP({start:g,end:d,loop:f,count:a,style:p})),m}function jse(e,t){const n=[],r=e.segments;for(let i=0;i<r.length;i++){const o=Nse(r[i],e.points,t);o.length&&n.push(...o)}return n}function Rse(e,t,n,r){let i=0,o=t-1;if(n&&!r)for(;i<t&&!e[i].skip;)i++;for(;i<t&&e[i].skip;)i++;for(i%=t,n&&(o+=i);o>i&&e[o%t].skip;)o--;return o%=t,{start:i,end:o}}function Ise(e,t,n,r){const i=e.length,o=[];let a=t,s=e[t],l;for(l=t+1;l<=n;++l){const c=e[l%i];c.skip||c.stop?s.skip||(r=!1,o.push({start:t%i,end:(l-1)%i,loop:r}),t=a=c.stop?l:null):(a=l,s.skip&&(t=l)),s=c}return a!==null&&o.push({start:t%i,end:a%i,loop:r}),o}function Lse(e,t){const n=e.points,r=e.options.spanGaps,i=n.length;if(!i)return[];const o=!!e._loop,{start:a,end:s}=Rse(n,i,o,r);if(r===!0)return fP(e,[{start:a,end:s,loop:o}],n,t);const l=s<a?s+i:s,c=!!e._fullLoop&&a===0&&s===i-1;return fP(e,Ise(n,a,l,c),n,t)}function fP(e,t,n,r){return!r||!r.setContext||!n?t:Fse(e,t,n,r)}function Fse(e,t,n,r){const i=e._chart.getContext(),o=pP(e.options),{_datasetIndex:a,options:{spanGaps:s}}=e,l=n.length,c=[];let u=o,d=t[0].start,f=d;function p(m,h,g,b){const S=s?-1:1;if(m!==h){for(m+=l;n[m%l].skip;)m-=S;for(;n[h%l].skip;)h+=S;m%l!==h%l&&(c.push({start:m%l,end:h%l,loop:g,style:b}),u=b,d=h%l)}}for(const m of t){d=s?d:m.start;let h=n[d%l],g;for(f=d+1;f<=m.end;f++){const b=n[f%l];g=pP(r.setContext(cs(i,{type:"segment",p0:h,p1:b,p0DataIndex:(f-1)%l,p1DataIndex:f%l,datasetIndex:a}))),$se(g,u)&&p(d,f-1,m.loop,u),h=b,u=g}d<f-1&&p(d,f-1,m.loop,u)}return c}function pP(e){return{backgroundColor:e.backgroundColor,borderCapStyle:e.borderCapStyle,borderDash:e.borderDash,borderDashOffset:e.borderDashOffset,borderJoinStyle:e.borderJoinStyle,borderWidth:e.borderWidth,borderColor:e.borderColor}}function $se(e,t){if(!t)return!1;const n=[],r=function(i,o){return Yx(o)?(n.includes(o)||n.push(o),n.indexOf(o)):o};return JSON.stringify(e,r)!==JSON.stringify(t,r)}function jd(e,t,n){return e.options.clip?e[n]:t[n]}function Bse(e,t){const{xScale:n,yScale:r}=e;return n&&r?{left:jd(n,t,"left"),right:jd(n,t,"right"),top:jd(r,t,"top"),bottom:jd(r,t,"bottom")}:t}function Wse(e,t){const n=t._clip;if(n.disabled)return!1;const r=Bse(t,e.chartArea);return{left:n.left===!1?0:r.left-(n.left===!0?0:n.left),right:n.right===!1?e.width:r.right+(n.right===!0?0:n.right),top:n.top===!1?0:r.top-(n.top===!0?0:n.top),bottom:n.bottom===!1?e.height:r.bottom+(n.bottom===!0?0:n.bottom)}}/*!
276
276
  * Chart.js v4.5.0
277
277
  * https://www.chartjs.org
278
278
  * (c) 2025 Chart.js Contributors
279
279
  * Released under the MIT License
280
- */class zse{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=nR.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var $i=new zse;const hP="transparent",Vse={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=rP(e||hP),i=r.valid&&rP(t||hP);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Hse{constructor(t,n,r,i){const o=n[r];i=Td([t.to,i,o,t.from]);const a=Td([t.from,o,i]);this._active=!0,this._fn=t.fn||Vse[t.type||typeof a],this._easing=_c[t.easing]||_c.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Td([t.to,n,i,t.from]),this._from=Td([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class gR{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Te(t))return;const n=Object.keys(Rt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Te(o))return;const a={};for(const s of n)a[s]=o[s];(en(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=Use(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&Yse(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new Hse(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return $i.add(this._chart,r),!0}}function Yse(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function Use(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function mP(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function Kse(e,t,n){if(n===!1)return!1;const r=mP(e,n),i=mP(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function qse(e){let t,n,r,i;return Te(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function vR(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function gP(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],$r(c)&&(o||t===0||wi(t)===wi(c))&&(t+=c)}return!u&&!r.all?0:t}function Gse(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[i]:u,[o]:e[u]};return s}function ov(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Xse(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Qse(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Zse(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function vP(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function yP(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=Xse(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:h,[c]:g}=m,b=m._stacks||(m._stacks={});f=b[c]=Zse(i,u,h),f[s]=g,f._top=vP(f,a,!0,r.type),f._bottom=vP(f,a,!1,r.type);const S=f._visualValues||(f._visualValues={});S[s]=g}}function av(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function Jse(e,t){return cs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function ele(e,t,n){return cs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Gl(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const sv=e=>e==="reset"||e==="none",bP=(e,t)=>t?e:Object.assign({},e),tle=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:vR(n,!0),values:null};class Kh{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=ov(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&&Gl(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Se(r.xAxisID,av(t,"x")),a=n.yAxisID=Se(r.yAxisID,av(t,"y")),s=n.rAxisID=Se(r.rAxisID,av(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&eP(this._data,this),t._stacked&&Gl(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Te(n)){const i=this._cachedMeta;this._data=Gse(n,i)}else if(r!==n){if(r){eP(r,this);const i=this._cachedMeta;Gl(i),i._parsed=[]}n&&Object.isExtensible(n)&&jae(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=ov(n.vScale,n),n.stack!==r.stack&&(i=!0,Gl(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(yP(this,n._parsed),n._stacked=ov(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{en(i[t])?f=this.parseArrayData(r,i,t,n):Te(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}a&&yP(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:a}=t,s=o.axis,l=a.axis,c=o.getLabels(),u=o===a,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+r,d[f]={[s]:u||o.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],s[l]={x:o.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:o,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(ts(p,s),f),y:a.parse(ts(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,a=n[t.axis],s={keys:vR(i,!0),values:n._stacks[t.axis]._visualValues};return gP(s,a,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,a=gP(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,a=i.length,s=this._getOtherScale(t),l=tle(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Qse(s);let f,p;function m(){p=i[f];const h=p[s.axis];return!$r(p[t.axis])||u>h||d<h}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][t.axis],$r(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=qse(Se(this.options.clip,Kse(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=ele(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Jse(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=t+"-"+n,s=o[a],l=this.enableOptionSharing&&Zc(r);if(s)return bP(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Rt.elements[t]),m=()=>this.getContext(r,i,n),h=c.resolveNamedOptions(f,p,m,d);return h.$shared&&(h.$shared=l,o[a]=Object.freeze(bP(h,l))),h}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new gR(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||sv(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){sv(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!sv(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"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 n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&Gl(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,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,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function nle(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=tR(r.sort((i,o)=>i-o))}return e._cache.$bar}function rle(e){const t=e.iScale,n=nle(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(Zc(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i<o;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return r}function ile(e,t,n,r){const i=n.barThickness;let o,a;return He(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}function ole(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=o-(s===null?t.end-t.start:s-o)),s===null&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}function ale(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function yR(e,t,n,r){return en(e)?ale(e,t,n,r):t[n.axis]=n.parse(e,r),t}function xP(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(yR(f,d,o,c));return l}function lv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function sle(e,t,n){return e!==0?wi(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function lle(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function cle(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=lle(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[wP(u,a,s,l)]=!0,i=c)),o[wP(i,a,s,l)]=!0,e.borderSkipped=o}function wP(e,t,n,r){return r?(e=ule(e,t,n),e=_P(e,n,t)):e=_P(e,t,n),e}function ule(e,t,n){return e===t?n:e===n?t:e}function _P(e,t,n){return e==="start"?t:e==="end"?n:e}function dle(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class fle extends Kh{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,n,r,i){return xP(t,n,r,i)}parseArrayData(t,n,r,i){return xP(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let f,p,m,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[o.axis]=o.parse(ts(h,c),f),d.push(yR(ts(h,u),m,a,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),a=o._custom,s=lv(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const m=this.getParsed(p),h=o||He(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[s.axis],S={horizontal:c,base:h.base,enableBorderRadius:!b||lv(m._custom)||a===b._top||a===b._bottom,x:c?h.head:g.center,y:c?g.center:h.head,height:c?g.size:Math.abs(h.size),width:c?Math.abs(h.size):g.size};f&&(S.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=S.options||t[p].options;cle(S,w,b,a),dle(S,w,u.ratio),this.updateElement(t[p],p,S,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const d=u._parsed.find(p=>p[r.axis]===l),f=d&&d[u.vScale.axis];if(He(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Se(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||rle(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,s=o||0,l=this.getParsed(t),c=l._custom,u=lv(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&wi(d)!==wi(c.barEnd)&&(f=0),f+=d);const g=!He(o)&&!u?o:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=b,h=m-b,Math.abs(h)<a){h=sle(h,n,s)*a,d===s&&(b-=h/2);const S=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),x=Math.min(S,w),_=Math.max(S,w);b=Math.max(Math.min(b,_),x),m=b+h,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(s)){const S=wi(h)*n.getLineWidthForValue(s)/2;b+=S,h-=S}return{size:h,base:b,head:m,center:m+h/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,a=Se(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?ole(t,n,i,u*c):ile(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Se(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(a,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function ple(e,t,n){let r=1,i=1,o=0,a=0;if(t<Ct){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,x,_)=>eu(w,s,l,!0)?1:Math.max(x,x*n,_,_*n),m=(w,x,_)=>eu(w,s,l,!0)?-1:Math.min(x,x*n,_,_*n),h=p(0,c,d),g=p(Ut,u,f),b=m(ot,c,d),S=m(ot+Ut,u,f);r=(h-b)/2,i=(g-S)/2,o=-(h+b)/2,a=-(g+S)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class hle extends Kh{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 n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Te(r[t])){const{key:l="value"}=this._parsing;o=c=>+ts(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return Qi(this.options.rotation-90)}_getCircumference(){return Qi(this.options.circumference)}_getRotationExtents(){let t=Ct,n=-Ct;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(vae(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:h}=ple(d,u,l),g=(r.width-a)/f,b=(r.height-a)/p,S=Math.max(Math.min(g,b)/2,0),w=Xj(this.options.radius,S),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=h*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/Ct)}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.chartArea,c=a.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:h,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation(),S;for(S=0;S<n;++S)b+=this._circumference(S,o);for(S=n;S<n+r;++S){const w=this._circumference(S,o),x=t[S],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};g&&(_.options=h||this.resolveDataElementOptions(S,x.active?"active":i)),b+=w,this.updateElement(x,S,_,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Ct*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ux(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,s=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Se(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class mle extends Kh{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 n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=Lae(n,i,a);this._drawStart=s,this._drawCount=l,Fae(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=a.axis,p=s.axis,{spanGaps:m,segment:h}=this.options,g=Jc(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",S=n+r,w=t.length;let x=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const E=t[_],C=b?E:{};if(_<n||_>=S){C.skip=!0;continue}const D=this.getParsed(_),T=He(D[p]),j=C[f]=a.getPixelForValue(D[f],_),A=C[p]=o||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],_);C.skip=isNaN(j)||isNaN(A)||T,C.stop=_>0&&Math.abs(D[f]-x[f])>g,h&&(C.parsed=D,C.raw=c.data[_]),d&&(C.options=u||this.resolveDataElementOptions(_,E.active?"active":i)),b||this.updateElement(E,_,C,i),x=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function ga(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class t1{static override(t){Object.assign(t1.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ga()}parse(){return ga()}format(){return ga()}add(){return ga()}diff(){return ga()}startOf(){return ga()}endOf(){return ga()}}var gle={_date:t1};function vle(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const c=s._reversePixels?Mae:Ra;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),p=c(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,p=f.slice(0,u.lo+1).reverse().findIndex(h=>!He(h[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(h=>!He(h[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function qh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:c,data:u}=o[s],{lo:d,hi:f}=vle(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function yle(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function cv(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||qh(e,n,t,function(s,l,c){!i&&!tu(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function ble(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=Jj(a,{x:t.x,y:t.y});eu(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return qh(e,n,t,o),i}function xle(e,t,n,r,i,o){let a=[];const s=yle(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const g=s(t,m);g<l?(a=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&a.push({element:u,datasetIndex:d,index:f})}return qh(e,n,t,c),a}function uv(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?ble(e,t,n,i):xle(e,t,n,r,i,o)}function SP(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return qh(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var wle={modes:{index(e,t,n,r){const i=Ea(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?cv(e,i,o,r,a):uv(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=Ea(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?cv(e,i,o,r,a):uv(e,i,o,!1,r,a);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,n,r){const i=Ea(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return cv(e,i,o,r,a)},nearest(e,t,n,r){const i=Ea(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return uv(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=Ea(t,e);return SP(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Ea(t,e);return SP(e,i,"y",n.intersect,r)}}};const bR=["left","top","right","bottom"];function Xl(e,t){return e.filter(n=>n.pos===t)}function OP(e,t){return e.filter(n=>bR.indexOf(n.pos)===-1&&n.box.axis===t)}function Ql(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function _le(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return t}function Sle(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!bR.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Ole(e,t){const n=Sle(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,a,s;for(o=0,a=e.length;o<a;++o){s=e[o];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function Ele(e){const t=_le(e),n=Ql(t.filter(c=>c.box.fullSize),!0),r=Ql(Xl(t,"left"),!0),i=Ql(Xl(t,"right")),o=Ql(Xl(t,"top"),!0),a=Ql(Xl(t,"bottom")),s=OP(t,"x"),l=OP(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Xl(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function EP(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function xR(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 Ple(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Te(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&xR(a,o.getPadding());const s=Math.max(0,t.outerWidth-EP(a,e,"left","right")),l=Math.max(0,t.outerHeight-EP(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function kle(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Cle(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function dc(e,t,n,r){const i=[];let o,a,s,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){s=e[o],l=s.box,l.update(s.width||t.w,s.height||t.h,Cle(s.horizontal,t));const{same:d,other:f}=Ple(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&dc(i,t,n,r)||u}function Rd(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function PP(e,t,n,r){const i=n.padding;let{x:o,y:a}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,f=c.size||l.height;Zc(c.start)&&(a=c.start),l.fullSize?Rd(l,i.left,a,n.outerWidth-i.right-i.left,f):Rd(l,t.left+c.placed,a,d,f),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,f=c.size||l.width;Zc(c.start)&&(o=c.start),l.fullSize?Rd(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Rd(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var Io={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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Qr(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=Ele(e.boxes),l=s.vertical,c=s.horizontal;Ge(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,g)=>g.box.options&&g.box.options.display===!1?h:h+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},i);xR(f,Qr(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=Ole(l.concat(c),d);dc(s.fullSize,p,d,m),dc(l,p,d,m),dc(c,p,d,m)&&dc(l,p,d,m),kle(p),PP(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,PP(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ge(s.chartArea,h=>{const g=h.box;Object.assign(g,e.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class wR{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Dle extends wR{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const nf="$chartjs",Ale={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},kP=e=>e===null||e==="";function Tle(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[nf]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",kP(i)){const o=uP(e,"width");o!==void 0&&(e.width=o)}if(kP(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=uP(e,"height");o!==void 0&&(e.height=o)}return e}const _R=kse?{passive:!0}:!1;function Mle(e,t,n){e&&e.addEventListener(t,n,_R)}function Nle(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,_R)}function jle(e,t){const n=Ale[e.type]||e.type,{x:r,y:i}=Ea(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function wp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Rle(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||wp(s.addedNodes,r),a=a&&!wp(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Ile(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||wp(s.removedNodes,r),a=a&&!wp(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const nu=new Map;let CP=0;function SR(){const e=window.devicePixelRatio;e!==CP&&(CP=e,nu.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Lle(e,t){nu.size||window.addEventListener("resize",SR),nu.set(e,t)}function Fle(e){nu.delete(e),nu.size||window.removeEventListener("resize",SR)}function $le(e,t,n){const r=e.canvas,i=r&&e1(r);if(!i)return;const o=rR((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),Lle(e,o),a}function dv(e,t,n){n&&n.disconnect(),t==="resize"&&Fle(e)}function Ble(e,t,n){const r=e.canvas,i=rR(o=>{e.ctx!==null&&n(jle(o,e))},e);return Mle(r,t,i),i}class Wle extends wR{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Tle(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[nf])return!1;const r=n[nf].initial;["height","width"].forEach(o=>{const a=r[o];He(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[nf],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:Rle,detach:Ile,resize:$le}[n]||Ble;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:dv,detach:dv,resize:dv}[n]||Nle)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Pse(t,n,r,i)}isAttached(t){const n=t&&e1(t);return!!(n&&n.isConnected)}}function zle(e){return!Jx()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Dle:Wle}let aa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Jc(this.x)&&Jc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function Vle(e,t){const n=e.options.ticks,r=Hle(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?Ule(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return Kle(t,c,o,a/i),c;const u=Yle(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(Id(t,c,u,He(p)?0:s-p,s),d=0,f=a-1;d<f;d++)Id(t,c,u,o[d],o[d+1]);return Id(t,c,u,l,He(p)?t.length:l+p),c}return Id(t,c,u),c}function Hle(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function Yle(e,t,n){const r=qle(e),i=t.length/n;if(!r)return Math.max(i,1);const o=Eae(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function Ule(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Kle(e,t,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=n[i*r])}function Id(e,t,n,r,i){const o=Se(r,0),a=Math.min(Se(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)s++,u=Math.round(o+s*n);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(o+s*n))}function qle(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const Gle=e=>e==="left"?"right":e==="right"?"left":e,DP=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,AP=(e,t)=>Math.min(t||e,e);function TP(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function Xle(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-s||l>a+s)))return l}function Qle(e,t){Ge(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Zl(e){return e.drawTicks?e.tickLength:0}function MP(e,t){if(!e.display)return 0;const n=Zn(e.font,t),r=Qr(e.padding);return(en(e.text)?e.text.length:1)*n.lineHeight+r.height}function Zle(e,t){return cs(e,{scale:t,type:"scale"})}function Jle(e,t,n){return cs(e,{tick:n,index:t,type:"tick"})}function ece(e,t,n){let r=iR(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Gle(r)),r}function tce(e,t,n,r){const{top:i,left:o,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const h=a-i,g=s-o;if(e.isHorizontal()){if(p=ar(r,o,s),Te(n)){const b=Object.keys(n)[0],S=n[b];m=u[b].getPixelForValue(S)+h-t}else n==="center"?m=(c.bottom+c.top)/2+h-t:m=DP(e,n,t);f=s-o}else{if(Te(n)){const b=Object.keys(n)[0],S=n[b];p=u[b].getPixelForValue(S)-g+t}else n==="center"?p=(c.left+c.right)/2-g+t:p=DP(e,n,t);m=ar(r,a,i),d=n==="left"?-Ut:Ut}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class El extends aa{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=ri(t,Number.POSITIVE_INFINITY),n=ri(n,Number.NEGATIVE_INFINITY),r=ri(r,Number.POSITIVE_INFINITY),i=ri(i,Number.NEGATIVE_INFINITY),{min:ri(t,r),max:ri(n,i),minDefined:$r(t),maxDefined:$r(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:ri(n,ri(r,n)),max:ri(r,ri(n,r))}}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(){dt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ise(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?TP(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Vle(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,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){dt(this.options.afterUpdate,[this])}beforeSetDimensions(){dt(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(){dt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),dt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){dt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=dt(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){dt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){dt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=AP(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=En(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(t.offset?.5:1)),l=this.maxHeight-Zl(t.grid)-n.padding-MP(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=Dae(Math.min(Math.asin(En((u.highest.height+6)/s,-1,1)),Math.asin(En(l/c,-1,1))-Math.asin(En(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){dt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=MP(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Zl(o)+l):(t.height=this.maxHeight,t.width=Zl(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=Qi(this.labelRotation),h=Math.cos(m),g=Math.sin(m);if(s){const b=r.mirror?0:g*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{const b=r.mirror?0:h*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+b+p)}this._calculatePadding(c,u,g,h)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_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(){dt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)He(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=TP(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],s=[],l=Math.floor(n/AP(n,r));let c=0,u=0,d,f,p,m,h,g,b,S,w,x,_;for(d=0;d<n;d+=l){if(m=t[d].label,h=this._resolveTickFontOptions(d),i.font=g=h.string,b=o[g]=o[g]||{data:{},gc:[]},S=h.lineHeight,w=x=0,!He(m)&&!en(m))w=oP(i,b.data,b.gc,w,m),x=S;else if(en(m))for(f=0,p=m.length;f<p;++f)_=m[f],!He(_)&&!en(_)&&(w=oP(i,b.data,b.gc,w,_),x+=S);a.push(w),s.push(x),c=Math.max(w,c),u=Math.max(x,u)}Qle(o,n);const E=a.indexOf(c),C=s.indexOf(u),D=T=>({width:a[T]||0,height:s[T]||0});return{first:D(0),last:D(n-1),widest:D(E),highest:D(C),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Tae(this._alignToPixels?ma(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=Jle(this.getContext(),t,r))}return this.$context||(this.$context=Zle(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Qi(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Zl(o),p=[],m=s.setContext(this.getContext()),h=m.display?m.width:0,g=h/2,b=function(L){return ma(r,L,h)};let S,w,x,_,E,C,D,T,j,A,P,N;if(a==="top")S=b(this.bottom),C=this.bottom-f,T=S-g,A=b(t.top)+g,N=t.bottom;else if(a==="bottom")S=b(this.top),A=t.top,N=b(t.bottom)-g,C=S+g,T=this.top+f;else if(a==="left")S=b(this.right),E=this.right-f,D=S-g,j=b(t.left)+g,P=t.right;else if(a==="right")S=b(this.left),j=t.left,P=b(t.right)-g,E=S+g,D=this.left+f;else if(n==="x"){if(a==="center")S=b((t.top+t.bottom)/2+.5);else if(Te(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}A=t.top,N=t.bottom,C=S+g,T=C+f}else if(n==="y"){if(a==="center")S=b((t.left+t.right)/2);else if(Te(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}E=S-g,D=E-f,j=t.left,P=t.right}const M=Se(i.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/M));for(w=0;w<d;w+=I){const L=this.getContext(w),$=o.setContext(L),V=s.setContext(L),z=$.lineWidth,B=$.color,X=V.dash||[],q=V.dashOffset,re=$.tickWidth,J=$.tickColor,ee=$.tickBorderDash||[],ie=$.tickBorderDashOffset;x=Xle(this,w,l),x!==void 0&&(_=ma(r,x,z),c?E=D=j=P=_:C=T=A=N=_,p.push({tx1:E,ty1:C,tx2:D,ty2:T,x1:j,y1:A,x2:P,y2:N,width:z,color:B,borderDash:X,borderDashOffset:q,tickWidth:re,tickColor:J,tickBorderDash:ee,tickBorderDashOffset:ie}))}return this._ticksLength=d,this._borderValue=S,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=Zl(r.grid),p=f+u,m=d?-u:p,h=-Qi(this.labelRotation),g=[];let b,S,w,x,_,E,C,D,T,j,A,P,N="middle";if(i==="top")E=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(i==="right"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+p;else if(Te(i)){const I=Object.keys(i)[0],L=i[I];E=this.chart.scales[I].getPixelForValue(L)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-p;else if(Te(i)){const I=Object.keys(i)[0],L=i[I];_=this.chart.scales[I].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const M=this._getLabelSizes();for(b=0,S=s.length;b<S;++b){w=s[b],x=w.label;const I=o.setContext(this.getContext(b));D=this.getPixelForTick(b)+o.labelOffset,T=this._resolveTickFontOptions(b),j=T.lineHeight,A=en(x)?x.length:1;const L=A/2,$=I.color,V=I.textStrokeColor,z=I.textStrokeWidth;let B=C;a?(_=D,C==="inner"&&(b===S-1?B=this.options.reverse?"left":"right":b===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||h!==0?P=-A*j+j/2:c==="center"?P=-M.highest.height/2-L*j+j:P=-M.highest.height+j/2:c==="near"||h!==0?P=j/2:c==="center"?P=M.highest.height/2-L*j:P=M.highest.height-A*j,d&&(P*=-1),h!==0&&!I.showLabelBackdrop&&(_+=j/2*Math.sin(h))):(E=D,P=(1-A)*j/2);let X;if(I.showLabelBackdrop){const q=Qr(I.backdropPadding),re=M.heights[b],J=M.widths[b];let ee=P-q.top,ie=0-q.left;switch(N){case"middle":ee-=re/2;break;case"bottom":ee-=re;break}switch(C){case"center":ie-=J/2;break;case"right":ie-=J;break;case"inner":b===S-1?ie-=J:b>0&&(ie-=J/2);break}X={left:ie,top:ee,width:J+q.width,height:re+q.height,color:I.backdropColor}}g.push({label:x,font:T,textOffset:P,options:{rotation:h,color:$,strokeColor:V,strokeWidth:z,textAlign:B,textBaseline:N,translation:[_,E],backdrop:X}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Qi(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=t+o,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="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,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const l=i[o];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.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:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=ma(t,this.left,a)-a/2,u=ma(t,this.right,s)+s/2,d=f=l):(d=ma(t,this.top,a)-a/2,f=ma(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Kx(r,i);const o=this.getLabelItems(t);for(const a of o){const s=a.options,l=a.font,c=a.label,u=a.textOffset;yp(r,c,0,u,l,s)}i&&qx(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Zn(r.font),a=Qr(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Te(n)?(l+=a.bottom,en(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=tce(this,l,n,s);yp(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:ece(s,n,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,n=t.ticks&&t.ticks.z||0,r=Se(t.grid&&t.grid.z,-1),i=Se(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==El.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const s=n[o];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Zn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ld{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;ice(n)&&(r=this.register(n));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,nce(t,a,r),this.override&&Rt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Rt[i]&&(delete Rt[i][r],this.override&&delete ns[r])}}function nce(e,t,n){const r=Qc(Object.create(null),[n?Rt.get(n):{},Rt.get(t),e.defaults]);Rt.set(t,r),e.defaultRoutes&&rce(t,e.defaultRoutes),e.descriptors&&Rt.describe(t,e.descriptors)}function rce(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Rt.route(o,i,l,s)})}function ice(e){return"id"in e&&"defaults"in e}class oce{constructor(){this.controllers=new Ld(Kh,"datasets",!0),this.elements=new Ld(aa,"elements"),this.plugins=new Ld(Object,"plugins"),this.scales=new Ld(El,"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,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ge(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=Vx(t);dt(r["before"+i],[],r),n[t](r),dt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var oi=new oce;class ace{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,r,i){i=i||{};for(const o of t){const a=o.plugin,s=a[r],l=[n,i,o.options];if(dt(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){He(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Se(r.options&&r.options.plugins,{}),o=sce(r);return i===!1&&!n?[]:cce(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function sce(e){const t={},n=[],r=Object.keys(oi.plugins.items);for(let o=0;o<r.length;o++)n.push(oi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function lce(e,t){return!t&&e===!1?null:e===!0?{}:e}function cce(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=lce(r[l],i);c!==null&&o.push({plugin:s,options:uce(e.config,{plugin:s,local:n[l]},c,a)})}return o}function uce(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(r,o);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function By(e,t){const n=Rt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function dce(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function fce(e,t){return e===t?"_index_":"_value_"}function NP(e){if(e==="x"||e==="y"||e==="r")return e}function pce(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Wy(e,...t){if(NP(e))return e;for(const n of t){const r=n.axis||pce(n.position)||e.length>1&&NP(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function jP(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function hce(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return jP(e,"x",n[0])||jP(e,"y",n[0])}return{}}function mce(e,t){const n=ns[e.type]||{scales:{}},r=t.scales||{},i=By(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Te(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Wy(a,s,hce(a,e),Rt.scales[s.type]),c=fce(l,i),u=n.scales||{};o[a]=xc(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||By(s,t),u=(ns[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=dce(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),xc(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];xc(s,[Rt.scales[s.type],Rt.scale])}),o}function OR(e){const t=e.options||(e.options={});t.plugins=Se(t.plugins,{}),t.scales=mce(e,t)}function ER(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function gce(e){return e=e||{},e.data=ER(e.data),OR(e),e}const RP=new Map,PR=new Set;function Fd(e,t){let n=RP.get(e);return n||(n=t(),RP.set(e,n),PR.add(n)),n}const Jl=(e,t,n)=>{const r=ts(t,n);r!==void 0&&e.add(r)};class vce{constructor(t){this._config=gce(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=ER(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(),OR(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Fd(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Fd(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Fd(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Fd(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Jl(l,t,d))),u.forEach(d=>Jl(l,i,d)),u.forEach(d=>Jl(l,ns[o]||{},d)),u.forEach(d=>Jl(l,Rt,d)),u.forEach(d=>Jl(l,Fy,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),PR.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ns[n]||{},Rt.datasets[n]||{},{type:n},Rt,Fy]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=IP(this._resolverCache,t,i);let l=a;if(bce(a,n)){o.$shared=!1,r=Zo(r)?r():r;const c=this.createResolver(t,r,s);l=sl(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=IP(this._resolverCache,t,r);return Te(n)?sl(o,n,void 0,i):o}}function IP(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Xx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const yce=e=>Te(e)&&Object.getOwnPropertyNames(e).some(t=>Zo(e[t]));function bce(e,t){const{isScriptable:n,isIndexable:r}=lR(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Zo(s)||yce(s))||a&&en(s))return!0}return!1}var xce="4.5.0";const wce=["top","bottom","left","right","chartArea"];function LP(e,t){return e==="top"||e==="bottom"||wce.indexOf(e)===-1&&t==="x"}function FP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function $P(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),dt(n&&n.onComplete,[e],t)}function _ce(e){const t=e.chart,n=t.options.animation;dt(n&&n.onProgress,[e],t)}function kR(e){return Jx()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const rf={},BP=e=>{const t=kR(e);return Object.values(rf).filter(n=>n.canvas===t).pop()};function Sce(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function Oce(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let $n=class{static defaults=Rt;static instances=rf;static overrides=ns;static registry=oi;static version=xce;static getChart=BP;static register(...t){oi.add(...t),WP()}static unregister(...t){oi.remove(...t),WP()}constructor(t,n){const r=this.config=new vce(n),i=kR(t),o=BP(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||zle(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=gae(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,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 ace,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Rae(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],rf[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}$i.listen(this,"complete",$P),$i.listen(this,"progress",_ce),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return He(t)?n&&o?o:i?r/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 oi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return aP(this.canvas,this.ctx),this}stop(){return $i.stop(this),this}resize(t,n){$i.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,cP(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),dt(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ge(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=Wy(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ge(o,a=>{const s=a.options,l=s.id,c=Wy(l,s),u=Se(s.type,a.dtype);(s.position===void 0||LP(s.position,c)!==LP(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=oi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Ge(i,(a,s)=>{a||delete r[s]}),Ge(r,a=>{Io.configure(this,a,a.options),Io.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(FP("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||By(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=oi.getController(s),{datasetElementType:c,dataElementType:u}=Rt.datasets[s];Object.assign(l,{dataElementType:oi.getElement(u),datasetElementType:c&&oi.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Ge(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Ge(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(FP("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ge(this.scales,t=>{Io.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!X2(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;Sce(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!X2(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Io.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ge(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Zo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&($i.has(this)?this.attached&&!$i.running(this)&&$i.start(this):(this.draw(),$P({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Wse(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Kx(n,i),t.controller.draw(),i&&qx(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return tu(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=wle.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=cs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);Zc(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),$i.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),aP(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete rf[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,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ge(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){Ge(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ge(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!mp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=_ae(t),c=Oce(t,this._lastEvent,r,l);r&&(this._lastEvent=null,dt(o.onHover,[t,s,this],this),l&&dt(o.onClick,[t,s,this],this));const u=!mp(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function WP(){return Ge($n.instances,e=>e._plugins.invalidate())}function Ece(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/a,Ur(r-n));if(e.beginPath(),e.arc(i,o,a-c/2,r+d/2,n-d/2),s>0){const f=Math.min(c/s,Ur(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*Ur(r-n));if(u==="round")e.arc(i,o,f,n-ot/2,r+ot/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+ot/2)+i,h=-p*Math.sin(n+ot/2)+o,g=p*Math.cos(r+ot/2)+i,b=p*Math.sin(r+ot/2)+o;e.lineTo(m,h),e.lineTo(g,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Pce(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Ut,r-Ut),e.closePath(),e.clip()}function kce(e){return Gx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Cce(e,t,n,r){const i=kce(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return En(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:En(i.innerStart,0,a),innerEnd:En(i.innerEnd,0,a)}}function Os(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function _p(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let p=0;const m=i-l;if(r){const I=u>0?u-r:0,L=d>0?d-r:0,$=(I+L)/2,V=$!==0?m*$/($+r):m;p=(m-V)/2}const h=Math.max(.001,m*d-n/ot)/d,g=(m-h)/2,b=l+g+p,S=i-g-p,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:E}=Cce(t,f,d,S-b),C=d-w,D=d-x,T=b+w/C,j=S-x/D,A=f+_,P=f+E,N=b+_/A,M=S-E/P;if(e.beginPath(),o){const I=(T+j)/2;if(e.arc(a,s,d,T,I),e.arc(a,s,d,I,j),x>0){const z=Os(D,j,a,s);e.arc(z.x,z.y,x,j,S+Ut)}const L=Os(P,S,a,s);if(e.lineTo(L.x,L.y),E>0){const z=Os(P,M,a,s);e.arc(z.x,z.y,E,S+Ut,M+Math.PI)}const $=(S-E/f+(b+_/f))/2;if(e.arc(a,s,f,S-E/f,$,!0),e.arc(a,s,f,$,b+_/f,!0),_>0){const z=Os(A,N,a,s);e.arc(z.x,z.y,_,N+Math.PI,b-Ut)}const V=Os(C,b,a,s);if(e.lineTo(V.x,V.y),w>0){const z=Os(C,T,a,s);e.arc(z.x,z.y,w,b-Ut,T)}}else{e.moveTo(a,s);const I=Math.cos(T)*d+a,L=Math.sin(T)*d+s;e.lineTo(I,L);const $=Math.cos(j)*d+a,V=Math.sin(j)*d+s;e.lineTo($,V)}e.closePath()}function Dce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){_p(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%Ct||Ct))}return _p(e,t,n,r,l,i),e.fill(),l}function Ace(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let h=t.endAngle;if(o){_p(e,t,n,r,h,i);for(let g=0;g<o;++g)e.stroke();isNaN(s)||(h=a+(s%Ct||Ct))}m&&Pce(e,t,h),l.selfJoin&&h-a>=ot&&p===0&&u!=="miter"&&Ece(e,t,h),o||(_p(e,t,n,r,h,i),e.stroke())}class n1 extends aa{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,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:a}=Jj(i,{x:t,y:n}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,p=Se(d,l-s),m=eu(o,s,l)&&s!==l,h=p>=Ct||m,g=Ro(a,c+f,u+f);return h&&g}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(a+s+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Ct?Math.floor(r/Ct):0,r===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(ot,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,Dce(t,this,c,o,a),Ace(t,this,c,o,a),t.restore()}}function CR(e,t,n=t){e.lineCap=Se(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Se(n.borderDash,t.borderDash)),e.lineDashOffset=Se(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Se(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Se(n.borderWidth,t.borderWidth),e.strokeStyle=Se(n.borderColor,t.borderColor)}function Tce(e,t,n){e.lineTo(n.x,n.y)}function Mce(e){return e.stepped?Gae:e.tension||e.cubicInterpolationMode==="monotone"?Xae:Tce}function DR(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function Nce(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=DR(i,n,r),u=Mce(o);let{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=c;++p)m=i[(s+(f?c-p:p))%a],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,o.stepped),h=m);return l&&(m=i[(s+(f?c:0))%a],u(e,h,m,f,o.stepped)),!!l}function jce(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=DR(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,h,g,b;const S=x=>(a+(c?s-x:x))%o,w=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,b))};for(l&&(p=i[S(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[S(f)],p.skip)continue;const x=p.x,_=p.y,E=x|0;E===m?(_<h?h=_:_>g&&(g=_),u=(d*u+x)/++d):(w(),e.lineTo(x,_),m=E,d=0,h=g=_),b=_}w()}function zy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?jce:Nce}function Rce(e){return e.stepped?Cse:e.tension||e.cubicInterpolationMode==="monotone"?Dse:Pa}function Ice(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),CR(e,t.options),e.stroke(i)}function Lce(e,t,n,r){const{segments:i,options:o}=t,a=zy(t);for(const s of i)CR(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Fce=typeof Path2D=="function";function $ce(e,t,n,r){Fce&&!t.options.segment?Ice(e,t,n,r):Lce(e,t,n,r)}class r1 extends aa{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,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;xse(this._points,r,t,i,n),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=Lse(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=jse(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Rce(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:d,end:f}=a[c],p=o[d],m=o[f];if(p===m){s.push(p);continue}const h=Math.abs((i-p[n])/(m[n]-p[n])),g=l(p,m,h,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return zy(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=zy(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)a&=o(t,this,s,{start:n,end:n+r-1});return!!a}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),$ce(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function zP(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class i1 extends aa{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,n,r){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return zP(this,t,"x",n)}inYRange(t,n){return zP(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!tu(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,$y(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function AR(e,t){const{x:n,y:r,base:i,width:o,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function Lo(e,t,n,r){return e?0:En(t,n,r)}function Bce(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=sR(r);return{t:Lo(i.top,o.top,0,n),r:Lo(i.right,o.right,0,t),b:Lo(i.bottom,o.bottom,0,n),l:Lo(i.left,o.left,0,t)}}function Wce(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=Is(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Te(i);return{topLeft:Lo(!l||s.top||s.left,o.topLeft,0,a),topRight:Lo(!l||s.top||s.right,o.topRight,0,a),bottomLeft:Lo(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Lo(!l||s.bottom||s.right,o.bottomRight,0,a)}}function zce(e){const t=AR(e),n=t.right-t.left,r=t.bottom-t.top,i=Bce(e,n/2,r/2),o=Wce(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function fv(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&AR(e,r);return s&&(i||Ro(t,s.left,s.right))&&(o||Ro(n,s.top,s.bottom))}function Vce(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Hce(e,t){e.rect(t.x,t.y,t.w,t.h)}function pv(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class Pl extends aa{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:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=zce(this),s=Vce(a.radius)?bp:Hce;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,pv(a,n,o)),t.clip(),s(t,pv(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,pv(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return fv(this,t,n,r)}inXRange(t,n){return fv(this,t,null,n)}inYRange(t,n){return fv(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const VP=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Yce=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class HP extends aa{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,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 n=dt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Zn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=VP(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,s,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,h)=>{const g=r+n/2+o.measureText(m.text).width;(h===0||c[c.length-1]+g+2*s>a)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let d=s,f=0,p=0,m=0,h=0;return this.legendItems.forEach((g,b)=>{const{itemWidth:S,itemHeight:w}=Uce(r,n,o,g,i);b>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,h++,f=p=0),l[b]={left:m,top:p,col:h,width:S,height:w},f=Math.max(f,S),p+=w+s}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=Ls(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=ar(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=ar(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=ar(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=ar(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.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;Kx(t,this),this._draw(),qx(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Rt.color,l=Ls(t.rtl,this.left,this.width),c=Zn(a.font),{padding:u}=a,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:h,itemHeight:g}=VP(a,d),b=function(E,C,D){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();const T=Se(D.lineWidth,1);if(i.fillStyle=Se(D.fillStyle,s),i.lineCap=Se(D.lineCap,"butt"),i.lineDashOffset=Se(D.lineDashOffset,0),i.lineJoin=Se(D.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Se(D.strokeStyle,s),i.setLineDash(Se(D.lineDash,[])),a.usePointStyle){const j={radius:h*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:T},A=l.xPlus(E,m/2),P=C+f;aR(i,j,A,P,a.pointStyleWidth&&m)}else{const j=C+Math.max((d-h)/2,0),A=l.leftForLtr(E,m),P=Is(D.borderRadius);i.beginPath(),Object.values(P).some(N=>N!==0)?bp(i,{x:A,y:j,w:m,h,radius:P}):i.rect(A,j,m,h),i.fill(),T!==0&&i.stroke()}i.restore()},S=function(E,C,D){yp(i,D.text,E,C+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:ar(o,this.left+u,this.right-r[0]),y:this.top+u+x,line:0}:p={x:this.left+u,y:ar(o,this.top+x+u,this.bottom-n[0].height),line:0},pR(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const D=i.measureText(E.text).width,T=l.textAlign(E.textAlign||(E.textAlign=a.textAlign)),j=m+f+D;let A=p.x,P=p.y;l.setWidth(this.width),w?C>0&&A+j+u>this.right&&(P=p.y+=_,p.line++,A=p.x=ar(o,this.left+u,this.right-r[p.line])):C>0&&P+_>this.bottom&&(A=p.x=A+n[p.line].width+u,p.line++,P=p.y=ar(o,this.top+x+u,this.bottom-n[p.line].height));const N=l.x(A);if(b(N,P,E),A=Iae(T,A+m+f,w?A+j:this.right,t.rtl),S(l.x(A),P,E),w)p.x+=j+u;else if(typeof E.text!="string"){const M=c.lineHeight;p.y+=TR(E,M)+u}else p.y+=_}),hR(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Zn(n.font),i=Qr(n.padding);if(!n.display)return;const o=Ls(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=ar(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((h,g)=>Math.max(h,g.height),0);u=c+ar(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=ar(s,d,d+f);a.textAlign=o.textAlign(iR(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,yp(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=Zn(t.font),r=Qr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Ro(t,this.left,this.right)&&Ro(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Ro(t,i.left,i.left+i.width)&&Ro(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Gce(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Yce(i,r);i&&!o&&dt(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&dt(n.onHover,[t,r,this],this)}else r&&dt(n.onClick,[t,r,this],this)}}function Uce(e,t,n,r,i){const o=Kce(r,e,t,n),a=qce(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Kce(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function qce(e,t,n){let r=e;return typeof t.text!="string"&&(r=TR(t,n)),r}function TR(e,t){const n=e.text?e.text.length:0;return t*n}function Gce(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Jr={id:"legend",_element:HP,start(e,t,n){const r=e.legend=new HP({ctx:e.ctx,options:n,chart:e});Io.configure(e,r,n),Io.addBox(e,r)},stop(e){Io.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Io.configure(e,r,n),r.options=n},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,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),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:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Qr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,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:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(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 fc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ly(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function ii(e,t){return t&&(en(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Bi(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
280
+ */class zse{constructor(){this._request=null,this._charts=new Map,this._running=!1,this._lastDate=void 0}_notify(t,n,r,i){const o=n.listeners[i],a=n.duration;o.forEach(s=>s({chart:t,initial:n.initial,numSteps:a,currentStep:Math.min(r-n.start,a)}))}_refresh(){this._request||(this._running=!0,this._request=nR.call(window,()=>{this._update(),this._request=null,this._running&&this._refresh()}))}_update(t=Date.now()){let n=0;this._charts.forEach((r,i)=>{if(!r.running||!r.items.length)return;const o=r.items;let a=o.length-1,s=!1,l;for(;a>=0;--a)l=o[a],l._active?(l._total>r.duration&&(r.duration=l._total),l.tick(t),s=!0):(o[a]=o[o.length-1],o.pop());s&&(i.draw(),this._notify(i,r,t,"progress")),o.length||(r.running=!1,this._notify(i,r,t,"complete"),r.initial=!1),n+=o.length}),this._lastDate=t,n===0&&(this._running=!1)}_getAnims(t){const n=this._charts;let r=n.get(t);return r||(r={running:!1,initial:!0,items:[],listeners:{complete:[],progress:[]}},n.set(t,r)),r}listen(t,n,r){this._getAnims(t).listeners[n].push(r)}add(t,n){!n||!n.length||this._getAnims(t).items.push(...n)}has(t){return this._getAnims(t).items.length>0}start(t){const n=this._charts.get(t);n&&(n.running=!0,n.start=Date.now(),n.duration=n.items.reduce((r,i)=>Math.max(r,i._duration),0),this._refresh())}running(t){if(!this._running)return!1;const n=this._charts.get(t);return!(!n||!n.running||!n.items.length)}stop(t){const n=this._charts.get(t);if(!n||!n.items.length)return;const r=n.items;let i=r.length-1;for(;i>=0;--i)r[i].cancel();n.items=[],this._notify(t,n,Date.now(),"complete")}remove(t){return this._charts.delete(t)}}var $i=new zse;const hP="transparent",Vse={boolean(e,t,n){return n>.5?t:e},color(e,t,n){const r=rP(e||hP),i=r.valid&&rP(t||hP);return i&&i.valid?i.mix(r,n).hexString():t},number(e,t,n){return e+(t-e)*n}};class Hse{constructor(t,n,r,i){const o=n[r];i=Td([t.to,i,o,t.from]);const a=Td([t.from,o,i]);this._active=!0,this._fn=t.fn||Vse[t.type||typeof a],this._easing=_c[t.easing]||_c.linear,this._start=Math.floor(Date.now()+(t.delay||0)),this._duration=this._total=Math.floor(t.duration),this._loop=!!t.loop,this._target=n,this._prop=r,this._from=a,this._to=i,this._promises=void 0}active(){return this._active}update(t,n,r){if(this._active){this._notify(!1);const i=this._target[this._prop],o=r-this._start,a=this._duration-o;this._start=r,this._duration=Math.floor(Math.max(a,t.duration)),this._total+=o,this._loop=!!t.loop,this._to=Td([t.to,n,i,t.from]),this._from=Td([t.from,i,n])}}cancel(){this._active&&(this.tick(Date.now()),this._active=!1,this._notify(!1))}tick(t){const n=t-this._start,r=this._duration,i=this._prop,o=this._from,a=this._loop,s=this._to;let l;if(this._active=o!==s&&(a||n<r),!this._active){this._target[i]=s,this._notify(!0);return}if(n<0){this._target[i]=o;return}l=n/r%2,l=a&&l>1?2-l:l,l=this._easing(Math.min(1,Math.max(0,l))),this._target[i]=this._fn(o,s,l)}wait(){const t=this._promises||(this._promises=[]);return new Promise((n,r)=>{t.push({res:n,rej:r})})}_notify(t){const n=t?"res":"rej",r=this._promises||[];for(let i=0;i<r.length;i++)r[i][n]()}}class gR{constructor(t,n){this._chart=t,this._properties=new Map,this.configure(n)}configure(t){if(!Te(t))return;const n=Object.keys(Rt.animation),r=this._properties;Object.getOwnPropertyNames(t).forEach(i=>{const o=t[i];if(!Te(o))return;const a={};for(const s of n)a[s]=o[s];(tn(o.properties)&&o.properties||[i]).forEach(s=>{(s===i||!r.has(s))&&r.set(s,a)})})}_animateOptions(t,n){const r=n.options,i=Use(t,r);if(!i)return[];const o=this._createAnimations(i,r);return r.$shared&&Yse(t.options.$animations,r).then(()=>{t.options=r},()=>{}),o}_createAnimations(t,n){const r=this._properties,i=[],o=t.$animations||(t.$animations={}),a=Object.keys(n),s=Date.now();let l;for(l=a.length-1;l>=0;--l){const c=a[l];if(c.charAt(0)==="$")continue;if(c==="options"){i.push(...this._animateOptions(t,n));continue}const u=n[c];let d=o[c];const f=r.get(c);if(d)if(f&&d.active()){d.update(f,u,s);continue}else d.cancel();if(!f||!f.duration){t[c]=u;continue}o[c]=d=new Hse(f,t,c,u),i.push(d)}return i}update(t,n){if(this._properties.size===0){Object.assign(t,n);return}const r=this._createAnimations(t,n);if(r.length)return $i.add(this._chart,r),!0}}function Yse(e,t){const n=[],r=Object.keys(t);for(let i=0;i<r.length;i++){const o=e[r[i]];o&&o.active()&&n.push(o.wait())}return Promise.all(n)}function Use(e,t){if(!t)return;let n=e.options;if(!n){e.options=t;return}return n.$shared&&(e.options=n=Object.assign({},n,{$shared:!1,$animations:{}})),n}function mP(e,t){const n=e&&e.options||{},r=n.reverse,i=n.min===void 0?t:0,o=n.max===void 0?t:0;return{start:r?o:i,end:r?i:o}}function Kse(e,t,n){if(n===!1)return!1;const r=mP(e,n),i=mP(t,n);return{top:i.end,right:r.end,bottom:i.start,left:r.start}}function qse(e){let t,n,r,i;return Te(e)?(t=e.top,n=e.right,r=e.bottom,i=e.left):t=n=r=i=e,{top:t,right:n,bottom:r,left:i,disabled:e===!1}}function vR(e,t){const n=[],r=e._getSortedDatasetMetas(t);let i,o;for(i=0,o=r.length;i<o;++i)n.push(r[i].index);return n}function gP(e,t,n,r={}){const i=e.keys,o=r.mode==="single";let a,s,l,c;if(t===null)return;let u=!1;for(a=0,s=i.length;a<s;++a){if(l=+i[a],l===n){if(u=!0,r.all)continue;break}c=e.values[l],$r(c)&&(o||t===0||wi(t)===wi(c))&&(t+=c)}return!u&&!r.all?0:t}function Gse(e,t){const{iScale:n,vScale:r}=t,i=n.axis==="x"?"x":"y",o=r.axis==="x"?"x":"y",a=Object.keys(e),s=new Array(a.length);let l,c,u;for(l=0,c=a.length;l<c;++l)u=a[l],s[l]={[i]:u,[o]:e[u]};return s}function ov(e,t){const n=e&&e.options.stacked;return n||n===void 0&&t.stack!==void 0}function Xse(e,t,n){return`${e.id}.${t.id}.${n.stack||n.type}`}function Qse(e){const{min:t,max:n,minDefined:r,maxDefined:i}=e.getUserBounds();return{min:r?t:Number.NEGATIVE_INFINITY,max:i?n:Number.POSITIVE_INFINITY}}function Zse(e,t,n){const r=e[t]||(e[t]={});return r[n]||(r[n]={})}function vP(e,t,n,r){for(const i of t.getMatchingVisibleMetas(r).reverse()){const o=e[i.index];if(n&&o>0||!n&&o<0)return i.index}return null}function yP(e,t){const{chart:n,_cachedMeta:r}=e,i=n._stacks||(n._stacks={}),{iScale:o,vScale:a,index:s}=r,l=o.axis,c=a.axis,u=Xse(o,a,r),d=t.length;let f;for(let p=0;p<d;++p){const m=t[p],{[l]:h,[c]:g}=m,b=m._stacks||(m._stacks={});f=b[c]=Zse(i,u,h),f[s]=g,f._top=vP(f,a,!0,r.type),f._bottom=vP(f,a,!1,r.type);const S=f._visualValues||(f._visualValues={});S[s]=g}}function av(e,t){const n=e.scales;return Object.keys(n).filter(r=>n[r].axis===t).shift()}function Jse(e,t){return cs(e,{active:!1,dataset:void 0,datasetIndex:t,index:t,mode:"default",type:"dataset"})}function ele(e,t,n){return cs(e,{active:!1,dataIndex:t,parsed:void 0,raw:void 0,element:n,index:t,mode:"default",type:"data"})}function Gl(e,t){const n=e.controller.index,r=e.vScale&&e.vScale.axis;if(r){t=t||e._parsed;for(const i of t){const o=i._stacks;if(!o||o[r]===void 0||o[r][n]===void 0)return;delete o[r][n],o[r]._visualValues!==void 0&&o[r]._visualValues[n]!==void 0&&delete o[r]._visualValues[n]}}}const sv=e=>e==="reset"||e==="none",bP=(e,t)=>t?e:Object.assign({},e),tle=(e,t,n)=>e&&!t.hidden&&t._stacked&&{keys:vR(n,!0),values:null};class Kh{static defaults={};static datasetElementType=null;static dataElementType=null;constructor(t,n){this.chart=t,this._ctx=t.ctx,this.index=n,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=ov(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&&Gl(this._cachedMeta),this.index=t}linkScales(){const t=this.chart,n=this._cachedMeta,r=this.getDataset(),i=(d,f,p,m)=>d==="x"?f:d==="r"?m:p,o=n.xAxisID=Se(r.xAxisID,av(t,"x")),a=n.yAxisID=Se(r.yAxisID,av(t,"y")),s=n.rAxisID=Se(r.rAxisID,av(t,"r")),l=n.indexAxis,c=n.iAxisID=i(l,o,a,s),u=n.vAxisID=i(l,a,o,s);n.xScale=this.getScaleForId(o),n.yScale=this.getScaleForId(a),n.rScale=this.getScaleForId(s),n.iScale=this.getScaleForId(c),n.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 n=this._cachedMeta;return t===n.iScale?n.vScale:n.iScale}reset(){this._update("reset")}_destroy(){const t=this._cachedMeta;this._data&&eP(this._data,this),t._stacked&&Gl(t)}_dataCheck(){const t=this.getDataset(),n=t.data||(t.data=[]),r=this._data;if(Te(n)){const i=this._cachedMeta;this._data=Gse(n,i)}else if(r!==n){if(r){eP(r,this);const i=this._cachedMeta;Gl(i),i._parsed=[]}n&&Object.isExtensible(n)&&jae(n,this),this._syncList=[],this._data=n}}addElements(){const t=this._cachedMeta;this._dataCheck(),this.datasetElementType&&(t.dataset=new this.datasetElementType)}buildOrUpdateElements(t){const n=this._cachedMeta,r=this.getDataset();let i=!1;this._dataCheck();const o=n._stacked;n._stacked=ov(n.vScale,n),n.stack!==r.stack&&(i=!0,Gl(n),n.stack=r.stack),this._resyncElements(t),(i||o!==n._stacked)&&(yP(this,n._parsed),n._stacked=ov(n.vScale,n))}configure(){const t=this.chart.config,n=t.datasetScopeKeys(this._type),r=t.getOptionScopes(this.getDataset(),n,!0);this.options=t.createResolver(r,this.getContext()),this._parsing=this.options.parsing,this._cachedDataOpts={}}parse(t,n){const{_cachedMeta:r,_data:i}=this,{iScale:o,_stacked:a}=r,s=o.axis;let l=t===0&&n===i.length?!0:r._sorted,c=t>0&&r._parsed[t-1],u,d,f;if(this._parsing===!1)r._parsed=i,r._sorted=!0,f=i;else{tn(i[t])?f=this.parseArrayData(r,i,t,n):Te(i[t])?f=this.parseObjectData(r,i,t,n):f=this.parsePrimitiveData(r,i,t,n);const p=()=>d[s]===null||c&&d[s]<c[s];for(u=0;u<n;++u)r._parsed[u+t]=d=f[u],l&&(p()&&(l=!1),c=d);r._sorted=l}a&&yP(this,f)}parsePrimitiveData(t,n,r,i){const{iScale:o,vScale:a}=t,s=o.axis,l=a.axis,c=o.getLabels(),u=o===a,d=new Array(i);let f,p,m;for(f=0,p=i;f<p;++f)m=f+r,d[f]={[s]:u||o.parse(c[m],m),[l]:a.parse(n[m],m)};return d}parseArrayData(t,n,r,i){const{xScale:o,yScale:a}=t,s=new Array(i);let l,c,u,d;for(l=0,c=i;l<c;++l)u=l+r,d=n[u],s[l]={x:o.parse(d[0],u),y:a.parse(d[1],u)};return s}parseObjectData(t,n,r,i){const{xScale:o,yScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=new Array(i);let u,d,f,p;for(u=0,d=i;u<d;++u)f=u+r,p=n[f],c[u]={x:o.parse(ts(p,s),f),y:a.parse(ts(p,l),f)};return c}getParsed(t){return this._cachedMeta._parsed[t]}getDataElement(t){return this._cachedMeta.data[t]}applyStack(t,n,r){const i=this.chart,o=this._cachedMeta,a=n[t.axis],s={keys:vR(i,!0),values:n._stacks[t.axis]._visualValues};return gP(s,a,o.index,{mode:r})}updateRangeFromParsed(t,n,r,i){const o=r[n.axis];let a=o===null?NaN:o;const s=i&&r._stacks[n.axis];i&&s&&(i.values=s,a=gP(i,o,this._cachedMeta.index)),t.min=Math.min(t.min,a),t.max=Math.max(t.max,a)}getMinMax(t,n){const r=this._cachedMeta,i=r._parsed,o=r._sorted&&t===r.iScale,a=i.length,s=this._getOtherScale(t),l=tle(n,r,this.chart),c={min:Number.POSITIVE_INFINITY,max:Number.NEGATIVE_INFINITY},{min:u,max:d}=Qse(s);let f,p;function m(){p=i[f];const h=p[s.axis];return!$r(p[t.axis])||u>h||d<h}for(f=0;f<a&&!(!m()&&(this.updateRangeFromParsed(c,t,p,l),o));++f);if(o){for(f=a-1;f>=0;--f)if(!m()){this.updateRangeFromParsed(c,t,p,l);break}}return c}getAllParsedValues(t){const n=this._cachedMeta._parsed,r=[];let i,o,a;for(i=0,o=n.length;i<o;++i)a=n[i][t.axis],$r(a)&&r.push(a);return r}getMaxOverflow(){return!1}getLabelAndValue(t){const n=this._cachedMeta,r=n.iScale,i=n.vScale,o=this.getParsed(t);return{label:r?""+r.getLabelForValue(o[r.axis]):"",value:i?""+i.getLabelForValue(o[i.axis]):""}}_update(t){const n=this._cachedMeta;this.update(t||"default"),n._clip=qse(Se(this.options.clip,Kse(n.xScale,n.yScale,this.getMaxOverflow())))}update(t){}draw(){const t=this._ctx,n=this.chart,r=this._cachedMeta,i=r.data||[],o=n.chartArea,a=[],s=this._drawStart||0,l=this._drawCount||i.length-s,c=this.options.drawActiveElementsOnTop;let u;for(r.dataset&&r.dataset.draw(t,o,s,l),u=s;u<s+l;++u){const d=i[u];d.hidden||(d.active&&c?a.push(d):d.draw(t,o))}for(u=0;u<a.length;++u)a[u].draw(t,o)}getStyle(t,n){const r=n?"active":"default";return t===void 0&&this._cachedMeta.dataset?this.resolveDatasetElementOptions(r):this.resolveDataElementOptions(t||0,r)}getContext(t,n,r){const i=this.getDataset();let o;if(t>=0&&t<this._cachedMeta.data.length){const a=this._cachedMeta.data[t];o=a.$context||(a.$context=ele(this.getContext(),t,a)),o.parsed=this.getParsed(t),o.raw=i.data[t],o.index=o.dataIndex=t}else o=this.$context||(this.$context=Jse(this.chart.getContext(),this.index)),o.dataset=i,o.index=o.datasetIndex=this.index;return o.active=!!n,o.mode=r,o}resolveDatasetElementOptions(t){return this._resolveElementOptions(this.datasetElementType.id,t)}resolveDataElementOptions(t,n){return this._resolveElementOptions(this.dataElementType.id,n,t)}_resolveElementOptions(t,n="default",r){const i=n==="active",o=this._cachedDataOpts,a=t+"-"+n,s=o[a],l=this.enableOptionSharing&&Zc(r);if(s)return bP(s,l);const c=this.chart.config,u=c.datasetElementScopeKeys(this._type,t),d=i?[`${t}Hover`,"hover",t,""]:[t,""],f=c.getOptionScopes(this.getDataset(),u),p=Object.keys(Rt.elements[t]),m=()=>this.getContext(r,i,n),h=c.resolveNamedOptions(f,p,m,d);return h.$shared&&(h.$shared=l,o[a]=Object.freeze(bP(h,l))),h}_resolveAnimations(t,n,r){const i=this.chart,o=this._cachedDataOpts,a=`animation-${n}`,s=o[a];if(s)return s;let l;if(i.options.animation!==!1){const u=this.chart.config,d=u.datasetAnimationScopeKeys(this._type,n),f=u.getOptionScopes(this.getDataset(),d);l=u.createResolver(f,this.getContext(t,r,n))}const c=new gR(i,l&&l.animations);return l&&l._cacheable&&(o[a]=Object.freeze(c)),c}getSharedOptions(t){if(t.$shared)return this._sharedOptions||(this._sharedOptions=Object.assign({},t))}includeOptions(t,n){return!n||sv(t)||this.chart._animationsDisabled}_getSharedOptions(t,n){const r=this.resolveDataElementOptions(t,n),i=this._sharedOptions,o=this.getSharedOptions(r),a=this.includeOptions(n,o)||o!==i;return this.updateSharedOptions(o,n,r),{sharedOptions:o,includeOptions:a}}updateElement(t,n,r,i){sv(i)?Object.assign(t,r):this._resolveAnimations(n,i).update(t,r)}updateSharedOptions(t,n,r){t&&!sv(n)&&this._resolveAnimations(void 0,n).update(t,r)}_setStyle(t,n,r,i){t.active=i;const o=this.getStyle(n,i);this._resolveAnimations(n,r,i).update(t,{options:!i&&this.getSharedOptions(o)||o})}removeHoverStyle(t,n,r){this._setStyle(t,r,"active",!1)}setHoverStyle(t,n,r){this._setStyle(t,r,"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 n=this._data,r=this._cachedMeta.data;for(const[s,l,c]of this._syncList)this[s](l,c);this._syncList=[];const i=r.length,o=n.length,a=Math.min(o,i);a&&this.parse(0,a),o>i?this._insertElements(i,o-i,t):o<i&&this._removeElements(o,i-o)}_insertElements(t,n,r=!0){const i=this._cachedMeta,o=i.data,a=t+n;let s;const l=c=>{for(c.length+=n,s=c.length-1;s>=a;s--)c[s]=c[s-n]};for(l(o),s=t;s<a;++s)o[s]=new this.dataElementType;this._parsing&&l(i._parsed),this.parse(t,n),r&&this.updateElements(o,t,n,"reset")}updateElements(t,n,r,i){}_removeElements(t,n){const r=this._cachedMeta;if(this._parsing){const i=r._parsed.splice(t,n);r._stacked&&Gl(r,i)}r.data.splice(t,n)}_sync(t){if(this._parsing)this._syncList.push(t);else{const[n,r,i]=t;this[n](r,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,n){n&&this._sync(["_removeElements",t,n]);const r=arguments.length-2;r&&this._sync(["_insertElements",t,r])}_onDataUnshift(){this._sync(["_insertElements",0,arguments.length])}}function nle(e,t){if(!e._cache.$bar){const n=e.getMatchingVisibleMetas(t);let r=[];for(let i=0,o=n.length;i<o;i++)r=r.concat(n[i].controller.getAllParsedValues(e));e._cache.$bar=tR(r.sort((i,o)=>i-o))}return e._cache.$bar}function rle(e){const t=e.iScale,n=nle(t,e.type);let r=t._length,i,o,a,s;const l=()=>{a===32767||a===-32768||(Zc(s)&&(r=Math.min(r,Math.abs(a-s)||r)),s=a)};for(i=0,o=n.length;i<o;++i)a=t.getPixelForValue(n[i]),l();for(s=void 0,i=0,o=t.ticks.length;i<o;++i)a=t.getPixelForTick(i),l();return r}function ile(e,t,n,r){const i=n.barThickness;let o,a;return He(i)?(o=t.min*n.categoryPercentage,a=n.barPercentage):(o=i*r,a=1),{chunk:o/r,ratio:a,start:t.pixels[e]-o/2}}function ole(e,t,n,r){const i=t.pixels,o=i[e];let a=e>0?i[e-1]:null,s=e<i.length-1?i[e+1]:null;const l=n.categoryPercentage;a===null&&(a=o-(s===null?t.end-t.start:s-o)),s===null&&(s=o+o-a);const c=o-(o-Math.min(a,s))/2*l;return{chunk:Math.abs(s-a)/2*l/r,ratio:n.barPercentage,start:c}}function ale(e,t,n,r){const i=n.parse(e[0],r),o=n.parse(e[1],r),a=Math.min(i,o),s=Math.max(i,o);let l=a,c=s;Math.abs(a)>Math.abs(s)&&(l=s,c=a),t[n.axis]=c,t._custom={barStart:l,barEnd:c,start:i,end:o,min:a,max:s}}function yR(e,t,n,r){return tn(e)?ale(e,t,n,r):t[n.axis]=n.parse(e,r),t}function xP(e,t,n,r){const i=e.iScale,o=e.vScale,a=i.getLabels(),s=i===o,l=[];let c,u,d,f;for(c=n,u=n+r;c<u;++c)f=t[c],d={},d[i.axis]=s||i.parse(a[c],c),l.push(yR(f,d,o,c));return l}function lv(e){return e&&e.barStart!==void 0&&e.barEnd!==void 0}function sle(e,t,n){return e!==0?wi(e):(t.isHorizontal()?1:-1)*(t.min>=n?1:-1)}function lle(e){let t,n,r,i,o;return e.horizontal?(t=e.base>e.x,n="left",r="right"):(t=e.base<e.y,n="bottom",r="top"),t?(i="end",o="start"):(i="start",o="end"),{start:n,end:r,reverse:t,top:i,bottom:o}}function cle(e,t,n,r){let i=t.borderSkipped;const o={};if(!i){e.borderSkipped=o;return}if(i===!0){e.borderSkipped={top:!0,right:!0,bottom:!0,left:!0};return}const{start:a,end:s,reverse:l,top:c,bottom:u}=lle(e);i==="middle"&&n&&(e.enableBorderRadius=!0,(n._top||0)===r?i=c:(n._bottom||0)===r?i=u:(o[wP(u,a,s,l)]=!0,i=c)),o[wP(i,a,s,l)]=!0,e.borderSkipped=o}function wP(e,t,n,r){return r?(e=ule(e,t,n),e=_P(e,n,t)):e=_P(e,t,n),e}function ule(e,t,n){return e===t?n:e===n?t:e}function _P(e,t,n){return e==="start"?t:e==="end"?n:e}function dle(e,{inflateAmount:t},n){e.inflateAmount=t==="auto"?n===1?.33:0:t}class fle extends Kh{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,n,r,i){return xP(t,n,r,i)}parseArrayData(t,n,r,i){return xP(t,n,r,i)}parseObjectData(t,n,r,i){const{iScale:o,vScale:a}=t,{xAxisKey:s="x",yAxisKey:l="y"}=this._parsing,c=o.axis==="x"?s:l,u=a.axis==="x"?s:l,d=[];let f,p,m,h;for(f=r,p=r+i;f<p;++f)h=n[f],m={},m[o.axis]=o.parse(ts(h,c),f),d.push(yR(ts(h,u),m,a,f));return d}updateRangeFromParsed(t,n,r,i){super.updateRangeFromParsed(t,n,r,i);const o=r._custom;o&&n===this._cachedMeta.vScale&&(t.min=Math.min(t.min,o.min),t.max=Math.max(t.max,o.max))}getMaxOverflow(){return 0}getLabelAndValue(t){const n=this._cachedMeta,{iScale:r,vScale:i}=n,o=this.getParsed(t),a=o._custom,s=lv(a)?"["+a.start+", "+a.end+"]":""+i.getLabelForValue(o[i.axis]);return{label:""+r.getLabelForValue(o[r.axis]),value:s}}initialize(){this.enableOptionSharing=!0,super.initialize();const t=this._cachedMeta;t.stack=this.getDataset().stack}update(t){const n=this._cachedMeta;this.updateElements(n.data,0,n.data.length,t)}updateElements(t,n,r,i){const o=i==="reset",{index:a,_cachedMeta:{vScale:s}}=this,l=s.getBasePixel(),c=s.isHorizontal(),u=this._getRuler(),{sharedOptions:d,includeOptions:f}=this._getSharedOptions(n,i);for(let p=n;p<n+r;p++){const m=this.getParsed(p),h=o||He(m[s.axis])?{base:l,head:l}:this._calculateBarValuePixels(p),g=this._calculateBarIndexPixels(p,u),b=(m._stacks||{})[s.axis],S={horizontal:c,base:h.base,enableBorderRadius:!b||lv(m._custom)||a===b._top||a===b._bottom,x:c?h.head:g.center,y:c?g.center:h.head,height:c?g.size:Math.abs(h.size),width:c?Math.abs(h.size):g.size};f&&(S.options=d||this.resolveDataElementOptions(p,t[p].active?"active":i));const w=S.options||t[p].options;cle(S,w,b,a),dle(S,w,u.ratio),this.updateElement(t[p],p,S,i)}}_getStacks(t,n){const{iScale:r}=this._cachedMeta,i=r.getMatchingVisibleMetas(this._type).filter(u=>u.controller.options.grouped),o=r.options.stacked,a=[],s=this._cachedMeta.controller.getParsed(n),l=s&&s[r.axis],c=u=>{const d=u._parsed.find(p=>p[r.axis]===l),f=d&&d[u.vScale.axis];if(He(f)||isNaN(f))return!0};for(const u of i)if(!(n!==void 0&&c(u))&&((o===!1||a.indexOf(u.stack)===-1||o===void 0&&u.stack===void 0)&&a.push(u.stack),u.index===t))break;return a.length||a.push(void 0),a}_getStackCount(t){return this._getStacks(void 0,t).length}_getAxisCount(){return this._getAxis().length}getFirstScaleIdForIndexAxis(){const t=this.chart.scales,n=this.chart.options.indexAxis;return Object.keys(t).filter(r=>t[r].axis===n).shift()}_getAxis(){const t={},n=this.getFirstScaleIdForIndexAxis();for(const r of this.chart.data.datasets)t[Se(this.chart.options.indexAxis==="x"?r.xAxisID:r.yAxisID,n)]=!0;return Object.keys(t)}_getStackIndex(t,n,r){const i=this._getStacks(t,r),o=n!==void 0?i.indexOf(n):-1;return o===-1?i.length-1:o}_getRuler(){const t=this.options,n=this._cachedMeta,r=n.iScale,i=[];let o,a;for(o=0,a=n.data.length;o<a;++o)i.push(r.getPixelForValue(this.getParsed(o)[r.axis],o));const s=t.barThickness;return{min:s||rle(n),pixels:i,start:r._startPixel,end:r._endPixel,stackCount:this._getStackCount(),scale:r,grouped:t.grouped,ratio:s?1:t.categoryPercentage*t.barPercentage}}_calculateBarValuePixels(t){const{_cachedMeta:{vScale:n,_stacked:r,index:i},options:{base:o,minBarLength:a}}=this,s=o||0,l=this.getParsed(t),c=l._custom,u=lv(c);let d=l[n.axis],f=0,p=r?this.applyStack(n,l,r):d,m,h;p!==d&&(f=p-d,p=d),u&&(d=c.barStart,p=c.barEnd-c.barStart,d!==0&&wi(d)!==wi(c.barEnd)&&(f=0),f+=d);const g=!He(o)&&!u?o:f;let b=n.getPixelForValue(g);if(this.chart.getDataVisibility(t)?m=n.getPixelForValue(f+p):m=b,h=m-b,Math.abs(h)<a){h=sle(h,n,s)*a,d===s&&(b-=h/2);const S=n.getPixelForDecimal(0),w=n.getPixelForDecimal(1),x=Math.min(S,w),_=Math.max(S,w);b=Math.max(Math.min(b,_),x),m=b+h,r&&!u&&(l._stacks[n.axis]._visualValues[i]=n.getValueForPixel(m)-n.getValueForPixel(b))}if(b===n.getPixelForValue(s)){const S=wi(h)*n.getLineWidthForValue(s)/2;b+=S,h-=S}return{size:h,base:b,head:m,center:m+h/2}}_calculateBarIndexPixels(t,n){const r=n.scale,i=this.options,o=i.skipNull,a=Se(i.maxBarThickness,1/0);let s,l;const c=this._getAxisCount();if(n.grouped){const u=o?this._getStackCount(t):n.stackCount,d=i.barThickness==="flex"?ole(t,n,i,u*c):ile(t,n,i,u*c),f=this.chart.options.indexAxis==="x"?this.getDataset().xAxisID:this.getDataset().yAxisID,p=this._getAxis().indexOf(Se(f,this.getFirstScaleIdForIndexAxis())),m=this._getStackIndex(this.index,this._cachedMeta.stack,o?t:void 0)+p;s=d.start+d.chunk*m+d.chunk/2,l=Math.min(a,d.chunk*d.ratio)}else s=r.getPixelForValue(this.getParsed(t)[r.axis],t),l=Math.min(a,n.min*n.ratio);return{base:s-l/2,head:s+l/2,center:s,size:l}}draw(){const t=this._cachedMeta,n=t.vScale,r=t.data,i=r.length;let o=0;for(;o<i;++o)this.getParsed(o)[n.axis]!==null&&!r[o].hidden&&r[o].draw(this._ctx)}}function ple(e,t,n){let r=1,i=1,o=0,a=0;if(t<Ct){const s=e,l=s+t,c=Math.cos(s),u=Math.sin(s),d=Math.cos(l),f=Math.sin(l),p=(w,x,_)=>eu(w,s,l,!0)?1:Math.max(x,x*n,_,_*n),m=(w,x,_)=>eu(w,s,l,!0)?-1:Math.min(x,x*n,_,_*n),h=p(0,c,d),g=p(Kt,u,f),b=m(ot,c,d),S=m(ot+Kt,u,f);r=(h-b)/2,i=(g-S)/2,o=-(h+b)/2,a=-(g+S)/2}return{ratioX:r,ratioY:i,offsetX:o,offsetY:a}}class hle extends Kh{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 n=t.data;if(n.labels.length&&n.datasets.length){const{labels:{pointStyle:r,color:i}}=t.legend.options;return n.labels.map((o,a)=>{const l=t.getDatasetMeta(0).controller.getStyle(a);return{text:o,fillStyle:l.backgroundColor,strokeStyle:l.borderColor,fontColor:i,lineWidth:l.borderWidth,pointStyle:r,hidden:!t.getDataVisibility(a),index:a}})}return[]}},onClick(t,n,r){r.chart.toggleDataVisibility(n.index),r.chart.update()}}}};constructor(t,n){super(t,n),this.enableOptionSharing=!0,this.innerRadius=void 0,this.outerRadius=void 0,this.offsetX=void 0,this.offsetY=void 0}linkScales(){}parse(t,n){const r=this.getDataset().data,i=this._cachedMeta;if(this._parsing===!1)i._parsed=r;else{let o=l=>+r[l];if(Te(r[t])){const{key:l="value"}=this._parsing;o=c=>+ts(r[c],l)}let a,s;for(a=t,s=t+n;a<s;++a)i._parsed[a]=o(a)}}_getRotation(){return Qi(this.options.rotation-90)}_getCircumference(){return Qi(this.options.circumference)}_getRotationExtents(){let t=Ct,n=-Ct;for(let r=0;r<this.chart.data.datasets.length;++r)if(this.chart.isDatasetVisible(r)&&this.chart.getDatasetMeta(r).type===this._type){const i=this.chart.getDatasetMeta(r).controller,o=i._getRotation(),a=i._getCircumference();t=Math.min(t,o),n=Math.max(n,o+a)}return{rotation:t,circumference:n-t}}update(t){const n=this.chart,{chartArea:r}=n,i=this._cachedMeta,o=i.data,a=this.getMaxBorderWidth()+this.getMaxOffset(o)+this.options.spacing,s=Math.max((Math.min(r.width,r.height)-a)/2,0),l=Math.min(vae(this.options.cutout,s),1),c=this._getRingWeight(this.index),{circumference:u,rotation:d}=this._getRotationExtents(),{ratioX:f,ratioY:p,offsetX:m,offsetY:h}=ple(d,u,l),g=(r.width-a)/f,b=(r.height-a)/p,S=Math.max(Math.min(g,b)/2,0),w=Xj(this.options.radius,S),x=Math.max(w*l,0),_=(w-x)/this._getVisibleDatasetWeightTotal();this.offsetX=m*w,this.offsetY=h*w,i.total=this.calculateTotal(),this.outerRadius=w-_*this._getRingWeightOffset(this.index),this.innerRadius=Math.max(this.outerRadius-_*c,0),this.updateElements(o,0,o.length,t)}_circumference(t,n){const r=this.options,i=this._cachedMeta,o=this._getCircumference();return n&&r.animation.animateRotate||!this.chart.getDataVisibility(t)||i._parsed[t]===null||i.data[t].hidden?0:this.calculateCircumference(i._parsed[t]*o/Ct)}updateElements(t,n,r,i){const o=i==="reset",a=this.chart,s=a.chartArea,c=a.options.animation,u=(s.left+s.right)/2,d=(s.top+s.bottom)/2,f=o&&c.animateScale,p=f?0:this.innerRadius,m=f?0:this.outerRadius,{sharedOptions:h,includeOptions:g}=this._getSharedOptions(n,i);let b=this._getRotation(),S;for(S=0;S<n;++S)b+=this._circumference(S,o);for(S=n;S<n+r;++S){const w=this._circumference(S,o),x=t[S],_={x:u+this.offsetX,y:d+this.offsetY,startAngle:b,endAngle:b+w,circumference:w,outerRadius:m,innerRadius:p};g&&(_.options=h||this.resolveDataElementOptions(S,x.active?"active":i)),b+=w,this.updateElement(x,S,_,i)}}calculateTotal(){const t=this._cachedMeta,n=t.data;let r=0,i;for(i=0;i<n.length;i++){const o=t._parsed[i];o!==null&&!isNaN(o)&&this.chart.getDataVisibility(i)&&!n[i].hidden&&(r+=Math.abs(o))}return r}calculateCircumference(t){const n=this._cachedMeta.total;return n>0&&!isNaN(t)?Ct*(Math.abs(t)/n):0}getLabelAndValue(t){const n=this._cachedMeta,r=this.chart,i=r.data.labels||[],o=Ux(n._parsed[t],r.options.locale);return{label:i[t]||"",value:o}}getMaxBorderWidth(t){let n=0;const r=this.chart;let i,o,a,s,l;if(!t){for(i=0,o=r.data.datasets.length;i<o;++i)if(r.isDatasetVisible(i)){a=r.getDatasetMeta(i),t=a.data,s=a.controller;break}}if(!t)return 0;for(i=0,o=t.length;i<o;++i)l=s.resolveDataElementOptions(i),l.borderAlign!=="inner"&&(n=Math.max(n,l.borderWidth||0,l.hoverBorderWidth||0));return n}getMaxOffset(t){let n=0;for(let r=0,i=t.length;r<i;++r){const o=this.resolveDataElementOptions(r);n=Math.max(n,o.offset||0,o.hoverOffset||0)}return n}_getRingWeightOffset(t){let n=0;for(let r=0;r<t;++r)this.chart.isDatasetVisible(r)&&(n+=this._getRingWeight(r));return n}_getRingWeight(t){return Math.max(Se(this.chart.data.datasets[t].weight,1),0)}_getVisibleDatasetWeightTotal(){return this._getRingWeightOffset(this.chart.data.datasets.length)||1}}class mle extends Kh{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 n=this._cachedMeta,{dataset:r,data:i=[],_dataset:o}=n,a=this.chart._animationsDisabled;let{start:s,count:l}=Lae(n,i,a);this._drawStart=s,this._drawCount=l,Fae(n)&&(s=0,l=i.length),r._chart=this.chart,r._datasetIndex=this.index,r._decimated=!!o._decimated,r.points=i;const c=this.resolveDatasetElementOptions(t);this.options.showLine||(c.borderWidth=0),c.segment=this.options.segment,this.updateElement(r,void 0,{animated:!a,options:c},t),this.updateElements(i,s,l,t)}updateElements(t,n,r,i){const o=i==="reset",{iScale:a,vScale:s,_stacked:l,_dataset:c}=this._cachedMeta,{sharedOptions:u,includeOptions:d}=this._getSharedOptions(n,i),f=a.axis,p=s.axis,{spanGaps:m,segment:h}=this.options,g=Jc(m)?m:Number.POSITIVE_INFINITY,b=this.chart._animationsDisabled||o||i==="none",S=n+r,w=t.length;let x=n>0&&this.getParsed(n-1);for(let _=0;_<w;++_){const E=t[_],C=b?E:{};if(_<n||_>=S){C.skip=!0;continue}const D=this.getParsed(_),T=He(D[p]),j=C[f]=a.getPixelForValue(D[f],_),A=C[p]=o||T?s.getBasePixel():s.getPixelForValue(l?this.applyStack(s,D,l):D[p],_);C.skip=isNaN(j)||isNaN(A)||T,C.stop=_>0&&Math.abs(D[f]-x[f])>g,h&&(C.parsed=D,C.raw=c.data[_]),d&&(C.options=u||this.resolveDataElementOptions(_,E.active?"active":i)),b||this.updateElement(E,_,C,i),x=D}}getMaxOverflow(){const t=this._cachedMeta,n=t.dataset,r=n.options&&n.options.borderWidth||0,i=t.data||[];if(!i.length)return r;const o=i[0].size(this.resolveDataElementOptions(0)),a=i[i.length-1].size(this.resolveDataElementOptions(i.length-1));return Math.max(r,o,a)/2}draw(){const t=this._cachedMeta;t.dataset.updateControlPoints(this.chart.chartArea,t.iScale.axis),super.draw()}}function ga(){throw new Error("This method is not implemented: Check that a complete date adapter is provided.")}class t1{static override(t){Object.assign(t1.prototype,t)}options;constructor(t){this.options=t||{}}init(){}formats(){return ga()}parse(){return ga()}format(){return ga()}add(){return ga()}diff(){return ga()}startOf(){return ga()}endOf(){return ga()}}var gle={_date:t1};function vle(e,t,n,r){const{controller:i,data:o,_sorted:a}=e,s=i._cachedMeta.iScale,l=e.dataset&&e.dataset.options?e.dataset.options.spanGaps:null;if(s&&t===s.axis&&t!=="r"&&a&&o.length){const c=s._reversePixels?Mae:Ra;if(r){if(i._sharedOptions){const u=o[0],d=typeof u.getRange=="function"&&u.getRange(t);if(d){const f=c(o,t,n-d),p=c(o,t,n+d);return{lo:f.lo,hi:p.hi}}}}else{const u=c(o,t,n);if(l){const{vScale:d}=i._cachedMeta,{_parsed:f}=e,p=f.slice(0,u.lo+1).reverse().findIndex(h=>!He(h[d.axis]));u.lo-=Math.max(0,p);const m=f.slice(u.hi).findIndex(h=>!He(h[d.axis]));u.hi+=Math.max(0,m)}return u}}return{lo:0,hi:o.length-1}}function qh(e,t,n,r,i){const o=e.getSortedVisibleDatasetMetas(),a=n[t];for(let s=0,l=o.length;s<l;++s){const{index:c,data:u}=o[s],{lo:d,hi:f}=vle(o[s],t,a,i);for(let p=d;p<=f;++p){const m=u[p];m.skip||r(m,c,p)}}}function yle(e){const t=e.indexOf("x")!==-1,n=e.indexOf("y")!==-1;return function(r,i){const o=t?Math.abs(r.x-i.x):0,a=n?Math.abs(r.y-i.y):0;return Math.sqrt(Math.pow(o,2)+Math.pow(a,2))}}function cv(e,t,n,r,i){const o=[];return!i&&!e.isPointInArea(t)||qh(e,n,t,function(s,l,c){!i&&!tu(s,e.chartArea,0)||s.inRange(t.x,t.y,r)&&o.push({element:s,datasetIndex:l,index:c})},!0),o}function ble(e,t,n,r){let i=[];function o(a,s,l){const{startAngle:c,endAngle:u}=a.getProps(["startAngle","endAngle"],r),{angle:d}=Jj(a,{x:t.x,y:t.y});eu(d,c,u)&&i.push({element:a,datasetIndex:s,index:l})}return qh(e,n,t,o),i}function xle(e,t,n,r,i,o){let a=[];const s=yle(n);let l=Number.POSITIVE_INFINITY;function c(u,d,f){const p=u.inRange(t.x,t.y,i);if(r&&!p)return;const m=u.getCenterPoint(i);if(!(!!o||e.isPointInArea(m))&&!p)return;const g=s(t,m);g<l?(a=[{element:u,datasetIndex:d,index:f}],l=g):g===l&&a.push({element:u,datasetIndex:d,index:f})}return qh(e,n,t,c),a}function uv(e,t,n,r,i,o){return!o&&!e.isPointInArea(t)?[]:n==="r"&&!r?ble(e,t,n,i):xle(e,t,n,r,i,o)}function SP(e,t,n,r,i){const o=[],a=n==="x"?"inXRange":"inYRange";let s=!1;return qh(e,n,t,(l,c,u)=>{l[a]&&l[a](t[n],i)&&(o.push({element:l,datasetIndex:c,index:u}),s=s||l.inRange(t.x,t.y,i))}),r&&!s?[]:o}var wle={modes:{index(e,t,n,r){const i=Ea(t,e),o=n.axis||"x",a=n.includeInvisible||!1,s=n.intersect?cv(e,i,o,r,a):uv(e,i,o,!1,r,a),l=[];return s.length?(e.getSortedVisibleDatasetMetas().forEach(c=>{const u=s[0].index,d=c.data[u];d&&!d.skip&&l.push({element:d,datasetIndex:c.index,index:u})}),l):[]},dataset(e,t,n,r){const i=Ea(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;let s=n.intersect?cv(e,i,o,r,a):uv(e,i,o,!1,r,a);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,n,r){const i=Ea(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return cv(e,i,o,r,a)},nearest(e,t,n,r){const i=Ea(t,e),o=n.axis||"xy",a=n.includeInvisible||!1;return uv(e,i,o,n.intersect,r,a)},x(e,t,n,r){const i=Ea(t,e);return SP(e,i,"x",n.intersect,r)},y(e,t,n,r){const i=Ea(t,e);return SP(e,i,"y",n.intersect,r)}}};const bR=["left","top","right","bottom"];function Xl(e,t){return e.filter(n=>n.pos===t)}function OP(e,t){return e.filter(n=>bR.indexOf(n.pos)===-1&&n.box.axis===t)}function Ql(e,t){return e.sort((n,r)=>{const i=t?r:n,o=t?n:r;return i.weight===o.weight?i.index-o.index:i.weight-o.weight})}function _le(e){const t=[];let n,r,i,o,a,s;for(n=0,r=(e||[]).length;n<r;++n)i=e[n],{position:o,options:{stack:a,stackWeight:s=1}}=i,t.push({index:n,box:i,pos:o,horizontal:i.isHorizontal(),weight:i.weight,stack:a&&o+a,stackWeight:s});return t}function Sle(e){const t={};for(const n of e){const{stack:r,pos:i,stackWeight:o}=n;if(!r||!bR.includes(i))continue;const a=t[r]||(t[r]={count:0,placed:0,weight:0,size:0});a.count++,a.weight+=o}return t}function Ole(e,t){const n=Sle(e),{vBoxMaxWidth:r,hBoxMaxHeight:i}=t;let o,a,s;for(o=0,a=e.length;o<a;++o){s=e[o];const{fullSize:l}=s.box,c=n[s.stack],u=c&&s.stackWeight/c.weight;s.horizontal?(s.width=u?u*r:l&&t.availableWidth,s.height=i):(s.width=r,s.height=u?u*i:l&&t.availableHeight)}return n}function Ele(e){const t=_le(e),n=Ql(t.filter(c=>c.box.fullSize),!0),r=Ql(Xl(t,"left"),!0),i=Ql(Xl(t,"right")),o=Ql(Xl(t,"top"),!0),a=Ql(Xl(t,"bottom")),s=OP(t,"x"),l=OP(t,"y");return{fullSize:n,leftAndTop:r.concat(o),rightAndBottom:i.concat(l).concat(a).concat(s),chartArea:Xl(t,"chartArea"),vertical:r.concat(i).concat(l),horizontal:o.concat(a).concat(s)}}function EP(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function xR(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 Ple(e,t,n,r){const{pos:i,box:o}=n,a=e.maxPadding;if(!Te(i)){n.size&&(e[i]-=n.size);const d=r[n.stack]||{size:0,count:1};d.size=Math.max(d.size,n.horizontal?o.height:o.width),n.size=d.size/d.count,e[i]+=n.size}o.getPadding&&xR(a,o.getPadding());const s=Math.max(0,t.outerWidth-EP(a,e,"left","right")),l=Math.max(0,t.outerHeight-EP(a,e,"top","bottom")),c=s!==e.w,u=l!==e.h;return e.w=s,e.h=l,n.horizontal?{same:c,other:u}:{same:u,other:c}}function kle(e){const t=e.maxPadding;function n(r){const i=Math.max(t[r]-e[r],0);return e[r]+=i,i}e.y+=n("top"),e.x+=n("left"),n("right"),n("bottom")}function Cle(e,t){const n=t.maxPadding;function r(i){const o={left:0,top:0,right:0,bottom:0};return i.forEach(a=>{o[a]=Math.max(t[a],n[a])}),o}return r(e?["left","right"]:["top","bottom"])}function dc(e,t,n,r){const i=[];let o,a,s,l,c,u;for(o=0,a=e.length,c=0;o<a;++o){s=e[o],l=s.box,l.update(s.width||t.w,s.height||t.h,Cle(s.horizontal,t));const{same:d,other:f}=Ple(t,n,s,r);c|=d&&i.length,u=u||f,l.fullSize||i.push(s)}return c&&dc(i,t,n,r)||u}function Rd(e,t,n,r,i){e.top=n,e.left=t,e.right=t+r,e.bottom=n+i,e.width=r,e.height=i}function PP(e,t,n,r){const i=n.padding;let{x:o,y:a}=t;for(const s of e){const l=s.box,c=r[s.stack]||{placed:0,weight:1},u=s.stackWeight/c.weight||1;if(s.horizontal){const d=t.w*u,f=c.size||l.height;Zc(c.start)&&(a=c.start),l.fullSize?Rd(l,i.left,a,n.outerWidth-i.right-i.left,f):Rd(l,t.left+c.placed,a,d,f),c.start=a,c.placed+=d,a=l.bottom}else{const d=t.h*u,f=c.size||l.width;Zc(c.start)&&(o=c.start),l.fullSize?Rd(l,o,i.top,f,n.outerHeight-i.bottom-i.top):Rd(l,o,t.top+c.placed,f,d),c.start=o,c.placed+=d,o=l.right}}t.x=o,t.y=a}var Io={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(n){t.draw(n)}}]},e.boxes.push(t)},removeBox(e,t){const n=e.boxes?e.boxes.indexOf(t):-1;n!==-1&&e.boxes.splice(n,1)},configure(e,t,n){t.fullSize=n.fullSize,t.position=n.position,t.weight=n.weight},update(e,t,n,r){if(!e)return;const i=Qr(e.options.layout.padding),o=Math.max(t-i.width,0),a=Math.max(n-i.height,0),s=Ele(e.boxes),l=s.vertical,c=s.horizontal;Ge(e.boxes,h=>{typeof h.beforeLayout=="function"&&h.beforeLayout()});const u=l.reduce((h,g)=>g.box.options&&g.box.options.display===!1?h:h+1,0)||1,d=Object.freeze({outerWidth:t,outerHeight:n,padding:i,availableWidth:o,availableHeight:a,vBoxMaxWidth:o/2/u,hBoxMaxHeight:a/2}),f=Object.assign({},i);xR(f,Qr(r));const p=Object.assign({maxPadding:f,w:o,h:a,x:i.left,y:i.top},i),m=Ole(l.concat(c),d);dc(s.fullSize,p,d,m),dc(l,p,d,m),dc(c,p,d,m)&&dc(l,p,d,m),kle(p),PP(s.leftAndTop,p,d,m),p.x+=p.w,p.y+=p.h,PP(s.rightAndBottom,p,d,m),e.chartArea={left:p.left,top:p.top,right:p.left+p.w,bottom:p.top+p.h,height:p.h,width:p.w},Ge(s.chartArea,h=>{const g=h.box;Object.assign(g,e.chartArea),g.update(p.w,p.h,{left:0,top:0,right:0,bottom:0})})}};class wR{acquireContext(t,n){}releaseContext(t){return!1}addEventListener(t,n,r){}removeEventListener(t,n,r){}getDevicePixelRatio(){return 1}getMaximumSize(t,n,r,i){return n=Math.max(0,n||t.width),r=r||t.height,{width:n,height:Math.max(0,i?Math.floor(n/i):r)}}isAttached(t){return!0}updateConfig(t){}}class Dle extends wR{acquireContext(t){return t&&t.getContext&&t.getContext("2d")||null}updateConfig(t){t.options.animation=!1}}const nf="$chartjs",Ale={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"},kP=e=>e===null||e==="";function Tle(e,t){const n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[nf]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",n.boxSizing=n.boxSizing||"border-box",kP(i)){const o=uP(e,"width");o!==void 0&&(e.width=o)}if(kP(r))if(e.style.height==="")e.height=e.width/(t||2);else{const o=uP(e,"height");o!==void 0&&(e.height=o)}return e}const _R=kse?{passive:!0}:!1;function Mle(e,t,n){e&&e.addEventListener(t,n,_R)}function Nle(e,t,n){e&&e.canvas&&e.canvas.removeEventListener(t,n,_R)}function jle(e,t){const n=Ale[e.type]||e.type,{x:r,y:i}=Ea(e,t);return{type:n,chart:t,native:e,x:r!==void 0?r:null,y:i!==void 0?i:null}}function wp(e,t){for(const n of e)if(n===t||n.contains(t))return!0}function Rle(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||wp(s.addedNodes,r),a=a&&!wp(s.removedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}function Ile(e,t,n){const r=e.canvas,i=new MutationObserver(o=>{let a=!1;for(const s of o)a=a||wp(s.removedNodes,r),a=a&&!wp(s.addedNodes,r);a&&n()});return i.observe(document,{childList:!0,subtree:!0}),i}const nu=new Map;let CP=0;function SR(){const e=window.devicePixelRatio;e!==CP&&(CP=e,nu.forEach((t,n)=>{n.currentDevicePixelRatio!==e&&t()}))}function Lle(e,t){nu.size||window.addEventListener("resize",SR),nu.set(e,t)}function Fle(e){nu.delete(e),nu.size||window.removeEventListener("resize",SR)}function $le(e,t,n){const r=e.canvas,i=r&&e1(r);if(!i)return;const o=rR((s,l)=>{const c=i.clientWidth;n(s,l),c<i.clientWidth&&n()},window),a=new ResizeObserver(s=>{const l=s[0],c=l.contentRect.width,u=l.contentRect.height;c===0&&u===0||o(c,u)});return a.observe(i),Lle(e,o),a}function dv(e,t,n){n&&n.disconnect(),t==="resize"&&Fle(e)}function Ble(e,t,n){const r=e.canvas,i=rR(o=>{e.ctx!==null&&n(jle(o,e))},e);return Mle(r,t,i),i}class Wle extends wR{acquireContext(t,n){const r=t&&t.getContext&&t.getContext("2d");return r&&r.canvas===t?(Tle(t,n),r):null}releaseContext(t){const n=t.canvas;if(!n[nf])return!1;const r=n[nf].initial;["height","width"].forEach(o=>{const a=r[o];He(a)?n.removeAttribute(o):n.setAttribute(o,a)});const i=r.style||{};return Object.keys(i).forEach(o=>{n.style[o]=i[o]}),n.width=n.width,delete n[nf],!0}addEventListener(t,n,r){this.removeEventListener(t,n);const i=t.$proxies||(t.$proxies={}),a={attach:Rle,detach:Ile,resize:$le}[n]||Ble;i[n]=a(t,n,r)}removeEventListener(t,n){const r=t.$proxies||(t.$proxies={}),i=r[n];if(!i)return;({attach:dv,detach:dv,resize:dv}[n]||Nle)(t,n,i),r[n]=void 0}getDevicePixelRatio(){return window.devicePixelRatio}getMaximumSize(t,n,r,i){return Pse(t,n,r,i)}isAttached(t){const n=t&&e1(t);return!!(n&&n.isConnected)}}function zle(e){return!Jx()||typeof OffscreenCanvas<"u"&&e instanceof OffscreenCanvas?Dle:Wle}let aa=class{static defaults={};static defaultRoutes=void 0;x;y;active=!1;options;$animations;tooltipPosition(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}hasValue(){return Jc(this.x)&&Jc(this.y)}getProps(t,n){const r=this.$animations;if(!n||!r)return this;const i={};return t.forEach(o=>{i[o]=r[o]&&r[o].active()?r[o]._to:this[o]}),i}};function Vle(e,t){const n=e.options.ticks,r=Hle(e),i=Math.min(n.maxTicksLimit||r,r),o=n.major.enabled?Ule(t):[],a=o.length,s=o[0],l=o[a-1],c=[];if(a>i)return Kle(t,c,o,a/i),c;const u=Yle(o,t,i);if(a>0){let d,f;const p=a>1?Math.round((l-s)/(a-1)):null;for(Id(t,c,u,He(p)?0:s-p,s),d=0,f=a-1;d<f;d++)Id(t,c,u,o[d],o[d+1]);return Id(t,c,u,l,He(p)?t.length:l+p),c}return Id(t,c,u),c}function Hle(e){const t=e.options.offset,n=e._tickSize(),r=e._length/n+(t?0:1),i=e._maxLength/n;return Math.floor(Math.min(r,i))}function Yle(e,t,n){const r=qle(e),i=t.length/n;if(!r)return Math.max(i,1);const o=Eae(r);for(let a=0,s=o.length-1;a<s;a++){const l=o[a];if(l>i)return l}return Math.max(i,1)}function Ule(e){const t=[];let n,r;for(n=0,r=e.length;n<r;n++)e[n].major&&t.push(n);return t}function Kle(e,t,n,r){let i=0,o=n[0],a;for(r=Math.ceil(r),a=0;a<e.length;a++)a===o&&(t.push(e[a]),i++,o=n[i*r])}function Id(e,t,n,r,i){const o=Se(r,0),a=Math.min(Se(i,e.length),e.length);let s=0,l,c,u;for(n=Math.ceil(n),i&&(l=i-r,n=l/Math.floor(l/n)),u=o;u<0;)s++,u=Math.round(o+s*n);for(c=Math.max(o,0);c<a;c++)c===u&&(t.push(e[c]),s++,u=Math.round(o+s*n))}function qle(e){const t=e.length;let n,r;if(t<2)return!1;for(r=e[0],n=1;n<t;++n)if(e[n]-e[n-1]!==r)return!1;return r}const Gle=e=>e==="left"?"right":e==="right"?"left":e,DP=(e,t,n)=>t==="top"||t==="left"?e[t]+n:e[t]-n,AP=(e,t)=>Math.min(t||e,e);function TP(e,t){const n=[],r=e.length/t,i=e.length;let o=0;for(;o<i;o+=r)n.push(e[Math.floor(o)]);return n}function Xle(e,t,n){const r=e.ticks.length,i=Math.min(t,r-1),o=e._startPixel,a=e._endPixel,s=1e-6;let l=e.getPixelForTick(i),c;if(!(n&&(r===1?c=Math.max(l-o,a-l):t===0?c=(e.getPixelForTick(1)-l)/2:c=(l-e.getPixelForTick(i-1))/2,l+=i<t?c:-c,l<o-s||l>a+s)))return l}function Qle(e,t){Ge(e,n=>{const r=n.gc,i=r.length/2;let o;if(i>t){for(o=0;o<i;++o)delete n.data[r[o]];r.splice(0,i)}})}function Zl(e){return e.drawTicks?e.tickLength:0}function MP(e,t){if(!e.display)return 0;const n=Zn(e.font,t),r=Qr(e.padding);return(tn(e.text)?e.text.length:1)*n.lineHeight+r.height}function Zle(e,t){return cs(e,{scale:t,type:"scale"})}function Jle(e,t,n){return cs(e,{tick:n,index:t,type:"tick"})}function ece(e,t,n){let r=iR(e);return(n&&t!=="right"||!n&&t==="right")&&(r=Gle(r)),r}function tce(e,t,n,r){const{top:i,left:o,bottom:a,right:s,chart:l}=e,{chartArea:c,scales:u}=l;let d=0,f,p,m;const h=a-i,g=s-o;if(e.isHorizontal()){if(p=ar(r,o,s),Te(n)){const b=Object.keys(n)[0],S=n[b];m=u[b].getPixelForValue(S)+h-t}else n==="center"?m=(c.bottom+c.top)/2+h-t:m=DP(e,n,t);f=s-o}else{if(Te(n)){const b=Object.keys(n)[0],S=n[b];p=u[b].getPixelForValue(S)-g+t}else n==="center"?p=(c.left+c.right)/2-g+t:p=DP(e,n,t);m=ar(r,a,i),d=n==="left"?-Kt:Kt}return{titleX:p,titleY:m,maxWidth:f,rotation:d}}class El extends aa{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,n){return t}getUserBounds(){let{_userMin:t,_userMax:n,_suggestedMin:r,_suggestedMax:i}=this;return t=ri(t,Number.POSITIVE_INFINITY),n=ri(n,Number.NEGATIVE_INFINITY),r=ri(r,Number.POSITIVE_INFINITY),i=ri(i,Number.NEGATIVE_INFINITY),{min:ri(t,r),max:ri(n,i),minDefined:$r(t),maxDefined:$r(n)}}getMinMax(t){let{min:n,max:r,minDefined:i,maxDefined:o}=this.getUserBounds(),a;if(i&&o)return{min:n,max:r};const s=this.getMatchingVisibleMetas();for(let l=0,c=s.length;l<c;++l)a=s[l].controller.getMinMax(this,t),i||(n=Math.min(n,a.min)),o||(r=Math.max(r,a.max));return n=o&&n>r?r:n,r=i&&n>r?n:r,{min:ri(n,ri(r,n)),max:ri(r,ri(n,r))}}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(){dt(this.options.beforeUpdate,[this])}update(t,n,r){const{beginAtZero:i,grace:o,ticks:a}=this.options,s=a.sampleSize;this.beforeUpdate(),this.maxWidth=t,this.maxHeight=n,this._margins=r=Object.assign({left:0,right:0,top:0,bottom:0},r),this.ticks=null,this._labelSizes=null,this._gridLineItems=null,this._labelItems=null,this.beforeSetDimensions(),this.setDimensions(),this.afterSetDimensions(),this._maxLength=this.isHorizontal()?this.width+r.left+r.right:this.height+r.top+r.bottom,this._dataLimitsCached||(this.beforeDataLimits(),this.determineDataLimits(),this.afterDataLimits(),this._range=ise(this,o,i),this._dataLimitsCached=!0),this.beforeBuildTicks(),this.ticks=this.buildTicks()||[],this.afterBuildTicks();const l=s<this.ticks.length;this._convertTicksToLabels(l?TP(this.ticks,s):this.ticks),this.configure(),this.beforeCalculateLabelRotation(),this.calculateLabelRotation(),this.afterCalculateLabelRotation(),a.display&&(a.autoSkip||a.source==="auto")&&(this.ticks=Vle(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,n,r;this.isHorizontal()?(n=this.left,r=this.right):(n=this.top,r=this.bottom,t=!t),this._startPixel=n,this._endPixel=r,this._reversePixels=t,this._length=r-n,this._alignToPixels=this.options.alignToPixels}afterUpdate(){dt(this.options.afterUpdate,[this])}beforeSetDimensions(){dt(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(){dt(this.options.afterSetDimensions,[this])}_callHooks(t){this.chart.notifyPlugins(t,this.getContext()),dt(this.options[t],[this])}beforeDataLimits(){this._callHooks("beforeDataLimits")}determineDataLimits(){}afterDataLimits(){this._callHooks("afterDataLimits")}beforeBuildTicks(){this._callHooks("beforeBuildTicks")}buildTicks(){return[]}afterBuildTicks(){this._callHooks("afterBuildTicks")}beforeTickToLabelConversion(){dt(this.options.beforeTickToLabelConversion,[this])}generateTickLabels(t){const n=this.options.ticks;let r,i,o;for(r=0,i=t.length;r<i;r++)o=t[r],o.label=dt(n.callback,[o.value,r,t],this)}afterTickToLabelConversion(){dt(this.options.afterTickToLabelConversion,[this])}beforeCalculateLabelRotation(){dt(this.options.beforeCalculateLabelRotation,[this])}calculateLabelRotation(){const t=this.options,n=t.ticks,r=AP(this.ticks.length,t.ticks.maxTicksLimit),i=n.minRotation||0,o=n.maxRotation;let a=i,s,l,c;if(!this._isVisible()||!n.display||i>=o||r<=1||!this.isHorizontal()){this.labelRotation=i;return}const u=this._getLabelSizes(),d=u.widest.width,f=u.highest.height,p=En(this.chart.width-d,0,this.maxWidth);s=t.offset?this.maxWidth/r:p/(r-1),d+6>s&&(s=p/(r-(t.offset?.5:1)),l=this.maxHeight-Zl(t.grid)-n.padding-MP(t.title,this.chart.options.font),c=Math.sqrt(d*d+f*f),a=Dae(Math.min(Math.asin(En((u.highest.height+6)/s,-1,1)),Math.asin(En(l/c,-1,1))-Math.asin(En(f/c,-1,1)))),a=Math.max(i,Math.min(o,a))),this.labelRotation=a}afterCalculateLabelRotation(){dt(this.options.afterCalculateLabelRotation,[this])}afterAutoSkip(){}beforeFit(){dt(this.options.beforeFit,[this])}fit(){const t={width:0,height:0},{chart:n,options:{ticks:r,title:i,grid:o}}=this,a=this._isVisible(),s=this.isHorizontal();if(a){const l=MP(i,n.options.font);if(s?(t.width=this.maxWidth,t.height=Zl(o)+l):(t.height=this.maxHeight,t.width=Zl(o)+l),r.display&&this.ticks.length){const{first:c,last:u,widest:d,highest:f}=this._getLabelSizes(),p=r.padding*2,m=Qi(this.labelRotation),h=Math.cos(m),g=Math.sin(m);if(s){const b=r.mirror?0:g*d.width+h*f.height;t.height=Math.min(this.maxHeight,t.height+b+p)}else{const b=r.mirror?0:h*d.width+g*f.height;t.width=Math.min(this.maxWidth,t.width+b+p)}this._calculatePadding(c,u,g,h)}}this._handleMargins(),s?(this.width=this._length=n.width-this._margins.left-this._margins.right,this.height=t.height):(this.width=t.width,this.height=this._length=n.height-this._margins.top-this._margins.bottom)}_calculatePadding(t,n,r,i){const{ticks:{align:o,padding:a},position:s}=this.options,l=this.labelRotation!==0,c=s!=="top"&&this.axis==="x";if(this.isHorizontal()){const u=this.getPixelForTick(0)-this.left,d=this.right-this.getPixelForTick(this.ticks.length-1);let f=0,p=0;l?c?(f=i*t.width,p=r*n.height):(f=r*t.height,p=i*n.width):o==="start"?p=n.width:o==="end"?f=t.width:o!=="inner"&&(f=t.width/2,p=n.width/2),this.paddingLeft=Math.max((f-u+a)*this.width/(this.width-u),0),this.paddingRight=Math.max((p-d+a)*this.width/(this.width-d),0)}else{let u=n.height/2,d=t.height/2;o==="start"?(u=0,d=t.height):o==="end"&&(u=n.height,d=0),this.paddingTop=u+a,this.paddingBottom=d+a}}_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(){dt(this.options.afterFit,[this])}isHorizontal(){const{axis:t,position:n}=this.options;return n==="top"||n==="bottom"||t==="x"}isFullSize(){return this.options.fullSize}_convertTicksToLabels(t){this.beforeTickToLabelConversion(),this.generateTickLabels(t);let n,r;for(n=0,r=t.length;n<r;n++)He(t[n].label)&&(t.splice(n,1),r--,n--);this.afterTickToLabelConversion()}_getLabelSizes(){let t=this._labelSizes;if(!t){const n=this.options.ticks.sampleSize;let r=this.ticks;n<r.length&&(r=TP(r,n)),this._labelSizes=t=this._computeLabelSizes(r,r.length,this.options.ticks.maxTicksLimit)}return t}_computeLabelSizes(t,n,r){const{ctx:i,_longestTextCache:o}=this,a=[],s=[],l=Math.floor(n/AP(n,r));let c=0,u=0,d,f,p,m,h,g,b,S,w,x,_;for(d=0;d<n;d+=l){if(m=t[d].label,h=this._resolveTickFontOptions(d),i.font=g=h.string,b=o[g]=o[g]||{data:{},gc:[]},S=h.lineHeight,w=x=0,!He(m)&&!tn(m))w=oP(i,b.data,b.gc,w,m),x=S;else if(tn(m))for(f=0,p=m.length;f<p;++f)_=m[f],!He(_)&&!tn(_)&&(w=oP(i,b.data,b.gc,w,_),x+=S);a.push(w),s.push(x),c=Math.max(w,c),u=Math.max(x,u)}Qle(o,n);const E=a.indexOf(c),C=s.indexOf(u),D=T=>({width:a[T]||0,height:s[T]||0});return{first:D(0),last:D(n-1),widest:D(E),highest:D(C),widths:a,heights:s}}getLabelForValue(t){return t}getPixelForValue(t,n){return NaN}getValueForPixel(t){}getPixelForTick(t){const n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getPixelForDecimal(t){this._reversePixels&&(t=1-t);const n=this._startPixel+t*this._length;return Tae(this._alignToPixels?ma(this.chart,n,0):n)}getDecimalForPixel(t){const n=(t-this._startPixel)/this._length;return this._reversePixels?1-n:n}getBasePixel(){return this.getPixelForValue(this.getBaseValue())}getBaseValue(){const{min:t,max:n}=this;return t<0&&n<0?n:t>0&&n>0?t:0}getContext(t){const n=this.ticks||[];if(t>=0&&t<n.length){const r=n[t];return r.$context||(r.$context=Jle(this.getContext(),t,r))}return this.$context||(this.$context=Zle(this.chart.getContext(),this))}_tickSize(){const t=this.options.ticks,n=Qi(this.labelRotation),r=Math.abs(Math.cos(n)),i=Math.abs(Math.sin(n)),o=this._getLabelSizes(),a=t.autoSkipPadding||0,s=o?o.widest.width+a:0,l=o?o.highest.height+a:0;return this.isHorizontal()?l*r>s*i?s/r:l/i:l*i<s*r?l/r:s/i}_isVisible(){const t=this.options.display;return t!=="auto"?!!t:this.getMatchingVisibleMetas().length>0}_computeGridLineItems(t){const n=this.axis,r=this.chart,i=this.options,{grid:o,position:a,border:s}=i,l=o.offset,c=this.isHorizontal(),d=this.ticks.length+(l?1:0),f=Zl(o),p=[],m=s.setContext(this.getContext()),h=m.display?m.width:0,g=h/2,b=function(L){return ma(r,L,h)};let S,w,x,_,E,C,D,T,j,A,P,N;if(a==="top")S=b(this.bottom),C=this.bottom-f,T=S-g,A=b(t.top)+g,N=t.bottom;else if(a==="bottom")S=b(this.top),A=t.top,N=b(t.bottom)-g,C=S+g,T=this.top+f;else if(a==="left")S=b(this.right),E=this.right-f,D=S-g,j=b(t.left)+g,P=t.right;else if(a==="right")S=b(this.left),j=t.left,P=b(t.right)-g,E=S+g,D=this.left+f;else if(n==="x"){if(a==="center")S=b((t.top+t.bottom)/2+.5);else if(Te(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}A=t.top,N=t.bottom,C=S+g,T=C+f}else if(n==="y"){if(a==="center")S=b((t.left+t.right)/2);else if(Te(a)){const L=Object.keys(a)[0],$=a[L];S=b(this.chart.scales[L].getPixelForValue($))}E=S-g,D=E-f,j=t.left,P=t.right}const M=Se(i.ticks.maxTicksLimit,d),I=Math.max(1,Math.ceil(d/M));for(w=0;w<d;w+=I){const L=this.getContext(w),$=o.setContext(L),V=s.setContext(L),z=$.lineWidth,B=$.color,X=V.dash||[],q=V.dashOffset,re=$.tickWidth,J=$.tickColor,ee=$.tickBorderDash||[],ie=$.tickBorderDashOffset;x=Xle(this,w,l),x!==void 0&&(_=ma(r,x,z),c?E=D=j=P=_:C=T=A=N=_,p.push({tx1:E,ty1:C,tx2:D,ty2:T,x1:j,y1:A,x2:P,y2:N,width:z,color:B,borderDash:X,borderDashOffset:q,tickWidth:re,tickColor:J,tickBorderDash:ee,tickBorderDashOffset:ie}))}return this._ticksLength=d,this._borderValue=S,p}_computeLabelItems(t){const n=this.axis,r=this.options,{position:i,ticks:o}=r,a=this.isHorizontal(),s=this.ticks,{align:l,crossAlign:c,padding:u,mirror:d}=o,f=Zl(r.grid),p=f+u,m=d?-u:p,h=-Qi(this.labelRotation),g=[];let b,S,w,x,_,E,C,D,T,j,A,P,N="middle";if(i==="top")E=this.bottom-m,C=this._getXAxisLabelAlignment();else if(i==="bottom")E=this.top+m,C=this._getXAxisLabelAlignment();else if(i==="left"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(i==="right"){const I=this._getYAxisLabelAlignment(f);C=I.textAlign,_=I.x}else if(n==="x"){if(i==="center")E=(t.top+t.bottom)/2+p;else if(Te(i)){const I=Object.keys(i)[0],L=i[I];E=this.chart.scales[I].getPixelForValue(L)+p}C=this._getXAxisLabelAlignment()}else if(n==="y"){if(i==="center")_=(t.left+t.right)/2-p;else if(Te(i)){const I=Object.keys(i)[0],L=i[I];_=this.chart.scales[I].getPixelForValue(L)}C=this._getYAxisLabelAlignment(f).textAlign}n==="y"&&(l==="start"?N="top":l==="end"&&(N="bottom"));const M=this._getLabelSizes();for(b=0,S=s.length;b<S;++b){w=s[b],x=w.label;const I=o.setContext(this.getContext(b));D=this.getPixelForTick(b)+o.labelOffset,T=this._resolveTickFontOptions(b),j=T.lineHeight,A=tn(x)?x.length:1;const L=A/2,$=I.color,V=I.textStrokeColor,z=I.textStrokeWidth;let B=C;a?(_=D,C==="inner"&&(b===S-1?B=this.options.reverse?"left":"right":b===0?B=this.options.reverse?"right":"left":B="center"),i==="top"?c==="near"||h!==0?P=-A*j+j/2:c==="center"?P=-M.highest.height/2-L*j+j:P=-M.highest.height+j/2:c==="near"||h!==0?P=j/2:c==="center"?P=M.highest.height/2-L*j:P=M.highest.height-A*j,d&&(P*=-1),h!==0&&!I.showLabelBackdrop&&(_+=j/2*Math.sin(h))):(E=D,P=(1-A)*j/2);let X;if(I.showLabelBackdrop){const q=Qr(I.backdropPadding),re=M.heights[b],J=M.widths[b];let ee=P-q.top,ie=0-q.left;switch(N){case"middle":ee-=re/2;break;case"bottom":ee-=re;break}switch(C){case"center":ie-=J/2;break;case"right":ie-=J;break;case"inner":b===S-1?ie-=J:b>0&&(ie-=J/2);break}X={left:ie,top:ee,width:J+q.width,height:re+q.height,color:I.backdropColor}}g.push({label:x,font:T,textOffset:P,options:{rotation:h,color:$,strokeColor:V,strokeWidth:z,textAlign:B,textBaseline:N,translation:[_,E],backdrop:X}})}return g}_getXAxisLabelAlignment(){const{position:t,ticks:n}=this.options;if(-Qi(this.labelRotation))return t==="top"?"left":"right";let i="center";return n.align==="start"?i="left":n.align==="end"?i="right":n.align==="inner"&&(i="inner"),i}_getYAxisLabelAlignment(t){const{position:n,ticks:{crossAlign:r,mirror:i,padding:o}}=this.options,a=this._getLabelSizes(),s=t+o,l=a.widest.width;let c,u;return n==="left"?i?(u=this.right+o,r==="near"?c="left":r==="center"?(c="center",u+=l/2):(c="right",u+=l)):(u=this.right-s,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u=this.left)):n==="right"?i?(u=this.left+o,r==="near"?c="right":r==="center"?(c="center",u-=l/2):(c="left",u-=l)):(u=this.left+s,r==="near"?c="left":r==="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,n=this.options.position;if(n==="left"||n==="right")return{top:0,left:this.left,bottom:t.height,right:this.right};if(n==="top"||n==="bottom")return{top:this.top,left:0,bottom:this.bottom,right:t.width}}drawBackground(){const{ctx:t,options:{backgroundColor:n},left:r,top:i,width:o,height:a}=this;n&&(t.save(),t.fillStyle=n,t.fillRect(r,i,o,a),t.restore())}getLineWidthForValue(t){const n=this.options.grid;if(!this._isVisible()||!n.display)return 0;const i=this.ticks.findIndex(o=>o.value===t);return i>=0?n.setContext(this.getContext(i)).lineWidth:0}drawGrid(t){const n=this.options.grid,r=this.ctx,i=this._gridLineItems||(this._gridLineItems=this._computeGridLineItems(t));let o,a;const s=(l,c,u)=>{!u.width||!u.color||(r.save(),r.lineWidth=u.width,r.strokeStyle=u.color,r.setLineDash(u.borderDash||[]),r.lineDashOffset=u.borderDashOffset,r.beginPath(),r.moveTo(l.x,l.y),r.lineTo(c.x,c.y),r.stroke(),r.restore())};if(n.display)for(o=0,a=i.length;o<a;++o){const l=i[o];n.drawOnChartArea&&s({x:l.x1,y:l.y1},{x:l.x2,y:l.y2},l),n.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:n,options:{border:r,grid:i}}=this,o=r.setContext(this.getContext()),a=r.display?o.width:0;if(!a)return;const s=i.setContext(this.getContext(0)).lineWidth,l=this._borderValue;let c,u,d,f;this.isHorizontal()?(c=ma(t,this.left,a)-a/2,u=ma(t,this.right,s)+s/2,d=f=l):(d=ma(t,this.top,a)-a/2,f=ma(t,this.bottom,s)+s/2,c=u=l),n.save(),n.lineWidth=o.width,n.strokeStyle=o.color,n.beginPath(),n.moveTo(c,d),n.lineTo(u,f),n.stroke(),n.restore()}drawLabels(t){if(!this.options.ticks.display)return;const r=this.ctx,i=this._computeLabelArea();i&&Kx(r,i);const o=this.getLabelItems(t);for(const a of o){const s=a.options,l=a.font,c=a.label,u=a.textOffset;yp(r,c,0,u,l,s)}i&&qx(r)}drawTitle(){const{ctx:t,options:{position:n,title:r,reverse:i}}=this;if(!r.display)return;const o=Zn(r.font),a=Qr(r.padding),s=r.align;let l=o.lineHeight/2;n==="bottom"||n==="center"||Te(n)?(l+=a.bottom,tn(r.text)&&(l+=o.lineHeight*(r.text.length-1))):l+=a.top;const{titleX:c,titleY:u,maxWidth:d,rotation:f}=tce(this,l,n,s);yp(t,r.text,0,0,o,{color:r.color,maxWidth:d,rotation:f,textAlign:ece(s,n,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,n=t.ticks&&t.ticks.z||0,r=Se(t.grid&&t.grid.z,-1),i=Se(t.border&&t.border.z,0);return!this._isVisible()||this.draw!==El.prototype.draw?[{z:n,draw:o=>{this.draw(o)}}]:[{z:r,draw:o=>{this.drawBackground(),this.drawGrid(o),this.drawTitle()}},{z:i,draw:()=>{this.drawBorder()}},{z:n,draw:o=>{this.drawLabels(o)}}]}getMatchingVisibleMetas(t){const n=this.chart.getSortedVisibleDatasetMetas(),r=this.axis+"AxisID",i=[];let o,a;for(o=0,a=n.length;o<a;++o){const s=n[o];s[r]===this.id&&(!t||s.type===t)&&i.push(s)}return i}_resolveTickFontOptions(t){const n=this.options.ticks.setContext(this.getContext(t));return Zn(n.font)}_maxDigits(){const t=this._resolveTickFontOptions(0).lineHeight;return(this.isHorizontal()?this.width:this.height)/t}}class Ld{constructor(t,n,r){this.type=t,this.scope=n,this.override=r,this.items=Object.create(null)}isForType(t){return Object.prototype.isPrototypeOf.call(this.type.prototype,t.prototype)}register(t){const n=Object.getPrototypeOf(t);let r;ice(n)&&(r=this.register(n));const i=this.items,o=t.id,a=this.scope+"."+o;if(!o)throw new Error("class does not have id: "+t);return o in i||(i[o]=t,nce(t,a,r),this.override&&Rt.override(t.id,t.overrides)),a}get(t){return this.items[t]}unregister(t){const n=this.items,r=t.id,i=this.scope;r in n&&delete n[r],i&&r in Rt[i]&&(delete Rt[i][r],this.override&&delete ns[r])}}function nce(e,t,n){const r=Qc(Object.create(null),[n?Rt.get(n):{},Rt.get(t),e.defaults]);Rt.set(t,r),e.defaultRoutes&&rce(t,e.defaultRoutes),e.descriptors&&Rt.describe(t,e.descriptors)}function rce(e,t){Object.keys(t).forEach(n=>{const r=n.split("."),i=r.pop(),o=[e].concat(r).join("."),a=t[n].split("."),s=a.pop(),l=a.join(".");Rt.route(o,i,l,s)})}function ice(e){return"id"in e&&"defaults"in e}class oce{constructor(){this.controllers=new Ld(Kh,"datasets",!0),this.elements=new Ld(aa,"elements"),this.plugins=new Ld(Object,"plugins"),this.scales=new Ld(El,"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,n,r){[...n].forEach(i=>{const o=r||this._getRegistryForType(i);r||o.isForType(i)||o===this.plugins&&i.id?this._exec(t,o,i):Ge(i,a=>{const s=r||this._getRegistryForType(a);this._exec(t,s,a)})})}_exec(t,n,r){const i=Vx(t);dt(r["before"+i],[],r),n[t](r),dt(r["after"+i],[],r)}_getRegistryForType(t){for(let n=0;n<this._typedRegistries.length;n++){const r=this._typedRegistries[n];if(r.isForType(t))return r}return this.plugins}_get(t,n,r){const i=n.get(t);if(i===void 0)throw new Error('"'+t+'" is not a registered '+r+".");return i}}var oi=new oce;class ace{constructor(){this._init=[]}notify(t,n,r,i){n==="beforeInit"&&(this._init=this._createDescriptors(t,!0),this._notify(this._init,t,"install"));const o=i?this._descriptors(t).filter(i):this._descriptors(t),a=this._notify(o,t,n,r);return n==="afterDestroy"&&(this._notify(o,t,"stop"),this._notify(this._init,t,"uninstall")),a}_notify(t,n,r,i){i=i||{};for(const o of t){const a=o.plugin,s=a[r],l=[n,i,o.options];if(dt(s,l,a)===!1&&i.cancelable)return!1}return!0}invalidate(){He(this._cache)||(this._oldCache=this._cache,this._cache=void 0)}_descriptors(t){if(this._cache)return this._cache;const n=this._cache=this._createDescriptors(t);return this._notifyStateChanges(t),n}_createDescriptors(t,n){const r=t&&t.config,i=Se(r.options&&r.options.plugins,{}),o=sce(r);return i===!1&&!n?[]:cce(t,o,i,n)}_notifyStateChanges(t){const n=this._oldCache||[],r=this._cache,i=(o,a)=>o.filter(s=>!a.some(l=>s.plugin.id===l.plugin.id));this._notify(i(n,r),t,"stop"),this._notify(i(r,n),t,"start")}}function sce(e){const t={},n=[],r=Object.keys(oi.plugins.items);for(let o=0;o<r.length;o++)n.push(oi.getPlugin(r[o]));const i=e.plugins||[];for(let o=0;o<i.length;o++){const a=i[o];n.indexOf(a)===-1&&(n.push(a),t[a.id]=!0)}return{plugins:n,localIds:t}}function lce(e,t){return!t&&e===!1?null:e===!0?{}:e}function cce(e,{plugins:t,localIds:n},r,i){const o=[],a=e.getContext();for(const s of t){const l=s.id,c=lce(r[l],i);c!==null&&o.push({plugin:s,options:uce(e.config,{plugin:s,local:n[l]},c,a)})}return o}function uce(e,{plugin:t,local:n},r,i){const o=e.pluginScopeKeys(t),a=e.getOptionScopes(r,o);return n&&t.defaults&&a.push(t.defaults),e.createResolver(a,i,[""],{scriptable:!1,indexable:!1,allKeys:!0})}function By(e,t){const n=Rt.datasets[e]||{};return((t.datasets||{})[e]||{}).indexAxis||t.indexAxis||n.indexAxis||"x"}function dce(e,t){let n=e;return e==="_index_"?n=t:e==="_value_"&&(n=t==="x"?"y":"x"),n}function fce(e,t){return e===t?"_index_":"_value_"}function NP(e){if(e==="x"||e==="y"||e==="r")return e}function pce(e){if(e==="top"||e==="bottom")return"x";if(e==="left"||e==="right")return"y"}function Wy(e,...t){if(NP(e))return e;for(const n of t){const r=n.axis||pce(n.position)||e.length>1&&NP(e[0].toLowerCase());if(r)return r}throw new Error(`Cannot determine type of '${e}' axis. Please provide 'axis' or 'position' option.`)}function jP(e,t,n){if(n[t+"AxisID"]===e)return{axis:t}}function hce(e,t){if(t.data&&t.data.datasets){const n=t.data.datasets.filter(r=>r.xAxisID===e||r.yAxisID===e);if(n.length)return jP(e,"x",n[0])||jP(e,"y",n[0])}return{}}function mce(e,t){const n=ns[e.type]||{scales:{}},r=t.scales||{},i=By(e.type,t),o=Object.create(null);return Object.keys(r).forEach(a=>{const s=r[a];if(!Te(s))return console.error(`Invalid scale configuration for scale: ${a}`);if(s._proxy)return console.warn(`Ignoring resolver passed as options for scale: ${a}`);const l=Wy(a,s,hce(a,e),Rt.scales[s.type]),c=fce(l,i),u=n.scales||{};o[a]=xc(Object.create(null),[{axis:l},s,u[l],u[c]])}),e.data.datasets.forEach(a=>{const s=a.type||e.type,l=a.indexAxis||By(s,t),u=(ns[s]||{}).scales||{};Object.keys(u).forEach(d=>{const f=dce(d,l),p=a[f+"AxisID"]||f;o[p]=o[p]||Object.create(null),xc(o[p],[{axis:f},r[p],u[d]])})}),Object.keys(o).forEach(a=>{const s=o[a];xc(s,[Rt.scales[s.type],Rt.scale])}),o}function OR(e){const t=e.options||(e.options={});t.plugins=Se(t.plugins,{}),t.scales=mce(e,t)}function ER(e){return e=e||{},e.datasets=e.datasets||[],e.labels=e.labels||[],e}function gce(e){return e=e||{},e.data=ER(e.data),OR(e),e}const RP=new Map,PR=new Set;function Fd(e,t){let n=RP.get(e);return n||(n=t(),RP.set(e,n),PR.add(n)),n}const Jl=(e,t,n)=>{const r=ts(t,n);r!==void 0&&e.add(r)};class vce{constructor(t){this._config=gce(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=ER(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(),OR(t)}clearCache(){this._scopeCache.clear(),this._resolverCache.clear()}datasetScopeKeys(t){return Fd(t,()=>[[`datasets.${t}`,""]])}datasetAnimationScopeKeys(t,n){return Fd(`${t}.transition.${n}`,()=>[[`datasets.${t}.transitions.${n}`,`transitions.${n}`],[`datasets.${t}`,""]])}datasetElementScopeKeys(t,n){return Fd(`${t}-${n}`,()=>[[`datasets.${t}.elements.${n}`,`datasets.${t}`,`elements.${n}`,""]])}pluginScopeKeys(t){const n=t.id,r=this.type;return Fd(`${r}-plugin-${n}`,()=>[[`plugins.${n}`,...t.additionalOptionScopes||[]]])}_cachedScopes(t,n){const r=this._scopeCache;let i=r.get(t);return(!i||n)&&(i=new Map,r.set(t,i)),i}getOptionScopes(t,n,r){const{options:i,type:o}=this,a=this._cachedScopes(t,r),s=a.get(n);if(s)return s;const l=new Set;n.forEach(u=>{t&&(l.add(t),u.forEach(d=>Jl(l,t,d))),u.forEach(d=>Jl(l,i,d)),u.forEach(d=>Jl(l,ns[o]||{},d)),u.forEach(d=>Jl(l,Rt,d)),u.forEach(d=>Jl(l,Fy,d))});const c=Array.from(l);return c.length===0&&c.push(Object.create(null)),PR.has(n)&&a.set(n,c),c}chartOptionScopes(){const{options:t,type:n}=this;return[t,ns[n]||{},Rt.datasets[n]||{},{type:n},Rt,Fy]}resolveNamedOptions(t,n,r,i=[""]){const o={$shared:!0},{resolver:a,subPrefixes:s}=IP(this._resolverCache,t,i);let l=a;if(bce(a,n)){o.$shared=!1,r=Zo(r)?r():r;const c=this.createResolver(t,r,s);l=sl(a,r,c)}for(const c of n)o[c]=l[c];return o}createResolver(t,n,r=[""],i){const{resolver:o}=IP(this._resolverCache,t,r);return Te(n)?sl(o,n,void 0,i):o}}function IP(e,t,n){let r=e.get(t);r||(r=new Map,e.set(t,r));const i=n.join();let o=r.get(i);return o||(o={resolver:Xx(t,n),subPrefixes:n.filter(s=>!s.toLowerCase().includes("hover"))},r.set(i,o)),o}const yce=e=>Te(e)&&Object.getOwnPropertyNames(e).some(t=>Zo(e[t]));function bce(e,t){const{isScriptable:n,isIndexable:r}=lR(e);for(const i of t){const o=n(i),a=r(i),s=(a||o)&&e[i];if(o&&(Zo(s)||yce(s))||a&&tn(s))return!0}return!1}var xce="4.5.0";const wce=["top","bottom","left","right","chartArea"];function LP(e,t){return e==="top"||e==="bottom"||wce.indexOf(e)===-1&&t==="x"}function FP(e,t){return function(n,r){return n[e]===r[e]?n[t]-r[t]:n[e]-r[e]}}function $P(e){const t=e.chart,n=t.options.animation;t.notifyPlugins("afterRender"),dt(n&&n.onComplete,[e],t)}function _ce(e){const t=e.chart,n=t.options.animation;dt(n&&n.onProgress,[e],t)}function kR(e){return Jx()&&typeof e=="string"?e=document.getElementById(e):e&&e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas),e}const rf={},BP=e=>{const t=kR(e);return Object.values(rf).filter(n=>n.canvas===t).pop()};function Sce(e,t,n){const r=Object.keys(e);for(const i of r){const o=+i;if(o>=t){const a=e[i];delete e[i],(n>0||o>t)&&(e[o+n]=a)}}}function Oce(e,t,n,r){return!n||e.type==="mouseout"?null:r?t:e}let $n=class{static defaults=Rt;static instances=rf;static overrides=ns;static registry=oi;static version=xce;static getChart=BP;static register(...t){oi.add(...t),WP()}static unregister(...t){oi.remove(...t),WP()}constructor(t,n){const r=this.config=new vce(n),i=kR(t),o=BP(i);if(o)throw new Error("Canvas is already in use. Chart with ID '"+o.id+"' must be destroyed before the canvas with ID '"+o.canvas.id+"' can be reused.");const a=r.createResolver(r.chartOptionScopes(),this.getContext());this.platform=new(r.platform||zle(i)),this.platform.updateConfig(r);const s=this.platform.acquireContext(i,a.aspectRatio),l=s&&s.canvas,c=l&&l.height,u=l&&l.width;if(this.id=gae(),this.ctx=s,this.canvas=l,this.width=u,this.height=c,this._options=a,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 ace,this.$proxies={},this._hiddenIndices={},this.attached=!1,this._animationsDisabled=void 0,this.$context=void 0,this._doResize=Rae(d=>this.update(d),a.resizeDelay||0),this._dataChanges=[],rf[this.id]=this,!s||!l){console.error("Failed to create chart: can't acquire context from the given item");return}$i.listen(this,"complete",$P),$i.listen(this,"progress",_ce),this._initialize(),this.attached&&this.update()}get aspectRatio(){const{options:{aspectRatio:t,maintainAspectRatio:n},width:r,height:i,_aspectRatio:o}=this;return He(t)?n&&o?o:i?r/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 oi}_initialize(){return this.notifyPlugins("beforeInit"),this.options.responsive?this.resize():cP(this,this.options.devicePixelRatio),this.bindEvents(),this.notifyPlugins("afterInit"),this}clear(){return aP(this.canvas,this.ctx),this}stop(){return $i.stop(this),this}resize(t,n){$i.running(this)?this._resizeBeforeDraw={width:t,height:n}:this._resize(t,n)}_resize(t,n){const r=this.options,i=this.canvas,o=r.maintainAspectRatio&&this.aspectRatio,a=this.platform.getMaximumSize(i,t,n,o),s=r.devicePixelRatio||this.platform.getDevicePixelRatio(),l=this.width?"resize":"attach";this.width=a.width,this.height=a.height,this._aspectRatio=this.aspectRatio,cP(this,s,!0)&&(this.notifyPlugins("resize",{size:a}),dt(r.onResize,[this,a],this),this.attached&&this._doResize(l)&&this.render())}ensureScalesHaveIDs(){const n=this.options.scales||{};Ge(n,(r,i)=>{r.id=i})}buildOrUpdateScales(){const t=this.options,n=t.scales,r=this.scales,i=Object.keys(r).reduce((a,s)=>(a[s]=!1,a),{});let o=[];n&&(o=o.concat(Object.keys(n).map(a=>{const s=n[a],l=Wy(a,s),c=l==="r",u=l==="x";return{options:s,dposition:c?"chartArea":u?"bottom":"left",dtype:c?"radialLinear":u?"category":"linear"}}))),Ge(o,a=>{const s=a.options,l=s.id,c=Wy(l,s),u=Se(s.type,a.dtype);(s.position===void 0||LP(s.position,c)!==LP(a.dposition))&&(s.position=a.dposition),i[l]=!0;let d=null;if(l in r&&r[l].type===u)d=r[l];else{const f=oi.getScale(u);d=new f({id:l,type:u,ctx:this.ctx,chart:this}),r[d.id]=d}d.init(s,t)}),Ge(i,(a,s)=>{a||delete r[s]}),Ge(r,a=>{Io.configure(this,a,a.options),Io.addBox(this,a)})}_updateMetasets(){const t=this._metasets,n=this.data.datasets.length,r=t.length;if(t.sort((i,o)=>i.index-o.index),r>n){for(let i=n;i<r;++i)this._destroyDatasetMeta(i);t.splice(n,r-n)}this._sortedMetasets=t.slice(0).sort(FP("order","index"))}_removeUnreferencedMetasets(){const{_metasets:t,data:{datasets:n}}=this;t.length>n.length&&delete this._stacks,t.forEach((r,i)=>{n.filter(o=>o===r._dataset).length===0&&this._destroyDatasetMeta(i)})}buildOrUpdateControllers(){const t=[],n=this.data.datasets;let r,i;for(this._removeUnreferencedMetasets(),r=0,i=n.length;r<i;r++){const o=n[r];let a=this.getDatasetMeta(r);const s=o.type||this.config.type;if(a.type&&a.type!==s&&(this._destroyDatasetMeta(r),a=this.getDatasetMeta(r)),a.type=s,a.indexAxis=o.indexAxis||By(s,this.options),a.order=o.order||0,a.index=r,a.label=""+o.label,a.visible=this.isDatasetVisible(r),a.controller)a.controller.updateIndex(r),a.controller.linkScales();else{const l=oi.getController(s),{datasetElementType:c,dataElementType:u}=Rt.datasets[s];Object.assign(l,{dataElementType:oi.getElement(u),datasetElementType:c&&oi.getElement(c)}),a.controller=new l(this,r),t.push(a.controller)}}return this._updateMetasets(),t}_resetElements(){Ge(this.data.datasets,(t,n)=>{this.getDatasetMeta(n).controller.reset()},this)}reset(){this._resetElements(),this.notifyPlugins("reset")}update(t){const n=this.config;n.update();const r=this._options=n.createResolver(n.chartOptionScopes(),this.getContext()),i=this._animationsDisabled=!r.animation;if(this._updateScales(),this._checkEventBindings(),this._updateHiddenIndices(),this._plugins.invalidate(),this.notifyPlugins("beforeUpdate",{mode:t,cancelable:!0})===!1)return;const o=this.buildOrUpdateControllers();this.notifyPlugins("beforeElementsUpdate");let a=0;for(let c=0,u=this.data.datasets.length;c<u;c++){const{controller:d}=this.getDatasetMeta(c),f=!i&&o.indexOf(d)===-1;d.buildOrUpdateElements(f),a=Math.max(+d.getMaxOverflow(),a)}a=this._minPadding=r.layout.autoPadding?a:0,this._updateLayout(a),i||Ge(o,c=>{c.reset()}),this._updateDatasets(t),this.notifyPlugins("afterUpdate",{mode:t}),this._layers.sort(FP("z","_idx"));const{_active:s,_lastEvent:l}=this;l?this._eventHandler(l,!0):s.length&&this._updateHoverStyles(s,s,!0),this.render()}_updateScales(){Ge(this.scales,t=>{Io.removeBox(this,t)}),this.ensureScalesHaveIDs(),this.buildOrUpdateScales()}_checkEventBindings(){const t=this.options,n=new Set(Object.keys(this._listeners)),r=new Set(t.events);(!X2(n,r)||!!this._responsiveListeners!==t.responsive)&&(this.unbindEvents(),this.bindEvents())}_updateHiddenIndices(){const{_hiddenIndices:t}=this,n=this._getUniformDataChanges()||[];for(const{method:r,start:i,count:o}of n){const a=r==="_removeElements"?-o:o;Sce(t,i,a)}}_getUniformDataChanges(){const t=this._dataChanges;if(!t||!t.length)return;this._dataChanges=[];const n=this.data.datasets.length,r=o=>new Set(t.filter(a=>a[0]===o).map((a,s)=>s+","+a.splice(1).join(","))),i=r(0);for(let o=1;o<n;o++)if(!X2(i,r(o)))return;return Array.from(i).map(o=>o.split(",")).map(o=>({method:o[1],start:+o[2],count:+o[3]}))}_updateLayout(t){if(this.notifyPlugins("beforeLayout",{cancelable:!0})===!1)return;Io.update(this,this.width,this.height,t);const n=this.chartArea,r=n.width<=0||n.height<=0;this._layers=[],Ge(this.boxes,i=>{r&&i.position==="chartArea"||(i.configure&&i.configure(),this._layers.push(...i._layers()))},this),this._layers.forEach((i,o)=>{i._idx=o}),this.notifyPlugins("afterLayout")}_updateDatasets(t){if(this.notifyPlugins("beforeDatasetsUpdate",{mode:t,cancelable:!0})!==!1){for(let n=0,r=this.data.datasets.length;n<r;++n)this.getDatasetMeta(n).controller.configure();for(let n=0,r=this.data.datasets.length;n<r;++n)this._updateDataset(n,Zo(t)?t({datasetIndex:n}):t);this.notifyPlugins("afterDatasetsUpdate",{mode:t})}}_updateDataset(t,n){const r=this.getDatasetMeta(t),i={meta:r,index:t,mode:n,cancelable:!0};this.notifyPlugins("beforeDatasetUpdate",i)!==!1&&(r.controller._update(n),i.cancelable=!1,this.notifyPlugins("afterDatasetUpdate",i))}render(){this.notifyPlugins("beforeRender",{cancelable:!0})!==!1&&($i.has(this)?this.attached&&!$i.running(this)&&$i.start(this):(this.draw(),$P({chart:this})))}draw(){let t;if(this._resizeBeforeDraw){const{width:r,height:i}=this._resizeBeforeDraw;this._resizeBeforeDraw=null,this._resize(r,i)}if(this.clear(),this.width<=0||this.height<=0||this.notifyPlugins("beforeDraw",{cancelable:!0})===!1)return;const n=this._layers;for(t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(this.chartArea);for(this._drawDatasets();t<n.length;++t)n[t].draw(this.chartArea);this.notifyPlugins("afterDraw")}_getSortedDatasetMetas(t){const n=this._sortedMetasets,r=[];let i,o;for(i=0,o=n.length;i<o;++i){const a=n[i];(!t||a.visible)&&r.push(a)}return r}getSortedVisibleDatasetMetas(){return this._getSortedDatasetMetas(!0)}_drawDatasets(){if(this.notifyPlugins("beforeDatasetsDraw",{cancelable:!0})===!1)return;const t=this.getSortedVisibleDatasetMetas();for(let n=t.length-1;n>=0;--n)this._drawDataset(t[n]);this.notifyPlugins("afterDatasetsDraw")}_drawDataset(t){const n=this.ctx,r={meta:t,index:t.index,cancelable:!0},i=Wse(this,t);this.notifyPlugins("beforeDatasetDraw",r)!==!1&&(i&&Kx(n,i),t.controller.draw(),i&&qx(n),r.cancelable=!1,this.notifyPlugins("afterDatasetDraw",r))}isPointInArea(t){return tu(t,this.chartArea,this._minPadding)}getElementsAtEventForMode(t,n,r,i){const o=wle.modes[n];return typeof o=="function"?o(this,t,r,i):[]}getDatasetMeta(t){const n=this.data.datasets[t],r=this._metasets;let i=r.filter(o=>o&&o._dataset===n).pop();return i||(i={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:n&&n.order||0,index:t,_dataset:n,_parsed:[],_sorted:!1},r.push(i)),i}getContext(){return this.$context||(this.$context=cs(null,{chart:this,type:"chart"}))}getVisibleDatasetCount(){return this.getSortedVisibleDatasetMetas().length}isDatasetVisible(t){const n=this.data.datasets[t];if(!n)return!1;const r=this.getDatasetMeta(t);return typeof r.hidden=="boolean"?!r.hidden:!n.hidden}setDatasetVisibility(t,n){const r=this.getDatasetMeta(t);r.hidden=!n}toggleDataVisibility(t){this._hiddenIndices[t]=!this._hiddenIndices[t]}getDataVisibility(t){return!this._hiddenIndices[t]}_updateVisibility(t,n,r){const i=r?"show":"hide",o=this.getDatasetMeta(t),a=o.controller._resolveAnimations(void 0,i);Zc(n)?(o.data[n].hidden=!r,this.update()):(this.setDatasetVisibility(t,r),a.update(o,{visible:r}),this.update(s=>s.datasetIndex===t?i:void 0))}hide(t,n){this._updateVisibility(t,n,!1)}show(t,n){this._updateVisibility(t,n,!0)}_destroyDatasetMeta(t){const n=this._metasets[t];n&&n.controller&&n.controller._destroy(),delete this._metasets[t]}_stop(){let t,n;for(this.stop(),$i.remove(this),t=0,n=this.data.datasets.length;t<n;++t)this._destroyDatasetMeta(t)}destroy(){this.notifyPlugins("beforeDestroy");const{canvas:t,ctx:n}=this;this._stop(),this.config.clearCache(),t&&(this.unbindEvents(),aP(t,n),this.platform.releaseContext(n),this.canvas=null,this.ctx=null),delete rf[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,n=this.platform,r=(o,a)=>{n.addEventListener(this,o,a),t[o]=a},i=(o,a,s)=>{o.offsetX=a,o.offsetY=s,this._eventHandler(o)};Ge(this.options.events,o=>r(o,i))}bindResponsiveEvents(){this._responsiveListeners||(this._responsiveListeners={});const t=this._responsiveListeners,n=this.platform,r=(l,c)=>{n.addEventListener(this,l,c),t[l]=c},i=(l,c)=>{t[l]&&(n.removeEventListener(this,l,c),delete t[l])},o=(l,c)=>{this.canvas&&this.resize(l,c)};let a;const s=()=>{i("attach",s),this.attached=!0,this.resize(),r("resize",o),r("detach",a)};a=()=>{this.attached=!1,i("resize",o),this._stop(),this._resize(0,0),r("attach",s)},n.isAttached(this.canvas)?s():a()}unbindEvents(){Ge(this._listeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._listeners={},Ge(this._responsiveListeners,(t,n)=>{this.platform.removeEventListener(this,n,t)}),this._responsiveListeners=void 0}updateHoverStyle(t,n,r){const i=r?"set":"remove";let o,a,s,l;for(n==="dataset"&&(o=this.getDatasetMeta(t[0].datasetIndex),o.controller["_"+i+"DatasetHoverStyle"]()),s=0,l=t.length;s<l;++s){a=t[s];const c=a&&this.getDatasetMeta(a.datasetIndex).controller;c&&c[i+"HoverStyle"](a.element,a.datasetIndex,a.index)}}getActiveElements(){return this._active||[]}setActiveElements(t){const n=this._active||[],r=t.map(({datasetIndex:o,index:a})=>{const s=this.getDatasetMeta(o);if(!s)throw new Error("No dataset found at index "+o);return{datasetIndex:o,element:s.data[a],index:a}});!mp(r,n)&&(this._active=r,this._lastEvent=null,this._updateHoverStyles(r,n))}notifyPlugins(t,n,r){return this._plugins.notify(this,t,n,r)}isPluginEnabled(t){return this._plugins._cache.filter(n=>n.plugin.id===t).length===1}_updateHoverStyles(t,n,r){const i=this.options.hover,o=(l,c)=>l.filter(u=>!c.some(d=>u.datasetIndex===d.datasetIndex&&u.index===d.index)),a=o(n,t),s=r?t:o(t,n);a.length&&this.updateHoverStyle(a,i.mode,!1),s.length&&i.mode&&this.updateHoverStyle(s,i.mode,!0)}_eventHandler(t,n){const r={event:t,replay:n,cancelable:!0,inChartArea:this.isPointInArea(t)},i=a=>(a.options.events||this.options.events).includes(t.native.type);if(this.notifyPlugins("beforeEvent",r,i)===!1)return;const o=this._handleEvent(t,n,r.inChartArea);return r.cancelable=!1,this.notifyPlugins("afterEvent",r,i),(o||r.changed)&&this.render(),this}_handleEvent(t,n,r){const{_active:i=[],options:o}=this,a=n,s=this._getActiveElements(t,i,r,a),l=_ae(t),c=Oce(t,this._lastEvent,r,l);r&&(this._lastEvent=null,dt(o.onHover,[t,s,this],this),l&&dt(o.onClick,[t,s,this],this));const u=!mp(s,i);return(u||n)&&(this._active=s,this._updateHoverStyles(s,i,n)),this._lastEvent=c,u}_getActiveElements(t,n,r,i){if(t.type==="mouseout")return[];if(!r)return n;const o=this.options.hover;return this.getElementsAtEventForMode(t,o.mode,o,i)}};function WP(){return Ge($n.instances,e=>e._plugins.invalidate())}function Ece(e,t,n){const{startAngle:r,x:i,y:o,outerRadius:a,innerRadius:s,options:l}=t,{borderWidth:c,borderJoinStyle:u}=l,d=Math.min(c/a,Ur(r-n));if(e.beginPath(),e.arc(i,o,a-c/2,r+d/2,n-d/2),s>0){const f=Math.min(c/s,Ur(r-n));e.arc(i,o,s+c/2,n-f/2,r+f/2,!0)}else{const f=Math.min(c/2,a*Ur(r-n));if(u==="round")e.arc(i,o,f,n-ot/2,r+ot/2,!0);else if(u==="bevel"){const p=2*f*f,m=-p*Math.cos(n+ot/2)+i,h=-p*Math.sin(n+ot/2)+o,g=p*Math.cos(r+ot/2)+i,b=p*Math.sin(r+ot/2)+o;e.lineTo(m,h),e.lineTo(g,b)}}e.closePath(),e.moveTo(0,0),e.rect(0,0,e.canvas.width,e.canvas.height),e.clip("evenodd")}function Pce(e,t,n){const{startAngle:r,pixelMargin:i,x:o,y:a,outerRadius:s,innerRadius:l}=t;let c=i/s;e.beginPath(),e.arc(o,a,s,r-c,n+c),l>i?(c=i/l,e.arc(o,a,l,n+c,r-c,!0)):e.arc(o,a,i,n+Kt,r-Kt),e.closePath(),e.clip()}function kce(e){return Gx(e,["outerStart","outerEnd","innerStart","innerEnd"])}function Cce(e,t,n,r){const i=kce(e.options.borderRadius),o=(n-t)/2,a=Math.min(o,r*t/2),s=l=>{const c=(n-Math.min(o,l))*r/2;return En(l,0,Math.min(o,c))};return{outerStart:s(i.outerStart),outerEnd:s(i.outerEnd),innerStart:En(i.innerStart,0,a),innerEnd:En(i.innerEnd,0,a)}}function Os(e,t,n,r){return{x:n+e*Math.cos(t),y:r+e*Math.sin(t)}}function _p(e,t,n,r,i,o){const{x:a,y:s,startAngle:l,pixelMargin:c,innerRadius:u}=t,d=Math.max(t.outerRadius+r+n-c,0),f=u>0?u+r+n+c:0;let p=0;const m=i-l;if(r){const I=u>0?u-r:0,L=d>0?d-r:0,$=(I+L)/2,V=$!==0?m*$/($+r):m;p=(m-V)/2}const h=Math.max(.001,m*d-n/ot)/d,g=(m-h)/2,b=l+g+p,S=i-g-p,{outerStart:w,outerEnd:x,innerStart:_,innerEnd:E}=Cce(t,f,d,S-b),C=d-w,D=d-x,T=b+w/C,j=S-x/D,A=f+_,P=f+E,N=b+_/A,M=S-E/P;if(e.beginPath(),o){const I=(T+j)/2;if(e.arc(a,s,d,T,I),e.arc(a,s,d,I,j),x>0){const z=Os(D,j,a,s);e.arc(z.x,z.y,x,j,S+Kt)}const L=Os(P,S,a,s);if(e.lineTo(L.x,L.y),E>0){const z=Os(P,M,a,s);e.arc(z.x,z.y,E,S+Kt,M+Math.PI)}const $=(S-E/f+(b+_/f))/2;if(e.arc(a,s,f,S-E/f,$,!0),e.arc(a,s,f,$,b+_/f,!0),_>0){const z=Os(A,N,a,s);e.arc(z.x,z.y,_,N+Math.PI,b-Kt)}const V=Os(C,b,a,s);if(e.lineTo(V.x,V.y),w>0){const z=Os(C,T,a,s);e.arc(z.x,z.y,w,b-Kt,T)}}else{e.moveTo(a,s);const I=Math.cos(T)*d+a,L=Math.sin(T)*d+s;e.lineTo(I,L);const $=Math.cos(j)*d+a,V=Math.sin(j)*d+s;e.lineTo($,V)}e.closePath()}function Dce(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s}=t;let l=t.endAngle;if(o){_p(e,t,n,r,l,i);for(let c=0;c<o;++c)e.fill();isNaN(s)||(l=a+(s%Ct||Ct))}return _p(e,t,n,r,l,i),e.fill(),l}function Ace(e,t,n,r,i){const{fullCircles:o,startAngle:a,circumference:s,options:l}=t,{borderWidth:c,borderJoinStyle:u,borderDash:d,borderDashOffset:f,borderRadius:p}=l,m=l.borderAlign==="inner";if(!c)return;e.setLineDash(d||[]),e.lineDashOffset=f,m?(e.lineWidth=c*2,e.lineJoin=u||"round"):(e.lineWidth=c,e.lineJoin=u||"bevel");let h=t.endAngle;if(o){_p(e,t,n,r,h,i);for(let g=0;g<o;++g)e.stroke();isNaN(s)||(h=a+(s%Ct||Ct))}m&&Pce(e,t,h),l.selfJoin&&h-a>=ot&&p===0&&u!=="miter"&&Ece(e,t,h),o||(_p(e,t,n,r,h,i),e.stroke())}class n1 extends aa{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,n,r){const i=this.getProps(["x","y"],r),{angle:o,distance:a}=Jj(i,{x:t,y:n}),{startAngle:s,endAngle:l,innerRadius:c,outerRadius:u,circumference:d}=this.getProps(["startAngle","endAngle","innerRadius","outerRadius","circumference"],r),f=(this.options.spacing+this.options.borderWidth)/2,p=Se(d,l-s),m=eu(o,s,l)&&s!==l,h=p>=Ct||m,g=Ro(a,c+f,u+f);return h&&g}getCenterPoint(t){const{x:n,y:r,startAngle:i,endAngle:o,innerRadius:a,outerRadius:s}=this.getProps(["x","y","startAngle","endAngle","innerRadius","outerRadius"],t),{offset:l,spacing:c}=this.options,u=(i+o)/2,d=(a+s+c+l)/2;return{x:n+Math.cos(u)*d,y:r+Math.sin(u)*d}}tooltipPosition(t){return this.getCenterPoint(t)}draw(t){const{options:n,circumference:r}=this,i=(n.offset||0)/4,o=(n.spacing||0)/2,a=n.circular;if(this.pixelMargin=n.borderAlign==="inner"?.33:0,this.fullCircles=r>Ct?Math.floor(r/Ct):0,r===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(ot,r||0)),c=i*l;t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,Dce(t,this,c,o,a),Ace(t,this,c,o,a),t.restore()}}function CR(e,t,n=t){e.lineCap=Se(n.borderCapStyle,t.borderCapStyle),e.setLineDash(Se(n.borderDash,t.borderDash)),e.lineDashOffset=Se(n.borderDashOffset,t.borderDashOffset),e.lineJoin=Se(n.borderJoinStyle,t.borderJoinStyle),e.lineWidth=Se(n.borderWidth,t.borderWidth),e.strokeStyle=Se(n.borderColor,t.borderColor)}function Tce(e,t,n){e.lineTo(n.x,n.y)}function Mce(e){return e.stepped?Gae:e.tension||e.cubicInterpolationMode==="monotone"?Xae:Tce}function DR(e,t,n={}){const r=e.length,{start:i=0,end:o=r-1}=n,{start:a,end:s}=t,l=Math.max(i,a),c=Math.min(o,s),u=i<a&&o<a||i>s&&o>s;return{count:r,start:l,loop:t.loop,ilen:c<l&&!u?r+c-l:c-l}}function Nce(e,t,n,r){const{points:i,options:o}=t,{count:a,start:s,loop:l,ilen:c}=DR(i,n,r),u=Mce(o);let{move:d=!0,reverse:f}=r||{},p,m,h;for(p=0;p<=c;++p)m=i[(s+(f?c-p:p))%a],!m.skip&&(d?(e.moveTo(m.x,m.y),d=!1):u(e,h,m,f,o.stepped),h=m);return l&&(m=i[(s+(f?c:0))%a],u(e,h,m,f,o.stepped)),!!l}function jce(e,t,n,r){const i=t.points,{count:o,start:a,ilen:s}=DR(i,n,r),{move:l=!0,reverse:c}=r||{};let u=0,d=0,f,p,m,h,g,b;const S=x=>(a+(c?s-x:x))%o,w=()=>{h!==g&&(e.lineTo(u,g),e.lineTo(u,h),e.lineTo(u,b))};for(l&&(p=i[S(0)],e.moveTo(p.x,p.y)),f=0;f<=s;++f){if(p=i[S(f)],p.skip)continue;const x=p.x,_=p.y,E=x|0;E===m?(_<h?h=_:_>g&&(g=_),u=(d*u+x)/++d):(w(),e.lineTo(x,_),m=E,d=0,h=g=_),b=_}w()}function zy(e){const t=e.options,n=t.borderDash&&t.borderDash.length;return!e._decimated&&!e._loop&&!t.tension&&t.cubicInterpolationMode!=="monotone"&&!t.stepped&&!n?jce:Nce}function Rce(e){return e.stepped?Cse:e.tension||e.cubicInterpolationMode==="monotone"?Dse:Pa}function Ice(e,t,n,r){let i=t._path;i||(i=t._path=new Path2D,t.path(i,n,r)&&i.closePath()),CR(e,t.options),e.stroke(i)}function Lce(e,t,n,r){const{segments:i,options:o}=t,a=zy(t);for(const s of i)CR(e,o,s.style),e.beginPath(),a(e,t,s,{start:n,end:n+r-1})&&e.closePath(),e.stroke()}const Fce=typeof Path2D=="function";function $ce(e,t,n,r){Fce&&!t.options.segment?Ice(e,t,n,r):Lce(e,t,n,r)}class r1 extends aa{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,n){const r=this.options;if((r.tension||r.cubicInterpolationMode==="monotone")&&!r.stepped&&!this._pointsUpdated){const i=r.spanGaps?this._loop:this._fullLoop;xse(this._points,r,t,i,n),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=Lse(this,this.options.segment))}first(){const t=this.segments,n=this.points;return t.length&&n[t[0].start]}last(){const t=this.segments,n=this.points,r=t.length;return r&&n[t[r-1].end]}interpolate(t,n){const r=this.options,i=t[n],o=this.points,a=jse(this,{property:n,start:i,end:i});if(!a.length)return;const s=[],l=Rce(r);let c,u;for(c=0,u=a.length;c<u;++c){const{start:d,end:f}=a[c],p=o[d],m=o[f];if(p===m){s.push(p);continue}const h=Math.abs((i-p[n])/(m[n]-p[n])),g=l(p,m,h,r.stepped);g[n]=t[n],s.push(g)}return s.length===1?s[0]:s}pathSegment(t,n,r){return zy(this)(t,this,n,r)}path(t,n,r){const i=this.segments,o=zy(this);let a=this._loop;n=n||0,r=r||this.points.length-n;for(const s of i)a&=o(t,this,s,{start:n,end:n+r-1});return!!a}draw(t,n,r,i){const o=this.options||{};(this.points||[]).length&&o.borderWidth&&(t.save(),$ce(t,this,r,i),t.restore()),this.animated&&(this._pointsUpdated=!1,this._path=void 0)}}function zP(e,t,n,r){const i=e.options,{[n]:o}=e.getProps([n],r);return Math.abs(t-o)<i.radius+i.hitRadius}class i1 extends aa{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,n,r){const i=this.options,{x:o,y:a}=this.getProps(["x","y"],r);return Math.pow(t-o,2)+Math.pow(n-a,2)<Math.pow(i.hitRadius+i.radius,2)}inXRange(t,n){return zP(this,t,"x",n)}inYRange(t,n){return zP(this,t,"y",n)}getCenterPoint(t){const{x:n,y:r}=this.getProps(["x","y"],t);return{x:n,y:r}}size(t){t=t||this.options||{};let n=t.radius||0;n=Math.max(n,n&&t.hoverRadius||0);const r=n&&t.borderWidth||0;return(n+r)*2}draw(t,n){const r=this.options;this.skip||r.radius<.1||!tu(this,n,this.size(r)/2)||(t.strokeStyle=r.borderColor,t.lineWidth=r.borderWidth,t.fillStyle=r.backgroundColor,$y(t,r,this.x,this.y))}getRange(){const t=this.options||{};return t.radius+t.hitRadius}}function AR(e,t){const{x:n,y:r,base:i,width:o,height:a}=e.getProps(["x","y","base","width","height"],t);let s,l,c,u,d;return e.horizontal?(d=a/2,s=Math.min(n,i),l=Math.max(n,i),c=r-d,u=r+d):(d=o/2,s=n-d,l=n+d,c=Math.min(r,i),u=Math.max(r,i)),{left:s,top:c,right:l,bottom:u}}function Lo(e,t,n,r){return e?0:En(t,n,r)}function Bce(e,t,n){const r=e.options.borderWidth,i=e.borderSkipped,o=sR(r);return{t:Lo(i.top,o.top,0,n),r:Lo(i.right,o.right,0,t),b:Lo(i.bottom,o.bottom,0,n),l:Lo(i.left,o.left,0,t)}}function Wce(e,t,n){const{enableBorderRadius:r}=e.getProps(["enableBorderRadius"]),i=e.options.borderRadius,o=Is(i),a=Math.min(t,n),s=e.borderSkipped,l=r||Te(i);return{topLeft:Lo(!l||s.top||s.left,o.topLeft,0,a),topRight:Lo(!l||s.top||s.right,o.topRight,0,a),bottomLeft:Lo(!l||s.bottom||s.left,o.bottomLeft,0,a),bottomRight:Lo(!l||s.bottom||s.right,o.bottomRight,0,a)}}function zce(e){const t=AR(e),n=t.right-t.left,r=t.bottom-t.top,i=Bce(e,n/2,r/2),o=Wce(e,n/2,r/2);return{outer:{x:t.left,y:t.top,w:n,h:r,radius:o},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b,radius:{topLeft:Math.max(0,o.topLeft-Math.max(i.t,i.l)),topRight:Math.max(0,o.topRight-Math.max(i.t,i.r)),bottomLeft:Math.max(0,o.bottomLeft-Math.max(i.b,i.l)),bottomRight:Math.max(0,o.bottomRight-Math.max(i.b,i.r))}}}}function fv(e,t,n,r){const i=t===null,o=n===null,s=e&&!(i&&o)&&AR(e,r);return s&&(i||Ro(t,s.left,s.right))&&(o||Ro(n,s.top,s.bottom))}function Vce(e){return e.topLeft||e.topRight||e.bottomLeft||e.bottomRight}function Hce(e,t){e.rect(t.x,t.y,t.w,t.h)}function pv(e,t,n={}){const r=e.x!==n.x?-t:0,i=e.y!==n.y?-t:0,o=(e.x+e.w!==n.x+n.w?t:0)-r,a=(e.y+e.h!==n.y+n.h?t:0)-i;return{x:e.x+r,y:e.y+i,w:e.w+o,h:e.h+a,radius:e.radius}}class Pl extends aa{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:n,options:{borderColor:r,backgroundColor:i}}=this,{inner:o,outer:a}=zce(this),s=Vce(a.radius)?bp:Hce;t.save(),(a.w!==o.w||a.h!==o.h)&&(t.beginPath(),s(t,pv(a,n,o)),t.clip(),s(t,pv(o,-n,a)),t.fillStyle=r,t.fill("evenodd")),t.beginPath(),s(t,pv(o,n)),t.fillStyle=i,t.fill(),t.restore()}inRange(t,n,r){return fv(this,t,n,r)}inXRange(t,n){return fv(this,t,null,n)}inYRange(t,n){return fv(this,null,t,n)}getCenterPoint(t){const{x:n,y:r,base:i,horizontal:o}=this.getProps(["x","y","base","horizontal"],t);return{x:o?(n+i)/2:n,y:o?r:(r+i)/2}}getRange(t){return t==="x"?this.width/2:this.height/2}}const VP=(e,t)=>{let{boxHeight:n=t,boxWidth:r=t}=e;return e.usePointStyle&&(n=Math.min(n,t),r=e.pointStyleWidth||Math.min(r,t)),{boxWidth:r,boxHeight:n,itemHeight:Math.max(t,n)}},Yce=(e,t)=>e!==null&&t!==null&&e.datasetIndex===t.datasetIndex&&e.index===t.index;class HP extends aa{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,n,r){this.maxWidth=t,this.maxHeight=n,this._margins=r,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 n=dt(t.generateLabels,[this.chart],this)||[];t.filter&&(n=n.filter(r=>t.filter(r,this.chart.data))),t.sort&&(n=n.sort((r,i)=>t.sort(r,i,this.chart.data))),this.options.reverse&&n.reverse(),this.legendItems=n}fit(){const{options:t,ctx:n}=this;if(!t.display){this.width=this.height=0;return}const r=t.labels,i=Zn(r.font),o=i.size,a=this._computeTitleHeight(),{boxWidth:s,itemHeight:l}=VP(r,o);let c,u;n.font=i.string,this.isHorizontal()?(c=this.maxWidth,u=this._fitRows(a,o,s,l)+10):(u=this.maxHeight,c=this._fitCols(a,i,s,l)+10),this.width=Math.min(c,t.maxWidth||this.maxWidth),this.height=Math.min(u,t.maxHeight||this.maxHeight)}_fitRows(t,n,r,i){const{ctx:o,maxWidth:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.lineWidths=[0],u=i+s;let d=t;o.textAlign="left",o.textBaseline="middle";let f=-1,p=-u;return this.legendItems.forEach((m,h)=>{const g=r+n/2+o.measureText(m.text).width;(h===0||c[c.length-1]+g+2*s>a)&&(d+=u,c[c.length-(h>0?0:1)]=0,p+=u,f++),l[h]={left:0,top:p,row:f,width:g,height:i},c[c.length-1]+=g+s}),d}_fitCols(t,n,r,i){const{ctx:o,maxHeight:a,options:{labels:{padding:s}}}=this,l=this.legendHitBoxes=[],c=this.columnSizes=[],u=a-t;let d=s,f=0,p=0,m=0,h=0;return this.legendItems.forEach((g,b)=>{const{itemWidth:S,itemHeight:w}=Uce(r,n,o,g,i);b>0&&p+w+2*s>u&&(d+=f+s,c.push({width:f,height:p}),m+=f+s,h++,f=p=0),l[b]={left:m,top:p,col:h,width:S,height:w},f=Math.max(f,S),p+=w+s}),d+=f,c.push({width:f,height:p}),d}adjustHitBoxes(){if(!this.options.display)return;const t=this._computeTitleHeight(),{legendHitBoxes:n,options:{align:r,labels:{padding:i},rtl:o}}=this,a=Ls(o,this.left,this.width);if(this.isHorizontal()){let s=0,l=ar(r,this.left+i,this.right-this.lineWidths[s]);for(const c of n)s!==c.row&&(s=c.row,l=ar(r,this.left+i,this.right-this.lineWidths[s])),c.top+=this.top+t+i,c.left=a.leftForLtr(a.x(l),c.width),l+=c.width+i}else{let s=0,l=ar(r,this.top+t+i,this.bottom-this.columnSizes[s].height);for(const c of n)c.col!==s&&(s=c.col,l=ar(r,this.top+t+i,this.bottom-this.columnSizes[s].height)),c.top=l,c.left+=this.left+i,c.left=a.leftForLtr(a.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;Kx(t,this),this._draw(),qx(t)}}_draw(){const{options:t,columnSizes:n,lineWidths:r,ctx:i}=this,{align:o,labels:a}=t,s=Rt.color,l=Ls(t.rtl,this.left,this.width),c=Zn(a.font),{padding:u}=a,d=c.size,f=d/2;let p;this.drawTitle(),i.textAlign=l.textAlign("left"),i.textBaseline="middle",i.lineWidth=.5,i.font=c.string;const{boxWidth:m,boxHeight:h,itemHeight:g}=VP(a,d),b=function(E,C,D){if(isNaN(m)||m<=0||isNaN(h)||h<0)return;i.save();const T=Se(D.lineWidth,1);if(i.fillStyle=Se(D.fillStyle,s),i.lineCap=Se(D.lineCap,"butt"),i.lineDashOffset=Se(D.lineDashOffset,0),i.lineJoin=Se(D.lineJoin,"miter"),i.lineWidth=T,i.strokeStyle=Se(D.strokeStyle,s),i.setLineDash(Se(D.lineDash,[])),a.usePointStyle){const j={radius:h*Math.SQRT2/2,pointStyle:D.pointStyle,rotation:D.rotation,borderWidth:T},A=l.xPlus(E,m/2),P=C+f;aR(i,j,A,P,a.pointStyleWidth&&m)}else{const j=C+Math.max((d-h)/2,0),A=l.leftForLtr(E,m),P=Is(D.borderRadius);i.beginPath(),Object.values(P).some(N=>N!==0)?bp(i,{x:A,y:j,w:m,h,radius:P}):i.rect(A,j,m,h),i.fill(),T!==0&&i.stroke()}i.restore()},S=function(E,C,D){yp(i,D.text,E,C+g/2,c,{strikethrough:D.hidden,textAlign:l.textAlign(D.textAlign)})},w=this.isHorizontal(),x=this._computeTitleHeight();w?p={x:ar(o,this.left+u,this.right-r[0]),y:this.top+u+x,line:0}:p={x:this.left+u,y:ar(o,this.top+x+u,this.bottom-n[0].height),line:0},pR(this.ctx,t.textDirection);const _=g+u;this.legendItems.forEach((E,C)=>{i.strokeStyle=E.fontColor,i.fillStyle=E.fontColor;const D=i.measureText(E.text).width,T=l.textAlign(E.textAlign||(E.textAlign=a.textAlign)),j=m+f+D;let A=p.x,P=p.y;l.setWidth(this.width),w?C>0&&A+j+u>this.right&&(P=p.y+=_,p.line++,A=p.x=ar(o,this.left+u,this.right-r[p.line])):C>0&&P+_>this.bottom&&(A=p.x=A+n[p.line].width+u,p.line++,P=p.y=ar(o,this.top+x+u,this.bottom-n[p.line].height));const N=l.x(A);if(b(N,P,E),A=Iae(T,A+m+f,w?A+j:this.right,t.rtl),S(l.x(A),P,E),w)p.x+=j+u;else if(typeof E.text!="string"){const M=c.lineHeight;p.y+=TR(E,M)+u}else p.y+=_}),hR(this.ctx,t.textDirection)}drawTitle(){const t=this.options,n=t.title,r=Zn(n.font),i=Qr(n.padding);if(!n.display)return;const o=Ls(t.rtl,this.left,this.width),a=this.ctx,s=n.position,l=r.size/2,c=i.top+l;let u,d=this.left,f=this.width;if(this.isHorizontal())f=Math.max(...this.lineWidths),u=this.top+c,d=ar(t.align,d,this.right-f);else{const m=this.columnSizes.reduce((h,g)=>Math.max(h,g.height),0);u=c+ar(t.align,this.top,this.bottom-m-t.labels.padding-this._computeTitleHeight())}const p=ar(s,d,d+f);a.textAlign=o.textAlign(iR(s)),a.textBaseline="middle",a.strokeStyle=n.color,a.fillStyle=n.color,a.font=r.string,yp(a,n.text,p,u,r)}_computeTitleHeight(){const t=this.options.title,n=Zn(t.font),r=Qr(t.padding);return t.display?n.lineHeight+r.height:0}_getLegendItemAt(t,n){let r,i,o;if(Ro(t,this.left,this.right)&&Ro(n,this.top,this.bottom)){for(o=this.legendHitBoxes,r=0;r<o.length;++r)if(i=o[r],Ro(t,i.left,i.left+i.width)&&Ro(n,i.top,i.top+i.height))return this.legendItems[r]}return null}handleEvent(t){const n=this.options;if(!Gce(t.type,n))return;const r=this._getLegendItemAt(t.x,t.y);if(t.type==="mousemove"||t.type==="mouseout"){const i=this._hoveredItem,o=Yce(i,r);i&&!o&&dt(n.onLeave,[t,i,this],this),this._hoveredItem=r,r&&!o&&dt(n.onHover,[t,r,this],this)}else r&&dt(n.onClick,[t,r,this],this)}}function Uce(e,t,n,r,i){const o=Kce(r,e,t,n),a=qce(i,r,t.lineHeight);return{itemWidth:o,itemHeight:a}}function Kce(e,t,n,r){let i=e.text;return i&&typeof i!="string"&&(i=i.reduce((o,a)=>o.length>a.length?o:a)),t+n.size/2+r.measureText(i).width}function qce(e,t,n){let r=e;return typeof t.text!="string"&&(r=TR(t,n)),r}function TR(e,t){const n=e.text?e.text.length:0;return t*n}function Gce(e,t){return!!((e==="mousemove"||e==="mouseout")&&(t.onHover||t.onLeave)||t.onClick&&(e==="click"||e==="mouseup"))}var Jr={id:"legend",_element:HP,start(e,t,n){const r=e.legend=new HP({ctx:e.ctx,options:n,chart:e});Io.configure(e,r,n),Io.addBox(e,r)},stop(e){Io.removeBox(e,e.legend),delete e.legend},beforeUpdate(e,t,n){const r=e.legend;Io.configure(e,r,n),r.options=n},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,n){const r=t.datasetIndex,i=n.chart;i.isDatasetVisible(r)?(i.hide(r),t.hidden=!0):(i.show(r),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:n,pointStyle:r,textAlign:i,color:o,useBorderRadius:a,borderRadius:s}}=e.legend.options;return e._getSortedDatasetMetas().map(l=>{const c=l.controller.getStyle(n?0:void 0),u=Qr(c.borderWidth);return{text:t[l.index].label,fillStyle:c.backgroundColor,fontColor:o,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:r||c.pointStyle,rotation:c.rotation,textAlign:i||c.textAlign,borderRadius:a&&(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 fc={average(e){if(!e.length)return!1;let t,n,r=new Set,i=0,o=0;for(t=0,n=e.length;t<n;++t){const s=e[t].element;if(s&&s.hasValue()){const l=s.tooltipPosition();r.add(l.x),i+=l.y,++o}}return o===0||r.size===0?!1:{x:[...r].reduce((s,l)=>s+l)/r.size,y:i/o}},nearest(e,t){if(!e.length)return!1;let n=t.x,r=t.y,i=Number.POSITIVE_INFINITY,o,a,s;for(o=0,a=e.length;o<a;++o){const l=e[o].element;if(l&&l.hasValue()){const c=l.getCenterPoint(),u=Ly(t,c);u<i&&(i=u,s=l)}}if(s){const l=s.tooltipPosition();n=l.x,r=l.y}return{x:n,y:r}}};function ii(e,t){return t&&(tn(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function Bi(e){return(typeof e=="string"||e instanceof String)&&e.indexOf(`
281
281
  `)>-1?e.split(`
282
- `):e}function Xce(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function YP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Zn(t.bodyFont),c=Zn(t.titleFont),u=Zn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Qr(t.padding);let h=m.height,g=0,b=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){g=Math.max(g,n.measureText(x).width+S)};return n.save(),n.font=c.string,Ge(e.title,w),n.font=l.string,Ge(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Ge(r,x=>{Ge(x.before,w),Ge(x.lines,w),Ge(x.after,w)}),S=0,n.font=u.string,Ge(e.footer,w),n.restore(),g+=m.width,{width:g,height:h}}function Qce(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Zce(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function Jce(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),Zce(c,e,t,n)&&(c="center"),c}function UP(e,t,n){const r=n.yAlign||t.yAlign||Qce(e,n);return{xAlign:n.xAlign||t.xAlign||Jce(e,t,n,r),yAlign:r}}function eue(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function tue(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function KP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Is(a);let m=eue(t,s);const h=tue(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:En(m,0,r.width-t.width),y:En(h,0,r.height-t.height)}}function $d(e,t,n){const r=Qr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qP(e){return ii([],Bi(e))}function nue(e,t,n){return cs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function GP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const MR={beforeTitle:Fi,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Fi,beforeBody:Fi,beforeLabel:Fi,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 n=e.formattedValue;return He(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Fi,afterBody:Fi,beforeFooter:Fi,footer:Fi,afterFooter:Fi};function Vn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?MR[t].call(n,r):i}class XP extends aa{static positioners=fc;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 n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new gR(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=nue(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Vn(r,"beforeTitle",this,t),o=Vn(r,"title",this,t),a=Vn(r,"afterTitle",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}getBeforeBody(t,n){return qP(Vn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ge(t,o=>{const a={before:[],lines:[],after:[]},s=GP(r,o);ii(a.before,Bi(Vn(s,"beforeLabel",this,o))),ii(a.lines,Vn(s,"label",this,o)),ii(a.after,Bi(Vn(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return qP(Vn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Vn(r,"beforeFooter",this,t),o=Vn(r,"footer",this,t),a=Vn(r,"afterFooter",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(Xce(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Ge(s,u=>{const d=GP(t.callbacks,u);i.push(Vn(d,"labelColor",this,u)),o.push(Vn(d,"labelPointStyle",this,u)),a.push(Vn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=fc[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=YP(this,r),c=Object.assign({},s,l),u=UP(this.chart,r,c),d=KP(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Is(s),{x:f,y:p}=t,{width:m,height:h}=n;let g,b,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(g=f,b=g-a,w=x+a,_=x-a):(g=f+m,b=g+a,w=x-a,_=x+a),S=g):(i==="left"?b=f+Math.max(l,u)+a:i==="right"?b=f+m-Math.max(c,d)-a:b=this.caretX,o==="top"?(w=p,x=w-a,g=b-a,S=b+a):(w=p+h,x=w+a,g=b+a,S=b-a),_=w),{x1:g,x2:b,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=Ls(r.rtl,this.x,this.width);for(t.x=$d(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Zn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=Zn(o.bodyFont),d=$d(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,b=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,$y(t,h,g,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,$y(t,h,g,b)}else{t.lineWidth=Te(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const h=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),b=Is(a.borderRadius);Object.values(b).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,bp(t,{x:h,y:m,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),bp(t,{x:g,y:m+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(g,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Zn(r.bodyFont);let f=d.lineHeight,p=0;const m=Ls(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},g=m.textAlign(a);let b,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=$d(this,g,r),n.fillStyle=r.bodyColor,Ge(this.beforeBody,h),p=s&&g!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(b=i[x],S=this.labelTextColors[x],n.fillStyle=S,Ge(b.before,h),w=b.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Ge(b.after,h)}p=0,f=d.lineHeight,Ge(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=Ls(r.rtl,this.x,this.width);for(t.x=$d(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Zn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=Is(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=fc[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=YP(this,t),l=Object.assign({},a,this._size),c=UP(n,t,l),u=KP(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Qr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),pR(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),hR(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=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}}),o=!mp(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!mp(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=fc[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Yr={id:"tooltip",_element:XP,positioners:fc,afterInit(e,t,n){n&&(e.tooltip=new XP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,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:MR},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 rue=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function iue(e,t,n,r){const i=e.indexOf(t);if(i===-1)return rue(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const oue=(e,t)=>e===null?null:En(Math.round(e),0,t);function QP(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Oo extends El{static id="category";static defaults={ticks:{callback:QP}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(He(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:iue(r,t,Se(n,t),this._addedLabels),oue(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return QP.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 n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function aue(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:h,max:g}=t,b=!He(a),S=!He(s),w=!He(c),x=(g-h)/(d+1);let _=Z2((g-h)/m/p)*p,E,C,D,T;if(_<1e-14&&!b&&!S)return[{value:h},{value:g}];T=Math.ceil(g/_)-Math.floor(h/_),T>m&&(_=Z2(T*_/m/p)*p),He(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(g/_)*_):(C=h,D=g),b&&S&&o&&kae((s-a)/o,_/1e3)?(T=Math.round(Math.min((s-a)/_,u)),_=(s-a)/T,C=a,D=s):w?(C=b?a:C,D=S?s:D,T=c-1,_=(D-C)/T):(T=(D-C)/_,wc(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const j=Math.max(J2(_),J2(C));E=Math.pow(10,He(l)?j:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let A=0;for(b&&(f&&C!==a?(n.push({value:a}),C<a&&A++,wc(Math.round((C+A*_)*E)/E,a,ZP(a,x,e))&&A++):C<a&&A++);A<T;++A){const P=Math.round((C+A*_)*E)/E;if(S&&P>s)break;n.push({value:P})}return S&&f&&D!==s?n.length&&wc(n[n.length-1].value,s,ZP(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function ZP(e,t,{horizontal:n,minRotation:r}){const i=Qi(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class sue extends El{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,n){return He(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=wi(i),c=wi(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=aue(i,o);return t.bounds==="ticks"&&Cae(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ux(t,this.chart.options.locale,this.options.ticks.format)}}class Eo extends sue{static id="linear";static defaults={ticks:{callback:oR.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=$r(t)?t:0,this.max=$r(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Qi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.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 Gh={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}},Gn=Object.keys(Gh);function JP(e,t){return e-t}function ek(e,t){if(He(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),$r(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Jc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function tk(e,t,n,r){const i=Gn.length;for(let o=Gn.indexOf(e);o<i-1;++o){const a=Gh[Gn[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return Gn[o]}return Gn[i-1]}function lue(e,t,n,r,i){for(let o=Gn.length-1;o>=Gn.indexOf(n);o--){const a=Gn[o];if(Gh[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Gn[n?Gn.indexOf(n):0]}function cue(e){for(let t=Gn.indexOf(e)+1,n=Gn.length;t<n;++t)if(Gh[Gn[t]].common)return Gn[t]}function nk(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Hx(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function uue(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function rk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:uue(e,r,i,n)}class ik extends El{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,n={}){const r=t.time||(t.time={}),i=this._adapter=new gle._date(t.adapters.date);i.init(n),xc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ek(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=$r(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=$r(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.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 o=this.min,a=this.max,s=Nae(i,o,a);return this._unit=n.unit||(r.autoSkip?tk(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):lue(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:cue(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),rk(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=En(n,0,a),r=En(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||tk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Jc(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)nk(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&nk(u,f,m),Object.keys(u).sort(JP).map(h=>+h)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return dt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Qi(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,rk(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(ek(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return tR(t.sort(JP))}}function Bd(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Ra(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ra(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class kfe extends ik{static id="timeseries";static defaults=ik.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Bd(n,this.min),this._tableRange=Bd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Bd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Bd(this._table,r*this._tableRange+this._minPos,!0)}}const NR="label";function ok(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function due(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function jR(e,t){e.labels=t}function RR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NR;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function fue(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NR;const n={labels:[],datasets:[]};return jR(n,e.labels),RR(n,e.datasets,t),n}function pue(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),h=()=>{p.current&&(m.current=new $n(p.current,{type:a,data:fue(s,o),options:l&&{...l},plugins:c}),ok(t,m.current))},g=()=>{ok(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&due(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&jR(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&RR(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(g(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>g()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const hue=k.forwardRef(pue);function o1(e,t){return $n.register(t),k.forwardRef((n,r)=>k.createElement(hue,{...n,ref:r,type:e}))}const a1=o1("line",mle),kl=o1("bar",fle),s1=o1("doughnut",hle);$n.register(n1,Yr,Jr);const mue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},IR=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthColor:c="#1FA05B",growthText:u="Compared to last month",totalLabel:d="Total",centerTopColor:f="#0F172A",centerBottomColor:p="#64748B",widgetType:m=""})=>{const h=r+a,g={labels:[n,o],datasets:[{data:[r,a],backgroundColor:[i,s],borderWidth:2,hoverOffset:4}]},b={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:E=>`${E.label}: ${E.parsed}`},displayColors:!1},centerText:{top:`${h}`,bottom:d,topSize:20,bottomSize:10,topColor:f,bottomColor:p}}},S=[{label:n,value:r,color:i},{label:o,value:a,color:s}],w=l.toString().includes("+"),x=l.toString().includes("-"),_=w?"#1FA05B":"#AB0000";return v.jsx(Ie,{title:e,icon:t,className:m==="commercial"?"h-[362px]":"h-[238px]",children:v.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5 space-y-3",children:[S.map((E,C)=>v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] text-[#64748B]",children:E.label}),v.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:E.color},children:E.value})]},C)),v.jsxs("div",{className:"text-[10px] flex gap-[4px] items-center",style:{color:_},children:[w&&v.jsx(du,{}),x&&v.jsx(Qp,{}),v.jsx("div",{children:l.replace("+","").replace("-","")}),v.jsx("div",{className:"text-[#64748B] text-[10px] ml-[4px]",children:u})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:`${m==="commercial"?"h-[260px] w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:v.jsx(s1,{data:g,options:b,plugins:[mue]})})})]})})},ak=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),v.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),v.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},sk=({title:e,value:t,suffix:n,valueClass:r=""})=>v.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:[v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),v.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&v.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),gue=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return v.jsxs("div",{children:[v.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[v.jsx(bb,{className:"h-6 w-6 text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-center justify-between gap-",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),v.jsxs("div",{className:"flex items-end",children:[v.jsx(ak,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),v.jsx(ak,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),v.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[v.jsx(sk,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),v.jsx(sk,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};$n.register(n1,Yr,Jr);const vue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},yue=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],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:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return v.jsx(Ie,{title:"Resident Overview",icon:v.jsx(UC,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:v.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),v.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",v.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:v.jsx(s1,{data:a,options:s,plugins:[vue]})})})]})})};$n.register(Oo,Eo,Pl,Yr,Jr);const bue=({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),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={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 v.jsx(Ie,{title:"Block-wise Occupancy",period:v.jsx(Wr,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:v.jsx(kl,{data:o,options:a})})};$n.register(Oo,Eo,i1,r1,Yr,Jr);const xue=e=>{const[t,n]=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${n}`},wue=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={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:n,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:o=>xue(o[0].label),label:o=>`${o.dataset.label}: ${o.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 v.jsx(Ie,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:v.jsx(Wr,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:v.jsx(a1,{data:r,options:i})})};$n.register(Oo,Eo,i1,r1,Yr,Jr);const _ue=e=>{const[t,n]=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${n}`},LR=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={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:n,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:o=>_ue(o[0].label),label:o=>`${o.dataset.label}: ${o.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 v.jsx(a1,{data:r,options:i})};function lk({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[v.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),v.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[v.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),v.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function Sue(){return v.jsxs(Ie,{title:"Accounting",className:"w-full h-[523px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(lk,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),v.jsx(lk,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),v.jsx("div",{className:"h-[254px] mt-[35.5px]",children:v.jsx(LR,{})})]})}$n.register(Oo,Eo,Pl,Yr,Jr);const Oue=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={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:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(Ie,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(kl,{data:r,options:i})})},Eue=()=>{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((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return v.jsxs(Ie,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[v.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),v.jsx("div",{className:"flex flex-col items-end",children:v.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),v.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),v.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};$n.register(Oo,Eo,Pl,Yr,Jr);const Pue=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={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:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsxs(Ie,{title:"Dues Ageing",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>v.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:v.jsxs("div",{className:"flex justify-between items-start",children:[v.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),v.jsxs("div",{className:"text-right",children:[v.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),v.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),v.jsx("div",{className:"h-[192px]",children:v.jsx(kl,{data:r,options:i})})]})};$n.register(n1,Yr,Jr);const kue=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return v.jsxs(Ie,{title:"Expense Categories",className:"w-full h-[523px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[v.jsx(s1,{data:n,options:i}),v.jsxs("div",{className:"absolute text-center",children:[v.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),v.jsx("div",{className:"space-y-2",children:e.map((o,a)=>v.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[v.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[v.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),v.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},ec=[{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 Cue(){const e=ec.reduce((t,n)=>t+n.value,0);return v.jsx(Ie,{title:"Asset Value Breakdown",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:ec,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:ec.map((t,n)=>v.jsx(Vt,{fill:t.color},`cell-${n}`))}),v.jsx(on,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),v.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[v.jsx("div",{className:"flex flex-col gap-[8px]",children:ec.slice(0,3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),v.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:ec.slice(3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}$n.register(Oo,Eo,Pl,Yr,Jr);const Due=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={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:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(Ie,{title:"Revenue by Category",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(kl,{data:r,options:i})})};function Aue(e){return Ze({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 Tue(e){return Ze({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 Mue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(Ie,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function Nue(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:YC,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Tue,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Aue,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:KC,iconColor:"text-[#DBB467]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(Mue,{...t},n))})}/**
282
+ `):e}function Xce(e,t){const{element:n,datasetIndex:r,index:i}=t,o=e.getDatasetMeta(r).controller,{label:a,value:s}=o.getLabelAndValue(i);return{chart:e,label:a,parsed:o.getParsed(i),raw:e.data.datasets[r].data[i],formattedValue:s,dataset:o.getDataset(),dataIndex:i,datasetIndex:r,element:n}}function YP(e,t){const n=e.chart.ctx,{body:r,footer:i,title:o}=e,{boxWidth:a,boxHeight:s}=t,l=Zn(t.bodyFont),c=Zn(t.titleFont),u=Zn(t.footerFont),d=o.length,f=i.length,p=r.length,m=Qr(t.padding);let h=m.height,g=0,b=r.reduce((x,_)=>x+_.before.length+_.lines.length+_.after.length,0);if(b+=e.beforeBody.length+e.afterBody.length,d&&(h+=d*c.lineHeight+(d-1)*t.titleSpacing+t.titleMarginBottom),b){const x=t.displayColors?Math.max(s,l.lineHeight):l.lineHeight;h+=p*x+(b-p)*l.lineHeight+(b-1)*t.bodySpacing}f&&(h+=t.footerMarginTop+f*u.lineHeight+(f-1)*t.footerSpacing);let S=0;const w=function(x){g=Math.max(g,n.measureText(x).width+S)};return n.save(),n.font=c.string,Ge(e.title,w),n.font=l.string,Ge(e.beforeBody.concat(e.afterBody),w),S=t.displayColors?a+2+t.boxPadding:0,Ge(r,x=>{Ge(x.before,w),Ge(x.lines,w),Ge(x.after,w)}),S=0,n.font=u.string,Ge(e.footer,w),n.restore(),g+=m.width,{width:g,height:h}}function Qce(e,t){const{y:n,height:r}=t;return n<r/2?"top":n>e.height-r/2?"bottom":"center"}function Zce(e,t,n,r){const{x:i,width:o}=r,a=n.caretSize+n.caretPadding;if(e==="left"&&i+o+a>t.width||e==="right"&&i-o-a<0)return!0}function Jce(e,t,n,r){const{x:i,width:o}=n,{width:a,chartArea:{left:s,right:l}}=e;let c="center";return r==="center"?c=i<=(s+l)/2?"left":"right":i<=o/2?c="left":i>=a-o/2&&(c="right"),Zce(c,e,t,n)&&(c="center"),c}function UP(e,t,n){const r=n.yAlign||t.yAlign||Qce(e,n);return{xAlign:n.xAlign||t.xAlign||Jce(e,t,n,r),yAlign:r}}function eue(e,t){let{x:n,width:r}=e;return t==="right"?n-=r:t==="center"&&(n-=r/2),n}function tue(e,t,n){let{y:r,height:i}=e;return t==="top"?r+=n:t==="bottom"?r-=i+n:r-=i/2,r}function KP(e,t,n,r){const{caretSize:i,caretPadding:o,cornerRadius:a}=e,{xAlign:s,yAlign:l}=n,c=i+o,{topLeft:u,topRight:d,bottomLeft:f,bottomRight:p}=Is(a);let m=eue(t,s);const h=tue(t,l,c);return l==="center"?s==="left"?m+=c:s==="right"&&(m-=c):s==="left"?m-=Math.max(u,f)+i:s==="right"&&(m+=Math.max(d,p)+i),{x:En(m,0,r.width-t.width),y:En(h,0,r.height-t.height)}}function $d(e,t,n){const r=Qr(n.padding);return t==="center"?e.x+e.width/2:t==="right"?e.x+e.width-r.right:e.x+r.left}function qP(e){return ii([],Bi(e))}function nue(e,t,n){return cs(e,{tooltip:t,tooltipItems:n,type:"tooltip"})}function GP(e,t){const n=t&&t.dataset&&t.dataset.tooltip&&t.dataset.tooltip.callbacks;return n?e.override(n):e}const MR={beforeTitle:Fi,title(e){if(e.length>0){const t=e[0],n=t.chart.data.labels,r=n?n.length:0;if(this&&this.options&&this.options.mode==="dataset")return t.dataset.label||"";if(t.label)return t.label;if(r>0&&t.dataIndex<r)return n[t.dataIndex]}return""},afterTitle:Fi,beforeBody:Fi,beforeLabel:Fi,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 n=e.formattedValue;return He(n)||(t+=n),t},labelColor(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{borderColor:n.borderColor,backgroundColor:n.backgroundColor,borderWidth:n.borderWidth,borderDash:n.borderDash,borderDashOffset:n.borderDashOffset,borderRadius:0}},labelTextColor(){return this.options.bodyColor},labelPointStyle(e){const n=e.chart.getDatasetMeta(e.datasetIndex).controller.getStyle(e.dataIndex);return{pointStyle:n.pointStyle,rotation:n.rotation}},afterLabel:Fi,afterBody:Fi,beforeFooter:Fi,footer:Fi,afterFooter:Fi};function Vn(e,t,n,r){const i=e[t].call(n,r);return typeof i>"u"?MR[t].call(n,r):i}class XP extends aa{static positioners=fc;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 n=this.chart,r=this.options.setContext(this.getContext()),i=r.enabled&&n.options.animation&&r.animations,o=new gR(this.chart,i);return i._cacheable&&(this._cachedAnimations=Object.freeze(o)),o}getContext(){return this.$context||(this.$context=nue(this.chart.getContext(),this,this._tooltipItems))}getTitle(t,n){const{callbacks:r}=n,i=Vn(r,"beforeTitle",this,t),o=Vn(r,"title",this,t),a=Vn(r,"afterTitle",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}getBeforeBody(t,n){return qP(Vn(n.callbacks,"beforeBody",this,t))}getBody(t,n){const{callbacks:r}=n,i=[];return Ge(t,o=>{const a={before:[],lines:[],after:[]},s=GP(r,o);ii(a.before,Bi(Vn(s,"beforeLabel",this,o))),ii(a.lines,Vn(s,"label",this,o)),ii(a.after,Bi(Vn(s,"afterLabel",this,o))),i.push(a)}),i}getAfterBody(t,n){return qP(Vn(n.callbacks,"afterBody",this,t))}getFooter(t,n){const{callbacks:r}=n,i=Vn(r,"beforeFooter",this,t),o=Vn(r,"footer",this,t),a=Vn(r,"afterFooter",this,t);let s=[];return s=ii(s,Bi(i)),s=ii(s,Bi(o)),s=ii(s,Bi(a)),s}_createItems(t){const n=this._active,r=this.chart.data,i=[],o=[],a=[];let s=[],l,c;for(l=0,c=n.length;l<c;++l)s.push(Xce(this.chart,n[l]));return t.filter&&(s=s.filter((u,d,f)=>t.filter(u,d,f,r))),t.itemSort&&(s=s.sort((u,d)=>t.itemSort(u,d,r))),Ge(s,u=>{const d=GP(t.callbacks,u);i.push(Vn(d,"labelColor",this,u)),o.push(Vn(d,"labelPointStyle",this,u)),a.push(Vn(d,"labelTextColor",this,u))}),this.labelColors=i,this.labelPointStyles=o,this.labelTextColors=a,this.dataPoints=s,s}update(t,n){const r=this.options.setContext(this.getContext()),i=this._active;let o,a=[];if(!i.length)this.opacity!==0&&(o={opacity:0});else{const s=fc[r.position].call(this,i,this._eventPosition);a=this._createItems(r),this.title=this.getTitle(a,r),this.beforeBody=this.getBeforeBody(a,r),this.body=this.getBody(a,r),this.afterBody=this.getAfterBody(a,r),this.footer=this.getFooter(a,r);const l=this._size=YP(this,r),c=Object.assign({},s,l),u=UP(this.chart,r,c),d=KP(r,c,u,this.chart);this.xAlign=u.xAlign,this.yAlign=u.yAlign,o={opacity:1,x:d.x,y:d.y,width:l.width,height:l.height,caretX:s.x,caretY:s.y}}this._tooltipItems=a,this.$context=void 0,o&&this._resolveAnimations().update(this,o),t&&r.external&&r.external.call(this,{chart:this.chart,tooltip:this,replay:n})}drawCaret(t,n,r,i){const o=this.getCaretPosition(t,r,i);n.lineTo(o.x1,o.y1),n.lineTo(o.x2,o.y2),n.lineTo(o.x3,o.y3)}getCaretPosition(t,n,r){const{xAlign:i,yAlign:o}=this,{caretSize:a,cornerRadius:s}=r,{topLeft:l,topRight:c,bottomLeft:u,bottomRight:d}=Is(s),{x:f,y:p}=t,{width:m,height:h}=n;let g,b,S,w,x,_;return o==="center"?(x=p+h/2,i==="left"?(g=f,b=g-a,w=x+a,_=x-a):(g=f+m,b=g+a,w=x-a,_=x+a),S=g):(i==="left"?b=f+Math.max(l,u)+a:i==="right"?b=f+m-Math.max(c,d)-a:b=this.caretX,o==="top"?(w=p,x=w-a,g=b-a,S=b+a):(w=p+h,x=w+a,g=b+a,S=b-a),_=w),{x1:g,x2:b,x3:S,y1:w,y2:x,y3:_}}drawTitle(t,n,r){const i=this.title,o=i.length;let a,s,l;if(o){const c=Ls(r.rtl,this.x,this.width);for(t.x=$d(this,r.titleAlign,r),n.textAlign=c.textAlign(r.titleAlign),n.textBaseline="middle",a=Zn(r.titleFont),s=r.titleSpacing,n.fillStyle=r.titleColor,n.font=a.string,l=0;l<o;++l)n.fillText(i[l],c.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+s,l+1===o&&(t.y+=r.titleMarginBottom-s)}}_drawColorBox(t,n,r,i,o){const a=this.labelColors[r],s=this.labelPointStyles[r],{boxHeight:l,boxWidth:c}=o,u=Zn(o.bodyFont),d=$d(this,"left",o),f=i.x(d),p=l<u.lineHeight?(u.lineHeight-l)/2:0,m=n.y+p;if(o.usePointStyle){const h={radius:Math.min(c,l)/2,pointStyle:s.pointStyle,rotation:s.rotation,borderWidth:1},g=i.leftForLtr(f,c)+c/2,b=m+l/2;t.strokeStyle=o.multiKeyBackground,t.fillStyle=o.multiKeyBackground,$y(t,h,g,b),t.strokeStyle=a.borderColor,t.fillStyle=a.backgroundColor,$y(t,h,g,b)}else{t.lineWidth=Te(a.borderWidth)?Math.max(...Object.values(a.borderWidth)):a.borderWidth||1,t.strokeStyle=a.borderColor,t.setLineDash(a.borderDash||[]),t.lineDashOffset=a.borderDashOffset||0;const h=i.leftForLtr(f,c),g=i.leftForLtr(i.xPlus(f,1),c-2),b=Is(a.borderRadius);Object.values(b).some(S=>S!==0)?(t.beginPath(),t.fillStyle=o.multiKeyBackground,bp(t,{x:h,y:m,w:c,h:l,radius:b}),t.fill(),t.stroke(),t.fillStyle=a.backgroundColor,t.beginPath(),bp(t,{x:g,y:m+1,w:c-2,h:l-2,radius:b}),t.fill()):(t.fillStyle=o.multiKeyBackground,t.fillRect(h,m,c,l),t.strokeRect(h,m,c,l),t.fillStyle=a.backgroundColor,t.fillRect(g,m+1,c-2,l-2))}t.fillStyle=this.labelTextColors[r]}drawBody(t,n,r){const{body:i}=this,{bodySpacing:o,bodyAlign:a,displayColors:s,boxHeight:l,boxWidth:c,boxPadding:u}=r,d=Zn(r.bodyFont);let f=d.lineHeight,p=0;const m=Ls(r.rtl,this.x,this.width),h=function(D){n.fillText(D,m.x(t.x+p),t.y+f/2),t.y+=f+o},g=m.textAlign(a);let b,S,w,x,_,E,C;for(n.textAlign=a,n.textBaseline="middle",n.font=d.string,t.x=$d(this,g,r),n.fillStyle=r.bodyColor,Ge(this.beforeBody,h),p=s&&g!=="right"?a==="center"?c/2+u:c+2+u:0,x=0,E=i.length;x<E;++x){for(b=i[x],S=this.labelTextColors[x],n.fillStyle=S,Ge(b.before,h),w=b.lines,s&&w.length&&(this._drawColorBox(n,t,x,m,r),f=Math.max(d.lineHeight,l)),_=0,C=w.length;_<C;++_)h(w[_]),f=d.lineHeight;Ge(b.after,h)}p=0,f=d.lineHeight,Ge(this.afterBody,h),t.y-=o}drawFooter(t,n,r){const i=this.footer,o=i.length;let a,s;if(o){const l=Ls(r.rtl,this.x,this.width);for(t.x=$d(this,r.footerAlign,r),t.y+=r.footerMarginTop,n.textAlign=l.textAlign(r.footerAlign),n.textBaseline="middle",a=Zn(r.footerFont),n.fillStyle=r.footerColor,n.font=a.string,s=0;s<o;++s)n.fillText(i[s],l.x(t.x),t.y+a.lineHeight/2),t.y+=a.lineHeight+r.footerSpacing}}drawBackground(t,n,r,i){const{xAlign:o,yAlign:a}=this,{x:s,y:l}=t,{width:c,height:u}=r,{topLeft:d,topRight:f,bottomLeft:p,bottomRight:m}=Is(i.cornerRadius);n.fillStyle=i.backgroundColor,n.strokeStyle=i.borderColor,n.lineWidth=i.borderWidth,n.beginPath(),n.moveTo(s+d,l),a==="top"&&this.drawCaret(t,n,r,i),n.lineTo(s+c-f,l),n.quadraticCurveTo(s+c,l,s+c,l+f),a==="center"&&o==="right"&&this.drawCaret(t,n,r,i),n.lineTo(s+c,l+u-m),n.quadraticCurveTo(s+c,l+u,s+c-m,l+u),a==="bottom"&&this.drawCaret(t,n,r,i),n.lineTo(s+p,l+u),n.quadraticCurveTo(s,l+u,s,l+u-p),a==="center"&&o==="left"&&this.drawCaret(t,n,r,i),n.lineTo(s,l+d),n.quadraticCurveTo(s,l,s+d,l),n.closePath(),n.fill(),i.borderWidth>0&&n.stroke()}_updateAnimationTarget(t){const n=this.chart,r=this.$animations,i=r&&r.x,o=r&&r.y;if(i||o){const a=fc[t.position].call(this,this._active,this._eventPosition);if(!a)return;const s=this._size=YP(this,t),l=Object.assign({},a,this._size),c=UP(n,t,l),u=KP(t,l,c,n);(i._to!==u.x||o._to!==u.y)&&(this.xAlign=c.xAlign,this.yAlign=c.yAlign,this.width=s.width,this.height=s.height,this.caretX=a.x,this.caretY=a.y,this._resolveAnimations().update(this,u))}}_willRender(){return!!this.opacity}draw(t){const n=this.options.setContext(this.getContext());let r=this.opacity;if(!r)return;this._updateAnimationTarget(n);const i={width:this.width,height:this.height},o={x:this.x,y:this.y};r=Math.abs(r)<.001?0:r;const a=Qr(n.padding),s=this.title.length||this.beforeBody.length||this.body.length||this.afterBody.length||this.footer.length;n.enabled&&s&&(t.save(),t.globalAlpha=r,this.drawBackground(o,t,i,n),pR(t,n.textDirection),o.y+=a.top,this.drawTitle(o,t,n),this.drawBody(o,t,n),this.drawFooter(o,t,n),hR(t,n.textDirection),t.restore())}getActiveElements(){return this._active||[]}setActiveElements(t,n){const r=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}}),o=!mp(r,i),a=this._positionChanged(i,n);(o||a)&&(this._active=i,this._eventPosition=n,this._ignoreReplayEvents=!0,this.update(!0))}handleEvent(t,n,r=!0){if(n&&this._ignoreReplayEvents)return!1;this._ignoreReplayEvents=!1;const i=this.options,o=this._active||[],a=this._getActiveElements(t,o,n,r),s=this._positionChanged(a,t),l=n||!mp(a,o)||s;return l&&(this._active=a,(i.enabled||i.external)&&(this._eventPosition={x:t.x,y:t.y},this.update(!0,n))),l}_getActiveElements(t,n,r,i){const o=this.options;if(t.type==="mouseout")return[];if(!i)return n.filter(s=>this.chart.data.datasets[s.datasetIndex]&&this.chart.getDatasetMeta(s.datasetIndex).controller.getParsed(s.index)!==void 0);const a=this.chart.getElementsAtEventForMode(t,o.mode,o,r);return o.reverse&&a.reverse(),a}_positionChanged(t,n){const{caretX:r,caretY:i,options:o}=this,a=fc[o.position].call(this,t,n);return a!==!1&&(r!==a.x||i!==a.y)}}var Yr={id:"tooltip",_element:XP,positioners:fc,afterInit(e,t,n){n&&(e.tooltip=new XP({chart:e,options:n}))},beforeUpdate(e,t,n){e.tooltip&&e.tooltip.initialize(n)},reset(e,t,n){e.tooltip&&e.tooltip.initialize(n)},afterDraw(e){const t=e.tooltip;if(t&&t._willRender()){const n={tooltip:t};if(e.notifyPlugins("beforeTooltipDraw",{...n,cancelable:!0})===!1)return;t.draw(e.ctx),e.notifyPlugins("afterTooltipDraw",n)}},afterEvent(e,t){if(e.tooltip){const n=t.replay;e.tooltip.handleEvent(t.event,n,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:MR},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 rue=(e,t,n,r)=>(typeof t=="string"?(n=e.push(t)-1,r.unshift({index:n,label:t})):isNaN(t)&&(n=null),n);function iue(e,t,n,r){const i=e.indexOf(t);if(i===-1)return rue(e,t,n,r);const o=e.lastIndexOf(t);return i!==o?n:i}const oue=(e,t)=>e===null?null:En(Math.round(e),0,t);function QP(e){const t=this.getLabels();return e>=0&&e<t.length?t[e]:e}class Oo extends El{static id="category";static defaults={ticks:{callback:QP}};constructor(t){super(t),this._startValue=void 0,this._valueRange=0,this._addedLabels=[]}init(t){const n=this._addedLabels;if(n.length){const r=this.getLabels();for(const{index:i,label:o}of n)r[i]===o&&r.splice(i,1);this._addedLabels=[]}super.init(t)}parse(t,n){if(He(t))return null;const r=this.getLabels();return n=isFinite(n)&&r[n]===t?n:iue(r,t,Se(n,t),this._addedLabels),oue(n,r.length-1)}determineDataLimits(){const{minDefined:t,maxDefined:n}=this.getUserBounds();let{min:r,max:i}=this.getMinMax(!0);this.options.bounds==="ticks"&&(t||(r=0),n||(i=this.getLabels().length-1)),this.min=r,this.max=i}buildTicks(){const t=this.min,n=this.max,r=this.options.offset,i=[];let o=this.getLabels();o=t===0&&n===o.length-1?o:o.slice(t,n+1),this._valueRange=Math.max(o.length-(r?0:1),1),this._startValue=this.min-(r?.5:0);for(let a=t;a<=n;a++)i.push({value:a});return i}getLabelForValue(t){return QP.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 n=this.ticks;return t<0||t>n.length-1?null:this.getPixelForValue(n[t].value)}getValueForPixel(t){return Math.round(this._startValue+this.getDecimalForPixel(t)*this._valueRange)}getBasePixel(){return this.bottom}}function aue(e,t){const n=[],{bounds:i,step:o,min:a,max:s,precision:l,count:c,maxTicks:u,maxDigits:d,includeBounds:f}=e,p=o||1,m=u-1,{min:h,max:g}=t,b=!He(a),S=!He(s),w=!He(c),x=(g-h)/(d+1);let _=Z2((g-h)/m/p)*p,E,C,D,T;if(_<1e-14&&!b&&!S)return[{value:h},{value:g}];T=Math.ceil(g/_)-Math.floor(h/_),T>m&&(_=Z2(T*_/m/p)*p),He(l)||(E=Math.pow(10,l),_=Math.ceil(_*E)/E),i==="ticks"?(C=Math.floor(h/_)*_,D=Math.ceil(g/_)*_):(C=h,D=g),b&&S&&o&&kae((s-a)/o,_/1e3)?(T=Math.round(Math.min((s-a)/_,u)),_=(s-a)/T,C=a,D=s):w?(C=b?a:C,D=S?s:D,T=c-1,_=(D-C)/T):(T=(D-C)/_,wc(T,Math.round(T),_/1e3)?T=Math.round(T):T=Math.ceil(T));const j=Math.max(J2(_),J2(C));E=Math.pow(10,He(l)?j:l),C=Math.round(C*E)/E,D=Math.round(D*E)/E;let A=0;for(b&&(f&&C!==a?(n.push({value:a}),C<a&&A++,wc(Math.round((C+A*_)*E)/E,a,ZP(a,x,e))&&A++):C<a&&A++);A<T;++A){const P=Math.round((C+A*_)*E)/E;if(S&&P>s)break;n.push({value:P})}return S&&f&&D!==s?n.length&&wc(n[n.length-1].value,s,ZP(s,x,e))?n[n.length-1].value=s:n.push({value:s}):(!S||D===s)&&n.push({value:D}),n}function ZP(e,t,{horizontal:n,minRotation:r}){const i=Qi(r),o=(n?Math.sin(i):Math.cos(i))||.001,a=.75*t*(""+e).length;return Math.min(t/o,a)}class sue extends El{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,n){return He(t)||(typeof t=="number"||t instanceof Number)&&!isFinite(+t)?null:+t}handleTickRangeOptions(){const{beginAtZero:t}=this.options,{minDefined:n,maxDefined:r}=this.getUserBounds();let{min:i,max:o}=this;const a=l=>i=n?i:l,s=l=>o=r?o:l;if(t){const l=wi(i),c=wi(o);l<0&&c<0?s(0):l>0&&c>0&&a(0)}if(i===o){let l=o===0?1:Math.abs(o*.05);s(o+l),t||a(i-l)}this.min=i,this.max=o}getTickLimit(){const t=this.options.ticks;let{maxTicksLimit:n,stepSize:r}=t,i;return r?(i=Math.ceil(this.max/r)-Math.floor(this.min/r)+1,i>1e3&&(console.warn(`scales.${this.id}.ticks.stepSize: ${r} would result generating up to ${i} ticks. Limiting to 1000.`),i=1e3)):(i=this.computeTickLimit(),n=n||11),n&&(i=Math.min(n,i)),i}computeTickLimit(){return Number.POSITIVE_INFINITY}buildTicks(){const t=this.options,n=t.ticks;let r=this.getTickLimit();r=Math.max(2,r);const i={maxTicks:r,bounds:t.bounds,min:t.min,max:t.max,precision:n.precision,step:n.stepSize,count:n.count,maxDigits:this._maxDigits(),horizontal:this.isHorizontal(),minRotation:n.minRotation||0,includeBounds:n.includeBounds!==!1},o=this._range||this,a=aue(i,o);return t.bounds==="ticks"&&Cae(a,this,"value"),t.reverse?(a.reverse(),this.start=this.max,this.end=this.min):(this.start=this.min,this.end=this.max),a}configure(){const t=this.ticks;let n=this.min,r=this.max;if(super.configure(),this.options.offset&&t.length){const i=(r-n)/Math.max(t.length-1,1)/2;n-=i,r+=i}this._startValue=n,this._endValue=r,this._valueRange=r-n}getLabelForValue(t){return Ux(t,this.chart.options.locale,this.options.ticks.format)}}class Eo extends sue{static id="linear";static defaults={ticks:{callback:oR.formatters.numeric}};determineDataLimits(){const{min:t,max:n}=this.getMinMax(!0);this.min=$r(t)?t:0,this.max=$r(n)?n:1,this.handleTickRangeOptions()}computeTickLimit(){const t=this.isHorizontal(),n=t?this.width:this.height,r=Qi(this.options.ticks.minRotation),i=(t?Math.sin(r):Math.cos(r))||.001,o=this._resolveTickFontOptions(0);return Math.ceil(n/Math.min(40,o.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 Gh={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}},Gn=Object.keys(Gh);function JP(e,t){return e-t}function ek(e,t){if(He(t))return null;const n=e._adapter,{parser:r,round:i,isoWeekday:o}=e._parseOpts;let a=t;return typeof r=="function"&&(a=r(a)),$r(a)||(a=typeof r=="string"?n.parse(a,r):n.parse(a)),a===null?null:(i&&(a=i==="week"&&(Jc(o)||o===!0)?n.startOf(a,"isoWeek",o):n.startOf(a,i)),+a)}function tk(e,t,n,r){const i=Gn.length;for(let o=Gn.indexOf(e);o<i-1;++o){const a=Gh[Gn[o]],s=a.steps?a.steps:Number.MAX_SAFE_INTEGER;if(a.common&&Math.ceil((n-t)/(s*a.size))<=r)return Gn[o]}return Gn[i-1]}function lue(e,t,n,r,i){for(let o=Gn.length-1;o>=Gn.indexOf(n);o--){const a=Gn[o];if(Gh[a].common&&e._adapter.diff(i,r,a)>=t-1)return a}return Gn[n?Gn.indexOf(n):0]}function cue(e){for(let t=Gn.indexOf(e)+1,n=Gn.length;t<n;++t)if(Gh[Gn[t]].common)return Gn[t]}function nk(e,t,n){if(!n)e[t]=!0;else if(n.length){const{lo:r,hi:i}=Hx(n,t),o=n[r]>=t?n[r]:n[i];e[o]=!0}}function uue(e,t,n,r){const i=e._adapter,o=+i.startOf(t[0].value,r),a=t[t.length-1].value;let s,l;for(s=o;s<=a;s=+i.add(s,1,r))l=n[s],l>=0&&(t[l].major=!0);return t}function rk(e,t,n){const r=[],i={},o=t.length;let a,s;for(a=0;a<o;++a)s=t[a],i[s]=a,r.push({value:s,major:!1});return o===0||!n?r:uue(e,r,i,n)}class ik extends El{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,n={}){const r=t.time||(t.time={}),i=this._adapter=new gle._date(t.adapters.date);i.init(n),xc(r.displayFormats,i.formats()),this._parseOpts={parser:r.parser,round:r.round,isoWeekday:r.isoWeekday},super.init(t),this._normalized=n.normalized}parse(t,n){return t===void 0?null:ek(this,t)}beforeLayout(){super.beforeLayout(),this._cache={data:[],labels:[],all:[]}}determineDataLimits(){const t=this.options,n=this._adapter,r=t.time.unit||"day";let{min:i,max:o,minDefined:a,maxDefined:s}=this.getUserBounds();function l(c){!a&&!isNaN(c.min)&&(i=Math.min(i,c.min)),!s&&!isNaN(c.max)&&(o=Math.max(o,c.max))}(!a||!s)&&(l(this._getLabelBounds()),(t.bounds!=="ticks"||t.ticks.source!=="labels")&&l(this.getMinMax(!1))),i=$r(i)&&!isNaN(i)?i:+n.startOf(Date.now(),r),o=$r(o)&&!isNaN(o)?o:+n.endOf(Date.now(),r)+1,this.min=Math.min(i,o-1),this.max=Math.max(i+1,o)}_getLabelBounds(){const t=this.getLabelTimestamps();let n=Number.POSITIVE_INFINITY,r=Number.NEGATIVE_INFINITY;return t.length&&(n=t[0],r=t[t.length-1]),{min:n,max:r}}buildTicks(){const t=this.options,n=t.time,r=t.ticks,i=r.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 o=this.min,a=this.max,s=Nae(i,o,a);return this._unit=n.unit||(r.autoSkip?tk(n.minUnit,this.min,this.max,this._getLabelCapacity(o)):lue(this,s.length,n.minUnit,this.min,this.max)),this._majorUnit=!r.major.enabled||this._unit==="year"?void 0:cue(this._unit),this.initOffsets(i),t.reverse&&s.reverse(),rk(this,s,this._majorUnit)}afterAutoSkip(){this.options.offsetAfterAutoskip&&this.initOffsets(this.ticks.map(t=>+t.value))}initOffsets(t=[]){let n=0,r=0,i,o;this.options.offset&&t.length&&(i=this.getDecimalForValue(t[0]),t.length===1?n=1-i:n=(this.getDecimalForValue(t[1])-i)/2,o=this.getDecimalForValue(t[t.length-1]),t.length===1?r=o:r=(o-this.getDecimalForValue(t[t.length-2]))/2);const a=t.length<3?.5:.25;n=En(n,0,a),r=En(r,0,a),this._offsets={start:n,end:r,factor:1/(n+1+r)}}_generate(){const t=this._adapter,n=this.min,r=this.max,i=this.options,o=i.time,a=o.unit||tk(o.minUnit,n,r,this._getLabelCapacity(n)),s=Se(i.ticks.stepSize,1),l=a==="week"?o.isoWeekday:!1,c=Jc(l)||l===!0,u={};let d=n,f,p;if(c&&(d=+t.startOf(d,"isoWeek",l)),d=+t.startOf(d,c?"day":a),t.diff(r,n,a)>1e5*s)throw new Error(n+" and "+r+" are too far apart with stepSize of "+s+" "+a);const m=i.ticks.source==="data"&&this.getDataTimestamps();for(f=d,p=0;f<r;f=+t.add(f,s,a),p++)nk(u,f,m);return(f===r||i.bounds==="ticks"||p===1)&&nk(u,f,m),Object.keys(u).sort(JP).map(h=>+h)}getLabelForValue(t){const n=this._adapter,r=this.options.time;return r.tooltipFormat?n.format(t,r.tooltipFormat):n.format(t,r.displayFormats.datetime)}format(t,n){const i=this.options.time.displayFormats,o=this._unit,a=n||i[o];return this._adapter.format(t,a)}_tickFormatFunction(t,n,r,i){const o=this.options,a=o.ticks.callback;if(a)return dt(a,[t,n,r],this);const s=o.time.displayFormats,l=this._unit,c=this._majorUnit,u=l&&s[l],d=c&&s[c],f=r[n],p=c&&d&&f&&f.major;return this._adapter.format(t,i||(p?d:u))}generateTickLabels(t){let n,r,i;for(n=0,r=t.length;n<r;++n)i=t[n],i.label=this._tickFormatFunction(i.value,n,t)}getDecimalForValue(t){return t===null?NaN:(t-this.min)/(this.max-this.min)}getPixelForValue(t){const n=this._offsets,r=this.getDecimalForValue(t);return this.getPixelForDecimal((n.start+r)*n.factor)}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return this.min+r*(this.max-this.min)}_getLabelSize(t){const n=this.options.ticks,r=this.ctx.measureText(t).width,i=Qi(this.isHorizontal()?n.maxRotation:n.minRotation),o=Math.cos(i),a=Math.sin(i),s=this._resolveTickFontOptions(0).size;return{w:r*o+s*a,h:r*a+s*o}}_getLabelCapacity(t){const n=this.options.time,r=n.displayFormats,i=r[n.unit]||r.millisecond,o=this._tickFormatFunction(t,0,rk(this,[t],this._majorUnit),i),a=this._getLabelSize(o),s=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h)-1;return s>0?s:1}getDataTimestamps(){let t=this._cache.data||[],n,r;if(t.length)return t;const i=this.getMatchingVisibleMetas();if(this._normalized&&i.length)return this._cache.data=i[0].controller.getAllParsedValues(this);for(n=0,r=i.length;n<r;++n)t=t.concat(i[n].controller.getAllParsedValues(this));return this._cache.data=this.normalize(t)}getLabelTimestamps(){const t=this._cache.labels||[];let n,r;if(t.length)return t;const i=this.getLabels();for(n=0,r=i.length;n<r;++n)t.push(ek(this,i[n]));return this._cache.labels=this._normalized?t:this.normalize(t)}normalize(t){return tR(t.sort(JP))}}function Bd(e,t,n){let r=0,i=e.length-1,o,a,s,l;n?(t>=e[r].pos&&t<=e[i].pos&&({lo:r,hi:i}=Ra(e,"pos",t)),{pos:o,time:s}=e[r],{pos:a,time:l}=e[i]):(t>=e[r].time&&t<=e[i].time&&({lo:r,hi:i}=Ra(e,"time",t)),{time:o,pos:s}=e[r],{time:a,pos:l}=e[i]);const c=a-o;return c?s+(l-s)*(t-o)/c:s}class kfe extends ik{static id="timeseries";static defaults=ik.defaults;constructor(t){super(t),this._table=[],this._minPos=void 0,this._tableRange=void 0}initOffsets(){const t=this._getTimestampsForTable(),n=this._table=this.buildLookupTable(t);this._minPos=Bd(n,this.min),this._tableRange=Bd(n,this.max)-this._minPos,super.initOffsets(t)}buildLookupTable(t){const{min:n,max:r}=this,i=[],o=[];let a,s,l,c,u;for(a=0,s=t.length;a<s;++a)c=t[a],c>=n&&c<=r&&i.push(c);if(i.length<2)return[{time:n,pos:0},{time:r,pos:1}];for(a=0,s=i.length;a<s;++a)u=i[a+1],l=i[a-1],c=i[a],Math.round((u+l)/2)!==c&&o.push({time:c,pos:a/(s-1)});return o}_generate(){const t=this.min,n=this.max;let r=super.getDataTimestamps();return(!r.includes(t)||!r.length)&&r.splice(0,0,t),(!r.includes(n)||r.length===1)&&r.push(n),r.sort((i,o)=>i-o)}_getTimestampsForTable(){let t=this._cache.all||[];if(t.length)return t;const n=this.getDataTimestamps(),r=this.getLabelTimestamps();return n.length&&r.length?t=this.normalize(n.concat(r)):t=n.length?n:r,t=this._cache.all=t,t}getDecimalForValue(t){return(Bd(this._table,t)-this._minPos)/this._tableRange}getValueForPixel(t){const n=this._offsets,r=this.getDecimalForPixel(t)/n.factor-n.end;return Bd(this._table,r*this._tableRange+this._minPos,!0)}}const NR="label";function ok(e,t){typeof e=="function"?e(t):e&&(e.current=t)}function due(e,t){const n=e.options;n&&t&&Object.assign(n,t)}function jR(e,t){e.labels=t}function RR(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NR;const r=[];e.datasets=t.map(i=>{const o=e.datasets.find(a=>a[n]===i[n]);return!o||!i.data||r.includes(o)?{...i}:(r.push(o),Object.assign(o,i),o)})}function fue(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:NR;const n={labels:[],datasets:[]};return jR(n,e.labels),RR(n,e.datasets,t),n}function pue(e,t){const{height:n=150,width:r=300,redraw:i=!1,datasetIdKey:o,type:a,data:s,options:l,plugins:c=[],fallbackContent:u,updateMode:d,...f}=e,p=k.useRef(null),m=k.useRef(null),h=()=>{p.current&&(m.current=new $n(p.current,{type:a,data:fue(s,o),options:l&&{...l},plugins:c}),ok(t,m.current))},g=()=>{ok(t,null),m.current&&(m.current.destroy(),m.current=null)};return k.useEffect(()=>{!i&&m.current&&l&&due(m.current,l)},[i,l]),k.useEffect(()=>{!i&&m.current&&jR(m.current.config.data,s.labels)},[i,s.labels]),k.useEffect(()=>{!i&&m.current&&s.datasets&&RR(m.current.config.data,s.datasets,o)},[i,s.datasets]),k.useEffect(()=>{m.current&&(i?(g(),setTimeout(h)):m.current.update(d))},[i,l,s.labels,s.datasets,d]),k.useEffect(()=>{m.current&&(g(),setTimeout(h))},[a]),k.useEffect(()=>(h(),()=>g()),[]),k.createElement("canvas",{ref:p,role:"img",height:n,width:r,...f},u)}const hue=k.forwardRef(pue);function o1(e,t){return $n.register(t),k.forwardRef((n,r)=>k.createElement(hue,{...n,ref:r,type:e}))}const a1=o1("line",mle),kl=o1("bar",fle),s1=o1("doughnut",hle);$n.register(n1,Yr,Jr);const mue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},IR=({title:e="Tickets",icon:t,firstLabel:n="First",firstValue:r=0,firstColor:i="#12B981",secondLabel:o="Second",secondValue:a=0,secondColor:s="#AB0000",growthPercentage:l="+0%",growthColor:c="#1FA05B",growthText:u="Compared to last month",totalLabel:d="Total",centerTopColor:f="#0F172A",centerBottomColor:p="#64748B",widgetType:m=""})=>{const h=r+a,g={labels:[n,o],datasets:[{data:[r,a],backgroundColor:[i,s],borderWidth:2,hoverOffset:4}]},b={responsive:!0,maintainAspectRatio:!1,cutout:"68%",plugins:{legend:{display:!1},tooltip:{callbacks:{label:E=>`${E.label}: ${E.parsed}`},displayColors:!1},centerText:{top:`${h}`,bottom:d,topSize:20,bottomSize:10,topColor:f,bottomColor:p}}},S=[{label:n,value:r,color:i},{label:o,value:a,color:s}],w=l.toString().includes("+"),x=l.toString().includes("-"),_=w?"#1FA05B":"#AB0000";return v.jsx(Ie,{title:e,icon:t,className:m==="commercial"?"h-[362px]":"h-[238px]",children:v.jsxs("div",{className:"grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5 space-y-3",children:[S.map((E,C)=>v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] text-[#64748B]",children:E.label}),v.jsx("div",{className:"text-[28px] leading-[32px]",style:{color:E.color},children:E.value})]},C)),v.jsxs("div",{className:"text-[10px] flex gap-[4px] items-center",style:{color:_},children:[w&&v.jsx(du,{}),x&&v.jsx(Qp,{}),v.jsx("div",{children:l.replace("+","").replace("-","")}),v.jsx("div",{className:"text-[#64748B] text-[10px] ml-[4px]",children:u})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:`${m==="commercial"?"h-[260px] w-[263px]":"h-[158px] w-[158px]"} ml-auto mr-2`,children:v.jsx(s1,{data:g,options:b,plugins:[mue]})})})]})})},ak=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Math.max(0,Math.min(100,e/(t||1)*100)),o=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-3 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-3 rounded-full ${n}`,style:{width:`${i}%`}})}),v.jsx("div",{className:`${o} !text-[12px] font-bold mt-1`,children:e}),v.jsx("div",{className:"!text-[12px] text-[#64748B] mt-1",children:r})]})},sk=({title:e,value:t,suffix:n,valueClass:r=""})=>v.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:[v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#121212] mb-1",children:e}),v.jsxs("div",{className:`text-[28px] leading-[32px] flex item gap-[4px] font-medium ${r}`,children:[t," ",n&&v.jsx("div",{className:"text-[28px] leading-[32px] font-medium",children:n})]})]}),gue=({totalUnits:e=847,occupiedUnits:t=756,ownerCount:n=700,tenantCount:r=56,avgResidents:i=4.4,avgLeaseMonths:o=18})=>{const a=n+r;return v.jsxs("div",{children:[v.jsxs("div",{className:"bg-white border border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] mb-4",children:[v.jsx(bb,{className:"h-6 w-6 text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-center justify-between gap-",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-xs leading-[16px] text-[#64748B]",children:"Occupied Units"}),v.jsxs("div",{className:"flex items-center gap-1",children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"text-[#64748B] text-[20px] leading-[32px]",children:["/",e]})]})]}),v.jsxs("div",{className:"flex items-end",children:[v.jsx(ak,{value:n,total:a,colorClass:"bg-[#8B5CF6]",label:"Owner"}),v.jsx(ak,{value:r,total:a,colorClass:"bg-[#12B981]",label:"Tenant"})]})]})]}),v.jsxs("div",{className:"mt-2.5 grid grid-cols-2 gap-[12px]",children:[v.jsx(sk,{title:"Avg Residents Per Unit",value:i,valueClass:"text-[#8B5CF6]"}),v.jsx(sk,{title:"Avg Lease Period",value:o,suffix:"months",valueClass:"text-[#E7A015]"})]})]})};$n.register(n1,Yr,Jr);const vue={id:"centerText",afterDraw(e,t,n){const{ctx:r}=e,i=e.getDatasetMeta(0);if(!i?.data?.[0])return;const{x:o,y:a}=i.data[0],{top:s="",bottom:l="",topSize:c=20,bottomSize:u=10,topColor:d="#0F172A",bottomColor:f="#64748B"}=n||{};r.save(),r.textAlign="center",r.textBaseline="middle",r.fillStyle=d,r.font=`600 ${c}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(s,o,a-5),r.fillStyle=f,r.font=`500 ${u}px Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif`,r.fillText(l,o,a+12),r.restore()}},yue=({ownerCount:e=1e3,tenantCount:t=200,nonResidingOwners:n=26,growthPct:r="+9.1%"})=>{const i=Math.max(e-n,0),o=e+t,a={labels:["Owners","Tenants","Non-residing Owner"],datasets:[{data:[i,t,n],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:`${o}`,bottom:"Total Members",topSize:20,bottomSize:10}}};return v.jsx(Ie,{title:"Resident Overview",icon:v.jsx(UC,{className:"h-6 w-6 text-[#8B5CF6]"}),className:"h-[238px]",children:v.jsxs("div",{className:" flex-1 min-h-0 grid grid-cols-12 gap-[16px] items-center",children:[v.jsxs("div",{className:"col-span-5",children:[v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Owners"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#3C81F6]",children:e})]}),v.jsxs("div",{children:[v.jsx("div",{className:"!text-[12px] text-[#64748B] leading-[16px]",children:"Total Tenants"}),v.jsx("div",{className:"text-[28px] leading-[32px ] text-[#08B6D4]",children:t})]}),v.jsxs("div",{className:"text-[10px] text-[#1FA05B] flex gap-2 items-center",children:[r," ",v.jsx("div",{className:"text-[#64748B] ",children:"Compared to last month"})]})]}),v.jsx("div",{className:"col-span-7",children:v.jsx("div",{className:"h-[162px] w-[162px] ml-auto mr-2",children:v.jsx(s1,{data:a,options:s,plugins:[vue]})})})]})})};$n.register(Oo,Eo,Pl,Yr,Jr);const bue=({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),n=e.map(s=>s.owner),r=e.map(s=>s.rented),i=e.map(s=>s.vacant),o={labels:t,datasets:[{label:"Owner",data:n,backgroundColor:"#3C81F6",barThickness:40},{label:"",data:n.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Rented",data:r,backgroundColor:"#8B5CF6",barThickness:40},{label:"",data:r.map(()=>2),backgroundColor:"transparent",barThickness:40},{label:"Vacant",data:i,backgroundColor:"#08B6D4",barThickness:40}]},a={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 v.jsx(Ie,{title:"Block-wise Occupancy",period:v.jsx(Wr,{className:"text-xl text-[#884EA7]"}),className:"w-full h-[360px]",titleWeight:"semi-bold",children:v.jsx(kl,{data:o,options:a})})};$n.register(Oo,Eo,i1,r1,Yr,Jr);const xue=e=>{const[t,n]=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${n}`},wue=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[12,17,8,5,16]})=>{const r={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:n,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:o=>xue(o[0].label),label:o=>`${o.dataset.label}: ${o.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 v.jsx(Ie,{title:"Move-in/Out Trends",className:"w-full h-[360px]",period:v.jsx(Wr,{className:"text-[20px] text-[#884EA7]"}),titleWeight:"semi-bold",children:v.jsx(a1,{data:r,options:i})})};$n.register(Oo,Eo,i1,r1,Yr,Jr);const _ue=e=>{const[t,n]=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${n}`},LR=({labels:e=["Jan 25","Feb 25","Mar 25","Apr 25","May 25"],moveIn:t=[24,27,20,26,23],moveOut:n=[4,17,8,5,16,4,7]})=>{const r={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:n,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:o=>_ue(o[0].label),label:o=>`${o.dataset.label}: ${o.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 v.jsx(a1,{data:r,options:i})};function lk({label:e,value:t,positive:n,bgColor:r,delta:i,deltaLabel:o,textColor:a}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} border border-[#EBEBEB] h-[126px]`,children:[v.jsx("div",{className:`text-[16px] leading-[20px] ${a}`,children:e}),v.jsx("div",{className:"mt-[16px] leading-[28px] !text-[24px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"mt-[8px] flex items-center gap-[8px] leading-[14px] text-[10px]",children:[v.jsx("div",{className:n?"text-[#1FA05B] font-medium":"text-[#EF4444] font-medium",children:i}),v.jsx("div",{className:"text-[#64748B] ",children:o})]})]})}function Sue(){return v.jsxs(Ie,{title:"Accounting",className:"w-full h-[523px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(lk,{label:"Total Income",value:"AED 5.68M",delta:"+4.4%",positive:!0,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#1FA05B]"}),v.jsx(lk,{label:"Total Expenditure",value:"AED 1.83M",delta:"-1.1%",positive:!1,bgColor:"bg-slate-50",deltaLabel:"Compared to last month",textColor:"text-[#AB0000]"})]}),v.jsx("div",{className:"h-[254px] mt-[35.5px]",children:v.jsx(LR,{})})]})}$n.register(Oo,Eo,Pl,Yr,Jr);const Oue=()=>{const e=["Maintenance","Security","Utilities","Housekeeping","Administration","Others"],r={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:o=>e[o[0].dataIndex],label:o=>{const a=o.parsed.y;return`${o.dataset.label}: AED ${(a/1e3).toFixed(1)}K`}}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(Ie,{title:"Budget vs Actuals",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(kl,{data:r,options:i})})},Eue=()=>{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((r,i)=>r+i.amount,0),n=r=>r>=1e6?`AED ${(r/1e6).toFixed(2)}M`:r>=1e3?`AED ${(r/1e3).toFixed(1)}K`:`AED ${r}`;return v.jsxs(Ie,{title:"Cash & Bank Balance",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),children:[v.jsx("div",{className:"flex flex-col gap-[12px]",children:e.map((r,i)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:r.title}),v.jsx("div",{className:"!text-[12px] text-[#64748B]",children:r?.subtitle})]}),v.jsx("div",{className:"flex flex-col items-end",children:v.jsx("div",{className:"text-[14px] text-[#1FA05B] font-semibold",children:n(r.amount)})})]},i))}),v.jsxs("div",{className:"flex items-center justify-between border-t border-[#EBEBEB] h-[68px] px-3",children:[v.jsx("div",{className:"text-[14px] font-medium text-[#121212]",children:"Total"}),v.jsx("div",{className:"text-[16px] text-[#1FA05B] font-bold",children:n(t)})]})]})};$n.register(Oo,Eo,Pl,Yr,Jr);const Pue=()=>{const e=["Current Month","1-3 Months","3-6 Months","6+ Months"],t=[13e3,9400,8800,7200],n=[18,12,18,6],r={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:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsxs(Ie,{title:"Dues Ageing",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsx("div",{className:"grid grid-cols-4 md:grid-cols-4 gap-[12px] h-[48px]",children:e.map((o,a)=>v.jsx("div",{className:"p-2 rounded-lg bg-slate-50",children:v.jsxs("div",{className:"flex justify-between items-start",children:[v.jsx("div",{className:"font-medium leading-[16px] !text-[12px] rounded",children:o}),v.jsxs("div",{className:"text-right",children:[v.jsxs("div",{className:"text-red-600 font-medium leading-[16px] !text-[12px]",children:["AED ",(t[a]/1e3).toFixed(1),"K"]}),v.jsxs("div",{className:" text-gray-500 leading-[14px] text-[10px]",children:[n[a]," Units"]})]})]})},o))}),v.jsx("div",{className:"h-[192px]",children:v.jsx(kl,{data:r,options:i})})]})};$n.register(n1,Yr,Jr);const kue=()=>{const e=["Maintenance","Utilities","Security","Administration","Others"],t=[45e4,32e4,28e4,18e4,12e4],n={labels:e,datasets:[{label:"Expenses",data:t,backgroundColor:["#08B6D4","#8B5CF6","#EF4444","#F69E0A","#12B981"],borderColor:"#FFFFFF",borderWidth:2,cutout:"70%"}]},r=t.reduce((o,a)=>o+a,0),i={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#FFFFFF",bodyColor:"#FFFFFF",displayColors:!1,padding:10,callbacks:{label:o=>`${o.label}: AED ${o.formattedValue}`}}}};return v.jsxs(Ie,{title:"Expense Categories",className:"w-full h-[523px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:[v.jsxs("div",{className:"relative h-[259px] flex justify-center items-center",children:[v.jsx(s1,{data:n,options:i}),v.jsxs("div",{className:"absolute text-center",children:[v.jsxs("div",{className:"!text-[24px] font-medium leading-[28px] text-[#121212]",children:["AED ",(r/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[#121212] leading-[18px] text-[14px]",children:"Total Expenses"})]})]}),v.jsx("div",{className:"space-y-2",children:e.map((o,a)=>v.jsxs("div",{className:"flex justify-between items-center text-[14px] pb-2",children:[v.jsxs("div",{className:"flex items-center gap-[8px] !text-[12px] leading-[16px] text-[#64748B]",children:[v.jsx("div",{className:"w-[7px] h-[7px] rotate-45",style:{backgroundColor:n.datasets[0].backgroundColor[a]}}),o]}),v.jsxs("div",{className:"leading-[16px] !text-[12px] text-[#64748B]",children:["AED ",(t[a]/1e3).toFixed(0),"K"]})]},o))})]})},ec=[{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 Cue(){const e=ec.reduce((t,n)=>t+n.value,0);return v.jsx(Ie,{title:"Asset Value Breakdown",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[214px] h-[181px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:ec,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:ec.map((t,n)=>v.jsx(Vt,{fill:t.color},`cell-${n}`))}),v.jsx(Ht,{formatter:t=>`AED ${t.toLocaleString()}`})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-lg leading-[12px] ",children:["AED ",(e/1e6).toFixed(2),"M"]}),v.jsx("div",{className:"text-[10px] leading-[12.59px] text-[#121212] mt-[6px]",children:"Total Assets"})]})]}),v.jsxs("div",{className:"flex justify-between w-full px-4 sm:px-8 mt-4 text-[14px]",children:[v.jsx("div",{className:"flex flex-col gap-[8px]",children:ec.slice(0,3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))}),v.jsx("div",{className:"flex flex-col gap-[8px] items-start",children:ec.slice(3).map(t=>v.jsxs("div",{className:"flex items-center gap-[8px]",children:[v.jsx("div",{className:"inline-block h-[7px] w-[7px] rotate-45",style:{backgroundColor:t.color}}),v.jsx("div",{className:"text-[#64748B] leading-[16px] !text-[12px]",children:t.name})]},t.name))})]})]})})}$n.register(Oo,Eo,Pl,Yr,Jr);const Due=()=>{const e=["Gym","Parking","Swimming Pool","Community Hall","Tennis Court"],t=[13e3,9400,8800,7200,6e3],n=[18,12,18,6],r={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:o=>e[o[0].dataIndex],label:o=>`Due: AED ${(o.parsed.y/1e3).toFixed(1)}K`,afterLabel:o=>`Units Count: ${n[o.dataIndex]}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B"}},y:{beginAtZero:!0,grid:{color:"#F1F5F9"},ticks:{color:"#64748B",callback:o=>`${o/1e3}K`}}}};return v.jsx(Ie,{title:"Revenue by Category",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),titleWeight:"semi-bold",children:v.jsx(kl,{data:r,options:i})})};function Aue(e){return Ze({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 Tue(e){return Ze({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 Mue({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(Ie,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function Nue(){const e=[{title:"Total Bookings",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:YC,iconColor:"text-emerald-600"},{title:"Utilisation Rate",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Tue,iconColor:"text-[#329DFF]"},{title:"Revenue",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:Aue,iconColor:"text-[#FA7E28]"},{title:"Pending Dues",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:KC,iconColor:"text-[#DBB467]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(Mue,{...t},n))})}/**
283
283
  * @license lucide-react v0.564.0 - ISC
284
284
  *
285
285
  * This source code is licensed under the ISC license.
@@ -359,4 +359,4 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
359
359
  *
360
360
  * This source code is licensed under the ISC license.
361
361
  * See the LICENSE file in the root directory of this source tree.
362
- */const Que=[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{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",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]],Zue=sa("waves-ladder",Que),fn=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[t&&v.jsx("div",{className:c,children:t}),v.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&v.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[v.jsx(zue,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),v.jsx($R,{size:16,className:"cursor-pointer",onClick:p}),v.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),v.jsx(BR,{size:16,className:"cursor-pointer",onClick:m})]})]}),v.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&v.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})};function Jue({data:e={}}){const t=[{name:"Completed",value:Number(e?.completed??0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed??0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed??0),color:"#F69E0A"}],n=Number(e?.completed??0)+Number(e?.not_completed??0)+Number(e?.missed??0),r=Number(e?.completed??0);return v.jsx(fn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:t??[],innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t?.map?.((i,o)=>v.jsx(Vt,{fill:i?.color??"#ccc"},`cell-${o}`))}),v.jsx(on,{formatter:i=>Number(i??0).toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r??0,"/",n??0]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t?.length?t?.map?.((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==(t?.length??0)-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i?.color??"#ccc"}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.name??"-"})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.value??0})]},i?.name??o)):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No patrol data"})})]})})}$n.register(Oo,Eo,i1,r1,Yr,Jr);const ede=()=>{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}]},n={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:r=>r[0].label,label:r=>`${r.dataset.label} ${r.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 v.jsx(Ie,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"text-[20px] text-[#884EA7]"}),children:v.jsx(a1,{data:t,options:n})})};function tde({incidentReports:e={},incidentReportsDetails:t=[]}){const n=Number(e?.open??0),r=Number(e?.in_progress??0),i=Number(e?.closed??0);return v.jsx(fn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length?t?.map?.((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code??"-"})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level??"-"," - ",o?.severity??"-"]})})]},a)}):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function nde({staffPresentAbsent:e,staffPresentByRole:t}){const n=e?.[0]?.total_staff??0,r=e?.[0]?.absent_staff??0,i=(n??0)-(r??0);return v.jsx(fn,{title:"Staff Attendance",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex gap-[24px] text-center",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"text-[12px] text-[#1FA05B]",children:"Present"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#AB0000]",children:r??0}),v.jsx("div",{className:"text-[12px] text-[#AB0000]",children:"Absent"})]})]}),v.jsx("div",{className:"mt-4 space-y-2 overflow-y-auto max-h-[200px]",children:t?.length?t?.map?.((o,a)=>{const s=Number(o?.total_staff??0),l=Number(o?.present_staff??0);return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"text-[#121212] text-[14px] leading-[18px] font-medium",children:o?.staff_role_name??"-"}),v.jsxs("div",{className:"text-[14px] leading-[20px] text-[#64748B]",children:[l??0,"/",s??0]})]},a)}):v.jsx("div",{className:"text-center text-[16px] text-gray-400 text-sm py-6",children:"No staff data"})})]})})}function rde(e){return Ze({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 ide({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(Ie,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function ode(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:bb,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:roe,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:rde,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:w3,iconColor:"text-[#36AB6C]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(ide,{...t},n))})}const ade=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],sde=(e="")=>e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/<[^>]*>/g,"").trim();function lde({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:sde(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):ade;return v.jsx(Ie,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const cde=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},ude=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],dde=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return v.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[v.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=cde(a);return v.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[v.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),v.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),v.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},fde=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return v.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[v.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),v.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},pde=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:ude).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return v.jsxs(Ie,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[v.jsx(Ft,{width:"100%",height:"85%",children:v.jsxs(ia,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[v.jsx(Hr,{strokeDasharray:"0",vertical:!1}),v.jsx(br,{dataKey:"level"}),v.jsx(nr,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),v.jsx(on,{content:v.jsx(dde,{}),cursor:!1}),v.jsx(jn,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),v.jsx(jn,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),v.jsx(jn,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),v.jsx(fde,{})]})},hde=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function mde({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):hde;return v.jsx(Ie,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function gde(e){return Ze({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)}const vde=["open_complaints","pending_requests","avg_response_time","resolution_rate"],yde={open_complaints:{title:"Open Complaints",Icon:YC,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:gde,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:A3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:P3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},bde=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>v.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),xde={primary:{size:28,lineHeight:32,weight:500}},wde={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function _de({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?v.jsx(uk,{id:e,data:t}):v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:vde.map(n=>v.jsx(uk,{id:n},n))})}function uk({id:e,data:t}){const n=yde[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=au,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:wde[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,v.jsx("div",{className:"h-[132px]",children:v.jsxs(Ie,{title:i,titleColor:a,icon:v.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:v.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[v.jsx(bde,{...xde.primary,children:c}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[v.jsx(xb,{value:u}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function dk({title:e,date:t,rsvp:n,utilisation:r,status:i}){return v.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),v.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})]}),v.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),v.jsxs("div",{className:"flex justify-between items-center mt-2",children:[v.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),v.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),v.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:v.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function Sde(){return v.jsx(Ie,{title:"Events Utilisation",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{children:[v.jsx(dk,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),v.jsx(dk,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Wd({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[v.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),v.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function Ode(){return v.jsx(Ie,{title:"Notice Board Status",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(Wd,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),v.jsx(Wd,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),v.jsx(Wd,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),v.jsx(Wd,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function WR(e){return Ze({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 Ede({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(Ie,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function Pde({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:WR,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return v.jsx("div",{className:"h-full",children:t.map((n,r)=>v.jsx(Ede,{...n},r))})}function kde(e){return Ze({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 Cde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(Ie,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function Dde(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:WR,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:_3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:toe,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:kde,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(Cde,{...t},n))})}const fk=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),v.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},Ade=({data:e,occupiedUnits:t=9e3,EmployeesCount:n=8910,AdminsCount:r=90})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return v.jsx("div",{children:v.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[v.jsx(bb,{className:"!text-[20px] text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-start justify-between",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),v.jsx("div",{className:"flex items-center gap-1",children:v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})})]}),v.jsxs("div",{className:"flex items-end gap-1",children:[v.jsx(fk,{value:o??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:"Employees"}),v.jsx(fk,{value:a??0,total:s||1,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};$n.register(Oo,Eo,Pl,Yr);const Tde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return v.jsxs(Ie,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:v.jsx(Bue,{className:"!text-[24px] text-[#8B5CF6]"}),children:[v.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),v.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),v.jsx("div",{className:"h-[110px]",children:v.jsx(kl,{data:t,options:n})})]})};function Mde(){return v.jsx(Ie,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:v.jsx(k5,{className:"!text-[24px] text-[#FA7E28]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),v.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[v.jsx(du,{}),8,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsxs("div",{className:"mt-[16px]",children:[v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Nde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return v.jsx(Ie,{className:"h-[324px]",title:"Amenities",period:"Today",icon:v.jsx(Zue,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&v.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?v.jsx(du,{}):v.jsx(Qp,{}),u,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[v.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&v.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):v.jsx("div",{className:"flex items-center justify-center h-[120px]",children:v.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}$n.register(Oo,Eo,Pl,Yr,Jr);function jde({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[];for(let u=0;u<n.length;u++)r.push(n[u].level),i.push(Number(n[u].open)),o.push(Number(n[u].in_progress)),a.push(Number(n[u].on_hold)),s.push(Number(n[u].cancelled));const l={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:s,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:u=>Math.round(u)}}}};return v.jsx(Ie,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:v.jsx(k3,{className:"!text-[24px] text-[#3C81F6]"}),children:v.jsx("div",{className:"h-full",children:v.jsx(kl,{data:l,options:c})})})}const Rde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return v.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:v.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[v.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),v.jsx("div",{children:n.name}),v.jsx("div",{className:"ml-2",children:n.value})]})})};function Ide({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return v.jsx(Ie,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:v.jsx(Av,{className:"!text-[24px] text-[#EF4444]"}),children:v.jsxs("div",{className:"flex h-full items-center gap-4",children:[v.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>v.jsx(Vt,{fill:a.color},s))}),v.jsx(on,{content:v.jsx(Rde,{}),wrapperStyle:{zIndex:1e3}})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[v.jsx("div",{children:r(n.completed)}),v.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),v.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>v.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const pk={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function hk({title:e,color:t,rows:n=[],children:r}){const i=v.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[v.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[v.jsx(Zp,{className:`text-[20px] ${t}`}),v.jsx("div",{children:e??""})]}),v.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>v.jsxs("div",{className:"flex justify-between text-[14px]",children:[v.jsx("div",{children:o??""}),v.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return v.jsx(Uj,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function Lde({data:e}){const t=e&&Object.keys(e).length?e:pk,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):pk.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return v.jsx(Ie,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:v.jsx(Zp,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col mt-2",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),v.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),v.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),v.jsx(hk,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),v.jsx(hk,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),v.jsx("div",{className:"w-full h-[179px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(xx,{data:i??[],children:[v.jsx(Hr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),v.jsx(br,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),v.jsx(nr,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(on,{}),v.jsx(zo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),v.jsx(zo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const Fde=({color:e})=>v.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),$de=({active:e,payload:t})=>!e||!t||!t.length?null:v.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>v.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[v.jsx(Fde,{color:n.color}),n.name,": ",v.jsx("div",{className:"font-semibold",children:n.value})]},r))});function Bde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return v.jsx(fn,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[v.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),v.jsx("div",{className:"h-[184px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>v.jsx(Vt,{fill:a.color},s))}),v.jsx(on,{content:v.jsx($de,{}),wrapperStyle:{zIndex:9999}})]})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),v.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),v.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function zR({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return v.jsx(fn,{className:n,title:e,titleWeight:"semi-bold",children:v.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[v.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[v.jsx("div",{children:"Point"}),v.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>v.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),v.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function Wde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return v.jsx(fn,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"8 8",vertical:!1}),v.jsx(dx,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),v.jsx(br,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(nr,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(on,{cursor:!1}),v.jsx(jn,{dataKey:"value",barSize:60,children:n.map((o,a)=>v.jsx(Vt,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}function Po({image:e="https://cdni.iconscout.com/illustration/premium/thumb/businessman-sad-for-no-data-in-folder-illustration-svg-download-png-10155562.png",title:t="No Data Available",description:n="Catch up all the data. Change the date range to see the data."}){return v.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-4",children:[v.jsx("img",{src:e,alt:"no data",className:"w-32 h-32 mb-4 opacity-80"}),v.jsx("h3",{className:"text-[16px] font-semibold text-gray-900 mb-1",children:t}),v.jsx("p",{className:"text-sm text-gray-500 max-w-[260px]",children:n})]})}const zde=({active:e,payload:t})=>e&&t&&t.length?v.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{children:t[0].payload.name}),v.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,Vde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return v.jsx("g",{transform:`translate(${e},${t})`,children:v.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>v.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function Hde({data:e=[]}){const t=e&&e.length>0,n=e.map(i=>({name:i.category_name,value:i.total_complaints})),r=Math.max(...n.map(i=>i.value),0);return v.jsx(fn,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:t?v.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n,layout:"vertical",children:[v.jsx(Hr,{strokeDasharray:"3 3",horizontal:!1}),v.jsx(br,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1,allowDecimals:!1}),v.jsx(nr,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:v.jsx(Vde,{})}),v.jsx(on,{content:v.jsx(zde,{}),cursor:{fill:"transparent"}}),v.jsx(jn,{dataKey:"value",barSize:36,children:n.map((i,o)=>v.jsx(Vt,{fill:i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})}):v.jsx(Po,{title:"No Tickets Found",description:"Catch up all the data. Change the date range to see the data."})})}function Yde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const a=parseFloat(i),s=a>=0,l=s?"#16A34A":"#DC2626";return v.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[e&&v.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(e,{className:"h-[20px] w-[20px]"})}),v.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),v.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&v.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&v.jsxs("div",{className:"flex items-center gap-[4px] text-[12px] leading-[16px] font-medium",style:{color:l},children:[s?v.jsx(du,{}):v.jsx(Qp,{}),Math.abs(a),"%"]}),o&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const Ude=({data:e=[],onDateChange:t})=>{const[n,r]=k.useState(new Date),[i,o]=k.useState(!1),s=(g=>{const b=new Date(g);return b.setDate(b.getDate()-6),b})(n),l=g=>{try{return g.toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}catch{return""}},c=g=>{const b=new Date(g),S=new Date(b);S.setDate(S.getDate()-6),t&&t(S.toISOString(),b.toISOString())},u=()=>{const g=new Date(n);g.setDate(g.getDate()-7),r(g),c(g)},d=()=>{const g=new Date(n);g.setDate(g.getDate()+7),r(g),c(g)},f=()=>{o(g=>!g)},p=g=>{const b=g||new Date;r(b),c(b),o(!1)},m=Array.isArray(e)?e:[],h=!m.length||m.every(g=>g.no_of_visitors===0);return v.jsxs(fn,{title:"Weekly Visitor Pattern",period:`${l(s)} - ${l(n)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:u,onNextClick:d,onCalendarClick:f,children:[i&&v.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:v.jsx(BC,{selected:n,onChange:p,inline:!0})}),h?v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx("div",{className:"w-full h-[260px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(one,{data:m,margin:{top:10,right:10,left:0,bottom:0},children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[v.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),v.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(br,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1,tickFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),v.jsx(nr,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1,domain:[0,"dataMax + 2"]}),v.jsx(on,{labelFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),v.jsx(PN,{type:"monotone",dataKey:"no_of_visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Kde=[{building_name:"Google",no_of_visitors:1e3},{building_name:"Uber",no_of_visitors:3500},{building_name:"ANAROCK",no_of_visitors:2e3},{building_name:"Flipkart",no_of_visitors:8e3},{building_name:"HP",no_of_visitors:1650}],qde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Kde:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.no_of_visitors)||0;o>r&&(r=o)}return v.jsx(fn,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(br,{dataKey:"building_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),v.jsx(nr,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(on,{cursor:!1}),v.jsx(jn,{dataKey:"no_of_visitors",maxBarSize:55,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.no_of_visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function Gde({data:e}){return v.jsx("div",{className:"h-full",children:e.map((t,n)=>{const r=parseFloat(t.delta),i=r>=0;return v.jsx(Ie,{iconClassName:"!gap-[8px]",title:v.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:v.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),v.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[t.delta&&v.jsxs("div",{className:"flex items-center gap-[4px]",style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:[i?v.jsx(du,{}):v.jsx(Qp,{}),Math.abs(r),"%"]}),v.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Xde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],Qde=({x:e,y:t,payload:n})=>v.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:v.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function Zde({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Xde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return v.jsx(Ie,{title:"Bookings",icon:v.jsx(Xue,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:v.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[v.jsx(br,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),v.jsx(nr,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:v.jsx(Qde,{})}),v.jsx(jn,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const Jde=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function efe({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?Jde:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return v.jsx(fn,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),v.jsx(br,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(nr,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`₹ ${i??0}`}),v.jsx(jn,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const tfe=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],zd=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function nfe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??tfe,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return v.jsx(fn,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?v.jsx("div",{className:"col-span-12 flex items-center justify-center h-full",children:v.jsx(Po,{title:"No Amenity Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"col-span-5 h-[240px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>v.jsx(Vt,{fill:zd?.[l%zd?.length]},`cell-${l}`))}),v.jsx(on,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),v.jsx("div",{className:"col-span-7",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[v.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[v.jsx("div",{children:"Amenity"}),v.jsx("div",{className:"text-right",children:"Revenue"})]}),v.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>v.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:zd?.[l%zd?.length]}}),v.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),v.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Vd=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],rfe=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],ife=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})):rfe.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?v.jsx(fn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsx(Po,{title:"No Assets Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsx(fn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsxs("div",{className:"flex items-center justify-between gap-8",children:[v.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsx(_o,{children:v.jsx(Mi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>v.jsx(Vt,{fill:i.color},o))})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[v.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),v.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),v.jsx("div",{className:"flex-1 max-w-[280px]",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),v.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},ofe=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?v.jsx(fn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx(Po,{title:"No Maintenance Assets Status Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsx(fn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?v.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1}),v.jsx(br,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(nr,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(on,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),v.jsx(ph,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>v.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px",display:"flex"},children:a}),wrapperStyle:{paddingTop:"18px"}}),v.jsx(jn,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),v.jsx(jn,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),v.jsx(jn,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),v.jsx(jn,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),v.jsx(jn,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})};function afe({data:e}){const t=[{name:"Completed",value:Number(e?.completed||0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed||0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed||0),color:"#F69E0A"}],n=Number(e?.completed||0)+Number(e?.not_completed||0)+Number(e?.missed||0),r=Number(e?.completed||0);return v.jsx(fn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:t,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t.map((i,o)=>v.jsx(Vt,{fill:i.color},`cell-${o}`))}),v.jsx(on,{formatter:i=>i.toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r,"/",n]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t.map((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==t.length-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.name})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.value})]},i.name))})]})})}function sfe({incidentReports:e,incidentReportsDetails:t}){const n=Number(e?.open||0),r=Number(e?.in_progress||0),i=Number(e?.closed||0);return v.jsx(fn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length>0?t.map((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level," - ",o?.severity]})})]},a)}):v.jsx("div",{className:"text-[16px] text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function lfe({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return v.jsxs("div",{className:"w-full bg-white rounded-xl h-[390px] shadow-md overflow-hidden flex flex-col",children:[v.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>v.jsx("div",{className:"px-6 py-4",children:p.label},m))}),v.jsx("div",{className:"flex-1 overflow-y-auto",children:f.length>0?f.map((p,m)=>v.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,g)=>{const b=p[h.key],S=typeof b=="string"&&b.includes("%"),w=b==="100%"?"bg-green-100 text-green-600":"bg-red-100 text-red-600";return v.jsx("div",{className:"px-6 py-4 bg-gray-50",children:S?v.jsx("div",{className:`inline-block px-3 py-1 rounded-full text-xs font-semibold ${w}`,children:b}):v.jsx("div",{children:b??"-"})},g)})},m)):v.jsx(Po,{title:"No Data Found",description:"Catch up all the data. Change the date range to see the data."})}),v.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[v.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[v.jsx("div",{children:"Rows per page:"}),v.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>v.jsx("option",{value:p,children:p},m))}),v.jsxs("div",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),v.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[v.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(Uue,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx($R,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(BR,{size:18})}),v.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(que,{size:18})})]})]})]})}exports.AccessPointsUsage=Wde;exports.Accounting=Sue;exports.Amenities=Nde;exports.AmenitiesStatsCard=Gde;exports.AmenityWiseRevenue=nfe;exports.AssetValueBreakdown=Cue;exports.AssetsByType=ife;exports.BlockWiseOccupancy=bue;exports.BookingTrendChart=efe;exports.Bookings=Zde;exports.Budgets=Oue;exports.Card=Ie;exports.CardAccess=zR;exports.CashBankBalance=Eue;exports.CommercialAccessOverview=Bde;exports.CommercialGuardPatrols=afe;exports.CommercialIncidentReports=sfe;exports.CommercialOccupancy=Ade;exports.CommercialReportTable=lfe;exports.Community=ioe;exports.Complaints=lde;exports.ComplaintsByLevel=pde;exports.DuesAgeing=Pue;exports.EmployeeFootfall=Tde;exports.Engagement=ooe;exports.EngagementStatsGrid=Dde;exports.EventsUtilisation=Sde;exports.ExpenseCategories=kue;exports.Facilities=aoe;exports.FinanceSummary=soe;exports.FoodBeverages=Mde;exports.GateAndSecurityStatsGrid=ode;exports.GateUpdates=Uoe;exports.GuardPatrols=Jue;exports.Header=f3;exports.Helpdesk=Koe;exports.HelpdeskStatsGrid=_de;exports.HourlyTrafficFlow=ede;exports.IncidentReports=tde;exports.IncomeExpenditure=LR;exports.MainHeader=E3;exports.MaintenanceStatus=ofe;exports.MetricCard=Yde;exports.MobileAccess=zR;exports.MoveInOutTrends=wue;exports.NoticeBoardStatus=Ode;exports.OccupancyOverview=gue;exports.OrganisationWiseVisitors=qde;exports.RequestBox=mde;exports.ResidentOverview=yue;exports.RevenuebyCategory=Due;exports.SingleStats=Pde;exports.StaffAttendance=nde;exports.StatsGrid=Nue;exports.TicketEscalation=jde;exports.TicketStatus=Ide;exports.Tickets=IR;exports.TicketsperCategory=Hde;exports.UnitStatus=IR;exports.VisitorUpdates=Lde;exports.WeeklyVisitorPattern=Ude;
362
+ */const Que=[["path",{d:"M19 5a2 2 0 0 0-2 2v11",key:"s41o68"}],["path",{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",key:"rd2r6e"}],["path",{d:"M7 13h10",key:"1rwob1"}],["path",{d:"M7 9h10",key:"12czzb"}],["path",{d:"M9 5a2 2 0 0 0-2 2v11",key:"x0q4gh"}]],Zue=sa("waves-ladder",Que),fn=({title:e,icon:t,period:n,isDateSelector:r=!1,children:i,footer:o,className:a="",titleWeight:s,titleColor:l,iconClassName:c,titleClassName:u,childrenClassName:d,onCalendarClick:f,onPrevClick:p,onNextClick:m})=>{const h=s==="semi-bold"?600:500;return v.jsxs("div",{className:`relative bg-white rounded-[12px] p-[24px] shadow-[0_0_12px_0_#EAF2FF] ${a}`,children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[t&&v.jsx("div",{className:c,children:t}),v.jsx("div",{style:{fontWeight:h,color:l||"#121212"},className:u||"text-[20px] leading-[24px]",children:e})]}),n&&!r&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),r&&v.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 rounded-lg bg-white text-sm text-[#64748B]",children:[v.jsx(zue,{size:16,className:"text-[#64748B] cursor-pointer",onClick:f}),v.jsx($R,{size:16,className:"cursor-pointer",onClick:p}),v.jsx("span",{className:"text-[12px] leading-[16px] text-[#64748B]",children:n}),v.jsx(BR,{size:16,className:"cursor-pointer",onClick:m})]})]}),v.jsx("div",{className:`flex-1 min-h-0 mt-4 ${d}`,children:i}),o&&v.jsx("div",{className:"mt-4 pt-4 border-t border-gray-100 text-[12px] text-[#64748B]",children:o})]})};function Jue({data:e={}}){const t=[{name:"Completed",value:Number(e?.completed??0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed??0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed??0),color:"#F69E0A"}],n=Number(e?.completed??0)+Number(e?.not_completed??0)+Number(e?.missed??0),r=Number(e?.completed??0);return v.jsx(fn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:t??[],innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t?.map?.((i,o)=>v.jsx(Vt,{fill:i?.color??"#ccc"},`cell-${o}`))}),v.jsx(Ht,{formatter:i=>Number(i??0).toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r??0,"/",n??0]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t?.length?t?.map?.((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==(t?.length??0)-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i?.color??"#ccc"}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.name??"-"})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i?.value??0})]},i?.name??o)):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No patrol data"})})]})})}$n.register(Oo,Eo,i1,r1,Yr,Jr);const ede=()=>{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}]},n={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:r=>r[0].label,label:r=>`${r.dataset.label} ${r.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 v.jsx(Ie,{title:"Hourly Traffic Flow",className:"w-full h-[362px]",period:v.jsx(Wr,{className:"text-[20px] text-[#884EA7]"}),children:v.jsx(a1,{data:t,options:n})})};function tde({incidentReports:e={},incidentReportsDetails:t=[]}){const n=Number(e?.open??0),r=Number(e?.in_progress??0),i=Number(e?.closed??0);return v.jsx(fn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length?t?.map?.((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code??"-"})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level??"-"," - ",o?.severity??"-"]})})]},a)}):v.jsx("div",{className:"text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function nde({staffPresentAbsent:e,staffPresentByRole:t}){const n=e?.[0]?.total_staff??0,r=e?.[0]?.absent_staff??0,i=(n??0)-(r??0);return v.jsx(fn,{title:"Staff Attendance",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex gap-[24px] text-center",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#1FA05B]",children:i??0}),v.jsx("div",{className:"text-[12px] text-[#1FA05B]",children:"Present"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] rounded h-[76px]",children:[v.jsx("div",{className:"text-[24px] font-medium text-[#AB0000]",children:r??0}),v.jsx("div",{className:"text-[12px] text-[#AB0000]",children:"Absent"})]})]}),v.jsx("div",{className:"mt-4 space-y-2 overflow-y-auto max-h-[200px]",children:t?.length?t?.map?.((o,a)=>{const s=Number(o?.total_staff??0),l=Number(o?.present_staff??0);return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"text-[#121212] text-[14px] leading-[18px] font-medium",children:o?.staff_role_name??"-"}),v.jsxs("div",{className:"text-[14px] leading-[20px] text-[#64748B]",children:[l??0,"/",s??0]})]},a)}):v.jsx("div",{className:"text-center text-[16px] text-gray-400 text-sm py-6",children:"No staff data"})})]})})}function rde(e){return Ze({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 ide({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsxs(Ie,{title:e,icon:v.jsx("div",{className:"h-6 w-6 grid place-items-center",children:v.jsx(o,{className:`h-6 w-6 ${a}`})}),children:[v.jsx("div",{className:"text-4xl font-semibold tracking-tight text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[14px]",children:[v.jsx("div",{className:i?"text-emerald-600 font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-slate-500",children:r})]})]})}function ode(){const e=[{title:"Total Visitors",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:bb,iconColor:"text-[#329DFF]"},{title:"Active Incidents",value:73,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:roe,iconColor:"text-[#F69E0A]"},{title:"Missed Patrols",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:rde,iconColor:"text-[#AB0000]"},{title:"Parking Usage",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:w3,iconColor:"text-[#36AB6C]"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(ide,{...t},n))})}const ade=[{title:"Maintenance",total:12,pending:3},{title:"Security",total:8,pending:1},{title:"Housekeeping",total:6,pending:2},{title:"Utilities",total:10,pending:4}],sde=(e="")=>e.replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/<[^>]*>/g,"").trim();function lde({data:e}){const t=Array.isArray(e?.complaints_by_category)&&e.complaints_by_category.length>0?e.complaints_by_category.map(n=>({title:sde(n.category_name)||"—",total:n.total||0,pending:n.pending||0})):ade;return v.jsx(Ie,{title:"Complaints",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},r))})})}const cde=e=>{const t={0:"𝟎",1:"𝟏",2:"𝟐",3:"𝟑",4:"𝟒",5:"𝟓",6:"𝟔",7:"𝟕",8:"𝟖",9:"𝟗"};return String(e).split("").map(n=>t[n]||n).join("")},ude=[{level:"Level 1",open_count:3,in_progress_count:4,closed_count:5,total:12},{level:"Level 2",open_count:1,in_progress_count:1,closed_count:1,total:3},{level:"Level 3",open_count:5,in_progress_count:2,closed_count:3,total:10}],dde=({active:e,payload:t,label:n})=>{if(!e||!t)return null;const r=[{key:"open_count",label:"Open",color:"#EF4444"},{key:"in_progress_count",label:"In Progress",color:"#F59D0D"},{key:"closed_count",label:"Closed",color:"#12B981"}];return v.jsxs("div",{style:{backgroundColor:"#0B0B0B",padding:"14px 40px 14px 18px",borderRadius:"10px",color:"#ffffff"},children:[v.jsx("div",{style:{color:"#ffffff",fontSize:"12px",fontWeight:"900",marginBottom:"10px"},children:n}),r.map((i,o)=>{const a=t[0]?.payload[i.key]||0,s=cde(a);return v.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:o<r.length-1?"8px":"0",fontSize:"12px"},children:[v.jsx("div",{style:{width:"8px",height:"8px",backgroundColor:i.color,transform:"rotate(45deg)",marginRight:"8px"}}),v.jsx("span",{style:{color:"D1D3D4",minWidth:"100px"},children:i.label}),v.jsx("span",{style:{marginLeft:"auto",fontWeight:"700"},children:s})]},i.key)})]})},fde=()=>{const e=[{label:"Open",color:"#EF4444"},{label:"In Progress",color:"#F59D0D"},{label:"Closed",color:"#12B981"}];return v.jsx("div",{style:{display:"flex",justifyContent:"space-between",gap:"15px"},children:e.map(t=>v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"6px"},children:[v.jsx("div",{style:{width:"6px",height:"6px",backgroundColor:t.color,transform:"rotate(45deg)"}}),v.jsx("span",{style:{fontSize:"14px"},children:t.label})]},t.label))})},pde=({data:e})=>{const t=k.useMemo(()=>(Array.isArray(e?.complaints_by_level)&&e.complaints_by_level.some(l=>Number(l.total)>0)?e.complaints_by_level:ude).map(l=>({level:l.level||"—",open_count:Number(l.open_count)||0,in_progress_count:Number(l.in_progress_count)||0,closed_count:Number(l.closed_count)||0,total:Number(l.total)||0})),[e]),n=k.useMemo(()=>Math.max(...t.map(a=>a.total),5),[t]),r=Math.ceil(n*1.2),i=6,o=Math.max(Math.ceil(n/i),1);return v.jsxs(Ie,{title:"Complaints by Level",className:"w-full h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:[v.jsx(Ft,{width:"100%",height:"85%",children:v.jsxs(ia,{data:t,margin:{top:5,right:-25,left:-30,bottom:5},children:[v.jsx(Hr,{strokeDasharray:"0",vertical:!1}),v.jsx(br,{dataKey:"level"}),v.jsx(nr,{domain:[0,r],ticks:Array.from({length:i+1},(a,s)=>s*o)}),v.jsx(Ht,{content:v.jsx(dde,{}),cursor:!1}),v.jsx(jn,{dataKey:"open_count",stackId:"a",fill:"#EF4444",barSize:44,radius:[0,0,0,0]}),v.jsx(jn,{dataKey:"in_progress_count",stackId:"a",fill:"#F59D0D",barSize:44,radius:[0,0,0,0]}),v.jsx(jn,{dataKey:"closed_count",stackId:"a",fill:"#12B981",barSize:44,radius:[0,0,0,0]})]})}),v.jsx(fde,{})]})},hde=[{title:"Maintenance",total:18,pending:4},{title:"Security",total:11,pending:2},{title:"Housekeeping",total:9,pending:3},{title:"Utilities",total:14,pending:5}];function mde({data:e}){const t=Array.isArray(e?.request_box_by_type)&&e.request_box_by_type.length>0?e.request_box_by_type.map(n=>({title:n.category_name||"—",total:Number(n.total)||0,pending:Number(n.pending)||0})):hde;return v.jsx(Ie,{title:"Request Box",className:"h-[362px]",titleWeight:"semi-bold",titleClassName:"!text-[20px] !leading-[24px]",children:v.jsx("div",{className:"flex flex-col gap-[12px]",children:t.map((n,r)=>v.jsxs("div",{className:"flex items-center justify-between bg-[#F9FAFB] rounded-lg p-3 h-[62px]",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-[#121212] capitalize",children:n.title}),v.jsxs("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:["Total: ",n.total]})]}),v.jsxs("div",{className:"flex flex-col items-end",children:[v.jsx("div",{className:"text-[14px] leading-[18px] font-medium text-red-700",children:String(n.pending).padStart(2,"0")}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Pending"})]})]},`${n.title}-${r}`))})})}function gde(e){return Ze({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)}const vde=["open_complaints","pending_requests","avg_response_time","resolution_rate"],yde={open_complaints:{title:"Open Complaints",Icon:YC,iconColor:"#AB0000",deltaLabel:"Compared to last month"},pending_requests:{title:"Pending Requests",Icon:gde,iconColor:"#E7A015",deltaLabel:"Compared to last month"},avg_response_time:{title:"Avg Response Time",Icon:A3,iconColor:"#1FA05B",deltaLabel:"Compared to last month"},resolution_rate:{title:"Resolution Rate",Icon:P3,iconColor:"#329DFF",deltaLabel:"Compared to last month"}},bde=({children:e,size:t=28,lineHeight:n=32,weight:r=500,color:i="#121212"})=>v.jsx("div",{style:{fontWeight:r,fontSize:`${t}px`,lineHeight:`${n}px`,color:i},children:e}),xde={primary:{size:28,lineHeight:32,weight:500}},wde={open_complaints:{current:24,trend_percent:"-8%",direction:"bad"},pending_requests:{current:17,trend_percent:"-5%",direction:"bad"},avg_response_time:{current:"2.4 h",trend_percent:"+6%",direction:"good"},resolution_rate:{current:"89%",trend_percent:"+4%",direction:"good"}};function _de({id:e,data:t}){return e&&t&&!t[e]&&t.current!==void 0?v.jsx(uk,{id:e,data:t}):v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:vde.map(n=>v.jsx(uk,{id:n},n))})}function uk({id:e,data:t}){const n=yde[e];if(!n)return null;const r=(d,f)=>f==null?"—":d==="avg_response_time"?typeof f=="number"?`${f} h`:f:d==="resolution_rate"&&typeof f=="number"?`${f}%`:f,{title:i,Icon:o=au,iconColor:a,deltaLabel:s}=n,l=t&&Object.keys(t).length>0?t:wde[e],c=r(e,l?.current),u=l?.trend_percent??"—";return l?.direction==="good"||l?.direction,v.jsx("div",{className:"h-[132px]",children:v.jsxs(Ie,{title:i,titleColor:a,icon:v.jsx("div",{className:"h-[20px] w-[20px] flex items-center justify-center",children:v.jsx(o,{className:"h-[20px] w-[20px]",style:{color:a}})}),childrenClassName:"!space-y-[12px]",iconClassName:"!gap-[12px]",children:[v.jsx(bde,{...xde.primary,children:c}),v.jsxs("div",{className:"flex items-center gap-[8px] text-[12px] leading-[16px]",children:[v.jsx(xb,{value:u}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s})]})]})})}function dk({title:e,date:t,rsvp:n,utilisation:r,status:i}){return v.jsxs("div",{className:" bg-[#F8FAFC] h-[106px] px-3 mt-3",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("div",{className:"text-[16px] leading-[20px] font-semibold text-[#121212]",children:e}),v.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})]}),v.jsx("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:t}),v.jsxs("div",{className:"flex justify-between items-center mt-2",children:[v.jsxs("div",{className:"text-[14px] leading-[18px] text-[#64748B]",children:[n," RSVP"]}),v.jsxs("div",{className:"text-[#3C82F6] text-[14px] leading-[18px] font-medium",children:[r,"% utilisation"]})]}),v.jsx("div",{className:"w-full bg-[#F8FAFC] h-[6px] rounded mt-2 mb-3",children:v.jsx("div",{className:"h-[6px] rounded bg-[#3C82F6]",style:{width:`${r}%`}})})]})}function Sde(){return v.jsx(Ie,{title:"Events Utilisation",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{children:[v.jsx(dk,{title:"Holi Celebration",date:"25 Jun 2025",rsvp:"78/100",utilisation:71,status:"Upcoming"}),v.jsx(dk,{title:"Maintenance Meeting",date:"25 Jun 2025",rsvp:"45/60",utilisation:75,status:"Completed"})]})})}function Wd({label:e,value:t,subLabel:n,bgColor:r,textColor:i}){return v.jsxs("div",{className:`rounded-lg p-4 ${r} h-[124px]`,children:[v.jsx("div",{className:`text-[16px] font-medium ${i} leading-[20px]`,children:e}),v.jsx("div",{className:"mt-4 text-[28px] leading-[32px] font-semibold text-[#121212]",children:t}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-2",children:n})]})}function Ode(){return v.jsx(Ie,{title:"Notice Board Status",period:v.jsx(Wr,{className:"h-5 w-5 text-[#884EA7] cursor-pointer"}),className:"w-full h-[360px]",children:v.jsxs("div",{className:"grid grid-cols-2 gap-[16px]",children:[v.jsx(Wd,{label:"Active",value:138,subLabel:"3 expiring soon",bgColor:"bg-[#F0FFF7]",textColor:"text-[#1FA05B]"}),v.jsx(Wd,{label:"Scheduled",value:13,subLabel:"4 this week",bgColor:"bg-[#FFFBF2]",textColor:"text-[#E7A015]"}),v.jsx(Wd,{label:"Recurring",value:3,subLabel:"All active",bgColor:"bg-[#EDF6FF]",textColor:"text-[#329DFF]"}),v.jsx(Wd,{label:"Expired",value:7,subLabel:"4 recent",bgColor:"bg-[#F6F6F6]",textColor:"text-[#64748B]"})]})})}function WR(e){return Ze({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 Ede({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(Ie,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function Pde({data:e}){const t=[{title:e?.title||"Total Bookings",value:145,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:WR,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"}];return v.jsx("div",{className:"h-full",children:t.map((n,r)=>v.jsx(Ede,{...n},r))})}function kde(e){return Ze({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 Cde({title:e,value:t,delta:n,deltaLabel:r,positive:i=!0,Icon:o=au,iconColor:a="text-emerald-600",iconBg:s="bg-emerald-50"}){return v.jsx(Ie,{title:e,icon:v.jsx("div",{className:`h-6 w-6 grid place-items-center rounded-md ${s}`,children:v.jsx(o,{className:`h-4 w-4 ${a}`})}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t}),v.jsxs("div",{className:"flex items-center gap-[8px] pt-[8px] !text-[12px] leading-[16px]",children:[v.jsx("div",{className:i?"text-[#1FA05B] font-medium":"text-rose-600 font-medium",children:n}),v.jsx("div",{className:"text-[#64748B]",children:r})]})]})})}function Dde(){const e=[{title:"Notice",value:160,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:WR,iconColor:"text-emerald-600",iconBg:"bg-emerald-50"},{title:"Post",value:83,delta:"+2.0%",deltaLabel:"Compared to last month",positive:!0,Icon:_3,iconColor:"text-[#329DFF]",iconBg:"bg-emerald-50"},{title:"Poll",value:3,delta:"+11.0%",deltaLabel:"Compared to last month",positive:!0,Icon:toe,iconColor:"text-[#FA7E28]",iconBg:"bg-orange-100"},{title:"Poll",value:5,delta:"-8.0%",deltaLabel:"Compared to last month",positive:!1,Icon:kde,iconColor:"text-[#DBB467]",iconBg:"bg-yellow-100"}];return v.jsx("div",{className:"px-5 grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-[24px]",children:e.map((t,n)=>v.jsx(Cde,{...t},n))})}const fk=({value:e=0,total:t=1,colorClass:n="",label:r=""})=>{const i=Number(e)||0,o=Number(t)||1,a=Math.max(0,Math.min(100,i/o*100)),s=n==="bg-[#8B5CF6]"?"text-[#8B5CF6]":n==="bg-[#12B981]"?"text-[#12B981]":"text-slate-600";return v.jsxs("div",{className:"flex flex-col items-start",children:[v.jsx("div",{className:"w-2/3 min-w-[80px] h-5 rounded-full overflow-hidden",children:v.jsx("div",{className:`h-[11px] rounded-full ${n||""}`,style:{width:n==="bg-[#12B981]"?`${a+45}%`:`${a}%`}})}),v.jsx("div",{className:`${s} !text-[12px] font-bold mt-1`,children:i??0}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#64748B] mt-1",children:r??""})]})},Ade=({data:e,occupiedUnits:t=9e3,EmployeesCount:n=8910,AdminsCount:r=90})=>{const i=e?.total_occupants!==void 0&&e?.total_occupants!==null?Number(e?.total_occupants)||0:Number(t)||0,o=e?.total_members!==void 0&&e?.total_members!==null?Number(e?.total_members)||0:Number(n)||0,a=e?.total_admins!==void 0&&e?.total_admins!==null?Number(e?.total_admins)||0:Number(r)||0,s=(o||0)+(a||0);return v.jsx("div",{children:v.jsxs("div",{className:"bg-white !border-[0.5px] !border-[#EBEBEB] rounded-xl shadow-[0_0_12px_0_#EAF2FF] p-4 h-[128px]",children:[v.jsxs("div",{className:"flex items-center gap-[12px] h-[20px]",style:{marginBottom:"24px"},children:[v.jsx(bb,{className:"!text-[20px] text-[#329DFF]"}),v.jsx("div",{className:"font-medium text-[#121212] text-[16px] leading-[20px]",children:"Occupancy Overview"})]}),v.jsxs("div",{className:"flex items-start justify-between",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B] font-normal",children:"Total Occupants"}),v.jsx("div",{className:"flex items-center gap-1",children:v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:i??0})})]}),v.jsxs("div",{className:"flex items-end gap-1",children:[v.jsx(fk,{value:o??0,total:s||1,colorClass:"bg-[#8B5CF6]",label:"Employees"}),v.jsx(fk,{value:a??0,total:s||1,colorClass:"bg-[#12B981]",label:"Admins"})]})]})]})})};$n.register(Oo,Eo,Pl,Yr);const Tde=()=>{const t={labels:["HP","Adobe","Anarock","Swiggy","Infosys","Zepto"],datasets:[{data:[2e3,1700,1500,1200,900,800],backgroundColor:["#329DFF","#EF4645","#8A2E64","#F69E0A","#A2BB40","#8B5CF6"],barThickness:34}]},n={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff",displayColors:!1,callbacks:{label:r=>`Employees: ${r.parsed.y}`}}},scales:{x:{grid:{display:!1},ticks:{color:"#64748B",font:{size:12}}},y:{beginAtZero:!0,min:0,max:2e3,ticks:{stepSize:500,color:"#64748B",callback:r=>r},grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1}}}};return v.jsxs(Ie,{className:"w-full h-[238px]",title:"Employee Footfall (Static Data)",period:"Today",icon:v.jsx(Bue,{className:"!text-[24px] text-[#8B5CF6]"}),children:[v.jsxs("div",{style:{marginBottom:"16px",marginTop:"8px"},children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Employees Inside"}),v.jsx("div",{className:"text-[20px] leading-[24px] font-medium text-[#1FA05B]",children:"7,500"})]}),v.jsx("div",{className:"h-[110px]",children:v.jsx(kl,{data:t,options:n})})]})};function Mde(){return v.jsx(Ie,{className:"h-[324px]",title:"Food & Beverages (Static Data)",period:"Today",icon:v.jsx(k5,{className:"!text-[24px] text-[#FA7E28]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Orders"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:247})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:["₹ ","82K"]}),v.jsxs("div",{className:"inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full text-[#1FA05B] bg-green-50",children:[v.jsx(du,{}),8,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsxs("div",{className:"mt-[16px]",children:[v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"HP"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"120 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 45K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-blue-500 rounded-full",style:{width:"70%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Adobe"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"85 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 23K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-red-500 rounded-full",style:{width:"50%"}})})]}),v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:"Anarock"}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px] flex items-center",children:[v.jsx("div",{className:"text-[#64748B] inline-block",children:"42 orders"}),v.jsx("div",{className:"mx-2 text-[#121212] inline-block",children:"₹ 14K"})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:"h-[11px] bg-purple-700 rounded-full",style:{width:"25%"}})})]})]})]})})}function Nde({data:e}){const t=e?.amenity_summary?{amenitySummary:{totalBookings:e?.amenity_summary?.total_bookings??0,todayPaidRevenue:e?.amenity_summary?.today_paid_revenue??"0.00",growthPercentage:e?.amenity_summary?.growth_percentage??null,currencyType:e?.amenity_summary?.currency_type??"₹"},chartData:Array.isArray(e?.chart_data)?e.chart_data.map(f=>({facility_name:f?.facility_name,total_bookings:f?.total_bookings??0,paid_revenue:f?.paid_revenue??"0",isPaid:f?.is_paid===!0})):[]}:e||{},n=t?.amenitySummary||{},i=(Array.isArray(t?.chartData)?t.chartData:[]).map(f=>({...f,isPaid:f?.isPaid===!0})),o=i.length>0&&i.every(f=>f?.isPaid===!1),a=n?.totalBookings||0,s=i.reduce((f,p)=>{const m=p?.total_bookings||0;return f+m},0),l=i.map(f=>{const p=f?.total_bookings||0,m=f?.isPaid?`${n?.currencyType||"₹"} ${f?.paid_revenue||"0.00"}`:"",h=s>0?Math.round(p/s*100):0;return{name:f?.facility_name||"Unknown",bookings:p,revenue:m,percentage:h,color:f?.isPaid?"bg-violet-500":"bg-slate-400",isPaid:f?.isPaid}}),c=n?.growthPercentage;let u=null;if(typeof c=="number")u=c;else if(typeof c=="string"){const f=c.replace("%","").trim(),p=Number(f);u=isNaN(p)?null:p}const d=u!==null?u>=0:!0;return v.jsx(Ie,{className:"h-[324px]",title:"Amenities",period:"Today",icon:v.jsx(Zue,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col h-full",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Total Bookings"}),v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#8B5CF6]",children:a})]}),!o&&v.jsxs("div",{children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:"Revenue Generated"}),v.jsxs("div",{className:"text-[28px] leading-[32px] font-medium text-[#329DFF]",children:[n?.currencyType||"₹"," ",n?.todayPaidRevenue??"0.00"]}),u!==null&&v.jsxs("div",{className:`inline-flex items-center gap-1 mt-2 text-[10px] leading-[14px] px-2 py-1 rounded-full ${d?"text-[#1FA05B] bg-green-50":"text-red-600 bg-red-50"}`,children:[d?v.jsx(du,{}):v.jsx(Qp,{}),u,"%",v.jsx("span",{children:"from last month"})]})]})]}),v.jsx("div",{className:"mt-[16px]",children:l.length>0?l.map((f,p)=>v.jsxs("div",{className:"mb-[16px]",children:[v.jsxs("div",{className:"flex justify-between text-sm mb-2",children:[v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px]",children:f?.name}),v.jsxs("div",{className:"font-medium text-[12px] leading-[16px]",children:[v.jsxs("div",{className:"text-[#64748B] inline",children:[f?.bookings," ",f?.bookings<=1?"booking":"bookings"]}),f?.isPaid&&v.jsx("div",{className:"mx-2 text-[#121212] inline",children:f?.revenue})]})]}),v.jsx("div",{className:"h-[11px] bg-gray-100 rounded-full",children:v.jsx("div",{className:`h-[11px] rounded-full ${f?.color}`,style:{width:`${f?.percentage}%`}})})]},p)):v.jsx("div",{className:"flex items-center justify-center h-[120px]",children:v.jsx("div",{className:"text-[12px] text-[#94A3B8]",children:"No amenity usage data available"})})})]})})}$n.register(Oo,Eo,Pl,Yr,Jr);function jde({data:e=[]}){const t=[{level:"L1",open:55,in_progress:22,on_hold:15,closed:6},{level:"L2",open:45,in_progress:25,on_hold:18,closed:5},{level:"L3",open:58,in_progress:23,on_hold:14,closed:6}],n=e.length>0?e:t,r=[],i=[],o=[],a=[],s=[];for(let u=0;u<n.length;u++)r.push(n[u].level),i.push(Number(n[u].open)),o.push(Number(n[u].in_progress)),a.push(Number(n[u].on_hold)),s.push(Number(n[u].cancelled));const l={labels:r,datasets:[{label:"Open",data:i,backgroundColor:"#3B82F6",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"In Progress",data:o,backgroundColor:"#F59E0B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"On-Hold",data:a,backgroundColor:"#64748B",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"},{label:"Cancelled",data:s,backgroundColor:"#FB2C36",borderColor:"#FFFFFF",borderWidth:2,barThickness:38,stack:"tickets"}]},c={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{position:"bottom",labels:{usePointStyle:!0,pointStyle:"rectRot",padding:20,color:"#64748B"}},tooltip:{backgroundColor:"#0F172A",titleColor:"#fff",bodyColor:"#fff"}},scales:{x:{stacked:!0,grid:{display:!1},ticks:{color:"#64748B"}},y:{stacked:!0,beginAtZero:!0,grid:{display:!1,color:"#E5E7EB",borderDash:[4,4],drawBorder:!1},ticks:{color:"#64748B",stepSize:1,precision:0,callback:u=>Math.round(u)}}}};return v.jsx(Ie,{className:"h-[267px]",title:"Ticket Escalation Levels",period:"Today",icon:v.jsx(k3,{className:"!text-[24px] text-[#3C81F6]"}),children:v.jsx("div",{className:"h-full",children:v.jsx(kl,{data:l,options:c})})})}const Rde=({active:e,payload:t})=>{if(!e||!t||!t.length)return null;const n=t[0],r=n.payload.color;return v.jsx("div",{style:{backgroundColor:"#000000",color:"#ffffff",padding:"8px 10px",borderRadius:"8px",fontSize:"12px"},children:v.jsxs("div",{className:"flex items-center gap-2 font-medium",children:[v.jsx("div",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:r}}),v.jsx("div",{children:n.name}),v.jsx("div",{className:"ml-2",children:n.value})]})})};function Ide({data:e=null}){const n=e||{open:12,on_hold:5,cancelled:3,completed:156,in_progress:8,total_complaints:184},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Completed",value:r(n.completed),color:"#10B981"},{name:"Open",value:r(n.open),color:"#3B82F6"},{name:"In Progress",value:r(n.in_progress),color:"#F59E0B"},{name:"On Hold",value:r(n.on_hold),color:"#6B7280"},{name:"Cancelled",value:r(n.cancelled),color:"#EF4444"}],o=r(n.total_complaints);return v.jsx(Ie,{className:"h-[267px]",title:"Ticket Status",period:"Today",icon:v.jsx(Av,{className:"!text-[24px] text-[#EF4444]"}),children:v.jsxs("div",{className:"flex h-full items-center gap-4",children:[v.jsxs("div",{className:"w-[202px] h-[170px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:i,innerRadius:55,outerRadius:85,dataKey:"value",stroke:"#FFFFFF",strokeWidth:2,children:i.map((a,s)=>v.jsx(Vt,{fill:a.color},s))}),v.jsx(Ht,{content:v.jsx(Rde,{}),wrapperStyle:{zIndex:1e3}})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"flex items-baseline text-[18px] leading-[22px] font-medium text-[#121212]",children:[v.jsx("div",{children:r(n.completed)}),v.jsxs("div",{className:"text-[18.18px] leading-[22.22px] text-[#121212]",children:["/",o]})]}),v.jsx("div",{className:"text-[10.1px] leading-[14.14px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex-1 space-y-2",children:i.map(a=>v.jsxs("div",{className:"flex items-center justify-between text-[12px] leading-[17px] mt-[12px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"h-[7px] w-[16px]",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]}),v.jsx("div",{className:"text-[#64748B] text-[12px] leading-[16px] font-medium",children:a.value})]},a.name))})]})})}const pk={visitorSummary:{totalVisitorsToday:150,peakTime:"2:00 - 4:00PM",peakCount:50,activeWalkins:18,preApprovedCheckins:3},popupData:{walkins:{currently_inside:18,total_visited_today:58},preApproved:{completed_visits:3,total_expected_today:5}},chart_data:[{hour:"10 AM",walkins:22,preApproved:30},{hour:"12 PM",walkins:15,preApproved:28},{hour:"2 PM",walkins:30,preApproved:38},{hour:"4 PM",walkins:45,preApproved:50},{hour:"6 PM",walkins:25,preApproved:40}]};function hk({title:e,color:t,rows:n=[],children:r}){const i=v.jsxs("div",{className:"bg-white rounded-xl min-w-[260px] p-4",children:[v.jsxs("div",{className:"flex items-center gap-2 font-medium text-[#121212]",children:[v.jsx(Zp,{className:`text-[20px] ${t}`}),v.jsx("div",{children:e??""})]}),v.jsx("div",{className:"mt-3 pt-3 border-t border-dashed border-gray-200 space-y-2",children:n?.map(({label:o,value:a,valueColor:s})=>v.jsxs("div",{className:"flex justify-between text-[14px]",children:[v.jsx("div",{children:o??""}),v.jsx("div",{className:"font-semibold",style:{color:s||"#121212"},children:a??0})]},o))})]});return v.jsx(Uj,{content:i,placement:"right-start",interactive:!0,delay:[100,0],offset:[6,0],appendTo:()=>document.body,theme:"light-border",maxWidth:"none",children:r})}function Lde({data:e}){const t=e&&Object.keys(e).length?e:pk,n=t?.visitor_summary?{totalVisitorsToday:t?.visitor_summary?.total_visitors_today??0,peakTime:t?.visitor_summary?.peak_time??"-"}:t?.visitorSummary??{},r=t?.walkins_popup_data?{walkins:{currently_inside:Number(t?.walkins_popup_data?.walkins_inside??0),total_visited_today:Number(t?.walkins_popup_data?.total_walkins??0)},preApproved:{completed_visits:Number(t?.pre_approved_popup_data?.pre_approved_check_ins??0),total_expected_today:Number(t?.pre_approved_popup_data?.total_pre_approved_check_ins??0)}}:t?.popupData??{},i=k.useMemo(()=>{const a=t?.chart_data??[];return a.length?a.map(s=>({time:s?.hour??"-",walkins:s?.walkins??0,approved:s?.pre_approved??s?.preApproved??0})):pk.chart_data},[t]),o=new Date().toLocaleTimeString("en-IN",{hour:"2-digit",minute:"2-digit",hour12:!0});return v.jsx(Ie,{className:"h-[377px]",title:"Visitor Updates",period:`Today at ${o}`,icon:v.jsx(Zp,{className:"!text-[24px] text-[#8B5CF6]"}),children:v.jsxs("div",{className:"flex flex-col mt-2",children:[v.jsxs("div",{className:"grid grid-cols-2 gap-y-4 gap-x-6 mb-6",children:[v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Total Visitors"}),v.jsx("div",{className:"text-[20px] font-medium text-[#08B6D4]",children:n?.totalVisitorsToday??0})]}),v.jsxs("div",{children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Peak Time"}),v.jsx("div",{className:"text-[20px] font-medium text-[#8B5CF6]",children:n?.peakTime??"-"})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Active Walk-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#1FA05B] leading-[32px]",children:r?.walkins?.currently_inside??0}),v.jsx(hk,{title:"Active Walk-ins",color:"text-[#1FA05B]",rows:[{label:"Currently Inside",value:r?.walkins?.currently_inside??0,valueColor:"#1FA05B"},{label:"Total Visited Today",value:r?.walkins?.total_visited_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.walkins?.total_visited_today??0]})})]})]}),v.jsxs("div",{className:"mt-2",children:[v.jsx("div",{className:"text-[10px] text-[#64748B]",children:"Pre-approved Check-ins"}),v.jsxs("div",{className:"flex items-baseline text-xl font-medium leading-[32px]",children:[v.jsx("div",{className:"text-[28px] text-[#E7A015] leading-[32px]",children:r?.preApproved?.completed_visits??0}),v.jsx(hk,{title:"Pre-approved Check-ins",color:"text-[#E7A015]",rows:[{label:"Completed Visits",value:r?.preApproved?.completed_visits??0,valueColor:"#E7A015"},{label:"Total Expected Check-ins Today",value:r?.preApproved?.total_expected_today??0}],children:v.jsxs("div",{className:"text-[#64748B] cursor-pointer text-[20px] leading-[32px]",children:["/",r?.preApproved?.total_expected_today??0]})})]})]})]}),v.jsx("div",{className:"w-full h-[179px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(xx,{data:i??[],children:[v.jsx(Hr,{stroke:"#E5E7EB",strokeDasharray:"4 4",vertical:!1}),v.jsx(br,{dataKey:"time",axisLine:!1,tickLine:!1,tick:{fill:"#121212",fontSize:12}}),v.jsx(nr,{width:30,axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(Ht,{}),v.jsx(zo,{type:"monotone",dataKey:"walkins",stroke:"#22C55E",strokeWidth:2,dot:!1}),v.jsx(zo,{type:"monotone",dataKey:"approved",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})})}const Fde=({color:e})=>v.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:e,marginRight:"6px"}}),$de=({active:e,payload:t})=>!e||!t||!t.length?null:v.jsx("div",{className:"bg-black text-white !text-[12px] px-3 py-2 rounded-lg shadow-lg",children:t.map((n,r)=>v.jsxs("div",{className:"capitalize flex gap-[4px] items-center leading-relaxed",children:[v.jsx(Fde,{color:n.color}),n.name,": ",v.jsx("div",{className:"font-semibold",children:n.value})]},r))});function Bde({data:e=null}){const n=e||{card_entry:60,mobile_entry:35,card_exit:15,mobile_exit:10,total:20.3},r=a=>{const s=Number(a);return isNaN(s)?0:s},i=[{name:"Card Entry",value:r(n.card_entry),color:"#329DFF"},{name:"Mobile Entry",value:r(n.mobile_entry),color:"#8B5CF6"},{name:"Card Exit",value:r(n.card_exit),color:"#B1D2F0"},{name:"Mobile Exit",value:r(n.mobile_exit),color:"#DACBFB"}],o=r(n.total);return v.jsx(fn,{className:"h-[362px]",title:"Access Overview",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center mt-[16px]",children:[v.jsxs("div",{className:"relative w-[200px] h-[200px]",children:[v.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:v.jsx("div",{className:"w-[130px] h-[130px] rounded-full shadow-[0px_12px_35px_rgba(0,0,0,0.12)]"})}),v.jsx("div",{className:"h-[184px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:i,dataKey:"value",innerRadius:65,outerRadius:90,startAngle:110,endAngle:-250,paddingAngle:2,stroke:"transparent",children:i.map((a,s)=>v.jsx(Vt,{fill:a.color},s))}),v.jsx(Ht,{content:v.jsx($de,{}),wrapperStyle:{zIndex:9999}})]})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"text-[20px] leading-[24px] font-semibold text-[#121212]",children:[o,"L"]}),v.jsx("div",{className:"text-[10px] leading-[15px] text-[#64748B]",children:"Total Access"})]})]}),v.jsx("div",{className:"mt-[32px] grid grid-cols-2 gap-x-[20px] gap-y-[12px] text-[12px] text-[#94A3B8]",children:i.map(a=>v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px] ",style:{backgroundColor:a.color}}),v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:a.name})]},a.name))})]})})}function zR({title:e="Access",data:t=[],height:n="h-[362px]"}){const r=i=>i==null?"0":Number(i).toLocaleString();return v.jsx(fn,{className:n,title:e,titleWeight:"semi-bold",children:v.jsxs("div",{className:"rounded-xl overflow-hidden mt-[16px]",children:[v.jsxs("div",{className:"grid grid-cols-2 bg-[#F8FAFC] py-[8px] px-[12px] text-[12px] leading-[16px] font-medium text-[#64748B]",children:[v.jsx("div",{children:"Point"}),v.jsx("div",{className:"text-right",children:"Access"})]}),t.map((i,o)=>v.jsxs("div",{className:"grid grid-cols-2 p-[12px] text-[14px] border-t border-[#E2E8F0]",children:[v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:i.label}),v.jsx("div",{className:"text-[12px] leading-[16px] text-right font-medium",style:{color:i.color||"#000"},children:r(i.value)})]},o))]})})}function Wde({data:e=[]}){const t=[{name:"Google",value:82e3},{name:"Uber",value:67e3},{name:"ANAROCK",value:6e4},{name:"Flipkart",value:48e3},{name:"HP",value:41e3},{name:"Myntra",value:3e4},{name:"Cloudscape",value:2e4},{name:"Infosys",value:9e3}],n=e.length?e:t,r=o=>o>=1e3?`${o/1e3}K`:o,i=Math.max(...n.map(o=>o.value));return v.jsx(fn,{title:"Access Points Usage",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"mt-[24px] h-[270px] w-full",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n,barSize:60,margin:{top:0,right:0,left:-20,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"8 8",vertical:!1}),v.jsx(dx,{y:0,stroke:"#EBEBEB",strokeDasharray:"0"}),v.jsx(br,{dataKey:"name",tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(nr,{tickFormatter:r,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1}),v.jsx(Ht,{cursor:!1}),v.jsx(jn,{dataKey:"value",barSize:60,children:n.map((o,a)=>v.jsx(Vt,{fill:o.value===i?"#3C81F6":"#79ABFF"},`cell-${a}`))})]})})})})}function Po({image:e="https://cdni.iconscout.com/illustration/premium/thumb/businessman-sad-for-no-data-in-folder-illustration-svg-download-png-10155562.png",title:t="No Data Available",description:n="Catch up all the data. Change the date range to see the data."}){return v.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-center px-4",children:[v.jsx("img",{src:e,alt:"no data",className:"w-32 h-32 mb-4 opacity-80"}),v.jsx("h3",{className:"text-[16px] font-semibold text-gray-900 mb-1",children:t}),v.jsx("p",{className:"text-sm text-gray-500 max-w-[260px]",children:n})]})}const zde=({active:e,payload:t})=>e&&t&&t.length?v.jsx("div",{className:"bg-black text-white px-4 py-2 rounded-lg text-sm shadow-lg",children:v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{children:t[0].payload.name}),v.jsx("div",{className:"font-semibold",children:t[0].value})]})}):null,Vde=({x:e,y:t,payload:n})=>{const r=n.value.split(" ");return v.jsx("g",{transform:`translate(${e},${t})`,children:v.jsx("text",{x:-85,y:0,textAnchor:"start",fill:"#121212",fontSize:14,children:r.map((i,o)=>v.jsx("tspan",{x:-85,dy:o===0?0:16,children:i},o))})})};function Hde({data:e=[]}){const t=e&&e.length>0,n=e.map(i=>({name:i.category_name,value:i.total_complaints})),r=Math.max(...n.map(i=>i.value),0);return v.jsx(fn,{title:"Tickets per Category",className:"h-[362px]",titleWeight:"semi-bold",childrenClassName:"h-full",children:t?v.jsx("div",{className:"w-full h-[280px] mt-[28px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n,layout:"vertical",children:[v.jsx(Hr,{strokeDasharray:"3 3",horizontal:!1}),v.jsx(br,{type:"number",domain:[0,Math.ceil(r*1.2)||10],tick:{fill:"#94A3B8",fontSize:12},axisLine:!0,tickLine:!1,allowDecimals:!1}),v.jsx(nr,{type:"category",dataKey:"name",axisLine:!1,tickLine:!1,width:120,tick:v.jsx(Vde,{})}),v.jsx(Ht,{content:v.jsx(zde,{}),cursor:{fill:"transparent"}}),v.jsx(jn,{dataKey:"value",barSize:36,children:n.map((i,o)=>v.jsx(Vt,{fill:i.value===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})}):v.jsx(Po,{title:"No Tickets Found",description:"Catch up all the data. Change the date range to see the data."})})}function Yde({icon:e,iconColor:t="#329DFF",title:n,value:r,percentage:i,percentageText:o}){const a=parseFloat(i),s=a>=0,l=s?"#16A34A":"#DC2626";return v.jsxs("div",{className:"relative bg-white rounded-[12px] shadow-[0_0_12px_0_#EAF2FF] p-[16px]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[e&&v.jsx("div",{className:"h-[20px] w-[20px]",style:{color:t,display:"flex",alignItems:"center",justifyContent:"center"},children:v.jsx(e,{className:"h-[20px] w-[20px]"})}),v.jsx("div",{className:"text-[16px] leading-[20px] font-medium text-[#64748B]",children:n})]}),v.jsx("div",{className:"mt-[16px] text-[28px] leading-[32px] font-medium text-[#121212]",children:r}),(i||o)&&v.jsxs("div",{className:"mt-[12px] flex items-center gap-2",children:[i&&v.jsxs("div",{className:"flex items-center gap-[4px] text-[12px] leading-[16px] font-medium",style:{color:l},children:[s?v.jsx(du,{}):v.jsx(Qp,{}),Math.abs(a),"%"]}),o&&v.jsx("div",{className:"text-[12px] leading-[16px] text-[#64748B]",children:o})]})]})}const Ude=({data:e=[],onDateChange:t})=>{const[n,r]=k.useState(new Date),[i,o]=k.useState(!1),s=(g=>{const b=new Date(g);return b.setDate(b.getDate()-6),b})(n),l=g=>{try{return g.toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}catch{return""}},c=g=>{const b=new Date(g),S=new Date(b);S.setDate(S.getDate()-6),t&&t(S.toISOString(),b.toISOString())},u=()=>{const g=new Date(n);g.setDate(g.getDate()-7),r(g),c(g)},d=()=>{const g=new Date(n);g.setDate(g.getDate()+7),r(g),c(g)},f=()=>{o(g=>!g)},p=g=>{const b=g||new Date;r(b),c(b),o(!1)},m=Array.isArray(e)?e:[],h=!m.length||m.every(g=>g.no_of_visitors===0);return v.jsxs(fn,{title:"Weekly Visitor Pattern",period:`${l(s)} - ${l(n)}`,isDateSelector:!0,titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",onPrevClick:u,onNextClick:d,onCalendarClick:f,children:[i&&v.jsx("div",{className:"absolute top-[70px] right-[24px] z-50 bg-white shadow-lg rounded-lg",children:v.jsx(BC,{selected:n,onChange:p,inline:!0})}),h?v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsx("div",{className:"w-full h-[260px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(one,{data:m,margin:{top:10,right:10,left:0,bottom:0},children:[v.jsx("defs",{children:v.jsxs("linearGradient",{id:"colorVisitors",x1:"0",y1:"0",x2:"0",y2:"1",children:[v.jsx("stop",{offset:"0%",stopColor:"#6366F1",stopOpacity:.25}),v.jsx("stop",{offset:"100%",stopColor:"#6366F1",stopOpacity:0})]})}),v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(br,{dataKey:"day",type:"category",scale:"point",padding:{left:20,right:20},tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1,tickFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"})}),v.jsx(nr,{width:35,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1,domain:[0,"dataMax + 2"]}),v.jsx(Ht,{labelFormatter:g=>new Date(g).toLocaleDateString("en-GB",{day:"2-digit",month:"short"}),formatter:g=>[g,"Visitors"]}),v.jsx(PN,{type:"monotone",dataKey:"no_of_visitors",stroke:"#6366F1",strokeWidth:2,fill:"url(#colorVisitors)",dot:{r:5,stroke:"#6366F1",strokeWidth:2,fill:"#fff"},activeDot:{r:6}})]})})})]})},Kde=[{building_name:"Google",no_of_visitors:1e3},{building_name:"Uber",no_of_visitors:3500},{building_name:"ANAROCK",no_of_visitors:2e3},{building_name:"Flipkart",no_of_visitors:8e3},{building_name:"HP",no_of_visitors:1650}],qde=({data:e})=>{const t=Array.isArray(e)&&e?.length===0,n=e==null?Kde:Array.isArray(e)?e:[];let r=0;for(let i=0;i<(n?.length||0);i++){const o=Number(n?.[i]?.no_of_visitors)||0;o>r&&(r=o)}return v.jsx(fn,{title:"Organisation Wise Visitors",titleWeight:"semi-bold",className:"h-[360px]",childrenClassName:"mt-6",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Visitors Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n||[],margin:{top:10,right:10,left:0,bottom:0},barCategoryGap:35,children:[v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#F1F5F9"}),v.jsx(br,{dataKey:"building_name",tick:{fontSize:12,fill:"#64748B"},axisLine:!0,tickLine:!1}),v.jsx(nr,{width:40,tick:{fontSize:12,fill:"#64748B"},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(Ht,{cursor:!1}),v.jsx(jn,{dataKey:"no_of_visitors",name:"Visitors",maxBarSize:55,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.no_of_visitors||0)===r?"#3B82F6":"#7FB0FF"},`cell-${o}`))})]})})})})};function Gde({data:e}){return v.jsx("div",{className:"h-full",children:e.map((t,n)=>{const r=parseFloat(t.delta),i=r>=0;return v.jsx(Ie,{iconClassName:"!gap-[8px]",title:v.jsx("div",{className:"text-[#64748B]",children:t.title}),icon:v.jsx(t.Icon,{className:"h-[20px] w-[20px]",style:{color:t.iconColor||"#000000"}}),className:"h-[132px]",children:v.jsxs("div",{children:[v.jsx("div",{className:"text-[28px] leading-[32px] font-medium text-[#121212]",children:t.value}),v.jsxs("div",{className:`flex items-center pt-[8px] text-[12px] leading-[16px] ${t.delta?"gap-[8px]":""}`,children:[t.delta&&v.jsxs("div",{className:"flex items-center gap-[4px]",style:{color:i?"#1FA05B":"#E11D48",fontWeight:500},children:[i?v.jsx(du,{}):v.jsx(Qp,{}),Math.abs(r),"%"]}),v.jsx("div",{style:{color:"#64748B"},children:t.deltaLabel})]})]})},n)})})}const Xde=[{facility_name:"Table Tennis",total_booking:5},{facility_name:"Gym",total_booking:12},{facility_name:"Meeting Room A",total_booking:3},{facility_name:"Conference Hall",total_booking:8}],Qde=({x:e,y:t,payload:n})=>v.jsx("foreignObject",{x:(e||0)-80,y:(t||0)-18,width:80,height:40,children:v.jsx("div",{className:"text-[12px] leading-[16px] text-[#121212]",style:{width:"80px",whiteSpace:"normal",wordBreak:"break-word",textAlign:"left"},children:n?.value||""})});function Zde({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e==null?Xde:Array?.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.total_booking||0)||[0],0):0;return v.jsx(Ie,{title:"Bookings",icon:v.jsx(Xue,{size:18,className:"text-[#DBB467]"}),className:"h-[288px]",children:v.jsx("div",{className:"w-full h-full flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n||[],layout:"vertical",margin:{top:0,right:10,left:10,bottom:0},children:[v.jsx(br,{type:"number",allowDecimals:!1,domain:[0,Math.ceil(r||0)],tick:{fill:"#64748B",fontSize:12},axisLine:!0,tickLine:!1}),v.jsx(nr,{type:"category",dataKey:"facility_name",axisLine:!1,tickLine:!1,width:100,tick:v.jsx(Qde,{})}),v.jsx(Ht,{formatter:i=>[i,"Bookings"],cursor:{fill:"rgba(0,0,0,0.05)"}}),v.jsx(jn,{dataKey:"total_booking",barSize:40,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.total_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const Jde=[{building_name:"Google",no_of_booking:1},{building_name:"Uber",no_of_booking:2},{building_name:"ANAROCK",no_of_booking:4},{building_name:"Flipkart",no_of_booking:2},{building_name:"HP",no_of_booking:1}];function efe({data:e}){const t=Array.isArray(e)&&e?.length===0,n=e==null?Jde:Array.isArray(e)?e:[],r=n?.length>0?Math.max(...n?.map?.(i=>i?.no_of_booking||0)||[0],0):0;return v.jsx(fn,{title:"Booking Trend by Organisation",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"w-full h-[280px] flex items-center justify-center",children:t?v.jsx(Po,{title:"No Booking Found",description:"Catch up all the data. Change the date range to see the data."}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:n||[],margin:{top:0,right:0,left:-15,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1,stroke:"#E5E7EB"}),v.jsx(br,{dataKey:"building_name",axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12}}),v.jsx(nr,{allowDecimals:!1,domain:[0,Math.ceil(r||0)],axisLine:!1,tickLine:!1,tick:{fill:"#64748B",fontSize:12},tickFormatter:i=>`${i??0}`}),v.jsx(Ht,{formatter:i=>[i,"Bookings"],labelFormatter:i=>`Organisation: ${i}`,cursor:{fill:"rgba(0,0,0,0.05)"}}),v.jsx(jn,{dataKey:"no_of_booking",barSize:54,children:n?.map?.((i,o)=>v.jsx(Vt,{fill:(i?.no_of_booking||0)===r?"#3C81F6":"#79ABFF"},`cell-${o}`))})]})})})})}const tfe=[{facility_name:"Table Tennis",paid_revenue:"24000.00"},{facility_name:"Games Room",paid_revenue:"14000.00"},{facility_name:"Badminton",paid_revenue:"10000.00"},{facility_name:"GYM",paid_revenue:"4000.00"}],zd=["#3C81F6","#60A5FA","#95BFFA","#BEDAFE","#DAE6FC"];function nfe({data:e}){const t=Array?.isArray(e)&&e?.length===0,n=e??tfe,r=Array?.isArray(n)&&n?.length>0?n?.map(s=>({name:s?.facility_name||"Unknown",value:Number(s?.paid_revenue)||0})):[],o=(r?.length>0?r?.every(s=>s?.value===0):!1)?r?.map((s,l)=>({...s,value:l===0?1:0})):r,a=s=>`₹ ${s?.toLocaleString?.("en-IN")||0}`;return v.jsx(fn,{title:"Amenity Wise Revenue",titleWeight:"semi-bold",className:"h-[362px]",children:v.jsx("div",{className:"grid grid-cols-12 gap-6 items-center h-full",children:t?v.jsx("div",{className:"col-span-12 flex items-center justify-center h-[240px]",children:v.jsx(Po,{title:"No Amenity Found",description:"Catch up all the data. Change the date range to see the data."})}):v.jsxs(v.Fragment,{children:[v.jsx("div",{className:"col-span-5 h-[240px]",children:v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:o||[],dataKey:"value",nameKey:"name",cx:"50%",cy:"50%",outerRadius:95,stroke:"#fff",strokeWidth:1,children:o?.map?.((s,l)=>v.jsx(Vt,{fill:zd?.[l%zd?.length]},`cell-${l}`))}),v.jsx(Ht,{formatter:s=>a(s),labelFormatter:s=>`Amenity: ${s||""}`,contentStyle:{borderRadius:"10px",border:"1px solid #EBEBEB",fontSize:"12px"}})]})})}),v.jsx("div",{className:"col-span-7",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden",children:[v.jsxs("div",{className:"grid grid-cols-2 px-[12px] py-[8px] bg-[#EBEBEB] text-[12px] leading-[16px] font-semibold text-[#64748B]",children:[v.jsx("div",{children:"Amenity"}),v.jsx("div",{className:"text-right",children:"Revenue"})]}),v.jsx("div",{className:"divide-y divide-[#F1F5F9]",children:r?.map?.((s,l)=>v.jsxs("div",{className:"grid grid-cols-2 px-4 py-4 text-[14px] text-[#121212]",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("span",{className:"w-[16px] h-[7px]",style:{backgroundColor:zd?.[l%zd?.length]}}),v.jsx("span",{className:"text-[#64748B] text-[12px] leading-[16px]",children:s?.name||"Unknown"})]}),v.jsx("div",{className:"text-right text-[12px] leading-[16px] text-[#64748B]",children:a(s?.value||0)})]},s?.name||l))})]})})]})})})}const Vd=["#8CB33E","#F59E0B","#3B82F6","#06B6D4","#CFCFCF"],rfe=[{asset_group_name:"Lifts",asset_count:3},{asset_group_name:"Fire Systems",asset_count:16},{asset_group_name:"Generators",asset_count:16},{asset_group_name:"HVAC",asset_count:24},{asset_group_name:"Others",asset_count:97}],ife=({rows:e,totalAssets:t})=>{const n=k.useMemo(()=>e?e.length===0?[]:e.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})):rfe.map((i,o)=>({name:i.asset_group_name,value:i.asset_count||0,color:Vd[o%Vd.length]})),[e]),r=t??n.reduce((i,o)=>i+o.value,0);return e&&e.length===0?v.jsx(fn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"flex items-center justify-center h-full",children:v.jsx(Po,{title:"No Assets Found",description:"Catch up all the data. Change the date range to see the data."})})}):v.jsx(fn,{title:"Assets by Type",titleWeight:"semi-bold",className:"h-full",children:v.jsxs("div",{className:"flex items-center justify-between gap-8",children:[v.jsxs("div",{className:"relative w-[240px] h-[240px]",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsx(_o,{children:v.jsx(Mi,{data:n,dataKey:"value",cx:"50%",cy:"50%",innerRadius:60,outerRadius:90,paddingAngle:2,stroke:"#FFFFFF",strokeWidth:2,startAngle:90,endAngle:-270,children:n.map((i,o)=>v.jsx(Vt,{fill:i.color},o))})})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[v.jsx("div",{className:"text-[24px] text-[#121212]",children:r}),v.jsx("div",{className:"text-[12px] text-[#94A3B8] mt-1",children:"Total Assets"})]})]}),v.jsx("div",{className:"flex-1 max-w-[280px]",children:v.jsxs("div",{className:"rounded-[12px] overflow-hidden bg-white",children:[v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 bg-[#F8FAFC]",children:[v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Asset"}),v.jsx("div",{className:"text-[12px] font-medium text-[#64748B]",children:"Count"})]}),n.map((i,o)=>v.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-t border-[#F1F5F9]",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("div",{className:"w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"text-[13px] text-[#475569]",children:i.name})]}),v.jsx("div",{className:"text-[13px] text-[#64748B]",children:i.value})]},o))]})})]})})},ofe=({data:e})=>{const[t,n]=k.useState({}),r=[{name:"Lifts",Cancelled:55,Closed:45,Open:50,OnHold:20,InProgress:10},{name:"Fire Systems",Cancelled:15,Closed:45,Open:15,OnHold:8,InProgress:5},{name:"Generators",Cancelled:12,Closed:45,Open:75,OnHold:18,InProgress:7},{name:"HVAC",Cancelled:45,Closed:80,Open:30,OnHold:22,InProgress:12},{name:"Others",Cancelled:18,Closed:18,Open:45,OnHold:9,InProgress:4}],i=k.useMemo(()=>e?Array.isArray(e)&&e.length===0?[]:e:r,[e]),o=a=>{const{dataKey:s}=a;n(l=>({...l,[s]:!l[s]}))};return Array.isArray(e)&&e.length===0?v.jsx(fn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:v.jsx(Po,{title:"No Maintenance Assets Status Found",description:"Catch up all the data. Change the date range to see the data."})})}):v.jsx(fn,{title:"Maintenance Status",titleWeight:"semi-bold",className:"h-full",children:v.jsx("div",{className:"w-full h-[260px] flex items-center justify-center",children:Array.isArray(e)&&e.length===0?v.jsx("div",{className:"text-[#94A3B8] text-sm",children:"No Data Found"}):v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(ia,{data:i,barSize:50,margin:{top:0,right:0,left:-30,bottom:0},children:[v.jsx(Hr,{strokeDasharray:"3 3",vertical:!1}),v.jsx(br,{dataKey:"name",tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1}),v.jsx(nr,{tick:{fill:"#64748B",fontSize:12},axisLine:!1,tickLine:!1,allowDecimals:!1}),v.jsx(Ht,{cursor:{fill:"rgba(148, 163, 184, 0.12)"},contentStyle:{borderRadius:"10px",border:"1px solid #E2E8F0",fontSize:"12px"}}),v.jsx(ph,{verticalAlign:"bottom",align:"center",iconType:"square",onClick:o,formatter:a=>v.jsx("div",{style:{color:t[a]?"#CBD5E1":"#64748B",cursor:"pointer",fontSize:"12px",display:"inline-flex",alignItems:"center"},children:a}),wrapperStyle:{paddingTop:"18px"}}),v.jsx(jn,{dataKey:"Open",stackId:"a",fill:"#3B82F6",hide:t.Open}),v.jsx(jn,{dataKey:"Closed",stackId:"a",fill:"#10B981",hide:t.Closed}),v.jsx(jn,{dataKey:"Cancelled",stackId:"a",fill:"#B91C1C",hide:t.Cancelled}),v.jsx(jn,{dataKey:"OnHold",stackId:"a",fill:"#64748B",hide:t.OnHold}),v.jsx(jn,{dataKey:"InProgress",stackId:"a",fill:"#F59E0B",hide:t.InProgress})]})})})})};function afe({data:e}){const t=[{name:"Completed",value:Number(e?.completed||0),color:"#12B981"},{name:"Delayed",value:Number(e?.not_completed||0),color:"#EF4444"},{name:"Missed",value:Number(e?.missed||0),color:"#F69E0A"}],n=Number(e?.completed||0)+Number(e?.not_completed||0)+Number(e?.missed||0),r=Number(e?.completed||0);return v.jsx(fn,{title:"Guard Patrols",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{className:"flex flex-col items-center justify-center",children:[v.jsxs("div",{className:"w-[215px] h-[182px] relative",children:[v.jsx(Ft,{width:"100%",height:"100%",children:v.jsxs(_o,{children:[v.jsx(Mi,{data:t,innerRadius:60,outerRadius:90,paddingAngle:2,dataKey:"value",nameKey:"name",children:t.map((i,o)=>v.jsx(Vt,{fill:i.color},`cell-${o}`))}),v.jsx(Ht,{formatter:i=>i.toLocaleString()})]})}),v.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center pointer-events-none",children:[v.jsxs("div",{className:"font-medium text-[19.35px] leading-[23.65px]",children:[r,"/",n]}),v.jsx("div",{className:"text-[10.75px] leading-[15.05px] text-[#64748B]",children:"Completed"})]})]}),v.jsx("div",{className:"flex flex-col w-full text-[14px]",children:t.map((i,o)=>v.jsxs("div",{className:`flex items-center justify-between py-[10px] ${o!==t.length-1?"border-b border-[#F1F5F9]":""}`,children:[v.jsxs("div",{className:"flex items-center gap-[10px]",children:[v.jsx("div",{className:"inline-block w-[16px] h-[7px]",style:{backgroundColor:i.color}}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.name})]}),v.jsx("div",{className:"leading-[16.09px] text-[12.07px] text-[#64748B]",children:i.value})]},i.name))})]})})}function sfe({incidentReports:e,incidentReportsDetails:t}){const n=Number(e?.open||0),r=Number(e?.in_progress||0),i=Number(e?.closed||0);return v.jsx(fn,{title:"Incident Reports",className:"h-[362px]",titleWeight:"semi-bold",children:v.jsxs("div",{children:[v.jsxs("div",{className:"flex w-full text-center gap-[24px]",children:[v.jsxs("div",{className:"flex-1 py-3 bg-[#FBF4F4] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#AB0000]",children:n}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#AB0000]",children:"Open"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#FFFBF2] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#E7A015]",children:r}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#E7A015]",children:"In-progress"})]}),v.jsxs("div",{className:"flex-1 py-3 bg-[#F7FEFA] h-[76px] rounded",children:[v.jsx("div",{className:"!text-[24px] leading-[28px] font-medium text-[#1FA05B]",children:i}),v.jsx("div",{className:"!text-[12px] leading-[16px] text-[#1FA05B]",children:"Closed"})]})]}),v.jsx("div",{className:"mt-4 space-y-2",children:t?.length>0?t.map((o,a)=>{const s=o?.severity==="Danger"?"text-[#AB0000]":o?.severity==="High"?"text-[#E7A015]":"text-[#1FA05B]";return v.jsxs("div",{className:"flex items-center justify-between p-3 bg-[#FAFBFD] rounded-md",children:[v.jsx("div",{className:"flex items-center gap-[8px]",children:v.jsx("div",{className:"text-gray-700 font-medium",children:o?.incident_code})}),v.jsx("div",{className:`!text-[12px] font-semibold flex items-center gap-[4px] ${s}`,children:v.jsxs("div",{children:[o?.severity_level," - ",o?.severity]})})]},a)}):v.jsx("div",{className:"text-[16px] text-center text-gray-400 text-sm py-6",children:"No incidents found"})})]})})}function lfe({columns:e=[{key:"a",label:"Organisation"},{key:"b",label:"Item"},{key:"c",label:"Orders"},{key:"d",label:"Revenue"},{key:"e",label:"AOV"},{key:"f",label:"% Revenue"}],data:t=[{a:"Google",b:"Coffee",c:"34,908",d:"₹ 57,21,288",e:"₹ 450",f:"43.6%"},{a:"Uber",b:"Paneer Combo",c:"12,000",d:"₹ 12,00,000",e:"₹ 500",f:"100%"}],rowsPerPage:n=10,setRowsPerPage:r=()=>{},currentPage:i=1,setCurrentPage:o=()=>{},pageOptions:a=[10,20,30,40,50]}){const s=Array.isArray(t)?t:[],l=Array.isArray(e)?e:[],c=n>0?Math.ceil(s.length/n):1,u=(i-1)*n,d=u+n,f=s.slice(u,d);return v.jsxs("div",{className:"w-full bg-white rounded-xl h-[390px] shadow-md overflow-hidden flex flex-col",children:[v.jsx("div",{className:"grid bg-slate-600 text-white text-sm font-medium",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((p,m)=>v.jsx("div",{className:"px-6 py-4",children:p.label},m))}),v.jsx("div",{className:"flex-1 overflow-y-auto",children:f.length>0?f.map((p,m)=>v.jsx("div",{className:"grid text-sm text-gray-700 hover:bg-gray-50 transition",style:{gridTemplateColumns:`repeat(${l.length}, 1fr)`},children:l.map((h,g)=>{const b=p[h.key],S=typeof b=="string"&&b.includes("%"),w=b==="100%"?"bg-green-100 text-green-600":"bg-red-100 text-red-600";return v.jsx("div",{className:"px-6 py-4 bg-gray-50",children:S?v.jsx("div",{className:`inline-block px-3 py-1 rounded-full text-xs font-semibold ${w}`,children:b}):v.jsx("div",{children:b??"-"})},g)})},m)):v.jsx(Po,{title:"No Data Found",description:"Catch up all the data. Change the date range to see the data."})}),v.jsxs("div",{className:"flex justify-end items-center px-6 py-4 text-sm bg-white gap-8",children:[v.jsxs("div",{className:"flex items-center gap-2 text-gray-600",children:[v.jsx("div",{children:"Rows per page:"}),v.jsx("select",{value:n,onChange:p=>{r(Number(p.target.value)),o(1)},className:"border rounded px-2 py-1",children:a.map((p,m)=>v.jsx("option",{value:p,children:p},m))}),v.jsxs("div",{className:"ml-4",children:[s.length===0?"0–0":`${u+1}–${Math.min(d,s.length)}`," ","of ",s.length]})]}),v.jsxs("div",{className:"flex items-center space-x-2 text-gray-600",children:[v.jsx("button",{onClick:()=>o(1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(Uue,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p-1),disabled:i===1,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx($R,{size:18})}),v.jsx("button",{onClick:()=>o(p=>p+1),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(BR,{size:18})}),v.jsx("button",{onClick:()=>o(c),disabled:i===c,className:"p-2 rounded hover:bg-gray-100 disabled:opacity-40",children:v.jsx(que,{size:18})})]})]})]})}exports.AccessPointsUsage=Wde;exports.Accounting=Sue;exports.Amenities=Nde;exports.AmenitiesStatsCard=Gde;exports.AmenityWiseRevenue=nfe;exports.AssetValueBreakdown=Cue;exports.AssetsByType=ife;exports.BlockWiseOccupancy=bue;exports.BookingTrendChart=efe;exports.Bookings=Zde;exports.Budgets=Oue;exports.Card=Ie;exports.CardAccess=zR;exports.CashBankBalance=Eue;exports.CommercialAccessOverview=Bde;exports.CommercialGuardPatrols=afe;exports.CommercialIncidentReports=sfe;exports.CommercialOccupancy=Ade;exports.CommercialReportTable=lfe;exports.Community=ioe;exports.Complaints=lde;exports.ComplaintsByLevel=pde;exports.DuesAgeing=Pue;exports.EmployeeFootfall=Tde;exports.Engagement=ooe;exports.EngagementStatsGrid=Dde;exports.EventsUtilisation=Sde;exports.ExpenseCategories=kue;exports.Facilities=aoe;exports.FinanceSummary=soe;exports.FoodBeverages=Mde;exports.GateAndSecurityStatsGrid=ode;exports.GateUpdates=Uoe;exports.GuardPatrols=Jue;exports.Header=f3;exports.Helpdesk=Koe;exports.HelpdeskStatsGrid=_de;exports.HourlyTrafficFlow=ede;exports.IncidentReports=tde;exports.IncomeExpenditure=LR;exports.MainHeader=E3;exports.MaintenanceStatus=ofe;exports.MetricCard=Yde;exports.MobileAccess=zR;exports.MoveInOutTrends=wue;exports.NoticeBoardStatus=Ode;exports.OccupancyOverview=gue;exports.OrganisationWiseVisitors=qde;exports.RequestBox=mde;exports.ResidentOverview=yue;exports.RevenuebyCategory=Due;exports.SingleStats=Pde;exports.StaffAttendance=nde;exports.StatsGrid=Nue;exports.TicketEscalation=jde;exports.TicketStatus=Ide;exports.Tickets=IR;exports.TicketsperCategory=Hde;exports.UnitStatus=IR;exports.VisitorUpdates=Lde;exports.WeeklyVisitorPattern=Ude;