anarock-widgets 1.0.1 → 1.0.3

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
@@ -195,7 +195,7 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
195
195
  *
196
196
  * This source code is licensed under the MIT license found in the
197
197
  * LICENSE file in the root directory of this source tree.
198
- */var db;function z8(){return db||(db=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,s=t.useDebugValue;Of.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Of}var hb;function W8(){return hb||(hb=1,process.env.NODE_ENV==="production"?cs.exports=B8():cs.exports=z8()),cs.exports}W8();function V8(e){e()}function H8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){V8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var pb={notify(){},get:()=>[]};function U8(e,t){let r,n=pb,i=0,a=!1;function o(p){u();const g=n.subscribe(p);let v=!1;return()=>{v||(v=!0,g(),f())}}function s(){n.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return a}function u(){i++,r||(r=e.subscribe(l),n=H8())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=pb)}function d(){a||(a=!0,u())}function h(){a&&(a=!1,f())}const m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return m}var K8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q8=K8(),Y8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",G8=Y8(),X8=()=>q8||G8?A.useLayoutEffect:A.useEffect,Z8=X8(),J8=Symbol.for("react-redux-context"),Q8=typeof globalThis<"u"?globalThis:{};function ez(){if(!A.createContext)return{};const e=Q8[J8]??=new Map;let t=e.get(A.createContext);return t||(t=A.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(A.createContext,t)),t}var tz=ez();function rz(e){const{children:t,context:r,serverState:n,store:i}=e,a=A.useMemo(()=>{const l=U8(i),c={store:i,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),o=A.useMemo(()=>i.getState(),[i]);Z8(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,o]);const s=r||tz;return A.createElement(s.Provider,{value:a},t)}var nz=rz,iz=(e,t)=>t,Up=N([iz,ue,tS,ft,KS,an,f4,ct],g4),Kp=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},U2=lr("mouseClick"),K2=vo();K2.startListening({actionCreator:U2,effect:(e,t)=>{var r=e.payload,n=Up(t.getState(),Kp(r));n?.activeIndex!=null&&t.dispatch(b$({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Id=lr("mouseMove"),q2=vo();q2.startListening({actionCreator:Id,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mp(n,n.tooltip.settings.shared),a=Up(n,Kp(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(FS({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(LS()))}});var mb={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},Y2=Qt({name:"rootProps",initialState:mb,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:mb.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}}}),az=Y2.reducer,{updateOptions:oz}=Y2.actions,G2=Qt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:sz}=G2.actions,lz=G2.reducer,X2=lr("keyDown"),Z2=lr("focus"),qp=vo();qp.startListening({actionCreator:X2,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=Number(gp(i,na(r))),s=an(r);if(a==="Enter"){var l=dl(r,"axis","hover",String(i.index));t.dispatch(Ed({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=u$(r),u=c==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,d=o+f*u;if(!(s==null||d>=s.length||d<0)){var h=dl(r,"axis","hover",String(d));t.dispatch(Ed({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}});qp.startListening({actionCreator:Z2,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=dl(r,"axis","hover",String(a));t.dispatch(Ed({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var ir=lr("externalEvent"),J2=vo();J2.startListening({actionCreator:ir,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:t4(r),activeDataKey:XS(r),activeIndex:xn(r),activeLabel:GS(r),activeTooltipIndex:xn(r),isTooltipActive:r4(r)};e.payload.handler(n,e.payload.reactEvent)}}});var cz=N([ra],e=>e.tooltipItemPayloads),uz=N([cz,To,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(s=>s.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var o=t(a,r);return o}}}),Q2=lr("touchMove"),eO=vo();eO.startListening({actionCreator:Q2,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mp(n,n.tooltip.settings.shared);if(i==="axis"){var a=Up(n,Kp({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(FS({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var o,s=r.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(Rw),u=(o=l.getAttribute($w))!==null&&o!==void 0?o:void 0,f=uz(t.getState(),c,u);t.dispatch($S({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var fz=iw({brush:G3,cartesianAxis:kB,chartData:j4,errorBars:YB,graphicalItems:YF,layout:Oj,legend:dD,options:P4,polarAxis:fF,polarOptions:lz,referenceElements:r6,rootProps:az,tooltip:x$}),dz=function(t){return GM({reducer:fz,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([K2.middleware,q2.middleware,qp.middleware,J2.middleware,eO.middleware]),devTools:En.devToolsEnabled})};function tO(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Ft(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=dz(t));var o=uh;return A.createElement(nz,{context:o,store:a.current},r)}function rO(e){var{layout:t,width:r,height:n,margin:i}=e,a=et(),o=Ft();return k.useEffect(()=>{o||(a(wj(t)),a(_j({width:r,height:n})),a(xj(i)))},[a,o,t,r,n,i]),null}function nO(e){var t=et();return k.useEffect(()=>{t(oz(e))},[t,e]),null}var hz=["children"];function pz(e,t){if(e==null)return{};var r,n,i=mz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wl.apply(null,arguments)}var gz={width:"100%",height:"100%"},vz=k.forwardRef((e,t)=>{var r=Fw(),n=Bw(),i=Hw();if(!Fi(r)||!Fi(n))return null;var{children:a,otherAttributes:o,title:s,desc:l}=e,c,u;return typeof o.tabIndex=="number"?c=o.tabIndex:c=i?0:void 0,typeof o.role=="string"?u=o.role:u=i?"application":void 0,A.createElement(A1,wl({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:gz,ref:t}),a)}),yz=e=>{var{children:t}=e,r=G(ac);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return A.createElement(A1,{width:n,height:i,x:o,y:a},t)},gb=k.forwardRef((e,t)=>{var{children:r}=e,n=pz(e,hz),i=Ft();return i?A.createElement(yz,null,r):A.createElement(vz,wl({ref:t},n),r)});function bz(){var e=et(),[t,r]=k.useState(null),n=G(Qj);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Jt(a)&&a!==n&&e(Sj(a))}},[t,e,n]),r}function vb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(r),!0).forEach(function(n){wz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wz(e,t,r){return(t=_z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _z(e){var t=Sz(e,"string");return typeof t=="symbol"?t:t+""}function Sz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oz=k.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:p,style:g,width:v}=e,b=et(),[x,S]=k.useState(null),[w,O]=k.useState(null);z4();var E=bz(),C=k.useCallback(V=>{E(V),typeof t=="function"&&t(V),S(V),O(V)},[E,t,S,O]),M=k.useCallback(V=>{b(U2(V)),b(ir({handler:a,reactEvent:V}))},[b,a]),R=k.useCallback(V=>{b(Id(V)),b(ir({handler:c,reactEvent:V}))},[b,c]),j=k.useCallback(V=>{b(LS()),b(ir({handler:u,reactEvent:V}))},[b,u]),_=k.useCallback(V=>{b(Id(V)),b(ir({handler:f,reactEvent:V}))},[b,f]),I=k.useCallback(()=>{b(Z2())},[b]),D=k.useCallback(V=>{b(X2(V.key))},[b]),L=k.useCallback(V=>{b(ir({handler:o,reactEvent:V}))},[b,o]),W=k.useCallback(V=>{b(ir({handler:s,reactEvent:V}))},[b,s]),H=k.useCallback(V=>{b(ir({handler:l,reactEvent:V}))},[b,l]),te=k.useCallback(V=>{b(ir({handler:d,reactEvent:V}))},[b,d]),Q=k.useCallback(V=>{b(ir({handler:p,reactEvent:V}))},[b,p]),F=k.useCallback(V=>{b(Q2(V)),b(ir({handler:m,reactEvent:V}))},[b,m]),U=k.useCallback(V=>{b(ir({handler:h,reactEvent:V}))},[b,h]);return A.createElement(r2.Provider,{value:x},A.createElement(Pk.Provider,{value:w},A.createElement("div",{className:he("recharts-wrapper",n),style:xz({position:"relative",cursor:"default",width:v,height:i},g),onClick:M,onContextMenu:L,onDoubleClick:W,onFocus:I,onKeyDown:D,onMouseDown:H,onMouseEnter:R,onMouseLeave:j,onMouseMove:_,onMouseUp:te,onTouchEnd:U,onTouchMove:F,onTouchStart:Q,ref:C},r)))}),Az=["children","className","width","height","style","compact","title","desc"];function Ez(e,t){if(e==null)return{};var r,n,i=Pz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Pz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var iO=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=Ez(e,Az),f=Dr(u);return s?A.createElement(gb,{otherAttributes:f,title:l,desc:c},r):A.createElement(Oz,{className:n,style:o,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},A.createElement(gb,{otherAttributes:f,title:l,desc:c,ref:t},A.createElement(i6,null,r)))}),Cz=["width","height"];function Rd(){return Rd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rd.apply(null,arguments)}function kz(e,t){if(e==null)return{};var r,n,i=Tz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Tz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Mz={top:5,right:5,bottom:5,left:5},jz={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Mz,reverseStackOrder:!1,syncMethod:"index"},aO=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,jz),{width:a,height:o}=i,s=kz(i,Cz);if(!Fi(a)||!Fi(o))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=t,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return A.createElement(tO,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},A.createElement(N2,{chartData:d.data}),A.createElement(rO,{width:a,height:o,layout:i.layout,margin:i.margin}),A.createElement(nO,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(iO,Rd({},s,{width:a,height:o,ref:r})))}),Dz=["axis"],oO=k.forwardRef((e,t)=>A.createElement(aO,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Dz,tooltipPayloadSearcher:Op,categoricalChartProps:e,ref:t})),Nz=["axis","item"],Iz=k.forwardRef((e,t)=>A.createElement(aO,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Nz,tooltipPayloadSearcher:Op,categoricalChartProps:e,ref:t}));function Rz(e){var t=et();return k.useEffect(()=>{t(sz(e))},[t,e]),null}var $z=["width","height","layout"];function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$d.apply(null,arguments)}function Lz(e,t){if(e==null)return{};var r,n,i=Fz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Fz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Bz={top:5,right:5,bottom:5,left:5},zz={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Bz,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},Wz=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,zz),{width:a,height:o,layout:s}=i,l=Lz(i,$z);if(!Fi(a)||!Fi(o))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=t,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return A.createElement(tO,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},A.createElement(N2,{chartData:i.data}),A.createElement(rO,{width:a,height:o,layout:s,margin:i.margin}),A.createElement(nO,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(Rz,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),A.createElement(iO,$d({width:a,height:o},l,{ref:r})))}),Vz=["item"],Hz={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Cc=k.forwardRef((e,t)=>{var r=_t(e,Hz);return A.createElement(Wz,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Vz,tooltipPayloadSearcher:Op,categoricalChartProps:r,ref:t})});function Uz({isStatic:e,community:t}){const r=({value:u})=>{const f=u>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${f?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:f?`+${u}%`:`${u}%`})},n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),i=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),a=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),s=[{name:"Move-ins",value:n},{name:"Move-outs",value:i}],l={purple:"#8B5CF6",indigo:"#6366F1"},c=({active:u,payload:f})=>!u||!f||!f.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:f.map((d,h)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:d.color,marginRight:6}}),d.name,": ",y.jsx("span",{className:"font-semibold",children:d.value})]},h))});return y.jsx(be,{title:"Community",period:"This Month",icon:y.jsx(g1,{className:"text-2xl text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+i})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1 flex items-center",children:[y.jsx(r,{value:((a+o)/2).toFixed(2)}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),y.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:y.jsx(gi,{width:"75%",height:"100%",children:y.jsxs(Cc,{children:[y.jsxs(jo,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[y.jsx(jr,{fill:l.purple}),y.jsx(jr,{fill:l.indigo})]}),y.jsx(mi,{content:y.jsx(c,{})})]})})})]})})}function Kz({isStatic:e,engagement:t}){const r=[{name:"Notice",value:Number(t?.total_notices||0)},{name:"Post",value:Number(t?.total_topics||0)},{name:"Poll",value:Number(t?.total_polls||0)},{name:"Survey",value:Number(t?.total_surveys||0)}],n={Notice:"#8B5CF6",Post:"#22C55E",Poll:"#3B82F6",Survey:"#F59E0B"},i=({active:a,payload:o,label:s})=>!a||!o||!o.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[s&&y.jsx("p",{className:"font-medium mb-1",children:s}),o.map((l,c)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:l.color,marginRight:6}}),l.name,": ",y.jsx("span",{className:"font-semibold",children:l.value})]},c))]});return y.jsx(be,{title:"Engagement",period:"This Month",icon:y.jsx(ck,{className:"text-2xl text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:y.jsx(gi,{width:"100%",height:"100%",children:y.jsxs(Iz,{data:r,layout:"vertical",margin:{top:4,right:8,left:8,bottom:0},children:[y.jsx(Ac,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),y.jsx(Pc,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Ec,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),y.jsx(mi,{content:y.jsx(i,{}),cursor:{fill:"transparent"}}),y.jsx(j2,{dataKey:"value",barSize:40,isAnimationActive:!1,children:r.map(a=>y.jsx(jr,{fill:n[a.name]},a.name))})]})})})}function qz(e){if(!e)return 0;const[t,r]=e.split(" ");let[n,i]=t.split(":").map(Number);return r==="PM"&&n!==12&&(n+=12),r==="AM"&&n===12&&(n=0),n*60+i}function Yz(e){let t=Math.floor(e/60);const r=t>=12?"PM":"AM";return t=t%12||12,`${t} ${r}`}function Gz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=qz(i.slot_start_time),o=Math.floor(a/240)*240,s=o+240,l=`${o}-${s}`;r[l]||(r[l]={time:Yz(s),bookings:0,total:0}),r[l].bookings+=Number(i?.slot_bookings||0),r[l].total+=Number(i?.total_slots||0)}return Object.values(r)}function Xz({isStatic:e,facility:t}){const r=Number(t?.totalBookings||0),n=Number(t?.totalSlots||0),i=Number(t?.utilizationRate||0),a=k.useMemo(()=>t?.slots?.length?Gz(t.slots):[],[t]),o=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]}),s=a.length>0?Math.max(...a.map(l=>l.total),5):5;return y.jsxs(be,{title:"Facilities",period:"Today",icon:y.jsx(sk,{className:"text-2xl text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[y.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-4",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Bookings"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#8B5CF6]",children:r})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Total Slots"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#F59E0B]",children:n})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Utilisation Rate"}),y.jsxs("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium !text-[#329DFF]",children:[Number.isFinite(i)?i.toFixed(2):"0.00","%"]})]})]}),y.jsx("div",{className:"w-full h-[150px]",children:y.jsx(gi,{width:"100%",height:"100%",children:y.jsxs(oO,{data:a,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Ac,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),y.jsx(Ec,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(Pc,{yAxisId:"left",domain:[0,s],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(mi,{content:y.jsx(o,{})}),y.jsx(eo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),y.jsx(eo,{yAxisId:"left",type:"monotone",dataKey:"total",name:"Total Slots",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})}function Zz({data:e}){console.log(e,"financial");const t=e?.incomeSummary||{},r=e?.expenditureSummary||{};function n(i){if(i==null||isNaN(i))return"0";const a=Number(i);return a>=1e9?(a/1e9).toFixed(2)+"B":a>=1e6?(a/1e6).toFixed(2)+"M":a>=1e3?(a/1e3).toFixed(2)+"K":a.toFixed(2)}return y.jsx(be,{title:"Income",period:"This Month",icon:y.jsx(vg,{className:"text-2xl text-green-600"}),className:"!gap-4 break-inside-avoid h-[232px] overflow-hidden",children:y.jsxs("div",{children:[y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Income"}),y.jsx("div",{children:"Collection"}),y.jsx("div",{children:"Closing"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212] mb-2",children:[y.jsxs("div",{children:[n(t.opening_balance)," AED"]}),y.jsxs("div",{children:[n(t.income)," AED"]}),y.jsxs("div",{children:[n(t.collection)," AED"]}),y.jsxs("div",{children:[n(t.closing_balance)," AED"]})]}),y.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(vg,{className:"text-2xl text-red-600"}),y.jsx("div",{style:{fontWeight:500,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]}),y.jsx("div",{className:"!text-xs !leading-[16px] !text-[#64748B]",children:"This Month"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mt-4 mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Expenditure"}),y.jsx("div",{children:"Payment"}),y.jsx("div",{children:"Outstanding"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212]",children:[y.jsxs("div",{children:[n(r.opening_balance)," AED"]}),y.jsxs("div",{children:[n(r.expenditure)," AED"]}),y.jsxs("div",{children:[n(r.payment)," AED"]}),y.jsxs("div",{children:[n(r.outstanding)," AED"]})]})]})})}function Jz(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function Qz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Number(i.hour??0),s=Math.floor(a/4)*4+4,l=s;r[l]||(r[l]={time:Jz(s),walkins:0,checkins:0}),r[l].walkins+=Number(i.walkins??0),r[l].checkins+=Number(i.preApproved??0)}return Object.values(r)}function eW({isStatic:e,gate:t}){const r={green:"#12B981",amber:"#F69E0A"},n=t?.summary?.activeWalkins||{},i=t?.summary?.preApprovedCheckins||{},a=t?.summary?.staffAttendance||{},o=t?.chart?.length>0?Qz(t.chart):[],s=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]});return y.jsx(be,{title:"Gate Updates",period:"Today",icon:y.jsx(uk,{className:"text-2xl text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-2 text-sm mb-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Active Walk-ins"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[a.total_in_now??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",a.total_in_today??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Pre-approved Check-ins"}),y.jsxs("div",{className:"!m-0 text-[28px] leading-[32px] font-medium text-[#E7A015] flex",children:[i.expected_pass_scanned??0,y.jsxs("div",{className:"text-[20px] leading-[32px] text-[#64748B]",children:["/",i.total_expected_pass??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Staff Attendance"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[n.visitor_in??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",n.total_pass??0]})]})]})]}),y.jsx(gi,{width:"100%",height:"60%",children:y.jsxs(oO,{data:o,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Ec,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Pc,{yAxisId:"left",domain:[0,30],ticks:[0,10,20,30],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1,width:25}),y.jsx(Ac,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),y.jsx(mi,{content:y.jsx(s,{})}),y.jsx(eo,{type:"monotone",dataKey:"walkins",stroke:r.green,strokeWidth:2,dot:!1,name:"Walk-ins"}),y.jsx(eo,{type:"monotone",dataKey:"checkins",stroke:r.amber,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"})]})})]})})}function tW({isStatic:e,complaints:t}){const r=({value:c})=>{if(c==null||isNaN(c))return null;const u=c>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${u?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:u?`+${c}%`:`${c}%`})},n=[{name:"L1",value:Number(t?.today_L1||0)},{name:"L2",value:Number(t?.today_L2||0)},{name:"L3",value:Number(t?.today_L3||0)},{name:"No Level",value:Number(t?.today_NoLevel||0)}],a=n.reduce((c,u)=>c+u.value,0)===0?[{name:"No Data",value:1}]:n,o=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],s=({color:c})=>y.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:c,marginRight:"6px"}}),l=({active:c,payload:u})=>!c||!u||!u.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:u.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx(s,{color:f.color}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))});return y.jsx(be,{title:"Helpdesk",period:"Today",icon:y.jsx(fk,{className:"text-2xl text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex gap-3 h-fit",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("h4",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Open Complaints"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),y.jsxs("p",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1",children:[y.jsx(r,{value:t?.percent_change}),y.jsx("span",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),y.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:y.jsx(gi,{width:"75%",height:"100%",children:y.jsxs(Cc,{children:[y.jsx(jo,{data:a,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:a.map((c,u)=>y.jsx(jr,{fill:o[u]||"#CBD5E1"},c.name))}),y.jsx(mi,{content:y.jsx(l,{})})]})})})]})})}/*!
198
+ */var db;function z8(){return db||(db=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,s=t.useDebugValue;Of.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Of}var hb;function W8(){return hb||(hb=1,process.env.NODE_ENV==="production"?cs.exports=B8():cs.exports=z8()),cs.exports}W8();function V8(e){e()}function H8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){V8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var pb={notify(){},get:()=>[]};function U8(e,t){let r,n=pb,i=0,a=!1;function o(p){u();const g=n.subscribe(p);let v=!1;return()=>{v||(v=!0,g(),f())}}function s(){n.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return a}function u(){i++,r||(r=e.subscribe(l),n=H8())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=pb)}function d(){a||(a=!0,u())}function h(){a&&(a=!1,f())}const m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return m}var K8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",q8=K8(),Y8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",G8=Y8(),X8=()=>q8||G8?A.useLayoutEffect:A.useEffect,Z8=X8(),J8=Symbol.for("react-redux-context"),Q8=typeof globalThis<"u"?globalThis:{};function ez(){if(!A.createContext)return{};const e=Q8[J8]??=new Map;let t=e.get(A.createContext);return t||(t=A.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(A.createContext,t)),t}var tz=ez();function rz(e){const{children:t,context:r,serverState:n,store:i}=e,a=A.useMemo(()=>{const l=U8(i),c={store:i,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),o=A.useMemo(()=>i.getState(),[i]);Z8(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,o]);const s=r||tz;return A.createElement(s.Provider,{value:a},t)}var nz=rz,iz=(e,t)=>t,Up=N([iz,ue,tS,ft,KS,an,f4,ct],g4),Kp=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},U2=lr("mouseClick"),K2=vo();K2.startListening({actionCreator:U2,effect:(e,t)=>{var r=e.payload,n=Up(t.getState(),Kp(r));n?.activeIndex!=null&&t.dispatch(b$({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var Id=lr("mouseMove"),q2=vo();q2.startListening({actionCreator:Id,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mp(n,n.tooltip.settings.shared),a=Up(n,Kp(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(FS({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(LS()))}});var mb={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},Y2=Qt({name:"rootProps",initialState:mb,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:mb.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}}}),az=Y2.reducer,{updateOptions:oz}=Y2.actions,G2=Qt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:sz}=G2.actions,lz=G2.reducer,X2=lr("keyDown"),Z2=lr("focus"),qp=vo();qp.startListening({actionCreator:X2,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=Number(gp(i,na(r))),s=an(r);if(a==="Enter"){var l=dl(r,"axis","hover",String(i.index));t.dispatch(Ed({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=u$(r),u=c==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,d=o+f*u;if(!(s==null||d>=s.length||d<0)){var h=dl(r,"axis","hover",String(d));t.dispatch(Ed({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}});qp.startListening({actionCreator:Z2,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=dl(r,"axis","hover",String(a));t.dispatch(Ed({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var ir=lr("externalEvent"),J2=vo();J2.startListening({actionCreator:ir,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:t4(r),activeDataKey:XS(r),activeIndex:xn(r),activeLabel:GS(r),activeTooltipIndex:xn(r),isTooltipActive:r4(r)};e.payload.handler(n,e.payload.reactEvent)}}});var cz=N([ra],e=>e.tooltipItemPayloads),uz=N([cz,To,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(s=>s.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var o=t(a,r);return o}}}),Q2=lr("touchMove"),eO=vo();eO.startListening({actionCreator:Q2,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mp(n,n.tooltip.settings.shared);if(i==="axis"){var a=Up(n,Kp({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(FS({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var o,s=r.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(Rw),u=(o=l.getAttribute($w))!==null&&o!==void 0?o:void 0,f=uz(t.getState(),c,u);t.dispatch($S({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var fz=iw({brush:G3,cartesianAxis:kB,chartData:j4,errorBars:YB,graphicalItems:YF,layout:Oj,legend:dD,options:P4,polarAxis:fF,polarOptions:lz,referenceElements:r6,rootProps:az,tooltip:x$}),dz=function(t){return GM({reducer:fz,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([K2.middleware,q2.middleware,qp.middleware,J2.middleware,eO.middleware]),devTools:En.devToolsEnabled})};function tO(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Ft(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=dz(t));var o=uh;return A.createElement(nz,{context:o,store:a.current},r)}function rO(e){var{layout:t,width:r,height:n,margin:i}=e,a=et(),o=Ft();return k.useEffect(()=>{o||(a(wj(t)),a(_j({width:r,height:n})),a(xj(i)))},[a,o,t,r,n,i]),null}function nO(e){var t=et();return k.useEffect(()=>{t(oz(e))},[t,e]),null}var hz=["children"];function pz(e,t){if(e==null)return{};var r,n,i=mz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function wl(){return wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},wl.apply(null,arguments)}var gz={width:"100%",height:"100%"},vz=k.forwardRef((e,t)=>{var r=Fw(),n=Bw(),i=Hw();if(!Fi(r)||!Fi(n))return null;var{children:a,otherAttributes:o,title:s,desc:l}=e,c,u;return typeof o.tabIndex=="number"?c=o.tabIndex:c=i?0:void 0,typeof o.role=="string"?u=o.role:u=i?"application":void 0,A.createElement(A1,wl({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:gz,ref:t}),a)}),yz=e=>{var{children:t}=e,r=G(ac);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return A.createElement(A1,{width:n,height:i,x:o,y:a},t)},gb=k.forwardRef((e,t)=>{var{children:r}=e,n=pz(e,hz),i=Ft();return i?A.createElement(yz,null,r):A.createElement(vz,wl({ref:t},n),r)});function bz(){var e=et(),[t,r]=k.useState(null),n=G(Qj);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Jt(a)&&a!==n&&e(Sj(a))}},[t,e,n]),r}function vb(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function xz(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vb(Object(r),!0).forEach(function(n){wz(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vb(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function wz(e,t,r){return(t=_z(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _z(e){var t=Sz(e,"string");return typeof t=="symbol"?t:t+""}function Sz(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Oz=k.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:p,style:g,width:v}=e,b=et(),[x,S]=k.useState(null),[w,O]=k.useState(null);z4();var E=bz(),C=k.useCallback(V=>{E(V),typeof t=="function"&&t(V),S(V),O(V)},[E,t,S,O]),M=k.useCallback(V=>{b(U2(V)),b(ir({handler:a,reactEvent:V}))},[b,a]),R=k.useCallback(V=>{b(Id(V)),b(ir({handler:c,reactEvent:V}))},[b,c]),j=k.useCallback(V=>{b(LS()),b(ir({handler:u,reactEvent:V}))},[b,u]),_=k.useCallback(V=>{b(Id(V)),b(ir({handler:f,reactEvent:V}))},[b,f]),I=k.useCallback(()=>{b(Z2())},[b]),D=k.useCallback(V=>{b(X2(V.key))},[b]),L=k.useCallback(V=>{b(ir({handler:o,reactEvent:V}))},[b,o]),W=k.useCallback(V=>{b(ir({handler:s,reactEvent:V}))},[b,s]),H=k.useCallback(V=>{b(ir({handler:l,reactEvent:V}))},[b,l]),te=k.useCallback(V=>{b(ir({handler:d,reactEvent:V}))},[b,d]),Q=k.useCallback(V=>{b(ir({handler:p,reactEvent:V}))},[b,p]),F=k.useCallback(V=>{b(Q2(V)),b(ir({handler:m,reactEvent:V}))},[b,m]),U=k.useCallback(V=>{b(ir({handler:h,reactEvent:V}))},[b,h]);return A.createElement(r2.Provider,{value:x},A.createElement(Pk.Provider,{value:w},A.createElement("div",{className:he("recharts-wrapper",n),style:xz({position:"relative",cursor:"default",width:v,height:i},g),onClick:M,onContextMenu:L,onDoubleClick:W,onFocus:I,onKeyDown:D,onMouseDown:H,onMouseEnter:R,onMouseLeave:j,onMouseMove:_,onMouseUp:te,onTouchEnd:U,onTouchMove:F,onTouchStart:Q,ref:C},r)))}),Az=["children","className","width","height","style","compact","title","desc"];function Ez(e,t){if(e==null)return{};var r,n,i=Pz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Pz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var iO=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=Ez(e,Az),f=Dr(u);return s?A.createElement(gb,{otherAttributes:f,title:l,desc:c},r):A.createElement(Oz,{className:n,style:o,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},A.createElement(gb,{otherAttributes:f,title:l,desc:c,ref:t},A.createElement(i6,null,r)))}),Cz=["width","height"];function Rd(){return Rd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Rd.apply(null,arguments)}function kz(e,t){if(e==null)return{};var r,n,i=Tz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Tz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Mz={top:5,right:5,bottom:5,left:5},jz={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Mz,reverseStackOrder:!1,syncMethod:"index"},aO=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,jz),{width:a,height:o}=i,s=kz(i,Cz);if(!Fi(a)||!Fi(o))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=t,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return A.createElement(tO,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},A.createElement(N2,{chartData:d.data}),A.createElement(rO,{width:a,height:o,layout:i.layout,margin:i.margin}),A.createElement(nO,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(iO,Rd({},s,{width:a,height:o,ref:r})))}),Dz=["axis"],oO=k.forwardRef((e,t)=>A.createElement(aO,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Dz,tooltipPayloadSearcher:Op,categoricalChartProps:e,ref:t})),Nz=["axis","item"],Iz=k.forwardRef((e,t)=>A.createElement(aO,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:Nz,tooltipPayloadSearcher:Op,categoricalChartProps:e,ref:t}));function Rz(e){var t=et();return k.useEffect(()=>{t(sz(e))},[t,e]),null}var $z=["width","height","layout"];function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},$d.apply(null,arguments)}function Lz(e,t){if(e==null)return{};var r,n,i=Fz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function Fz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var Bz={top:5,right:5,bottom:5,left:5},zz={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:Bz,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},Wz=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,zz),{width:a,height:o,layout:s}=i,l=Lz(i,$z);if(!Fi(a)||!Fi(o))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=t,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return A.createElement(tO,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},A.createElement(N2,{chartData:i.data}),A.createElement(rO,{width:a,height:o,layout:s,margin:i.margin}),A.createElement(nO,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(Rz,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),A.createElement(iO,$d({width:a,height:o},l,{ref:r})))}),Vz=["item"],Hz={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Cc=k.forwardRef((e,t)=>{var r=_t(e,Hz);return A.createElement(Wz,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:Vz,tooltipPayloadSearcher:Op,categoricalChartProps:r,ref:t})});function Uz({isStatic:e,data:t}){const r=({value:u})=>{const f=u>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${f?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:f?`+${u}%`:`${u}%`})},n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),i=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),a=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),s=[{name:"Move-ins",value:n},{name:"Move-outs",value:i}],l={purple:"#8B5CF6",indigo:"#6366F1"},c=({active:u,payload:f})=>!u||!f||!f.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:f.map((d,h)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:d.color,marginRight:6}}),d.name,": ",y.jsx("span",{className:"font-semibold",children:d.value})]},h))});return y.jsx(be,{title:"Community",period:"This Month",icon:y.jsx(g1,{className:"text-2xl text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+i})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1 flex items-center",children:[y.jsx(r,{value:((a+o)/2).toFixed(2)}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),y.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:y.jsx(gi,{width:"75%",height:"100%",children:y.jsxs(Cc,{children:[y.jsxs(jo,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[y.jsx(jr,{fill:l.purple}),y.jsx(jr,{fill:l.indigo})]}),y.jsx(mi,{content:y.jsx(c,{})})]})})})]})})}function Kz({isStatic:e,engagement:t}){const r=[{name:"Notice",value:Number(t?.total_notices||0)},{name:"Post",value:Number(t?.total_topics||0)},{name:"Poll",value:Number(t?.total_polls||0)},{name:"Survey",value:Number(t?.total_surveys||0)}],n={Notice:"#8B5CF6",Post:"#22C55E",Poll:"#3B82F6",Survey:"#F59E0B"},i=({active:a,payload:o,label:s})=>!a||!o||!o.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[s&&y.jsx("p",{className:"font-medium mb-1",children:s}),o.map((l,c)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:l.color,marginRight:6}}),l.name,": ",y.jsx("span",{className:"font-semibold",children:l.value})]},c))]});return y.jsx(be,{title:"Engagement",period:"This Month",icon:y.jsx(ck,{className:"text-2xl text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:y.jsx(gi,{width:"100%",height:"100%",children:y.jsxs(Iz,{data:r,layout:"vertical",margin:{top:4,right:8,left:8,bottom:0},children:[y.jsx(Ac,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),y.jsx(Pc,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Ec,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),y.jsx(mi,{content:y.jsx(i,{}),cursor:{fill:"transparent"}}),y.jsx(j2,{dataKey:"value",barSize:40,isAnimationActive:!1,children:r.map(a=>y.jsx(jr,{fill:n[a.name]},a.name))})]})})})}function qz(e){if(!e)return 0;const[t,r]=e.split(" ");let[n,i]=t.split(":").map(Number);return r==="PM"&&n!==12&&(n+=12),r==="AM"&&n===12&&(n=0),n*60+i}function Yz(e){let t=Math.floor(e/60);const r=t>=12?"PM":"AM";return t=t%12||12,`${t} ${r}`}function Gz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=qz(i.slot_start_time),o=Math.floor(a/240)*240,s=o+240,l=`${o}-${s}`;r[l]||(r[l]={time:Yz(s),bookings:0,total:0}),r[l].bookings+=Number(i?.slot_bookings||0),r[l].total+=Number(i?.total_slots||0)}return Object.values(r)}function Xz({isStatic:e,facility:t}){const r=Number(t?.totalBookings||0),n=Number(t?.totalSlots||0),i=Number(t?.utilizationRate||0),a=k.useMemo(()=>t?.slots?.length?Gz(t.slots):[],[t]),o=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]}),s=a.length>0?Math.max(...a.map(l=>l.total),5):5;return y.jsxs(be,{title:"Facilities",period:"Today",icon:y.jsx(sk,{className:"text-2xl text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[y.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-4",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Bookings"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#8B5CF6]",children:r})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Total Slots"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#F59E0B]",children:n})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Utilisation Rate"}),y.jsxs("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium !text-[#329DFF]",children:[Number.isFinite(i)?i.toFixed(2):"0.00","%"]})]})]}),y.jsx("div",{className:"w-full h-[150px]",children:y.jsx(gi,{width:"100%",height:"100%",children:y.jsxs(oO,{data:a,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Ac,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),y.jsx(Ec,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(Pc,{yAxisId:"left",domain:[0,s],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(mi,{content:y.jsx(o,{})}),y.jsx(eo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),y.jsx(eo,{yAxisId:"left",type:"monotone",dataKey:"total",name:"Total Slots",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})}function Zz({data:e}){console.log(e,"financial");const t=e?.incomeSummary||{},r=e?.expenditureSummary||{};function n(i){if(i==null||isNaN(i))return"0";const a=Number(i);return a>=1e9?(a/1e9).toFixed(a%1e9===0?0:2)+"B":a>=1e6?(a/1e6).toFixed(a%1e6===0?0:2)+"M":a>=1e3?(a/1e3).toFixed(a%1e3===0?0:2)+"K":a.toFixed(a%1===0?0:2)}return y.jsx(be,{title:"Income",period:"This Month",icon:y.jsx(vg,{className:"text-2xl text-green-600"}),className:"!gap-4 break-inside-avoid h-[232px] overflow-hidden",children:y.jsxs("div",{children:[y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Income"}),y.jsx("div",{children:"Collection"}),y.jsx("div",{children:"Closing"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212] mb-2",children:[y.jsxs("div",{children:[n(t.opening_balance)," AED"]}),y.jsxs("div",{children:[n(t.income)," AED"]}),y.jsxs("div",{children:[n(t.collection)," AED"]}),y.jsxs("div",{children:[n(t.closing_balance)," AED"]})]}),y.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(vg,{className:"text-2xl text-red-600"}),y.jsx("div",{style:{fontWeight:500,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]}),y.jsx("div",{className:"!text-xs !leading-[16px] !text-[#64748B]",children:"This Month"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mt-4 mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Expenditure"}),y.jsx("div",{children:"Payment"}),y.jsx("div",{children:"Outstanding"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212]",children:[y.jsxs("div",{children:[n(r.opening_balance)," AED"]}),y.jsxs("div",{children:[n(r.expenditure)," AED"]}),y.jsxs("div",{children:[n(r.payment)," AED"]}),y.jsxs("div",{children:[n(r.outstanding)," AED"]})]})]})})}function Jz(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function Qz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Number(i.hour??0),s=Math.floor(a/4)*4+4,l=s;r[l]||(r[l]={time:Jz(s),walkins:0,checkins:0}),r[l].walkins+=Number(i.walkins??0),r[l].checkins+=Number(i.preApproved??0)}return Object.values(r)}function eW({isStatic:e,gate:t}){const r={green:"#12B981",amber:"#F69E0A"},n=t?.summary?.activeWalkins||{},i=t?.summary?.preApprovedCheckins||{},a=t?.summary?.staffAttendance||{},o=t?.chart?.length>0?Qz(t.chart):[],s=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]});return y.jsx(be,{title:"Gate Updates",period:"Today",icon:y.jsx(uk,{className:"text-2xl text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-2 text-sm mb-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Active Walk-ins"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[a.total_in_now??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",a.total_in_today??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Pre-approved Check-ins"}),y.jsxs("div",{className:"!m-0 text-[28px] leading-[32px] font-medium text-[#E7A015] flex",children:[i.expected_pass_scanned??0,y.jsxs("div",{className:"text-[20px] leading-[32px] text-[#64748B]",children:["/",i.total_expected_pass??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Staff Attendance"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[n.visitor_in??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",n.total_pass??0]})]})]})]}),y.jsx(gi,{width:"100%",height:"60%",children:y.jsxs(oO,{data:o,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Ec,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Pc,{yAxisId:"left",domain:[0,30],ticks:[0,10,20,30],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1,width:25}),y.jsx(Ac,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),y.jsx(mi,{content:y.jsx(s,{})}),y.jsx(eo,{type:"monotone",dataKey:"walkins",stroke:r.green,strokeWidth:2,dot:!1,name:"Walk-ins"}),y.jsx(eo,{type:"monotone",dataKey:"checkins",stroke:r.amber,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"})]})})]})})}function tW({isStatic:e,complaints:t}){const r=({value:c})=>{if(c==null||isNaN(c))return null;const u=c>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${u?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:u?`+${c}%`:`${c}%`})},n=[{name:"L1",value:Number(t?.today_L1||0)},{name:"L2",value:Number(t?.today_L2||0)},{name:"L3",value:Number(t?.today_L3||0)},{name:"No Level",value:Number(t?.today_NoLevel||0)}],a=n.reduce((c,u)=>c+u.value,0)===0?[{name:"No Data",value:1}]:n,o=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],s=({color:c})=>y.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:c,marginRight:"6px"}}),l=({active:c,payload:u})=>!c||!u||!u.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:u.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx(s,{color:f.color}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))});return y.jsx(be,{title:"Helpdesk",period:"Today",icon:y.jsx(fk,{className:"text-2xl text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex gap-3 h-fit",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("h4",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Open Complaints"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),y.jsxs("p",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1",children:[y.jsx(r,{value:t?.percent_change}),y.jsx("span",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),y.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:y.jsx(gi,{width:"75%",height:"100%",children:y.jsxs(Cc,{children:[y.jsx(jo,{data:a,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:a.map((c,u)=>y.jsx(jr,{fill:o[u]||"#CBD5E1"},c.name))}),y.jsx(mi,{content:y.jsx(l,{})})]})})})]})})}/*!
199
199
  * @kurkle/color v0.3.4
200
200
  * https://github.com/kurkle/color#readme
201
201
  * (c) 2024 Jukka Kurkela
package/dist/index.es.js CHANGED
@@ -22438,7 +22438,7 @@ var Qz = {
22438
22438
  ref: t
22439
22439
  });
22440
22440
  });
22441
- function bU({ isStatic: e, community: t }) {
22441
+ function bU({ isStatic: e, data: t }) {
22442
22442
  const r = ({ value: u }) => {
22443
22443
  const f = u >= 0;
22444
22444
  return /* @__PURE__ */ y.jsx(
@@ -22762,7 +22762,7 @@ function _U({ data: e }) {
22762
22762
  function n(i) {
22763
22763
  if (i == null || isNaN(i)) return "0";
22764
22764
  const a = Number(i);
22765
- return a >= 1e9 ? (a / 1e9).toFixed(2) + "B" : a >= 1e6 ? (a / 1e6).toFixed(2) + "M" : a >= 1e3 ? (a / 1e3).toFixed(2) + "K" : a.toFixed(2);
22765
+ return a >= 1e9 ? (a / 1e9).toFixed(a % 1e9 === 0 ? 0 : 2) + "B" : a >= 1e6 ? (a / 1e6).toFixed(a % 1e6 === 0 ? 0 : 2) + "M" : a >= 1e3 ? (a / 1e3).toFixed(a % 1e3 === 0 ? 0 : 2) + "K" : a.toFixed(a % 1 === 0 ? 0 : 2);
22766
22766
  }
22767
22767
  return /* @__PURE__ */ y.jsx(
22768
22768
  _e,
package/dist/index.umd.js CHANGED
@@ -195,7 +195,7 @@ Take a look at the reducer(s) handling this action type: ${h.type}.
195
195
  *
196
196
  * This source code is licensed under the MIT license found in the
197
197
  * LICENSE file in the root directory of this source tree.
198
- */var cS;function v8(){return cS||(cS=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,s=t.useDebugValue;vp.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),vp}var uS;function y8(){return uS||(uS=1,process.env.NODE_ENV==="production"?ec.exports=g8():ec.exports=v8()),ec.exports}y8();function b8(e){e()}function x8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){b8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fS={notify(){},get:()=>[]};function w8(e,t){let r,n=fS,i=0,a=!1;function o(p){u();const g=n.subscribe(p);let v=!1;return()=>{v||(v=!0,g(),f())}}function s(){n.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return a}function u(){i++,r||(r=e.subscribe(l),n=x8())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=fS)}function d(){a||(a=!0,u())}function h(){a&&(a=!1,f())}const m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return m}var _8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S8=_8(),O8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",A8=O8(),E8=()=>S8||A8?A.useLayoutEffect:A.useEffect,P8=E8(),C8=Symbol.for("react-redux-context"),k8=typeof globalThis<"u"?globalThis:{};function T8(){if(!A.createContext)return{};const e=k8[C8]??=new Map;let t=e.get(A.createContext);return t||(t=A.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(A.createContext,t)),t}var M8=T8();function j8(e){const{children:t,context:r,serverState:n,store:i}=e,a=A.useMemo(()=>{const l=w8(i),c={store:i,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),o=A.useMemo(()=>i.getState(),[i]);P8(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,o]);const s=r||M8;return A.createElement(s.Provider,{value:a},t)}var D8=j8,N8=(e,t)=>t,yp=N([N8,ue,l1,ct,ow,Qr,zR,st],KR),bp=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},dS=ar("mouseClick"),hS=ka();hS.startListening({actionCreator:dS,effect:(e,t)=>{var r=e.payload,n=yp(t.getState(),bp(r));n?.activeIndex!=null&&t.dispatch(G$({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var xp=ar("mouseMove"),pS=ka();pS.startListening({actionCreator:xp,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mh(n,n.tooltip.settings.shared),a=yp(n,bp(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(X1({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(G1()))}});var mS={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},gS=qt({name:"rootProps",initialState:mS,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:mS.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}}}),I8=gS.reducer,{updateOptions:$8}=gS.actions,vS=qt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:R8}=vS.actions,L8=vS.reducer,yS=ar("keyDown"),bS=ar("focus"),wp=ka();wp.startListening({actionCreator:yS,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=Number(yh(i,Yi(r))),s=Qr(r);if(a==="Enter"){var l=Ll(r,"axis","hover",String(i.index));t.dispatch(vh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=B$(r),u=c==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,d=o+f*u;if(!(s==null||d>=s.length||d<0)){var h=Ll(r,"axis","hover",String(d));t.dispatch(vh({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}}),wp.startListening({actionCreator:bS,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=Ll(r,"axis","hover",String(a));t.dispatch(vh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var ur=ar("externalEvent"),xS=ka();xS.startListening({actionCreator:ur,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:MR(r),activeDataKey:uw(r),activeIndex:wn(r),activeLabel:cw(r),activeTooltipIndex:wn(r),isTooltipActive:jR(r)};e.payload.handler(n,e.payload.reactEvent)}}});var F8=N([qi],e=>e.tooltipItemPayloads),B8=N([F8,no,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(s=>s.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var o=t(a,r);return o}}}),wS=ar("touchMove"),_S=ka();_S.startListening({actionCreator:wS,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mh(n,n.tooltip.settings.shared);if(i==="axis"){var a=yp(n,bp({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(X1({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var o,s=r.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(N0),u=(o=l.getAttribute(I0))!==null&&o!==void 0?o:void 0,f=B8(t.getState(),c,u);t.dispatch(Y1({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var z8=Ry({brush:A3,cartesianAxis:aB,chartData:l4,errorBars:OB,graphicalItems:OF,layout:tj,legend:Vj,options:n4,polarAxis:zL,polarOptions:L8,referenceElements:j3,rootProps:I8,tooltip:X$}),W8=function(t){return EM({reducer:z8,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([hS.middleware,pS.middleware,wp.middleware,xS.middleware,_S.middleware]),devTools:dn.devToolsEnabled})};function SS(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Nt(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=W8(t));var o=hf;return A.createElement(D8,{context:o,store:a.current},r)}function OS(e){var{layout:t,width:r,height:n,margin:i}=e,a=Ze(),o=Nt();return k.useEffect(()=>{o||(a(JM(t)),a(QM({width:r,height:n})),a(ZM(i)))},[a,o,t,r,n,i]),null}function AS(e){var t=Ze();return k.useEffect(()=>{t($8(e))},[t,e]),null}var V8=["children"];function H8(e,t){if(e==null)return{};var r,n,i=U8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function U8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tc.apply(null,arguments)}var K8={width:"100%",height:"100%"},q8=k.forwardRef((e,t)=>{var r=L0(),n=F0(),i=K0();if(!Di(r)||!Di(n))return null;var{children:a,otherAttributes:o,title:s,desc:l}=e,c,u;return typeof o.tabIndex=="number"?c=o.tabIndex:c=i?0:void 0,typeof o.role=="string"?u=o.role:u=i?"application":void 0,A.createElement(iv,tc({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:K8,ref:t}),a)}),Y8=e=>{var{children:t}=e,r=G(Zs);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return A.createElement(iv,{width:n,height:i,x:o,y:a},t)},ES=k.forwardRef((e,t)=>{var{children:r}=e,n=H8(e,V8),i=Nt();return i?A.createElement(Y8,null,r):A.createElement(q8,tc({ref:t},n),r)});function G8(){var e=Ze(),[t,r]=k.useState(null),n=G(Tj);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Yt(a)&&a!==n&&e(ej(a))}},[t,e,n]),r}function PS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PS(Object(r),!0).forEach(function(n){Z8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z8(e,t,r){return(t=J8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J8(e){var t=Q8(e,"string");return typeof t=="symbol"?t:t+""}function Q8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ez=k.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:p,style:g,width:v}=e,b=Ze(),[x,S]=k.useState(null),[w,O]=k.useState(null);v4();var E=G8(),C=k.useCallback(V=>{E(V),typeof t=="function"&&t(V),S(V),O(V)},[E,t,S,O]),M=k.useCallback(V=>{b(dS(V)),b(ur({handler:a,reactEvent:V}))},[b,a]),$=k.useCallback(V=>{b(xp(V)),b(ur({handler:c,reactEvent:V}))},[b,c]),j=k.useCallback(V=>{b(G1()),b(ur({handler:u,reactEvent:V}))},[b,u]),_=k.useCallback(V=>{b(xp(V)),b(ur({handler:f,reactEvent:V}))},[b,f]),I=k.useCallback(()=>{b(bS())},[b]),D=k.useCallback(V=>{b(yS(V.key))},[b]),L=k.useCallback(V=>{b(ur({handler:o,reactEvent:V}))},[b,o]),W=k.useCallback(V=>{b(ur({handler:s,reactEvent:V}))},[b,s]),H=k.useCallback(V=>{b(ur({handler:l,reactEvent:V}))},[b,l]),te=k.useCallback(V=>{b(ur({handler:d,reactEvent:V}))},[b,d]),Q=k.useCallback(V=>{b(ur({handler:p,reactEvent:V}))},[b,p]),F=k.useCallback(V=>{b(wS(V)),b(ur({handler:m,reactEvent:V}))},[b,m]),U=k.useCallback(V=>{b(ur({handler:h,reactEvent:V}))},[b,h]);return A.createElement(bw.Provider,{value:x},A.createElement(ik.Provider,{value:w},A.createElement("div",{className:de("recharts-wrapper",n),style:X8({position:"relative",cursor:"default",width:v,height:i},g),onClick:M,onContextMenu:L,onDoubleClick:W,onFocus:I,onKeyDown:D,onMouseDown:H,onMouseEnter:$,onMouseLeave:j,onMouseMove:_,onMouseUp:te,onTouchEnd:U,onTouchMove:F,onTouchStart:Q,ref:C},r)))}),tz=["children","className","width","height","style","compact","title","desc"];function rz(e,t){if(e==null)return{};var r,n,i=nz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var CS=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=rz(e,tz),f=Ar(u);return s?A.createElement(ES,{otherAttributes:f,title:l,desc:c},r):A.createElement(ez,{className:n,style:o,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},A.createElement(ES,{otherAttributes:f,title:l,desc:c,ref:t},A.createElement(N3,null,r)))}),iz=["width","height"];function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_p.apply(null,arguments)}function az(e,t){if(e==null)return{};var r,n,i=oz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function oz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var sz={top:5,right:5,bottom:5,left:5},lz={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:sz,reverseStackOrder:!1,syncMethod:"index"},kS=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,lz),{width:a,height:o}=i,s=az(i,iz);if(!Di(a)||!Di(o))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=t,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return A.createElement(SS,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},A.createElement(U_,{chartData:d.data}),A.createElement(OS,{width:a,height:o,layout:i.layout,margin:i.margin}),A.createElement(AS,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(CS,_p({},s,{width:a,height:o,ref:r})))}),cz=["axis"],TS=k.forwardRef((e,t)=>A.createElement(kS,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:cz,tooltipPayloadSearcher:kh,categoricalChartProps:e,ref:t})),uz=["axis","item"],fz=k.forwardRef((e,t)=>A.createElement(kS,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:uz,tooltipPayloadSearcher:kh,categoricalChartProps:e,ref:t}));function dz(e){var t=Ze();return k.useEffect(()=>{t(R8(e))},[t,e]),null}var hz=["width","height","layout"];function Sp(){return Sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sp.apply(null,arguments)}function pz(e,t){if(e==null)return{};var r,n,i=mz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gz={top:5,right:5,bottom:5,left:5},vz={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:gz,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},yz=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,vz),{width:a,height:o,layout:s}=i,l=pz(i,hz);if(!Di(a)||!Di(o))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=t,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return A.createElement(SS,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},A.createElement(U_,{chartData:i.data}),A.createElement(OS,{width:a,height:o,layout:s,margin:i.margin}),A.createElement(AS,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(dz,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),A.createElement(CS,Sp({width:a,height:o},l,{ref:r})))}),bz=["item"],xz={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},rc=k.forwardRef((e,t)=>{var r=_t(e,xz);return A.createElement(yz,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:bz,tooltipPayloadSearcher:kh,categoricalChartProps:r,ref:t})});function wz({isStatic:e,community:t}){const r=({value:u})=>{const f=u>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${f?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:f?`+${u}%`:`${u}%`})},n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),i=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),a=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),s=[{name:"Move-ins",value:n},{name:"Move-outs",value:i}],l={purple:"#8B5CF6",indigo:"#6366F1"},c=({active:u,payload:f})=>!u||!f||!f.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:f.map((d,h)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:d.color,marginRight:6}}),d.name,": ",y.jsx("span",{className:"font-semibold",children:d.value})]},h))});return y.jsx(ve,{title:"Community",period:"This Month",icon:y.jsx(Fg,{className:"text-2xl text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+i})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1 flex items-center",children:[y.jsx(r,{value:((a+o)/2).toFixed(2)}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),y.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsxs(lo,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[y.jsx(kr,{fill:l.purple}),y.jsx(kr,{fill:l.indigo})]}),y.jsx(ni,{content:y.jsx(c,{})})]})})})]})})}function _z({isStatic:e,engagement:t}){const r=[{name:"Notice",value:Number(t?.total_notices||0)},{name:"Post",value:Number(t?.total_topics||0)},{name:"Poll",value:Number(t?.total_polls||0)},{name:"Survey",value:Number(t?.total_surveys||0)}],n={Notice:"#8B5CF6",Post:"#22C55E",Poll:"#3B82F6",Survey:"#F59E0B"},i=({active:a,payload:o,label:s})=>!a||!o||!o.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[s&&y.jsx("p",{className:"font-medium mb-1",children:s}),o.map((l,c)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:l.color,marginRight:6}}),l.name,": ",y.jsx("span",{className:"font-semibold",children:l.value})]},c))]});return y.jsx(ve,{title:"Engagement",period:"This Month",icon:y.jsx(BC,{className:"text-2xl text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(fz,{data:r,layout:"vertical",margin:{top:4,right:8,left:8,bottom:0},children:[y.jsx(Gl,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),y.jsx(Ql,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Zl,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),y.jsx(ni,{content:y.jsx(i,{}),cursor:{fill:"transparent"}}),y.jsx(z_,{dataKey:"value",barSize:40,isAnimationActive:!1,children:r.map(a=>y.jsx(kr,{fill:n[a.name]},a.name))})]})})})}function Sz(e){if(!e)return 0;const[t,r]=e.split(" ");let[n,i]=t.split(":").map(Number);return r==="PM"&&n!==12&&(n+=12),r==="AM"&&n===12&&(n=0),n*60+i}function Oz(e){let t=Math.floor(e/60);const r=t>=12?"PM":"AM";return t=t%12||12,`${t} ${r}`}function Az(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Sz(i.slot_start_time),o=Math.floor(a/240)*240,s=o+240,l=`${o}-${s}`;r[l]||(r[l]={time:Oz(s),bookings:0,total:0}),r[l].bookings+=Number(i?.slot_bookings||0),r[l].total+=Number(i?.total_slots||0)}return Object.values(r)}function Ez({isStatic:e,facility:t}){const r=Number(t?.totalBookings||0),n=Number(t?.totalSlots||0),i=Number(t?.utilizationRate||0),a=k.useMemo(()=>t?.slots?.length?Az(t.slots):[],[t]),o=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]}),s=a.length>0?Math.max(...a.map(l=>l.total),5):5;return y.jsxs(ve,{title:"Facilities",period:"Today",icon:y.jsx(LC,{className:"text-2xl text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[y.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-4",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Bookings"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#8B5CF6]",children:r})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Total Slots"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#F59E0B]",children:n})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Utilisation Rate"}),y.jsxs("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium !text-[#329DFF]",children:[Number.isFinite(i)?i.toFixed(2):"0.00","%"]})]})]}),y.jsx("div",{className:"w-full h-[150px]",children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(TS,{data:a,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(Ql,{yAxisId:"left",domain:[0,s],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(ni,{content:y.jsx(o,{})}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"total",name:"Total Slots",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})}function Pz({data:e}){console.log(e,"financial");const t=e?.incomeSummary||{},r=e?.expenditureSummary||{};function n(i){if(i==null||isNaN(i))return"0";const a=Number(i);return a>=1e9?(a/1e9).toFixed(2)+"B":a>=1e6?(a/1e6).toFixed(2)+"M":a>=1e3?(a/1e3).toFixed(2)+"K":a.toFixed(2)}return y.jsx(ve,{title:"Income",period:"This Month",icon:y.jsx(Bg,{className:"text-2xl text-green-600"}),className:"!gap-4 break-inside-avoid h-[232px] overflow-hidden",children:y.jsxs("div",{children:[y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Income"}),y.jsx("div",{children:"Collection"}),y.jsx("div",{children:"Closing"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212] mb-2",children:[y.jsxs("div",{children:[n(t.opening_balance)," AED"]}),y.jsxs("div",{children:[n(t.income)," AED"]}),y.jsxs("div",{children:[n(t.collection)," AED"]}),y.jsxs("div",{children:[n(t.closing_balance)," AED"]})]}),y.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Bg,{className:"text-2xl text-red-600"}),y.jsx("div",{style:{fontWeight:500,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]}),y.jsx("div",{className:"!text-xs !leading-[16px] !text-[#64748B]",children:"This Month"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mt-4 mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Expenditure"}),y.jsx("div",{children:"Payment"}),y.jsx("div",{children:"Outstanding"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212]",children:[y.jsxs("div",{children:[n(r.opening_balance)," AED"]}),y.jsxs("div",{children:[n(r.expenditure)," AED"]}),y.jsxs("div",{children:[n(r.payment)," AED"]}),y.jsxs("div",{children:[n(r.outstanding)," AED"]})]})]})})}function Cz(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function kz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Number(i.hour??0),s=Math.floor(a/4)*4+4,l=s;r[l]||(r[l]={time:Cz(s),walkins:0,checkins:0}),r[l].walkins+=Number(i.walkins??0),r[l].checkins+=Number(i.preApproved??0)}return Object.values(r)}function Tz({isStatic:e,gate:t}){const r={green:"#12B981",amber:"#F69E0A"},n=t?.summary?.activeWalkins||{},i=t?.summary?.preApprovedCheckins||{},a=t?.summary?.staffAttendance||{},o=t?.chart?.length>0?kz(t.chart):[],s=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]});return y.jsx(ve,{title:"Gate Updates",period:"Today",icon:y.jsx(zC,{className:"text-2xl text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-2 text-sm mb-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Active Walk-ins"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[a.total_in_now??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",a.total_in_today??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Pre-approved Check-ins"}),y.jsxs("div",{className:"!m-0 text-[28px] leading-[32px] font-medium text-[#E7A015] flex",children:[i.expected_pass_scanned??0,y.jsxs("div",{className:"text-[20px] leading-[32px] text-[#64748B]",children:["/",i.total_expected_pass??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Staff Attendance"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[n.visitor_in??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",n.total_pass??0]})]})]})]}),y.jsx(ii,{width:"100%",height:"60%",children:y.jsxs(TS,{data:o,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Ql,{yAxisId:"left",domain:[0,30],ticks:[0,10,20,30],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1,width:25}),y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),y.jsx(ni,{content:y.jsx(s,{})}),y.jsx(fo,{type:"monotone",dataKey:"walkins",stroke:r.green,strokeWidth:2,dot:!1,name:"Walk-ins"}),y.jsx(fo,{type:"monotone",dataKey:"checkins",stroke:r.amber,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"})]})})]})})}function Mz({isStatic:e,complaints:t}){const r=({value:c})=>{if(c==null||isNaN(c))return null;const u=c>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${u?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:u?`+${c}%`:`${c}%`})},n=[{name:"L1",value:Number(t?.today_L1||0)},{name:"L2",value:Number(t?.today_L2||0)},{name:"L3",value:Number(t?.today_L3||0)},{name:"No Level",value:Number(t?.today_NoLevel||0)}],a=n.reduce((c,u)=>c+u.value,0)===0?[{name:"No Data",value:1}]:n,o=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],s=({color:c})=>y.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:c,marginRight:"6px"}}),l=({active:c,payload:u})=>!c||!u||!u.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:u.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx(s,{color:f.color}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))});return y.jsx(ve,{title:"Helpdesk",period:"Today",icon:y.jsx(WC,{className:"text-2xl text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex gap-3 h-fit",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("h4",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Open Complaints"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),y.jsxs("p",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1",children:[y.jsx(r,{value:t?.percent_change}),y.jsx("span",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),y.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:a,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:a.map((c,u)=>y.jsx(kr,{fill:o[u]||"#CBD5E1"},c.name))}),y.jsx(ni,{content:y.jsx(l,{})})]})})})]})})}/*!
198
+ */var cS;function v8(){return cS||(cS=1,process.env.NODE_ENV!=="production"&&(function(){function e(l,c){return l===c&&(l!==0||1/l===1/c)||l!==l&&c!==c}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=k,r=typeof Object.is=="function"?Object.is:e,n=t.useSyncExternalStore,i=t.useRef,a=t.useEffect,o=t.useMemo,s=t.useDebugValue;vp.useSyncExternalStoreWithSelector=function(l,c,u,f,d){var h=i(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=o(function(){function g(w){if(!v){if(v=!0,b=w,w=f(w),d!==void 0&&m.hasValue){var O=m.value;if(d(O,w))return x=O}return x=w}if(O=x,r(b,w))return O;var E=f(w);return d!==void 0&&d(O,E)?(b=w,O):(b=w,x=E)}var v=!1,b,x,S=u===void 0?null:u;return[function(){return g(c())},S===null?void 0:function(){return g(S())}]},[c,u,f,d]);var p=n(l,h[0],h[1]);return a(function(){m.hasValue=!0,m.value=p},[p]),s(p),p},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),vp}var uS;function y8(){return uS||(uS=1,process.env.NODE_ENV==="production"?ec.exports=g8():ec.exports=v8()),ec.exports}y8();function b8(e){e()}function x8(){let e=null,t=null;return{clear(){e=null,t=null},notify(){b8(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){const r=[];let n=e;for(;n;)r.push(n),n=n.next;return r},subscribe(r){let n=!0;const i=t={callback:r,next:null,prev:t};return i.prev?i.prev.next=i:e=i,function(){!n||e===null||(n=!1,i.next?i.next.prev=i.prev:t=i.prev,i.prev?i.prev.next=i.next:e=i.next)}}}}var fS={notify(){},get:()=>[]};function w8(e,t){let r,n=fS,i=0,a=!1;function o(p){u();const g=n.subscribe(p);let v=!1;return()=>{v||(v=!0,g(),f())}}function s(){n.notify()}function l(){m.onStateChange&&m.onStateChange()}function c(){return a}function u(){i++,r||(r=e.subscribe(l),n=x8())}function f(){i--,r&&i===0&&(r(),r=void 0,n.clear(),n=fS)}function d(){a||(a=!0,u())}function h(){a&&(a=!1,f())}const m={addNestedSub:o,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:c,trySubscribe:d,tryUnsubscribe:h,getListeners:()=>n};return m}var _8=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",S8=_8(),O8=()=>typeof navigator<"u"&&navigator.product==="ReactNative",A8=O8(),E8=()=>S8||A8?A.useLayoutEffect:A.useEffect,P8=E8(),C8=Symbol.for("react-redux-context"),k8=typeof globalThis<"u"?globalThis:{};function T8(){if(!A.createContext)return{};const e=k8[C8]??=new Map;let t=e.get(A.createContext);return t||(t=A.createContext(null),process.env.NODE_ENV!=="production"&&(t.displayName="ReactRedux"),e.set(A.createContext,t)),t}var M8=T8();function j8(e){const{children:t,context:r,serverState:n,store:i}=e,a=A.useMemo(()=>{const l=w8(i),c={store:i,subscription:l,getServerState:n?()=>n:void 0};if(process.env.NODE_ENV==="production")return c;{const{identityFunctionCheck:u="once",stabilityCheck:f="once"}=e;return Object.assign(c,{stabilityCheck:f,identityFunctionCheck:u})}},[i,n]),o=A.useMemo(()=>i.getState(),[i]);P8(()=>{const{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),o!==i.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,o]);const s=r||M8;return A.createElement(s.Provider,{value:a},t)}var D8=j8,N8=(e,t)=>t,yp=N([N8,ue,l1,ct,ow,Qr,zR,st],KR),bp=e=>{var t=e.currentTarget.getBoundingClientRect(),r=t.width/e.currentTarget.offsetWidth,n=t.height/e.currentTarget.offsetHeight;return{chartX:Math.round((e.clientX-t.left)/r),chartY:Math.round((e.clientY-t.top)/n)}},dS=ar("mouseClick"),hS=ka();hS.startListening({actionCreator:dS,effect:(e,t)=>{var r=e.payload,n=yp(t.getState(),bp(r));n?.activeIndex!=null&&t.dispatch(G$({activeIndex:n.activeIndex,activeDataKey:void 0,activeCoordinate:n.activeCoordinate}))}});var xp=ar("mouseMove"),pS=ka();pS.startListening({actionCreator:xp,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mh(n,n.tooltip.settings.shared),a=yp(n,bp(r));i==="axis"&&(a?.activeIndex!=null?t.dispatch(X1({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate})):t.dispatch(G1()))}});var mS={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index"},gS=qt({name:"rootProps",initialState:mS,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:mS.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}}}),I8=gS.reducer,{updateOptions:$8}=gS.actions,vS=qt({name:"polarOptions",initialState:null,reducers:{updatePolarOptions:(e,t)=>t.payload}}),{updatePolarOptions:R8}=vS.actions,L8=vS.reducer,yS=ar("keyDown"),bS=ar("focus"),wp=ka();wp.startListening({actionCreator:yS,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip,a=e.payload;if(!(a!=="ArrowRight"&&a!=="ArrowLeft"&&a!=="Enter")){var o=Number(yh(i,Yi(r))),s=Qr(r);if(a==="Enter"){var l=Ll(r,"axis","hover",String(i.index));t.dispatch(vh({active:!i.active,activeIndex:i.index,activeDataKey:i.dataKey,activeCoordinate:l}));return}var c=B$(r),u=c==="left-to-right"?1:-1,f=a==="ArrowRight"?1:-1,d=o+f*u;if(!(s==null||d>=s.length||d<0)){var h=Ll(r,"axis","hover",String(d));t.dispatch(vh({active:!0,activeIndex:d.toString(),activeDataKey:void 0,activeCoordinate:h}))}}}}}),wp.startListening({actionCreator:bS,effect:(e,t)=>{var r=t.getState(),n=r.rootProps.accessibilityLayer!==!1;if(n){var{keyboardInteraction:i}=r.tooltip;if(!i.active&&i.index==null){var a="0",o=Ll(r,"axis","hover",String(a));t.dispatch(vh({activeDataKey:void 0,active:!0,activeIndex:a,activeCoordinate:o}))}}}});var ur=ar("externalEvent"),xS=ka();xS.startListening({actionCreator:ur,effect:(e,t)=>{if(e.payload.handler!=null){var r=t.getState(),n={activeCoordinate:MR(r),activeDataKey:uw(r),activeIndex:wn(r),activeLabel:cw(r),activeTooltipIndex:wn(r),isTooltipActive:jR(r)};e.payload.handler(n,e.payload.reactEvent)}}});var F8=N([qi],e=>e.tooltipItemPayloads),B8=N([F8,no,(e,t,r)=>t,(e,t,r)=>r],(e,t,r,n)=>{var i=e.find(s=>s.settings.dataKey===n);if(i!=null){var{positions:a}=i;if(a!=null){var o=t(a,r);return o}}}),wS=ar("touchMove"),_S=ka();_S.startListening({actionCreator:wS,effect:(e,t)=>{var r=e.payload,n=t.getState(),i=mh(n,n.tooltip.settings.shared);if(i==="axis"){var a=yp(n,bp({clientX:r.touches[0].clientX,clientY:r.touches[0].clientY,currentTarget:r.currentTarget}));a?.activeIndex!=null&&t.dispatch(X1({activeIndex:a.activeIndex,activeDataKey:void 0,activeCoordinate:a.activeCoordinate}))}else if(i==="item"){var o,s=r.touches[0],l=document.elementFromPoint(s.clientX,s.clientY);if(!l||!l.getAttribute)return;var c=l.getAttribute(N0),u=(o=l.getAttribute(I0))!==null&&o!==void 0?o:void 0,f=B8(t.getState(),c,u);t.dispatch(Y1({activeDataKey:u,activeIndex:c,activeCoordinate:f}))}}});var z8=Ry({brush:A3,cartesianAxis:aB,chartData:l4,errorBars:OB,graphicalItems:OF,layout:tj,legend:Vj,options:n4,polarAxis:zL,polarOptions:L8,referenceElements:j3,rootProps:I8,tooltip:X$}),W8=function(t){return EM({reducer:z8,preloadedState:t,middleware:r=>r({serializableCheck:!1}).concat([hS.middleware,pS.middleware,wp.middleware,xS.middleware,_S.middleware]),devTools:dn.devToolsEnabled})};function SS(e){var{preloadedState:t,children:r,reduxStoreName:n}=e,i=Nt(),a=k.useRef(null);if(i)return r;a.current==null&&(a.current=W8(t));var o=hf;return A.createElement(D8,{context:o,store:a.current},r)}function OS(e){var{layout:t,width:r,height:n,margin:i}=e,a=Ze(),o=Nt();return k.useEffect(()=>{o||(a(JM(t)),a(QM({width:r,height:n})),a(ZM(i)))},[a,o,t,r,n,i]),null}function AS(e){var t=Ze();return k.useEffect(()=>{t($8(e))},[t,e]),null}var V8=["children"];function H8(e,t){if(e==null)return{};var r,n,i=U8(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function U8(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function tc(){return tc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},tc.apply(null,arguments)}var K8={width:"100%",height:"100%"},q8=k.forwardRef((e,t)=>{var r=L0(),n=F0(),i=K0();if(!Di(r)||!Di(n))return null;var{children:a,otherAttributes:o,title:s,desc:l}=e,c,u;return typeof o.tabIndex=="number"?c=o.tabIndex:c=i?0:void 0,typeof o.role=="string"?u=o.role:u=i?"application":void 0,A.createElement(iv,tc({},o,{title:s,desc:l,role:u,tabIndex:c,width:r,height:n,style:K8,ref:t}),a)}),Y8=e=>{var{children:t}=e,r=G(Zs);if(!r)return null;var{width:n,height:i,y:a,x:o}=r;return A.createElement(iv,{width:n,height:i,x:o,y:a},t)},ES=k.forwardRef((e,t)=>{var{children:r}=e,n=H8(e,V8),i=Nt();return i?A.createElement(Y8,null,r):A.createElement(q8,tc({ref:t},n),r)});function G8(){var e=Ze(),[t,r]=k.useState(null),n=G(Tj);return k.useEffect(()=>{if(t!=null){var i=t.getBoundingClientRect(),a=i.width/t.offsetWidth;Yt(a)&&a!==n&&e(ej(a))}},[t,e,n]),r}function PS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),r.push.apply(r,n)}return r}function X8(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?PS(Object(r),!0).forEach(function(n){Z8(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):PS(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Z8(e,t,r){return(t=J8(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function J8(e){var t=Q8(e,"string");return typeof t=="symbol"?t:t+""}function Q8(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var ez=k.forwardRef((e,t)=>{var{children:r,className:n,height:i,onClick:a,onContextMenu:o,onDoubleClick:s,onMouseDown:l,onMouseEnter:c,onMouseLeave:u,onMouseMove:f,onMouseUp:d,onTouchEnd:h,onTouchMove:m,onTouchStart:p,style:g,width:v}=e,b=Ze(),[x,S]=k.useState(null),[w,O]=k.useState(null);v4();var E=G8(),C=k.useCallback(V=>{E(V),typeof t=="function"&&t(V),S(V),O(V)},[E,t,S,O]),M=k.useCallback(V=>{b(dS(V)),b(ur({handler:a,reactEvent:V}))},[b,a]),$=k.useCallback(V=>{b(xp(V)),b(ur({handler:c,reactEvent:V}))},[b,c]),j=k.useCallback(V=>{b(G1()),b(ur({handler:u,reactEvent:V}))},[b,u]),_=k.useCallback(V=>{b(xp(V)),b(ur({handler:f,reactEvent:V}))},[b,f]),I=k.useCallback(()=>{b(bS())},[b]),D=k.useCallback(V=>{b(yS(V.key))},[b]),L=k.useCallback(V=>{b(ur({handler:o,reactEvent:V}))},[b,o]),W=k.useCallback(V=>{b(ur({handler:s,reactEvent:V}))},[b,s]),H=k.useCallback(V=>{b(ur({handler:l,reactEvent:V}))},[b,l]),te=k.useCallback(V=>{b(ur({handler:d,reactEvent:V}))},[b,d]),Q=k.useCallback(V=>{b(ur({handler:p,reactEvent:V}))},[b,p]),F=k.useCallback(V=>{b(wS(V)),b(ur({handler:m,reactEvent:V}))},[b,m]),U=k.useCallback(V=>{b(ur({handler:h,reactEvent:V}))},[b,h]);return A.createElement(bw.Provider,{value:x},A.createElement(ik.Provider,{value:w},A.createElement("div",{className:de("recharts-wrapper",n),style:X8({position:"relative",cursor:"default",width:v,height:i},g),onClick:M,onContextMenu:L,onDoubleClick:W,onFocus:I,onKeyDown:D,onMouseDown:H,onMouseEnter:$,onMouseLeave:j,onMouseMove:_,onMouseUp:te,onTouchEnd:U,onTouchMove:F,onTouchStart:Q,ref:C},r)))}),tz=["children","className","width","height","style","compact","title","desc"];function rz(e,t){if(e==null)return{};var r,n,i=nz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function nz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var CS=k.forwardRef((e,t)=>{var{children:r,className:n,width:i,height:a,style:o,compact:s,title:l,desc:c}=e,u=rz(e,tz),f=Ar(u);return s?A.createElement(ES,{otherAttributes:f,title:l,desc:c},r):A.createElement(ez,{className:n,style:o,width:i,height:a,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},A.createElement(ES,{otherAttributes:f,title:l,desc:c,ref:t},A.createElement(N3,null,r)))}),iz=["width","height"];function _p(){return _p=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},_p.apply(null,arguments)}function az(e,t){if(e==null)return{};var r,n,i=oz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function oz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var sz={top:5,right:5,bottom:5,left:5},lz={accessibilityLayer:!0,layout:"horizontal",stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:sz,reverseStackOrder:!1,syncMethod:"index"},kS=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,lz),{width:a,height:o}=i,s=az(i,iz);if(!Di(a)||!Di(o))return null;var{chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,categoricalChartProps:d}=t,h={chartName:l,defaultTooltipEventType:c,validateTooltipEventTypes:u,tooltipPayloadSearcher:f,eventEmitter:void 0};return A.createElement(SS,{preloadedState:{options:h},reduxStoreName:(n=d.id)!==null&&n!==void 0?n:l},A.createElement(U_,{chartData:d.data}),A.createElement(OS,{width:a,height:o,layout:i.layout,margin:i.margin}),A.createElement(AS,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(CS,_p({},s,{width:a,height:o,ref:r})))}),cz=["axis"],TS=k.forwardRef((e,t)=>A.createElement(kS,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:cz,tooltipPayloadSearcher:kh,categoricalChartProps:e,ref:t})),uz=["axis","item"],fz=k.forwardRef((e,t)=>A.createElement(kS,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:uz,tooltipPayloadSearcher:kh,categoricalChartProps:e,ref:t}));function dz(e){var t=Ze();return k.useEffect(()=>{t(R8(e))},[t,e]),null}var hz=["width","height","layout"];function Sp(){return Sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Sp.apply(null,arguments)}function pz(e,t){if(e==null)return{};var r,n,i=mz(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(n=0;n<a.length;n++)r=a[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}function mz(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var gz={top:5,right:5,bottom:5,left:5},vz={accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:gz,reverseStackOrder:!1,syncMethod:"index",layout:"radial"},yz=k.forwardRef(function(t,r){var n,i=_t(t.categoricalChartProps,vz),{width:a,height:o,layout:s}=i,l=pz(i,hz);if(!Di(a)||!Di(o))return null;var{chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d}=t,h={chartName:c,defaultTooltipEventType:u,validateTooltipEventTypes:f,tooltipPayloadSearcher:d,eventEmitter:void 0};return A.createElement(SS,{preloadedState:{options:h},reduxStoreName:(n=i.id)!==null&&n!==void 0?n:c},A.createElement(U_,{chartData:i.data}),A.createElement(OS,{width:a,height:o,layout:s,margin:i.margin}),A.createElement(AS,{accessibilityLayer:i.accessibilityLayer,barCategoryGap:i.barCategoryGap,maxBarSize:i.maxBarSize,stackOffset:i.stackOffset,barGap:i.barGap,barSize:i.barSize,syncId:i.syncId,syncMethod:i.syncMethod,className:i.className}),A.createElement(dz,{cx:i.cx,cy:i.cy,startAngle:i.startAngle,endAngle:i.endAngle,innerRadius:i.innerRadius,outerRadius:i.outerRadius}),A.createElement(CS,Sp({width:a,height:o},l,{ref:r})))}),bz=["item"],xz={layout:"centric",startAngle:0,endAngle:360,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},rc=k.forwardRef((e,t)=>{var r=_t(e,xz);return A.createElement(yz,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:bz,tooltipPayloadSearcher:kh,categoricalChartProps:r,ref:t})});function wz({isStatic:e,data:t}){const r=({value:u})=>{const f=u>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${f?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:f?`+${u}%`:`${u}%`})},n=Number(t?.thisMonthMoveIns??t?.lastMonthMoveIns??0),i=Number(t?.thisMonthMoveOuts??t?.lastMonthMoveOuts??0),a=Number(t?.moveInPercentChange??t?.moveInChange??0),o=Number(t?.moveOutPercentChange??t?.moveOutChange??0),s=[{name:"Move-ins",value:n},{name:"Move-outs",value:i}],l={purple:"#8B5CF6",indigo:"#6366F1"},c=({active:u,payload:f})=>!u||!f||!f.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:f.map((d,h)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:d.color,marginRight:6}}),d.name,": ",y.jsx("span",{className:"font-semibold",children:d.value})]},h))});return y.jsx(ve,{title:"Community",period:"This Month",icon:y.jsx(Fg,{className:"text-2xl text-[#329DFF]"}),className:`${e&&"max-h-[184px]"} h-[184px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Move-in/Out Count"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium !text-[#8B5CF6]",children:n+i})]}),y.jsxs("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1 flex items-center",children:[y.jsx(r,{value:((a+o)/2).toFixed(2)}),y.jsx("div",{className:"whitespace-nowrap",children:"Compared to last month"})]})]}),y.jsx("div",{className:"w-[50%] h-[111px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsxs(lo,{data:s,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:[y.jsx(kr,{fill:l.purple}),y.jsx(kr,{fill:l.indigo})]}),y.jsx(ni,{content:y.jsx(c,{})})]})})})]})})}function _z({isStatic:e,engagement:t}){const r=[{name:"Notice",value:Number(t?.total_notices||0)},{name:"Post",value:Number(t?.total_topics||0)},{name:"Poll",value:Number(t?.total_polls||0)},{name:"Survey",value:Number(t?.total_surveys||0)}],n={Notice:"#8B5CF6",Post:"#22C55E",Poll:"#3B82F6",Survey:"#F59E0B"},i=({active:a,payload:o,label:s})=>!a||!o||!o.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[s&&y.jsx("p",{className:"font-medium mb-1",children:s}),o.map((l,c)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:l.color,marginRight:6}}),l.name,": ",y.jsx("span",{className:"font-semibold",children:l.value})]},c))]});return y.jsx(ve,{title:"Engagement",period:"This Month",icon:y.jsx(BC,{className:"text-2xl text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(fz,{data:r,layout:"vertical",margin:{top:4,right:8,left:8,bottom:0},children:[y.jsx(Gl,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),y.jsx(Ql,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Zl,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),y.jsx(ni,{content:y.jsx(i,{}),cursor:{fill:"transparent"}}),y.jsx(z_,{dataKey:"value",barSize:40,isAnimationActive:!1,children:r.map(a=>y.jsx(kr,{fill:n[a.name]},a.name))})]})})})}function Sz(e){if(!e)return 0;const[t,r]=e.split(" ");let[n,i]=t.split(":").map(Number);return r==="PM"&&n!==12&&(n+=12),r==="AM"&&n===12&&(n=0),n*60+i}function Oz(e){let t=Math.floor(e/60);const r=t>=12?"PM":"AM";return t=t%12||12,`${t} ${r}`}function Az(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Sz(i.slot_start_time),o=Math.floor(a/240)*240,s=o+240,l=`${o}-${s}`;r[l]||(r[l]={time:Oz(s),bookings:0,total:0}),r[l].bookings+=Number(i?.slot_bookings||0),r[l].total+=Number(i?.total_slots||0)}return Object.values(r)}function Ez({isStatic:e,facility:t}){const r=Number(t?.totalBookings||0),n=Number(t?.totalSlots||0),i=Number(t?.utilizationRate||0),a=k.useMemo(()=>t?.slots?.length?Az(t.slots):[],[t]),o=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]}),s=a.length>0?Math.max(...a.map(l=>l.total),5):5;return y.jsxs(ve,{title:"Facilities",period:"Today",icon:y.jsx(LC,{className:"text-2xl text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[y.jsxs("div",{className:"grid grid-cols-3 gap-6 mb-4",children:[y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Bookings"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#8B5CF6]",children:r})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Total Slots"}),y.jsx("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium text-[#F59E0B]",children:n})]}),y.jsxs("div",{className:"flex flex-col gap-1",children:[y.jsx("div",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Utilisation Rate"}),y.jsxs("div",{className:"!m-0 !text-[24px] !leading-[28px] !font-medium !text-[#329DFF]",children:[Number.isFinite(i)?i.toFixed(2):"0.00","%"]})]})]}),y.jsx("div",{className:"w-full h-[150px]",children:y.jsx(ii,{width:"100%",height:"100%",children:y.jsxs(TS,{data:a,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(Ql,{yAxisId:"left",domain:[0,s],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1}),y.jsx(ni,{content:y.jsx(o,{})}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),y.jsx(fo,{yAxisId:"left",type:"monotone",dataKey:"total",name:"Total Slots",stroke:"#F59E0B",strokeWidth:2,strokeDasharray:"5 5",dot:!1})]})})})]})}function Pz({data:e}){console.log(e,"financial");const t=e?.incomeSummary||{},r=e?.expenditureSummary||{};function n(i){if(i==null||isNaN(i))return"0";const a=Number(i);return a>=1e9?(a/1e9).toFixed(a%1e9===0?0:2)+"B":a>=1e6?(a/1e6).toFixed(a%1e6===0?0:2)+"M":a>=1e3?(a/1e3).toFixed(a%1e3===0?0:2)+"K":a.toFixed(a%1===0?0:2)}return y.jsx(ve,{title:"Income",period:"This Month",icon:y.jsx(Bg,{className:"text-2xl text-green-600"}),className:"!gap-4 break-inside-avoid h-[232px] overflow-hidden",children:y.jsxs("div",{children:[y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Income"}),y.jsx("div",{children:"Collection"}),y.jsx("div",{children:"Closing"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212] mb-2",children:[y.jsxs("div",{children:[n(t.opening_balance)," AED"]}),y.jsxs("div",{children:[n(t.income)," AED"]}),y.jsxs("div",{children:[n(t.collection)," AED"]}),y.jsxs("div",{children:[n(t.closing_balance)," AED"]})]}),y.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),y.jsxs("div",{className:"flex items-center justify-between",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Bg,{className:"text-2xl text-red-600"}),y.jsx("div",{style:{fontWeight:500,fontSize:"16px",lineHeight:"20px"},className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]}),y.jsx("div",{className:"!text-xs !leading-[16px] !text-[#64748B]",children:"This Month"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs text-[#64748B] mt-4 mb-2",children:[y.jsx("div",{children:"Opening"}),y.jsx("div",{children:"Expenditure"}),y.jsx("div",{children:"Payment"}),y.jsx("div",{children:"Outstanding"})]}),y.jsxs("div",{className:"grid grid-cols-4 text-xs font-medium text-[#121212]",children:[y.jsxs("div",{children:[n(r.opening_balance)," AED"]}),y.jsxs("div",{children:[n(r.expenditure)," AED"]}),y.jsxs("div",{children:[n(r.payment)," AED"]}),y.jsxs("div",{children:[n(r.outstanding)," AED"]})]})]})})}function Cz(e){const t=e>=12?"PM":"AM";let r=e%12;return r===0&&(r=12),`${r} ${t}`}function kz(e){const r={};for(let n=0;n<e.length;n++){const i=e[n],a=Number(i.hour??0),s=Math.floor(a/4)*4+4,l=s;r[l]||(r[l]={time:Cz(s),walkins:0,checkins:0}),r[l].walkins+=Number(i.walkins??0),r[l].checkins+=Number(i.preApproved??0)}return Object.values(r)}function Tz({isStatic:e,gate:t}){const r={green:"#12B981",amber:"#F69E0A"},n=t?.summary?.activeWalkins||{},i=t?.summary?.preApprovedCheckins||{},a=t?.summary?.staffAttendance||{},o=t?.chart?.length>0?kz(t.chart):[],s=({active:l,payload:c,label:u})=>!l||!c||!c.length?null:y.jsxs("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:[u&&y.jsx("p",{className:"font-medium mb-1",children:u}),c.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx("span",{style:{display:"inline-block",width:8,height:8,borderRadius:"50%",backgroundColor:f.color,marginRight:6}}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))]});return y.jsx(ve,{title:"Gate Updates",period:"Today",icon:y.jsx(zC,{className:"text-2xl text-[#37CC6D]"}),className:`${e?"max-h-[303px]":""} h-[251px] mb-4 break-inside-avoid`,children:y.jsxs("div",{children:[y.jsxs("div",{className:"flex flex-wrap gap-x-2 gap-y-2 text-sm mb-2",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Active Walk-ins"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[a.total_in_now??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",a.total_in_today??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Pre-approved Check-ins"}),y.jsxs("div",{className:"!m-0 text-[28px] leading-[32px] font-medium text-[#E7A015] flex",children:[i.expected_pass_scanned??0,y.jsxs("div",{className:"text-[20px] leading-[32px] text-[#64748B]",children:["/",i.total_expected_pass??0]})]})]}),y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("div",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B]",children:"Staff Attendance"}),y.jsxs("div",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#1FA05B] flex",children:[n.visitor_in??0,y.jsxs("div",{className:"!m-0 !text-[20px] !leading-[32px] !text-[#64748B]",children:["/",n.total_pass??0]})]})]})]}),y.jsx(ii,{width:"100%",height:"60%",children:y.jsxs(TS,{data:o,margin:{top:0,right:0,left:0,bottom:0},children:[y.jsx(Zl,{dataKey:"time",tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),y.jsx(Ql,{yAxisId:"left",domain:[0,30],ticks:[0,10,20,30],tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400},axisLine:!1,tickLine:!1,width:25}),y.jsx(Gl,{strokeDasharray:"3 3",stroke:"#f3f4f6"}),y.jsx(ni,{content:y.jsx(s,{})}),y.jsx(fo,{type:"monotone",dataKey:"walkins",stroke:r.green,strokeWidth:2,dot:!1,name:"Walk-ins"}),y.jsx(fo,{type:"monotone",dataKey:"checkins",stroke:r.amber,strokeWidth:2,strokeDasharray:"5 5",dot:!1,name:"Pre-approved"})]})})]})})}function Mz({isStatic:e,complaints:t}){const r=({value:c})=>{if(c==null||isNaN(c))return null;const u=c>=0;return y.jsx("span",{className:`p-1 rounded text-[10px] leading-[14px] font-medium ${u?"bg-[#F7FEFA] text-[#1FA05B]":"bg-[#FFF2F2] text-[#AB0000]"}`,children:u?`+${c}%`:`${c}%`})},n=[{name:"L1",value:Number(t?.today_L1||0)},{name:"L2",value:Number(t?.today_L2||0)},{name:"L3",value:Number(t?.today_L3||0)},{name:"No Level",value:Number(t?.today_NoLevel||0)}],a=n.reduce((c,u)=>c+u.value,0)===0?[{name:"No Data",value:1}]:n,o=["#1FA05B","#E7A015","#FA7E28","#EF4444","#CBD5E1"],s=({color:c})=>y.jsx("span",{style:{display:"inline-block",width:"8px",height:"8px",borderRadius:"50%",backgroundColor:c,marginRight:"6px"}}),l=({active:c,payload:u})=>!c||!u||!u.length?null:y.jsx("div",{className:"bg-black text-white text-xs px-3 py-2 rounded-lg shadow-lg",children:u.map((f,d)=>y.jsxs("p",{className:"capitalize leading-relaxed",children:[y.jsx(s,{color:f.color}),f.name,": ",y.jsx("span",{className:"font-semibold",children:f.value})]},d))});return y.jsx(ve,{title:"Helpdesk",period:"Today",icon:y.jsx(WC,{className:"text-2xl text-[#FA7E28]"}),className:`${e&&"max-h-[186px]"} h-[186px] mb-4 break-inside-avoid`,children:y.jsxs("div",{className:"flex gap-3 h-fit",children:[y.jsxs("div",{className:"w-[50%] flex flex-col gap-7",children:[y.jsxs("div",{className:"flex flex-col gap-2",children:[y.jsx("h4",{className:"!m-0 !text-xs !leading-[16px] !text-[#64748B]",children:"Open Complaints"}),y.jsx("p",{className:"!m-0 !text-[28px] !leading-[32px] !font-medium text-[#FA7E28]",children:t?.today_open_complaints??0})]}),y.jsxs("p",{className:"!m-0 !text-[10px] !leading-[14px] !text-[#64748B] space-x-1",children:[y.jsx(r,{value:t?.percent_change}),y.jsx("span",{className:"whitespace-nowrap",children:"Compared to yesterday"})]})]}),y.jsx("div",{className:"w-[50%] h-[110px] flex justify-end",children:y.jsx(ii,{width:"75%",height:"100%",children:y.jsxs(rc,{children:[y.jsx(lo,{data:a,innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",children:a.map((c,u)=>y.jsx(kr,{fill:o[u]||"#CBD5E1"},c.name))}),y.jsx(ni,{content:y.jsx(l,{})})]})})})]})})}/*!
199
199
  * @kurkle/color v0.3.4
200
200
  * https://github.com/kurkle/color#readme
201
201
  * (c) 2024 Jukka Kurkela
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "anarock-widgets",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "dist/index.cjs.js",
5
5
  "module": "dist/index.es.js",
6
6
  "types": "dist/index.d.ts",