2 lines
35 KiB
JavaScript
2 lines
35 KiB
JavaScript
import{P as bt}from"./Page.b1f38576.js";import{g as ge,a as fe,s as W,_ as f,r as h,u as xe,e as re,av as Be,j as e,h as k,i as ve,a6 as we,aw as gt,an as ft,aj as xt,aq as vt,f as s,aa as Xe,a3 as Me,b as Qe,ai as Ae,al as et,v as tt,ae as Te,ap as Ne,ak as yt,c as St,n as wt,Z as Ct,au as It,a0 as Bt,S,T as l,ax as Tt,ay as Rt,az as he,B as Lt,D as Pt}from"./index.4524613b.js";import{a as Nt,f as je}from"./formatTime.0646b9d0.js";import{d as $t}from"./ArrowBackIos.720b1306.js";import{L as Ce}from"./Label.c0ab61c4.js";import{G as i}from"./Grid.63392dc1.js";import{C as V}from"./Card.4734268d.js";import{S as g}from"./Skeleton.a14cd0e0.js";import{T as At,t as Mt,a as Et,b as kt,c as Wt,d as Dt,e as zt}from"./TimelineSeparator.a58cb5be.js";import{T as Ft,b as Ge,c as ae,a as Ot}from"./TableRow.184bd340.js";import{T as Ht}from"./TableHead.2295a13e.js";import{a as Yt,K as Xt}from"./KeyboardArrowRight.dfbe216b.js";import"./index.49ea62c1.js";import"./jsx-runtime_commonjs-proxy.08daee49.js";import"./useId.5c752e65.js";import"./generateUtilityClasses.06032f54.js";let le;function rt(){if(le)return le;const t=document.createElement("div"),r=document.createElement("div");return r.style.width="10px",r.style.height="1px",t.appendChild(r),t.dir="rtl",t.style.fontSize="14px",t.style.width="4px",t.style.height="1px",t.style.position="absolute",t.style.top="-1000px",t.style.overflow="scroll",document.body.appendChild(t),le="reverse",t.scrollLeft>0?le="default":(t.scrollLeft=1,t.scrollLeft===0&&(le="negative")),document.body.removeChild(t),le}function Ue(t,r){const a=t.scrollLeft;if(r!=="rtl")return a;switch(rt()){case"negative":return t.scrollWidth-t.clientWidth+a;case"reverse":return t.scrollWidth-t.clientWidth-a;default:return a}}function jt(t){return fe("MuiListItem",t)}const Gt=ge("MuiListItem",["root","container","focusVisible","dense","alignItemsFlexStart","disabled","divider","gutters","padding","button","secondaryAction","selected"]),se=Gt;function Ut(t){return fe("MuiListItemSecondaryAction",t)}ge("MuiListItemSecondaryAction",["root","disableGutters"]);const _t=["className"],Vt=t=>{const{disableGutters:r,classes:a}=t;return ve({root:["root",r&&"disableGutters"]},Ut,a)},Kt=W("div",{name:"MuiListItemSecondaryAction",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.root,a.disableGutters&&r.disableGutters]}})(({ownerState:t})=>f({position:"absolute",right:16,top:"50%",transform:"translateY(-50%)"},t.disableGutters&&{right:0})),nt=h.exports.forwardRef(function(r,a){const d=xe({props:r,name:"MuiListItemSecondaryAction"}),{className:o}=d,p=re(d,_t),w=h.exports.useContext(Be),n=f({},d,{disableGutters:w.disableGutters}),y=Vt(n);return e(Kt,f({className:k(y.root,o),ownerState:n,ref:a},p))});nt.muiName="ListItemSecondaryAction";const qt=nt,Zt=["className"],Jt=["alignItems","autoFocus","button","children","className","component","components","componentsProps","ContainerComponent","ContainerProps","dense","disabled","disableGutters","disablePadding","divider","focusVisibleClassName","secondaryAction","selected","slotProps","slots"],Qt=(t,r)=>{const{ownerState:a}=t;return[r.root,a.dense&&r.dense,a.alignItems==="flex-start"&&r.alignItemsFlexStart,a.divider&&r.divider,!a.disableGutters&&r.gutters,!a.disablePadding&&r.padding,a.button&&r.button,a.hasSecondaryAction&&r.secondaryAction]},er=t=>{const{alignItems:r,button:a,classes:d,dense:o,disabled:p,disableGutters:w,disablePadding:n,divider:y,hasSecondaryAction:I,selected:M}=t;return ve({root:["root",o&&"dense",!w&&"gutters",!n&&"padding",y&&"divider",p&&"disabled",a&&"button",r==="flex-start"&&"alignItemsFlexStart",I&&"secondaryAction",M&&"selected"],container:["container"]},jt,d)},tr=W("div",{name:"MuiListItem",slot:"Root",overridesResolver:Qt})(({theme:t,ownerState:r})=>f({display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",width:"100%",boxSizing:"border-box",textAlign:"left"},!r.disablePadding&&f({paddingTop:8,paddingBottom:8},r.dense&&{paddingTop:4,paddingBottom:4},!r.disableGutters&&{paddingLeft:16,paddingRight:16},!!r.secondaryAction&&{paddingRight:48}),!!r.secondaryAction&&{[`& > .${gt.root}`]:{paddingRight:48}},{[`&.${se.focusVisible}`]:{backgroundColor:(t.vars||t).palette.action.focus},[`&.${se.selected}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:we(t.palette.primary.main,t.palette.action.selectedOpacity),[`&.${se.focusVisible}`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.focusOpacity}))`:we(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},[`&.${se.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},r.alignItems==="flex-start"&&{alignItems:"flex-start"},r.divider&&{borderBottom:`1px solid ${(t.vars||t).palette.divider}`,backgroundClip:"padding-box"},r.button&&{transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${se.selected}:hover`]:{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / calc(${t.vars.palette.action.selectedOpacity} + ${t.vars.palette.action.hoverOpacity}))`:we(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?`rgba(${t.vars.palette.primary.mainChannel} / ${t.vars.palette.action.selectedOpacity})`:we(t.palette.primary.main,t.palette.action.selectedOpacity)}}},r.hasSecondaryAction&&{paddingRight:48})),rr=W("li",{name:"MuiListItem",slot:"Container",overridesResolver:(t,r)=>r.container})({position:"relative"}),nr=h.exports.forwardRef(function(r,a){const d=xe({props:r,name:"MuiListItem"}),{alignItems:o="center",autoFocus:p=!1,button:w=!1,children:n,className:y,component:I,components:M={},componentsProps:P={},ContainerComponent:b="li",ContainerProps:{className:C}={},dense:m=!1,disabled:T=!1,disableGutters:B=!1,disablePadding:O=!1,divider:D=!1,focusVisibleClassName:ce,secondaryAction:X,selected:K=!1,slotProps:G={},slots:j={}}=d,ne=re(d.ContainerProps,Zt),U=re(d,Jt),E=h.exports.useContext(Be),q=h.exports.useMemo(()=>({dense:m||E.dense||!1,alignItems:o,disableGutters:B}),[o,E.dense,m,B]),de=h.exports.useRef(null);ft(()=>{p&&de.current&&de.current.focus()},[p]);const N=h.exports.Children.toArray(n),$=N.length&&xt(N[N.length-1],["ListItemSecondaryAction"]),H=f({},d,{alignItems:o,autoFocus:p,button:w,dense:q.dense,disabled:T,disableGutters:B,disablePadding:O,divider:D,hasSecondaryAction:$,selected:K}),Z=er(H),J=vt(de,a),_=j.root||M.Root||tr,z=G.root||P.root||{},A=f({className:k(Z.root,z.className,y),disabled:T},U);let R=I||"li";return w&&(A.component=I||"div",A.focusVisibleClassName=k(se.focusVisible,ce),R=Me),$?(R=!A.component&&!I?"div":R,b==="li"&&(R==="li"?R="div":A.component==="li"&&(A.component="div")),e(Be.Provider,{value:q,children:s(rr,f({as:b,className:k(Z.container,C),ref:J,ownerState:H},ne,{children:[e(_,f({},z,!Xe(_)&&{as:R,ownerState:f({},H,z.ownerState)},A,{children:N})),N.pop()]}))})):e(Be.Provider,{value:q,children:s(_,f({},z,{as:R,ref:J},!Xe(_)&&{ownerState:f({},H,z.ownerState)},A,{children:[N,X&&e(qt,{children:X})]}))})}),me=nr;function ir(t){return fe("MuiTab",t)}const or=ge("MuiTab",["root","labelIcon","textColorInherit","textColorPrimary","textColorSecondary","selected","disabled","fullWidth","wrapped","iconWrapper"]),te=or,ar=["className","disabled","disableFocusRipple","fullWidth","icon","iconPosition","indicator","label","onChange","onClick","onFocus","selected","selectionFollowsFocus","textColor","value","wrapped"],lr=t=>{const{classes:r,textColor:a,fullWidth:d,wrapped:o,icon:p,label:w,selected:n,disabled:y}=t,I={root:["root",p&&w&&"labelIcon",`textColor${Qe(a)}`,d&&"fullWidth",o&&"wrapped",n&&"selected",y&&"disabled"],iconWrapper:["iconWrapper"]};return ve(I,ir,r)},sr=W(Me,{name:"MuiTab",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.root,a.label&&a.icon&&r.labelIcon,r[`textColor${Qe(a.textColor)}`],a.fullWidth&&r.fullWidth,a.wrapped&&r.wrapped]}})(({theme:t,ownerState:r})=>f({},t.typography.button,{maxWidth:360,minWidth:90,position:"relative",minHeight:48,flexShrink:0,padding:"12px 16px",overflow:"hidden",whiteSpace:"normal",textAlign:"center"},r.label&&{flexDirection:r.iconPosition==="top"||r.iconPosition==="bottom"?"column":"row"},{lineHeight:1.25},r.icon&&r.label&&{minHeight:72,paddingTop:9,paddingBottom:9,[`& > .${te.iconWrapper}`]:f({},r.iconPosition==="top"&&{marginBottom:6},r.iconPosition==="bottom"&&{marginTop:6},r.iconPosition==="start"&&{marginRight:t.spacing(1)},r.iconPosition==="end"&&{marginLeft:t.spacing(1)})},r.textColor==="inherit"&&{color:"inherit",opacity:.6,[`&.${te.selected}`]:{opacity:1},[`&.${te.disabled}`]:{opacity:(t.vars||t).palette.action.disabledOpacity}},r.textColor==="primary"&&{color:(t.vars||t).palette.text.secondary,[`&.${te.selected}`]:{color:(t.vars||t).palette.primary.main},[`&.${te.disabled}`]:{color:(t.vars||t).palette.text.disabled}},r.textColor==="secondary"&&{color:(t.vars||t).palette.text.secondary,[`&.${te.selected}`]:{color:(t.vars||t).palette.secondary.main},[`&.${te.disabled}`]:{color:(t.vars||t).palette.text.disabled}},r.fullWidth&&{flexShrink:1,flexGrow:1,flexBasis:0,maxWidth:"none"},r.wrapped&&{fontSize:t.typography.pxToRem(12)})),cr=h.exports.forwardRef(function(r,a){const d=xe({props:r,name:"MuiTab"}),{className:o,disabled:p=!1,disableFocusRipple:w=!1,fullWidth:n,icon:y,iconPosition:I="top",indicator:M,label:P,onChange:b,onClick:C,onFocus:m,selected:T,selectionFollowsFocus:B,textColor:O="inherit",value:D,wrapped:ce=!1}=d,X=re(d,ar),K=f({},d,{disabled:p,disableFocusRipple:w,selected:T,icon:!!y,iconPosition:I,label:!!P,fullWidth:n,textColor:O,wrapped:ce}),G=lr(K),j=y&&P&&h.exports.isValidElement(y)?h.exports.cloneElement(y,{className:k(G.iconWrapper,y.props.className)}):y,ne=E=>{!T&&b&&b(E,D),C&&C(E)},U=E=>{B&&!T&&b&&b(E,D),m&&m(E)};return s(sr,f({focusRipple:!w,className:k(G.root,o),ref:a,role:"tab","aria-selected":T,disabled:p,onClick:ne,onFocus:U,ownerState:K,tabIndex:T?0:-1},X,{children:[I==="top"||I==="start"?s(h.exports.Fragment,{children:[j,P]}):s(h.exports.Fragment,{children:[P,j]}),M]}))}),dr=cr;function ur(t){return(1+Math.sin(Math.PI*t-Math.PI/2))/2}function pr(t,r,a,d={},o=()=>{}){const{ease:p=ur,duration:w=300}=d;let n=null;const y=r[t];let I=!1;const M=()=>{I=!0},P=b=>{if(I){o(new Error("Animation cancelled"));return}n===null&&(n=b);const C=Math.min(1,(b-n)/w);if(r[t]=p(C)*(a-y)+y,C>=1){requestAnimationFrame(()=>{o(null)});return}requestAnimationFrame(P)};return y===a?(o(new Error("Element already at target position")),M):(requestAnimationFrame(P),M)}const hr=["onChange"],mr={width:99,height:99,position:"absolute",top:-9999,overflow:"scroll"};function br(t){const{onChange:r}=t,a=re(t,hr),d=h.exports.useRef(),o=h.exports.useRef(null),p=()=>{d.current=o.current.offsetHeight-o.current.clientHeight};return h.exports.useEffect(()=>{const w=Ae(()=>{const y=d.current;p(),y!==d.current&&r(d.current)}),n=et(o.current);return n.addEventListener("resize",w),()=>{w.clear(),n.removeEventListener("resize",w)}},[r]),h.exports.useEffect(()=>{p(),r(d.current)},[r]),e("div",f({style:mr,ref:o},a))}function gr(t){return fe("MuiTabScrollButton",t)}const fr=ge("MuiTabScrollButton",["root","vertical","horizontal","disabled"]),xr=fr,vr=["className","slots","slotProps","direction","orientation","disabled"],yr=t=>{const{classes:r,orientation:a,disabled:d}=t;return ve({root:["root",a,d&&"disabled"]},gr,r)},Sr=W(Me,{name:"MuiTabScrollButton",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.root,a.orientation&&r[a.orientation]]}})(({ownerState:t})=>f({width:40,flexShrink:0,opacity:.8,[`&.${xr.disabled}`]:{opacity:0}},t.orientation==="vertical"&&{width:"100%",height:40,"& svg":{transform:`rotate(${t.isRtl?-90:90}deg)`}})),wr=h.exports.forwardRef(function(r,a){var d,o;const p=xe({props:r,name:"MuiTabScrollButton"}),{className:w,slots:n={},slotProps:y={},direction:I}=p,M=re(p,vr),b=tt().direction==="rtl",C=f({isRtl:b},p),m=yr(C),T=(d=n.StartScrollButtonIcon)!=null?d:Yt,B=(o=n.EndScrollButtonIcon)!=null?o:Xt,O=Te({elementType:T,externalSlotProps:y.startScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:C}),D=Te({elementType:B,externalSlotProps:y.endScrollButtonIcon,additionalProps:{fontSize:"small"},ownerState:C});return e(Sr,f({component:"div",className:k(m.root,w),ref:a,role:null,ownerState:C,tabIndex:null},M,{children:I==="left"?e(T,f({},O)):e(B,f({},D))}))}),Cr=wr;function Ir(t){return fe("MuiTabs",t)}const Br=ge("MuiTabs",["root","vertical","flexContainer","flexContainerVertical","centered","scroller","fixed","scrollableX","scrollableY","hideScrollbar","scrollButtons","scrollButtonsHideMobile","indicator"]),$e=Br,Tr=["aria-label","aria-labelledby","action","centered","children","className","component","allowScrollButtonsMobile","indicatorColor","onChange","orientation","ScrollButtonComponent","scrollButtons","selectionFollowsFocus","slots","slotProps","TabIndicatorProps","TabScrollButtonProps","textColor","value","variant","visibleScrollbar"],_e=(t,r)=>t===r?t.firstChild:r&&r.nextElementSibling?r.nextElementSibling:t.firstChild,Ve=(t,r)=>t===r?t.lastChild:r&&r.previousElementSibling?r.previousElementSibling:t.lastChild,Ie=(t,r,a)=>{let d=!1,o=a(t,r);for(;o;){if(o===t.firstChild){if(d)return;d=!0}const p=o.disabled||o.getAttribute("aria-disabled")==="true";if(!o.hasAttribute("tabindex")||p)o=a(t,o);else{o.focus();return}}},Rr=t=>{const{vertical:r,fixed:a,hideScrollbar:d,scrollableX:o,scrollableY:p,centered:w,scrollButtonsHideMobile:n,classes:y}=t;return ve({root:["root",r&&"vertical"],scroller:["scroller",a&&"fixed",d&&"hideScrollbar",o&&"scrollableX",p&&"scrollableY"],flexContainer:["flexContainer",r&&"flexContainerVertical",w&&"centered"],indicator:["indicator"],scrollButtons:["scrollButtons",n&&"scrollButtonsHideMobile"],scrollableX:[o&&"scrollableX"],hideScrollbar:[d&&"hideScrollbar"]},Ir,y)},Lr=W("div",{name:"MuiTabs",slot:"Root",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[{[`& .${$e.scrollButtons}`]:r.scrollButtons},{[`& .${$e.scrollButtons}`]:a.scrollButtonsHideMobile&&r.scrollButtonsHideMobile},r.root,a.vertical&&r.vertical]}})(({ownerState:t,theme:r})=>f({overflow:"hidden",minHeight:48,WebkitOverflowScrolling:"touch",display:"flex"},t.vertical&&{flexDirection:"column"},t.scrollButtonsHideMobile&&{[`& .${$e.scrollButtons}`]:{[r.breakpoints.down("sm")]:{display:"none"}}})),Pr=W("div",{name:"MuiTabs",slot:"Scroller",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.scroller,a.fixed&&r.fixed,a.hideScrollbar&&r.hideScrollbar,a.scrollableX&&r.scrollableX,a.scrollableY&&r.scrollableY]}})(({ownerState:t})=>f({position:"relative",display:"inline-block",flex:"1 1 auto",whiteSpace:"nowrap"},t.fixed&&{overflowX:"hidden",width:"100%"},t.hideScrollbar&&{scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}},t.scrollableX&&{overflowX:"auto",overflowY:"hidden"},t.scrollableY&&{overflowY:"auto",overflowX:"hidden"})),Nr=W("div",{name:"MuiTabs",slot:"FlexContainer",overridesResolver:(t,r)=>{const{ownerState:a}=t;return[r.flexContainer,a.vertical&&r.flexContainerVertical,a.centered&&r.centered]}})(({ownerState:t})=>f({display:"flex"},t.vertical&&{flexDirection:"column"},t.centered&&{justifyContent:"center"})),$r=W("span",{name:"MuiTabs",slot:"Indicator",overridesResolver:(t,r)=>r.indicator})(({ownerState:t,theme:r})=>f({position:"absolute",height:2,bottom:0,width:"100%",transition:r.transitions.create()},t.indicatorColor==="primary"&&{backgroundColor:(r.vars||r).palette.primary.main},t.indicatorColor==="secondary"&&{backgroundColor:(r.vars||r).palette.secondary.main},t.vertical&&{height:"100%",width:2,right:0})),Ar=W(br,{name:"MuiTabs",slot:"ScrollbarSize"})({overflowX:"auto",overflowY:"hidden",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),Ke={},Mr=h.exports.forwardRef(function(r,a){const d=xe({props:r,name:"MuiTabs"}),o=tt(),p=o.direction==="rtl",{"aria-label":w,"aria-labelledby":n,action:y,centered:I=!1,children:M,className:P,component:b="div",allowScrollButtonsMobile:C=!1,indicatorColor:m="primary",onChange:T,orientation:B="horizontal",ScrollButtonComponent:O=Cr,scrollButtons:D="auto",selectionFollowsFocus:ce,slots:X={},slotProps:K={},TabIndicatorProps:G={},TabScrollButtonProps:j={},textColor:ne="primary",value:U,variant:E="standard",visibleScrollbar:q=!1}=d,de=re(d,Tr),N=E==="scrollable",$=B==="vertical",H=$?"scrollTop":"scrollLeft",Z=$?"top":"left",J=$?"bottom":"right",_=$?"clientHeight":"clientWidth",z=$?"height":"width",A=f({},d,{component:b,allowScrollButtonsMobile:C,indicatorColor:m,orientation:B,vertical:$,scrollButtons:D,textColor:ne,variant:E,visibleScrollbar:q,fixed:!N,hideScrollbar:N&&!q,scrollableX:N&&!$,scrollableY:N&&$,centered:I&&!N,scrollButtonsHideMobile:!C}),R=Rr(A),it=Te({elementType:X.StartScrollButtonIcon,externalSlotProps:K.startScrollButtonIcon,ownerState:A}),ot=Te({elementType:X.EndScrollButtonIcon,externalSlotProps:K.endScrollButtonIcon,ownerState:A}),[Ee,at]=h.exports.useState(!1),[Q,ke]=h.exports.useState(Ke),[ie,lt]=h.exports.useState({start:!1,end:!1}),[We,st]=h.exports.useState({overflow:"hidden",scrollbarWidth:0}),De=new Map,Y=h.exports.useRef(null),ue=h.exports.useRef(null),ze=()=>{const c=Y.current;let u;if(c){const v=c.getBoundingClientRect();u={clientWidth:c.clientWidth,scrollLeft:c.scrollLeft,scrollTop:c.scrollTop,scrollLeftNormalized:Ue(c,o.direction),scrollWidth:c.scrollWidth,top:v.top,bottom:v.bottom,left:v.left,right:v.right}}let x;if(c&&U!==!1){const v=ue.current.children;if(v.length>0){const L=v[De.get(U)];x=L?L.getBoundingClientRect():null}}return{tabsMeta:u,tabMeta:x}},pe=Ne(()=>{const{tabsMeta:c,tabMeta:u}=ze();let x=0,v;if($)v="top",u&&c&&(x=u.top-c.top+c.scrollTop);else if(v=p?"right":"left",u&&c){const F=p?c.scrollLeftNormalized+c.clientWidth-c.scrollWidth:c.scrollLeft;x=(p?-1:1)*(u[v]-c[v]+F)}const L={[v]:x,[z]:u?u[z]:0};if(isNaN(Q[v])||isNaN(Q[z]))ke(L);else{const F=Math.abs(Q[v]-L[v]),oe=Math.abs(Q[z]-L[z]);(F>=1||oe>=1)&&ke(L)}}),Re=(c,{animation:u=!0}={})=>{u?pr(H,Y.current,c,{duration:o.transitions.duration.standard}):Y.current[H]=c},Fe=c=>{let u=Y.current[H];$?u+=c:(u+=c*(p?-1:1),u*=p&&rt()==="reverse"?-1:1),Re(u)},Oe=()=>{const c=Y.current[_];let u=0;const x=Array.from(ue.current.children);for(let v=0;v<x.length;v+=1){const L=x[v];if(u+L[_]>c){v===0&&(u=c);break}u+=L[_]}return u},ct=()=>{Fe(-1*Oe())},dt=()=>{Fe(Oe())},ut=h.exports.useCallback(c=>{st({overflow:null,scrollbarWidth:c})},[]),pt=()=>{const c={};c.scrollbarSizeListener=N?e(Ar,{onChange:ut,className:k(R.scrollableX,R.hideScrollbar)}):null;const u=ie.start||ie.end,x=N&&(D==="auto"&&u||D===!0);return c.scrollButtonStart=x?e(O,f({slots:{StartScrollButtonIcon:X.StartScrollButtonIcon},slotProps:{startScrollButtonIcon:it},orientation:B,direction:p?"right":"left",onClick:ct,disabled:!ie.start},j,{className:k(R.scrollButtons,j.className)})):null,c.scrollButtonEnd=x?e(O,f({slots:{EndScrollButtonIcon:X.EndScrollButtonIcon},slotProps:{endScrollButtonIcon:ot},orientation:B,direction:p?"left":"right",onClick:dt,disabled:!ie.end},j,{className:k(R.scrollButtons,j.className)})):null,c},He=Ne(c=>{const{tabsMeta:u,tabMeta:x}=ze();if(!(!x||!u)){if(x[Z]<u[Z]){const v=u[H]+(x[Z]-u[Z]);Re(v,{animation:c})}else if(x[J]>u[J]){const v=u[H]+(x[J]-u[J]);Re(v,{animation:c})}}}),ee=Ne(()=>{if(N&&D!==!1){const{scrollTop:c,scrollHeight:u,clientHeight:x,scrollWidth:v,clientWidth:L}=Y.current;let F,oe;if($)F=c>1,oe=c<u-x-1;else{const Se=Ue(Y.current,o.direction);F=p?Se<v-L-1:Se>1,oe=p?Se>1:Se<v-L-1}(F!==ie.start||oe!==ie.end)&<({start:F,end:oe})}});h.exports.useEffect(()=>{const c=Ae(()=>{Y.current&&(pe(),ee())}),u=et(Y.current);u.addEventListener("resize",c);let x;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(c),Array.from(ue.current.children).forEach(v=>{x.observe(v)})),()=>{c.clear(),u.removeEventListener("resize",c),x&&x.disconnect()}},[pe,ee]);const Le=h.exports.useMemo(()=>Ae(()=>{ee()}),[ee]);h.exports.useEffect(()=>()=>{Le.clear()},[Le]),h.exports.useEffect(()=>{at(!0)},[]),h.exports.useEffect(()=>{pe(),ee()}),h.exports.useEffect(()=>{He(Ke!==Q)},[He,Q]),h.exports.useImperativeHandle(y,()=>({updateIndicator:pe,updateScrollButtons:ee}),[pe,ee]);const Ye=e($r,f({},G,{className:k(R.indicator,G.className),ownerState:A,style:f({},Q,G.style)}));let ye=0;const ht=h.exports.Children.map(M,c=>{if(!h.exports.isValidElement(c))return null;const u=c.props.value===void 0?ye:c.props.value;De.set(u,ye);const x=u===U;return ye+=1,h.exports.cloneElement(c,f({fullWidth:E==="fullWidth",indicator:x&&!Ee&&Ye,selected:x,selectionFollowsFocus:ce,onChange:T,textColor:ne,value:u},ye===1&&U===!1&&!c.props.tabIndex?{tabIndex:0}:{}))}),mt=c=>{const u=ue.current,x=yt(u).activeElement;if(x.getAttribute("role")!=="tab")return;let L=B==="horizontal"?"ArrowLeft":"ArrowUp",F=B==="horizontal"?"ArrowRight":"ArrowDown";switch(B==="horizontal"&&p&&(L="ArrowRight",F="ArrowLeft"),c.key){case L:c.preventDefault(),Ie(u,x,Ve);break;case F:c.preventDefault(),Ie(u,x,_e);break;case"Home":c.preventDefault(),Ie(u,null,_e);break;case"End":c.preventDefault(),Ie(u,null,Ve);break}},Pe=pt();return s(Lr,f({className:k(R.root,P),ownerState:A,ref:a,as:b},de,{children:[Pe.scrollButtonStart,Pe.scrollbarSizeListener,s(Pr,{className:R.scroller,ownerState:A,style:{overflow:We.overflow,[$?`margin${p?"Left":"Right"}`:"marginBottom"]:q?void 0:-We.scrollbarWidth},ref:Y,onScroll:Le,children:[e(Nr,{"aria-label":w,"aria-labelledby":n,"aria-orientation":B==="vertical"?"vertical":null,className:R.flexContainer,ownerState:A,onKeyDown:mt,ref:ue,role:"tablist",children:ht}),Ee&&Ye]}),Pe.scrollButtonEnd]}))}),Er=Mr,be=St(e("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"}),"Circle");function qe(t){const{children:r,value:a,index:d,...o}=t;return e("div",{role:"tabpanel",hidden:a!==d,id:`simple-tabpanel-${d}`,"aria-labelledby":`simple-tab-${d}`,...o,children:a===d&&r})}function Ze(t){return{id:`simple-tab-${t}`,"aria-controls":`simple-tabpanel-${t}`}}const kr=W(t=>e(Er,{...t}))({"& .MuiTabs-indicator":{display:"flex",justifyContent:"center",backgroundColor:"19BBBB"},"& .MuiTabs-indicatorSpan":{maxWidth:40,width:"100%",backgroundColor:"#635ee7"}}),Je=W(t=>e(dr,{disableRipple:!0,...t}))(({theme:t})=>({fontWeight:600,fontSize:"14px",color:t.palette.grey[600],maxWidth:"15%",flex:1,margin:"0 !important","&.Mui-selected":{color:t.palette.grey[900]},"&:hover":{color:t.palette.grey[900],opacity:1}}));function Jr(){const t=wt(),r=new AbortController,[a,d]=h.exports.useState(0),[o,p]=h.exports.useState(!1),w=(b,C)=>{d(C)},[n,y]=h.exports.useState(null),{corporateValue:I}=h.exports.useContext(Ct),{memberId:M,requestLogId:P}=It();return h.exports.useEffect(()=>((async()=>{try{p(!0);const b=await Bt.get(`${I}/service-monitoring/${P}`,{signal:r.signal});y(b.data.data),b.data.data.serviceCode!=="IP"&&d(1)}catch(b){console.error("Error fetching data:",b.message)}finally{p(!1)}})(),()=>{r.abort()}),[I]),e(bt,{title:"Service Monitoring",children:s(i,{container:!0,spacing:3,paddingX:2,sx:{marginBottom:5,marginTop:1},children:[e(i,{item:!0,xs:12,paddingX:"24px",children:s(S,{direction:"row",alignItems:"center",gap:3,marginLeft:1.5,children:[e($t,{onClick:()=>t(`/alarm-center/member/${M}}`),sx:{cursor:"pointer"}}),e(l,{variant:"h5",sx:{flexGrow:1},children:"Service Monitoring"})]})}),e(i,{item:!0,xs:12,children:e(V,{sx:{borderRadius:2,padding:3},children:s(i,{container:!0,spacing:5,children:[e(i,{item:!0,xs:12,children:e(l,{component:"h6",fontWeight:700,fontSize:18,children:o?e(g,{animation:"wave",width:175}):"Employee Profile"})}),s(i,{item:!0,xs:12,container:!0,spacing:3,children:[s(i,{item:!0,container:!0,xs:12,md:6,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Company Name"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.companyName?n.companyName:"-"})})]}),s(i,{item:!0,container:!0,xs:12,md:6,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Member ID"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.memberId?n.memberId:"-"})})]}),s(i,{item:!0,container:!0,xs:12,md:6,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Full Name"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.fullName?n.fullName:"-"})})]}),s(i,{item:!0,container:!0,xs:12,md:6,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Date of Birth"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.dateOfBirth?Nt(n.dateOfBirth):"-"})})]}),s(i,{item:!0,container:!0,xs:12,md:6,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Phone Number"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.phoneNumber?n.phoneNumber:"-"})})]}),s(i,{item:!0,container:!0,xs:12,md:6,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Email"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.email?n.email:"-"})})]})]})]})})}),s(i,{item:!0,container:!0,xs:12,spacing:5,children:[e(i,{item:!0,container:!0,xs:12,md:6,children:e(V,{sx:{borderRadius:2,padding:3},children:s(i,{container:!0,spacing:5,children:[e(i,{item:!0,xs:12,children:e(l,{component:"h6",fontWeight:700,fontSize:18,children:o?e(g,{animation:"wave",width:175}):"Diagnose Summary"})}),s(i,{item:!0,xs:12,container:!0,spacing:3,children:[s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Symptoms"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.symptoms?n.symptoms:"-"})})]}),s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Sign"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.sign?n.sign:"-"})})]}),s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Main Diagnose"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.mainDiagnose?n.mainDiagnose:"-"})})]}),s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Comparative Diagnosis"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.comparativeDiagnosis?n.comparativeDiagnosis:"-"})})]})]})]})})}),e(i,{item:!0,container:!0,xs:12,md:6,children:e(V,{sx:{borderRadius:2,padding:3},children:s(i,{container:!0,spacing:5,children:[e(i,{item:!0,xs:12,children:e(l,{component:"h6",fontWeight:700,fontSize:18,children:o?e(g,{animation:"wave",width:175}):"Services"})}),s(i,{item:!0,xs:12,container:!0,spacing:3,children:[s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Service Name"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.serviceName?n.serviceName:"-"})})]}),s(i,{item:!0,container:!0,spacing:1.5,children:[e(i,{item:!0,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Benefits"})}),e(i,{item:!0,container:!0,children:e(i,{item:!0,children:o?e(g,{animation:"wave",width:300}):n&&n.benefits&&n.benefits.length>0?n.benefits.map((b,C)=>s(Tt,{subheader:e(Rt,{children:e(l,{variant:"subtitle2",color:"grey.700",children:C+1+". "+b.name})}),children:[e(me,{sx:{paddingLeft:4},children:e(he,{children:s(l,{variant:"subtitle2",color:"grey.900",component:"div",display:"flex",alignItems:"center",gap:1,children:[e(be,{sx:{width:8}}),"Amount Incurred : ",b.amountApproved]})})}),e(me,{sx:{paddingLeft:4},children:e(he,{children:s(l,{variant:"subtitle2",color:"grey.900",component:"div",display:"flex",alignItems:"center",gap:1,children:[e(be,{sx:{width:8}}),"Amount Approved : ",b.amountApproved]})})}),e(me,{sx:{paddingLeft:4},children:e(he,{children:s(l,{variant:"subtitle2",color:"grey.900",component:"div",display:"flex",alignItems:"center",gap:1,children:[e(be,{sx:{width:8}}),"Amount Not Approved : ",b.amountNotAprroved]})})}),e(me,{sx:{paddingLeft:4},children:e(he,{children:s(l,{variant:"subtitle2",color:"grey.900",component:"div",display:"flex",alignItems:"center",gap:1,children:[e(be,{sx:{width:8}}),"Excess Paid : ",b.excessPaid]})})}),e(me,{sx:{paddingLeft:4},children:e(he,{children:s(l,{variant:"subtitle2",color:"grey.900",component:"div",display:"flex",alignItems:"center",gap:1,children:[e(be,{sx:{width:8}}),"Description : ",b.description]})})})]},C)):e(l,{variant:"subtitle1",color:"grey.800",children:"-"})})})]}),s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Hospital"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.hospital?n.hospital:"-"})})]}),s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Admission Date"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.admissionDate?je(n.admissionDate):"-"})})]}),s(i,{item:!0,container:!0,xs:12,spacing:1.5,children:[e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle2",color:"grey.600",children:o?e(g,{animation:"wave",width:200}):"Discharge Date"})}),e(i,{item:!0,xs:12,children:e(l,{variant:"subtitle1",color:"grey.800",children:o?e(g,{animation:"wave",width:300}):n&&n.dischargeDate?je(n.dischargeDate):"-"})})]})]})]})})})]}),e(i,{item:!0,xs:12,lg:12,md:12,children:o?e(V,{sx:{borderRadius:"16px",padding:"24px"},children:s(i,{container:!0,children:[e(i,{item:!0,xs:2,children:e(g,{animation:"wave",sx:{width:"calc(100% - 24px)"}})}),e(i,{item:!0,xs:2,children:e(g,{animation:"wave",sx:{width:"calc(100% - 24px)"}})}),e(i,{item:!0,xs:12,paddingTop:2,children:e(g,{animation:"wave",sx:{width:"calc(100% - 24px)"}})})]})}):s(V,{sx:{borderRadius:"16px",padding:"24px"},children:[e(Lt,{sx:{borderBottom:1,borderColor:"divider"},children:s(kr,{value:a,onChange:w,"aria-label":"basic tabs example",children:[e(Je,{label:"Daily Monitoring",...Ze(0)}),e(Je,{label:"Laboratorium Result",...Ze(1)})]})}),e(qe,{value:a,index:0,children:e(i,{item:!0,xs:12,md:12,padding:n&&n.dailyMonitorings?0:3,children:n&&n.dailyMonitorings?e(At,{sx:{gap:2,paddingY:2,paddingX:1.5,[`& .${Mt.root}:before`]:{flex:0,padding:0}},children:n&&n.dailyMonitorings&&Object.keys(n.dailyMonitorings).length>0&&Object.keys(n.dailyMonitorings).map((b,C)=>s(Et,{children:[s(kt,{children:[e(Wt,{}),e(Dt,{})]}),s(zt,{sx:{"&.MuiTimelineContent-root":{paddingX:2}},children:[e(l,{variant:"subtitle1",marginBottom:2,children:b||"-"}),n.dailyMonitorings[b].map((m,T)=>s(V,{sx:{padding:3,marginBottom:T!==n.dailyMonitorings[b].length-1?2:0},children:[s(S,{direction:"row",sx:{alignItems:"center",justifyContent:"space-between"},children:[e(Ce,{children:m.time?m.time:"-"}),e(Ce,{color:"success",sx:{marginRight:0},children:m.status?m.status:"-"})]}),e(Pt,{sx:{marginY:2}}),s(S,{spacing:3,sx:{paddingY:1,paddingX:3},children:[e(i,{item:!0,xs:12,lg:12,md:12,children:s(S,{spacing:1,children:[e(l,{variant:"h6",children:"Subject"}),e(l,{variant:"inherit",children:m.subject?m.subject:"-"})]})}),s(i,{item:!0,xs:12,lg:12,md:12,children:[e(S,{spacing:1,children:e(l,{variant:"h6",sx:{paddingBottom:2},children:"Objektif"})}),s(S,{direction:"row",sx:{paddingY:1},spacing:2,children:[e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"inherit",children:"Body Temperature"})})}),e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"subtitle1",children:m.bodyTemperature?m.bodyTemperature:"-"})})})]}),s(S,{direction:"row",sx:{paddingY:1},spacing:2,children:[e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"inherit",children:"Sistole"})})}),e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"subtitle1",children:m.sistole?m.sistole:"-"})})})]}),s(S,{direction:"row",sx:{paddingY:1},spacing:2,children:[e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"inherit",children:"Diastole"})})}),e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"subtitle1",children:m.diastole?m.diastole:"-"})})})]}),s(S,{direction:"row",sx:{paddingY:1},spacing:2,children:[e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"inherit",children:"Respiration Rate"})})}),e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"subtitle1",children:m.respirationRate?m.respirationRate:"-"})})})]}),s(S,{direction:"row",sx:{paddingY:1},spacing:2,children:[e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"inherit",children:"Complaints"})})}),e(i,{item:!0,xs:6,lg:6,md:6,children:e(S,{children:e(l,{variant:"subtitle1",children:m.complaints?m.complaints:"-"})})})]}),e(S,{spacing:1,children:e(l,{variant:"h6",sx:{paddingTop:2},children:"Analysis"})}),e(S,{direction:"row",sx:{paddingY:2},spacing:2,children:e(i,{item:!0,xs:12,lg:12,md:12,children:e(S,{children:e(l,{variant:"inherit",children:m.analysis?m.analysis:"-"})})})}),e(S,{spacing:1,children:e(l,{variant:"h6",sx:{paddingTop:2},children:"Perencanaan"})}),e(S,{direction:"row",spacing:2,children:e(i,{item:!0,xs:12,lg:12,md:12,children:e(S,{marginLeft:5,children:n.dailyMonitorings?e("ul",{style:{listStyleType:"disc"},children:m.plans.length>0&&m.plans.map((B,O)=>e("li",{children:B.plan},O))}):"-"})})})]})]})]},T))]})]},C))}):e(l,{variant:"subtitle1",textAlign:"center",children:"No Data Found"})})}),e(qe,{value:a,index:1,children:e(i,{item:!0,xs:12,padding:n&&n.laboratoriumResults?0:3,children:n&&n.laboratoriumResults&&Object.keys(n.laboratoriumResults).length>0?Object.keys(n.dailyMonitorings).map((b,C)=>e(V,{sx:{padding:3,border:"1px solid #919EAB52",boxShadow:"none",marginTop:5},children:s(S,{children:[e(l,{variant:"subtitle1",children:b||"-"}),n.laboratoriumResults[b].map((m,T)=>s(V,{sx:{marginTop:3,paddingX:2.5,paddingY:2},children:[e(Ce,{children:m.code?m.code:"-"}),s(Ft,{sx:{marginY:2},children:[e(Ht,{children:s(Ge,{children:[e(ae,{children:"Date"}),e(ae,{children:"Examination"}),e(ae,{children:"Location"})]})}),e(Ot,{children:s(Ge,{children:[e(ae,{children:e(Ce,{children:m.date?m.date:"-"})}),e(ae,{children:m.examination?m.examination:"-"}),e(ae,{children:m.location?m.location:"-"})]})})]})]},T))]})},C)):e(l,{variant:"subtitle1",children:"Data Not Found"})})})]})})]})})}export{Jr as default};
|