anarock-widgets 1.0.57 → 1.0.58
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 +1 -1
- package/dist/index.es.js +22 -17
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -306,7 +306,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
306
306
|
`))}},[qt,xe,E,x,z]),Qt&&(E?it.length===0?de=null:de=it.reduce((X,le,pe)=>(X.push(le),pe<it.length-1&&X.push(", "),X),[]):de=Tt);let hn=oe;!a&&ie&&ee&&(hn=T.clientWidth);let $t;typeof j<"u"?$t=j:$t=d?null:0;const mn=R.id||(x?`mui-component-select-${x}`:void 0),ve={...t,variant:B,value:z,open:Ue,error:p},tn=NY(ve),Lt={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(ve):y.slotProps?.paper},W={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(ve):y.slotProps?.list},se=DS();return O.jsxs(_.Fragment,{children:[O.jsx(TY,{as:"div",ref:J,tabIndex:$t,role:"combobox","aria-controls":Ue?se:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":Ue?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,mn].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":P?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:tt,onMouseDown:d||D?null:te,onBlur:ke,onFocus:C,...R,ownerState:ve,className:ue(R.className,tn.select,l),id:mn,children:jY(de)?PO||(PO=O.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):de}),O.jsx(MY,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:x,ref:ne,"aria-hidden":!0,onChange:Se,tabIndex:-1,disabled:d,className:tn.nativeInput,autoFocus:o,required:P,...Y,ownerState:ve}),O.jsx(kY,{as:g,className:tn.icon,ownerState:ve}),O.jsx(TT,{id:`menu-${x||""}`,anchorEl:T,open:Ue,onClose:me,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:se,...W},paper:{...Lt,style:{minWidth:hn,...Lt!=null?Lt.style:null}}},children:en})]})});process.env.NODE_ENV!=="production"&&(DT.propTypes={"aria-describedby":h.string,"aria-label":h.string,autoFocus:h.bool,autoWidth:h.bool,children:h.node,classes:h.object,className:h.string,defaultOpen:h.bool,defaultValue:h.any,disabled:h.bool,displayEmpty:h.bool,error:h.bool,IconComponent:h.elementType.isRequired,inputRef:Lr,labelId:h.string,MenuProps:h.object,multiple:h.bool,name:h.string,onBlur:h.func,onChange:h.func,onClose:h.func,onFocus:h.func,onOpen:h.func,open:h.bool,readOnly:h.bool,renderValue:h.func,required:h.bool,SelectDisplayProps:h.object,tabIndex:h.oneOfType([h.number,h.string]),type:h.any,value:h.any,variant:h.oneOf(["standard","outlined","filled"])});const RY=e=>{const{classes:t}=e,r=Nt({root:["root"]},RT,t);return{...t,...r}},Sy={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Dr(e)&&e!=="variant"},DY=we(wy,Sy)(""),IY=we(Ey,Sy)(""),$Y=we(xy,Sy)(""),_y=_.forwardRef(function(t,n){const r=Wt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=Oq,id:d,input:f,inputProps:p,label:g,labelId:m,MenuProps:v,multiple:y=!1,native:E=!1,onClose:x,onOpen:b,open:w,renderValue:S,SelectDisplayProps:C,variant:A="outlined",...k}=r,D=E?jT:DT,M=by(),P=yy({props:r,muiFormControl:M,states:["variant","error"]}),R=P.variant||A,j={...r,variant:R,classes:a},N=RY(j),{root:L,...B}=N,Y=f||{standard:O.jsx(DY,{ownerState:j}),outlined:O.jsx(IY,{label:g,ownerState:j}),filled:O.jsx($Y,{ownerState:j})}[R],z=Vt(n,Ba(Y));return O.jsx(_.Fragment,{children:_.cloneElement(Y,{inputComponent:D,inputProps:{children:o,error:P.error,IconComponent:u,variant:R,type:void 0,multiple:y,...E?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:v,onClose:x,onOpen:b,open:w,renderValue:S,SelectDisplayProps:{id:d,...C}},...p,classes:p?sn(B,p.classes):B,...f?f.props.inputProps:{}},...(y&&E||c)&&R==="outlined"?{notched:!0}:{},ref:z,className:ue(Y.props.className,s,N.root),...!f&&{variant:R},...k})})});process.env.NODE_ENV!=="production"&&(_y.propTypes={autoWidth:h.bool,children:h.node,classes:h.object,className:h.string,defaultOpen:h.bool,defaultValue:h.any,displayEmpty:h.bool,IconComponent:h.elementType,id:h.string,input:h.element,inputProps:h.object,label:h.node,labelId:h.string,MenuProps:h.object,multiple:h.bool,native:h.bool,onChange:h.func,onClose:h.func,onOpen:h.func,open:h.bool,renderValue:h.func,SelectDisplayProps:h.object,sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),value:h.oneOfType([h.oneOf([""]),h.any]),variant:h.oneOf(["filled","outlined","standard"])});_y.muiName="Select";function LY(e){return At("MuiTooltip",e)}const ht=vt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function FY(e){return Math.round(e*1e5)/1e5}const BY=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${jt(o.split("-")[0])}`],arrow:["arrow"]};return Nt(a,LY,t)},zY=we(vy,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(cn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${ht.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${ht.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${ht.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${ht.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${ht.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${ht.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${ht.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${ht.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),VY=we("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${jt(n.placement.split("-")[0])}`]]}})(cn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${ht.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${ht.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${ht.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${FY(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${ht.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${ht.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${ht.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${ht.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),WY=we("span",{name:"MuiTooltip",slot:"Arrow"})(cn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let bc=!1;const AO=new nf;let as={x:0,y:0};function xc(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Dm=_.forwardRef(function(t,n){const r=Wt({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:g=100,enterNextDelay:m=0,enterTouchDelay:v=700,followCursor:y=!1,id:E,leaveDelay:x=0,leaveTouchDelay:b=1500,onClose:w,onOpen:S,open:C,placement:A="bottom",PopperComponent:k,PopperProps:D={},slotProps:M={},slots:P={},title:R,TransitionComponent:j,TransitionProps:N,...L}=r,B=_.isValidElement(o)?o:O.jsx("span",{children:o}),Y=xd(),z=ag(),[F,G]=_.useState(),[q,ne]=_.useState(null),Q=_.useRef(!1),ee=f||y,re=ra(),ie=ra(),oe=ra(),H=ra(),[K,J]=Rh({controlled:C,default:!1,name:"Tooltip",state:"open"});let T=K;if(process.env.NODE_ENV!=="production"){const{current:ye}=_.useRef(C!==void 0);_.useEffect(()=>{F&&F.disabled&&!ye&&R!==""&&F.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
307
307
|
`))},[R,F,ye])}const fe=DS(E),te=_.useRef(),me=Qr(()=>{te.current!==void 0&&(document.body.style.WebkitUserSelect=te.current,te.current=void 0),H.clear()});_.useEffect(()=>me,[me]);const xe=ye=>{AO.clear(),bc=!0,J(!0),S&&!T&&S(ye)},Se=Qr(ye=>{AO.start(800+x,()=>{bc=!1}),J(!1),w&&T&&w(ye),re.start(Y.transitions.duration.shortest,()=>{Q.current=!1})}),Ae=ye=>{Q.current&&ye.type!=="touchstart"||(F&&F.removeAttribute("title"),ie.clear(),oe.clear(),g||bc&&m?ie.start(bc?m:g,()=>{xe(ye)}):xe(ye))},tt=ye=>{ie.clear(),oe.start(x,()=>{Se(ye)})},[,Ue]=_.useState(!1),ke=ye=>{zu(ye.target)||(Ue(!1),tt(ye))},de=ye=>{F||G(ye.currentTarget),zu(ye.target)&&(Ue(!0),Ae(ye))},Tt=ye=>{Q.current=!0;const un=B.props;un.onTouchStart&&un.onTouchStart(ye)},it=ye=>{Tt(ye),oe.clear(),re.clear(),me(),te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",H.start(v,()=>{document.body.style.WebkitUserSelect=te.current,Ae(ye)})},Qt=ye=>{B.props.onTouchEnd&&B.props.onTouchEnd(ye),me(),oe.start(b,()=>{Se(ye)})};_.useEffect(()=>{if(!T)return;function ye(un){un.key==="Escape"&&Se(un)}return document.addEventListener("keydown",ye),()=>{document.removeEventListener("keydown",ye)}},[Se,T]);const qt=Vt(Ba(B),G,n);!R&&R!==0&&(T=!1);const en=_.useRef(),hn=ye=>{const un=B.props;un.onMouseMove&&un.onMouseMove(ye),as={x:ye.clientX,y:ye.clientY},en.current&&en.current.update()},$t={},mn=typeof R=="string";c?($t.title=!T&&mn&&!d?R:null,$t["aria-describedby"]=T?fe:null):($t["aria-label"]=mn?R:null,$t["aria-labelledby"]=T&&!mn?fe:null);const ve={...$t,...L,...B.props,className:ue(L.className,B.props.className),onTouchStart:Tt,ref:qt,...y?{onMouseMove:hn}:{}};process.env.NODE_ENV!=="production"&&(ve["data-mui-internal-clone-element"]=!0,_.useEffect(()=>{F&&!F.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
308
308
|
`))},[F]));const tn={};p||(ve.onTouchStart=it,ve.onTouchEnd=Qt),d||(ve.onMouseOver=xc(Ae,ve.onMouseOver),ve.onMouseLeave=xc(tt,ve.onMouseLeave),ee||(tn.onMouseOver=Ae,tn.onMouseLeave=tt)),u||(ve.onFocus=xc(de,ve.onFocus),ve.onBlur=xc(ke,ve.onBlur),ee||(tn.onFocus=de,tn.onBlur=ke)),process.env.NODE_ENV!=="production"&&B.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${B.props.title}\` or the Tooltip component.`].join(`
|
|
309
|
-
`));const Lt={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:A,PopperComponentProp:k,touch:Q.current},W=typeof M.popper=="function"?M.popper(Lt):M.popper,se=_.useMemo(()=>{let ye=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return D.popperOptions?.modifiers&&(ye=ye.concat(D.popperOptions.modifiers)),W?.popperOptions?.modifiers&&(ye=ye.concat(W.popperOptions.modifiers)),{...D.popperOptions,...W?.popperOptions,modifiers:ye}},[q,D.popperOptions,W?.popperOptions]),X=BY(Lt),le=typeof M.transition=="function"?M.transition(Lt):M.transition,pe={slots:{popper:s.Popper,transition:s.Transition??j,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:M.arrow??l.arrow,popper:{...D,...W??l.popper},tooltip:M.tooltip??l.tooltip,transition:{...N,...le??l.transition}}},[Ye,ot]=On("popper",{elementType:zY,externalForwardedProps:pe,ownerState:Lt,className:ue(X.popper,D?.className)}),[Un,vi]=On("transition",{elementType:Js,externalForwardedProps:pe,ownerState:Lt}),[Hn,qi]=On("tooltip",{elementType:VY,className:X.tooltip,externalForwardedProps:pe,ownerState:Lt}),[Fr,mr]=On("arrow",{elementType:WY,className:X.arrow,externalForwardedProps:pe,ownerState:Lt,ref:ne});return O.jsxs(_.Fragment,{children:[_.cloneElement(B,ve),O.jsx(Ye,{as:k??vy,placement:A,anchorEl:y?{getBoundingClientRect:()=>({top:as.y,left:as.x,right:as.x,bottom:as.y,width:0,height:0})}:F,popperRef:en,open:F?T:!1,id:fe,transition:!0,...tn,...ot,popperOptions:se,children:({TransitionProps:ye})=>O.jsx(Un,{timeout:Y.transitions.duration.shorter,...ye,...vi,children:O.jsxs(Hn,{...qi,children:[R,i?O.jsx(Fr,{...mr}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Dm.propTypes={arrow:h.bool,children:za.isRequired,classes:h.object,className:h.string,components:h.shape({Arrow:h.elementType,Popper:h.elementType,Tooltip:h.elementType,Transition:h.elementType}),componentsProps:h.shape({arrow:h.object,popper:h.object,tooltip:h.object,transition:h.object}),describeChild:h.bool,disableFocusListener:h.bool,disableHoverListener:h.bool,disableInteractive:h.bool,disableTouchListener:h.bool,enterDelay:h.number,enterNextDelay:h.number,enterTouchDelay:h.number,followCursor:h.bool,id:h.string,leaveDelay:h.number,leaveTouchDelay:h.number,onClose:h.func,onOpen:h.func,open:h.bool,placement:h.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:h.elementType,PopperProps:h.object,slotProps:h.shape({arrow:h.oneOfType([h.func,h.object]),popper:h.oneOfType([h.func,h.object]),tooltip:h.oneOfType([h.func,h.object]),transition:h.oneOfType([h.func,h.object])}),slots:h.shape({arrow:h.elementType,popper:h.elementType,tooltip:h.elementType,transition:h.elementType}),sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),title:h.node,TransitionComponent:h.elementType,TransitionProps:h.object});function UY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function HY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function KY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}const qY=Xc(_y)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function IT({widgetId:e,options:t=[],defaultValue:n="all",onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=sessionStorage.getItem("community_id"),[a,s]=I.useState(o||n),l=u=>{const d=u.target.value;s(d),Gl("community_id",d),Gl("widget_id",e),r(d)},c=()=>{Gl("widget_id",e),Gl("export",!0),i()};return O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Dm,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},children:O.jsx(ET,{size:"small",children:O.jsxs(qY,{multiple:!0,value:a,onChange:l,children:[O.jsx(Rm,{value:"all",sx:{fontWeight:600},children:"All"}),t?.map(u=>O.jsx(Rm,{value:u.community_id,children:u.community_name},u.community_id))]})})}),O.jsx(Dm,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},title:"Export CSV for this widget",children:O.jsx("button",{onClick:c,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:O.jsx(HY,{className:"stroke-[#884EA7] stroke-[1.4]"})})})]})}function YY({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}];return O.jsx(Ro,{title:"Engagement",period:"This Month",icon:O.jsx(YS,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,actionButtons:O.jsx(IT,{widgetId:t?.widget_id,options:t?.communities,onFilterChange:(o,a)=>console.log(o,a),onExport:o=>console.log("Export triggered for",o)}),children:O.jsx("div",{className:"w-full h-[235px]",children:O.jsx(Fo,{width:"100%",height:"100%",children:O.jsxs(mH,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[O.jsx(Qd,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),O.jsx(Ys,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),O.jsx(ef,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),O.jsx(Lo,{content:O.jsx(hl,{}),cursor:{fill:"transparent"}}),O.jsx(hA,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((o,a)=>O.jsx(Nr,{fill:r[a]},o.name))})]})})})})}function GY({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=I.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return O.jsxs(Ro,{title:"Facilities",period:"Today",icon:O.jsx(qS,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[O.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mb-[16px]",children:[O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),O.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),O.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),O.jsx("div",{className:"w-full h-[170px]",children:O.jsx(Fo,{width:"100%",height:"100%",children:O.jsxs(VA,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[O.jsx(Qd,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),O.jsx(ef,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),O.jsx(Ys,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(Ys,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(Lo,{content:O.jsx(hl,{})}),O.jsx(la,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),O.jsx(la,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4"})]})})})]})}function XY({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return console.log("Finance Summary Data:",e),O.jsx(Ro,{title:"Income",period:"This Month",icon:O.jsx(Zb,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:O.jsx(IT,{widgetId:e?.widget_id,options:e?.communities,onFilterChange:(s,l)=>console.log(s,l),onExport:s=>console.log("Export triggered for",s)}),children:O.jsxs("div",{children:[O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Income"}),O.jsx("div",{children:"Collection"}),O.jsx("div",{children:"Closing"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[O.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),O.jsx("div",{children:a(t.income,t?.currency_type)}),O.jsx("div",{children:a(t.collection,t?.currency_type)}),O.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),O.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex items-center gap-[12px]",children:[O.jsx(Zb,{className:"!text-[24px] text-red-600"}),O.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Expenditure"}),O.jsx("div",{children:"Payment"}),O.jsx("div",{children:"Outstanding"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[O.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),O.jsx("div",{children:a(n.expenditure,n?.currency_type)}),O.jsx("div",{children:a(n.payment,n?.currency_type)}),O.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var ZY="tippy-box",$T="tippy-content",JY="tippy-backdrop",LT="tippy-arrow",FT="tippy-svg-arrow",ao={passive:!0,capture:!0},BT=function(){return document.body};function QY(e,t){return{}.hasOwnProperty.call(e,t)}function ch(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Py(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function zT(e,t){return typeof e=="function"?e.apply(void 0,t):e}function TO(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function eG(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function tG(e){return e.split(/\s+/).filter(Boolean)}function ta(e){return[].concat(e)}function kO(e,t){e.indexOf(t)===-1&&e.push(t)}function nG(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function rG(e){return e.split("-")[0]}function Yu(e){return[].slice.call(e)}function MO(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function As(){return document.createElement("div")}function Qs(e){return["Element","Fragment"].some(function(t){return Py(e,t)})}function iG(e){return Py(e,"NodeList")}function oG(e){return Py(e,"MouseEvent")}function aG(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function sG(e){return Qs(e)?[e]:iG(e)?Yu(e):Array.isArray(e)?e:Yu(document.querySelectorAll(e))}function uh(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function jO(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function lG(e){var t,n=ta(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function cG(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=rG(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,m=o.top-r+d>l,v=r-o.bottom-f>l,y=o.left-n+p>l,E=n-o.right-g>l;return m||v||y||E})}function dh(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function NO(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Er={isTouch:!1},RO=0;function uG(){Er.isTouch||(Er.isTouch=!0,window.performance&&document.addEventListener("mousemove",VT))}function VT(){var e=performance.now();e-RO<20&&(Er.isTouch=!1,document.removeEventListener("mousemove",VT)),RO=e}function dG(){var e=document.activeElement;if(aG(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function fG(){document.addEventListener("touchstart",uG,ao),window.addEventListener("blur",dG)}var pG=typeof window<"u"&&typeof document<"u",hG=pG?!!window.msCrypto:!1;function Xo(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function DO(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function mG(e){return DO(`
|
|
309
|
+
`));const Lt={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:A,PopperComponentProp:k,touch:Q.current},W=typeof M.popper=="function"?M.popper(Lt):M.popper,se=_.useMemo(()=>{let ye=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return D.popperOptions?.modifiers&&(ye=ye.concat(D.popperOptions.modifiers)),W?.popperOptions?.modifiers&&(ye=ye.concat(W.popperOptions.modifiers)),{...D.popperOptions,...W?.popperOptions,modifiers:ye}},[q,D.popperOptions,W?.popperOptions]),X=BY(Lt),le=typeof M.transition=="function"?M.transition(Lt):M.transition,pe={slots:{popper:s.Popper,transition:s.Transition??j,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:M.arrow??l.arrow,popper:{...D,...W??l.popper},tooltip:M.tooltip??l.tooltip,transition:{...N,...le??l.transition}}},[Ye,ot]=On("popper",{elementType:zY,externalForwardedProps:pe,ownerState:Lt,className:ue(X.popper,D?.className)}),[Un,vi]=On("transition",{elementType:Js,externalForwardedProps:pe,ownerState:Lt}),[Hn,qi]=On("tooltip",{elementType:VY,className:X.tooltip,externalForwardedProps:pe,ownerState:Lt}),[Fr,mr]=On("arrow",{elementType:WY,className:X.arrow,externalForwardedProps:pe,ownerState:Lt,ref:ne});return O.jsxs(_.Fragment,{children:[_.cloneElement(B,ve),O.jsx(Ye,{as:k??vy,placement:A,anchorEl:y?{getBoundingClientRect:()=>({top:as.y,left:as.x,right:as.x,bottom:as.y,width:0,height:0})}:F,popperRef:en,open:F?T:!1,id:fe,transition:!0,...tn,...ot,popperOptions:se,children:({TransitionProps:ye})=>O.jsx(Un,{timeout:Y.transitions.duration.shorter,...ye,...vi,children:O.jsxs(Hn,{...qi,children:[R,i?O.jsx(Fr,{...mr}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Dm.propTypes={arrow:h.bool,children:za.isRequired,classes:h.object,className:h.string,components:h.shape({Arrow:h.elementType,Popper:h.elementType,Tooltip:h.elementType,Transition:h.elementType}),componentsProps:h.shape({arrow:h.object,popper:h.object,tooltip:h.object,transition:h.object}),describeChild:h.bool,disableFocusListener:h.bool,disableHoverListener:h.bool,disableInteractive:h.bool,disableTouchListener:h.bool,enterDelay:h.number,enterNextDelay:h.number,enterTouchDelay:h.number,followCursor:h.bool,id:h.string,leaveDelay:h.number,leaveTouchDelay:h.number,onClose:h.func,onOpen:h.func,open:h.bool,placement:h.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:h.elementType,PopperProps:h.object,slotProps:h.shape({arrow:h.oneOfType([h.func,h.object]),popper:h.oneOfType([h.func,h.object]),tooltip:h.oneOfType([h.func,h.object]),transition:h.oneOfType([h.func,h.object])}),slots:h.shape({arrow:h.elementType,popper:h.elementType,tooltip:h.elementType,transition:h.elementType}),sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),title:h.node,TransitionComponent:h.elementType,TransitionProps:h.object});function UY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function HY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function KY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}const qY=Xc(_y)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function IT({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||n,[a,s]=I.useState(o),l=u=>{let d=u.target.value;d.includes("all")&&(d=["all",...t.map(f=>f.community_id)]),d.length===0&&(d=["all"]),s(d),Gl("community_id",JSON.stringify(d)),Gl("widget_id",e),r(d)},c=()=>{Gl("widget_id",e),Gl("export",!0),i()};return O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Dm,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},children:O.jsx(ET,{size:"small",children:O.jsxs(qY,{multiple:!0,value:a,onChange:l,renderValue:u=>u.includes("all")?"All":t.filter(d=>u.includes(d.community_id)).map(d=>d.community_name).join(", "),children:[O.jsxs(Rm,{value:"all",children:[O.jsx(Checkbox,{checked:a.includes("all")}),O.jsx(ListItemText,{primary:"All",sx:{fontWeight:600}})]}),t?.map(u=>O.jsxs(Rm,{value:u.community_id,children:[O.jsx(Checkbox,{checked:a.includes(u.community_id)}),O.jsx(ListItemText,{primary:u.community_name})]},u.community_id))]})})}),O.jsx(Dm,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},title:"Export CSV for this widget",children:O.jsx("button",{onClick:c,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:O.jsx(HY,{className:"stroke-[#884EA7] stroke-[1.4]"})})})]})}function YY({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}];return O.jsx(Ro,{title:"Engagement",period:"This Month",icon:O.jsx(YS,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,actionButtons:O.jsx(IT,{widgetId:t?.widget_id,options:t?.communities,onFilterChange:(o,a)=>console.log(o,a),onExport:o=>console.log("Export triggered for",o)}),children:O.jsx("div",{className:"w-full h-[235px]",children:O.jsx(Fo,{width:"100%",height:"100%",children:O.jsxs(mH,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[O.jsx(Qd,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),O.jsx(Ys,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),O.jsx(ef,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),O.jsx(Lo,{content:O.jsx(hl,{}),cursor:{fill:"transparent"}}),O.jsx(hA,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((o,a)=>O.jsx(Nr,{fill:r[a]},o.name))})]})})})})}function GY({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=I.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return O.jsxs(Ro,{title:"Facilities",period:"Today",icon:O.jsx(qS,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[O.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mb-[16px]",children:[O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),O.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),O.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),O.jsx("div",{className:"w-full h-[170px]",children:O.jsx(Fo,{width:"100%",height:"100%",children:O.jsxs(VA,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[O.jsx(Qd,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),O.jsx(ef,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),O.jsx(Ys,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(Ys,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(Lo,{content:O.jsx(hl,{})}),O.jsx(la,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),O.jsx(la,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4"})]})})})]})}function XY({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return console.log("Finance Summary Data:",e),O.jsx(Ro,{title:"Income",period:"This Month",icon:O.jsx(Zb,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:O.jsx(IT,{widgetId:e?.widget_id,options:e?.communities,onFilterChange:(s,l)=>console.log(s,l),onExport:s=>console.log("Export triggered for",s)}),children:O.jsxs("div",{children:[O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Income"}),O.jsx("div",{children:"Collection"}),O.jsx("div",{children:"Closing"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[O.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),O.jsx("div",{children:a(t.income,t?.currency_type)}),O.jsx("div",{children:a(t.collection,t?.currency_type)}),O.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),O.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex items-center gap-[12px]",children:[O.jsx(Zb,{className:"!text-[24px] text-red-600"}),O.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Expenditure"}),O.jsx("div",{children:"Payment"}),O.jsx("div",{children:"Outstanding"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[O.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),O.jsx("div",{children:a(n.expenditure,n?.currency_type)}),O.jsx("div",{children:a(n.payment,n?.currency_type)}),O.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var ZY="tippy-box",$T="tippy-content",JY="tippy-backdrop",LT="tippy-arrow",FT="tippy-svg-arrow",ao={passive:!0,capture:!0},BT=function(){return document.body};function QY(e,t){return{}.hasOwnProperty.call(e,t)}function ch(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Py(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function zT(e,t){return typeof e=="function"?e.apply(void 0,t):e}function TO(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function eG(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function tG(e){return e.split(/\s+/).filter(Boolean)}function ta(e){return[].concat(e)}function kO(e,t){e.indexOf(t)===-1&&e.push(t)}function nG(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function rG(e){return e.split("-")[0]}function Yu(e){return[].slice.call(e)}function MO(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function As(){return document.createElement("div")}function Qs(e){return["Element","Fragment"].some(function(t){return Py(e,t)})}function iG(e){return Py(e,"NodeList")}function oG(e){return Py(e,"MouseEvent")}function aG(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function sG(e){return Qs(e)?[e]:iG(e)?Yu(e):Array.isArray(e)?e:Yu(document.querySelectorAll(e))}function uh(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function jO(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function lG(e){var t,n=ta(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function cG(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=rG(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,m=o.top-r+d>l,v=r-o.bottom-f>l,y=o.left-n+p>l,E=n-o.right-g>l;return m||v||y||E})}function dh(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function NO(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Er={isTouch:!1},RO=0;function uG(){Er.isTouch||(Er.isTouch=!0,window.performance&&document.addEventListener("mousemove",VT))}function VT(){var e=performance.now();e-RO<20&&(Er.isTouch=!1,document.removeEventListener("mousemove",VT)),RO=e}function dG(){var e=document.activeElement;if(aG(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function fG(){document.addEventListener("touchstart",uG,ao),window.addEventListener("blur",dG)}var pG=typeof window<"u"&&typeof document<"u",hG=pG?!!window.msCrypto:!1;function Xo(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function DO(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function mG(e){return DO(`
|
|
310
310
|
%ctippy.js
|
|
311
311
|
|
|
312
312
|
%c`+DO(e)+`
|
package/dist/index.es.js
CHANGED
|
@@ -32904,37 +32904,42 @@ const oG = au(Ry)(() => ({
|
|
|
32904
32904
|
function ZT({
|
|
32905
32905
|
widgetId: e,
|
|
32906
32906
|
options: t = [],
|
|
32907
|
-
defaultValue: n = "all",
|
|
32907
|
+
defaultValue: n = ["all"],
|
|
32908
32908
|
onFilterChange: r = () => {
|
|
32909
32909
|
},
|
|
32910
32910
|
onExport: i = () => {
|
|
32911
32911
|
}
|
|
32912
32912
|
}) {
|
|
32913
|
-
const o = sessionStorage.getItem("community_id"), [a, s] = Rt(o
|
|
32914
|
-
|
|
32915
|
-
s(d), oc("community_id", d), oc("widget_id", e), r(d);
|
|
32913
|
+
const o = JSON.parse(sessionStorage.getItem("community_id")) || n, [a, s] = Rt(o), l = (u) => {
|
|
32914
|
+
let d = u.target.value;
|
|
32915
|
+
d.includes("all") && (d = ["all", ...t.map((f) => f.community_id)]), d.length === 0 && (d = ["all"]), s(d), oc("community_id", JSON.stringify(d)), oc("widget_id", e), r(d);
|
|
32916
32916
|
}, c = () => {
|
|
32917
32917
|
oc("widget_id", e), oc("export", !0), i();
|
|
32918
32918
|
};
|
|
32919
32919
|
return /* @__PURE__ */ O.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
32920
|
-
/* @__PURE__ */ O.jsx(
|
|
32921
|
-
|
|
32920
|
+
/* @__PURE__ */ O.jsx(Hm, { slotProps: { tooltip: { sx: { fontSize: "12px" } } }, children: /* @__PURE__ */ O.jsx(LT, { size: "small", children: /* @__PURE__ */ O.jsxs(
|
|
32921
|
+
oG,
|
|
32922
32922
|
{
|
|
32923
|
-
|
|
32924
|
-
|
|
32925
|
-
|
|
32926
|
-
|
|
32927
|
-
|
|
32928
|
-
|
|
32929
|
-
|
|
32923
|
+
multiple: !0,
|
|
32924
|
+
value: a,
|
|
32925
|
+
onChange: l,
|
|
32926
|
+
renderValue: (u) => u.includes("all") ? "All" : t.filter((d) => u.includes(d.community_id)).map((d) => d.community_name).join(", "),
|
|
32927
|
+
children: [
|
|
32928
|
+
/* @__PURE__ */ O.jsxs(Um, { value: "all", children: [
|
|
32929
|
+
/* @__PURE__ */ O.jsx(Checkbox, { checked: a.includes("all") }),
|
|
32930
|
+
/* @__PURE__ */ O.jsx(ListItemText, { primary: "All", sx: { fontWeight: 600 } })
|
|
32931
|
+
] }),
|
|
32932
|
+
t?.map((u) => /* @__PURE__ */ O.jsxs(Um, { value: u.community_id, children: [
|
|
32933
|
+
/* @__PURE__ */ O.jsx(Checkbox, { checked: a.includes(u.community_id) }),
|
|
32934
|
+
/* @__PURE__ */ O.jsx(ListItemText, { primary: u.community_name })
|
|
32935
|
+
] }, u.community_id))
|
|
32936
|
+
]
|
|
32930
32937
|
}
|
|
32931
|
-
),
|
|
32938
|
+
) }) }),
|
|
32932
32939
|
/* @__PURE__ */ O.jsx(
|
|
32933
32940
|
Hm,
|
|
32934
32941
|
{
|
|
32935
|
-
slotProps: {
|
|
32936
|
-
tooltip: { sx: { fontSize: "12px" } }
|
|
32937
|
-
},
|
|
32942
|
+
slotProps: { tooltip: { sx: { fontSize: "12px" } } },
|
|
32938
32943
|
title: "Export CSV for this widget",
|
|
32939
32944
|
children: /* @__PURE__ */ O.jsx(
|
|
32940
32945
|
"button",
|
package/dist/index.umd.js
CHANGED
|
@@ -306,7 +306,7 @@ Take a look at the reducer(s) handling this action type: ${p.type}.
|
|
|
306
306
|
`))}},[Qt,we,E,x,z]),ln&&(E?ut.length===0?de=null:de=ut.reduce((X,ce,he)=>(X.push(ce),he<ut.length-1&&X.push(", "),X),[]):de=$t);let Cn=oe;!a&&ie&&ee&&(Cn=T.clientWidth);let Kt;typeof j<"u"?Kt=j:Kt=d?null:0;const An=D.id||(x?`mui-component-select-${x}`:void 0),ve={...t,variant:B,value:z,open:Ye,error:p},un=SY(ve),qt={...y.PaperProps,...typeof y.slotProps?.paper=="function"?y.slotProps.paper(ve):y.slotProps?.paper},W={...y.MenuListProps,...typeof y.slotProps?.list=="function"?y.slotProps.list(ve):y.slotProps?.list},se=f0();return O.jsxs(_.Fragment,{children:[O.jsx(xY,{as:"div",ref:J,tabIndex:Kt,role:"combobox","aria-controls":Ye?se:void 0,"aria-disabled":d?"true":void 0,"aria-expanded":Ye?"true":"false","aria-haspopup":"listbox","aria-label":i,"aria-labelledby":[v,An].filter(Boolean).join(" ")||void 0,"aria-describedby":r,"aria-required":P?"true":void 0,"aria-invalid":p?"true":void 0,onKeyDown:it,onMouseDown:d||R?null:te,onBlur:De,onFocus:C,...D,ownerState:ve,className:ue(D.className,un.select,l),id:An,children:EY(de)?eA||(eA=O.jsx("span",{className:"notranslate","aria-hidden":!0,children:""})):de}),O.jsx(OY,{"aria-invalid":p,value:Array.isArray(z)?z.join(","):z,name:x,ref:ne,"aria-hidden":!0,onChange:_e,tabIndex:-1,disabled:d,className:un.nativeInput,autoFocus:o,required:P,...Y,ownerState:ve}),O.jsx(wY,{as:g,className:un.icon,ownerState:ve}),O.jsx(qC,{id:`menu-${x||""}`,anchorEl:T,open:Ye,onClose:me,anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"},...y,slotProps:{...y.slotProps,list:{"aria-labelledby":v,role:"listbox","aria-multiselectable":E?"true":void 0,disableListWrap:!0,id:se,...W},paper:{...qt,style:{minWidth:Cn,...qt!=null?qt.style:null}}},children:cn})]})});process.env.NODE_ENV!=="production"&&(nA.propTypes={"aria-describedby":h.string,"aria-label":h.string,autoFocus:h.bool,autoWidth:h.bool,children:h.node,classes:h.object,className:h.string,defaultOpen:h.bool,defaultValue:h.any,disabled:h.bool,displayEmpty:h.bool,error:h.bool,IconComponent:h.elementType.isRequired,inputRef:kr,labelId:h.string,MenuProps:h.object,multiple:h.bool,name:h.string,onBlur:h.func,onChange:h.func,onClose:h.func,onFocus:h.func,onOpen:h.func,open:h.bool,readOnly:h.bool,renderValue:h.func,required:h.bool,SelectDisplayProps:h.object,tabIndex:h.oneOfType([h.number,h.string]),type:h.any,value:h.any,variant:h.oneOf(["standard","outlined","filled"])});const _Y=e=>{const{classes:t}=e,r=Mt({root:["root"]},QC,t);return{...t,...r}},Gv={name:"MuiSelect",slot:"Root",shouldForwardProp:e=>Or(e)&&e!=="variant"},PY=Oe(Uv,Gv)(""),CY=Oe(Yv,Gv)(""),AY=Oe(zv,Gv)(""),Xv=_.forwardRef(function(t,n){const r=Lt({name:"MuiSelect",props:t}),{autoWidth:i=!1,children:o,classes:a={},className:s,defaultOpen:l=!1,displayEmpty:c=!1,IconComponent:u=pq,id:d,input:f,inputProps:p,label:g,labelId:m,MenuProps:v,multiple:y=!1,native:E=!1,onClose:x,onOpen:b,open:w,renderValue:S,SelectDisplayProps:C,variant:A="outlined",...k}=r,R=E?XC:nA,M=Fv(),P=Lv({props:r,muiFormControl:M,states:["variant","error"]}),D=P.variant||A,j={...r,variant:D,classes:a},N=_Y(j),{root:L,...B}=N,Y=f||{standard:O.jsx(PY,{ownerState:j}),outlined:O.jsx(CY,{label:g,ownerState:j}),filled:O.jsx(AY,{ownerState:j})}[D],z=Ft(n,Ta(Y));return O.jsx(_.Fragment,{children:_.cloneElement(Y,{inputComponent:R,inputProps:{children:o,error:P.error,IconComponent:u,variant:D,type:void 0,multiple:y,...E?{id:d}:{autoWidth:i,defaultOpen:l,displayEmpty:c,labelId:m,MenuProps:v,onClose:x,onOpen:b,open:w,renderValue:S,SelectDisplayProps:{id:d,...C}},...p,classes:p?en(B,p.classes):B,...f?f.props.inputProps:{}},...(y&&E||c)&&D==="outlined"?{notched:!0}:{},ref:z,className:ue(Y.props.className,s,N.root),...!f&&{variant:D},...k})})});process.env.NODE_ENV!=="production"&&(Xv.propTypes={autoWidth:h.bool,children:h.node,classes:h.object,className:h.string,defaultOpen:h.bool,defaultValue:h.any,displayEmpty:h.bool,IconComponent:h.elementType,id:h.string,input:h.element,inputProps:h.object,label:h.node,labelId:h.string,MenuProps:h.object,multiple:h.bool,native:h.bool,onChange:h.func,onClose:h.func,onOpen:h.func,open:h.bool,renderValue:h.func,SelectDisplayProps:h.object,sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),value:h.oneOfType([h.oneOf([""]),h.any]),variant:h.oneOf(["filled","outlined","standard"])}),Xv.muiName="Select";function TY(e){return Pt("MuiTooltip",e)}const vt=mt("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]);function kY(e){return Math.round(e*1e5)/1e5}const MY=e=>{const{classes:t,disableInteractive:n,arrow:r,touch:i,placement:o}=e,a={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",i&&"touch",`tooltipPlacement${kt(o.split("-")[0])}`],arrow:["arrow"]};return Mt(a,TY,t)},jY=Oe($v,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})(nn(({theme:e})=>({zIndex:(e.vars||e).zIndex.tooltip,pointerEvents:"none",variants:[{props:({ownerState:t})=>!t.disableInteractive,style:{pointerEvents:"auto"}},{props:({open:t})=>!t,style:{pointerEvents:"none"}},{props:({ownerState:t})=>t.arrow,style:{[`&[data-popper-placement*="bottom"] .${vt.arrow}`]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},[`&[data-popper-placement*="top"] .${vt.arrow}`]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},[`&[data-popper-placement*="right"] .${vt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}},[`&[data-popper-placement*="left"] .${vt.arrow}`]:{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="right"] .${vt.arrow}`]:{left:0,marginLeft:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="right"] .${vt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!t.isRtl,style:{[`&[data-popper-placement*="left"] .${vt.arrow}`]:{right:0,marginRight:"-0.71em"}}},{props:({ownerState:t})=>t.arrow&&!!t.isRtl,style:{[`&[data-popper-placement*="left"] .${vt.arrow}`]:{left:0,marginLeft:"-0.71em"}}}]}))),NY=Oe("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t[`tooltipPlacement${kt(n.placement.split("-")[0])}`]]}})(nn(({theme:e})=>({backgroundColor:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.92),borderRadius:(e.vars||e).shape.borderRadius,color:(e.vars||e).palette.common.white,fontFamily:e.typography.fontFamily,padding:"4px 8px",fontSize:e.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:e.typography.fontWeightMedium,[`.${vt.popper}[data-popper-placement*="left"] &`]:{transformOrigin:"right center"},[`.${vt.popper}[data-popper-placement*="right"] &`]:{transformOrigin:"left center"},[`.${vt.popper}[data-popper-placement*="top"] &`]:{transformOrigin:"center bottom",marginBottom:"14px"},[`.${vt.popper}[data-popper-placement*="bottom"] &`]:{transformOrigin:"center top",marginTop:"14px"},variants:[{props:({ownerState:t})=>t.arrow,style:{position:"relative",margin:0}},{props:({ownerState:t})=>t.touch,style:{padding:"8px 16px",fontSize:e.typography.pxToRem(14),lineHeight:`${kY(16/14)}em`,fontWeight:e.typography.fontWeightRegular}},{props:({ownerState:t})=>!t.isRtl,style:{[`.${vt.popper}[data-popper-placement*="left"] &`]:{marginRight:"14px"},[`.${vt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"14px"}}},{props:({ownerState:t})=>!t.isRtl&&t.touch,style:{[`.${vt.popper}[data-popper-placement*="left"] &`]:{marginRight:"24px"},[`.${vt.popper}[data-popper-placement*="right"] &`]:{marginLeft:"24px"}}},{props:({ownerState:t})=>!!t.isRtl,style:{[`.${vt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"14px"},[`.${vt.popper}[data-popper-placement*="right"] &`]:{marginRight:"14px"}}},{props:({ownerState:t})=>!!t.isRtl&&t.touch,style:{[`.${vt.popper}[data-popper-placement*="left"] &`]:{marginLeft:"24px"},[`.${vt.popper}[data-popper-placement*="right"] &`]:{marginRight:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${vt.popper}[data-popper-placement*="top"] &`]:{marginBottom:"24px"}}},{props:({ownerState:t})=>t.touch,style:{[`.${vt.popper}[data-popper-placement*="bottom"] &`]:{marginTop:"24px"}}}]}))),DY=Oe("span",{name:"MuiTooltip",slot:"Arrow"})(nn(({theme:e})=>({overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:e.vars?e.vars.palette.Tooltip.bg:e.alpha(e.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}})));let Rd=!1;const rA=new hd;let hl={x:0,y:0};function $d(e,t){return(n,...r)=>{t&&t(n,...r),e(n,...r)}}const Zv=_.forwardRef(function(t,n){const r=Lt({props:t,name:"MuiTooltip"}),{arrow:i=!1,children:o,classes:a,components:s={},componentsProps:l={},describeChild:c=!1,disableFocusListener:u=!1,disableHoverListener:d=!1,disableInteractive:f=!1,disableTouchListener:p=!1,enterDelay:g=100,enterNextDelay:m=0,enterTouchDelay:v=700,followCursor:y=!1,id:E,leaveDelay:x=0,leaveTouchDelay:b=1500,onClose:w,onOpen:S,open:C,placement:A="bottom",PopperComponent:k,PopperProps:R={},slotProps:M={},slots:P={},title:D,TransitionComponent:j,TransitionProps:N,...L}=r,B=_.isValidElement(o)?o:O.jsx("span",{children:o}),Y=Oc(),z=Hf(),[F,G]=_.useState(),[q,ne]=_.useState(null),Q=_.useRef(!1),ee=f||y,re=Sa(),ie=Sa(),oe=Sa(),H=Sa(),[K,J]=tp({controlled:C,default:!1,name:"Tooltip",state:"open"});let T=K;if(process.env.NODE_ENV!=="production"){const{current:ye}=_.useRef(C!==void 0);_.useEffect(()=>{F&&F.disabled&&!ye&&D!==""&&F.tagName.toLowerCase()==="button"&&console.warn(["MUI: You are providing a disabled `button` child to the Tooltip component.","A disabled element does not fire events.","Tooltip needs to listen to the child element's events to display the title.","","Add a simple wrapper element, such as a `span`."].join(`
|
|
307
307
|
`))},[D,F,ye])}const pe=f0(E),te=_.useRef(),me=Hr(()=>{te.current!==void 0&&(document.body.style.WebkitUserSelect=te.current,te.current=void 0),H.clear()});_.useEffect(()=>me,[me]);const we=ye=>{rA.clear(),Rd=!0,J(!0),S&&!T&&S(ye)},_e=Hr(ye=>{rA.start(800+x,()=>{Rd=!1}),J(!1),w&&T&&w(ye),re.start(Y.transitions.duration.shortest,()=>{Q.current=!1})}),ke=ye=>{Q.current&&ye.type!=="touchstart"||(F&&F.removeAttribute("title"),ie.clear(),oe.clear(),g||Rd&&m?ie.start(Rd?m:g,()=>{we(ye)}):we(ye))},it=ye=>{ie.clear(),oe.start(x,()=>{_e(ye)})},[,Ye]=_.useState(!1),De=ye=>{vd(ye.target)||(Ye(!1),it(ye))},de=ye=>{F||G(ye.currentTarget),vd(ye.target)&&(Ye(!0),ke(ye))},$t=ye=>{Q.current=!0;const pn=B.props;pn.onTouchStart&&pn.onTouchStart(ye)},ut=ye=>{$t(ye),oe.clear(),re.clear(),me(),te.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",H.start(v,()=>{document.body.style.WebkitUserSelect=te.current,ke(ye)})},ln=ye=>{B.props.onTouchEnd&&B.props.onTouchEnd(ye),me(),oe.start(b,()=>{_e(ye)})};_.useEffect(()=>{if(!T)return;function ye(pn){pn.key==="Escape"&&_e(pn)}return document.addEventListener("keydown",ye),()=>{document.removeEventListener("keydown",ye)}},[_e,T]);const Qt=Ft(Ta(B),G,n);!D&&D!==0&&(T=!1);const cn=_.useRef(),Cn=ye=>{const pn=B.props;pn.onMouseMove&&pn.onMouseMove(ye),hl={x:ye.clientX,y:ye.clientY},cn.current&&cn.current.update()},Kt={},An=typeof D=="string";c?(Kt.title=!T&&An&&!d?D:null,Kt["aria-describedby"]=T?pe:null):(Kt["aria-label"]=An?D:null,Kt["aria-labelledby"]=T&&!An?pe:null);const ve={...Kt,...L,...B.props,className:ue(L.className,B.props.className),onTouchStart:$t,ref:Qt,...y?{onMouseMove:Cn}:{}};process.env.NODE_ENV!=="production"&&(ve["data-mui-internal-clone-element"]=!0,_.useEffect(()=>{F&&!F.getAttribute("data-mui-internal-clone-element")&&console.error(["MUI: The `children` component of the Tooltip is not forwarding its props correctly.","Please make sure that props are spread on the same element that the ref is applied to."].join(`
|
|
308
308
|
`))},[F]));const un={};p||(ve.onTouchStart=ut,ve.onTouchEnd=ln),d||(ve.onMouseOver=$d(ke,ve.onMouseOver),ve.onMouseLeave=$d(it,ve.onMouseLeave),ee||(un.onMouseOver=ke,un.onMouseLeave=it)),u||(ve.onFocus=$d(de,ve.onFocus),ve.onBlur=$d(De,ve.onBlur),ee||(un.onFocus=de,un.onBlur=De)),process.env.NODE_ENV!=="production"&&B.props.title&&console.error(["MUI: You have provided a `title` prop to the child of <Tooltip />.",`Remove this title prop \`${B.props.title}\` or the Tooltip component.`].join(`
|
|
309
|
-
`));const qt={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:A,PopperComponentProp:k,touch:Q.current},W=typeof M.popper=="function"?M.popper(qt):M.popper,se=_.useMemo(()=>{let ye=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return R.popperOptions?.modifiers&&(ye=ye.concat(R.popperOptions.modifiers)),W?.popperOptions?.modifiers&&(ye=ye.concat(W.popperOptions.modifiers)),{...R.popperOptions,...W?.popperOptions,modifiers:ye}},[q,R.popperOptions,W?.popperOptions]),X=MY(qt),ce=typeof M.transition=="function"?M.transition(qt):M.transition,he={slots:{popper:s.Popper,transition:s.Transition??j,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:M.arrow??l.arrow,popper:{...R,...W??l.popper},tooltip:M.tooltip??l.tooltip,transition:{...N,...ce??l.transition}}},[Ze,dt]=xn("popper",{elementType:jY,externalForwardedProps:he,ownerState:qt,className:ue(X.popper,R?.className)}),[sr,qi]=xn("transition",{elementType:cl,externalForwardedProps:he,ownerState:qt}),[lr,Bo]=xn("tooltip",{elementType:NY,className:X.tooltip,externalForwardedProps:he,ownerState:qt}),[vi,Fr]=xn("arrow",{elementType:DY,className:X.arrow,externalForwardedProps:he,ownerState:qt,ref:ne});return O.jsxs(_.Fragment,{children:[_.cloneElement(B,ve),O.jsx(Ze,{as:k??$v,placement:A,anchorEl:y?{getBoundingClientRect:()=>({top:hl.y,left:hl.x,right:hl.x,bottom:hl.y,width:0,height:0})}:F,popperRef:cn,open:F?T:!1,id:pe,transition:!0,...un,...dt,popperOptions:se,children:({TransitionProps:ye})=>O.jsx(sr,{timeout:Y.transitions.duration.shorter,...ye,...qi,children:O.jsxs(lr,{...Bo,children:[D,i?O.jsx(vi,{...Fr}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Zv.propTypes={arrow:h.bool,children:Ma.isRequired,classes:h.object,className:h.string,components:h.shape({Arrow:h.elementType,Popper:h.elementType,Tooltip:h.elementType,Transition:h.elementType}),componentsProps:h.shape({arrow:h.object,popper:h.object,tooltip:h.object,transition:h.object}),describeChild:h.bool,disableFocusListener:h.bool,disableHoverListener:h.bool,disableInteractive:h.bool,disableTouchListener:h.bool,enterDelay:h.number,enterNextDelay:h.number,enterTouchDelay:h.number,followCursor:h.bool,id:h.string,leaveDelay:h.number,leaveTouchDelay:h.number,onClose:h.func,onOpen:h.func,open:h.bool,placement:h.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:h.elementType,PopperProps:h.object,slotProps:h.shape({arrow:h.oneOfType([h.func,h.object]),popper:h.oneOfType([h.func,h.object]),tooltip:h.oneOfType([h.func,h.object]),transition:h.oneOfType([h.func,h.object])}),slots:h.shape({arrow:h.elementType,popper:h.elementType,tooltip:h.elementType,transition:h.elementType}),sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),title:h.node,TransitionComponent:h.elementType,TransitionProps:h.object});function IY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function RY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function $Y(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}const LY=mc(Xv)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function iA({widgetId:e,options:t=[],defaultValue:n="all",onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=sessionStorage.getItem("community_id"),[a,s]=I.useState(o||n),l=u=>{const d=u.target.value;s(d),Pc("community_id",d),Pc("widget_id",e),r(d)},c=()=>{Pc("widget_id",e),Pc("export",!0),i()};return O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Zv,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},children:O.jsx(IC,{size:"small",children:O.jsxs(LY,{multiple:!0,value:a,onChange:l,children:[O.jsx(Kv,{value:"all",sx:{fontWeight:600},children:"All"}),t?.map(u=>O.jsx(Kv,{value:u.community_id,children:u.community_name},u.community_id))]})})}),O.jsx(Zv,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},title:"Export CSV for this widget",children:O.jsx("button",{onClick:c,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:O.jsx(RY,{className:"stroke-[#884EA7] stroke-[1.4]"})})})]})}function FY({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}];return O.jsx(Zi,{title:"Engagement",period:"This Month",icon:O.jsx(L0,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,actionButtons:O.jsx(iA,{widgetId:t?.widget_id,options:t?.communities,onFilterChange:(o,a)=>console.log(o,a),onExport:o=>console.log("Export triggered for",o)}),children:O.jsx("div",{className:"w-full h-[235px]",children:O.jsx(bo,{width:"100%",height:"100%",children:O.jsxs(aH,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[O.jsx(ad,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),O.jsx(Zs,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),O.jsx(ld,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),O.jsx(yo,{content:O.jsx(ss,{}),cursor:{fill:"transparent"}}),O.jsx(HP,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((o,a)=>O.jsx(Ar,{fill:r[a]},o.name))})]})})})})}function BY({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=I.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return O.jsxs(Zi,{title:"Facilities",period:"Today",icon:O.jsx($0,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[O.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mb-[16px]",children:[O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),O.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),O.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),O.jsx("div",{className:"w-full h-[170px]",children:O.jsx(bo,{width:"100%",height:"100%",children:O.jsxs(D2,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[O.jsx(ad,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),O.jsx(ld,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),O.jsx(Zs,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(Zs,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(yo,{content:O.jsx(ss,{})}),O.jsx(xa,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),O.jsx(xa,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4"})]})})})]})}function zY({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return console.log("Finance Summary Data:",e),O.jsx(Zi,{title:"Income",period:"This Month",icon:O.jsx(F0,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:O.jsx(iA,{widgetId:e?.widget_id,options:e?.communities,onFilterChange:(s,l)=>console.log(s,l),onExport:s=>console.log("Export triggered for",s)}),children:O.jsxs("div",{children:[O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Income"}),O.jsx("div",{children:"Collection"}),O.jsx("div",{children:"Closing"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[O.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),O.jsx("div",{children:a(t.income,t?.currency_type)}),O.jsx("div",{children:a(t.collection,t?.currency_type)}),O.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),O.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex items-center gap-[12px]",children:[O.jsx(F0,{className:"!text-[24px] text-red-600"}),O.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Expenditure"}),O.jsx("div",{children:"Payment"}),O.jsx("div",{children:"Outstanding"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[O.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),O.jsx("div",{children:a(n.expenditure,n?.currency_type)}),O.jsx("div",{children:a(n.payment,n?.currency_type)}),O.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var VY="tippy-box",oA="tippy-content",WY="tippy-backdrop",aA="tippy-arrow",sA="tippy-svg-arrow",To={passive:!0,capture:!0},lA=function(){return document.body};function UY(e,t){return{}.hasOwnProperty.call(e,t)}function Jv(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Qv(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function cA(e,t){return typeof e=="function"?e.apply(void 0,t):e}function uA(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function HY(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function KY(e){return e.split(/\s+/).filter(Boolean)}function ja(e){return[].concat(e)}function dA(e,t){e.indexOf(t)===-1&&e.push(t)}function qY(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function YY(e){return e.split("-")[0]}function Ld(e){return[].slice.call(e)}function fA(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function ml(){return document.createElement("div")}function gl(e){return["Element","Fragment"].some(function(t){return Qv(e,t)})}function GY(e){return Qv(e,"NodeList")}function XY(e){return Qv(e,"MouseEvent")}function ZY(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function JY(e){return gl(e)?[e]:GY(e)?Ld(e):Array.isArray(e)?e:Ld(document.querySelectorAll(e))}function ey(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function pA(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function QY(e){var t,n=ja(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function eG(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=YY(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,m=o.top-r+d>l,v=r-o.bottom-f>l,y=o.left-n+p>l,E=n-o.right-g>l;return m||v||y||E})}function ty(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function hA(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Dr={isTouch:!1},mA=0;function tG(){Dr.isTouch||(Dr.isTouch=!0,window.performance&&document.addEventListener("mousemove",gA))}function gA(){var e=performance.now();e-mA<20&&(Dr.isTouch=!1,document.removeEventListener("mousemove",gA)),mA=e}function nG(){var e=document.activeElement;if(ZY(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function rG(){document.addEventListener("touchstart",tG,To),window.addEventListener("blur",nG)}var iG=typeof window<"u"&&typeof document<"u",oG=iG?!!window.msCrypto:!1;function Na(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function vA(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function aG(e){return vA(`
|
|
309
|
+
`));const qt={...r,isRtl:z,arrow:i,disableInteractive:ee,placement:A,PopperComponentProp:k,touch:Q.current},W=typeof M.popper=="function"?M.popper(qt):M.popper,se=_.useMemo(()=>{let ye=[{name:"arrow",enabled:!!q,options:{element:q,padding:4}}];return R.popperOptions?.modifiers&&(ye=ye.concat(R.popperOptions.modifiers)),W?.popperOptions?.modifiers&&(ye=ye.concat(W.popperOptions.modifiers)),{...R.popperOptions,...W?.popperOptions,modifiers:ye}},[q,R.popperOptions,W?.popperOptions]),X=MY(qt),ce=typeof M.transition=="function"?M.transition(qt):M.transition,he={slots:{popper:s.Popper,transition:s.Transition??j,tooltip:s.Tooltip,arrow:s.Arrow,...P},slotProps:{arrow:M.arrow??l.arrow,popper:{...R,...W??l.popper},tooltip:M.tooltip??l.tooltip,transition:{...N,...ce??l.transition}}},[Ze,dt]=xn("popper",{elementType:jY,externalForwardedProps:he,ownerState:qt,className:ue(X.popper,R?.className)}),[sr,qi]=xn("transition",{elementType:cl,externalForwardedProps:he,ownerState:qt}),[lr,Bo]=xn("tooltip",{elementType:NY,className:X.tooltip,externalForwardedProps:he,ownerState:qt}),[vi,Fr]=xn("arrow",{elementType:DY,className:X.arrow,externalForwardedProps:he,ownerState:qt,ref:ne});return O.jsxs(_.Fragment,{children:[_.cloneElement(B,ve),O.jsx(Ze,{as:k??$v,placement:A,anchorEl:y?{getBoundingClientRect:()=>({top:hl.y,left:hl.x,right:hl.x,bottom:hl.y,width:0,height:0})}:F,popperRef:cn,open:F?T:!1,id:pe,transition:!0,...un,...dt,popperOptions:se,children:({TransitionProps:ye})=>O.jsx(sr,{timeout:Y.transitions.duration.shorter,...ye,...qi,children:O.jsxs(lr,{...Bo,children:[D,i?O.jsx(vi,{...Fr}):null]})})})]})});process.env.NODE_ENV!=="production"&&(Zv.propTypes={arrow:h.bool,children:Ma.isRequired,classes:h.object,className:h.string,components:h.shape({Arrow:h.elementType,Popper:h.elementType,Tooltip:h.elementType,Transition:h.elementType}),componentsProps:h.shape({arrow:h.object,popper:h.object,tooltip:h.object,transition:h.object}),describeChild:h.bool,disableFocusListener:h.bool,disableHoverListener:h.bool,disableInteractive:h.bool,disableTouchListener:h.bool,enterDelay:h.number,enterNextDelay:h.number,enterTouchDelay:h.number,followCursor:h.bool,id:h.string,leaveDelay:h.number,leaveTouchDelay:h.number,onClose:h.func,onOpen:h.func,open:h.bool,placement:h.oneOf(["auto-end","auto-start","auto","bottom-end","bottom-start","bottom","left-end","left-start","left","right-end","right-start","right","top-end","top-start","top"]),PopperComponent:h.elementType,PopperProps:h.object,slotProps:h.shape({arrow:h.oneOfType([h.func,h.object]),popper:h.oneOfType([h.func,h.object]),tooltip:h.oneOfType([h.func,h.object]),transition:h.oneOfType([h.func,h.object])}),slots:h.shape({arrow:h.elementType,popper:h.elementType,tooltip:h.elementType,transition:h.elementType}),sx:h.oneOfType([h.arrayOf(h.oneOfType([h.func,h.object,h.bool])),h.func,h.object]),title:h.node,TransitionComponent:h.elementType,TransitionProps:h.object});function IY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Box_List"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M6.562,8.062h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,8.062Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,20.938h-2a1.5,1.5,0,0,1-1.5-1.5v-2a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,20.938Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5v-2a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M6.562,14.5h-2a1.5,1.5,0,0,1-1.5-1.5V11a1.5,1.5,0,0,1,1.5-1.5h2a1.5,1.5,0,0,1,1.5,1.5v2A1.5,1.5,0,0,1,6.562,14.5Zm-2-4a.5.5,0,0,0-.5.5v2a.5.5,0,0,0,.5.5h2a.5.5,0,0,0,.5-.5V11a.5.5,0,0,0-.5-.5Z"},child:[]},{tag:"path",attr:{d:"M20.438,6.062h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,12.5h-9a.5.5,0,0,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]},{tag:"path",attr:{d:"M20.438,18.935h-9a.5.5,0,1,1,0-1h9a.5.5,0,0,1,0,1Z"},child:[]}]}]}]})(e)}function RY(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Export"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M5.552,20.968a2.577,2.577,0,0,1-2.5-2.73c-.012-2.153,0-4.306,0-6.459a.5.5,0,0,1,1,0c0,2.2-.032,4.4,0,6.6.016,1.107.848,1.589,1.838,1.589H18.353A1.546,1.546,0,0,0,19.825,19a3.023,3.023,0,0,0,.1-1.061V11.779h0a.5.5,0,0,1,1,0c0,2.224.085,4.465,0,6.687a2.567,2.567,0,0,1-2.67,2.5Z"},child:[]},{tag:"path",attr:{d:"M12.337,3.176a.455.455,0,0,0-.311-.138c-.015,0-.028,0-.043-.006s-.027,0-.041.006a.457.457,0,0,0-.312.138L7.961,6.845a.5.5,0,0,0,.707.707l2.816-2.815V15.479a.5.5,0,0,0,1,0V4.737L15.3,7.552a.5.5,0,0,0,.707-.707Z"},child:[]}]}]}]})(e)}function $Y(e){return qe({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Warning"},child:[{tag:"g",attr:{},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M12.5,8.752a.5.5,0,0,0-1,0h0v6a.5.5,0,0,0,1,0Z"},child:[]},{tag:"circle",attr:{cx:"11.999",cy:"16.736",r:"0.5"},child:[]}]},{tag:"path",attr:{d:"M18.642,20.934H5.385A2.5,2.5,0,0,1,3.163,17.29L9.792,4.421a2.5,2.5,0,0,1,4.444,0L20.865,17.29a2.5,2.5,0,0,1-2.223,3.644ZM12.014,4.065a1.478,1.478,0,0,0-1.334.814L4.052,17.748a1.5,1.5,0,0,0,1.333,2.186H18.642a1.5,1.5,0,0,0,1.334-2.186L13.348,4.879A1.478,1.478,0,0,0,12.014,4.065Z"},child:[]}]}]}]})(e)}const LY=mc(Xv)(()=>({width:"fit-content",maxWidth:"100px",height:"28px",padding:"0 6px",display:"flex",fontSize:"12px",alignItems:"center","& .MuiSelect-select":{padding:0},"& .MuiOutlinedInput-notchedOutline":{borderColor:"#C6C6C6",transition:"all 0.2s ease"},"&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"#B084CC"},"&.Mui-focused .MuiOutlinedInput-notchedOutline":{borderColor:"#884EA7 !important",boxShadow:"0 0 0 3px rgba(136, 78, 167, 0.2)"}}));function iA({widgetId:e,options:t=[],defaultValue:n=["all"],onFilterChange:r=()=>{},onExport:i=()=>{}}){const o=JSON.parse(sessionStorage.getItem("community_id"))||n,[a,s]=I.useState(o),l=u=>{let d=u.target.value;d.includes("all")&&(d=["all",...t.map(f=>f.community_id)]),d.length===0&&(d=["all"]),s(d),Pc("community_id",JSON.stringify(d)),Pc("widget_id",e),r(d)},c=()=>{Pc("widget_id",e),Pc("export",!0),i()};return O.jsxs("div",{className:"flex items-center gap-2",children:[O.jsx(Zv,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},children:O.jsx(IC,{size:"small",children:O.jsxs(LY,{multiple:!0,value:a,onChange:l,renderValue:u=>u.includes("all")?"All":t.filter(d=>u.includes(d.community_id)).map(d=>d.community_name).join(", "),children:[O.jsxs(Kv,{value:"all",children:[O.jsx(Checkbox,{checked:a.includes("all")}),O.jsx(ListItemText,{primary:"All",sx:{fontWeight:600}})]}),t?.map(u=>O.jsxs(Kv,{value:u.community_id,children:[O.jsx(Checkbox,{checked:a.includes(u.community_id)}),O.jsx(ListItemText,{primary:u.community_name})]},u.community_id))]})})}),O.jsx(Zv,{slotProps:{tooltip:{sx:{fontSize:"12px"}}},title:"Export CSV for this widget",children:O.jsx("button",{onClick:c,className:"px-3 py-2 bg-[#FBF5FF] rounded cursor-pointer",children:O.jsx(RY,{className:"stroke-[#884EA7] stroke-[1.4]"})})})]})}function FY({isStatic:e,data:t,communities:n}){const r=["#8B5CF6","#22C55E","#3B82F6","#F59E0B"],i=[{name:"Notice",value:Number(t?.total_notices||0),color:r[0]},{name:"Post",value:Number(t?.total_topics||0),color:r[1]},{name:"Poll",value:Number(t?.total_polls||0),color:r[2]},{name:"Survey",value:Number(t?.total_surveys||0),color:r[3]}];return O.jsx(Zi,{title:"Engagement",period:"This Month",icon:O.jsx(L0,{className:"!text-[24px] text-[#DBB467]"}),className:`${e&&"max-h-[303px]"} h-[303px]`,actionButtons:O.jsx(iA,{widgetId:t?.widget_id,options:t?.communities,onFilterChange:(o,a)=>console.log(o,a),onExport:o=>console.log("Export triggered for",o)}),children:O.jsx("div",{className:"w-full h-[235px]",children:O.jsx(bo,{width:"100%",height:"100%",children:O.jsxs(aH,{data:i,layout:"vertical",margin:{top:4,right:8,left:0,bottom:0},children:[O.jsx(ad,{stroke:"#e5e7eb",strokeDasharray:"3 3",horizontal:!1}),O.jsx(Zs,{type:"category",dataKey:"name",width:40,axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#121212",fontWeight:400}}),O.jsx(ld,{type:"number",axisLine:!1,tickLine:!1,tick:{fontSize:10,lineHeight:14,fill:"#64748B",fontWeight:400}}),O.jsx(yo,{content:O.jsx(ss,{}),cursor:{fill:"transparent"}}),O.jsx(HP,{dataKey:"value",barSize:40,isAnimationActive:!1,children:i.map((o,a)=>O.jsx(Ar,{fill:r[a]},o.name))})]})})})})}function BY({isStatic:e,data:t}){const n=Number(t?.totalBookings||0),r=Number(t?.averageUtilizationPercentage||0),i=I.useMemo(()=>{if(!t?.graph)return[];const{labels:s=[],bookings:l=[],utilization:c=[]}=t.graph;return s.map((u,d)=>({time:u,bookings:l[d]||0,utilization:c[d]||0}))},[t]),o=s=>["12 AM","6 AM","12 PM","6 PM","11 PM"].includes(s)?s:"",a=i.length?i:Array.from({length:24},(s,l)=>({time:`${l%12||12} ${l>=12?"PM":"AM"}`,bookings:0,utilization:0}));return O.jsxs(Zi,{title:"Facilities",period:"Today",icon:O.jsx($0,{className:"!text-[24px] text-[#8B5CF6]"}),className:`${e&&"max-h-[305px]"} h-[305px] mb-4 break-inside-avoid`,children:[O.jsxs("div",{className:"grid grid-cols-2 gap-[24px] mb-[16px]",children:[O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Bookings"}),O.jsx("div",{className:"!text-[24px] font-medium text-[#8B5CF6]",children:n})]}),O.jsxs("div",{children:[O.jsx("div",{className:"!text-[12px] text-[#64748B]",children:"Utilisation Rate"}),O.jsxs("div",{className:"!text-[24px] font-medium text-[#329DFF]",children:[r.toFixed(2),"%"]})]})]}),O.jsx("div",{className:"w-full h-[170px]",children:O.jsx(bo,{width:"100%",height:"100%",children:O.jsxs(D2,{data:a,margin:{top:5,right:-30,left:-35,bottom:0},children:[O.jsx(ad,{strokeDasharray:"3 3",stroke:"#EBEBEB"}),O.jsx(ld,{dataKey:"time",interval:0,tickFormatter:o,tick:{fontSize:10,fill:"#121212",fontWeight:400},axisLine:!1,tickLine:!1,minTickGap:0}),O.jsx(Zs,{yAxisId:"left",tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(Zs,{yAxisId:"right",orientation:"right",domain:[0,100],ticks:[0,20,40,60,80,100],tickFormatter:s=>`${s}%`,tick:{fontSize:10,fill:"#64748B"},axisLine:!1,tickLine:!1}),O.jsx(yo,{content:O.jsx(ss,{})}),O.jsx(xa,{yAxisId:"left",type:"monotone",dataKey:"bookings",name:"Bookings",stroke:"#8B5CF6",strokeWidth:2,dot:!1}),O.jsx(xa,{yAxisId:"right",type:"monotone",dataKey:"utilization",name:"Utilization Rate",stroke:"#329DFF",strokeWidth:2,dot:!1,strokeDasharray:"2 4"})]})})})]})}function zY({data:e}){const t=e?.incomeSummary||{},n=e?.expenditureSummary||{},r=["AED","USD","EUR"],i=["Rs","INR","₹"];function o(s){if(s==null||isNaN(s))return"0";const l=Number(s),c=Math.abs(l),u=l<0?"-":"";return c>=1e9?u+(c/1e9).toFixed(c%1e9===0?0:2)+"B":c>=1e6?u+(c/1e6).toFixed(c%1e6===0?0:2)+"M":c>=1e3?u+(c/1e3).toFixed(c%1e3===0?0:2)+"K":u+c.toFixed(c%1===0?0:2)}function a(s,l){return l?i.includes(l)?`${l} ${o(s)}`:r.includes(l)?`${o(s)} ${l}`:`${o(s)} ${l}`:o(s)}return console.log("Finance Summary Data:",e),O.jsx(Zi,{title:"Income",period:"This Month",icon:O.jsx(F0,{className:"!text-[24px] text-green-600"}),className:"!gap-[16px] break-inside-avoid h-[232px] overflow-hidden",actionButtons:O.jsx(iA,{widgetId:e?.widget_id,options:e?.communities,onFilterChange:(s,l)=>console.log(s,l),onExport:s=>console.log("Export triggered for",s)}),children:O.jsxs("div",{children:[O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Income"}),O.jsx("div",{children:"Collection"}),O.jsx("div",{children:"Closing"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212] mb-2",children:[O.jsx("div",{children:a(t.opening_balance,t?.currency_type)}),O.jsx("div",{children:a(t.income,t?.currency_type)}),O.jsx("div",{children:a(t.collection,t?.currency_type)}),O.jsx("div",{children:a(t.closing_balance,t?.currency_type)})]}),O.jsx("hr",{className:"my-4 border-t border-dashed border-gray-300"}),O.jsx("div",{className:"flex items-center justify-between",children:O.jsxs("div",{className:"flex items-center gap-[12px]",children:[O.jsx(F0,{className:"!text-[24px] text-red-600"}),O.jsx("div",{className:"!my-0 !font-medium !text-[16px] !leading-[20px] !text-[#121212]",children:"Expenditure"})]})}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] text-[#64748B] mt-4 mb-2",children:[O.jsx("div",{children:"Opening"}),O.jsx("div",{children:"Expenditure"}),O.jsx("div",{children:"Payment"}),O.jsx("div",{children:"Outstanding"})]}),O.jsxs("div",{className:"grid grid-cols-4 !text-[12px] font-medium text-[#121212]",children:[O.jsx("div",{children:a(n.opening_balance,n?.currency_type)}),O.jsx("div",{children:a(n.expenditure,n?.currency_type)}),O.jsx("div",{children:a(n.payment,n?.currency_type)}),O.jsx("div",{children:a(n.outstanding,n?.currency_type)})]})]})})}var VY="tippy-box",oA="tippy-content",WY="tippy-backdrop",aA="tippy-arrow",sA="tippy-svg-arrow",To={passive:!0,capture:!0},lA=function(){return document.body};function UY(e,t){return{}.hasOwnProperty.call(e,t)}function Jv(e,t,n){if(Array.isArray(e)){var r=e[t];return r??(Array.isArray(n)?n[t]:n)}return e}function Qv(e,t){var n={}.toString.call(e);return n.indexOf("[object")===0&&n.indexOf(t+"]")>-1}function cA(e,t){return typeof e=="function"?e.apply(void 0,t):e}function uA(e,t){if(t===0)return e;var n;return function(r){clearTimeout(n),n=setTimeout(function(){e(r)},t)}}function HY(e,t){var n=Object.assign({},e);return t.forEach(function(r){delete n[r]}),n}function KY(e){return e.split(/\s+/).filter(Boolean)}function ja(e){return[].concat(e)}function dA(e,t){e.indexOf(t)===-1&&e.push(t)}function qY(e){return e.filter(function(t,n){return e.indexOf(t)===n})}function YY(e){return e.split("-")[0]}function Ld(e){return[].slice.call(e)}function fA(e){return Object.keys(e).reduce(function(t,n){return e[n]!==void 0&&(t[n]=e[n]),t},{})}function ml(){return document.createElement("div")}function gl(e){return["Element","Fragment"].some(function(t){return Qv(e,t)})}function GY(e){return Qv(e,"NodeList")}function XY(e){return Qv(e,"MouseEvent")}function ZY(e){return!!(e&&e._tippy&&e._tippy.reference===e)}function JY(e){return gl(e)?[e]:GY(e)?Ld(e):Array.isArray(e)?e:Ld(document.querySelectorAll(e))}function ey(e,t){e.forEach(function(n){n&&(n.style.transitionDuration=t+"ms")})}function pA(e,t){e.forEach(function(n){n&&n.setAttribute("data-state",t)})}function QY(e){var t,n=ja(e),r=n[0];return r!=null&&(t=r.ownerDocument)!=null&&t.body?r.ownerDocument:document}function eG(e,t){var n=t.clientX,r=t.clientY;return e.every(function(i){var o=i.popperRect,a=i.popperState,s=i.props,l=s.interactiveBorder,c=YY(a.placement),u=a.modifiersData.offset;if(!u)return!0;var d=c==="bottom"?u.top.y:0,f=c==="top"?u.bottom.y:0,p=c==="right"?u.left.x:0,g=c==="left"?u.right.x:0,m=o.top-r+d>l,v=r-o.bottom-f>l,y=o.left-n+p>l,E=n-o.right-g>l;return m||v||y||E})}function ty(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach(function(i){e[r](i,n)})}function hA(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=n.getRootNode==null||(r=n.getRootNode())==null?void 0:r.host}return!1}var Dr={isTouch:!1},mA=0;function tG(){Dr.isTouch||(Dr.isTouch=!0,window.performance&&document.addEventListener("mousemove",gA))}function gA(){var e=performance.now();e-mA<20&&(Dr.isTouch=!1,document.removeEventListener("mousemove",gA)),mA=e}function nG(){var e=document.activeElement;if(ZY(e)){var t=e._tippy;e.blur&&!t.state.isVisible&&e.blur()}}function rG(){document.addEventListener("touchstart",tG,To),window.addEventListener("blur",nG)}var iG=typeof window<"u"&&typeof document<"u",oG=iG?!!window.msCrypto:!1;function Na(e){var t=e==="destroy"?"n already-":" ";return[e+"() was called on a"+t+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function vA(e){var t=/[ \t]{2,}/g,n=/^[ \t]*/gm;return e.replace(t," ").replace(n,"").trim()}function aG(e){return vA(`
|
|
310
310
|
%ctippy.js
|
|
311
311
|
|
|
312
312
|
%c`+vA(e)+`
|