PageSourceSearch

https://erp.npu.ac.th/hr/_next/static/chunks/app/(protected)/layout-b1886cf84e455618.js

js npu.ac.th collected 2026-10-02 12:14:03 UTC 55,853 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6648],{4538:function(e,r,t){Promise.resolve().then(t.bind(t,42979))},28466:function(e,r,t){"use strict";var i=t(57437);t(2265),r.Z=()=>(0,i.jsx)("div",{className:"app-loader",children:(0,i.jsx)("div",{className:"loader-spin",children:(0,i.jsxs)("span",{className:"crema-dot crema-dot-spin",children:[(0,i.jsx)("i",{}),(0,i.jsx)("i",{}),(0,i.jsx)("i",{}),(0,i.jsx)("i",{}),(0,i.jsx)("i",{})]})})})},38236:function(e,r,t){"use strict";var i=t(57437);t(2265);var a=t(16210),s=t(87271);t(15577);let o=(0,a.ZP)(s.Z)(()=>({height:"100%",width:"100%"}));r.Z=e=>{let{children:r,...t}=e;return(0,i.jsx)(o,{...t,children:r})}},46901:function(e,r,t){"use strict";t.d(r,{Z:function(){return x}});var i=t(57437);t(2265);var a=t(61994),s=t(73977),o=t(2069),n=t(60971),l=t(76010),d=t(67576),c=t(16210),h=t(53588);let p=e=>{let{iconPosition:r,children:t}=e;return(0,i.jsx)(o.Z,{sx:[e=>({borderRadius:e=>(null==e?void 0:e.cardRadius)/4,display:"block",cursor:"pointer"}),"right"===r?{"& .searchRoot .MuiInputBase-input":{paddingLeft:5}}:{"& .searchRoot .MuiInputBase-input":{paddingLeft:"calc(1em + 28px)"}},"right"===r?{"& .searchRoot .MuiInputBase-input":{paddingRight:"calc(1em + 28px)"}}:{"& .searchRoot .MuiInputBase-input":{paddingRight:5}}],children:t})},m=(0,c.ZP)(h.ZP)(e=>{let{theme:r}=e;return{fontWeight:d.F3.MEDIUM,["& .".concat(n.Z.root)]:{color:"inherit",width:"100%"},["& .".concat(n.Z.input)]:{border:"0 none",backgroundColor:(0,l.$n)(r.palette.background.default,.25),color:r.palette.text.primary,borderRadius:30,padding:r.spacing(2,2,2,0),paddingLeft:"calc(1em + ".concat(r.spacing(6),")"),transition:r.transitions.create("width"),width:200,height:40,boxSizing:"border-box",[r.breakpoints.down("md")]:{width:110},"&:focus":{backgroundColor:(0,l.$n)(r.palette.background.default,.25),width:240,[r.breakpoints.down("md")]:{width:162}},"&:hover":{backgroundColor:(0,l.$n)(r.palette.background.default,.2)}}}}),u=(0,c.ZP)("div")(e=>{let{theme:r}=e;return{position:"relative",marginLeft:0,"& .searchIconBox":{position:"relative","& $inputInput":{width:220,borderRadius:50,paddingLeft:27,"&:focus":{width:235,borderRadius:50,paddingLeft:"calc(1em + ".concat(4,")")}}},"&.hs-disableFocus":{"& .MuiInputBase-root":{width:"100%"},"& .MuiInputBase-input":{width:"100%","&:focus":{width:"100%"}}},variants:[{props:{align:"right"},style:{marginLeft:"auto"}}]}}),g=(0,c.ZP)("div")(e=>{let{theme:r}=e;return{height:"100%",position:"absolute",top:0,left:12,zIndex:1,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center","&.right":{left:"auto",right:12,"& + $inputRoot $inputInput":{paddingLeft:r.spacing(5),paddingRight:"calc(1em + ".concat(r.spacing(7),")")}}}});var x=e=>{let{placeholder:r,iconPosition:t="left",align:o="left",overlap:n=!0,onlyIcon:l=!1,disableFocus:d,iconStyle:c={color:"grey"},sx:h,...x}=e;return(0,i.jsx)(p,{sx:h,iconPosition:t,children:(0,i.jsxs)(u,{align:o,className:(0,a.Z)("searchRoot",{"hs-search":n},{"hs-disableFocus":d},{searchIconBox:l}),children:[(0,i.jsx)(g,{className:(0,a.Z)({right:"right"===t}),sx:c,children:(0,i.jsx)(s.Z,{})}),(0,i.jsx)(m,{...x,placeholder:r||"Search…",inputProps:{"aria-label":"search"}})]})})}},67576:function(e,r,t){"use strict";var i,a,s,o,n,l,d,c,h,p,m,u,g,x,b,f,y,v,j,I,Z,A,w,C,S,R,k,F;t.d(r,{Dt:function(){return d},F3:function(){return m},Nt:function(){return a},gA:function(){return n},gp:function(){return p},hY:function(){return s},jy:function(){return i},ms:function(){return o},n0:function(){return h},ui:function(){return l},vM:function(){return c}}),(b=i||(i={})).MODERN="modern",b.STANDARD="standard",(f=a||(a={}))[f.MODERN=30]="MODERN",f[f.STANDARD=16]="STANDARD",(y=s||(s={})).LIGHT="light",y.DARK="dark",(v=o||(o={})).FULL_WIDTH="full-width",v.BOXED="boxed",v.FRAMED="framed",(j=n||(n={})).DEFAULT="default",j.STANDARD="standard",j.ROUNDED="rounded",j.ROUNDED_REVERSE="rounded-reverse",j.CURVED_MENU="curved-menu",(I=l||(l={})).RTL="rtl",I.LTR="ltr",(Z=d||(d={})).DEFAULT="default",Z.BIT_BUCKET="bit_bucket",Z.STANDARD="standard",Z.DRAWER="drawer",Z.MINI="mini",Z.MINI_SIDEBAR_TOGGLE="mini-sidebar-toggle",Z.HEADER_USER="user-header",Z.HEADER_USER_MINI="user-mini-header",Z.H_DEFAULT="h-default",Z.HOR_HEADER_FIXED="hor-header-fixed",Z.HOR_DARK_LAYOUT="hor-dark-layout",(A=c||(c={})).FIXED="fixed",A.FLUID="fluid",(w=h||(h={})).FLUID="fluid",w.FIXED="fixed",(C=p||(p={})).NONE="none",C.SLIDE_LEFT="slideLeft",C.SLIDE_RIGHT="slideRight",C.SLIDE_UP="slideUp",C.SLIDE_DOWN="slideDown",(S=m||(m={})).LIGHT="300",S.REGULAR="400",S.MEDIUM="500",S.SEMI_BOLD="600",S.BOLD="700",S.PRIMARY="",(R=u||(u={})).FIREBASE="firebase",R.AWS_COGNITO="aws_cognito",R.AUTH0="auth0",R.JWT_AUTH="jwt_auth",(k=g||(g={}))[k.MEDIA=1]="MEDIA",k[k.TEXT=2]="TEXT",(F=x||(x={})).Admin="admin",F.User="user"},80857:function(e,r,t){"use strict";t.d(r,{hJ:function(){return o},uH:function(){return l}});var i=t(45008),a=t(67576);function s(){let e=(0,i._)(["\n  to {\n    background-position: 200% center;\n  }\n"]);return s=function(){return e},e}(0,t(3146).F4)(s());let o={goldBgShiny:{background:"linear-gradient(to right, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%)",backgroundSize:"200% auto",color:"#5C4033"},goldTextShiny:{background:"linear-gradient(to right, #BF953F 0%, #FCF6BA 25%, #B38728 50%, #FBF5B7 75%, #AA771C 100%)",backgroundSize:"200% auto",backgroundClip:"text",textFillColor:"transparent",WebkitBackgroun
1dClip:"text",WebkitTextFillColor:"transparent",fontWeight:"bold"}},n=a.Nt.STANDARD,l={theme:{spacing:4,cardRadius:n,direction:a.ui.LTR,palette:{mode:a.hY.LIGHT,background:{paper:"#FFFFFF",default:"#FEFCE8"},primary:{main:"#0A8FDC",contrastText:"#fff"},secondary:{main:"#F04F47"},success:{main:"#11C15B",light:"#D9F5E5"},warning:{main:"#FF5252",light:"#FFECDC"},text:{primary:"#4b3930",secondary:"#4b3930",disabled:"#A16207"},gray:{50:"#fafafa",100:"#F5F6FA",200:"#edf2f7",300:"#E0E0E0",400:"#c5c6cb",500:"#A8A8A8",600:"#666666",700:"#4a5568",800:"#201e21",900:"#1a202c",A100:"#d5d5d5",A200:"#aaaaaa",A400:"#303030",A700:"#616161"}},status:{danger:"orange"},divider:"#E6D5B8",typography:{fontFamily:"IBM Plex Sans Thai,Be Vietnam,sans-serif",fontSize:15,fontWeight:400,color:"#4b3930",h1:{fontSize:22,fontWeight:600,color:"#4b3930"},h2:{fontSize:20,fontWeight:500,color:"#4b3930"},h3:{fontSize:18,fontWeight:500,color:"#4b3930"},h4:{fontSize:16,fontWeight:500,color:"#4b3930"},h5:{fontSize:14,fontWeight:500,color:"#4b3930"},h6:{fontSize:12,fontWeight:500,color:"#4b3930"},subtitle1:{fontSize:14,color:"#4b3930"},subtitle2:{fontSize:16,color:"#4b3930"},body1:{fontSize:14,color:"#4b3930"},body2:{fontSize:12,color:"#4b3930"}},components:{MuiInputBase:{styleOverrides:{input:{"&.Mui-disabled":{color:"#A08C75",WebkitTextFillColor:"#A08C75"}}}},MuiInputLabel:{styleOverrides:{root:{"&.Mui-disabled":{color:"#A08C75",WebkitTextFillColor:"#A08C75"}}}},MuiToggleButton:{styleOverrides:{root:{borderRadius:n}}},MuiCardLg:{styleOverrides:{root:{borderRadius:n===a.Nt.STANDARD?a.Nt.STANDARD:a.Nt.MODERN+20}}},MuiCard:{styleOverrides:{root:{borderRadius:n,boxShadow:"0 4px 12px rgba(92, 64, 51, 0.08)",border:"1px solid #E6D5B8","& .MuiCardContent-root:last-of-type":{paddingBottom:16}}}},MuiButton:{styleOverrides:{root:{borderRadius:n/2,textTransform:"capitalize"}}},MuiOutlinedInput:{styleOverrides:{root:{borderRadius:n/2},notchedOutline:{"&.Mui-disabled":{borderColor:"#E6D5B8"}}}},MuiSelect:{styleOverrides:{root:{borderRadius:n/2}}},MuiIconButton:{styleOverrides:{root:{padding:9}}},MuiLink:{styleOverrides:{root:{fontWeight:a.F3.REGULAR}}},MuiTableCell:{styleOverrides:{root:{borderBottom:"1px solid #E6D5B8",color:"#4b3930",fontSize:14},head:{backgroundColor:"#FEF08A",fontWeight:600,borderBottom:"2px solid #5C4033 !important"}}},MuiTableRow:{styleOverrides:{root:{"&:nth-of-type(odd)":{backgroundColor:"#FFFFF8"},"&:hover":{backgroundColor:"#FDE047"}}}}}}};a.hY.DARK;let d={sidebarBgColor:"#fff",sidebarTextColor:"#4b3930",sidebarHeaderColor:"#fff",sidebarMenuSelectedBgColor:"#FEF08A",sidebarMenuSelectedTextColor:"rgba(0, 0, 0, 0.87)",mode:a.hY.DARK},c={sidebar:{borderColor:"#E6D5B8",menuStyle:a.gA.DEFAULT,isSidebarBgImage:!1,sidebarBgImage:1,colorSet:d},themeStyle:a.jy.STANDARD,themeMode:a.hY.LIGHT,navStyle:a.Dt.MINI,layoutType:a.ms.FULL_WIDTH,footerType:a.vM.FLUID,headerType:a.n0.FIXED,rtAnim:a.gp.NONE,footer:!1,locale:{languageId:"english",locale:"en",name:"English",icon:"us"},rtlLocale:["ar"]};r.ZP=c},27248:function(e,r,t){"use strict";t.d(r,{au:function(){return d},l5:function(){return l}});var i=t(57437),a=t(2265),s=t(80857);let o=(0,a.createContext)({footer:s.ZP.footer,navStyle:s.ZP.navStyle,layoutType:s.ZP.layoutType,footerType:s.ZP.footerType,headerType:s.ZP.headerType}),n=(0,a.createContext)({updateLayoutType:()=>{},updateNavStyle:()=>{},setFooterType:()=>{},setFooter:()=>{},setHeaderType:()=>{}}),l=()=>(0,a.useContext)(o),d=()=>(0,a.useContext)(n);r.ZP=e=>{let{children:r}=e,[t,l]=(0,a.useState)(s.ZP.layoutType),[d,c]=(0,a.useState)(s.ZP.navStyle),h=(0,a.useCallback)(e=>{c(e)},[]),[p,m]=(0,a.useState)(s.ZP.footerType),[u,g]=(0,a.useState)(s.ZP.footer),[x,b]=(0,a.useState)(s.ZP.headerType);return(0,i.jsx)(o.Provider,{value:{navStyle:d,footerType:p,footer:u,layoutType:t,headerType:x},children:(0,i.jsx)(n.Provider,{value:{setFooter:g,setFooterType:m,updateNavStyle:h,updateLayoutType:l,setHeaderType:b},children:r})})}},22925:function(e,r,t){"use strict";t.d(r,{Lf:function(){return d},Sz:function(){return l}});var i=t(57437),a=t(2265),s=t(80857);let o=(0,a.createContext)({...s.ZP.sidebar.colorSet,isSidebarBgImage:s.ZP.sidebar.isSidebarBgImage,sidebarBgImage:s.ZP.sidebar.sidebarBgImage,borderColor:s.ZP.sidebar.borderColor}),n=(0,a.createContext)({updateMenuStyle:()=>{}
1,updateSidebarColorSet:()=>{},setSidebarBgImage:()=>{},updateSidebarBgImage:()=>{}}),l=()=>(0,a.useContext)(o),d=()=>(0,a.useContext)(n);r.ZP=e=>{let{children:r}=e,[t,l]=(0,a.useState)(s.ZP.sidebar.menuStyle),[d,c]=(0,a.useState)(s.ZP.sidebar.colorSet),[h,p]=(0,a.useState)(s.ZP.sidebar.isSidebarBgImage),[m,u]=(0,a.useState)(s.ZP.sidebar.sidebarBgImage),g=(0,a.useCallback)(e=>{p(e)},[]),x=(0,a.useCallback)(e=>{u(e)},[]);return(0,i.jsx)(o.Provider,{value:{...d,menuStyle:t,isSidebarBgImage:h,sidebarBgImage:m,borderColor:s.ZP.sidebar.borderColor},children:(0,i.jsx)(n.Provider,{value:{updateMenuStyle:l,updateSidebarColorSet:c,setSidebarBgImage:g,updateSidebarBgImage:x},children:r})})}},21669:function(e,r,t){"use strict";t.d(r,{TC:function(){return d},zM:function(){return c}});var i=t(57437),a=t(2265),s=t(80857),o=t(67576);let n=(0,a.createContext)({theme:s.uH.theme,themeMode:s.ZP.themeMode,themeStyle:s.ZP.themeStyle}),l=(0,a.createContext)({updateTheme:()=>{},updateThemeMode:()=>{},updateThemeStyle:()=>{}}),d=()=>(0,a.useContext)(n),c=()=>(0,a.useContext)(l);r.ZP=e=>{let{children:r}=e,[t,d]=(0,a.useState)(s.uH.theme),[c,h]=(0,a.useState)(s.ZP.themeMode),[p,m]=(0,a.useState)(s.ZP.themeStyle),u=(0,a.useCallback)(e=>{d(e)},[]);return(0,a.useEffect)(()=>{t.direction===o.ui.RTL?document.body.setAttribute("dir",o.ui.RTL):document.body.setAttribute("dir",o.ui.LTR)},[t]),(0,i.jsx)(n.Provider,{value:{theme:t,themeStyle:p,themeMode:c},children:(0,i.jsx)(l.Provider,{value:{updateTheme:u,updateThemeStyle:m,updateThemeMode:h},children:r})})}},71220:function(e,r,t){"use strict";var i=t(57437);t(2265);var a=t(90933),s=t(64227);r.Z=(0,s.ZP)(e=>(0,i.jsx)(a.Z,{...e}),{forwardRef:!1})},42979:function(e,r,t){"use strict";t.r(r),t.d(r,{default:function(){return e0}});var i=t(57437),a=t(2265),s=t(80605),o=t(99376),n=t(61767),l=t(28466),d=t(67576),c=t(61994),h=t(38236),p=t(2069),m=t(76010),u=t(22925),g=e=>{let{children:r}=e,{sidebarBgColor:t,sidebarTextColor:a,mode:s,isSidebarBgImage:o,sidebarBgImage:n}=(0,u.Sz)();return(0,i.jsx)(p.Z,{sx:[{position:"relative",height:"100%",width:"100%",overflow:"hidden",backgroundColor:t,color:a,"&:before":{content:'""',position:"absolute",left:0,top:0,zIndex:1,width:"100%",height:"100%"},"& > *":{position:"relative",zIndex:3}},o?{backgroundImage:"url(/assets/images/sidebar/images/".concat(n,".png)")}:{backgroundImage:""},o?{backgroundRepeat:"no-repeat"}:{backgroundRepeat:""},o?{backgroundPosition:"center center"}:{backgroundPosition:""},o?{backgroundSize:"cover"}:{backgroundSize:""},o?{"&:before":{display:"block"}}:{"&:before":{display:"none"}},s===d.hY.LIGHT?{"&:before":{backgroundColor:e=>(0,m.Fq)(e.palette.common.white,.5)}}:{"&:before":{backgroundColor:e=>(0,m.Fq)(e.palette.common.black,.5)}}],children:r})},x=e=>{let{children:r,...t}=e;return(0,i.jsx)(p.Z,{sx:e=>({paddingLeft:0,paddingTop:0,paddingBottom:0,position:{xs:"relative",lg:"fixed"},borderRight:"1px solid ".concat(e.palette.divider),top:0,left:0,zIndex:1101,width:280,maxHeight:"100vh",height:"100%",transition:"all 0.4s ease"}),...t,children:r})},b=e=>{let{children:r}=e;return(0,i.jsx)(x,{className:"app-sidebar",children:(0,i.jsx)(g,{children:r})})},f=t(3254),y=t(15273),v=t(23919),j=t(67051),I=t(59832),Z=t(17162),A=a.memo(e=>{let{count:r,color:t="secondary.main"}=e;return"primary"===t?t="primary.main":"v"===t&&(t="secondary.main"),(0,i.jsx)(p.Z,{sx:e=>({bgcolor:t,padding:"0px 7px",fontSize:11,fontWeight:d.F3.SEMI_BOLD,height:20,minWidth:20,borderRadius:20,display:"flex",alignItems:"center",color:e.palette.secondary.contrastText}),children:r})}),w=t(71220),C=t(27644),S=e=>{let{children:r,item:t,className:a,level:s,...n}=e,{sidebarTextColor:l,sidebarMenuSelectedBgColor:h,sidebarMenuSelectedTextColor:p,menuStyle:g}=(0,u.Sz)(),x=(0,o.usePathname)();return(0,i.jsx)(C.ZP,{className:(0,c.Z)("menu-vertical-item",{"rounded-menu":g===d.gA.ROUNDED,"rounded-menu-reverse":g===d.gA.ROUNDED_REVERSE,"standard-menu":g===d.gA.STANDARD,"curved-menu":g===d.gA.CURVED_MENU,active:t.url&&(x===t.url||x.startsWith("".concat(t.url,"/")))},a),sx:e=>({my:.25,cursor:"pointer",textDecoration:"none !important",mx:2,width:"calc(100% - 16px)",pl:20*s+10+"px",pr:4,borderRadius:1,position:"relative",transition:"all 0.3s ease",overflowWrap:"break-word",whiteSpace:"normal","& .nav-item-icon":{color:(0,m.Fq)(l,.7),fontSize:20,display:"block"},"& .nav-item-text":{color:(0,m.Fq)(l,.7),fontWeight:d.F3.MEDIUM,fontSize:"15px !important",lineHeight:"1.2 !important"},"&:hover, &:focus":{backgroundColor:"#f8f8c2",transition:"all 0.3s ease","& .nav-item-text, & .nav-item-icon, & .nav-item-icon-arrow":{color:"#4b3930",fontWeight:600}},"&.active, &.active-parent":{backgroundColor:h,pointerEvents:"none",borderLeft:"6px solid #5C4033",paddingLeft:20*s-6+"px","& .nav-item-text":{color:p+"!important",fontWeight:600},"& .nav-item-icon, & .nav-item-icon-arrow":{color:p+"!important"}},"&.standard-menu":{mx:0,width:"100%",borderRadius:0,"&.active:after, &.active-parent:after":{backgroundColor:"#5C4033"}}}),...n,children:r})},R=t(27648),k=a.memo(e=>{let{level:r,item:t}=e,{user:s}=(0,n.f)(),l=(0,o.usePathname)();return(0,a.useEffect)(()=>{l===t.url&&document.getElementById(l)&&setTimeout(()=>{document.getElementById(l)&&document.getElementById(l).scrollIntoView({behavior:"smooth",block:"center"})}
1,1)},[l,t]),(0,i.jsx)(R.default,{href:t.url,style:{textDecoration:"none"},id:t.url,className:(0,c.Z)({active:l===t.url||l==="".concat(t.url,"/")||l.startsWith("".concat(t.url,"/"))}),children:(0,i.jsxs)(S,{item:t,level:r,exact:t.exact,children:[t.icon&&(0,i.jsx)(p.Z,{component:"span",children:(0,i.jsx)(v.Z,{sx:{fontSize:16,display:"block",mr:4},className:(0,c.Z)("nav-item-icon","material-icons-outlined"),color:"action",children:t.icon})}),(0,i.jsx)(j.Z,{className:"nav-item-content",primary:(0,i.jsx)(w.Z,{id:t.messageId}),classes:{primary:"nav-item-text"}}),t.count&&(0,i.jsx)(p.Z,{sx:{mr:3.5},className:"menu-badge",children:(0,i.jsx)(A,{count:t.count,color:t.color})})]})})}),F=t(21669),E=e=>{let{children:r,sidebarTextColor:t,sidebarMenuSelectedBgColor:a,sidebarMenuSelectedTextColor:s,...o}=e;return(0,i.jsx)(C.ZP,{sx:{height:40,my:.25,pl:"10px",pr:0,mx:2,width:"calc(100% - 16px)",borderRadius:1,whiteSpace:"nowrap",transition:"all 0.3s ease","& .nav-item-text":{fontWeight:d.F3.MEDIUM,color:(0,m.Fq)(t,.7)},"& .nav-item-icon":{color:(0,m.Fq)(t,.7),fontSize:20,display:"block"},"& .nav-item-icon-arrow":{color:(0,m.Fq)(t,.7)},"& .MuiIconButton-root":{mr:3,padding:0},"& .MuiTouchRipple-root":{zIndex:10},"&:hover, &:focus":{backgroundColor:"#f8f8c2","& .nav-item-text":{color:"#4b3930",fontWeight:600},"& .nav-item-icon, & .nav-item-icon-arrow":{color:"#4b3930"}},"&.open":{"& .nav-item-text":{fontWeight:600,color:t},"& .nav-item-icon, & .nav-item-icon-arrow":{color:t}},"&.active-parent":{backgroundColor:a,borderLeft:"6px solid #5C4033",pl:"4px","& .nav-item-text":{color:(null!=s?s:t)+"!important",fontWeight:600},"& .nav-item-icon, & .nav-item-icon-arrow":{color:(null!=s?s:t)+"!important"},"&:hover, &:focus":{backgroundColor:a}}},...o,children:r})};let M=(e,r)=>!!(e&&D(r,e)),D=(e,r)=>{if(!e.children)return!1;for(let t=0;t<e.children.length;t++)if(e.children[t].children&&D(e.children[t],r)||e.children[t].url===r||r.includes(e.children[t].url||""))return!0;return!1},T=e=>{let{item:r,level:t,activeId:s,setActiveId:l}=e,{theme:d}=(0,F.TC)(),{sidebarTextColor:h,sidebarMenuSelectedBgColor:m,sidebarMenuSelectedTextColor:g}=(0,u.Sz)(),x=(0,o.usePathname)(),b=void 0!==l,[f,y]=(0,a.useState)(()=>M(x,r)),A=b?s===r.id:f,[C,S]=(0,a.useState)(null);(0,a.useEffect)(()=>{M(x,r)&&(b?l(r.id):y(!0))},[x,r,b]);let{user:R}=(0,n.f)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(E,{level:t,sidebarTextColor:h,sidebarMenuSelectedBgColor:m,sidebarMenuSelectedTextColor:g,component:"div",className:(0,c.Z)("menu-vertical-collapse",A&&"open",M(x,r)&&"active-parent"),onClick:()=>{b?l(A?null:r.id):y(e=>!e)},children:[r.icon&&(0,i.jsx)(p.Z,{component:"span",children:(0,i.jsx)(v.Z,{sx:{mr:4},color:"action",className:(0,c.Z)("nav-item-icon"),children:r.icon})}),(0,i.jsx)(j.Z,{sx:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:14},className:"nav-item-content",classes:{primary:(0,c.Z)("nav-item-text")},primary:(0,i.jsx)(w.Z,{id:r.messageId})}),(0,i.jsx)(I.Z,{className:"nav-item-icon-arrow-btn",sx:{p:0,mr:.75},disableRipple:!0,size:"large",children:(0,i.jsx)(v.Z,{className:"nav-item-icon-arrow",color:"inherit",children:A?"expand_more":"ltr"===d.direction?"chevron_right":"chevron_left"})})]}),r.children&&(0,i.jsx)(Z.Z,{in:A,className:"collapse-children",children:r.children.map(e=>(0,i.jsxs)(a.Fragment,{children:["collapse"===e.type&&(0,i.jsx)(T,{item:e,level:t+1,activeId:C,setActiveId:S}),"item"===e.type&&(0,i.jsx)(k,{item:e,level:t+1})]},e.id))})]})};var N=a.memo(T),B=e=>{let{children:r,sidebarTextColor:t,level:a,...s}=e;return(0,i.jsx)(C.ZP,{sx:{height:50,my:.25,pl:10+33*a+"px",pr:3,background:"gold",color:(0,m.Fq)(t,.7),fontWeight:d.F3.SEMI_BOLD,fontSize:16,cursor:"pointer",textDecoration:"none!important",whiteSpace:"nowrap",transition:"all 0.4s ease","&.nav-item-header":{cursor:"auto",transition:"all 0.4s ease"}},...s,children:r})};let L=e=>{let{item:r,level:t}=e,{sidebarTextColor:s}=(0,u.Sz)(),{user:o}=(0,n.f)(),[l,d]=(0,a.useState)(null);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(B,{level:t,sidebarTextColor:s,component:"div",className:(0,
1c.Z)("nav-item nav-item-header"),children:(0,i.jsx)(w.Z,{id:r.messageId})}),r.children&&(0,i.jsx)(i.Fragment,{children:r.children.map(e=>(0,i.jsxs)(a.Fragment,{children:["group"===e.type&&(0,i.jsx)(L,{item:e,level:t}),"collapse"===e.type&&(0,i.jsx)(N,{item:e,level:t,activeId:l,setActiveId:d}),"item"===e.type&&(0,i.jsx)(k,{item:e,level:t})]},e.id))})]})};var P=e=>{let{routesConfig:r}=e,[t,s]=(0,a.useState)(null);return(0,i.jsx)(y.Z,{sx:{position:"relative",padding:0},component:"div",children:r.map(e=>(0,i.jsxs)(a.Fragment,{children:["group"===e.type&&(0,i.jsx)(L,{item:e,level:0}),"collapse"===e.type&&(0,i.jsx)(N,{item:e,level:0,activeId:t,setActiveId:s}),"item"===e.type&&(0,i.jsx)(k,{item:e,level:0})]},e.id))})},z=e=>{let{children:r,...t}=e;return(0,i.jsx)(p.Z,{sx:{width:280,display:"flex",flexDirection:"column",transition:"all 0.5s ease",position:{xs:"relative",lg:"fixed"},top:0,left:0,zIndex:1101,"& .app-sidebar":{position:"relative",top:"auto",left:"auto",width:"100%"}},...t,children:r})},_=t(67116),O=t(8058),W=t(42187),H=t(94551),U=t(38770),q=e=>{let{color:r="text.secondary"}=e,{logout:t}=(0,n.a)(),{user:c}=(0,n.f)(),h=(0,o.useRouter)(),[m,u]=a.useState(null),g=()=>{u(null)};return c&&c.email?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(p.Z,{onClick:e=>{u(e.currentTarget)},sx:{py:3,px:3,display:"flex",alignItems:"center",cursor:"pointer"},className:"user-info-view",children:[(0,i.jsx)(p.Z,{sx:{py:.5},children:(0,i.jsx)(_.Z,{sx:{height:40,width:40,fontSize:24,backgroundColor:U.Z[500]},children:(null==c?void 0:c.name)?c.name.charAt(0).toUpperCase():(null==c?void 0:c.email)?c.email.charAt(0).toUpperCase():void 0})}),(0,i.jsxs)(p.Z,{sx:{width:{xs:"calc(100% - 62px)",xl:"calc(100% - 72px)"},ml:4,color:r},className:"user-info",children:[(0,i.jsxs)(p.Z,{sx:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,i.jsx)(p.Z,{sx:{mb:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",fontSize:16,fontWeight:d.F3.MEDIUM,color:"inherit"},component:"span",children:c.name?c.name:""}),(0,i.jsx)(p.Z,{sx:{ml:3,color:"inherit",display:"flex"},children:(0,i.jsx)(H.Z,{})})]}),(0,i.jsx)(p.Z,{sx:{mt:-.5,textOverflow:"ellipsis",whiteSpace:"nowrap",color:"inherit"},children:c.email?c.email:""})]})]}),(0,i.jsxs)(O.Z,{id:"simple-menu",anchorEl:m,keepMounted:!0,open:!!m,onClose:g,anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},children:[(0,i.jsx)(W.Z,{onClick:()=>{g(),h.push("/account/my-profile")},children:"My account"}),(0,i.jsx)(W.Z,{onClick:()=>{g(),(0,s.signOut)()},children:"Logout"})]})]}):(0,i.jsx)(l.Z,{})},G=t(27248),J=e=>{let{variant:r="",position:t="left",toggleNavCollapsed:a,isNavCollapsed:s,routesConfig:o}=e,{sidebarTextColor:n}=(0,u.Sz)(),{footer:l,footerType:d}=(0,G.l5)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(f.ZP,{anchor:t,open:s,onClose:()=>a(),classes:{root:(0,c.Z)(r),paper:(0,c.Z)(r)},sx:{position:"absolute",display:{lg:"none",xs:"block"}},children:(0,i.jsx)(z,{className:"mini-sidebar",children:(0,i.jsxs)(b,{children:[(0,i.jsx)(q,{color:n}),(0,i.jsx)(h.Z,{sx:{py:2,height:"calc(100vh - 70px) !important"},children:(0,i.jsx)(P,{routesConfig:o})})]})})}),(0,i.jsx)(p.Z,{sx:{display:{xs:"none",lg:"block"}},children:(0,i.jsx)(z,{className:"mini-sidebar",children:(0,i.jsxs)(b,{children:[(0,i.jsx)(q,{color:n}),(0,i.jsx)(h.Z,{className:(0,c.Z)({"has-footer-fixed":l&&"fixed"===d}),sx:{py:2,height:"calc(100vh - 70px) !important","&.has-footer-fixed":{height:"calc(100vh - 117px) !important"}},children:(0,i.jsx)(P,{routesConfig:o})})]})})})]})},Y=e=>{let{children:r}=e;return(0,i.jsx)(a.Suspense,{fallback:(0,i.jsx)(l.Z,{}),children:r})},X=t(99448),V=t(46387),Q=e=>{let{children:r,...t}=e;return(0,i.jsx)(p.Z,{sx:e=>({backgroundColor:e.palette.background.paper,backgroundImage:"linear-gradient(".concat((0,m.Fq)(e.palette.common.white,.05),", ").concat((0,m.Fq)(e.palette.common.white,.05),")"),color:e.palette.text.primary,"& .footerContainer":{alignItems:"center",flexDirection:"row",display:"flex",padding:{xs:"5px 20px",md:"5px 32px",xl:"10px 32px"}}}),...t,children:r})},K=()=>{let{footer:e,footerType:r,navStyle:t}=(0,G.l5)();return(0,i.jsx)(i.Fragment,{children:e&&"fluid"===r&&"h-default"!==t&&"hor-light-nav"!==t&&"hor-dark-layout"!==t?(0,i.jsx)(Q,{className:"footer",children:(0,i.jsxs)("div",{className:"footerContainer",children:[(0,i.jsx)(V.Z,{children:"Copy right @crema 2021"}),(0,i.jsx)(p.Z,{sx:{ml:"auto"},children:(0,i.jsx)(X.Z,{sx:{px:5},color:"primary",children:"Buy Now"})})]})}):null})},$={src:"/hr/_next/static/media/something-wrong.54caa4b7.png",height:2e3,width:2e3,blurDataURL:"data:image/png;
1base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAbFBMVEVMaXG52ev39fPw8PCHmaQ2O0utz+NrmczL2uT09fX69/bu7++4vL9kf4gVlOLj8/u7xsttgYwQdrMJi9ng6/Hi3+ZIdI52ma24ztyquMS+1OGtucMfZpq62/HC3u6Ivd38/f3s+v////9sqdBk3VZMAAAAIXRSTlMA/k0j/if8C/73dJv7HCRB8opsgPxIdNn8/uaZrE6uWq54DIkaAAAACXBIWXMAAAsTAAALEwEAmpwYAAAARUlEQVR4nBXGWRaAEABA0UeEaJ7naP977HS/LpgKXQL0XdvUf6Y5H0YNZhPLuh+G01r7KnVzxVyokB6kiy4kJyErvC8yPmt0AyQBOpUbAAAAAElFTkSuQmCC",blurWidth:8,blurHeight:8},ee=t(33145),er=()=>(0,i.jsx)(ee.default,{alt:"something-wrong",src:"".concat($)});class et extends a.Component{static getDerivedStateFromError(e){return{hasError:!0}}render(){return this.state.hasError?(0,i.jsxs)(p.Z,{sx:e=>({display:"flex",alignItems:"center",flexDirection:"column",justifyContent:"center",flex:1,textAlign:"center","& svg":{width:"100%",maxWidth:400,color:e.palette.primary.main}}),children:[(0,i.jsx)(er,{}),(0,i.jsx)(V.Z,{variant:"h2",component:"h2",style:{fontSize:30,marginTop:16},children:"Ah! Something went wrong."}),(0,i.jsx)(V.Z,{style:{fontSize:18,marginTop:12},children:"Brace yourself till we get the error fixed."}),(0,i.jsx)(V.Z,{style:{fontSize:18},children:"You may also refresh the page or try again latter"})]}):this.props.children}constructor(e){super(e),this.state={hasError:!1}}}var ei=e=>{let{children:r,...t}=e;return(0,i.jsx)(p.Z,{sx:{display:"flex",flexDirection:"column",flex:1,mx:{xl:"auto"},width:{xl:"100%"}},...t,children:r})},ea=e=>{let{children:r,sxStyle:t}=e;return(0,i.jsxs)(ei,{children:[(0,i.jsx)(p.Z,{sx:{display:"flex",flex:1,flexDirection:"column",p:{xs:2,md:3,xl:4},...t},className:"app-content",children:(0,i.jsx)(Y,{children:(0,i.jsx)(et,{children:r})})}),(0,i.jsx)(K,{})]})},es=t(71495),eo=t(71004),en=t(46901),el=t(71200),ed=t(397),ec=t(71969),eh=t(10637);let ep=(0,t(16210).ZP)(e=>{let{className:r,...t}=e;return(0,i.jsx)(ec.Z,{...t,classes:{popper:r}})})(e=>{let{theme:r}=e;return{["& .".concat(eh.Z.arrow)]:{color:(0,m.$n)(r.palette.background.default,.25),"&:before":{boxShadow:r.shadows[1]}},["& .".concat(eh.Z.tooltip)]:{backgroundColor:(0,m.$n)(r.palette.background.default,.25),color:r.palette.text.primary,boxShadow:r.shadows[1],fontSize:11}}});var em=e=>{let{title:r,placement:t="top",children:a}=e;return(0,i.jsx)(ep,{title:r,TransitionComponent:ed.Z,placement:t,arrow:!0,children:a})},eu=t(20305),eg=t(6228),ex=e=>{let{item:r}=e;return(0,i.jsxs)(C.ZP,{sx:{padding:"8px 20px"},className:"item-hover",children:[(0,i.jsx)(eg.Z,{sx:{minWidth:0,mr:4},children:(0,i.jsx)(_.Z,{sx:{width:48,height:48},src:r.image})}),(0,i.jsxs)(p.Z,{sx:e=>({fontSize:14,color:e.palette.text.secondary}),children:[(0,i.jsx)(V.Z,{component:"h4",variant:"h4",sx:e=>({fontSize:14,fontWeight:d.F3.MEDIUM,mb:.5,color:e.palette.text.primary}),children:r.name}),(0,i.jsx)(V.Z,{children:r.message})]})]})},eb=t(68476),ef=[{id:"1000",name:"Aysha Julka",image:"/hr/assets/images/avatar/A1.jpg",message:"commented on your wall picture."},{id:"1001",name:"Ayra Rovishi",image:"/hr/assets/images/avatar/A2.jpg",message:"added to their stories."},{id:"1002",name:"Sapna Awasthi",image:"/hr/assets/images/avatar/A3.jpg",message:"commented on your wall picture."},{id:"1003",name:"Sami Rudri",image:"/hr/assets/images/avatar/A4.jpg",message:"tagged you in a picture."},{id:"1004",name:"Brian Lara",image:"/hr/assets/images/avatar/A5.jpg",message:"marked himself safe during earth quake."},{id:"1005",name:"Rickey Ponting",image:"/hr/assets/images/avatar/A6.jpg",message:"commented on your wall picture."},{id:"1007",name:"Smriti Mandhana",image:"/hr/assets/images/avatar/A8.jpg",message:"changed her wall picture."},{id:"1008",name:"Aysha Julka",image:"/hr/assets/images/avatar/A9.jpg",message:"changed her wall picture."},{id:"1009",name:"Aysha Julka",image:"/hr/assets/images/avatar/A1.jpg",message:"commented on your wall picture."},{id:"1010",name:"Ayra Rovishi",image:"/hr/assets/images/avatar/A2.jpg",message:"added to their stories."},{id:"1012",name:"Sapna Awasthi",image:"/hr/assets/images/avatar/A3.jpg",message:"commented on your wall picture."},{id:"1013",name:"Sami Rudri",image:"/hr/assets/images/avatar/A4.jpg",message:"tagged you in a picture."},{id:"1014",name:"Brian Lara",image:"/hr/assets/images/avatar/A5.jpg",message:"marked himself safe during earth quake."},{id:"1015",name:"Rickey Ponting",image:"/hr/assets/images/avatar/A6.jpg",message:"commented on your wall picture."},{id:"1017",name:"Smriti Mandhana",image:"/hr/assets/images/avatar/A8.jpg",message:"changed her wall picture."},{id:"1018",name:"Aysha Julka",image:"/hr/assets/images/avatar/A9.jpg",message:"changed her wall picture."}],ey=[{id:201,image:"/hr/assets/images/avatar/A19.jpg",message:"Hey man! Whatsapp?",name:"Angelina Joew"},{id:202,image:"/hr/assets/images/avatar/A15.jpg",message:"I am fine, what about you?",name:"John Matthew"},{id:203,image:"/hr/assets/images/avatar/A21.jpg",message:"Call me when you are free!",name:"George Bailey"},{id:204,image:"/hr/assets/images/avatar/A25.jpg",message:"Send your contact details!",name:"Maria Lee"},{id:205,image:"/hr/assets/images/avatar/A19.jpg",message:"Hey man! Whatsapp?",name:"Angelina Joew"},{id:206,image:"/hr/assets/images/avatar/A15.jpg",message:"I am fine, what about you?",name:"John Matthew"},{id:207,image:"/hr/assets/images/avatar/A21.jpg",message:"Call me when you are free!",name:"George Bailey"},{id:208,image:"/hr/assets/images/avatar/A25.jpg",message:"Send your contact details!",name:"Maria Lee"},{id:209,image:"/hr/assets/images/avatar/A19.jpg",message:"Hey man! Whatsapp?",name:"Angelina Joew"},{id:210,image:"/hr/assets/images/avatar/A15.jpg",message:"I am fine, what about you?",name:"John Matthew"},{id:211,image:"/hr/assets/images/avatar/A21.jpg",message:"Call me when you are free!",name:"George Bailey"},{id:212,image:"/hr/assets/images/avatar/A25.jpg",message:"Send your contact details!",name:"Maria Lee"}],ev=t(40938),ej=t(14540),eI=t(4977),eZ=t(98428),eA=t(63253),ew=t(49089),e
1C=t(11140),eS=t(18913);eA.Fm0,ev.Z[400],ew.q1E,ej.Z[400],eC.Q9V,eI.Z[500],eS.XAC,eZ.Z[300];var eR=e=>{let{onClose:r,sxStyle:t}=e;return(0,i.jsxs)(p.Z,{sx:{display:"flex",flexDirection:"column",width:280,height:"100%",...t},children:[(0,i.jsxs)(p.Z,{sx:e=>({padding:"5px 20px",display:"flex",alignItems:"center",borderBottom:1,borderBottomColor:e.palette.divider,minHeight:{xs:56,sm:70}}),children:[(0,i.jsxs)(V.Z,{component:"h3",children:[(0,i.jsx)(w.Z,{id:"dashboard.messages"}),"(",ey.length,")"]}),(0,i.jsx)(I.Z,{sx:{height:40,width:40,ml:"auto",color:"text.secondary"},onClick:r,size:"large",children:(0,i.jsx)(eb.Z,{})})]}),(0,i.jsx)(h.Z,{sx:{height:{xs:"calc(100% - 96px)",sm:"calc(100% - 110px)"}},children:(0,i.jsx)(y.Z,{sx:{py:0},children:ey.map(e=>(0,i.jsx)(ex,{item:e},e.id))})}),(0,i.jsx)(X.Z,{sx:{borderRadius:0,width:"100%",textTransform:"capitalize",marginTop:"auto",height:40},variant:"contained",color:"primary",children:(0,i.jsx)(w.Z,{id:"common.viewAll"})})]})},ek=e=>{let{drawerPosition:r="right",tooltipPosition:t="bottom",isMenu:s=!1,sxMessageContentStyle:o={}}=e,[n,l]=(0,a.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[s?(0,i.jsx)(p.Z,{component:"span",onClick:()=>l(!0),children:"Message"}):(0,i.jsx)(em,{title:"Message",placement:t,children:(0,i.jsx)(I.Z,{className:"icon-btn",sx:e=>({borderRadius:"50%",width:40,height:40,color:e.palette.text.secondary,backgroundColor:e.palette.background.default,border:1,borderColor:"transparent","&:hover, &:focus":{color:e.palette.text.primary,backgroundColor:(0,m.Fq)(e.palette.background.default,.9),borderColor:(0,m.Fq)(e.palette.text.secondary,.25)}}),onClick:()=>l(!0),size:"large",children:(0,i.jsx)(eu.Z,{className:"icon"})})}),(0,i.jsx)(f.ZP,{anchor:r,open:n,onClose:()=>l(!1),children:(0,i.jsx)(eR,{sxStyle:o,onClose:()=>l(!1)})})]})},eF=e=>{let{item:r}=e;return(0,i.jsxs)(C.ZP,{sx:{padding:"8px 20px"},className:"item-hover",children:[(0,i.jsx)(eg.Z,{sx:{minWidth:0,mr:4},children:(0,i.jsx)(_.Z,{sx:{width:48,height:48},alt:"Remy Sharp",src:r.image})}),(0,i.jsx)(p.Z,{sx:e=>({fontSize:14,color:e.palette.text.secondary}),children:(0,i.jsxs)(V.Z,{children:[(0,i.jsx)(p.Z,{component:"span",sx:e=>({fontSize:14,fontWeight:d.F3.MEDIUM,mb:.5,color:e.palette.text.primary,mr:1,display:"inline-block"}),children:r.name}),r.message]})})]})},eE=e=>{let{onClose:r,sxStyle:t}=e;return(0,i.jsxs)(p.Z,{sx:{display:"flex",flexDirection:"column",width:280,height:"100%",...t},children:[(0,i.jsxs)(p.Z,{sx:e=>({padding:"5px 20px",display:"flex",alignItems:"center",borderBottom:1,borderBottomColor:e.palette.divider,minHeight:{xs:56,sm:70}}),children:[(0,i.jsxs)(V.Z,{component:"h3",children:[(0,i.jsx)(w.Z,{id:"common.notifications"}),"(",ef.length,")"]}),(0,i.jsx)(I.Z,{sx:{height:40,width:40,marginLeft:"auto",color:"text.secondary"},onClick:r,size:"large",children:(0,i.jsx)(eb.Z,{})})]}),(0,i.jsx)(h.Z,{sx:{height:{xs:"calc(100% - 96px)",sm:"calc(100% - 110px)"}},children:(0,i.jsx)(y.Z,{sx:{py:0},children:ef.map(e=>(0,i.jsx)(eF,{item:e},e.id))})}),(0,i.jsx)(X.Z,{sx:{borderRadius:0,width:"100%",textTransform:"capitalize",marginTop:"auto",height:40},variant:"contained",color:"primary",children:(0,i.jsx)(w.Z,{id:"common.viewAll"})})]})},eM=t(33585),eD=e=>{let{drawerPosition:r="right",tooltipPosition:t="bottom",isMenu:s=!1,sxNotificationContentStyle:o={}}=e,[n,l]=(0,a.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[s?(0,i.jsx)(p.Z,{component:"span",onClick:()=>l(!0),children:"Message"}):(0,i.jsx)(em,{title:"Notification",placement:t,children:(0,i.jsx)(I.Z,{className:"icon-btn",sx:e=>({borderRadius:"50%",width:40,height:40,color:e.palette.text.secondary,backgroundColor:e.palette.background.default,border:1,borderColor:"transparent","&:hover, &:focus":{color:e.palette.text.primary,backgroundColor:(0,m.Fq)(e.palette.background.default,.9),borderColor:(0,m.Fq)(e.palette.text.secondary,.25)}}),onClick:()=>l(!0),size:"large",children:(0,i.jsx)(eM.Z,{})})}),(0,i.jsx)(f.ZP,{anchor:r,open:n,onClose:()=>l(!1),children:(0,i.jsx)(eE,{sxStyle:o,onClose:()=>l(!1)})})]})},eT=t(19391),eN=e=>{let{src:r,alt:t,...a}=e;return(0,i.jsx)("picture",{children:(0,i.jsx)(ee.default,{src:"".concat(r),alt:t,...a})})},eB=e=>{let{hasSidebarColor:r}=e,{mode:t}=(0,u.Sz)();return(0,i.jsx)(p.Z,{sx:{height:{xs:56,sm:40},padding:2.5,display:"flex",flexDirection:"row",cursor:"pointer",alignItems:"center",justifyContent:"center","& img":{width:"60%",height:"40%",objectFit:"contain"}},className:"app-logo",children:(0,i.jsx)(eN,{src:"/hr/assets/ERP_LOGO/9.png",alt:"crema-logo",width:146,height:30})})},eL=t(13714),eP=e=>{let{toggleNavCollapsed:r}=e,[t,s]=a.useState(null);return(0,i.jsx)(es.Z,{position:"relative",color:"inherit",sx:e=>({boxShadow:"none",borderBottom:"1px solid ".concat(e.palette.divider),backgroundColor:"background.paper",transition:"width 0.5s ease",width:"100%"}),className:"app-bar",children:(0,i.jsxs)(eo.Z,{sx:{boxSizing:"border-box",minHeight:{xs:56,sm:70},paddingLeft:{xs:5},paddingRight:{xs:5,md:7.5,xl:12.5}},children:[(0,i.jsx)(I.Z,{sx:{color:"text.secondary",display:{xs:"none",lg:"block"}},edge:"start",className:"menu-btn",color:"inherit","aria-label":"open drawer",onClick:()=>r(),size:"large",children:(0,i.jsx)(el.Z,{sx:{width:35,height:35}})}),(0,i.jsx)(I.Z,{sx:{color:"text.secondary",display:{lg:"none",xs:"block"}},edge:"start",className:"menu-btn",color:"inherit","aria-label":"open drawer",onClick:()=>r(),size:"large",children:(0,i.jsx)(el.Z,{sx:{width:35,height:35}})}),(0,i.jsx)(p.Z,{sx:{"& .logo-text":{display:{xs:"none",sm:"block"}}},children:(0,i.jsx)(eB,{})}),(0,i.jsx)(p.Z,{sx:{minHeight:40,position:"relative","& .searchRoot":{position:{xs:"absolute",sm:"relative"},right:{xs:0,sm:"auto"},top:{xs:0,sm:"auto"}}},children:(0,i.jsx)(en.Z,{iconPosition:"right",placeholder:"Search…"})}),(0,i.jsx)(p.Z,{sx:{flexGrow:1,display:"flex",alignItems:"center",ml:3},children:(0,i.jsx)(X.Z,{component:R.default,href:"/position-standard",variant:"contained",size:"small",startIcon:(0,i.jsx)(eL.Z,{}),sx:{display:{xs:"none",md:"inline-flex"},backgroundColor:"#A16207",color:"#fff",fontWeight:700,whiteSpace:"nowrap",boxShadow:"0 2px 8px rgba(161, 98, 7, 0.4)","&:hover":{backgroundColor:"#7C4A05",boxShadow:"0 3px 10px rgba(161, 98, 7, 0.5)"}},children:"มาตรฐานกำหนดตำแหน่ง"})}),(0,i.jsxs)(p.Z,{sx:{ml:4},children:[(0,i.jsxs)(p.Z,{sx:{position:"relative",display:{xs:"none",sm:"flex"},alignItems:"center",marginLeft:-2,marginRight:-2},children:[(0,i.jsx)(p.Z,{sx:{px:1.85}}),(0,i.jsx)(p.Z,{sx:{px:1.85}})]}),(0,i.jsx)(p.Z,{sx:{position:"relative",display:{sm:"none",xs:"flex"},alignItems:"center",marginLeft:-2,marginRight:-2},children:(0,i.jsx)(p.Z,{sx:{px:1.85},children:(0,i.jsx)(em,{title:"More",children:(0,i.jsx)(I.Z,{sx:e=>({borderRadius:"50%",width:40,height:40,color:e.palette.text.secondary,backgroundColor:e.palette.background.default,border:1,borderColor:"transparent","&:hover, &:focus":{color:e.palette.text.primary,backgroundColor:(0,m.Fq)(e.palette.background.default,.9),borderColor:(0,m.Fq)(e.palette.text.secondary,.25)}}),onClick:e=>{s(e.currentTarget)},size:"large",children:(0,i.jsx)(eT.Z,{})})})})}),(0,i.jsxs)(O.Z,{id:"simple-menu",anchorEl:t,keepMounted:!0,open:!!t,onClose:()=>{s(null)},children:[(0,i.jsx)(W.Z,{children:(0,i.jsx)(eD,{isMenu:!0})}),(0,i.jsx)(W.Z,{children:(0,i.jsx)(ek,{isMenu:!0})}),(0,i.jsx)(W.Z,{children:"Setting"})]})]})]})})},ez=e=>{let{children:r,...t}=e;return(0,i.jsx)(p.Z,{sx:e=>({flex:1,display:"flex",flexDirection:"row",position:"relative",backgroundColor:e.palette.background.default,"& .mainContent":{display:"flex",flexDirection:"column",position:"relative",width:{xs:"100%",lg:"calc(100% - 280px)"},transition:"all 0.5s ease",ml:{lg:"280px"}},"&.mini-sidebar-collapsed":{"& .mainContent":{width:{lg:"calc(100% - 64px)"},ml:{lg:"64px"}},"& .mini-sidebar:not(:hover)":{width:{lg:64},"& .user-info, & .nav-item-header, & .nav-item-content, & .menu-badge, & .collapse-children, & .nav-item-icon-arrow-btn":{display:"none"},"& .nav-item-icon":{mr:0,ml:.5}},"&.appMainFixedHeader .app-bar":{width:{lg:"calc(100% - 64px)"}},"& .menu-vertical-item":{pl:3,"&.rounded-menu":{mx:2,pl:3,borderRadius:1},"&.rounded-menu-reverse":{mx:2,pl:3,borderRadius:1},"&.standard-menu":{mx:2,width:"calc(100% - 16px)",pl:3,borderRadius:1,"&.active:after":{backgroundColor:"transparent"}},"&.curved-menu":{mx:2,borderRadius:1,"&:before, &:after":{display:"none"}}},"& .menu-vertical-collapse":{pl:3,mx:2,width:"calc(100% - 16px)"}},"&.appMainFixedFooter":{pb:{xs:12,xl:14.5}},"&.appMainFixedHeader":{pt:{xs:14,sm:17.5},"& .app-bar":{position:"fixed",top:0,right:0,zIndex:9,width:{xs:"100%",lg:"calc(100% - 280px)"}}}}),...t,children:r})},e_=e=>{let{children:r,...t}=e;return(0,i.jsx)(p.Z,{sx:e=>({position:"fixed",left:0,bottom:0,width:"100%",zIndex:1102,boxShadow:"none",border:"1px solid #e8e5dd",backgroundColor:e.palette.background.paper,backgroundImage:"linear-gradient(".concat((0,m.Fq)(e.palette.common.white,.05),", ").concat((0,m.Fq)(e.palette.common.white,.05),")"),color:e.palette.text.primary,margin:"0","& .footerContainer":{alignItems:"center",flexDirection:"row",display:"flex",padding:{xs:"5px 20px",md:"5px 32px",xl:"10px 32px"}}}),...t,children:r})},eO=()=>{let{footer:e,footerType:r}=(0,G.l5)();return(0,i.jsx)(i.Fragment,{children:e&&"fixed"===r?(0,i.jsx)(e_,{className:"footer fixed-footer",children:(0,i.jsxs)("div",{className:"footerContainer",children:[(0,i.jsx)(V.Z,{children:"Copy right @crema 2021"}),(0,i.jsx)(p.Z,{sx:{ml:"auto"},children:(0,i.jsx)(X.Z,{color:"primary",children:"Buy Now"})})]})}):null})},eW=e=>{let{children:r,...t}=e;return(0,i.jsx)(p.Z,{sx:e=>({minHeight:"100vh",display:"flex",flexDirection:"column",position:"relative",backgroundColor:e.palette.background.default,"&.boxedLayout":{maxWidth:{xl:1480},mx:{xl:"auto"},boxShadow:"none",borderLeft:"1px solid #e8e5dd",borderRight:"1px solid #e8e5dd",pt:{xl:0},"& .mini-sidebar":{position:{xl:"sticky"},height:{xl:"100%"},"& [data-simplebar]":{height:{xl:"calc(100vh - 70px) !important"}}},"& .appMainFixedHeader":{pt:{xl:0},"& .app-bar":{position:{xl:"sticky"},width:{xl:"100%"}}},"& .mainContent":{position:{xl:"static"},ml:{xl:0}}
1,"& .mini-sidebar-collapsed":{"&.appMainFixedHeader":{"& .app-bar":{width:{xl:"100%"}}},"& .mainContent":{width:{xl:"100%"},ml:{xl:0}}},"& .fixed-footer":{position:{xl:"sticky"}},"& .appMainFixedFooter":{pb:{xl:0}}},"&.framedLayout":{padding:{xl:5},backgroundColor:e.palette.primary.main,"& .miniSidebarWrapper":{borderRadius:{xl:3}},"& .mini-sidebar":{position:{xl:"sticky"},height:{xl:"100%"},borderTopLeftRadius:{xl:12},borderBottomLeftRadius:{xl:12},overflow:{xl:"hidden"},"& [data-simplebar]":{height:{xl:"calc(100vh - 70px) !important"}}},"& .app-bar":{borderTopRightRadius:{xl:12}},"& .footer":{borderBottomRightRadius:{xl:12}},"& .appMainFixedHeader":{pt:{xl:0},"& .app-bar":{position:{xl:"sticky"},width:{xl:"100%"}}},"& .mainContent":{position:{xl:"static"},ml:{xl:0}},"& .mini-sidebar-collapsed":{"&.appMainFixedHeader":{"& .app-bar":{width:{xl:"100%"}}},"& .mainContent":{width:{xl:"100%"},ml:{xl:0}}},"& .fixed-footer":{position:{xl:"sticky"}},"& .appMainFixedFooter":{pb:{xl:0}}}}),...t,children:(0,i.jsx)(h.Z,{sx:{maxHeight:"100vh"},children:r})})};let eH={[d.Dt.MINI]:e=>{let{children:r,routesConfig:t}=e,{footer:s,layoutType:n,headerType:l,footerType:h}=(0,G.l5)(),m=(0,o.usePathname)(),[u,g]=(0,a.useState)(!1),x=()=>{g(!u)};return(0,a.useEffect)(()=>{g(!1)},[m]),(0,i.jsx)(eW,{className:(0,c.Z)({boxedLayout:n===d.ms.BOXED,framedLayout:n===d.ms.FRAMED}),children:(0,i.jsxs)(ez,{className:(0,c.Z)("miniSidebarWrapper",{"mini-sidebar-collapsed":u,appMainFooter:s&&"fluid"===h,appMainFixedFooter:s&&"fixed"===h,appMainFixedHeader:"fixed"===l}),children:[(0,i.jsx)(J,{routesConfig:t,isNavCollapsed:u,toggleNavCollapsed:x}),(0,i.jsxs)(p.Z,{className:"mainContent",children:[(0,i.jsx)(eP,{toggleNavCollapsed:x}),(0,i.jsx)(ea,{children:r}),(0,i.jsx)(eO,{})]})]})})}};var eU=t(85657),eq=t(22744);let eG=[{id:"hr",title:"ระบบบริหารงานบุคลากร",messageId:"sidebar.hr",icon:(0,i.jsx)(eq.div,{}),type:"group",children:[{id:"menu1",title:"sidebar.hr001",messageId:"sidebar.hr001",type:"item",icon:(0,i.jsx)(eq.oNL,{}),url:"/dashboards/crm",requiredRoles:[]},{id:"menu17",title:"sidebar.hr004",messageId:"sidebar.hr004",type:"item",icon:(0,i.jsx)(eq.jpR,{}),url:"/hr_user/usersearch",requiredRoles:[]},{id:"menu2",title:"sidebar.hr002",messageId:"sidebar.hr002",type:"item",icon:(0,i.jsx)(eq.h24,{}),url:"/hr_user/userinfo",requiredRoles:[]},{id:"menu3",title:"sidebar.hr003",messageId:"sidebar.hr003",type:"item",icon:(0,i.jsx)(eq.dt7,{}),url:"/hr_user/hr806",requiredRoles:[]},{id:"menu4",title:"sidebar.hr01",messageId:"sidebar.hr01",type:"collapse",icon:(0,i.jsx)(eq.cgG,{}),requiredRoles:[],children:[{id:"hr101",title:"sidebar.hr01.01",messageId:"sidebar.hr01.01",type:"item",url:"/hr01/hr101"},{id:"hr102",title:"sidebar.hr01.02",messageId:"sidebar.hr01.02",type:"item",url:"/hr01/hr102"},{id:"hr120",title:"sidebar.hr01.20",messageId:"sidebar.hr01.20",type:"item",url:"/hr01/hr120"},{id:"hr103",title:"sidebar.hr01.03",messageId:"sidebar.hr01.03",type:"item",url:"/hr01/hr103"},{id:"hr104",title:"sidebar.hr01.04",messageId:"sidebar.hr01.04",type:"item",url:"/hr01/hr104"},{id:"hr105",title:"sidebar.hr01.05",messageId:"sidebar.hr01.05",type:"item",url:"/hr01/hr105"},{id:"hr106",title:"sidebar.hr01.06",messageId:"sidebar.hr01.06",type:"item",url:"/hr01/hr106"},{id:"hr107",title:"sidebar.hr01.07",messageId:"sidebar.hr01.07",type:"item",url:"/hr01/hr107"},{id:"hr108",title:"sidebar.hr01.08",messageId:"sidebar.hr01.08",type:"item",url:"/hr01/hr108"},{id:"hr109",title:"sidebar.hr01.09",messageId:"sidebar.hr01.09",type:"item",url:"/hr01/hr109"},{id:"hr110",title:"sidebar.hr01.10",messageId:"sidebar.hr01.10",type:"item",url:"/hr01/hr110"},{id:"hr111",title:"sidebar.hr01.11",messageId:"sidebar.hr01.11",type:"item",url:"/hr01/hr111"},{id:"hr115",title:"sidebar.hr01.15",messageId:"sidebar.hr01.15",type:"item",url:"/hr01/hr115"},{id:"hr116",title:"sidebar.hr01.16",messageId:"sidebar.hr01.16",type:"item",url:"/hr01/hr116"},{id:"hr117",title:"sidebar.hr01.17",messageId:"sidebar.hr01.17",type:"item",url:"/hr01/hr117"},{id:"hr123",title:"sidebar.hr01.23",messageId:"sidebar.hr01.23",type:"item",url:"/hr01/hr123"},{id:"hr118",title:"sidebar.hr01.18",messageId:"sidebar.hr01.18",type:"item",url:"/hr01/hr118"},{id:"hr119",title:"sidebar.hr01.19",messageId:"sidebar.hr01.19",type:"item",url:"/hr01/hr119"},{id:"hr121",title:"sidebar.hr01.21",messageId:"sidebar.hr01.21",type:"item",url:"/hr01/hr121"},{id:"hr122",title:"sidebar.hr01.22",messageId:"sidebar.hr01.22",type:"item",url:"/hr01/hr122"},{id:"hr124",title:"sidebar.hr01.24",messageId:"sidebar.hr01.24",type:"item",url:"/hr01/hr124"},{id:"hr125",title:"sidebar.hr01.25",messageId:"sidebar.hr01.25",type:"item",url:"/hr01/hr125"},{id:"hr126",title:"sidebar.hr01.26",messageId:"sidebar.hr01.26",type:"item",url:"/hr01/hr126"},{id:"hr127",title:"sidebar.hr01.27",messageId:"sidebar.hr01.27",type:"item",url:"/hr01/hr127"},{id:"hr128",title:"sidebar.hr01.28",messageId:"sidebar.hr01.28",type:"item",url:"/hr01/hr128"},{id:"hr129",title:"sidebar.hr01.29",messageId:"sidebar.hr01.29",type:"item",url:"/hr01/hr129"}]},{id:"menu5",title:"sidebar.hr02",messageId:"sidebar.hr02",type:"collapse",icon:(0,i.jsx)(eq.YGi,{}),requiredRoles:[],children:[{id:"hr201",title:"sidebar.hr02.01",messageId:"sidebar.hr02.01",type:"item",url:"/hr02/hr201"}]},{id:"menu6",title:"sidebar.hr03",messageId:"sidebar.hr03",type:"collapse",icon:(0,i.jsx)(eq.Q10,{}),requiredRoles:[],children:[{id:"hr301",title:"sidebar.hr03",messageId:"sidebar.hr03.01",type:"item",url:"/hr03/hr301"},{id:"hr302",title:"sidebar.hr03",messageId:"sidebar.hr03.02",type:"item",url:"/hr03/hr302"},{id:"hr303",title:"sidebar.hr03",messageId:"sidebar.hr03.03",type:"item",url:"/hr03/hr303"},{id:"hr304",title:"sidebar.hr03",messageId:"sidebar.hr03.04",type:"item",url:"/hr03/hr304"},{id:"hr305",title:"sidebar.hr03",messageId:"sidebar.hr03.05",type:"item",url:"/hr03/hr305"}]},{id:"menu7",title:"Ecommerce",messageId:"sidebar.hr05",type:"collapse",icon:(0,i.jsx)(eq.sqf,{}),requiredRoles:[],children:[{id:"hr501",title:"sidebar.hr05",messageId:"sidebar.hr05.01",type:"item",url:"/hr05/hr501"},{id:"hr502",title:"sidebar.hr05",messageId:"sidebar.hr05.02",type:"item",url:"/hr05/hr502"}]},{id:"menu8",title:"sidebar.hr08",messageId:"sidebar.hr08",type:"collapse",icon:(0,i.jsx)(eq.cYp,{}),requiredRoles:[],children:[{id:"hr801",title:"sidebar.hr08",messageId:"sidebar.hr08.01",type:"item",url:"/hr08/hr801"},{id:"hr802",title:"sidebar.hr08",messageId:"sidebar.hr08.02",type:"item",url:"/hr08/hr802"},{id:"hr803",title:"sidebar.hr08",messageId:"sidebar.hr08.03",type:"item",url:"/hr08/hr803"},{id:"hr804",title:"sidebar.hr08",messageId:"sidebar.hr08.04",type:"item",url:"/hr08/hr804"},{id:"hr805",title:"sidebar.hr08",messageId:"sidebar.hr08.05",type:"item",url:"/hr08/hr805"},{id:"hr806",title:"sidebar.hr08",messageId:"sidebar.hr08.06",type:"item",url:"/hr08/hr806"}]},{id:"menu9",title:"sidebar.hr09",messageId:"sidebar.hr09",type:"collapse",icon:(0,i.jsx)(eq.Pvu,{}),requiredRoles:[],children:[{id:"hr901",title:"sidebar.hr09",messageId:"sidebar.hr09.01",type:"item",url:"/hr09/hr901"},{id:"hr903",title:"sidebar.hr09",messageId:"sidebar.hr09.03",type:"item",url:"/hr09/hr903"},{id:"hr902",title:"sidebar.hr09",messageId:"sidebar.hr09.02",type:"item",url:"/hr09/hr902"},{id:"hr904",title:"sidebar.hr09",messageId:"sidebar.hr09.04",type:"item",url:"/hr09/hr904"}]},{id:"menu10",title:"sidebar.hr11",messageId:"sidebar.hr11",type:"collapse",icon:(0,i.jsx)(eq.boP,{}),requiredRoles:[],children:[{id:"hr1101",title:"sidebar.hr11",messageId:"sidebar.hr11.01",type:"item",url:"/hr11/hr1101"}]},{id:"menu11",title:"sidebar.hr10",messageId:"sidebar.hr10",type:"collapse",icon:(0,i.jsx)(eq.z58,{}),requiredRoles:[],children:[{id:"hr1002",title:"sidebar.hr10",messageId:"sidebar.hr10.02",type:"item",url:"/hr10/hr1002"},{id:"hr1003",title:"sidebar.hr10",messageId:"sidebar.hr10.03",type:"item",url:"/hr10/hr1003"},{id:"hr1004",title:"sidebar.hr10",messageId:"sidebar.hr10.04",type:"item",url:"/hr10/hr1004"},{id:"hr1005",title:"sidebar.hr10",messageId:"sidebar.hr10.05",type:"item",url:"/hr10/hr1005"}]},{id:"menu12",title:"sidebar.rp01",messageId:"sidebar.rp01",type:"collapse",icon:(0,i.jsx)(eq.vfz,{}),requiredRoles:[],children:[{id:"rp101",title:"sidebar.rp01",messageId:"sidebar.rp01.01",type:"item",url:"/rp01/rp101"},{id:"rp102",title:"sidebar.rp01",messageId:"sidebar.rp01.02",type:"item",url:"/rp01/rp102"},{id:"rp103",title:"sidebar.rp01",messageId:"sidebar.rp01.03",type:"item",url:"/rp01/rp103"},{id:"rp104",title:"sidebar.rp01",messageId:"sidebar.rp01.04",type:"item",url:"/rp01/rp104"},{id:"rp105",title:"sidebar.rp01",messageId:"sidebar.rp01.05",type:"item",url:"/rp01/rp105"},{id:"rp106",title:"sidebar.rp01",messageId:"sidebar.rp01.06",type:"item",url:"/rp01/rp106"},{id:"rp107",title:"sidebar.rp01",messageId:"sidebar.rp01.07",type:"item",url:"/rp01/rp107"},{id:"rp108",title:"sidebar.rp01",messageId:"sidebar.rp01.08",type:"item",url:"/rp01/rp108"},{id:"rp109",title:"sidebar.rp01",messageId:"sidebar.rp01.09",type:"item",url:"/rp01/rp109"},{id:"rp110",title:"sidebar.rp01",messageId:"sidebar.rp01.10",type:"item",url:"/rp01/rp110"},{id:"rp111",title:"sidebar.rp01",messageId:"sidebar.rp01.11",type:"item",url:"/rp01/rp111"},{id:"rp112",title:"sidebar.rp01",messageId:"sidebar.rp01.12",type:"item",url:"/rp01/rp112"},{id:"rp113",title:"sidebar.rp01",messageId:"sidebar.rp01.13",type:"item",url:"/rp01/rp113"},{id:"rp114",title:"sidebar.rp01",messageId:"sidebar.rp01.14",type:"item",url:"/rp01/rp114"}]},{id:"menu13",title:"sidebar.rp02",messageId:"sidebar.rp02",type:"collapse",icon:(0,i.jsx)(eq.bZh,{}),requiredRoles:[],children:[{id:"rp201",title:"sidebar.rp02",messageId:"sidebar.rp02.01",type:"item",url:"/rp02/rp201"},{id:"rp202",title:"sidebar.rp02",messageId:"sidebar.rp02.02",type:"item",url:"/rp02/rp202"},{id:"rp203",title:"sidebar.rp02",messageId:"sidebar.rp02.03",type:"item",url:"/rp02/rp203"},{id:"rp204",title:"sidebar.rp02",messageId:"sidebar.rp02.04",type:"item",url:"/rp02/rp204"},{id:"rp205",title:"sidebar.rp02",messageId:"sidebar.rp02.05",type:"item",url:"/rp02/rp205"},{id:"rp206",title:"sidebar.rp02",messageId:"sidebar.rp02.06",type:"item",url:"/rp02/rp206"},{id:"rp207",title:"sidebar.rp02",messageId:"sidebar.rp02.07",type:"item",url:"/rp02/rp207"}]},{id:"menu14",title:"sidebar.rp04",messageId:"sidebar.rp04",type:"collapse",icon:(0,i.jsx)(eq.bZh,{}),children:[{id:"rp401",title:"sidebar.rp04",messageId:"sidebar.rp04.01",type:"item",url:"/rp04/rp401"},{id:"rp402",title:"sidebar.rp04",messageId:"sidebar.rp04.02",type:"item",url:"/rp04/rp402"},{id:"rp403",title:"sidebar.rp04",messageId:"sidebar.rp04.03",type:"item",url:"/rp04/rp403"},{id:"rp404",title:"sidebar.rp04",messageId:"sidebar.rp04.04",type:"item",url:"/rp04/rp404"},{id:"rp405",title:"sidebar.rp04",messageId:"sidebar.rp04.05",type:"item",url:"/rp04/rp405"},{id:"rp406",title:"sidebar.rp04",messageId:"sidebar.rp04.06",type:"item",url:"/rp04/rp406"},{id:"rp407",title:"sidebar.rp04",messageId:"sidebar.rp04.07",type:"item",url:"/rp04/rp407"},{id:"rp408",title:"sidebar.rp04",messageId:"sidebar.rp04.08",type:"item",url:"/rp04/rp408"},{id:"rp409",title:"sidebar.rp04",messageId:"sidebar.rp04.09",type:"item",url:"/rp04/rp409"}]},{id:"menu15",title:"sidebar.rp03",messageId:"sidebar.rp03",type:"collapse",icon:(0,i.jsx)(eq.fb2,{}),children:[{id:"rp301",title:"sidebar.rp03",messageId:"sidebar.rp03.01",type:"item",url:"/rp03/rp301"},{id:"rp302",title:"sidebar.rp03",messageId:"sidebar.rp03.02",type:"item",url:"/rp03/rp302"},{id:"rp303",title:"sidebar.rp03",messageId:"sidebar.rp03.03",type:"item",url:"/rp03/rp303"}]}]},{id:"menu16",title:"sidebar.problems",messageId:"sidebar.problems",type:"item",icon:(0,i.jsx)(eq.fb2,{}),url:"https://docs.google.com/forms/d/e/1FAIpQLSdjMNKOecZ4eiNfPPTRCcd_LbCYAuJRbx2kIp-1VfWAlcmSgA/viewform?fbclid=IwY2xjawNf-rRleHRuA2FlbQIxMABicmlkETExT3pGRXhBTnFZd1RQOWFGAR4WMk5Ebk7mEY5E1gw-76HPfjJN2FWnhz_V3MCIbFjTjS_P2hAb-fEa9xy8Ew_aem_2zUwwJsOzDOl8kzlEA_ZqQ",target:"_blank"}],eJ=["menu1","menu2","menu3","menu4","menu5","menu6","menu7","menu8","menu9","menu10","menu11","menu12","menu13","menu14","menu15","menu16","menu17"],eY=e=>e.map(e=>{let r={...e};return r.children&&(r.children=eY(r.children)),r}),eX=async()=>{try{let e=eJ.map(e=>
1eU.Z.get("/hr/service/hr/userstaff/".concat(e))),r=await Promise.allSettled(e),t=new Map;r.forEach((e,r)=>{let i=eJ[r];if("fulfilled"===e.status&&e.value.data){let r=e.value.data.data||[];t.set(i,r)}else{let r="rejected"===e.status?e.reason:e.value;console.error("[LoadPermission] API Fetch failed for menu ID: ".concat(i,". Status: ").concat(e.status),r)}});let i=eY(eG),a=e=>e.map(e=>{let r={...e};if(t.has(r.id)){let e=t.get(r.id)||[],i=r.requiredRoles||[],a=Array.from(new Set([...i,...e]));r.requiredRoles=a}return r.children&&(r.children=a(r.children)),r});return a(i)}catch(e){return console.error("Critical error in loadAndMergeRoutePermissions:",e),eG}},eV=(e,r)=>!e||0===e.length||e.some(e=>r.includes(e)),eQ=(e,r)=>{let t=[];for(let i of e){let e={...i},a=eV(e.requiredRoles,r),s=!0;"menu7"===e.id&&(s=["HR_ADMIN","HR_SALALY"].some(e=>r.includes(e))),e.children&&e.children.length>0?(e.children=eQ(e.children,r),a&&s&&e.children.length>0&&t.push(e)):a&&s&&t.push(e)}return t},eK=e=>{for(let r of e){if(r.url&&"item"===r.type)return r.url;if(r.children&&r.children.length>0){let e=eK(r.children);if(e)return e}}return null},e$=(e,r)=>e.some(e=>{var t,i;return e.url===r||(null===(t=e.children)||void 0===t?void 0:t.some(e=>e$(e.children||[],r)))||(null===(i=e.children)||void 0===i?void 0:i.some(e=>e.url===r))});function e0(e){let{children:r}=e,[t,d]=(0,a.useState)(null),[c,h]=(0,a.useState)([]),{navStyle:p}=(0,G.l5)(),m=eH[p],{updateNavStyle:g}=(0,G.au)(),{updateMenuStyle:x,setSidebarBgImage:b}=(0,u.Lf)(),f=(0,o.useSearchParams)(),{user:y,isLoading:v}=(0,n.f)(),j=(0,a.useMemo)(()=>{var e,r;return(null==y?void 0:null===(r=y.resource_access)||void 0===r?void 0:null===(e=r.erp_hr)||void 0===e?void 0:e.roles)||["hr_user"]},[y]),I=(0,a.useMemo)(()=>Array.from(new Set([...j,...c.map(e=>e.granstname)])),[j,c]),Z=(0,o.useRouter)(),A=f.get("layout"),w=f.get("menuStyle"),C=f.get("sidebarImage"),S="/dashboards/crm",R="/hr_user/userinfo";return((0,a.useEffect)(()=>{y||v||(0,s.signIn)("keycloak")},[y,v]),(0,a.useEffect)(()=>{var e;let r=async()=>{var e;let r=null==y?void 0:null===(e=y.staffinfo)||void 0===e?void 0:e.staff_id;if(r)try{let e=await eU.Z.get("/hr/service/hr/userstaffgrant/".concat(r));h(e.data.data||[])}catch(e){console.error("Error fetching user grants in layout:",e),h([])}};y&&(null===(e=y.staffinfo)||void 0===e?void 0:e.staff_id)&&r()},[y]),(0,a.useEffect)(()=>{if(null===t&&I.length>0){let e=window.location.pathname;if("/"!==e&&y&&j.length>0){eX().then(e=>{d(eQ(e,I))}).catch(e=>{d([])});return}eX().then(r=>{let t=eQ(r,I);d(t);let i="/";e!==(i=I.includes("hr_admin")&&e$(t,S)?S:(I.includes("hr_user")||I.includes("hr_fac"))&&e$(t,R)?R:eK(t)||"/")&&Z.replace(i)}).catch(e=>{console.error("Failed to load or filter dynamic routes:",e),d([])})}},[t,I,v,Z,y,j]),(0,a.useEffect)(()=>{A&&g(A),w&&x(w),C&&b(!0)},[A,w,C,g,x,b]),v||null===t)?(0,i.jsx)(l.Z,{}):(0,i.jsx)(m,{routesConfig:t,children:r})}},61767:function(e,r,t){"use strict";t.d(r,{a:function(){return s},f:function(){return a}});var i=t(80605);let a=()=>{let{data:e,status:r}=(0,i.useSession)();null==e||e.user;let t="loading"===r,a="authenticated"===r,s=null;return!t&&a&&(null==e?void 0:e.user)?s=e.user:t||console.log("useAuthUser: User not authenticated or session/user is missing."),{isLoading:t,isAuthenticated:a,user:s}},s=()=>({logout:i.signOut})}},function(e){e.O(0,[5751,6051,7699,1779,8422,614,4710,7955,8660,9448,1460,8058,357,9496,5657,1845,4670,8467,605,7644,3145,1969,7686,4293,2971,2117,1744],function(){return e(e.s=4538)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.